master-degree-notes/.obsidian/plugins/pdf-plus/main.js
2024-09-26 23:20:25 +02:00

120 lines
948 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/
var iy=Object.create;var Hc=Object.defineProperty;var ny=Object.getOwnPropertyDescriptor;var ry=Object.getOwnPropertyNames;var oy=Object.getPrototypeOf,sy=Object.prototype.hasOwnProperty;var ye=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports),Yh=(n,t)=>{for(var e in t)Hc(n,e,{get:t[e],enumerable:!0})},yg=(n,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of ry(t))!sy.call(n,r)&&r!==e&&Hc(n,r,{get:()=>t[r],enumerable:!(i=ny(t,r))||i.enumerable});return n};var Un=(n,t,e)=>(e=n!=null?iy(oy(n)):{},yg(t||!n||!n.__esModule?Hc(e,"default",{value:n,enumerable:!0}):e,n)),ay=n=>yg(Hc({},"__esModule",{value:!0}),n);var wg=(n,t,e)=>{if(!t.has(n))throw TypeError("Cannot "+e)};var pi=(n,t,e)=>(wg(n,t,"read from private field"),e?e.call(n):t.get(n)),ba=(n,t,e)=>{if(t.has(n))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(n):t.set(n,e)},xa=(n,t,e,i)=>(wg(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e);var rn=ye(xt=>{"use strict";var my=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function by(n,t){return Object.prototype.hasOwnProperty.call(n,t)}xt.assign=function(n){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var e=t.shift();if(e){if(typeof e!="object")throw new TypeError(e+"must be non-object");for(var i in e)by(e,i)&&(n[i]=e[i])}}return n};xt.shrinkBuf=function(n,t){return n.length===t?n:n.subarray?n.subarray(0,t):(n.length=t,n)};var xy={arraySet:function(n,t,e,i,r){if(t.subarray&&n.subarray){n.set(t.subarray(e,e+i),r);return}for(var o=0;o<i;o++)n[r+o]=t[e+o]},flattenChunks:function(n){var t,e,i,r,o,s;for(i=0,t=0,e=n.length;t<e;t++)i+=n[t].length;for(s=new Uint8Array(i),r=0,t=0,e=n.length;t<e;t++)o=n[t],s.set(o,r),r+=o.length;return s}},yy={arraySet:function(n,t,e,i,r){for(var o=0;o<i;o++)n[r+o]=t[e+o]},flattenChunks:function(n){return[].concat.apply([],n)}};xt.setTyped=function(n){n?(xt.Buf8=Uint8Array,xt.Buf16=Uint16Array,xt.Buf32=Int32Array,xt.assign(xt,xy)):(xt.Buf8=Array,xt.Buf16=Array,xt.Buf32=Array,xt.assign(xt,yy))};xt.setTyped(my)});var Yg=ye(Qo=>{"use strict";var wy=rn(),vy=4,Cg=0,Tg=1,Fy=2;function Jo(n){for(var t=n.length;--t>=0;)n[t]=0}var Py=0,Mg=1,ky=2,Dy=3,Sy=258,vu=29,Ia=256,Ca=Ia+1+vu,Yo=30,Fu=19,Ng=2*Ca+1,Or=15,gu=16,Cy=7,Pu=256,Rg=16,Vg=17,Bg=18,yu=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Kc=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ty=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Hg=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Ey=512,on=new Array((Ca+2)*2);Jo(on);var Sa=new Array(Yo*2);Jo(Sa);var Ta=new Array(Ey);Jo(Ta);var Ea=new Array(Sy-Dy+1);Jo(Ea);var ku=new Array(vu);Jo(ku);var Gc=new Array(Yo);Jo(Gc);function mu(n,t,e,i,r){this.static_tree=n,this.extra_bits=t,this.extra_base=e,this.elems=i,this.max_length=r,this.has_stree=n&&n.length}var Ug,zg,qg;function bu(n,t){this.dyn_tree=n,this.max_code=0,this.stat_desc=t}function Wg(n){return n<256?Ta[n]:Ta[256+(n>>>7)]}function Aa(n,t){n.pending_buf[n.pending++]=t&255,n.pending_buf[n.pending++]=t>>>8&255}function St(n,t,e){n.bi_valid>gu-e?(n.bi_buf|=t<<n.bi_valid&65535,Aa(n,n.bi_buf),n.bi_buf=t>>gu-n.bi_valid,n.bi_valid+=e-gu):(n.bi_buf|=t<<n.bi_valid&65535,n.bi_valid+=e)}function Li(n,t,e){St(n,e[t*2],e[t*2+1])}function jg(n,t){var e=0;do e|=n&1,n>>>=1,e<<=1;while(--t>0);return e>>>1}function Ay(n){n.bi_valid===16?(Aa(n,n.bi_buf),n.bi_buf=0,n.bi_valid=0):n.bi_valid>=8&&(n.pending_buf[n.pending++]=n.bi_buf&255,n.bi_buf>>=8,n.bi_valid-=8)}function Iy(n,t){var e=t.dyn_tree,i=t.max_code,r=t.stat_desc.static_tree,o=t.stat_desc.has_stree,s=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,c=t.stat_desc.max_length,l,d,h,u,f,p,g=0;for(u=0;u<=Or;u++)n.bl_count[u]=0;for(e[n.heap[n.heap_max]*2+1]=0,l=n.heap_max+1;l<Ng;l++)d=n.heap[l],u=e[e[d*2+1]*2+1]+1,u>c&&(u=c,g++),e[d*2+1]=u,!(d>i)&&(n.bl_count[u]++,f=0,d>=a&&(f=s[d-a]),p=e[d*2],n.opt_len+=p*(u+f),o&&(n.static_len+=p*(r[d*2+1]+f)));if(g!==0){do{for(u=c-1;n.bl_count[u]===0;)u--;n.bl_count[u]--,n.bl_count[u+1]+=2,n.bl_count[c]--,g-=2}while(g>0);for(u=c;u!==0;u--)for(d=n.bl_count[u];d!==0;)h=n.heap[--l],!(h>i)&&(e[h*2+1]!==u&&(n.opt_len+=(u-e[h*2+1])*e[h*2],e[h*2+1]=u),d--)}}function Kg(n,t,e){var i=new Array(Or+1),r=0,o,s;for(o=1;o<=Or;o++)i[o]=r=r+e[o-1]<<1;for(s=0;s<=t;s++){var a=n[s*2+1];a!==0&&(n[s*2]=jg(i[a]++,a))}}function Ly(){var n,t,e,i,r,o=new Array(Or+1);for(e=0,i=0;i<vu-1;i++)for(ku[i]=e,n=0;n<1<<yu[i];n++)Ea[e++]=i;for(Ea[e-1]=i,r=0,i=0;i<16;i++)for(Gc[i]=r,n=0;n<1<<Kc[i];n++)Ta[r++]=i;for(r>>=7;i<Yo;i++)for(Gc[i]=r<<7,n=0;n<1<<Kc[i]-7;n++)Ta[256+r++]=i;for(t=0;t<=Or;t++)o[t]=0;for(n=0;n<=143;)on[n*2+1]=8,n++,o[8]++;for(;n<=255;)on[n*2+1]=9,n++,o[9]++;for(;n<=279;)on[n*2+1]=7,n++,o[7]++;for(;n<=287;)on[n*2+1]=8,n++,o[8]++;for(Kg(on,Ca+1,o),n=0;n<Yo;n++)Sa[n*2+1]=5,Sa[n*2]=jg(n,5);Ug=new mu(on,yu,Ia+1,Ca,Or),zg=new mu(Sa,Kc,0,Yo,Or),qg=new mu(new Array(0),Ty,0,Fu,Cy)}function Gg(n){var t;for(t=0;t<Ca;t++)n.dyn_ltree[t*2]=0;for(t=0;t<Yo;t++)n.dyn_dtree[t*2]=0;for(t=0;t<Fu;t++)n.bl_tree[t*2]=0;n.dyn_ltree[Pu*2]=1,n.opt_len=n.static_len=0,n.last_lit=n.matches=0}function Xg(n){n.bi_valid>8?Aa(n,n.bi_buf):n.bi_valid>0&&(n.pending_buf[n.pending++]=n.bi_buf),n.bi_buf=0,n.bi_valid=0}function Oy(n,t,e,i){Xg(n),i&&(Aa(n,e),Aa(n,~e)),wy.arraySet(n.pending_buf,n.window,t,e,n.pending),n.pending+=e}function Eg(n,t,e,i){var r=t*2,o=e*2;return n[r]<n[o]||n[r]===n[o]&&i[t]<=i[e]}function xu(n,t,e){for(var i=n.heap[e],r=e<<1;r<=n.heap_len&&(r<n.heap_len&&Eg(t,n.heap[r+1],n.heap[r],n.depth)&&r++,!Eg(t,i,n.heap[r],n.depth));)n.heap[e]=n.heap[r],e=r,r<<=1;n.heap[e]=i}function Ag(n,t,e){var i,r,o=0,s,a;if(n.last_lit!==0)do i=n.pending_buf[n.d_buf+o*2]<<8|n.pending_buf[n.d_buf+o*2+1],r=n.pending_buf[n.l_buf+o],o++,i===0?Li(n,r,t):(s=Ea[r],Li(n,s+Ia+1,t),a=yu[s],a!==0&&(r-=ku[s],St(n,r,a)),i--,s=Wg(i),Li(n,s,e),a=Kc[s],a!==0&&(i-=Gc[s],St(n,i,a)));while(o<n.last_lit);Li(n,Pu,t)}function wu(n,t){var e=t.dyn_tree,i=t.stat_desc.static_tree,r=t.stat_desc.has_stree,o=t.stat_desc.elems,s,a,c=-1,l;for(n.heap_len=0,n.heap_max=Ng,s=0;s<o;s++)e[s*2]!==0?(n.heap[++n.heap_len]=c=s,n.depth[s]=0):e[s*2+1]=0;for(;n.heap_len<2;)l=n.heap[++n.heap_len]=c<2?++c:0,e[l*2]=1,n.depth[l]=0,n.opt_len--,r&&(n.static_len-=i[l*2+1]);for(t.max_code=c,s=n.heap_len>>1;s>=1;s--)xu(n,e,s);l=o;do s=n.heap[1],n.heap[1]=n.heap[n.heap_len--],xu(n,e,1),a=n.heap[1],n.heap[--n.heap_max]=s,n.heap[--n.heap_max]=a,e[l*2]=e[s*2]+e[a*2],n.depth[l]=(n.depth[s]>=n.depth[a]?n.depth[s]:n.depth[a])+1,e[s*2+1]=e[a*2+1]=l,n.heap[1]=l++,xu(n,e,1);while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],Iy(n,t),Kg(e,c,n.bl_count)}function Ig(n,t,e){var i,r=-1,o,s=t[0*2+1],a=0,c=7,l=4;for(s===0&&(c=138,l=3),t[(e+1)*2+1]=65535,i=0;i<=e;i++)o=s,s=t[(i+1)*2+1],!(++a<c&&o===s)&&(a<l?n.bl_tree[o*2]+=a:o!==0?(o!==r&&n.bl_tree[o*2]++,n.bl_tree[Rg*2]++):a<=10?n.bl_tree[Vg*2]++:n.bl_tree[Bg*2]++,a=0,r=o,s===0?(c=138,l=3):o===s?(c=6,l=3):(c=7,l=4))}function Lg(n,t,e){var i,r=-1,o,s=t[0*2+1],a=0,c=7,l=4;for(s===0&&(c=138,l=3),i=0;i<=e;i++)if(o=s,s=t[(i+1)*2+1],!(++a<c&&o===s)){if(a<l)do Li(n,o,n.bl_tree);while(--a!==0);else o!==0?(o!==r&&(Li(n,o,n.bl_tree),a--),Li(n,Rg,n.bl_tree),St(n,a-3,2)):a<=10?(Li(n,Vg,n.bl_tree),St(n,a-3,3)):(Li(n,Bg,n.bl_tree),St(n,a-11,7));a=0,r=o,s===0?(c=138,l=3):o===s?(c=6,l=3):(c=7,l=4)}}function My(n){var t;for(Ig(n,n.dyn_ltree,n.l_desc.max_code),Ig(n,n.dyn_dtree,n.d_desc.max_code),wu(n,n.bl_desc),t=Fu-1;t>=3&&n.bl_tree[Hg[t]*2+1]===0;t--);return n.opt_len+=3*(t+1)+5+5+4,t}function Ny(n,t,e,i){var r;for(St(n,t-257,5),St(n,e-1,5),St(n,i-4,4),r=0;r<i;r++)St(n,n.bl_tree[Hg[r]*2+1],3);Lg(n,n.dyn_ltree,t-1),Lg(n,n.dyn_dtree,e-1)}function Ry(n){var t=4093624447,e;for(e=0;e<=31;e++,t>>>=1)if(t&1&&n.dyn_ltree[e*2]!==0)return Cg;if(n.dyn_ltree[9*2]!==0||n.dyn_ltree[10*2]!==0||n.dyn_ltree[13*2]!==0)return Tg;for(e=32;e<Ia;e++)if(n.dyn_ltree[e*2]!==0)return Tg;return Cg}var Og=!1;function Vy(n){Og||(Ly(),Og=!0),n.l_desc=new bu(n.dyn_ltree,Ug),n.d_desc=new bu(n.dyn_dtree,zg),n.bl_desc=new bu(n.bl_tree,qg),n.bi_buf=0,n.bi_valid=0,Gg(n)}function Zg(n,t,e,i){St(n,(Py<<1)+(i?1:0),3),Oy(n,t,e,!0)}function By(n){St(n,Mg<<1,3),Li(n,Pu,on),Ay(n)}function Hy(n,t,e,i){var r,o,s=0;n.level>0?(n.strm.data_type===Fy&&(n.strm.data_type=Ry(n)),wu(n,n.l_desc),wu(n,n.d_desc),s=My(n),r=n.opt_len+3+7>>>3,o=n.static_len+3+7>>>3,o<=r&&(r=o)):r=o=e+5,e+4<=r&&t!==-1?Zg(n,t,e,i):n.strategy===vy||o===r?(St(n,(Mg<<1)+(i?1:0),3),Ag(n,on,Sa)):(St(n,(ky<<1)+(i?1:0),3),Ny(n,n.l_desc.max_code+1,n.d_desc.max_code+1,s+1),Ag(n,n.dyn_ltree,n.dyn_dtree)),Gg(n),i&&Xg(n)}function Uy(n,t,e){return n.pending_buf[n.d_buf+n.last_lit*2]=t>>>8&255,n.pending_buf[n.d_buf+n.last_lit*2+1]=t&255,n.pending_buf[n.l_buf+n.last_lit]=e&255,n.last_lit++,t===0?n.dyn_ltree[e*2]++:(n.matches++,t--,n.dyn_ltree[(Ea[e]+Ia+1)*2]++,n.dyn_dtree[Wg(t)*2]++),n.last_lit===n.lit_bufsize-1}Qo._tr_init=Vy;Qo._tr_stored_block=Zg;Qo._tr_flush_block=Hy;Qo._tr_tally=Uy;Qo._tr_align=By});var Du=ye((tk,Jg)=>{"use strict";function zy(n,t,e,i){for(var r=n&65535|0,o=n>>>16&65535|0,s=0;e!==0;){s=e>2e3?2e3:e,e-=s;do r=r+t[i++]|0,o=o+r|0;while(--s);r%=65521,o%=65521}return r|o<<16|0}Jg.exports=zy});var Su=ye((ik,Qg)=>{"use strict";function qy(){for(var n,t=[],e=0;e<256;e++){n=e;for(var i=0;i<8;i++)n=n&1?3988292384^n>>>1:n>>>1;t[e]=n}return t}var Wy=qy();function jy(n,t,e,i){var r=Wy,o=i+e;n^=-1;for(var s=i;s<o;s++)n=n>>>8^r[(n^t[s])&255];return n^-1}Qg.exports=jy});var Xc=ye((nk,_g)=>{"use strict";_g.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var am=ye(Ni=>{"use strict";var yt=rn(),jt=Yg(),im=Du(),Gn=Su(),Ky=Xc(),Vr=0,Gy=1,Xy=3,Qn=4,$g=5,Mi=0,em=1,Kt=-2,Zy=-3,Cu=-5,Yy=-1,Jy=1,Zc=2,Qy=3,_y=4,$y=0,ew=2,_c=8,tw=9,iw=15,nw=8,rw=29,ow=256,Eu=ow+1+rw,sw=30,aw=19,lw=2*Eu+1,cw=15,ae=3,Yn=258,mi=Yn+ae+1,dw=32,$c=42,Au=69,Yc=73,Jc=91,Qc=103,Mr=113,Oa=666,Je=1,Ma=2,Nr=3,es=4,hw=3;function Jn(n,t){return n.msg=Ky[t],t}function tm(n){return(n<<1)-(n>4?9:0)}function Zn(n){for(var t=n.length;--t>=0;)n[t]=0}function Xn(n){var t=n.state,e=t.pending;e>n.avail_out&&(e=n.avail_out),e!==0&&(yt.arraySet(n.output,t.pending_buf,t.pending_out,e,n.next_out),n.next_out+=e,t.pending_out+=e,n.total_out+=e,n.avail_out-=e,t.pending-=e,t.pending===0&&(t.pending_out=0))}function at(n,t){jt._tr_flush_block(n,n.block_start>=0?n.block_start:-1,n.strstart-n.block_start,t),n.block_start=n.strstart,Xn(n.strm)}function ue(n,t){n.pending_buf[n.pending++]=t}function La(n,t){n.pending_buf[n.pending++]=t>>>8&255,n.pending_buf[n.pending++]=t&255}function uw(n,t,e,i){var r=n.avail_in;return r>i&&(r=i),r===0?0:(n.avail_in-=r,yt.arraySet(t,n.input,n.next_in,r,e),n.state.wrap===1?n.adler=im(n.adler,t,r,e):n.state.wrap===2&&(n.adler=Gn(n.adler,t,r,e)),n.next_in+=r,n.total_in+=r,r)}function nm(n,t){var e=n.max_chain_length,i=n.strstart,r,o,s=n.prev_length,a=n.nice_match,c=n.strstart>n.w_size-mi?n.strstart-(n.w_size-mi):0,l=n.window,d=n.w_mask,h=n.prev,u=n.strstart+Yn,f=l[i+s-1],p=l[i+s];n.prev_length>=n.good_match&&(e>>=2),a>n.lookahead&&(a=n.lookahead);do if(r=t,!(l[r+s]!==p||l[r+s-1]!==f||l[r]!==l[i]||l[++r]!==l[i+1])){i+=2,r++;do;while(l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&i<u);if(o=Yn-(u-i),i=u-Yn,o>s){if(n.match_start=t,s=o,o>=a)break;f=l[i+s-1],p=l[i+s]}}while((t=h[t&d])>c&&--e!==0);return s<=n.lookahead?s:n.lookahead}function Rr(n){var t=n.w_size,e,i,r,o,s;do{if(o=n.window_size-n.lookahead-n.strstart,n.strstart>=t+(t-mi)){yt.arraySet(n.window,n.window,t,t,0),n.match_start-=t,n.strstart-=t,n.block_start-=t,i=n.hash_size,e=i;do r=n.head[--e],n.head[e]=r>=t?r-t:0;while(--i);i=t,e=i;do r=n.prev[--e],n.prev[e]=r>=t?r-t:0;while(--i);o+=t}if(n.strm.avail_in===0)break;if(i=uw(n.strm,n.window,n.strstart+n.lookahead,o),n.lookahead+=i,n.lookahead+n.insert>=ae)for(s=n.strstart-n.insert,n.ins_h=n.window[s],n.ins_h=(n.ins_h<<n.hash_shift^n.window[s+1])&n.hash_mask;n.insert&&(n.ins_h=(n.ins_h<<n.hash_shift^n.window[s+ae-1])&n.hash_mask,n.prev[s&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=s,s++,n.insert--,!(n.lookahead+n.insert<ae)););}while(n.lookahead<mi&&n.strm.avail_in!==0)}function fw(n,t){var e=65535;for(e>n.pending_buf_size-5&&(e=n.pending_buf_size-5);;){if(n.lookahead<=1){if(Rr(n),n.lookahead===0&&t===Vr)return Je;if(n.lookahead===0)break}n.strstart+=n.lookahead,n.lookahead=0;var i=n.block_start+e;if((n.strstart===0||n.strstart>=i)&&(n.lookahead=n.strstart-i,n.strstart=i,at(n,!1),n.strm.avail_out===0)||n.strstart-n.block_start>=n.w_size-mi&&(at(n,!1),n.strm.avail_out===0))return Je}return n.insert=0,t===Qn?(at(n,!0),n.strm.avail_out===0?Nr:es):(n.strstart>n.block_start&&(at(n,!1),n.strm.avail_out===0),Je)}function Tu(n,t){for(var e,i;;){if(n.lookahead<mi){if(Rr(n),n.lookahead<mi&&t===Vr)return Je;if(n.lookahead===0)break}if(e=0,n.lookahead>=ae&&(n.ins_h=(n.ins_h<<n.hash_shift^n.window[n.strstart+ae-1])&n.hash_mask,e=n.prev[n.strstart&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=n.strstart),e!==0&&n.strstart-e<=n.w_size-mi&&(n.match_length=nm(n,e)),n.match_length>=ae)if(i=jt._tr_tally(n,n.strstart-n.match_start,n.match_length-ae),n.lookahead-=n.match_length,n.match_length<=n.max_lazy_match&&n.lookahead>=ae){n.match_length--;do n.strstart++,n.ins_h=(n.ins_h<<n.hash_shift^n.window[n.strstart+ae-1])&n.hash_mask,e=n.prev[n.strstart&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=n.strstart;while(--n.match_length!==0);n.strstart++}else n.strstart+=n.match_length,n.match_length=0,n.ins_h=n.window[n.strstart],n.ins_h=(n.ins_h<<n.hash_shift^n.window[n.strstart+1])&n.hash_mask;else i=jt._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++;if(i&&(at(n,!1),n.strm.avail_out===0))return Je}return n.insert=n.strstart<ae-1?n.strstart:ae-1,t===Qn?(at(n,!0),n.strm.avail_out===0?Nr:es):n.last_lit&&(at(n,!1),n.strm.avail_out===0)?Je:Ma}function _o(n,t){for(var e,i,r;;){if(n.lookahead<mi){if(Rr(n),n.lookahead<mi&&t===Vr)return Je;if(n.lookahead===0)break}if(e=0,n.lookahead>=ae&&(n.ins_h=(n.ins_h<<n.hash_shift^n.window[n.strstart+ae-1])&n.hash_mask,e=n.prev[n.strstart&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=n.strstart),n.prev_length=n.match_length,n.prev_match=n.match_start,n.match_length=ae-1,e!==0&&n.prev_length<n.max_lazy_match&&n.strstart-e<=n.w_size-mi&&(n.match_length=nm(n,e),n.match_length<=5&&(n.strategy===Jy||n.match_length===ae&&n.strstart-n.match_start>4096)&&(n.match_length=ae-1)),n.prev_length>=ae&&n.match_length<=n.prev_length){r=n.strstart+n.lookahead-ae,i=jt._tr_tally(n,n.strstart-1-n.prev_match,n.prev_length-ae),n.lookahead-=n.prev_length-1,n.prev_length-=2;do++n.strstart<=r&&(n.ins_h=(n.ins_h<<n.hash_shift^n.window[n.strstart+ae-1])&n.hash_mask,e=n.prev[n.strstart&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=n.strstart);while(--n.prev_length!==0);if(n.match_available=0,n.match_length=ae-1,n.strstart++,i&&(at(n,!1),n.strm.avail_out===0))return Je}else if(n.match_available){if(i=jt._tr_tally(n,0,n.window[n.strstart-1]),i&&at(n,!1),n.strstart++,n.lookahead--,n.strm.avail_out===0)return Je}else n.match_available=1,n.strstart++,n.lookahead--}return n.match_available&&(i=jt._tr_tally(n,0,n.window[n.strstart-1]),n.match_available=0),n.insert=n.strstart<ae-1?n.strstart:ae-1,t===Qn?(at(n,!0),n.strm.avail_out===0?Nr:es):n.last_lit&&(at(n,!1),n.strm.avail_out===0)?Je:Ma}function pw(n,t){for(var e,i,r,o,s=n.window;;){if(n.lookahead<=Yn){if(Rr(n),n.lookahead<=Yn&&t===Vr)return Je;if(n.lookahead===0)break}if(n.match_length=0,n.lookahead>=ae&&n.strstart>0&&(r=n.strstart-1,i=s[r],i===s[++r]&&i===s[++r]&&i===s[++r])){o=n.strstart+Yn;do;while(i===s[++r]&&i===s[++r]&&i===s[++r]&&i===s[++r]&&i===s[++r]&&i===s[++r]&&i===s[++r]&&i===s[++r]&&r<o);n.match_length=Yn-(o-r),n.match_length>n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=ae?(e=jt._tr_tally(n,1,n.match_length-ae),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(e=jt._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),e&&(at(n,!1),n.strm.avail_out===0))return Je}return n.insert=0,t===Qn?(at(n,!0),n.strm.avail_out===0?Nr:es):n.last_lit&&(at(n,!1),n.strm.avail_out===0)?Je:Ma}function gw(n,t){for(var e;;){if(n.lookahead===0&&(Rr(n),n.lookahead===0)){if(t===Vr)return Je;break}if(n.match_length=0,e=jt._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++,e&&(at(n,!1),n.strm.avail_out===0))return Je}return n.insert=0,t===Qn?(at(n,!0),n.strm.avail_out===0?Nr:es):n.last_lit&&(at(n,!1),n.strm.avail_out===0)?Je:Ma}function Oi(n,t,e,i,r){this.good_length=n,this.max_lazy=t,this.nice_length=e,this.max_chain=i,this.func=r}var $o;$o=[new Oi(0,0,0,0,fw),new Oi(4,4,8,4,Tu),new Oi(4,5,16,8,Tu),new Oi(4,6,32,32,Tu),new Oi(4,4,16,16,_o),new Oi(8,16,32,32,_o),new Oi(8,16,128,128,_o),new Oi(8,32,128,256,_o),new Oi(32,128,258,1024,_o),new Oi(32,258,258,4096,_o)];function mw(n){n.window_size=2*n.w_size,Zn(n.head),n.max_lazy_match=$o[n.level].max_lazy,n.good_match=$o[n.level].good_length,n.nice_match=$o[n.level].nice_length,n.max_chain_length=$o[n.level].max_chain,n.strstart=0,n.block_start=0,n.lookahead=0,n.insert=0,n.match_length=n.prev_length=ae-1,n.match_available=0,n.ins_h=0}function bw(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=_c,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new yt.Buf16(lw*2),this.dyn_dtree=new yt.Buf16((2*sw+1)*2),this.bl_tree=new yt.Buf16((2*aw+1)*2),Zn(this.dyn_ltree),Zn(this.dyn_dtree),Zn(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new yt.Buf16(cw+1),this.heap=new yt.Buf16(2*Eu+1),Zn(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new yt.Buf16(2*Eu+1),Zn(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function rm(n){var t;return!n||!n.state?Jn(n,Kt):(n.total_in=n.total_out=0,n.data_type=ew,t=n.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?$c:Mr,n.adler=t.wrap===2?0:1,t.last_flush=Vr,jt._tr_init(t),Mi)}function om(n){var t=rm(n);return t===Mi&&mw(n.state),t}function xw(n,t){return!n||!n.state||n.state.wrap!==2?Kt:(n.state.gzhead=t,Mi)}function sm(n,t,e,i,r,o){if(!n)return Kt;var s=1;if(t===Yy&&(t=6),i<0?(s=0,i=-i):i>15&&(s=2,i-=16),r<1||r>tw||e!==_c||i<8||i>15||t<0||t>9||o<0||o>_y)return Jn(n,Kt);i===8&&(i=9);var a=new bw;return n.state=a,a.strm=n,a.wrap=s,a.gzhead=null,a.w_bits=i,a.w_size=1<<a.w_bits,a.w_mask=a.w_size-1,a.hash_bits=r+7,a.hash_size=1<<a.hash_bits,a.hash_mask=a.hash_size-1,a.hash_shift=~~((a.hash_bits+ae-1)/ae),a.window=new yt.Buf8(a.w_size*2),a.head=new yt.Buf16(a.hash_size),a.prev=new yt.Buf16(a.w_size),a.lit_bufsize=1<<r+6,a.pending_buf_size=a.lit_bufsize*4,a.pending_buf=new yt.Buf8(a.pending_buf_size),a.d_buf=1*a.lit_bufsize,a.l_buf=(1+2)*a.lit_bufsize,a.level=t,a.strategy=o,a.method=e,om(n)}function yw(n,t){return sm(n,t,_c,iw,nw,$y)}function ww(n,t){var e,i,r,o;if(!n||!n.state||t>$g||t<0)return n?Jn(n,Kt):Kt;if(i=n.state,!n.output||!n.input&&n.avail_in!==0||i.status===Oa&&t!==Qn)return Jn(n,n.avail_out===0?Cu:Kt);if(i.strm=n,e=i.last_flush,i.last_flush=t,i.status===$c)if(i.wrap===2)n.adler=0,ue(i,31),ue(i,139),ue(i,8),i.gzhead?(ue(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),ue(i,i.gzhead.time&255),ue(i,i.gzhead.time>>8&255),ue(i,i.gzhead.time>>16&255),ue(i,i.gzhead.time>>24&255),ue(i,i.level===9?2:i.strategy>=Zc||i.level<2?4:0),ue(i,i.gzhead.os&255),i.gzhead.extra&&i.gzhead.extra.length&&(ue(i,i.gzhead.extra.length&255),ue(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(n.adler=Gn(n.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=Au):(ue(i,0),ue(i,0),ue(i,0),ue(i,0),ue(i,0),ue(i,i.level===9?2:i.strategy>=Zc||i.level<2?4:0),ue(i,hw),i.status=Mr);else{var s=_c+(i.w_bits-8<<4)<<8,a=-1;i.strategy>=Zc||i.level<2?a=0:i.level<6?a=1:i.level===6?a=2:a=3,s|=a<<6,i.strstart!==0&&(s|=dw),s+=31-s%31,i.status=Mr,La(i,s),i.strstart!==0&&(La(i,n.adler>>>16),La(i,n.adler&65535)),n.adler=1}if(i.status===Au)if(i.gzhead.extra){for(r=i.pending;i.gzindex<(i.gzhead.extra.length&65535)&&!(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>r&&(n.adler=Gn(n.adler,i.pending_buf,i.pending-r,r)),Xn(n),r=i.pending,i.pending===i.pending_buf_size));)ue(i,i.gzhead.extra[i.gzindex]&255),i.gzindex++;i.gzhead.hcrc&&i.pending>r&&(n.adler=Gn(n.adler,i.pending_buf,i.pending-r,r)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=Yc)}else i.status=Yc;if(i.status===Yc)if(i.gzhead.name){r=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>r&&(n.adler=Gn(n.adler,i.pending_buf,i.pending-r,r)),Xn(n),r=i.pending,i.pending===i.pending_buf_size)){o=1;break}i.gzindex<i.gzhead.name.length?o=i.gzhead.name.charCodeAt(i.gzindex++)&255:o=0,ue(i,o)}while(o!==0);i.gzhead.hcrc&&i.pending>r&&(n.adler=Gn(n.adler,i.pending_buf,i.pending-r,r)),o===0&&(i.gzindex=0,i.status=Jc)}else i.status=Jc;if(i.status===Jc)if(i.gzhead.comment){r=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>r&&(n.adler=Gn(n.adler,i.pending_buf,i.pending-r,r)),Xn(n),r=i.pending,i.pending===i.pending_buf_size)){o=1;break}i.gzindex<i.gzhead.comment.length?o=i.gzhead.comment.charCodeAt(i.gzindex++)&255:o=0,ue(i,o)}while(o!==0);i.gzhead.hcrc&&i.pending>r&&(n.adler=Gn(n.adler,i.pending_buf,i.pending-r,r)),o===0&&(i.status=Qc)}else i.status=Qc;if(i.status===Qc&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&Xn(n),i.pending+2<=i.pending_buf_size&&(ue(i,n.adler&255),ue(i,n.adler>>8&255),n.adler=0,i.status=Mr)):i.status=Mr),i.pending!==0){if(Xn(n),n.avail_out===0)return i.last_flush=-1,Mi}else if(n.avail_in===0&&tm(t)<=tm(e)&&t!==Qn)return Jn(n,Cu);if(i.status===Oa&&n.avail_in!==0)return Jn(n,Cu);if(n.avail_in!==0||i.lookahead!==0||t!==Vr&&i.status!==Oa){var c=i.strategy===Zc?gw(i,t):i.strategy===Qy?pw(i,t):$o[i.level].func(i,t);if((c===Nr||c===es)&&(i.status=Oa),c===Je||c===Nr)return n.avail_out===0&&(i.last_flush=-1),Mi;if(c===Ma&&(t===Gy?jt._tr_align(i):t!==$g&&(jt._tr_stored_block(i,0,0,!1),t===Xy&&(Zn(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),Xn(n),n.avail_out===0))return i.last_flush=-1,Mi}return t!==Qn?Mi:i.wrap<=0?em:(i.wrap===2?(ue(i,n.adler&255),ue(i,n.adler>>8&255),ue(i,n.adler>>16&255),ue(i,n.adler>>24&255),ue(i,n.total_in&255),ue(i,n.total_in>>8&255),ue(i,n.total_in>>16&255),ue(i,n.total_in>>24&255)):(La(i,n.adler>>>16),La(i,n.adler&65535)),Xn(n),i.wrap>0&&(i.wrap=-i.wrap),i.pending!==0?Mi:em)}function vw(n){var t;return!n||!n.state?Kt:(t=n.state.status,t!==$c&&t!==Au&&t!==Yc&&t!==Jc&&t!==Qc&&t!==Mr&&t!==Oa?Jn(n,Kt):(n.state=null,t===Mr?Jn(n,Zy):Mi))}function Fw(n,t){var e=t.length,i,r,o,s,a,c,l,d;if(!n||!n.state||(i=n.state,s=i.wrap,s===2||s===1&&i.status!==$c||i.lookahead))return Kt;for(s===1&&(n.adler=im(n.adler,t,e,0)),i.wrap=0,e>=i.w_size&&(s===0&&(Zn(i.head),i.strstart=0,i.block_start=0,i.insert=0),d=new yt.Buf8(i.w_size),yt.arraySet(d,t,e-i.w_size,i.w_size,0),t=d,e=i.w_size),a=n.avail_in,c=n.next_in,l=n.input,n.avail_in=e,n.next_in=0,n.input=t,Rr(i);i.lookahead>=ae;){r=i.strstart,o=i.lookahead-(ae-1);do i.ins_h=(i.ins_h<<i.hash_shift^i.window[r+ae-1])&i.hash_mask,i.prev[r&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=r,r++;while(--o);i.strstart=r,i.lookahead=ae-1,Rr(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=ae-1,i.match_available=0,n.next_in=c,n.input=l,n.avail_in=a,i.wrap=s,Mi}Ni.deflateInit=yw;Ni.deflateInit2=sm;Ni.deflateReset=om;Ni.deflateResetKeep=rm;Ni.deflateSetHeader=xw;Ni.deflate=ww;Ni.deflateEnd=vw;Ni.deflateSetDictionary=Fw;Ni.deflateInfo="pako deflate (from Nodeca project)"});var Iu=ye(ts=>{"use strict";var ed=rn(),lm=!0,cm=!0;try{String.fromCharCode.apply(null,[0])}catch(n){lm=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(n){cm=!1}var Na=new ed.Buf8(256);for(sn=0;sn<256;sn++)Na[sn]=sn>=252?6:sn>=248?5:sn>=240?4:sn>=224?3:sn>=192?2:1;var sn;Na[254]=Na[254]=1;ts.string2buf=function(n){var t,e,i,r,o,s=n.length,a=0;for(r=0;r<s;r++)e=n.charCodeAt(r),(e&64512)===55296&&r+1<s&&(i=n.charCodeAt(r+1),(i&64512)===56320&&(e=65536+(e-55296<<10)+(i-56320),r++)),a+=e<128?1:e<2048?2:e<65536?3:4;for(t=new ed.Buf8(a),o=0,r=0;o<a;r++)e=n.charCodeAt(r),(e&64512)===55296&&r+1<s&&(i=n.charCodeAt(r+1),(i&64512)===56320&&(e=65536+(e-55296<<10)+(i-56320),r++)),e<128?t[o++]=e:e<2048?(t[o++]=192|e>>>6,t[o++]=128|e&63):e<65536?(t[o++]=224|e>>>12,t[o++]=128|e>>>6&63,t[o++]=128|e&63):(t[o++]=240|e>>>18,t[o++]=128|e>>>12&63,t[o++]=128|e>>>6&63,t[o++]=128|e&63);return t};function dm(n,t){if(t<65534&&(n.subarray&&cm||!n.subarray&&lm))return String.fromCharCode.apply(null,ed.shrinkBuf(n,t));for(var e="",i=0;i<t;i++)e+=String.fromCharCode(n[i]);return e}ts.buf2binstring=function(n){return dm(n,n.length)};ts.binstring2buf=function(n){for(var t=new ed.Buf8(n.length),e=0,i=t.length;e<i;e++)t[e]=n.charCodeAt(e);return t};ts.buf2string=function(n,t){var e,i,r,o,s=t||n.length,a=new Array(s*2);for(i=0,e=0;e<s;){if(r=n[e++],r<128){a[i++]=r;continue}if(o=Na[r],o>4){a[i++]=65533,e+=o-1;continue}for(r&=o===2?31:o===3?15:7;o>1&&e<s;)r=r<<6|n[e++]&63,o--;if(o>1){a[i++]=65533;continue}r<65536?a[i++]=r:(r-=65536,a[i++]=55296|r>>10&1023,a[i++]=56320|r&1023)}return dm(a,i)};ts.utf8border=function(n,t){var e;for(t=t||n.length,t>n.length&&(t=n.length),e=t-1;e>=0&&(n[e]&192)===128;)e--;return e<0||e===0?t:e+Na[n[e]]>t?e:t}});var Lu=ye((sk,hm)=>{"use strict";function Pw(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}hm.exports=Pw});var gm=ye(Ba=>{"use strict";var Ra=am(),Va=rn(),Mu=Iu(),Nu=Xc(),kw=Lu(),pm=Object.prototype.toString,Dw=0,Ou=4,is=0,um=1,fm=2,Sw=-1,Cw=0,Tw=8;function Br(n){if(!(this instanceof Br))return new Br(n);this.options=Va.assign({level:Sw,method:Tw,chunkSize:16384,windowBits:15,memLevel:8,strategy:Cw,to:""},n||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new kw,this.strm.avail_out=0;var e=Ra.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(e!==is)throw new Error(Nu[e]);if(t.header&&Ra.deflateSetHeader(this.strm,t.header),t.dictionary){var i;if(typeof t.dictionary=="string"?i=Mu.string2buf(t.dictionary):pm.call(t.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(t.dictionary):i=t.dictionary,e=Ra.deflateSetDictionary(this.strm,i),e!==is)throw new Error(Nu[e]);this._dict_set=!0}}Br.prototype.push=function(n,t){var e=this.strm,i=this.options.chunkSize,r,o;if(this.ended)return!1;o=t===~~t?t:t===!0?Ou:Dw,typeof n=="string"?e.input=Mu.string2buf(n):pm.call(n)==="[object ArrayBuffer]"?e.input=new Uint8Array(n):e.input=n,e.next_in=0,e.avail_in=e.input.length;do{if(e.avail_out===0&&(e.output=new Va.Buf8(i),e.next_out=0,e.avail_out=i),r=Ra.deflate(e,o),r!==um&&r!==is)return this.onEnd(r),this.ended=!0,!1;(e.avail_out===0||e.avail_in===0&&(o===Ou||o===fm))&&(this.options.to==="string"?this.onData(Mu.buf2binstring(Va.shrinkBuf(e.output,e.next_out))):this.onData(Va.shrinkBuf(e.output,e.next_out)))}while((e.avail_in>0||e.avail_out===0)&&r!==um);return o===Ou?(r=Ra.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===is):(o===fm&&(this.onEnd(is),e.avail_out=0),!0)};Br.prototype.onData=function(n){this.chunks.push(n)};Br.prototype.onEnd=function(n){n===is&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Va.flattenChunks(this.chunks)),this.chunks=[],this.err=n,this.msg=this.strm.msg};function Ru(n,t){var e=new Br(t);if(e.push(n,!0),e.err)throw e.msg||Nu[e.err];return e.result}function Ew(n,t){return t=t||{},t.raw=!0,Ru(n,t)}function Aw(n,t){return t=t||{},t.gzip=!0,Ru(n,t)}Ba.Deflate=Br;Ba.deflate=Ru;Ba.deflateRaw=Ew;Ba.gzip=Aw});var bm=ye((lk,mm)=>{"use strict";var td=30,Iw=12;mm.exports=function(t,e){var i,r,o,s,a,c,l,d,h,u,f,p,g,m,b,w,F,v,P,k,C,D,T,O,E;i=t.state,r=t.next_in,O=t.input,o=r+(t.avail_in-5),s=t.next_out,E=t.output,a=s-(e-t.avail_out),c=s+(t.avail_out-257),l=i.dmax,d=i.wsize,h=i.whave,u=i.wnext,f=i.window,p=i.hold,g=i.bits,m=i.lencode,b=i.distcode,w=(1<<i.lenbits)-1,F=(1<<i.distbits)-1;e:do{g<15&&(p+=O[r++]<<g,g+=8,p+=O[r++]<<g,g+=8),v=m[p&w];t:for(;;){if(P=v>>>24,p>>>=P,g-=P,P=v>>>16&255,P===0)E[s++]=v&65535;else if(P&16){k=v&65535,P&=15,P&&(g<P&&(p+=O[r++]<<g,g+=8),k+=p&(1<<P)-1,p>>>=P,g-=P),g<15&&(p+=O[r++]<<g,g+=8,p+=O[r++]<<g,g+=8),v=b[p&F];i:for(;;){if(P=v>>>24,p>>>=P,g-=P,P=v>>>16&255,P&16){if(C=v&65535,P&=15,g<P&&(p+=O[r++]<<g,g+=8,g<P&&(p+=O[r++]<<g,g+=8)),C+=p&(1<<P)-1,C>l){t.msg="invalid distance too far back",i.mode=td;break e}if(p>>>=P,g-=P,P=s-a,C>P){if(P=C-P,P>h&&i.sane){t.msg="invalid distance too far back",i.mode=td;break e}if(D=0,T=f,u===0){if(D+=d-P,P<k){k-=P;do E[s++]=f[D++];while(--P);D=s-C,T=E}}else if(u<P){if(D+=d+u-P,P-=u,P<k){k-=P;do E[s++]=f[D++];while(--P);if(D=0,u<k){P=u,k-=P;do E[s++]=f[D++];while(--P);D=s-C,T=E}}}else if(D+=u-P,P<k){k-=P;do E[s++]=f[D++];while(--P);D=s-C,T=E}for(;k>2;)E[s++]=T[D++],E[s++]=T[D++],E[s++]=T[D++],k-=3;k&&(E[s++]=T[D++],k>1&&(E[s++]=T[D++]))}else{D=s-C;do E[s++]=E[D++],E[s++]=E[D++],E[s++]=E[D++],k-=3;while(k>2);k&&(E[s++]=E[D++],k>1&&(E[s++]=E[D++]))}}else if(P&64){t.msg="invalid distance code",i.mode=td;break e}else{v=b[(v&65535)+(p&(1<<P)-1)];continue i}break}}else if(P&64)if(P&32){i.mode=Iw;break e}else{t.msg="invalid literal/length code",i.mode=td;break e}else{v=m[(v&65535)+(p&(1<<P)-1)];continue t}break}}while(r<o&&s<c);k=g>>3,r-=k,g-=k<<3,p&=(1<<g)-1,t.next_in=r,t.next_out=s,t.avail_in=r<o?5+(o-r):5-(r-o),t.avail_out=s<c?257+(c-s):257-(s-c),i.hold=p,i.bits=g}});var km=ye((ck,Pm)=>{"use strict";var xm=rn(),ns=15,ym=852,wm=592,vm=0,Vu=1,Fm=2,Lw=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Ow=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],Mw=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],Nw=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];Pm.exports=function(t,e,i,r,o,s,a,c){var l=c.bits,d=0,h=0,u=0,f=0,p=0,g=0,m=0,b=0,w=0,F=0,v,P,k,C,D,T=null,O=0,E,V=new xm.Buf16(ns+1),W=new xm.Buf16(ns+1),B=null,U=0,te,z,re;for(d=0;d<=ns;d++)V[d]=0;for(h=0;h<r;h++)V[e[i+h]]++;for(p=l,f=ns;f>=1&&V[f]===0;f--);if(p>f&&(p=f),f===0)return o[s++]=1<<24|64<<16|0,o[s++]=1<<24|64<<16|0,c.bits=1,0;for(u=1;u<f&&V[u]===0;u++);for(p<u&&(p=u),b=1,d=1;d<=ns;d++)if(b<<=1,b-=V[d],b<0)return-1;if(b>0&&(t===vm||f!==1))return-1;for(W[1]=0,d=1;d<ns;d++)W[d+1]=W[d]+V[d];for(h=0;h<r;h++)e[i+h]!==0&&(a[W[e[i+h]]++]=h);if(t===vm?(T=B=a,E=19):t===Vu?(T=Lw,O-=257,B=Ow,U-=257,E=256):(T=Mw,B=Nw,E=-1),F=0,h=0,d=u,D=s,g=p,m=0,k=-1,w=1<<p,C=w-1,t===Vu&&w>ym||t===Fm&&w>wm)return 1;for(;;){te=d-m,a[h]<E?(z=0,re=a[h]):a[h]>E?(z=B[U+a[h]],re=T[O+a[h]]):(z=32+64,re=0),v=1<<d-m,P=1<<g,u=P;do P-=v,o[D+(F>>m)+P]=te<<24|z<<16|re|0;while(P!==0);for(v=1<<d-1;F&v;)v>>=1;if(v!==0?(F&=v-1,F+=v):F=0,h++,--V[d]===0){if(d===f)break;d=e[i+a[h]]}if(d>p&&(F&C)!==k){for(m===0&&(m=p),D+=u,g=d-m,b=1<<g;g+m<f&&(b-=V[g+m],!(b<=0));)g++,b<<=1;if(w+=1<<g,t===Vu&&w>ym||t===Fm&&w>wm)return 1;k=F&C,o[k]=p<<24|g<<16|D-s|0}}return F!==0&&(o[D+F]=d-m<<24|64<<16|0),c.bits=p,0}});var o0=ye(bi=>{"use strict";var Lt=rn(),Wu=Du(),Ri=Su(),Rw=bm(),Ha=km(),Vw=0,Jm=1,Qm=2,Dm=4,Bw=5,id=6,Hr=0,Hw=1,Uw=2,Gt=-2,_m=-3,ju=-4,zw=-5,Sm=8,$m=1,Cm=2,Tm=3,Em=4,Am=5,Im=6,Lm=7,Om=8,Mm=9,Nm=10,od=11,an=12,Bu=13,Rm=14,Hu=15,Vm=16,Bm=17,Hm=18,Um=19,nd=20,rd=21,zm=22,qm=23,Wm=24,jm=25,Km=26,Uu=27,Gm=28,Xm=29,Oe=30,Ku=31,qw=32,Ww=852,jw=592,Kw=15,Gw=Kw;function Zm(n){return(n>>>24&255)+(n>>>8&65280)+((n&65280)<<8)+((n&255)<<24)}function Xw(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Lt.Buf16(320),this.work=new Lt.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function e0(n){var t;return!n||!n.state?Gt:(t=n.state,n.total_in=n.total_out=t.total=0,n.msg="",t.wrap&&(n.adler=t.wrap&1),t.mode=$m,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Lt.Buf32(Ww),t.distcode=t.distdyn=new Lt.Buf32(jw),t.sane=1,t.back=-1,Hr)}function t0(n){var t;return!n||!n.state?Gt:(t=n.state,t.wsize=0,t.whave=0,t.wnext=0,e0(n))}function i0(n,t){var e,i;return!n||!n.state||(i=n.state,t<0?(e=0,t=-t):(e=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?Gt:(i.window!==null&&i.wbits!==t&&(i.window=null),i.wrap=e,i.wbits=t,t0(n))}function n0(n,t){var e,i;return n?(i=new Xw,n.state=i,i.window=null,e=i0(n,t),e!==Hr&&(n.state=null),e):Gt}function Zw(n){return n0(n,Gw)}var Ym=!0,zu,qu;function Yw(n){if(Ym){var t;for(zu=new Lt.Buf32(512),qu=new Lt.Buf32(32),t=0;t<144;)n.lens[t++]=8;for(;t<256;)n.lens[t++]=9;for(;t<280;)n.lens[t++]=7;for(;t<288;)n.lens[t++]=8;for(Ha(Jm,n.lens,0,288,zu,0,n.work,{bits:9}),t=0;t<32;)n.lens[t++]=5;Ha(Qm,n.lens,0,32,qu,0,n.work,{bits:5}),Ym=!1}n.lencode=zu,n.lenbits=9,n.distcode=qu,n.distbits=5}function r0(n,t,e,i){var r,o=n.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Lt.Buf8(o.wsize)),i>=o.wsize?(Lt.arraySet(o.window,t,e-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(r=o.wsize-o.wnext,r>i&&(r=i),Lt.arraySet(o.window,t,e-i,r,o.wnext),i-=r,i?(Lt.arraySet(o.window,t,e-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=r,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=r))),0}function Jw(n,t){var e,i,r,o,s,a,c,l,d,h,u,f,p,g,m=0,b,w,F,v,P,k,C,D,T=new Lt.Buf8(4),O,E,V=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!n||!n.state||!n.output||!n.input&&n.avail_in!==0)return Gt;e=n.state,e.mode===an&&(e.mode=Bu),s=n.next_out,r=n.output,c=n.avail_out,o=n.next_in,i=n.input,a=n.avail_in,l=e.hold,d=e.bits,h=a,u=c,D=Hr;e:for(;;)switch(e.mode){case $m:if(e.wrap===0){e.mode=Bu;break}for(;d<16;){if(a===0)break e;a--,l+=i[o++]<<d,d+=8}if(e.wrap&2&&l===35615){e.check=0,T[0]=l&255,T[1]=l>>>8&255,e.check=Ri(e.check,T,2,0),l=0,d=0,e.mode=Cm;break}if(e.flags=0,e.head&&(e.head.done=!1),!(e.wrap&1)||(((l&255)<<8)+(l>>8))%31){n.msg="incorrect header check",e.mode=Oe;break}if((l&15)!==Sm){n.msg="unknown compression method",e.mode=Oe;break}if(l>>>=4,d-=4,C=(l&15)+8,e.wbits===0)e.wbits=C;else if(C>e.wbits){n.msg="invalid window size",e.mode=Oe;break}e.dmax=1<<C,n.adler=e.check=1,e.mode=l&512?Nm:an,l=0,d=0;break;case Cm:for(;d<16;){if(a===0)break e;a--,l+=i[o++]<<d,d+=8}if(e.flags=l,(e.flags&255)!==Sm){n.msg="unknown compression method",e.mode=Oe;break}if(e.flags&57344){n.msg="unknown header flags set",e.mode=Oe;break}e.head&&(e.head.text=l>>8&1),e.flags&512&&(T[0]=l&255,T[1]=l>>>8&255,e.check=Ri(e.check,T,2,0)),l=0,d=0,e.mode=Tm;case Tm:for(;d<32;){if(a===0)break e;a--,l+=i[o++]<<d,d+=8}e.head&&(e.head.time=l),e.flags&512&&(T[0]=l&255,T[1]=l>>>8&255,T[2]=l>>>16&255,T[3]=l>>>24&255,e.check=Ri(e.check,T,4,0)),l=0,d=0,e.mode=Em;case Em:for(;d<16;){if(a===0)break e;a--,l+=i[o++]<<d,d+=8}e.head&&(e.head.xflags=l&255,e.head.os=l>>8),e.flags&512&&(T[0]=l&255,T[1]=l>>>8&255,e.check=Ri(e.check,T,2,0)),l=0,d=0,e.mode=Am;case Am:if(e.flags&1024){for(;d<16;){if(a===0)break e;a--,l+=i[o++]<<d,d+=8}e.length=l,e.head&&(e.head.extra_len=l),e.flags&512&&(T[0]=l&255,T[1]=l>>>8&255,e.check=Ri(e.check,T,2,0)),l=0,d=0}else e.head&&(e.head.extra=null);e.mode=Im;case Im:if(e.flags&1024&&(f=e.length,f>a&&(f=a),f&&(e.head&&(C=e.head.extra_len-e.length,e.head.extra||(e.head.extra=new Array(e.head.extra_len)),Lt.arraySet(e.head.extra,i,o,f,C)),e.flags&512&&(e.check=Ri(e.check,i,f,o)),a-=f,o+=f,e.length-=f),e.length))break e;e.length=0,e.mode=Lm;case Lm:if(e.flags&2048){if(a===0)break e;f=0;do C=i[o+f++],e.head&&C&&e.length<65536&&(e.head.name+=String.fromCharCode(C));while(C&&f<a);if(e.flags&512&&(e.check=Ri(e.check,i,f,o)),a-=f,o+=f,C)break e}else e.head&&(e.head.name=null);e.length=0,e.mode=Om;case Om:if(e.flags&4096){if(a===0)break e;f=0;do C=i[o+f++],e.head&&C&&e.length<65536&&(e.head.comment+=String.fromCharCode(C));while(C&&f<a);if(e.flags&512&&(e.check=Ri(e.check,i,f,o)),a-=f,o+=f,C)break e}else e.head&&(e.head.comment=null);e.mode=Mm;case Mm:if(e.flags&512){for(;d<16;){if(a===0)break e;a--,l+=i[o++]<<d,d+=8}if(l!==(e.check&65535)){n.msg="header crc mismatch",e.mode=Oe;break}l=0,d=0}e.head&&(e.head.hcrc=e.flags>>9&1,e.head.done=!0),n.adler=e.check=0,e.mode=an;break;case Nm:for(;d<32;){if(a===0)break e;a--,l+=i[o++]<<d,d+=8}n.adler=e.check=Zm(l),l=0,d=0,e.mode=od;case od:if(e.havedict===0)return n.next_out=s,n.avail_out=c,n.next_in=o,n.avail_in=a,e.hold=l,e.bits=d,Uw;n.adler=e.check=1,e.mode=an;case an:if(t===Bw||t===id)break e;case Bu:if(e.last){l>>>=d&7,d-=d&7,e.mode=Uu;break}for(;d<3;){if(a===0)break e;a--,l+=i[o++]<<d,d+=8}switch(e.last=l&1,l>>>=1,d-=1,l&3){case 0:e.mode=Rm;break;case 1:if(Yw(e),e.mode=nd,t===id){l>>>=2,d-=2;break e}break;case 2:e.mode=Bm;break;case 3:n.msg="invalid block type",e.mode=Oe}l>>>=2,d-=2;break;case Rm:for(l>>>=d&7,d-=d&7;d<32;){if(a===0)break e;a--,l+=i[o++]<<d,d+=8}if((l&65535)!==(l>>>16^65535)){n.msg="invalid stored block lengths",e.mode=Oe;break}if(e.length=l&65535,l=0,d=0,e.mode=Hu,t===id)break e;case Hu:e.mode=Vm;case Vm:if(f=e.length,f){if(f>a&&(f=a),f>c&&(f=c),f===0)break e;Lt.arraySet(r,i,o,f,s),a-=f,o+=f,c-=f,s+=f,e.length-=f;break}e.mode=an;break;case Bm:for(;d<14;){if(a===0)break e;a--,l+=i[o++]<<d,d+=8}if(e.nlen=(l&31)+257,l>>>=5,d-=5,e.ndist=(l&31)+1,l>>>=5,d-=5,e.ncode=(l&15)+4,l>>>=4,d-=4,e.nlen>286||e.ndist>30){n.msg="too many length or distance symbols",e.mode=Oe;break}e.have=0,e.mode=Hm;case Hm:for(;e.have<e.ncode;){for(;d<3;){if(a===0)break e;a--,l+=i[o++]<<d,d+=8}e.lens[V[e.have++]]=l&7,l>>>=3,d-=3}for(;e.have<19;)e.lens[V[e.have++]]=0;if(e.lencode=e.lendyn,e.lenbits=7,O={bits:e.lenbits},D=Ha(Vw,e.lens,0,19,e.lencode,0,e.work,O),e.lenbits=O.bits,D){n.msg="invalid code lengths set",e.mode=Oe;break}e.have=0,e.mode=Um;case Um:for(;e.have<e.nlen+e.ndist;){for(;m=e.lencode[l&(1<<e.lenbits)-1],b=m>>>24,w=m>>>16&255,F=m&65535,!(b<=d);){if(a===0)break e;a--,l+=i[o++]<<d,d+=8}if(F<16)l>>>=b,d-=b,e.lens[e.have++]=F;else{if(F===16){for(E=b+2;d<E;){if(a===0)break e;a--,l+=i[o++]<<d,d+=8}if(l>>>=b,d-=b,e.have===0){n.msg="invalid bit length repeat",e.mode=Oe;break}C=e.lens[e.have-1],f=3+(l&3),l>>>=2,d-=2}else if(F===17){for(E=b+3;d<E;){if(a===0)break e;a--,l+=i[o++]<<d,d+=8}l>>>=b,d-=b,C=0,f=3+(l&7),l>>>=3,d-=3}else{for(E=b+7;d<E;){if(a===0)break e;a--,l+=i[o++]<<d,d+=8}l>>>=b,d-=b,C=0,f=11+(l&127),l>>>=7,d-=7}if(e.have+f>e.nlen+e.ndist){n.msg="invalid bit length repeat",e.mode=Oe;break}for(;f--;)e.lens[e.have++]=C}}if(e.mode===Oe)break;if(e.lens[256]===0){n.msg="invalid code -- missing end-of-block",e.mode=Oe;break}if(e.lenbits=9,O={bits:e.lenbits},D=Ha(Jm,e.lens,0,e.nlen,e.lencode,0,e.work,O),e.lenbits=O.bits,D){n.msg="invalid literal/lengths set",e.mode=Oe;break}if(e.distbits=6,e.distcode=e.distdyn,O={bits:e.distbits},D=Ha(Qm,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,O),e.distbits=O.bits,D){n.msg="invalid distances set",e.mode=Oe;break}if(e.mode=nd,t===id)break e;case nd:e.mode=rd;case rd:if(a>=6&&c>=258){n.next_out=s,n.avail_out=c,n.next_in=o,n.avail_in=a,e.hold=l,e.bits=d,Rw(n,u),s=n.next_out,r=n.output,c=n.avail_out,o=n.next_in,i=n.input,a=n.avail_in,l=e.hold,d=e.bits,e.mode===an&&(e.back=-1);break}for(e.back=0;m=e.lencode[l&(1<<e.lenbits)-1],b=m>>>24,w=m>>>16&255,F=m&65535,!(b<=d);){if(a===0)break e;a--,l+=i[o++]<<d,d+=8}if(w&&!(w&240)){for(v=b,P=w,k=F;m=e.lencode[k+((l&(1<<v+P)-1)>>v)],b=m>>>24,w=m>>>16&255,F=m&65535,!(v+b<=d);){if(a===0)break e;a--,l+=i[o++]<<d,d+=8}l>>>=v,d-=v,e.back+=v}if(l>>>=b,d-=b,e.back+=b,e.length=F,w===0){e.mode=Km;break}if(w&32){e.back=-1,e.mode=an;break}if(w&64){n.msg="invalid literal/length code",e.mode=Oe;break}e.extra=w&15,e.mode=zm;case zm:if(e.extra){for(E=e.extra;d<E;){if(a===0)break e;a--,l+=i[o++]<<d,d+=8}e.length+=l&(1<<e.extra)-1,l>>>=e.extra,d-=e.extra,e.back+=e.extra}e.was=e.length,e.mode=qm;case qm:for(;m=e.distcode[l&(1<<e.distbits)-1],b=m>>>24,w=m>>>16&255,F=m&65535,!(b<=d);){if(a===0)break e;a--,l+=i[o++]<<d,d+=8}if(!(w&240)){for(v=b,P=w,k=F;m=e.distcode[k+((l&(1<<v+P)-1)>>v)],b=m>>>24,w=m>>>16&255,F=m&65535,!(v+b<=d);){if(a===0)break e;a--,l+=i[o++]<<d,d+=8}l>>>=v,d-=v,e.back+=v}if(l>>>=b,d-=b,e.back+=b,w&64){n.msg="invalid distance code",e.mode=Oe;break}e.offset=F,e.extra=w&15,e.mode=Wm;case Wm:if(e.extra){for(E=e.extra;d<E;){if(a===0)break e;a--,l+=i[o++]<<d,d+=8}e.offset+=l&(1<<e.extra)-1,l>>>=e.extra,d-=e.extra,e.back+=e.extra}if(e.offset>e.dmax){n.msg="invalid distance too far back",e.mode=Oe;break}e.mode=jm;case jm:if(c===0)break e;if(f=u-c,e.offset>f){if(f=e.offset-f,f>e.whave&&e.sane){n.msg="invalid distance too far back",e.mode=Oe;break}f>e.wnext?(f-=e.wnext,p=e.wsize-f):p=e.wnext-f,f>e.length&&(f=e.length),g=e.window}else g=r,p=s-e.offset,f=e.length;f>c&&(f=c),c-=f,e.length-=f;do r[s++]=g[p++];while(--f);e.length===0&&(e.mode=rd);break;case Km:if(c===0)break e;r[s++]=e.length,c--,e.mode=rd;break;case Uu:if(e.wrap){for(;d<32;){if(a===0)break e;a--,l|=i[o++]<<d,d+=8}if(u-=c,n.total_out+=u,e.total+=u,u&&(n.adler=e.check=e.flags?Ri(e.check,r,u,s-u):Wu(e.check,r,u,s-u)),u=c,(e.flags?l:Zm(l))!==e.check){n.msg="incorrect data check",e.mode=Oe;break}l=0,d=0}e.mode=Gm;case Gm:if(e.wrap&&e.flags){for(;d<32;){if(a===0)break e;a--,l+=i[o++]<<d,d+=8}if(l!==(e.total&4294967295)){n.msg="incorrect length check",e.mode=Oe;break}l=0,d=0}e.mode=Xm;case Xm:D=Hw;break e;case Oe:D=_m;break e;case Ku:return ju;case qw:default:return Gt}return n.next_out=s,n.avail_out=c,n.next_in=o,n.avail_in=a,e.hold=l,e.bits=d,(e.wsize||u!==n.avail_out&&e.mode<Oe&&(e.mode<Uu||t!==Dm))&&r0(n,n.output,n.next_out,u-n.avail_out)?(e.mode=Ku,ju):(h-=n.avail_in,u-=n.avail_out,n.total_in+=h,n.total_out+=u,e.total+=u,e.wrap&&u&&(n.adler=e.check=e.flags?Ri(e.check,r,u,n.next_out-u):Wu(e.check,r,u,n.next_out-u)),n.data_type=e.bits+(e.last?64:0)+(e.mode===an?128:0)+(e.mode===nd||e.mode===Hu?256:0),(h===0&&u===0||t===Dm)&&D===Hr&&(D=zw),D)}function Qw(n){if(!n||!n.state)return Gt;var t=n.state;return t.window&&(t.window=null),n.state=null,Hr}function _w(n,t){var e;return!n||!n.state||(e=n.state,!(e.wrap&2))?Gt:(e.head=t,t.done=!1,Hr)}function $w(n,t){var e=t.length,i,r,o;return!n||!n.state||(i=n.state,i.wrap!==0&&i.mode!==od)?Gt:i.mode===od&&(r=1,r=Wu(r,t,e,0),r!==i.check)?_m:(o=r0(n,t,e,e),o?(i.mode=Ku,ju):(i.havedict=1,Hr))}bi.inflateReset=t0;bi.inflateReset2=i0;bi.inflateResetKeep=e0;bi.inflateInit=Zw;bi.inflateInit2=n0;bi.inflate=Jw;bi.inflateEnd=Qw;bi.inflateGetHeader=_w;bi.inflateSetDictionary=$w;bi.inflateInfo="pako inflate (from Nodeca project)"});var Gu=ye((hk,s0)=>{"use strict";s0.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var l0=ye((uk,a0)=>{"use strict";function ev(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}a0.exports=ev});var d0=ye(za=>{"use strict";var rs=o0(),Ua=rn(),sd=Iu(),je=Gu(),Xu=Xc(),tv=Lu(),iv=l0(),c0=Object.prototype.toString;function Ur(n){if(!(this instanceof Ur))return new Ur(n);this.options=Ua.assign({chunkSize:16384,windowBits:0,to:""},n||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(n&&n.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new tv,this.strm.avail_out=0;var e=rs.inflateInit2(this.strm,t.windowBits);if(e!==je.Z_OK)throw new Error(Xu[e]);if(this.header=new iv,rs.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=sd.string2buf(t.dictionary):c0.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(e=rs.inflateSetDictionary(this.strm,t.dictionary),e!==je.Z_OK)))throw new Error(Xu[e])}Ur.prototype.push=function(n,t){var e=this.strm,i=this.options.chunkSize,r=this.options.dictionary,o,s,a,c,l,d=!1;if(this.ended)return!1;s=t===~~t?t:t===!0?je.Z_FINISH:je.Z_NO_FLUSH,typeof n=="string"?e.input=sd.binstring2buf(n):c0.call(n)==="[object ArrayBuffer]"?e.input=new Uint8Array(n):e.input=n,e.next_in=0,e.avail_in=e.input.length;do{if(e.avail_out===0&&(e.output=new Ua.Buf8(i),e.next_out=0,e.avail_out=i),o=rs.inflate(e,je.Z_NO_FLUSH),o===je.Z_NEED_DICT&&r&&(o=rs.inflateSetDictionary(this.strm,r)),o===je.Z_BUF_ERROR&&d===!0&&(o=je.Z_OK,d=!1),o!==je.Z_STREAM_END&&o!==je.Z_OK)return this.onEnd(o),this.ended=!0,!1;e.next_out&&(e.avail_out===0||o===je.Z_STREAM_END||e.avail_in===0&&(s===je.Z_FINISH||s===je.Z_SYNC_FLUSH))&&(this.options.to==="string"?(a=sd.utf8border(e.output,e.next_out),c=e.next_out-a,l=sd.buf2string(e.output,a),e.next_out=c,e.avail_out=i-c,c&&Ua.arraySet(e.output,e.output,a,c,0),this.onData(l)):this.onData(Ua.shrinkBuf(e.output,e.next_out))),e.avail_in===0&&e.avail_out===0&&(d=!0)}while((e.avail_in>0||e.avail_out===0)&&o!==je.Z_STREAM_END);return o===je.Z_STREAM_END&&(s=je.Z_FINISH),s===je.Z_FINISH?(o=rs.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===je.Z_OK):(s===je.Z_SYNC_FLUSH&&(this.onEnd(je.Z_OK),e.avail_out=0),!0)};Ur.prototype.onData=function(n){this.chunks.push(n)};Ur.prototype.onEnd=function(n){n===je.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Ua.flattenChunks(this.chunks)),this.chunks=[],this.err=n,this.msg=this.strm.msg};function Zu(n,t){var e=new Ur(t);if(e.push(n,!0),e.err)throw e.msg||Xu[e.err];return e.result}function nv(n,t){return t=t||{},t.raw=!0,Zu(n,t)}za.Inflate=Ur;za.inflate=Zu;za.inflateRaw=nv;za.ungzip=Zu});var qa=ye((pk,u0)=>{"use strict";var rv=rn().assign,ov=gm(),sv=d0(),av=Gu(),h0={};rv(h0,ov,sv,av);u0.exports=h0});var If=ye((FL,pb)=>{"use strict";pb.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var mb=ye((PL,gb)=>{gb.exports=function(t){return!t||typeof t=="string"?!1:t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")}});var yb=ye((kL,xb)=>{"use strict";var aF=mb(),lF=Array.prototype.concat,cF=Array.prototype.slice,bb=xb.exports=function(t){for(var e=[],i=0,r=t.length;i<r;i++){var o=t[i];aF(o)?e=lF.call(e,cF.call(o)):e.push(o)}return e};bb.wrap=function(n){return function(){return n(bb(arguments))}}});var Pb=ye((DL,Fb)=>{var _l=If(),$l=yb(),wb=Object.hasOwnProperty,vb=Object.create(null);for(Id in _l)wb.call(_l,Id)&&(vb[_l[Id]]=Id);var Id,Mt=Fb.exports={to:{},get:{}};Mt.get=function(n){var t=n.substring(0,3).toLowerCase(),e,i;switch(t){case"hsl":e=Mt.get.hsl(n),i="hsl";break;case"hwb":e=Mt.get.hwb(n),i="hwb";break;default:e=Mt.get.rgb(n),i="rgb";break}return e?{model:i,value:e}:null};Mt.get.rgb=function(n){if(!n)return null;var t=/^#([a-f0-9]{3,4})$/i,e=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,i=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,r=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^(\w+)$/,s=[0,0,0,1],a,c,l;if(a=n.match(e)){for(l=a[2],a=a[1],c=0;c<3;c++){var d=c*2;s[c]=parseInt(a.slice(d,d+2),16)}l&&(s[3]=parseInt(l,16)/255)}else if(a=n.match(t)){for(a=a[1],l=a[3],c=0;c<3;c++)s[c]=parseInt(a[c]+a[c],16);l&&(s[3]=parseInt(l+l,16)/255)}else if(a=n.match(i)){for(c=0;c<3;c++)s[c]=parseInt(a[c+1],0);a[4]&&(a[5]?s[3]=parseFloat(a[4])*.01:s[3]=parseFloat(a[4]))}else if(a=n.match(r)){for(c=0;c<3;c++)s[c]=Math.round(parseFloat(a[c+1])*2.55);a[4]&&(a[5]?s[3]=parseFloat(a[4])*.01:s[3]=parseFloat(a[4]))}else return(a=n.match(o))?a[1]==="transparent"?[0,0,0,0]:wb.call(_l,a[1])?(s=_l[a[1]],s[3]=1,s):null:null;for(c=0;c<3;c++)s[c]=cr(s[c],0,255);return s[3]=cr(s[3],0,1),s};Mt.get.hsl=function(n){if(!n)return null;var t=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,e=n.match(t);if(e){var i=parseFloat(e[4]),r=(parseFloat(e[1])%360+360)%360,o=cr(parseFloat(e[2]),0,100),s=cr(parseFloat(e[3]),0,100),a=cr(isNaN(i)?1:i,0,1);return[r,o,s,a]}return null};Mt.get.hwb=function(n){if(!n)return null;var t=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,e=n.match(t);if(e){var i=parseFloat(e[4]),r=(parseFloat(e[1])%360+360)%360,o=cr(parseFloat(e[2]),0,100),s=cr(parseFloat(e[3]),0,100),a=cr(isNaN(i)?1:i,0,1);return[r,o,s,a]}return null};Mt.to.hex=function(){var n=$l(arguments);return"#"+Ld(n[0])+Ld(n[1])+Ld(n[2])+(n[3]<1?Ld(Math.round(n[3]*255)):"")};Mt.to.rgb=function(){var n=$l(arguments);return n.length<4||n[3]===1?"rgb("+Math.round(n[0])+", "+Math.round(n[1])+", "+Math.round(n[2])+")":"rgba("+Math.round(n[0])+", "+Math.round(n[1])+", "+Math.round(n[2])+", "+n[3]+")"};Mt.to.rgb.percent=function(){var n=$l(arguments),t=Math.round(n[0]/255*100),e=Math.round(n[1]/255*100),i=Math.round(n[2]/255*100);return n.length<4||n[3]===1?"rgb("+t+"%, "+e+"%, "+i+"%)":"rgba("+t+"%, "+e+"%, "+i+"%, "+n[3]+")"};Mt.to.hsl=function(){var n=$l(arguments);return n.length<4||n[3]===1?"hsl("+n[0]+", "+n[1]+"%, "+n[2]+"%)":"hsla("+n[0]+", "+n[1]+"%, "+n[2]+"%, "+n[3]+")"};Mt.to.hwb=function(){var n=$l(arguments),t="";return n.length>=4&&n[3]!==1&&(t=", "+n[3]),"hwb("+n[0]+", "+n[1]+"%, "+n[2]+"%"+t+")"};Mt.to.keyword=function(n){return vb[n.slice(0,3)]};function cr(n,t,e){return Math.min(Math.max(t,n),e)}function Ld(n){var t=Math.round(n).toString(16).toUpperCase();return t.length<2?"0"+t:t}});var Lf=ye((SL,Db)=>{var ec=If(),kb={};for(let n of Object.keys(ec))kb[ec[n]]=n;var K={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};Db.exports=K;for(let n of Object.keys(K)){if(!("channels"in K[n]))throw new Error("missing channels property: "+n);if(!("labels"in K[n]))throw new Error("missing channel labels property: "+n);if(K[n].labels.length!==K[n].channels)throw new Error("channel and label counts mismatch: "+n);let{channels:t,labels:e}=K[n];delete K[n].channels,delete K[n].labels,Object.defineProperty(K[n],"channels",{value:t}),Object.defineProperty(K[n],"labels",{value:e})}K.rgb.hsl=function(n){let t=n[0]/255,e=n[1]/255,i=n[2]/255,r=Math.min(t,e,i),o=Math.max(t,e,i),s=o-r,a,c;o===r?a=0:t===o?a=(e-i)/s:e===o?a=2+(i-t)/s:i===o&&(a=4+(t-e)/s),a=Math.min(a*60,360),a<0&&(a+=360);let l=(r+o)/2;return o===r?c=0:l<=.5?c=s/(o+r):c=s/(2-o-r),[a,c*100,l*100]};K.rgb.hsv=function(n){let t,e,i,r,o,s=n[0]/255,a=n[1]/255,c=n[2]/255,l=Math.max(s,a,c),d=l-Math.min(s,a,c),h=function(u){return(l-u)/6/d+1/2};return d===0?(r=0,o=0):(o=d/l,t=h(s),e=h(a),i=h(c),s===l?r=i-e:a===l?r=1/3+t-i:c===l&&(r=2/3+e-t),r<0?r+=1:r>1&&(r-=1)),[r*360,o*100,l*100]};K.rgb.hwb=function(n){let t=n[0],e=n[1],i=n[2],r=K.rgb.hsl(n)[0],o=1/255*Math.min(t,Math.min(e,i));return i=1-1/255*Math.max(t,Math.max(e,i)),[r,o*100,i*100]};K.rgb.cmyk=function(n){let t=n[0]/255,e=n[1]/255,i=n[2]/255,r=Math.min(1-t,1-e,1-i),o=(1-t-r)/(1-r)||0,s=(1-e-r)/(1-r)||0,a=(1-i-r)/(1-r)||0;return[o*100,s*100,a*100,r*100]};function dF(n,t){return(n[0]-t[0])**2+(n[1]-t[1])**2+(n[2]-t[2])**2}K.rgb.keyword=function(n){let t=kb[n];if(t)return t;let e=1/0,i;for(let r of Object.keys(ec)){let o=ec[r],s=dF(n,o);s<e&&(e=s,i=r)}return i};K.keyword.rgb=function(n){return ec[n]};K.rgb.xyz=function(n){let t=n[0]/255,e=n[1]/255,i=n[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,i=i>.04045?((i+.055)/1.055)**2.4:i/12.92;let r=t*.4124+e*.3576+i*.1805,o=t*.2126+e*.7152+i*.0722,s=t*.0193+e*.1192+i*.9505;return[r*100,o*100,s*100]};K.rgb.lab=function(n){let t=K.rgb.xyz(n),e=t[0],i=t[1],r=t[2];e/=95.047,i/=100,r/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;let o=116*i-16,s=500*(e-i),a=200*(i-r);return[o,s,a]};K.hsl.rgb=function(n){let t=n[0]/360,e=n[1]/100,i=n[2]/100,r,o,s;if(e===0)return s=i*255,[s,s,s];i<.5?r=i*(1+e):r=i+e-i*e;let a=2*i-r,c=[0,0,0];for(let l=0;l<3;l++)o=t+1/3*-(l-1),o<0&&o++,o>1&&o--,6*o<1?s=a+(r-a)*6*o:2*o<1?s=r:3*o<2?s=a+(r-a)*(2/3-o)*6:s=a,c[l]=s*255;return c};K.hsl.hsv=function(n){let t=n[0],e=n[1]/100,i=n[2]/100,r=e,o=Math.max(i,.01);i*=2,e*=i<=1?i:2-i,r*=o<=1?o:2-o;let s=(i+e)/2,a=i===0?2*r/(o+r):2*e/(i+e);return[t,a*100,s*100]};K.hsv.rgb=function(n){let t=n[0]/60,e=n[1]/100,i=n[2]/100,r=Math.floor(t)%6,o=t-Math.floor(t),s=255*i*(1-e),a=255*i*(1-e*o),c=255*i*(1-e*(1-o));switch(i*=255,r){case 0:return[i,c,s];case 1:return[a,i,s];case 2:return[s,i,c];case 3:return[s,a,i];case 4:return[c,s,i];case 5:return[i,s,a]}};K.hsv.hsl=function(n){let t=n[0],e=n[1]/100,i=n[2]/100,r=Math.max(i,.01),o,s;s=(2-e)*i;let a=(2-e)*r;return o=e*r,o/=a<=1?a:2-a,o=o||0,s/=2,[t,o*100,s*100]};K.hwb.rgb=function(n){let t=n[0]/360,e=n[1]/100,i=n[2]/100,r=e+i,o;r>1&&(e/=r,i/=r);let s=Math.floor(6*t),a=1-i;o=6*t-s,s&1&&(o=1-o);let c=e+o*(a-e),l,d,h;switch(s){default:case 6:case 0:l=a,d=c,h=e;break;case 1:l=c,d=a,h=e;break;case 2:l=e,d=a,h=c;break;case 3:l=e,d=c,h=a;break;case 4:l=c,d=e,h=a;break;case 5:l=a,d=e,h=c;break}return[l*255,d*255,h*255]};K.cmyk.rgb=function(n){let t=n[0]/100,e=n[1]/100,i=n[2]/100,r=n[3]/100,o=1-Math.min(1,t*(1-r)+r),s=1-Math.min(1,e*(1-r)+r),a=1-Math.min(1,i*(1-r)+r);return[o*255,s*255,a*255]};K.xyz.rgb=function(n){let t=n[0]/100,e=n[1]/100,i=n[2]/100,r,o,s;return r=t*3.2406+e*-1.5372+i*-.4986,o=t*-.9689+e*1.8758+i*.0415,s=t*.0557+e*-.204+i*1.057,r=r>.0031308?1.055*r**(1/2.4)-.055:r*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,r=Math.min(Math.max(0,r),1),o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),[r*255,o*255,s*255]};K.xyz.lab=function(n){let t=n[0],e=n[1],i=n[2];t/=95.047,e/=100,i/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,e=e>.008856?e**(1/3):7.787*e+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;let r=116*e-16,o=500*(t-e),s=200*(e-i);return[r,o,s]};K.lab.xyz=function(n){let t=n[0],e=n[1],i=n[2],r,o,s;o=(t+16)/116,r=e/500+o,s=o-i/200;let a=o**3,c=r**3,l=s**3;return o=a>.008856?a:(o-16/116)/7.787,r=c>.008856?c:(r-16/116)/7.787,s=l>.008856?l:(s-16/116)/7.787,r*=95.047,o*=100,s*=108.883,[r,o,s]};K.lab.lch=function(n){let t=n[0],e=n[1],i=n[2],r;r=Math.atan2(i,e)*360/2/Math.PI,r<0&&(r+=360);let s=Math.sqrt(e*e+i*i);return[t,s,r]};K.lch.lab=function(n){let t=n[0],e=n[1],r=n[2]/360*2*Math.PI,o=e*Math.cos(r),s=e*Math.sin(r);return[t,o,s]};K.rgb.ansi16=function(n,t=null){let[e,i,r]=n,o=t===null?K.rgb.hsv(n)[2]:t;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(r/255)<<2|Math.round(i/255)<<1|Math.round(e/255));return o===2&&(s+=60),s};K.hsv.ansi16=function(n){return K.rgb.ansi16(K.hsv.rgb(n),n[2])};K.rgb.ansi256=function(n){let t=n[0],e=n[1],i=n[2];return t===e&&e===i?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(e/255*5)+Math.round(i/255*5)};K.ansi16.rgb=function(n){let t=n%10;if(t===0||t===7)return n>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let e=(~~(n>50)+1)*.5,i=(t&1)*e*255,r=(t>>1&1)*e*255,o=(t>>2&1)*e*255;return[i,r,o]};K.ansi256.rgb=function(n){if(n>=232){let o=(n-232)*10+8;return[o,o,o]}n-=16;let t,e=Math.floor(n/36)/5*255,i=Math.floor((t=n%36)/6)/5*255,r=t%6/5*255;return[e,i,r]};K.rgb.hex=function(n){let e=(((Math.round(n[0])&255)<<16)+((Math.round(n[1])&255)<<8)+(Math.round(n[2])&255)).toString(16).toUpperCase();return"000000".substring(e.length)+e};K.hex.rgb=function(n){let t=n.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let e=t[0];t[0].length===3&&(e=e.split("").map(a=>a+a).join(""));let i=parseInt(e,16),r=i>>16&255,o=i>>8&255,s=i&255;return[r,o,s]};K.rgb.hcg=function(n){let t=n[0]/255,e=n[1]/255,i=n[2]/255,r=Math.max(Math.max(t,e),i),o=Math.min(Math.min(t,e),i),s=r-o,a,c;return s<1?a=o/(1-s):a=0,s<=0?c=0:r===t?c=(e-i)/s%6:r===e?c=2+(i-t)/s:c=4+(t-e)/s,c/=6,c%=1,[c*360,s*100,a*100]};K.hsl.hcg=function(n){let t=n[1]/100,e=n[2]/100,i=e<.5?2*t*e:2*t*(1-e),r=0;return i<1&&(r=(e-.5*i)/(1-i)),[n[0],i*100,r*100]};K.hsv.hcg=function(n){let t=n[1]/100,e=n[2]/100,i=t*e,r=0;return i<1&&(r=(e-i)/(1-i)),[n[0],i*100,r*100]};K.hcg.rgb=function(n){let t=n[0]/360,e=n[1]/100,i=n[2]/100;if(e===0)return[i*255,i*255,i*255];let r=[0,0,0],o=t%1*6,s=o%1,a=1-s,c=0;switch(Math.floor(o)){case 0:r[0]=1,r[1]=s,r[2]=0;break;case 1:r[0]=a,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=s;break;case 3:r[0]=0,r[1]=a,r[2]=1;break;case 4:r[0]=s,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=a}return c=(1-e)*i,[(e*r[0]+c)*255,(e*r[1]+c)*255,(e*r[2]+c)*255]};K.hcg.hsv=function(n){let t=n[1]/100,e=n[2]/100,i=t+e*(1-t),r=0;return i>0&&(r=t/i),[n[0],r*100,i*100]};K.hcg.hsl=function(n){let t=n[1]/100,i=n[2]/100*(1-t)+.5*t,r=0;return i>0&&i<.5?r=t/(2*i):i>=.5&&i<1&&(r=t/(2*(1-i))),[n[0],r*100,i*100]};K.hcg.hwb=function(n){let t=n[1]/100,e=n[2]/100,i=t+e*(1-t);return[n[0],(i-t)*100,(1-i)*100]};K.hwb.hcg=function(n){let t=n[1]/100,i=1-n[2]/100,r=i-t,o=0;return r<1&&(o=(i-r)/(1-r)),[n[0],r*100,o*100]};K.apple.rgb=function(n){return[n[0]/65535*255,n[1]/65535*255,n[2]/65535*255]};K.rgb.apple=function(n){return[n[0]/255*65535,n[1]/255*65535,n[2]/255*65535]};K.gray.rgb=function(n){return[n[0]/100*255,n[0]/100*255,n[0]/100*255]};K.gray.hsl=function(n){return[0,0,n[0]]};K.gray.hsv=K.gray.hsl;K.gray.hwb=function(n){return[0,100,n[0]]};K.gray.cmyk=function(n){return[0,0,0,n[0]]};K.gray.lab=function(n){return[n[0],0,0]};K.gray.hex=function(n){let t=Math.round(n[0]/100*255)&255,i=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(i.length)+i};K.rgb.gray=function(n){return[(n[0]+n[1]+n[2])/3/255*100]}});var Cb=ye((CL,Sb)=>{var Od=Lf();function hF(){let n={},t=Object.keys(Od);for(let e=t.length,i=0;i<e;i++)n[t[i]]={distance:-1,parent:null};return n}function uF(n){let t=hF(),e=[n];for(t[n].distance=0;e.length;){let i=e.pop(),r=Object.keys(Od[i]);for(let o=r.length,s=0;s<o;s++){let a=r[s],c=t[a];c.distance===-1&&(c.distance=t[i].distance+1,c.parent=i,e.unshift(a))}}return t}function fF(n,t){return function(e){return t(n(e))}}function pF(n,t){let e=[t[n].parent,n],i=Od[t[n].parent][n],r=t[n].parent;for(;t[r].parent;)e.unshift(t[r].parent),i=fF(Od[t[r].parent][r],i),r=t[r].parent;return i.conversion=e,i}Sb.exports=function(n){let t=uF(n),e={},i=Object.keys(t);for(let r=i.length,o=0;o<r;o++){let s=i[o];t[s].parent!==null&&(e[s]=pF(s,t))}return e}});var Eb=ye((TL,Tb)=>{var Of=Lf(),gF=Cb(),Bs={},mF=Object.keys(Of);function bF(n){let t=function(...e){let i=e[0];return i==null?i:(i.length>1&&(e=i),n(e))};return"conversion"in n&&(t.conversion=n.conversion),t}function xF(n){let t=function(...e){let i=e[0];if(i==null)return i;i.length>1&&(e=i);let r=n(e);if(typeof r=="object")for(let o=r.length,s=0;s<o;s++)r[s]=Math.round(r[s]);return r};return"conversion"in n&&(t.conversion=n.conversion),t}mF.forEach(n=>{Bs[n]={},Object.defineProperty(Bs[n],"channels",{value:Of[n].channels}),Object.defineProperty(Bs[n],"labels",{value:Of[n].labels});let t=gF(n);Object.keys(t).forEach(i=>{let r=t[i];Bs[n][i]=xF(r),Bs[n][i].raw=bF(r)})});Tb.exports=Bs});var Lb=ye((EL,Ib)=>{var Hs=Pb(),Nt=Eb(),Ab=["keyword","gray","hex"],Mf={};for(let n of Object.keys(Nt))Mf[[...Nt[n].labels].sort().join("")]=n;var Md={};function it(n,t){if(!(this instanceof it))return new it(n,t);if(t&&t in Ab&&(t=null),t&&!(t in Nt))throw new Error("Unknown model: "+t);let e,i;if(n==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(n instanceof it)this.model=n.model,this.color=[...n.color],this.valpha=n.valpha;else if(typeof n=="string"){let r=Hs.get(n);if(r===null)throw new Error("Unable to parse color from string: "+n);this.model=r.model,i=Nt[this.model].channels,this.color=r.value.slice(0,i),this.valpha=typeof r.value[i]=="number"?r.value[i]:1}else if(n.length>0){this.model=t||"rgb",i=Nt[this.model].channels;let r=Array.prototype.slice.call(n,0,i);this.color=Nf(r,i),this.valpha=typeof n[i]=="number"?n[i]:1}else if(typeof n=="number")this.model="rgb",this.color=[n>>16&255,n>>8&255,n&255],this.valpha=1;else{this.valpha=1;let r=Object.keys(n);"alpha"in n&&(r.splice(r.indexOf("alpha"),1),this.valpha=typeof n.alpha=="number"?n.alpha:0);let o=r.sort().join("");if(!(o in Mf))throw new Error("Unable to parse color from object: "+JSON.stringify(n));this.model=Mf[o];let{labels:s}=Nt[this.model],a=[];for(e=0;e<s.length;e++)a.push(n[s[e]]);this.color=Nf(a)}if(Md[this.model])for(i=Nt[this.model].channels,e=0;e<i;e++){let r=Md[this.model][e];r&&(this.color[e]=r(this.color[e]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}it.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(n){let t=this.model in Hs.to?this:this.rgb();t=t.round(typeof n=="number"?n:1);let e=t.valpha===1?t.color:[...t.color,this.valpha];return Hs.to[t.model](e)},percentString(n){let t=this.rgb().round(typeof n=="number"?n:1),e=t.valpha===1?t.color:[...t.color,this.valpha];return Hs.to.rgb.percent(e)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let n={},{channels:t}=Nt[this.model],{labels:e}=Nt[this.model];for(let i=0;i<t;i++)n[e[i]]=this.color[i];return this.valpha!==1&&(n.alpha=this.valpha),n},unitArray(){let n=this.rgb().color;return n[0]/=255,n[1]/=255,n[2]/=255,this.valpha!==1&&n.push(this.valpha),n},unitObject(){let n=this.rgb().object();return n.r/=255,n.g/=255,n.b/=255,this.valpha!==1&&(n.alpha=this.valpha),n},round(n){return n=Math.max(n||0,0),new it([...this.color.map(wF(n)),this.valpha],this.model)},alpha(n){return n!==void 0?new it([...this.color,Math.max(0,Math.min(1,n))],this.model):this.valpha},red:We("rgb",0,_e(255)),green:We("rgb",1,_e(255)),blue:We("rgb",2,_e(255)),hue:We(["hsl","hsv","hsl","hwb","hcg"],0,n=>(n%360+360)%360),saturationl:We("hsl",1,_e(100)),lightness:We("hsl",2,_e(100)),saturationv:We("hsv",1,_e(100)),value:We("hsv",2,_e(100)),chroma:We("hcg",1,_e(100)),gray:We("hcg",2,_e(100)),white:We("hwb",1,_e(100)),wblack:We("hwb",2,_e(100)),cyan:We("cmyk",0,_e(100)),magenta:We("cmyk",1,_e(100)),yellow:We("cmyk",2,_e(100)),black:We("cmyk",3,_e(100)),x:We("xyz",0,_e(95.047)),y:We("xyz",1,_e(100)),z:We("xyz",2,_e(108.833)),l:We("lab",0,_e(100)),a:We("lab",1),b:We("lab",2),keyword(n){return n!==void 0?new it(n):Nt[this.model].keyword(this.color)},hex(n){return n!==void 0?new it(n):Hs.to.hex(this.rgb().round().color)},hexa(n){if(n!==void 0)return new it(n);let t=this.rgb().round().color,e=Math.round(this.valpha*255).toString(16).toUpperCase();return e.length===1&&(e="0"+e),Hs.to.hex(t)+e},rgbNumber(){let n=this.rgb().color;return(n[0]&255)<<16|(n[1]&255)<<8|n[2]&255},luminosity(){let n=this.rgb().color,t=[];for(let[e,i]of n.entries()){let r=i/255;t[e]=r<=.04045?r/12.92:((r+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(n){let t=this.luminosity(),e=n.luminosity();return t>e?(t+.05)/(e+.05):(e+.05)/(t+.05)},level(n){let t=this.contrast(n);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){let n=this.rgb().color;return(n[0]*2126+n[1]*7152+n[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let n=this.rgb();for(let t=0;t<3;t++)n.color[t]=255-n.color[t];return n},lighten(n){let t=this.hsl();return t.color[2]+=t.color[2]*n,t},darken(n){let t=this.hsl();return t.color[2]-=t.color[2]*n,t},saturate(n){let t=this.hsl();return t.color[1]+=t.color[1]*n,t},desaturate(n){let t=this.hsl();return t.color[1]-=t.color[1]*n,t},whiten(n){let t=this.hwb();return t.color[1]+=t.color[1]*n,t},blacken(n){let t=this.hwb();return t.color[2]+=t.color[2]*n,t},grayscale(){let n=this.rgb().color,t=n[0]*.3+n[1]*.59+n[2]*.11;return it.rgb(t,t,t)},fade(n){return this.alpha(this.valpha-this.valpha*n)},opaquer(n){return this.alpha(this.valpha+this.valpha*n)},rotate(n){let t=this.hsl(),e=t.color[0];return e=(e+n)%360,e=e<0?360+e:e,t.color[0]=e,t},mix(n,t){if(!n||!n.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof n);let e=n.rgb(),i=this.rgb(),r=t===void 0?.5:t,o=2*r-1,s=e.alpha()-i.alpha(),a=((o*s===-1?o:(o+s)/(1+o*s))+1)/2,c=1-a;return it.rgb(a*e.red()+c*i.red(),a*e.green()+c*i.green(),a*e.blue()+c*i.blue(),e.alpha()*r+i.alpha()*(1-r))}};for(let n of Object.keys(Nt)){if(Ab.includes(n))continue;let{channels:t}=Nt[n];it.prototype[n]=function(...e){return this.model===n?new it(this):e.length>0?new it(e,n):new it([...vF(Nt[this.model][n].raw(this.color)),this.valpha],n)},it[n]=function(...e){let i=e[0];return typeof i=="number"&&(i=Nf(e,t)),new it(i,n)}}function yF(n,t){return Number(n.toFixed(t))}function wF(n){return function(t){return yF(t,n)}}function We(n,t,e){n=Array.isArray(n)?n:[n];for(let i of n)(Md[i]||(Md[i]=[]))[t]=e;return n=n[0],function(i){let r;return i!==void 0?(e&&(i=e(i)),r=this[n](),r.color[t]=i,r):(r=this[n]().color[t],e&&(r=e(r)),r)}}function _e(n){return function(t){return Math.max(0,Math.min(n,t))}}function vF(n){return Array.isArray(n)?n:[n]}function Nf(n,t){for(let e=0;e<t;e++)typeof n[e]!="number"&&(n[e]=0);return n}Ib.exports=it});var Xb=ye(Gd=>{"use strict";Object.defineProperty(Gd,"__esModule",{value:!0});Gd.bodyRegExps={xml:/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g,html4:/&notin;|&(?:nbsp|iexcl|cent|pound|curren|yen|brvbar|sect|uml|copy|ordf|laquo|not|shy|reg|macr|deg|plusmn|sup2|sup3|acute|micro|para|middot|cedil|sup1|ordm|raquo|frac14|frac12|frac34|iquest|Agrave|Aacute|Acirc|Atilde|Auml|Aring|AElig|Ccedil|Egrave|Eacute|Ecirc|Euml|Igrave|Iacute|Icirc|Iuml|ETH|Ntilde|Ograve|Oacute|Ocirc|Otilde|Ouml|times|Oslash|Ugrave|Uacute|Ucirc|Uuml|Yacute|THORN|szlig|agrave|aacute|acirc|atilde|auml|aring|aelig|ccedil|egrave|eacute|ecirc|euml|igrave|iacute|icirc|iuml|eth|ntilde|ograve|oacute|ocirc|otilde|ouml|divide|oslash|ugrave|uacute|ucirc|uuml|yacute|thorn|yuml|quot|amp|lt|gt|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g,html5:/&centerdot;|&copysr;|&divideontimes;|&gtcc;|&gtcir;|&gtdot;|&gtlPar;|&gtquest;|&gtrapprox;|&gtrarr;|&gtrdot;|&gtreqless;|&gtreqqless;|&gtrless;|&gtrsim;|&ltcc;|&ltcir;|&ltdot;|&lthree;|&ltimes;|&ltlarr;|&ltquest;|&ltrPar;|&ltri;|&ltrie;|&ltrif;|&notin;|&notinE;|&notindot;|&notinva;|&notinvb;|&notinvc;|&notni;|&notniva;|&notnivb;|&notnivc;|&parallel;|&timesb;|&timesbar;|&timesd;|&(?:AElig|AMP|Aacute|Acirc|Agrave|Aring|Atilde|Auml|COPY|Ccedil|ETH|Eacute|Ecirc|Egrave|Euml|GT|Iacute|Icirc|Igrave|Iuml|LT|Ntilde|Oacute|Ocirc|Ograve|Oslash|Otilde|Ouml|QUOT|REG|THORN|Uacute|Ucirc|Ugrave|Uuml|Yacute|aacute|acirc|acute|aelig|agrave|amp|aring|atilde|auml|brvbar|ccedil|cedil|cent|copy|curren|deg|divide|eacute|ecirc|egrave|eth|euml|frac12|frac14|frac34|gt|iacute|icirc|iexcl|igrave|iquest|iuml|laquo|lt|macr|micro|middot|nbsp|not|ntilde|oacute|ocirc|ograve|ordf|ordm|oslash|otilde|ouml|para|plusmn|pound|quot|raquo|reg|sect|shy|sup1|sup2|sup3|szlig|thorn|times|uacute|ucirc|ugrave|uml|uuml|yacute|yen|yuml|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g};Gd.namedReferences={xml:{entities:{"&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&amp;":"&"},characters:{"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;","&":"&amp;"}},html4:{entities:{"&apos;":"'","&nbsp":"\xA0","&nbsp;":"\xA0","&iexcl":"\xA1","&iexcl;":"\xA1","&cent":"\xA2","&cent;":"\xA2","&pound":"\xA3","&pound;":"\xA3","&curren":"\xA4","&curren;":"\xA4","&yen":"\xA5","&yen;":"\xA5","&brvbar":"\xA6","&brvbar;":"\xA6","&sect":"\xA7","&sect;":"\xA7","&uml":"\xA8","&uml;":"\xA8","&copy":"\xA9","&copy;":"\xA9","&ordf":"\xAA","&ordf;":"\xAA","&laquo":"\xAB","&laquo;":"\xAB","&not":"\xAC","&not;":"\xAC","&shy":"\xAD","&shy;":"\xAD","&reg":"\xAE","&reg;":"\xAE","&macr":"\xAF","&macr;":"\xAF","&deg":"\xB0","&deg;":"\xB0","&plusmn":"\xB1","&plusmn;":"\xB1","&sup2":"\xB2","&sup2;":"\xB2","&sup3":"\xB3","&sup3;":"\xB3","&acute":"\xB4","&acute;":"\xB4","&micro":"\xB5","&micro;":"\xB5","&para":"\xB6","&para;":"\xB6","&middot":"\xB7","&middot;":"\xB7","&cedil":"\xB8","&cedil;":"\xB8","&sup1":"\xB9","&sup1;":"\xB9","&ordm":"\xBA","&ordm;":"\xBA","&raquo":"\xBB","&raquo;":"\xBB","&frac14":"\xBC","&frac14;":"\xBC","&frac12":"\xBD","&frac12;":"\xBD","&frac34":"\xBE","&frac34;":"\xBE","&iquest":"\xBF","&iquest;":"\xBF","&Agrave":"\xC0","&Agrave;":"\xC0","&Aacute":"\xC1","&Aacute;":"\xC1","&Acirc":"\xC2","&Acirc;":"\xC2","&Atilde":"\xC3","&Atilde;":"\xC3","&Auml":"\xC4","&Auml;":"\xC4","&Aring":"\xC5","&Aring;":"\xC5","&AElig":"\xC6","&AElig;":"\xC6","&Ccedil":"\xC7","&Ccedil;":"\xC7","&Egrave":"\xC8","&Egrave;":"\xC8","&Eacute":"\xC9","&Eacute;":"\xC9","&Ecirc":"\xCA","&Ecirc;":"\xCA","&Euml":"\xCB","&Euml;":"\xCB","&Igrave":"\xCC","&Igrave;":"\xCC","&Iacute":"\xCD","&Iacute;":"\xCD","&Icirc":"\xCE","&Icirc;":"\xCE","&Iuml":"\xCF","&Iuml;":"\xCF","&ETH":"\xD0","&ETH;":"\xD0","&Ntilde":"\xD1","&Ntilde;":"\xD1","&Ograve":"\xD2","&Ograve;":"\xD2","&Oacute":"\xD3","&Oacute;":"\xD3","&Ocirc":"\xD4","&Ocirc;":"\xD4","&Otilde":"\xD5","&Otilde;":"\xD5","&Ouml":"\xD6","&Ouml;":"\xD6","&times":"\xD7","&times;":"\xD7","&Oslash":"\xD8","&Oslash;":"\xD8","&Ugrave":"\xD9","&Ugrave;":"\xD9","&Uacute":"\xDA","&Uacute;":"\xDA","&Ucirc":"\xDB","&Ucirc;":"\xDB","&Uuml":"\xDC","&Uuml;":"\xDC","&Yacute":"\xDD","&Yacute;":"\xDD","&THORN":"\xDE","&THORN;":"\xDE","&szlig":"\xDF","&szlig;":"\xDF","&agrave":"\xE0","&agrave;":"\xE0","&aacute":"\xE1","&aacute;":"\xE1","&acirc":"\xE2","&acirc;":"\xE2","&atilde":"\xE3","&atilde;":"\xE3","&auml":"\xE4","&auml;":"\xE4","&aring":"\xE5","&aring;":"\xE5","&aelig":"\xE6","&aelig;":"\xE6","&ccedil":"\xE7","&ccedil;":"\xE7","&egrave":"\xE8","&egrave;":"\xE8","&eacute":"\xE9","&eacute;":"\xE9","&ecirc":"\xEA","&ecirc;":"\xEA","&euml":"\xEB","&euml;":"\xEB","&igrave":"\xEC","&igrave;":"\xEC","&iacute":"\xED","&iacute;":"\xED","&icirc":"\xEE","&icirc;":"\xEE","&iuml":"\xEF","&iuml;":"\xEF","&eth":"\xF0","&eth;":"\xF0","&ntilde":"\xF1","&ntilde;":"\xF1","&ograve":"\xF2","&ograve;":"\xF2","&oacute":"\xF3","&oacute;":"\xF3","&ocirc":"\xF4","&ocirc;":"\xF4","&otilde":"\xF5","&otilde;":"\xF5","&ouml":"\xF6","&ouml;":"\xF6","&divide":"\xF7","&divide;":"\xF7","&oslash":"\xF8","&oslash;":"\xF8","&ugrave":"\xF9","&ugrave;":"\xF9","&uacute":"\xFA","&uacute;":"\xFA","&ucirc":"\xFB","&ucirc;":"\xFB","&uuml":"\xFC","&uuml;":"\xFC","&yacute":"\xFD","&yacute;":"\xFD","&thorn":"\xFE","&thorn;":"\xFE","&yuml":"\xFF","&yuml;":"\xFF","&quot":'"',"&quot;":'"',"&amp":"&","&amp;":"&","&lt":"<","&lt;":"<","&gt":">","&gt;":">","&OElig;":"\u0152","&oelig;":"\u0153","&Scaron;":"\u0160","&scaron;":"\u0161","&Yuml;":"\u0178","&circ;":"\u02C6","&tilde;":"\u02DC","&ensp;":"\u2002","&emsp;":"\u2003","&thinsp;":"\u2009","&zwnj;":"\u200C","&zwj;":"\u200D","&lrm;":"\u200E","&rlm;":"\u200F","&ndash;":"\u2013","&mdash;":"\u2014","&lsquo;":"\u2018","&rsquo;":"\u2019","&sbquo;":"\u201A","&ldquo;":"\u201C","&rdquo;":"\u201D","&bdquo;":"\u201E","&dagger;":"\u2020","&Dagger;":"\u2021","&permil;":"\u2030","&lsaquo;":"\u2039","&rsaquo;":"\u203A","&euro;":"\u20AC","&fnof;":"\u0192","&Alpha;":"\u0391","&Beta;":"\u0392","&Gamma;":"\u0393","&Delta;":"\u0394","&Epsilon;":"\u0395","&Zeta;":"\u0396","&Eta;":"\u0397","&Theta;":"\u0398","&Iota;":"\u0399","&Kappa;":"\u039A","&Lambda;":"\u039B","&Mu;":"\u039C","&Nu;":"\u039D","&Xi;":"\u039E","&Omicron;":"\u039F","&Pi;":"\u03A0","&Rho;":"\u03A1","&Sigma;":"\u03A3","&Tau;":"\u03A4","&Upsilon;":"\u03A5","&Phi;":"\u03A6","&Chi;":"\u03A7","&Psi;":"\u03A8","&Omega;":"\u03A9","&alpha;":"\u03B1","&beta;":"\u03B2","&gamma;":"\u03B3","&delta;":"\u03B4","&epsilon;":"\u03B5","&zeta;":"\u03B6","&eta;":"\u03B7","&theta;":"\u03B8","&iota;":"\u03B9","&kappa;":"\u03BA","&lambda;":"\u03BB","&mu;":"\u03BC","&nu;":"\u03BD","&xi;":"\u03BE","&omicron;":"\u03BF","&pi;":"\u03C0","&rho;":"\u03C1","&sigmaf;":"\u03C2","&sigma;":"\u03C3","&tau;":"\u03C4","&upsilon;":"\u03C5","&phi;":"\u03C6","&chi;":"\u03C7","&psi;":"\u03C8","&omega;":"\u03C9","&thetasym;":"\u03D1","&upsih;":"\u03D2","&piv;":"\u03D6","&bull;":"\u2022","&hellip;":"\u2026","&prime;":"\u2032","&Prime;":"\u2033","&oline;":"\u203E","&frasl;":"\u2044","&weierp;":"\u2118","&image;":"\u2111","&real;":"\u211C","&trade;":"\u2122","&alefsym;":"\u2135","&larr;":"\u2190","&uarr;":"\u2191","&rarr;":"\u2192","&darr;":"\u2193","&harr;":"\u2194","&crarr;":"\u21B5","&lArr;":"\u21D0","&uArr;":"\u21D1","&rArr;":"\u21D2","&dArr;":"\u21D3","&hArr;":"\u21D4","&forall;":"\u2200","&part;":"\u2202","&exist;":"\u2203","&empty;":"\u2205","&nabla;":"\u2207","&isin;":"\u2208","&notin;":"\u2209","&ni;":"\u220B","&prod;":"\u220F","&sum;":"\u2211","&minus;":"\u2212","&lowast;":"\u2217","&radic;":"\u221A","&prop;":"\u221D","&infin;":"\u221E","&ang;":"\u2220","&and;":"\u2227","&or;":"\u2228","&cap;":"\u2229","&cup;":"\u222A","&int;":"\u222B","&there4;":"\u2234","&sim;":"\u223C","&cong;":"\u2245","&asymp;":"\u2248","&ne;":"\u2260","&equiv;":"\u2261","&le;":"\u2264","&ge;":"\u2265","&sub;":"\u2282","&sup;":"\u2283","&nsub;":"\u2284","&sube;":"\u2286","&supe;":"\u2287","&oplus;":"\u2295","&otimes;":"\u2297","&perp;":"\u22A5","&sdot;":"\u22C5","&lceil;":"\u2308","&rceil;":"\u2309","&lfloor;":"\u230A","&rfloor;":"\u230B","&lang;":"\u2329","&rang;":"\u232A","&loz;":"\u25CA","&spades;":"\u2660","&clubs;":"\u2663","&hearts;":"\u2665","&diams;":"\u2666"},characters:{"'":"&apos;","\xA0":"&nbsp;","\xA1":"&iexcl;","\xA2":"&cent;","\xA3":"&pound;","\xA4":"&curren;","\xA5":"&yen;","\xA6":"&brvbar;","\xA7":"&sect;","\xA8":"&uml;","\xA9":"&copy;",\u00AA:"&ordf;","\xAB":"&laquo;","\xAC":"&not;","\xAD":"&shy;","\xAE":"&reg;","\xAF":"&macr;","\xB0":"&deg;","\xB1":"&plusmn;","\xB2":"&sup2;","\xB3":"&sup3;","\xB4":"&acute;",\u00B5:"&micro;","\xB6":"&para;","\xB7":"&middot;","\xB8":"&cedil;","\xB9":"&sup1;",\u00BA:"&ordm;","\xBB":"&raquo;","\xBC":"&frac14;","\xBD":"&frac12;","\xBE":"&frac34;","\xBF":"&iquest;",\u00C0:"&Agrave;",\u00C1:"&Aacute;",\u00C2:"&Acirc;",\u00C3:"&Atilde;",\u00C4:"&Auml;",\u00C5:"&Aring;",\u00C6:"&AElig;",\u00C7:"&Ccedil;",\u00C8:"&Egrave;",\u00C9:"&Eacute;",\u00CA:"&Ecirc;",\u00CB:"&Euml;",\u00CC:"&Igrave;",\u00CD:"&Iacute;",\u00CE:"&Icirc;",\u00CF:"&Iuml;",\u00D0:"&ETH;",\u00D1:"&Ntilde;",\u00D2:"&Ograve;",\u00D3:"&Oacute;",\u00D4:"&Ocirc;",\u00D5:"&Otilde;",\u00D6:"&Ouml;","\xD7":"&times;",\u00D8:"&Oslash;",\u00D9:"&Ugrave;",\u00DA:"&Uacute;",\u00DB:"&Ucirc;",\u00DC:"&Uuml;",\u00DD:"&Yacute;",\u00DE:"&THORN;",\u00DF:"&szlig;",\u00E0:"&agrave;",\u00E1:"&aacute;",\u00E2:"&acirc;",\u00E3:"&atilde;",\u00E4:"&auml;",\u00E5:"&aring;",\u00E6:"&aelig;",\u00E7:"&ccedil;",\u00E8:"&egrave;",\u00E9:"&eacute;",\u00EA:"&ecirc;",\u00EB:"&euml;",\u00EC:"&igrave;",\u00ED:"&iacute;",\u00EE:"&icirc;",\u00EF:"&iuml;",\u00F0:"&eth;",\u00F1:"&ntilde;",\u00F2:"&ograve;",\u00F3:"&oacute;",\u00F4:"&ocirc;",\u00F5:"&otilde;",\u00F6:"&ouml;","\xF7":"&divide;",\u00F8:"&oslash;",\u00F9:"&ugrave;",\u00FA:"&uacute;",\u00FB:"&ucirc;",\u00FC:"&uuml;",\u00FD:"&yacute;",\u00FE:"&thorn;",\u00FF:"&yuml;",'"':"&quot;","&":"&amp;","<":"&lt;",">":"&gt;",\u0152:"&OElig;",\u0153:"&oelig;",\u0160:"&Scaron;",\u0161:"&scaron;",\u0178:"&Yuml;","\u02C6":"&circ;","\u02DC":"&tilde;","\u2002":"&ensp;","\u2003":"&emsp;","\u2009":"&thinsp;","\u200C":"&zwnj;","\u200D":"&zwj;","\u200E":"&lrm;","\u200F":"&rlm;","\u2013":"&ndash;","\u2014":"&mdash;","\u2018":"&lsquo;","\u2019":"&rsquo;","\u201A":"&sbquo;","\u201C":"&ldquo;","\u201D":"&rdquo;","\u201E":"&bdquo;","\u2020":"&dagger;","\u2021":"&Dagger;","\u2030":"&permil;","\u2039":"&lsaquo;","\u203A":"&rsaquo;","\u20AC":"&euro;",\u0192:"&fnof;",\u0391:"&Alpha;",\u0392:"&Beta;",\u0393:"&Gamma;",\u0394:"&Delta;",\u0395:"&Epsilon;",\u0396:"&Zeta;",\u0397:"&Eta;",\u0398:"&Theta;",\u0399:"&Iota;",\u039A:"&Kappa;",\u039B:"&Lambda;",\u039C:"&Mu;",\u039D:"&Nu;",\u039E:"&Xi;",\u039F:"&Omicron;",\u03A0:"&Pi;",\u03A1:"&Rho;",\u03A3:"&Sigma;",\u03A4:"&Tau;",\u03A5:"&Upsilon;",\u03A6:"&Phi;",\u03A7:"&Chi;",\u03A8:"&Psi;",\u03A9:"&Omega;",\u03B1:"&alpha;",\u03B2:"&beta;",\u03B3:"&gamma;",\u03B4:"&delta;",\u03B5:"&epsilon;",\u03B6:"&zeta;",\u03B7:"&eta;",\u03B8:"&theta;",\u03B9:"&iota;",\u03BA:"&kappa;",\u03BB:"&lambda;",\u03BC:"&mu;",\u03BD:"&nu;",\u03BE:"&xi;",\u03BF:"&omicron;",\u03C0:"&pi;",\u03C1:"&rho;",\u03C2:"&sigmaf;",\u03C3:"&sigma;",\u03C4:"&tau;",\u03C5:"&upsilon;",\u03C6:"&phi;",\u03C7:"&chi;",\u03C8:"&psi;",\u03C9:"&omega;",\u03D1:"&thetasym;",\u03D2:"&upsih;",\u03D6:"&piv;","\u2022":"&bull;","\u2026":"&hellip;","\u2032":"&prime;","\u2033":"&Prime;","\u203E":"&oline;","\u2044":"&frasl;","\u2118":"&weierp;",\u2111:"&image;",\u211C:"&real;","\u2122":"&trade;",\u2135:"&alefsym;","\u2190":"&larr;","\u2191":"&uarr;","\u2192":"&rarr;","\u2193":"&darr;","\u2194":"&harr;","\u21B5":"&crarr;","\u21D0":"&lArr;","\u21D1":"&uArr;","\u21D2":"&rArr;","\u21D3":"&dArr;","\u21D4":"&hArr;","\u2200":"&forall;","\u2202":"&part;","\u2203":"&exist;","\u2205":"&empty;","\u2207":"&nabla;","\u2208":"&isin;","\u2209":"&notin;","\u220B":"&ni;","\u220F":"&prod;","\u2211":"&sum;","\u2212":"&minus;","\u2217":"&lowast;","\u221A":"&radic;","\u221D":"&prop;","\u221E":"&infin;","\u2220":"&ang;","\u2227":"&and;","\u2228":"&or;","\u2229":"&cap;","\u222A":"&cup;","\u222B":"&int;","\u2234":"&there4;","\u223C":"&sim;","\u2245":"&cong;","\u2248":"&asymp;","\u2260":"&ne;","\u2261":"&equiv;","\u2264":"&le;","\u2265":"&ge;","\u2282":"&sub;","\u2283":"&sup;","\u2284":"&nsub;","\u2286":"&sube;","\u2287":"&supe;","\u2295":"&oplus;","\u2297":"&otimes;","\u22A5":"&perp;","\u22C5":"&sdot;","\u2308":"&lceil;","\u2309":"&rceil;","\u230A":"&lfloor;","\u230B":"&rfloor;","\u2329":"&lang;","\u232A":"&rang;","\u25CA":"&loz;","\u2660":"&spades;","\u2663":"&clubs;","\u2665":"&hearts;","\u2666":"&diams;"}},html5:{entities:{"&AElig":"\xC6","&AElig;":"\xC6","&AMP":"&","&AMP;":"&","&Aacute":"\xC1","&Aacute;":"\xC1","&Abreve;":"\u0102","&Acirc":"\xC2","&Acirc;":"\xC2","&Acy;":"\u0410","&Afr;":"\u{1D504}","&Agrave":"\xC0","&Agrave;":"\xC0","&Alpha;":"\u0391","&Amacr;":"\u0100","&And;":"\u2A53","&Aogon;":"\u0104","&Aopf;":"\u{1D538}","&ApplyFunction;":"\u2061","&Aring":"\xC5","&Aring;":"\xC5","&Ascr;":"\u{1D49C}","&Assign;":"\u2254","&Atilde":"\xC3","&Atilde;":"\xC3","&Auml":"\xC4","&Auml;":"\xC4","&Backslash;":"\u2216","&Barv;":"\u2AE7","&Barwed;":"\u2306","&Bcy;":"\u0411","&Because;":"\u2235","&Bernoullis;":"\u212C","&Beta;":"\u0392","&Bfr;":"\u{1D505}","&Bopf;":"\u{1D539}","&Breve;":"\u02D8","&Bscr;":"\u212C","&Bumpeq;":"\u224E","&CHcy;":"\u0427","&COPY":"\xA9","&COPY;":"\xA9","&Cacute;":"\u0106","&Cap;":"\u22D2","&CapitalDifferentialD;":"\u2145","&Cayleys;":"\u212D","&Ccaron;":"\u010C","&Ccedil":"\xC7","&Ccedil;":"\xC7","&Ccirc;":"\u0108","&Cconint;":"\u2230","&Cdot;":"\u010A","&Cedilla;":"\xB8","&CenterDot;":"\xB7","&Cfr;":"\u212D","&Chi;":"\u03A7","&CircleDot;":"\u2299","&CircleMinus;":"\u2296","&CirclePlus;":"\u2295","&CircleTimes;":"\u2297","&ClockwiseContourIntegral;":"\u2232","&CloseCurlyDoubleQuote;":"\u201D","&CloseCurlyQuote;":"\u2019","&Colon;":"\u2237","&Colone;":"\u2A74","&Congruent;":"\u2261","&Conint;":"\u222F","&ContourIntegral;":"\u222E","&Copf;":"\u2102","&Coproduct;":"\u2210","&CounterClockwiseContourIntegral;":"\u2233","&Cross;":"\u2A2F","&Cscr;":"\u{1D49E}","&Cup;":"\u22D3","&CupCap;":"\u224D","&DD;":"\u2145","&DDotrahd;":"\u2911","&DJcy;":"\u0402","&DScy;":"\u0405","&DZcy;":"\u040F","&Dagger;":"\u2021","&Darr;":"\u21A1","&Dashv;":"\u2AE4","&Dcaron;":"\u010E","&Dcy;":"\u0414","&Del;":"\u2207","&Delta;":"\u0394","&Dfr;":"\u{1D507}","&DiacriticalAcute;":"\xB4","&DiacriticalDot;":"\u02D9","&DiacriticalDoubleAcute;":"\u02DD","&DiacriticalGrave;":"`","&DiacriticalTilde;":"\u02DC","&Diamond;":"\u22C4","&DifferentialD;":"\u2146","&Dopf;":"\u{1D53B}","&Dot;":"\xA8","&DotDot;":"\u20DC","&DotEqual;":"\u2250","&DoubleContourIntegral;":"\u222F","&DoubleDot;":"\xA8","&DoubleDownArrow;":"\u21D3","&DoubleLeftArrow;":"\u21D0","&DoubleLeftRightArrow;":"\u21D4","&DoubleLeftTee;":"\u2AE4","&DoubleLongLeftArrow;":"\u27F8","&DoubleLongLeftRightArrow;":"\u27FA","&DoubleLongRightArrow;":"\u27F9","&DoubleRightArrow;":"\u21D2","&DoubleRightTee;":"\u22A8","&DoubleUpArrow;":"\u21D1","&DoubleUpDownArrow;":"\u21D5","&DoubleVerticalBar;":"\u2225","&DownArrow;":"\u2193","&DownArrowBar;":"\u2913","&DownArrowUpArrow;":"\u21F5","&DownBreve;":"\u0311","&DownLeftRightVector;":"\u2950","&DownLeftTeeVector;":"\u295E","&DownLeftVector;":"\u21BD","&DownLeftVectorBar;":"\u2956","&DownRightTeeVector;":"\u295F","&DownRightVector;":"\u21C1","&DownRightVectorBar;":"\u2957","&DownTee;":"\u22A4","&DownTeeArrow;":"\u21A7","&Downarrow;":"\u21D3","&Dscr;":"\u{1D49F}","&Dstrok;":"\u0110","&ENG;":"\u014A","&ETH":"\xD0","&ETH;":"\xD0","&Eacute":"\xC9","&Eacute;":"\xC9","&Ecaron;":"\u011A","&Ecirc":"\xCA","&Ecirc;":"\xCA","&Ecy;":"\u042D","&Edot;":"\u0116","&Efr;":"\u{1D508}","&Egrave":"\xC8","&Egrave;":"\xC8","&Element;":"\u2208","&Emacr;":"\u0112","&EmptySmallSquare;":"\u25FB","&EmptyVerySmallSquare;":"\u25AB","&Eogon;":"\u0118","&Eopf;":"\u{1D53C}","&Epsilon;":"\u0395","&Equal;":"\u2A75","&EqualTilde;":"\u2242","&Equilibrium;":"\u21CC","&Escr;":"\u2130","&Esim;":"\u2A73","&Eta;":"\u0397","&Euml":"\xCB","&Euml;":"\xCB","&Exists;":"\u2203","&ExponentialE;":"\u2147","&Fcy;":"\u0424","&Ffr;":"\u{1D509}","&FilledSmallSquare;":"\u25FC","&FilledVerySmallSquare;":"\u25AA","&Fopf;":"\u{1D53D}","&ForAll;":"\u2200","&Fouriertrf;":"\u2131","&Fscr;":"\u2131","&GJcy;":"\u0403","&GT":">","&GT;":">","&Gamma;":"\u0393","&Gammad;":"\u03DC","&Gbreve;":"\u011E","&Gcedil;":"\u0122","&Gcirc;":"\u011C","&Gcy;":"\u0413","&Gdot;":"\u0120","&Gfr;":"\u{1D50A}","&Gg;":"\u22D9","&Gopf;":"\u{1D53E}","&GreaterEqual;":"\u2265","&GreaterEqualLess;":"\u22DB","&GreaterFullEqual;":"\u2267","&GreaterGreater;":"\u2AA2","&GreaterLess;":"\u2277","&GreaterSlantEqual;":"\u2A7E","&GreaterTilde;":"\u2273","&Gscr;":"\u{1D4A2}","&Gt;":"\u226B","&HARDcy;":"\u042A","&Hacek;":"\u02C7","&Hat;":"^","&Hcirc;":"\u0124","&Hfr;":"\u210C","&HilbertSpace;":"\u210B","&Hopf;":"\u210D","&HorizontalLine;":"\u2500","&Hscr;":"\u210B","&Hstrok;":"\u0126","&HumpDownHump;":"\u224E","&HumpEqual;":"\u224F","&IEcy;":"\u0415","&IJlig;":"\u0132","&IOcy;":"\u0401","&Iacute":"\xCD","&Iacute;":"\xCD","&Icirc":"\xCE","&Icirc;":"\xCE","&Icy;":"\u0418","&Idot;":"\u0130","&Ifr;":"\u2111","&Igrave":"\xCC","&Igrave;":"\xCC","&Im;":"\u2111","&Imacr;":"\u012A","&ImaginaryI;":"\u2148","&Implies;":"\u21D2","&Int;":"\u222C","&Integral;":"\u222B","&Intersection;":"\u22C2","&InvisibleComma;":"\u2063","&InvisibleTimes;":"\u2062","&Iogon;":"\u012E","&Iopf;":"\u{1D540}","&Iota;":"\u0399","&Iscr;":"\u2110","&Itilde;":"\u0128","&Iukcy;":"\u0406","&Iuml":"\xCF","&Iuml;":"\xCF","&Jcirc;":"\u0134","&Jcy;":"\u0419","&Jfr;":"\u{1D50D}","&Jopf;":"\u{1D541}","&Jscr;":"\u{1D4A5}","&Jsercy;":"\u0408","&Jukcy;":"\u0404","&KHcy;":"\u0425","&KJcy;":"\u040C","&Kappa;":"\u039A","&Kcedil;":"\u0136","&Kcy;":"\u041A","&Kfr;":"\u{1D50E}","&Kopf;":"\u{1D542}","&Kscr;":"\u{1D4A6}","&LJcy;":"\u0409","&LT":"<","&LT;":"<","&Lacute;":"\u0139","&Lambda;":"\u039B","&Lang;":"\u27EA","&Laplacetrf;":"\u2112","&Larr;":"\u219E","&Lcaron;":"\u013D","&Lcedil;":"\u013B","&Lcy;":"\u041B","&LeftAngleBracket;":"\u27E8","&LeftArrow;":"\u2190","&LeftArrowBar;":"\u21E4","&LeftArrowRightArrow;":"\u21C6","&LeftCeiling;":"\u2308","&LeftDoubleBracket;":"\u27E6","&LeftDownTeeVector;":"\u2961","&LeftDownVector;":"\u21C3","&LeftDownVectorBar;":"\u2959","&LeftFloor;":"\u230A","&LeftRightArrow;":"\u2194","&LeftRightVector;":"\u294E","&LeftTee;":"\u22A3","&LeftTeeArrow;":"\u21A4","&LeftTeeVector;":"\u295A","&LeftTriangle;":"\u22B2","&LeftTriangleBar;":"\u29CF","&LeftTriangleEqual;":"\u22B4","&LeftUpDownVector;":"\u2951","&LeftUpTeeVector;":"\u2960","&LeftUpVector;":"\u21BF","&LeftUpVectorBar;":"\u2958","&LeftVector;":"\u21BC","&LeftVectorBar;":"\u2952","&Leftarrow;":"\u21D0","&Leftrightarrow;":"\u21D4","&LessEqualGreater;":"\u22DA","&LessFullEqual;":"\u2266","&LessGreater;":"\u2276","&LessLess;":"\u2AA1","&LessSlantEqual;":"\u2A7D","&LessTilde;":"\u2272","&Lfr;":"\u{1D50F}","&Ll;":"\u22D8","&Lleftarrow;":"\u21DA","&Lmidot;":"\u013F","&LongLeftArrow;":"\u27F5","&LongLeftRightArrow;":"\u27F7","&LongRightArrow;":"\u27F6","&Longleftarrow;":"\u27F8","&Longleftrightarrow;":"\u27FA","&Longrightarrow;":"\u27F9","&Lopf;":"\u{1D543}","&LowerLeftArrow;":"\u2199","&LowerRightArrow;":"\u2198","&Lscr;":"\u2112","&Lsh;":"\u21B0","&Lstrok;":"\u0141","&Lt;":"\u226A","&Map;":"\u2905","&Mcy;":"\u041C","&MediumSpace;":"\u205F","&Mellintrf;":"\u2133","&Mfr;":"\u{1D510}","&MinusPlus;":"\u2213","&Mopf;":"\u{1D544}","&Mscr;":"\u2133","&Mu;":"\u039C","&NJcy;":"\u040A","&Nacute;":"\u0143","&Ncaron;":"\u0147","&Ncedil;":"\u0145","&Ncy;":"\u041D","&NegativeMediumSpace;":"\u200B","&NegativeThickSpace;":"\u200B","&NegativeThinSpace;":"\u200B","&NegativeVeryThinSpace;":"\u200B","&NestedGreaterGreater;":"\u226B","&NestedLessLess;":"\u226A","&NewLine;":`
`,"&Nfr;":"\u{1D511}","&NoBreak;":"\u2060","&NonBreakingSpace;":"\xA0","&Nopf;":"\u2115","&Not;":"\u2AEC","&NotCongruent;":"\u2262","&NotCupCap;":"\u226D","&NotDoubleVerticalBar;":"\u2226","&NotElement;":"\u2209","&NotEqual;":"\u2260","&NotEqualTilde;":"\u2242\u0338","&NotExists;":"\u2204","&NotGreater;":"\u226F","&NotGreaterEqual;":"\u2271","&NotGreaterFullEqual;":"\u2267\u0338","&NotGreaterGreater;":"\u226B\u0338","&NotGreaterLess;":"\u2279","&NotGreaterSlantEqual;":"\u2A7E\u0338","&NotGreaterTilde;":"\u2275","&NotHumpDownHump;":"\u224E\u0338","&NotHumpEqual;":"\u224F\u0338","&NotLeftTriangle;":"\u22EA","&NotLeftTriangleBar;":"\u29CF\u0338","&NotLeftTriangleEqual;":"\u22EC","&NotLess;":"\u226E","&NotLessEqual;":"\u2270","&NotLessGreater;":"\u2278","&NotLessLess;":"\u226A\u0338","&NotLessSlantEqual;":"\u2A7D\u0338","&NotLessTilde;":"\u2274","&NotNestedGreaterGreater;":"\u2AA2\u0338","&NotNestedLessLess;":"\u2AA1\u0338","&NotPrecedes;":"\u2280","&NotPrecedesEqual;":"\u2AAF\u0338","&NotPrecedesSlantEqual;":"\u22E0","&NotReverseElement;":"\u220C","&NotRightTriangle;":"\u22EB","&NotRightTriangleBar;":"\u29D0\u0338","&NotRightTriangleEqual;":"\u22ED","&NotSquareSubset;":"\u228F\u0338","&NotSquareSubsetEqual;":"\u22E2","&NotSquareSuperset;":"\u2290\u0338","&NotSquareSupersetEqual;":"\u22E3","&NotSubset;":"\u2282\u20D2","&NotSubsetEqual;":"\u2288","&NotSucceeds;":"\u2281","&NotSucceedsEqual;":"\u2AB0\u0338","&NotSucceedsSlantEqual;":"\u22E1","&NotSucceedsTilde;":"\u227F\u0338","&NotSuperset;":"\u2283\u20D2","&NotSupersetEqual;":"\u2289","&NotTilde;":"\u2241","&NotTildeEqual;":"\u2244","&NotTildeFullEqual;":"\u2247","&NotTildeTilde;":"\u2249","&NotVerticalBar;":"\u2224","&Nscr;":"\u{1D4A9}","&Ntilde":"\xD1","&Ntilde;":"\xD1","&Nu;":"\u039D","&OElig;":"\u0152","&Oacute":"\xD3","&Oacute;":"\xD3","&Ocirc":"\xD4","&Ocirc;":"\xD4","&Ocy;":"\u041E","&Odblac;":"\u0150","&Ofr;":"\u{1D512}","&Ograve":"\xD2","&Ograve;":"\xD2","&Omacr;":"\u014C","&Omega;":"\u03A9","&Omicron;":"\u039F","&Oopf;":"\u{1D546}","&OpenCurlyDoubleQuote;":"\u201C","&OpenCurlyQuote;":"\u2018","&Or;":"\u2A54","&Oscr;":"\u{1D4AA}","&Oslash":"\xD8","&Oslash;":"\xD8","&Otilde":"\xD5","&Otilde;":"\xD5","&Otimes;":"\u2A37","&Ouml":"\xD6","&Ouml;":"\xD6","&OverBar;":"\u203E","&OverBrace;":"\u23DE","&OverBracket;":"\u23B4","&OverParenthesis;":"\u23DC","&PartialD;":"\u2202","&Pcy;":"\u041F","&Pfr;":"\u{1D513}","&Phi;":"\u03A6","&Pi;":"\u03A0","&PlusMinus;":"\xB1","&Poincareplane;":"\u210C","&Popf;":"\u2119","&Pr;":"\u2ABB","&Precedes;":"\u227A","&PrecedesEqual;":"\u2AAF","&PrecedesSlantEqual;":"\u227C","&PrecedesTilde;":"\u227E","&Prime;":"\u2033","&Product;":"\u220F","&Proportion;":"\u2237","&Proportional;":"\u221D","&Pscr;":"\u{1D4AB}","&Psi;":"\u03A8","&QUOT":'"',"&QUOT;":'"',"&Qfr;":"\u{1D514}","&Qopf;":"\u211A","&Qscr;":"\u{1D4AC}","&RBarr;":"\u2910","&REG":"\xAE","&REG;":"\xAE","&Racute;":"\u0154","&Rang;":"\u27EB","&Rarr;":"\u21A0","&Rarrtl;":"\u2916","&Rcaron;":"\u0158","&Rcedil;":"\u0156","&Rcy;":"\u0420","&Re;":"\u211C","&ReverseElement;":"\u220B","&ReverseEquilibrium;":"\u21CB","&ReverseUpEquilibrium;":"\u296F","&Rfr;":"\u211C","&Rho;":"\u03A1","&RightAngleBracket;":"\u27E9","&RightArrow;":"\u2192","&RightArrowBar;":"\u21E5","&RightArrowLeftArrow;":"\u21C4","&RightCeiling;":"\u2309","&RightDoubleBracket;":"\u27E7","&RightDownTeeVector;":"\u295D","&RightDownVector;":"\u21C2","&RightDownVectorBar;":"\u2955","&RightFloor;":"\u230B","&RightTee;":"\u22A2","&RightTeeArrow;":"\u21A6","&RightTeeVector;":"\u295B","&RightTriangle;":"\u22B3","&RightTriangleBar;":"\u29D0","&RightTriangleEqual;":"\u22B5","&RightUpDownVector;":"\u294F","&RightUpTeeVector;":"\u295C","&RightUpVector;":"\u21BE","&RightUpVectorBar;":"\u2954","&RightVector;":"\u21C0","&RightVectorBar;":"\u2953","&Rightarrow;":"\u21D2","&Ropf;":"\u211D","&RoundImplies;":"\u2970","&Rrightarrow;":"\u21DB","&Rscr;":"\u211B","&Rsh;":"\u21B1","&RuleDelayed;":"\u29F4","&SHCHcy;":"\u0429","&SHcy;":"\u0428","&SOFTcy;":"\u042C","&Sacute;":"\u015A","&Sc;":"\u2ABC","&Scaron;":"\u0160","&Scedil;":"\u015E","&Scirc;":"\u015C","&Scy;":"\u0421","&Sfr;":"\u{1D516}","&ShortDownArrow;":"\u2193","&ShortLeftArrow;":"\u2190","&ShortRightArrow;":"\u2192","&ShortUpArrow;":"\u2191","&Sigma;":"\u03A3","&SmallCircle;":"\u2218","&Sopf;":"\u{1D54A}","&Sqrt;":"\u221A","&Square;":"\u25A1","&SquareIntersection;":"\u2293","&SquareSubset;":"\u228F","&SquareSubsetEqual;":"\u2291","&SquareSuperset;":"\u2290","&SquareSupersetEqual;":"\u2292","&SquareUnion;":"\u2294","&Sscr;":"\u{1D4AE}","&Star;":"\u22C6","&Sub;":"\u22D0","&Subset;":"\u22D0","&SubsetEqual;":"\u2286","&Succeeds;":"\u227B","&SucceedsEqual;":"\u2AB0","&SucceedsSlantEqual;":"\u227D","&SucceedsTilde;":"\u227F","&SuchThat;":"\u220B","&Sum;":"\u2211","&Sup;":"\u22D1","&Superset;":"\u2283","&SupersetEqual;":"\u2287","&Supset;":"\u22D1","&THORN":"\xDE","&THORN;":"\xDE","&TRADE;":"\u2122","&TSHcy;":"\u040B","&TScy;":"\u0426","&Tab;":" ","&Tau;":"\u03A4","&Tcaron;":"\u0164","&Tcedil;":"\u0162","&Tcy;":"\u0422","&Tfr;":"\u{1D517}","&Therefore;":"\u2234","&Theta;":"\u0398","&ThickSpace;":"\u205F\u200A","&ThinSpace;":"\u2009","&Tilde;":"\u223C","&TildeEqual;":"\u2243","&TildeFullEqual;":"\u2245","&TildeTilde;":"\u2248","&Topf;":"\u{1D54B}","&TripleDot;":"\u20DB","&Tscr;":"\u{1D4AF}","&Tstrok;":"\u0166","&Uacute":"\xDA","&Uacute;":"\xDA","&Uarr;":"\u219F","&Uarrocir;":"\u2949","&Ubrcy;":"\u040E","&Ubreve;":"\u016C","&Ucirc":"\xDB","&Ucirc;":"\xDB","&Ucy;":"\u0423","&Udblac;":"\u0170","&Ufr;":"\u{1D518}","&Ugrave":"\xD9","&Ugrave;":"\xD9","&Umacr;":"\u016A","&UnderBar;":"_","&UnderBrace;":"\u23DF","&UnderBracket;":"\u23B5","&UnderParenthesis;":"\u23DD","&Union;":"\u22C3","&UnionPlus;":"\u228E","&Uogon;":"\u0172","&Uopf;":"\u{1D54C}","&UpArrow;":"\u2191","&UpArrowBar;":"\u2912","&UpArrowDownArrow;":"\u21C5","&UpDownArrow;":"\u2195","&UpEquilibrium;":"\u296E","&UpTee;":"\u22A5","&UpTeeArrow;":"\u21A5","&Uparrow;":"\u21D1","&Updownarrow;":"\u21D5","&UpperLeftArrow;":"\u2196","&UpperRightArrow;":"\u2197","&Upsi;":"\u03D2","&Upsilon;":"\u03A5","&Uring;":"\u016E","&Uscr;":"\u{1D4B0}","&Utilde;":"\u0168","&Uuml":"\xDC","&Uuml;":"\xDC","&VDash;":"\u22AB","&Vbar;":"\u2AEB","&Vcy;":"\u0412","&Vdash;":"\u22A9","&Vdashl;":"\u2AE6","&Vee;":"\u22C1","&Verbar;":"\u2016","&Vert;":"\u2016","&VerticalBar;":"\u2223","&VerticalLine;":"|","&VerticalSeparator;":"\u2758","&VerticalTilde;":"\u2240","&VeryThinSpace;":"\u200A","&Vfr;":"\u{1D519}","&Vopf;":"\u{1D54D}","&Vscr;":"\u{1D4B1}","&Vvdash;":"\u22AA","&Wcirc;":"\u0174","&Wedge;":"\u22C0","&Wfr;":"\u{1D51A}","&Wopf;":"\u{1D54E}","&Wscr;":"\u{1D4B2}","&Xfr;":"\u{1D51B}","&Xi;":"\u039E","&Xopf;":"\u{1D54F}","&Xscr;":"\u{1D4B3}","&YAcy;":"\u042F","&YIcy;":"\u0407","&YUcy;":"\u042E","&Yacute":"\xDD","&Yacute;":"\xDD","&Ycirc;":"\u0176","&Ycy;":"\u042B","&Yfr;":"\u{1D51C}","&Yopf;":"\u{1D550}","&Yscr;":"\u{1D4B4}","&Yuml;":"\u0178","&ZHcy;":"\u0416","&Zacute;":"\u0179","&Zcaron;":"\u017D","&Zcy;":"\u0417","&Zdot;":"\u017B","&ZeroWidthSpace;":"\u200B","&Zeta;":"\u0396","&Zfr;":"\u2128","&Zopf;":"\u2124","&Zscr;":"\u{1D4B5}","&aacute":"\xE1","&aacute;":"\xE1","&abreve;":"\u0103","&ac;":"\u223E","&acE;":"\u223E\u0333","&acd;":"\u223F","&acirc":"\xE2","&acirc;":"\xE2","&acute":"\xB4","&acute;":"\xB4","&acy;":"\u0430","&aelig":"\xE6","&aelig;":"\xE6","&af;":"\u2061","&afr;":"\u{1D51E}","&agrave":"\xE0","&agrave;":"\xE0","&alefsym;":"\u2135","&aleph;":"\u2135","&alpha;":"\u03B1","&amacr;":"\u0101","&amalg;":"\u2A3F","&amp":"&","&amp;":"&","&and;":"\u2227","&andand;":"\u2A55","&andd;":"\u2A5C","&andslope;":"\u2A58","&andv;":"\u2A5A","&ang;":"\u2220","&ange;":"\u29A4","&angle;":"\u2220","&angmsd;":"\u2221","&angmsdaa;":"\u29A8","&angmsdab;":"\u29A9","&angmsdac;":"\u29AA","&angmsdad;":"\u29AB","&angmsdae;":"\u29AC","&angmsdaf;":"\u29AD","&angmsdag;":"\u29AE","&angmsdah;":"\u29AF","&angrt;":"\u221F","&angrtvb;":"\u22BE","&angrtvbd;":"\u299D","&angsph;":"\u2222","&angst;":"\xC5","&angzarr;":"\u237C","&aogon;":"\u0105","&aopf;":"\u{1D552}","&ap;":"\u2248","&apE;":"\u2A70","&apacir;":"\u2A6F","&ape;":"\u224A","&apid;":"\u224B","&apos;":"'","&approx;":"\u2248","&approxeq;":"\u224A","&aring":"\xE5","&aring;":"\xE5","&ascr;":"\u{1D4B6}","&ast;":"*","&asymp;":"\u2248","&asympeq;":"\u224D","&atilde":"\xE3","&atilde;":"\xE3","&auml":"\xE4","&auml;":"\xE4","&awconint;":"\u2233","&awint;":"\u2A11","&bNot;":"\u2AED","&backcong;":"\u224C","&backepsilon;":"\u03F6","&backprime;":"\u2035","&backsim;":"\u223D","&backsimeq;":"\u22CD","&barvee;":"\u22BD","&barwed;":"\u2305","&barwedge;":"\u2305","&bbrk;":"\u23B5","&bbrktbrk;":"\u23B6","&bcong;":"\u224C","&bcy;":"\u0431","&bdquo;":"\u201E","&becaus;":"\u2235","&because;":"\u2235","&bemptyv;":"\u29B0","&bepsi;":"\u03F6","&bernou;":"\u212C","&beta;":"\u03B2","&beth;":"\u2136","&between;":"\u226C","&bfr;":"\u{1D51F}","&bigcap;":"\u22C2","&bigcirc;":"\u25EF","&bigcup;":"\u22C3","&bigodot;":"\u2A00","&bigoplus;":"\u2A01","&bigotimes;":"\u2A02","&bigsqcup;":"\u2A06","&bigstar;":"\u2605","&bigtriangledown;":"\u25BD","&bigtriangleup;":"\u25B3","&biguplus;":"\u2A04","&bigvee;":"\u22C1","&bigwedge;":"\u22C0","&bkarow;":"\u290D","&blacklozenge;":"\u29EB","&blacksquare;":"\u25AA","&blacktriangle;":"\u25B4","&blacktriangledown;":"\u25BE","&blacktriangleleft;":"\u25C2","&blacktriangleright;":"\u25B8","&blank;":"\u2423","&blk12;":"\u2592","&blk14;":"\u2591","&blk34;":"\u2593","&block;":"\u2588","&bne;":"=\u20E5","&bnequiv;":"\u2261\u20E5","&bnot;":"\u2310","&bopf;":"\u{1D553}","&bot;":"\u22A5","&bottom;":"\u22A5","&bowtie;":"\u22C8","&boxDL;":"\u2557","&boxDR;":"\u2554","&boxDl;":"\u2556","&boxDr;":"\u2553","&boxH;":"\u2550","&boxHD;":"\u2566","&boxHU;":"\u2569","&boxHd;":"\u2564","&boxHu;":"\u2567","&boxUL;":"\u255D","&boxUR;":"\u255A","&boxUl;":"\u255C","&boxUr;":"\u2559","&boxV;":"\u2551","&boxVH;":"\u256C","&boxVL;":"\u2563","&boxVR;":"\u2560","&boxVh;":"\u256B","&boxVl;":"\u2562","&boxVr;":"\u255F","&boxbox;":"\u29C9","&boxdL;":"\u2555","&boxdR;":"\u2552","&boxdl;":"\u2510","&boxdr;":"\u250C","&boxh;":"\u2500","&boxhD;":"\u2565","&boxhU;":"\u2568","&boxhd;":"\u252C","&boxhu;":"\u2534","&boxminus;":"\u229F","&boxplus;":"\u229E","&boxtimes;":"\u22A0","&boxuL;":"\u255B","&boxuR;":"\u2558","&boxul;":"\u2518","&boxur;":"\u2514","&boxv;":"\u2502","&boxvH;":"\u256A","&boxvL;":"\u2561","&boxvR;":"\u255E","&boxvh;":"\u253C","&boxvl;":"\u2524","&boxvr;":"\u251C","&bprime;":"\u2035","&breve;":"\u02D8","&brvbar":"\xA6","&brvbar;":"\xA6","&bscr;":"\u{1D4B7}","&bsemi;":"\u204F","&bsim;":"\u223D","&bsime;":"\u22CD","&bsol;":"\\","&bsolb;":"\u29C5","&bsolhsub;":"\u27C8","&bull;":"\u2022","&bullet;":"\u2022","&bump;":"\u224E","&bumpE;":"\u2AAE","&bumpe;":"\u224F","&bumpeq;":"\u224F","&cacute;":"\u0107","&cap;":"\u2229","&capand;":"\u2A44","&capbrcup;":"\u2A49","&capcap;":"\u2A4B","&capcup;":"\u2A47","&capdot;":"\u2A40","&caps;":"\u2229\uFE00","&caret;":"\u2041","&caron;":"\u02C7","&ccaps;":"\u2A4D","&ccaron;":"\u010D","&ccedil":"\xE7","&ccedil;":"\xE7","&ccirc;":"\u0109","&ccups;":"\u2A4C","&ccupssm;":"\u2A50","&cdot;":"\u010B","&cedil":"\xB8","&cedil;":"\xB8","&cemptyv;":"\u29B2","&cent":"\xA2","&cent;":"\xA2","&centerdot;":"\xB7","&cfr;":"\u{1D520}","&chcy;":"\u0447","&check;":"\u2713","&checkmark;":"\u2713","&chi;":"\u03C7","&cir;":"\u25CB","&cirE;":"\u29C3","&circ;":"\u02C6","&circeq;":"\u2257","&circlearrowleft;":"\u21BA","&circlearrowright;":"\u21BB","&circledR;":"\xAE","&circledS;":"\u24C8","&circledast;":"\u229B","&circledcirc;":"\u229A","&circleddash;":"\u229D","&cire;":"\u2257","&cirfnint;":"\u2A10","&cirmid;":"\u2AEF","&cirscir;":"\u29C2","&clubs;":"\u2663","&clubsuit;":"\u2663","&colon;":":","&colone;":"\u2254","&coloneq;":"\u2254","&comma;":",","&commat;":"@","&comp;":"\u2201","&compfn;":"\u2218","&complement;":"\u2201","&complexes;":"\u2102","&cong;":"\u2245","&congdot;":"\u2A6D","&conint;":"\u222E","&copf;":"\u{1D554}","&coprod;":"\u2210","&copy":"\xA9","&copy;":"\xA9","&copysr;":"\u2117","&crarr;":"\u21B5","&cross;":"\u2717","&cscr;":"\u{1D4B8}","&csub;":"\u2ACF","&csube;":"\u2AD1","&csup;":"\u2AD0","&csupe;":"\u2AD2","&ctdot;":"\u22EF","&cudarrl;":"\u2938","&cudarrr;":"\u2935","&cuepr;":"\u22DE","&cuesc;":"\u22DF","&cularr;":"\u21B6","&cularrp;":"\u293D","&cup;":"\u222A","&cupbrcap;":"\u2A48","&cupcap;":"\u2A46","&cupcup;":"\u2A4A","&cupdot;":"\u228D","&cupor;":"\u2A45","&cups;":"\u222A\uFE00","&curarr;":"\u21B7","&curarrm;":"\u293C","&curlyeqprec;":"\u22DE","&curlyeqsucc;":"\u22DF","&curlyvee;":"\u22CE","&curlywedge;":"\u22CF","&curren":"\xA4","&curren;":"\xA4","&curvearrowleft;":"\u21B6","&curvearrowright;":"\u21B7","&cuvee;":"\u22CE","&cuwed;":"\u22CF","&cwconint;":"\u2232","&cwint;":"\u2231","&cylcty;":"\u232D","&dArr;":"\u21D3","&dHar;":"\u2965","&dagger;":"\u2020","&daleth;":"\u2138","&darr;":"\u2193","&dash;":"\u2010","&dashv;":"\u22A3","&dbkarow;":"\u290F","&dblac;":"\u02DD","&dcaron;":"\u010F","&dcy;":"\u0434","&dd;":"\u2146","&ddagger;":"\u2021","&ddarr;":"\u21CA","&ddotseq;":"\u2A77","&deg":"\xB0","&deg;":"\xB0","&delta;":"\u03B4","&demptyv;":"\u29B1","&dfisht;":"\u297F","&dfr;":"\u{1D521}","&dharl;":"\u21C3","&dharr;":"\u21C2","&diam;":"\u22C4","&diamond;":"\u22C4","&diamondsuit;":"\u2666","&diams;":"\u2666","&die;":"\xA8","&digamma;":"\u03DD","&disin;":"\u22F2","&div;":"\xF7","&divide":"\xF7","&divide;":"\xF7","&divideontimes;":"\u22C7","&divonx;":"\u22C7","&djcy;":"\u0452","&dlcorn;":"\u231E","&dlcrop;":"\u230D","&dollar;":"$","&dopf;":"\u{1D555}","&dot;":"\u02D9","&doteq;":"\u2250","&doteqdot;":"\u2251","&dotminus;":"\u2238","&dotplus;":"\u2214","&dotsquare;":"\u22A1","&doublebarwedge;":"\u2306","&downarrow;":"\u2193","&downdownarrows;":"\u21CA","&downharpoonleft;":"\u21C3","&downharpoonright;":"\u21C2","&drbkarow;":"\u2910","&drcorn;":"\u231F","&drcrop;":"\u230C","&dscr;":"\u{1D4B9}","&dscy;":"\u0455","&dsol;":"\u29F6","&dstrok;":"\u0111","&dtdot;":"\u22F1","&dtri;":"\u25BF","&dtrif;":"\u25BE","&duarr;":"\u21F5","&duhar;":"\u296F","&dwangle;":"\u29A6","&dzcy;":"\u045F","&dzigrarr;":"\u27FF","&eDDot;":"\u2A77","&eDot;":"\u2251","&eacute":"\xE9","&eacute;":"\xE9","&easter;":"\u2A6E","&ecaron;":"\u011B","&ecir;":"\u2256","&ecirc":"\xEA","&ecirc;":"\xEA","&ecolon;":"\u2255","&ecy;":"\u044D","&edot;":"\u0117","&ee;":"\u2147","&efDot;":"\u2252","&efr;":"\u{1D522}","&eg;":"\u2A9A","&egrave":"\xE8","&egrave;":"\xE8","&egs;":"\u2A96","&egsdot;":"\u2A98","&el;":"\u2A99","&elinters;":"\u23E7","&ell;":"\u2113","&els;":"\u2A95","&elsdot;":"\u2A97","&emacr;":"\u0113","&empty;":"\u2205","&emptyset;":"\u2205","&emptyv;":"\u2205","&emsp13;":"\u2004","&emsp14;":"\u2005","&emsp;":"\u2003","&eng;":"\u014B","&ensp;":"\u2002","&eogon;":"\u0119","&eopf;":"\u{1D556}","&epar;":"\u22D5","&eparsl;":"\u29E3","&eplus;":"\u2A71","&epsi;":"\u03B5","&epsilon;":"\u03B5","&epsiv;":"\u03F5","&eqcirc;":"\u2256","&eqcolon;":"\u2255","&eqsim;":"\u2242","&eqslantgtr;":"\u2A96","&eqslantless;":"\u2A95","&equals;":"=","&equest;":"\u225F","&equiv;":"\u2261","&equivDD;":"\u2A78","&eqvparsl;":"\u29E5","&erDot;":"\u2253","&erarr;":"\u2971","&escr;":"\u212F","&esdot;":"\u2250","&esim;":"\u2242","&eta;":"\u03B7","&eth":"\xF0","&eth;":"\xF0","&euml":"\xEB","&euml;":"\xEB","&euro;":"\u20AC","&excl;":"!","&exist;":"\u2203","&expectation;":"\u2130","&exponentiale;":"\u2147","&fallingdotseq;":"\u2252","&fcy;":"\u0444","&female;":"\u2640","&ffilig;":"\uFB03","&fflig;":"\uFB00","&ffllig;":"\uFB04","&ffr;":"\u{1D523}","&filig;":"\uFB01","&fjlig;":"fj","&flat;":"\u266D","&fllig;":"\uFB02","&fltns;":"\u25B1","&fnof;":"\u0192","&fopf;":"\u{1D557}","&forall;":"\u2200","&fork;":"\u22D4","&forkv;":"\u2AD9","&fpartint;":"\u2A0D","&frac12":"\xBD","&frac12;":"\xBD","&frac13;":"\u2153","&frac14":"\xBC","&frac14;":"\xBC","&frac15;":"\u2155","&frac16;":"\u2159","&frac18;":"\u215B","&frac23;":"\u2154","&frac25;":"\u2156","&frac34":"\xBE","&frac34;":"\xBE","&frac35;":"\u2157","&frac38;":"\u215C","&frac45;":"\u2158","&frac56;":"\u215A","&frac58;":"\u215D","&frac78;":"\u215E","&frasl;":"\u2044","&frown;":"\u2322","&fscr;":"\u{1D4BB}","&gE;":"\u2267","&gEl;":"\u2A8C","&gacute;":"\u01F5","&gamma;":"\u03B3","&gammad;":"\u03DD","&gap;":"\u2A86","&gbreve;":"\u011F","&gcirc;":"\u011D","&gcy;":"\u0433","&gdot;":"\u0121","&ge;":"\u2265","&gel;":"\u22DB","&geq;":"\u2265","&geqq;":"\u2267","&geqslant;":"\u2A7E","&ges;":"\u2A7E","&gescc;":"\u2AA9","&gesdot;":"\u2A80","&gesdoto;":"\u2A82","&gesdotol;":"\u2A84","&gesl;":"\u22DB\uFE00","&gesles;":"\u2A94","&gfr;":"\u{1D524}","&gg;":"\u226B","&ggg;":"\u22D9","&gimel;":"\u2137","&gjcy;":"\u0453","&gl;":"\u2277","&glE;":"\u2A92","&gla;":"\u2AA5","&glj;":"\u2AA4","&gnE;":"\u2269","&gnap;":"\u2A8A","&gnapprox;":"\u2A8A","&gne;":"\u2A88","&gneq;":"\u2A88","&gneqq;":"\u2269","&gnsim;":"\u22E7","&gopf;":"\u{1D558}","&grave;":"`","&gscr;":"\u210A","&gsim;":"\u2273","&gsime;":"\u2A8E","&gsiml;":"\u2A90","&gt":">","&gt;":">","&gtcc;":"\u2AA7","&gtcir;":"\u2A7A","&gtdot;":"\u22D7","&gtlPar;":"\u2995","&gtquest;":"\u2A7C","&gtrapprox;":"\u2A86","&gtrarr;":"\u2978","&gtrdot;":"\u22D7","&gtreqless;":"\u22DB","&gtreqqless;":"\u2A8C","&gtrless;":"\u2277","&gtrsim;":"\u2273","&gvertneqq;":"\u2269\uFE00","&gvnE;":"\u2269\uFE00","&hArr;":"\u21D4","&hairsp;":"\u200A","&half;":"\xBD","&hamilt;":"\u210B","&hardcy;":"\u044A","&harr;":"\u2194","&harrcir;":"\u2948","&harrw;":"\u21AD","&hbar;":"\u210F","&hcirc;":"\u0125","&hearts;":"\u2665","&heartsuit;":"\u2665","&hellip;":"\u2026","&hercon;":"\u22B9","&hfr;":"\u{1D525}","&hksearow;":"\u2925","&hkswarow;":"\u2926","&hoarr;":"\u21FF","&homtht;":"\u223B","&hookleftarrow;":"\u21A9","&hookrightarrow;":"\u21AA","&hopf;":"\u{1D559}","&horbar;":"\u2015","&hscr;":"\u{1D4BD}","&hslash;":"\u210F","&hstrok;":"\u0127","&hybull;":"\u2043","&hyphen;":"\u2010","&iacute":"\xED","&iacute;":"\xED","&ic;":"\u2063","&icirc":"\xEE","&icirc;":"\xEE","&icy;":"\u0438","&iecy;":"\u0435","&iexcl":"\xA1","&iexcl;":"\xA1","&iff;":"\u21D4","&ifr;":"\u{1D526}","&igrave":"\xEC","&igrave;":"\xEC","&ii;":"\u2148","&iiiint;":"\u2A0C","&iiint;":"\u222D","&iinfin;":"\u29DC","&iiota;":"\u2129","&ijlig;":"\u0133","&imacr;":"\u012B","&image;":"\u2111","&imagline;":"\u2110","&imagpart;":"\u2111","&imath;":"\u0131","&imof;":"\u22B7","&imped;":"\u01B5","&in;":"\u2208","&incare;":"\u2105","&infin;":"\u221E","&infintie;":"\u29DD","&inodot;":"\u0131","&int;":"\u222B","&intcal;":"\u22BA","&integers;":"\u2124","&intercal;":"\u22BA","&intlarhk;":"\u2A17","&intprod;":"\u2A3C","&iocy;":"\u0451","&iogon;":"\u012F","&iopf;":"\u{1D55A}","&iota;":"\u03B9","&iprod;":"\u2A3C","&iquest":"\xBF","&iquest;":"\xBF","&iscr;":"\u{1D4BE}","&isin;":"\u2208","&isinE;":"\u22F9","&isindot;":"\u22F5","&isins;":"\u22F4","&isinsv;":"\u22F3","&isinv;":"\u2208","&it;":"\u2062","&itilde;":"\u0129","&iukcy;":"\u0456","&iuml":"\xEF","&iuml;":"\xEF","&jcirc;":"\u0135","&jcy;":"\u0439","&jfr;":"\u{1D527}","&jmath;":"\u0237","&jopf;":"\u{1D55B}","&jscr;":"\u{1D4BF}","&jsercy;":"\u0458","&jukcy;":"\u0454","&kappa;":"\u03BA","&kappav;":"\u03F0","&kcedil;":"\u0137","&kcy;":"\u043A","&kfr;":"\u{1D528}","&kgreen;":"\u0138","&khcy;":"\u0445","&kjcy;":"\u045C","&kopf;":"\u{1D55C}","&kscr;":"\u{1D4C0}","&lAarr;":"\u21DA","&lArr;":"\u21D0","&lAtail;":"\u291B","&lBarr;":"\u290E","&lE;":"\u2266","&lEg;":"\u2A8B","&lHar;":"\u2962","&lacute;":"\u013A","&laemptyv;":"\u29B4","&lagran;":"\u2112","&lambda;":"\u03BB","&lang;":"\u27E8","&langd;":"\u2991","&langle;":"\u27E8","&lap;":"\u2A85","&laquo":"\xAB","&laquo;":"\xAB","&larr;":"\u2190","&larrb;":"\u21E4","&larrbfs;":"\u291F","&larrfs;":"\u291D","&larrhk;":"\u21A9","&larrlp;":"\u21AB","&larrpl;":"\u2939","&larrsim;":"\u2973","&larrtl;":"\u21A2","&lat;":"\u2AAB","&latail;":"\u2919","&late;":"\u2AAD","&lates;":"\u2AAD\uFE00","&lbarr;":"\u290C","&lbbrk;":"\u2772","&lbrace;":"{","&lbrack;":"[","&lbrke;":"\u298B","&lbrksld;":"\u298F","&lbrkslu;":"\u298D","&lcaron;":"\u013E","&lcedil;":"\u013C","&lceil;":"\u2308","&lcub;":"{","&lcy;":"\u043B","&ldca;":"\u2936","&ldquo;":"\u201C","&ldquor;":"\u201E","&ldrdhar;":"\u2967","&ldrushar;":"\u294B","&ldsh;":"\u21B2","&le;":"\u2264","&leftarrow;":"\u2190","&leftarrowtail;":"\u21A2","&leftharpoondown;":"\u21BD","&leftharpoonup;":"\u21BC","&leftleftarrows;":"\u21C7","&leftrightarrow;":"\u2194","&leftrightarrows;":"\u21C6","&leftrightharpoons;":"\u21CB","&leftrightsquigarrow;":"\u21AD","&leftthreetimes;":"\u22CB","&leg;":"\u22DA","&leq;":"\u2264","&leqq;":"\u2266","&leqslant;":"\u2A7D","&les;":"\u2A7D","&lescc;":"\u2AA8","&lesdot;":"\u2A7F","&lesdoto;":"\u2A81","&lesdotor;":"\u2A83","&lesg;":"\u22DA\uFE00","&lesges;":"\u2A93","&lessapprox;":"\u2A85","&lessdot;":"\u22D6","&lesseqgtr;":"\u22DA","&lesseqqgtr;":"\u2A8B","&lessgtr;":"\u2276","&lesssim;":"\u2272","&lfisht;":"\u297C","&lfloor;":"\u230A","&lfr;":"\u{1D529}","&lg;":"\u2276","&lgE;":"\u2A91","&lhard;":"\u21BD","&lharu;":"\u21BC","&lharul;":"\u296A","&lhblk;":"\u2584","&ljcy;":"\u0459","&ll;":"\u226A","&llarr;":"\u21C7","&llcorner;":"\u231E","&llhard;":"\u296B","&lltri;":"\u25FA","&lmidot;":"\u0140","&lmoust;":"\u23B0","&lmoustache;":"\u23B0","&lnE;":"\u2268","&lnap;":"\u2A89","&lnapprox;":"\u2A89","&lne;":"\u2A87","&lneq;":"\u2A87","&lneqq;":"\u2268","&lnsim;":"\u22E6","&loang;":"\u27EC","&loarr;":"\u21FD","&lobrk;":"\u27E6","&longleftarrow;":"\u27F5","&longleftrightarrow;":"\u27F7","&longmapsto;":"\u27FC","&longrightarrow;":"\u27F6","&looparrowleft;":"\u21AB","&looparrowright;":"\u21AC","&lopar;":"\u2985","&lopf;":"\u{1D55D}","&loplus;":"\u2A2D","&lotimes;":"\u2A34","&lowast;":"\u2217","&lowbar;":"_","&loz;":"\u25CA","&lozenge;":"\u25CA","&lozf;":"\u29EB","&lpar;":"(","&lparlt;":"\u2993","&lrarr;":"\u21C6","&lrcorner;":"\u231F","&lrhar;":"\u21CB","&lrhard;":"\u296D","&lrm;":"\u200E","&lrtri;":"\u22BF","&lsaquo;":"\u2039","&lscr;":"\u{1D4C1}","&lsh;":"\u21B0","&lsim;":"\u2272","&lsime;":"\u2A8D","&lsimg;":"\u2A8F","&lsqb;":"[","&lsquo;":"\u2018","&lsquor;":"\u201A","&lstrok;":"\u0142","&lt":"<","&lt;":"<","&ltcc;":"\u2AA6","&ltcir;":"\u2A79","&ltdot;":"\u22D6","&lthree;":"\u22CB","&ltimes;":"\u22C9","&ltlarr;":"\u2976","&ltquest;":"\u2A7B","&ltrPar;":"\u2996","&ltri;":"\u25C3","&ltrie;":"\u22B4","&ltrif;":"\u25C2","&lurdshar;":"\u294A","&luruhar;":"\u2966","&lvertneqq;":"\u2268\uFE00","&lvnE;":"\u2268\uFE00","&mDDot;":"\u223A","&macr":"\xAF","&macr;":"\xAF","&male;":"\u2642","&malt;":"\u2720","&maltese;":"\u2720","&map;":"\u21A6","&mapsto;":"\u21A6","&mapstodown;":"\u21A7","&mapstoleft;":"\u21A4","&mapstoup;":"\u21A5","&marker;":"\u25AE","&mcomma;":"\u2A29","&mcy;":"\u043C","&mdash;":"\u2014","&measuredangle;":"\u2221","&mfr;":"\u{1D52A}","&mho;":"\u2127","&micro":"\xB5","&micro;":"\xB5","&mid;":"\u2223","&midast;":"*","&midcir;":"\u2AF0","&middot":"\xB7","&middot;":"\xB7","&minus;":"\u2212","&minusb;":"\u229F","&minusd;":"\u2238","&minusdu;":"\u2A2A","&mlcp;":"\u2ADB","&mldr;":"\u2026","&mnplus;":"\u2213","&models;":"\u22A7","&mopf;":"\u{1D55E}","&mp;":"\u2213","&mscr;":"\u{1D4C2}","&mstpos;":"\u223E","&mu;":"\u03BC","&multimap;":"\u22B8","&mumap;":"\u22B8","&nGg;":"\u22D9\u0338","&nGt;":"\u226B\u20D2","&nGtv;":"\u226B\u0338","&nLeftarrow;":"\u21CD","&nLeftrightarrow;":"\u21CE","&nLl;":"\u22D8\u0338","&nLt;":"\u226A\u20D2","&nLtv;":"\u226A\u0338","&nRightarrow;":"\u21CF","&nVDash;":"\u22AF","&nVdash;":"\u22AE","&nabla;":"\u2207","&nacute;":"\u0144","&nang;":"\u2220\u20D2","&nap;":"\u2249","&napE;":"\u2A70\u0338","&napid;":"\u224B\u0338","&napos;":"\u0149","&napprox;":"\u2249","&natur;":"\u266E","&natural;":"\u266E","&naturals;":"\u2115","&nbsp":"\xA0","&nbsp;":"\xA0","&nbump;":"\u224E\u0338","&nbumpe;":"\u224F\u0338","&ncap;":"\u2A43","&ncaron;":"\u0148","&ncedil;":"\u0146","&ncong;":"\u2247","&ncongdot;":"\u2A6D\u0338","&ncup;":"\u2A42","&ncy;":"\u043D","&ndash;":"\u2013","&ne;":"\u2260","&neArr;":"\u21D7","&nearhk;":"\u2924","&nearr;":"\u2197","&nearrow;":"\u2197","&nedot;":"\u2250\u0338","&nequiv;":"\u2262","&nesear;":"\u2928","&nesim;":"\u2242\u0338","&nexist;":"\u2204","&nexists;":"\u2204","&nfr;":"\u{1D52B}","&ngE;":"\u2267\u0338","&nge;":"\u2271","&ngeq;":"\u2271","&ngeqq;":"\u2267\u0338","&ngeqslant;":"\u2A7E\u0338","&nges;":"\u2A7E\u0338","&ngsim;":"\u2275","&ngt;":"\u226F","&ngtr;":"\u226F","&nhArr;":"\u21CE","&nharr;":"\u21AE","&nhpar;":"\u2AF2","&ni;":"\u220B","&nis;":"\u22FC","&nisd;":"\u22FA","&niv;":"\u220B","&njcy;":"\u045A","&nlArr;":"\u21CD","&nlE;":"\u2266\u0338","&nlarr;":"\u219A","&nldr;":"\u2025","&nle;":"\u2270","&nleftarrow;":"\u219A","&nleftrightarrow;":"\u21AE","&nleq;":"\u2270","&nleqq;":"\u2266\u0338","&nleqslant;":"\u2A7D\u0338","&nles;":"\u2A7D\u0338","&nless;":"\u226E","&nlsim;":"\u2274","&nlt;":"\u226E","&nltri;":"\u22EA","&nltrie;":"\u22EC","&nmid;":"\u2224","&nopf;":"\u{1D55F}","&not":"\xAC","&not;":"\xAC","&notin;":"\u2209","&notinE;":"\u22F9\u0338","&notindot;":"\u22F5\u0338","&notinva;":"\u2209","&notinvb;":"\u22F7","&notinvc;":"\u22F6","&notni;":"\u220C","&notniva;":"\u220C","&notnivb;":"\u22FE","&notnivc;":"\u22FD","&npar;":"\u2226","&nparallel;":"\u2226","&nparsl;":"\u2AFD\u20E5","&npart;":"\u2202\u0338","&npolint;":"\u2A14","&npr;":"\u2280","&nprcue;":"\u22E0","&npre;":"\u2AAF\u0338","&nprec;":"\u2280","&npreceq;":"\u2AAF\u0338","&nrArr;":"\u21CF","&nrarr;":"\u219B","&nrarrc;":"\u2933\u0338","&nrarrw;":"\u219D\u0338","&nrightarrow;":"\u219B","&nrtri;":"\u22EB","&nrtrie;":"\u22ED","&nsc;":"\u2281","&nsccue;":"\u22E1","&nsce;":"\u2AB0\u0338","&nscr;":"\u{1D4C3}","&nshortmid;":"\u2224","&nshortparallel;":"\u2226","&nsim;":"\u2241","&nsime;":"\u2244","&nsimeq;":"\u2244","&nsmid;":"\u2224","&nspar;":"\u2226","&nsqsube;":"\u22E2","&nsqsupe;":"\u22E3","&nsub;":"\u2284","&nsubE;":"\u2AC5\u0338","&nsube;":"\u2288","&nsubset;":"\u2282\u20D2","&nsubseteq;":"\u2288","&nsubseteqq;":"\u2AC5\u0338","&nsucc;":"\u2281","&nsucceq;":"\u2AB0\u0338","&nsup;":"\u2285","&nsupE;":"\u2AC6\u0338","&nsupe;":"\u2289","&nsupset;":"\u2283\u20D2","&nsupseteq;":"\u2289","&nsupseteqq;":"\u2AC6\u0338","&ntgl;":"\u2279","&ntilde":"\xF1","&ntilde;":"\xF1","&ntlg;":"\u2278","&ntriangleleft;":"\u22EA","&ntrianglelefteq;":"\u22EC","&ntriangleright;":"\u22EB","&ntrianglerighteq;":"\u22ED","&nu;":"\u03BD","&num;":"#","&numero;":"\u2116","&numsp;":"\u2007","&nvDash;":"\u22AD","&nvHarr;":"\u2904","&nvap;":"\u224D\u20D2","&nvdash;":"\u22AC","&nvge;":"\u2265\u20D2","&nvgt;":">\u20D2","&nvinfin;":"\u29DE","&nvlArr;":"\u2902","&nvle;":"\u2264\u20D2","&nvlt;":"<\u20D2","&nvltrie;":"\u22B4\u20D2","&nvrArr;":"\u2903","&nvrtrie;":"\u22B5\u20D2","&nvsim;":"\u223C\u20D2","&nwArr;":"\u21D6","&nwarhk;":"\u2923","&nwarr;":"\u2196","&nwarrow;":"\u2196","&nwnear;":"\u2927","&oS;":"\u24C8","&oacute":"\xF3","&oacute;":"\xF3","&oast;":"\u229B","&ocir;":"\u229A","&ocirc":"\xF4","&ocirc;":"\xF4","&ocy;":"\u043E","&odash;":"\u229D","&odblac;":"\u0151","&odiv;":"\u2A38","&odot;":"\u2299","&odsold;":"\u29BC","&oelig;":"\u0153","&ofcir;":"\u29BF","&ofr;":"\u{1D52C}","&ogon;":"\u02DB","&ograve":"\xF2","&ograve;":"\xF2","&ogt;":"\u29C1","&ohbar;":"\u29B5","&ohm;":"\u03A9","&oint;":"\u222E","&olarr;":"\u21BA","&olcir;":"\u29BE","&olcross;":"\u29BB","&oline;":"\u203E","&olt;":"\u29C0","&omacr;":"\u014D","&omega;":"\u03C9","&omicron;":"\u03BF","&omid;":"\u29B6","&ominus;":"\u2296","&oopf;":"\u{1D560}","&opar;":"\u29B7","&operp;":"\u29B9","&oplus;":"\u2295","&or;":"\u2228","&orarr;":"\u21BB","&ord;":"\u2A5D","&order;":"\u2134","&orderof;":"\u2134","&ordf":"\xAA","&ordf;":"\xAA","&ordm":"\xBA","&ordm;":"\xBA","&origof;":"\u22B6","&oror;":"\u2A56","&orslope;":"\u2A57","&orv;":"\u2A5B","&oscr;":"\u2134","&oslash":"\xF8","&oslash;":"\xF8","&osol;":"\u2298","&otilde":"\xF5","&otilde;":"\xF5","&otimes;":"\u2297","&otimesas;":"\u2A36","&ouml":"\xF6","&ouml;":"\xF6","&ovbar;":"\u233D","&par;":"\u2225","&para":"\xB6","&para;":"\xB6","&parallel;":"\u2225","&parsim;":"\u2AF3","&parsl;":"\u2AFD","&part;":"\u2202","&pcy;":"\u043F","&percnt;":"%","&period;":".","&permil;":"\u2030","&perp;":"\u22A5","&pertenk;":"\u2031","&pfr;":"\u{1D52D}","&phi;":"\u03C6","&phiv;":"\u03D5","&phmmat;":"\u2133","&phone;":"\u260E","&pi;":"\u03C0","&pitchfork;":"\u22D4","&piv;":"\u03D6","&planck;":"\u210F","&planckh;":"\u210E","&plankv;":"\u210F","&plus;":"+","&plusacir;":"\u2A23","&plusb;":"\u229E","&pluscir;":"\u2A22","&plusdo;":"\u2214","&plusdu;":"\u2A25","&pluse;":"\u2A72","&plusmn":"\xB1","&plusmn;":"\xB1","&plussim;":"\u2A26","&plustwo;":"\u2A27","&pm;":"\xB1","&pointint;":"\u2A15","&popf;":"\u{1D561}","&pound":"\xA3","&pound;":"\xA3","&pr;":"\u227A","&prE;":"\u2AB3","&prap;":"\u2AB7","&prcue;":"\u227C","&pre;":"\u2AAF","&prec;":"\u227A","&precapprox;":"\u2AB7","&preccurlyeq;":"\u227C","&preceq;":"\u2AAF","&precnapprox;":"\u2AB9","&precneqq;":"\u2AB5","&precnsim;":"\u22E8","&precsim;":"\u227E","&prime;":"\u2032","&primes;":"\u2119","&prnE;":"\u2AB5","&prnap;":"\u2AB9","&prnsim;":"\u22E8","&prod;":"\u220F","&profalar;":"\u232E","&profline;":"\u2312","&profsurf;":"\u2313","&prop;":"\u221D","&propto;":"\u221D","&prsim;":"\u227E","&prurel;":"\u22B0","&pscr;":"\u{1D4C5}","&psi;":"\u03C8","&puncsp;":"\u2008","&qfr;":"\u{1D52E}","&qint;":"\u2A0C","&qopf;":"\u{1D562}","&qprime;":"\u2057","&qscr;":"\u{1D4C6}","&quaternions;":"\u210D","&quatint;":"\u2A16","&quest;":"?","&questeq;":"\u225F","&quot":'"',"&quot;":'"',"&rAarr;":"\u21DB","&rArr;":"\u21D2","&rAtail;":"\u291C","&rBarr;":"\u290F","&rHar;":"\u2964","&race;":"\u223D\u0331","&racute;":"\u0155","&radic;":"\u221A","&raemptyv;":"\u29B3","&rang;":"\u27E9","&rangd;":"\u2992","&range;":"\u29A5","&rangle;":"\u27E9","&raquo":"\xBB","&raquo;":"\xBB","&rarr;":"\u2192","&rarrap;":"\u2975","&rarrb;":"\u21E5","&rarrbfs;":"\u2920","&rarrc;":"\u2933","&rarrfs;":"\u291E","&rarrhk;":"\u21AA","&rarrlp;":"\u21AC","&rarrpl;":"\u2945","&rarrsim;":"\u2974","&rarrtl;":"\u21A3","&rarrw;":"\u219D","&ratail;":"\u291A","&ratio;":"\u2236","&rationals;":"\u211A","&rbarr;":"\u290D","&rbbrk;":"\u2773","&rbrace;":"}","&rbrack;":"]","&rbrke;":"\u298C","&rbrksld;":"\u298E","&rbrkslu;":"\u2990","&rcaron;":"\u0159","&rcedil;":"\u0157","&rceil;":"\u2309","&rcub;":"}","&rcy;":"\u0440","&rdca;":"\u2937","&rdldhar;":"\u2969","&rdquo;":"\u201D","&rdquor;":"\u201D","&rdsh;":"\u21B3","&real;":"\u211C","&realine;":"\u211B","&realpart;":"\u211C","&reals;":"\u211D","&rect;":"\u25AD","&reg":"\xAE","&reg;":"\xAE","&rfisht;":"\u297D","&rfloor;":"\u230B","&rfr;":"\u{1D52F}","&rhard;":"\u21C1","&rharu;":"\u21C0","&rharul;":"\u296C","&rho;":"\u03C1","&rhov;":"\u03F1","&rightarrow;":"\u2192","&rightarrowtail;":"\u21A3","&rightharpoondown;":"\u21C1","&rightharpoonup;":"\u21C0","&rightleftarrows;":"\u21C4","&rightleftharpoons;":"\u21CC","&rightrightarrows;":"\u21C9","&rightsquigarrow;":"\u219D","&rightthreetimes;":"\u22CC","&ring;":"\u02DA","&risingdotseq;":"\u2253","&rlarr;":"\u21C4","&rlhar;":"\u21CC","&rlm;":"\u200F","&rmoust;":"\u23B1","&rmoustache;":"\u23B1","&rnmid;":"\u2AEE","&roang;":"\u27ED","&roarr;":"\u21FE","&robrk;":"\u27E7","&ropar;":"\u2986","&ropf;":"\u{1D563}","&roplus;":"\u2A2E","&rotimes;":"\u2A35","&rpar;":")","&rpargt;":"\u2994","&rppolint;":"\u2A12","&rrarr;":"\u21C9","&rsaquo;":"\u203A","&rscr;":"\u{1D4C7}","&rsh;":"\u21B1","&rsqb;":"]","&rsquo;":"\u2019","&rsquor;":"\u2019","&rthree;":"\u22CC","&rtimes;":"\u22CA","&rtri;":"\u25B9","&rtrie;":"\u22B5","&rtrif;":"\u25B8","&rtriltri;":"\u29CE","&ruluhar;":"\u2968","&rx;":"\u211E","&sacute;":"\u015B","&sbquo;":"\u201A","&sc;":"\u227B","&scE;":"\u2AB4","&scap;":"\u2AB8","&scaron;":"\u0161","&sccue;":"\u227D","&sce;":"\u2AB0","&scedil;":"\u015F","&scirc;":"\u015D","&scnE;":"\u2AB6","&scnap;":"\u2ABA","&scnsim;":"\u22E9","&scpolint;":"\u2A13","&scsim;":"\u227F","&scy;":"\u0441","&sdot;":"\u22C5","&sdotb;":"\u22A1","&sdote;":"\u2A66","&seArr;":"\u21D8","&searhk;":"\u2925","&searr;":"\u2198","&searrow;":"\u2198","&sect":"\xA7","&sect;":"\xA7","&semi;":";","&seswar;":"\u2929","&setminus;":"\u2216","&setmn;":"\u2216","&sext;":"\u2736","&sfr;":"\u{1D530}","&sfrown;":"\u2322","&sharp;":"\u266F","&shchcy;":"\u0449","&shcy;":"\u0448","&shortmid;":"\u2223","&shortparallel;":"\u2225","&shy":"\xAD","&shy;":"\xAD","&sigma;":"\u03C3","&sigmaf;":"\u03C2","&sigmav;":"\u03C2","&sim;":"\u223C","&simdot;":"\u2A6A","&sime;":"\u2243","&simeq;":"\u2243","&simg;":"\u2A9E","&simgE;":"\u2AA0","&siml;":"\u2A9D","&simlE;":"\u2A9F","&simne;":"\u2246","&simplus;":"\u2A24","&simrarr;":"\u2972","&slarr;":"\u2190","&smallsetminus;":"\u2216","&smashp;":"\u2A33","&smeparsl;":"\u29E4","&smid;":"\u2223","&smile;":"\u2323","&smt;":"\u2AAA","&smte;":"\u2AAC","&smtes;":"\u2AAC\uFE00","&softcy;":"\u044C","&sol;":"/","&solb;":"\u29C4","&solbar;":"\u233F","&sopf;":"\u{1D564}","&spades;":"\u2660","&spadesuit;":"\u2660","&spar;":"\u2225","&sqcap;":"\u2293","&sqcaps;":"\u2293\uFE00","&sqcup;":"\u2294","&sqcups;":"\u2294\uFE00","&sqsub;":"\u228F","&sqsube;":"\u2291","&sqsubset;":"\u228F","&sqsubseteq;":"\u2291","&sqsup;":"\u2290","&sqsupe;":"\u2292","&sqsupset;":"\u2290","&sqsupseteq;":"\u2292","&squ;":"\u25A1","&square;":"\u25A1","&squarf;":"\u25AA","&squf;":"\u25AA","&srarr;":"\u2192","&sscr;":"\u{1D4C8}","&ssetmn;":"\u2216","&ssmile;":"\u2323","&sstarf;":"\u22C6","&star;":"\u2606","&starf;":"\u2605","&straightepsilon;":"\u03F5","&straightphi;":"\u03D5","&strns;":"\xAF","&sub;":"\u2282","&subE;":"\u2AC5","&subdot;":"\u2ABD","&sube;":"\u2286","&subedot;":"\u2AC3","&submult;":"\u2AC1","&subnE;":"\u2ACB","&subne;":"\u228A","&subplus;":"\u2ABF","&subrarr;":"\u2979","&subset;":"\u2282","&subseteq;":"\u2286","&subseteqq;":"\u2AC5","&subsetneq;":"\u228A","&subsetneqq;":"\u2ACB","&subsim;":"\u2AC7","&subsub;":"\u2AD5","&subsup;":"\u2AD3","&succ;":"\u227B","&succapprox;":"\u2AB8","&succcurlyeq;":"\u227D","&succeq;":"\u2AB0","&succnapprox;":"\u2ABA","&succneqq;":"\u2AB6","&succnsim;":"\u22E9","&succsim;":"\u227F","&sum;":"\u2211","&sung;":"\u266A","&sup1":"\xB9","&sup1;":"\xB9","&sup2":"\xB2","&sup2;":"\xB2","&sup3":"\xB3","&sup3;":"\xB3","&sup;":"\u2283","&supE;":"\u2AC6","&supdot;":"\u2ABE","&supdsub;":"\u2AD8","&supe;":"\u2287","&supedot;":"\u2AC4","&suphsol;":"\u27C9","&suphsub;":"\u2AD7","&suplarr;":"\u297B","&supmult;":"\u2AC2","&supnE;":"\u2ACC","&supne;":"\u228B","&supplus;":"\u2AC0","&supset;":"\u2283","&supseteq;":"\u2287","&supseteqq;":"\u2AC6","&supsetneq;":"\u228B","&supsetneqq;":"\u2ACC","&supsim;":"\u2AC8","&supsub;":"\u2AD4","&supsup;":"\u2AD6","&swArr;":"\u21D9","&swarhk;":"\u2926","&swarr;":"\u2199","&swarrow;":"\u2199","&swnwar;":"\u292A","&szlig":"\xDF","&szlig;":"\xDF","&target;":"\u2316","&tau;":"\u03C4","&tbrk;":"\u23B4","&tcaron;":"\u0165","&tcedil;":"\u0163","&tcy;":"\u0442","&tdot;":"\u20DB","&telrec;":"\u2315","&tfr;":"\u{1D531}","&there4;":"\u2234","&therefore;":"\u2234","&theta;":"\u03B8","&thetasym;":"\u03D1","&thetav;":"\u03D1","&thickapprox;":"\u2248","&thicksim;":"\u223C","&thinsp;":"\u2009","&thkap;":"\u2248","&thksim;":"\u223C","&thorn":"\xFE","&thorn;":"\xFE","&tilde;":"\u02DC","&times":"\xD7","&times;":"\xD7","&timesb;":"\u22A0","&timesbar;":"\u2A31","&timesd;":"\u2A30","&tint;":"\u222D","&toea;":"\u2928","&top;":"\u22A4","&topbot;":"\u2336","&topcir;":"\u2AF1","&topf;":"\u{1D565}","&topfork;":"\u2ADA","&tosa;":"\u2929","&tprime;":"\u2034","&trade;":"\u2122","&triangle;":"\u25B5","&triangledown;":"\u25BF","&triangleleft;":"\u25C3","&trianglelefteq;":"\u22B4","&triangleq;":"\u225C","&triangleright;":"\u25B9","&trianglerighteq;":"\u22B5","&tridot;":"\u25EC","&trie;":"\u225C","&triminus;":"\u2A3A","&triplus;":"\u2A39","&trisb;":"\u29CD","&tritime;":"\u2A3B","&trpezium;":"\u23E2","&tscr;":"\u{1D4C9}","&tscy;":"\u0446","&tshcy;":"\u045B","&tstrok;":"\u0167","&twixt;":"\u226C","&twoheadleftarrow;":"\u219E","&twoheadrightarrow;":"\u21A0","&uArr;":"\u21D1","&uHar;":"\u2963","&uacute":"\xFA","&uacute;":"\xFA","&uarr;":"\u2191","&ubrcy;":"\u045E","&ubreve;":"\u016D","&ucirc":"\xFB","&ucirc;":"\xFB","&ucy;":"\u0443","&udarr;":"\u21C5","&udblac;":"\u0171","&udhar;":"\u296E","&ufisht;":"\u297E","&ufr;":"\u{1D532}","&ugrave":"\xF9","&ugrave;":"\xF9","&uharl;":"\u21BF","&uharr;":"\u21BE","&uhblk;":"\u2580","&ulcorn;":"\u231C","&ulcorner;":"\u231C","&ulcrop;":"\u230F","&ultri;":"\u25F8","&umacr;":"\u016B","&uml":"\xA8","&uml;":"\xA8","&uogon;":"\u0173","&uopf;":"\u{1D566}","&uparrow;":"\u2191","&updownarrow;":"\u2195","&upharpoonleft;":"\u21BF","&upharpoonright;":"\u21BE","&uplus;":"\u228E","&upsi;":"\u03C5","&upsih;":"\u03D2","&upsilon;":"\u03C5","&upuparrows;":"\u21C8","&urcorn;":"\u231D","&urcorner;":"\u231D","&urcrop;":"\u230E","&uring;":"\u016F","&urtri;":"\u25F9","&uscr;":"\u{1D4CA}","&utdot;":"\u22F0","&utilde;":"\u0169","&utri;":"\u25B5","&utrif;":"\u25B4","&uuarr;":"\u21C8","&uuml":"\xFC","&uuml;":"\xFC","&uwangle;":"\u29A7","&vArr;":"\u21D5","&vBar;":"\u2AE8","&vBarv;":"\u2AE9","&vDash;":"\u22A8","&vangrt;":"\u299C","&varepsilon;":"\u03F5","&varkappa;":"\u03F0","&varnothing;":"\u2205","&varphi;":"\u03D5","&varpi;":"\u03D6","&varpropto;":"\u221D","&varr;":"\u2195","&varrho;":"\u03F1","&varsigma;":"\u03C2","&varsubsetneq;":"\u228A\uFE00","&varsubsetneqq;":"\u2ACB\uFE00","&varsupsetneq;":"\u228B\uFE00","&varsupsetneqq;":"\u2ACC\uFE00","&vartheta;":"\u03D1","&vartriangleleft;":"\u22B2","&vartriangleright;":"\u22B3","&vcy;":"\u0432","&vdash;":"\u22A2","&vee;":"\u2228","&veebar;":"\u22BB","&veeeq;":"\u225A","&vellip;":"\u22EE","&verbar;":"|","&vert;":"|","&vfr;":"\u{1D533}","&vltri;":"\u22B2","&vnsub;":"\u2282\u20D2","&vnsup;":"\u2283\u20D2","&vopf;":"\u{1D567}","&vprop;":"\u221D","&vrtri;":"\u22B3","&vscr;":"\u{1D4CB}","&vsubnE;":"\u2ACB\uFE00","&vsubne;":"\u228A\uFE00","&vsupnE;":"\u2ACC\uFE00","&vsupne;":"\u228B\uFE00","&vzigzag;":"\u299A","&wcirc;":"\u0175","&wedbar;":"\u2A5F","&wedge;":"\u2227","&wedgeq;":"\u2259","&weierp;":"\u2118","&wfr;":"\u{1D534}","&wopf;":"\u{1D568}","&wp;":"\u2118","&wr;":"\u2240","&wreath;":"\u2240","&wscr;":"\u{1D4CC}","&xcap;":"\u22C2","&xcirc;":"\u25EF","&xcup;":"\u22C3","&xdtri;":"\u25BD","&xfr;":"\u{1D535}","&xhArr;":"\u27FA","&xharr;":"\u27F7","&xi;":"\u03BE","&xlArr;":"\u27F8","&xlarr;":"\u27F5","&xmap;":"\u27FC","&xnis;":"\u22FB","&xodot;":"\u2A00","&xopf;":"\u{1D569}","&xoplus;":"\u2A01","&xotime;":"\u2A02","&xrArr;":"\u27F9","&xrarr;":"\u27F6","&xscr;":"\u{1D4CD}","&xsqcup;":"\u2A06","&xuplus;":"\u2A04","&xutri;":"\u25B3","&xvee;":"\u22C1","&xwedge;":"\u22C0","&yacute":"\xFD","&yacute;":"\xFD","&yacy;":"\u044F","&ycirc;":"\u0177","&ycy;":"\u044B","&yen":"\xA5","&yen;":"\xA5","&yfr;":"\u{1D536}","&yicy;":"\u0457","&yopf;":"\u{1D56A}","&yscr;":"\u{1D4CE}","&yucy;":"\u044E","&yuml":"\xFF","&yuml;":"\xFF","&zacute;":"\u017A","&zcaron;":"\u017E","&zcy;":"\u0437","&zdot;":"\u017C","&zeetrf;":"\u2128","&zeta;":"\u03B6","&zfr;":"\u{1D537}","&zhcy;":"\u0436","&zigrarr;":"\u21DD","&zopf;":"\u{1D56B}","&zscr;":"\u{1D4CF}","&zwj;":"\u200D","&zwnj;":"\u200C"},characters:{\u00C6:"&AElig;","&":"&amp;",\u00C1:"&Aacute;",\u0102:"&Abreve;",\u00C2:"&Acirc;",\u0410:"&Acy;","\u{1D504}":"&Afr;",\u00C0:"&Agrave;",\u0391:"&Alpha;",\u0100:"&Amacr;","\u2A53":"&And;",\u0104:"&Aogon;","\u{1D538}":"&Aopf;","\u2061":"&af;",\u00C5:"&angst;","\u{1D49C}":"&Ascr;","\u2254":"&coloneq;",\u00C3:"&Atilde;",\u00C4:"&Auml;","\u2216":"&ssetmn;","\u2AE7":"&Barv;","\u2306":"&doublebarwedge;",\u0411:"&Bcy;","\u2235":"&because;",\u212C:"&bernou;",\u0392:"&Beta;","\u{1D505}":"&Bfr;","\u{1D539}":"&Bopf;","\u02D8":"&breve;","\u224E":"&bump;",\u0427:"&CHcy;","\xA9":"&copy;",\u0106:"&Cacute;","\u22D2":"&Cap;","\u2145":"&DD;",\u212D:"&Cfr;",\u010C:"&Ccaron;",\u00C7:"&Ccedil;",\u0108:"&Ccirc;","\u2230":"&Cconint;",\u010A:"&Cdot;","\xB8":"&cedil;","\xB7":"&middot;",\u03A7:"&Chi;","\u2299":"&odot;","\u2296":"&ominus;","\u2295":"&oplus;","\u2297":"&otimes;","\u2232":"&cwconint;","\u201D":"&rdquor;","\u2019":"&rsquor;","\u2237":"&Proportion;","\u2A74":"&Colone;","\u2261":"&equiv;","\u222F":"&DoubleContourIntegral;","\u222E":"&oint;",\u2102:"&complexes;","\u2210":"&coprod;","\u2233":"&awconint;","\u2A2F":"&Cross;","\u{1D49E}":"&Cscr;","\u22D3":"&Cup;","\u224D":"&asympeq;","\u2911":"&DDotrahd;",\u0402:"&DJcy;",\u0405:"&DScy;",\u040F:"&DZcy;","\u2021":"&ddagger;","\u21A1":"&Darr;","\u2AE4":"&DoubleLeftTee;",\u010E:"&Dcaron;",\u0414:"&Dcy;","\u2207":"&nabla;",\u0394:"&Delta;","\u{1D507}":"&Dfr;","\xB4":"&acute;","\u02D9":"&dot;","\u02DD":"&dblac;","`":"&grave;","\u02DC":"&tilde;","\u22C4":"&diamond;","\u2146":"&dd;","\u{1D53B}":"&Dopf;","\xA8":"&uml;","\u20DC":"&DotDot;","\u2250":"&esdot;","\u21D3":"&dArr;","\u21D0":"&lArr;","\u21D4":"&iff;","\u27F8":"&xlArr;","\u27FA":"&xhArr;","\u27F9":"&xrArr;","\u21D2":"&rArr;","\u22A8":"&vDash;","\u21D1":"&uArr;","\u21D5":"&vArr;","\u2225":"&spar;","\u2193":"&downarrow;","\u2913":"&DownArrowBar;","\u21F5":"&duarr;","\u0311":"&DownBreve;","\u2950":"&DownLeftRightVector;","\u295E":"&DownLeftTeeVector;","\u21BD":"&lhard;","\u2956":"&DownLeftVectorBar;","\u295F":"&DownRightTeeVector;","\u21C1":"&rightharpoondown;","\u2957":"&DownRightVectorBar;","\u22A4":"&top;","\u21A7":"&mapstodown;","\u{1D49F}":"&Dscr;",\u0110:"&Dstrok;",\u014A:"&ENG;",\u00D0:"&ETH;",\u00C9:"&Eacute;",\u011A:"&Ecaron;",\u00CA:"&Ecirc;",\u042D:"&Ecy;",\u0116:"&Edot;","\u{1D508}":"&Efr;",\u00C8:"&Egrave;","\u2208":"&isinv;",\u0112:"&Emacr;","\u25FB":"&EmptySmallSquare;","\u25AB":"&EmptyVerySmallSquare;",\u0118:"&Eogon;","\u{1D53C}":"&Eopf;",\u0395:"&Epsilon;","\u2A75":"&Equal;","\u2242":"&esim;","\u21CC":"&rlhar;",\u2130:"&expectation;","\u2A73":"&Esim;",\u0397:"&Eta;",\u00CB:"&Euml;","\u2203":"&exist;","\u2147":"&exponentiale;",\u0424:"&Fcy;","\u{1D509}":"&Ffr;","\u25FC":"&FilledSmallSquare;","\u25AA":"&squf;","\u{1D53D}":"&Fopf;","\u2200":"&forall;",\u2131:"&Fscr;",\u0403:"&GJcy;",">":"&gt;",\u0393:"&Gamma;",\u03DC:"&Gammad;",\u011E:"&Gbreve;",\u0122:"&Gcedil;",\u011C:"&Gcirc;",\u0413:"&Gcy;",\u0120:"&Gdot;","\u{1D50A}":"&Gfr;","\u22D9":"&ggg;","\u{1D53E}":"&Gopf;","\u2265":"&geq;","\u22DB":"&gtreqless;","\u2267":"&geqq;","\u2AA2":"&GreaterGreater;","\u2277":"&gtrless;","\u2A7E":"&ges;","\u2273":"&gtrsim;","\u{1D4A2}":"&Gscr;","\u226B":"&gg;",\u042A:"&HARDcy;","\u02C7":"&caron;","^":"&Hat;",\u0124:"&Hcirc;",\u210C:"&Poincareplane;",\u210B:"&hamilt;",\u210D:"&quaternions;","\u2500":"&boxh;",\u0126:"&Hstrok;","\u224F":"&bumpeq;",\u0415:"&IEcy;",\u0132:"&IJlig;",\u0401:"&IOcy;",\u00CD:"&Iacute;",\u00CE:"&Icirc;",\u0418:"&Icy;",\u0130:"&Idot;",\u2111:"&imagpart;",\u00CC:"&Igrave;",\u012A:"&Imacr;","\u2148":"&ii;","\u222C":"&Int;","\u222B":"&int;","\u22C2":"&xcap;","\u2063":"&ic;","\u2062":"&it;",\u012E:"&Iogon;","\u{1D540}":"&Iopf;",\u0399:"&Iota;",\u2110:"&imagline;",\u0128:"&Itilde;",\u0406:"&Iukcy;",\u00CF:"&Iuml;",\u0134:"&Jcirc;",\u0419:"&Jcy;","\u{1D50D}":"&Jfr;","\u{1D541}":"&Jopf;","\u{1D4A5}":"&Jscr;",\u0408:"&Jsercy;",\u0404:"&Jukcy;",\u0425:"&KHcy;",\u040C:"&KJcy;",\u039A:"&Kappa;",\u0136:"&Kcedil;",\u041A:"&Kcy;","\u{1D50E}":"&Kfr;","\u{1D542}":"&Kopf;","\u{1D4A6}":"&Kscr;",\u0409:"&LJcy;","<":"&lt;",\u0139:"&Lacute;",\u039B:"&Lambda;","\u27EA":"&Lang;",\u2112:"&lagran;","\u219E":"&twoheadleftarrow;",\u013D:"&Lcaron;",\u013B:"&Lcedil;",\u041B:"&Lcy;","\u27E8":"&langle;","\u2190":"&slarr;","\u21E4":"&larrb;","\u21C6":"&lrarr;","\u2308":"&lceil;","\u27E6":"&lobrk;","\u2961":"&LeftDownTeeVector;","\u21C3":"&downharpoonleft;","\u2959":"&LeftDownVectorBar;","\u230A":"&lfloor;","\u2194":"&leftrightarrow;","\u294E":"&LeftRightVector;","\u22A3":"&dashv;","\u21A4":"&mapstoleft;","\u295A":"&LeftTeeVector;","\u22B2":"&vltri;","\u29CF":"&LeftTriangleBar;","\u22B4":"&trianglelefteq;","\u2951":"&LeftUpDownVector;","\u2960":"&LeftUpTeeVector;","\u21BF":"&upharpoonleft;","\u2958":"&LeftUpVectorBar;","\u21BC":"&lharu;","\u2952":"&LeftVectorBar;","\u22DA":"&lesseqgtr;","\u2266":"&leqq;","\u2276":"&lg;","\u2AA1":"&LessLess;","\u2A7D":"&les;","\u2272":"&lsim;","\u{1D50F}":"&Lfr;","\u22D8":"&Ll;","\u21DA":"&lAarr;",\u013F:"&Lmidot;","\u27F5":"&xlarr;","\u27F7":"&xharr;","\u27F6":"&xrarr;","\u{1D543}":"&Lopf;","\u2199":"&swarrow;","\u2198":"&searrow;","\u21B0":"&lsh;",\u0141:"&Lstrok;","\u226A":"&ll;","\u2905":"&Map;",\u041C:"&Mcy;","\u205F":"&MediumSpace;",\u2133:"&phmmat;","\u{1D510}":"&Mfr;","\u2213":"&mp;","\u{1D544}":"&Mopf;",\u039C:"&Mu;",\u040A:"&NJcy;",\u0143:"&Nacute;",\u0147:"&Ncaron;",\u0145:"&Ncedil;",\u041D:"&Ncy;","\u200B":"&ZeroWidthSpace;","\n":"&NewLine;","\u{1D511}":"&Nfr;","\u2060":"&NoBreak;","\xA0":"&nbsp;",\u2115:"&naturals;","\u2AEC":"&Not;","\u2262":"&nequiv;","\u226D":"&NotCupCap;","\u2226":"&nspar;","\u2209":"&notinva;","\u2260":"&ne;","\u2242\u0338":"&nesim;","\u2204":"&nexists;","\u226F":"&ngtr;","\u2271":"&ngeq;","\u2267\u0338":"&ngeqq;","\u226B\u0338":"&nGtv;","\u2279":"&ntgl;","\u2A7E\u0338":"&nges;","\u2275":"&ngsim;","\u224E\u0338":"&nbump;","\u224F\u0338":"&nbumpe;","\u22EA":"&ntriangleleft;","\u29CF\u0338":"&NotLeftTriangleBar;","\u22EC":"&ntrianglelefteq;","\u226E":"&nlt;","\u2270":"&nleq;","\u2278":"&ntlg;","\u226A\u0338":"&nLtv;","\u2A7D\u0338":"&nles;","\u2274":"&nlsim;","\u2AA2\u0338":"&NotNestedGreaterGreater;","\u2AA1\u0338":"&NotNestedLessLess;","\u2280":"&nprec;","\u2AAF\u0338":"&npreceq;","\u22E0":"&nprcue;","\u220C":"&notniva;","\u22EB":"&ntriangleright;","\u29D0\u0338":"&NotRightTriangleBar;","\u22ED":"&ntrianglerighteq;","\u228F\u0338":"&NotSquareSubset;","\u22E2":"&nsqsube;","\u2290\u0338":"&NotSquareSuperset;","\u22E3":"&nsqsupe;","\u2282\u20D2":"&vnsub;","\u2288":"&nsubseteq;","\u2281":"&nsucc;","\u2AB0\u0338":"&nsucceq;","\u22E1":"&nsccue;","\u227F\u0338":"&NotSucceedsTilde;","\u2283\u20D2":"&vnsup;","\u2289":"&nsupseteq;","\u2241":"&nsim;","\u2244":"&nsimeq;","\u2247":"&ncong;","\u2249":"&napprox;","\u2224":"&nsmid;","\u{1D4A9}":"&Nscr;",\u00D1:"&Ntilde;",\u039D:"&Nu;",\u0152:"&OElig;",\u00D3:"&Oacute;",\u00D4:"&Ocirc;",\u041E:"&Ocy;",\u0150:"&Odblac;","\u{1D512}":"&Ofr;",\u00D2:"&Ograve;",\u014C:"&Omacr;",\u03A9:"&ohm;",\u039F:"&Omicron;","\u{1D546}":"&Oopf;","\u201C":"&ldquo;","\u2018":"&lsquo;","\u2A54":"&Or;","\u{1D4AA}":"&Oscr;",\u00D8:"&Oslash;",\u00D5:"&Otilde;","\u2A37":"&Otimes;",\u00D6:"&Ouml;","\u203E":"&oline;","\u23DE":"&OverBrace;","\u23B4":"&tbrk;","\u23DC":"&OverParenthesis;","\u2202":"&part;",\u041F:"&Pcy;","\u{1D513}":"&Pfr;",\u03A6:"&Phi;",\u03A0:"&Pi;","\xB1":"&pm;",\u2119:"&primes;","\u2ABB":"&Pr;","\u227A":"&prec;","\u2AAF":"&preceq;","\u227C":"&preccurlyeq;","\u227E":"&prsim;","\u2033":"&Prime;","\u220F":"&prod;","\u221D":"&vprop;","\u{1D4AB}":"&Pscr;",\u03A8:"&Psi;",'"':"&quot;","\u{1D514}":"&Qfr;",\u211A:"&rationals;","\u{1D4AC}":"&Qscr;","\u2910":"&drbkarow;","\xAE":"&reg;",\u0154:"&Racute;","\u27EB":"&Rang;","\u21A0":"&twoheadrightarrow;","\u2916":"&Rarrtl;",\u0158:"&Rcaron;",\u0156:"&Rcedil;",\u0420:"&Rcy;",\u211C:"&realpart;","\u220B":"&niv;","\u21CB":"&lrhar;","\u296F":"&duhar;",\u03A1:"&Rho;","\u27E9":"&rangle;","\u2192":"&srarr;","\u21E5":"&rarrb;","\u21C4":"&rlarr;","\u2309":"&rceil;","\u27E7":"&robrk;","\u295D":"&RightDownTeeVector;","\u21C2":"&downharpoonright;","\u2955":"&RightDownVectorBar;","\u230B":"&rfloor;","\u22A2":"&vdash;","\u21A6":"&mapsto;","\u295B":"&RightTeeVector;","\u22B3":"&vrtri;","\u29D0":"&RightTriangleBar;","\u22B5":"&trianglerighteq;","\u294F":"&RightUpDownVector;","\u295C":"&RightUpTeeVector;","\u21BE":"&upharpoonright;","\u2954":"&RightUpVectorBar;","\u21C0":"&rightharpoonup;","\u2953":"&RightVectorBar;",\u211D:"&reals;","\u2970":"&RoundImplies;","\u21DB":"&rAarr;",\u211B:"&realine;","\u21B1":"&rsh;","\u29F4":"&RuleDelayed;",\u0429:"&SHCHcy;",\u0428:"&SHcy;",\u042C:"&SOFTcy;",\u015A:"&Sacute;","\u2ABC":"&Sc;",\u0160:"&Scaron;",\u015E:"&Scedil;",\u015C:"&Scirc;",\u0421:"&Scy;","\u{1D516}":"&Sfr;","\u2191":"&uparrow;",\u03A3:"&Sigma;","\u2218":"&compfn;","\u{1D54A}":"&Sopf;","\u221A":"&radic;","\u25A1":"&square;","\u2293":"&sqcap;","\u228F":"&sqsubset;","\u2291":"&sqsubseteq;","\u2290":"&sqsupset;","\u2292":"&sqsupseteq;","\u2294":"&sqcup;","\u{1D4AE}":"&Sscr;","\u22C6":"&sstarf;","\u22D0":"&Subset;","\u2286":"&subseteq;","\u227B":"&succ;","\u2AB0":"&succeq;","\u227D":"&succcurlyeq;","\u227F":"&succsim;","\u2211":"&sum;","\u22D1":"&Supset;","\u2283":"&supset;","\u2287":"&supseteq;",\u00DE:"&THORN;","\u2122":"&trade;",\u040B:"&TSHcy;",\u0426:"&TScy;"," ":"&Tab;",\u03A4:"&Tau;",\u0164:"&Tcaron;",\u0162:"&Tcedil;",\u0422:"&Tcy;","\u{1D517}":"&Tfr;","\u2234":"&therefore;",\u0398:"&Theta;","\u205F\u200A":"&ThickSpace;","\u2009":"&thinsp;","\u223C":"&thksim;","\u2243":"&simeq;","\u2245":"&cong;","\u2248":"&thkap;","\u{1D54B}":"&Topf;","\u20DB":"&tdot;","\u{1D4AF}":"&Tscr;",\u0166:"&Tstrok;",\u00DA:"&Uacute;","\u219F":"&Uarr;","\u2949":"&Uarrocir;",\u040E:"&Ubrcy;",\u016C:"&Ubreve;",\u00DB:"&Ucirc;",\u0423:"&Ucy;",\u0170:"&Udblac;","\u{1D518}":"&Ufr;",\u00D9:"&Ugrave;",\u016A:"&Umacr;",_:"&lowbar;","\u23DF":"&UnderBrace;","\u23B5":"&bbrk;","\u23DD":"&UnderParenthesis;","\u22C3":"&xcup;","\u228E":"&uplus;",\u0172:"&Uogon;","\u{1D54C}":"&Uopf;","\u2912":"&UpArrowBar;","\u21C5":"&udarr;","\u2195":"&varr;","\u296E":"&udhar;","\u22A5":"&perp;","\u21A5":"&mapstoup;","\u2196":"&nwarrow;","\u2197":"&nearrow;",\u03D2:"&upsih;",\u03A5:"&Upsilon;",\u016E:"&Uring;","\u{1D4B0}":"&Uscr;",\u0168:"&Utilde;",\u00DC:"&Uuml;","\u22AB":"&VDash;","\u2AEB":"&Vbar;",\u0412:"&Vcy;","\u22A9":"&Vdash;","\u2AE6":"&Vdashl;","\u22C1":"&xvee;","\u2016":"&Vert;","\u2223":"&smid;","|":"&vert;","\u2758":"&VerticalSeparator;","\u2240":"&wreath;","\u200A":"&hairsp;","\u{1D519}":"&Vfr;","\u{1D54D}":"&Vopf;","\u{1D4B1}":"&Vscr;","\u22AA":"&Vvdash;",\u0174:"&Wcirc;","\u22C0":"&xwedge;","\u{1D51A}":"&Wfr;","\u{1D54E}":"&Wopf;","\u{1D4B2}":"&Wscr;","\u{1D51B}":"&Xfr;",\u039E:"&Xi;","\u{1D54F}":"&Xopf;","\u{1D4B3}":"&Xscr;",\u042F:"&YAcy;",\u0407:"&YIcy;",\u042E:"&YUcy;",\u00DD:"&Yacute;",\u0176:"&Ycirc;",\u042B:"&Ycy;","\u{1D51C}":"&Yfr;","\u{1D550}":"&Yopf;","\u{1D4B4}":"&Yscr;",\u0178:"&Yuml;",\u0416:"&ZHcy;",\u0179:"&Zacute;",\u017D:"&Zcaron;",\u0417:"&Zcy;",\u017B:"&Zdot;",\u0396:"&Zeta;",\u2128:"&zeetrf;",\u2124:"&integers;","\u{1D4B5}":"&Zscr;",\u00E1:"&aacute;",\u0103:"&abreve;","\u223E":"&mstpos;","\u223E\u0333":"&acE;","\u223F":"&acd;",\u00E2:"&acirc;",\u0430:"&acy;",\u00E6:"&aelig;","\u{1D51E}":"&afr;",\u00E0:"&agrave;",\u2135:"&aleph;",\u03B1:"&alpha;",\u0101:"&amacr;","\u2A3F":"&amalg;","\u2227":"&wedge;","\u2A55":"&andand;","\u2A5C":"&andd;","\u2A58":"&andslope;","\u2A5A":"&andv;","\u2220":"&angle;","\u29A4":"&ange;","\u2221":"&measuredangle;","\u29A8":"&angmsdaa;","\u29A9":"&angmsdab;","\u29AA":"&angmsdac;","\u29AB":"&angmsdad;","\u29AC":"&angmsdae;","\u29AD":"&angmsdaf;","\u29AE":"&angmsdag;","\u29AF":"&angmsdah;","\u221F":"&angrt;","\u22BE":"&angrtvb;","\u299D":"&angrtvbd;","\u2222":"&angsph;","\u237C":"&angzarr;",\u0105:"&aogon;","\u{1D552}":"&aopf;","\u2A70":"&apE;","\u2A6F":"&apacir;","\u224A":"&approxeq;","\u224B":"&apid;","'":"&apos;",\u00E5:"&aring;","\u{1D4B6}":"&ascr;","*":"&midast;",\u00E3:"&atilde;",\u00E4:"&auml;","\u2A11":"&awint;","\u2AED":"&bNot;","\u224C":"&bcong;","\u03F6":"&bepsi;","\u2035":"&bprime;","\u223D":"&bsim;","\u22CD":"&bsime;","\u22BD":"&barvee;","\u2305":"&barwedge;","\u23B6":"&bbrktbrk;",\u0431:"&bcy;","\u201E":"&ldquor;","\u29B0":"&bemptyv;",\u03B2:"&beta;",\u2136:"&beth;","\u226C":"&twixt;","\u{1D51F}":"&bfr;","\u25EF":"&xcirc;","\u2A00":"&xodot;","\u2A01":"&xoplus;","\u2A02":"&xotime;","\u2A06":"&xsqcup;","\u2605":"&starf;","\u25BD":"&xdtri;","\u25B3":"&xutri;","\u2A04":"&xuplus;","\u290D":"&rbarr;","\u29EB":"&lozf;","\u25B4":"&utrif;","\u25BE":"&dtrif;","\u25C2":"&ltrif;","\u25B8":"&rtrif;","\u2423":"&blank;","\u2592":"&blk12;","\u2591":"&blk14;","\u2593":"&blk34;","\u2588":"&block;","=\u20E5":"&bne;","\u2261\u20E5":"&bnequiv;","\u2310":"&bnot;","\u{1D553}":"&bopf;","\u22C8":"&bowtie;","\u2557":"&boxDL;","\u2554":"&boxDR;","\u2556":"&boxDl;","\u2553":"&boxDr;","\u2550":"&boxH;","\u2566":"&boxHD;","\u2569":"&boxHU;","\u2564":"&boxHd;","\u2567":"&boxHu;","\u255D":"&boxUL;","\u255A":"&boxUR;","\u255C":"&boxUl;","\u2559":"&boxUr;","\u2551":"&boxV;","\u256C":"&boxVH;","\u2563":"&boxVL;","\u2560":"&boxVR;","\u256B":"&boxVh;","\u2562":"&boxVl;","\u255F":"&boxVr;","\u29C9":"&boxbox;","\u2555":"&boxdL;","\u2552":"&boxdR;","\u2510":"&boxdl;","\u250C":"&boxdr;","\u2565":"&boxhD;","\u2568":"&boxhU;","\u252C":"&boxhd;","\u2534":"&boxhu;","\u229F":"&minusb;","\u229E":"&plusb;","\u22A0":"&timesb;","\u255B":"&boxuL;","\u2558":"&boxuR;","\u2518":"&boxul;","\u2514":"&boxur;","\u2502":"&boxv;","\u256A":"&boxvH;","\u2561":"&boxvL;","\u255E":"&boxvR;","\u253C":"&boxvh;","\u2524":"&boxvl;","\u251C":"&boxvr;","\xA6":"&brvbar;","\u{1D4B7}":"&bscr;","\u204F":"&bsemi;","\\":"&bsol;","\u29C5":"&bsolb;","\u27C8":"&bsolhsub;","\u2022":"&bullet;","\u2AAE":"&bumpE;",\u0107:"&cacute;","\u2229":"&cap;","\u2A44":"&capand;","\u2A49":"&capbrcup;","\u2A4B":"&capcap;","\u2A47":"&capcup;","\u2A40":"&capdot;","\u2229\uFE00":"&caps;","\u2041":"&caret;","\u2A4D":"&ccaps;",\u010D:"&ccaron;",\u00E7:"&ccedil;",\u0109:"&ccirc;","\u2A4C":"&ccups;","\u2A50":"&ccupssm;",\u010B:"&cdot;","\u29B2":"&cemptyv;","\xA2":"&cent;","\u{1D520}":"&cfr;",\u0447:"&chcy;","\u2713":"&checkmark;",\u03C7:"&chi;","\u25CB":"&cir;","\u29C3":"&cirE;","\u02C6":"&circ;","\u2257":"&cire;","\u21BA":"&olarr;","\u21BB":"&orarr;","\u24C8":"&oS;","\u229B":"&oast;","\u229A":"&ocir;","\u229D":"&odash;","\u2A10":"&cirfnint;","\u2AEF":"&cirmid;","\u29C2":"&cirscir;","\u2663":"&clubsuit;",":":"&colon;",",":"&comma;","@":"&commat;","\u2201":"&complement;","\u2A6D":"&congdot;","\u{1D554}":"&copf;","\u2117":"&copysr;","\u21B5":"&crarr;","\u2717":"&cross;","\u{1D4B8}":"&cscr;","\u2ACF":"&csub;","\u2AD1":"&csube;","\u2AD0":"&csup;","\u2AD2":"&csupe;","\u22EF":"&ctdot;","\u2938":"&cudarrl;","\u2935":"&cudarrr;","\u22DE":"&curlyeqprec;","\u22DF":"&curlyeqsucc;","\u21B6":"&curvearrowleft;","\u293D":"&cularrp;","\u222A":"&cup;","\u2A48":"&cupbrcap;","\u2A46":"&cupcap;","\u2A4A":"&cupcup;","\u228D":"&cupdot;","\u2A45":"&cupor;","\u222A\uFE00":"&cups;","\u21B7":"&curvearrowright;","\u293C":"&curarrm;","\u22CE":"&cuvee;","\u22CF":"&cuwed;","\xA4":"&curren;","\u2231":"&cwint;","\u232D":"&cylcty;","\u2965":"&dHar;","\u2020":"&dagger;",\u2138:"&daleth;","\u2010":"&hyphen;","\u290F":"&rBarr;",\u010F:"&dcaron;",\u0434:"&dcy;","\u21CA":"&downdownarrows;","\u2A77":"&eDDot;","\xB0":"&deg;",\u03B4:"&delta;","\u29B1":"&demptyv;","\u297F":"&dfisht;","\u{1D521}":"&dfr;","\u2666":"&diams;",\u03DD:"&gammad;","\u22F2":"&disin;","\xF7":"&divide;","\u22C7":"&divonx;",\u0452:"&djcy;","\u231E":"&llcorner;","\u230D":"&dlcrop;",$:"&dollar;","\u{1D555}":"&dopf;","\u2251":"&eDot;","\u2238":"&minusd;","\u2214":"&plusdo;","\u22A1":"&sdotb;","\u231F":"&lrcorner;","\u230C":"&drcrop;","\u{1D4B9}":"&dscr;",\u0455:"&dscy;","\u29F6":"&dsol;",\u0111:"&dstrok;","\u22F1":"&dtdot;","\u25BF":"&triangledown;","\u29A6":"&dwangle;",\u045F:"&dzcy;","\u27FF":"&dzigrarr;",\u00E9:"&eacute;","\u2A6E":"&easter;",\u011B:"&ecaron;","\u2256":"&eqcirc;",\u00EA:"&ecirc;","\u2255":"&eqcolon;",\u044D:"&ecy;",\u0117:"&edot;","\u2252":"&fallingdotseq;","\u{1D522}":"&efr;","\u2A9A":"&eg;",\u00E8:"&egrave;","\u2A96":"&eqslantgtr;","\u2A98":"&egsdot;","\u2A99":"&el;","\u23E7":"&elinters;",\u2113:"&ell;","\u2A95":"&eqslantless;","\u2A97":"&elsdot;",\u0113:"&emacr;","\u2205":"&varnothing;","\u2004":"&emsp13;","\u2005":"&emsp14;","\u2003":"&emsp;",\u014B:"&eng;","\u2002":"&ensp;",\u0119:"&eogon;","\u{1D556}":"&eopf;","\u22D5":"&epar;","\u29E3":"&eparsl;","\u2A71":"&eplus;",\u03B5:"&epsilon;","\u03F5":"&varepsilon;","=":"&equals;","\u225F":"&questeq;","\u2A78":"&equivDD;","\u29E5":"&eqvparsl;","\u2253":"&risingdotseq;","\u2971":"&erarr;",\u212F:"&escr;",\u03B7:"&eta;",\u00F0:"&eth;",\u00EB:"&euml;","\u20AC":"&euro;","!":"&excl;",\u0444:"&fcy;","\u2640":"&female;",\uFB03:"&ffilig;",\uFB00:"&fflig;",\uFB04:"&ffllig;","\u{1D523}":"&ffr;",\uFB01:"&filig;",fj:"&fjlig;","\u266D":"&flat;",\uFB02:"&fllig;","\u25B1":"&fltns;",\u0192:"&fnof;","\u{1D557}":"&fopf;","\u22D4":"&pitchfork;","\u2AD9":"&forkv;","\u2A0D":"&fpartint;","\xBD":"&half;","\u2153":"&frac13;","\xBC":"&frac14;","\u2155":"&frac15;","\u2159":"&frac16;","\u215B":"&frac18;","\u2154":"&frac23;","\u2156":"&frac25;","\xBE":"&frac34;","\u2157":"&frac35;","\u215C":"&frac38;","\u2158":"&frac45;","\u215A":"&frac56;","\u215D":"&frac58;","\u215E":"&frac78;","\u2044":"&frasl;","\u2322":"&sfrown;","\u{1D4BB}":"&fscr;","\u2A8C":"&gtreqqless;",\u01F5:"&gacute;",\u03B3:"&gamma;","\u2A86":"&gtrapprox;",\u011F:"&gbreve;",\u011D:"&gcirc;",\u0433:"&gcy;",\u0121:"&gdot;","\u2AA9":"&gescc;","\u2A80":"&gesdot;","\u2A82":"&gesdoto;","\u2A84":"&gesdotol;","\u22DB\uFE00":"&gesl;","\u2A94":"&gesles;","\u{1D524}":"&gfr;",\u2137:"&gimel;",\u0453:"&gjcy;","\u2A92":"&glE;","\u2AA5":"&gla;","\u2AA4":"&glj;","\u2269":"&gneqq;","\u2A8A":"&gnapprox;","\u2A88":"&gneq;","\u22E7":"&gnsim;","\u{1D558}":"&gopf;",\u210A:"&gscr;","\u2A8E":"&gsime;","\u2A90":"&gsiml;","\u2AA7":"&gtcc;","\u2A7A":"&gtcir;","\u22D7":"&gtrdot;","\u2995":"&gtlPar;","\u2A7C":"&gtquest;","\u2978":"&gtrarr;","\u2269\uFE00":"&gvnE;",\u044A:"&hardcy;","\u2948":"&harrcir;","\u21AD":"&leftrightsquigarrow;",\u210F:"&plankv;",\u0125:"&hcirc;","\u2665":"&heartsuit;","\u2026":"&mldr;","\u22B9":"&hercon;","\u{1D525}":"&hfr;","\u2925":"&searhk;","\u2926":"&swarhk;","\u21FF":"&hoarr;","\u223B":"&homtht;","\u21A9":"&larrhk;","\u21AA":"&rarrhk;","\u{1D559}":"&hopf;","\u2015":"&horbar;","\u{1D4BD}":"&hscr;",\u0127:"&hstrok;","\u2043":"&hybull;",\u00ED:"&iacute;",\u00EE:"&icirc;",\u0438:"&icy;",\u0435:"&iecy;","\xA1":"&iexcl;","\u{1D526}":"&ifr;",\u00EC:"&igrave;","\u2A0C":"&qint;","\u222D":"&tint;","\u29DC":"&iinfin;","\u2129":"&iiota;",\u0133:"&ijlig;",\u012B:"&imacr;",\u0131:"&inodot;","\u22B7":"&imof;",\u01B5:"&imped;","\u2105":"&incare;","\u221E":"&infin;","\u29DD":"&infintie;","\u22BA":"&intercal;","\u2A17":"&intlarhk;","\u2A3C":"&iprod;",\u0451:"&iocy;",\u012F:"&iogon;","\u{1D55A}":"&iopf;",\u03B9:"&iota;","\xBF":"&iquest;","\u{1D4BE}":"&iscr;","\u22F9":"&isinE;","\u22F5":"&isindot;","\u22F4":"&isins;","\u22F3":"&isinsv;",\u0129:"&itilde;",\u0456:"&iukcy;",\u00EF:"&iuml;",\u0135:"&jcirc;",\u0439:"&jcy;","\u{1D527}":"&jfr;","\u0237":"&jmath;","\u{1D55B}":"&jopf;","\u{1D4BF}":"&jscr;",\u0458:"&jsercy;",\u0454:"&jukcy;",\u03BA:"&kappa;",\u03F0:"&varkappa;",\u0137:"&kcedil;",\u043A:"&kcy;","\u{1D528}":"&kfr;",\u0138:"&kgreen;",\u0445:"&khcy;",\u045C:"&kjcy;","\u{1D55C}":"&kopf;","\u{1D4C0}":"&kscr;","\u291B":"&lAtail;","\u290E":"&lBarr;","\u2A8B":"&lesseqqgtr;","\u2962":"&lHar;",\u013A:"&lacute;","\u29B4":"&laemptyv;",\u03BB:"&lambda;","\u2991":"&langd;","\u2A85":"&lessapprox;","\xAB":"&laquo;","\u291F":"&larrbfs;","\u291D":"&larrfs;","\u21AB":"&looparrowleft;","\u2939":"&larrpl;","\u2973":"&larrsim;","\u21A2":"&leftarrowtail;","\u2AAB":"&lat;","\u2919":"&latail;","\u2AAD":"&late;","\u2AAD\uFE00":"&lates;","\u290C":"&lbarr;","\u2772":"&lbbrk;","{":"&lcub;","[":"&lsqb;","\u298B":"&lbrke;","\u298F":"&lbrksld;","\u298D":"&lbrkslu;",\u013E:"&lcaron;",\u013C:"&lcedil;",\u043B:"&lcy;","\u2936":"&ldca;","\u2967":"&ldrdhar;","\u294B":"&ldrushar;","\u21B2":"&ldsh;","\u2264":"&leq;","\u21C7":"&llarr;","\u22CB":"&lthree;","\u2AA8":"&lescc;","\u2A7F":"&lesdot;","\u2A81":"&lesdoto;","\u2A83":"&lesdotor;","\u22DA\uFE00":"&lesg;","\u2A93":"&lesges;","\u22D6":"&ltdot;","\u297C":"&lfisht;","\u{1D529}":"&lfr;","\u2A91":"&lgE;","\u296A":"&lharul;","\u2584":"&lhblk;",\u0459:"&ljcy;","\u296B":"&llhard;","\u25FA":"&lltri;",\u0140:"&lmidot;","\u23B0":"&lmoustache;","\u2268":"&lneqq;","\u2A89":"&lnapprox;","\u2A87":"&lneq;","\u22E6":"&lnsim;","\u27EC":"&loang;","\u21FD":"&loarr;","\u27FC":"&xmap;","\u21AC":"&rarrlp;","\u2985":"&lopar;","\u{1D55D}":"&lopf;","\u2A2D":"&loplus;","\u2A34":"&lotimes;","\u2217":"&lowast;","\u25CA":"&lozenge;","(":"&lpar;","\u2993":"&lparlt;","\u296D":"&lrhard;","\u200E":"&lrm;","\u22BF":"&lrtri;","\u2039":"&lsaquo;","\u{1D4C1}":"&lscr;","\u2A8D":"&lsime;","\u2A8F":"&lsimg;","\u201A":"&sbquo;",\u0142:"&lstrok;","\u2AA6":"&ltcc;","\u2A79":"&ltcir;","\u22C9":"&ltimes;","\u2976":"&ltlarr;","\u2A7B":"&ltquest;","\u2996":"&ltrPar;","\u25C3":"&triangleleft;","\u294A":"&lurdshar;","\u2966":"&luruhar;","\u2268\uFE00":"&lvnE;","\u223A":"&mDDot;","\xAF":"&strns;","\u2642":"&male;","\u2720":"&maltese;","\u25AE":"&marker;","\u2A29":"&mcomma;",\u043C:"&mcy;","\u2014":"&mdash;","\u{1D52A}":"&mfr;","\u2127":"&mho;",\u00B5:"&micro;","\u2AF0":"&midcir;","\u2212":"&minus;","\u2A2A":"&minusdu;","\u2ADB":"&mlcp;","\u22A7":"&models;","\u{1D55E}":"&mopf;","\u{1D4C2}":"&mscr;",\u03BC:"&mu;","\u22B8":"&mumap;","\u22D9\u0338":"&nGg;","\u226B\u20D2":"&nGt;","\u21CD":"&nlArr;","\u21CE":"&nhArr;","\u22D8\u0338":"&nLl;","\u226A\u20D2":"&nLt;","\u21CF":"&nrArr;","\u22AF":"&nVDash;","\u22AE":"&nVdash;",\u0144:"&nacute;","\u2220\u20D2":"&nang;","\u2A70\u0338":"&napE;","\u224B\u0338":"&napid;",\u0149:"&napos;","\u266E":"&natural;","\u2A43":"&ncap;",\u0148:"&ncaron;",\u0146:"&ncedil;","\u2A6D\u0338":"&ncongdot;","\u2A42":"&ncup;",\u043D:"&ncy;","\u2013":"&ndash;","\u21D7":"&neArr;","\u2924":"&nearhk;","\u2250\u0338":"&nedot;","\u2928":"&toea;","\u{1D52B}":"&nfr;","\u21AE":"&nleftrightarrow;","\u2AF2":"&nhpar;","\u22FC":"&nis;","\u22FA":"&nisd;",\u045A:"&njcy;","\u2266\u0338":"&nleqq;","\u219A":"&nleftarrow;","\u2025":"&nldr;","\u{1D55F}":"&nopf;","\xAC":"&not;","\u22F9\u0338":"&notinE;","\u22F5\u0338":"&notindot;","\u22F7":"&notinvb;","\u22F6":"&notinvc;","\u22FE":"&notnivb;","\u22FD":"&notnivc;","\u2AFD\u20E5":"&nparsl;","\u2202\u0338":"&npart;","\u2A14":"&npolint;","\u219B":"&nrightarrow;","\u2933\u0338":"&nrarrc;","\u219D\u0338":"&nrarrw;","\u{1D4C3}":"&nscr;","\u2284":"&nsub;","\u2AC5\u0338":"&nsubseteqq;","\u2285":"&nsup;","\u2AC6\u0338":"&nsupseteqq;",\u00F1:"&ntilde;",\u03BD:"&nu;","#":"&num;","\u2116":"&numero;","\u2007":"&numsp;","\u22AD":"&nvDash;","\u2904":"&nvHarr;","\u224D\u20D2":"&nvap;","\u22AC":"&nvdash;","\u2265\u20D2":"&nvge;",">\u20D2":"&nvgt;","\u29DE":"&nvinfin;","\u2902":"&nvlArr;","\u2264\u20D2":"&nvle;","<\u20D2":"&nvlt;","\u22B4\u20D2":"&nvltrie;","\u2903":"&nvrArr;","\u22B5\u20D2":"&nvrtrie;","\u223C\u20D2":"&nvsim;","\u21D6":"&nwArr;","\u2923":"&nwarhk;","\u2927":"&nwnear;",\u00F3:"&oacute;",\u00F4:"&ocirc;",\u043E:"&ocy;",\u0151:"&odblac;","\u2A38":"&odiv;","\u29BC":"&odsold;",\u0153:"&oelig;","\u29BF":"&ofcir;","\u{1D52C}":"&ofr;","\u02DB":"&ogon;",\u00F2:"&ograve;","\u29C1":"&ogt;","\u29B5":"&ohbar;","\u29BE":"&olcir;","\u29BB":"&olcross;","\u29C0":"&olt;",\u014D:"&omacr;",\u03C9:"&omega;",\u03BF:"&omicron;","\u29B6":"&omid;","\u{1D560}":"&oopf;","\u29B7":"&opar;","\u29B9":"&operp;","\u2228":"&vee;","\u2A5D":"&ord;",\u2134:"&oscr;",\u00AA:"&ordf;",\u00BA:"&ordm;","\u22B6":"&origof;","\u2A56":"&oror;","\u2A57":"&orslope;","\u2A5B":"&orv;",\u00F8:"&oslash;","\u2298":"&osol;",\u00F5:"&otilde;","\u2A36":"&otimesas;",\u00F6:"&ouml;","\u233D":"&ovbar;","\xB6":"&para;","\u2AF3":"&parsim;","\u2AFD":"&parsl;",\u043F:"&pcy;","%":"&percnt;",".":"&period;","\u2030":"&permil;","\u2031":"&pertenk;","\u{1D52D}":"&pfr;",\u03C6:"&phi;",\u03D5:"&varphi;","\u260E":"&phone;",\u03C0:"&pi;",\u03D6:"&varpi;",\u210E:"&planckh;","+":"&plus;","\u2A23":"&plusacir;","\u2A22":"&pluscir;","\u2A25":"&plusdu;","\u2A72":"&pluse;","\u2A26":"&plussim;","\u2A27":"&plustwo;","\u2A15":"&pointint;","\u{1D561}":"&popf;","\xA3":"&pound;","\u2AB3":"&prE;","\u2AB7":"&precapprox;","\u2AB9":"&prnap;","\u2AB5":"&prnE;","\u22E8":"&prnsim;","\u2032":"&prime;","\u232E":"&profalar;","\u2312":"&profline;","\u2313":"&profsurf;","\u22B0":"&prurel;","\u{1D4C5}":"&pscr;",\u03C8:"&psi;","\u2008":"&puncsp;","\u{1D52E}":"&qfr;","\u{1D562}":"&qopf;","\u2057":"&qprime;","\u{1D4C6}":"&qscr;","\u2A16":"&quatint;","?":"&quest;","\u291C":"&rAtail;","\u2964":"&rHar;","\u223D\u0331":"&race;",\u0155:"&racute;","\u29B3":"&raemptyv;","\u2992":"&rangd;","\u29A5":"&range;","\xBB":"&raquo;","\u2975":"&rarrap;","\u2920":"&rarrbfs;","\u2933":"&rarrc;","\u291E":"&rarrfs;","\u2945":"&rarrpl;","\u2974":"&rarrsim;","\u21A3":"&rightarrowtail;","\u219D":"&rightsquigarrow;","\u291A":"&ratail;","\u2236":"&ratio;","\u2773":"&rbbrk;","}":"&rcub;","]":"&rsqb;","\u298C":"&rbrke;","\u298E":"&rbrksld;","\u2990":"&rbrkslu;",\u0159:"&rcaron;",\u0157:"&rcedil;",\u0440:"&rcy;","\u2937":"&rdca;","\u2969":"&rdldhar;","\u21B3":"&rdsh;","\u25AD":"&rect;","\u297D":"&rfisht;","\u{1D52F}":"&rfr;","\u296C":"&rharul;",\u03C1:"&rho;",\u03F1:"&varrho;","\u21C9":"&rrarr;","\u22CC":"&rthree;","\u02DA":"&ring;","\u200F":"&rlm;","\u23B1":"&rmoustache;","\u2AEE":"&rnmid;","\u27ED":"&roang;","\u21FE":"&roarr;","\u2986":"&ropar;","\u{1D563}":"&ropf;","\u2A2E":"&roplus;","\u2A35":"&rotimes;",")":"&rpar;","\u2994":"&rpargt;","\u2A12":"&rppolint;","\u203A":"&rsaquo;","\u{1D4C7}":"&rscr;","\u22CA":"&rtimes;","\u25B9":"&triangleright;","\u29CE":"&rtriltri;","\u2968":"&ruluhar;","\u211E":"&rx;",\u015B:"&sacute;","\u2AB4":"&scE;","\u2AB8":"&succapprox;",\u0161:"&scaron;",\u015F:"&scedil;",\u015D:"&scirc;","\u2AB6":"&succneqq;","\u2ABA":"&succnapprox;","\u22E9":"&succnsim;","\u2A13":"&scpolint;",\u0441:"&scy;","\u22C5":"&sdot;","\u2A66":"&sdote;","\u21D8":"&seArr;","\xA7":"&sect;",";":"&semi;","\u2929":"&tosa;","\u2736":"&sext;","\u{1D530}":"&sfr;","\u266F":"&sharp;",\u0449:"&shchcy;",\u0448:"&shcy;","\xAD":"&shy;",\u03C3:"&sigma;",\u03C2:"&varsigma;","\u2A6A":"&simdot;","\u2A9E":"&simg;","\u2AA0":"&simgE;","\u2A9D":"&siml;","\u2A9F":"&simlE;","\u2246":"&simne;","\u2A24":"&simplus;","\u2972":"&simrarr;","\u2A33":"&smashp;","\u29E4":"&smeparsl;","\u2323":"&ssmile;","\u2AAA":"&smt;","\u2AAC":"&smte;","\u2AAC\uFE00":"&smtes;",\u044C:"&softcy;","/":"&sol;","\u29C4":"&solb;","\u233F":"&solbar;","\u{1D564}":"&sopf;","\u2660":"&spadesuit;","\u2293\uFE00":"&sqcaps;","\u2294\uFE00":"&sqcups;","\u{1D4C8}":"&sscr;","\u2606":"&star;","\u2282":"&subset;","\u2AC5":"&subseteqq;","\u2ABD":"&subdot;","\u2AC3":"&subedot;","\u2AC1":"&submult;","\u2ACB":"&subsetneqq;","\u228A":"&subsetneq;","\u2ABF":"&subplus;","\u2979":"&subrarr;","\u2AC7":"&subsim;","\u2AD5":"&subsub;","\u2AD3":"&subsup;","\u266A":"&sung;","\xB9":"&sup1;","\xB2":"&sup2;","\xB3":"&sup3;","\u2AC6":"&supseteqq;","\u2ABE":"&supdot;","\u2AD8":"&supdsub;","\u2AC4":"&supedot;","\u27C9":"&suphsol;","\u2AD7":"&suphsub;","\u297B":"&suplarr;","\u2AC2":"&supmult;","\u2ACC":"&supsetneqq;","\u228B":"&supsetneq;","\u2AC0":"&supplus;","\u2AC8":"&supsim;","\u2AD4":"&supsub;","\u2AD6":"&supsup;","\u21D9":"&swArr;","\u292A":"&swnwar;",\u00DF:"&szlig;","\u2316":"&target;",\u03C4:"&tau;",\u0165:"&tcaron;",\u0163:"&tcedil;",\u0442:"&tcy;","\u2315":"&telrec;","\u{1D531}":"&tfr;",\u03B8:"&theta;",\u03D1:"&vartheta;",\u00FE:"&thorn;","\xD7":"&times;","\u2A31":"&timesbar;","\u2A30":"&timesd;","\u2336":"&topbot;","\u2AF1":"&topcir;","\u{1D565}":"&topf;","\u2ADA":"&topfork;","\u2034":"&tprime;","\u25B5":"&utri;","\u225C":"&trie;","\u25EC":"&tridot;","\u2A3A":"&triminus;","\u2A39":"&triplus;","\u29CD":"&trisb;","\u2A3B":"&tritime;","\u23E2":"&trpezium;","\u{1D4C9}":"&tscr;",\u0446:"&tscy;",\u045B:"&tshcy;",\u0167:"&tstrok;","\u2963":"&uHar;",\u00FA:"&uacute;",\u045E:"&ubrcy;",\u016D:"&ubreve;",\u00FB:"&ucirc;",\u0443:"&ucy;",\u0171:"&udblac;","\u297E":"&ufisht;","\u{1D532}":"&ufr;",\u00F9:"&ugrave;","\u2580":"&uhblk;","\u231C":"&ulcorner;","\u230F":"&ulcrop;","\u25F8":"&ultri;",\u016B:"&umacr;",\u0173:"&uogon;","\u{1D566}":"&uopf;",\u03C5:"&upsilon;","\u21C8":"&uuarr;","\u231D":"&urcorner;","\u230E":"&urcrop;",\u016F:"&uring;","\u25F9":"&urtri;","\u{1D4CA}":"&uscr;","\u22F0":"&utdot;",\u0169:"&utilde;",\u00FC:"&uuml;","\u29A7":"&uwangle;","\u2AE8":"&vBar;","\u2AE9":"&vBarv;","\u299C":"&vangrt;","\u228A\uFE00":"&vsubne;","\u2ACB\uFE00":"&vsubnE;","\u228B\uFE00":"&vsupne;","\u2ACC\uFE00":"&vsupnE;",\u0432:"&vcy;","\u22BB":"&veebar;","\u225A":"&veeeq;","\u22EE":"&vellip;","\u{1D533}":"&vfr;","\u{1D567}":"&vopf;","\u{1D4CB}":"&vscr;","\u299A":"&vzigzag;",\u0175:"&wcirc;","\u2A5F":"&wedbar;","\u2259":"&wedgeq;","\u2118":"&wp;","\u{1D534}":"&wfr;","\u{1D568}":"&wopf;","\u{1D4CC}":"&wscr;","\u{1D535}":"&xfr;",\u03BE:"&xi;","\u22FB":"&xnis;","\u{1D569}":"&xopf;","\u{1D4CD}":"&xscr;",\u00FD:"&yacute;",\u044F:"&yacy;",\u0177:"&ycirc;",\u044B:"&ycy;","\xA5":"&yen;","\u{1D536}":"&yfr;",\u0457:"&yicy;","\u{1D56A}":"&yopf;","\u{1D4CE}":"&yscr;",\u044E:"&yucy;",\u00FF:"&yuml;",\u017A:"&zacute;",\u017E:"&zcaron;",\u0437:"&zcy;",\u017C:"&zdot;",\u03B6:"&zeta;","\u{1D537}":"&zfr;",\u0436:"&zhcy;","\u21DD":"&zigrarr;","\u{1D56B}":"&zopf;","\u{1D4CF}":"&zscr;","\u200D":"&zwj;","\u200C":"&zwnj;"}}}});var Zb=ye(rp=>{"use strict";Object.defineProperty(rp,"__esModule",{value:!0});rp.numericUnicodeMap={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}});var Yb=ye(Ys=>{"use strict";Object.defineProperty(Ys,"__esModule",{value:!0});Ys.fromCodePoint=String.fromCodePoint||function(n){return String.fromCharCode(Math.floor((n-65536)/1024)+55296,(n-65536)%1024+56320)};Ys.getCodePoint=String.prototype.codePointAt?function(n,t){return n.codePointAt(t)}:function(n,t){return(n.charCodeAt(t)-55296)*1024+n.charCodeAt(t+1)-56320+65536};Ys.highSurrogateFrom=55296;Ys.highSurrogateTo=56319});var tx=ye(Ao=>{"use strict";var Js=Ao&&Ao.__assign||function(){return Js=Object.assign||function(n){for(var t,e=1,i=arguments.length;e<i;e++){t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Js.apply(this,arguments)};Object.defineProperty(Ao,"__esModule",{value:!0});var mc=Xb(),RF=Zb(),Qb=Yb(),ap=Js(Js({},mc.namedReferences),{all:mc.namedReferences.html5});function _b(n,t,e){t.lastIndex=0;var i=t.exec(n),r;if(i){r="";var o=0;do{o!==i.index&&(r+=n.substring(o,i.index));var s=i[0];r+=e(s),o=i.index+s.length}while(i=t.exec(n));o!==n.length&&(r+=n.substring(o))}else r=n;return r}var VF={specialChars:/[<>'"&]/g,nonAscii:/[<>'"&\u0080-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g,nonAsciiPrintable:/[<>'"&\x01-\x08\x11-\x15\x17-\x1F\x7f-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g,nonAsciiPrintableOnly:/[\x01-\x08\x11-\x15\x17-\x1F\x7f-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g,extensive:/[\x01-\x0c\x0e-\x1f\x21-\x2c\x2e-\x2f\x3a-\x40\x5b-\x60\x7b-\x7d\x7f-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g},BF={mode:"specialChars",level:"all",numeric:"decimal"};function HF(n,t){var e=t===void 0?BF:t,i=e.mode,r=i===void 0?"specialChars":i,o=e.numeric,s=o===void 0?"decimal":o,a=e.level,c=a===void 0?"all":a;if(!n)return"";var l=VF[r],d=ap[c].characters,h=s==="hexadecimal";return _b(n,l,function(u){var f=d[u];if(!f){var p=u.length>1?Qb.getCodePoint(u,0):u.charCodeAt(0);f=(h?"&#x"+p.toString(16):"&#"+p)+";"}return f})}Ao.encode=HF;var UF={scope:"body",level:"all"},op=/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);/g,sp=/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+)[;=]?/g,Jb={xml:{strict:op,attribute:sp,body:mc.bodyRegExps.xml},html4:{strict:op,attribute:sp,body:mc.bodyRegExps.html4},html5:{strict:op,attribute:sp,body:mc.bodyRegExps.html5}},zF=Js(Js({},Jb),{all:Jb.html5}),$b=String.fromCharCode,qF=$b(65533),WF={level:"all"};function ex(n,t,e,i){var r=n,o=n[n.length-1];if(e&&o==="=")r=n;else if(i&&o!==";")r=n;else{var s=t[n];if(s)r=s;else if(n[0]==="&"&&n[1]==="#"){var a=n[2],c=a=="x"||a=="X"?parseInt(n.substr(3),16):parseInt(n.substr(2));r=c>=1114111?qF:c>65535?Qb.fromCodePoint(c):$b(RF.numericUnicodeMap[c]||c)}}return r}function jF(n,t){var e=(t===void 0?WF:t).level,i=e===void 0?"all":e;return n?ex(n,ap[i].entities,!1,!1):""}Ao.decodeEntity=jF;function KF(n,t){var e=t===void 0?UF:t,i=e.level,r=i===void 0?"all":i,o=e.scope,s=o===void 0?r==="xml"?"strict":"body":o;if(!n)return"";var a=zF[r][s],c=ap[r].entities,l=s==="attribute",d=s==="strict";return _b(n,a,function(h){return ex(h,c,l,d)})}Ao.decode=KF});var rx=ye(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.isBlock=nt.parse=nt.Matcher=nt.HTMLElement=nt.CommentNode=nt.TextNode=nt.AbstractNode=nt.NodeType=void 0;var Qs=tx(),Si=!1,wt;(function(n){n[n.ELEMENT_NODE=1]="ELEMENT_NODE",n[n.TEXT_NODE=3]="TEXT_NODE",n[n.COMMENT_NODE=8]="COMMENT_NODE"})(wt||(nt.NodeType=wt={}));var Oo=class{constructor(){this.childNodes=[]}get text(){return(0,Qs.decode)(this.rawText)}remove(){return this.parentNode&&this.parentNode.removeChild(this),this}};nt.AbstractNode=Oo;var Lo=class extends Oo{constructor(t){super(),this.nodeType=wt.TEXT_NODE,this.value=t}get rawText(){return this.value}get isWhitespace(){return/^(\s|&nbsp;)*$/.test(this.rawText)}toString(){return this.rawText}};nt.TextNode=Lo;var Zd=class extends Oo{constructor(t){super(),this.nodeType=wt.COMMENT_NODE,this.value=t}get rawText(){return this.value}toString(){return`<!--${this.rawText}-->`}};nt.CommentNode=Zd;var GF={div:!0,p:!0,li:!0,td:!0,section:!0,br:!0};function _s(n){return n[n.length-1]}var ui=class extends Oo{constructor(t,e="",i=null){super(),this.tagName=t,this.rawAttrs=e,this.classNames=[],this.nodeType=wt.ELEMENT_NODE,this.rawAttrs=e,this.parentNode=i,this.childNodes=[];let r={};for(let o;o=XF.exec(e);)r[o[2]]=o[4]||o[5]||o[6];r.id&&(this.id=r.id),r.class&&(this.classNames=r.class.split(/\s+/))}removeChild(t){this.childNodes=this.childNodes.filter(e=>e!==t),t instanceof ui&&(t.parentNode=null)}exchangeChild(t,e){let i=this.childNodes.findIndex(r=>r===t);i>=0&&(this.childNodes[i]=e,t instanceof ui&&(t.parentNode=null))}get rawText(){let t="";for(let e=0;e<this.childNodes.length;e++)t+=this.childNodes[e].rawText;return t}get structuredText(){let t=[],e=[t];function i(r){if(r.nodeType===wt.ELEMENT_NODE)GF[r.tagName]?(t.length>0&&e.push(t=[]),r.childNodes.forEach(i),t.length>0&&e.push(t=[])):r.childNodes.forEach(i);else if(r.nodeType===wt.TEXT_NODE)if(r.isWhitespace)t.prependWhitespace=!0;else{let o=r.text;t.prependWhitespace&&(o=" "+o,t.prependWhitespace=!1),t.push(o)}}return i(this),e.map(function(r){return r.join("").trim().replace(/\s{2,}/g," ")}).join(`
`).replace(/\s+$/,"")}get children(){return this.childNodes.filter(t=>t instanceof ui)}toString(){let t=this.tagName;if(t){let e=/^(img|br|hr|area|base|input|doctype|link|meta)$/i.test(t),i=this.rawAttrs?" "+this.rawAttrs:"";return e?`<${t}${i} />`:`<${t}${i}>${this.innerHTML}</${t}>`}else return this.innerHTML}get innerHTML(){return this.childNodes.map(t=>t.toString()).join("")}set innerHTML(t){let e=cp(t);this.childNodes.forEach(i=>i.remove()),e.childNodes.forEach(i=>this.appendChild(i))}set_content(t){if(t instanceof Oo)t=[t];else if(typeof t=="string"){let e=cp(t);t=e.childNodes.length?e.childNodes:[new Lo(t)]}this.childNodes=t}get outerHTML(){return this.toString()}trimRight(t){for(let e=0;e<this.childNodes.length;e++){let i=this.childNodes[e];if(i.nodeType===wt.ELEMENT_NODE)i.trimRight(t);else{let r=i.rawText.search(t);r>-1&&(i.value=i.rawText.substr(0,r),this.childNodes.length=e+1)}}return this}get structure(){let t=[],e=0;function i(o){t.push(" ".repeat(e)+o)}function r(o){let s=o.id?"#"+o.id:"",a=o.classNames.length?"."+o.classNames.join("."):"";i(o.tagName+s+a),e++;for(let c=0;c<o.childNodes.length;c++){let l=o.childNodes[c];l.nodeType===wt.ELEMENT_NODE?r(l):l.nodeType===wt.TEXT_NODE&&(l.isWhitespace||i("#text"))}e--}return r(this),t.join(`
`)}removeWhitespace(){let t=0;for(let e=0;e<this.childNodes.length;e++){let i=this.childNodes[e];if(i.nodeType===wt.TEXT_NODE){if(i.isWhitespace)continue;i.value=i.rawText.trim()}else i.nodeType===wt.ELEMENT_NODE&&i.removeWhitespace();this.childNodes[t++]=i}return this.childNodes.length=t,this}querySelectorAll(t){if(!(t instanceof Io))if(t.includes(",")){let o=t.split(","),s=new Set(o.map(a=>this.querySelectorAll(a.trim())).flat());return Array.from(s)}else return this.querySelectorAll(new Io(t));let e=t,i=new Set,r=[];for(this.childNodes.forEach(o=>r.push(o));r.length>0;){let o=r.shift();o.nodeType===wt.ELEMENT_NODE&&(e.advance(o)&&e.matched&&(i.add(o),e.rewind()),o.childNodes.forEach(s=>{r.push(s)}))}return Array.from(i)}querySelector(t){let e;t instanceof Io?(e=t,e.reset()):e=new Io(t);let i=[];for(let r=0;r<this.childNodes.length;r++)for(i.push([this.childNodes[r],0,!1]);i.length;){let o=_s(i),s=o[0];if(o[1]===0){if(s.nodeType!==wt.ELEMENT_NODE){i.pop();continue}if((o[2]=e.advance(s))&&e.matched)return s}o[1]<s.childNodes.length?i.push([s.childNodes[o[1]++],0,!1]):(o[2]&&e.rewind(),i.pop())}return null}appendChild(t){return this.childNodes.push(t),t instanceof ui&&(t.parentNode=this),t}prependChild(t){return this.childNodes.unshift(t),t instanceof ui&&(t.parentNode=this),t}get firstChild(){return this.childNodes[0]}get lastChild(){return _s(this.childNodes)}get attributes(){if(this._attrs)return this._attrs;this._attrs={};let t=this.rawAttributes;for(let e in t)this._attrs[e]=(0,Qs.decode)(t[e]);return this._attrs}get rawAttributes(){if(this._rawAttrs)return this._rawAttrs;let t={};if(this.rawAttrs){let e;for(;e=ZF.exec(this.rawAttrs);)t[e[1]]=e[4]||e[5]||e[6]||""}return this._rawAttrs=t,t}setAttribute(t,e){t==="id"?this.id=e:t==="class"&&(this.classNames=e.split(/\s+/));let i=this.attributes;e===void 0?delete i[t]:i[t]=e+"",this._rawAttrs&&(e===void 0?delete this._rawAttrs[t]:this._rawAttrs[t]=(0,Qs.encode)(e+"")),this.rawAttrs=Object.keys(i).map(r=>r+(i[r]===""?"":'="'+(0,Qs.encode)(i[r])+'"')).join(" ")}removeAttribute(t){this.setAttribute(t,void 0)}setAttributes(t){t.id?this.id=t.id:t.class&&(this.classNames=t.class.split(/\s+/)),this.attributes&&(Object.keys(this.attributes).forEach(e=>delete this.attributes[e]),Object.keys(t).forEach(e=>this.attributes[e]=t[e]+"")),this.rawAttributes&&(Object.keys(this.rawAttributes).forEach(e=>delete this.rawAttributes[e]),Object.keys(t).forEach(e=>this.rawAttributes[e]=(0,Qs.encode)(t[e]+""))),this.rawAttrs=Object.keys(t).map(e=>e+(t[e]===""?"":'="'+(0,Qs.encode)(t[e]+"")+'"')).join(" ")}};nt.HTMLElement=ui;var Xd={},lp={f145:function(n,t,e,i,r){"use strict";if(t=t||"",e=e||[],i=i||"",r=r||"",n.id!=t.substr(1))return!1;for(let o=e,s=0;s<o.length;s++)if(n.classNames.indexOf(o[s])===-1)return!1;return!0},f45:function(n,t,e,i,r){"use strict";t=t||"",e=e||[],i=i||"",r=r||"";for(let o=e,s=0;s<o.length;s++)if(n.classNames.indexOf(o[s])===-1)return!1;return!0},f15:function(n,t,e,i,r){"use strict";return t=t||"",e=e||[],i=i||"",r=r||"",n.id==t.substr(1)},f1:function(n,t,e,i,r){"use strict";if(t=t||"",e=e||[],i=i||"",r=r||"",n.id!=t.substr(1))return!1},f5:function(n,t,e,i,r){"use strict";return n=n||{},t=t||"",e=e||[],i=i||"",r=r||"",!0},f245:function(n,t,e,i,r){"use strict";t=t||"",e=e||[],i=i||"",r=r||"";let o=n.attributes;for(let s in o){let a=o[s];if(s==i&&a==r)return!0}return!1},f25:function(n,t,e,i,r){"use strict";t=t||"",e=e||[],i=i||"",r=r||"";let o=n.attributes;for(let s in o){let a=o[s];if(s==i&&a==r)return!0}return!1},f2:function(n,t,e,i,r){"use strict";t=t||"",e=e||[],i=i||"",r=r||"";let o=n.attributes;for(let s in o){let a=o[s];if(s==i&&a==r)return!0}return!1},f345:function(n,t,e,i,r){"use strict";if(t=t||"",e=e||[],i=i||"",r=r||"",n.tagName!=t)return!1;for(let o=e,s=0;s<o.length;s++)if(n.classNames.indexOf(o[s])===-1)return!1;return!0},f35:function(n,t,e,i,r){"use strict";return t=t||"",e=e||[],i=i||"",r=r||"",n.tagName==t},f3:function(n,t,e,i,r){"use strict";if(t=t||"",e=e||[],i=i||"",r=r||"",n.tagName!=t)return!1}},Io=class{constructor(t){this.nextMatch=0,lp.f5=lp.f5,this.matchers=t.split(" ").map(e=>{if(Xd[e])return Xd[e];let i=e.split("."),r=i[0],o=i.slice(1).sort(),s='"use strict";',a="f",c="",l="";if(r&&r!="*"){let h;if(r[0]=="#")s+="if (el.id != "+JSON.stringify(r.substr(1))+") return false;",a+="1";else if(h=r.match(/^\[\s*(\S+)\s*(=|!=)\s*((((["'])([^\6]*)\6))|(\S*?))\]\s*/)){c=h[1];let u=h[2];if(u!=="="&&u!=="!=")throw new Error("Selector not supported, Expect [key${op}value].op must be =,!=");u==="="&&(u="=="),l=h[7]||h[8],s+=`let attrs = el.attributes;for (let key in attrs){const val = attrs[key]; if (key == "${c}" && val == "${l}"){return true;}} return false;`,a+="2"}else s+="if (el.tagName != "+JSON.stringify(r)+") return false;",a+="3"}o.length>0&&(s+="for (let cls = "+JSON.stringify(o)+", i = 0; i < cls.length; i++) if (el.classNames.indexOf(cls[i]) === -1) return false;",a+="4"),s+="return true;",a+="5";let d={func:lp[a],tagName:r||"",classes:o||"",attr_key:c||"",value:l||""};return s=s||"",Xd[e]=d})}advance(t){return this.nextMatch<this.matchers.length&&this.matchers[this.nextMatch].func(t,this.matchers[this.nextMatch].tagName,this.matchers[this.nextMatch].classes,this.matchers[this.nextMatch].attr_key,this.matchers[this.nextMatch].value)?(this.nextMatch++,!0):!1}rewind(){this.nextMatch--}get matched(){return this.nextMatch==this.matchers.length}reset(){this.nextMatch=0}flushCache(){Xd={}}};nt.Matcher=Io;var En=/<!--[^]*?(?=-->)-->|<(\/?)([a-z][-.:0-9_a-z]*)((\s+[a-z][-.:0-9_a-z]*(\s*=\s*("[^"]*"|'([^']*')|([^\s\/>]+)))?)*)\s*(\/?)>/ig,XF=/(^|\s)(id|class)\s*=\s*("([^"]+)"|'([^']+)'|(\S+))/ig,ZF=/([a-z][-.:0-9_a-z]*)(\s*=\s*("([^"]*)"|'([^']*)'|(\S+)))?/ig,YF={area:!0,base:!0,br:!0,col:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,source:!0},ix={li:{li:!0},p:{p:!0,div:!0},b:{div:!0},td:{td:!0,th:!0},th:{td:!0,th:!0},h1:{h1:!0},h2:{h2:!0},h3:{h3:!0},h4:{h4:!0},h5:{h5:!0},h6:{h6:!0}},nx={li:{ul:!0,ol:!0},a:{div:!0},b:{div:!0},i:{div:!0},p:{div:!0},td:{tr:!0,table:!0},th:{tr:!0,table:!0}},JF={script:!0,noscript:!0,style:!0,pre:!0};function cp(n,t){let e=new ui(null),i=e,r=[e],o=0;t=t||{};let s;for(;s=En.exec(n);){if(Si&&console.log("match",s[0]),o+s[0].length<En.lastIndex){let a=n.substring(o,En.lastIndex-s[0].length);Si&&console.log("text node",a),i.appendChild(new Lo(a))}if(o=En.lastIndex,s[0][1]=="!"){if(t.comment){let a=n.substring(o-3,o-s[0].length+4);Si&&console.log("comment node",a),i.appendChild(new Zd(a))}continue}if(t.lowerCaseTagName&&(s[2]=s[2].toLowerCase()),!s[1]&&(!s[9]&&ix[i.tagName]&&ix[i.tagName][s[2]]&&(Si&&console.log("closed",i.tagName,"when opening",s[2]),r.pop(),i=_s(r)),Si&&console.log("add",s[2],"tag to the stack"),i=i.appendChild(new ui(s[2],s[3].trim())),r.push(i),JF[s[2]])){let a="</"+s[2]+">",c=n.indexOf(a,En.lastIndex);if(t[s[2]]){let l;c==-1?l=n.substr(En.lastIndex):l=n.substring(En.lastIndex,c),l.length>0&&(Si&&console.log("add text node as child of",s[2]),i.appendChild(new Lo(l)))}c==-1?o=En.lastIndex=n.length+1:(o=En.lastIndex=c+a.length,s[1]="true")}if(s[1]||s[9]||YF[s[2]])for(;;)if(i.tagName==s[2]){Si&&console.log("met the end of",s[2]),r.pop(),i=_s(r);break}else{if(nx[i.tagName]&&nx[i.tagName][s[2]]){Si&&console.log("closing",i.tagName,"due to meeting",s[2]),r.pop(),i=_s(r);continue}break}}for(o<n.length&&(Si&&console.log("Final text node",n.substring(o)),e.appendChild(new Lo(n.substring(o)))),e.valid=r.length===1;r.length>1;){let a=r.pop(),c=_s(r);a.parentNode&&a.parentNode instanceof ui&&a.parentNode.parentNode&&(a.parentNode===c&&a.tagName===c.tagName?(Si&&console.log(a.tagName,"is probably supposed to close",c.tagName),c.removeChild(a),a.childNodes.forEach(l=>{c.parentNode.appendChild(l)}),r.pop()):(Si&&console.log("no close tag found for",a.tagName,". Removing"),c.removeChild(a),a.childNodes.forEach(l=>{c.appendChild(l)})))}return e}nt.parse=cp;var QF=["html","body","address","article","aside","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","header","hr","li","main","nav","noscript","ol","p","pre","section","tfoot","table","tbody","ul","video","th","td","tr","h1","h2","h3","h4","h5","h6"];function _F(n){return n.nodeType===wt.ELEMENT_NODE&&n.tagName&&QF.includes(n.tagName.toLowerCase())}nt.isBlock=_F});var zP={};Yh(zP,{default:()=>Xh});module.exports=ay(zP);var De=require("obsidian");var fp={};Yh(fp,{AFRelationship:()=>gs,AcroButtonFlags:()=>dt,AcroChoiceFlags:()=>oe,AcroFieldFlags:()=>Ot,AcroTextFlags:()=>Ie,AnnotationFlags:()=>xo,AppearanceCharacteristics:()=>ks,BlendMode:()=>Di,Cache:()=>ct,CharCodes:()=>y,ColorTypes:()=>Po,CombedTextLayoutError:()=>hc,CorruptPageTreeError:()=>ls,CustomFontEmbedder:()=>ir,CustomFontSubsetEmbedder:()=>pd,Duplex:()=>Fs,EncryptedPDFError:()=>ko,ExceededMaxLengthError:()=>uc,FieldAlreadyExistsError:()=>Ws,FieldExistsAsNonTerminalError:()=>Gf,FileEmbedder:()=>gd,FillRule:()=>Wi,FontkitNotRegisteredError:()=>oc,ForeignPageError:()=>sc,ImageAlignment:()=>si,IndexOutOfBoundsError:()=>hn,InvalidAcroFieldValueError:()=>un,InvalidFieldNamePartError:()=>cc,InvalidMaxLengthError:()=>fc,InvalidPDFDateStringError:()=>qr,InvalidTargetIndexError:()=>as,JpegEmbedder:()=>bs,LineCapStyle:()=>_t,LineJoinStyle:()=>yo,MethodNotImplementedError:()=>Ge,MissingCatalogError:()=>$u,MissingDAEntryError:()=>il,MissingKeywordError:()=>hl,MissingOnValueCheckError:()=>Kf,MissingPDFHeaderError:()=>dl,MissingPageContentsEmbeddingError:()=>Qa,MissingTfOperatorError:()=>nl,MultiSelectValueError:()=>tl,NextByteAssertionError:()=>rl,NoSuchFieldError:()=>lc,NonFullScreenPageMode:()=>eo,NumberParsingError:()=>cs,PDFAcroButton:()=>nr,PDFAcroCheckBox:()=>bn,PDFAcroChoice:()=>Ds,PDFAcroComboBox:()=>xn,PDFAcroField:()=>Ps,PDFAcroForm:()=>or,PDFAcroListBox:()=>Pn,PDFAcroNonTerminal:()=>yn,PDFAcroPushButton:()=>vn,PDFAcroRadioButton:()=>Fn,PDFAcroSignature:()=>rr,PDFAcroTerminal:()=>Et,PDFAcroText:()=>wn,PDFAnnotation:()=>yd,PDFArray:()=>H,PDFArrayIsNotRectangleError:()=>el,PDFBool:()=>yi,PDFButton:()=>hi,PDFCatalog:()=>Cs,PDFCheckBox:()=>Vt,PDFContentStream:()=>Hi,PDFContext:()=>Yr,PDFCrossRefSection:()=>hs,PDFCrossRefStream:()=>hd,PDFDict:()=>R,PDFDocument:()=>pe,PDFDropdown:()=>li,PDFEmbeddedPage:()=>Pi,PDFField:()=>$e,PDFFlateStream:()=>_n,PDFFont:()=>Se,PDFForm:()=>Sn,PDFHeader:()=>Bi,PDFHexString:()=>M,PDFImage:()=>oi,PDFInvalidObject:()=>ps,PDFInvalidObjectParsingError:()=>sl,PDFJavaScript:()=>Cn,PDFName:()=>x,PDFNull:()=>Me,PDFNumber:()=>N,PDFObject:()=>fe,PDFObjectCopier:()=>ml,PDFObjectParser:()=>Es,PDFObjectParsingError:()=>ol,PDFObjectStream:()=>us,PDFObjectStreamParser:()=>Pd,PDFOperator:()=>_,PDFOperatorNames:()=>ee,PDFOptionList:()=>ci,PDFPage:()=>Pe,PDFPageEmbedder:()=>vs,PDFPageLeaf:()=>tt,PDFPageTree:()=>Ts,PDFParser:()=>Wl,PDFParsingError:()=>xi,PDFRadioGroup:()=>Bt,PDFRawStream:()=>wi,PDFRef:()=>q,PDFSignature:()=>ki,PDFStream:()=>Fe,PDFStreamParsingError:()=>al,PDFStreamWriter:()=>ud,PDFString:()=>G,PDFTextField:()=>di,PDFTrailer:()=>$n,PDFTrailerDict:()=>dd,PDFWidgetAnnotation:()=>oo,PDFWriter:()=>fs,PDFXRefStreamParser:()=>kd,PageEmbeddingMismatchedContextError:()=>$a,PageSizes:()=>So,ParseSpeeds:()=>pc,PngEmbedder:()=>ys,PrintScaling:()=>io,PrivateConstructorError:()=>cn,ReadingDirection:()=>to,RemovePageFromEmptyDocumentError:()=>ac,ReparseError:()=>dn,RichTextFieldReadError:()=>dc,RotationTypes:()=>Is,StalledParserError:()=>cl,StandardFontEmbedder:()=>tr,StandardFontValues:()=>O0,StandardFonts:()=>Do,TextAlignment:()=>He,TextRenderingMode:()=>vf,UnbalancedParenthesisError:()=>ll,UnexpectedFieldTypeError:()=>Fi,UnexpectedObjectTypeError:()=>Vi,UnrecognizedStreamTypeError:()=>_a,UnsupportedEncodingError:()=>Ja,ViewerPreferences:()=>El,addRandomSuffix:()=>cy,adjustDimsForRotation:()=>qi,appendBezierCurve:()=>bt,appendQuadraticCurve:()=>Ns,arrayAsString:()=>nn,asNumber:()=>$,asPDFName:()=>As,asPDFNumber:()=>j,assertEachIs:()=>Ga,assertInteger:()=>_u,assertIs:()=>S,assertIsOneOf:()=>Xt,assertIsOneOfOrUndefined:()=>gt,assertIsSubset:()=>Qu,assertMultiple:()=>Xa,assertOrUndefined:()=>I,assertPositive:()=>ln,assertRange:()=>lt,assertRangeOrUndefined:()=>Ct,backtick:()=>Ke,beginMarkedContent:()=>Ed,beginText:()=>Jl,breakTextIntoLines:()=>iu,byAscendingId:()=>ou,bytesFor:()=>jn,canBeConvertedToUint8Array:()=>du,charAtIndex:()=>qc,charFromCode:()=>kt,charFromHexCode:()=>$h,charSplit:()=>tu,cleanText:()=>zn,clip:()=>Kl,clipEvenOdd:()=>Jv,closePath:()=>ei,cmyk:()=>Rd,colorString:()=>Rf,colorToComponents:()=>Vd,componentsToColor:()=>ht,concatTransformationMatrix:()=>$t,copyStringIntoBuffer:()=>be,createPDFAcroField:()=>wd,createPDFAcroFields:()=>Ss,createTypeErrorMsg:()=>H0,createValueErrorMsg:()=>R0,decodeFromBase64:()=>Jh,decodeFromBase64DataUri:()=>_h,decodePDFRawStream:()=>ws,defaultButtonAppearanceProvider:()=>Jf,defaultCheckBoxAppearanceProvider:()=>Zf,defaultDropdownAppearanceProvider:()=>_f,defaultOptionListAppearanceProvider:()=>$f,defaultRadioGroupAppearanceProvider:()=>Yf,defaultTextFieldAppearanceProvider:()=>Qf,degrees:()=>X,degreesToRadians:()=>Jt,drawButton:()=>Hd,drawCheckBox:()=>zs,drawCheckMark:()=>Hb,drawEllipse:()=>nc,drawEllipsePath:()=>Bb,drawImage:()=>rc,drawLine:()=>qf,drawLinesOfText:()=>Uf,drawObject:()=>Vs,drawOptionList:()=>jf,drawPage:()=>zf,drawRadioButton:()=>qs,drawRectangle:()=>dr,drawSvgPath:()=>Wf,drawText:()=>CF,drawTextField:()=>zd,drawTextLines:()=>Ud,encodeToBase64:()=>Qh,endMarkedContent:()=>Ad,endPath:()=>Zl,endText:()=>Ql,error:()=>Kn,escapeRegExp:()=>vg,escapedNewlineChars:()=>Fg,fill:()=>Gl,fillAndStroke:()=>Xl,fillEvenOdd:()=>Ff,findLastMatch:()=>Go,getType:()=>V0,grayscale:()=>Nd,hasSurrogates:()=>fu,hasUtf16BOM:()=>Da,highSurrogate:()=>Wc,isArrayEqual:()=>Xo,isNewlineChar:()=>eu,isStandardFont:()=>ld,isType:()=>B0,isWithinBMP:()=>uu,last:()=>Ir,layoutCombedText:()=>Xf,layoutMultilineText:()=>qd,layoutSinglelineText:()=>js,lineSplit:()=>wa,lineTo:()=>Ve,lowSurrogate:()=>jc,mergeIntoTypedArray:()=>nu,mergeLines:()=>zc,mergeUint8Arrays:()=>ru,moveText:()=>tF,moveTo:()=>At,newlineChars:()=>dy,nextLine:()=>Pf,normalizeAppearance:()=>Rt,numberToString:()=>pu,padStart:()=>Dt,parseDate:()=>va,pdfDocEncodingDecode:()=>Za,pluckIndices:()=>cu,popGraphicsState:()=>Re,pushGraphicsState:()=>Ne,radians:()=>Yv,radiansToDegrees:()=>hb,range:()=>lu,rectangle:()=>ub,rectanglesAreEqual:()=>ss,reduceRotation:()=>Qt,restoreDashPattern:()=>_v,reverseArray:()=>qn,rgb:()=>ne,rotateAndSkewTextDegreesAndTranslate:()=>sF,rotateAndSkewTextRadiansAndTranslate:()=>Rs,rotateDegrees:()=>Ls,rotateInPlace:()=>ii,rotateRadians:()=>lr,rotateRectangle:()=>wf,scale:()=>ar,setCharacterSpacing:()=>iF,setCharacterSqueeze:()=>rF,setDashPattern:()=>wo,setFillingCmykColor:()=>Ef,setFillingColor:()=>ti,setFillingGrayscaleColor:()=>Df,setFillingRgbColor:()=>Cf,setFontAndSize:()=>Fo,setGraphicsState:()=>ji,setLineCap:()=>Ms,setLineHeight:()=>kf,setLineJoin:()=>$v,setLineWidth:()=>kn,setStrokingCmykColor:()=>Af,setStrokingColor:()=>Dn,setStrokingGrayscaleColor:()=>Sf,setStrokingRgbColor:()=>Tf,setTextMatrix:()=>fb,setTextRenderingMode:()=>Td,setTextRise:()=>oF,setWordSpacing:()=>nF,showText:()=>Yl,singleQuote:()=>N0,sizeInBytes:()=>Zo,skewDegrees:()=>Qv,skewRadians:()=>Os,sortedUniq:()=>su,square:()=>eF,stringAsByteArray:()=>Ko,stroke:()=>vo,sum:()=>au,toCharCode:()=>Q,toCodePoint:()=>Uc,toDegrees:()=>jl,toHexString:()=>Ii,toHexStringOfMinLength:()=>Ai,toRadians:()=>qe,toUint8Array:()=>Lr,translate:()=>mt,typedArrayFor:()=>Fa,utf16Decode:()=>ka,utf16Encode:()=>hu,utf8Encode:()=>fy,values:()=>os,waitForTick:()=>gi});var jo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ya=new Uint8Array(256);for(let n=0;n<jo.length;n++)ya[jo.charCodeAt(n)]=n;var Qh=n=>{let t="",e=n.length;for(let i=0;i<e;i+=3)t+=jo[n[i]>>2],t+=jo[(n[i]&3)<<4|n[i+1]>>4],t+=jo[(n[i+1]&15)<<2|n[i+2]>>6],t+=jo[n[i+2]&63];return e%3===2?t=t.substring(0,t.length-1)+"=":e%3===1&&(t=t.substring(0,t.length-2)+"=="),t},Jh=n=>{let t=n.length*.75,e=n.length,i,r=0,o,s,a,c;n[n.length-1]==="="&&(t--,n[n.length-2]==="="&&t--);let l=new Uint8Array(t);for(i=0;i<e;i+=4)o=ya[n.charCodeAt(i)],s=ya[n.charCodeAt(i+1)],a=ya[n.charCodeAt(i+2)],c=ya[n.charCodeAt(i+3)],l[r++]=o<<2|s>>4,l[r++]=(s&15)<<4|a>>2,l[r++]=(a&3)<<6|c&63;return l},ly=/^(data)?:?([\w\/\+]+)?;?(charset=[\w-]+|base64)?.*,/i,_h=n=>{let t=n.trim(),i=t.substring(0,100).match(ly);if(!i)return Jh(t);let[r]=i,o=t.substring(r.length);return Jh(o)};var Q=n=>n.charCodeAt(0),Uc=n=>n.codePointAt(0),Ai=(n,t)=>Dt(n.toString(16),t,"0").toUpperCase(),Ii=n=>Ai(n,2),kt=n=>String.fromCharCode(n),$h=n=>kt(parseInt(n,16)),Dt=(n,t,e)=>{let i="";for(let r=0,o=t-n.length;r<o;r++)i+=e;return i+n},Ko=n=>{let t=new Uint8Array(n.length);return be(n,t,0),t},be=(n,t,e)=>{let i=n.length;for(let r=0;r<i;r++)t[e++]=n.charCodeAt(r);return i},cy=(n,t=4)=>`${n}-${Math.floor(Math.random()*10**t)}`,vg=n=>n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),zn=n=>n.replace(/\t|\u0085|\u2028|\u2029/g," ").replace(/[\b\v]/g,""),Fg=["\\n","\\f","\\r","\\u000B"],dy=[`
`,"\f","\r","\v"],eu=n=>/^[\n\f\r\u000B]$/.test(n),wa=n=>n.split(/[\n\f\r\u000B]/),zc=n=>n.replace(/[\n\f\r\u000B]/g," "),qc=(n,t)=>{let e=n.charCodeAt(t),i,r=t+1,o=1;return e>=55296&&e<=56319&&n.length>r&&(i=n.charCodeAt(r),i>=56320&&i<=57343&&(o=2)),[n.slice(t,t+o),o]},tu=n=>{let t=[];for(let e=0,i=n.length;e<i;){let[r,o]=qc(n,e);t.push(r),e+=o}return t},hy=n=>{let t=Fg.join("|"),e=["$"];for(let r=0,o=n.length;r<o;r++){let s=n[r];if(eu(s))throw new TypeError(`\`wordBreak\` must not include ${t}`);e.push(s===""?".":vg(s))}let i=e.join("|");return new RegExp(`(${t})|((.*?)(${i}))`,"gm")},iu=(n,t,e,i)=>{let r=hy(t),o=zn(n).match(r),s="",a=0,c=[],l=()=>{s!==""&&c.push(s),s="",a=0};for(let d=0,h=o.length;d<h;d++){let u=o[d];if(eu(u))l();else{let f=i(u);a+f>e&&l(),s+=u,a+=f}}return l(),c},uy=/^D:(\d\d\d\d)(\d\d)?(\d\d)?(\d\d)?(\d\d)?(\d\d)?([+\-Z])?(\d\d)?'?(\d\d)?'?$/,va=n=>{let t=n.match(uy);if(!t)return;let[,e,i="01",r="01",o="00",s="00",a="00",c="Z",l="00",d="00"]=t,h=c==="Z"?"Z":`${c}${l}:${d}`;return new Date(`${e}-${i}-${r}T${o}:${s}:${a}${h}`)},Go=(n,t)=>{var e;let i=0,r;for(;i<n.length;){let o=n.substring(i).match(t);if(!o)return{match:r,pos:i};r=o,i+=((e=o.index)!==null&&e!==void 0?e:0)+o[0].length}return{match:r,pos:i}};var Ir=n=>n[n.length-1],Fa=n=>{if(n instanceof Uint8Array)return n;let t=n.length,e=new Uint8Array(t);for(let i=0;i<t;i++)e[i]=n.charCodeAt(i);return e},nu=(...n)=>{let t=n.length,e=[];for(let s=0;s<t;s++){let a=n[s];e[s]=a instanceof Uint8Array?a:Fa(a)}let i=0;for(let s=0;s<t;s++)i+=n[s].length;let r=new Uint8Array(i),o=0;for(let s=0;s<t;s++){let a=e[s];for(let c=0,l=a.length;c<l;c++)r[o++]=a[c]}return r},ru=n=>{let t=0;for(let r=0,o=n.length;r<o;r++)t+=n[r].length;let e=new Uint8Array(t),i=0;for(let r=0,o=n.length;r<o;r++){let s=n[r];e.set(s,i),i+=s.length}return e},nn=n=>{let t="";for(let e=0,i=n.length;e<i;e++)t+=kt(n[e]);return t},ou=(n,t)=>n.id-t.id,su=(n,t)=>{let e=[];for(let i=0,r=n.length;i<r;i++){let o=n[i],s=n[i-1];(i===0||t(o)!==t(s))&&e.push(o)}return e},Xo=(n,t)=>{if(n.length!==t.length)return!1;for(let e=0,i=n.length;e<i;e++)if(n[e]!==t[e])return!1;return!0},qn=n=>{let t=n.length;for(let e=0,i=Math.floor(t/2);e<i;e++){let r=e,o=t-e-1,s=n[e];n[r]=n[o],n[o]=s}return n},au=n=>{let t=0;for(let e=0,i=n.length;e<i;e++)t+=n[e];return t},lu=(n,t)=>{let e=new Array(t-n);for(let i=0,r=e.length;i<r;i++)e[i]=n+i;return e},cu=(n,t)=>{let e=new Array(t.length);for(let i=0,r=t.length;i<r;i++)e[i]=n[t[i]];return e},du=n=>n instanceof Uint8Array||n instanceof ArrayBuffer||typeof n=="string",Lr=n=>{if(typeof n=="string")return _h(n);if(n instanceof ArrayBuffer)return new Uint8Array(n);if(n instanceof Uint8Array)return n;throw new TypeError("`input` must be one of `string | ArrayBuffer | Uint8Array`")};var gi=()=>new Promise(n=>{setTimeout(()=>n(),0)});var fy=(n,t=!0)=>{let e=[];t&&e.push(239,187,191);for(let i=0,r=n.length;i<r;){let o=n.codePointAt(i);if(o<128){let s=o&127;e.push(s),i+=1}else if(o<2048){let s=o>>6&31|192,a=o&63|128;e.push(s,a),i+=1}else if(o<65536){let s=o>>12&15|224,a=o>>6&63|128,c=o&63|128;e.push(s,a,c),i+=1}else if(o<1114112){let s=o>>18&7|240,a=o>>12&63|128,c=o>>6&63|128,l=o>>0&63|128;e.push(s,a,c,l),i+=2}else throw new Error(`Invalid code point: 0x${Ii(o)}`)}return new Uint8Array(e)},hu=(n,t=!0)=>{let e=[];t&&e.push(65279);for(let i=0,r=n.length;i<r;){let o=n.codePointAt(i);if(o<65536)e.push(o),i+=1;else if(o<1114112)e.push(Wc(o),jc(o)),i+=2;else throw new Error(`Invalid code point: 0x${Ii(o)}`)}return new Uint16Array(e)},uu=n=>n>=0&&n<=65535,fu=n=>n>=65536&&n<=1114111,Wc=n=>Math.floor((n-65536)/1024)+55296,jc=n=>(n-65536)%1024+56320,Wn;(function(n){n.BigEndian="BigEndian",n.LittleEndian="LittleEndian"})(Wn||(Wn={}));var Pa="\uFFFD".codePointAt(0),ka=(n,t=!0)=>{if(n.length<=1)return String.fromCodePoint(Pa);let e=t?gy(n):Wn.BigEndian,i=t?2:0,r=[];for(;n.length-i>=2;){let o=kg(n[i++],n[i++],e);if(py(o))if(n.length-i<2)r.push(Pa);else{let s=kg(n[i++],n[i++],e);Pg(s)?r.push(o,s):r.push(Pa)}else Pg(o)?(i+=2,r.push(Pa)):r.push(o)}return i<n.length&&r.push(Pa),String.fromCodePoint(...r)},py=n=>n>=55296&&n<=56319,Pg=n=>n>=56320&&n<=57343,kg=(n,t,e)=>{if(e===Wn.LittleEndian)return t<<8|n;if(e===Wn.BigEndian)return n<<8|t;throw new Error(`Invalid byteOrder: ${e}`)},gy=n=>Dg(n)?Wn.BigEndian:Sg(n)?Wn.LittleEndian:Wn.BigEndian,Dg=n=>n[0]===254&&n[1]===255,Sg=n=>n[0]===255&&n[1]===254,Da=n=>Dg(n)||Sg(n);var pu=n=>{let t=String(n);if(Math.abs(n)<1){let e=parseInt(n.toString().split("e-")[1]);if(e){let i=n<0;i&&(n*=-1),n*=Math.pow(10,e-1),t="0."+new Array(e).join("0")+n.toString().substring(2),i&&(t="-"+t)}}else{let e=parseInt(n.toString().split("+")[1]);e>20&&(e-=20,n/=Math.pow(10,e),t=n.toString()+new Array(e+1).join("0"))}return t},Zo=n=>Math.ceil(n.toString(2).length/8),jn=n=>{let t=new Uint8Array(Zo(n));for(let e=1;e<=t.length;e++)t[e-1]=n>>(t.length-e)*8;return t};var Kn=n=>{throw new Error(n)};var p0=Un(qa()),f0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ja=new Uint8Array(256);for(Wa=0;Wa<f0.length;Wa++)ja[f0.charCodeAt(Wa)]=Wa;var Wa,lv=function(n){var t=n.length*.75,e=n.length,i,r=0,o,s,a,c;n[n.length-1]==="="&&(t--,n[n.length-2]==="="&&t--);var l=new Uint8Array(t);for(i=0;i<e;i+=4)o=ja[n.charCodeAt(i)],s=ja[n.charCodeAt(i+1)],a=ja[n.charCodeAt(i+2)],c=ja[n.charCodeAt(i+3)],l[r++]=o<<2|s>>4,l[r++]=(s&15)<<4|a>>2,l[r++]=(a&3)<<6|c&63;return l},cv=function(n){for(var t="",e=0;e<n.length;e++)t+=String.fromCharCode(n[e]);return t},ad=function(n){return cv(p0.default.inflate(lv(n)))},g0=function(n,t,e){for(var i="",r=0,o=t-n.length;r<o;r++)i+=e;return i+n};var m0="eJyFWdtyGjkQ/RVqnnar8Bb4lpg3jEnCxgEvGDtxKg9iphm01oyILrZxKv++mrGd3az6KC8UnNa0+nrUGr5l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UxjxNFfKRo3CLhnIJBMFRvMZpqpNBMlQJzGT5WFQMVQI/AikPMIhEU1aDjqJvQwmjSHB05cC9jbYwc5UtAHNLhDw41ha+lEqF4JaH3gmB61SYcqInxTDmQK8v08vjqv4zDf1N0w3Lf4A8/vwPpfK11w==";var kv={Courier:y0,"Courier-Bold":m0,"Courier-Oblique":x0,"Courier-BoldOblique":b0,Helvetica:P0,"Helvetica-Bold":w0,"Helvetica-Oblique":F0,"Helvetica-BoldOblique":v0,"Times-Roman":C0,"Times-Bold":k0,"Times-Italic":S0,"Times-BoldItalic":D0,Symbol:T0,ZapfDingbats:E0},zr;(function(n){n.Courier="Courier",n.CourierBold="Courier-Bold",n.CourierOblique="Courier-Oblique",n.CourierBoldOblique="Courier-BoldOblique",n.Helvetica="Helvetica",n.HelveticaBold="Helvetica-Bold",n.HelveticaOblique="Helvetica-Oblique",n.HelveticaBoldOblique="Helvetica-BoldOblique",n.TimesRoman="Times-Roman",n.TimesRomanBold="Times-Bold",n.TimesRomanItalic="Times-Italic",n.TimesRomanBoldItalic="Times-BoldItalic",n.Symbol="Symbol",n.ZapfDingbats="ZapfDingbats"})(zr||(zr={}));var A0={},I0=function(){function n(){var t=this;this.getWidthOfGlyph=function(e){return t.CharWidths[e]},this.getXAxisKerningForPair=function(e,i){return(t.KernPairXAmounts[e]||{})[i]}}return n.load=function(t){var e=A0[t];if(e)return e;var i=ad(kv[t]),r=Object.assign(new n,JSON.parse(i));return r.CharWidths=r.CharMetrics.reduce(function(o,s){return o[s.N]=s.WX,o},{}),r.KernPairXAmounts=r.KernPairs.reduce(function(o,s){var a=s[0],c=s[1],l=s[2];return o[a]||(o[a]={}),o[a][c]=l,o},{}),A0[t]=r,r},n}();var L0="eJztWsuy48iN/Ret74KZfHtX47meqfGjPHaXx4/wgpJ4JbooUU1JVXXb0f9u4JwESF13R7TD29koIpFi8gCJBHDA/Pvm+nraTuPmZ3/f5HHzs7/k8WlzvXS7fvPXp02eqyR/2vRfd2N3gqhUU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FhbSvll1I+1t0C3NfTBcX5v4IeSHv5sYxX7g7H86dt+/Wbpw7c+8XsLkz934Bmztz79+AzZ2+9w+4cmfww2ptZ/DDam1n8MPbtZ3GDw9rs9ui3KZPblw4tz8vJiuc208LhMK5/bRAKJzbT28gFE7wp9XCTvCnR1zO8ZeLw7Fwjj8tTlw4x78v0Ern+PcFWukc//4GWulE//6AonSu/7paxrn+zZ2YnRclRK/rBXJsCAjxh2cKEAWVJ02ku/wOoFv2+12XkmnODwHgW4uQGVbZ0uM7mAJ1b/68/JlpUMnWdy5MF6/Vd5eL19YYSPd6FqPwBkNQo/h2NQxdQQ3bn/dpCxrGrqCW7U8rKZl/mfi0Xytk3Am66ZhYbg4y+KAVslDwbXdNL2d5qU5hnYBlTZaa6hs2t1qWdaeeTptcLco+hl5R7w4H5uOGcQbtEkpT18GusOI2xT9dYcVJf7zCSjmbD+Iud2s1NPRb9E+0UICmizb8ZK/+5JOLOulSqwaw5VJr2vB8dSFn89fvv/8H0oq1dA==";var Sv=ad(L0),Yu=JSON.parse(Sv),Ju=function(){function n(t,e){var i=this;this.canEncodeUnicodeCodePoint=function(r){return r in i.unicodeMappings},this.encodeUnicodeCodePoint=function(r){var o=i.unicodeMappings[r];if(!o){var s=String.fromCharCode(r),a="0x"+g0(r.toString(16),4,"0"),c=i.name+' cannot encode "'+s+'" ('+a+")";throw new Error(c)}return{code:o[0],name:o[1]}},this.name=t,this.supportedCodePoints=Object.keys(e).map(Number).sort(function(r,o){return r-o}),this.unicodeMappings=e}return n}(),Ka={Symbol:new Ju("Symbol",Yu.symbol),ZapfDingbats:new Ju("ZapfDingbats",Yu.zapfdingbats),WinAnsi:new Ju("WinAnsi",Yu.win1252)};var os=n=>Object.keys(n).map(t=>n[t]),O0=os(zr),ld=n=>O0.includes(n),ss=(n,t)=>n.x===t.x&&n.y===t.y&&n.width===t.width&&n.height===t.height;var Ke=n=>`\`${n}\``,N0=n=>`'${n}'`,M0=n=>{let t=typeof n;return t==="string"?N0(n):t==="undefined"?Ke(n):n},R0=(n,t,e)=>{let i=new Array(e.length);for(let o=0,s=e.length;o<s;o++){let a=e[o];i[o]=M0(a)}let r=i.join(" or ");return`${Ke(t)} must be one of ${r}, but was actually ${M0(n)}`},Xt=(n,t,e)=>{Array.isArray(e)||(e=os(e));for(let i=0,r=e.length;i<r;i++)if(n===e[i])return;throw new TypeError(R0(n,t,e))},gt=(n,t,e)=>{Array.isArray(e)||(e=os(e)),Xt(n,t,e.concat(void 0))},Qu=(n,t,e)=>{Array.isArray(e)||(e=os(e));for(let i=0,r=n.length;i<r;i++)Xt(n[i],t,e)},V0=n=>n===null?"null":n===void 0?"undefined":typeof n=="string"?"string":isNaN(n)?"NaN":typeof n=="number"?"number":typeof n=="boolean"?"boolean":typeof n=="symbol"?"symbol":typeof n=="bigint"?"bigint":n.constructor&&n.constructor.name?n.constructor.name:n.name?n.name:n.constructor?String(n.constructor):String(n),B0=(n,t)=>t==="null"?n===null:t==="undefined"?n===void 0:t==="string"?typeof n=="string":t==="number"?typeof n=="number"&&!isNaN(n):t==="boolean"?typeof n=="boolean":t==="symbol"?typeof n=="symbol":t==="bigint"?typeof n=="bigint":t===Date?n instanceof Date:t===Array?n instanceof Array:t===Uint8Array?n instanceof Uint8Array:t===ArrayBuffer?n instanceof ArrayBuffer:t===Function?n instanceof Function:n instanceof t[0],H0=(n,t,e)=>{let i=new Array(e.length);for(let o=0,s=e.length;o<s;o++){let a=e[o];a==="null"&&(i[o]=Ke("null")),a==="undefined"&&(i[o]=Ke("undefined")),a==="string"?i[o]=Ke("string"):a==="number"?i[o]=Ke("number"):a==="boolean"?i[o]=Ke("boolean"):a==="symbol"?i[o]=Ke("symbol"):a==="bigint"?i[o]=Ke("bigint"):a===Array?i[o]=Ke("Array"):a===Uint8Array?i[o]=Ke("Uint8Array"):a===ArrayBuffer?i[o]=Ke("ArrayBuffer"):i[o]=Ke(a[1])}let r=i.join(" or ");return`${Ke(t)} must be of type ${r}, but was actually of type ${Ke(V0(n))}`},S=(n,t,e)=>{for(let i=0,r=e.length;i<r;i++)if(B0(n,e[i]))return;throw new TypeError(H0(n,t,e))},I=(n,t,e)=>{S(n,t,e.concat("undefined"))},Ga=(n,t,e)=>{for(let i=0,r=n.length;i<r;i++)S(n[i],t,e)},lt=(n,t,e,i)=>{if(S(n,t,["number"]),S(e,"min",["number"]),S(i,"max",["number"]),i=Math.max(e,i),n<e||n>i)throw new Error(`${Ke(t)} must be at least ${e} and at most ${i}, but was actually ${n}`)},Ct=(n,t,e,i)=>{S(n,t,["number","undefined"]),typeof n=="number"&&lt(n,t,e,i)},Xa=(n,t,e)=>{if(S(n,t,["number"]),n%e!==0)throw new Error(`${Ke(t)} must be a multiple of ${e}, but was actually ${n}`)},_u=(n,t)=>{if(!Number.isInteger(n))throw new Error(`${Ke(t)} must be an integer, but was actually ${n}`)},ln=(n,t)=>{if(![1,0].includes(Math.sign(n)))throw new Error(`${Ke(t)} must be a positive number or 0, but was actually ${n}`)};var ie=new Uint16Array(256);for(let n=0;n<256;n++)ie[n]=n;ie[22]=Q("");ie[24]=Q("\u02D8");ie[25]=Q("\u02C7");ie[26]=Q("\u02C6");ie[27]=Q("\u02D9");ie[28]=Q("\u02DD");ie[29]=Q("\u02DB");ie[30]=Q("\u02DA");ie[31]=Q("\u02DC");ie[127]=Q("\uFFFD");ie[128]=Q("\u2022");ie[129]=Q("\u2020");ie[130]=Q("\u2021");ie[131]=Q("\u2026");ie[132]=Q("\u2014");ie[133]=Q("\u2013");ie[134]=Q("\u0192");ie[135]=Q("\u2044");ie[136]=Q("\u2039");ie[137]=Q("\u203A");ie[138]=Q("\u2212");ie[139]=Q("\u2030");ie[140]=Q("\u201E");ie[141]=Q("\u201C");ie[142]=Q("\u201D");ie[143]=Q("\u2018");ie[144]=Q("\u2019");ie[145]=Q("\u201A");ie[146]=Q("\u2122");ie[147]=Q("\uFB01");ie[148]=Q("\uFB02");ie[149]=Q("\u0141");ie[150]=Q("\u0152");ie[151]=Q("\u0160");ie[152]=Q("\u0178");ie[153]=Q("\u017D");ie[154]=Q("\u0131");ie[155]=Q("\u0142");ie[156]=Q("\u0153");ie[157]=Q("\u0161");ie[158]=Q("\u017E");ie[159]=Q("\uFFFD");ie[160]=Q("\u20AC");ie[173]=Q("\uFFFD");var Za=n=>{let t=new Array(n.length);for(let e=0,i=n.length;e<i;e++)t[e]=ie[n[e]];return String.fromCodePoint(...t)};var Ya=class{constructor(t){this.populate=t,this.value=void 0}getValue(){return this.value}access(){return this.value||(this.value=this.populate()),this.value}invalidate(){this.value=void 0}};Ya.populatedBy=n=>new Ya(n);var ct=Ya;var Ge=class extends Error{constructor(t,e){let i=`Method ${t}.${e}() not implemented`;super(i)}},cn=class extends Error{constructor(t){let e=`Cannot construct ${t} - it has a private constructor`;super(e)}},Vi=class extends Error{constructor(t,e){let i=s=>{var a,c;return(a=s==null?void 0:s.name)!==null&&a!==void 0?a:(c=s==null?void 0:s.constructor)===null||c===void 0?void 0:c.name},o=`Expected instance of ${(Array.isArray(t)?t.map(i):[i(t)]).join(" or ")}, but got instance of ${e&&i(e)}`;super(o)}},Ja=class extends Error{constructor(t){let e=`${t} stream encoding not supported`;super(e)}},dn=class extends Error{constructor(t,e){let i=`Cannot call ${t}.${e}() more than once`;super(i)}},$u=class extends Error{constructor(t){let e=`Missing catalog (ref=${t})`;super(e)}},Qa=class extends Error{constructor(){let t="Can't embed page with missing Contents";super(t)}},_a=class extends Error{constructor(t){var e,i,r;let s=`Unrecognized stream type: ${(r=(i=(e=t==null?void 0:t.contructor)===null||e===void 0?void 0:e.name)!==null&&i!==void 0?i:t==null?void 0:t.name)!==null&&r!==void 0?r:t}`;super(s)}},$a=class extends Error{constructor(){let t="Found mismatched contexts while embedding pages. All pages in the array passed to `PDFDocument.embedPages()` must be from the same document.";super(t)}},el=class extends Error{constructor(t){let e=`Attempted to convert PDFArray with ${t} elements to rectangle, but must have exactly 4 elements.`;super(e)}},qr=class extends Error{constructor(t){let e=`Attempted to convert "${t}" to a date, but it does not match the PDF date string format.`;super(e)}},as=class extends Error{constructor(t,e){let i=`Invalid targetIndex specified: targetIndex=${t} must be less than Count=${e}`;super(i)}},ls=class extends Error{constructor(t,e){let i=`Failed to ${e} at targetIndex=${t} due to corrupt page tree: It is likely that one or more 'Count' entries are invalid`;super(i)}},hn=class extends Error{constructor(t,e,i){let r=`index should be at least ${e} and at most ${i}, but was actually ${t}`;super(r)}},un=class extends Error{constructor(){let t="Attempted to set invalid field value";super(t)}},tl=class extends Error{constructor(){let t="Attempted to select multiple values for single-select field";super(t)}},il=class extends Error{constructor(t){let e=`No /DA (default appearance) entry found for field: ${t}`;super(e)}},nl=class extends Error{constructor(t){let e=`No Tf operator found for DA of field: ${t}`;super(e)}},cs=class extends Error{constructor(t,e){let i=`Failed to parse number (line:${t.line} col:${t.column} offset=${t.offset}): "${e}"`;super(i)}},xi=class extends Error{constructor(t,e){let i=`Failed to parse PDF document (line:${t.line} col:${t.column} offset=${t.offset}): ${e}`;super(i)}},rl=class extends xi{constructor(t,e,i){let r=`Expected next byte to be ${e} but it was actually ${i}`;super(t,r)}},ol=class extends xi{constructor(t,e){let i=`Failed to parse PDF object starting with the following byte: ${e}`;super(t,i)}},sl=class extends xi{constructor(t){let e="Failed to parse invalid PDF object";super(t,e)}},al=class extends xi{constructor(t){let e="Failed to parse PDF stream";super(t,e)}},ll=class extends xi{constructor(t){let e="Failed to parse PDF literal string due to unbalanced parenthesis";super(t,e)}},cl=class extends xi{constructor(t){let e="Parser stalled";super(t,e)}},dl=class extends xi{constructor(t){let e="No PDF header found";super(t,e)}},hl=class extends xi{constructor(t,e){let i=`Did not find expected keyword '${nn(e)}'`;super(t,i)}};var ef;(function(n){n[n.Null=0]="Null",n[n.Backspace=8]="Backspace",n[n.Tab=9]="Tab",n[n.Newline=10]="Newline",n[n.FormFeed=12]="FormFeed",n[n.CarriageReturn=13]="CarriageReturn",n[n.Space=32]="Space",n[n.ExclamationPoint=33]="ExclamationPoint",n[n.Hash=35]="Hash",n[n.Percent=37]="Percent",n[n.LeftParen=40]="LeftParen",n[n.RightParen=41]="RightParen",n[n.Plus=43]="Plus",n[n.Minus=45]="Minus",n[n.Dash=45]="Dash",n[n.Period=46]="Period",n[n.ForwardSlash=47]="ForwardSlash",n[n.Zero=48]="Zero",n[n.One=49]="One",n[n.Two=50]="Two",n[n.Three=51]="Three",n[n.Four=52]="Four",n[n.Five=53]="Five",n[n.Six=54]="Six",n[n.Seven=55]="Seven",n[n.Eight=56]="Eight",n[n.Nine=57]="Nine",n[n.LessThan=60]="LessThan",n[n.GreaterThan=62]="GreaterThan",n[n.A=65]="A",n[n.D=68]="D",n[n.E=69]="E",n[n.F=70]="F",n[n.O=79]="O",n[n.P=80]="P",n[n.R=82]="R",n[n.LeftSquareBracket=91]="LeftSquareBracket",n[n.BackSlash=92]="BackSlash",n[n.RightSquareBracket=93]="RightSquareBracket",n[n.a=97]="a",n[n.b=98]="b",n[n.d=100]="d",n[n.e=101]="e",n[n.f=102]="f",n[n.i=105]="i",n[n.j=106]="j",n[n.l=108]="l",n[n.m=109]="m",n[n.n=110]="n",n[n.o=111]="o",n[n.r=114]="r",n[n.s=115]="s",n[n.t=116]="t",n[n.u=117]="u",n[n.x=120]="x",n[n.LeftCurly=123]="LeftCurly",n[n.RightCurly=125]="RightCurly",n[n.Tilde=126]="Tilde"})(ef||(ef={}));var y=ef;var K0=Un(qa(),1);var ul=class{constructor(t,e){this.major=String(t),this.minor=String(e)}toString(){let t=kt(129);return`%PDF-${this.major}.${this.minor}
%${t}${t}${t}${t}`}sizeInBytes(){return 12+this.major.length+this.minor.length}copyBytesInto(t,e){let i=e;return t[e++]=y.Percent,t[e++]=y.P,t[e++]=y.D,t[e++]=y.F,t[e++]=y.Dash,e+=be(this.major,t,e),t[e++]=y.Period,e+=be(this.minor,t,e),t[e++]=y.Newline,t[e++]=y.Percent,t[e++]=129,t[e++]=129,t[e++]=129,t[e++]=129,e-i}};ul.forVersion=(n,t)=>new ul(n,t);var Bi=ul;var tf=class{clone(t){throw new Ge(this.constructor.name,"clone")}toString(){throw new Ge(this.constructor.name,"toString")}sizeInBytes(){throw new Ge(this.constructor.name,"sizeInBytes")}copyBytesInto(t,e){throw new Ge(this.constructor.name,"copyBytesInto")}},fe=tf;var Wr=class extends fe{constructor(t){super(),this.numberValue=t,this.stringValue=pu(t)}asNumber(){return this.numberValue}value(){return this.numberValue}clone(){return Wr.of(this.numberValue)}toString(){return this.stringValue}sizeInBytes(){return this.stringValue.length}copyBytesInto(t,e){return e+=be(this.stringValue,t,e),this.stringValue.length}};Wr.of=n=>new Wr(n);var N=Wr;var jr=class extends fe{constructor(t){super(),this.array=[],this.context=t}size(){return this.array.length}push(t){this.array.push(t)}insert(t,e){this.array.splice(t,0,e)}indexOf(t){let e=this.array.indexOf(t);return e===-1?void 0:e}remove(t){this.array.splice(t,1)}set(t,e){this.array[t]=e}get(t){return this.array[t]}lookupMaybe(t,...e){return this.context.lookupMaybe(this.get(t),...e)}lookup(t,...e){return this.context.lookup(this.get(t),...e)}asRectangle(){if(this.size()!==4)throw new el(this.size());let t=this.lookup(0,N).asNumber(),e=this.lookup(1,N).asNumber(),i=this.lookup(2,N).asNumber(),r=this.lookup(3,N).asNumber(),o=t,s=e,a=i-t,c=r-e;return{x:o,y:s,width:a,height:c}}asArray(){return this.array.slice()}clone(t){let e=jr.withContext(t||this.context);for(let i=0,r=this.size();i<r;i++)e.push(this.array[i]);return e}toString(){let t="[ ";for(let e=0,i=this.size();e<i;e++)t+=this.get(e).toString(),t+=" ";return t+="]",t}sizeInBytes(){let t=3;for(let e=0,i=this.size();e<i;e++)t+=this.get(e).sizeInBytes()+1;return t}copyBytesInto(t,e){let i=e;t[e++]=y.LeftSquareBracket,t[e++]=y.Space;for(let r=0,o=this.size();r<o;r++)e+=this.get(r).copyBytesInto(t,e),t[e++]=y.Space;return t[e++]=y.RightSquareBracket,e-i}scalePDFNumbers(t,e){for(let i=0,r=this.size();i<r;i++){let o=this.lookup(i);if(o instanceof N){let s=i%2===0?t:e;this.set(i,N.of(o.asNumber()*s))}}}};jr.withContext=n=>new jr(n);var H=jr;var nf={},Kr=class extends fe{constructor(t,e){if(t!==nf)throw new cn("PDFBool");super(),this.value=e}asBoolean(){return this.value}clone(){return this}toString(){return String(this.value)}sizeInBytes(){return this.value?4:5}copyBytesInto(t,e){return this.value?(t[e++]=y.t,t[e++]=y.r,t[e++]=y.u,t[e++]=y.e,4):(t[e++]=y.f,t[e++]=y.a,t[e++]=y.l,t[e++]=y.s,t[e++]=y.e,5)}};Kr.True=new Kr(nf,!0);Kr.False=new Kr(nf,!1);var yi=Kr;var Tt=new Uint8Array(256);Tt[y.LeftParen]=1;Tt[y.RightParen]=1;Tt[y.LessThan]=1;Tt[y.GreaterThan]=1;Tt[y.LeftSquareBracket]=1;Tt[y.RightSquareBracket]=1;Tt[y.LeftCurly]=1;Tt[y.RightCurly]=1;Tt[y.ForwardSlash]=1;Tt[y.Percent]=1;var Zt=new Uint8Array(256);Zt[y.Null]=1;Zt[y.Tab]=1;Zt[y.Newline]=1;Zt[y.FormFeed]=1;Zt[y.CarriageReturn]=1;Zt[y.Space]=1;var cd=new Uint8Array(256);for(let n=0,t=256;n<t;n++)cd[n]=Zt[n]||Tt[n]?1:0;cd[y.Hash]=1;var Cv=n=>n.replace(/#([\dABCDEF]{2})/g,(t,e)=>$h(e)),Tv=n=>n>=y.ExclamationPoint&&n<=y.Tilde&&!cd[n],z0={},U0=new Map,J=class extends fe{constructor(t,e){if(t!==z0)throw new cn("PDFName");super();let i="/";for(let r=0,o=e.length;r<o;r++){let s=e[r],a=Q(s);i+=Tv(a)?s:`#${Ii(a)}`}this.encodedName=i}asBytes(){let t=[],e="",i=!1,r=o=>{o!==void 0&&t.push(o),i=!1};for(let o=1,s=this.encodedName.length;o<s;o++){let a=this.encodedName[o],c=Q(a),l=this.encodedName[o+1];i?c>=y.Zero&&c<=y.Nine||c>=y.a&&c<=y.f||c>=y.A&&c<=y.F?(e+=a,(e.length===2||!(l>="0"&&l<="9"||l>="a"&&l<="f"||l>="A"&&l<="F"))&&(r(parseInt(e,16)),e="")):r(c):c===y.Hash?i=!0:r(c)}return new Uint8Array(t)}decodeText(){let t=this.asBytes();return String.fromCharCode(...Array.from(t))}asString(){return this.encodedName}value(){return this.encodedName}clone(){return this}toString(){return this.encodedName}sizeInBytes(){return this.encodedName.length}copyBytesInto(t,e){return e+=be(this.encodedName,t,e),this.encodedName.length}};J.of=n=>{let t=Cv(n),e=U0.get(t);return e||(e=new J(z0,t),U0.set(t,e)),e};J.Length=J.of("Length");J.FlateDecode=J.of("FlateDecode");J.Resources=J.of("Resources");J.Font=J.of("Font");J.XObject=J.of("XObject");J.ExtGState=J.of("ExtGState");J.Contents=J.of("Contents");J.Type=J.of("Type");J.Parent=J.of("Parent");J.MediaBox=J.of("MediaBox");J.Page=J.of("Page");J.Annots=J.of("Annots");J.TrimBox=J.of("TrimBox");J.ArtBox=J.of("ArtBox");J.BleedBox=J.of("BleedBox");J.CropBox=J.of("CropBox");J.Rotate=J.of("Rotate");J.Title=J.of("Title");J.Author=J.of("Author");J.Subject=J.of("Subject");J.Creator=J.of("Creator");J.Keywords=J.of("Keywords");J.Producer=J.of("Producer");J.CreationDate=J.of("CreationDate");J.ModDate=J.of("ModDate");var x=J;var rf=class extends fe{asNull(){return null}clone(){return this}toString(){return"null"}sizeInBytes(){return 4}copyBytesInto(t,e){return t[e++]=y.n,t[e++]=y.u,t[e++]=y.l,t[e++]=y.l,4}},Me=new rf;var fn=class extends fe{constructor(t,e){super(),this.suppressEncryption=!1,this.dict=t,this.context=e}keys(){return Array.from(this.dict.keys())}values(){return Array.from(this.dict.values())}entries(){return Array.from(this.dict.entries())}set(t,e){this.dict.set(t,e)}get(t,e=!1){let i=this.dict.get(t);if(!(i===Me&&!e))return i}has(t){let e=this.dict.get(t);return e!==void 0&&e!==Me}lookupMaybe(t,...e){let i=e.includes(Me),r=this.context.lookupMaybe(this.get(t,i),...e);if(!(r===Me&&!i))return r}lookup(t,...e){let i=e.includes(Me),r=this.context.lookup(this.get(t,i),...e);if(!(r===Me&&!i))return r}delete(t){return this.dict.delete(t)}asMap(){return new Map(this.dict)}uniqueKey(t=""){let e=this.keys(),i=x.of(this.context.addRandomSuffix(t,10));for(;e.includes(i);)i=x.of(this.context.addRandomSuffix(t,10));return i}clone(t){let e=fn.withContext(t||this.context),i=this.entries();for(let r=0,o=i.length;r<o;r++){let[s,a]=i[r];e.set(s,a)}return e}toString(){let t=`<<
`,e=this.entries();for(let i=0,r=e.length;i<r;i++){let[o,s]=e[i];t+=o.toString()+" "+s.toString()+`
`}return t+=">>",t}sizeInBytes(){let t=5,e=this.entries();for(let i=0,r=e.length;i<r;i++){let[o,s]=e[i];t+=o.sizeInBytes()+s.sizeInBytes()+2}return t}copyBytesInto(t,e){let i=e;t[e++]=y.LessThan,t[e++]=y.LessThan,t[e++]=y.Newline;let r=this.entries();for(let o=0,s=r.length;o<s;o++){let[a,c]=r[o];e+=a.copyBytesInto(t,e),t[e++]=y.Space,e+=c.copyBytesInto(t,e),t[e++]=y.Newline}return t[e++]=y.GreaterThan,t[e++]=y.GreaterThan,e-i}};fn.withContext=n=>new fn(new Map,n);fn.fromMapWithContext=(n,t)=>new fn(n,t);var R=fn;var pn=class extends fe{constructor(t){super(),this.value=t}asBytes(){let t=this.value+(this.value.length%2===1?"0":""),e=t.length,i=new Uint8Array(t.length/2),r=0,o=0;for(;r<e;){let s=parseInt(t.substring(r,r+2),16);i[o]=s,r+=2,o+=1}return i}decodeText(){let t=this.asBytes();return Da(t)?ka(t):Za(t)}decodeDate(){let t=this.decodeText(),e=va(t);if(!e)throw new qr(t);return e}asString(){return this.value}clone(){return pn.of(this.value)}toString(){return`<${this.value}>`}sizeInBytes(){return this.value.length+2}copyBytesInto(t,e){return t[e++]=y.LessThan,e+=be(this.value,t,e),t[e++]=y.GreaterThan,this.value.length+2}};pn.of=n=>new pn(n);pn.fromText=n=>{let t=hu(n),e="";for(let i=0,r=t.length;i<r;i++)e+=Ai(t[i],4);return new pn(e)};var M=pn;var of=class extends fe{constructor(t){super(),this.dict=t}clone(t){throw new Ge(this.constructor.name,"clone")}getContentsString(){throw new Ge(this.constructor.name,"getContentsString")}getContents(){throw new Ge(this.constructor.name,"getContents")}getContentsSize(){throw new Ge(this.constructor.name,"getContentsSize")}updateDict(){let t=this.getContentsSize();this.dict.set(x.Length,N.of(t))}sizeInBytes(){return this.updateDict(),this.dict.sizeInBytes()+this.getContentsSize()+18}toString(){this.updateDict();let t=this.dict.toString();return t+=`
stream
`,t+=this.getContentsString(),t+=`
endstream`,t}copyBytesInto(t,e){this.updateDict();let i=e;e+=this.dict.copyBytesInto(t,e),t[e++]=y.Newline,t[e++]=y.s,t[e++]=y.t,t[e++]=y.r,t[e++]=y.e,t[e++]=y.a,t[e++]=y.m,t[e++]=y.Newline;let r=this.getContents();for(let o=0,s=r.length;o<s;o++)t[e++]=r[o];return t[e++]=y.Newline,t[e++]=y.e,t[e++]=y.n,t[e++]=y.d,t[e++]=y.s,t[e++]=y.t,t[e++]=y.r,t[e++]=y.e,t[e++]=y.a,t[e++]=y.m,e-i}},Fe=of;var Gr=class extends Fe{constructor(t,e,i){super(t),this.contents=e,this.transform=i}asUint8Array(){return this.contents.slice()}clone(t){return Gr.of(this.dict.clone(t),this.contents.slice())}getContentsString(){return nn(this.contents)}getContents(){return this.contents}getContentsSize(){return this.contents.length}};Gr.of=(n,t,e)=>new Gr(n,t,e);var wi=Gr;var W0={},q0=new Map,fl=class extends fe{constructor(t,e,i){if(t!==W0)throw new cn("PDFRef");super(),this.objectNumber=e,this.generationNumber=i,this.tag=`${e} ${i} R`}clone(){return this}toString(){return this.tag}sizeInBytes(){return this.tag.length}copyBytesInto(t,e){return e+=be(this.tag,t,e),this.tag.length}};fl.of=(n,t=0)=>{let e=`${n} ${t} R`,i=q0.get(e);return i||(i=new fl(W0,n,t),q0.set(e,i)),i};var q=fl;var gn=class extends fe{constructor(t){super(),this.value=t}asBytes(){let t=[],e="",i=!1,r=o=>{o!==void 0&&t.push(o),i=!1};for(let o=0,s=this.value.length;o<s;o++){let a=this.value[o],c=Q(a),l=this.value[o+1];i?c===y.Newline||c===y.CarriageReturn?r():c===y.n?r(y.Newline):c===y.r?r(y.CarriageReturn):c===y.t?r(y.Tab):c===y.b?r(y.Backspace):c===y.f?r(y.FormFeed):c===y.LeftParen?r(y.LeftParen):c===y.RightParen?r(y.RightParen):c===y.Backspace?r(y.BackSlash):c>=y.Zero&&c<=y.Seven?(e+=a,(e.length===3||!(l>="0"&&l<="7"))&&(r(parseInt(e,8)),e="")):r(c):c===y.BackSlash?i=!0:r(c)}return new Uint8Array(t)}decodeText(){let t=this.asBytes();return Da(t)?ka(t):Za(t)}decodeDate(){let t=this.decodeText(),e=va(t);if(!e)throw new qr(t);return e}asString(){return this.value}clone(){return gn.of(this.value)}toString(){return`(${this.value})`}sizeInBytes(){return this.value.length+2}copyBytesInto(t,e){return t[e++]=y.LeftParen,e+=be(this.value,t,e),t[e++]=y.RightParen,this.value.length+2}};gn.of=n=>new gn(n);gn.fromDate=n=>{let t=Dt(String(n.getUTCFullYear()),4,"0"),e=Dt(String(n.getUTCMonth()+1),2,"0"),i=Dt(String(n.getUTCDate()),2,"0"),r=Dt(String(n.getUTCHours()),2,"0"),o=Dt(String(n.getUTCMinutes()),2,"0"),s=Dt(String(n.getUTCSeconds()),2,"0");return new gn(`D:${t}${e}${i}${r}${o}${s}Z`)};var G=gn;var Xr=class{constructor(t,e){this.name=t,this.args=e||[]}clone(t){let e=new Array(this.args.length);for(let i=0,r=e.length;i<r;i++){let o=this.args[i];e[i]=o instanceof fe?o.clone(t):o}return Xr.of(this.name,e)}toString(){let t="";for(let e=0,i=this.args.length;e<i;e++)t+=String(this.args[e])+" ";return t+=this.name,t}sizeInBytes(){let t=0;for(let e=0,i=this.args.length;e<i;e++){let r=this.args[e];t+=(r instanceof fe?r.sizeInBytes():r.length)+1}return t+=this.name.length,t}copyBytesInto(t,e){let i=e;for(let r=0,o=this.args.length;r<o;r++){let s=this.args[r];s instanceof fe?e+=s.copyBytesInto(t,e):e+=be(s,t,e),t[e++]=y.Space}return e+=be(this.name,t,e),e-i}};Xr.of=(n,t)=>new Xr(n,t);var _=Xr;var sf;(function(n){n.NonStrokingColor="sc",n.NonStrokingColorN="scn",n.NonStrokingColorRgb="rg",n.NonStrokingColorGray="g",n.NonStrokingColorCmyk="k",n.NonStrokingColorspace="cs",n.StrokingColor="SC",n.StrokingColorN="SCN",n.StrokingColorRgb="RG",n.StrokingColorGray="G",n.StrokingColorCmyk="K",n.StrokingColorspace="CS",n.BeginMarkedContentSequence="BDC",n.BeginMarkedContent="BMC",n.EndMarkedContent="EMC",n.MarkedContentPointWithProps="DP",n.MarkedContentPoint="MP",n.DrawObject="Do",n.ConcatTransformationMatrix="cm",n.PopGraphicsState="Q",n.PushGraphicsState="q",n.SetFlatness="i",n.SetGraphicsStateParams="gs",n.SetLineCapStyle="J",n.SetLineDashPattern="d",n.SetLineJoinStyle="j",n.SetLineMiterLimit="M",n.SetLineWidth="w",n.SetTextMatrix="Tm",n.SetRenderingIntent="ri",n.AppendRectangle="re",n.BeginInlineImage="BI",n.BeginInlineImageData="ID",n.EndInlineImage="EI",n.ClipEvenOdd="W*",n.ClipNonZero="W",n.CloseAndStroke="s",n.CloseFillEvenOddAndStroke="b*",n.CloseFillNonZeroAndStroke="b",n.ClosePath="h",n.AppendBezierCurve="c",n.CurveToReplicateFinalPoint="y",n.CurveToReplicateInitialPoint="v",n.EndPath="n",n.FillEvenOddAndStroke="B*",n.FillEvenOdd="f*",n.FillNonZeroAndStroke="B",n.FillNonZero="f",n.LegacyFillNonZero="F",n.LineTo="l",n.MoveTo="m",n.ShadingFill="sh",n.StrokePath="S",n.BeginText="BT",n.EndText="ET",n.MoveText="Td",n.MoveTextSetLeading="TD",n.NextLine="T*",n.SetCharacterSpacing="Tc",n.SetFontAndSize="Tf",n.SetTextHorizontalScaling="Tz",n.SetTextLineHeight="TL",n.SetTextRenderingMode="Tr",n.SetTextRise="Ts",n.SetWordSpacing="Tw",n.ShowText="Tj",n.ShowTextAdjusted="TJ",n.ShowTextLine="'",n.ShowTextLineAndSpace='"',n.Type3D0="d0",n.Type3D1="d1",n.BeginCompatibilitySection="BX",n.EndCompatibilitySection="EX"})(sf||(sf={}));var ee=sf;var j0=Un(qa(),1);var af=class extends Fe{constructor(t,e){super(t),this.computeContents=()=>{let i=this.getUnencodedContents();return this.encode?j0.default.deflate(i):i},this.encode=e,e&&t.set(x.of("Filter"),x.of("FlateDecode")),this.contentsCache=ct.populatedBy(this.computeContents)}getContents(){return this.contentsCache.access()}getContentsSize(){return this.contentsCache.access().length}getUnencodedContents(){throw new Ge(this.constructor.name,"getUnencodedContents")}},_n=af;var Zr=class extends _n{constructor(t,e,i=!0){super(t,i),this.operators=e}push(...t){this.operators.push(...t)}clone(t){let e=new Array(this.operators.length);for(let o=0,s=this.operators.length;o<s;o++)e[o]=this.operators[o].clone(t);let{dict:i,encode:r}=this;return Zr.of(i.clone(t),e,r)}getContentsString(){let t="";for(let e=0,i=this.operators.length;e<i;e++)t+=`${this.operators[e]}
`;return t}getUnencodedContents(){let t=new Uint8Array(this.getUnencodedContentsSize()),e=0;for(let i=0,r=this.operators.length;i<r;i++)e+=this.operators[i].copyBytesInto(t,e),t[e++]=y.Newline;return t}getUnencodedContentsSize(){let t=0;for(let e=0,i=this.operators.length;e<i;e++)t+=this.operators[e].sizeInBytes()+1;return t}};Zr.of=(n,t,e=!0)=>new Zr(n,t,e);var Hi=Zr;var ds=class{constructor(t){this.seed=t}nextInt(){let t=Math.sin(this.seed++)*1e4;return t-Math.floor(t)}};ds.withSeed=n=>new ds(n);var Ev=([n],[t])=>n.objectNumber-t.objectNumber,pl=class{constructor(){this.isDecrypted=!0,this.largestObjectNumber=0,this.header=Bi.forVersion(1,7),this.trailerInfo={},this.indirectObjects=new Map,this.rng=ds.withSeed(1)}assign(t,e){this.indirectObjects.set(t,e),t.objectNumber>this.largestObjectNumber&&(this.largestObjectNumber=t.objectNumber)}nextRef(){return this.largestObjectNumber+=1,q.of(this.largestObjectNumber)}register(t){let e=this.nextRef();return this.assign(e,t),e}delete(t){return this.indirectObjects.delete(t)}lookupMaybe(t,...e){let i=e.includes(Me),r=t instanceof q?this.indirectObjects.get(t):t;if(!(!r||r===Me&&!i)){for(let o=0,s=e.length;o<s;o++){let a=e[o];if(a===Me){if(r===Me)return r}else if(r instanceof a)return r}throw new Vi(e,r)}}lookup(t,...e){let i=t instanceof q?this.indirectObjects.get(t):t;if(e.length===0)return i;for(let r=0,o=e.length;r<o;r++){let s=e[r];if(s===Me){if(i===Me)return i}else if(i instanceof s)return i}throw new Vi(e,i)}getObjectRef(t){let e=Array.from(this.indirectObjects.entries());for(let i=0,r=e.length;i<r;i++){let[o,s]=e[i];if(s===t)return o}}enumerateIndirectObjects(){return Array.from(this.indirectObjects.entries()).sort(Ev)}obj(t){if(t instanceof fe)return t;if(t==null)return Me;if(typeof t=="string")return x.of(t);if(typeof t=="number")return N.of(t);if(typeof t=="boolean")return t?yi.True:yi.False;if(Array.isArray(t)){let e=H.withContext(this);for(let i=0,r=t.length;i<r;i++)e.push(this.obj(t[i]));return e}else{let e=R.withContext(this),i=Object.keys(t);for(let r=0,o=i.length;r<o;r++){let s=i[r],a=t[s];a!==void 0&&e.set(x.of(s),this.obj(a))}return e}}getLiteral(t,{deep:e=!0,literalRef:i=!1,literalStreamDict:r=!1,literalString:o=!1}={}){let s={deep:e,literalRef:i,literalStreamDict:r,literalString:o};if(t instanceof H){let a=t.asArray();return e?a.map(c=>this.getLiteral(c,s)):a}else{if(t instanceof yi)return t.asBoolean();if(t instanceof R){let a={},c=t.entries();for(let l=0,d=c.length;l<d;l++){let[h,u]=c[l];a[this.getLiteral(h)]=e?this.getLiteral(u,s):u}return a}else{if(t instanceof x)return t.decodeText();if(t===Me)return null;if(t instanceof N)return t.asNumber();if(t instanceof q&&i)return t.objectNumber;if(t instanceof Fe&&r)return this.getLiteral(t.dict,s);if((t instanceof G||t instanceof M)&&o)return t.asString()}}return t}stream(t,e={}){return wi.of(this.obj(e),Fa(t))}flateStream(t,e={}){return this.stream(K0.default.deflate(Fa(t)),{...e,Filter:"FlateDecode"})}contentStream(t,e={}){return Hi.of(this.obj(e),t)}formXObject(t,e={}){return this.contentStream(t,{BBox:this.obj([0,0,0,0]),Matrix:this.obj([1,0,0,1,0,0]),...e,Type:"XObject",Subtype:"Form"})}getPushGraphicsStateContentStream(){if(this.pushGraphicsStateContentStreamRef)return this.pushGraphicsStateContentStreamRef;let t=this.obj({}),e=_.of(ee.PushGraphicsState),i=Hi.of(t,[e]);return this.pushGraphicsStateContentStreamRef=this.register(i),this.pushGraphicsStateContentStreamRef}getPopGraphicsStateContentStream(){if(this.popGraphicsStateContentStreamRef)return this.popGraphicsStateContentStreamRef;let t=this.obj({}),e=_.of(ee.PopGraphicsState),i=Hi.of(t,[e]);return this.popGraphicsStateContentStreamRef=this.register(i),this.popGraphicsStateContentStreamRef}addRandomSuffix(t,e=4){return`${t}-${Math.floor(this.rng.nextInt()*10**e)}`}};pl.create=()=>new pl;var Yr=pl;var Ui=class extends R{constructor(t,e,i=!0){super(t,e),this.normalized=!1,this.autoNormalizeCTM=i}clone(t){let e=Ui.fromMapWithContext(new Map,t||this.context,this.autoNormalizeCTM),i=this.entries();for(let r=0,o=i.length;r<o;r++){let[s,a]=i[r];e.set(s,a)}return e}Parent(){return this.lookupMaybe(x.Parent,R)}Contents(){return this.lookup(x.of("Contents"))}Annots(){return this.lookupMaybe(x.Annots,H)}BleedBox(){return this.lookupMaybe(x.BleedBox,H)}TrimBox(){return this.lookupMaybe(x.TrimBox,H)}ArtBox(){return this.lookupMaybe(x.ArtBox,H)}Resources(){let t=this.getInheritableAttribute(x.Resources);return this.context.lookupMaybe(t,R)}MediaBox(){let t=this.getInheritableAttribute(x.MediaBox);return this.context.lookup(t,H)}CropBox(){let t=this.getInheritableAttribute(x.CropBox);return this.context.lookupMaybe(t,H)}Rotate(){let t=this.getInheritableAttribute(x.Rotate);return this.context.lookupMaybe(t,N)}getInheritableAttribute(t){let e;return this.ascend(i=>{e||(e=i.get(t))}),e}setParent(t){this.set(x.Parent,t)}addContentStream(t){let e=this.normalizedEntries().Contents||this.context.obj([]);this.set(x.Contents,e),e.push(t)}wrapContentStreams(t,e){let i=this.Contents();return i instanceof H?(i.insert(0,t),i.push(e),!0):!1}addAnnot(t){let{Annots:e}=this.normalizedEntries();e.push(t)}removeAnnot(t){let{Annots:e}=this.normalizedEntries(),i=e.indexOf(t);i!==void 0&&e.remove(i)}setFontDictionary(t,e){let{Font:i}=this.normalizedEntries();i.set(t,e)}newFontDictionaryKey(t){let{Font:e}=this.normalizedEntries();return e.uniqueKey(t)}newFontDictionary(t,e){let i=this.newFontDictionaryKey(t);return this.setFontDictionary(i,e),i}setXObject(t,e){let{XObject:i}=this.normalizedEntries();i.set(t,e)}newXObjectKey(t){let{XObject:e}=this.normalizedEntries();return e.uniqueKey(t)}newXObject(t,e){let i=this.newXObjectKey(t);return this.setXObject(i,e),i}setExtGState(t,e){let{ExtGState:i}=this.normalizedEntries();i.set(t,e)}newExtGStateKey(t){let{ExtGState:e}=this.normalizedEntries();return e.uniqueKey(t)}newExtGState(t,e){let i=this.newExtGStateKey(t);return this.setExtGState(i,e),i}ascend(t){t(this);let e=this.Parent();e&&e.ascend(t)}normalize(){if(this.normalized)return;let{context:t}=this,e=this.get(x.Contents);this.context.lookup(e)instanceof Fe&&this.set(x.Contents,t.obj([e])),this.autoNormalizeCTM&&this.wrapContentStreams(this.context.getPushGraphicsStateContentStream(),this.context.getPopGraphicsStateContentStream());let r=this.getInheritableAttribute(x.Resources),o=t.lookupMaybe(r,R)||t.obj({});this.set(x.Resources,o);let s=o.lookupMaybe(x.Font,R)||t.obj({});o.set(x.Font,s);let a=o.lookupMaybe(x.XObject,R)||t.obj({});o.set(x.XObject,a);let c=o.lookupMaybe(x.ExtGState,R)||t.obj({});o.set(x.ExtGState,c);let l=this.Annots()||t.obj([]);this.set(x.Annots,l),this.normalized=!0}normalizedEntries(){this.normalize();let t=this.Annots(),e=this.Resources(),i=this.Contents();return{Annots:t,Resources:e,Contents:i,Font:e.lookup(x.Font,R),XObject:e.lookup(x.XObject,R),ExtGState:e.lookup(x.ExtGState,R)}}};Ui.InheritableEntries=["Resources","MediaBox","CropBox","Rotate"];Ui.withContextAndParent=(n,t)=>{let e=new Map;return e.set(x.Type,x.Page),e.set(x.Parent,t),e.set(x.Resources,n.obj({})),e.set(x.MediaBox,n.obj([0,0,612,792])),new Ui(e,n,!1)};Ui.fromMapWithContext=(n,t,e=!0)=>new Ui(n,t,e);var tt=Ui;var gl=class{constructor(t,e){this.traversedObjects=new Map,this.copy=i=>i instanceof tt?this.copyPDFPage(i):i instanceof R?this.copyPDFDict(i):i instanceof H?this.copyPDFArray(i):i instanceof Fe?this.copyPDFStream(i):i instanceof q?this.copyPDFIndirectObject(i):i.clone(),this.copyPDFPage=i=>{let r=i.clone(),{InheritableEntries:o}=tt;for(let s=0,a=o.length;s<a;s++){let c=x.of(o[s]),l=r.getInheritableAttribute(c);!r.get(c)&&l&&r.set(c,l)}return r.delete(x.of("Parent")),this.copyPDFDict(r)},this.copyPDFDict=i=>{if(this.traversedObjects.has(i))return this.traversedObjects.get(i);let r=i.clone(this.dest);this.traversedObjects.set(i,r);let o=i.entries();for(let s=0,a=o.length;s<a;s++){let[c,l]=o[s];r.set(c,this.copy(l))}return r},this.copyPDFArray=i=>{if(this.traversedObjects.has(i))return this.traversedObjects.get(i);let r=i.clone(this.dest);this.traversedObjects.set(i,r);for(let o=0,s=i.size();o<s;o++){let a=i.get(o);r.set(o,this.copy(a))}return r},this.copyPDFStream=i=>{if(this.traversedObjects.has(i))return this.traversedObjects.get(i);let r=i.clone(this.dest);this.traversedObjects.set(i,r);let o=i.dict.entries();for(let s=0,a=o.length;s<a;s++){let[c,l]=o[s];r.dict.set(c,this.copy(l))}return r},this.copyPDFIndirectObject=i=>{if(!this.traversedObjects.has(i)){let o=this.dest.nextRef();this.traversedObjects.set(i,o);let s=this.src.lookup(i);if(s){let a=this.copy(s);this.dest.assign(o,a)}}return this.traversedObjects.get(i)},this.src=t,this.dest=e}};gl.for=(n,t)=>new gl(n,t);var ml=gl;var Jr=class{constructor(t){this.subsections=t?[[t]]:[],this.chunkIdx=0,this.chunkLength=t?1:0}addEntry(t,e){this.append({ref:t,offset:e,deleted:!1})}addDeletedEntry(t,e){this.append({ref:t,offset:e,deleted:!0})}toString(){let t=`xref
`;for(let e=0,i=this.subsections.length;e<i;e++){let r=this.subsections[e];t+=`${r[0].ref.objectNumber} ${r.length}
`;for(let o=0,s=r.length;o<s;o++){let a=r[o];t+=Dt(String(a.offset),10,"0"),t+=" ",t+=Dt(String(a.ref.generationNumber),5,"0"),t+=" ",t+=a.deleted?"f":"n",t+=`
`}}return t}sizeInBytes(){let t=5;for(let e=0,i=this.subsections.length;e<i;e++){let r=this.subsections[e],o=r.length,[s]=r;t+=2,t+=String(s.ref.objectNumber).length,t+=String(o).length,t+=20*o}return t}copyBytesInto(t,e){let i=e;return t[e++]=y.x,t[e++]=y.r,t[e++]=y.e,t[e++]=y.f,t[e++]=y.Newline,e+=this.copySubsectionsIntoBuffer(this.subsections,t,e),e-i}copySubsectionsIntoBuffer(t,e,i){let r=i,o=t.length;for(let s=0;s<o;s++){let a=this.subsections[s],c=String(a[0].ref.objectNumber);i+=be(c,e,i),e[i++]=y.Space;let l=String(a.length);i+=be(l,e,i),e[i++]=y.Newline,i+=this.copyEntriesIntoBuffer(a,e,i)}return i-r}copyEntriesIntoBuffer(t,e,i){let r=t.length;for(let o=0;o<r;o++){let s=t[o],a=Dt(String(s.offset),10,"0");i+=be(a,e,i),e[i++]=y.Space;let c=Dt(String(s.ref.generationNumber),5,"0");i+=be(c,e,i),e[i++]=y.Space,e[i++]=s.deleted?y.f:y.n,e[i++]=y.Space,e[i++]=y.Newline}return 20*r}append(t){if(this.chunkLength===0){this.subsections.push([t]),this.chunkIdx=0,this.chunkLength=1;return}let e=this.subsections[this.chunkIdx],i=e[this.chunkLength-1];t.ref.objectNumber-i.ref.objectNumber>1?(this.subsections.push([t]),this.chunkIdx+=1,this.chunkLength=1):(e.push(t),this.chunkLength+=1)}};Jr.create=()=>new Jr({ref:q.of(0,65535),offset:0,deleted:!0});Jr.createEmpty=()=>new Jr;var hs=Jr;var bl=class{constructor(t){this.lastXRefOffset=String(t)}toString(){return`startxref
${this.lastXRefOffset}
%%EOF`}sizeInBytes(){return 16+this.lastXRefOffset.length}copyBytesInto(t,e){let i=e;return t[e++]=y.s,t[e++]=y.t,t[e++]=y.a,t[e++]=y.r,t[e++]=y.t,t[e++]=y.x,t[e++]=y.r,t[e++]=y.e,t[e++]=y.f,t[e++]=y.Newline,e+=be(this.lastXRefOffset,t,e),t[e++]=y.Newline,t[e++]=y.Percent,t[e++]=y.Percent,t[e++]=y.E,t[e++]=y.O,t[e++]=y.F,e-i}};bl.forLastCrossRefSectionOffset=n=>new bl(n);var $n=bl;var xl=class{constructor(t){this.dict=t}toString(){return`trailer
${this.dict.toString()}`}sizeInBytes(){return 8+this.dict.sizeInBytes()}copyBytesInto(t,e){let i=e;return t[e++]=y.t,t[e++]=y.r,t[e++]=y.a,t[e++]=y.i,t[e++]=y.l,t[e++]=y.e,t[e++]=y.r,t[e++]=y.Newline,e+=this.dict.copyBytesInto(t,e),e-i}};xl.of=n=>new xl(n);var dd=xl;var Qr=class extends _n{constructor(t,e,i=!0){super(t.obj({}),i),this.objects=e,this.offsets=this.computeObjectOffsets(),this.offsetsString=this.computeOffsetsString(),this.dict.set(x.of("Type"),x.of("ObjStm")),this.dict.set(x.of("N"),N.of(this.objects.length)),this.dict.set(x.of("First"),N.of(this.offsetsString.length))}getObjectsCount(){return this.objects.length}clone(t){return Qr.withContextAndObjects(t||this.dict.context,this.objects.slice(),this.encode)}getContentsString(){let t=this.offsetsString;for(let e=0,i=this.objects.length;e<i;e++){let[,r]=this.objects[e];t+=`${r}
`}return t}getUnencodedContents(){let t=new Uint8Array(this.getUnencodedContentsSize()),e=be(this.offsetsString,t,0);for(let i=0,r=this.objects.length;i<r;i++){let[,o]=this.objects[i];e+=o.copyBytesInto(t,e),t[e++]=y.Newline}return t}getUnencodedContentsSize(){return this.offsetsString.length+Ir(this.offsets)[1]+Ir(this.objects)[1].sizeInBytes()+1}computeOffsetsString(){let t="";for(let e=0,i=this.offsets.length;e<i;e++){let[r,o]=this.offsets[e];t+=`${r} ${o} `}return t}computeObjectOffsets(){let t=0,e=new Array(this.objects.length);for(let i=0,r=this.objects.length;i<r;i++){let[o,s]=this.objects[i];e[i]=[o.objectNumber,t],t+=s.sizeInBytes()+1}return e}};Qr.withContextAndObjects=(n,t,e=!0)=>new Qr(n,t,e);var us=Qr;var yl=class{constructor(t,e){this.parsedObjects=0,this.shouldWaitForTick=i=>(this.parsedObjects+=i,this.parsedObjects%this.objectsPerTick===0),this.context=t,this.objectsPerTick=e}async serializeToBuffer(){let{size:t,header:e,indirectObjects:i,xref:r,trailerDict:o,trailer:s}=await this.computeBufferSize(),a=0,c=new Uint8Array(t);a+=e.copyBytesInto(c,a),c[a++]=y.Newline,c[a++]=y.Newline;for(let l=0,d=i.length;l<d;l++){let[h,u]=i[l],f=String(h.objectNumber);a+=be(f,c,a),c[a++]=y.Space;let p=String(h.generationNumber);a+=be(p,c,a),c[a++]=y.Space,c[a++]=y.o,c[a++]=y.b,c[a++]=y.j,c[a++]=y.Newline,a+=u.copyBytesInto(c,a),c[a++]=y.Newline,c[a++]=y.e,c[a++]=y.n,c[a++]=y.d,c[a++]=y.o,c[a++]=y.b,c[a++]=y.j,c[a++]=y.Newline,c[a++]=y.Newline;let g=u instanceof us?u.getObjectsCount():1;this.shouldWaitForTick(g)&&await gi()}return r&&(a+=r.copyBytesInto(c,a),c[a++]=y.Newline),o&&(a+=o.copyBytesInto(c,a),c[a++]=y.Newline,c[a++]=y.Newline),a+=s.copyBytesInto(c,a),c}computeIndirectObjectSize([t,e]){let i=t.sizeInBytes()+3,r=e.sizeInBytes()+9;return i+r}createTrailerDict(){return this.context.obj({Size:this.context.largestObjectNumber+1,Root:this.context.trailerInfo.Root,Encrypt:this.context.trailerInfo.Encrypt,Info:this.context.trailerInfo.Info,ID:this.context.trailerInfo.ID})}async computeBufferSize(){let t=Bi.forVersion(1,7),e=t.sizeInBytes()+2,i=hs.create(),r=this.context.enumerateIndirectObjects();for(let c=0,l=r.length;c<l;c++){let d=r[c],[h]=d;i.addEntry(h,e),e+=this.computeIndirectObjectSize(d),this.shouldWaitForTick(1)&&await gi()}let o=e;e+=i.sizeInBytes()+1;let s=dd.of(this.createTrailerDict());e+=s.sizeInBytes()+2;let a=$n.forLastCrossRefSectionOffset(o);return e+=a.sizeInBytes(),{size:e,header:t,indirectObjects:r,xref:i,trailerDict:s,trailer:a}}};yl.forContext=(n,t)=>new yl(n,t);var fs=yl;var _r=class extends fe{constructor(t){super(),this.data=t}clone(){return _r.of(this.data.slice())}toString(){return`PDFInvalidObject(${this.data.length} bytes)`}sizeInBytes(){return this.data.length}copyBytesInto(t,e){let i=this.data.length;for(let r=0;r<i;r++)t[e++]=this.data[r];return i}};_r.of=n=>new _r(n);var ps=_r;var er;(function(n){n[n.Deleted=0]="Deleted",n[n.Uncompressed=1]="Uncompressed",n[n.Compressed=2]="Compressed"})(er||(er={}));var mn=class extends _n{constructor(t,e,i=!0){super(t,i),this.computeIndex=()=>{let r=[],o=0;for(let s=0,a=this.entries.length;s<a;s++){let c=this.entries[s],l=this.entries[s-1];s===0?r.push(c.ref.objectNumber):c.ref.objectNumber-l.ref.objectNumber>1&&(r.push(o),r.push(c.ref.objectNumber),o=0),o+=1}return r.push(o),r},this.computeEntryTuples=()=>{let r=new Array(this.entries.length);for(let o=0,s=this.entries.length;o<s;o++){let a=this.entries[o];if(a.type===er.Deleted){let{type:c,nextFreeObjectNumber:l,ref:d}=a;r[o]=[c,l,d.generationNumber]}if(a.type===er.Uncompressed){let{type:c,offset:l,ref:d}=a;r[o]=[c,l,d.generationNumber]}if(a.type===er.Compressed){let{type:c,objectStreamRef:l,index:d}=a;r[o]=[c,l.objectNumber,d]}}return r},this.computeMaxEntryByteWidths=()=>{let r=this.entryTuplesCache.access(),o=[0,0,0];for(let s=0,a=r.length;s<a;s++){let[c,l,d]=r[s],h=Zo(c),u=Zo(l),f=Zo(d);h>o[0]&&(o[0]=h),u>o[1]&&(o[1]=u),f>o[2]&&(o[2]=f)}return o},this.entries=e||[],this.entryTuplesCache=ct.populatedBy(this.computeEntryTuples),this.maxByteWidthsCache=ct.populatedBy(this.computeMaxEntryByteWidths),this.indexCache=ct.populatedBy(this.computeIndex),t.set(x.of("Type"),x.of("XRef"))}addDeletedEntry(t,e){let i=er.Deleted;this.entries.push({type:i,ref:t,nextFreeObjectNumber:e}),this.entryTuplesCache.invalidate(),this.maxByteWidthsCache.invalidate(),this.indexCache.invalidate(),this.contentsCache.invalidate()}addUncompressedEntry(t,e){let i=er.Uncompressed;this.entries.push({type:i,ref:t,offset:e}),this.entryTuplesCache.invalidate(),this.maxByteWidthsCache.invalidate(),this.indexCache.invalidate(),this.contentsCache.invalidate()}addCompressedEntry(t,e,i){let r=er.Compressed;this.entries.push({type:r,ref:t,objectStreamRef:e,index:i}),this.entryTuplesCache.invalidate(),this.maxByteWidthsCache.invalidate(),this.indexCache.invalidate(),this.contentsCache.invalidate()}clone(t){let{dict:e,entries:i,encode:r}=this;return mn.of(e.clone(t),i.slice(),r)}getContentsString(){let t=this.entryTuplesCache.access(),e=this.maxByteWidthsCache.access(),i="";for(let r=0,o=t.length;r<o;r++){let[s,a,c]=t[r],l=qn(jn(s)),d=qn(jn(a)),h=qn(jn(c));for(let u=e[0]-1;u>=0;u--)i+=(l[u]||0).toString(2);for(let u=e[1]-1;u>=0;u--)i+=(d[u]||0).toString(2);for(let u=e[2]-1;u>=0;u--)i+=(h[u]||0).toString(2)}return i}getUnencodedContents(){let t=this.entryTuplesCache.access(),e=this.maxByteWidthsCache.access(),i=new Uint8Array(this.getUnencodedContentsSize()),r=0;for(let o=0,s=t.length;o<s;o++){let[a,c,l]=t[o],d=qn(jn(a)),h=qn(jn(c)),u=qn(jn(l));for(let f=e[0]-1;f>=0;f--)i[r++]=d[f]||0;for(let f=e[1]-1;f>=0;f--)i[r++]=h[f]||0;for(let f=e[2]-1;f>=0;f--)i[r++]=u[f]||0}return i}getUnencodedContentsSize(){let t=this.maxByteWidthsCache.access();return au(t)*this.entries.length}updateDict(){super.updateDict();let t=this.maxByteWidthsCache.access(),e=this.indexCache.access(),{context:i}=this.dict;this.dict.set(x.of("W"),i.obj(t)),this.dict.set(x.of("Index"),i.obj(e))}};mn.create=(n,t=!0)=>{let e=new mn(n,[],t);return e.addDeletedEntry(q.of(0,65535),0),e};mn.of=(n,t,e=!0)=>new mn(n,t,e);var hd=mn;var wl=class extends fs{constructor(t,e,i,r){super(t,e),this.encodeStreams=i,this.objectsPerStream=r}async computeBufferSize(){let t=this.context.largestObjectNumber+1,e=Bi.forVersion(1,7),i=e.sizeInBytes()+2,r=hd.create(this.createTrailerDict(),this.encodeStreams),o=[],s=[],a=[],c=this.context.enumerateIndirectObjects();for(let u=0,f=c.length;u<f;u++){let p=c[u],[g,m]=p;if(g===this.context.trailerInfo.Encrypt||m instanceof Fe||m instanceof ps||g.generationNumber!==0)o.push(p),r.addUncompressedEntry(g,i),i+=this.computeIndirectObjectSize(p),this.shouldWaitForTick(1)&&await gi();else{let w=Ir(s),F=Ir(a);(!w||w.length%this.objectsPerStream===0)&&(w=[],s.push(w),F=q.of(t++),a.push(F)),r.addCompressedEntry(g,F,w.length),w.push(p)}}for(let u=0,f=s.length;u<f;u++){let p=s[u],g=a[u],m=us.withContextAndObjects(this.context,p,this.encodeStreams);r.addUncompressedEntry(g,i),i+=this.computeIndirectObjectSize([g,m]),o.push([g,m]),this.shouldWaitForTick(p.length)&&await gi()}let l=q.of(t++);r.dict.set(x.of("Size"),N.of(t)),r.addUncompressedEntry(l,i);let d=i;i+=this.computeIndirectObjectSize([l,r]),o.push([l,r]);let h=$n.forLastCrossRefSectionOffset(d);return i+=h.sizeInBytes(),{size:i,header:e,indirectObjects:o,trailer:h}}};wl.forContext=(n,t,e=!0,i=50)=>new wl(n,t,e,i);var ud=wl;var vl=class{constructor(t,e){this.encoding=t===zr.ZapfDingbats?Ka.ZapfDingbats:t===zr.Symbol?Ka.Symbol:Ka.WinAnsi,this.font=I0.load(t),this.fontName=this.font.FontName,this.customName=e}encodeText(t){let e=this.encodeTextAsGlyphs(t),i=new Array(e.length);for(let r=0,o=e.length;r<o;r++)i[r]=Ii(e[r].code);return M.of(i.join(""))}widthOfTextAtSize(t,e){let i=this.encodeTextAsGlyphs(t),r=0;for(let s=0,a=i.length;s<a;s++){let c=i[s].name,l=(i[s+1]||{}).name,d=this.font.getXAxisKerningForPair(c,l)||0;r+=this.widthOfGlyph(c)+d}let o=e/1e3;return r*o}heightOfFontAtSize(t,e={}){let{descender:i=!0}=e,{Ascender:r,Descender:o,FontBBox:s}=this.font,a=r||s[3],c=o||s[1],l=a-c;return i||(l+=o||0),l/1e3*t}sizeOfFontAtHeight(t){let{Ascender:e,Descender:i,FontBBox:r}=this.font,o=e||r[3],s=i||r[1];return 1e3*t/(o-s)}embedIntoContext(t,e){let i=t.obj({Type:"Font",Subtype:"Type1",BaseFont:this.customName||this.fontName,Encoding:this.encoding===Ka.WinAnsi?"WinAnsiEncoding":void 0});return e?(t.assign(e,i),e):t.register(i)}widthOfGlyph(t){return this.font.getWidthOfGlyph(t)||250}encodeTextAsGlyphs(t){let e=Array.from(t),i=new Array(e.length);for(let r=0,o=e.length;r<o;r++){let s=Uc(e[r]);try{i[r]=this.encoding.encodeUnicodeCodePoint(s)}catch(a){i[r]=this.encoding.encodeUnicodeCodePoint(Uc("?"))}}return i}};vl.for=(n,t)=>new vl(n,t);var tr=vl;var X0=(n,t)=>{let e=new Array(n.length);for(let i=0,r=n.length;i<r;i++){let o=n[i],s=G0(fd(t(o))),a=G0(...o.codePoints.map(Iv));e[i]=[s,a]}return Av(e)},Av=n=>`/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CIDSystemInfo <<
/Registry (Adobe)
/Ordering (UCS)
/Supplement 0
>> def
/CMapName /Adobe-Identity-UCS def
/CMapType 2 def
1 begincodespacerange
<0000><ffff>
endcodespacerange
${n.length} beginbfchar
${n.map(([t,e])=>`${t} ${e}`).join(`
`)}
endbfchar
endcmap
CMapName currentdict /CMap defineresource pop
end
end`,G0=(...n)=>`<${n.join("")}>`,fd=n=>Ai(n,4),Iv=n=>{if(uu(n))return fd(n);if(fu(n)){let i=Wc(n),r=jc(n);return`${fd(i)}${fd(r)}`}let e=`0x${Ii(n)} is not a valid UTF-8 or UTF-16 codepoint.`;throw new Error(e)};var Lv=n=>{let t=0,e=i=>{t|=1<<i-1};return n.fixedPitch&&e(1),n.serif&&e(2),n.symbolic&&e(3),n.script&&e(4),n.nonsymbolic&&e(6),n.italic&&e(7),n.allCap&&e(17),n.smallCap&&e(18),n.forceBold&&e(19),t},Z0=n=>{let t=n["OS/2"]?n["OS/2"].sFamilyClass:0;return Lv({fixedPitch:n.post.isFixedPitch,serif:1<=t&&t<=7,symbolic:!0,script:t===10,italic:n.head.macStyle.italic})};var Fl=class{static async for(t,e,i,r){let o=await t.create(e);return new Fl(o,e,i,r)}constructor(t,e,i,r){this.allGlyphsInFontSortedById=()=>{let o=new Array(this.font.characterSet.length);for(let s=0,a=o.length;s<a;s++){let c=this.font.characterSet[s];o[s]=this.font.glyphForCodePoint(c)}return su(o.sort(ou),s=>s.id)},this.font=t,this.scale=1e3/this.font.unitsPerEm,this.fontData=e,this.fontName=this.font.postscriptName||"Font",this.customName=i,this.fontFeatures=r,this.baseFontName="",this.glyphCache=ct.populatedBy(this.allGlyphsInFontSortedById)}encodeText(t){let{glyphs:e}=this.font.layout(t,this.fontFeatures),i=new Array(e.length);for(let r=0,o=e.length;r<o;r++)i[r]=Ai(e[r].id,4);return M.of(i.join(""))}widthOfTextAtSize(t,e){let{glyphs:i}=this.font.layout(t,this.fontFeatures),r=0;for(let s=0,a=i.length;s<a;s++)r+=i[s].advanceWidth*this.scale;let o=e/1e3;return r*o}heightOfFontAtSize(t,e={}){let{descender:i=!0}=e,{ascent:r,descent:o,bbox:s}=this.font,a=(r||s.maxY)*this.scale,c=(o||s.minY)*this.scale,l=a-c;return i||(l-=Math.abs(o)||0),l/1e3*t}sizeOfFontAtHeight(t){let{ascent:e,descent:i,bbox:r}=this.font,o=(e||r.maxY)*this.scale,s=(i||r.minY)*this.scale;return 1e3*t/(o-s)}embedIntoContext(t,e){return this.baseFontName=this.customName||t.addRandomSuffix(this.fontName),this.embedFontDict(t,e)}async embedFontDict(t,e){let i=await this.embedCIDFontDict(t),r=this.embedUnicodeCmap(t),o=t.obj({Type:"Font",Subtype:"Type0",BaseFont:this.baseFontName,Encoding:"Identity-H",DescendantFonts:[i],ToUnicode:r});return e?(t.assign(e,o),e):t.register(o)}isCFF(){return this.font.cff}async embedCIDFontDict(t){let e=await this.embedFontDescriptor(t),i=t.obj({Type:"Font",Subtype:this.isCFF()?"CIDFontType0":"CIDFontType2",CIDToGIDMap:"Identity",BaseFont:this.baseFontName,CIDSystemInfo:{Registry:G.of("Adobe"),Ordering:G.of("Identity"),Supplement:0},FontDescriptor:e,W:this.computeWidths()});return t.register(i)}async embedFontDescriptor(t){let e=await this.embedFontStream(t),{scale:i}=this,{italicAngle:r,ascent:o,descent:s,capHeight:a,xHeight:c}=this.font,{minX:l,minY:d,maxX:h,maxY:u}=this.font.bbox,f=t.obj({Type:"FontDescriptor",FontName:this.baseFontName,Flags:Z0(this.font),FontBBox:[l*i,d*i,h*i,u*i],ItalicAngle:r,Ascent:o*i,Descent:s*i,CapHeight:(a||o)*i,XHeight:(c||0)*i,StemV:0,[this.isCFF()?"FontFile3":"FontFile2"]:e});return t.register(f)}async serializeFont(){return this.fontData}async embedFontStream(t){let e=t.flateStream(await this.serializeFont(),{Subtype:this.isCFF()?"CIDFontType0C":void 0});return t.register(e)}embedUnicodeCmap(t){let e=X0(this.glyphCache.access(),this.glyphId.bind(this)),i=t.flateStream(e);return t.register(i)}glyphId(t){return t?t.id:-1}computeWidths(){let t=this.glyphCache.access(),e=[],i=[];for(let r=0,o=t.length;r<o;r++){let s=t[r],a=t[r-1],c=this.glyphId(s),l=this.glyphId(a);r===0?e.push(c):c-l!==1&&(e.push(i),e.push(c),i=[]),i.push(s.advanceWidth*this.scale)}return e.push(i),e}},ir=Fl;var Pl=class extends ir{static async for(t,e,i,r){let o=await t.create(e);return new Pl(o,e,i,r)}constructor(t,e,i,r){super(t,e,i,r),this.subset=this.font.createSubset(),this.glyphs=[],this.glyphCache=ct.populatedBy(()=>this.glyphs),this.glyphIdMap=new Map}encodeText(t){let{glyphs:e}=this.font.layout(t,this.fontFeatures),i=new Array(e.length);for(let r=0,o=e.length;r<o;r++){let s=e[r],a=this.subset.includeGlyph(s);this.glyphs[a-1]=s,this.glyphIdMap.set(s.id,a),i[r]=Ai(a,4)}return this.glyphCache.invalidate(),M.of(i.join(""))}isCFF(){return this.subset.cff}glyphId(t){return t?this.glyphIdMap.get(t.id):-1}serializeFont(){return new Promise((t,e)=>{let i=[];this.subset.encodeStream().on("data",r=>i.push(r)).on("end",()=>t(ru(i))).on("error",r=>e(r))})}},pd=Pl;var gs;(function(n){n.Source="Source",n.Data="Data",n.Alternative="Alternative",n.Supplement="Supplement",n.EncryptedPayload="EncryptedPayload",n.FormData="EncryptedPayload",n.Schema="Schema",n.Unspecified="Unspecified"})(gs||(gs={}));var kl=class{static for(t,e,i={}){return new kl(t,e,i)}constructor(t,e,i={}){this.fileData=t,this.fileName=e,this.options=i}async embedIntoContext(t,e){let{mimeType:i,description:r,creationDate:o,modificationDate:s,afRelationship:a}=this.options,c=t.flateStream(this.fileData,{Type:"EmbeddedFile",Subtype:i!=null?i:void 0,Params:{Size:this.fileData.length,CreationDate:o?G.fromDate(o):void 0,ModDate:s?G.fromDate(s):void 0}}),l=t.register(c),d=t.obj({Type:"Filespec",F:G.of(this.fileName),UF:M.fromText(this.fileName),EF:{F:l},Desc:r?M.fromText(r):void 0,AFRelationship:a!=null?a:void 0});return e?(t.assign(e,d),e):t.register(d)}},gd=kl;var Y0=[65472,65473,65474,65475,65477,65478,65479,65480,65481,65482,65483,65484,65485,65486,65487],ms;(function(n){n.DeviceGray="DeviceGray",n.DeviceRGB="DeviceRGB",n.DeviceCMYK="DeviceCMYK"})(ms||(ms={}));var Ov={1:ms.DeviceGray,3:ms.DeviceRGB,4:ms.DeviceCMYK},Dl=class{static async for(t){let e=new DataView(t.buffer);if(e.getUint16(0)!==65496)throw new Error("SOI not found in JPEG");let r=2,o;for(;r<e.byteLength&&(o=e.getUint16(r),r+=2,!Y0.includes(o));)r+=e.getUint16(r);if(!Y0.includes(o))throw new Error("Invalid JPEG");r+=2;let s=e.getUint8(r++),a=e.getUint16(r);r+=2;let c=e.getUint16(r);r+=2;let l=e.getUint8(r++),d=Ov[l];if(!d)throw new Error("Unknown JPEG channel.");let h=d;return new Dl(t,s,c,a,h)}constructor(t,e,i,r,o){this.imageData=t,this.bitsPerComponent=e,this.width=i,this.height=r,this.colorSpace=o}async embedIntoContext(t,e){let i=t.stream(this.imageData,{Type:"XObject",Subtype:"Image",BitsPerComponent:this.bitsPerComponent,Width:this.width,Height:this.height,ColorSpace:this.colorSpace,Filter:"DCTDecode",Decode:this.colorSpace===ms.DeviceCMYK?[1,0,1,0,1,0,1,0]:void 0});return e?(t.assign(e,i),e):t.register(i)}},bs=Dl;var J0=Un(qa()),L={};L.toRGBA8=function(n){var t=n.width,e=n.height;if(n.tabs.acTL==null)return[L.toRGBA8.decodeImage(n.data,t,e,n).buffer];var i=[];n.frames[0].data==null&&(n.frames[0].data=n.data);for(var r=t*e*4,o=new Uint8Array(r),s=new Uint8Array(r),a=new Uint8Array(r),c=0;c<n.frames.length;c++){var l=n.frames[c],d=l.rect.x,h=l.rect.y,u=l.rect.width,f=l.rect.height,p=L.toRGBA8.decodeImage(l.data,u,f,n);if(c!=0)for(var g=0;g<r;g++)a[g]=o[g];if(l.blend==0?L._copyTile(p,u,f,o,t,e,d,h,0):l.blend==1&&L._copyTile(p,u,f,o,t,e,d,h,1),i.push(o.buffer.slice(0)),l.dispose!=0){if(l.dispose==1)L._copyTile(s,u,f,o,t,e,d,h,0);else if(l.dispose==2)for(var g=0;g<r;g++)o[g]=a[g]}}return i};L.toRGBA8.decodeImage=function(n,t,e,i){var r=t*e,o=L.decode._getBPP(i),s=Math.ceil(t*o/8),a=new Uint8Array(r*4),c=new Uint32Array(a.buffer),l=i.ctype,d=i.depth,h=L._bin.readUshort,u=Date.now();if(l==6){var f=r<<2;if(d==8)for(var p=0;p<f;p+=4)a[p]=n[p],a[p+1]=n[p+1],a[p+2]=n[p+2],a[p+3]=n[p+3];if(d==16)for(var p=0;p<f;p++)a[p]=n[p<<1]}else if(l==2){var g=i.tabs.tRNS;if(g==null){if(d==8)for(var p=0;p<r;p++){var m=p*3;c[p]=255<<24|n[m+2]<<16|n[m+1]<<8|n[m]}if(d==16)for(var p=0;p<r;p++){var m=p*6;c[p]=255<<24|n[m+4]<<16|n[m+2]<<8|n[m]}}else{var b=g[0],w=g[1],F=g[2];if(d==8)for(var p=0;p<r;p++){var v=p<<2,m=p*3;c[p]=255<<24|n[m+2]<<16|n[m+1]<<8|n[m],n[m]==b&&n[m+1]==w&&n[m+2]==F&&(a[v+3]=0)}if(d==16)for(var p=0;p<r;p++){var v=p<<2,m=p*6;c[p]=255<<24|n[m+4]<<16|n[m+2]<<8|n[m],h(n,m)==b&&h(n,m+2)==w&&h(n,m+4)==F&&(a[v+3]=0)}}}else if(l==3){var P=i.tabs.PLTE,k=i.tabs.tRNS,C=k?k.length:0;if(d==1)for(var D=0;D<e;D++)for(var T=D*s,O=D*t,p=0;p<t;p++){var v=O+p<<2,E=n[T+(p>>3)]>>7-((p&7)<<0)&1,V=3*E;a[v]=P[V],a[v+1]=P[V+1],a[v+2]=P[V+2],a[v+3]=E<C?k[E]:255}if(d==2)for(var D=0;D<e;D++)for(var T=D*s,O=D*t,p=0;p<t;p++){var v=O+p<<2,E=n[T+(p>>2)]>>6-((p&3)<<1)&3,V=3*E;a[v]=P[V],a[v+1]=P[V+1],a[v+2]=P[V+2],a[v+3]=E<C?k[E]:255}if(d==4)for(var D=0;D<e;D++)for(var T=D*s,O=D*t,p=0;p<t;p++){var v=O+p<<2,E=n[T+(p>>1)]>>4-((p&1)<<2)&15,V=3*E;a[v]=P[V],a[v+1]=P[V+1],a[v+2]=P[V+2],a[v+3]=E<C?k[E]:255}if(d==8)for(var p=0;p<r;p++){var v=p<<2,E=n[p],V=3*E;a[v]=P[V],a[v+1]=P[V+1],a[v+2]=P[V+2],a[v+3]=E<C?k[E]:255}}else if(l==4){if(d==8)for(var p=0;p<r;p++){var v=p<<2,W=p<<1,B=n[W];a[v]=B,a[v+1]=B,a[v+2]=B,a[v+3]=n[W+1]}if(d==16)for(var p=0;p<r;p++){var v=p<<2,W=p<<2,B=n[W];a[v]=B,a[v+1]=B,a[v+2]=B,a[v+3]=n[W+2]}}else if(l==0)for(var b=i.tabs.tRNS?i.tabs.tRNS:-1,D=0;D<e;D++){var U=D*s,te=D*t;if(d==1)for(var z=0;z<t;z++){var B=255*(n[U+(z>>>3)]>>>7-(z&7)&1),re=B==b*255?0:255;c[te+z]=re<<24|B<<16|B<<8|B}else if(d==2)for(var z=0;z<t;z++){var B=85*(n[U+(z>>>2)]>>>6-((z&3)<<1)&3),re=B==b*85?0:255;c[te+z]=re<<24|B<<16|B<<8|B}else if(d==4)for(var z=0;z<t;z++){var B=17*(n[U+(z>>>1)]>>>4-((z&1)<<2)&15),re=B==b*17?0:255;c[te+z]=re<<24|B<<16|B<<8|B}else if(d==8)for(var z=0;z<t;z++){var B=n[U+z],re=B==b?0:255;c[te+z]=re<<24|B<<16|B<<8|B}else if(d==16)for(var z=0;z<t;z++){var B=n[U+(z<<1)],re=h(n,U+(z<<p))==b?0:255;c[te+z]=re<<24|B<<16|B<<8|B}}return a};L.decode=function(n){for(var t=new Uint8Array(n),e=8,i=L._bin,r=i.readUshort,o=i.readUint,s={tabs:{},frames:[]},a=new Uint8Array(t.length),c=0,l,d=0,h=[137,80,78,71,13,10,26,10],u=0;u<8;u++)if(t[u]!=h[u])throw"The input is not a PNG file!";for(;e<t.length;){var f=i.readUint(t,e);e+=4;var p=i.readASCII(t,e,4);if(e+=4,p=="IHDR")L.decode._IHDR(t,e,s);else if(p=="IDAT"){for(var u=0;u<f;u++)a[c+u]=t[e+u];c+=f}else if(p=="acTL")s.tabs[p]={num_frames:o(t,e),num_plays:o(t,e+4)},l=new Uint8Array(t.length);else if(p=="fcTL"){if(d!=0){var g=s.frames[s.frames.length-1];g.data=L.decode._decompress(s,l.slice(0,d),g.rect.width,g.rect.height),d=0}var m={x:o(t,e+12),y:o(t,e+16),width:o(t,e+4),height:o(t,e+8)},b=r(t,e+22);b=r(t,e+20)/(b==0?100:b);var w={rect:m,delay:Math.round(b*1e3),dispose:t[e+24],blend:t[e+25]};s.frames.push(w)}else if(p=="fdAT"){for(var u=0;u<f-4;u++)l[d+u]=t[e+u+4];d+=f-4}else if(p=="pHYs")s.tabs[p]=[i.readUint(t,e),i.readUint(t,e+4),t[e+8]];else if(p=="cHRM"){s.tabs[p]=[];for(var u=0;u<8;u++)s.tabs[p].push(i.readUint(t,e+u*4))}else if(p=="tEXt"){s.tabs[p]==null&&(s.tabs[p]={});var F=i.nextZero(t,e),v=i.readASCII(t,e,F-e),P=i.readASCII(t,F+1,e+f-F-1);s.tabs[p][v]=P}else if(p=="iTXt"){s.tabs[p]==null&&(s.tabs[p]={});var F=0,k=e;F=i.nextZero(t,k);var v=i.readASCII(t,k,F-k);k=F+1;var C=t[k],D=t[k+1];k+=2,F=i.nextZero(t,k);var T=i.readASCII(t,k,F-k);k=F+1,F=i.nextZero(t,k);var O=i.readUTF8(t,k,F-k);k=F+1;var P=i.readUTF8(t,k,f-(k-e));s.tabs[p][v]=P}else if(p=="PLTE")s.tabs[p]=i.readBytes(t,e,f);else if(p=="hIST"){var E=s.tabs.PLTE.length/3;s.tabs[p]=[];for(var u=0;u<E;u++)s.tabs[p].push(r(t,e+u*2))}else if(p=="tRNS")s.ctype==3?s.tabs[p]=i.readBytes(t,e,f):s.ctype==0?s.tabs[p]=r(t,e):s.ctype==2&&(s.tabs[p]=[r(t,e),r(t,e+2),r(t,e+4)]);else if(p=="gAMA")s.tabs[p]=i.readUint(t,e)/1e5;else if(p=="sRGB")s.tabs[p]=t[e];else if(p=="bKGD")s.ctype==0||s.ctype==4?s.tabs[p]=[r(t,e)]:s.ctype==2||s.ctype==6?s.tabs[p]=[r(t,e),r(t,e+2),r(t,e+4)]:s.ctype==3&&(s.tabs[p]=t[e]);else if(p=="IEND")break;e+=f;var V=i.readUint(t,e);e+=4}if(d!=0){var g=s.frames[s.frames.length-1];g.data=L.decode._decompress(s,l.slice(0,d),g.rect.width,g.rect.height),d=0}return s.data=L.decode._decompress(s,a,s.width,s.height),delete s.compress,delete s.interlace,delete s.filter,s};L.decode._decompress=function(n,t,e,i){var a=Date.now(),r=L.decode._getBPP(n),o=Math.ceil(e*r/8),s=new Uint8Array((o+1+n.interlace)*i);t=L.decode._inflate(t,s);var a=Date.now();return n.interlace==0?t=L.decode._filterZero(t,n,0,e,i):n.interlace==1&&(t=L.decode._readInterlace(t,n)),t};L.decode._inflate=function(n,t){var e=L.inflateRaw(new Uint8Array(n.buffer,2,n.length-6),t);return e};L.inflateRaw=function(){var n={};return n.H={},n.H.N=function(t,e){var i=Uint8Array,r=0,o=0,s=0,a=0,c=0,l=0,d=0,h=0,u=0,f,p;if(t[0]==3&&t[1]==0)return e||new i(0);var g=n.H,m=g.b,b=g.e,w=g.R,F=g.n,v=g.A,P=g.Z,k=g.m,C=e==null;for(C&&(e=new i(t.length>>>2<<3));r==0;){if(r=m(t,u,1),o=m(t,u+1,2),u+=3,o==0){u&7&&(u+=8-(u&7));var D=(u>>>3)+4,T=t[D-4]|t[D-3]<<8;C&&(e=n.H.W(e,h+T)),e.set(new i(t.buffer,t.byteOffset+D,T),h),u=D+T<<3,h+=T;continue}if(C&&(e=n.H.W(e,h+(1<<17))),o==1&&(f=k.J,p=k.h,l=(1<<9)-1,d=(1<<5)-1),o==2){s=b(t,u,5)+257,a=b(t,u+5,5)+1,c=b(t,u+10,4)+4,u+=14;for(var O=u,E=1,V=0;V<38;V+=2)k.Q[V]=0,k.Q[V+1]=0;for(var V=0;V<c;V++){var W=b(t,u+V*3,3);k.Q[(k.X[V]<<1)+1]=W,W>E&&(E=W)}u+=3*c,F(k.Q,E),v(k.Q,E,k.u),f=k.w,p=k.d,u=w(k.u,(1<<E)-1,s+a,t,u,k.v);var B=g.V(k.v,0,s,k.C);l=(1<<B)-1;var U=g.V(k.v,s,a,k.D);d=(1<<U)-1,F(k.C,B),v(k.C,B,f),F(k.D,U),v(k.D,U,p)}for(;;){var te=f[P(t,u)&l];u+=te&15;var z=te>>>4;if(!(z>>>8))e[h++]=z;else{if(z==256)break;var re=h+z-254;if(z>264){var Ee=k.q[z-257];re=h+(Ee>>>3)+b(t,u,Ee&7),u+=Ee&7}var Ue=p[P(t,u)&d];u+=Ue&15;var me=Ue>>>4,Ae=k.c[me],we=(Ae>>>4)+m(t,u,Ae&15);for(u+=Ae&15;h<re;)e[h]=e[h++-we],e[h]=e[h++-we],e[h]=e[h++-we],e[h]=e[h++-we];h=re}}}return e.length==h?e:e.slice(0,h)},n.H.W=function(t,e){var i=t.length;if(e<=i)return t;var r=new Uint8Array(i<<1);return r.set(t,0),r},n.H.R=function(t,e,i,r,o,s){for(var a=n.H.e,c=n.H.Z,l=0;l<i;){var d=t[c(r,o)&e];o+=d&15;var h=d>>>4;if(h<=15)s[l]=h,l++;else{var u=0,f=0;h==16?(f=3+a(r,o,2),o+=2,u=s[l-1]):h==17?(f=3+a(r,o,3),o+=3):h==18&&(f=11+a(r,o,7),o+=7);for(var p=l+f;l<p;)s[l]=u,l++}}return o},n.H.V=function(t,e,i,r){for(var o=0,s=0,a=r.length>>>1;s<i;){var c=t[s+e];r[s<<1]=0,r[(s<<1)+1]=c,c>o&&(o=c),s++}for(;s<a;)r[s<<1]=0,r[(s<<1)+1]=0,s++;return o},n.H.n=function(t,e){for(var i=n.H.m,r=t.length,o,s,a,c,l,d=i.j,c=0;c<=e;c++)d[c]=0;for(c=1;c<r;c+=2)d[t[c]]++;var h=i.K;for(o=0,d[0]=0,s=1;s<=e;s++)o=o+d[s-1]<<1,h[s]=o;for(a=0;a<r;a+=2)l=t[a+1],l!=0&&(t[a]=h[l],h[l]++)},n.H.A=function(t,e,i){for(var r=t.length,o=n.H.m,s=o.r,a=0;a<r;a+=2)if(t[a+1]!=0)for(var c=a>>1,l=t[a+1],d=c<<4|l,h=e-l,u=t[a]<<h,f=u+(1<<h);u!=f;){var p=s[u]>>>15-e;i[p]=d,u++}},n.H.l=function(t,e){for(var i=n.H.m.r,r=15-e,o=0;o<t.length;o+=2){var s=t[o]<<e-t[o+1];t[o]=i[s]>>>r}},n.H.M=function(t,e,i){i=i<<(e&7);var r=e>>>3;t[r]|=i,t[r+1]|=i>>>8},n.H.I=function(t,e,i){i=i<<(e&7);var r=e>>>3;t[r]|=i,t[r+1]|=i>>>8,t[r+2]|=i>>>16},n.H.e=function(t,e,i){return(t[e>>>3]|t[(e>>>3)+1]<<8)>>>(e&7)&(1<<i)-1},n.H.b=function(t,e,i){return(t[e>>>3]|t[(e>>>3)+1]<<8|t[(e>>>3)+2]<<16)>>>(e&7)&(1<<i)-1},n.H.Z=function(t,e){return(t[e>>>3]|t[(e>>>3)+1]<<8|t[(e>>>3)+2]<<16)>>>(e&7)},n.H.i=function(t,e){return(t[e>>>3]|t[(e>>>3)+1]<<8|t[(e>>>3)+2]<<16|t[(e>>>3)+3]<<24)>>>(e&7)},n.H.m=function(){var t=Uint16Array,e=Uint32Array;return{K:new t(16),j:new t(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new t(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new e(32),J:new t(512),_:[],h:new t(32),$:[],w:new t(32768),C:[],v:[],d:new t(32768),D:[],u:new t(512),Q:[],r:new t(1<<15),s:new e(286),Y:new e(30),a:new e(19),t:new e(15e3),k:new t(1<<16),g:new t(1<<15)}}(),function(){for(var t=n.H.m,e=1<<15,i=0;i<e;i++){var r=i;r=(r&2863311530)>>>1|(r&1431655765)<<1,r=(r&3435973836)>>>2|(r&858993459)<<2,r=(r&4042322160)>>>4|(r&252645135)<<4,r=(r&4278255360)>>>8|(r&16711935)<<8,t.r[i]=(r>>>16|r<<16)>>>17}function o(s,a,c){for(;a--!=0;)s.push(0,c)}for(var i=0;i<32;i++)t.q[i]=t.S[i]<<3|t.T[i],t.c[i]=t.p[i]<<4|t.z[i];o(t._,144,8),o(t._,255-143,9),o(t._,279-255,7),o(t._,287-279,8),n.H.n(t._,9),n.H.A(t._,9,t.J),n.H.l(t._,9),o(t.$,32,5),n.H.n(t.$,5),n.H.A(t.$,5,t.h),n.H.l(t.$,5),o(t.Q,19,0),o(t.C,286,0),o(t.D,30,0),o(t.v,320,0)}(),n.H.N}();L.decode._readInterlace=function(n,t){for(var e=t.width,i=t.height,r=L.decode._getBPP(t),o=r>>3,s=Math.ceil(e*r/8),a=new Uint8Array(i*s),c=0,l=[0,0,4,0,2,0,1],d=[0,4,0,2,0,1,0],h=[8,8,8,4,4,2,2],u=[8,8,4,4,2,2,1],f=0;f<7;){for(var p=h[f],g=u[f],m=0,b=0,w=l[f];w<i;)w+=p,b++;for(var F=d[f];F<e;)F+=g,m++;var v=Math.ceil(m*r/8);L.decode._filterZero(n,t,c,m,b);for(var P=0,k=l[f];k<i;){for(var C=d[f],D=c+P*v<<3;C<e;){if(r==1){var T=n[D>>3];T=T>>7-(D&7)&1,a[k*s+(C>>3)]|=T<<7-((C&7)<<0)}if(r==2){var T=n[D>>3];T=T>>6-(D&7)&3,a[k*s+(C>>2)]|=T<<6-((C&3)<<1)}if(r==4){var T=n[D>>3];T=T>>4-(D&7)&15,a[k*s+(C>>1)]|=T<<4-((C&1)<<2)}if(r>=8)for(var O=k*s+C*o,E=0;E<o;E++)a[O+E]=n[(D>>3)+E];D+=r,C+=g}P++,k+=p}m*b!=0&&(c+=b*(1+v)),f=f+1}return a};L.decode._getBPP=function(n){var t=[1,null,3,1,2,null,4][n.ctype];return t*n.depth};L.decode._filterZero=function(n,t,e,i,r){var o=L.decode._getBPP(t),s=Math.ceil(i*o/8),a=L.decode._paeth;o=Math.ceil(o/8);var c=0,l=1,d=n[e],h=0;if(d>1&&(n[e]=[0,0,1][d-2]),d==3)for(h=o;h<s;h++)n[h+1]=n[h+1]+(n[h+1-o]>>>1)&255;for(var u=0;u<r;u++)if(c=e+u*s,l=c+u+1,d=n[l-1],h=0,d==0)for(;h<s;h++)n[c+h]=n[l+h];else if(d==1){for(;h<o;h++)n[c+h]=n[l+h];for(;h<s;h++)n[c+h]=n[l+h]+n[c+h-o]}else if(d==2)for(;h<s;h++)n[c+h]=n[l+h]+n[c+h-s];else if(d==3){for(;h<o;h++)n[c+h]=n[l+h]+(n[c+h-s]>>>1);for(;h<s;h++)n[c+h]=n[l+h]+(n[c+h-s]+n[c+h-o]>>>1)}else{for(;h<o;h++)n[c+h]=n[l+h]+a(0,n[c+h-s],0);for(;h<s;h++)n[c+h]=n[l+h]+a(n[c+h-o],n[c+h-s],n[c+h-o-s])}return n};L.decode._paeth=function(n,t,e){var i=n+t-e,r=i-n,o=i-t,s=i-e;return r*r<=o*o&&r*r<=s*s?n:o*o<=s*s?t:e};L.decode._IHDR=function(n,t,e){var i=L._bin;e.width=i.readUint(n,t),t+=4,e.height=i.readUint(n,t),t+=4,e.depth=n[t],t++,e.ctype=n[t],t++,e.compress=n[t],t++,e.filter=n[t],t++,e.interlace=n[t],t++};L._bin={nextZero:function(n,t){for(;n[t]!=0;)t++;return t},readUshort:function(n,t){return n[t]<<8|n[t+1]},writeUshort:function(n,t,e){n[t]=e>>8&255,n[t+1]=e&255},readUint:function(n,t){return n[t]*(256*256*256)+(n[t+1]<<16|n[t+2]<<8|n[t+3])},writeUint:function(n,t,e){n[t]=e>>24&255,n[t+1]=e>>16&255,n[t+2]=e>>8&255,n[t+3]=e&255},readASCII:function(n,t,e){for(var i="",r=0;r<e;r++)i+=String.fromCharCode(n[t+r]);return i},writeASCII:function(n,t,e){for(var i=0;i<e.length;i++)n[t+i]=e.charCodeAt(i)},readBytes:function(n,t,e){for(var i=[],r=0;r<e;r++)i.push(n[t+r]);return i},pad:function(n){return n.length<2?"0"+n:n},readUTF8:function(n,t,e){for(var i="",r,o=0;o<e;o++)i+="%"+L._bin.pad(n[t+o].toString(16));try{r=decodeURIComponent(i)}catch(s){return L._bin.readASCII(n,t,e)}return r}};L._copyTile=function(n,t,e,i,r,o,s,a,c){for(var l=Math.min(t,r),d=Math.min(e,o),h=0,u=0,f=0;f<d;f++)for(var p=0;p<l;p++)if(s>=0&&a>=0?(h=f*t+p<<2,u=(a+f)*r+s+p<<2):(h=(-a+f)*t-s+p<<2,u=f*r+p<<2),c==0)i[u]=n[h],i[u+1]=n[h+1],i[u+2]=n[h+2],i[u+3]=n[h+3];else if(c==1){var g=n[h+3]*.00392156862745098,m=n[h]*g,b=n[h+1]*g,w=n[h+2]*g,F=i[u+3]*(1/255),v=i[u]*F,P=i[u+1]*F,k=i[u+2]*F,C=1-g,D=g+F*C,T=D==0?0:1/D;i[u+3]=255*D,i[u+0]=(m+v*C)*T,i[u+1]=(b+P*C)*T,i[u+2]=(w+k*C)*T}else if(c==2){var g=n[h+3],m=n[h],b=n[h+1],w=n[h+2],F=i[u+3],v=i[u],P=i[u+1],k=i[u+2];g==F&&m==v&&b==P&&w==k?(i[u]=0,i[u+1]=0,i[u+2]=0,i[u+3]=0):(i[u]=m,i[u+1]=b,i[u+2]=w,i[u+3]=g)}else if(c==3){var g=n[h+3],m=n[h],b=n[h+1],w=n[h+2],F=i[u+3],v=i[u],P=i[u+1],k=i[u+2];if(g==F&&m==v&&b==P&&w==k)continue;if(g<220&&F>20)return!1}return!0};L.encode=function(n,t,e,i,r,o,s){i==null&&(i=0),s==null&&(s=!1);var a=L.encode.compress(n,t,e,i,[!1,!1,!1,0,s]);return L.encode.compressPNG(a,-1),L.encode._main(a,t,e,r,o)};L.encodeLL=function(n,t,e,i,r,o,s,a){for(var c={ctype:0+(i==1?0:2)+(r==0?0:4),depth:o,frames:[]},l=Date.now(),d=(i+r)*o,h=d*t,u=0;u<n.length;u++)c.frames.push({rect:{x:0,y:0,width:t,height:e},img:new Uint8Array(n[u]),blend:0,dispose:1,bpp:Math.ceil(d/8),bpl:Math.ceil(h/8)});L.encode.compressPNG(c,0,!0);var f=L.encode._main(c,t,e,s,a);return f};L.encode._main=function(n,t,e,i,r){r==null&&(r={});var o=L.crc.crc,s=L._bin.writeUint,a=L._bin.writeUshort,c=L._bin.writeASCII,l=8,d=n.frames.length>1,h=!1,u=8+(16+5+4)+(d?20:0);if(r.sRGB!=null&&(u+=8+1+4),r.pHYs!=null&&(u+=8+9+4),n.ctype==3){for(var f=n.plte.length,p=0;p<f;p++)n.plte[p]>>>24!=255&&(h=!0);u+=8+f*3+4+(h?8+f*1+4:0)}for(var g=0;g<n.frames.length;g++){var m=n.frames[g];d&&(u+=38),u+=m.cimg.length+12,g!=0&&(u+=4)}u+=12;for(var b=new Uint8Array(u),w=[137,80,78,71,13,10,26,10],p=0;p<8;p++)b[p]=w[p];if(s(b,l,13),l+=4,c(b,l,"IHDR"),l+=4,s(b,l,t),l+=4,s(b,l,e),l+=4,b[l]=n.depth,l++,b[l]=n.ctype,l++,b[l]=0,l++,b[l]=0,l++,b[l]=0,l++,s(b,l,o(b,l-17,17)),l+=4,r.sRGB!=null&&(s(b,l,1),l+=4,c(b,l,"sRGB"),l+=4,b[l]=r.sRGB,l++,s(b,l,o(b,l-5,5)),l+=4),r.pHYs!=null&&(s(b,l,9),l+=4,c(b,l,"pHYs"),l+=4,s(b,l,r.pHYs[0]),l+=4,s(b,l,r.pHYs[1]),l+=4,b[l]=r.pHYs[2],l++,s(b,l,o(b,l-13,13)),l+=4),d&&(s(b,l,8),l+=4,c(b,l,"acTL"),l+=4,s(b,l,n.frames.length),l+=4,s(b,l,r.loop!=null?r.loop:0),l+=4,s(b,l,o(b,l-12,12)),l+=4),n.ctype==3){var f=n.plte.length;s(b,l,f*3),l+=4,c(b,l,"PLTE"),l+=4;for(var p=0;p<f;p++){var F=p*3,v=n.plte[p],P=v&255,k=v>>>8&255,C=v>>>16&255;b[l+F+0]=P,b[l+F+1]=k,b[l+F+2]=C}if(l+=f*3,s(b,l,o(b,l-f*3-4,f*3+4)),l+=4,h){s(b,l,f),l+=4,c(b,l,"tRNS"),l+=4;for(var p=0;p<f;p++)b[l+p]=n.plte[p]>>>24&255;l+=f,s(b,l,o(b,l-f-4,f+4)),l+=4}}for(var D=0,g=0;g<n.frames.length;g++){var m=n.frames[g];d&&(s(b,l,26),l+=4,c(b,l,"fcTL"),l+=4,s(b,l,D++),l+=4,s(b,l,m.rect.width),l+=4,s(b,l,m.rect.height),l+=4,s(b,l,m.rect.x),l+=4,s(b,l,m.rect.y),l+=4,a(b,l,i[g]),l+=2,a(b,l,1e3),l+=2,b[l]=m.dispose,l++,b[l]=m.blend,l++,s(b,l,o(b,l-30,30)),l+=4);var T=m.cimg,f=T.length;s(b,l,f+(g==0?0:4)),l+=4;var O=l;c(b,l,g==0?"IDAT":"fdAT"),l+=4,g!=0&&(s(b,l,D++),l+=4),b.set(T,l),l+=f,s(b,l,o(b,O,l-O)),l+=4}return s(b,l,0),l+=4,c(b,l,"IEND"),l+=4,s(b,l,o(b,l-4,4)),l+=4,b.buffer};L.encode.compressPNG=function(n,t,e){for(var i=0;i<n.frames.length;i++){var r=n.frames[i],o=r.rect.width,s=r.rect.height,a=new Uint8Array(s*r.bpl+s);r.cimg=L.encode._filterZero(r.img,s,r.bpp,r.bpl,a,t,e)}};L.encode.compress=function(n,t,e,i,r){for(var o=r[0],s=r[1],a=r[2],c=r[3],l=r[4],d=6,h=8,u=255,f=0;f<n.length;f++)for(var p=new Uint8Array(n[f]),g=p.length,m=0;m<g;m+=4)u&=p[m+3];var b=u!=255,w=L.encode.framize(n,t,e,o,s,a),F={},v=[],P=[];if(i!=0){for(var k=[],m=0;m<w.length;m++)k.push(w[m].img.buffer);for(var C=L.encode.concatRGBA(k),D=L.quantize(C,i),T=0,O=new Uint8Array(D.abuf),m=0;m<w.length;m++){var E=w[m].img,V=E.length;P.push(new Uint8Array(D.inds.buffer,T>>2,V>>2));for(var f=0;f<V;f+=4)E[f]=O[T+f],E[f+1]=O[T+f+1],E[f+2]=O[T+f+2],E[f+3]=O[T+f+3];T+=V}for(var m=0;m<D.plte.length;m++)v.push(D.plte[m].est.rgba)}else for(var f=0;f<w.length;f++){var W=w[f],B=new Uint32Array(W.img.buffer),U=W.rect.width,g=B.length,te=new Uint8Array(g);P.push(te);for(var m=0;m<g;m++){var z=B[m];if(m!=0&&z==B[m-1])te[m]=te[m-1];else if(m>U&&z==B[m-U])te[m]=te[m-U];else{var re=F[z];if(re==null&&(F[z]=re=v.length,v.push(z),v.length>=300))break;te[m]=re}}}var Ee=v.length;Ee<=256&&l==!1&&(Ee<=2?h=1:Ee<=4?h=2:Ee<=16?h=4:h=8,h=Math.max(h,c));for(var f=0;f<w.length;f++){var W=w[f],Ue=W.rect.x,me=W.rect.y,U=W.rect.width,Ae=W.rect.height,we=W.img,ve=new Uint32Array(we.buffer),tn=4*U,ma=4;if(Ee<=256&&l==!1){tn=Math.ceil(h*U/8);for(var Wt=new Uint8Array(tn*Ae),Wo=P[f],Hn=0;Hn<Ae;Hn++){var m=Hn*tn,Bc=Hn*U;if(h==8)for(var ze=0;ze<U;ze++)Wt[m+ze]=Wo[Bc+ze];else if(h==4)for(var ze=0;ze<U;ze++)Wt[m+(ze>>1)]|=Wo[Bc+ze]<<4-(ze&1)*4;else if(h==2)for(var ze=0;ze<U;ze++)Wt[m+(ze>>2)]|=Wo[Bc+ze]<<6-(ze&3)*2;else if(h==1)for(var ze=0;ze<U;ze++)Wt[m+(ze>>3)]|=Wo[Bc+ze]<<7-(ze&7)*1}we=Wt,d=3,ma=1}else if(b==!1&&w.length==1){for(var Wt=new Uint8Array(U*Ae*3),ty=U*Ae,m=0;m<ty;m++){var E=m*3,Zh=m*4;Wt[E]=we[Zh],Wt[E+1]=we[Zh+1],Wt[E+2]=we[Zh+2]}we=Wt,d=2,ma=3,tn=3*U}W.img=we,W.bpl=tn,W.bpp=ma}return{ctype:d,depth:h,plte:v,frames:w}};L.encode.framize=function(n,t,e,i,r,o){for(var s=[],a=0;a<n.length;a++){var c=new Uint8Array(n[a]),l=new Uint32Array(c.buffer),d,h=0,u=0,f=t,p=e,g=i?1:0;if(a!=0){for(var m=o||i||a==1||s[a-2].dispose!=0?1:2,b=0,w=1e9,F=0;F<m;F++){for(var W=new Uint8Array(n[a-1-F]),v=new Uint32Array(n[a-1-F]),P=t,k=e,C=-1,D=-1,T=0;T<e;T++)for(var O=0;O<t;O++){var E=T*t+O;l[E]!=v[E]&&(O<P&&(P=O),O>C&&(C=O),T<k&&(k=T),T>D&&(D=T))}C==-1&&(P=k=C=D=0),r&&((P&1)==1&&P--,(k&1)==1&&k--);var V=(C-P+1)*(D-k+1);V<w&&(w=V,b=F,h=P,u=k,f=C-P+1,p=D-k+1)}var W=new Uint8Array(n[a-1-b]);b==1&&(s[a-1].dispose=2),d=new Uint8Array(f*p*4),L._copyTile(W,t,e,d,f,p,-h,-u,0),g=L._copyTile(c,t,e,d,f,p,-h,-u,3)?1:0,g==1?L.encode._prepareDiff(c,t,e,d,{x:h,y:u,width:f,height:p}):L._copyTile(c,t,e,d,f,p,-h,-u,0)}else d=c.slice(0);s.push({rect:{x:h,y:u,width:f,height:p},img:d,blend:g,dispose:0})}if(i)for(var a=0;a<s.length;a++){var B=s[a];if(B.blend!=1){var U=B.rect,te=s[a-1].rect,z=Math.min(U.x,te.x),re=Math.min(U.y,te.y),Ee=Math.max(U.x+U.width,te.x+te.width),Ue=Math.max(U.y+U.height,te.y+te.height),me={x:z,y:re,width:Ee-z,height:Ue-re};s[a-1].dispose=1,a-1!=0&&L.encode._updateFrame(n,t,e,s,a-1,me,r),L.encode._updateFrame(n,t,e,s,a,me,r)}}var Ae=0;if(n.length!=1)for(var E=0;E<s.length;E++){var B=s[E];Ae+=B.rect.width*B.rect.height}return s};L.encode._updateFrame=function(n,t,e,i,r,o,s){for(var a=Uint8Array,c=Uint32Array,l=new a(n[r-1]),d=new c(n[r-1]),h=r+1<n.length?new a(n[r+1]):null,u=new a(n[r]),f=new c(u.buffer),p=t,g=e,m=-1,b=-1,w=0;w<o.height;w++)for(var F=0;F<o.width;F++){var v=o.x+F,P=o.y+w,k=P*t+v,C=f[k];C==0||i[r-1].dispose==0&&d[k]==C&&(h==null||h[k*4+3]!=0)||(v<p&&(p=v),v>m&&(m=v),P<g&&(g=P),P>b&&(b=P))}m==-1&&(p=g=m=b=0),s&&((p&1)==1&&p--,(g&1)==1&&g--),o={x:p,y:g,width:m-p+1,height:b-g+1};var D=i[r];D.rect=o,D.blend=1,D.img=new Uint8Array(o.width*o.height*4),i[r-1].dispose==0?(L._copyTile(l,t,e,D.img,o.width,o.height,-o.x,-o.y,0),L.encode._prepareDiff(u,t,e,D.img,o)):L._copyTile(u,t,e,D.img,o.width,o.height,-o.x,-o.y,0)};L.encode._prepareDiff=function(n,t,e,i,r){L._copyTile(n,t,e,i,r.width,r.height,-r.x,-r.y,2)};L.encode._filterZero=function(n,t,e,i,r,o,s){var a=[],c=[0,1,2,3,4];o!=-1?c=[o]:(t*i>5e5||e==1)&&(c=[0]);var l;s&&(l={level:0});for(var d=s&&UZIP!=null?UZIP:J0.default,h=0;h<c.length;h++){for(var u=0;u<t;u++)L.encode._filterLine(r,n,u,i,e,c[h]);a.push(d.deflate(r,l))}for(var f,p=1e9,h=0;h<a.length;h++)a[h].length<p&&(f=h,p=a[h].length);return a[f]};L.encode._filterLine=function(n,t,e,i,r,o){var s=e*i,a=s+e,c=L.decode._paeth;if(n[a]=o,a++,o==0)if(i<500)for(var l=0;l<i;l++)n[a+l]=t[s+l];else n.set(new Uint8Array(t.buffer,s,i),a);else if(o==1){for(var l=0;l<r;l++)n[a+l]=t[s+l];for(var l=r;l<i;l++)n[a+l]=t[s+l]-t[s+l-r]+256&255}else if(e==0){for(var l=0;l<r;l++)n[a+l]=t[s+l];if(o==2)for(var l=r;l<i;l++)n[a+l]=t[s+l];if(o==3)for(var l=r;l<i;l++)n[a+l]=t[s+l]-(t[s+l-r]>>1)+256&255;if(o==4)for(var l=r;l<i;l++)n[a+l]=t[s+l]-c(t[s+l-r],0,0)+256&255}else{if(o==2)for(var l=0;l<i;l++)n[a+l]=t[s+l]+256-t[s+l-i]&255;if(o==3){for(var l=0;l<r;l++)n[a+l]=t[s+l]+256-(t[s+l-i]>>1)&255;for(var l=r;l<i;l++)n[a+l]=t[s+l]+256-(t[s+l-i]+t[s+l-r]>>1)&255}if(o==4){for(var l=0;l<r;l++)n[a+l]=t[s+l]+256-c(0,t[s+l-i],0)&255;for(var l=r;l<i;l++)n[a+l]=t[s+l]+256-c(t[s+l-r],t[s+l-i],t[s+l-r-i])&255}}};L.crc={table:function(){for(var n=new Uint32Array(256),t=0;t<256;t++){for(var e=t,i=0;i<8;i++)e&1?e=3988292384^e>>>1:e=e>>>1;n[t]=e}return n}(),update:function(n,t,e,i){for(var r=0;r<i;r++)n=L.crc.table[(n^t[e+r])&255]^n>>>8;return n},crc:function(n,t,e){return L.crc.update(4294967295,n,t,e)^4294967295}};L.quantize=function(n,t){for(var e=new Uint8Array(n),i=e.slice(0),r=new Uint32Array(i.buffer),o=L.quantize.getKDtree(i,t),s=o[0],a=o[1],c=L.quantize.planeDst,l=e,d=r,h=l.length,u=new Uint8Array(e.length>>2),f=0;f<h;f+=4){var p=l[f]*.00392156862745098,g=l[f+1]*(1/255),m=l[f+2]*(1/255),b=l[f+3]*(1/255),w=L.quantize.getNearest(s,p,g,m,b);u[f>>2]=w.ind,d[f>>2]=w.est.rgba}return{abuf:i.buffer,inds:u,plte:a}};L.quantize.getKDtree=function(n,t,e){e==null&&(e=1e-4);var i=new Uint32Array(n.buffer),r={i0:0,i1:n.length,bst:null,est:null,tdst:0,left:null,right:null};r.bst=L.quantize.stats(n,r.i0,r.i1),r.est=L.quantize.estats(r.bst);for(var o=[r];o.length<t;){for(var s=0,a=0,c=0;c<o.length;c++)o[c].est.L>s&&(s=o[c].est.L,a=c);if(s<e)break;var l=o[a],d=L.quantize.splitPixels(n,i,l.i0,l.i1,l.est.e,l.est.eMq255),h=l.i0>=d||l.i1<=d;if(h){l.est.L=0;continue}var u={i0:l.i0,i1:d,bst:null,est:null,tdst:0,left:null,right:null};u.bst=L.quantize.stats(n,u.i0,u.i1),u.est=L.quantize.estats(u.bst);var f={i0:d,i1:l.i1,bst:null,est:null,tdst:0,left:null,right:null};f.bst={R:[],m:[],N:l.bst.N-u.bst.N};for(var c=0;c<16;c++)f.bst.R[c]=l.bst.R[c]-u.bst.R[c];for(var c=0;c<4;c++)f.bst.m[c]=l.bst.m[c]-u.bst.m[c];f.est=L.quantize.estats(f.bst),l.left=u,l.right=f,o[a]=u,o.push(f)}o.sort(function(p,g){return g.bst.N-p.bst.N});for(var c=0;c<o.length;c++)o[c].ind=c;return[r,o]};L.quantize.getNearest=function(n,t,e,i,r){if(n.left==null)return n.tdst=L.quantize.dist(n.est.q,t,e,i,r),n;var o=L.quantize.planeDst(n.est,t,e,i,r),s=n.left,a=n.right;o>0&&(s=n.right,a=n.left);var c=L.quantize.getNearest(s,t,e,i,r);if(c.tdst<=o*o)return c;var l=L.quantize.getNearest(a,t,e,i,r);return l.tdst<c.tdst?l:c};L.quantize.planeDst=function(n,t,e,i,r){var o=n.e;return o[0]*t+o[1]*e+o[2]*i+o[3]*r-n.eMq};L.quantize.dist=function(n,t,e,i,r){var o=t-n[0],s=e-n[1],a=i-n[2],c=r-n[3];return o*o+s*s+a*a+c*c};L.quantize.splitPixels=function(n,t,e,i,r,o){var s=L.quantize.vecDot;i-=4;for(var a=0;e<i;){for(;s(n,e,r)<=o;)e+=4;for(;s(n,i,r)>o;)i-=4;if(e>=i)break;var c=t[e>>2];t[e>>2]=t[i>>2],t[i>>2]=c,e+=4,i-=4}for(;s(n,e,r)>o;)e-=4;return e+4};L.quantize.vecDot=function(n,t,e){return n[t]*e[0]+n[t+1]*e[1]+n[t+2]*e[2]+n[t+3]*e[3]};L.quantize.stats=function(n,t,e){for(var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r=[0,0,0,0],o=e-t>>2,s=t;s<e;s+=4){var a=n[s]*.00392156862745098,c=n[s+1]*(1/255),l=n[s+2]*(1/255),d=n[s+3]*(1/255);r[0]+=a,r[1]+=c,r[2]+=l,r[3]+=d,i[0]+=a*a,i[1]+=a*c,i[2]+=a*l,i[3]+=a*d,i[5]+=c*c,i[6]+=c*l,i[7]+=c*d,i[10]+=l*l,i[11]+=l*d,i[15]+=d*d}return i[4]=i[1],i[8]=i[2],i[9]=i[6],i[12]=i[3],i[13]=i[7],i[14]=i[11],{R:i,m:r,N:o}};L.quantize.estats=function(n){var t=n.R,e=n.m,i=n.N,r=e[0],o=e[1],s=e[2],a=e[3],c=i==0?0:1/i,l=[t[0]-r*r*c,t[1]-r*o*c,t[2]-r*s*c,t[3]-r*a*c,t[4]-o*r*c,t[5]-o*o*c,t[6]-o*s*c,t[7]-o*a*c,t[8]-s*r*c,t[9]-s*o*c,t[10]-s*s*c,t[11]-s*a*c,t[12]-a*r*c,t[13]-a*o*c,t[14]-a*s*c,t[15]-a*a*c],d=l,h=L.M4,u=[.5,.5,.5,.5],f=0,p=0;if(i!=0)for(var g=0;g<10&&(u=h.multVec(d,u),p=Math.sqrt(h.dot(u,u)),u=h.sml(1/p,u),!(Math.abs(p-f)<1e-9));g++)f=p;var m=[r*c,o*c,s*c,a*c],b=h.dot(h.sml(255,m),u);return{Cov:l,q:m,e:u,L:f,eMq255:b,eMq:h.dot(u,m),rgba:(Math.round(255*m[3])<<24|Math.round(255*m[2])<<16|Math.round(255*m[1])<<8|Math.round(255*m[0])<<0)>>>0}};L.M4={multVec:function(n,t){return[n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3],n[4]*t[0]+n[5]*t[1]+n[6]*t[2]+n[7]*t[3],n[8]*t[0]+n[9]*t[1]+n[10]*t[2]+n[11]*t[3],n[12]*t[0]+n[13]*t[1]+n[14]*t[2]+n[15]*t[3]]},dot:function(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]},sml:function(n,t){return[n*t[0],n*t[1],n*t[2],n*t[3]]}};L.encode.concatRGBA=function(n){for(var t=0,e=0;e<n.length;e++)t+=n[e].byteLength;for(var i=new Uint8Array(t),r=0,e=0;e<n.length;e++){for(var o=new Uint8Array(n[e]),s=o.length,a=0;a<s;a+=4){var c=o[a],l=o[a+1],d=o[a+2],h=o[a+3];h==0&&(c=l=d=0),i[r+a]=c,i[r+a+1]=l,i[r+a+2]=d,i[r+a+3]=h}r+=s}return i.buffer};var lf=L;var Mv=n=>{if(n===0)return $r.Greyscale;if(n===2)return $r.Truecolour;if(n===3)return $r.IndexedColour;if(n===4)return $r.GreyscaleWithAlpha;if(n===6)return $r.TruecolourWithAlpha;throw new Error(`Unknown color type: ${n}`)},Nv=n=>{let t=Math.floor(n.length/4),e=new Uint8Array(t*3),i=new Uint8Array(t*1),r=0,o=0,s=0;for(;r<n.length;)e[o++]=n[r++],e[o++]=n[r++],e[o++]=n[r++],i[s++]=n[r++];return{rgbChannel:e,alphaChannel:i}},$r;(function(n){n.Greyscale="Greyscale",n.Truecolour="Truecolour",n.IndexedColour="IndexedColour",n.GreyscaleWithAlpha="GreyscaleWithAlpha",n.TruecolourWithAlpha="TruecolourWithAlpha"})($r||($r={}));var xs=class{constructor(t){let e=lf.decode(t),i=lf.toRGBA8(e);if(i.length>1)throw new Error("Animated PNGs are not supported");let r=new Uint8Array(i[0]),{rgbChannel:o,alphaChannel:s}=Nv(r);this.rgbChannel=o,s.some(c=>c<255)&&(this.alphaChannel=s),this.type=Mv(e.ctype),this.width=e.width,this.height=e.height,this.bitsPerComponent=8}};xs.load=n=>new xs(n);var Sl=class{static async for(t){let e=xs.load(t);return new Sl(e)}constructor(t){this.image=t,this.bitsPerComponent=t.bitsPerComponent,this.width=t.width,this.height=t.height,this.colorSpace="DeviceRGB"}async embedIntoContext(t,e){let i=this.embedAlphaChannel(t),r=t.flateStream(this.image.rgbChannel,{Type:"XObject",Subtype:"Image",BitsPerComponent:this.image.bitsPerComponent,Width:this.image.width,Height:this.image.height,ColorSpace:this.colorSpace,SMask:i});return e?(t.assign(e,r),e):t.register(r)}embedAlphaChannel(t){if(!this.image.alphaChannel)return;let e=t.flateStream(this.image.alphaChannel,{Type:"XObject",Subtype:"Image",Height:this.image.height,Width:this.image.width,BitsPerComponent:this.image.bitsPerComponent,ColorSpace:"DeviceGray",Decode:[0,1]});return t.register(e)}},ys=Sl;var Cl=class{constructor(t,e,i){this.bytes=t,this.start=e||0,this.pos=this.start,this.end=e&&i?e+i:this.bytes.length}get length(){return this.end-this.start}get isEmpty(){return this.length===0}getByte(){return this.pos>=this.end?-1:this.bytes[this.pos++]}getUint16(){let t=this.getByte(),e=this.getByte();return t===-1||e===-1?-1:(t<<8)+e}getInt32(){let t=this.getByte(),e=this.getByte(),i=this.getByte(),r=this.getByte();return(t<<24)+(e<<16)+(i<<8)+r}getBytes(t,e=!1){let i=this.bytes,r=this.pos,o=this.end;if(t){let s=r+t;s>o&&(s=o),this.pos=s;let a=i.subarray(r,s);return e?new Uint8ClampedArray(a):a}else{let s=i.subarray(r,o);return e?new Uint8ClampedArray(s):s}}peekByte(){let t=this.getByte();return this.pos--,t}peekBytes(t,e=!1){let i=this.getBytes(t,e);return this.pos-=i.length,i}skip(t){t||(t=1),this.pos+=t}reset(){this.pos=this.start}moveStart(){this.start=this.pos}makeSubStream(t,e){return new Cl(this.bytes,t,e)}decode(){return this.bytes}},md=Cl;var Rv=new Uint8Array(0),cf=class{constructor(t){if(this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=Rv,this.minBufferLength=512,t)for(;this.minBufferLength<t;)this.minBufferLength*=2}get isEmpty(){for(;!this.eof&&this.bufferLength===0;)this.readBlock();return this.bufferLength===0}getByte(){let t=this.pos;for(;this.bufferLength<=t;){if(this.eof)return-1;this.readBlock()}return this.buffer[this.pos++]}getUint16(){let t=this.getByte(),e=this.getByte();return t===-1||e===-1?-1:(t<<8)+e}getInt32(){let t=this.getByte(),e=this.getByte(),i=this.getByte(),r=this.getByte();return(t<<24)+(e<<16)+(i<<8)+r}getBytes(t,e=!1){let i,r=this.pos;if(t){for(this.ensureBuffer(r+t),i=r+t;!this.eof&&this.bufferLength<i;)this.readBlock();let s=this.bufferLength;i>s&&(i=s)}else{for(;!this.eof;)this.readBlock();i=this.bufferLength}this.pos=i;let o=this.buffer.subarray(r,i);return e&&!(o instanceof Uint8ClampedArray)?new Uint8ClampedArray(o):o}peekByte(){let t=this.getByte();return this.pos--,t}peekBytes(t,e=!1){let i=this.getBytes(t,e);return this.pos-=i.length,i}skip(t){t||(t=1),this.pos+=t}reset(){this.pos=0}makeSubStream(t,e){let i=t+e;for(;this.bufferLength<=i&&!this.eof;)this.readBlock();return new md(this.buffer,t,e)}decode(){for(;!this.eof;)this.readBlock();return this.buffer.subarray(0,this.bufferLength)}readBlock(){throw new Ge(this.constructor.name,"readBlock")}ensureBuffer(t){let e=this.buffer;if(t<=e.byteLength)return e;let i=this.minBufferLength;for(;i<t;)i*=2;let r=new Uint8Array(i);return r.set(e),this.buffer=r}},Yt=cf;var Q0=n=>n===32||n===9||n===13||n===10,df=class extends Yt{constructor(t,e){super(e),this.stream=t,this.input=new Uint8Array(5),e&&(e=.8*e)}readBlock(){let r=this.stream,o=r.getByte();for(;Q0(o);)o=r.getByte();if(o===-1||o===126){this.eof=!0;return}let s=this.bufferLength,a,c;if(o===122){for(a=this.ensureBuffer(s+4),c=0;c<4;++c)a[s+c]=0;this.bufferLength+=4}else{let l=this.input;for(l[0]=o,c=1;c<5;++c){for(o=r.getByte();Q0(o);)o=r.getByte();if(l[c]=o,o===-1||o===126)break}if(a=this.ensureBuffer(s+c-1),this.bufferLength+=c-1,c<5){for(;c<5;++c)l[c]=33+84;this.eof=!0}let d=0;for(c=0;c<5;++c)d=d*85+(l[c]-33);for(c=3;c>=0;--c)a[s+c]=d&255,d>>=8}}},_0=df;var hf=class extends Yt{constructor(t,e){super(e),this.stream=t,this.firstDigit=-1,e&&(e=.5*e)}readBlock(){let e=this.stream.getBytes(8e3);if(!e.length){this.eof=!0;return}let i=e.length+1>>1,r=this.ensureBuffer(this.bufferLength+i),o=this.bufferLength,s=this.firstDigit;for(let a=0,c=e.length;a<c;a++){let l=e[a],d;if(l>=48&&l<=57)d=l&15;else if(l>=65&&l<=70||l>=97&&l<=102)d=(l&15)+9;else if(l===62){this.eof=!0;break}else continue;s<0?s=d:(r[o++]=s<<4|d,s=-1)}s>=0&&this.eof&&(r[o++]=s<<4,s=-1),this.firstDigit=s,this.bufferLength=o}},$0=hf;var eb=new Int32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Vv=new Int32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),Bv=new Int32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),Hv=[new Int32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],Uv=[new Int32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5],uf=class extends Yt{constructor(t,e){super(e),this.stream=t;let i=t.getByte(),r=t.getByte();if(i===-1||r===-1)throw new Error(`Invalid header in flate stream: ${i}, ${r}`);if((i&15)!==8)throw new Error(`Unknown compression method in flate stream: ${i}, ${r}`);if(((i<<8)+r)%31!==0)throw new Error(`Bad FCHECK in flate stream: ${i}, ${r}`);if(r&32)throw new Error(`FDICT bit set in flate stream: ${i}, ${r}`);this.codeSize=0,this.codeBuf=0}readBlock(){let t,e,i=this.stream,r=this.getBits(3);if(r&1&&(this.eof=!0),r>>=1,r===0){let l;if((l=i.getByte())===-1)throw new Error("Bad block header in flate stream");let d=l;if((l=i.getByte())===-1)throw new Error("Bad block header in flate stream");if(d|=l<<8,(l=i.getByte())===-1)throw new Error("Bad block header in flate stream");let h=l;if((l=i.getByte())===-1)throw new Error("Bad block header in flate stream");if(h|=l<<8,h!==(~d&65535)&&(d!==0||h!==0))throw new Error("Bad uncompressed block length in flate stream");this.codeBuf=0,this.codeSize=0;let u=this.bufferLength;t=this.ensureBuffer(u+d);let f=u+d;if(this.bufferLength=f,d===0)i.peekByte()===-1&&(this.eof=!0);else for(let p=u;p<f;++p){if((l=i.getByte())===-1){this.eof=!0;break}t[p]=l}return}let o,s;if(r===1)o=Hv,s=Uv;else if(r===2){let l=this.getBits(5)+257,d=this.getBits(5)+1,h=this.getBits(4)+4,u=new Uint8Array(eb.length),f;for(f=0;f<h;++f)u[eb[f]]=this.getBits(3);let p=this.generateHuffmanTable(u);e=0,f=0;let g=l+d,m=new Uint8Array(g),b,w,F;for(;f<g;){let v=this.getCode(p);if(v===16)b=2,w=3,F=e;else if(v===17)b=3,w=3,F=e=0;else if(v===18)b=7,w=11,F=e=0;else{m[f++]=e=v;continue}let P=this.getBits(b)+w;for(;P-- >0;)m[f++]=F}o=this.generateHuffmanTable(m.subarray(0,l)),s=this.generateHuffmanTable(m.subarray(l,g))}else throw new Error("Unknown block type in flate stream");t=this.buffer;let a=t?t.length:0,c=this.bufferLength;for(;;){let l=this.getCode(o);if(l<256){c+1>=a&&(t=this.ensureBuffer(c+1),a=t.length),t[c++]=l;continue}if(l===256){this.bufferLength=c;return}l-=257,l=Vv[l];let d=l>>16;d>0&&(d=this.getBits(d)),e=(l&65535)+d,l=this.getCode(s),l=Bv[l],d=l>>16,d>0&&(d=this.getBits(d));let h=(l&65535)+d;c+e>=a&&(t=this.ensureBuffer(c+e),a=t.length);for(let u=0;u<e;++u,++c)t[c]=t[c-h]}}getBits(t){let e=this.stream,i=this.codeSize,r=this.codeBuf,o;for(;i<t;){if((o=e.getByte())===-1)throw new Error("Bad encoding in flate stream");r|=o<<i,i+=8}return o=r&(1<<t)-1,this.codeBuf=r>>t,this.codeSize=i-=t,o}getCode(t){let e=this.stream,i=t[0],r=t[1],o=this.codeSize,s=this.codeBuf,a;for(;o<r&&(a=e.getByte())!==-1;)s|=a<<o,o+=8;let c=i[s&(1<<r)-1];typeof i=="number"&&console.log("FLATE:",c);let l=c>>16,d=c&65535;if(l<1||o<l)throw new Error("Bad encoding in flate stream");return this.codeBuf=s>>l,this.codeSize=o-l,d}generateHuffmanTable(t){let e=t.length,i=0,r;for(r=0;r<e;++r)t[r]>i&&(i=t[r]);let o=1<<i,s=new Int32Array(o);for(let a=1,c=0,l=2;a<=i;++a,c<<=1,l<<=1)for(let d=0;d<e;++d)if(t[d]===a){let h=0,u=c;for(r=0;r<a;++r)h=h<<1|u&1,u>>=1;for(r=h;r<o;r+=l)s[r]=a<<16|d;++c}return[s,i]}},tb=uf;var ff=class extends Yt{constructor(t,e,i){super(e),this.stream=t,this.cachedData=0,this.bitsCached=0;let r=4096,o={earlyChange:i,codeLength:9,nextCode:258,dictionaryValues:new Uint8Array(r),dictionaryLengths:new Uint16Array(r),dictionaryPrevCodes:new Uint16Array(r),currentSequence:new Uint8Array(r),currentSequenceLength:0};for(let s=0;s<256;++s)o.dictionaryValues[s]=s,o.dictionaryLengths[s]=1;this.lzwState=o}readBlock(){let e=1024,i=512,r,o,s,a=this.lzwState;if(!a)return;let c=a.earlyChange,l=a.nextCode,d=a.dictionaryValues,h=a.dictionaryLengths,u=a.dictionaryPrevCodes,f=a.codeLength,p=a.prevCode,g=a.currentSequence,m=a.currentSequenceLength,b=0,w=this.bufferLength,F=this.ensureBuffer(this.bufferLength+e);for(r=0;r<512;r++){let v=this.readBits(f),P=m>0;if(!v||v<256)g[0]=v,m=1;else if(v>=258)if(v<l)for(m=h[v],o=m-1,s=v;o>=0;o--)g[o]=d[s],s=u[s];else g[m++]=g[0];else if(v===256){f=9,l=258,m=0;continue}else{this.eof=!0,delete this.lzwState;break}if(P&&(u[l]=p,h[l]=h[p]+1,d[l]=g[0],l++,f=l+c&l+c-1?f:Math.min(Math.log(l+c)/.6931471805599453+1,12)|0),p=v,b+=m,e<b){do e+=i;while(e<b);F=this.ensureBuffer(this.bufferLength+e)}for(o=0;o<m;o++)F[w++]=g[o]}a.nextCode=l,a.codeLength=f,a.prevCode=p,a.currentSequenceLength=m,this.bufferLength=w}readBits(t){let e=this.bitsCached,i=this.cachedData;for(;e<t;){let r=this.stream.getByte();if(r===-1)return this.eof=!0,null;i=i<<8|r,e+=8}return this.bitsCached=e-=t,this.cachedData=i,i>>>e&(1<<t)-1}},ib=ff;var pf=class extends Yt{constructor(t,e){super(e),this.stream=t}readBlock(){let t=this.stream.getBytes(2);if(!t||t.length<2||t[0]===128){this.eof=!0;return}let e,i=this.bufferLength,r=t[0];if(r<128){if(e=this.ensureBuffer(i+r+1),e[i++]=t[1],r>0){let o=this.stream.getBytes(r);e.set(o,i),i+=r}}else{r=257-r;let o=t[1];e=this.ensureBuffer(i+r+1);for(let s=0;s<r;s++)e[i++]=o}this.bufferLength=i}},nb=pf;var rb=(n,t,e)=>{if(t===x.of("FlateDecode"))return new tb(n);if(t===x.of("LZWDecode")){let i=1;if(e instanceof R){let r=e.lookup(x.of("EarlyChange"));r instanceof N&&(i=r.asNumber())}return new ib(n,void 0,i)}if(t===x.of("ASCII85Decode"))return new _0(n);if(t===x.of("ASCIIHexDecode"))return new $0(n);if(t===x.of("RunLengthDecode"))return new nb(n);throw new Ja(t.asString())},ws=({dict:n,contents:t,transform:e})=>{let i=new md(t);e&&(i=e.createStream(i,t.length));let r=n.lookup(x.of("Filter")),o=n.lookup(x.of("DecodeParms"));if(r instanceof x)i=rb(i,r,o);else if(r instanceof H)for(let s=0,a=r.size();s<a;s++)i=rb(i,r.lookup(s,x),o&&o.lookupMaybe(s,R));else if(r)throw new Vi([x,H],r);return i};var zv=n=>{let t=n.MediaBox(),e=t.lookup(2,N).asNumber()-t.lookup(0,N).asNumber(),i=t.lookup(3,N).asNumber()-t.lookup(1,N).asNumber();return{left:0,bottom:0,right:e,top:i}},qv=n=>[1,0,0,1,-n.left,-n.bottom],Tl=class{static async for(t,e,i){return new Tl(t,e,i)}constructor(t,e,i){this.page=t;let r=e!=null?e:zv(t);this.width=r.right-r.left,this.height=r.top-r.bottom,this.boundingBox=r,this.transformationMatrix=i!=null?i:qv(r)}async embedIntoContext(t,e){let{Contents:i,Resources:r}=this.page.normalizedEntries();if(!i)throw new Qa;let o=this.decodeContents(i),{left:s,bottom:a,right:c,top:l}=this.boundingBox,d=t.flateStream(o,{Type:"XObject",Subtype:"Form",FormType:1,BBox:[s,a,c,l],Matrix:this.transformationMatrix,Resources:r});return e?(t.assign(e,d),e):t.register(d)}decodeContents(t){let e=Uint8Array.of(y.Newline),i=[];for(let r=0,o=t.size();r<o;r++){let s=t.lookup(r,Fe),a;if(s instanceof wi)a=ws(s).decode();else if(s instanceof Hi)a=s.getUnencodedContents();else throw new _a(s);i.push(a,e)}return nu(...i)}},vs=Tl;var bd=(n,t)=>{if(n!==void 0)return t[n]},eo;(function(n){n.UseNone="UseNone",n.UseOutlines="UseOutlines",n.UseThumbs="UseThumbs",n.UseOC="UseOC"})(eo||(eo={}));var to;(function(n){n.L2R="L2R",n.R2L="R2L"})(to||(to={}));var io;(function(n){n.None="None",n.AppDefault="AppDefault"})(io||(io={}));var Fs;(function(n){n.Simplex="Simplex",n.DuplexFlipShortEdge="DuplexFlipShortEdge",n.DuplexFlipLongEdge="DuplexFlipLongEdge"})(Fs||(Fs={}));var no=class{constructor(t){this.dict=t}lookupBool(t){let e=this.dict.lookup(x.of(t));if(e instanceof yi)return e}lookupName(t){let e=this.dict.lookup(x.of(t));if(e instanceof x)return e}HideToolbar(){return this.lookupBool("HideToolbar")}HideMenubar(){return this.lookupBool("HideMenubar")}HideWindowUI(){return this.lookupBool("HideWindowUI")}FitWindow(){return this.lookupBool("FitWindow")}CenterWindow(){return this.lookupBool("CenterWindow")}DisplayDocTitle(){return this.lookupBool("DisplayDocTitle")}NonFullScreenPageMode(){return this.lookupName("NonFullScreenPageMode")}Direction(){return this.lookupName("Direction")}PrintScaling(){return this.lookupName("PrintScaling")}Duplex(){return this.lookupName("Duplex")}PickTrayByPDFSize(){return this.lookupBool("PickTrayByPDFSize")}PrintPageRange(){let t=this.dict.lookup(x.of("PrintPageRange"));if(t instanceof H)return t}NumCopies(){let t=this.dict.lookup(x.of("NumCopies"));if(t instanceof N)return t}getHideToolbar(){var t,e;return(e=(t=this.HideToolbar())===null||t===void 0?void 0:t.asBoolean())!==null&&e!==void 0?e:!1}getHideMenubar(){var t,e;return(e=(t=this.HideMenubar())===null||t===void 0?void 0:t.asBoolean())!==null&&e!==void 0?e:!1}getHideWindowUI(){var t,e;return(e=(t=this.HideWindowUI())===null||t===void 0?void 0:t.asBoolean())!==null&&e!==void 0?e:!1}getFitWindow(){var t,e;return(e=(t=this.FitWindow())===null||t===void 0?void 0:t.asBoolean())!==null&&e!==void 0?e:!1}getCenterWindow(){var t,e;return(e=(t=this.CenterWindow())===null||t===void 0?void 0:t.asBoolean())!==null&&e!==void 0?e:!1}getDisplayDocTitle(){var t,e;return(e=(t=this.DisplayDocTitle())===null||t===void 0?void 0:t.asBoolean())!==null&&e!==void 0?e:!1}getNonFullScreenPageMode(){var t,e;let i=(t=this.NonFullScreenPageMode())===null||t===void 0?void 0:t.decodeText();return(e=bd(i,eo))!==null&&e!==void 0?e:eo.UseNone}getReadingDirection(){var t,e;let i=(t=this.Direction())===null||t===void 0?void 0:t.decodeText();return(e=bd(i,to))!==null&&e!==void 0?e:to.L2R}getPrintScaling(){var t,e;let i=(t=this.PrintScaling())===null||t===void 0?void 0:t.decodeText();return(e=bd(i,io))!==null&&e!==void 0?e:io.AppDefault}getDuplex(){var t;let e=(t=this.Duplex())===null||t===void 0?void 0:t.decodeText();return bd(e,Fs)}getPickTrayByPDFSize(){var t;return(t=this.PickTrayByPDFSize())===null||t===void 0?void 0:t.asBoolean()}getPrintPageRange(){let t=this.PrintPageRange();if(!t)return[];let e=[];for(let i=0;i<t.size();i+=2){let r=t.lookup(i,N).asNumber(),o=t.lookup(i+1,N).asNumber();e.push({start:r,end:o})}return e}getNumCopies(){var t,e;return(e=(t=this.NumCopies())===null||t===void 0?void 0:t.asNumber())!==null&&e!==void 0?e:1}setHideToolbar(t){let e=this.dict.context.obj(t);this.dict.set(x.of("HideToolbar"),e)}setHideMenubar(t){let e=this.dict.context.obj(t);this.dict.set(x.of("HideMenubar"),e)}setHideWindowUI(t){let e=this.dict.context.obj(t);this.dict.set(x.of("HideWindowUI"),e)}setFitWindow(t){let e=this.dict.context.obj(t);this.dict.set(x.of("FitWindow"),e)}setCenterWindow(t){let e=this.dict.context.obj(t);this.dict.set(x.of("CenterWindow"),e)}setDisplayDocTitle(t){let e=this.dict.context.obj(t);this.dict.set(x.of("DisplayDocTitle"),e)}setNonFullScreenPageMode(t){Xt(t,"nonFullScreenPageMode",eo);let e=x.of(t);this.dict.set(x.of("NonFullScreenPageMode"),e)}setReadingDirection(t){Xt(t,"readingDirection",to);let e=x.of(t);this.dict.set(x.of("Direction"),e)}setPrintScaling(t){Xt(t,"printScaling",io);let e=x.of(t);this.dict.set(x.of("PrintScaling"),e)}setDuplex(t){Xt(t,"duplex",Fs);let e=x.of(t);this.dict.set(x.of("Duplex"),e)}setPickTrayByPDFSize(t){let e=this.dict.context.obj(t);this.dict.set(x.of("PickTrayByPDFSize"),e)}setPrintPageRange(t){Array.isArray(t)||(t=[t]);let e=[];for(let r=0,o=t.length;r<o;r++)e.push(t[r].start),e.push(t[r].end);Ga(e,"printPageRange",["number"]);let i=this.dict.context.obj(e);this.dict.set(x.of("PrintPageRange"),i)}setNumCopies(t){lt(t,"numCopies",1,Number.MAX_VALUE),_u(t,"numCopies");let e=this.dict.context.obj(t);this.dict.set(x.of("NumCopies"),e)}};no.fromDict=n=>new no(n);no.create=n=>{let t=n.obj({});return new no(t)};var El=no;var Wv=/\/([^\0\t\n\f\r\ ]+)[\0\t\n\f\r\ ]*(\d*\.\d+|\d+)?[\0\t\n\f\r\ ]+Tf/,Al=class{constructor(t,e){this.dict=t,this.ref=e}T(){return this.dict.lookupMaybe(x.of("T"),G,M)}Ff(){let t=this.getInheritableAttribute(x.of("Ff"));return this.dict.context.lookupMaybe(t,N)}V(){let t=this.getInheritableAttribute(x.of("V"));return this.dict.context.lookup(t)}Kids(){return this.dict.lookupMaybe(x.of("Kids"),H)}DA(){let t=this.dict.lookup(x.of("DA"));if(t instanceof G||t instanceof M)return t}setKids(t){this.dict.set(x.of("Kids"),this.dict.context.obj(t))}getParent(){let t=this.dict.get(x.of("Parent"));if(t instanceof q){let e=this.dict.lookup(x.of("Parent"),R);return new Al(e,t)}}setParent(t){t?this.dict.set(x.of("Parent"),t):this.dict.delete(x.of("Parent"))}getFullyQualifiedName(){let t=this.getParent();return t?`${t.getFullyQualifiedName()}.${this.getPartialName()}`:this.getPartialName()}getPartialName(){var t;return(t=this.T())===null||t===void 0?void 0:t.decodeText()}setPartialName(t){t?this.dict.set(x.of("T"),M.fromText(t)):this.dict.delete(x.of("T"))}setDefaultAppearance(t){this.dict.set(x.of("DA"),G.of(t))}getDefaultAppearance(){let t=this.DA();return t instanceof M?t.decodeText():t==null?void 0:t.asString()}setFontSize(t){var e;let i=(e=this.getFullyQualifiedName())!==null&&e!==void 0?e:"",r=this.getDefaultAppearance();if(!r)throw new il(i);let o=Go(r,Wv);if(!o.match)throw new nl(i);let s=r.slice(0,o.pos-o.match[0].length),a=o.pos<=r.length?r.slice(o.pos):"",c=o.match[1],l=`${s} /${c} ${t} Tf ${a}`;this.setDefaultAppearance(l)}getFlags(){var t,e;return(e=(t=this.Ff())===null||t===void 0?void 0:t.asNumber())!==null&&e!==void 0?e:0}setFlags(t){this.dict.set(x.of("Ff"),N.of(t))}hasFlag(t){return(this.getFlags()&t)!==0}setFlag(t){let e=this.getFlags();this.setFlags(e|t)}clearFlag(t){let e=this.getFlags();this.setFlags(e&~t)}setFlagTo(t,e){e?this.setFlag(t):this.clearFlag(t)}getInheritableAttribute(t){let e;return this.ascend(i=>{e||(e=i.dict.get(t))}),e}ascend(t){t(this);let e=this.getParent();e&&e.ascend(t)}},Ps=Al;var Il=class{constructor(t){this.dict=t}W(){let t=this.dict.lookup(x.of("W"));if(t instanceof N)return t}getWidth(){var t,e;return(e=(t=this.W())===null||t===void 0?void 0:t.asNumber())!==null&&e!==void 0?e:1}setWidth(t){let e=this.dict.context.obj(t);this.dict.set(x.of("W"),e)}};Il.fromDict=n=>new Il(n);var xd=Il;var Ll=class{constructor(t){this.dict=t}Rect(){return this.dict.lookup(x.of("Rect"),H)}AP(){return this.dict.lookupMaybe(x.of("AP"),R)}F(){let t=this.dict.lookup(x.of("F"));return this.dict.context.lookupMaybe(t,N)}getRectangle(){var t;let e=this.Rect();return(t=e==null?void 0:e.asRectangle())!==null&&t!==void 0?t:{x:0,y:0,width:0,height:0}}setRectangle(t){let{x:e,y:i,width:r,height:o}=t,s=this.dict.context.obj([e,i,e+r,i+o]);this.dict.set(x.of("Rect"),s)}getAppearanceState(){let t=this.dict.lookup(x.of("AS"));if(t instanceof x)return t}setAppearanceState(t){this.dict.set(x.of("AS"),t)}setAppearances(t){this.dict.set(x.of("AP"),t)}ensureAP(){let t=this.AP();return t||(t=this.dict.context.obj({}),this.dict.set(x.of("AP"),t)),t}getNormalAppearance(){let e=this.ensureAP().get(x.of("N"));if(e instanceof q||e instanceof R)return e;throw new Error(`Unexpected N type: ${e==null?void 0:e.constructor.name}`)}setNormalAppearance(t){this.ensureAP().set(x.of("N"),t)}setRolloverAppearance(t){this.ensureAP().set(x.of("R"),t)}setDownAppearance(t){this.ensureAP().set(x.of("D"),t)}removeRolloverAppearance(){let t=this.AP();t==null||t.delete(x.of("R"))}removeDownAppearance(){let t=this.AP();t==null||t.delete(x.of("D"))}getAppearances(){let t=this.AP();if(!t)return;let e=t.lookup(x.of("N"),R,Fe),i=t.lookupMaybe(x.of("R"),R,Fe),r=t.lookupMaybe(x.of("D"),R,Fe);return{normal:e,rollover:i,down:r}}getFlags(){var t,e;return(e=(t=this.F())===null||t===void 0?void 0:t.asNumber())!==null&&e!==void 0?e:0}setFlags(t){this.dict.set(x.of("F"),N.of(t))}hasFlag(t){return(this.getFlags()&t)!==0}setFlag(t){let e=this.getFlags();this.setFlags(e|t)}clearFlag(t){let e=this.getFlags();this.setFlags(e&~t)}setFlagTo(t,e){e?this.setFlag(t):this.clearFlag(t)}};Ll.fromDict=n=>new Ll(n);var yd=Ll;var Ol=class{constructor(t){this.dict=t}R(){let t=this.dict.lookup(x.of("R"));if(t instanceof N)return t}BC(){let t=this.dict.lookup(x.of("BC"));if(t instanceof H)return t}BG(){let t=this.dict.lookup(x.of("BG"));if(t instanceof H)return t}CA(){let t=this.dict.lookup(x.of("CA"));if(t instanceof M||t instanceof G)return t}RC(){let t=this.dict.lookup(x.of("RC"));if(t instanceof M||t instanceof G)return t}AC(){let t=this.dict.lookup(x.of("AC"));if(t instanceof M||t instanceof G)return t}getRotation(){var t;return(t=this.R())===null||t===void 0?void 0:t.asNumber()}getBorderColor(){let t=this.BC();if(!t)return;let e=[];for(let i=0,r=t==null?void 0:t.size();i<r;i++){let o=t.get(i);o instanceof N&&e.push(o.asNumber())}return e}getBackgroundColor(){let t=this.BG();if(!t)return;let e=[];for(let i=0,r=t==null?void 0:t.size();i<r;i++){let o=t.get(i);o instanceof N&&e.push(o.asNumber())}return e}getCaptions(){let t=this.CA(),e=this.RC(),i=this.AC();return{normal:t==null?void 0:t.decodeText(),rollover:e==null?void 0:e.decodeText(),down:i==null?void 0:i.decodeText()}}setRotation(t){let e=this.dict.context.obj(t);this.dict.set(x.of("R"),e)}setBorderColor(t){let e=this.dict.context.obj(t);this.dict.set(x.of("BC"),e)}setBackgroundColor(t){let e=this.dict.context.obj(t);this.dict.set(x.of("BG"),e)}setCaptions(t){let e=M.fromText(t.normal);if(this.dict.set(x.of("CA"),e),t.rollover){let i=M.fromText(t.rollover);this.dict.set(x.of("RC"),i)}else this.dict.delete(x.of("RC"));if(t.down){let i=M.fromText(t.down);this.dict.set(x.of("AC"),i)}else this.dict.delete(x.of("AC"))}};Ol.fromDict=n=>new Ol(n);var ks=Ol;var ro=class extends yd{MK(){let t=this.dict.lookup(x.of("MK"));if(t instanceof R)return t}BS(){let t=this.dict.lookup(x.of("BS"));if(t instanceof R)return t}DA(){let t=this.dict.lookup(x.of("DA"));if(t instanceof G||t instanceof M)return t}P(){let t=this.dict.get(x.of("P"));if(t instanceof q)return t}setP(t){this.dict.set(x.of("P"),t)}setDefaultAppearance(t){this.dict.set(x.of("DA"),G.of(t))}getDefaultAppearance(){let t=this.DA();return t instanceof M?t.decodeText():t==null?void 0:t.asString()}getAppearanceCharacteristics(){let t=this.MK();if(t)return ks.fromDict(t)}getOrCreateAppearanceCharacteristics(){let t=this.MK();if(t)return ks.fromDict(t);let e=ks.fromDict(this.dict.context.obj({}));return this.dict.set(x.of("MK"),e.dict),e}getBorderStyle(){let t=this.BS();if(t)return xd.fromDict(t)}getOrCreateBorderStyle(){let t=this.BS();if(t)return xd.fromDict(t);let e=xd.fromDict(this.dict.context.obj({}));return this.dict.set(x.of("BS"),e.dict),e}getOnValue(){var t;let e=(t=this.getAppearances())===null||t===void 0?void 0:t.normal;if(e instanceof R){let i=e.keys();for(let r=0,o=i.length;r<o;r++){let s=i[r];if(s!==x.of("Off"))return s}}}};ro.fromDict=n=>new ro(n);ro.create=(n,t)=>{let e=n.obj({Type:"Annot",Subtype:"Widget",Rect:[0,0,0,0],Parent:t});return new ro(e)};var oo=ro;var Ml=class extends Ps{FT(){let t=this.getInheritableAttribute(x.of("FT"));return this.dict.context.lookup(t,x)}getWidgets(){let t=this.Kids();if(!t)return[oo.fromDict(this.dict)];let e=new Array(t.size());for(let i=0,r=t.size();i<r;i++){let o=t.lookup(i,R);e[i]=oo.fromDict(o)}return e}addWidget(t){let{Kids:e}=this.normalizedEntries();e.push(t)}removeWidget(t){let e=this.Kids();if(e){if(t<0||t>e.size())throw new hn(t,0,e.size());e.remove(t)}else{if(t!==0)throw new hn(t,0,0);this.setKids([])}}normalizedEntries(){let t=this.Kids();return t||(t=this.dict.context.obj([this.ref]),this.dict.set(x.of("Kids"),t)),{Kids:t}}};Ml.fromDict=(n,t)=>new Ml(n,t);var Et=Ml;var gf=class extends Et{Opt(){return this.dict.lookupMaybe(x.of("Opt"),G,M,H)}setOpt(t){this.dict.set(x.of("Opt"),this.dict.context.obj(t))}getExportValues(){let t=this.Opt();if(!t)return;if(t instanceof G||t instanceof M)return[t];let e=[];for(let i=0,r=t.size();i<r;i++){let o=t.lookup(i);(o instanceof G||o instanceof M)&&e.push(o)}return e}removeExportValue(t){let e=this.Opt();if(e)if(e instanceof G||e instanceof M){if(t!==0)throw new hn(t,0,0);this.setOpt([])}else{if(t<0||t>e.size())throw new hn(t,0,e.size());e.remove(t)}}normalizeExportValues(){var t,e,i,r;let o=(t=this.getExportValues())!==null&&t!==void 0?t:[],s=[],a=this.getWidgets();for(let c=0,l=a.length;c<l;c++){let d=a[c],h=(e=o[c])!==null&&e!==void 0?e:M.fromText((r=(i=d.getOnValue())===null||i===void 0?void 0:i.decodeText())!==null&&r!==void 0?r:"");s.push(h)}this.setOpt(s)}addOpt(t,e){var i;this.normalizeExportValues();let r=t.decodeText(),o;if(e){let a=(i=this.getExportValues())!==null&&i!==void 0?i:[];for(let c=0,l=a.length;c<l;c++)a[c].decodeText()===r&&(o=c)}let s=this.Opt();return s.push(t),o!=null?o:s.size()-1}addWidgetWithOpt(t,e,i){let r=this.addOpt(e,i),o=x.of(String(r));return this.addWidget(t),o}},nr=gf;var so=class extends nr{setValue(t){var e;let i=(e=this.getOnValue())!==null&&e!==void 0?e:x.of("Yes");if(t!==i&&t!==x.of("Off"))throw new un;this.dict.set(x.of("V"),t);let r=this.getWidgets();for(let o=0,s=r.length;o<s;o++){let a=r[o],c=a.getOnValue()===t?t:x.of("Off");a.setAppearanceState(c)}}getValue(){let t=this.V();return t instanceof x?t:x.of("Off")}getOnValue(){let[t]=this.getWidgets();return t==null?void 0:t.getOnValue()}};so.fromDict=(n,t)=>new so(n,t);so.create=n=>{let t=n.obj({FT:"Btn",Kids:[]}),e=n.register(t);return new so(t,e)};var bn=so;var Xe=n=>1<<n,Ot;(function(n){n[n.ReadOnly=Xe(1-1)]="ReadOnly",n[n.Required=Xe(2-1)]="Required",n[n.NoExport=Xe(3-1)]="NoExport"})(Ot||(Ot={}));var dt;(function(n){n[n.NoToggleToOff=Xe(15-1)]="NoToggleToOff",n[n.Radio=Xe(16-1)]="Radio",n[n.PushButton=Xe(17-1)]="PushButton",n[n.RadiosInUnison=Xe(26-1)]="RadiosInUnison"})(dt||(dt={}));var Ie;(function(n){n[n.Multiline=Xe(13-1)]="Multiline",n[n.Password=Xe(14-1)]="Password",n[n.FileSelect=Xe(21-1)]="FileSelect",n[n.DoNotSpellCheck=Xe(23-1)]="DoNotSpellCheck",n[n.DoNotScroll=Xe(24-1)]="DoNotScroll",n[n.Comb=Xe(25-1)]="Comb",n[n.RichText=Xe(26-1)]="RichText"})(Ie||(Ie={}));var oe;(function(n){n[n.Combo=Xe(18-1)]="Combo",n[n.Edit=Xe(19-1)]="Edit",n[n.Sort=Xe(20-1)]="Sort",n[n.MultiSelect=Xe(22-1)]="MultiSelect",n[n.DoNotSpellCheck=Xe(23-1)]="DoNotSpellCheck",n[n.CommitOnSelChange=Xe(27-1)]="CommitOnSelChange"})(oe||(oe={}));var mf=class extends Et{setValues(t){if(this.hasFlag(oe.Combo)&&!this.hasFlag(oe.Edit)&&!this.valuesAreValid(t))throw new un;if(t.length===0&&this.dict.delete(x.of("V")),t.length===1&&this.dict.set(x.of("V"),t[0]),t.length>1){if(!this.hasFlag(oe.MultiSelect))throw new tl;this.dict.set(x.of("V"),this.dict.context.obj(t))}this.updateSelectedIndices(t)}valuesAreValid(t){let e=this.getOptions();for(let i=0,r=t.length;i<r;i++){let o=t[i].decodeText();if(!e.find(s=>o===(s.display||s.value).decodeText()))return!1}return!0}updateSelectedIndices(t){if(t.length>1){let e=new Array(t.length),i=this.getOptions();for(let r=0,o=t.length;r<o;r++){let s=t[r].decodeText();e[r]=i.findIndex(a=>s===(a.display||a.value).decodeText())}this.dict.set(x.of("I"),this.dict.context.obj(e.sort()))}else this.dict.delete(x.of("I"))}getValues(){let t=this.V();if(t instanceof G||t instanceof M)return[t];if(t instanceof H){let e=[];for(let i=0,r=t.size();i<r;i++){let o=t.lookup(i);(o instanceof G||o instanceof M)&&e.push(o)}return e}return[]}Opt(){return this.dict.lookupMaybe(x.of("Opt"),G,M,H)}setOptions(t){let e=new Array(t.length);for(let i=0,r=t.length;i<r;i++){let{value:o,display:s}=t[i];e[i]=this.dict.context.obj([o,s||o])}this.dict.set(x.of("Opt"),this.dict.context.obj(e))}getOptions(){let t=this.Opt();if(t instanceof G||t instanceof M)return[{value:t,display:t}];if(t instanceof H){let e=[];for(let i=0,r=t.size();i<r;i++){let o=t.lookup(i);if((o instanceof G||o instanceof M)&&e.push({value:o,display:o}),o instanceof H&&o.size()>0){let s=o.lookup(0,G,M),a=o.lookupMaybe(1,G,M);e.push({value:s,display:a||s})}}return e}return[]}},Ds=mf;var ao=class extends Ds{};ao.fromDict=(n,t)=>new ao(n,t);ao.create=n=>{let t=n.obj({FT:"Ch",Ff:oe.Combo,Kids:[]}),e=n.register(t);return new ao(t,e)};var xn=ao;var lo=class extends Ps{addField(t){let{Kids:e}=this.normalizedEntries();e==null||e.push(t)}normalizedEntries(){let t=this.Kids();return t||(t=this.dict.context.obj([]),this.dict.set(x.of("Kids"),t)),{Kids:t}}};lo.fromDict=(n,t)=>new lo(n,t);lo.create=n=>{let t=n.obj({}),e=n.register(t);return new lo(t,e)};var yn=lo;var Nl=class extends Et{};Nl.fromDict=(n,t)=>new Nl(n,t);var rr=Nl;var co=class extends Et{MaxLen(){let t=this.dict.lookup(x.of("MaxLen"));if(t instanceof N)return t}Q(){let t=this.dict.lookup(x.of("Q"));if(t instanceof N)return t}setMaxLength(t){this.dict.set(x.of("MaxLen"),N.of(t))}removeMaxLength(){this.dict.delete(x.of("MaxLen"))}getMaxLength(){var t;return(t=this.MaxLen())===null||t===void 0?void 0:t.asNumber()}setQuadding(t){this.dict.set(x.of("Q"),N.of(t))}getQuadding(){var t;return(t=this.Q())===null||t===void 0?void 0:t.asNumber()}setValue(t){this.dict.set(x.of("V"),t)}removeValue(){this.dict.delete(x.of("V"))}getValue(){let t=this.V();if(t instanceof G||t instanceof M)return t}};co.fromDict=(n,t)=>new co(n,t);co.create=n=>{let t=n.obj({FT:"Tx",Kids:[]}),e=n.register(t);return new co(t,e)};var wn=co;var ho=class extends nr{};ho.fromDict=(n,t)=>new ho(n,t);ho.create=n=>{let t=n.obj({FT:"Btn",Ff:dt.PushButton,Kids:[]}),e=n.register(t);return new ho(t,e)};var vn=ho;var uo=class extends nr{setValue(t){if(!this.getOnValues().includes(t)&&t!==x.of("Off"))throw new un;this.dict.set(x.of("V"),t);let i=this.getWidgets();for(let r=0,o=i.length;r<o;r++){let s=i[r],a=s.getOnValue()===t?t:x.of("Off");s.setAppearanceState(a)}}getValue(){let t=this.V();return t instanceof x?t:x.of("Off")}getOnValues(){let t=this.getWidgets(),e=[];for(let i=0,r=t.length;i<r;i++){let o=t[i].getOnValue();o&&e.push(o)}return e}};uo.fromDict=(n,t)=>new uo(n,t);uo.create=n=>{let t=n.obj({FT:"Btn",Ff:dt.Radio,Kids:[]}),e=n.register(t);return new uo(t,e)};var Fn=uo;var fo=class extends Ds{};fo.fromDict=(n,t)=>new fo(n,t);fo.create=n=>{let t=n.obj({FT:"Ch",Kids:[]}),e=n.register(t);return new fo(t,e)};var Pn=fo;var Ss=n=>{if(!n)return[];let t=[];for(let e=0,i=n.size();e<i;e++){let r=n.get(e),o=n.lookup(e);r instanceof q&&o instanceof R&&t.push([wd(o,r),r])}return t},wd=(n,t)=>jv(n)?yn.fromDict(n,t):Kv(n,t),jv=n=>{let t=n.lookup(x.of("Kids"));if(t instanceof H)for(let e=0,i=t.size();e<i;e++){let r=t.lookup(e);if(r instanceof R&&r.has(x.of("T")))return!0}return!1},Kv=(n,t)=>{let e=xf(n,x.of("FT")),i=n.context.lookup(e,x);return i===x.of("Btn")?Gv(n,t):i===x.of("Ch")?Xv(n,t):i===x.of("Tx")?wn.fromDict(n,t):i===x.of("Sig")?rr.fromDict(n,t):Et.fromDict(n,t)},Gv=(n,t)=>{var e;let i=xf(n,x.of("Ff")),r=n.context.lookupMaybe(i,N),o=(e=r==null?void 0:r.asNumber())!==null&&e!==void 0?e:0;return bf(o,dt.PushButton)?vn.fromDict(n,t):bf(o,dt.Radio)?Fn.fromDict(n,t):bn.fromDict(n,t)},Xv=(n,t)=>{var e;let i=xf(n,x.of("Ff")),r=n.context.lookupMaybe(i,N),o=(e=r==null?void 0:r.asNumber())!==null&&e!==void 0?e:0;return bf(o,oe.Combo)?xn.fromDict(n,t):Pn.fromDict(n,t)},bf=(n,t)=>(n&t)!==0,xf=(n,t)=>{let e;return ob(n,i=>{e||(e=i.get(t))}),e},ob=(n,t)=>{t(n);let e=n.lookupMaybe(x.of("Parent"),R);e&&ob(e,t)};var po=class{constructor(t){this.dict=t}Fields(){let t=this.dict.lookup(x.of("Fields"));if(t instanceof H)return t}getFields(){let{Fields:t}=this.normalizedEntries(),e=new Array(t.size());for(let i=0,r=t.size();i<r;i++){let o=t.get(i),s=t.lookup(i,R);e[i]=[wd(s,o),o]}return e}getAllFields(){let t=[],e=i=>{if(i)for(let r=0,o=i.length;r<o;r++){let s=i[r];t.push(s);let[a]=s;a instanceof yn&&e(Ss(a.Kids()))}};return e(this.getFields()),t}addField(t){let{Fields:e}=this.normalizedEntries();e==null||e.push(t)}removeField(t){let e=t.getParent(),i=e===void 0?this.normalizedEntries().Fields:e.Kids(),r=i==null?void 0:i.indexOf(t.ref);if(i===void 0||r===void 0)throw new Error(`Tried to remove inexistent field ${t.getFullyQualifiedName()}`);i.remove(r),e!==void 0&&i.size()===0&&this.removeField(e)}normalizedEntries(){let t=this.Fields();return t||(t=this.dict.context.obj([]),this.dict.set(x.of("Fields"),t)),{Fields:t}}};po.fromDict=n=>new po(n);po.create=n=>{let t=n.obj({Fields:[]});return new po(t)};var or=po;var go=class extends R{Pages(){return this.lookup(x.of("Pages"),R)}AcroForm(){return this.lookupMaybe(x.of("AcroForm"),R)}getAcroForm(){let t=this.AcroForm();if(t)return or.fromDict(t)}getOrCreateAcroForm(){let t=this.getAcroForm();if(!t){t=or.create(this.context);let e=this.context.register(t.dict);this.set(x.of("AcroForm"),e)}return t}ViewerPreferences(){return this.lookupMaybe(x.of("ViewerPreferences"),R)}getViewerPreferences(){let t=this.ViewerPreferences();if(t)return El.fromDict(t)}getOrCreateViewerPreferences(){let t=this.getViewerPreferences();if(!t){t=El.create(this.context);let e=this.context.register(t.dict);this.set(x.of("ViewerPreferences"),e)}return t}insertLeafNode(t,e){let i=this.get(x.of("Pages"));return this.Pages().insertLeafNode(t,e)||i}removeLeafNode(t){this.Pages().removeLeafNode(t)}};go.withContextAndPages=(n,t)=>{let e=new Map;return e.set(x.of("Type"),x.of("Catalog")),e.set(x.of("Pages"),t),new go(e,n)};go.fromMapWithContext=(n,t)=>new go(n,t);var Cs=go;var vi=class extends R{Parent(){return this.lookup(x.of("Parent"))}Kids(){return this.lookup(x.of("Kids"),H)}Count(){return this.lookup(x.of("Count"),N)}pushTreeNode(t){this.Kids().push(t)}pushLeafNode(t){let e=this.Kids();this.insertLeafKid(e.size(),t)}insertLeafNode(t,e){let i=this.Kids(),r=this.Count().asNumber();if(e>r)throw new as(e,r);let o=e;for(let s=0,a=i.size();s<a;s++){if(o===0){this.insertLeafKid(s,t);return}let c=i.get(s),l=this.context.lookup(c);if(l instanceof vi){if(l.Count().asNumber()>o)return l.insertLeafNode(t,o)||c;o-=l.Count().asNumber()}l instanceof tt&&(o-=1)}if(o===0){this.insertLeafKid(i.size(),t);return}throw new ls(e,"insertLeafNode")}removeLeafNode(t,e=!0){let i=this.Kids(),r=this.Count().asNumber();if(t>=r)throw new as(t,r);let o=t;for(let s=0,a=i.size();s<a;s++){let c=i.get(s),l=this.context.lookup(c);if(l instanceof vi)if(l.Count().asNumber()>o){l.removeLeafNode(o,e),e&&l.Kids().size()===0&&i.remove(s);return}else o-=l.Count().asNumber();if(l instanceof tt)if(o===0){this.removeKid(s);return}else o-=1}throw new ls(t,"removeLeafNode")}ascend(t){t(this);let e=this.Parent();e&&e.ascend(t)}traverse(t){let e=this.Kids();for(let i=0,r=e.size();i<r;i++){let o=e.get(i),s=this.context.lookup(o);s instanceof vi&&s.traverse(t),t(s,o)}}insertLeafKid(t,e){let i=this.Kids();this.ascend(r=>{let o=r.Count().asNumber()+1;r.set(x.of("Count"),N.of(o))}),i.insert(t,e)}removeKid(t){let e=this.Kids();e.lookup(t)instanceof tt&&this.ascend(r=>{let o=r.Count().asNumber()-1;r.set(x.of("Count"),N.of(o))}),e.remove(t)}};vi.withContext=(n,t)=>{let e=new Map;return e.set(x.of("Type"),x.of("Pages")),e.set(x.of("Kids"),n.obj([])),e.set(x.of("Count"),n.obj(0)),t&&e.set(x.of("Parent"),t),new vi(e,n)};vi.fromMapWithContext=(n,t)=>new vi(n,t);var Ts=vi;var Qe=new Uint8Array(256);Qe[y.Zero]=1;Qe[y.One]=1;Qe[y.Two]=1;Qe[y.Three]=1;Qe[y.Four]=1;Qe[y.Five]=1;Qe[y.Six]=1;Qe[y.Seven]=1;Qe[y.Eight]=1;Qe[y.Nine]=1;var vd=new Uint8Array(256);vd[y.Period]=1;vd[y.Plus]=1;vd[y.Minus]=1;var Rl=new Uint8Array(256);for(let n=0,t=256;n<t;n++)Rl[n]=Qe[n]||vd[n]?1:0;var{Newline:sb,CarriageReturn:ab}=y,yf=class{constructor(t,e=!1){this.bytes=t,this.capNumbers=e}parseRawInt(){let t="";for(;!this.bytes.done();){let i=this.bytes.peek();if(!Qe[i])break;t+=kt(this.bytes.next())}let e=Number(t);if(!t||!isFinite(e))throw new cs(this.bytes.position(),t);return e}parseRawNumber(){let t="";for(;!this.bytes.done();){let i=this.bytes.peek();if(!Rl[i]||(t+=kt(this.bytes.next()),i===y.Period))break}for(;!this.bytes.done();){let i=this.bytes.peek();if(!Qe[i])break;t+=kt(this.bytes.next())}let e=Number(t);if(!t||!isFinite(e))throw new cs(this.bytes.position(),t);if(e>Number.MAX_SAFE_INTEGER)if(this.capNumbers){let i=`Parsed number that is too large for some PDF readers: ${t}, using Number.MAX_SAFE_INTEGER instead.`;return console.warn(i),Number.MAX_SAFE_INTEGER}else{let i=`Parsed number that is too large for some PDF readers: ${t}, not capping.`;console.warn(i)}return e}skipWhitespace(){for(;!this.bytes.done()&&Zt[this.bytes.peek()];)this.bytes.next()}skipLine(){for(;!this.bytes.done();){let t=this.bytes.peek();if(t===sb||t===ab)return;this.bytes.next()}}skipComment(){if(this.bytes.peek()!==y.Percent)return!1;for(;!this.bytes.done();){let t=this.bytes.peek();if(t===sb||t===ab)return!0;this.bytes.next()}return!0}skipWhitespaceAndComments(){for(this.skipWhitespace();this.skipComment();)this.skipWhitespace()}matchKeyword(t){let e=this.bytes.offset();for(let i=0,r=t.length;i<r;i++)if(this.bytes.done()||this.bytes.next()!==t[i])return this.bytes.moveTo(e),!1;return!0}},lb=yf;var mo=class{constructor(t){this.idx=0,this.line=0,this.column=0,this.bytes=t,this.length=this.bytes.length}moveTo(t){this.idx=t}next(){let t=this.bytes[this.idx++];return t===y.Newline?(this.line+=1,this.column=0):this.column+=1,t}assertNext(t){if(this.peek()!==t)throw new rl(this.position(),t,this.peek());return this.next()}peek(){return this.bytes[this.idx]}peekAhead(t){return this.bytes[this.idx+t]}peekAt(t){return this.bytes[t]}done(){return this.idx>=this.length}offset(){return this.idx}slice(t,e){return this.bytes.slice(t,e)}position(){return{line:this.line,column:this.column,offset:this.idx}}};mo.of=n=>new mo(n);mo.fromPDFRawStream=n=>mo.of(ws(n).decode());var sr=mo;var{Space:Zv,CarriageReturn:Vl,Newline:Bl}=y,Hl=[y.s,y.t,y.r,y.e,y.a,y.m],Fd=[y.e,y.n,y.d,y.s,y.t,y.r,y.e,y.a,y.m],xe={header:[y.Percent,y.P,y.D,y.F,y.Dash],eof:[y.Percent,y.Percent,y.E,y.O,y.F],obj:[y.o,y.b,y.j],endobj:[y.e,y.n,y.d,y.o,y.b,y.j],xref:[y.x,y.r,y.e,y.f],trailer:[y.t,y.r,y.a,y.i,y.l,y.e,y.r],startxref:[y.s,y.t,y.a,y.r,y.t,y.x,y.r,y.e,y.f],true:[y.t,y.r,y.u,y.e],false:[y.f,y.a,y.l,y.s,y.e],null:[y.n,y.u,y.l,y.l],stream:Hl,streamEOF1:[...Hl,Zv,Vl,Bl],streamEOF2:[...Hl,Vl,Bl],streamEOF3:[...Hl,Vl],streamEOF4:[...Hl,Bl],endstream:Fd,EOF1endstream:[Vl,Bl,...Fd],EOF2endstream:[Vl,...Fd],EOF3endstream:[Bl,...Fd]};var bo=class extends lb{constructor(t,e,i=!1,r){super(t,i),this.context=e,this.cryptoFactory=r}parseObject(t){if(this.skipWhitespaceAndComments(),this.matchKeyword(xe.true))return yi.True;if(this.matchKeyword(xe.false))return yi.False;if(this.matchKeyword(xe.null))return Me;let e=this.bytes.peek();if(e===y.LessThan&&this.bytes.peekAhead(1)===y.LessThan)return this.parseDictOrStream(t);if(e===y.LessThan)return this.parseHexString(t);if(e===y.LeftParen)return this.parseString(t);if(e===y.ForwardSlash)return this.parseName();if(e===y.LeftSquareBracket)return this.parseArray(t);if(Rl[e])return this.parseNumberOrRef();throw new ol(this.bytes.position(),e)}parseNumberOrRef(){let t=this.parseRawNumber();this.skipWhitespaceAndComments();let e=this.bytes.offset();if(Qe[this.bytes.peek()]){let i=this.parseRawNumber();if(this.skipWhitespaceAndComments(),this.bytes.peek()===y.R)return this.bytes.assertNext(y.R),q.of(t,i)}return this.bytes.moveTo(e),N.of(t)}parseHexString(t){let e="";for(this.bytes.assertNext(y.LessThan);!this.bytes.done()&&this.bytes.peek()!==y.GreaterThan;)e+=kt(this.bytes.next());return this.bytes.assertNext(y.GreaterThan),this.cryptoFactory&&t&&(e=this.cryptoFactory.createCipherTransform(t.objectNumber,t.generationNumber).decryptBytes(M.of(e).asBytes()).reduce((o,s)=>o+s.toString(16).padStart(2,"0"),"")),M.of(e)}parseString(t){let e=0,i=!1,r="";for(;!this.bytes.done();){let o=this.bytes.next();if(r+=kt(o),i||(o===y.LeftParen&&(e+=1),o===y.RightParen&&(e-=1)),o===y.BackSlash?i=!i:i&&(i=!1),e===0){let s=r.substring(1,r.length-1);return this.cryptoFactory&&t&&(s=this.cryptoFactory.createCipherTransform(t.objectNumber,t.generationNumber).decryptString(s)),G.of(s)}}throw new ll(this.bytes.position())}parseName(){this.bytes.assertNext(y.ForwardSlash);let t="";for(;!this.bytes.done();){let e=this.bytes.peek();if(Zt[e]||Tt[e])break;t+=kt(e),this.bytes.next()}return x.of(t)}parseArray(t){this.bytes.assertNext(y.LeftSquareBracket),this.skipWhitespaceAndComments();let e=H.withContext(this.context);for(;this.bytes.peek()!==y.RightSquareBracket;){let i=this.parseObject(t);e.push(i),this.skipWhitespaceAndComments()}return this.bytes.assertNext(y.RightSquareBracket),e}parseDict(t){this.bytes.assertNext(y.LessThan),this.bytes.assertNext(y.LessThan),this.skipWhitespaceAndComments();let e=new Map;for(;!this.bytes.done()&&this.bytes.peek()!==y.GreaterThan&&this.bytes.peekAhead(1)!==y.GreaterThan;){let r=this.parseName(),o=this.parseObject(t);e.set(r,o),this.skipWhitespaceAndComments()}this.skipWhitespaceAndComments(),this.bytes.assertNext(y.GreaterThan),this.bytes.assertNext(y.GreaterThan);let i=e.get(x.of("Type"));return i===x.of("Catalog")?Cs.fromMapWithContext(e,this.context):i===x.of("Pages")?Ts.fromMapWithContext(e,this.context):i===x.of("Page")?tt.fromMapWithContext(e,this.context):R.fromMapWithContext(e,this.context)}parseDictOrStream(t){let e=this.bytes.position(),i=this.parseDict(t);if(this.skipWhitespaceAndComments(),!this.matchKeyword(xe.streamEOF1)&&!this.matchKeyword(xe.streamEOF2)&&!this.matchKeyword(xe.streamEOF3)&&!this.matchKeyword(xe.streamEOF4)&&!this.matchKeyword(xe.stream))return i;let r=this.bytes.offset(),o,s=i.get(x.of("Length"));s instanceof N?(o=r+s.asNumber(),this.bytes.moveTo(o),this.skipWhitespaceAndComments(),this.matchKeyword(xe.endstream)||(this.bytes.moveTo(r),o=this.findEndOfStreamFallback(e))):o=this.findEndOfStreamFallback(e);let a=this.bytes.slice(r,o);return this.cryptoFactory&&t&&(a=this.cryptoFactory.createCipherTransform(t.objectNumber,t.generationNumber).decryptBytes(a)),wi.of(i,a)}findEndOfStreamFallback(t){let e=1,i=this.bytes.offset();for(;!this.bytes.done()&&(i=this.bytes.offset(),this.matchKeyword(xe.stream)?e+=1:this.matchKeyword(xe.EOF1endstream)||this.matchKeyword(xe.EOF2endstream)||this.matchKeyword(xe.EOF3endstream)||this.matchKeyword(xe.endstream)?e-=1:this.bytes.next(),e!==0););if(e!==0)throw new al(t);return i}};bo.forBytes=(n,t,e)=>new bo(sr.of(n),t,e);bo.forByteStream=(n,t,e=!1)=>new bo(n,t,e);var Es=bo;var Ul=class extends Es{constructor(t,e){super(sr.fromPDFRawStream(t),t.dict.context);let{dict:i}=t;this.alreadyParsed=!1,this.shouldWaitForTick=e||(()=>!1),this.firstOffset=i.lookup(x.of("First"),N).asNumber(),this.objectCount=i.lookup(x.of("N"),N).asNumber()}async parseIntoContext(){if(this.alreadyParsed)throw new dn("PDFObjectStreamParser","parseIntoContext");this.alreadyParsed=!0;let t=this.parseOffsetsAndObjectNumbers();for(let e=0,i=t.length;e<i;e++){let{objectNumber:r,offset:o}=t[e];this.bytes.moveTo(this.firstOffset+o);let s=q.of(r,0),a=this.parseObject(s);this.context.assign(s,a),this.shouldWaitForTick()&&await gi()}}parseOffsetsAndObjectNumbers(){let t=[];for(let e=0,i=this.objectCount;e<i;e++){this.skipWhitespaceAndComments();let r=this.parseRawInt();this.skipWhitespaceAndComments();let o=this.parseRawInt();t.push({objectNumber:r,offset:o})}return t}};Ul.forStream=(n,t)=>new Ul(n,t);var Pd=Ul;var zl=class{constructor(t){this.alreadyParsed=!1,this.dict=t.dict,this.bytes=sr.fromPDFRawStream(t),this.context=this.dict.context;let e=this.dict.lookup(x.of("Size"),N),i=this.dict.lookup(x.of("Index"));if(i instanceof H){this.subsections=[];for(let o=0,s=i.size();o<s;o+=2){let a=i.lookup(o+0,N).asNumber(),c=i.lookup(o+1,N).asNumber();this.subsections.push({firstObjectNumber:a,length:c})}}else this.subsections=[{firstObjectNumber:0,length:e.asNumber()}];let r=this.dict.lookup(x.of("W"),H);this.byteWidths=[-1,-1,-1];for(let o=0,s=r.size();o<s;o++)this.byteWidths[o]=r.lookup(o,N).asNumber()}parseIntoContext(){if(this.alreadyParsed)throw new dn("PDFXRefStreamParser","parseIntoContext");return this.alreadyParsed=!0,this.context.trailerInfo={Root:this.dict.get(x.of("Root")),Encrypt:this.dict.get(x.of("Encrypt")),Info:this.dict.get(x.of("Info")),ID:this.dict.get(x.of("ID"))},this.parseEntries()}parseEntries(){let t=[],[e,i,r]=this.byteWidths;for(let o=0,s=this.subsections.length;o<s;o++){let{firstObjectNumber:a,length:c}=this.subsections[o];for(let l=0;l<c;l++){let d=0;for(let g=0,m=e;g<m;g++)d=d<<8|this.bytes.next();let h=0;for(let g=0,m=i;g<m;g++)h=h<<8|this.bytes.next();let u=0;for(let g=0,m=r;g<m;g++)u=u<<8|this.bytes.next();e===0&&(d=1);let f=a+l,p={ref:q.of(f,u),offset:h,deleted:d===0,inObjectStream:d===2};t.push(p)}}return t}};zl.forStream=n=>new zl(n);var kd=zl;var ql=class extends Es{constructor(t,e=1/0,i=!1,r=!1,o=!1,s){super(sr.of(t),Yr.create(),o,s),this.alreadyParsed=!1,this.parsedObjects=0,this.shouldWaitForTick=()=>(this.parsedObjects+=1,this.parsedObjects%this.objectsPerTick===0),this.objectsPerTick=e,this.throwOnInvalidObject=i,this.warnOnInvalidObjects=r,this.context.isDecrypted=!!(s!=null&&s.encryptionKey)}async parseDocument(){if(this.alreadyParsed)throw new dn("PDFParser","parseDocument");this.alreadyParsed=!0,this.context.header=this.parseHeader();let t;for(;!this.bytes.done();){await this.parseDocumentSection();let e=this.bytes.offset();if(e===t)throw new cl(this.bytes.position());t=e}return this.maybeRecoverRoot(),this.context.lookup(q.of(0))&&(console.warn("Removing parsed object: 0 0 R"),this.context.delete(q.of(0))),this.context}maybeRecoverRoot(){let t=i=>i instanceof R&&i.lookup(x.of("Type"))===x.of("Catalog"),e=this.context.lookup(this.context.trailerInfo.Root);if(!t(e)){let i=this.context.enumerateIndirectObjects();for(let r=0,o=i.length;r<o;r++){let[s,a]=i[r];t(a)&&(this.context.trailerInfo.Root=s)}}}parseHeader(){for(;!this.bytes.done();){if(this.matchKeyword(xe.header)){let t=this.parseRawInt();this.bytes.assertNext(y.Period);let e=this.parseRawInt(),i=Bi.forVersion(t,e);return this.skipBinaryHeaderComment(),i}this.bytes.next()}throw new dl(this.bytes.position())}parseIndirectObjectHeader(){this.skipWhitespaceAndComments();let t=this.parseRawInt();this.skipWhitespaceAndComments();let e=this.parseRawInt();if(this.skipWhitespaceAndComments(),!this.matchKeyword(xe.obj))throw new hl(this.bytes.position(),xe.obj);return q.of(t,e)}matchIndirectObjectHeader(){let t=this.bytes.offset();try{return this.parseIndirectObjectHeader(),!0}catch(e){return this.bytes.moveTo(t),!1}}async parseIndirectObject(){let t=this.parseIndirectObjectHeader();this.skipWhitespaceAndComments();let e=this.parseObject(t);return this.skipWhitespaceAndComments(),this.matchKeyword(xe.endobj),e instanceof wi&&e.dict.lookup(x.of("Type"))===x.of("ObjStm")?await Pd.forStream(e,this.shouldWaitForTick).parseIntoContext():e instanceof wi&&e.dict.lookup(x.of("Type"))===x.of("XRef")?kd.forStream(e).parseIntoContext():this.context.assign(t,e),t}tryToParseInvalidIndirectObject(){let t=this.bytes.position(),e=`Trying to parse invalid object: ${JSON.stringify(t)})`;if(this.throwOnInvalidObject)throw new Error(e);this.warnOnInvalidObjects&&console.warn(e);let i=this.parseIndirectObjectHeader();this.warnOnInvalidObjects&&console.warn(`Invalid object ref: ${i}`),this.skipWhitespaceAndComments();let r=this.bytes.offset(),o=!0;for(;!this.bytes.done()&&(this.matchKeyword(xe.endobj)&&(o=!1),!!o);)this.bytes.next();if(o)throw new sl(t);let s=this.bytes.offset()-xe.endobj.length,a=ps.of(this.bytes.slice(r,s));return this.context.assign(i,a),i}async parseIndirectObjects(){for(this.skipWhitespaceAndComments();!this.bytes.done()&&Qe[this.bytes.peek()];){let t=this.bytes.offset();try{await this.parseIndirectObject()}catch(e){this.bytes.moveTo(t),this.tryToParseInvalidIndirectObject()}this.skipWhitespaceAndComments(),this.skipJibberish(),this.shouldWaitForTick()&&await gi()}}maybeParseCrossRefSection(){if(this.skipWhitespaceAndComments(),!this.matchKeyword(xe.xref))return;this.skipWhitespaceAndComments();let t=-1,e=hs.createEmpty();for(;!this.bytes.done()&&Qe[this.bytes.peek()];){let i=this.parseRawInt();this.skipWhitespaceAndComments();let r=this.parseRawInt();this.skipWhitespaceAndComments();let o=this.bytes.peek();if(o===y.n||o===y.f){let s=q.of(t,r);this.bytes.next()===y.n?e.addEntry(s,i):e.addDeletedEntry(s,i),t+=1}else t=i;this.skipWhitespaceAndComments()}return e}maybeParseTrailerDict(){if(this.skipWhitespaceAndComments(),!this.matchKeyword(xe.trailer))return;this.skipWhitespaceAndComments();let t=this.parseDict(),{context:e}=this;e.trailerInfo={Root:t.get(x.of("Root"))||e.trailerInfo.Root,Encrypt:t.get(x.of("Encrypt"))||e.trailerInfo.Encrypt,Info:t.get(x.of("Info"))||e.trailerInfo.Info,ID:t.get(x.of("ID"))||e.trailerInfo.ID}}maybeParseTrailer(){if(this.skipWhitespaceAndComments(),!this.matchKeyword(xe.startxref))return;this.skipWhitespaceAndComments();let t=this.parseRawInt();return this.skipWhitespace(),this.matchKeyword(xe.eof),this.skipWhitespaceAndComments(),this.matchKeyword(xe.eof),this.skipWhitespaceAndComments(),$n.forLastCrossRefSectionOffset(t)}async parseDocumentSection(){await this.parseIndirectObjects(),this.maybeParseCrossRefSection(),this.maybeParseTrailerDict(),this.maybeParseTrailer(),this.skipJibberish()}skipJibberish(){for(this.skipWhitespaceAndComments();!this.bytes.done();){let t=this.bytes.offset(),e=this.bytes.peek();if(e>=y.Space&&e<=y.Tilde&&(this.matchKeyword(xe.xref)||this.matchKeyword(xe.trailer)||this.matchKeyword(xe.startxref)||this.matchIndirectObjectHeader())){this.bytes.moveTo(t);break}this.bytes.next()}}skipBinaryHeaderComment(){this.skipWhitespaceAndComments();try{let t=this.bytes.offset();this.parseIndirectObjectHeader(),this.bytes.moveTo(t)}catch(t){this.bytes.next(),this.skipWhitespaceAndComments()}}};ql.forBytesWithOptions=(n,t,e,i,r,o)=>new ql(n,t,e,i,r,o);var Wl=ql;var zi=n=>1<<n,xo;(function(n){n[n.Invisible=zi(1-1)]="Invisible",n[n.Hidden=zi(2-1)]="Hidden",n[n.Print=zi(3-1)]="Print",n[n.NoZoom=zi(4-1)]="NoZoom",n[n.NoRotate=zi(5-1)]="NoRotate",n[n.NoView=zi(6-1)]="NoView",n[n.ReadOnly=zi(7-1)]="ReadOnly",n[n.Locked=zi(8-1)]="Locked",n[n.ToggleNoView=zi(9-1)]="ToggleNoView",n[n.LockedContents=zi(10-1)]="LockedContents"})(xo||(xo={}));var As=n=>n instanceof x?n:x.of(n),j=n=>n instanceof N?n:N.of(n),$=n=>n instanceof N?n.asNumber():n;var Is;(function(n){n.Degrees="degrees",n.Radians="radians"})(Is||(Is={}));var Yv=n=>(S(n,"radianAngle",["number"]),{type:Is.Radians,angle:n}),X=n=>(S(n,"degreeAngle",["number"]),{type:Is.Degrees,angle:n}),{Radians:cb,Degrees:db}=Is,Jt=n=>n*Math.PI/180,hb=n=>n*180/Math.PI,qe=n=>n.type===cb?n.angle:n.type===db?Jt(n.angle):Kn(`Invalid rotation: ${JSON.stringify(n)}`),jl=n=>n.type===cb?hb(n.angle):n.type===db?n.angle:Kn(`Invalid rotation: ${JSON.stringify(n)}`),Qt=(n=0)=>{let t=n/90%4;return t===0?0:t===1?90:t===2?180:t===3?270:0},qi=(n,t=0)=>{let e=Qt(t);return e===90||e===270?{width:n.height,height:n.width}:{width:n.width,height:n.height}},wf=(n,t=0,e=0)=>{let{x:i,y:r,width:o,height:s}=n,a=Qt(e),c=t/2;return a===0?{x:i-c,y:r-c,width:o,height:s}:a===90?{x:i-s+c,y:r-c,width:s,height:o}:a===180?{x:i-o+c,y:r-s+c,width:o,height:s}:a===270?{x:i-c,y:r-o+c,width:s,height:o}:{x:i-c,y:r-c,width:o,height:s}};var Kl=()=>_.of(ee.ClipNonZero),Jv=()=>_.of(ee.ClipEvenOdd),{cos:Dd,sin:Sd,tan:Cd}=Math,$t=(n,t,e,i,r,o)=>_.of(ee.ConcatTransformationMatrix,[j(n),j(t),j(e),j(i),j(r),j(o)]),mt=(n,t)=>$t(1,0,0,1,n,t),ar=(n,t)=>$t(n,0,0,t,0,0),lr=n=>$t(Dd($(n)),Sd($(n)),-Sd($(n)),Dd($(n)),0,0),Ls=n=>lr(Jt($(n))),Os=(n,t)=>$t(1,Cd($(n)),Cd($(t)),1,0,0),Qv=(n,t)=>Os(Jt($(n)),Jt($(t))),wo=(n,t)=>_.of(ee.SetLineDashPattern,[`[${n.map(j).join(" ")}]`,j(t)]),_v=()=>wo([],0),_t;(function(n){n[n.Butt=0]="Butt",n[n.Round=1]="Round",n[n.Projecting=2]="Projecting"})(_t||(_t={}));var Ms=n=>_.of(ee.SetLineCapStyle,[j(n)]),yo;(function(n){n[n.Miter=0]="Miter",n[n.Round=1]="Round",n[n.Bevel=2]="Bevel"})(yo||(yo={}));var $v=n=>_.of(ee.SetLineJoinStyle,[j(n)]),ji=n=>_.of(ee.SetGraphicsStateParams,[As(n)]),Ne=()=>_.of(ee.PushGraphicsState),Re=()=>_.of(ee.PopGraphicsState),kn=n=>_.of(ee.SetLineWidth,[j(n)]),bt=(n,t,e,i,r,o)=>_.of(ee.AppendBezierCurve,[j(n),j(t),j(e),j(i),j(r),j(o)]),Ns=(n,t,e,i)=>_.of(ee.CurveToReplicateInitialPoint,[j(n),j(t),j(e),j(i)]),ei=()=>_.of(ee.ClosePath),At=(n,t)=>_.of(ee.MoveTo,[j(n),j(t)]),Ve=(n,t)=>_.of(ee.LineTo,[j(n),j(t)]),ub=(n,t,e,i)=>_.of(ee.AppendRectangle,[j(n),j(t),j(e),j(i)]),eF=(n,t,e)=>ub(n,t,e,e),vo=()=>_.of(ee.StrokePath),Wi;(function(n){n.NonZero="f",n.EvenOdd="f*"})(Wi||(Wi={}));var Gl=()=>_.of(ee.FillNonZero),Ff=()=>_.of(ee.FillEvenOdd),Xl=()=>_.of(ee.FillNonZeroAndStroke),Zl=()=>_.of(ee.EndPath),Pf=()=>_.of(ee.NextLine),tF=(n,t)=>_.of(ee.MoveText,[j(n),j(t)]),Yl=n=>_.of(ee.ShowText,[n]),Jl=()=>_.of(ee.BeginText),Ql=()=>_.of(ee.EndText),Fo=(n,t)=>_.of(ee.SetFontAndSize,[As(n),j(t)]),iF=n=>_.of(ee.SetCharacterSpacing,[j(n)]),nF=n=>_.of(ee.SetWordSpacing,[j(n)]),rF=n=>_.of(ee.SetTextHorizontalScaling,[j(n)]),kf=n=>_.of(ee.SetTextLineHeight,[j(n)]),oF=n=>_.of(ee.SetTextRise,[j(n)]),vf;(function(n){n[n.Fill=0]="Fill",n[n.Outline=1]="Outline",n[n.FillAndOutline=2]="FillAndOutline",n[n.Invisible=3]="Invisible",n[n.FillAndClip=4]="FillAndClip",n[n.OutlineAndClip=5]="OutlineAndClip",n[n.FillAndOutlineAndClip=6]="FillAndOutlineAndClip",n[n.Clip=7]="Clip"})(vf||(vf={}));var Td=n=>_.of(ee.SetTextRenderingMode,[j(n)]),fb=(n,t,e,i,r,o)=>_.of(ee.SetTextMatrix,[j(n),j(t),j(e),j(i),j(r),j(o)]),Rs=(n,t,e,i,r)=>fb(Dd($(n)),Sd($(n))+Cd($(t)),-Sd($(n))+Cd($(e)),Dd($(n)),i,r),sF=(n,t,e,i,r)=>Rs(Jt($(n)),Jt($(t)),Jt($(e)),i,r),Vs=n=>_.of(ee.DrawObject,[As(n)]),Df=n=>_.of(ee.NonStrokingColorGray,[j(n)]),Sf=n=>_.of(ee.StrokingColorGray,[j(n)]),Cf=(n,t,e)=>_.of(ee.NonStrokingColorRgb,[j(n),j(t),j(e)]),Tf=(n,t,e)=>_.of(ee.StrokingColorRgb,[j(n),j(t),j(e)]),Ef=(n,t,e,i)=>_.of(ee.NonStrokingColorCmyk,[j(n),j(t),j(e),j(i)]),Af=(n,t,e,i)=>_.of(ee.StrokingColorCmyk,[j(n),j(t),j(e),j(i)]),Ed=n=>_.of(ee.BeginMarkedContent,[As(n)]),Ad=()=>_.of(ee.EndMarkedContent);var Ob=Un(Lb(),1),Po;(function(n){n.Grayscale="Grayscale",n.RGB="RGB",n.CMYK="CMYK"})(Po||(Po={}));var Nd=n=>(lt(n,"gray",0,1),{type:Po.Grayscale,gray:n}),ne=(n,t,e)=>(lt(n,"red",0,1),lt(t,"green",0,1),lt(e,"blue",0,1),{type:Po.RGB,red:n,green:t,blue:e}),Rd=(n,t,e,i)=>(lt(n,"cyan",0,1),lt(t,"magenta",0,1),lt(e,"yellow",0,1),lt(i,"key",0,1),{type:Po.CMYK,cyan:n,magenta:t,yellow:e,key:i}),Rf=n=>{S(n,"color",["string"]);let t=(0,Ob.default)(n).unitObject();return{rgb:ne(t.r,t.g,t.b),alpha:t.alpha}},{Grayscale:Vf,RGB:Bf,CMYK:Hf}=Po,ti=n=>n.type===Vf?Df(n.gray):n.type===Bf?Cf(n.red,n.green,n.blue):n.type===Hf?Ef(n.cyan,n.magenta,n.yellow,n.key):Kn(`Invalid color: ${JSON.stringify(n)}`),Dn=n=>n.type===Vf?Sf(n.gray):n.type===Bf?Tf(n.red,n.green,n.blue):n.type===Hf?Af(n.cyan,n.magenta,n.yellow,n.key):Kn(`Invalid color: ${JSON.stringify(n)}`),ht=(n,t=1)=>(n==null?void 0:n.length)===1?Nd(n[0]*t):(n==null?void 0:n.length)===3?ne(n[0]*t,n[1]*t,n[2]*t):(n==null?void 0:n.length)===4?Rd(n[0]*t,n[1]*t,n[2]*t,n[3]*t):void 0,Vd=n=>n.type===Vf?[n.gray]:n.type===Bf?[n.red,n.green,n.blue]:n.type===Hf?[n.cyan,n.magenta,n.yellow,n.key]:Kn(`Invalid color: ${JSON.stringify(n)}`);var Z=0,Y=0,le=0,ce=0,tc=0,ic=0,Mb=new Map([["A",7],["a",7],["C",6],["c",6],["H",1],["h",1],["L",2],["l",2],["M",2],["m",2],["Q",4],["q",4],["S",4],["s",4],["T",2],["t",2],["V",1],["v",1],["Z",0],["z",0]]),FF=n=>{let t,e=[],i=[],r="",o=!1,s=0;for(let a of n)if(Mb.has(a))s=Mb.get(a),t&&(r.length>0&&(i[i.length]=+r),e[e.length]={cmd:t,args:i},i=[],r="",o=!1),t=a;else if([" ",","].includes(a)||a==="-"&&r.length>0&&r[r.length-1]!=="e"||a==="."&&o){if(r.length===0)continue;i.length===s?(e[e.length]={cmd:t,args:i},i=[+r],t==="M"&&(t="L"),t==="m"&&(t="l")):i[i.length]=+r,o=a===".",r=["-","."].includes(a)?a:""}else r+=a,a==="."&&(o=!0);return r.length>0&&(i.length===s?(e[e.length]={cmd:t,args:i},i=[+r],t==="M"&&(t="L"),t==="m"&&(t="l")):i[i.length]=+r),e[e.length]={cmd:t,args:i},e},PF=n=>{Z=Y=le=ce=tc=ic=0;let t=[];for(let e=0;e<n.length;e++){let i=n[e];if(i.cmd&&typeof Nb[i.cmd]=="function"){let r=Nb[i.cmd](i.args);Array.isArray(r)?t=t.concat(r):t.push(r)}}return t},Nb={M(n){return Z=n[0],Y=n[1],le=ce=null,tc=Z,ic=Y,At(Z,Y)},m(n){return Z+=n[0],Y+=n[1],le=ce=null,tc=Z,ic=Y,At(Z,Y)},C(n){return Z=n[4],Y=n[5],le=n[2],ce=n[3],bt(n[0],n[1],n[2],n[3],n[4],n[5])},c(n){let t=bt(n[0]+Z,n[1]+Y,n[2]+Z,n[3]+Y,n[4]+Z,n[5]+Y);return le=Z+n[2],ce=Y+n[3],Z+=n[4],Y+=n[5],t},S(n){(le===null||ce===null)&&(le=Z,ce=Y);let t=bt(Z-(le-Z),Y-(ce-Y),n[0],n[1],n[2],n[3]);return le=n[0],ce=n[1],Z=n[2],Y=n[3],t},s(n){(le===null||ce===null)&&(le=Z,ce=Y);let t=bt(Z-(le-Z),Y-(ce-Y),Z+n[0],Y+n[1],Z+n[2],Y+n[3]);return le=Z+n[0],ce=Y+n[1],Z+=n[2],Y+=n[3],t},Q(n){return le=n[0],ce=n[1],Z=n[2],Y=n[3],Ns(n[0],n[1],Z,Y)},q(n){let t=Ns(n[0]+Z,n[1]+Y,n[2]+Z,n[3]+Y);return le=Z+n[0],ce=Y+n[1],Z+=n[2],Y+=n[3],t},T(n){le===null||ce===null?(le=Z,ce=Y):(le=Z-(le-Z),ce=Y-(ce-Y));let t=Ns(le,ce,n[0],n[1]);return Z=n[0],Y=n[1],t},t(n){le===null||ce===null?(le=Z,ce=Y):(le=Z-(le-Z),ce=Y-(ce-Y));let t=Ns(le,ce,Z+n[0],Y+n[1]);return Z+=n[0],Y+=n[1],t},A(n){let t=Rb(Z,Y,n);return Z=n[5],Y=n[6],t},a(n){n[5]+=Z,n[6]+=Y;let t=Rb(Z,Y,n);return Z=n[5],Y=n[6],t},L(n){return Z=n[0],Y=n[1],le=ce=null,Ve(Z,Y)},l(n){return Z+=n[0],Y+=n[1],le=ce=null,Ve(Z,Y)},H(n){return Z=n[0],le=ce=null,Ve(Z,Y)},h(n){return Z+=n[0],le=ce=null,Ve(Z,Y)},V(n){return Y=n[0],le=ce=null,Ve(Z,Y)},v(n){return Y+=n[0],le=ce=null,Ve(Z,Y)},Z(){let n=ei();return Z=tc,Y=ic,n},z(){let n=ei();return Z=tc,Y=ic,n}},Rb=(n,t,e)=>{let[i,r,o,s,a,c,l]=e,d=kF(c,l,i,r,s,a,o,n,t),h=[];for(let u of d){let f=DF(...u);h.push(bt(...f))}return h},kF=(n,t,e,i,r,o,s,a,c)=>{let l=s*(Math.PI/180),d=Math.sin(l),h=Math.cos(l);e=Math.abs(e),i=Math.abs(i),le=h*(a-n)*.5+d*(c-t)*.5,ce=h*(c-t)*.5-d*(a-n)*.5;let u=le*le/(e*e)+ce*ce/(i*i);u>1&&(u=Math.sqrt(u),e*=u,i*=u);let f=h/e,p=d/e,g=-d/i,m=h/i,b=f*a+p*c,w=g*a+m*c,F=f*n+p*t,v=g*n+m*t,k=1/((F-b)*(F-b)+(v-w)*(v-w))-.25;k<0&&(k=0);let C=Math.sqrt(k);o===r&&(C=-C);let D=.5*(b+F)-C*(v-w),T=.5*(w+v)+C*(F-b),O=Math.atan2(w-T,b-D),V=Math.atan2(v-T,F-D)-O;V<0&&o===1?V+=2*Math.PI:V>0&&o===0&&(V-=2*Math.PI);let W=Math.ceil(Math.abs(V/(Math.PI*.5+.001))),B=[];for(let U=0;U<W;U++){let te=O+U*V/W,z=O+(U+1)*V/W;B[U]=[D,T,te,z,e,i,d,h]}return B},DF=(n,t,e,i,r,o,s,a)=>{let c=a*r,l=-s*o,d=s*r,h=a*o,u=.5*(i-e),f=8/3*Math.sin(u*.5)*Math.sin(u*.5)/Math.sin(u),p=n+Math.cos(e)-f*Math.sin(e),g=t+Math.sin(e)+f*Math.cos(e),m=n+Math.cos(i),b=t+Math.sin(i),w=m+f*Math.sin(i),F=b-f*Math.cos(i);return[c*p+l*g,d*p+h*g,c*w+l*F,d*w+h*F,c*m+l*b,d*m+h*b]},Vb=n=>PF(FF(n));var SF=({topLeft:n,topRight:t,bottomRight:e,bottomLeft:i})=>[At(n.x,n.y),Ve(t.x,t.y),Ve(e.x,e.y),Ve(i.x,i.y),ei(),Kl(),Zl()],Us=n=>n.flatMap(SF),CF=(n,t)=>[Ne(),t.graphicsState&&ji(t.graphicsState),Jl(),ti(t.color),Fo(t.font,t.size),t.strokeWidth&&kn(t.strokeWidth),t.strokeColor&&Dn(t.strokeColor),t.renderMode&&Td(t.renderMode),Rs(qe(t.rotate),qe(t.xSkew),qe(t.ySkew),t.x,t.y),Yl(n),Ql(),Re()].filter(Boolean),Uf=(n,t)=>{let e=[Ne(),t.graphicsState&&ji(t.graphicsState),...t.clipSpaces?Us(t.clipSpaces):[],t.matrix&&$t(...t.matrix),Jl(),ti(t.color),Fo(t.font,t.size),kf(t.lineHeight),t.strokeWidth&&kn(t.strokeWidth),t.strokeColor&&Dn(t.strokeColor),t.renderMode&&Td(t.renderMode),Rs(qe(t.rotate),qe(t.xSkew),qe(t.ySkew),t.x,t.y)].filter(Boolean);for(let i=0,r=n.length;i<r;i++)e.push(Yl(n[i]),Pf());return e.push(Ql(),Re()),e},rc=(n,t)=>[Ne(),t.graphicsState&&ji(t.graphicsState),...t.clipSpaces?Us(t.clipSpaces):[],t.matrix&&$t(...t.matrix),mt(t.x,t.y),lr(qe(t.rotate)),ar(t.width,t.height),Os(qe(t.xSkew),qe(t.ySkew)),Vs(n),Re()].filter(Boolean),zf=(n,t)=>[Ne(),t.graphicsState&&ji(t.graphicsState),mt(t.x,t.y),lr(qe(t.rotate)),ar(t.xScale,t.yScale),Os(qe(t.xSkew),qe(t.ySkew)),Vs(n),Re()].filter(Boolean),qf=n=>{var t,e;return[Ne(),n.graphicsState&&ji(n.graphicsState),...n.clipSpaces?Us(n.clipSpaces):[],n.matrix&&$t(...n.matrix),n.color&&Dn(n.color),kn(n.thickness),wo((t=n.dashArray)!==null&&t!==void 0?t:[],(e=n.dashPhase)!==null&&e!==void 0?e:0),At(n.start.x,n.start.y),n.lineCap&&Ms(n.lineCap),At(n.start.x,n.start.y),Ve(n.end.x,n.end.y),vo(),Re()].filter(Boolean)},dr=n=>{var t,e;return[Ne(),n.graphicsState&&ji(n.graphicsState),n.color&&ti(n.color),n.borderColor&&Dn(n.borderColor),kn(n.borderWidth),n.borderLineCap&&Ms(n.borderLineCap),wo((t=n.borderDashArray)!==null&&t!==void 0?t:[],(e=n.borderDashPhase)!==null&&e!==void 0?e:0),...n.clipSpaces?Us(n.clipSpaces):[],n.matrix&&$t(...n.matrix),mt(n.x,n.y),lr(qe(n.rotate)),Os(qe(n.xSkew),qe(n.ySkew)),At(0,0),Ve(0,n.height),Ve(n.width,n.height),Ve(n.width,0),ei(),n.color&&n.borderWidth?Xl():n.color?Gl():n.borderColor?vo():ei(),Re()].filter(Boolean)},Bd=4*((Math.sqrt(2)-1)/3),Bb=n=>{let t=$(n.x),e=$(n.y),i=$(n.xScale),r=$(n.yScale);t-=i,e-=r;let o=i*Bd,s=r*Bd,a=t+i*2,c=e+r*2,l=t+i,d=e+r;return[Ne(),At(t,d),bt(t,d-s,l-o,e,l,e),bt(l+o,e,a,d-s,a,d),bt(a,d+s,l+o,c,l,c),bt(l-o,c,t,d+s,t,d),Re()]},TF=n=>{let t=$(n.x),e=$(n.y),i=$(n.xScale),r=$(n.yScale),o=-i,s=-r,a=i*Bd,c=r*Bd,l=o+i*2,d=s+r*2,h=o+i,u=s+r;return[mt(t,e),lr(qe(n.rotate)),At(o,u),bt(o,u-c,h-a,s,h,s),bt(h+a,s,l,u-c,l,u),bt(l,u+c,h+a,d,h,d),bt(h-a,d,o,u+c,o,u)]},nc=n=>{var t,e,i;return[Ne(),n.graphicsState&&ji(n.graphicsState),n.color&&ti(n.color),n.borderColor&&Dn(n.borderColor),...n.clipSpaces?Us(n.clipSpaces):[],n.matrix&&$t(...n.matrix),kn(n.borderWidth),n.borderLineCap&&Ms(n.borderLineCap),wo((t=n.borderDashArray)!==null&&t!==void 0?t:[],(e=n.borderDashPhase)!==null&&e!==void 0?e:0),...n.rotate===void 0?Bb({x:n.x,y:n.y,xScale:n.xScale,yScale:n.yScale}):TF({x:n.x,y:n.y,xScale:n.xScale,yScale:n.yScale,rotate:(i=n.rotate)!==null&&i!==void 0?i:X(0)}),n.color&&n.borderWidth?Xl():n.color?Gl():n.borderColor?vo():ei(),Re()].filter(Boolean)},Wf=(n,t)=>{var e,i,r;return[Ne(),t.graphicsState&&ji(t.graphicsState),...t.clipSpaces?Us(t.clipSpaces):[],t.matrix&&$t(...t.matrix),mt(t.x,t.y),lr(qe((e=t.rotate)!==null&&e!==void 0?e:X(0))),t.scale?ar(t.scale,-t.scale):ar(1,-1),t.color&&ti(t.color),t.borderColor&&Dn(t.borderColor),t.borderWidth&&kn(t.borderWidth),t.borderLineCap&&Ms(t.borderLineCap),wo((i=t.borderDashArray)!==null&&i!==void 0?i:[],(r=t.borderDashPhase)!==null&&r!==void 0?r:0),...Vb(n),t.color&&t.borderWidth?Xl():t.color?t.fillRule===Wi.EvenOdd?Ff():Gl():t.borderColor?vo():ei(),Re()].filter(Boolean)},Hb=n=>{let t=$(n.size),e=-1+.75,i=-1+.51,r=1-.525,o=1-.31,s=-1+.325,a=-((s-e)*(o-e))/(r-i)+i;return[Ne(),n.color&&Dn(n.color),kn(n.thickness),mt(n.x,n.y),At(s*t,a*t),Ve(e*t,i*t),Ve(o*t,r*t),vo(),Re()].filter(Boolean)},ii=n=>n.rotation===0?[mt(0,0),Ls(0)]:n.rotation===90?[mt(n.width,0),Ls(90)]:n.rotation===180?[mt(n.width,n.height),Ls(180)]:n.rotation===270?[mt(0,n.height),Ls(270)]:[],zs=n=>{let t=dr({x:n.x,y:n.y,width:n.width,height:n.height,borderWidth:n.borderWidth,color:n.color,borderColor:n.borderColor,rotate:X(0),xSkew:X(0),ySkew:X(0)});if(!n.filled)return t;let e=$(n.width),i=$(n.height),r=Math.min(e,i)/2,o=Hb({x:e/2,y:i/2,size:r,thickness:n.thickness,color:n.markColor});return[Ne(),...t,...o,Re()]},qs=n=>{let t=$(n.width),e=$(n.height),i=Math.min(t,e)/2,r=nc({x:n.x,y:n.y,xScale:i,yScale:i,color:n.color,borderColor:n.borderColor,borderWidth:n.borderWidth});if(!n.filled)return r;let o=nc({x:n.x,y:n.y,xScale:i*.45,yScale:i*.45,color:n.dotColor,borderColor:void 0,borderWidth:0});return[Ne(),...r,...o,Re()]},Hd=n=>{let t=$(n.x),e=$(n.y),i=$(n.width),r=$(n.height),o=dr({x:t,y:e,width:i,height:r,borderWidth:n.borderWidth,color:n.color,borderColor:n.borderColor,rotate:X(0),xSkew:X(0),ySkew:X(0)}),s=Ud(n.textLines,{color:n.textColor,font:n.font,size:n.fontSize,rotate:X(0),xSkew:X(0),ySkew:X(0)});return[Ne(),...o,...s,Re()]},Ud=(n,t)=>{let e=[Jl(),ti(t.color),Fo(t.font,t.size)];for(let i=0,r=n.length;i<r;i++){let{encoded:o,x:s,y:a}=n[i];e.push(Rs(qe(t.rotate),qe(t.xSkew),qe(t.ySkew),s,a),Yl(o))}return e.push(Ql()),e},zd=n=>{let t=$(n.x),e=$(n.y),i=$(n.width),r=$(n.height),o=$(n.borderWidth),s=$(n.padding),a=t+o/2+s,c=e+o/2+s,l=i-(o/2+s)*2,d=r-(o/2+s)*2,h=[At(a,c),Ve(a,c+d),Ve(a+l,c+d),Ve(a+l,c),ei(),Kl(),Zl()],u=dr({x:t,y:e,width:i,height:r,borderWidth:n.borderWidth,color:n.color,borderColor:n.borderColor,rotate:X(0),xSkew:X(0),ySkew:X(0)}),f=Ud(n.textLines,{color:n.textColor,font:n.font,size:n.fontSize,rotate:X(0),xSkew:X(0),ySkew:X(0)}),p=[Ed("Tx"),Ne(),...f,Re(),Ad()];return[Ne(),...u,...h,...p,Re()]},jf=n=>{let t=$(n.x),e=$(n.y),i=$(n.width),r=$(n.height),o=$(n.lineHeight),s=$(n.borderWidth),a=$(n.padding),c=t+s/2+a,l=e+s/2+a,d=i-(s/2+a)*2,h=r-(s/2+a)*2,u=[At(c,l),Ve(c,l+h),Ve(c+d,l+h),Ve(c+d,l),ei(),Kl(),Zl()],f=dr({x:t,y:e,width:i,height:r,borderWidth:n.borderWidth,color:n.color,borderColor:n.borderColor,rotate:X(0),xSkew:X(0),ySkew:X(0)}),p=[];for(let b=0,w=n.selectedLines.length;b<w;b++){let F=n.textLines[n.selectedLines[b]];p.push(...dr({x:F.x-a,y:F.y-(o-F.height)/2,width:i-s,height:F.height+(o-F.height)/2,borderWidth:0,color:n.selectedColor,borderColor:void 0,rotate:X(0),xSkew:X(0),ySkew:X(0)}))}let g=Ud(n.textLines,{color:n.textColor,font:n.font,size:n.fontSize,rotate:X(0),xSkew:X(0),ySkew:X(0)}),m=[Ed("Tx"),Ne(),...g,Re(),Ad()];return[Ne(),...f,...p,...u,...m,Re()]};var ko=class extends Error{constructor(){let t="Input document to `PDFDocument.load` is encrypted. You can use `PDFDocument.load(..., { ignoreEncryption: true })` if you wish to load the document anyways.";super(t)}},oc=class extends Error{constructor(){let t="Input to `PDFDocument.embedFont` was a custom font, but no `fontkit` instance was found. You must register a `fontkit` instance with `PDFDocument.registerFontkit(...)` before embedding custom fonts.";super(t)}},sc=class extends Error{constructor(){let t="A `page` passed to `PDFDocument.addPage` or `PDFDocument.insertPage` was from a different (foreign) PDF document. If you want to copy pages from one PDFDocument to another, you must use `PDFDocument.copyPages(...)` to copy the pages before adding or inserting them.";super(t)}},ac=class extends Error{constructor(){let t="PDFDocument has no pages so `PDFDocument.removePage` cannot be called";super(t)}},lc=class extends Error{constructor(t){let e=`PDFDocument has no form field with the name "${t}"`;super(e)}},Fi=class extends Error{constructor(t,e,i){var r,o;let s=e==null?void 0:e.name,a=(o=(r=i==null?void 0:i.constructor)===null||r===void 0?void 0:r.name)!==null&&o!==void 0?o:i,c=`Expected field "${t}" to be of type ${s}, but it is actually of type ${a}`;super(c)}},Kf=class extends Error{constructor(t){let e=`Failed to select check box due to missing onValue: "${t}"`;super(e)}},Ws=class extends Error{constructor(t){let e=`A field already exists with the specified name: "${t}"`;super(e)}},cc=class extends Error{constructor(t){let e=`Field name contains invalid component: "${t}"`;super(e)}},Gf=class extends Error{constructor(t){let e=`A non-terminal field already exists with the specified name: "${t}"`;super(e)}},dc=class extends Error{constructor(t){let e=`Reading rich text fields is not supported: Attempted to read rich text field: ${t}`;super(e)}},hc=class extends Error{constructor(t,e){let i=`Failed to layout combed text as lineLength=${t} is greater than cellCount=${e}`;super(i)}},uc=class extends Error{constructor(t,e,i){let r=`Attempted to set text with length=${t} for TextField with maxLength=${e} and name=${i}`;super(r)}},fc=class extends Error{constructor(t,e,i){let r=`Attempted to set maxLength=${e}, which is less than ${t}, the length of this field's current value (name=${i})`;super(r)}};var He;(function(n){n[n.Left=0]="Left",n[n.Center=1]="Center",n[n.Right=2]="Right"})(He||(He={}));var Ub=4,zb=500,qb=(n,t,e,i=!1)=>{let r=Ub;for(;r<zb;){let o=0;for(let l=0,d=n.length;l<d;l++){o+=1;let u=n[l].split(" "),f=e.width;for(let p=0,g=u.length;p<g;p++){let b=p===g-1?u[p]:u[p]+" ",w=t.widthOfTextAtSize(b,r);f-=w,f<=0&&(o+=1,f=e.width-w)}}if(!i&&o>n.length)return r-1;let s=t.heightAtSize(r);if((s+s*.2)*o>Math.abs(e.height))return r-1;r+=1}return r},EF=(n,t,e,i)=>{let r=e.width/i,o=e.height,s=Ub,a=tu(n);for(;s<zb;){for(let l=0,d=a.length;l<d;l++){let h=a[l];if(t.widthOfTextAtSize(h,s)>r*.75)return s-1}if(t.heightAtSize(s,{descender:!1})>o)return s-1;s+=1}return s},AF=n=>{for(let t=n.length;t>0;t--)if(/\s/.test(n[t]))return t},IF=(n,t,e,i)=>{var r;let o=n.length;for(;o>0;){let s=n.substring(0,o),a=e.encodeText(s),c=e.widthOfTextAtSize(s,i);if(c<t){let l=n.substring(o)||void 0;return{line:s,encoded:a,width:c,remainder:l}}o=(r=AF(s))!==null&&r!==void 0?r:0}return{line:n,encoded:e.encodeText(n),width:e.widthOfTextAtSize(n,i),remainder:void 0}},qd=(n,{alignment:t,fontSize:e,font:i,bounds:r})=>{let o=wa(zn(n));(e===void 0||e===0)&&(e=qb(o,i,r,!0));let s=i.heightAtSize(e),a=s+s*.2,c=[],l=r.x,d=r.y,h=r.x+r.width,u=r.y+r.height,f=r.y+r.height;for(let p=0,g=o.length;p<g;p++){let m=o[p];for(;m!==void 0;){let{line:b,encoded:w,width:F,remainder:v}=IF(m,r.width,i,e),P=t===He.Left?r.x:t===He.Center?r.x+r.width/2-F/2:t===He.Right?r.x+r.width-F:r.x;f-=a,P<l&&(l=P),f<d&&(d=f),P+F>h&&(h=P+F),f+s>u&&(u=f+s),c.push({text:b,encoded:w,width:F,height:s,x:P,y:f}),m=v==null?void 0:v.trim()}}return{fontSize:e,lineHeight:a,lines:c,bounds:{x:l,y:d,width:h-l,height:u-d}}},Xf=(n,{fontSize:t,font:e,bounds:i,cellCount:r})=>{let o=zc(zn(n));if(o.length>r)throw new hc(o.length,r);(t===void 0||t===0)&&(t=EF(o,e,i,r));let s=i.width/r,a=e.heightAtSize(t,{descender:!1}),c=i.y+(i.height/2-a/2),l=[],d=i.x,h=i.y,u=i.x+i.width,f=i.y+i.height,p=0,g=0;for(;p<r;){let[m,b]=qc(o,g),w=e.encodeText(m),F=e.widthOfTextAtSize(m,t),P=i.x+(s*p+s/2)-F/2;P<d&&(d=P),c<h&&(h=c),P+F>u&&(u=P+F),c+a>f&&(f=c+a),l.push({text:o,encoded:w,width:F,height:a,x:P,y:c}),p+=1,g+=b}return{fontSize:t,cells:l,bounds:{x:d,y:h,width:u-d,height:f-h}}},js=(n,{alignment:t,fontSize:e,font:i,bounds:r})=>{let o=zc(zn(n));(e===void 0||e===0)&&(e=qb([o],i,r));let s=i.encodeText(o),a=i.widthOfTextAtSize(o,e),c=i.heightAtSize(e,{descender:!1}),l=t===He.Left?r.x:t===He.Center?r.x+r.width/2-a/2:t===He.Right?r.x+r.width-a:r.x,d=r.y+(r.height/2-c/2);return{fontSize:e,line:{text:o,encoded:s,width:a,height:c,x:l,y:d},bounds:{x:l,y:d,width:a,height:c}}};var Rt=n=>"normal"in n?n:{normal:n},LF=/\/([^\0\t\n\f\r\ ]+)[\0\t\n\f\r\ ]+(\d*\.\d+|\d+)[\0\t\n\f\r\ ]+Tf/,hr=n=>{var t,e;let i=(t=n.getDefaultAppearance())!==null&&t!==void 0?t:"",r=(e=Go(i,LF).match)!==null&&e!==void 0?e:[],o=Number(r[2]);return isFinite(o)?o:void 0},OF=/(\d*\.\d+|\d+)[\0\t\n\f\r\ ]*(\d*\.\d+|\d+)?[\0\t\n\f\r\ ]*(\d*\.\d+|\d+)?[\0\t\n\f\r\ ]*(\d*\.\d+|\d+)?[\0\t\n\f\r\ ]+(g|rg|k)/,ni=n=>{var t;let e=(t=n.getDefaultAppearance())!==null&&t!==void 0?t:"",i=Go(e,OF).match,[,r,o,s,a,c]=i!=null?i:[];if(c==="g"&&r)return Nd(Number(r));if(c==="rg"&&r&&o&&s)return ne(Number(r),Number(o),Number(s));if(c==="k"&&r&&o&&s&&a)return Rd(Number(r),Number(o),Number(s),Number(a))},ri=(n,t,e,i=0)=>{var r;let o=[ti(t).toString(),Fo((r=e==null?void 0:e.name)!==null&&r!==void 0?r:"dummy__noop",i).toString()].join(`
`);n.setDefaultAppearance(o)},Zf=(n,t)=>{var e,i,r;let o=ni(t),s=ni(n.acroField),a=t.getRectangle(),c=t.getAppearanceCharacteristics(),l=t.getBorderStyle(),d=(e=l==null?void 0:l.getWidth())!==null&&e!==void 0?e:0,h=Qt(c==null?void 0:c.getRotation()),{width:u,height:f}=qi(a,h),p=ii({...a,rotation:h}),g=ne(0,0,0),m=(i=ht(c==null?void 0:c.getBorderColor()))!==null&&i!==void 0?i:g,b=ht(c==null?void 0:c.getBackgroundColor()),w=ht(c==null?void 0:c.getBackgroundColor(),.8),F=(r=o!=null?o:s)!==null&&r!==void 0?r:g;ri(o?t:n.acroField,F);let v={x:0+d/2,y:0+d/2,width:u-d,height:f-d,thickness:1.5,borderWidth:d,borderColor:m,markColor:F};return{normal:{on:[...p,...zs({...v,color:b,filled:!0})],off:[...p,...zs({...v,color:b,filled:!1})]},down:{on:[...p,...zs({...v,color:w,filled:!0})],off:[...p,...zs({...v,color:w,filled:!1})]}}},Yf=(n,t)=>{var e,i,r;let o=ni(t),s=ni(n.acroField),a=t.getRectangle(),c=t.getAppearanceCharacteristics(),l=t.getBorderStyle(),d=(e=l==null?void 0:l.getWidth())!==null&&e!==void 0?e:0,h=Qt(c==null?void 0:c.getRotation()),{width:u,height:f}=qi(a,h),p=ii({...a,rotation:h}),g=ne(0,0,0),m=(i=ht(c==null?void 0:c.getBorderColor()))!==null&&i!==void 0?i:g,b=ht(c==null?void 0:c.getBackgroundColor()),w=ht(c==null?void 0:c.getBackgroundColor(),.8),F=(r=o!=null?o:s)!==null&&r!==void 0?r:g;ri(o?t:n.acroField,F);let v={x:u/2,y:f/2,width:u-d,height:f-d,borderWidth:d,borderColor:m,dotColor:F};return{normal:{on:[...p,...qs({...v,color:b,filled:!0})],off:[...p,...qs({...v,color:b,filled:!1})]},down:{on:[...p,...qs({...v,color:w,filled:!0})],off:[...p,...qs({...v,color:w,filled:!1})]}}},Jf=(n,t,e)=>{var i,r,o,s,a;let c=ni(t),l=ni(n.acroField),d=hr(t),h=hr(n.acroField),u=t.getRectangle(),f=t.getAppearanceCharacteristics(),p=t.getBorderStyle(),g=f==null?void 0:f.getCaptions(),m=(i=g==null?void 0:g.normal)!==null&&i!==void 0?i:"",b=(o=(r=g==null?void 0:g.down)!==null&&r!==void 0?r:m)!==null&&o!==void 0?o:"",w=(s=p==null?void 0:p.getWidth())!==null&&s!==void 0?s:0,F=Qt(f==null?void 0:f.getRotation()),{width:v,height:P}=qi(u,F),k=ii({...u,rotation:F}),C=ne(0,0,0),D=ht(f==null?void 0:f.getBorderColor()),T=ht(f==null?void 0:f.getBackgroundColor()),O=ht(f==null?void 0:f.getBackgroundColor(),.8),E={x:w,y:w,width:v-w*2,height:P-w*2},V=js(m,{alignment:He.Center,fontSize:d!=null?d:h,font:e,bounds:E}),W=js(b,{alignment:He.Center,fontSize:d!=null?d:h,font:e,bounds:E}),B=Math.min(V.fontSize,W.fontSize),U=(a=c!=null?c:l)!==null&&a!==void 0?a:C;ri(c||d!==void 0?t:n.acroField,U,e,B);let te={x:0+w/2,y:0+w/2,width:v-w,height:P-w,borderWidth:w,borderColor:D,textColor:U,font:e.name,fontSize:B};return{normal:[...k,...Hd({...te,color:T,textLines:[V.line]})],down:[...k,...Hd({...te,color:O,textLines:[W.line]})]}},Qf=(n,t,e)=>{var i,r,o,s;let a=ni(t),c=ni(n.acroField),l=hr(t),d=hr(n.acroField),h=t.getRectangle(),u=t.getAppearanceCharacteristics(),f=t.getBorderStyle(),p=(i=n.getText())!==null&&i!==void 0?i:"",g=(r=f==null?void 0:f.getWidth())!==null&&r!==void 0?r:0,m=Qt(u==null?void 0:u.getRotation()),{width:b,height:w}=qi(h,m),F=ii({...h,rotation:m}),v=ne(0,0,0),P=ht(u==null?void 0:u.getBorderColor()),k=ht(u==null?void 0:u.getBackgroundColor()),C,D,T=n.isCombed()?0:1,O={x:g+T,y:g+T,width:b-(g+T)*2,height:w-(g+T)*2};if(n.isMultiline()){let W=qd(p,{alignment:n.getAlignment(),fontSize:l!=null?l:d,font:e,bounds:O});C=W.lines,D=W.fontSize}else if(n.isCombed()){let W=Xf(p,{fontSize:l!=null?l:d,font:e,bounds:O,cellCount:(o=n.getMaxLength())!==null&&o!==void 0?o:0});C=W.cells,D=W.fontSize}else{let W=js(p,{alignment:n.getAlignment(),fontSize:l!=null?l:d,font:e,bounds:O});C=[W.line],D=W.fontSize}let E=(s=a!=null?a:c)!==null&&s!==void 0?s:v;ri(a||l!==void 0?t:n.acroField,E,e,D);let V={x:0+g/2,y:0+g/2,width:b-g,height:w-g,borderWidth:g!=null?g:0,borderColor:P,textColor:E,font:e.name,fontSize:D,color:k,textLines:C,padding:T};return[...F,...zd(V)]},_f=(n,t,e)=>{var i,r,o;let s=ni(t),a=ni(n.acroField),c=hr(t),l=hr(n.acroField),d=t.getRectangle(),h=t.getAppearanceCharacteristics(),u=t.getBorderStyle(),f=(i=n.getSelected()[0])!==null&&i!==void 0?i:"",p=(r=u==null?void 0:u.getWidth())!==null&&r!==void 0?r:0,g=Qt(h==null?void 0:h.getRotation()),{width:m,height:b}=qi(d,g),w=ii({...d,rotation:g}),F=ne(0,0,0),v=ht(h==null?void 0:h.getBorderColor()),P=ht(h==null?void 0:h.getBackgroundColor()),k=1,C={x:p+k,y:p+k,width:m-(p+k)*2,height:b-(p+k)*2},{line:D,fontSize:T}=js(f,{alignment:He.Left,fontSize:c!=null?c:l,font:e,bounds:C}),O=(o=s!=null?s:a)!==null&&o!==void 0?o:F;ri(s||c!==void 0?t:n.acroField,O,e,T);let E={x:0+p/2,y:0+p/2,width:m-p,height:b-p,borderWidth:p!=null?p:0,borderColor:v,textColor:O,font:e.name,fontSize:T,color:P,textLines:[D],padding:k};return[...w,...zd(E)]},$f=(n,t,e)=>{var i,r;let o=ni(t),s=ni(n.acroField),a=hr(t),c=hr(n.acroField),l=t.getRectangle(),d=t.getAppearanceCharacteristics(),h=t.getBorderStyle(),u=(i=h==null?void 0:h.getWidth())!==null&&i!==void 0?i:0,f=Qt(d==null?void 0:d.getRotation()),{width:p,height:g}=qi(l,f),m=ii({...l,rotation:f}),b=ne(0,0,0),w=ht(d==null?void 0:d.getBorderColor()),F=ht(d==null?void 0:d.getBackgroundColor()),v=n.getOptions(),P=n.getSelected();n.isSorted()&&v.sort();let k="";for(let U=0,te=v.length;U<te;U++)k+=v[U],U<te-1&&(k+=`
`);let C=1,D={x:u+C,y:u+C,width:p-(u+C)*2,height:g-(u+C)*2},{lines:T,fontSize:O,lineHeight:E}=qd(k,{alignment:He.Left,fontSize:a!=null?a:c,font:e,bounds:D}),V=[];for(let U=0,te=T.length;U<te;U++){let z=T[U];P.includes(z.text)&&V.push(U)}let W=ne(153/255,193/255,218/255),B=(r=o!=null?o:s)!==null&&r!==void 0?r:b;return ri(o||a!==void 0?t:n.acroField,B,e,O),[...m,...jf({x:0+u/2,y:0+u/2,width:p-u,height:g-u,borderWidth:u!=null?u:0,borderColor:w,textColor:B,font:e.name,fontSize:O,color:F,textLines:T,lineHeight:E,selectedColor:W,selectedLines:V,padding:C})]};var Pi=class{constructor(t,e,i){this.alreadyEmbedded=!1,S(t,"ref",[[q,"PDFRef"]]),S(e,"doc",[[pe,"PDFDocument"]]),S(i,"embedder",[[vs,"PDFPageEmbedder"]]),this.ref=t,this.doc=e,this.width=i.width,this.height=i.height,this.embedder=i}scale(t){return S(t,"factor",["number"]),{width:this.width*t,height:this.height*t}}size(){return this.scale(1)}async embed(){this.alreadyEmbedded||(await this.embedder.embedIntoContext(this.doc.context,this.ref),this.alreadyEmbedded=!0)}};Pi.of=(n,t,e)=>new Pi(n,t,e);var Se=class{constructor(t,e,i){this.modified=!0,S(t,"ref",[[q,"PDFRef"]]),S(e,"doc",[[pe,"PDFDocument"]]),S(i,"embedder",[[ir,"CustomFontEmbedder"],[tr,"StandardFontEmbedder"]]),this.ref=t,this.doc=e,this.name=i.fontName,this.embedder=i}encodeText(t){return S(t,"text",["string"]),this.modified=!0,this.embedder.encodeText(t)}widthOfTextAtSize(t,e){return S(t,"text",["string"]),S(e,"size",["number"]),this.embedder.widthOfTextAtSize(t,e)}heightAtSize(t,e){var i;return S(t,"size",["number"]),I(e==null?void 0:e.descender,"options.descender",["boolean"]),this.embedder.heightOfFontAtSize(t,{descender:(i=e==null?void 0:e.descender)!==null&&i!==void 0?i:!0})}sizeAtHeight(t){return S(t,"height",["number"]),this.embedder.sizeOfFontAtHeight(t)}getCharacterSet(){return this.embedder instanceof tr?this.embedder.encoding.supportedCodePoints:this.embedder.font.characterSet}async embed(){this.modified&&(await this.embedder.embedIntoContext(this.doc.context,this.ref),this.modified=!1)}};Se.of=(n,t,e)=>new Se(n,t,e);var oi=class{constructor(t,e,i){S(t,"ref",[[q,"PDFRef"]]),S(e,"doc",[[pe,"PDFDocument"]]),S(i,"embedder",[[bs,"JpegEmbedder"],[ys,"PngEmbedder"]]),this.ref=t,this.doc=e,this.width=i.width,this.height=i.height,this.embedder=i}scale(t){return S(t,"factor",["number"]),{width:this.width*t,height:this.height*t}}scaleToFit(t,e){S(t,"width",["number"]),S(e,"height",["number"]);let i=t/this.width,r=e/this.height,o=Math.min(i,r);return this.scale(o)}size(){return this.scale(1)}async embed(){if(this.embedder){if(!this.embedTask){let{doc:t,ref:e}=this;this.embedTask=this.embedder.embedIntoContext(t.context,e)}await this.embedTask,this.embedder=void 0}}};oi.of=(n,t,e)=>new oi(n,t,e);var si;(function(n){n[n.Left=0]="Left",n[n.Center=1]="Center",n[n.Right=2]="Right"})(si||(si={}));var ai=n=>{I(n==null?void 0:n.x,"options.x",["number"]),I(n==null?void 0:n.y,"options.y",["number"]),I(n==null?void 0:n.width,"options.width",["number"]),I(n==null?void 0:n.height,"options.height",["number"]),I(n==null?void 0:n.textColor,"options.textColor",[[Object,"Color"]]),I(n==null?void 0:n.backgroundColor,"options.backgroundColor",[[Object,"Color"]]),I(n==null?void 0:n.borderColor,"options.borderColor",[[Object,"Color"]]),I(n==null?void 0:n.borderWidth,"options.borderWidth",["number"]),I(n==null?void 0:n.rotate,"options.rotate",[[Object,"Rotation"]])},$e=class{constructor(t,e,i){S(t,"acroField",[[Et,"PDFAcroTerminal"]]),S(e,"ref",[[q,"PDFRef"]]),S(i,"doc",[[pe,"PDFDocument"]]),this.acroField=t,this.ref=e,this.doc=i}getName(){var t;return(t=this.acroField.getFullyQualifiedName())!==null&&t!==void 0?t:""}isReadOnly(){return this.acroField.hasFlag(Ot.ReadOnly)}enableReadOnly(){this.acroField.setFlagTo(Ot.ReadOnly,!0)}disableReadOnly(){this.acroField.setFlagTo(Ot.ReadOnly,!1)}isRequired(){return this.acroField.hasFlag(Ot.Required)}enableRequired(){this.acroField.setFlagTo(Ot.Required,!0)}disableRequired(){this.acroField.setFlagTo(Ot.Required,!1)}isExported(){return!this.acroField.hasFlag(Ot.NoExport)}enableExporting(){this.acroField.setFlagTo(Ot.NoExport,!1)}disableExporting(){this.acroField.setFlagTo(Ot.NoExport,!0)}needsAppearancesUpdate(){throw new Ge(this.constructor.name,"needsAppearancesUpdate")}defaultUpdateAppearances(t){throw new Ge(this.constructor.name,"defaultUpdateAppearances")}markAsDirty(){this.doc.getForm().markFieldAsDirty(this.ref)}markAsClean(){this.doc.getForm().markFieldAsClean(this.ref)}isDirty(){return this.doc.getForm().fieldIsDirty(this.ref)}createWidget(t){var e;let i=t.textColor,r=t.backgroundColor,o=t.borderColor,s=t.borderWidth,a=jl(t.rotate),c=t.caption,l=t.x,d=t.y,h=t.width+s,u=t.height+s,f=Boolean(t.hidden),p=t.page;Xa(a,"degreesAngle",90);let g=oo.create(this.doc.context,this.ref),m=wf({x:l,y:d,width:h,height:u},s,a);g.setRectangle(m),p&&g.setP(p);let b=g.getOrCreateAppearanceCharacteristics();r&&b.setBackgroundColor(Vd(r)),b.setRotation(a),c&&b.setCaptions({normal:c}),o&&b.setBorderColor(Vd(o));let w=g.getOrCreateBorderStyle();if(s!==void 0&&w.setWidth(s),g.setFlagTo(xo.Print,!0),g.setFlagTo(xo.Hidden,f),g.setFlagTo(xo.Invisible,!1),i){let v=((e=this.acroField.getDefaultAppearance())!==null&&e!==void 0?e:"")+`
`+ti(i).toString();this.acroField.setDefaultAppearance(v)}return g}updateWidgetAppearanceWithFont(t,e,{normal:i,rollover:r,down:o}){this.updateWidgetAppearances(t,{normal:this.createAppearanceStream(t,i,e),rollover:r&&this.createAppearanceStream(t,r,e),down:o&&this.createAppearanceStream(t,o,e)})}updateOnOffWidgetAppearance(t,e,{normal:i,rollover:r,down:o}){this.updateWidgetAppearances(t,{normal:this.createAppearanceDict(t,i,e),rollover:r&&this.createAppearanceDict(t,r,e),down:o&&this.createAppearanceDict(t,o,e)})}updateWidgetAppearances(t,{normal:e,rollover:i,down:r}){t.setNormalAppearance(e),i?t.setRolloverAppearance(i):t.removeRolloverAppearance(),r?t.setDownAppearance(r):t.removeDownAppearance()}createAppearanceStream(t,e,i){let{context:r}=this.acroField.dict,{width:o,height:s}=t.getRectangle(),a=i&&{Font:{[i.name]:i.ref}},c=r.formXObject(e,{Resources:a,BBox:r.obj([0,0,o,s]),Matrix:r.obj([1,0,0,1,0,0])});return r.register(c)}createImageAppearanceStream(t,e,i){var r;let{context:o}=this.acroField.dict,s=t.getRectangle(),a=t.getAppearanceCharacteristics(),c=t.getBorderStyle(),l=(r=c==null?void 0:c.getWidth())!==null&&r!==void 0?r:0,d=Qt(a==null?void 0:a.getRotation()),h=ii({...s,rotation:d}),u=qi(s,d),f=e.scaleToFit(u.width-l*2,u.height-l*2),p={x:l,y:l,width:f.width,height:f.height,rotate:X(0),xSkew:X(0),ySkew:X(0)};i===si.Center?(p.x+=(u.width-l*2)/2-f.width/2,p.y+=(u.height-l*2)/2-f.height/2):i===si.Right&&(p.x=u.width-l-f.width,p.y=u.height-l-f.height);let g=this.doc.context.addRandomSuffix("Image",10),m=[...h,...rc(g,p)],b={XObject:{[g]:e.ref}},w=o.formXObject(m,{Resources:b,BBox:o.obj([0,0,s.width,s.height]),Matrix:o.obj([1,0,0,1,0,0])});return o.register(w)}createAppearanceDict(t,e,i){let{context:r}=this.acroField.dict,o=this.createAppearanceStream(t,e.on),s=this.createAppearanceStream(t,e.off),a=r.obj({});return a.set(i,o),a.set(x.of("Off"),s),a}};var Vt=class extends $e{constructor(t,e,i){super(t,e,i),S(t,"acroCheckBox",[[bn,"PDFAcroCheckBox"]]),this.acroField=t}check(){var t;let e=(t=this.acroField.getOnValue())!==null&&t!==void 0?t:x.of("Yes");this.markAsDirty(),this.acroField.setValue(e)}uncheck(){this.markAsDirty(),this.acroField.setValue(x.of("Off"))}isChecked(){let t=this.acroField.getOnValue();return!!t&&t===this.acroField.getValue()}addToPage(t,e){var i,r,o,s,a,c;S(t,"page",[[Pe,"PDFPage"]]),ai(e),e||(e={}),"textColor"in e||(e.textColor=ne(0,0,0)),"backgroundColor"in e||(e.backgroundColor=ne(1,1,1)),"borderColor"in e||(e.borderColor=ne(0,0,0)),"borderWidth"in e||(e.borderWidth=1);let l=this.createWidget({x:(i=e.x)!==null&&i!==void 0?i:0,y:(r=e.y)!==null&&r!==void 0?r:0,width:(o=e.width)!==null&&o!==void 0?o:50,height:(s=e.height)!==null&&s!==void 0?s:50,textColor:e.textColor,backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:(a=e.borderWidth)!==null&&a!==void 0?a:0,rotate:(c=e.rotate)!==null&&c!==void 0?c:X(0),hidden:e.hidden,page:t.ref}),d=this.doc.context.register(l.dict);this.acroField.addWidget(d),l.setAppearanceState(x.of("Off")),this.updateWidgetAppearance(l,x.of("Yes")),t.node.addAnnot(d)}needsAppearancesUpdate(){var t;let e=this.acroField.getWidgets();for(let i=0,r=e.length;i<r;i++){let o=e[i],s=o.getAppearanceState(),a=(t=o.getAppearances())===null||t===void 0?void 0:t.normal;if(!(a instanceof R)||s&&!a.has(s))return!0}return!1}defaultUpdateAppearances(){this.updateAppearances()}updateAppearances(t){var e;I(t,"provider",[Function]);let i=this.acroField.getWidgets();for(let r=0,o=i.length;r<o;r++){let s=i[r],a=(e=s.getOnValue())!==null&&e!==void 0?e:x.of("Yes");a&&this.updateWidgetAppearance(s,a,t)}this.markAsClean()}updateWidgetAppearance(t,e,i){let r=i!=null?i:Zf,o=Rt(r(this,t));this.updateOnOffWidgetAppearance(t,e,o)}};Vt.of=(n,t,e)=>new Vt(n,t,e);var li=class extends $e{constructor(t,e,i){super(t,e,i),S(t,"acroComboBox",[[xn,"PDFAcroComboBox"]]),this.acroField=t}getOptions(){let t=this.acroField.getOptions(),e=new Array(t.length);for(let i=0,r=e.length;i<r;i++){let{display:o,value:s}=t[i];e[i]=(o!=null?o:s).decodeText()}return e}getSelected(){let t=this.acroField.getValues(),e=new Array(t.length);for(let i=0,r=t.length;i<r;i++)e[i]=t[i].decodeText();return e}setOptions(t){S(t,"options",[Array]);let e=new Array(t.length);for(let i=0,r=t.length;i<r;i++)e[i]={value:M.fromText(t[i])};this.acroField.setOptions(e)}addOptions(t){S(t,"options",["string",Array]);let e=Array.isArray(t)?t:[t],i=this.acroField.getOptions(),r=new Array(e.length);for(let o=0,s=e.length;o<s;o++)r[o]={value:M.fromText(e[o])};this.acroField.setOptions(i.concat(r))}select(t,e=!1){S(t,"options",["string",Array]),S(e,"merge",["boolean"]);let i=Array.isArray(t)?t:[t],r=this.getOptions();i.find(a=>!r.includes(a))&&this.enableEditing(),this.markAsDirty(),(i.length>1||i.length===1&&e)&&this.enableMultiselect();let s=new Array(i.length);for(let a=0,c=i.length;a<c;a++)s[a]=M.fromText(i[a]);if(e){let a=this.acroField.getValues();this.acroField.setValues(a.concat(s))}else this.acroField.setValues(s)}clear(){this.markAsDirty(),this.acroField.setValues([])}setFontSize(t){ln(t,"fontSize"),this.acroField.setFontSize(t),this.markAsDirty()}isEditable(){return this.acroField.hasFlag(oe.Edit)}enableEditing(){this.acroField.setFlagTo(oe.Edit,!0)}disableEditing(){this.acroField.setFlagTo(oe.Edit,!1)}isSorted(){return this.acroField.hasFlag(oe.Sort)}enableSorting(){this.acroField.setFlagTo(oe.Sort,!0)}disableSorting(){this.acroField.setFlagTo(oe.Sort,!1)}isMultiselect(){return this.acroField.hasFlag(oe.MultiSelect)}enableMultiselect(){this.acroField.setFlagTo(oe.MultiSelect,!0)}disableMultiselect(){this.acroField.setFlagTo(oe.MultiSelect,!1)}isSpellChecked(){return!this.acroField.hasFlag(oe.DoNotSpellCheck)}enableSpellChecking(){this.acroField.setFlagTo(oe.DoNotSpellCheck,!1)}disableSpellChecking(){this.acroField.setFlagTo(oe.DoNotSpellCheck,!0)}isSelectOnClick(){return this.acroField.hasFlag(oe.CommitOnSelChange)}enableSelectOnClick(){this.acroField.setFlagTo(oe.CommitOnSelChange,!0)}disableSelectOnClick(){this.acroField.setFlagTo(oe.CommitOnSelChange,!1)}addToPage(t,e){var i,r,o,s,a,c,l;S(t,"page",[[Pe,"PDFPage"]]),ai(e),e||(e={}),"textColor"in e||(e.textColor=ne(0,0,0)),"backgroundColor"in e||(e.backgroundColor=ne(1,1,1)),"borderColor"in e||(e.borderColor=ne(0,0,0)),"borderWidth"in e||(e.borderWidth=1);let d=this.createWidget({x:(i=e.x)!==null&&i!==void 0?i:0,y:(r=e.y)!==null&&r!==void 0?r:0,width:(o=e.width)!==null&&o!==void 0?o:200,height:(s=e.height)!==null&&s!==void 0?s:50,textColor:e.textColor,backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:(a=e.borderWidth)!==null&&a!==void 0?a:0,rotate:(c=e.rotate)!==null&&c!==void 0?c:X(0),hidden:e.hidden,page:t.ref}),h=this.doc.context.register(d.dict);this.acroField.addWidget(h);let u=(l=e.font)!==null&&l!==void 0?l:this.doc.getForm().getDefaultFont();this.updateWidgetAppearance(d,u),t.node.addAnnot(h)}needsAppearancesUpdate(){var t;if(this.isDirty())return!0;let e=this.acroField.getWidgets();for(let i=0,r=e.length;i<r;i++)if(!(((t=e[i].getAppearances())===null||t===void 0?void 0:t.normal)instanceof Fe))return!0;return!1}defaultUpdateAppearances(t){S(t,"font",[[Se,"PDFFont"]]),this.updateAppearances(t)}updateAppearances(t,e){S(t,"font",[[Se,"PDFFont"]]),I(e,"provider",[Function]);let i=this.acroField.getWidgets();for(let r=0,o=i.length;r<o;r++){let s=i[r];this.updateWidgetAppearance(s,t,e)}this.markAsClean()}updateWidgetAppearance(t,e,i){let r=i!=null?i:_f,o=Rt(r(this,t,e));this.updateWidgetAppearanceWithFont(t,e,o)}};li.of=(n,t,e)=>new li(n,t,e);var ci=class extends $e{constructor(t,e,i){super(t,e,i),S(t,"acroListBox",[[Pn,"PDFAcroListBox"]]),this.acroField=t}getOptions(){let t=this.acroField.getOptions(),e=new Array(t.length);for(let i=0,r=e.length;i<r;i++){let{display:o,value:s}=t[i];e[i]=(o!=null?o:s).decodeText()}return e}getSelected(){let t=this.acroField.getValues(),e=new Array(t.length);for(let i=0,r=t.length;i<r;i++)e[i]=t[i].decodeText();return e}setOptions(t){S(t,"options",[Array]),this.markAsDirty();let e=new Array(t.length);for(let i=0,r=t.length;i<r;i++)e[i]={value:M.fromText(t[i])};this.acroField.setOptions(e)}addOptions(t){S(t,"options",["string",Array]),this.markAsDirty();let e=Array.isArray(t)?t:[t],i=this.acroField.getOptions(),r=new Array(e.length);for(let o=0,s=e.length;o<s;o++)r[o]={value:M.fromText(e[o])};this.acroField.setOptions(i.concat(r))}select(t,e=!1){S(t,"options",["string",Array]),S(e,"merge",["boolean"]);let i=Array.isArray(t)?t:[t],r=this.getOptions();Qu(i,"option",r),this.markAsDirty(),(i.length>1||i.length===1&&e)&&this.enableMultiselect();let o=new Array(i.length);for(let s=0,a=i.length;s<a;s++)o[s]=M.fromText(i[s]);if(e){let s=this.acroField.getValues();this.acroField.setValues(s.concat(o))}else this.acroField.setValues(o)}clear(){this.markAsDirty(),this.acroField.setValues([])}setFontSize(t){ln(t,"fontSize"),this.acroField.setFontSize(t),this.markAsDirty()}isSorted(){return this.acroField.hasFlag(oe.Sort)}enableSorting(){this.acroField.setFlagTo(oe.Sort,!0)}disableSorting(){this.acroField.setFlagTo(oe.Sort,!1)}isMultiselect(){return this.acroField.hasFlag(oe.MultiSelect)}enableMultiselect(){this.acroField.setFlagTo(oe.MultiSelect,!0)}disableMultiselect(){this.acroField.setFlagTo(oe.MultiSelect,!1)}isSelectOnClick(){return this.acroField.hasFlag(oe.CommitOnSelChange)}enableSelectOnClick(){this.acroField.setFlagTo(oe.CommitOnSelChange,!0)}disableSelectOnClick(){this.acroField.setFlagTo(oe.CommitOnSelChange,!1)}addToPage(t,e){var i,r,o,s,a,c,l;S(t,"page",[[Pe,"PDFPage"]]),ai(e),e||(e={}),"textColor"in e||(e.textColor=ne(0,0,0)),"backgroundColor"in e||(e.backgroundColor=ne(1,1,1)),"borderColor"in e||(e.borderColor=ne(0,0,0)),"borderWidth"in e||(e.borderWidth=1);let d=this.createWidget({x:(i=e.x)!==null&&i!==void 0?i:0,y:(r=e.y)!==null&&r!==void 0?r:0,width:(o=e.width)!==null&&o!==void 0?o:200,height:(s=e.height)!==null&&s!==void 0?s:100,textColor:e.textColor,backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:(a=e.borderWidth)!==null&&a!==void 0?a:0,rotate:(c=e.rotate)!==null&&c!==void 0?c:X(0),hidden:e.hidden,page:t.ref}),h=this.doc.context.register(d.dict);this.acroField.addWidget(h);let u=(l=e.font)!==null&&l!==void 0?l:this.doc.getForm().getDefaultFont();this.updateWidgetAppearance(d,u),t.node.addAnnot(h)}needsAppearancesUpdate(){var t;if(this.isDirty())return!0;let e=this.acroField.getWidgets();for(let i=0,r=e.length;i<r;i++)if(!(((t=e[i].getAppearances())===null||t===void 0?void 0:t.normal)instanceof Fe))return!0;return!1}defaultUpdateAppearances(t){S(t,"font",[[Se,"PDFFont"]]),this.updateAppearances(t)}updateAppearances(t,e){S(t,"font",[[Se,"PDFFont"]]),I(e,"provider",[Function]);let i=this.acroField.getWidgets();for(let r=0,o=i.length;r<o;r++){let s=i[r];this.updateWidgetAppearance(s,t,e)}this.markAsClean()}updateWidgetAppearance(t,e,i){let r=i!=null?i:$f,o=Rt(r(this,t,e));this.updateWidgetAppearanceWithFont(t,e,o)}};ci.of=(n,t,e)=>new ci(n,t,e);var Bt=class extends $e{constructor(t,e,i){super(t,e,i),S(t,"acroRadioButton",[[Fn,"PDFAcroRadioButton"]]),this.acroField=t}getOptions(){let t=this.acroField.getExportValues();if(t){let r=new Array(t.length);for(let o=0,s=t.length;o<s;o++)r[o]=t[o].decodeText();return r}let e=this.acroField.getOnValues(),i=new Array(e.length);for(let r=0,o=i.length;r<o;r++)i[r]=e[r].decodeText();return i}getSelected(){let t=this.acroField.getValue();if(t===x.of("Off"))return;let e=this.acroField.getExportValues();if(e){let i=this.acroField.getOnValues();for(let r=0,o=i.length;r<o;r++)if(i[r]===t)return e[r].decodeText()}return t.decodeText()}select(t){S(t,"option",["string"]);let e=this.getOptions();Xt(t,"option",e),this.markAsDirty();let i=this.acroField.getOnValues(),r=this.acroField.getExportValues();if(r)for(let o=0,s=r.length;o<s;o++)r[o].decodeText()===t&&this.acroField.setValue(i[o]);else for(let o=0,s=i.length;o<s;o++){let a=i[o];a.decodeText()===t&&this.acroField.setValue(a)}}clear(){this.markAsDirty(),this.acroField.setValue(x.of("Off"))}isOffToggleable(){return!this.acroField.hasFlag(dt.NoToggleToOff)}enableOffToggling(){this.acroField.setFlagTo(dt.NoToggleToOff,!1)}disableOffToggling(){this.acroField.setFlagTo(dt.NoToggleToOff,!0)}isMutuallyExclusive(){return!this.acroField.hasFlag(dt.RadiosInUnison)}enableMutualExclusion(){this.acroField.setFlagTo(dt.RadiosInUnison,!1)}disableMutualExclusion(){this.acroField.setFlagTo(dt.RadiosInUnison,!0)}addOptionToPage(t,e,i){var r,o,s,a,c,l,d,h,u;S(t,"option",["string"]),S(e,"page",[[Pe,"PDFPage"]]),ai(i);let f=this.createWidget({x:(r=i==null?void 0:i.x)!==null&&r!==void 0?r:0,y:(o=i==null?void 0:i.y)!==null&&o!==void 0?o:0,width:(s=i==null?void 0:i.width)!==null&&s!==void 0?s:50,height:(a=i==null?void 0:i.height)!==null&&a!==void 0?a:50,textColor:(c=i==null?void 0:i.textColor)!==null&&c!==void 0?c:ne(0,0,0),backgroundColor:(l=i==null?void 0:i.backgroundColor)!==null&&l!==void 0?l:ne(1,1,1),borderColor:(d=i==null?void 0:i.borderColor)!==null&&d!==void 0?d:ne(0,0,0),borderWidth:(h=i==null?void 0:i.borderWidth)!==null&&h!==void 0?h:1,rotate:(u=i==null?void 0:i.rotate)!==null&&u!==void 0?u:X(0),hidden:i==null?void 0:i.hidden,page:e.ref}),p=this.doc.context.register(f.dict),g=this.acroField.addWidgetWithOpt(p,M.fromText(t),!this.isMutuallyExclusive());f.setAppearanceState(x.of("Off")),this.updateWidgetAppearance(f,g),e.node.addAnnot(p)}needsAppearancesUpdate(){var t;let e=this.acroField.getWidgets();for(let i=0,r=e.length;i<r;i++){let o=e[i],s=o.getAppearanceState(),a=(t=o.getAppearances())===null||t===void 0?void 0:t.normal;if(!(a instanceof R)||s&&!a.has(s))return!0}return!1}defaultUpdateAppearances(){this.updateAppearances()}updateAppearances(t){I(t,"provider",[Function]);let e=this.acroField.getWidgets();for(let i=0,r=e.length;i<r;i++){let o=e[i],s=o.getOnValue();s&&this.updateWidgetAppearance(o,s,t)}}updateWidgetAppearance(t,e,i){let r=i!=null?i:Yf,o=Rt(r(this,t));this.updateOnOffWidgetAppearance(t,e,o)}};Bt.of=(n,t,e)=>new Bt(n,t,e);var ki=class extends $e{constructor(t,e,i){super(t,e,i),S(t,"acroSignature",[[rr,"PDFAcroSignature"]]),this.acroField=t}needsAppearancesUpdate(){return!1}};ki.of=(n,t,e)=>new ki(n,t,e);var di=class extends $e{constructor(t,e,i){super(t,e,i),S(t,"acroText",[[wn,"PDFAcroText"]]),this.acroField=t}getText(){let t=this.acroField.getValue();if(!t&&this.isRichFormatted())throw new dc(this.getName());return t==null?void 0:t.decodeText()}setText(t){I(t,"text",["string"]);let e=this.getMaxLength();if(e!==void 0&&t&&t.length>e)throw new uc(t.length,e,this.getName());this.markAsDirty(),this.disableRichFormatting(),t?this.acroField.setValue(M.fromText(t)):this.acroField.removeValue()}getAlignment(){let t=this.acroField.getQuadding();return t===0?He.Left:t===1?He.Center:t===2?He.Right:He.Left}setAlignment(t){Xt(t,"alignment",He),this.markAsDirty(),this.acroField.setQuadding(t)}getMaxLength(){return this.acroField.getMaxLength()}setMaxLength(t){if(Ct(t,"maxLength",0,Number.MAX_SAFE_INTEGER),this.markAsDirty(),t===void 0)this.acroField.removeMaxLength();else{let e=this.getText();if(e&&e.length>t)throw new fc(e.length,t,this.getName());this.acroField.setMaxLength(t)}}removeMaxLength(){this.markAsDirty(),this.acroField.removeMaxLength()}setImage(t){let e=this.getAlignment(),i=e===He.Center?si.Center:e===He.Right?si.Right:si.Left,r=this.acroField.getWidgets();for(let o=0,s=r.length;o<s;o++){let a=r[o],c=this.createImageAppearanceStream(a,t,i);this.updateWidgetAppearances(a,{normal:c})}this.markAsClean()}setFontSize(t){ln(t,"fontSize"),this.acroField.setFontSize(t),this.markAsDirty()}isMultiline(){return this.acroField.hasFlag(Ie.Multiline)}enableMultiline(){this.markAsDirty(),this.acroField.setFlagTo(Ie.Multiline,!0)}disableMultiline(){this.markAsDirty(),this.acroField.setFlagTo(Ie.Multiline,!1)}isPassword(){return this.acroField.hasFlag(Ie.Password)}enablePassword(){this.acroField.setFlagTo(Ie.Password,!0)}disablePassword(){this.acroField.setFlagTo(Ie.Password,!1)}isFileSelector(){return this.acroField.hasFlag(Ie.FileSelect)}enableFileSelection(){this.acroField.setFlagTo(Ie.FileSelect,!0)}disableFileSelection(){this.acroField.setFlagTo(Ie.FileSelect,!1)}isSpellChecked(){return!this.acroField.hasFlag(Ie.DoNotSpellCheck)}enableSpellChecking(){this.acroField.setFlagTo(Ie.DoNotSpellCheck,!1)}disableSpellChecking(){this.acroField.setFlagTo(Ie.DoNotSpellCheck,!0)}isScrollable(){return!this.acroField.hasFlag(Ie.DoNotScroll)}enableScrolling(){this.acroField.setFlagTo(Ie.DoNotScroll,!1)}disableScrolling(){this.acroField.setFlagTo(Ie.DoNotScroll,!0)}isCombed(){return this.acroField.hasFlag(Ie.Comb)&&!this.isMultiline()&&!this.isPassword()&&!this.isFileSelector()&&this.getMaxLength()!==void 0}enableCombing(){this.getMaxLength()===void 0&&console.warn("PDFTextFields must have a max length in order to be combed"),this.markAsDirty(),this.disableMultiline(),this.disablePassword(),this.disableFileSelection(),this.acroField.setFlagTo(Ie.Comb,!0)}disableCombing(){this.markAsDirty(),this.acroField.setFlagTo(Ie.Comb,!1)}isRichFormatted(){return this.acroField.hasFlag(Ie.RichText)}enableRichFormatting(){this.acroField.setFlagTo(Ie.RichText,!0)}disableRichFormatting(){this.acroField.setFlagTo(Ie.RichText,!1)}addToPage(t,e){var i,r,o,s,a,c,l;S(t,"page",[[Pe,"PDFPage"]]),ai(e),e||(e={}),"textColor"in e||(e.textColor=ne(0,0,0)),"backgroundColor"in e||(e.backgroundColor=ne(1,1,1)),"borderColor"in e||(e.borderColor=ne(0,0,0)),"borderWidth"in e||(e.borderWidth=1);let d=this.createWidget({x:(i=e.x)!==null&&i!==void 0?i:0,y:(r=e.y)!==null&&r!==void 0?r:0,width:(o=e.width)!==null&&o!==void 0?o:200,height:(s=e.height)!==null&&s!==void 0?s:50,textColor:e.textColor,backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:(a=e.borderWidth)!==null&&a!==void 0?a:0,rotate:(c=e.rotate)!==null&&c!==void 0?c:X(0),hidden:e.hidden,page:t.ref}),h=this.doc.context.register(d.dict);this.acroField.addWidget(h);let u=(l=e.font)!==null&&l!==void 0?l:this.doc.getForm().getDefaultFont();this.updateWidgetAppearance(d,u),t.node.addAnnot(h)}needsAppearancesUpdate(){var t;if(this.isDirty())return!0;let e=this.acroField.getWidgets();for(let i=0,r=e.length;i<r;i++)if(!(((t=e[i].getAppearances())===null||t===void 0?void 0:t.normal)instanceof Fe))return!0;return!1}defaultUpdateAppearances(t){S(t,"font",[[Se,"PDFFont"]]),this.updateAppearances(t)}updateAppearances(t,e){S(t,"font",[[Se,"PDFFont"]]),I(e,"provider",[Function]);let i=this.acroField.getWidgets();for(let r=0,o=i.length;r<o;r++){let s=i[r];this.updateWidgetAppearance(s,t,e)}this.markAsClean()}updateWidgetAppearance(t,e,i){let r=i!=null?i:Qf,o=Rt(r(this,t,e));this.updateWidgetAppearanceWithFont(t,e,o)}};di.of=(n,t,e)=>new di(n,t,e);var Do;(function(n){n.Courier="Courier",n.CourierBold="Courier-Bold",n.CourierOblique="Courier-Oblique",n.CourierBoldOblique="Courier-BoldOblique",n.Helvetica="Helvetica",n.HelveticaBold="Helvetica-Bold",n.HelveticaOblique="Helvetica-Oblique",n.HelveticaBoldOblique="Helvetica-BoldOblique",n.TimesRoman="Times-Roman",n.TimesRomanBold="Times-Bold",n.TimesRomanItalic="Times-Italic",n.TimesRomanBoldItalic="Times-BoldItalic",n.Symbol="Symbol",n.ZapfDingbats="ZapfDingbats"})(Do||(Do={}));var Sn=class{constructor(t,e){this.embedDefaultFont=()=>this.doc.embedStandardFont(Do.Helvetica),S(t,"acroForm",[[or,"PDFAcroForm"]]),S(e,"doc",[[pe,"PDFDocument"]]),this.acroForm=t,this.doc=e,this.dirtyFields=new Set,this.defaultFontCache=ct.populatedBy(this.embedDefaultFont)}hasXFA(){return this.acroForm.dict.has(x.of("XFA"))}deleteXFA(){this.acroForm.dict.delete(x.of("XFA"))}getFields(){let t=this.acroForm.getAllFields(),e=[];for(let i=0,r=t.length;i<r;i++){let[o,s]=t[i],a=MF(o,s,this.doc);a&&e.push(a)}return e}getFieldMaybe(t){S(t,"name",["string"]);let e=this.getFields();for(let i=0,r=e.length;i<r;i++){let o=e[i];if(o.getName()===t)return o}}getField(t){S(t,"name",["string"]);let e=this.getFieldMaybe(t);if(e)return e;throw new lc(t)}getButton(t){S(t,"name",["string"]);let e=this.getField(t);if(e instanceof hi)return e;throw new Fi(t,hi,e)}getCheckBox(t){S(t,"name",["string"]);let e=this.getField(t);if(e instanceof Vt)return e;throw new Fi(t,Vt,e)}getDropdown(t){S(t,"name",["string"]);let e=this.getField(t);if(e instanceof li)return e;throw new Fi(t,li,e)}getOptionList(t){S(t,"name",["string"]);let e=this.getField(t);if(e instanceof ci)return e;throw new Fi(t,ci,e)}getRadioGroup(t){S(t,"name",["string"]);let e=this.getField(t);if(e instanceof Bt)return e;throw new Fi(t,Bt,e)}getSignature(t){S(t,"name",["string"]);let e=this.getField(t);if(e instanceof ki)return e;throw new Fi(t,ki,e)}getTextField(t){S(t,"name",["string"]);let e=this.getField(t);if(e instanceof di)return e;throw new Fi(t,di,e)}createButton(t){S(t,"name",["string"]);let e=Ks(t),i=this.findOrCreateNonTerminals(e.nonTerminal),r=vn.create(this.doc.context);return r.setPartialName(e.terminal),Gs(i,[r,r.ref],e.terminal),hi.of(r,r.ref,this.doc)}createCheckBox(t){S(t,"name",["string"]);let e=Ks(t),i=this.findOrCreateNonTerminals(e.nonTerminal),r=bn.create(this.doc.context);return r.setPartialName(e.terminal),Gs(i,[r,r.ref],e.terminal),Vt.of(r,r.ref,this.doc)}createDropdown(t){S(t,"name",["string"]);let e=Ks(t),i=this.findOrCreateNonTerminals(e.nonTerminal),r=xn.create(this.doc.context);return r.setPartialName(e.terminal),Gs(i,[r,r.ref],e.terminal),li.of(r,r.ref,this.doc)}createOptionList(t){S(t,"name",["string"]);let e=Ks(t),i=this.findOrCreateNonTerminals(e.nonTerminal),r=Pn.create(this.doc.context);return r.setPartialName(e.terminal),Gs(i,[r,r.ref],e.terminal),ci.of(r,r.ref,this.doc)}createRadioGroup(t){S(t,"name",["string"]);let e=Ks(t),i=this.findOrCreateNonTerminals(e.nonTerminal),r=Fn.create(this.doc.context);return r.setPartialName(e.terminal),Gs(i,[r,r.ref],e.terminal),Bt.of(r,r.ref,this.doc)}createTextField(t){S(t,"name",["string"]);let e=Ks(t),i=this.findOrCreateNonTerminals(e.nonTerminal),r=wn.create(this.doc.context);return r.setPartialName(e.terminal),Gs(i,[r,r.ref],e.terminal),di.of(r,r.ref,this.doc)}flatten(t={updateFieldAppearances:!0}){t.updateFieldAppearances&&this.updateFieldAppearances();let e=this.getFields();for(let i=0,r=e.length;i<r;i++){let o=e[i],s=o.acroField.getWidgets();for(let a=0,c=s.length;a<c;a++)try{let l=s[a],d=this.findWidgetPage(l),h=this.findWidgetAppearanceRef(o,l),u=d.node.newXObject("FlatWidget",h),f=l.getRectangle(),p=[Ne(),mt(f.x,f.y),...ii({...f,rotation:0}),Vs(u),Re()].filter(Boolean);d.pushOperators(...p)}catch(l){console.error(l)}this.removeField(o)}}removeField(t){let e=t.acroField.getWidgets(),i=new Set;for(let s=0,a=e.length;s<a;s++)try{let c=e[s],l=this.findWidgetAppearanceRef(t,c),d=this.findWidgetPage(c);i.add(d),d.node.removeAnnot(l)}catch(c){console.error(c)}i.forEach(s=>s.node.removeAnnot(t.ref)),this.acroForm.removeField(t.acroField);let r=t.acroField.normalizedEntries().Kids,o=r.size();for(let s=0;s<o;s++){let a=r.get(s);a instanceof q&&this.doc.context.delete(a)}this.doc.context.delete(t.ref)}updateFieldAppearances(t){I(t,"font",[[Se,"PDFFont"]]),t=t!=null?t:this.getDefaultFont();let e=this.getFields();for(let i=0,r=e.length;i<r;i++){let o=e[i];o.needsAppearancesUpdate()&&o.defaultUpdateAppearances(t)}}markFieldAsDirty(t){I(t,"fieldRef",[[q,"PDFRef"]]),this.dirtyFields.add(t)}markFieldAsClean(t){I(t,"fieldRef",[[q,"PDFRef"]]),this.dirtyFields.delete(t)}fieldIsDirty(t){return I(t,"fieldRef",[[q,"PDFRef"]]),this.dirtyFields.has(t)}getDefaultFont(){return this.defaultFontCache.access()}findWidgetPage(t){let e=t.P(),i=this.doc.getPages().find(r=>r.ref===e);if(i===void 0){let r=this.doc.context.getObjectRef(t.dict);if(r===void 0)throw new Error("Could not find PDFRef for PDFObject");if(i=this.doc.findPageForAnnotationRef(r),i===void 0)throw new Error(`Could not find page for PDFRef ${r}`)}return i}findWidgetAppearanceRef(t,e){var i;let r=e.getNormalAppearance();if(r instanceof R&&(t instanceof Vt||t instanceof Bt)){let o=t.acroField.getValue(),s=(i=r.get(o))!==null&&i!==void 0?i:r.get(x.of("Off"));s instanceof q&&(r=s)}if(!(r instanceof q)){let o=t.getName();throw new Error(`Failed to extract appearance ref for: ${o}`)}return r}findOrCreateNonTerminals(t){let e=[this.acroForm];for(let i=0,r=t.length;i<r;i++){let o=t[i];if(!o)throw new cc(o);let[s,a]=e,c=this.findNonTerminal(o,s);if(c)e=c;else{let l=yn.create(this.doc.context);l.setPartialName(o),l.setParent(a);let d=this.doc.context.register(l.dict);s.addField(d),e=[l,d]}}return e}findNonTerminal(t,e){let i=e instanceof or?this.acroForm.getFields():Ss(e.Kids());for(let r=0,o=i.length;r<o;r++){let[s,a]=i[r];if(s.getPartialName()===t){if(s instanceof yn)return[s,a];throw new Ws(t)}}}};Sn.of=(n,t)=>new Sn(n,t);var MF=(n,t,e)=>{if(n instanceof vn)return hi.of(n,t,e);if(n instanceof bn)return Vt.of(n,t,e);if(n instanceof xn)return li.of(n,t,e);if(n instanceof Pn)return ci.of(n,t,e);if(n instanceof wn)return di.of(n,t,e);if(n instanceof Fn)return Bt.of(n,t,e);if(n instanceof rr)return ki.of(n,t,e)},Ks=n=>{if(n.length===0)throw new Error("PDF field names must not be empty strings");let t=n.split(".");for(let e=0,i=t.length;e<i;e++)if(t[e]==="")throw new Error(`Periods in PDF field names must be separated by at least one character: "${n}"`);return t.length===1?{nonTerminal:[],terminal:t[0]}:{nonTerminal:t.slice(0,t.length-1),terminal:t[t.length-1]}},Gs=([n,t],[e,i],r)=>{let o=n.normalizedEntries(),s=Ss("Kids"in o?o.Kids:o.Fields);for(let a=0,c=s.length;a<c;a++)if(s[a][0].getPartialName()===r)throw new Ws(r);n.addField(i),e.setParent(t)};var So={"4A0":[4767.87,6740.79],"2A0":[3370.39,4767.87],A0:[2383.94,3370.39],A1:[1683.78,2383.94],A2:[1190.55,1683.78],A3:[841.89,1190.55],A4:[595.28,841.89],A5:[419.53,595.28],A6:[297.64,419.53],A7:[209.76,297.64],A8:[147.4,209.76],A9:[104.88,147.4],A10:[73.7,104.88],B0:[2834.65,4008.19],B1:[2004.09,2834.65],B2:[1417.32,2004.09],B3:[1000.63,1417.32],B4:[708.66,1000.63],B5:[498.9,708.66],B6:[354.33,498.9],B7:[249.45,354.33],B8:[175.75,249.45],B9:[124.72,175.75],B10:[87.87,124.72],C0:[2599.37,3676.54],C1:[1836.85,2599.37],C2:[1298.27,1836.85],C3:[918.43,1298.27],C4:[649.13,918.43],C5:[459.21,649.13],C6:[323.15,459.21],C7:[229.61,323.15],C8:[161.57,229.61],C9:[113.39,161.57],C10:[79.37,113.39],RA0:[2437.8,3458.27],RA1:[1729.13,2437.8],RA2:[1218.9,1729.13],RA3:[864.57,1218.9],RA4:[609.45,864.57],SRA0:[2551.18,3628.35],SRA1:[1814.17,2551.18],SRA2:[1275.59,1814.17],SRA3:[907.09,1275.59],SRA4:[637.8,907.09],Executive:[521.86,756],Folio:[612,936],Legal:[612,1008],Letter:[612,792],Tabloid:[792,1224]};var pc;(function(n){n[n.Fastest=1/0]="Fastest",n[n.Fast=1500]="Fast",n[n.Medium=500]="Medium",n[n.Slow=100]="Slow"})(pc||(pc={}));var Co=class{constructor(t,e,i){this.alreadyEmbedded=!1,this.ref=t,this.doc=e,this.embedder=i}async embed(){if(!this.alreadyEmbedded){let t=await this.embedder.embedIntoContext(this.doc.context,this.ref);this.doc.catalog.has(x.of("Names"))||this.doc.catalog.set(x.of("Names"),this.doc.context.obj({}));let e=this.doc.catalog.lookup(x.of("Names"),R);e.has(x.of("EmbeddedFiles"))||e.set(x.of("EmbeddedFiles"),this.doc.context.obj({}));let i=e.lookup(x.of("EmbeddedFiles"),R);i.has(x.of("Names"))||i.set(x.of("Names"),this.doc.context.obj([]));let r=i.lookup(x.of("Names"),H);r.push(M.fromText(this.embedder.fileName)),r.push(t),this.doc.catalog.has(x.of("AF"))||this.doc.catalog.set(x.of("AF"),this.doc.context.obj([])),this.doc.catalog.lookup(x.of("AF"),H).push(t),this.alreadyEmbedded=!0}}};Co.of=(n,t,e)=>new Co(n,t,e);var Cn=class{constructor(t,e,i){this.alreadyEmbedded=!1,this.ref=t,this.doc=e,this.embedder=i}async embed(){if(!this.alreadyEmbedded){let{catalog:t,context:e}=this.doc,i=await this.embedder.embedIntoContext(this.doc.context,this.ref);t.has(x.of("Names"))||t.set(x.of("Names"),e.obj({}));let r=t.lookup(x.of("Names"),R);r.has(x.of("JavaScript"))||r.set(x.of("JavaScript"),e.obj({}));let o=r.lookup(x.of("JavaScript"),R);o.has(x.of("Names"))||o.set(x.of("Names"),e.obj([]));let s=o.lookup(x.of("Names"),H);s.push(M.fromText(this.embedder.scriptName)),s.push(i),this.alreadyEmbedded=!0}}};Cn.of=(n,t,e)=>new Cn(n,t,e);var gc=class{static for(t,e){return new gc(t,e)}constructor(t,e){this.script=t,this.scriptName=e}async embedIntoContext(t,e){let i=t.obj({Type:"Action",S:"JavaScript",JS:M.fromText(this.script)});return e?(t.assign(e,i),e):t.register(i)}},Wb=gc;var jb=512,ep=class extends Yt{constructor(t,e,i){super(i),this.stream=t,this.decrypt=e,this.nextChunk=null,this.initialized=!1}readBlock(){let t;if(this.initialized?t=this.nextChunk:(t=this.stream.getBytes(jb),this.initialized=!0),!t||t.length===0){this.eof=!0;return}this.nextChunk=this.stream.getBytes(jb);let e=this.nextChunk&&this.nextChunk.length>0,i=this.decrypt;t=i(t,!e);let r=this.bufferLength,o=r+t.length;this.ensureBuffer(o).set(t,r),this.bufferLength=o}},Kb=ep;var Tn=class{constructor(t){this.a=0,this.b=0;let e=new Uint8Array(256),i=t.length;for(let r=0;r<256;++r)e[r]=r;for(let r=0,o=0;r<256;++r){let s=e[r];o=o+s+t[r%i]&255,e[r]=e[o],e[o]=s}this.s=e}encryptBlock(t){let e=this.a,i=this.b,r=this.s,o=t.length,s=new Uint8Array(o);for(let a=0;a<o;++a){e=e+1&255;let c=r[e];i=i+c&255;let l=r[i];r[e]=l,r[i]=c,s[a]=t[a]^r[c+l&255]}return this.a=e,this.b=i,s}decryptBlock(t){return this.encryptBlock(t)}encrypt(t){return this.encryptBlock(t)}},Xs=function(){let t=new Uint8Array([7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21]),e=new Int32Array([-680876936,-389564586,606105819,-1044525330,-176418897,1200080426,-1473231341,-45705983,1770035416,-1958414417,-42063,-1990404162,1804603682,-40341101,-1502002290,1236535329,-165796510,-1069501632,643717713,-373897302,-701558691,38016083,-660478335,-405537848,568446438,-1019803690,-187363961,1163531501,-1444681467,-51403784,1735328473,-1926607734,-378558,-2022574463,1839030562,-35309556,-1530992060,1272893353,-155497632,-1094730640,681279174,-358537222,-722521979,76029189,-640364487,-421815835,530742520,-995338651,-198630844,1126891415,-1416354905,-57434055,1700485571,-1894986606,-1051523,-2054922799,1873313359,-30611744,-1560198380,1309151649,-145523070,-1120210379,718787259,-343485551]);function i(r,o,s){let a=1732584193,c=-271733879,l=-1732584194,d=271733878,h=s+72&-64,u=new Uint8Array(h),f,p;for(f=0;f<s;++f)u[f]=r[o++];u[f++]=128;let g=h-8;for(;f<g;)u[f++]=0;u[f++]=s<<3&255,u[f++]=s>>5&255,u[f++]=s>>13&255,u[f++]=s>>21&255,u[f++]=s>>>29&255,u[f++]=0,u[f++]=0,u[f++]=0;let m=new Int32Array(16);for(f=0;f<h;){for(p=0;p<16;++p,f+=4)m[p]=u[f]|u[f+1]<<8|u[f+2]<<16|u[f+3]<<24;let b=a,w=c,F=l,v=d,P,k;for(p=0;p<64;++p){p<16?(P=w&F|~w&v,k=p):p<32?(P=v&w|~v&F,k=5*p+1&15):p<48?(P=w^F^v,k=3*p+5&15):(P=F^(w|~v),k=7*p&15);let C=v,D=b+P+e[p]+m[k]|0,T=t[p];v=F,F=w,w=w+(D<<T|D>>>32-T)|0,b=C}a=a+b|0,c=c+w|0,l=l+F|0,d=d+v|0}return new Uint8Array([a&255,a>>8&255,a>>16&255,a>>>24&255,c&255,c>>8&255,c>>16&255,c>>>24&255,l&255,l>>8&255,l>>16&255,l>>>24&255,d&255,d>>8&255,d>>16&255,d>>>24&255])}return i}(),A=class{constructor(t,e){this.high=t|0,this.low=e|0}and(t){this.high&=t.high,this.low&=t.low}xor(t){this.high^=t.high,this.low^=t.low}or(t){this.high|=t.high,this.low|=t.low}shiftRight(t){t>=32?(this.low=this.high>>>t-32|0,this.high=0):(this.low=this.low>>>t|this.high<<32-t,this.high=this.high>>>t|0)}shiftLeft(t){t>=32?(this.high=this.low<<t-32,this.low=0):(this.high=this.high<<t|this.low>>>32-t,this.low<<=t)}rotateRight(t){let e,i;t&32?(i=this.low,e=this.high):(e=this.low,i=this.high),t&=31,this.low=e>>>t|i<<32-t,this.high=i>>>t|e<<32-t}not(){this.high=~this.high,this.low=~this.low}add(t){let e=(this.low>>>0)+(t.low>>>0),i=(this.high>>>0)+(t.high>>>0);e>4294967295&&(i+=1),this.low=e|0,this.high=i|0}copyTo(t,e){t[e]=this.high>>>24&255,t[e+1]=this.high>>16&255,t[e+2]=this.high>>8&255,t[e+3]=this.high&255,t[e+4]=this.low>>>24&255,t[e+5]=this.low>>16&255,t[e+6]=this.low>>8&255,t[e+7]=this.low&255}assign(t){this.high=t.high,this.low=t.low}},Zs=function(){function t(d,h){return d>>>h|d<<32-h}function e(d,h,u){return d&h^~d&u}function i(d,h,u){return d&h^d&u^h&u}function r(d){return t(d,2)^t(d,13)^t(d,22)}function o(d){return t(d,6)^t(d,11)^t(d,25)}function s(d){return t(d,7)^t(d,18)^d>>>3}function a(d){return t(d,17)^t(d,19)^d>>>10}let c=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function l(d,h,u){let f=1779033703,p=3144134277,g=1013904242,m=2773480762,b=1359893119,w=2600822924,F=528734635,v=1541459225,P=Math.ceil((u+9)/64)*64,k=new Uint8Array(P),C,D;for(C=0;C<u;++C)k[C]=d[h++];k[C++]=128;let T=P-8;for(;C<T;)k[C++]=0;k[C++]=0,k[C++]=0,k[C++]=0,k[C++]=u>>>29&255,k[C++]=u>>21&255,k[C++]=u>>13&255,k[C++]=u>>5&255,k[C++]=u<<3&255;let O=new Uint32Array(64);for(C=0;C<P;){for(D=0;D<16;++D)O[D]=k[C]<<24|k[C+1]<<16|k[C+2]<<8|k[C+3],C+=4;for(D=16;D<64;++D)O[D]=a(O[D-2])+O[D-7]+s(O[D-15])+O[D-16]|0;let E=f,V=p,W=g,B=m,U=b,te=w,z=F,re=v,Ee,Ue;for(D=0;D<64;++D)Ee=re+o(U)+e(U,te,z)+c[D]+O[D],Ue=r(E)+i(E,V,W),re=z,z=te,te=U,U=B+Ee|0,B=W,W=V,V=E,E=Ee+Ue|0;f=f+E|0,p=p+V|0,g=g+W|0,m=m+B|0,b=b+U|0,w=w+te|0,F=F+z|0,v=v+re|0}return new Uint8Array([f>>24&255,f>>16&255,f>>8&255,f&255,p>>24&255,p>>16&255,p>>8&255,p&255,g>>24&255,g>>16&255,g>>8&255,g&255,m>>24&255,m>>16&255,m>>8&255,m&255,b>>24&255,b>>16&255,b>>8&255,b&255,w>>24&255,w>>16&255,w>>8&255,w&255,F>>24&255,F>>16&255,F>>8&255,F&255,v>>24&255,v>>16&255,v>>8&255,v&255])}return l}(),Gb=function(){function t(l,d,h,u,f){l.assign(d),l.and(h),f.assign(d),f.not(),f.and(u),l.xor(f)}function e(l,d,h,u,f){l.assign(d),l.and(h),f.assign(d),f.and(u),l.xor(f),f.assign(h),f.and(u),l.xor(f)}function i(l,d,h){l.assign(d),l.rotateRight(28),h.assign(d),h.rotateRight(34),l.xor(h),h.assign(d),h.rotateRight(39),l.xor(h)}function r(l,d,h){l.assign(d),l.rotateRight(14),h.assign(d),h.rotateRight(18),l.xor(h),h.assign(d),h.rotateRight(41),l.xor(h)}function o(l,d,h){l.assign(d),l.rotateRight(1),h.assign(d),h.rotateRight(8),l.xor(h),h.assign(d),h.shiftRight(7),l.xor(h)}function s(l,d,h){l.assign(d),l.rotateRight(19),h.assign(d),h.rotateRight(61),l.xor(h),h.assign(d),h.shiftRight(6),l.xor(h)}let a=[new A(1116352408,3609767458),new A(1899447441,602891725),new A(3049323471,3964484399),new A(3921009573,2173295548),new A(961987163,4081628472),new A(1508970993,3053834265),new A(2453635748,2937671579),new A(2870763221,3664609560),new A(3624381080,2734883394),new A(310598401,1164996542),new A(607225278,1323610764),new A(1426881987,3590304994),new A(1925078388,4068182383),new A(2162078206,991336113),new A(2614888103,633803317),new A(3248222580,3479774868),new A(3835390401,2666613458),new A(4022224774,944711139),new A(264347078,2341262773),new A(604807628,2007800933),new A(770255983,1495990901),new A(1249150122,1856431235),new A(1555081692,3175218132),new A(1996064986,2198950837),new A(2554220882,3999719339),new A(2821834349,766784016),new A(2952996808,2566594879),new A(3210313671,3203337956),new A(3336571891,1034457026),new A(3584528711,2466948901),new A(113926993,3758326383),new A(338241895,168717936),new A(666307205,1188179964),new A(773529912,1546045734),new A(1294757372,1522805485),new A(1396182291,2643833823),new A(1695183700,2343527390),new A(1986661051,1014477480),new A(2177026350,1206759142),new A(2456956037,344077627),new A(2730485921,1290863460),new A(2820302411,3158454273),new A(3259730800,3505952657),new A(3345764771,106217008),new A(3516065817,3606008344),new A(3600352804,1432725776),new A(4094571909,1467031594),new A(275423344,851169720),new A(430227734,3100823752),new A(506948616,1363258195),new A(659060556,3750685593),new A(883997877,3785050280),new A(958139571,3318307427),new A(1322822218,3812723403),new A(1537002063,2003034995),new A(1747873779,3602036899),new A(1955562222,1575990012),new A(2024104815,1125592928),new A(2227730452,2716904306),new A(2361852424,442776044),new A(2428436474,593698344),new A(2756734187,3733110249),new A(3204031479,2999351573),new A(3329325298,3815920427),new A(3391569614,3928383900),new A(3515267271,566280711),new A(3940187606,3454069534),new A(4118630271,4000239992),new A(116418474,1914138554),new A(174292421,2731055270),new A(289380356,3203993006),new A(460393269,320620315),new A(685471733,587496836),new A(852142971,1086792851),new A(1017036298,365543100),new A(1126000580,2618297676),new A(1288033470,3409855158),new A(1501505948,4234509866),new A(1607167915,987167468),new A(1816402316,1246189591)];function c(l,d,h,u=!1){let f,p,g,m,b,w,F,v;u?(f=new A(3418070365,3238371032),p=new A(1654270250,914150663),g=new A(2438529370,812702999),m=new A(355462360,4144912697),b=new A(1731405415,4290775857),w=new A(2394180231,1750603025),F=new A(3675008525,1694076839),v=new A(1203062813,3204075428)):(f=new A(1779033703,4089235720),p=new A(3144134277,2227873595),g=new A(1013904242,4271175723),m=new A(2773480762,1595750129),b=new A(1359893119,2917565137),w=new A(2600822924,725511199),F=new A(528734635,4215389547),v=new A(1541459225,327033209));let P=Math.ceil((h+17)/128)*128,k=new Uint8Array(P),C,D;for(C=0;C<h;++C)k[C]=l[d++];k[C++]=128;let T=P-16;for(;C<T;)k[C++]=0;k[C++]=0,k[C++]=0,k[C++]=0,k[C++]=0,k[C++]=0,k[C++]=0,k[C++]=0,k[C++]=0,k[C++]=0,k[C++]=0,k[C++]=0,k[C++]=h>>>29&255,k[C++]=h>>21&255,k[C++]=h>>13&255,k[C++]=h>>5&255,k[C++]=h<<3&255;let O=new Array(80);for(C=0;C<80;C++)O[C]=new A(0,0);let E=new A(0,0),V=new A(0,0),W=new A(0,0),B=new A(0,0),U=new A(0,0),te=new A(0,0),z=new A(0,0),re=new A(0,0),Ee=new A(0,0),Ue=new A(0,0),me=new A(0,0),Ae=new A(0,0),we;for(C=0;C<P;){for(D=0;D<16;++D)O[D].high=k[C]<<24|k[C+1]<<16|k[C+2]<<8|k[C+3],O[D].low=k[C+4]<<24|k[C+5]<<16|k[C+6]<<8|k[C+7],C+=8;for(D=16;D<80;++D)we=O[D],s(we,O[D-2],Ae),we.add(O[D-7]),o(me,O[D-15],Ae),we.add(me),we.add(O[D-16]);for(E.assign(f),V.assign(p),W.assign(g),B.assign(m),U.assign(b),te.assign(w),z.assign(F),re.assign(v),D=0;D<80;++D)Ee.assign(re),r(me,U,Ae),Ee.add(me),t(me,U,te,z,Ae),Ee.add(me),Ee.add(a[D]),Ee.add(O[D]),i(Ue,E,Ae),e(me,E,V,W,Ae),Ue.add(me),we=re,re=z,z=te,te=U,B.add(Ee),U=B,B=W,W=V,V=E,we.assign(Ee),we.add(Ue),E=we;f.add(E),p.add(V),g.add(W),m.add(B),b.add(U),w.add(te),F.add(z),v.add(re)}let ve;return u?(ve=new Uint8Array(48),f.copyTo(ve,0),p.copyTo(ve,8),g.copyTo(ve,16),m.copyTo(ve,24),b.copyTo(ve,32),w.copyTo(ve,40)):(ve=new Uint8Array(64),f.copyTo(ve,0),p.copyTo(ve,8),g.copyTo(ve,16),m.copyTo(ve,24),b.copyTo(ve,32),w.copyTo(ve,40),F.copyTo(ve,48),v.copyTo(ve,56)),ve}return c}();function NF(n,t,e){return Gb(n,t,e,!0)}var tp=class{decryptBlock(t){return t}encrypt(t){return t}},To=class{constructor(){if(this.constructor===To)throw new Error("Cannot initialize AESBaseCipher.");this._s=new Uint8Array([99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22]),this._inv_s=new Uint8Array([82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125]),this._mix=new Uint32Array([0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795]),this._mixCol=new Uint8Array(256);for(let t=0;t<256;t++)t<128?this._mixCol[t]=t<<1:this._mixCol[t]=t<<1^27;this.buffer=new Uint8Array(16),this.bufferPosition=0}_expandKey(t){throw new Error("Cannot call `_expandKey` on the base class")}_decrypt(t,e){let i,r,o,s=new Uint8Array(16);s.set(t);for(let a=0,c=this._keySize;a<16;++a,++c)s[a]^=e[c];for(let a=this._cyclesOfRepetition-1;a>=1;--a){i=s[13],s[13]=s[9],s[9]=s[5],s[5]=s[1],s[1]=i,i=s[14],r=s[10],s[14]=s[6],s[10]=s[2],s[6]=i,s[2]=r,i=s[15],r=s[11],o=s[7],s[15]=s[3],s[11]=i,s[7]=r,s[3]=o;for(let c=0;c<16;++c)s[c]=this._inv_s[s[c]];for(let c=0,l=a*16;c<16;++c,++l)s[c]^=e[l];for(let c=0;c<16;c+=4){let l=this._mix[s[c]],d=this._mix[s[c+1]],h=this._mix[s[c+2]],u=this._mix[s[c+3]];i=l^d>>>8^d<<24^h>>>16^h<<16^u>>>24^u<<8,s[c]=i>>>24&255,s[c+1]=i>>16&255,s[c+2]=i>>8&255,s[c+3]=i&255}}i=s[13],s[13]=s[9],s[9]=s[5],s[5]=s[1],s[1]=i,i=s[14],r=s[10],s[14]=s[6],s[10]=s[2],s[6]=i,s[2]=r,i=s[15],r=s[11],o=s[7],s[15]=s[3],s[11]=i,s[7]=r,s[3]=o;for(let a=0;a<16;++a)s[a]=this._inv_s[s[a]],s[a]^=e[a];return s}_encrypt(t,e){let i=this._s,r,o,s,a=new Uint8Array(16);a.set(t);for(let c=0;c<16;++c)a[c]^=e[c];for(let c=1;c<this._cyclesOfRepetition;c++){for(let l=0;l<16;++l)a[l]=i[a[l]];s=a[1],a[1]=a[5],a[5]=a[9],a[9]=a[13],a[13]=s,s=a[2],o=a[6],a[2]=a[10],a[6]=a[14],a[10]=s,a[14]=o,s=a[3],o=a[7],r=a[11],a[3]=a[15],a[7]=s,a[11]=o,a[15]=r;for(let l=0;l<16;l+=4){let d=a[l+0],h=a[l+1],u=a[l+2],f=a[l+3];r=d^h^u^f,a[l+0]^=r^this._mixCol[d^h],a[l+1]^=r^this._mixCol[h^u],a[l+2]^=r^this._mixCol[u^f],a[l+3]^=r^this._mixCol[f^d]}for(let l=0,d=c*16;l<16;++l,++d)a[l]^=e[d]}for(let c=0;c<16;++c)a[c]=i[a[c]];s=a[1],a[1]=a[5],a[5]=a[9],a[9]=a[13],a[13]=s,s=a[2],o=a[6],a[2]=a[10],a[6]=a[14],a[10]=s,a[14]=o,s=a[3],o=a[7],r=a[11],a[3]=a[15],a[7]=s,a[11]=o,a[15]=r;for(let c=0,l=this._keySize;c<16;++c,++l)a[c]^=e[l];return a}_decryptBlock2(t,e){let i=t.length,r=this.buffer,o=this.bufferPosition,s=[],a=this.iv;for(let d=0;d<i;++d){if(r[o]=t[d],++o,o<16)continue;let h=this._decrypt(r,this._key);for(let u=0;u<16;++u)h[u]^=a[u];a=r,s.push(h),r=new Uint8Array(16),o=0}if(this.buffer=r,this.bufferLength=o,this.iv=a,s.length===0)return new Uint8Array(0);let c=16*s.length;if(e){let d=s[s.length-1],h=d[15];if(h<=16){for(let u=15,f=16-h;u>=f;--u)if(d[u]!==h){h=0;break}c-=h,s[s.length-1]=d.subarray(0,16-h)}}let l=new Uint8Array(c);for(let d=0,h=0,u=s.length;d<u;++d,h+=16)l.set(s[d],h);return l}decryptBlock(t,e,i){let r=t.length,o=this.buffer,s=this.bufferPosition;if(i)this.iv=i;else{for(let a=0;s<16&&a<r;++a,++s)o[s]=t[a];if(s<16)return this.bufferLength=s,new Uint8Array(0);this.iv=o,t=t.subarray(16)}return this.buffer=new Uint8Array(16),this.bufferLength=0,this.decryptBlock=this._decryptBlock2,this.decryptBlock(t,e)}encrypt(t,e){let i=t.length,r=this.buffer,o=this.bufferPosition,s=[];e||(e=new Uint8Array(16));for(let l=0;l<i;++l){if(r[o]=t[l],++o,o<16)continue;for(let h=0;h<16;++h)r[h]^=e[h];let d=this._encrypt(r,this._key);e=d,s.push(d),r=new Uint8Array(16),o=0}if(this.buffer=r,this.bufferLength=o,this.iv=e,s.length===0)return new Uint8Array(0);let a=16*s.length,c=new Uint8Array(a);for(let l=0,d=0,h=s.length;l<h;++l,d+=16)c.set(s[l],d);return c}},Wd=class extends To{constructor(t){super(),this._cyclesOfRepetition=10,this._keySize=160,this._rcon=new Uint8Array([141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141]),this._key=this._expandKey(t)}_expandKey(t){let i=this._s,r=this._rcon,o=new Uint8Array(176);o.set(t);for(let s=16,a=1;s<176;++a){let c=o[s-3],l=o[s-2],d=o[s-1],h=o[s-4];c=i[c],l=i[l],d=i[d],h=i[h],c^=r[a];for(let u=0;u<4;++u)o[s]=c^=o[s-16],s++,o[s]=l^=o[s-16],s++,o[s]=d^=o[s-16],s++,o[s]=h^=o[s-16],s++}return o}},Eo=class extends To{constructor(t){super(),this._cyclesOfRepetition=14,this._keySize=224,this._key=this._expandKey(t)}_expandKey(t){let i=this._s,r=new Uint8Array(240);r.set(t);let o=1,s=0,a=0,c=0,l=0;for(let d=32,h=1;d<240;++h){d%32===16?(s=i[s],a=i[a],c=i[c],l=i[l]):d%32===0&&(s=r[d-3],a=r[d-2],c=r[d-1],l=r[d-4],s=i[s],a=i[a],c=i[c],l=i[l],s^=o,(o<<=1)>=256&&(o=(o^27)&255));for(let u=0;u<4;++u)r[d]=s^=r[d-32],d++,r[d]=a^=r[d-32],d++,r[d]=c^=r[d-32],d++,r[d]=l^=r[d-32],d++}return r}},ip=class{checkOwnerPassword(t,e,i,r){let o=new Uint8Array(t.length+56);o.set(t,0),o.set(e,t.length),o.set(i,t.length+e.length);let s=Zs(o,0,o.length);return Xo(s,r)}checkUserPassword(t,e,i){let r=new Uint8Array(t.length+8);r.set(t,0),r.set(e,t.length);let o=Zs(r,0,r.length);return Xo(o,i)}getOwnerKey(t,e,i,r){let o=new Uint8Array(t.length+56);o.set(t,0),o.set(e,t.length),o.set(i,t.length+e.length);let s=Zs(o,0,o.length);return new Eo(s).decryptBlock(r,!1,new Uint8Array(16))}getUserKey(t,e,i){let r=new Uint8Array(t.length+8);r.set(t,0),r.set(e,t.length);let o=Zs(r,0,r.length);return new Eo(o).decryptBlock(i,!1,new Uint8Array(16))}},np=class{calculatePDF20Hash(t,e,i){let r=Zs(e,0,e.length).subarray(0,32),o=new Uint8Array([0]),s=0;for(;s<64||o[o.length-1]>s-32;){let a=t.length+r.length+i.length,c=new Uint8Array(a),l=0;c.set(t,l),l+=t.length,c.set(r,l),l+=r.length,c.set(i,l);let d=new Uint8Array(a*64);for(let f=0,p=0;f<64;f++,p+=a)d.set(c,p);o=new Wd(r.subarray(0,16)).encrypt(d,r.subarray(16,32));let u=o.slice(0,16).reduce((f,p)=>f+p,0)%3;u===0?r=Zs(o,0,o.length):u===1?r=NF(o,0,o.length):u===2&&(r=Gb(o,0,o.length)),s++}return r.subarray(0,32)}hash(t,e,i){return this.calculatePDF20Hash(t,e,i)}checkOwnerPassword(t,e,i,r){let o=new Uint8Array(t.length+56);o.set(t,0),o.set(e,t.length),o.set(i,t.length+e.length);let s=this.calculatePDF20Hash(t,o,i);return Xo(s,r)}checkUserPassword(t,e,i){let r=new Uint8Array(t.length+8);r.set(t,0),r.set(e,t.length);let o=this.calculatePDF20Hash(t,r,new Uint8Array);return Xo(o,i)}getOwnerKey(t,e,i,r){let o=new Uint8Array(t.length+56);o.set(t,0),o.set(e,t.length),o.set(i,t.length+e.length);let s=this.calculatePDF20Hash(t,o,i);return new Eo(s).decryptBlock(r,!1,new Uint8Array(16))}getUserKey(t,e,i){let r=new Uint8Array(t.length+8);r.set(t,0),r.set(e,t.length);let o=this.calculatePDF20Hash(t,r,new Uint8Array);return new Eo(o).decryptBlock(i,!1,new Uint8Array(16))}},jd=class{constructor(t,e){this.StringCipherConstructor=t,this.StreamCipherConstructor=e}createStream(t,e){let i=this.StreamCipherConstructor();return new Kb(t,function(o,s){return i.decryptBlock(o,s)},e)}decryptString(t){let e=this.StringCipherConstructor(),i=Ko(t);return i=e.decryptBlock(i,!0),nn(i)}decryptBytes(t){return this.StringCipherConstructor().decryptBlock(t,!0)}encryptString(t){let e=this.StringCipherConstructor();if(e instanceof To){let o=16-t.length%16;t+=String.fromCharCode(o).repeat(o);let s=new Uint8Array(16);if(typeof crypto!="undefined")crypto.getRandomValues(s);else for(let l=0;l<16;l++)s[l]=Math.floor(256*Math.random());let a=Ko(t);a=e.encrypt(a,s);let c=new Uint8Array(16+a.length);return c.set(s),c.set(a,16),nn(c)}let i=Ko(t);return i=e.encrypt(i),nn(i)}},Kd=class{constructor(t,e,i){var r,o;this.defaultPasswordBytes=new Uint8Array([40,191,78,94,78,117,138,65,100,0,78,86,255,250,1,8,46,46,0,182,208,104,62,128,47,12,169,254,100,83,105,122]),this.identityName=x.of("Identity");let s=t.get(x.of("Filter"));if(s.asString()!=="/Standard")throw new Error("unknown encryption method");this.filterName=s.asString(),this.dict=t;let a=t.get(x.of("V")).asNumber();if(!Number.isInteger(a)||a!==1&&a!==2&&a!==4&&a!==5)throw new Error("unsupported encryption algorithm");this.algorithm=a;let c=(r=t.get(x.of("Length")))===null||r===void 0?void 0:r.asNumber();if(!c)if(a<=3)c=40;else{let w=t.get(x.of("CF")),F=t.get(x.of("StmF"));if(w instanceof R&&F instanceof x){w.suppressEncryption=!0;let v=w.get(x.of(F.asString())),P=null;v&&(P=v.get(x.of("Length"))),c=P&&P.asNumber()||128,c<40&&(c<<=3)}}if(c===void 0||!Number.isInteger(c)||c<40||c%8!==0)throw new Error(`invalid key length: ${c}`);let l=t.get(x.of("O")).asBytes(),d=t.get(x.of("U")).asBytes(),h=l.subarray(0,32),u=d.subarray(0,32),f=t.get(x.of("P")).asNumber(),p=t.get(x.of("R")).asNumber(),g=(a===4||a===5)&&((o=t.get(x.of("EncryptMetadata")))===null||o===void 0?void 0:o.asBoolean())!==!1;this.encryptMetadata=g;let m;if(i){if(p===6)try{i=unescape(encodeURIComponent(i))}catch(w){console.warn("CipherTransformFactory: Unable to convert UTF8 encoded password.")}m=Ko(i)}let b;if(a!==5)b=this.prepareKeyData(e,m,h,u,f,p,c,g);else{let w=l.subarray(32,40),F=l.subarray(40,48),v=d.subarray(0,48),P=d.subarray(32,40),k=d.subarray(40,48),C=t.get(x.of("OE")).asBytes(),D=t.get(x.of("UE")).asBytes(),T=t.get(x.of("Perms")).asBytes();b=this.createEncryptionKey20(p,m,h,w,F,v,u,P,k,C,D,T)}if(!b&&!i)throw new Error("NEEDS PASSWORD");if(!b&&i){let w=this.decodeUserPassword(m,h,p,c);b=this.prepareKeyData(e,w,h,u,f,p,c,g)}if(!b)throw new Error("Password incorrect");if(this.encryptionKey=b,a>=4){let w=t.get(x.of("CF"));w instanceof R&&(w.suppressEncryption=!0),this.cf=w,this.stmf=t.get(x.of("StmF"))||this.identityName,this.strf=t.get(x.of("StrF"))||this.identityName,this.eff=t.get(x.of("EFF"))||this.stmf}}createCipherTransform(t,e){if(this.algorithm===4||this.algorithm===5)return new jd(this.buildCipherConstructor(this.cf,this.strf,t,e,this.encryptionKey),this.buildCipherConstructor(this.cf,this.stmf,t,e,this.encryptionKey));let i=this.buildObjectKey(t,e,this.encryptionKey,!1),r=function(){return new Tn(i)};return new jd(r,r)}createEncryptionKey20(t,e,i,r,o,s,a,c,l,d,h,u){if(e){let p=Math.min(127,e.length);e=e.subarray(0,p)}else e=new Uint8Array;let f;return t===6?f=new np:f=new ip,f.checkUserPassword(e,c,a)?f.getUserKey(e,l,h):e.length&&f.checkOwnerPassword(e,r,s,i)?f.getOwnerKey(e,o,s,d):null}prepareKeyData(t,e,i,r,o,s,a,c){let l=40+i.length+t.length,d=new Uint8Array(l),h=0,u,f;if(e)for(f=Math.min(32,e.length);h<f;++h)d[h]=e[h];for(u=0;h<32;)d[h++]=this.defaultPasswordBytes[u++];for(u=0,f=i.length;u<f;++u)d[h++]=i[u];for(d[h++]=o&255,d[h++]=o>>8&255,d[h++]=o>>16&255,d[h++]=o>>>24&255,u=0,f=t.length;u<f;++u)d[h++]=t[u];s>=4&&!c&&(d[h++]=255,d[h++]=255,d[h++]=255,d[h++]=255);let p=Xs(d,0,h),g=a>>3;if(s>=3)for(u=0;u<50;++u)p=Xs(p,0,g);let m=p.subarray(0,g),b,w;if(s>=3){for(h=0;h<32;++h)d[h]=this.defaultPasswordBytes[h];for(u=0,f=t.length;u<f;++u)d[h++]=t[u];b=new Tn(m),w=b.encryptBlock(Xs(d,0,h)),f=m.length;let F=new Uint8Array(f);for(u=1;u<=19;++u){for(let v=0;v<f;++v)F[v]=m[v]^u;b=new Tn(F),w=b.encryptBlock(w)}for(u=0,f=w.length;u<f;++u)if(r[u]!==w[u])return null}else for(b=new Tn(m),w=b.encryptBlock(this.defaultPasswordBytes),u=0,f=w.length;u<f;++u)if(r[u]!==w[u])return null;return m}decodeUserPassword(t,e,i,r){let o=new Uint8Array(32),s=0,a=Math.min(32,t.length);for(;s<a;++s)o[s]=t[s];let c=0;for(;s<32;)o[s++]=this.defaultPasswordBytes[c++];let l=Xs(o,0,s),d=r>>3;if(i>=3)for(c=0;c<50;++c)l=Xs(l,0,l.length);let h,u;if(i>=3){u=e;let f=new Uint8Array(d);for(c=19;c>=0;c--){for(let p=0;p<d;++p)f[p]=l[p]^c;h=new Tn(f),u=h.encryptBlock(u)}}else h=new Tn(l.subarray(0,d)),u=h.encryptBlock(e);return u}buildObjectKey(t,e,i,r=!1){let o=new Uint8Array(i.length+9),s=i.length,a;for(a=0;a<s;++a)o[a]=i[a];return o[a++]=t&255,o[a++]=t>>8&255,o[a++]=t>>16&255,o[a++]=e&255,o[a++]=e>>8&255,r&&(o[a++]=115,o[a++]=65,o[a++]=108,o[a++]=84),Xs(o,0,a).subarray(0,Math.min(i.length+5,16))}buildCipherConstructor(t,e,i,r,o){if(!(e instanceof x))throw new Error("Invalid crypt filter name.");let s=t.get(x.of(e.asString().replace("/",""))),a;if(s!=null&&(a=s.get(x.of("CFM"))),!a||a.asString()==="/None")return function(){return new tp};if(a.asString()==="/V2")return()=>new Tn(this.buildObjectKey(i,r,o,!1));if(a.asString()==="/AESV2")return()=>new Wd(this.buildObjectKey(i,r,o,!0));if(a.asString()==="/AESV3")return()=>new Eo(o);throw new Error("Unknown crypto method")}};var pe=class{static async load(t,e={}){let{ignoreEncryption:i=!1,parseSpeed:r=pc.Slow,throwOnInvalidObject:o=!1,warnOnInvalidObjects:s=!1,updateMetadata:a=!0,capNumbers:c=!1,password:l}=e;S(t,"pdf",["string",Uint8Array,ArrayBuffer]),S(i,"ignoreEncryption",["boolean"]),S(r,"parseSpeed",["number"]),S(o,"throwOnInvalidObject",["boolean"]),S(s,"warnOnInvalidObjects",["boolean"]),S(l,"password",["string","undefined"]);let d=Lr(t),h=await Wl.forBytesWithOptions(d,r,o,c).parseDocument();if(h.lookup(h.trailerInfo.Encrypt)&&l!==void 0){let u=h.lookup(h.trailerInfo.ID,H),f=h.lookup(h.trailerInfo.Encrypt,R),p=await Wl.forBytesWithOptions(d,r,o,s,c,new Kd(f,u.get(0).asBytes(),l)).parseDocument();return new pe(p,!0,a)}else return new pe(h,i,a)}static async create(t={}){let{updateMetadata:e=!0}=t,i=Yr.create(),r=Ts.withContext(i),o=i.register(r),s=Cs.withContextAndPages(i,o);return i.trailerInfo.Root=i.register(s),new pe(i,!1,e)}constructor(t,e,i){if(this.defaultWordBreaks=[" "],this.computePages=()=>{let r=[];return this.catalog.Pages().traverse((o,s)=>{if(o instanceof tt){let a=this.pageMap.get(o);a||(a=Pe.of(o,s,this),this.pageMap.set(o,a)),r.push(a)}}),r},this.getOrCreateForm=()=>{let r=this.catalog.getOrCreateAcroForm();return Sn.of(r,this)},S(t,"context",[[Yr,"PDFContext"]]),S(e,"ignoreEncryption",["boolean"]),this.context=t,this.catalog=t.lookup(t.trailerInfo.Root),t.lookup(t.trailerInfo.Encrypt)&&t.isDecrypted&&delete t.trailerInfo.Encrypt,this.isEncrypted=!!t.lookup(t.trailerInfo.Encrypt),this.pageCache=ct.populatedBy(this.computePages),this.pageMap=new Map,this.formCache=ct.populatedBy(this.getOrCreateForm),this.fonts=[],this.images=[],this.embeddedPages=[],this.embeddedFiles=[],this.javaScripts=[],!e&&this.isEncrypted)throw new ko;i&&this.updateInfoDict()}registerFontkit(t){this.fontkit=t}getForm(){let t=this.formCache.access();return t.hasXFA()&&(console.warn("Removing XFA form data as pdf-lib does not support reading or writing XFA"),t.deleteXFA()),t}getTitle(){let t=this.getInfoDict().lookup(x.Title);if(t)return ur(t),t.decodeText()}getAuthor(){let t=this.getInfoDict().lookup(x.Author);if(t)return ur(t),t.decodeText()}getSubject(){let t=this.getInfoDict().lookup(x.Subject);if(t)return ur(t),t.decodeText()}getKeywords(){let t=this.getInfoDict().lookup(x.Keywords);if(t)return ur(t),t.decodeText()}getCreator(){let t=this.getInfoDict().lookup(x.Creator);if(t)return ur(t),t.decodeText()}getProducer(){let t=this.getInfoDict().lookup(x.Producer);if(t)return ur(t),t.decodeText()}getCreationDate(){let t=this.getInfoDict().lookup(x.CreationDate);if(t)return ur(t),t.decodeDate()}getModificationDate(){let t=this.getInfoDict().lookup(x.ModDate);if(t)return ur(t),t.decodeDate()}setTitle(t,e){S(t,"title",["string"]);let i=x.of("Title");this.getInfoDict().set(i,M.fromText(t)),e!=null&&e.showInWindowTitleBar&&this.catalog.getOrCreateViewerPreferences().setDisplayDocTitle(!0)}setAuthor(t){S(t,"author",["string"]);let e=x.of("Author");this.getInfoDict().set(e,M.fromText(t))}setSubject(t){S(t,"author",["string"]);let e=x.of("Subject");this.getInfoDict().set(e,M.fromText(t))}setKeywords(t){S(t,"keywords",[Array]);let e=x.of("Keywords");this.getInfoDict().set(e,M.fromText(t.join(" ")))}setCreator(t){S(t,"creator",["string"]);let e=x.of("Creator");this.getInfoDict().set(e,M.fromText(t))}setProducer(t){S(t,"creator",["string"]);let e=x.of("Producer");this.getInfoDict().set(e,M.fromText(t))}setLanguage(t){S(t,"language",["string"]);let e=x.of("Lang");this.catalog.set(e,G.of(t))}setCreationDate(t){S(t,"creationDate",[[Date,"Date"]]);let e=x.of("CreationDate");this.getInfoDict().set(e,G.fromDate(t))}setModificationDate(t){S(t,"modificationDate",[[Date,"Date"]]);let e=x.of("ModDate");this.getInfoDict().set(e,G.fromDate(t))}getPageCount(){return this.pageCount===void 0&&(this.pageCount=this.getPages().length),this.pageCount}getPages(){return this.pageCache.access()}getPage(t){let e=this.getPages();return lt(t,"index",0,e.length-1),e[t]}getPageIndices(){return lu(0,this.getPageCount())}removePage(t){let e=this.getPageCount();if(this.pageCount===0)throw new ac;lt(t,"index",0,e-1),this.catalog.removeLeafNode(t),this.pageCount=e-1}addPage(t){return S(t,"page",["undefined",[Pe,"PDFPage"],Array]),this.insertPage(this.getPageCount(),t)}insertPage(t,e){let i=this.getPageCount();if(lt(t,"index",0,i),S(e,"page",["undefined",[Pe,"PDFPage"],Array]),!e||Array.isArray(e)){let o=Array.isArray(e)?e:So.A4;e=Pe.create(this),e.setSize(...o)}else if(e.doc!==this)throw new sc;let r=this.catalog.insertLeafNode(e.ref,t);return e.node.setParent(r),this.pageMap.set(e.node,e),this.pageCache.invalidate(),this.pageCount=i+1,e}async copyPages(t,e){S(t,"srcDoc",[[pe,"PDFDocument"]]),S(e,"indices",[Array]),await t.flush();let i=ml.for(t.context,this.context),r=t.getPages(),o=e.map(s=>r[s]).map(async s=>i.copy(s.node)).map(s=>s.then(a=>Pe.of(a,this.context.register(a),this)));return Promise.all(o)}async copy(){let t=await pe.create(),e=await t.copyPages(this,this.getPageIndices());for(let i=0,r=e.length;i<r;i++)t.addPage(e[i]);return this.getAuthor()!==void 0&&t.setAuthor(this.getAuthor()),this.getCreationDate()!==void 0&&t.setCreationDate(this.getCreationDate()),this.getCreator()!==void 0&&t.setCreator(this.getCreator()),this.getModificationDate()!==void 0&&t.setModificationDate(this.getModificationDate()),this.getProducer()!==void 0&&t.setProducer(this.getProducer()),this.getSubject()!==void 0&&t.setSubject(this.getSubject()),this.getTitle()!==void 0&&t.setTitle(this.getTitle()),t.defaultWordBreaks=this.defaultWordBreaks,t}addJavaScript(t,e){S(t,"name",["string"]),S(e,"script",["string"]);let i=Wb.for(e,t),r=this.context.nextRef(),o=Cn.of(r,this,i);this.javaScripts.push(o)}async attach(t,e,i={}){S(t,"attachment",["string",Uint8Array,ArrayBuffer]),S(e,"name",["string"]),I(i.mimeType,"mimeType",["string"]),I(i.description,"description",["string"]),I(i.creationDate,"options.creationDate",[Date]),I(i.modificationDate,"options.modificationDate",[Date]),gt(i.afRelationship,"options.afRelationship",gs);let r=Lr(t),o=gd.for(r,e,i),s=this.context.nextRef(),a=Co.of(s,this,o);this.embeddedFiles.push(a)}async embedFont(t,e={}){let{subset:i=!1,customName:r,features:o}=e;S(t,"font",["string",Uint8Array,ArrayBuffer]),S(i,"subset",["boolean"]);let s;if(ld(t))s=tr.for(t,r);else if(du(t)){let l=Lr(t),d=this.assertFontkit();s=i?await pd.for(d,l,r,o):await ir.for(d,l,r,o)}else throw new TypeError("`font` must be one of `StandardFonts | string | Uint8Array | ArrayBuffer`");let a=this.context.nextRef(),c=Se.of(a,this,s);return this.fonts.push(c),c}embedStandardFont(t,e){if(S(t,"font",["string"]),!ld(t))throw new TypeError("`font` must be one of type `StandardFonts`");let i=tr.for(t,e),r=this.context.nextRef(),o=Se.of(r,this,i);return this.fonts.push(o),o}async embedJpg(t){S(t,"jpg",["string",Uint8Array,ArrayBuffer]);let e=Lr(t),i=await bs.for(e),r=this.context.nextRef(),o=oi.of(r,this,i);return this.images.push(o),o}async embedPng(t){S(t,"png",["string",Uint8Array,ArrayBuffer]);let e=Lr(t),i=await ys.for(e),r=this.context.nextRef(),o=oi.of(r,this,i);return this.images.push(o),o}async embedPdf(t,e=[0]){S(t,"pdf",["string",Uint8Array,ArrayBuffer,[pe,"PDFDocument"]]),S(e,"indices",[Array]);let i=t instanceof pe?t:await pe.load(t),r=cu(i.getPages(),e);return this.embedPages(r)}async embedPage(t,e,i){S(t,"page",[[Pe,"PDFPage"]]);let[r]=await this.embedPages([t],[e],[i]);return r}async embedPages(t,e=[],i=[]){if(t.length===0)return[];for(let a=0,c=t.length-1;a<c;a++){let l=t[a],d=t[a+1];if(l.node.context!==d.node.context)throw new $a}let r=t[0].node.context,o=r===this.context?a=>a:ml.for(r,this.context).copy,s=new Array(t.length);for(let a=0,c=t.length;a<c;a++){let l=o(t[a].node),d=e[a],h=i[a],u=await vs.for(l,d,h),f=this.context.nextRef();s[a]=Pi.of(f,this,u)}return this.embeddedPages.push(...s),s}async flush(){await this.embedAll(this.fonts),await this.embedAll(this.images),await this.embedAll(this.embeddedPages),await this.embedAll(this.embeddedFiles),await this.embedAll(this.javaScripts)}async save(t={}){let{useObjectStreams:e=!0,addDefaultPage:i=!0,objectsPerTick:r=50,updateFieldAppearances:o=!0}=t;if(S(e,"useObjectStreams",["boolean"]),S(i,"addDefaultPage",["boolean"]),S(r,"objectsPerTick",["number"]),S(o,"updateFieldAppearances",["boolean"]),i&&this.getPageCount()===0&&this.addPage(),o){let a=this.formCache.getValue();a&&a.updateFieldAppearances()}return await this.flush(),(e?ud:fs).forContext(this.context,r).serializeToBuffer()}async saveAsBase64(t={}){let{dataUri:e=!1,...i}=t;S(e,"dataUri",["boolean"]);let r=await this.save(i),o=Qh(r);return e?`data:application/pdf;base64,${o}`:o}findPageForAnnotationRef(t){let e=this.getPages();for(let i=0,r=e.length;i<r;i++){let o=e[i],s=o.node.Annots();if((s==null?void 0:s.indexOf(t))!==void 0)return o}}async embedAll(t){for(let e=0,i=t.length;e<i;e++)await t[e].embed()}updateInfoDict(){let t="pdf-lib (https://github.com/Hopding/pdf-lib)",e=new Date,i=this.getInfoDict();this.setProducer(t),this.setModificationDate(e),i.get(x.of("Creator"))||this.setCreator(t),i.get(x.of("CreationDate"))||this.setCreationDate(e)}getInfoDict(){let t=this.context.lookup(this.context.trailerInfo.Info);if(t instanceof R)return t;let e=this.context.obj({});return this.context.trailerInfo.Info=this.context.register(e),e}assertFontkit(){if(!this.fontkit)throw new oc;return this.fontkit}};function ur(n){if(!(n instanceof M)&&!(n instanceof G))throw new Vi([M,G],n)}var Di;(function(n){n.Normal="Normal",n.Multiply="Multiply",n.Screen="Screen",n.Overlay="Overlay",n.Darken="Darken",n.Lighten="Lighten",n.ColorDodge="ColorDodge",n.ColorBurn="ColorBurn",n.HardLight="HardLight",n.SoftLight="SoftLight",n.Difference="Difference",n.Exclusion="Exclusion"})(Di||(Di={}));var $s=Un(rx(),1);var ox=[1,0,0,1,0,0];var bc=([n,t,e,i,r,o],[s,a,c,l,d,h])=>[n*s+e*a,t*s+i*a,n*c+e*l,t*c+i*l,n*d+e*h+r,t*d+i*h+o],Yd=([n,t,e,i,r,o],{x:s,y:a})=>({x:n*s+e*a+r,y:t*s+i*a+o}),Jd=(n,t)=>{switch(n){case"scale":case"scaleX":case"scaleY":{let[e,i=e]=t;return[n==="scaleY"?1:e,0,0,n==="scaleX"?1:i,0,0]}case"translate":case"translateX":case"translateY":{let[e,i=e]=t;return[1,0,0,1,n==="translateY"?0:e,n==="translateX"?0:-i]}case"rotate":{let[e,i=0,r=0]=t,o=Jd("translate",[i,r]),s=Jd("translate",[-i,-r]),a=Jt(-e),c=[Math.cos(a),Math.sin(a),-Math.sin(a),Math.cos(a),0,0];return bc(bc(o,c),s)}case"skewY":case"skewX":{let e=Jt(-t[0]),i=Math.tan(e);return[1,n==="skewY"?i:0,n==="skewX"?i:0,1,0,0]}case"matrix":{let[e,i,r,o,s,a]=t,c=Jd("scale",[1,-1]);return bc(bc(c,[e,i,r,o,s,a]),c)}default:return ox}},fr=(n,t,e)=>bc(n,Jd(t,e)),$F={butt:_t.Butt,round:_t.Round,square:_t.Projecting},eP={evenodd:Wi.EvenOdd,nonzero:Wi.NonZero},tP={bevel:yo.Bevel,miter:yo.Miter,round:yo.Round},sx=(n,t)=>({async text(e){let i=e.svgAttributes.textAnchor,r=e.svgAttributes.dominantBaseline,o=e.text.trim().replace(/\s/g," "),s=e.svgAttributes.fontSize||12,a=(f,p)=>{let g=f.fontFamily;if(!g)return;let m=f.fontWeight==="bold"||Number(f.fontWeight)>=700,b=f.fontStyle==="italic",w=(F,v,P)=>p[P+(F?"_bold":"")+(v?"_italic":"")];return w(m,b,g)||w(m,!1,g)||w(!1,b,g)||w(!1,!1,g)||Object.keys(p).find(F=>F.startsWith(g))},c=t.fonts&&a(e.svgAttributes,t.fonts),l=(c||n.getFont()[0]).widthOfTextAtSize(o,s),d=(c||n.getFont()[0]).heightAtSize(s),h=i==="middle"?l/2:i==="end"?l:0,u=r==="text-before-edge"?d:r==="text-after-edge"?-d:r==="middle"?d/2:0;n.drawText(o,{x:-h,y:-u,font:c,size:s,color:e.svgAttributes.fill,opacity:e.svgAttributes.fillOpacity,matrix:e.svgAttributes.matrix,clipSpaces:e.svgAttributes.clipSpaces})},async line(e){n.drawLine({start:{x:e.svgAttributes.x1||0,y:-e.svgAttributes.y1||0},end:{x:e.svgAttributes.x2||0,y:-e.svgAttributes.y2||0},thickness:e.svgAttributes.strokeWidth,color:e.svgAttributes.stroke,opacity:e.svgAttributes.strokeOpacity,lineCap:e.svgAttributes.strokeLineCap,matrix:e.svgAttributes.matrix,clipSpaces:e.svgAttributes.clipSpaces})},async path(e){e.svgAttributes.d&&n.drawSvgPath(e.svgAttributes.d,{x:0,y:0,borderColor:e.svgAttributes.stroke,borderWidth:e.svgAttributes.strokeWidth,borderOpacity:e.svgAttributes.strokeOpacity,borderLineCap:e.svgAttributes.strokeLineCap,color:e.svgAttributes.fill,opacity:e.svgAttributes.fillOpacity,fillRule:e.svgAttributes.fillRule,matrix:fr(e.svgAttributes.matrix,"scale",[1,-1]),clipSpaces:e.svgAttributes.clipSpaces})},async image(e){let{src:i}=e.svgAttributes;if(!i)return;let o=i.match(/\.png(\?|$)|^data:image\/png;base64/gim)?await n.doc.embedPng(i):await n.doc.embedJpg(i),{x:s,y:a,width:c,height:l}=iP(o.width,o.height,e.svgAttributes.width||o.width,e.svgAttributes.height||o.height,e.svgAttributes.preserveAspectRatio);n.drawImage(o,{x:s,y:-a-l,width:c,height:l,opacity:e.svgAttributes.fillOpacity,matrix:e.svgAttributes.matrix,clipSpaces:e.svgAttributes.clipSpaces})},async rect(e){!e.svgAttributes.fill&&!e.svgAttributes.stroke||n.drawRectangle({x:0,y:0,width:e.svgAttributes.width,height:e.svgAttributes.height*-1,borderColor:e.svgAttributes.stroke,borderWidth:e.svgAttributes.strokeWidth,borderOpacity:e.svgAttributes.strokeOpacity,borderLineCap:e.svgAttributes.strokeLineCap,color:e.svgAttributes.fill,opacity:e.svgAttributes.fillOpacity,matrix:e.svgAttributes.matrix,clipSpaces:e.svgAttributes.clipSpaces})},async ellipse(e){n.drawEllipse({x:e.svgAttributes.cx||0,y:-(e.svgAttributes.cy||0),xScale:e.svgAttributes.rx,yScale:e.svgAttributes.ry,borderColor:e.svgAttributes.stroke,borderWidth:e.svgAttributes.strokeWidth,borderOpacity:e.svgAttributes.strokeOpacity,borderLineCap:e.svgAttributes.strokeLineCap,color:e.svgAttributes.fill,opacity:e.svgAttributes.fillOpacity,matrix:e.svgAttributes.matrix,clipSpaces:e.svgAttributes.clipSpaces})},async circle(e){return sx(n,t).ellipse(e)}}),ft=(n,t,e,i)=>{let r=t[e]||n[e];return!r&&typeof i!="undefined"?i:r},ax=n=>{let t=/([^:\s]+)*\s*:\s*([^;]+)/g,e={},i=t.exec(n);for(;i!=null;)e[i[1]]=i[2],i=t.exec(n);return e},dp=(n,t)=>{if(!n||n.length===0||["none","transparent"].includes(n))return;if(n==="currentColor")return t||dp("#000000");let e=Rf(n);return{rgb:e.rgb,alpha:e.alpha?e.alpha+"":void 0}},hp=(n,t,e)=>{var i,r,o,s;let a=n.attributes,c=ax(a.style),l=ft(a,c,"width",""),d=ft(a,c,"height",""),h=dp(ft(a,c,"fill")),u=ft(a,c,"fill-opacity"),f=ft(a,c,"opacity"),p=dp(ft(a,c,"stroke")),g=ft(a,c,"stroke-opacity"),m=ft(a,c,"stroke-linecap"),b=ft(a,c,"stroke-linejoin"),w=ft(a,c,"fill-rule"),F=ft(a,c,"stroke-width"),v=ft(a,c,"font-family"),P=ft(a,c,"font-style"),k=ft(a,c,"font-weight"),C=ft(a,c,"font-size"),D=ut(l,t.width),T=ut(d,t.height),O=ut(a.x,t.width),E=ut(a.y,t.height),V=ut(a.x1,t.width),W=ut(a.x2,t.width),B=ut(a.y1,t.height),U=ut(a.y2,t.height),te=ut(a.cx,t.width),z=ut(a.cy,t.height),re=ut(a.rx||a.r,t.width),Ee=ut(a.ry||a.r,t.height),Ue={fontFamily:v||t.fontFamily,fontStyle:P||t.fontStyle,fontWeight:k||t.fontWeight,fontSize:(i=ut(C))!==null&&i!==void 0?i:t.fontSize,fill:(h==null?void 0:h.rgb)||t.fill,fillOpacity:(r=ut(u||f||(h==null?void 0:h.alpha)))!==null&&r!==void 0?r:t.fillOpacity,fillRule:eP[w]||t.fillRule,stroke:(p==null?void 0:p.rgb)||t.stroke,strokeWidth:(o=ut(F))!==null&&o!==void 0?o:t.strokeWidth,strokeOpacity:(s=ut(g||f||(p==null?void 0:p.alpha)))!==null&&s!==void 0?s:t.strokeOpacity,strokeLineCap:$F[m]||t.strokeLineCap,strokeLineJoin:tP[b]||t.strokeLineJoin,width:D||t.width,height:T||t.height,rotation:t.rotation,viewBox:n.tagName==="svg"&&n.attributes.viewBox?Qd(n.attributes.viewBox):t.viewBox},me={src:a.src||a["xlink:href"],textAnchor:a["text-anchor"],dominantBaseline:a["dominant-baseline"],preserveAspectRatio:a.preserveAspectRatio},Ae=a.transform||"";["translate","translateX","translateY","skewX","skewY","rotate","scale","scaleX","scaleY","matrix"].forEach(ve=>{a[ve]&&(Ae=a[ve]+" "+Ae)}),(O||E)&&(Ae=Ae+`translate(${O||0} ${E||0}) `);let we=e;if(Ae){let ve=/(\w+)\((.+?)\)/g,tn=ve.exec(Ae);for(;tn!==null;){let[,ma,Wt]=tn,Wo=(Wt||"").split(/\s*,\s*|\s+/).filter(Hn=>Hn.length>0).map(Hn=>parseFloat(Hn));we=fr(we,ma,Wo),tn=ve.exec(Ae)}}if(me.x=O,me.y=E,(a.cx||a.cy)&&(me.cx=te,me.cy=z),(a.rx||a.ry||a.r)&&(me.rx=re,me.ry=Ee),(a.x1||a.y1)&&(me.x1=V,me.y1=B),(a.x2||a.y2)&&(me.x2=W,me.y2=U),(a.width||a.height)&&(me.width=D!=null?D:t.width,me.height=T!=null?T:t.height),a.d&&(we=fr(we,"scale",[1,-1]),me.d=a.d),C&&Ue.fontSize&&(Ue.fontSize=Ue.fontSize),Ue.fontFamily){let ve=Ue.fontFamily.match(/^"(.*?)"|^'(.*?)'/);ve&&(Ue.fontFamily=ve[1]||ve[2])}return Ue.strokeWidth&&(me.strokeWidth=Ue.strokeWidth),{inherited:Ue,svgAttributes:me,tagName:n.tagName,matrix:we}},iP=(n,t,e,i,r)=>{if(r==="none")return{x:0,y:0,width:e,height:i};let o=n/t,s=e/i,a=s>o?o*i:e,c=s>=o?i:e/o,l=e-a,d=i-c,[h,u]=(()=>{switch(r){case"xMinYMin":return[0,0];case"xMidYMin":return[l/2,0];case"xMaxYMin":return[l,d/2];case"xMinYMid":return[0,d];case"xMaxYMid":return[l,d/2];case"xMinYMax":return[0,d];case"xMidYMax":return[l/2,d];case"xMaxYMax":return[l,d];case"xMidYMid":default:return[l/2,d/2]}})();return{x:h,y:u,width:a,height:c}},nP=(n,t,e,i,r,o="xMidYMid")=>{let[s,a="meet"]=o.split(" "),c=i/t,l=r/e,d=fr(n,"scale",[c,l]);if(s==="none")return{clipBox:d,content:d};let h=a==="slice"?Math.max(c,l):Math.min(c,l),u=i-t*h,f=r-e*h,[p,g]=(()=>{switch(s){case"xMinYMin":return[0,0];case"xMidYMin":return[u/2,0];case"xMaxYMin":return[u,f/2];case"xMinYMid":return[0,f];case"xMaxYMid":return[u,f/2];case"xMinYMax":return[0,f];case"xMidYMax":return[u/2,f];case"xMaxYMax":return[u,f];case"xMidYMid":default:return[u/2,f/2]}})(),m=fr(fr(n,"translate",[p,g]),"scale",[h]);return{clipBox:d,content:m}},up=(n,t,e,i)=>{if(n.nodeType===$s.NodeType.COMMENT_NODE)return[];if(n.nodeType===$s.NodeType.TEXT_NODE)return[];if(n.tagName==="g")return oP(n,t,e,i);if(n.tagName==="svg")return rP(n,t,e,i);{n.tagName==="polygon"&&(n.tagName="path",n.attributes.d=`M${n.attributes.points}Z`,delete n.attributes.points);let r=hp(n,t,e),o={...r.inherited,...r.svgAttributes,matrix:r.matrix,clipSpaces:i};return Object.assign(n,{svgAttributes:o}),[n]}},rP=(n,t,e,i)=>{var r,o;(r=n.attributes.width)!==null&&r!==void 0||n.setAttribute("width",t.viewBox.width+""),(o=n.attributes.height)!==null&&o!==void 0||n.setAttribute("height",t.viewBox.height+"");let s=hp(n,t,e),a=[],c=n.attributes.viewBox?Qd(n.attributes.viewBox):n.attributes.width&&n.attributes.height?Qd(`0 0 ${n.attributes.width} ${n.attributes.height}`):t.viewBox,l=parseFloat(n.attributes.x)||0,d=parseFloat(n.attributes.y)||0,h=fr(e,"translate",[l,d]),{clipBox:u,content:f}=nP(h,c.width,c.height,parseFloat(n.attributes.width),parseFloat(n.attributes.height),n.attributes.preserveAspectRatio),p=Yd(u,{x:0,y:0}),g=Yd(u,{x:c.width,y:0}),m=Yd(u,{x:c.width,y:-c.height}),b=Yd(u,{x:0,y:-c.height}),w={topLeft:p,topRight:g,bottomRight:m,bottomLeft:b};return h=fr(f,"translate",[-c.x,-c.y]),n.childNodes.forEach(F=>{let v=up(F,{...s.inherited,viewBox:c},h,[...i,w]);a.push(...v)}),a},oP=(n,t,e,i)=>{let r=hp(n,t,e),o=[];return n.childNodes.forEach(s=>{o.push(...up(s,r.inherited,r.matrix,i))}),o},ut=(n,t=1)=>{if(!n)return;let e=parseFloat(n);if(!isNaN(e))return n.endsWith("%")?e*t/100:e},Qd=n=>{if(!n)return;let[t=0,e=0,i=1,r=1]=(n||"").split(" ").map(o=>ut(o));return{x:t,y:e,width:i,height:r}},sP=(n,{width:t,height:e,fontSize:i},r,o)=>{let s=(0,$s.parse)(n).firstChild;return t&&s.setAttribute("width",t+""),e&&s.setAttribute("height",e+""),i&&s.setAttribute("font-size",i+""),up(s,{...r,viewBox:Qd(s.attributes.viewBox||"0 0 1 1")},o,[])},lx=async(n,t,e)=>{if(!t)return;let i=n.getSize(),r=(0,$s.parse)(t).firstChild,o=r.attributes,s=ax(o.style),a=ft(o,s,"width",""),c=ft(o,s,"height",""),l=e.width!==void 0?e.width:parseFloat(a),d=e.height!==void 0?e.height:parseFloat(c);o.viewBox||r.setAttribute("viewBox",`0 0 ${a||l} ${c||d}`),(e.width||e.height)&&(l!==void 0&&(s.width=l+(isNaN(l)?"":"px")),d!==void 0&&(s.height=d+(isNaN(d)?"":"px")),r.setAttribute("style",Object.entries(s).map(([p,g])=>`${p}:${g};`).join("")));let h=[1,0,0,1,e.x||0,e.y||0],u=sx(n,e);await sP(r.outerHTML,e,i,h).reduce(async(p,g)=>{var m;return await p,(m=u[g.tagName])===null||m===void 0?void 0:m.call(u,g)},Promise.resolve())};var Pe=class{constructor(t,e,i){this.fontSize=24,this.fontColor=ne(0,0,0),this.lineHeight=24,this.x=0,this.y=0,S(t,"leafNode",[[tt,"PDFPageLeaf"]]),S(e,"ref",[[q,"PDFRef"]]),S(i,"doc",[[pe,"PDFDocument"]]),this.node=t,this.ref=e,this.doc=i}setRotation(t){let e=jl(t);Xa(e,"degreesAngle",90),this.node.set(x.of("Rotate"),this.doc.context.obj(e))}getRotation(){let t=this.node.Rotate();return X(t?t.asNumber():0)}setSize(t,e){S(t,"width",["number"]),S(e,"height",["number"]);let i=this.getMediaBox();this.setMediaBox(i.x,i.y,t,e);let r=this.getCropBox(),o=this.getBleedBox(),s=this.getTrimBox(),a=this.getArtBox(),c=this.node.CropBox(),l=this.node.BleedBox(),d=this.node.TrimBox(),h=this.node.ArtBox();c&&ss(r,i)&&this.setCropBox(i.x,i.y,t,e),l&&ss(o,i)&&this.setBleedBox(i.x,i.y,t,e),d&&ss(s,i)&&this.setTrimBox(i.x,i.y,t,e),h&&ss(a,i)&&this.setArtBox(i.x,i.y,t,e)}setWidth(t){S(t,"width",["number"]),this.setSize(t,this.getSize().height)}setHeight(t){S(t,"height",["number"]),this.setSize(this.getSize().width,t)}setMediaBox(t,e,i,r){S(t,"x",["number"]),S(e,"y",["number"]),S(i,"width",["number"]),S(r,"height",["number"]);let o=this.doc.context.obj([t,e,t+i,e+r]);this.node.set(x.MediaBox,o)}setCropBox(t,e,i,r){S(t,"x",["number"]),S(e,"y",["number"]),S(i,"width",["number"]),S(r,"height",["number"]);let o=this.doc.context.obj([t,e,t+i,e+r]);this.node.set(x.CropBox,o)}setBleedBox(t,e,i,r){S(t,"x",["number"]),S(e,"y",["number"]),S(i,"width",["number"]),S(r,"height",["number"]);let o=this.doc.context.obj([t,e,t+i,e+r]);this.node.set(x.BleedBox,o)}setTrimBox(t,e,i,r){S(t,"x",["number"]),S(e,"y",["number"]),S(i,"width",["number"]),S(r,"height",["number"]);let o=this.doc.context.obj([t,e,t+i,e+r]);this.node.set(x.TrimBox,o)}setArtBox(t,e,i,r){S(t,"x",["number"]),S(e,"y",["number"]),S(i,"width",["number"]),S(r,"height",["number"]);let o=this.doc.context.obj([t,e,t+i,e+r]);this.node.set(x.ArtBox,o)}getSize(){let{width:t,height:e}=this.getMediaBox();return{width:t,height:e}}getWidth(){return this.getSize().width}getHeight(){return this.getSize().height}getMediaBox(){return this.node.MediaBox().asRectangle()}getCropBox(){var t;let e=this.node.CropBox();return(t=e==null?void 0:e.asRectangle())!==null&&t!==void 0?t:this.getMediaBox()}getBleedBox(){var t;let e=this.node.BleedBox();return(t=e==null?void 0:e.asRectangle())!==null&&t!==void 0?t:this.getCropBox()}getTrimBox(){var t;let e=this.node.TrimBox();return(t=e==null?void 0:e.asRectangle())!==null&&t!==void 0?t:this.getCropBox()}getArtBox(){var t;let e=this.node.ArtBox();return(t=e==null?void 0:e.asRectangle())!==null&&t!==void 0?t:this.getCropBox()}translateContent(t,e){S(t,"x",["number"]),S(e,"y",["number"]),this.node.normalize(),this.getContentStream();let i=this.createContentStream(Ne(),mt(t,e)),r=this.doc.context.register(i),o=this.createContentStream(Re()),s=this.doc.context.register(o);this.node.wrapContentStreams(r,s)}scale(t,e){S(t,"x",["number"]),S(e,"y",["number"]),this.setSize(this.getWidth()*t,this.getHeight()*e),this.scaleContent(t,e),this.scaleAnnotations(t,e)}scaleContent(t,e){S(t,"x",["number"]),S(e,"y",["number"]),this.node.normalize(),this.getContentStream();let i=this.createContentStream(Ne(),ar(t,e)),r=this.doc.context.register(i),o=this.createContentStream(Re()),s=this.doc.context.register(o);this.node.wrapContentStreams(r,s)}scaleAnnotations(t,e){S(t,"x",["number"]),S(e,"y",["number"]);let i=this.node.Annots();if(i)for(let r=0;r<i.size();r++){let o=i.lookup(r);o instanceof R&&this.scaleAnnot(o,t,e)}}resetPosition(){this.getContentStream(!1),this.x=0,this.y=0}setFont(t){S(t,"font",[[Se,"PDFFont"]]),this.font=t,this.fontKey=this.node.newFontDictionary(this.font.name,this.font.ref)}setFontSize(t){S(t,"fontSize",["number"]),this.fontSize=t}setFontColor(t){S(t,"fontColor",[[Object,"Color"]]),this.fontColor=t}setLineHeight(t){S(t,"lineHeight",["number"]),this.lineHeight=t}getPosition(){return{x:this.x,y:this.y}}getX(){return this.x}getY(){return this.y}moveTo(t,e){S(t,"x",["number"]),S(e,"y",["number"]),this.x=t,this.y=e}moveDown(t){S(t,"yDecrease",["number"]),this.y-=t}moveUp(t){S(t,"yIncrease",["number"]),this.y+=t}moveLeft(t){S(t,"xDecrease",["number"]),this.x-=t}moveRight(t){S(t,"xIncrease",["number"]),this.x+=t}pushOperators(...t){Ga(t,"operator",[[_,"PDFOperator"]]),this.getContentStream().push(...t)}drawText(t,e={}){var i,r,o,s,a,c,l;S(t,"text",["string"]),I(e.color,"options.color",[[Object,"Color"]]),Ct(e.opacity,"opacity.opacity",0,1),I(e.font,"options.font",[[Se,"PDFFont"]]),I(e.size,"options.size",["number"]),I(e.rotate,"options.rotate",[[Object,"Rotation"]]),I(e.xSkew,"options.xSkew",[[Object,"Rotation"]]),I(e.ySkew,"options.ySkew",[[Object,"Rotation"]]),I(e.x,"options.x",["number"]),I(e.y,"options.y",["number"]),I(e.lineHeight,"options.lineHeight",["number"]),I(e.maxWidth,"options.maxWidth",["number"]),I(e.wordBreaks,"options.wordBreaks",[Array]),gt(e.blendMode,"options.blendMode",Di),I(e.strokeColor,"options.strokeColor",[[Object,"Color"]]),I(e.strokeWidth,"options.strokeWidth",["number"]),I(e.renderMode,"options.renderMode",["number"]);let{oldFont:d,newFont:h,newFontKey:u}=this.setOrEmbedFont(e.font),f=e.size||this.fontSize,p=e.wordBreaks||this.doc.defaultWordBreaks,g=v=>h.widthOfTextAtSize(v,f),m=e.maxWidth===void 0?wa(zn(t)):iu(t,p,e.maxWidth,g),b=new Array(m.length);for(let v=0,P=m.length;v<P;v++)b[v]=h.encodeText(m[v]);let w=this.maybeEmbedGraphicsState({opacity:e.opacity,blendMode:e.blendMode});this.getContentStream().push(...Uf(b,{color:(i=e.color)!==null&&i!==void 0?i:this.fontColor,font:u,size:f,rotate:(r=e.rotate)!==null&&r!==void 0?r:X(0),xSkew:(o=e.xSkew)!==null&&o!==void 0?o:X(0),ySkew:(s=e.ySkew)!==null&&s!==void 0?s:X(0),x:(a=e.x)!==null&&a!==void 0?a:this.x,y:(c=e.y)!==null&&c!==void 0?c:this.y,lineHeight:(l=e.lineHeight)!==null&&l!==void 0?l:this.lineHeight,graphicsState:w,matrix:e.matrix,clipSpaces:e.clipSpaces,strokeColor:e.strokeColor,strokeWidth:e.strokeWidth,renderMode:e.renderMode})),e.font&&(d?this.setFont(d):this.resetFont())}drawImage(t,e={}){var i,r,o,s,a,c,l;S(t,"image",[[oi,"PDFImage"]]),I(e.x,"options.x",["number"]),I(e.y,"options.y",["number"]),I(e.width,"options.width",["number"]),I(e.height,"options.height",["number"]),I(e.rotate,"options.rotate",[[Object,"Rotation"]]),I(e.xSkew,"options.xSkew",[[Object,"Rotation"]]),I(e.ySkew,"options.ySkew",[[Object,"Rotation"]]),Ct(e.opacity,"opacity.opacity",0,1),gt(e.blendMode,"options.blendMode",Di);let d=this.node.newXObject("Image",t.ref),h=this.maybeEmbedGraphicsState({opacity:e.opacity,blendMode:e.blendMode});this.getContentStream().push(...rc(d,{x:(i=e.x)!==null&&i!==void 0?i:this.x,y:(r=e.y)!==null&&r!==void 0?r:this.y,width:(o=e.width)!==null&&o!==void 0?o:t.size().width,height:(s=e.height)!==null&&s!==void 0?s:t.size().height,rotate:(a=e.rotate)!==null&&a!==void 0?a:X(0),xSkew:(c=e.xSkew)!==null&&c!==void 0?c:X(0),ySkew:(l=e.ySkew)!==null&&l!==void 0?l:X(0),graphicsState:h,matrix:e.matrix,clipSpaces:e.clipSpaces}))}drawPage(t,e={}){var i,r,o,s,a;S(t,"embeddedPage",[[Pi,"PDFEmbeddedPage"]]),I(e.x,"options.x",["number"]),I(e.y,"options.y",["number"]),I(e.xScale,"options.xScale",["number"]),I(e.yScale,"options.yScale",["number"]),I(e.width,"options.width",["number"]),I(e.height,"options.height",["number"]),I(e.rotate,"options.rotate",[[Object,"Rotation"]]),I(e.xSkew,"options.xSkew",[[Object,"Rotation"]]),I(e.ySkew,"options.ySkew",[[Object,"Rotation"]]),Ct(e.opacity,"opacity.opacity",0,1),gt(e.blendMode,"options.blendMode",Di);let c=this.node.newXObject("EmbeddedPdfPage",t.ref),l=this.maybeEmbedGraphicsState({opacity:e.opacity,blendMode:e.blendMode}),d=e.width!==void 0?e.width/t.width:e.xScale!==void 0?e.xScale:1,h=e.height!==void 0?e.height/t.height:e.yScale!==void 0?e.yScale:1;this.getContentStream().push(...zf(c,{x:(i=e.x)!==null&&i!==void 0?i:this.x,y:(r=e.y)!==null&&r!==void 0?r:this.y,xScale:d,yScale:h,rotate:(o=e.rotate)!==null&&o!==void 0?o:X(0),xSkew:(s=e.xSkew)!==null&&s!==void 0?s:X(0),ySkew:(a=e.ySkew)!==null&&a!==void 0?a:X(0),graphicsState:l}))}drawSvgPath(t,e={}){var i,r,o,s,a,c,l,d,h;S(t,"path",["string"]),I(e.x,"options.x",["number"]),I(e.y,"options.y",["number"]),I(e.scale,"options.scale",["number"]),I(e.rotate,"options.rotate",[[Object,"Rotation"]]),I(e.borderWidth,"options.borderWidth",["number"]),I(e.color,"options.color",[[Object,"Color"]]),Ct(e.opacity,"opacity.opacity",0,1),I(e.borderColor,"options.borderColor",[[Object,"Color"]]),I(e.borderDashArray,"options.borderDashArray",[Array]),I(e.borderDashPhase,"options.borderDashPhase",["number"]),gt(e.borderLineCap,"options.borderLineCap",_t),Ct(e.borderOpacity,"options.borderOpacity",0,1),gt(e.blendMode,"options.blendMode",Di),gt(e.fillRule,"options.fillRule",Wi);let u=this.maybeEmbedGraphicsState({opacity:e.opacity,borderOpacity:e.borderOpacity,blendMode:e.blendMode});!("color"in e)&&!("borderColor"in e)&&(e.borderColor=ne(0,0,0)),this.getContentStream().push(...Wf(t,{x:(i=e.x)!==null&&i!==void 0?i:this.x,y:(r=e.y)!==null&&r!==void 0?r:this.y,scale:e.scale,rotate:(o=e.rotate)!==null&&o!==void 0?o:X(0),color:(s=e.color)!==null&&s!==void 0?s:void 0,borderColor:(a=e.borderColor)!==null&&a!==void 0?a:void 0,borderWidth:(c=e.borderWidth)!==null&&c!==void 0?c:0,borderDashArray:(l=e.borderDashArray)!==null&&l!==void 0?l:void 0,borderDashPhase:(d=e.borderDashPhase)!==null&&d!==void 0?d:void 0,borderLineCap:(h=e.borderLineCap)!==null&&h!==void 0?h:void 0,graphicsState:u,fillRule:e.fillRule,matrix:e.matrix,clipSpaces:e.clipSpaces}))}drawLine(t){var e,i,r,o,s;S(t.start,"options.start",[[Object,"{ x: number, y: number }"]]),S(t.end,"options.end",[[Object,"{ x: number, y: number }"]]),S(t.start.x,"options.start.x",["number"]),S(t.start.y,"options.start.y",["number"]),S(t.end.x,"options.end.x",["number"]),S(t.end.y,"options.end.y",["number"]),I(t.thickness,"options.thickness",["number"]),I(t.color,"options.color",[[Object,"Color"]]),I(t.dashArray,"options.dashArray",[Array]),I(t.dashPhase,"options.dashPhase",["number"]),gt(t.lineCap,"options.lineCap",_t),Ct(t.opacity,"opacity.opacity",0,1),gt(t.blendMode,"options.blendMode",Di);let a=this.maybeEmbedGraphicsState({borderOpacity:t.opacity,blendMode:t.blendMode});"color"in t||(t.color=ne(0,0,0)),this.getContentStream().push(...qf({start:t.start,end:t.end,thickness:(e=t.thickness)!==null&&e!==void 0?e:1,color:(i=t.color)!==null&&i!==void 0?i:void 0,dashArray:(r=t.dashArray)!==null&&r!==void 0?r:void 0,dashPhase:(o=t.dashPhase)!==null&&o!==void 0?o:void 0,lineCap:(s=t.lineCap)!==null&&s!==void 0?s:void 0,graphicsState:a,matrix:t.matrix,clipSpaces:t.clipSpaces}))}drawRectangle(t={}){var e,i,r,o,s,a,c,l,d,h,u,f,p;I(t.x,"options.x",["number"]),I(t.y,"options.y",["number"]),I(t.width,"options.width",["number"]),I(t.height,"options.height",["number"]),I(t.rotate,"options.rotate",[[Object,"Rotation"]]),I(t.xSkew,"options.xSkew",[[Object,"Rotation"]]),I(t.ySkew,"options.ySkew",[[Object,"Rotation"]]),I(t.borderWidth,"options.borderWidth",["number"]),I(t.color,"options.color",[[Object,"Color"]]),Ct(t.opacity,"opacity.opacity",0,1),I(t.borderColor,"options.borderColor",[[Object,"Color"]]),I(t.borderDashArray,"options.borderDashArray",[Array]),I(t.borderDashPhase,"options.borderDashPhase",["number"]),gt(t.borderLineCap,"options.borderLineCap",_t),Ct(t.borderOpacity,"options.borderOpacity",0,1),gt(t.blendMode,"options.blendMode",Di);let g=this.maybeEmbedGraphicsState({opacity:t.opacity,borderOpacity:t.borderOpacity,blendMode:t.blendMode});!("color"in t)&&!("borderColor"in t)&&(t.color=ne(0,0,0)),this.getContentStream().push(...dr({x:(e=t.x)!==null&&e!==void 0?e:this.x,y:(i=t.y)!==null&&i!==void 0?i:this.y,width:(r=t.width)!==null&&r!==void 0?r:150,height:(o=t.height)!==null&&o!==void 0?o:100,rotate:(s=t.rotate)!==null&&s!==void 0?s:X(0),xSkew:(a=t.xSkew)!==null&&a!==void 0?a:X(0),ySkew:(c=t.ySkew)!==null&&c!==void 0?c:X(0),borderWidth:(l=t.borderWidth)!==null&&l!==void 0?l:0,color:(d=t.color)!==null&&d!==void 0?d:void 0,borderColor:(h=t.borderColor)!==null&&h!==void 0?h:void 0,borderDashArray:(u=t.borderDashArray)!==null&&u!==void 0?u:void 0,borderDashPhase:(f=t.borderDashPhase)!==null&&f!==void 0?f:void 0,graphicsState:g,borderLineCap:(p=t.borderLineCap)!==null&&p!==void 0?p:void 0,matrix:t.matrix,clipSpaces:t.clipSpaces}))}drawSquare(t={}){let{size:e}=t;I(e,"size",["number"]),this.drawRectangle({...t,width:e,height:e})}drawEllipse(t={}){var e,i,r,o,s,a,c,l,d,h,u;I(t.x,"options.x",["number"]),I(t.y,"options.y",["number"]),I(t.xScale,"options.xScale",["number"]),I(t.yScale,"options.yScale",["number"]),I(t.rotate,"options.rotate",[[Object,"Rotation"]]),I(t.color,"options.color",[[Object,"Color"]]),Ct(t.opacity,"opacity.opacity",0,1),I(t.borderColor,"options.borderColor",[[Object,"Color"]]),Ct(t.borderOpacity,"options.borderOpacity",0,1),I(t.borderWidth,"options.borderWidth",["number"]),I(t.borderDashArray,"options.borderDashArray",[Array]),I(t.borderDashPhase,"options.borderDashPhase",["number"]),gt(t.borderLineCap,"options.borderLineCap",_t),gt(t.blendMode,"options.blendMode",Di);let f=this.maybeEmbedGraphicsState({opacity:t.opacity,borderOpacity:t.borderOpacity,blendMode:t.blendMode});!("color"in t)&&!("borderColor"in t)&&(t.color=ne(0,0,0)),this.getContentStream().push(...nc({x:(e=t.x)!==null&&e!==void 0?e:this.x,y:(i=t.y)!==null&&i!==void 0?i:this.y,xScale:(r=t.xScale)!==null&&r!==void 0?r:100,yScale:(o=t.yScale)!==null&&o!==void 0?o:100,rotate:(s=t.rotate)!==null&&s!==void 0?s:void 0,color:(a=t.color)!==null&&a!==void 0?a:void 0,borderColor:(c=t.borderColor)!==null&&c!==void 0?c:void 0,borderWidth:(l=t.borderWidth)!==null&&l!==void 0?l:0,borderDashArray:(d=t.borderDashArray)!==null&&d!==void 0?d:void 0,borderDashPhase:(h=t.borderDashPhase)!==null&&h!==void 0?h:void 0,borderLineCap:(u=t.borderLineCap)!==null&&u!==void 0?u:void 0,graphicsState:f,matrix:t.matrix,clipSpaces:t.clipSpaces}))}drawCircle(t={}){let{size:e=100}=t;I(e,"size",["number"]),this.drawEllipse({...t,xScale:e,yScale:e})}setOrEmbedFont(t){let e=this.font,i=this.fontKey;t?this.setFont(t):this.getFont();let r=this.font,o=this.fontKey;return{oldFont:e,oldFontKey:i,newFont:r,newFontKey:o}}async drawSvg(t,e={}){var i,r;S(t,"svg",["string"]),I(e.x,"options.x",["number"]),I(e.y,"options.y",["number"]),I(e.width,"options.width",["number"]),I(e.height,"options.height",["number"]),await lx(this,t,{x:(i=e.x)!==null&&i!==void 0?i:this.x,y:(r=e.y)!==null&&r!==void 0?r:this.y,fonts:e.fonts,width:e.width,height:e.height})}getFont(){if(!this.font||!this.fontKey){let t=this.doc.embedStandardFont(Do.Helvetica);this.setFont(t)}return[this.font,this.fontKey]}resetFont(){this.font=void 0,this.fontKey=void 0}getContentStream(t=!0){return t&&this.contentStream?this.contentStream:(this.contentStream=this.createContentStream(),this.contentStreamRef=this.doc.context.register(this.contentStream),this.node.addContentStream(this.contentStreamRef),this.contentStream)}createContentStream(...t){let e=this.doc.context.obj({});return Hi.of(e,t)}maybeEmbedGraphicsState(t){let{opacity:e,borderOpacity:i,blendMode:r}=t;if(e===void 0&&i===void 0&&r===void 0)return;let o=this.doc.context.obj({Type:"ExtGState",ca:e,CA:i,BM:r});return this.node.newExtGState("GS",o)}scaleAnnot(t,e,i){let r=["RD","CL","Vertices","QuadPoints","L","Rect"];for(let s=0,a=r.length;s<a;s++){let c=t.lookup(x.of(r[s]));c instanceof H&&c.scalePDFNumbers(e,i)}let o=t.lookup(x.of("InkList"));if(o instanceof H)for(let s=0,a=o.size();s<a;s++){let c=o.lookup(s);c instanceof H&&c.scalePDFNumbers(e,i)}}};Pe.of=(n,t,e)=>new Pe(n,t,e);Pe.create=n=>{S(n,"doc",[[pe,"PDFDocument"]]);let t=q.of(-1),e=tt.withContextAndParent(n.context,t),i=n.context.register(e);return new Pe(e,i,n)};var hi=class extends $e{constructor(t,e,i){super(t,e,i),S(t,"acroButton",[[vn,"PDFAcroPushButton"]]),this.acroField=t}setImage(t,e=si.Center){let i=this.acroField.getWidgets();for(let r=0,o=i.length;r<o;r++){let s=i[r],a=this.createImageAppearanceStream(s,t,e);this.updateWidgetAppearances(s,{normal:a})}this.markAsClean()}setFontSize(t){ln(t,"fontSize"),this.acroField.setFontSize(t),this.markAsDirty()}addToPage(t,e,i){var r,o,s,a,c,l,d,h,u,f,p;I(t,"text",["string"]),I(e,"page",[[Pe,"PDFPage"]]),ai(i);let g=this.createWidget({x:((r=i==null?void 0:i.x)!==null&&r!==void 0?r:0)-((o=i==null?void 0:i.borderWidth)!==null&&o!==void 0?o:0)/2,y:((s=i==null?void 0:i.y)!==null&&s!==void 0?s:0)-((a=i==null?void 0:i.borderWidth)!==null&&a!==void 0?a:0)/2,width:(c=i==null?void 0:i.width)!==null&&c!==void 0?c:100,height:(l=i==null?void 0:i.height)!==null&&l!==void 0?l:50,textColor:(d=i==null?void 0:i.textColor)!==null&&d!==void 0?d:ne(0,0,0),backgroundColor:(h=i==null?void 0:i.backgroundColor)!==null&&h!==void 0?h:ne(.75,.75,.75),borderColor:i==null?void 0:i.borderColor,borderWidth:(u=i==null?void 0:i.borderWidth)!==null&&u!==void 0?u:0,rotate:(f=i==null?void 0:i.rotate)!==null&&f!==void 0?f:X(0),caption:t,hidden:i==null?void 0:i.hidden,page:e.ref}),m=this.doc.context.register(g.dict);this.acroField.addWidget(m);let b=(p=i==null?void 0:i.font)!==null&&p!==void 0?p:this.doc.getForm().getDefaultFont();this.updateWidgetAppearance(g,b),e.node.addAnnot(m)}needsAppearancesUpdate(){var t;if(this.isDirty())return!0;let e=this.acroField.getWidgets();for(let i=0,r=e.length;i<r;i++)if(!(((t=e[i].getAppearances())===null||t===void 0?void 0:t.normal)instanceof Fe))return!0;return!1}defaultUpdateAppearances(t){S(t,"font",[[Se,"PDFFont"]]),this.updateAppearances(t)}updateAppearances(t,e){S(t,"font",[[Se,"PDFFont"]]),I(e,"provider",[Function]);let i=this.acroField.getWidgets();for(let r=0,o=i.length;r<o;r++){let s=i[r];this.updateWidgetAppearance(s,t,e)}}updateWidgetAppearance(t,e,i){let r=i!=null?i:Jf,o=Rt(r(this,t,e));this.updateWidgetAppearanceWithFont(t,e,o)}};hi.of=(n,t,e)=>new hi(n,t,e);function Ze(n,t){let e=Object.keys(t).map(i=>aP(n,i,t[i]));return e.length===1?e[0]:function(){e.forEach(i=>i())}}function aP(n,t,e){let i=n[t],r=n.hasOwnProperty(t),o=r?i:function(){return Object.getPrototypeOf(n)[t].apply(this,arguments)},s=e(o);return i&&Object.setPrototypeOf(s,i),Object.setPrototypeOf(a,s),n[t]=a,c;function a(...l){return s===o&&n[t]===a&&c(),s.apply(this,l)}function c(){n[t]===a&&(r?n[t]=o:delete n[t]),s!==o&&(s=o,Object.setPrototypeOf(a,i||Function))}}var he=require("obsidian");var _d=require("obsidian"),rt=class extends _d.Modal{constructor(e){super(e.app);this.plugin=e,this.lib=e.lib,this.component=new _d.Component,this.contentEl.addClass("pdf-plus-modal")}onOpen(){this.component.load()}onClose(){this.contentEl.empty(),this.component.unload()}};var Zi=require("obsidian");var Hp={};Yh(Hp,{BidirectionalMultiValuedMap:()=>vc,CommandSuggest:()=>wc,FuzzyFileSuggest:()=>yc,FuzzyFolderSuggest:()=>mr,FuzzyInputSuggest:()=>gr,FuzzyMarkdownFileSuggest:()=>xc,MODIFIERS:()=>Sp,MultiValuedMap:()=>Ut,MutationObservingChild:()=>kc,areOverlapping:()=>Rp,areOverlappingStrictly:()=>Vp,binarySearch:()=>Gi,binarySearchForRangeStartingWith:()=>Np,camelCaseToKebabCase:()=>Fp,capitalize:()=>uP,cropCanvas:()=>bp,dispatchMouseEvent:()=>vp,doubleClick:()=>ih,encodeLinktext:()=>xr,evalInContext:()=>Bp,findReferenceCache:()=>Ip,focusObsidian:()=>Ac,formatAnnotationID:()=>Tc,genId:()=>Pp,getBorderRadius:()=>mp,getCJKRegexp:()=>ux,getCharacterBoundingBoxes:()=>dx,getCharactersWithBoundingBoxesInPDFCoords:()=>Dp,getDirectPDFObj:()=>et,getEventCoords:()=>eh,getFirstTextNodeIn:()=>pP,getInstallerVersion:()=>Ap,getModifierDictInPlatform:()=>Cp,getModifierNameInPlatform:()=>In,getNodeAndOffsetOfTextPos:()=>ea,getObsidianDefaultHighlightColorRGB:()=>lP,getOffsetInTextLayerNode:()=>rh,getPathSeparator:()=>gP,getSubpathWithoutHash:()=>Op,getTextLayerNode:()=>nh,getWordAt:()=>fP,hexToRgb:()=>pr,hookInternalLinkMouseEventHandlers:()=>Fc,hover:()=>dP,isAncestorOf:()=>Mp,isCanvas:()=>ia,isCitationId:()=>sh,isEmbed:()=>Ec,isHexString:()=>Ki,isHoverEditor:()=>hx,isHoverPopover:()=>na,isModifierName:()=>Tp,isMouseEventExternal:()=>fi,isNonEmbedLike:()=>On,isSelectionForward:()=>Xi,isTargetElement:()=>cx,isTargetHTMLElement:()=>vt,isTargetNode:()=>th,isTypable:()=>xp,isVersionNewerThan:()=>Sc,isVersionOlderThan:()=>Ep,kebabCaseToCamelCase:()=>hP,onModKeyPress:()=>wp,paramsToSubpath:()=>Cc,parsePDFSubpath:()=>Ln,range:()=>kp,registerCharacterKeymap:()=>mP,removeExtension:()=>Lp,repeat:()=>No,repeatable:()=>ah,rgbStringToObject:()=>gp,rgbToHex:()=>pp,rotateCanvas:()=>$d,showChildElOnParentElHover:()=>Pc,showMenuUnderParentEl:()=>An,stringCompare:()=>Mo,subpathToParams:()=>ta,swapSelectionAnchorAndFocus:()=>Dc,toPDFCoords:()=>oh,toSingleLine:()=>Ic});var It=require("obsidian");function Ki(n){return n.length===7&&n.startsWith("#")}function pr(n){let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}function pp(n){let{r:t,g:e,b:i}=n;return"#"+(1<<24|t<<16|e<<8|i).toString(16).slice(1)}function gp(n){let[t,e,i]=n.split(",").map(r=>parseInt(r.trim()));return{r:t,g:e,b:i}}function lP(){let[n,t,e]=getComputedStyle(document.body).getPropertyValue("--text-highlight-bg-rgb").split(",").map(i=>parseInt(i.trim()));return{r:n,g:t,b:e}}function mp(){let n=getComputedStyle(document.body).getPropertyValue("--radius-s");if(n.endsWith("px")){let t=parseInt(n.slice(0,-2));if(!isNaN(t))return t}return 0}var Ht=require("obsidian"),cP={blurOnSelect:!0,closeOnSelect:!0},gr=class extends Ht.AbstractInputSuggest{constructor(e,i,r){super(e,i);this.inputEl=i,this.options=Object.assign(cP,r)}getSuggestions(e){let i=(0,Ht.prepareFuzzySearch)(e.trim()),r=this.getItems(),o=[];for(let s of r){let a=i(this.getItemText(s));a&&o.push({match:a,item:s})}return(0,Ht.sortSearchResults)(o),o}renderSuggestion(e,i){(0,Ht.renderResults)(i,this.getItemText(e.item),e.match)}selectSuggestion(e,i){super.selectSuggestion(e,i),this.inputEl.value=this.getItemText(e.item),this.options.blurOnSelect&&this.inputEl.blur(),this.options.closeOnSelect&&this.close()}},xc=class extends gr{getItems(){return this.app.vault.getMarkdownFiles()}getItemText(t){return t.path}},yc=class extends gr{getItems(){return this.app.vault.getFiles()}getItemText(t){return t.path}},mr=class extends gr{getItems(){return this.app.vault.getAllLoadedFiles().filter(t=>t instanceof Ht.TFolder)}getItemText(t){return t.path}},wc=class extends Ht.AbstractInputSuggest{constructor(e,i){super(e.plugin.app,i);this.inputEl=i,this.plugin=e.plugin,this.tab=e}getSuggestions(e){let i=(0,Ht.prepareFuzzySearch)(e),r=Object.values(this.plugin.app.commands.commands),o=[];for(let s of r){let a=i(s.name);a&&o.push({match:a,command:s})}return(0,Ht.sortSearchResults)(o),o.map(({command:s})=>s)}renderSuggestion(e,i){i.setText(e.name)}selectSuggestion(e){this.inputEl.blur(),this.plugin.settings.commandToExecuteWhenTargetNotIdentified=e.id,this.inputEl.value=e.name,this.close(),this.plugin.saveSettings(),this.tab.redisplay()}};var Ut=class{constructor(){this.map=new Map}addValue(t,e){let i=this.map.get(t);i||(i=new Set,this.map.set(t,i)),i.add(e)}get(t){var e;return(e=this.map.get(t))!=null?e:new Set}delete(t){this.map.delete(t)}deleteValue(t,e){let i=this.map.get(t);i&&(i.delete(e),i.size===0&&this.map.delete(t))}has(t){return this.map.has(t)&&this.map.get(t).size>0}[Symbol.iterator](){return this.map[Symbol.iterator]()}},vc=class{constructor(){this.keyToValues=new Map;this.valueToKeys=new Map}addValue(t,e){this.keyToValues.has(t)||this.keyToValues.set(t,new Set),this.keyToValues.get(t).add(e),this.valueToKeys.has(e)||this.valueToKeys.set(e,new Set),this.valueToKeys.get(e).add(t)}get(t){var e;return(e=this.keyToValues.get(t))!=null?e:new Set}getKeys(t){var e;return(e=this.valueToKeys.get(t))!=null?e:new Set}delete(t){let e=this.keyToValues.get(t);if(e)for(let i of e){let r=this.valueToKeys.get(i);if(!r)throw new Error("Value has no keys");r.delete(t),r.size===0&&this.valueToKeys.delete(i)}this.keyToValues.delete(t)}deleteValue(t){let e=this.valueToKeys.get(t);if(e)for(let i of e){let r=this.keyToValues.get(i);if(!r)throw new Error("Key has no values");r.delete(t),r.size===0&&this.keyToValues.delete(i)}this.valueToKeys.delete(t)}has(t){return this.keyToValues.has(t)&&this.keyToValues.get(t).size>0}hasValue(t){return this.valueToKeys.has(t)&&this.valueToKeys.get(t).size>0}keys(){return this.keyToValues.keys()}values(){return this.valueToKeys.keys()}};function bp(n,t,e={width:t.width,height:t.height}){let i=createEl("canvas");return i.width=e.width,i.height=e.height,i.getContext("2d").drawImage(n,t.left,t.top,t.width,t.height,0,0,e.width,e.height),i}function $d(n,t){if(t=(t%360+360)%360,![0,90,180,270].includes(t))throw new Error("rotate must be 0, 90, 180, or 270");if(!t)return n;let e=createEl("canvas"),i=e.getContext("2d");return t===90||t===270?(e.width=n.height,e.height=n.width):(e.width=n.width,e.height=n.height),i.translate(e.width/2,e.height/2),i.rotate(t*Math.PI/180),i.drawImage(n,-n.width/2,-n.height/2),e}var br=require("obsidian");function Fc(n,t,e){t.querySelectorAll("a.internal-link").forEach(i=>{i.addEventListener("click",r=>{r.preventDefault();let o=i.getAttribute("href");o&&n.workspace.openLinkText(o,e,br.Keymap.isModEvent(r))}),i.addEventListener("mouseover",r=>{r.preventDefault();let o=i.getAttribute("href");o&&n.workspace.trigger("hover-link",{event:r,source:"preview",hoverParent:{hoverPopover:null},targetEl:r.currentTarget,linktext:o,sourcePath:e})})})}function fi(n,t){return!n.relatedTarget||cx(n,n.relatedTarget)&&!t.contains(n.relatedTarget)}function xp(n){return n.nodeName==="INPUT"||n.instanceOf(HTMLElement)&&n.contentEditable==="true"}function eh(n){return n.instanceOf(MouseEvent)?{x:n.clientX,y:n.clientY}:{x:n.touches[0].clientX,y:n.touches[0].clientY}}function yp(n,t,e){let i=t[e];return n instanceof i}function th(n,t){return!!t&&(t instanceof Node||yp(t,n.win,"Node"))}function cx(n,t){return!!t&&(t instanceof Element||yp(t,n.win,"Element"))}function vt(n,t){return!!t&&(t instanceof HTMLElement||yp(t,n.win,"HTMLElement"))}function wp(n,t,e){if(br.Keymap.isModifier(n,"Mod")){e();return}let i=n.doc,r=!1,o=()=>{r=!0,i.removeEventListener("keydown",s),i.removeEventListener("mouseover",a),i.removeEventListener("mouseleave",c)},s=l=>{r||(i.body.contains(t)?br.Keymap.isModifier(l,"Mod")&&(o(),e()):o())},a=l=>{r||th(l,l.target)&&!t.contains(l.target)&&o()},c=l=>{r||l.target===i&&o()};i.addEventListener("keydown",s),i.addEventListener("mouseover",a),i.addEventListener("mouseleave",c)}function Pc(n){let{parentEl:t,createChildEl:e,removeChildEl:i,component:r,timeout:o}=n,s=a=>{if(fi(a,t)){let c=!0,l=!1,d=e(),h=new br.Component;r==null||r.addChild(h),h.register(()=>d&&i(d)),h.load();let u=()=>setTimeout(()=>{!c&&!l&&h.unload()},o!=null?o:120),f=p=>{fi(p,t)&&(c=!1,u())};h.registerDomEvent(t,"mouseout",f),d&&h.registerDomEvent(d,"mouseover",p=>{if(fi(p,d)){l=!0;let g=m=>{fi(m,d)&&(l=!1,u())};h.registerDomEvent(d,"mouseout",g)}})}};t.addEventListener("mouseover",s)}function vp(n,t,e){n.dispatchEvent(new MouseEvent(t,{bubbles:!0,...e}))}function ih(n,t){vp(n,"dblclick",t)}function dP(n,t,e){e!=null||(e={}),t&&(e[br.Platform.isMacOS?"metaKey":"ctrlKey"]=!0);let{x:i,y:r}=n.getBoundingClientRect();vp(n,"mouseover",{doc:n.doc,clientX:i,clientY:r,...e})}function et(n,t){let e=n.get(x.of(t));return e instanceof q?n.context.lookup(e):e}function An(n,t){let{x:e,bottom:i,width:r}=t.getBoundingClientRect();return n.setParentElement(t).showAtPosition({x:e,y:i,width:r,overlap:!0,left:!1}),n}function Fp(n){return n.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function hP(n){return n.replace(/(-\w)/g,t=>t[1].toUpperCase())}function uP(n){return n.charAt(0).toUpperCase()+n.slice(1)}function fP(n,t){if(t<0||t>=n.length)return"";let e=Math.max(0,n.slice(0,t+1).search(/(?<=[^\s.,][\s.,]+)[^\s.,]*$/));n=n.slice(e),e=Math.max(0,n.search(/[^\s.,]/)),n=n.slice(e);let i=n.search(/[\s.,]/);return i===-1?n:n.slice(0,i)}function Pp(){let n=()=>((1+Math.random())*65536|0).toString(16).substring(1);return n()+n()+"-"+n()+"-"+n()+"-"+n()+"-"+n()+n()+n()}function kp(n,t){return Array.from({length:t-n},(e,i)=>n+i)}function nh(n,t){if(!n.contains(t))return null;if(t.instanceOf(HTMLElement)&&t.hasClass("textLayerNode"))return t;let e=t;for(;e=e.parentNode;){if(e===n)return null;if(e.instanceOf(HTMLElement)&&e.hasClass("textLayerNode"))return e}return null}function rh(n,t,e){if(!n.contains(t))return null;let i=n.doc.createNodeIterator(n,NodeFilter.SHOW_TEXT),r,o=e;for(;(r=i.nextNode())&&t!==r;)o+=r.textContent.length;return o}function ea(n,t){let e=n.doc.createNodeIterator(n,NodeFilter.SHOW_TEXT),i;for(;(i=e.nextNode())&&t>=i.textContent.length;)t-=i.textContent.length;return i?{node:i,offset:t}:null}function*dx(n){let t=n.doc.createNodeIterator(n,NodeFilter.SHOW_TEXT),e;for(;e=t.nextNode();)if(e.instanceOf(Text))for(let i=0;i<e.length;i++){let r=e.doc.createRange();r.setStart(e,i),r.setEnd(e,i+1);let o=r.getBoundingClientRect();yield{char:e.textContent[i],rect:o}}}function*oh(n,t){let e=n.div,i=e.win.getComputedStyle(e),r=parseFloat(i.borderTopWidth),o=parseFloat(i.borderLeftWidth),s=parseFloat(i.paddingTop),a=parseFloat(i.paddingLeft),c=e.getBoundingClientRect();for(let{x:l,y:d}of t){let h=l-(c.left+o+a),u=d-(c.top+r+s);yield n.getPagePoint(h,u)}}function*Dp(n,t){for(let{char:e,rect:i}of dx(t))yield{char:e,rect:[...oh(n,[{x:i.left,y:i.bottom},{x:i.right,y:i.top}])].flat()}}function pP(n){return n.doc.createNodeIterator(n,NodeFilter.SHOW_TEXT).nextNode()}function Dc(n){let{anchorNode:t,anchorOffset:e,focusNode:i,focusOffset:r}=n;t&&i&&n.setBaseAndExtent(i,r,t,e)}var Sp=["Mod","Ctrl","Meta","Shift","Alt"];function In(n){return n==="Mod"?It.Platform.isMacOS||It.Platform.isIosApp?"Command":"Ctrl":n==="Shift"?"Shift":n==="Alt"?It.Platform.isMacOS||It.Platform.isIosApp?"Option":"Alt":n==="Meta"?It.Platform.isMacOS||It.Platform.isIosApp?"Command":It.Platform.isWin?"Win":"Meta":"Ctrl"}function Cp(){let n={},t=new Set;for(let e of Sp){let i=In(e);t.has(i)||(t.add(i),n[e]=i)}return n}function Tp(n){return Sp.includes(n)}function gP(){return It.Platform.isWin?"\\":"/"}function Sc(n,t){return n.localeCompare(t,void 0,{numeric:!0,sensitivity:"base"})===1}function Ep(n,t){return Sc(t,n)}function Ap(){return It.Platform.isDesktopApp?window.electron.remote.app.getVersion():null}function Ip(n,t,e){var i,r,o;return(o=(i=n.links)==null?void 0:i.find(s=>t<=s.position.start.offset&&s.position.end.offset<=e))!=null?o:(r=n.embeds)==null?void 0:r.find(s=>t<=s.position.start.offset&&s.position.end.offset<=e)}function Lp(n){let t=n.lastIndexOf(".");return t===-1||t===n.length-1||t===0?n:n.slice(0,t)}function Op(n){let{subpath:t}=(0,It.parseLinktext)(n);return t.startsWith("#")&&(t=t.slice(1)),t}function ta(n){return n.startsWith("#")&&(n=n.slice(1)),new URLSearchParams(n)}function Ln(n){let t=ta(n);if(!t.has("page"))return null;let e=+t.get("page");if(isNaN(e))return null;if(t.has("selection")){let i=t.get("selection").split(",").map(c=>parseInt(c.trim()));if(i.length!==4||i.some(c=>isNaN(c)))return null;let[r,o,s,a]=i;return{page:e,beginIndex:r,beginOffset:o,endIndex:s,endOffset:a}}if(t.has("annotation")){let i=t.get("annotation");return{page:e,annotation:i}}return{page:e}}function Cc(n){return"#"+Object.entries(n).filter(([t,e])=>t&&(e||e===0)).map(([t,e])=>`${t}=${e}`).join("&")}function Tc(n,t){return t===0?`${n}R`:`${n}R${t}`}var kc=class extends It.Component{constructor(e,i,r){super();this.targetEl=e;this.callback=i;this.options=r;this.observer=new MutationObserver(i)}onload(){this.observer.observe(this.targetEl,this.options)}onunload(){this.observer.disconnect()}};function On(n){return!n.isEmbed&&!hx(n)}function Ec(n){return n.isEmbed&&!ia(n)&&!na(n)}function ia(n){var t;return!!((t=n.dom)!=null&&t.containerEl.hasClass("canvas-node-content"))}function na(n){var t;return!!((t=n.dom)!=null&&t.containerEl.closest(".hover-popover"))}function hx(n){var t;return!!((t=n.dom)!=null&&t.containerEl.closest(".hover-editor"))}function Ac(){activeWindow.open("obsidian://")}function Mp(n,t,e=!1){if(e&&n===t)return!0;let i=t.parent;for(;i;){if(i===n)return!0;i=i.parent}return!1}function ux(n){n={japanese:!0,korean:!0,...n};let t="";return t+="\\u4e00-\\u9fff",t+="\\u3400-\\u4dbf",n.japanese&&(t+="\\u3040-\\u309F",t+="\\u30A0-\\u30FF",t+="\\uFF65-\\uFF9F",t+="\\u31F0-\\u31FF",t+="\\u3000-\\u303F"),n.korean&&(t+="\\u1100-\\u11FF",t+="\\uA960-\\uA97F",t+="\\uD7B0-\\uD7FF",t+="\\u3130-\\u318F",t+="\\uAC00-\\uD7AF"),new RegExp(`[${t}]`)}function Ic(n,t=!1){let e=ux({korean:!1});return n=n.replace(/(.?)([\r\n]+)(.?)/g,(i,r,o,s)=>e.test(r)&&e.test(s)?r+s:r==="-"&&s.match(/[a-zA-Z]/)?s:s?r+" "+s:r),t&&(n=n.replace(new RegExp(`(${e.source}) (?=${e.source})`,"g"),"$1")),window.pdfjsViewer.removeNullCharacters(window.pdfjsLib.normalizeUnicode(n))}function xr(n){return n.replace(/[\\\x00\x08\x0B\x0C\x0E-\x1F ]/g,t=>encodeURIComponent(t))}function sh(n){return typeof n=="string"&&n.startsWith("cite.")}function mP(n,t,e){return n.register(null,t,(i,r)=>{if(r.key===t&&r.modifiers!==null&&["","Shift"].includes(r.modifiers))return e(i,r)})}function Gi(n,t,e){var a,c,l,d;if(e&&e.findFirst&&e.findLast)throw Error("findFirst and findLast cannot be specified at the same time");let i=(a=e==null?void 0:e.findFirst)!=null?a:!1,r=(c=e==null?void 0:e.findLast)!=null?c:!1,o=(l=e==null?void 0:e.from)!=null?l:0,s=(d=e==null?void 0:e.to)!=null?d:n.length-1;if(o>s)return{found:!1,index:o};for(;;){let h=o+s+ +r>>1,u=n[h],f=t(u,h);if(f===0)if(i&&o<h)s=h;else if(r&&s>h)o=h;else return{found:!0,index:h};else f>0?o=h+1:s=h-1;if(o>s)return{found:!1,index:h+ +(f>0)}}}function Mo(n,t){return n===t?0:n<t?-1:1}function Np(n,t,e,i){let r=a=>Mo(t,e(a).slice(0,t.length)),{found:o,index:s}=Gi(n,r,{findFirst:!0,...i});if(o){let{index:a}=Gi(n,r,{findLast:!0,...i,from:s});return{from:s,to:a}}return null}function Rp(n,t){return n.from<=t.to&&n.to>=t.from}function Vp(n,t){return n.from<t.to&&n.to>t.from}function Xi(n){return n.anchorNode===n.focusNode?n.anchorOffset<n.focusOffset:n.anchorNode&&n.focusNode&&n.anchorNode.compareDocumentPosition(n.focusNode)===Node.DOCUMENT_POSITION_FOLLOWING}function No(n,t){for(t!=null||(t=1);t--;)n()}function ah(n){return t=>No(n,t)}function Bp(n,t){return new Function(n.includes("await")?"(async () => {"+n+"})()":n).call(t)}var lh=class extends rt{constructor(e,i,r,o){super(e);this.file=i,this.page=r,this.id=o}},Ro=class extends lh{constructor(e,...i){super(...i);this.allowNoValue=e,this.supportedKeys=Object.keys(e),this.oldValues={},this.newValues={},this.containerEl.addClass("pdf-plus-annotation-edit-modal"),this.buttonContainerEl=this.modalEl.createDiv()}static isSubtypeSupported(e){return Ro.supportedSubtypes.includes(e)}static forSubtype(e,...i){return e==="Link"?Ro.forLinkAnnotation(...i):Ro.forTextMarkupAnnotation(...i)}static forTextMarkupAnnotation(...e){return new Ro({color:!1,opacity:!1,author:!1,contents:!0},...e)}static forLinkAnnotation(...e){return new Ro({color:!0,borderWidth:!0},...e)}async readOldValues(){let e=this.lib.highlight.writeFile.pdflib,i=await e.getAnnotation(this.file,this.page,this.id);if(!i)throw new Error(`${this.plugin.manifest.name}: Annotation not found.`);for(let r of this.supportedKeys)switch(r){case"color":this.oldValues.color=e.getColorFromAnnotation(i);break;case"opacity":this.oldValues.opacity=e.getOpacityFromAnnotation(i);break;case"borderWidth":this.oldValues.borderWidth=e.getBorderWidthFromAnnotation(i);break;case"author":this.oldValues.author=e.getAuthorFromAnnotation(i);break;case"contents":this.oldValues.contents=e.getContentsFromAnnotation(i);break}}async writeNewValues(){let e=this.lib.highlight.writeFile.pdflib,i=[];for(let r of this.supportedKeys)switch(r){case"color":if(this.newValues.color&&this.newValues.color!==this.oldValues.color){let o=this.newValues.color;i.push(s=>{e.setColorToAnnotation(s,o),this.lib.getLatestBacklinksForAnnotation(this.file,this.page,this.id).then(a=>{a.forEach(c=>this.lib.composer.linkUpdater.updateLinkColor(c.refCache,c.sourcePath,{type:"rgb",rgb:o},{linktext:!1}))})})}break;case"opacity":typeof this.newValues.opacity=="number"&&this.newValues.opacity!==this.oldValues.opacity&&i.push(o=>{e.setOpacityToAnnotation(o,this.newValues.opacity)});break;case"borderWidth":typeof this.newValues.borderWidth=="number"&&this.newValues.borderWidth!==this.oldValues.borderWidth&&i.push(o=>{e.setBorderWidthToAnnotation(o,this.newValues.borderWidth)});break;case"author":this.newValues.author&&this.newValues.author!==this.oldValues.author&&i.push(o=>{e.setAuthorToAnnotation(o,this.newValues.author)});break;case"contents":typeof this.newValues.contents=="string"&&this.newValues.contents!==this.oldValues.contents&&i.push(o=>{e.setContentsToAnnotation(o,this.newValues.contents)});break}i.length&&await e.processAnnotation(this.file,this.page,this.id,async r=>{i.forEach(o=>o(r))})}addColorSetting(){if(this.oldValues.color||this.allowNoValue.color){let e,i;new Zi.Setting(this.contentEl).setName("Color").setDesc("You can choose a color from the color picker or select one from your custom named colors.").addColorPicker(r=>{var o;e=r,e.setValueRgb((o=this.oldValues.color)!=null?o:{r:0,g:0,b:0}).onChange(s=>{let a=pr(s);a&&(this.newValues.color=a,i.setValue(s))})}).addDropdown(r=>{i=r,i.addOptions(Object.fromEntries(Object.entries(this.plugin.settings.colors).map(([o,s])=>[s,o]))).setValue(this.oldValues.color?pp(this.oldValues.color):"").onChange(o=>{let s=pr(o);s&&(this.newValues.color=s,e.setValue(o))})})}}addOpacitySetting(){(this.oldValues.opacity||this.allowNoValue.opacity)&&new Zi.Setting(this.contentEl).setName("Opacity").addSlider(e=>{var i;e.setLimits(0,1,.01).setValue((i=this.oldValues.opacity)!=null?i:1).setDynamicTooltip().onChange(r=>{this.newValues.opacity=r})})}addBorderWidthSetting(){(this.oldValues.borderWidth||this.allowNoValue.borderWidth)&&new Zi.Setting(this.contentEl).setName("Draw border").addToggle(e=>{var i;e.setValue(!!((i=this.oldValues.borderWidth)==null||i)).onChange(r=>{this.newValues.borderWidth=r?1:0})})}addAuthorSetting(){(this.oldValues.author||this.allowNoValue.author)&&new Zi.Setting(this.contentEl).setName("Annotation author").addText(e=>{var i;e.setValue((i=this.oldValues.author)!=null?i:"Author").onChange(r=>{this.newValues.author=r})})}initContentsSetting(){var e;if(this.textarea=null,this.editorEl=null,this.previewEl=null,this.plugin.settings.renderMarkdownInStickyNote){let i=(e=this.app.hotkeyManager.getHotkeys("markdown:toggle-preview"))!=null?e:this.app.hotkeyManager.getDefaultHotkeys("markdown:toggle-preview");if(i&&i.length){let r=i[0];this.scope.register(r.modifiers,r.key,()=>this.togglePreview())}}}addContentsSetting(){(this.oldValues.contents||this.allowNoValue.contents)&&new Zi.Setting(this.contentEl).setName("Contents").then(e=>{this.previewEl=e.controlEl.createDiv("preview-container markdown-rendered"),this.plugin.settings.renderMarkdownInStickyNote?e.setDesc(`Press ${this.app.hotkeyManager.printHotkeyForCommand("markdown:toggle-preview")} to toggle preview.`):e.setDesc('Tip: There is an option called "Render markdown in annotation popups when the annotation has text contents".')}).addTextArea(e=>{var i;this.textarea=e,this.editorEl=e.inputEl,this.editorEl.addClass("editor-container"),e.inputEl.rows=5,e.inputEl.setCssStyles({width:"100%"}),e.setValue((i=this.oldValues.contents)!=null?i:"").onChange(r=>{this.newValues.contents=r})}),this.showEditor()}addButtons(){new Zi.Setting(this.buttonContainerEl).addButton(e=>{e.setButtonText("Save").setCta().onClick(()=>{this.writeNewValues(),this.close()})}).addButton(e=>{e.setButtonText("Cancel").onClick(()=>this.close())}).then(e=>e.setClass("no-border"))}async onOpen(){super.onOpen(),this.titleEl.setText(`${this.plugin.manifest.name}: edit annotation contents`),await this.readOldValues();for(let e of this.supportedKeys)switch(e){case"color":this.addColorSetting();break;case"opacity":this.addOpacitySetting();break;case"borderWidth":this.addBorderWidthSetting();break;case"author":this.addAuthorSetting();break;case"contents":this.initContentsSetting(),this.addContentsSetting();break}this.addButtons()}async showEditor(){var e,i;(e=this.editorEl)==null||e.show(),(i=this.previewEl)==null||i.hide()}async showPreview(){var e,i;this.editorEl&&this.previewEl&&(this.previewEl.setCssStyles({width:`${this.editorEl.clientWidth}px`,height:`${this.editorEl.clientHeight}px`}),this.previewEl.empty(),await Zi.MarkdownRenderer.render(this.app,(i=(e=this.textarea)==null?void 0:e.getValue())!=null?i:"",this.previewEl,"",this.component),Fc(this.app,this.previewEl,this.file.path),this.editorEl.hide(),this.previewEl.show())}async togglePreview(){var e;return(e=this.editorEl)!=null&&e.isShown()?this.showPreview():this.showEditor()}},Mn=Ro;Mn.supportedSubtypes=["Highlight","Underline","Squiggly","StrikeOut","Link"];var ra=class extends lh{onOpen(){super.onOpen(),this.titleEl.setText(`${this.plugin.manifest.name}: delete annotation`),this.contentEl.createEl("p",{text:"Are you sure you want to delete this annotation?"}),this.plugin.settings.warnEveryAnnotationDelete||this.contentEl.createEl("p",{cls:"mod-warning",text:"There are one or more links pointing to this annotation."}),new Zi.Setting(this.contentEl).addButton(t=>{t.setButtonText("Delete").setWarning().onClick(()=>{this.deleteAnnotation(),this.close()})}).addButton(t=>{t.setButtonText("Cancel").onClick(()=>this.close())}).then(t=>t.setClass("no-border"))}openIfNeccessary(){return this.shouldOpen()?this.open():this.deleteAnnotation()}shouldOpen(){return this.plugin.settings.warnEveryAnnotationDelete||this.plugin.settings.warnBacklinkedAnnotationDelete&&this.lib.isBacklinked(this.file,{page:this.page,annotation:this.id})}deleteAnnotation(){this.lib.highlight.writeFile.deleteAnnotation(this.file,this.page,this.id)}};var oa=require("obsidian");var Lc,yr,ch=class extends rt{constructor(e,i,...r){super(...r);ba(this,Lc,void 0);ba(this,yr,void 0);this.file=e,this.page=i,xa(this,Lc,new Promise(o=>{xa(this,yr,o)}))}then(e){return pi(this,Lc).then(i=>{i&&e()}),this}onOpen(){super.onOpen(),this.titleEl.setText(`${this.plugin.manifest.name}: delete page`),this.contentEl.createEl("p",{text:"Are you sure you want to delete this page?"}),this.plugin.settings.warnEveryAnnotationDelete||this.contentEl.createEl("p",{cls:"mod-warning",text:"There are one or more links pointing to this page."}),new oa.Setting(this.contentEl).addButton(e=>{e.setButtonText("Delete").setWarning().onClick(()=>{pi(this,yr).call(this,!0),this.close()})}).addButton(e=>{e.setButtonText("Cancel").onClick(()=>{pi(this,yr).call(this,!1),this.close()})}).then(e=>e.setClass("no-border"))}onClose(){super.onClose(),pi(this,yr).call(this,!1)}openIfNeccessary(){return this.shouldOpen()?(this.open(),this):(pi(this,yr).call(this,!0),this)}shouldOpen(){return this.plugin.settings.warnEveryPageDelete||this.plugin.settings.warnBacklinkedPageDelete&&this.lib.isBacklinked(this.file,{page:this.page})}};Lc=new WeakMap,yr=new WeakMap;var Mc={keep:"Keep labels unchanged",update:"Update"},Oc,wr,Nn=class extends rt{constructor(e,i,r,o,s){super(e);ba(this,Oc,void 0);ba(this,wr,void 0);this.askPageLabelUpdateMethod=i,this.defaultMethod=r,this.askInPlace=o,this.defaultInPlace=s,xa(this,Oc,new Promise(a=>{xa(this,wr,a)}))}ask(){return this.askPageLabelUpdateMethod||this.askInPlace?this.open():pi(this,wr).call(this,{pageLabelUpdateMethod:this.defaultMethod,inPlace:this.defaultInPlace}),this}then(e){pi(this,Oc).then(i=>{if(i){let{pageLabelUpdateMethod:r,inPlace:o}=i;e(r==="keep",o)}})}onOpen(){super.onOpen(),this.titleEl.setText(`${this.plugin.manifest.name}: Page composer`);let e=this.defaultMethod,i=this.defaultInPlace;this.askPageLabelUpdateMethod&&new oa.Setting(this.contentEl).setName("Update the page labels?").setDesc(createFragment(r=>{r.createEl("a",{text:"Learn more",href:"https://github.com/RyotaUshio/obsidian-pdf-plus/wiki/Page-labels"})})).addDropdown(r=>{r.addOptions(Mc).setValue(e).onChange(o=>{e=o})}),this.askInPlace&&new oa.Setting(this.contentEl).setName("Remove pages from original file?").addToggle(r=>{r.setValue(i).onChange(o=>{i=o})}),new oa.Setting(this.contentEl).addButton(r=>{r.setButtonText("Proceed").setCta().onClick(()=>{(e==="keep"||e==="update")&&pi(this,wr).call(this,{pageLabelUpdateMethod:e,inPlace:i}),this.close()}),setTimeout(()=>r.buttonEl.focus())}).addButton(r=>{r.setButtonText("Cancel").onClick(()=>{pi(this,wr).call(this,null),this.close()})})}onClose(){super.onClose(),pi(this,wr).call(this,null)}};Oc=new WeakMap,wr=new WeakMap;var dh=class extends rt{constructor(){super(...arguments);this.pageSize="A4";this.orientation="portrait";this.next=[]}askOptions(){return this.open(),this}onOpen(){super.onOpen(),this.titleEl.setText(`${this.plugin.manifest.name}: Create new PDF`),this.addSetting().setName("Page size").addDropdown(e=>{Object.keys(So).forEach(i=>e.addOption(i,i)),e.setValue(this.pageSize).onChange(i=>{So.hasOwnProperty(i)&&(this.pageSize=i)})}),this.addSetting().setName("Orientation").addDropdown(e=>{e.addOption("portrait","Portrait").addOption("landscape","Landscape").setValue(this.orientation).onChange(i=>{(i==="portrait"||i==="landscape")&&(this.orientation=i)})}),this.addSetting().addButton(e=>{e.setButtonText("Create").setCta().then(i=>{setTimeout(()=>i.buttonEl.focus())}).onClick(async()=>{this.close();let i=await this.createPDFDocument();this.next.forEach(r=>r(i))})}).addButton(e=>{e.setButtonText("Cancel").onClick(()=>{this.close()})})}addSetting(){return new oa.Setting(this.contentEl)}then(e){return this.next.push(e),this}async createPDFDocument(){let e=await pe.create(),[i,r]=So[this.pageSize],o=Math.max(i,r),s=Math.min(i,r),a=this.orientation==="portrait"?[s,o]:[o,s];return e.addPage(a),e}};var Nc=require("obsidian"),vr=class extends rt{constructor(e,i){super(e);this.next=[];this.submitted=!1;this.title=null;this.modalTitle=i,this.component.registerDomEvent(this.modalEl.doc,"keypress",r=>{r.key==="Enter"&&this.submitAndClose()})}presetTitle(e){return this.title=e,this}onOpen(){super.onOpen(),this.titleEl.setText(`${this.plugin.manifest.name}: ${this.modalTitle}`),new Nc.Setting(this.contentEl).setName("Title").addText(e=>{this.title!==null&&(e.setValue(this.title),e.inputEl.select()),e.inputEl.size=30,e.inputEl.id="pdf-plus-outline-title-modal"}),new Nc.Setting(this.contentEl).addButton(e=>{e.setButtonText("Add").setCta().onClick(()=>{this.submitAndClose()})}).addButton(e=>{e.setButtonText("Cancel").onClick(()=>{this.close()})})}ask(){return this.open(),this}then(e){return this.submitted&&this.title!==null?e({title:this.title}):this.next.push(e),this}submitAndClose(){let e=this.contentEl.querySelector("#pdf-plus-outline-title-modal");e instanceof HTMLInputElement&&(this.title=e.value,this.submitted=!0,this.close())}onClose(){this.submitted&&this.title!==null&&this.next.forEach(e=>e({title:this.title}))}},hh=class extends Nc.FuzzySuggestModal{constructor(e,i){super(e.plugin.app);this.next=[];this.outlines=e,this.plugin=e.plugin,this.items=[],this.outlines.iter({enter:r=>{!i.isAncestorOf(r,!0)&&!r.is(i.parent)&&this.items.push(r)}}),this.setPlaceholder("Type an outline item title")}askDestination(){return this.open(),this}then(e){return this.next.push(e),this}getItems(){return this.items}getItemText(e){return e.name}onChooseItem(e){this.next.forEach(i=>i(e))}};var fx=require("obsidian"),zt=require("obsidian");var uh=class{constructor(t){this._rootDict=t}get root(){return this.createNode(this._rootDict)}get(t){return this.root.get(t)}iterLeaves(t){this.root.iterLeaves(t)}getLeaves(){return this.root.getLeaves()}iter(t){this.root.iter(t)}[Symbol.iterator](){return this.root[Symbol.iterator]()}keys(){return this.root.keys()}values(){return this.root.values()}limitLeafSize(t){this.root.limitLeafSize(t)}},sa=class extends uh{createNode(t){return new Up(t)}},Fr=class extends uh{createNode(t){return new zp(t)}},fh=class{constructor(t){this.dict=t}is(t){return this.dict===t.dict}isRoot(){return!this._dictHas("Limits")}isUniqueNode(){return this.isRoot()&&this._dictHas(this.leafKey)}isLeaf(){return this._dictHas("Limits")&&this._dictHas(this.leafKey)}isIntermediate(){return this._dictHas("Limits")&&this._dictHas("Kids")}get kids(){let t=this.dict.get(x.of("Kids"));return t instanceof H?t.asArray().map(e=>{let i=this.dict.context.lookup(e);if(i instanceof R)return new this.constructor(i);throw new Error("Kid is not a PDFDict")}):null}get limits(){let t=this.dict.get(x.of("Limits"));if(!(t instanceof H))return null;if(t.size()!==2)throw new Error("Limits array must have 2 elements");return t.asArray().map(e=>this._toStringOrNumber(e))}get(t){let e=this.getLeafFor(t);if(!e)return null;let i=e._getNamesOrNums();if(!i)throw new Error("Node has no names or nums despite not having kids");let r=0,o=(i.length>>1)-1;for(;r<=o;){let s=r+o>>1,a=i[s*2];if(a===t){let c=i[s*2+1];if(c instanceof fe)return c;throw new Error("Value is not a PDFObject")}a<t?r=s+1:o=s-1}return null}has(t){return!!this.get(t)}[Symbol.iterator](){let t=0,e=0,i=this.getLeaves();return{next:()=>{if(t>=i.length)return{done:!0,value:[]};let o=i[t]._getNamesOrNums();if(!o)throw new Error("Leaf has no names or nums");let s=o[e],a=o[e+1];return e+=2,e>=o.length&&(t++,e=0),{done:!1,value:[s,a]}}}}keys(){return Array.from(this,([t])=>t)}values(){return Array.from(this,([,t])=>t)}size(){let t=0;return this.iterLeaves(e=>{let i=e._getNamesOrNums();if(!i)throw new Error("Leaf has no names or nums");t+=i.length>>1}),t}iterLeaves(t){let e=[this];for(;e.length;){let i=e.shift(),r=i.kids;r?e.push(...r):t(i)}}getLeaves(){let t=[];return this.iterLeaves(e=>t.push(e)),t}sortKids(){let t=this.kids;if(!t)return;t.sort((i,r)=>{let o=i.limits,s=r.limits;if(!o||!s)throw new Error("Kid has no limits");return o[0]<s[0]?-1:o[0]>s[0]?1:0});let e=H.withContext(this.dict.context);for(let i of t)e.push(i.dict);this.dict.set(x.of("Kids"),e)}flatten(){if(this.isUniqueNode()||this.isLeaf())return;let t=H.withContext(this.dict.context);for(let[e,i]of this)t.push(this._toPDFStringOrPDFNumber(e)),t.push(i);this.dict.set(x.of(this.leafKey),t),this.dict.delete(x.of("Kids"))}iter(t){var e,i,r;(e=t.enter)==null||e.call(t,this),(i=this.kids)==null||i.forEach(o=>o.iter(t)),(r=t.leave)==null||r.call(t,this)}limitLeafSize(t){let e=[],i=[],r=()=>{let o=this.dict.context.obj(e),s=e[0],a=e[e.length-2],c=this.dict.context.obj([s,a]),l=this.dict.context.obj({[this.leafKey]:o,Limits:c}),d=this.dict.context.register(l);i.push(d)};for(let[o,s]of this)e.push(o,s),e.length>>1>=t&&(r(),e.length=0);if(e.length&&r(),i.length===1)this.dict.set(x.of(this.leafKey),this.dict.context.obj(e)),this.dict.delete(x.of("Kids")),this.dict.delete(x.of("Limits"));else{let o=this.dict.context.obj(i);this.dict.set(x.of("Kids"),o)}}getLeafFor(t){if(this.isUniqueNode())return this;let e=this.limits;if(e&&(t<e[0]||e[1]<t))return null;let i=this,r=this.kids;for(;r;){if(i=r.find(o=>{let s=o.limits;if(!s)throw new Error("Kid has no limits");return s[0]<=t&&t<=s[1]}),!i)return null;r=i.kids}return i}_dictHas(t){return this.dict.has(x.of(t))}_getNamesOrNums(){let t=this.dict.get(x.of(this.leafKey));return t instanceof H?t.asArray().map((e,i)=>i%2?e:this._toStringOrNumber(e)):null}},Up=class extends fh{get leafKey(){return"Names"}_toStringOrNumber(t){if(t instanceof G||t instanceof M)return t.decodeText();throw new Error("Key is not a PDFString or a PDFHexString")}_toPDFStringOrPDFNumber(t){return M.fromText(t)}get names(){return this._getNamesOrNums()}},zp=class extends fh{get leafKey(){return"Nums"}_toStringOrNumber(t){if(t instanceof N)return t.asNumber();throw new Error("Key is not a PDFNumber")}_toPDFStringOrPDFNumber(t){return N.of(t)}get nums(){return this._getNamesOrNums()}};var qp={D:"1, 2, 3, ...",R:"I, II, III, ...",r:"i, ii, iii, ...",A:"A, B, C, ...",a:"a, b, c, ..."};function Wp(n){return qp.hasOwnProperty(n)}var Vo=class{static fromPDFDict(t){let e=new Vo,i=t.get(x.of("St"));i instanceof N&&(e.start=i.asNumber());let r=t.get(x.of("S"));if(r instanceof x){let s=r.decodeText();Wp(s)&&(e.style=s)}let o=t.get(x.of("P"));return(o instanceof G||o instanceof M)&&(e.prefix=o.decodeText()),e}},Ft=class{constructor(t,e){this.doc=t;this.ranges=e;this.normalize()}normalize(){var t;if(this.ranges.length){this.ranges.sort((e,i)=>e.pageFrom-i.pageFrom),this.ranges[0].pageFrom=1;for(let e=this.ranges.length-1;e>=0;e--){let i=this.getStartOfRange(e),r=this.getEndOfRange(e);if(i>r){this.ranges.splice(e,1);continue}let o=this.ranges[e],s=this.ranges[e-1];if(s&&typeof o.dict.start=="number"&&o.dict.prefix===s.dict.prefix&&o.dict.style===s.dict.style&&o.pageFrom-s.pageFrom===o.dict.start-((t=s.dict.start)!=null?t:1)){this.ranges.splice(e,1);continue}}}return this}static fromDocument(t){let e=et(t.catalog,"PageLabels");if(!(e instanceof R))return null;let i=new Fr(e),r=[];for(let[o,s]of i){let a=s instanceof q?t.context.lookup(s):s;if(!(a instanceof R))return null;r.push({pageFrom:o+1,dict:Vo.fromPDFDict(a)})}return new Ft(t,r)}setToDocument(t){t||(t=this.doc);let e=[];for(let{pageFrom:r,dict:o}of this.normalize().ranges){e.push(r-1);let s={};o.style!==void 0&&(s.S=o.style),o.prefix!==void 0&&(s.P=M.fromText(o.prefix)),o.start!==void 0&&(s.St=o.start),e.push(t.context.obj(s))}let i=t.context.obj({Nums:e});new Fr(i).limitLeafSize(64),t.catalog.set(x.of("PageLabels"),i)}static removeFromDocument(t){t.catalog.delete(x.of("PageLabels"))}static processDocument(t,e){let i=Ft.fromDocument(t);return i?(e(i),i.setToDocument(),!0):!1}static createEmpty(t){return new Ft(t,[{pageFrom:1,dict:new Vo}])}removeRange(t){return this.ranges.splice(t,1),this.normalize(),this}divideRangeAtPage(t,e,i){var a;let r=this.getRangeIndexAtPage(t);if(r===-1)return this;if(t===this.getStartOfRange(r))return this;let o=this.ranges[r],s=new Vo;return s.prefix=o.dict.prefix,s.style=o.dict.style,e&&(s.start=t-o.pageFrom+((a=o.dict.start)!=null?a:1)),i==null||i(s),this.ranges.splice(r+1,0,{pageFrom:t,dict:s}),this}shiftRangesAfterPage(t,e){for(let i of this.ranges)i.pageFrom>=t&&(i.pageFrom+=e);return this}getStartOfRange(t){return this.ranges[t].pageFrom}getEndOfRange(t){let e=this.ranges[t+1];return e?e.pageFrom-1:this.doc.getPageCount()}getRangeIndexAtPage(t){for(let e=0;e<this.ranges.length;e++)if(this.getStartOfRange(e)<=t&&t<=this.getEndOfRange(e))return e;return-1}then(t){return t(this),this}rangeCount(){return this.ranges.length}};var jp=class extends rt{constructor(e,i){super(e);this.file=i;this.containerEl.addClass("pdf-plus-page-label-modal"),this.controlEl=this.contentEl.createDiv(),this.doc=null,this.pageLabels=null,this.docLoadingPromise=(async()=>(this.doc=await e.lib.loadPdfLibDocument(i),this.pageLabels=Ft.fromDocument(this.doc),{doc:this.doc,pageLabels:this.pageLabels}))(),this.scope.register([],"Enter",()=>this.redisplay())}},Kp=class{constructor(t,e){this.dict=t;this.containerEl=e;this.addNumberingStyleSetting(),this.addStartSetting(),this.addPrefixSetting()}addSetting(){return new zt.Setting(this.containerEl)}addNumberingStyleSetting(){this.addSetting().setName("Numbering Style").addDropdown(t=>{var e;t.addOptions({...qp,None:"None"}).setValue((e=this.dict.style)!=null?e:"None").onChange(i=>{Wp(i)?this.dict.style=i:delete this.dict.style})})}addStartSetting(){this.addSetting().setName("Start counting from").addText(t=>{t.inputEl.type="number",this.dict.start!==void 0?t.setValue(""+this.dict.start):t.setPlaceholder("1"),t.onChange(e=>{let i=Number(e);Number.isInteger(i)?(t.inputEl.removeClass("error"),i>1?this.dict.start=i:delete this.dict.start):(delete this.dict.start,t.inputEl.addClass("error"))})})}addPrefixSetting(){return this.addSetting().setName("Prefix").addText(t=>{var e;t.setValue((e=this.dict.prefix)!=null?e:"").onChange(i=>{i?this.dict.prefix=i:delete this.dict.prefix})})}},ph=class extends jp{constructor(){super(...arguments);this.buttonSetting=null}async onOpen(){super.onOpen(),this.titleEl.setText(`${this.plugin.manifest.name}: edit page labels`),new zt.Setting(this.contentEl).then(e=>{zt.MarkdownRenderer.render(this.app,["Each page in a PDF document can be assigned a ***page label***, which can be different from the page index.",'For example, a book might have a preface numbered as "i", "ii", "iii", ... and the main content numbered as "1", "2", "3", ...'].join(" "),e.descEl,"",this.component)}).then(e=>this.contentEl.prepend(e.settingEl)),this.controlEl.createDiv({cls:"page-labels-loading",text:"Loading..."}),await this.docLoadingPromise,this.display(),this.addButtons()}redisplay(){this.display()}display(){let{pageLabels:e,doc:i}=this;if(!i)return;if(this.controlEl.empty(),e===null||e.rangeCount()===0){this.addHeading(this.controlEl,"No page labels found","lucide-info").setDesc("This PDF document does not have any page labels.").addButton(o=>{o.setButtonText("Create").setCta().onClick(()=>{this.pageLabels=Ft.createEmpty(i),this.redisplay(),this.updateButtonVisibility()})}).addButton(o=>{o.setButtonText("Cancel").onClick(()=>this.close())});return}let r=i.getPageCount();for(let o=0;o<e.ranges.length;o++){let s=this.controlEl.createDiv("page-label-range"),a=e.ranges[o],c=e.ranges[o-1],l=e.ranges[o+1],d=e.ranges[o+2],h=e.getEndOfRange(o);this.addHeading(s,`Page ${a.pageFrom}\u2013${h}`,"lucide-arrow-down-01").then(u=>{h>a.pageFrom&&u.addExtraButton(f=>{f.setIcon("lucide-separator-horizontal").setTooltip("Divide this labeling range").onClick(()=>{e.divideRangeAtPage(a.pageFrom+1,!1),this.redisplay()})})}).addExtraButton(u=>{u.setIcon("lucide-x").setTooltip("Label the pages in this range continuing from the previous range").onClick(()=>{e.removeRange(o),this.redisplay()})}),new zt.Setting(s).setName("From").setDesc("The index of the first page in this range.").then(u=>u.controlEl.appendText("Page")).addText(u=>{u.inputEl.type="number",u.setValue(""+a.pageFrom).onChange(f=>{let p=Number(f);Number.isInteger(p)&&(c?c.pageFrom:1)<p&&p<=h?(a.pageFrom=p,u.inputEl.removeClass("error")):u.inputEl.addClass("error")}),u.inputEl.addEventListener("blur",()=>this.redisplay(),{once:!0})}).then(u=>this.addPreviewButton(u,a.pageFrom)),new zt.Setting(s).setName("To").setDesc("The index of the last page in this range.").then(u=>u.controlEl.appendText("Page")).addText(u=>{u.inputEl.type="number",u.setValue(""+h).onChange(f=>{let p=Number(f);Number.isInteger(p)&&a.pageFrom<=p&&p<=(d?d.pageFrom-1:r-1)?(l.pageFrom=p+1,u.inputEl.removeClass("error")):u.inputEl.addClass("error")}).setDisabled(o===e.ranges.length-1).then(f=>{f.disabled&&(0,fx.setTooltip)(f.inputEl,"The last range cannot be extended.")}),u.inputEl.addEventListener("blur",()=>this.redisplay(),{once:!0})}).then(u=>this.addPreviewButton(u,h)),new Kp(a.dict,s)}}addHeading(e,i,r){return new zt.Setting(e).setName(i).setHeading().then(o=>{let s=createDiv();o.settingEl.prepend(s),(0,zt.setIcon)(s,r)})}addPreviewButton(e,i){return e.addExtraButton(r=>{r.setIcon("lucide-message-square").setTooltip(`Hover${this.plugin.requireModKeyForLinkHover()?"+"+In("Mod").toLowerCase():""} to preview`).then(o=>{this.component.registerDomEvent(o.extraSettingsEl,"mouseover",s=>{this.app.workspace.trigger("hover-link",{event:s,source:"pdf-plus",linktext:this.file.path+`#page=${i}`,targetEl:o.extraSettingsEl,hoverParent:this.component})})})})}addButtons(){var e;return(e=this.buttonSetting)!=null?e:new zt.Setting(this.contentEl).addButton(i=>{i.setButtonText("Save").setCta().onClick(async()=>{this.pageLabels&&this.doc?(this.pageLabels.rangeCount()>0?this.pageLabels.setToDocument(this.doc):Ft.removeFromDocument(this.doc),await this.app.vault.modifyBinary(this.file,await this.doc.save())):new zt.Notice(`${this.plugin.manifest.name}: Something went wrong.`),this.close()})}).addButton(i=>{i.setButtonText("Cancel").onClick(()=>this.close())}).then(i=>{this.buttonSetting=i,this.updateButtonVisibility()})}updateButtonVisibility(){this.buttonSetting&&(this.pageLabels&&this.pageLabels.rangeCount()>0?this.buttonSetting.settingEl.show():this.buttonSetting.settingEl.hide())}};var ot=require("obsidian");var Pr=class extends rt{constructor(...e){super(...e);this.source=null;this.urls=[];this.folderPath=null;this.filePath=null;this.scope.register([],"Enter",()=>{var i;((i=activeDocument.activeElement)==null?void 0:i.tagName)==="INPUT"&&this.submit()})}onOpen(){super.onOpen(),this.titleEl.setText(`${this.plugin.manifest.name}: Create dummy file for external PDF`),this.modalEl.createDiv("",e=>{new ot.Setting(e).setDesc(createFragment(i=>{i.createEl("a",{text:"Learn more",href:"https://ryotaushio.github.io/obsidian-pdf-plus/external-pdf-files"})})),setTimeout(()=>{this.modalEl.insertBefore(e,this.contentEl)})}),this.display()}display(){ot.Platform.isDesktopApp?this.displayDesktop():this.displayMobile()}displayDesktop(){this.contentEl.empty(),this.addSourceLocationSetting(),this.source==="file"?this.addLocalFileSetting():this.source==="web"&&this.addWebFileSetting(),this.source&&this.addButtons()}displayMobile(){this.source="web",this.contentEl.empty(),this.addWebFileSetting(),this.addButtons()}addSetting(){return new ot.Setting(this.contentEl)}addSourceLocationSetting(){this.addSetting().setName("Source location").setDesc("Where the external PDF is located.").addDropdown(e=>{var i;e.addOptions({file:"On this computer",web:"Web"}).setValue((i=this.source)!=null?i:"").onChange(r=>{this.source=r,this.display()}),e.selectEl.tabIndex=this.source?-1:0})}addLocalFileSetting(){this.addSetting().setName("Folder to save the dummy files").addText(e=>{var i;e.inputEl.size=30,e.setValue((i=this.folderPath)!=null?i:""),new mr(this.app,e.inputEl).onSelect(({item:r})=>{this.folderPath=r.path})}),this.addSetting().setName("Absolute path to the PDF").setDesc('Type the path in the input box or click the "Browse" button to select the file.').addButton(e=>{e.setButtonText("Browse").setCta().onClick(()=>{var r;let i=(r=window.electron)==null?void 0:r.remote.dialog.showOpenDialogSync({properties:["openFile","multiSelections","dontAddToRecent"],filters:[{name:"PDF files",extensions:["pdf"]}]});i&&i.length>0&&(this.urls=i.map(o=>(o=o.replace(/\\/g,"/").replace(/ /g,"%20"),"file://"+(o.startsWith("/")?"":"/")+o)),this.display())})}).addExtraButton(e=>{e.setIcon("plus").setTooltip("Add another file").onClick(()=>{this.urls.push(""),this.display()})}),this.urls.length||this.urls.push("");for(let e=0;e<this.urls.length;e++)this.addSetting().then(i=>i.settingEl.addClass("no-border")).addText(i=>{i.inputEl.size=30,i.setValue(this.urls[e]?this.urls[e].replace(/^file:\/\//,""):"").onChange(r=>{this.urls[e]="file://"+r})}).addExtraButton(i=>{i.setIcon("trash").setTooltip("Remove this file").onClick(()=>{this.urls.splice(e,1),this.display()}),this.urls.length===1&&i.extraSettingsEl.hide()})}addWebFileSetting(){this.addSetting().setName("Dummy file path").setDesc('Must end with ".pdf".').addText(e=>{var i;e.inputEl.size=30,e.setPlaceholder("e.g. Folder/File.pdf").setValue((i=this.filePath)!=null?i:""),new mr(this.app,e.inputEl,{blurOnSelect:!1}).onSelect(({item:r})=>{setTimeout(()=>{let o=(0,ot.normalizePath)(r.path+"/Untitled.pdf");e.setValue(o),this.filePath=o,e.inputEl.setSelectionRange(o.lastIndexOf("/")+1,o.lastIndexOf("."))})}),e.onChange(r=>{!r||r.endsWith(".pdf")?(this.filePath=r,e.inputEl.removeClass("error")):(this.filePath=null,e.inputEl.addClass("error"))})}),this.addSetting().setName("URL of the PDF").setDesc('Must start with "https://" or "http://".').addText(e=>{e.inputEl.size=30,this.urls.length&&e.setValue(this.urls[0]),e.onChange(i=>{!i||i.startsWith("https://")||i.startsWith("http://")?(this.urls=[i],e.inputEl.removeClass("error")):(this.urls=[],e.inputEl.addClass("error"))})})}addButtons(){this.contentEl.createDiv("modal-button-container",e=>{e.createEl("button",{text:"Create",cls:"mod-cta"},i=>{i.addEventListener("click",()=>{this.submit()})}),e.createEl("button",{text:"Cancel"},i=>{i.addEventListener("click",()=>{this.close()})})})}submit(){if(this.urls=this.urls.filter(e=>e),!this.urls.length){new ot.Notice(`${this.plugin.manifest.name}: The external PDF location is not specified.`);return}if(this.source==="file"&&!this.folderPath){new ot.Notice(`${this.plugin.manifest.name}: The folder to save the dummy files is not specified.`);return}if(this.source==="web"&&!this.filePath){new ot.Notice(`${this.plugin.manifest.name}: The dummy file path is not specified.`);return}this.createDummyFiles(),this.close()}async createDummyFiles(){var s;let e=[],i=[],r=async(a,c)=>{let l=(0,ot.normalizePath)(c.split("/").slice(0,-1).join("/"));l&&(this.app.vault.getAbstractFileByPath(l)||await this.app.vault.createFolder(l));let d=this.app.vault.getAvailablePath(c.slice(0,-4),"pdf");return await this.app.vault.create(d,a)};if(this.source==="file"&&this.folderPath)for(let a of this.urls){let c=(0,ot.normalizePath)(this.folderPath+"/"+((s=a.split("/").pop())==null?void 0:s.replace(/%20/g," ")));if(!c.endsWith(".pdf")){e.push(a);continue}i.push(r(a,c).catch(l=>(e.push(a),console.error(l),null)))}else if(this.source==="web"&&this.filePath&&this.urls.length){let a=(0,ot.normalizePath)(this.filePath);a.endsWith(".pdf")?i.push(r(this.urls[0],a).catch(c=>(e=this.urls,console.error(c),null))):e=this.urls}else e=this.urls;let o=await Promise.all(i);e.length?new ot.Notice(`${this.plugin.manifest.name}: Failed to create dummy files for the following URLs: ${e.join(", ")}`):new ot.Notice(`${this.plugin.manifest.name}: Dummy files created successfully.`);for(let a of o)a&&await this.app.workspace.getLeaf(!0).openFile(a)}static async createDummyFilesFromObsidianUrl(e,i){let r=i["create-dummy"].replace(/^.*((https?)|(file):\/\/)/,"$1"),o=new Pr(e);if(o.source=r.startsWith("http")?"web":"file",o.urls=[r],"folder"in i){let s=i.folder;o.source==="web"?o.filePath=(0,ot.normalizePath)(s+"/Untitled.pdf"):o.folderPath=(0,ot.normalizePath)(s),await o.createDummyFiles();let a=e.lib.workspace.getActivePDFView();a&&a.setEphemeralState({rename:"all"});return}o.open()}};var Gp=require("obsidian");var kr=class extends rt{static openIfNecessary(t){let e=Ap();e&&Ep(e,t.manifest.minAppVersion)&&new kr(t).open()}onOpen(){super.onOpen();let t=this.plugin.manifest.name;this.setTitle(`${t}: Outdated Obsidian installer`),this.contentEl.appendText(`Your Obsidian installer is outdated and likely to be incompatible with the latest ${t}. Please download the latest installer from Obsidian's website and re-install the Obsidian app.`),this.contentEl.createDiv("modal-button-container",e=>{new Gp.ButtonComponent(e).setButtonText("Get installer from https://obsidian.md").setCta().onClick(()=>{window.open("https://obsidian.md/download","_blank")}),new Gp.ButtonComponent(e).setButtonText('What is "installer version"?').onClick(()=>{window.open("https://help.obsidian.md/Getting+started/Update+Obsidian#Installer%20updates","_blank")})})}};var Te=require("obsidian");var px=require("obsidian");var Rn=class{constructor(){this.tree=null;this.dict=null}static fromDocument(t){if(t.catalog.has(x.of("Dests"))){let i=et(t.catalog,"Dests");if(i instanceof R){let r=new Rn;return r.dict=i,r}}let e=et(t.catalog,"Names");if(e instanceof R){let i=et(e,"Dests");if(i instanceof R){let r=new Rn;return r.tree=new sa(i),r}}return null}getExplicitDest(t){var i,r;let e=null;if(this.dict){let o=et(this.dict,t);e=(i=o instanceof q?this.dict.context.lookup(o):o)!=null?i:null}else if(this.tree){let o=this.tree.get(t);e=(r=o instanceof q?this.tree._rootDict.context.lookup(o):o)!=null?r:null}if(e instanceof H)return e;if(e instanceof R){let o=e.get(x.of("D"));if(o instanceof H)return o}return null}};var Ce=class{constructor(t,e){this.plugin=t,this.doc=e,this.namedDests=Rn.fromDocument(e)}static async fromDocument(t,e){return new Ce(e,t)}static async fromFile(t,e){let{lib:i}=e,r=await i.loadPdfLibDocument(t);return new Ce(e,r)}get lib(){return this.plugin.lib}get root(){let t=et(this.doc.catalog,"Outlines");return t instanceof R?new Dr(this,t):null}set root(t){if(t){let e=this.doc.context.getObjectRef(t.dict);e||(e=this.doc.context.register(t.dict)),this.doc.catalog.set(x.of("Outlines"),e);return}this.doc.catalog.delete(x.of("Outlines"))}ensureRoot(){if(!this.root){let t=this.doc.context.obj({Type:"Outlines"});this.doc.context.register(t),this.root=new Dr(this,t)}return this.root}getLeaves(){let t=[],e=i=>{i.firstChild&&e(i.firstChild),i.nextSibling&&e(i.nextSibling),i.firstChild||t.push(i)};return this.root&&e(this.root),t}iter(t){let e=i=>{var r,o;(r=t.enter)==null||r.call(t,i),i.iterChildren(e),(o=t.leave)==null||o.call(t,i)};this.root&&e(this.root)}async iterAsync(t){let e=async i=>{var r,o;await((r=t.enter)==null?void 0:r.call(t,i)),await i.iterChildrenAsync(e),await((o=t.leave)==null?void 0:o.call(t,i))};this.root&&await e(this.root)}async prune(){await this.iterAsync({leave:async t=>{await t.destNotExistInDoc()&&(t.removeAndLiftUpChildren(),t.updateCountForAllAncestors())}})}stringify(){let t="";return this.iter({enter:e=>{e.isRoot()||(t=t+" ".repeat(e.depth-1)+"- "+e.title+`
`)}}),t}async findPDFjsOutlineTreeNode(t){let e=null;return await this.iterAsync({enter:async i=>{if(!(e||i.isRoot())&&t.item.title===i.title){let r=t.item.dest,o=i.getNormalizedDestination();if(typeof r=="string")typeof o=="string"&&r===o&&(e=i);else{let s=await t.getPageNumber();JSON.stringify(this.lib.normalizePDFJsDestArray(r,s))===JSON.stringify(o)&&(e=i)}}}}),e}static async processOutlineRoot(t,e,i){let{app:r}=i,o=await Ce.fromFile(e,i);t(o.ensureRoot());let s=await o.doc.save();await r.vault.modifyBinary(e,s)}static async findAndProcessOutlineItem(t,e,i,r){let{app:o}=r,s=await Ce.fromFile(i,r),a=await s.findPDFjsOutlineTreeNode(t);if(!a){new px.Notice(`${r.manifest.name}: Failed to process the outline item.`);return}e(a);let c=await s.doc.save();await o.vault.modifyBinary(i,c)}},Dr=class{constructor(t,e){this.outlines=t,this.dict=e}get doc(){return this.outlines.doc}get lib(){return this.outlines.plugin.lib}is(t){return t!==null&&this.dict===t.dict}_get(t){let e=et(this.dict,t);return e instanceof R?new Dr(this.outlines,e):null}_setOrDelete(t,e){if(e){let i=this.doc.context.getObjectRef(e.dict);i||(i=this.doc.context.register(e.dict)),this.dict.set(x.of(t),i);return}this.dict.delete(x.of(t))}get firstChild(){return this._get("First")}set firstChild(t){if(t&&!this.is(t.parent))throw new Error(`Item "${t.name}" is not a child of this item "${this.name}"`);this._setOrDelete("First",t)}get lastChild(){return this._get("Last")}set lastChild(t){if(t&&!this.is(t.parent))throw new Error(`Item "${t.name}" is not a child of this item "${this.name}"`);this._setOrDelete("Last",t)}get nextSibling(){return this._get("Next")}set nextSibling(t){if(t&&!(t.parent&&t.parent.is(this.parent)))throw new Error(`Item "${t.name}" is not a sibling of this item "${this.name}"`);this._setOrDelete("Next",t)}get prevSibling(){return this._get("Prev")}set prevSibling(t){if(t&&!(t.parent&&t.parent.is(this.parent)))throw new Error(`Item "${t.name}" is not a sibling of this item "${this.name}"`);this._setOrDelete("Prev",t)}get parent(){return this._get("Parent")}set parent(t){if(t&&this.isRoot())throw new Error("Cannot set parent of the root of outline");this._setOrDelete("Parent",t)}get count(){let t=et(this.dict,"Count");return t instanceof N?t.asNumber():null}set count(t){if(t===null){this.dict.delete(x.of("Count"));return}this.dict.set(x.of("Count"),N.of(t))}get title(){if(this.isRoot())throw new Error("Root of outline does not have a title");let t=et(this.dict,"Title");if(t instanceof G||t instanceof M)return t.decodeText();throw new Error("Title is not a string")}set title(t){if(this.isRoot())throw new Error("Cannot set title of the root of outline");this.dict.set(x.of("Title"),M.fromText(t))}get name(){if(this.isRoot())return"(Root)";let t=this.title;return this.iterAncestors(e=>{e.isRoot()||(t=`${e.title}/${t}`)}),t}get depth(){let t=0;return this.iterAncestors(()=>t++),t}isLeaf(){return!this.firstChild}isRoot(){return this.parent===null}createChild(t,e){let i;if(typeof e=="string")i=M.fromText(e);else{i=H.withContext(this.doc.context),i.push(this.doc.getPage(e[0]).ref),i.push(x.of(e[1]));for(let s of e.slice(2))i.push(typeof s=="number"?N.of(s):Me)}let r=this.doc.context.getObjectRef(this.dict);if(!r)throw new Error("Could not get ref for parent");let o={Title:M.fromText(t),Dest:i,Parent:r};if(this.lastChild){Object.assign(o,{Prev:this.doc.context.getObjectRef(this.lastChild.dict)});let s=new Dr(this.outlines,this.doc.context.obj(o));this.lastChild.nextSibling=s,this.lastChild=s}else{let s=new Dr(this.outlines,this.doc.context.obj(o));this.firstChild=s,this.lastChild=s}return this.lastChild}appendChild(t){if(t.isAncestorOf(this,!0))throw new Error("Cannot append an ancestor as a child");t.remove(),t.updateCountForAllAncestors(),t.parent=this,this.lastChild?(this.lastChild.nextSibling=t,t.prevSibling=this.lastChild,this.lastChild=t):(this.firstChild=t,this.lastChild=t,t.prevSibling=null),t.nextSibling=null,t.updateCountForAllAncestors()}remove(){return this.prevSibling&&(this.prevSibling.nextSibling=this.nextSibling),this.nextSibling&&(this.nextSibling.prevSibling=this.prevSibling),this.parent&&(this.is(this.parent.firstChild)&&(this.parent.firstChild=this.nextSibling),this.is(this.parent.lastChild)&&(this.parent.lastChild=this.prevSibling)),this}removeAndLiftUpChildren(){if(this.remove(),this.firstChild){if(!this.lastChild)throw new Error("Last child is not set despite having children");this.iterChildren(t=>{t.parent=this.parent}),this.prevSibling?(this.prevSibling.nextSibling=this.firstChild,this.firstChild.prevSibling=this.prevSibling):this.parent&&(this.parent.firstChild=this.firstChild,this.firstChild.prevSibling=null),this.nextSibling?(this.nextSibling.prevSibling=this.lastChild,this.lastChild.nextSibling=this.nextSibling):this.parent&&(this.parent.lastChild=this.lastChild,this.lastChild.nextSibling=null)}}iterChildren(t){let e=this.firstChild;for(;e;)t(e),e=e.nextSibling}async iterChildrenAsync(t){let e=this.firstChild;for(;e;)await t(e),e=e.nextSibling}iterAncestors(t,e=!1){e&&t(this);let i=this.parent;for(;i;)t(i),i=i.parent;return this}isAncestorOf(t,e=!1){let i=!1;return t.iterAncestors(r=>{this.is(r)&&(i=!0)},e),i}async sortChildren(){let t=[];await this.iterChildrenAsync(async r=>{let o=r.getExplicitDestination();if(o===null)return 0;let s=o[0],a=o[1]==="XYZ"?o[3]:o[1]==="FitBH"||o[1]==="FitH"?o[2]:void 0;t.push({child:r,page:s,top:a!=null?a:void 0})}),t.sort((r,o)=>{var s,a;return r.page-o.page||((s=r.top)!=null?s:0)-((a=o.top)!=null?a:0)});let e=null,i=t.first();i&&(i.child.prevSibling=null,this.firstChild=i.child);for(let{child:r}of t)e&&(e.nextSibling=r,r.prevSibling=e),e=r;e&&(e.nextSibling=null,this.lastChild=e)}async destNotExistInDoc(){var r,o,s;if(this.isRoot())return!1;let t=this.getDestination(),e=null;if(t instanceof G||t instanceof M){let a=t.decodeText();e=(o=(r=this.outlines.namedDests)==null?void 0:r.getExplicitDest(a))!=null?o:null}else t instanceof H&&(e=t);if(!e)return!0;let i=e.get(0);if(i instanceof q){let a=this.doc.context.lookup(i);if(a instanceof tt)return!((s=a.Parent())!=null&&s.Kids().asArray().includes(i))}throw new Error("The first element of a destination array must be a refernece of a page leaf node.")}countVisibleDescendants(){let t=0;return this.iterChildren(()=>t++),this.iterChildren(e=>{typeof e.count=="number"&&e.count>0&&(t+=e.countVisibleDescendants())}),t}updateCount(t){let e=this.countVisibleDescendants();if(this.isRoot()&&!t)throw new Error("Cannot close the root outline");this.count=t?e:-e}updateCountForAllAncestors(t=!1){return this.iterAncestors(e=>e.updateCount(e.isRoot()),t)}getDestination(){let t=et(this.dict,"Dest");if(t)return t;let e=et(this.dict,"A");if(e instanceof R){let i=et(e,"S");if(i instanceof x&&i.decodeText()==="GoTo"){let r=et(e,"D");return r!=null?r:null}}return null}getNormalizedDestination(){let t=this.getDestination();return t instanceof G||t instanceof M?t.decodeText():t instanceof H?this.lib.normalizePdfLibDestArray(t,this.doc):null}getExplicitDestination(){var e,i;let t=this.getNormalizedDestination();if(typeof t=="string"){let r=(i=(e=this.outlines.namedDests)==null?void 0:e.getExplicitDest(t))!=null?i:null;return r?this.lib.normalizePdfLibDestArray(r,this.doc):null}return t}};var Sr=require("obsidian");function gx(n,t,e){let i=(r,o)=>{if(o>=t.length)return;e.clickableParentItem&&r.setUseNativeMenu(!1);let s=new Set(r.items);t[o](r);let a=r.items.filter(c=>!s.has(c));if(o!=t.length-1){for(let c of a)if(c instanceof Sr.MenuItem){let l=c.callback,d=c.setSubmenu();if(e.vim){Zp(d);let h=d.scope.keys.find(u=>u.key==="Escape"&&u.modifiers==="");h&&(d.scope.unregister(h),d.scope.register([],"Escape",n.hide.bind(n)))}i(d,o+1),e.clickableParentItem&&c.onClick(l)}}};i(n,0)}function mx(n){let t=[],e=[],i=n;for(;i&&i.selected>=0;){e.push(i.selected);let r=i.items[i.selected];r instanceof Sr.MenuItem&&t.push(r),i=r instanceof Sr.MenuItem?r.submenu:null}return{items:t,indices:e}}function Xp(n,t){n.openSubmenu=function(e){return this.parentMenu&&this.closeSubmenu(),Sr.Menu.prototype.openSubmenu.call(this,e)},n.openSubmenuSoon=(0,Sr.debounce)(n.openSubmenu.bind(n),t!=null?t:250,!0)}function Zp(n){n.scope.register([],"j",n.onArrowDown.bind(n)),n.scope.register([],"k",n.onArrowUp.bind(n)),n.scope.register([],"h",n.onArrowLeft.bind(n)),n.scope.register([],"l",n.onArrowRight.bind(n))}var se=require("obsidian");var tg=require("obsidian");var xx=require("obsidian");var pt=require("obsidian");var bx=require("obsidian"),de=class extends bx.Component{constructor(e){super();this.plugin=e}get app(){return this.plugin.app}get lib(){return this.plugin.lib}get settings(){return this.plugin.settings}};var Qp=class extends de{constructor(e,i){super(e);this.child=i,this.destIdToBibText=new Map,this.destIdToParsedBib=new Map,this.events=new pt.Events,this.initialized=!1,this.init()}isEnabled(){let e=this.child.pdfViewer;return this.settings.actionOnCitationHover!=="none"&&(On(e)||this.settings.enableBibInCanvas&&ia(e)||this.settings.enableBibInHoverPopover&&na(e)||this.settings.enableBibInEmbed&&Ec(e))}async init(){this.isEnabled()&&(await this.extractBibText(),await this.parseBibText()),this.initialized=!0}async extractBibText(){return new Promise(e=>{this.lib.onDocumentReady(this.child.pdfViewer,i=>{new Yp(i).onExtracted((r,o)=>{this.destIdToBibText.set(r,o),this.events.trigger("extracted",r,o)}).extract().then(e)})})}async parseBibText(){let e=Array.from(this.destIdToBibText.values()).join(`
`),i=await this.parseBibliographyText(e);if(i){let r=Array.from(this.destIdToBibText.keys());for(let o=0;o<i.length;o++)this.destIdToParsedBib.set(r[o],i[o]),this.events.trigger("parsed",r[o],i[o])}}spawnBibPopoverOnModKeyDown(e,i,r,o){let s=()=>{let a=new pt.HoverPopover(i,o,200);a.hoverEl.addClass("pdf-plus-bib-popover");let c=a.hoverEl.createDiv();a.addChild(new Jp(this,e,c))};this.plugin.requireModKeyForLinkHover(Qp.HOVER_LINK_SOURCE_ID)?wp(r,o,s):s()}getGoogleScholarSearchUrlFromDest(e){var o;let i="",r=this.destIdToParsedBib.get(e);if(r){let{author:s,title:a,year:c,"container-title":l}=r;a&&(i+=`${a[0]}`),s&&(i+=" "+s.map(d=>d.family).join(" ")),c&&(i+=` ${c}`),l&&(i+=` ${l[0]}`)}else i=(o=this.destIdToBibText.get(e))!=null?o:"";return i?`https://scholar.google.com/scholar?hl=en&as_sdt=0%2C5&q=${encodeURIComponent(i)}`:null}async parseBibliographyText(e){let{app:i,plugin:r,settings:o}=this,s=o.anystylePath;if(!s)return null;let a=r.getAnyStyleInputDir();if(pt.Platform.isDesktopApp&&i.vault.adapter instanceof pt.FileSystemAdapter&&a){let c=i.vault.adapter.getFullPath(a);await pt.FileSystemAdapter.mkdir(c);let l=a+`/${Pp()}.txt`,d=i.vault.adapter.getFullPath(l);await i.vault.adapter.write(l,e),this.register(()=>i.vault.adapter.remove(l));let{spawn:h}=require("child_process");return new Promise(u=>{let f=h(s,["parse",d]),p="";f.stdout.on("data",g=>{if(g){p+=g.toString();return}u(null)}),f.on("error",g=>{if("code"in g&&g.code==="ENOENT"){let m=`${r.manifest.name}: AnyStyle not found at the path "${s}".`;if(r.settings.anystylePath){let b=new pt.Notice(m,8e3);b.noticeEl.appendText(" Click "),b.noticeEl.createEl("a",{text:"here"},w=>{w.addEventListener("click",()=>{r.openSettingTab().scrollTo("anystylePath")})}),b.noticeEl.appendText(" to update the path."),console.error(m)}else console.warn(m);return u(null)}}),f.on("close",g=>{var b;if(g)return u(null);let m=JSON.parse(p);if(Array.isArray(m)){for(let w of m)for(let F of(b=w.date)!=null?b:[]){let v=F.match(/\d{4}/);if(v){w.year=v[0];break}}u(m)}u(null)})})}return null}on(e,i,r){return this.events.on(e,i,r)}},Ci=Qp;Ci.HOVER_LINK_SOURCE_ID="pdf-plus-citation-link";var Yp=class{constructor(t){this.doc=t,this.pageRefToTextContentItemsPromise={}}onExtracted(t){return this.onExtractedCallback=t,this}async extract(){let t=await this.doc.getDestinations(),e=[];for(let i in t)if(i.startsWith("cite.")){let r=t[i];e.push(this.extractBibTextForDest(r).then(o=>{var s;if(o){let a=o.text;(s=this.onExtractedCallback)==null||s.call(this,i,a)}}))}await Promise.all(e)}async getTextContentItemsFromPageRef(t){var i;let e=JSON.stringify(t);return(i=this.pageRefToTextContentItemsPromise[e])!=null?i:this.pageRefToTextContentItemsPromise[e]=(async()=>{let r=await this.doc.getPageIndex(t)+1;return(await(await this.doc.getPage(r)).getTextContent()).items})()}async extractBibTextForDest(t){let e=t[0],i=await this.getTextContentItemsFromPageRef(e),r=-1;if(t[1].name==="XYZ"){let d=t[2],h=t[3];if(d===null||h===null)return null;r=i.findIndex(u=>{if(!u.str)return!1;let f=u.transform[4],p=u.transform[5]+(u.height||u.transform[0])*.8;return d<=f&&p<=h})}else if(t[1].name==="FitBH"){let d=t[2];if(d===null)return null;r=i.findIndex(h=>h.str?h.transform[5]+(h.height||h.transform[0])*.8<=d:!1)}if(r===-1)return null;let o=i[r],s=o.transform[4],a=i[r].str,c=r+1,l=[o];for(;;){let d=i[c];if(!d||d.transform[4]<=s+Math.max(d.height,8)*.1)break;d.str.trimStart().startsWith(".")||d.str.trimStart().startsWith(",")?a=a.trimEnd()+d.str.trimStart():a+=`
`+d.str,l.push(d),c++}return a=a.trimStart().replace(/^\[\d+\]/,""),a=a.trimStart().replace(/^\(\d+\)/,""),a=a.trimStart().replace(/^\d+\./,""),{text:Ic(a),items:l}}},Jp=class extends de{constructor(e,i,r){super(e.plugin);this.bib=e,this.destId=i,this.containerEl=r,this.containerEl.addClass("pdf-plus-bib")}get child(){return this.bib.child}renderParsedBib(e){let{author:i,title:r,year:o,"container-title":s}=e;return i?(this.containerEl.createDiv("",a=>{a.createDiv("bib-title",c=>{var l;c.setText((l=r==null?void 0:r[0])!=null?l:"No title")}),a.createDiv("bib-author-year",c=>{let l=i.map(d=>{let h="";return d.given&&(h+=d.given),d.family&&(h+=" "+d.family),h}).filter(d=>d).join(", ");c.appendText(l),o&&c.appendText(` (${o})`)}),s&&a.createDiv("bib-container-title",c=>{c.setText(s[0])})}),!0):!1}async onload(){await this.render()}async render(){this.containerEl.empty();let e=!1,i=this.bib.destIdToParsedBib.get(this.destId);if(i&&(e=this.renderParsedBib(i)),!e){let r=this.bib.destIdToBibText.get(this.destId);r?(this.containerEl.createDiv({text:r}),pt.Platform.isDesktopApp&&this.settings.anystylePath&&this.registerRenderOn("parsed")):this.bib.initialized?this.containerEl.createDiv({text:"No bibliography found"}):(this.containerEl.createDiv({text:"Loading..."}),this.registerRenderOn("extracted"))}this.containerEl.createDiv("button-container",r=>{new pt.ButtonComponent(r).setButtonText("Google Scholar").onClick(()=>{let o=this.bib.getGoogleScholarSearchUrlFromDest(this.destId);if(!o){new pt.Notice(`${this.plugin.manifest.name}: ${this.bib.initialized?"No bibliography found":"Still loading the bibliography information. Please try again later."}`);return}window.open(o)}),new pt.ExtraButtonComponent(r).setIcon("lucide-settings").setTooltip("Customize...").onClick(()=>{this.plugin.openSettingTab().scrollToHeading("citation")})})}registerRenderOn(e){let i=this.bib.on(e,r=>{r===this.destId&&(this.render(),this.bib.events.offref(i))});this.registerEvent(i)}onunload(){this.containerEl.empty()}};var gh=class{get hoverPopover(){return this.child.hoverPopover}set hoverPopover(t){this.child.hoverPopover=t,t&&this.onHoverPopoverSet(t)}onHoverPopoverSet(t){}constructor(t,e,i){this.plugin=t,this.app=t.app,this.lib=t.lib,this.child=e,this.targetEl=i,this.useModifierKey()&&this.registerClickToOpenInNewLeaf(),this.shouldShowHoverPopover()&&this.registerHover(),this.shouldRecordHistory()&&this.registerClickToRecordHistory()}get hoverLinkSourceId(){return this.constructor.HOVER_LINK_SOURCE_ID}get file(){return this.child.file}get sourcePath(){var t,e;return(e=(t=this.file)==null?void 0:t.path)!=null?e:""}registerClickToOpenInNewLeaf(){let{app:t,plugin:e,targetEl:i}=this;e.registerDomEvent(i,"click",async r=>{if(r.defaultPrevented)return;let o=xx.Keymap.isModEvent(r);if(!o)return;r.preventDefault(),r.stopPropagation();let s=await this.getLinkText(r);s!==null&&t.workspace.openLinkText(s,this.sourcePath,o)},{capture:!0})}async customHover(t){return!1}registerHover(){let{app:t,plugin:e,targetEl:i}=this;e.registerDomEvent(i,"mouseover",async r=>{if(await this.customHover(r))return;let o=null;try{o=await this.getLinkText(r)}catch(s){if(s.name==="UnknownErrorException")return console.warn(`${this.plugin.manifest.name}: The destination was not found in this document.`);throw s}o!==null&&t.workspace.trigger("hover-link",{event:r,source:this.hoverLinkSourceId,hoverParent:this,targetEl:i,linktext:o,sourcePath:this.sourcePath})})}registerClickToRecordHistory(){let{plugin:t,targetEl:e}=this;t.registerDomEvent(e,"click",i=>{this.recordLeafHistory()},{capture:!0})}recordLeafHistory(){this.lib.workspace.iteratePDFViews(t=>{if(t.containerEl.contains(this.targetEl)){let e=t.leaf;e.recordHistory(e.getHistoryState())}})}},mh=class extends gh{async getLinkText(t){var c,l,d;let{lib:e,child:i,targetEl:r}=this;if(!fi(t,r))return null;let o=(c=i.pdfViewer.pdfViewer)==null?void 0:c.pdfDocument;if(!o)return null;let s=this.getDest(),a=null;return typeof s=="string"?a=await e.destIdToSubpath(s,o):a=await e.pdfJsDestArrayToSubpath(s,o),a===null?null:((d=(l=this.file)==null?void 0:l.path)!=null?d:"")+a}onHoverPopoverSet(t){let e=t.hoverEl;e.addClass("pdf-plus-pdf-internal-link-popover");let i=this.getDest();typeof i=="string"&&(e.dataset.dest=i)}},bh=class extends mh{constructor(e,i,r){super(e,i,r.container);this.linkAnnotationElement=r}static registerEvents(e,i,r){return r.data.subtype==="Link"?new bh(e,i,r):null}async getLinkText(e){var i,r;if(this.plugin.settings.actionOnCitationHover==="google-scholar-popover"&&this.lib.requirePluginNewerThan("surfing","0.9.5")){let o=this.getDest();if(sh(o)&&((i=this.child.pdfViewer.pdfViewer)==null?void 0:i.pdfDocument)){let a=(r=this.child.bib)==null?void 0:r.getGoogleScholarSearchUrlFromDest(o);if(a)return a}}return super.getLinkText(e)}getDest(){return this.linkAnnotationElement.data.dest}useModifierKey(){return this.plugin.settings.clickPDFInternalLinkWithModifierKey}shouldShowHoverPopover(){return this.plugin.settings.enableHoverPDFInternalLink}isCitationLink(){let e=this.getDest();return sh(e)}get hoverLinkSourceId(){return this.isCitationLink()?Ci.HOVER_LINK_SOURCE_ID:bh.HOVER_LINK_SOURCE_ID}shouldRecordHistory(){return this.plugin.settings.recordPDFInternalLinkHistory&&!this.child.opts.isEmbed}async customHover(e){if(this.plugin.settings.actionOnCitationHover==="pdf-plus-bib-popover"&&this.child.bib&&this.child.bib.isEnabled()){let i=this.getDest();if(typeof i=="string"&&i.startsWith("cite."))return this.child.bib.spawnBibPopoverOnModKeyDown(i,this,e,this.targetEl),!0}return!1}},Yi=bh;Yi.HOVER_LINK_SOURCE_ID="pdf-plus-internal-link";var _p=class extends mh{constructor(e,i,r){super(e,i,r.selfEl);this.item=r}static registerEvents(e,i,r){return new _p(e,i,r)}getDest(){return this.item.item.dest}useModifierKey(){return this.plugin.settings.clickOutlineItemWithModifierKey}shouldShowHoverPopover(){return this.plugin.settings.popoverPreviewOnOutlineHover}shouldRecordHistory(){return this.plugin.settings.recordHistoryOnOutlineClick&&!this.child.opts.isEmbed}},Ji=_p;Ji.HOVER_LINK_SOURCE_ID="pdf-plus-outline";var $p=class extends gh{static registerEvents(t,e){return new $p(t,e,e.pdfViewer.pdfThumbnailViewer.container)}async getLinkText(t){var r,o;let e=vt(t,t.target)&&t.target.closest('.pdf-thumbnail-view > a[href^="#page="]');if(!e)return null;let i=e.getAttribute("href");return((o=(r=this.file)==null?void 0:r.path)!=null?o:"")+i}useModifierKey(){return this.plugin.settings.clickThumbnailWithModifierKey}shouldShowHoverPopover(){return this.plugin.settings.popoverPreviewOnThumbnailHover}shouldRecordHistory(){return this.plugin.settings.recordHistoryOnThumbnailClick&&!this.child.opts.isEmbed}},Qi=$p;Qi.HOVER_LINK_SOURCE_ID="pdf-plus-thumbnail";var xh=class extends de{constructor(e,i,r){super(e);this.child=i,this.annot=r}get hoverPopover(){return this.child.hoverPopover}set hoverPopover(e){this.child.hoverPopover=e}get hoverLinkSourceId(){return xh.HOVER_LINK_SOURCE_ID}onload(){this.settings.popoverPreviewOnExternalLinkHover&&this.registerDomEvent(this.annot.container,"mouseover",e=>{let i=this.annot.data.url;i&&(i.startsWith("http://")||i.startsWith("https://"))&&this.app.workspace.trigger("hover-link",{event:e,source:this.hoverLinkSourceId,hoverParent:this,targetEl:this.annot.container,linktext:i})})}static registerEvents(e,i,r){var o;return r.data.subtype==="Link"&&r.data.url?(o=i.component)==null?void 0:o.addChild(new xh(e,i,r)):null}},Vn=xh;Vn.HOVER_LINK_SOURCE_ID="pdf-plus-external-link";var xP={highlight:"Highlight",underline:"Underline"},yP={open:"Open backlink",preview:"Popover preview of backlink"},yh={"":"Current tab",tab:"New tab",right:"Split right",left:"Split left",down:"Split down",up:"Split up",window:"New window","right-sidebar":"Right sidebar","left-sidebar":"Left sidebar"},yx={"last-paste":"Last pasted .md","last-active":"Last active .md","last-active-and-open":"Last active & open .md","last-paste-then-last-active":"Last pasted .md if any, otherwise last active .md","last-paste-then-last-active-and-open":"Last pasted .md if any, otherwise last active & open .md","last-active-and-open-then-last-paste":"Last active & open .md if any, otherwise last pasted .md"},wP={root:"Vault folder",current:"Same folder as current file",folder:"In the folder specified below"},vP=["png","jpg","webp","bmp"],vx="green",eg={none:"Same as other internal links","pdf-plus-bib-popover":"PDF++'s custom bibliography popover","google-scholar-popover":"Google Scholar popover"},FP={text:"Copy text",obsidian:"Obsidian default (copy as quote)","pdf-plus":"Run PDF++'s copy command"},Ti={displayTextFormats:[{name:"Title & page",template:"{{file.basename}}, p.{{pageLabel}}"},{name:"Page",template:"p.{{pageLabel}}"},{name:"Text",template:"{{text}}"},{name:"Emoji",template:"\u{1F4D6}"},{name:"None",template:""}],defaultDisplayTextFormatIndex:0,syncDisplayTextFormat:!0,syncDefaultDisplayTextFormat:!1,copyCommands:[{name:"Quote",template:`> ({{linkWithDisplay}})
> {{selection}}
`},{name:"Link",template:"{{linkWithDisplay}}"},{name:"Embed",template:"!{{link}}"},{name:"Callout",template:`> [!{{calloutType}}|{{color}}] {{linkWithDisplay}}
> {{text}}
`},{name:"Quote in callout",template:`> [!{{calloutType}}|{{color}}] {{linkWithDisplay}}
> > {{text}}
>
> `}],useAnotherCopyTemplateWhenNoSelection:!1,copyTemplateWhenNoSelection:"{{linkToPageWithDisplay}}",trimSelectionEmbed:!1,embedMargin:50,noSidebarInEmbed:!0,noSpreadModeInEmbed:!0,embedUnscrollable:!1,singleTabForSinglePDF:!0,highlightExistingTab:!1,existingTabHighlightOpacity:.5,existingTabHighlightDuration:.75,paneTypeForFirstPDFLeaf:"left",openLinkNextToExistingPDFTab:!0,openPDFWithDefaultApp:!1,openPDFWithDefaultAppAndObsidian:!0,focusObsidianAfterOpenPDFWithDefaultApp:!0,syncWithDefaultApp:!1,dontActivateAfterOpenPDF:!0,dontActivateAfterOpenMD:!0,highlightDuration:.75,noTextHighlightsInEmbed:!1,noAnnotationHighlightsInEmbed:!0,persistentTextHighlightsInEmbed:!0,persistentAnnotationHighlightsInEmbed:!1,highlightBacklinks:!0,selectionBacklinkVisualizeStyle:"highlight",dblclickEmbedToOpenLink:!0,highlightBacklinksPane:!0,highlightOnHoverBacklinkPane:!0,backlinkHoverColor:"",colors:{Yellow:"#ffd000",Red:"#ea5252",Note:"#086ddd",Important:"#bb61e5"},defaultColor:"",defaultColorPaletteItemIndex:0,syncColorPaletteItem:!0,syncDefaultColorPaletteItem:!1,colorPaletteInToolbar:!0,noColorButtonInColorPalette:!0,colorPaletteInEmbedToolbar:!1,quietColorPaletteTooltip:!1,showStatusInToolbar:!0,highlightColorSpecifiedOnly:!1,doubleClickHighlightToOpenBacklink:!0,hoverHighlightAction:"preview",paneTypeForFirstMDLeaf:"right",singleMDLeafInSidebar:!0,alwaysUseSidebar:!0,ignoreExistingMarkdownTabIn:[],defaultColorPaletteActionIndex:4,syncColorPaletteAction:!0,syncDefaultColorPaletteAction:!1,proxyMDProperty:"PDF",hoverPDFLinkToOpen:!1,ignoreHeightParamInPopoverPreview:!0,filterBacklinksByPageDefault:!0,showBacklinkToPage:!0,enableHoverPDFInternalLink:!0,recordPDFInternalLinkHistory:!0,alwaysRecordHistory:!0,renderMarkdownInStickyNote:!1,enablePDFEdit:!1,author:"",writeHighlightToFileOpacity:.2,defaultWriteFileToggle:!1,syncWriteFileToggle:!0,syncDefaultWriteFileToggle:!1,enableAnnotationDeletion:!0,warnEveryAnnotationDelete:!1,warnBacklinkedAnnotationDelete:!0,enableAnnotationContentEdit:!0,enableEditEncryptedPDF:!1,pdfLinkColor:"#04a802",pdfLinkBorder:!1,replaceContextMenu:!0,showContextMenuOnMouseUpIf:"Mod",contextMenuConfig:[{id:"action",visible:!0},{id:"selection",visible:!0},{id:"write-file",visible:!0},{id:"annotation",visible:!0},{id:"modify-annotation",visible:!0},{id:"link",visible:!0},{id:"text",visible:!0},{id:"search",visible:!0},{id:"speech",visible:!0},{id:"page",visible:!0},{id:"settings",visible:!0}],selectionProductMenuConfig:["color","copy-format","display"],writeFileProductMenuConfig:["color","copy-format","display"],annotationProductMenuConfig:["copy-format","display"],updateColorPaletteStateFromContextMenu:!0,mobileCopyAction:"pdf-plus",showContextMenuOnTablet:!1,executeBuiltinCommandForOutline:!0,executeBuiltinCommandForZoom:!0,executeFontSizeAdjusterCommand:!0,closeSidebarWithShowCommandIfExist:!0,autoHidePDFSidebar:!1,defaultSidebarView:1,outlineDrag:!0,outlineContextMenu:!0,outlineLinkDisplayTextFormat:"{{file.basename}}, {{text}}",outlineLinkCopyFormat:"{{linkWithDisplay}}",recordHistoryOnOutlineClick:!0,popoverPreviewOnOutlineHover:!0,thumbnailDrag:!0,thumbnailContextMenu:!0,thumbnailLinkDisplayTextFormat:"{{file.basename}}, p.{{pageLabel}}",thumbnailLinkCopyFormat:"{{linkWithDisplay}}",recordHistoryOnThumbnailClick:!0,popoverPreviewOnThumbnailHover:!0,annotationPopupDrag:!0,showAnnotationPopupOnHover:!0,useCallout:!0,calloutType:"PDF",calloutIcon:"highlighter",highlightBacklinksInEmbed:!1,highlightBacklinksInHoverPopover:!1,highlightBacklinksInCanvas:!0,clickPDFInternalLinkWithModifierKey:!0,clickOutlineItemWithModifierKey:!0,clickThumbnailWithModifierKey:!0,focusEditorAfterAutoPaste:!0,clearSelectionAfterAutoPaste:!0,respectCursorPositionWhenAutoPaste:!0,autoCopy:!1,autoFocus:!1,autoPaste:!1,autoFocusTarget:"last-active-and-open-then-last-paste",autoPasteTarget:"last-active-and-open-then-last-paste",openAutoFocusTargetIfNotOpened:!0,howToOpenAutoFocusTargetIfNotOpened:"right",closeHoverEditorWhenLostFocus:!0,closeSidebarWhenLostFocus:!1,openAutoFocusTargetInEditingView:!0,executeCommandWhenTargetNotIdentified:!0,commandToExecuteWhenTargetNotIdentified:"switcher:open",autoPasteTargetDialogTimeoutSec:20,autoCopyToggleRibbonIcon:!0,autoCopyIconName:"highlighter",autoFocusToggleRibbonIcon:!0,autoFocusIconName:"zap",autoPasteToggleRibbonIcon:!0,autoPasteIconName:"clipboard-paste",viewSyncFollowPageNumber:!0,viewSyncPageDebounceInterval:.3,openAfterExtractPages:!0,howToOpenExtractedPDF:"tab",warnEveryPageDelete:!1,warnBacklinkedPageDelete:!0,extractPageInPlace:!1,askExtractPageInPlace:!0,pageLabelUpdateWhenInsertPage:"keep",pageLabelUpdateWhenDeletePage:"keep",pageLabelUpdateWhenExtractPage:"keep",askPageLabelUpdateWhenInsertPage:!0,askPageLabelUpdateWhenDeletePage:!0,askPageLabelUpdateWhenExtractPage:!0,copyOutlineAsListFormat:"{{linkWithDisplay}}",copyOutlineAsListDisplayTextFormat:"{{text}}",copyOutlineAsHeadingsFormat:`{{text}}
{{linkWithDisplay}}`,copyOutlineAsHeadingsDisplayTextFormat:"p.{{pageLabel}}",copyOutlineAsHeadingsMinLevel:2,newFileNameFormat:"",newFileTemplatePath:"",newPDFLocation:"current",newPDFFolderPath:"",rectEmbedStaticImage:!1,rectImageFormat:"file",rectImageExtension:"webp",zoomToFitRect:!1,rectEmbedResolution:100,includeColorWhenCopyingRectLink:!0,backlinkIconSize:50,showBacklinkIconForSelection:!1,showBacklinkIconForAnnotation:!1,showBacklinkIconForOffset:!0,showBacklinkIconForRect:!1,showBoundingRectForBacklinkedAnnot:!1,hideReplyAnnotation:!1,searchLinkHighlightAll:"true",searchLinkCaseSensitive:"true",searchLinkMatchDiacritics:"default",searchLinkEntireWord:"false",dontFitWidthWhenOpenPDFLink:!0,preserveCurrentLeftOffsetWhenOpenPDFLink:!1,defaultZoomValue:"page-width",scrollModeOnLoad:0,spreadModeOnLoad:0,hoverableDropdownMenuInToolbar:!0,zoomLevelInputBoxInToolbar:!0,popoverPreviewOnExternalLinkHover:!0,actionOnCitationHover:"pdf-plus-bib-popover",anystylePath:"",enableBibInEmbed:!1,enableBibInHoverPopover:!1,enableBibInCanvas:!0,copyAsSingleLine:!0,removeWhitespaceBetweenCJChars:!0,vim:!1,vimrcPath:"",vimVisualMotion:!0,vimScrollSize:40,vimLargerScrollSizeWhenZoomIn:!0,vimContinuousScrollSpeed:1.2,vimSmoothScroll:!0,vimHlsearch:!0,vimIncsearch:!0,enableVimInContextMenu:!0,enableVimOutlineMode:!0,vimSmoothOutlineMode:!0,vimHintChars:"hjklasdfgyuiopqwertnmzxcvb",vimHintArgs:"all",PATH:""};function PP(n){return Ti.hasOwnProperty(n)}var Bn=In("Mod").toLowerCase(),wh=class extends se.PluginSettingTab{constructor(e){super(e.app,e);this.plugin=e;this.events=new se.Events;this.component=new se.Component,this.items={},this.headings=new Map,this.iconHeadings=new Map,this.headerEls=new Map,this.promises=[],this.containerEl.addClass("pdf-plus-settings"),this.headerContainerEl=this.containerEl.createDiv("header-container"),this.contentEl=this.containerEl.createDiv("content")}addSetting(e){let i=new se.Setting(this.contentEl);return e&&(this.items[e]=i,this.component.registerDomEvent(i.settingEl,"contextmenu",r=>{r.preventDefault(),new tg.Menu().addItem(o=>{o.setTitle("Copy link to this setting").setIcon("lucide-link").onClick(()=>{navigator.clipboard.writeText(`obsidian://pdf-plus?setting=${e}`)})}).showAtMouseEvent(r)})),i}addHeading(e,i,r,o){let s=this.addSetting().setName(e).setHeading().then(a=>{if(r){let c=a.settingEl.parentElement;c&&c.insertBefore(createDiv("spacer"),a.settingEl);let l=createDiv();a.settingEl.prepend(l),(0,se.setIcon)(l,r),a.settingEl.addClass("pdf-plus-setting-heading")}});return this.headings.set(i,s),this.component.registerDomEvent(s.settingEl,"contextmenu",a=>{a.preventDefault(),new tg.Menu().addItem(c=>{c.setTitle("Copy link to this heading").setIcon("lucide-link").onClick(()=>{navigator.clipboard.writeText(`obsidian://pdf-plus?setting=heading:${i}`)})}).showAtMouseEvent(a)}),r&&this.headerContainerEl.createDiv("clickable-icon header",a=>{let c=a.createDiv();(0,se.setIcon)(c,r);let l=a.createDiv("header-title");l.setText(e),(0,se.setTooltip)(a,e),this.component.registerDomEvent(a,"click",d=>{var h;((h=s.settingEl.previousElementSibling)!=null?h:s.settingEl).scrollIntoView({behavior:"smooth"}),this.updateHeaderElClassOnScroll(d)}),o==null||o({headerEl:a,iconEl:c,titleEl:l}),this.iconHeadings.set(i,s),this.headerEls.set(i,a)}),s}updateHeaderElClass(){var r,o,s;let e=this.containerEl.getBoundingClientRect().height,i=Array.from(this.iconHeadings.entries());for(let a=0;a<i.length;a++){let c=i[a][1].settingEl.getBoundingClientRect().top,l=(o=(r=i[a+1])==null?void 0:r[1].settingEl.getBoundingClientRect().top)!=null?o:this.contentEl.getBoundingClientRect().bottom,d=c<=e*.85&&l>=e*.2+this.headerContainerEl.clientHeight,h=i[a][0];(s=this.headerEls.get(h))==null||s.toggleClass("is-active",d)}}updateHeaderElClassOnScroll(e){var o;let i=(o=e==null?void 0:e.win)!=null?o:activeWindow,r=i.setInterval(()=>this.updateHeaderElClass(),50);i.setTimeout(()=>i.clearInterval(r),1500)}scrollTo(e,i){let r=this.items[e];r&&this.scrollToSetting(r,i)}scrollToHeading(e,i){let r=this.headings.get(e);r&&this.scrollToSetting(r,i)}scrollToSetting(e,i){let r=e.settingEl;r&&this.containerEl.scrollTo({top:r.offsetTop-this.headerContainerEl.offsetHeight,...i})}openFromObsidianUrl(e){let i=e.setting;i.startsWith("heading:")?this.plugin.openSettingTab().scrollToHeading(i.slice(8)):PP(i)&&this.plugin.openSettingTab().scrollTo(i)}getVisibilityToggler(e,i){let r=()=>{i()?e.settingEl.show():e.settingEl.hide()};return r(),r}showConditionally(e,i){let r=Array.isArray(e)?e:[e],o=r.map(s=>this.getVisibilityToggler(s,i));return this.events.on("update",()=>o.forEach(s=>s())),r}addTextSetting(e,i,r){let o=this.addSetting(e).addText(s=>{s.setValue(this.plugin.settings[e]).setPlaceholder(i!=null?i:"").then(a=>{i&&(a.inputEl.size=Math.max(a.inputEl.size,a.inputEl.placeholder.length))}).onChange(async a=>{this.plugin.settings[e]=a,await this.plugin.saveSettings()}),r&&(this.component.registerDomEvent(s.inputEl,"blur",()=>{r(o)}),this.component.registerDomEvent(s.inputEl,"keypress",a=>{a.key==="Enter"&&r(o)}))});return o}addTextAreaSetting(e,i,r){return this.addSetting(e).addTextArea(o=>{o.setValue(this.plugin.settings[e]).setPlaceholder(i!=null?i:"").onChange(async s=>{this.plugin.settings[e]=s,await this.plugin.saveSettings()}),r&&this.component.registerDomEvent(o.inputEl,"blur",r)})}addNumberSetting(e){return this.addSetting(e).addText(i=>{i.setValue(""+this.plugin.settings[e]).setPlaceholder(""+Ti[e]).then(r=>r.inputEl.type="number").onChange(async r=>{this.plugin.settings[e]=r===""?Ti[e]:+r,await this.plugin.saveSettings()})})}addToggleSetting(e,i){return this.addSetting(e).addToggle(r=>{r.setValue(this.plugin.settings[e]).onChange(async o=>{this.plugin.settings[e]=o,await this.plugin.saveSettings(),i==null||i(o)})})}addColorPickerSetting(e,i){return this.addSetting(e).addColorPicker(r=>{r.setValue(this.plugin.settings[e]).onChange(async o=>{this.plugin.settings[e]=o,await this.plugin.saveSettings(),i==null||i(o)})})}addDropdownSetting(e,...i){let r=[],o=a=>a,s=a=>{};return Array.isArray(i[0])?(r=i[0],typeof i[1]=="function"&&(o=i[1]),typeof i[2]=="function"&&(s=i[2])):(r=Object.keys(i[0]),o=a=>i[0][a],typeof i[1]=="function"&&(s=i[1])),this.addSetting(e).addDropdown(a=>{var c;for(let l of r){let d=(c=o(l))!=null?c:l;a.addOption(l,d)}a.setValue(this.plugin.settings[e]).onChange(async l=>{this.plugin.settings[e]=l,await this.plugin.saveSettings(),s==null||s(l)})})}addIndexDropdownSetting(e,i,r,o){return this.addSetting(e).addDropdown(s=>{var l;for(let d of i){let h=(l=r==null?void 0:r(d))!=null?l:d;s.addOption(d,h)}let a=this.plugin.settings[e],c=i[a];s.setValue(c).onChange(async d=>{let h=i.indexOf(d);h!==-1&&(this.plugin.settings[e]=h,await this.plugin.saveSettings(),o==null||o(h))})})}addEnumDropdownSetting(e,i,r){return this.addSetting(e).addDropdown(o=>{for(let[s,a]of Object.entries(i))parseInt(s).toString()===s&&o.addOption(s,a);o.setValue(""+this.plugin.settings[e]).onChange(async s=>{this.plugin.settings[e]=+s,await this.plugin.saveSettings(),r==null||r(+s)})})}addSliderSetting(e,i,r,o){return this.addSetting(e).addSlider(s=>{s.setLimits(i,r,o).setValue(this.plugin.settings[e]).setDynamicTooltip().onChange(async a=>{this.plugin.settings[e]=a,await this.plugin.saveSettings()})})}addDesc(e){return this.addSetting().setDesc(e)}addFileLocationSetting(e,i,r,o){return[this.addDropdownSetting(e,wP,()=>this.redisplay()).then(i),this.addSetting().addText(s=>{s.setValue(this.plugin.settings[r]),s.inputEl.size=30,new mr(this.app,s.inputEl).onSelect(({item:a})=>{this.plugin.settings[r]=a.path,this.plugin.saveSettings()})}).then(s=>{o(s),this.plugin.settings[e]!=="folder"&&s.settingEl.hide()})]}addFundingButton(){let e=i=>{let r=i.firstElementChild;(r==null?void 0:r.tagName)==="svg"&&(r.setAttribute("fill","var(--color-red)"),r.setAttribute("stroke","var(--color-red)"))};return this.addHeading("Support development","funding","lucide-heart",({iconEl:i})=>e(i)).setDesc(`If you find PDF++ helpful, please consider supporting the development to help me keep this plugin alive.
If you prefer PayPal, please make donations via Ko-fi. Thank you!`).then(i=>{let r=i.infoEl,o=i.settingEl.firstElementChild;if(!o)return;let s=i.settingEl.createDiv();s.appendChild(o),s.appendChild(r),i.settingEl.prepend(s),i.settingEl.id="pdf-plus-funding",s.id="pdf-plus-funding-icon-info-container",o.id="pdf-plus-funding-icon",e(o)}).addButton(i=>{i.setButtonText("GitHub Sponsors").onClick(()=>{open("https://github.com/sponsors/RyotaUshio")})}).addButton(i=>{i.setButtonText("Buy Me a Coffee").onClick(()=>{open("https://www.buymeacoffee.com/ryotaushio")})}).addButton(i=>{i.setButtonText("Ko-fi").onClick(()=>{open("https://ko-fi.com/ryotaushio")})})}async renderMarkdown(e,i){this.promises.push(this._renderMarkdown(e,i)),i.addClass("markdown-rendered")}async _renderMarkdown(e,i){await se.MarkdownRenderer.render(this.app,Array.isArray(e)?e.join(`
`):e,i,"",this.component),i.childNodes.length===1&&i.firstChild instanceof HTMLParagraphElement&&i.replaceChildren(...i.firstChild.childNodes)}addColorSetting(e){let i=this.plugin.settings.colors,[r,o]=Object.entries(i)[e],s=this.plugin.settings.defaultColor===r,a=o;return this.addSetting().addText(c=>{c.setPlaceholder("Color name (case-insensitive)").then(l=>{l.inputEl.size=l.inputEl.placeholder.length,(0,se.setTooltip)(l.inputEl,"Color name (case-insensitive)")}).setValue(r).onChange(async l=>{if(l in i){new se.Notice("This color name is already used."),c.inputEl.addClass("error");return}c.inputEl.removeClass("error"),delete i[r];for(let d of["defaultColor","backlinkHoverColor"]){let h=this.items[d];if(h){let u=h.components[0].selectEl.querySelector(`:scope > option:nth-child(${e+2})`);u&&(u.value=l,u.textContent=l)}}r=l,i[r]=o,s&&(this.plugin.settings.defaultColor=r),await this.plugin.saveSettings(),this.plugin.loadStyle()})}).addColorPicker(c=>{c.setValue(o),c.onChange(async l=>{a=o,o=l,i[r]=o,await this.plugin.saveSettings(),this.plugin.loadStyle()})}).addExtraButton(c=>{c.setIcon("rotate-ccw").setTooltip("Return to previous color").onClick(async()=>{o=a,i[r]=o,await this.plugin.saveSettings(),this.plugin.loadStyle(),this.redisplay()})}).addExtraButton(c=>{c.setIcon("trash").setTooltip("Delete").onClick(async()=>{this.plugin.settings.defaultColor===r&&(this.plugin.settings.defaultColor=""),delete i[r],await this.plugin.saveSettings(),this.plugin.loadStyle(),this.redisplay()})})}addNameValuePairListSetting(e,i,r,o,s){let{getName:a,setName:c,getValue:l,setValue:d}=o,h=e[i],u=a(h),f=l(h);return this.addSetting().addText(p=>{p.setPlaceholder(s.name.placeholder).then(g=>{g.inputEl.size=s.name.formSize,(0,se.setTooltip)(g.inputEl,s.name.placeholder)}).setValue(u).onChange(async g=>{if(e.some(b=>a(b)===g)){new se.Notice(s.name.duplicateMessage),p.inputEl.addClass("error");return}p.inputEl.removeClass("error"),c(h,g);let m=this.items[r];if(m){let b=m.components[0].selectEl.querySelector(`:scope > option:nth-child(${i+1})`);b&&(b.value=g,b.textContent=g)}await this.plugin.saveSettings()})}).then(p=>{s.value.hasOwnProperty("formRows")?p.addTextArea(g=>{g.setPlaceholder(s.value.placeholder).then(m=>{m.inputEl.rows=s.value.formRows,m.inputEl.cols=s.value.formSize,(0,se.setTooltip)(m.inputEl,s.value.placeholder)}).setValue(f).onChange(async m=>{d(h,m),await this.plugin.saveSettings()})}):p.addText(g=>{g.setPlaceholder(s.value.placeholder).then(m=>{m.inputEl.size=s.value.formSize,(0,se.setTooltip)(m.inputEl,s.value.placeholder)}).setValue(f).onChange(async m=>{d(h,m),await this.plugin.saveSettings()})})}).addExtraButton(p=>{p.setIcon("trash").setTooltip("Delete").onClick(async()=>{if(e.length===1){new se.Notice(s.delete.deleteLastMessage);return}e.splice(i,1),this.plugin.settings[r]>i?this.plugin.settings[r]--:this.plugin.settings[r]===i&&(this.plugin.settings[r]=0),await this.plugin.saveSettings(),this.redisplay()})}).setClass("no-border")}addNamedTemplatesSetting(e,i,r,o){return this.addNameValuePairListSetting(e,i,r,{getName:s=>s.name,setName:(s,a)=>{s.name=a},getValue:s=>s.template,setValue:(s,a)=>{s.template=a}},o)}addDisplayTextSetting(e){return this.addNamedTemplatesSetting(this.plugin.settings.displayTextFormats,e,"defaultDisplayTextFormatIndex",{name:{placeholder:"Format name",formSize:30,duplicateMessage:"This format name is already used."},value:{placeholder:"Display text format",formSize:50},delete:{deleteLastMessage:"You cannot delete the last display text format."}})}addCopyCommandSetting(e){return this.addNamedTemplatesSetting(this.plugin.settings.copyCommands,e,"defaultColorPaletteActionIndex",{name:{placeholder:"Format name",formSize:30,duplicateMessage:"This format name is already used."},value:{placeholder:"Copied text format",formSize:50,formRows:3},delete:{deleteLastMessage:"You cannot delete the last copy format."}})}addHotkeySettingButton(e,i){e.addButton(r=>{r.setButtonText("Open hotkeys settings").onClick(()=>{this.plugin.openHotkeySettingTab(i)})})}addPagePreviewSettingButton(e){return e.addButton(i=>{i.setButtonText("Open page preview settings").onClick(()=>{this.app.setting.openTabById("page-preview")})})}addRequireModKeyOnHoverSetting(e){let i=this.app.workspace.hoverLinkSources[e].display,r=this.plugin.requireModKeyForLinkHover(e);return this.addSetting().setName(`Require ${Bn} key while hovering`).setDesc(`Currently ${r?"required":"not required"}. You can toggle this on and off in the core Page Preview plugin settings > ${i}.`).then(o=>this.addPagePreviewSettingButton(o))}addIconSetting(e,i){let r=a=>a.startsWith("lucide-")?a.slice(7):a,o=a=>a.startsWith("lucide-")?a:"lucide-"+a,s=a=>{var d;let c=(d=a.controlEl.querySelector(":scope>.icon-preview"))!=null?d:a.controlEl.createDiv("icon-preview");(0,se.setIcon)(c,o(this.plugin.settings[e]));let l=a.components[0];(!i||this.plugin.settings[e])&&!c.childElementCount?(l.inputEl.addClass("error"),(0,se.setTooltip)(l.inputEl,"No icon found")):(l.inputEl.removeClass("error"),(0,se.setTooltip)(l.inputEl,""))};return this.addTextSetting(e,void 0,a=>{this.plugin.settings[e]=r(this.plugin.settings[e]),this.plugin.saveSettings(),s(a)}).then(a=>{this.renderMarkdown(["You can use any icon from [Lucide](https://lucide.dev/icons)."+(i?" Leave blank to remove icons.":"")],a.descEl)}).then(s)}addProductMenuSetting(e,i){let r=Ti[e],o={color:"Colors","copy-format":"Copy format",display:"Display text format"},s=this.plugin.settings[e],a=this.addHeading(i,e);a.addExtraButton(d=>{d.setTooltip("Reset").setIcon("rotate-ccw").onClick(()=>{s.length=0,s.push(...r),this.redisplay()})});let c=[],l=r.slice();for(let d=0;d<r.length;d++){if(d>0){if(!se.Platform.isDesktopApp)return;let h=c[d-1].getValue();if(!h)return;l.remove(h)}this.addSetting().then(h=>{se.Platform.isDesktopApp&&h.setName(d===0?"Top-level menu":d===1?"Submenu":"Subsubmenu")}).addDropdown(h=>{var f;for(let p of l)h.addOption(p,o[p]);d>0&&h.addOption("","None");let u=(f=s[d])!=null?f:"";u&&!l.includes(u)&&l[0]&&(s[d]=l[0],u=s[d]),h.setValue(u).onChange(p=>{if(p)s[d]=p;else for(;s.length>d;)s.pop();this.plugin.saveSettings(),this.redisplay()}),c.push(h)}).then(h=>{h.settingEl.addClasses(["no-border","small-padding"])})}return a}createLinkTo(e,i){return createEl("a","",r=>{r.onclick=o=>{this.scrollTo(e,{behavior:"smooth"}),this.updateHeaderElClassOnScroll(o)},activeWindow.setTimeout(()=>{let o=this.items[e];!i&&o&&(i='"'+o.nameEl.textContent+'"'),r.setText(i!=null?i:"")})})}createLinkToHeading(e,i){return createEl("a","",r=>{r.onclick=o=>{this.scrollToHeading(e,{behavior:"smooth"}),this.updateHeaderElClassOnScroll(o)},activeWindow.setTimeout(()=>{let o=this.headings.get(e);!i&&o&&(i='"'+o.nameEl.textContent+'"'),r.setText(i!=null?i:"")})})}redisplay(){let e=this.contentEl.scrollTop;this.display(),this.contentEl.scroll({top:e}),this.events.trigger("update")}async display(){var c,l;kr.openIfNecessary(this.plugin),this.headerContainerEl.empty(),this.contentEl.empty(),this.promises=[],this.component.load(),activeWindow.setTimeout(()=>this.updateHeaderElClass());for(let d of["wheel","touchmove"])this.component.registerDomEvent(this.contentEl,d,(0,se.debounce)(()=>this.updateHeaderElClass(),100),{passive:!0});this.contentEl.createDiv("top-note",async d=>{await this.renderMarkdown(["> [!TIP]","> - You can easily navigate through the settings by clicking the icons in the header above.","> - Some settings below require reopening tabs or reloading the plugin to take effect.","> - [Visit the docs](https://ryotaushio.github.io/obsidian-pdf-plus/)",'> - <a id="pdf-plus-funding-link-placeholder"></a>'],d);let h=document.getElementById("pdf-plus-funding-link-placeholder");h&&(h.textContent="Help me keep PDF++ alive!",h.onclick=u=>{this.scrollToHeading("funding",{behavior:"smooth"}),this.updateHeaderElClassOnScroll(u)})}),this.addHeading("Editing PDF files","edit","lucide-save").then(d=>{this.renderMarkdown(["By allowing PDF++ to modify PDF files directly, you can:","- Add, edit and delete highlights and links in PDF files.","- Add, insert, delete or extract PDF pages and auto-update links.","- Add, rename, move and delete outline items.","- Edit [page labels](https://ryotaushio.github.io/obsidian-pdf-plus/page-labels.html).","","[Learn more](https://ryotaushio.github.io/obsidian-pdf-plus/editing-pdfs.html)"],d.descEl)}),this.addToggleSetting("enablePDFEdit",()=>this.redisplay()).setName("Enable PDF editing").then(d=>{this.renderMarkdown(['PDF++ will not modify PDF files themselves unless you turn on this option. <span style="color: var(--text-warning);">The author assumes no responsibility for any data corruption. Please make sure you have a backup of your files.</span>'],d.descEl)}),this.plugin.settings.enablePDFEdit&&(this.addTextSetting("author","Your name",d=>{let h=d.components[0].inputEl;h.toggleClass("error",!h.value)}).setName("Annotation author").setDesc("It must contain at least one character in order to make annotations referenceable & editable within Obsidian.").then(d=>{let h=d.components[0].inputEl;h.toggleClass("error",!h.value)}),this.addToggleSetting("enableEditEncryptedPDF").setName("Enable editing encrypted PDF files")),this.addHeading("Backlink highlighting","backlink-highlight","lucide-highlighter").setDesc('Annotate PDF files with highlights just by linking to text selection. You can easily copy links to selections using color palette in the toolbar. See the "Color palette" section for the details.').then(d=>d.settingEl.addClass("normal-margin-top")),this.addToggleSetting("highlightBacklinks").setName("Highlight backlinks in PDF viewer").setDesc("In the PDF viewer, any referenced text will be highlighted for easy identification."),this.addDesc("Try turning off the following options if you experience performance issues."),this.addToggleSetting("highlightBacklinksInEmbed").setName("Highlight backlinks in PDF embeds"),this.addToggleSetting("highlightBacklinksInCanvas").setName("Highlight backlinks in Canvas"),this.addToggleSetting("highlightBacklinksInHoverPopover").setName("Highlight backlinks in hover popover previews"),this.addDropdownSetting("selectionBacklinkVisualizeStyle",xP).setName("Highlight style").setDesc("How backlinks to a text selection should be visualized."),this.addDropdownSetting("hoverHighlightAction",yP,()=>this.redisplay()).setName("Action when hovering over highlighted text").setDesc(`Easily open backlinks or display a popover preview of it by pressing ${In("Mod").toLowerCase()} (by default) while hovering over a highlighted text in PDF viewer.`),this.addRequireModKeyOnHoverSetting("pdf-plus"),this.addToggleSetting("doubleClickHighlightToOpenBacklink").setName("Double click highlighted text to open the corresponding backlink"),this.addHeading("How backlinks are opened","open-backlink").setDesc("Customize how backlinks are opened when "+(this.plugin.settings.hoverHighlightAction==="open"?`${In("Mod").toLowerCase()}+hovering over or `:"")+"double-clicking highlighted text."),this.addDropdownSetting("paneTypeForFirstMDLeaf",yh,()=>this.redisplay()).setName("How to open the markdown file when no markdown file is opened"),(this.plugin.settings.paneTypeForFirstMDLeaf==="left-sidebar"||this.plugin.settings.paneTypeForFirstMDLeaf==="right-sidebar")&&(this.addToggleSetting("alwaysUseSidebar").setName("Always use sidebar to open markdown files from highlighted text").setDesc(`If turned on, the ${this.plugin.settings.paneTypeForFirstMDLeaf==="left-sidebar"?"left":"right"} sidebar will be used whether there is existing markdown tabs or not.`),this.addToggleSetting("singleMDLeafInSidebar").setName("Don't open multiple panes in sidebar").setDesc("Turn this on if you want to open markdown files in a single pane in the sidebar.")),this.addSetting("ignoreExistingMarkdownTabIn").setName("Ignore existing markdown tabs in...").setDesc("If some notes are opened in the ignored splits, PDF++ will still open the backlink in the way specified in the previous setting. For example, you might want to ignore the left sidebar if you are pinning a certain note (e.g. daily note) in it.");let e={leftSplit:"Left sidebar",rightSplit:"Right sidebar",floatingSplit:"Popout windows"},i=this.plugin.settings.ignoreExistingMarkdownTabIn;for(let[d,h]of Object.entries(e)){let u=d;this.addSetting().addToggle(f=>{f.setValue(i.includes(u)).onChange(p=>{p?i.push(u):i.remove(u),this.plugin.saveSettings()})}).then(f=>{f.controlEl.prepend(createEl("span",{text:h})),f.settingEl.addClasses(["no-border","ignore-split-setting"])})}this.addToggleSetting("dontActivateAfterOpenMD").setName("Don't move focus to markdown view after opening a backlink").setDesc("This option will be ignored when you open a link in a tab in the same split as the current tab."),this.addHeading("Colors","color"),this.addSetting("colors").setName("Highlight colors").then(d=>this.renderMarkdown(['You can optionally highlight the selection with **a specified color** by appending "&color=`<COLOR NAME>`" to a link text, where `<COLOR NAME>` is one of the colors that you register below. e.g `[[file.pdf#page=1&selection=4,0,5,20&color=red]].` ',"Color names are case-insensitive. ","",'You can ues the color palette in PDF toolbars to easily copy links with "&color=..." appended automatically. See the "Color palette" section for the details.',"",'You can also opt not to use this plugin-dependent notation and apply a single color (the "default highlight color" setting) to all highlights.',"","These colors are also available as CSS variables, e.g. `--pdf-plus-yellow-rgb`. You can use them for various CSS customizations. See [README](https://github.com/RyotaUshio/obsidian-pdf-plus?tab=readme-ov-file#css-customization) for the details."],d.descEl)).addButton(d=>{d.setIcon("plus").setTooltip("Add a new color").onClick(()=>{this.plugin.settings.colors[""]="#",this.redisplay()})});for(let d=0;d<Object.keys(this.plugin.settings.colors).length;d++)this.addColorSetting(d).setClass("no-border");this.addDropdownSetting("defaultColor",["",...Object.keys(this.plugin.settings.colors)],d=>d||"Obsidian default",()=>this.plugin.loadStyle()).setName("Default highlight color").setDesc("If no color is specified in link text, this color will be used."),this.addHeading("Backlink indicator bounding rectangles","backlink-bounding-rect"),this.addToggleSetting("showBoundingRectForBacklinkedAnnot").setName("Show bounding rectangles for backlinked annotations").setDesc("Bounding rectangles will be shown for annotations with backlinks."),this.addHeading("Backlink indicator icons","backlink-icon").setDesc("Show icons for text selections, annotations, offsets and rectangular selections with backlinks."),this.addToggleSetting("showBacklinkIconForSelection").setName("Show icon for text selection with backlinks"),this.addToggleSetting("showBacklinkIconForAnnotation").setName("Show icon for annotation with backlinks"),this.addToggleSetting("showBacklinkIconForOffset").setName("Show icon for offset backlinks"),this.addToggleSetting("showBacklinkIconForRect").setName("Show icon for rectangular selection backlinks"),this.addSliderSetting("backlinkIconSize",10,100,5).setName("Icon size"),this.addHeading("Rectangular selection embeds","rect","lucide-box-select").then(d=>{this.renderMarkdown(["You can embed a specified rectangular area from a PDF page into your note. [Learn more](https://ryotaushio.github.io/obsidian-pdf-plus/embedding-rectangular-selections.html)"],d.descEl)}),this.addSliderSetting("rectEmbedResolution",10,200,1).setName("Rendering resolution").setDesc("The higher the value, the better the rendering quality, but the longer time it takes to render. The default value is 100."),this.addToggleSetting("rectEmbedStaticImage",()=>this.redisplay()).setName("Paste as image").setDesc("By default, rectangular selection embeds are re-rendered every time you open the markdown file, which can slow down the loading time. Turn on this option to replace them with static images and improve the performance."),this.plugin.settings.rectEmbedStaticImage&&(this.addDropdownSetting("rectImageFormat",{file:"Create & embed image file","data-url":"Embed as data URL"},()=>this.redisplay()).setName("How to embed the image").then(d=>this.renderMarkdown(['- "Create & embed image file": Create an image file and embed it in the markdown file. The image file will be saved in the folder you specify in the "Default location for new attachments" setting in the core Obsidian settings.',`- "Embed as data URL": Embed the image as a [data URL](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs) without creating a file. This option is useful when you don't want to mess up your attachment folder. It also helps you make your notes self-contained.`],d.descEl)),this.plugin.settings.rectImageFormat==="file"&&this.addDropdownSetting("rectImageExtension",vP).setName("Image file format")),this.addToggleSetting("includeColorWhenCopyingRectLink").setName("Include the selected color's name when copying a link to a rectangular selection").setDesc("When enabled, the name of the color selected in the color palette will be included in the link text. As a result, the rectangular selection will be highlighted with the specified color in the PDF viewer."),this.addToggleSetting("zoomToFitRect").setName("Zoom to fit rectangular selection when opening link").setDesc(createFragment(d=>{d.appendText("When enabled, the PDF viewer will zoom to fit the rectangular selection when you open a link to it. Otherwise, the viewer will keep the current zoom level. "),d.appendText("Note: check out the "),d.appendChild(this.createLinkTo("dblclickEmbedToOpenLink")),d.appendText(" option as well.")})),this.addHeading("PDF++ callouts","callout","lucide-quote").then(d=>{this.renderMarkdown("Create [callouts](https://help.obsidian.md/Editing+and+formatting/Callouts) with the same color as the highlight color without any CSS snippet scripting.",d.descEl)}),this.addToggleSetting("useCallout").setName("Use PDF++ callouts").then(d=>{this.renderMarkdown(["You can also disable this option and choose to use your own custom [CSS snippets](https://help.obsidian.md/Extending+Obsidian/CSS+snippets). See our [README](https://github.com/RyotaUshio/obsidian-pdf-plus?tab=readme-ov-file#css-customization) for the details."],d.descEl)}),this.addTextSetting("calloutType",void 0,()=>this.redisplay()).setName("Callout type name").then(d=>{var f,p;let h=this.plugin.settings.calloutType,u=(p=(f=Object.keys(this.plugin.settings.colors).first())==null?void 0:f.toLowerCase())!=null?p:"yellow";this.renderMarkdown([`For example, if this is set to "${h}", use the following syntax to insert a callout with color "${u}":`,"","```markdown",`> [!${h}|${u}] Title`,"> Content","```","",'You can also use explicit RGB color values like "255, 208, 0" instead of color names.',"I recommend setting this as a custom color palette action in the setting below, like so:","","```markdown","> [!{{calloutType}}|{{color}}] {{linkWithDisplay}}","> {{text}}","```"],d.descEl)}),this.addIconSetting("calloutIcon",!0).setName("Callout icon"),this.addHeading("PDF toolbar","toolbar","lucide-palette"),this.addToggleSetting("hoverableDropdownMenuInToolbar").setName("Hoverable dropdown menus").setDesc("(Not supported on smartphones) When enabled, the dropdown menus (\u2304) in the PDF toolbar will be opened by hovering over the icon, and you don't need to click it."),this.addToggleSetting("zoomLevelInputBoxInToolbar").setName("Show zoom level box").setDesc("A input box will be added to the PDF toolbar, which indicated the current zoom level and allows you to set the zoom level by typing a number."),this.addHeading("Color palette","palette").setDesc('Clicking a color while selecting a range of text will copy a link to the selection with "&color=..." appended.'),this.addToggleSetting("colorPaletteInToolbar",()=>{this.redisplay(),this.plugin.loadStyle()}).setName("Show color palette in the toolbar").setDesc("A color palette will be added to the toolbar of the PDF viewer."),this.plugin.settings.colorPaletteInToolbar&&(this.addToggleSetting("noColorButtonInColorPalette",()=>this.plugin.loadStyle()).setName('Show "without specifying color" button in the color palette'),this.addToggleSetting("colorPaletteInEmbedToolbar",()=>this.plugin.loadStyle()).setName("Show color palette in PDF embeds as well"),this.addIndexDropdownSetting("defaultColorPaletteItemIndex",["",...Object.keys(this.plugin.settings.colors)],d=>d||"Don't specify").setName("Default color selected in color palette").setDesc("This color will be selected in the color palette in a newly opened PDF viewer."),this.addToggleSetting("syncColorPaletteItem",()=>this.redisplay()).setName("Share a single color among all color palettes").setDesc("If disabled, you can specify a different color for each color palette."),this.plugin.settings.syncColorPaletteItem&&this.addToggleSetting("syncDefaultColorPaletteItem").setName("Share the color with newly opened color palettes as well"),this.addToggleSetting("quietColorPaletteTooltip").setName("Quiet tooltips in color palette").setDesc(`When disabled${Ti.quietColorPaletteTooltip?"":" (default)"}, the tooltip will show the color name as well as the selected copy format and display text format. If enabled, only the color name will be shown.`)),this.addHeading("Viewer options","viewer-option","lucide-monitor"),this.addSetting("defaultZoomValue").setName("Default zoom level").addDropdown(d=>{d.addOptions({"page-width":"Fit width","page-height":"Fit height","page-fit":"Fit page",custom:"Custom..."}).setValue(this.plugin.settings.defaultZoomValue.startsWith("page-")?this.plugin.settings.defaultZoomValue:"custom").onChange(async h=>{h==="custom"&&(h="100"),this.plugin.settings.defaultZoomValue=h,r(),await this.plugin.saveSettings()})});let r=this.getVisibilityToggler(this.addSetting().setName("Custom zoom level (%)").addSlider(d=>{d.setLimits(10,400,5).setDynamicTooltip().setValue(this.plugin.settings.defaultZoomValue.startsWith("page-")?100:parseInt(this.plugin.settings.defaultZoomValue)).onChange(async h=>{this.plugin.settings.defaultZoomValue=""+h,await this.plugin.saveSettings()})}),()=>!this.plugin.settings.defaultZoomValue.startsWith("page-"));this.addEnumDropdownSetting("scrollModeOnLoad",{[0]:"Vertical",[1]:"Horizontal",[2]:"Wrapped"},()=>o()).setName("Default scroll mode");let o=this.getVisibilityToggler(this.addEnumDropdownSetting("spreadModeOnLoad",{[0]:"Single page",[1]:"Two page (odd)",[2]:"Two page (even)"}).setName("Default spread mode"),()=>this.plugin.settings.scrollModeOnLoad!==2);if(this.addHeading("Context menu in PDF viewer","context-menu","lucide-mouse-pointer-click").setDesc("(Desktop & tablet only) Customize the behavior of the context menu that pops up when you right-click in the PDF viewer. For mobile users, see also the next section."),this.addToggleSetting("replaceContextMenu",()=>this.redisplay()).setName("Replace the built-in context menu with PDF++'s custom menu"),!this.plugin.settings.replaceContextMenu)this.addSetting().setName("Display text format").setDesc('You can customize the display text format in the setting "Copied text foramt > Display text format" below.');else{this.addToggleSetting("showContextMenuOnTablet").setName("Show context menu on tablet devices as well").setDesc('By default, Obsidian does not show the context menu after text selection on mobile devices, including tablets (iPad, etc.). If you want to show the context menu on tablets, turn this option on. Even if this option is turned off, you copy select the OS-native "Copy" option to run the "'+this.plugin.lib.commands.stripCommandNamePrefix(this.plugin.lib.commands.getCommand("copy-link-to-selection").name)+'" command.');let d=Cp();this.addDropdownSetting("showContextMenuOnMouseUpIf",{always:"Always",...Object.fromEntries(Object.entries(d).map(([h,u])=>[h,`${u} key is pressed`])),never:"Never"}).setName("Show the context menu right after selecting text when...").setDesc(createFragment(h=>{h.appendText("If "),h.appendChild(this.createLinkToHeading("auto-copy","auto-copy")),h.appendText(" is enabled, it will be prioritized and the context menu will not be shown.")}));{this.addHeading("Menu items","context-menu-items").setDesc("Customize which menu items to show.");let h={action:'Look up "(selection)"',selection:"Copy link to selection","write-file":`Add ${this.plugin.settings.selectionBacklinkVisualizeStyle} to file`,annotation:"Copy link to annotation","modify-annotation":"Edit/delete annotation",link:"Copy PDF link / Search on Google Scholar / Paste copied PDF link to selection / Copy URL",text:"Copy selected text / Copy annotated text",search:"Copy link to search",speech:"Read aloud selected text",page:"Copy link to page",settings:"Customize menu..."},u=this.plugin.settings.contextMenuConfig,f=[];for(let p=0;p<u.length;p++){let g=u[p],m=h[g.id];m&&f.push(this.addSetting().setName(m).addToggle(b=>{b.setValue(g.visible).onChange(w=>{g.visible=w,this.plugin.saveSettings()})}).then(b=>{g.id==="action"?b.setDesc("Available only on macOS."):g.id==="write-file"||g.id==="modify-annotation"?b.setDesc(createFragment(w=>{w.appendText("Requires "),w.appendChild(this.createLinkTo("enablePDFEdit","PDF editing")),w.appendText(" to be enabled.")})):g.id==="link"?b.setDesc('"Search on Google Scholar": Available when right-clicking citation links in PDFs.'):g.id==="speech"?b.setDesc(createFragment(w=>{w.appendText("Requires the "),w.createEl("a",{text:"Text to Speech",href:"obsidian://show-plugin?id=obsidian-tts"}),w.appendText(" plugin to be enabled.")})):g.id==="page"&&b.setDesc("Available when right-clicking with no text selected.")}))}}this.addDesc("Customize nested menus."),this.addProductMenuSetting("selectionProductMenuConfig","Copy link to selection"),this.addProductMenuSetting("writeFileProductMenuConfig",`Add ${this.plugin.settings.selectionBacklinkVisualizeStyle} to file`),this.addProductMenuSetting("annotationProductMenuConfig","Copy link to annotation"),this.addToggleSetting("updateColorPaletteStateFromContextMenu").setName("Update color palette from context menu").setDesc("In the context menu, the items (color, copy format and display text format) set in the color palette are selected by default. If this option is enabled, clicking a menu item will also update the color palette state and hence the default-selected items in the context menu as well.")}this.addHeading("Copying on mobile","mobile-copy","lucide-smartphone"),this.addDropdownSetting("mobileCopyAction",FP).setName('Action triggered by selecting "Copy" option on mobile devices'),this.addHeading("Copying links via hotkeys","copy-hotkeys","lucide-keyboard"),this.addSetting().setName("Set up hotkeys for copying links").then(d=>{this.renderMarkdown(["PDF++ offers two commands for quickly copying links via hotkeys.","","1. **Copy link to selection or annotation:**"," Copies a link to the text selection or focused annotation in the PDF viewer, which is formatted according to the options specified in the PDF toolbar.",' <br>If the "Add highlights to file directly" toggle switch in the PDF toolbar is on, it first adds a highlight annotation directly to the PDF file, and then copies the link to the created annotation.',"2. **Copy link to current page view:** Copies a link, clicking which will open the PDF file at the current scroll position and zoom level.","",'After running this command, you can add the copied link to the PDF file itself: select a range of text, right-click, and then click "Paste copied link to selection".'],d.descEl)}).then(d=>this.addHotkeySettingButton(d,`${this.plugin.manifest.name}: Copy link`)),this.addSetting().setName("Further workflow enhancements").setDesc(createFragment(d=>{d.appendText("See the "),d.appendChild(this.createLinkToHeading("auto",'"Auto-copy / auto-focus / auto-paste"')),d.appendText(" section below.")})),this.addHeading("Other shortcut commands","other-hotkeys","lucide-layers-2"),this.addSetting().then(d=>{this.renderMarkdown(["PDF++ also offers the following commands for reducing mouse clicks on the PDF toolbar by assigning hotkeys to them.","","- **Show outline** / **show thumbnail**","- **Close PDF siderbar**","- **Zoom in** / **zoom out**","- **Fit width** / **fit height**","- **Go to page**: This command brings the cursor to the page number input field in the PDF toolbar. Enter a page number and press Enter to jump to the page.","- **Show copy format menu** / **show display text format menu**: By running thes commands via hotkeys and then using the arrow keys, you can quickly select a format from the menu without using the mouse.","- **Enable PDF edit** / **disable PDF edit**","- And more..."],d.descEl)}).then(d=>this.addHotkeySettingButton(d)),this.addToggleSetting("executeBuiltinCommandForOutline").setName(`Show outline: when the active file is not PDF, run the core Outline plugin's "Show outline" command`).setDesc("By turning this on, you can use the same hotkey to show the outline of a markdown file and a PDF file without key conflict."),this.addToggleSetting("closeSidebarWithShowCommandIfExist").setName("Show outline / show thumbnail: close the sidebar if it is already open").setDesc("Enabling this will allow you to use the same hotkey to close the sidebar if it is already open."),this.addToggleSetting("executeBuiltinCommandForZoom").setName('Zoom in / zoom out: when the active file is not PDF, run the built-in "Zoom in" / "Zoom out" command').setDesc("By turning this on, you can use the same hotkey to zoom in/out a PDF viewer or any other type of view without key conflict."),this.addToggleSetting("executeFontSizeAdjusterCommand").setName(`Zoom in / zoom out: when the active file is not PDF, run Font Size Adjuster's "Increment font size" / "Decrement font size" command`).then(d=>{this.renderMarkdown(["(Requires the [Font Size Adjuster](obsidian://show-plugin?id=font-size) plugin enabled) ",'If both of this option and the above option are enabled, this option will be prioritized. The built-in "Zoom in" / "Zoom out" command will be executed if Font Size Adjuster is not installed or disabled.'],d.descEl)}),this.addHeading("Copy templates","template","lucide-copy").setDesc("The template format that will be used when copying a link to a selection or an annotation in PDF viewer. "),this.addSetting().then(d=>this.renderMarkdown(["Each `{{...}}` will be evaluated as a JavaScript expression given the variables listed below.","","Available variables are:","","- `file` or `pdf`: The PDF file ([`TFile`](https://docs.obsidian.md/Reference/TypeScript+API/TFile)). Use `file.basename` for the file name without extension, `file.name` for the file name with extension, `file.path` for the full path relative to the vault root, etc.","- `page`: The page number (`Number`). The first page is always page 1.","- `pageLabel`: The page number displayed in the counter in the toolbar (`String`). This can be different from `page`.",` - **Tip**: You can modify page labels with PDF++'s "Edit page labels" command.`,"- `pageCount`: The total number of pages (`Number`).","- `text` or `selection`: The selected text (`String`). In the case of links to annotations written directly in the PDF file, this is the text covered by the annotation.",'- `comment`: In the case of links to annotations written directly in the PDF file, this is the comment associated with the annotation (`String`). Otherwise, it is an empty string `""`.',"- `folder`: The folder containing the PDF file ([`TFolder`](https://docs.obsidian.md/Reference/TypeScript+API/TFolder)). This is an alias for `file.parent`.","- `obsidian`: The Obsidian API. See the [official developer documentation](https://docs.obsidian.md/Home) and the type definition file [`obsidian.d.ts`](https://github.com/obsidianmd/obsidian-api/blob/master/obsidian.d.ts) for the details.","- `dv`: Available if the [Dataview](obsidian://show-plugin?id=dataview) plugin is enabled. See Dataview's [official documentation](https://blacksmithgu.github.io/obsidian-dataview/api/code-reference/) for the details. You can use it almost the same as the `dv` variable available in `dataviewjs` code blocks, but there are some differences. For example, `dv.current()` is not available.","- `quickAddApi`: Available if the [QuickAdd](obsidian://show-plugin?id=quickadd) plugin is enabled. See QuickAdd's [official documentation](https://quickadd.obsidian.guide/docs/QuickAddAPI) for the details.","- `app`: The global Obsidian app object ([`App`](https://docs.obsidian.md/Reference/TypeScript+API/App)).","- and other global variables such as:",' - [`moment`](https://momentjs.com/docs/#/displaying/): For exampe, use `moment().format("YYYY-MM-DD")` to get the current date in the "YYYY-MM-DD" format.',"",`Additionally, you have access to the following variables when the PDF file has a corresponding markdown file specified via the "${this.plugin.settings.proxyMDProperty}" property(see the "Property to associate a markdown file to a PDF file" setting below): `,"","- `md`: The markdown file associated with the PDF file ([`TFile`](https://docs.obsidian.md/Reference/TypeScript+API/TFile)). If there is no such file, this is `null`.","- `properties`: The properties of `md` as an `Object` mapping each property name to the corresponding value. If `md` is `null` or the `md` has no properties, this is an empty object `{}`.","","Furthermore, the following variables are available when the PDF tab is linked to another tab:","","- `linkedFile`: The file opened in the linked tab ([`TFile`](https://docs.obsidian.md/Reference/TypeScript+API/TFile)). If there is no such file, this is `null`.","- `linkedFileProperties`: The properties of `linkedFile` as an `Object` mapping each property name to the corresponding value. If there is no `linkedFile` or the `linkedFile` has no properties, this is an empty object `{}`."],d.descEl)),this.addTextSetting("proxyMDProperty",void 0,()=>this.redisplay()).setName("Property to associate a markdown file to a PDF file").then(d=>{this.renderMarkdown(["Create a markdown file with this property to associate it with a PDF file. The PDF file is specified by a link, e.g. `[[file.pdf]]`.","It can be used to store properties/metadata that can be used when copying links.","","If you have the [Dataview](obsidian://show-plugin?id=dataview) plugin installed, you can use Dataview's inline field syntax such as `"+this.plugin.settings.proxyMDProperty+":: [[file.pdf]]`.","","Remarks:","- Make sure the associated markdown file can be uniquely identified. For example, if you have two markdown files `file1.md` and `file2.md` and both of their `"+this.plugin.settings.proxyMDProperty+"` properties point to the same PDF file, PDF++ cannot determine which markdown file is associated with `file.pdf`.","- If you are in Source Mode and using front matter instead of Dataview inline fields, be sure to enclose the link in double quotes."],d.descEl)}),this.addSetting("displayTextFormats").setName("Display text format").then(d=>this.renderMarkdown(["This format will be also used when copying a link to a selection or an annotation from the context menu."],d.descEl)).addButton(d=>{d.setIcon("plus").setTooltip("Add a new display text format").onClick(()=>{this.plugin.settings.displayTextFormats.push({name:"",template:""}),this.redisplay()})});for(let d=0;d<this.plugin.settings.displayTextFormats.length;d++)this.addDisplayTextSetting(d);this.addIndexDropdownSetting("defaultDisplayTextFormatIndex",this.plugin.settings.displayTextFormats.map(d=>d.name),void 0,()=>{this.plugin.loadStyle()}).setName("Default display text format"),this.addToggleSetting("syncDisplayTextFormat").setName("Share a single display text format among all PDF viewers").setDesc("If disabled, you can specify a different display text format for each PDF viewer from the dropdown menu in the PDF toolbar."),this.plugin.settings.syncDisplayTextFormat&&this.addToggleSetting("syncDefaultDisplayTextFormat").setName("Share the display text format with newly opened PDF viewers as well"),this.addSetting("copyCommands").setName("Custom copy formats").then(d=>this.renderMarkdown(["Customize the format to use when you copy a link by clicking a color palette item or running the commands while selecting a range of text in PDF viewer.","","In addition to the variables listed above, here you can use","","- `link`: The link without display text, e.g. `[[file.pdf#page=1&selection=0,1,2,3&color=red]]`,","- `linkWithDisplay`: The link with display text, e.g. `[[file.pdf#page=1&selection=0,1,2,3&color=red|file, page 1]]`,",'- `linktext`: The text content of the link without brackets and the display text, e.g. `file.pdf#page=1&selection=0,1,2,3&color=red`<br>(if the "Use \\[\\[Wikilinks\\]\\]" setting is turned off, `linktext` will be properly encoded for use in markdown links),',"- `display`: The display text formatted according to the above setting, e.g. `file, page 1`,","- `linkToPage`: The link to the page without display text, e.g. `[[file.pdf#page=1]]`,","- `linkToPageWithDisplay`: The link to the page with display text, e.g. `[[file.pdf#page=1|file, page 1]]`,",`- \`calloutType\`: The callout type you specify in the "Callout type name" setting above, in this case, "${this.plugin.settings.calloutType}", and`,"- `color` (or `colorName`): In the case of text selections, this is the name of the selected color in lowercase, e.g. `red`. If no color is specified, it will be an empty string. For text markup annotations (e.g. highlights and underlines), this is the RGB value of the color, e.g. `255,208,0`."],d.descEl)).addButton(d=>{d.setIcon("plus").setTooltip("Add a new copy command").onClick(()=>{this.plugin.settings.copyCommands.push({name:"",template:""}),this.redisplay()})});for(let d=0;d<this.plugin.settings.copyCommands.length;d++)this.addCopyCommandSetting(d);this.addIndexDropdownSetting("defaultColorPaletteActionIndex",this.plugin.settings.copyCommands.map(d=>d.name),void 0,()=>{this.plugin.loadStyle()}).setName("Default action when clicking on color palette"),this.addToggleSetting("syncColorPaletteAction").setName("Share a single action among all PDF viewers").setDesc("If disabled, you can specify a different action for each PDF viewer from the dropdown menu in the PDF toolbar."),this.plugin.settings.syncColorPaletteAction&&this.addToggleSetting("syncDefaultColorPaletteAction").setName("Share the action with newly opened PDF viewers as well"),this.addToggleSetting("useAnotherCopyTemplateWhenNoSelection",()=>this.redisplay()).setName("Use another template when no text is selected").setDesc("For example, you can use this to copy a link to the page when there is no selection."),this.plugin.settings.useAnotherCopyTemplateWhenNoSelection&&this.addTextSetting("copyTemplateWhenNoSelection").setName("Link copy template used when no text is selected"),this.addHeading("Auto-copy / auto-focus / auto-paste","auto","lucide-zap").setDesc("Speed up the process of copying & pasting PDF links to your notes with some automation. Note that you can't activate both of auto-focus and auto-paste at the same time."),this.addHeading("Auto-copy","auto-copy").setDesc(`If enabled, the "Copy link to selection or annotation" command will be triggered automatically every time you select a range of text in a PDF viewer, meaning you don't even have to press a hotkey to copy a link.`),this.addToggleSetting("autoCopy",()=>this.plugin.autoCopyMode.toggle(this.plugin.settings.autoCopy)).setName("Enable").setDesc("You can also toggle auto-focus via an icon in the left ribbon menu if the next setting is enabled."),this.addToggleSetting("autoCopyToggleRibbonIcon",()=>this.redisplay()).setName("Show an icon to toggle auto-copy in the left ribbon menu").setDesc("You can also toggle this mode via a command. Reload the plugin after changing this setting to take effect."),this.plugin.settings.autoCopyToggleRibbonIcon&&this.addIconSetting("autoCopyIconName",!1).setName("Icon name").then(d=>{d.descEl.appendText(" Reload the plugin after changing this setting to take effect.")}),this.addHeading("Auto-focus","auto-focus").setDesc("If enabled, a markdown file will be focused automatically after copying a link to PDF text selection or annotation."),this.addSetting("autoFocus").setName("Enable").setDesc("Recommended if you prefer something less agressive than auto-paste. You can also toggle auto-focus via an icon in the left ribbon menu if the next setting is enabled.").addToggle(d=>{d.setValue(this.plugin.settings.autoFocus).onChange(h=>{this.plugin.toggleAutoFocus(h),this.redisplay()})}),this.addToggleSetting("autoFocusToggleRibbonIcon",()=>this.redisplay()).setName("Show an icon to toggle auto-focus in the left ribbon menu").setDesc("You can also toggle auto-focus via a command. Reload the plugin after changing this setting to take effect."),this.plugin.settings.autoFocusToggleRibbonIcon&&this.addIconSetting("autoFocusIconName",!1).setName("Icon name").then(d=>{d.descEl.appendText(" Reload the plugin after changing this setting to take effect.")}),this.addDropdownSetting("autoFocusTarget",yx).setName("Target markdown file to focus on"),this.addHeading("Auto-paste","auto-paste").setDesc("If enabled, the copied link to PDF text selection or annotation will be automatically pasted into a markdown file right after copying."),this.addSetting("autoPaste").setName("Enable").setDesc("You can also toggle auto-paste via an icon in the left ribbon menu if the next setting is enabled.").addToggle(d=>{d.setValue(this.plugin.settings.autoPaste).onChange(h=>{this.plugin.toggleAutoPaste(h),this.redisplay()})}),this.addToggleSetting("autoPasteToggleRibbonIcon",()=>this.redisplay()).setName("Show an icon to toggle auto-paste in the left ribbon menu").setDesc("You can also toggle auto-paste via a command. Reload the plugin after changing this setting to take effect."),this.plugin.settings.autoPasteToggleRibbonIcon&&this.addIconSetting("autoPasteIconName",!1).setName("Icon name").then(d=>{d.descEl.appendText(" Reload the plugin after changing this setting to take effect.")}),this.addDropdownSetting("autoPasteTarget",yx).setName("Target markdown file to paste links to"),this.addToggleSetting("focusEditorAfterAutoPaste",()=>this.events.trigger("update")).setName("Focus editor after auto-pasting").setDesc("If enabled, auto-paste will focus on the editor after pasting."),this.showConditionally(this.addToggleSetting("clearSelectionAfterAutoPaste").setName("Clear text selection after auto-pasting").setDesc("If enabled, the text selection in the PDF viewer will be automatically cleared after performing auto-pasting."),()=>!this.plugin.settings.focusEditorAfterAutoPaste),this.addToggleSetting("respectCursorPositionWhenAutoPaste").setName("Respect current cursor position").setDesc("When enabled, triggering auto-pasting will paste the copied text at the current cursor position if the target note is already opened. If disabled, the text will be always appended to the end of the note."),this.addHeading("General","auto-general").setDesc("General settings that apply to both auto-focus and auto-paste."),this.addToggleSetting("openAutoFocusTargetIfNotOpened",()=>this.redisplay()).setName("Open target markdown file if not opened"),this.plugin.settings.openAutoFocusTargetIfNotOpened&&(this.addDropdownSetting("howToOpenAutoFocusTargetIfNotOpened",{...yh,"hover-editor":"Hover Editor"},()=>this.redisplay()).setName("How to open target markdown file when not opened").then(d=>{this.renderMarkdown('The "Hover Editor" option is available if the [Hover Editor](obsidian://show-plugin?id=obsidian-hover-editor) plugin is enabled.',d.descEl),this.plugin.settings.howToOpenAutoFocusTargetIfNotOpened==="hover-editor"&&(this.app.plugins.plugins["obsidian-hover-editor"]||d.descEl.addClass("error"))}),this.showConditionally(this.addToggleSetting("closeHoverEditorWhenLostFocus").setName("Close Hover Editor when it loses focus").setDesc("This option will not affect the behavior of Hover Editor outside of PDF++."),()=>this.plugin.settings.howToOpenAutoFocusTargetIfNotOpened==="hover-editor"),this.addToggleSetting("closeSidebarWhenLostFocus").setName("Auto-hide sidebar when it loses focus after auto-pasting").setDesc("After auto-pasting into a markdown file opened in the left or right sidebar, the sidebar will be automatically collapsed once it loses focus."),this.addToggleSetting("openAutoFocusTargetInEditingView").setName("Always open in editing view").setDesc('This option can be useful especially when you set the previous option to "Hover Editor".')),this.addToggleSetting("executeCommandWhenTargetNotIdentified",()=>this.redisplay()).setName("Execute command when target file cannot be determined").setDesc("When PDF++ cannot determine which markdown file to focus on or paste to, it will execute the command specified in the next option to let you pick a target file.");let s=(l=(c=this.app.commands.findCommand(`${this.plugin.manifest.id}:create-new-note`))==null?void 0:c.name)!=null?l:"PDF++: Create new note for auto-focus or auto-paste";this.plugin.settings.executeCommandWhenTargetNotIdentified&&(this.addSetting("commandToExecuteWhenTargetNotIdentified").setName("Command to execute").then(d=>{var h,u,f,p,g,m;this.renderMarkdown(["Here's some examples of useful commands:","",`- ${(u=(h=this.app.commands.findCommand("file-explorer:new-file"))==null?void 0:h.name)!=null?u:"Create new note"}`,`- ${(p=(f=this.app.commands.findCommand("file-explorer:new-file-in-new-pane"))==null?void 0:f.name)!=null?p:"Create note to the right"}`,`- ${(m=(g=this.app.commands.findCommand("switcher:open"))==null?void 0:g.name)!=null?m:"Quick switcher: Open quick switcher"}`,"- [Omnisearch](obsidian://show-plugin?id=omnisearch): Vault search","- [Hover Editor](obsidian://show-plugin?id=obsidian-hover-editor): Open new Hover Editor",`- **${s}**: See below for the details.`],d.descEl)}).addText(d=>{let h=this.plugin.settings.commandToExecuteWhenTargetNotIdentified,u=this.app.commands.findCommand(h);u?d.setValue(u.name):(d.inputEl.addClass("error"),d.setPlaceholder("Command not found")),d.inputEl.size=30,new wc(this,d.inputEl)}),this.addSliderSetting("autoPasteTargetDialogTimeoutSec",1,60,1).setName("[Auto-paste] Maximum time to wait for the command to open the target file (sec)").setDesc("The link will be auto-pasted into the first markdown file that you open within this time frame after the command is executed. If you don't open any markdown file during this time, the auto-paste will not occur. This option is not related to auto-focus.")),this.addHeading(`The "${s}" command`,"create-new-note-command").setDesc('Creates a new note and opens it in a new pane specified in the "How to open target markdown file when not opened" option.'),this.addTextSetting("newFileNameFormat","Leave blank not to specify").setName("New note title format").then(async d=>{await this.renderMarkdown(['If this option is left blank or the active file is not a PDF, "Untitled \\*" will be used (if the language is set to English). You can use the following variables: `file`, `folder`, `app`, and other global variables such as `moment`.'],d.descEl),d.descEl.createSpan({text:"See "}),d.descEl.appendChild(this.createLinkToHeading("template","above")),d.descEl.createSpan({text:" for the details about these variables."})}),this.addTextSetting("newFileTemplatePath","Leave blank not to use a template").setName("Template file path").then(async d=>{await this.renderMarkdown(["You can leave this blank if you don't want to use a template.","You can use `file`, `folder`, `app`, and other global variables such as `moment`."],d.descEl),d.descEl.createSpan({text:"See "}),d.descEl.appendChild(this.createLinkToHeading("template","above")),d.descEl.createSpan({text:" for the details about these variables."}),await this.renderMarkdown(["You can also include [Templater](obsidian://show-plugin?id=templater-obsidian) syntaxes in the template.",'In that case, make sure the "Trigger templater on new file creation" option is enabled in the Templater settings.',"","Example:","```","---",`${this.plugin.settings.proxyMDProperty}: "[[{{ file.path }}|{{ file.basename }}]]"`,"---",'<%* const title = await tp.system.prompt("Type note tile") -%>',"<%* await tp.file.rename(title) %>","```"],d.descEl);let h=d.components[0].inputEl;new xc(this.app,h).onSelect(({item:u})=>{this.plugin.settings.newFileTemplatePath=u.path,this.plugin.saveSettings()})}),this.addHeading("PDF Annotations","annot","lucide-message-square"),this.addToggleSetting("annotationPopupDrag").setName("Drag & drop annotation popup to insert a link to the annotation").setDesc("Note that turning on this option disables text selection in the annotation popup (e.g. modified date, author, etc)."),this.addToggleSetting("showAnnotationPopupOnHover").setName("If an annotation has a comment, show the annotation popup on hover").setDesc("This is the same behavior as the PDF viewers of some web browsers (e.g. Chrome/Firefox). You may have to reopen the PDF file after changing this option."),this.addToggleSetting("renderMarkdownInStickyNote").setName("Render markdown in annotation popups when the annotation has text contents"),this.plugin.settings.enablePDFEdit&&(this.addSliderSetting("writeHighlightToFileOpacity",0,1,.01).setName("Highlight opacity"),this.addToggleSetting("defaultWriteFileToggle").setName("Write highlight to file by default").setDesc("You can turn this on and off with the toggle button in the PDF viewer toolbar."),this.addToggleSetting("syncWriteFileToggle").setName("Share the same toggle state among all PDF viewers").setDesc("If disabled, you can specify whether to write highlights to files for each PDF viewer."),this.plugin.settings.syncWriteFileToggle&&this.addToggleSetting("syncDefaultWriteFileToggle").setName("Share the state with newly opened PDF viewers as well"),this.addToggleSetting("enableAnnotationContentEdit",()=>this.redisplay()).setName("Enable editing annotation contents").setDesc('If enabled, you can edit the text contents of annotations embedded in PDF files by clicking the "Edit" button in the annotation popup.'),this.addToggleSetting("enableAnnotationDeletion",()=>this.redisplay()).setName("Enable annotation deletion").setDesc('If enabled, you can delete annotations embedded in PDF files by clicking the "Delete" button in the annotation popup.'),this.plugin.settings.enableAnnotationDeletion&&(this.addToggleSetting("warnEveryAnnotationDelete",()=>this.redisplay()).setName("Always warn when deleting an annotation"),this.plugin.settings.warnEveryAnnotationDelete||this.addToggleSetting("warnBacklinkedAnnotationDelete").setName("Warn when deleting an annotation with backlinks"))),this.addHeading("PDF internal links","pdf-link","link").setDesc("Make it easier to work with internal links embedded in PDF files."),this.addToggleSetting("clickPDFInternalLinkWithModifierKey").then(d=>{this.renderMarkdown("Use [modifier keys](https://help.obsidian.md/User+interface/Tabs#Open+a+link) to open PDF internal links in various ways",d.nameEl)}).then(d=>{this.plugin.requireModKeyForLinkHover(Yi.HOVER_LINK_SOURCE_ID)&&d.setDesc(`You may want to turn this off to avoid conflicts with hover+${Bn}.`),d.descEl.appendText("Reopen tabs or reload the app after changing this option.")}),this.addToggleSetting("enableHoverPDFInternalLink",()=>this.events.trigger("update")).setName(`Show a popover preview of PDF internal links by hover(+${Bn})`),this.showConditionally(this.addRequireModKeyOnHoverSetting(Yi.HOVER_LINK_SOURCE_ID),()=>this.plugin.settings.enableHoverPDFInternalLink),this.addToggleSetting("recordPDFInternalLinkHistory").setName("Enable history navigation for PDF internal links").setDesc('When enabled, clicking the "navigate back" (left arrow) button will take you back to the page you were originally viewing before clicking on an internal link in the PDF file.'),this.addSetting().setName("Copy PDF link as Obsidian link").setDesc('(Requires custom context menu enabled) In the PDF viewer, right-click a PDF-embedded link and then click "Copy PDF link as Obsidian link". It will copy the PDF link as an Obsidian link that you can paste into markdown files. Clicking the pasted link will take you to the same destination as the original PDF link.'),this.addSetting().setName('"Copy link to current page view" command').setDesc("Running this command while viewing a PDF file will copy a link, clicking which will open the PDF file at the current scroll position and zoom level."),this.addSetting().setName("Paste copied link to a text selection in a PDF file").setDesc('(Requires custom context menu & PDF editing enabled) After copying a link by the above actions, you can "paste" it to a selection in PDF to create a PDF internal link. To do this, right-click the selection and click "Paste copied link to selection".'),this.plugin.settings.replaceContextMenu&&this.plugin.settings.enablePDFEdit&&(this.addToggleSetting("pdfLinkBorder",()=>this.redisplay()).setName("Draw borders around internal links").setDesc('Specify whether PDF internal links that you create by "Paste copied link to selection" should be surrounded by borders.'),this.plugin.settings.pdfLinkBorder&&this.addColorPickerSetting("pdfLinkColor").setName("Border color of internal links").setDesc('Specify the border color of PDF internal links that you create by "Paste copied link to selection".')),this.addHeading("Citations in PDF (experimental)","citation","lucide-graduation-cap").then(d=>{this.renderMarkdown(["Enjoy supercharged experiences of working with citations in PDF files, just like in [Google Scholar's PDF viewer](https://scholar.googleblog.com/2024/03/supercharge-your-pdf-reading-follow.html).","","The current implementation is based on some pretty primitive hand-crafted rules, and there is a lot of room for improvement. Code contribution is much appreciated!"],d.descEl)}),this.addDropdownSetting("actionOnCitationHover",eg,()=>this.events.trigger("update")).setName(`Hover(+${Bn}) on a citation link to show...`).then(d=>{this.renderMarkdown([`- **${eg["pdf-plus-bib-popover"]}**: Recommended. It works without any additional stuff, but you can further boost the visibility by installing [AnyStyle](https://github.com/inukshuk/anystyle) (desktop only).`,`- **${eg["google-scholar-popover"]}**: Requires [Surfing](obsidian://show-plugin?id=surfing) ver. 0.9.9 or higher enabled. Be careful not to exceed the rate limit of Google Scholar.`],d.descEl)}),this.showConditionally(this.addRequireModKeyOnHoverSetting(Ci.HOVER_LINK_SOURCE_ID),()=>this.plugin.settings.actionOnCitationHover!=="none"),this.showConditionally(this.addSetting("anystylePath").setName("AnyStyle path").addText(d=>{d.setPlaceholder("anystyle").setValue(this.plugin.settings.anystylePath).onChange(h=>{this.plugin.settings.anystylePath=h,this.plugin.saveLocalStorage("anystylePath",h)})}).then(d=>{d.components[0].inputEl.size=35,this.renderMarkdown(["The path to the [AnyStyle](https://github.com/inukshuk/anystyle) executable. ","","PDF++ extracts the bibliography text from the PDF file for each citation link and uses AnyStyle to convert the extracted text into a structured metadata.","It works just fine without AnyStyle, but you can further boost the visibility by installing it and providing its path here.","","Note: This setting is saved in the [local storage](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage) instead of `data.json` in the plugin folder."],d.descEl)}),()=>se.Platform.isDesktopApp&&this.plugin.settings.actionOnCitationHover==="pdf-plus-bib-popover"),this.showConditionally([this.addDesc("Try turning off the following options if you experience performance issues."),this.addToggleSetting("enableBibInEmbed").setName("Enable bibliography extraction in PDF embeds"),this.addToggleSetting("enableBibInCanvas").setName("Enable bibliography extraction in Canvas"),this.addToggleSetting("enableBibInHoverPopover").setName("Enable bibliography extraction in hover popover previews")],()=>this.plugin.settings.actionOnCitationHover!=="none"),this.addHeading("External links in PDF","pdf-external-link","external-link").setDesc("Make it easier to work with external links embedded in PDF files."),this.addToggleSetting("popoverPreviewOnExternalLinkHover").setName(`Show a popover preview of external links by hover(+${Bn})`).then(d=>{this.renderMarkdown(["Requires [Surfing](obsidian://show-plugin?id=surfing) ver. 0.9.9 or higher enabled."],d.descEl)}),this.showConditionally(this.addRequireModKeyOnHoverSetting(Vn.HOVER_LINK_SOURCE_ID),()=>this.plugin.settings.popoverPreviewOnExternalLinkHover),this.addHeading("PDF sidebar","sidebar","sidebar-left").setDesc("General settings for the PDF sidebar. The options specific to the outline and thumbnails are located in the corresponding sections below."),this.addToggleSetting("autoHidePDFSidebar").setName("Click on PDF content to hide sidebar").setDesc("Requires reopening the tabs after changing this option."),this.addEnumDropdownSetting("defaultSidebarView",{[1]:"Thumbnails",[2]:"Outline"}).setName("Default sidebar view").setDesc("Reopen PDFs after changing this option."),this.addHeading("PDF outline (table of contents)","outline","lucide-list").setDesc('Power up the outline view of the built-in PDF viewer: add, rename, or delete items via the right-click menu and the "Add to outline" command, drag & drop items to insert a section link, and more.'),this.addToggleSetting("clickOutlineItemWithModifierKey").then(d=>{this.renderMarkdown("Click PDF outline with [modifier keys](https://help.obsidian.md/User+interface/Tabs#Open+a+link) to open target section in various ways",d.nameEl)}).then(d=>{this.plugin.requireModKeyForLinkHover(Ji.HOVER_LINK_SOURCE_ID)&&d.setDesc(`You may want to turn this off to avoid conflicts with hover+${Bn}.`),d.descEl.appendText("Reopen tabs or reload the app after changing this option.")}),this.addToggleSetting("popoverPreviewOnOutlineHover",()=>this.events.trigger("update")).setName(`Show popover preview by hover(+${Bn})`).setDesc("Reopen tabs or reload the app after changing this option."),this.showConditionally(this.addRequireModKeyOnHoverSetting(Ji.HOVER_LINK_SOURCE_ID),()=>this.plugin.settings.popoverPreviewOnOutlineHover),this.addToggleSetting("recordHistoryOnOutlineClick").setName("Record to history when clicking an outline item").setDesc("Reopen tabs or reload the app after changing this option."),this.addToggleSetting("outlineContextMenu").setName("Replace the built-in context menu in the outline with a custom one").setDesc("This enables you to insert a section link with a custom format by right-clicking an item in the outline. Moreover, you will be able to add, rename, or delete outline items if PDF modification is enabled."),this.addToggleSetting("outlineDrag").setName("Drag & drop outline item to insert link to section").setDesc("Grab an item in the outline and drop it to a markdown file to insert a section link. Changing this option requires reopening the tabs or reloading the app."),(this.plugin.settings.outlineContextMenu||this.plugin.settings.outlineDrag)&&(this.addTextSetting("outlineLinkDisplayTextFormat").setName("Display text format").then(d=>{let h=d.components[0];h.inputEl.size=30}),this.addTextAreaSetting("outlineLinkCopyFormat").setName("Copy format").then(d=>{let h=d.components[0];h.inputEl.rows=3,h.inputEl.cols=30})),this.addHeading("Copy outline as markdown","outline-copy").setDesc('You can copy PDF outline as a markdown list or headings using the commands "Copy outline as markdown list" and "Copy outline as markdown headings".'),this.addTextSetting("copyOutlineAsListDisplayTextFormat").setName("List: display text format").then(d=>{let h=d.components[0];h.inputEl.size=30}),this.addTextAreaSetting("copyOutlineAsListFormat").setName("List: copy format").setDesc("You don't need to include leading hyphens in the template.").then(d=>{let h=d.components[0];h.inputEl.rows=3,h.inputEl.cols=30}),this.addTextSetting("copyOutlineAsHeadingsDisplayTextFormat").setName("Headings: display text format").then(d=>{let h=d.components[0];h.inputEl.size=30}),this.addTextAreaSetting("copyOutlineAsHeadingsFormat").setName("Headings: copy format").setDesc("You don't need to include leading hashes in the template.").then(d=>{let h=d.components[0];h.inputEl.rows=3,h.inputEl.cols=30}),this.addSliderSetting("copyOutlineAsHeadingsMinLevel",1,6,1).setName("Headings: minimum level").setDesc("The copied headings will start at this level."),this.addHeading("PDF thumbnails","thumbnail","lucide-gallery-thumbnails"),this.addToggleSetting("clickThumbnailWithModifierKey").then(d=>{this.renderMarkdown("Click PDF thumbnails with [modifier keys](https://help.obsidian.md/User+interface/Tabs#Open+a+link) to open target page in various ways",d.nameEl)}).then(d=>{this.plugin.requireModKeyForLinkHover(Qi.HOVER_LINK_SOURCE_ID)&&d.setDesc(`You may want to turn this off to avoid conflicts with hover+${Bn}`),d.descEl.appendText("Reopen tabs or reload the app after changing this option.")}),this.addToggleSetting("popoverPreviewOnThumbnailHover",()=>this.events.trigger("update")).setName(`Show popover preview by hover(+${Bn})`).setDesc("Reopen tabs or reload the app after changing this option."),this.showConditionally(this.addRequireModKeyOnHoverSetting(Qi.HOVER_LINK_SOURCE_ID),()=>this.plugin.settings.popoverPreviewOnThumbnailHover),this.addToggleSetting("recordHistoryOnThumbnailClick").setName("Record to history when clicking a thumbnail").setDesc("Reopen tabs or reload the app after changing this option."),this.addToggleSetting("thumbnailContextMenu").setName("Replace the built-in context menu in thumbnails with a custom one").setDesc("This enables you to copy a page link with a custom display text format specified in the PDF toolbar by right-clicking a thumbnail. Moreover, you will be able to insert, delete, extract pages if PDF modification is enabled."),this.addToggleSetting("thumbnailDrag").setName("Drag & drop PDF thumbnail to insert link to page").then(d=>{this.renderMarkdown(["Grab a thumbnail image and drop it to a markdown file to insert a page link. Changing this option requires reopening the tabs or reloading the app.","","Note: When disabled, drag-and-drop will cause the thumbnail image to be paste as a data url, which is seemingly Obsidian's bug."],d.descEl)}),(this.plugin.settings.thumbnailContextMenu||this.plugin.settings.thumbnailDrag)&&(this.addTextSetting("thumbnailLinkDisplayTextFormat").setName("Display text format").then(d=>{let h=d.components[0];h.inputEl.size=30}),this.addTextAreaSetting("thumbnailLinkCopyFormat").setName("Copy format").then(d=>{let h=d.components[0];h.inputEl.rows=3,h.inputEl.cols=30})),this.addHeading("PDF page composer (experimental)","composer","lucide-blocks").then(d=>{this.renderMarkdown(['Add, insert, delete or extract PDF pages via commands and **automatically update all the related links in the entire vault**. The "Editing PDF files directly" option has to be enabled to use these features.'],d.descEl)}),this.addToggleSetting("warnEveryPageDelete",()=>this.redisplay()).setName("Always warn when deleting a page"),this.plugin.settings.warnEveryPageDelete||this.addToggleSetting("warnBacklinkedPageDelete").setName("Warn when deleting a page with backlinks"),this.addToggleSetting("extractPageInPlace").setName("Remove the extracted pages from the original PDF by default"),this.addToggleSetting("askExtractPageInPlace").setName("Ask whether to remove the extracted pages from the original PDF before extracting"),this.addToggleSetting("openAfterExtractPages",()=>this.redisplay()).setName("Open extracted PDF file").setDesc('If enabled, the newly created PDF file will be opened after running the commands "Extract this page to a new file" or "Divide this PDF into two files at this page".'),this.plugin.settings.openAfterExtractPages&&this.addDropdownSetting("howToOpenExtractedPDF",yh).setName("How to open"),this.addHeading("Page labels","page-label").then(d=>{this.renderMarkdown(["Each page in a PDF document can be assigned a ***page label***, which can be different from the page indices.",'For example, a book might have a preface numbered as "i", "ii", "iii", ... and the main content numbered as "1", "2", "3", ...',"","PDF++ allows you to choose whether page labels should be kept unchanged or updated when inserting/removing/extracting pages. [Learn more](https://github.com/RyotaUshio/obsidian-pdf-plus/wiki/Page-labels)","",'You can also modify page labels directly using the command "Edit page labels".'],d.descEl)}),this.addDropdownSetting("pageLabelUpdateWhenInsertPage",Mc).setName("Insert: default page label processing").setDesc('Applies to the commands "Insert page before/after this page".'),this.addToggleSetting("askPageLabelUpdateWhenInsertPage").setName("Insert: ask whether to update"),this.addDropdownSetting("pageLabelUpdateWhenDeletePage",Mc).setName("Delete: default page label processing").setDesc('Applies to the command "Delete this page".'),this.addToggleSetting("askPageLabelUpdateWhenDeletePage").setName("Delete: ask whether to update"),this.addDropdownSetting("pageLabelUpdateWhenExtractPage",Mc).setName("Extract: default page label processing").setDesc('Applies to the commands "Extract this page to a new file" and "Divide this PDF into two files at this page".'),this.addToggleSetting("askPageLabelUpdateWhenExtractPage").setName("Extract: ask whether to update"),this.addHeading("Opening links to PDF files","open-link","lucide-book-open"),this.addToggleSetting("alwaysRecordHistory").setName("Always record to history when opening PDF links").setDesc("By default, the history is recorded only when you open a link to a different PDF file. If enabled, the history will be recorded even when you open a link to the same PDF file as the current one, and you will be able to go back and forth the history by clicking the left/right arrow buttons even within a single PDF file."),this.addToggleSetting("singleTabForSinglePDF",()=>this.redisplay()).setName("Don't open a single PDF file in multiple tabs").then(d=>this.renderMarkdown('When opening a link to a PDF file without pressing any [modifier keys](https://help.obsidian.md/User+interface/Use+tabs+in+Obsidian#Open+a+link), a new tab will not be opened if the same file has already been already opened in another tab. Useful for annotating PDFs using a side-by-side view ("Split right"), displaying a PDF in one side and a markdown file in another.',d.descEl)),this.plugin.settings.singleTabForSinglePDF&&(this.addToggleSetting("dontActivateAfterOpenPDF").setName("Don't move focus to PDF viewer after opening a PDF link").setDesc("This option will be ignored when you open a PDF link in a tab in the same split as the PDF viewer."),this.addToggleSetting("highlightExistingTab",()=>this.redisplay()).setName("When opening a link to an already opened PDF file, highlight the tab"),this.plugin.settings.highlightExistingTab&&(this.addSliderSetting("existingTabHighlightOpacity",0,1,.01).setName("Highlight opacity of an existing tab"),this.addSliderSetting("existingTabHighlightDuration",.1,10,.05).setName("Highlight duration of an existing tab (sec)")),this.addToggleSetting("dontFitWidthWhenOpenPDFLink",()=>this.events.trigger("update")).setName("Preserve the current zoom level when opening a link to an already opened PDF file").setDesc("When you open a link to a PDF file that's already opened, Obsidian's default behavior causes the zoom level to be reset to fit the width of the PDF file to the viewer. If enabled, the current zoom level will be preserved. This option will be ignored in PDF embeds."),this.showConditionally(this.addToggleSetting("preserveCurrentLeftOffsetWhenOpenPDFLink").setName("Preserve the current horizontal scroll position").setDesc("This option will be ignored in PDF embeds."),()=>this.plugin.settings.dontFitWidthWhenOpenPDFLink)),this.addDropdownSetting("paneTypeForFirstPDFLeaf",yh).setName("How to open PDF links when there is no open PDF file").then(d=>{this.renderMarkdown("This option will be ignored when you press [modifier keys](https://help.obsidian.md/User+interface/Use+tabs+in+Obsidian#Open+a+link) to explicitly specify how to open the link.",d.descEl)}),this.addToggleSetting("openLinkNextToExistingPDFTab").setName("Open PDF links next to an existing PDF tab").then(d=>this.renderMarkdown("If there is a PDF file opened in a tab, clicking a PDF link will first create a new tab next to it and then open the target PDF file in the created tab. This is especially useful when you are spliting the workspace vertically or horizontally and want PDF files to be always opened in one side. This option will be ignored when you press [modifier keys](https://help.obsidian.md/User+interface/Use+tabs+in+Obsidian#Open+a+link) to explicitly specify how to open the link.",d.descEl)),this.addToggleSetting("hoverPDFLinkToOpen").setName("Open PDF link instead of showing popover preview when target PDF is already opened").setDesc(`Press ${In("Mod").toLowerCase()} while hovering a PDF link to actually open it if the target PDF is already opened in another tab.`),this.addSetting().setName("Open PDF links with an external app").setDesc(createFragment(d=>{d.appendText("See the "),d.appendChild(this.createLinkToHeading("external-app")),d.appendText(" section for the details.")})),this.addSetting().setName("Clear highlights after a certain amount of time").addToggle(d=>{d.setValue(this.plugin.settings.highlightDuration>0).onChange(async h=>{this.plugin.settings.highlightDuration=h?this.plugin.settings.highlightDuration>0?this.plugin.settings.highlightDuration:1:0,await this.plugin.saveSettings(),this.redisplay()})}),this.plugin.settings.highlightDuration>0&&this.addSliderSetting("highlightDuration",.1,10,.05).setName("Highlight duration (sec)"),this.addToggleSetting("ignoreHeightParamInPopoverPreview").setName('Ignore "height" parameter in popover preview').setDesc('Obsidian lets you specify the height of a PDF embed by appending "&height=..." to a link, and this also applies to popover previews. Enable this option if you want to ignore the height parameter in popover previews.'),this.addHeading("Embedding PDF files","embed","picture-in-picture-2"),this.addToggleSetting("dblclickEmbedToOpenLink",()=>this.plugin.loadStyle()).setName("Double click PDF embeds to open links").setDesc("Double-clicking a PDF embed will open the embedded file."),this.addToggleSetting("trimSelectionEmbed",()=>this.redisplay()).setName("Trim selection/annotation embeds").then(d=>{this.renderMarkdown(['<span style="color: var(--text-warning);">(Deprecated in favor of the <a href="https://ryotaushio.github.io/obsidian-pdf-plus/embedding-rectangular-selections.html" class="external-link" target="_blank" rel="noopener">rectangular selection embed feature</a> introduced in PDF++ 0.36.0)</span>',"When embedding a selection or an annotation from a PDF file, only the target selection/annotation and its surroundings are displayed rather than the entire page."],d.descEl)}),this.plugin.settings.trimSelectionEmbed&&this.addSliderSetting("embedMargin",0,200,1).setName("Selection/annotation embeds margin (px)"),this.addToggleSetting("noSidebarInEmbed").setName("Hide sidebar in PDF embeds embeds or PDF popover previews by default"),this.addToggleSetting("noSpreadModeInEmbed").setName(`Don't display PDF embeds or PDF popover previews in "two page" layout`).setDesc('Regardless of the "two page" layout setting in existing PDF viewer, PDF embeds and PDF popover previews will be always displayed in "single page" layout. You can still turn it on for each embed by clicking the "two page" button in the toolbar, if shown.'),this.addToggleSetting("noTextHighlightsInEmbed").setName("Don't highlight text in a text selection embeds"),this.addToggleSetting("noAnnotationHighlightsInEmbed").setName("Don't highlight annotations in an annotation embeds"),this.addToggleSetting("persistentTextHighlightsInEmbed").setName("Don't clear highlights in a text selection embeds"),this.addToggleSetting("persistentAnnotationHighlightsInEmbed").setName("Don't clear highlights in an annotation embeds"),this.addToggleSetting("embedUnscrollable").setName("Make PDF embeds with a page specified unscrollable").setDesc("After changing this option, you need to reopen tabs or reload the app."),this.addHeading("Backlinks pane for PDF files","backlink-view","links-coming-in").then(d=>this.renderMarkdown("Improve the built-in [backlinks pane](https://help.obsidian.md/Plugins/Backlinks) for better PDF experience.",d.descEl)),this.addToggleSetting("filterBacklinksByPageDefault").setName("Filter backlinks by page by default").setDesc('You can toggle this on and off with the "Show only backlinks in the current page" button at the top right of the backlinks pane.'),this.addToggleSetting("showBacklinkToPage").setName("Show backlinks to the entire page").setDesc("If turned off, only backlinks to specific text selections, annotations or locations will be shown when filtering the backlinks page by page."),this.addToggleSetting("highlightBacklinksPane").setName("Hover sync (PDF viewer \u2192 Backlinks pane)").setDesc("Hovering your mouse over highlighted text or annotation will also highlight the corresponding item in the backlink pane."),this.addToggleSetting("highlightOnHoverBacklinkPane").setName("Hover sync (Backlinks pane \u2192 PDF viewer)").setDesc("In the backlinks pane, hover your mouse over an backlink item to highlight the corresponding text or annotation in the PDF viewer. This option requires reopening or switching tabs to take effect."),this.plugin.settings.highlightOnHoverBacklinkPane&&this.addDropdownSetting("backlinkHoverColor",["",...Object.keys(this.plugin.settings.colors)],d=>d||"PDF++ default",()=>this.plugin.loadStyle()).setName("Highlight color for hover sync (Backlinks pane \u2192 PDF viewer)").setDesc('To add a new color, click the "+" button in the "highlight colors" setting above.'),this.addHeading("Search from links","search-link","lucide-search").then(d=>{this.renderMarkdown(["You can trigger full-text search by opening a link to a PDF file with a search query appended, e.g. `[[file.pdf#search=keyword]]`."],d.descEl)}),this.addHeading("Search options","search-option").then(d=>{this.renderMarkdown(["The behavior of the search links can be customized globally by the following settings. ","Alternatively, you can specify the behavior for each link by including the following query parameters in the link text: ","","- `&case-sensitive=true` or `&case-sensitive=false`","- `&highlight-all=true` or `&highlight-all=false`","- `&match-diacritics=true` or `&match-diacritics=false`","- `&entire-word=true` or `&entire-word=false`"],d.descEl)});let a={true:"Yes",false:"No",default:"Follow default setting"};this.addDropdownSetting("searchLinkCaseSensitive",a).setName("Case sensitive search"),this.addDropdownSetting("searchLinkHighlightAll",a).setName("Highlight all search results"),this.addDropdownSetting("searchLinkMatchDiacritics",a).setName("Match diacritics"),this.addDropdownSetting("searchLinkEntireWord",a).setName("Match whole word"),this.addHeading("Integration with external apps (desktop-only)","external-app","lucide-share"),this.addToggleSetting("openPDFWithDefaultApp",()=>this.redisplay()).setName("Open PDF links with an external app").setDesc("Open PDF links with the OS-defined default application for PDF files."),this.plugin.settings.openPDFWithDefaultApp&&this.addToggleSetting("openPDFWithDefaultAppAndObsidian").setName("Open PDF links in Obsidian as well").setDesc("Open the same PDF file both in the default app and Obsidian at the same time."),this.addToggleSetting("syncWithDefaultApp").setName("Sync the external app with Obsidian").setDesc("When you focus on a PDF file in Obsidian, the external app will also focus on the same file."),this.addToggleSetting("focusObsidianAfterOpenPDFWithDefaultApp").setName("Focus Obsidian after opening a PDF file with an external app").setDesc("Otherwise, the focus will be moved to the external app."),this.addHeading("View Sync","view-sync","lucide-eye").then(d=>{this.renderMarkdown(["Integrate more seamlessly with the [View Sync](https://github.com/RyotaUshio/obsidian-view-sync) plugin."],d.descEl)}),this.addToggleSetting("viewSyncFollowPageNumber",()=>this.redisplay()).setName("Sync page number"),this.plugin.settings.viewSyncFollowPageNumber&&this.addSliderSetting("viewSyncPageDebounceInterval",.1,1,.05).setName("Minimum update interval of the View Sync file (sec)"),this.addHeading("Vim keybindings","vim","vim").then(d=>this.renderMarkdown("Tracked at [this GitHub issue](https://github.com/RyotaUshio/obsidian-pdf-plus/issues/119).",d.descEl)),this.addSetting().then(d=>{this.renderMarkdown(['The default keybindings are as follows. You can customize them be creating a "vimrc" file and providing its path in the setting below.',"","- `j`/`k`/`h`/`l`: Scroll down/up/left/right","- `J`: Go to next page","- `K`: Go to previous page","- `gg`: Go to first page","- `G`: Go to last page","- `0`/`^`/`H`: Go to top of current page","- `$`/`L`: Go to bottom of current page","- `<C-f>`/`<C-b>`: Scroll down/up as much as the viewer height (`C`=`Ctrl`)","- `<C-d>`/`<C-u>`: Scroll down/up half as much as the viewer height","- `/`/`?`: Search forward/backward","- `n`/`N`: Go to next/previous match","- `gn`/`gN`: Select search result","- `+`/`zi`: Zoom in","- `-`/`zo`: Zoom out","- `=`/`z0`: Reset zoom","- `r`: Rotate pages clockwise","- `R`: Rotate pages counterclockwise","- `y`: Yank (copy) selected text",`- \`c\`: Run the "${this.plugin.lib.commands.stripCommandNamePrefix(this.plugin.lib.commands.getCommand("copy-link-to-selection").name)}" command`,"- `C`: Show context menu at text selection","- `o`: Swap the start and end of the selection","- `:`: Enter command-line mode (experimental)","- `<Tab>`: Toggle outline (table of contents)","- `<S-Tab>`: Toggle thumbnails (`S`=`Shift`)","- `f`: Enter hint mode by running `:hint` (experimental)","- `<Esc>`: Go back to normal mode, abort search, etc","","Many of the commands above can be combined with counts. For example:","- `2j` scrolls down the page twice as much as `j`.","- `2J` advances two pages.","- `10G` takes you to page 10.","- `150=` sets the zoom level to 150%."],d.descEl)}),this.addToggleSetting("vim",()=>this.events.trigger("update")).setName("Enable").setDesc("Reopen the PDF viewers after changing this option."),this.showConditionally([this.addTextSetting("vimrcPath",void 0,()=>this.plugin.vimrc=null).setName("Vimrc file path (optional)").then(async d=>{await this.renderMarkdown(["Only the [Ex commands supported by PDF++](https://github.com/RyotaUshio/obsidian-pdf-plus/blob/main/src/vim/ex-commands.ts) are allowed.","","Example (not necessarily recommendations):","```",'" Use j/k, instead of J/K, to go to the next page',"map j J","map k K","",'" JavaScript commands','" - Hit Ctrl-h in Normal mode to show a message','nmap <C-h> :js alert("Hello, world!")','" - Hit Ctrl-h in Visual mode to run a .js file',"vmap <C-h> :jsfile filename.js","",'" Obsidian commands','" - Open the current PDF in the OS-default app by hitting d, e, and then f',"map def :obcommand open-with-default-app:open",'" - Go back and forth the history with Ctrl-o and Ctrl-i',"map <C-o> :obcommand app:go-back","map <C-i> :obcommand app:go-forward","```","","After changing the path or the file content, you need to reopen the PDF viewer. If the vimrc file is a hidden file or is under a hidden folder, you need to reload PDF++ or the app."],d.descEl);let h=d.components[0].inputEl;new yc(this.app,h).onSelect(({item:u})=>{this.plugin.settings.vimrcPath=u.path,this.plugin.saveSettings()})}),this.addHeading("Visual mode","vim-visual"),this.addToggleSetting("vimVisualMotion").setName("Enter visual mode on text selection").then(d=>{this.renderMarkdown(["When some text is selected, you can modify the range of selection using the `j,` `k`, `h`, `l`, `w`, `e`, `b`, `0`, `^`, `$`, `H`, and `L` keys, similarly to Vim's visual mode (`H`/`L` are mapped to `^`/`$` by default). If disabled, you can use `j`/`k`/`h`/`l`/`0`/`^`/`$`/`H`/`L` keys to scroll the page regardless of text selection. Reload the viewer or the app after changing this option.","","Tips:","- You can use `o` to swap the start and end of the selection.","- As you know, `/` and `?` keys initiate search. Pressing `gn`/`gN` after the search will select the search result. You can also use search to extend the current selection to the search result.","","Note: On mobile, word-wise motions (`w`/`e`/`b`) might not work as expected around punctuations. Contributions to fix this are welcome!"],d.descEl)}),this.addHeading("Outline mode","vim-outline"),this.addToggleSetting("enableVimOutlineMode").setName("Enter outline mode when opening PDF outline view").then(d=>{this.renderMarkdown(["If enabled, you will enter the outline mode by opening the PDF outline view (from the icon in the toolbar or by `<Tab>`), and you can use the following keybindings, similarly to [Zathura](https://pwmt.org/projects/zathura/)'s index mode.","","- `j`: Move down","- `k`: Move up","- `h`: Collapse & move to parent entry","- `l`: Expand entry & move to child entry","- `H`: Collapse all entries","- `L`: Expand all entries","- `<CR>/<Space>`: Open the selected entry (`<CR>`=`Enter`)","- `<Esc>`: Close sidebar and go back to normal mode","","If disabled, you can use j/k/h/l/H/L keys to scroll the page whether the outline view is opened or not. ","This option requires reload to take effect."],d.descEl)}),this.addToggleSetting("vimSmoothOutlineMode").setName("Smooth motion in outline mode"),this.addHeading("Command-line mode (experimental)","vim-command-line"),this.addSetting().then(d=>{this.renderMarkdown(['By pressing `:`, you can enter the command-line mode, where you can execute various commands called "Ex commands"',"","- You can always go back to normal mode by `<Esc>`.","- For some commands, you can run `:help :<command>` or `:h :<command>` to see the help message.","- Use `<Tab>` and `<S-Tab>` to navigate through the suggestions (`S`=`Shift`).","- Use arrow down/up keys to go back and forth the command history.","- `<C-u>` clears the command line, and `<C-w>` deletes the last word (`C`=`Ctrl`).",'- `:<page number>` will take you to the <page number>-th page, where the page number always starts from 1. To go to the page with the page label <page label> (e.g. "i, ii, ..., x, 1, 2, ..."), use `:gotopage <page label>` (or `:go <page label>`/`:goto <page label>` in short).','- `:!<command>` runs the shell command (not supported on mobile). By default, Obsidian does not know the value of the "PATH" environment variable, so you might need to explicitly provide it in the setting below (in the "Misc" section) to run some commands.'],d.descEl)}),this.addHeading("Hint mode (experimental)","vim-hint"),this.addSetting().then(d=>{this.renderMarkdown(["Hitting `f` will enter the hint mode, where you can perform certain actions on links, annotations, and backlink highlighting in the PDF page without using the mouse.",'For example, first press `f` to enter the hint mode, and if the link you want to open gets marked with "HK", then hit `h` and then `k` (without `Shift`) to open it.',"","This is inspired by [Tridactyl](https://github.com/tridactyl/tridactyl)'s hint mode.","","Also check out Style Settings > PDF++ > Vim keybindings > Hint mode."],d.descEl)}),this.addTextSetting("vimHintChars").setName("Characters to use in hint mode").setDesc(`They are used preferentially from left to right, so you might want to put the easier-to-reach keys first. This is the same as Tridactyl's "hintchars" option.`),this.addTextSetting("vimHintArgs").setName('Default arguments for the ":hint" Ex command').setDesc('Space-separated list of "link"/"annot"/"backlink" or "all". Run ":help :hint" for the details.'),this.addHeading("Context menu","vim-context-menu"),this.addToggleSetting("enableVimInContextMenu").setName("Enable Vim keys in PDF context menus").setDesc("If enabled, you can use j/k/h/l keys, instead of the arrow keys, to navigate through context menu items in the PDF viewer."),this.addHeading("Scrolling","vim-scroll"),this.addSliderSetting("vimScrollSize",5,500,5).setName("Scroll size (px) of the jkhl keys").setDesc("The size of scroll when one of the jkhl keys is pressed once."),this.addToggleSetting("vimLargerScrollSizeWhenZoomIn").setName("Increase scroll size when zoomed in"),this.addSliderSetting("vimContinuousScrollSpeed",.1,5,.1).setName("Speed of continuous scroll (px per ms)").setDesc("The speed of scroll when pressing and holding down the jkhl keys."),this.addToggleSetting("vimSmoothScroll").setName("Smooth scroll"),this.addHeading("Search","vim-search"),this.addToggleSetting("vimHlsearch").setName("hlsearch").setDesc("If enabled, all matches will be highlighted."),this.addToggleSetting("vimIncsearch").setName("incsearch").setDesc("Incremental search: while typing the search query, update the search results after every keystroke. If disabled, the results will be shown only after pressing Enter.")],()=>this.plugin.settings.vim),this.addHeading("Misc","misc","lucide-more-horizontal"),this.addToggleSetting("showStatusInToolbar").setName("Show status in PDF toolbar").setDesc('For example, when you copy a link to a text selection in a PDF file, the status "Link copied" will be displayed in the PDF toolbar.'),this.addFileLocationSetting("newPDFLocation",d=>d.setName("Default location for new PDFs").setDesc('The "Create new PDF" command will create a new PDF file in the location specified here.'),"newPDFFolderPath",d=>d.setName("Folder to create new PDFs in").setDesc("Newly created PDFs will appear under this folder.")),this.addToggleSetting("hideReplyAnnotation").setName("Hide reply annotations").then(d=>{this.renderMarkdown(["Hide annotations that are replies to other annotations in the PDF viewer.","","This is a temporary fix for the issue that PDF.js (the library Obsidian's PDF viewer is based on) does not fulfill the PDF specification in that it renders reply annotations as if a standalone annotation."],d.descEl)}),this.addToggleSetting("removeWhitespaceBetweenCJChars").setName("Remove half-width whitespace between two Chinese/Japanese characters when copying text").setDesc("Such whitespace can be introduced as a result of poor post-processing of OCR (optical character recognition). Enable this option to remove it when copying links to text selections."),this.addToggleSetting("copyAsSingleLine").setName("Override the default copy behavior in the PDF viewer").then(d=>{d.descEl.appendText('If enabled, whenever you copy text from the PDF viewer (using Ctrl/Cmd+C or via context menu), the text will go through the same pre-processing as the "'+this.plugin.lib.commands.stripCommandNamePrefix(this.plugin.lib.commands.getCommand("copy-link-to-selection").name)+'" command before written to the clipboard. The pre-processing includes transforming multi-line text into a single line by removing line breaks (if a word is split across lines, it will be concatenated), which is useful because it prevents the copied text from being split into multiple lines unnaturally. If the previous option is enabled, the whitespace removal will also be applied.'),d.descEl.appendText(' Also note that on mobile devices, the action performed by "Copy" depends on the '),d.descEl.appendChild(this.createLinkTo("mobileCopyAction")),d.descEl.appendText(" option.")}),se.Platform.isDesktopApp&&this.addTextAreaSetting("PATH").then(d=>{let h=d.components[0];h instanceof se.TextAreaComponent&&(h.inputEl.rows=8,h.inputEl.cols=30)}).setName('"PATH" environment variable').setDesc('Provide the "PATH" environment variable for PDF++ to run shell commands without the full paths specified. In MacOS and Linux, you can run "echo $PATH" in Terminal and then copy & paste the result here. Currently, it will be used only when you run ":!<command>" in Vim mode.'),this.addHeading("Style settings","style-settings","lucide-settings-2").setDesc("You can find more options in Style Settings > PDF++.").addButton(d=>{d.setButtonText("Open style settings").onClick(()=>{let h=this.app.setting.pluginTabs.find(u=>u.id==="obsidian-style-settings");h?this.app.setting.openTab(h):open("obsidian://show-plugin?id=obsidian-style-settings")})}),this.addFundingButton(),await Promise.all(this.promises)}async hide(){this.plugin.settings.colors=Object.fromEntries(Object.entries(this.plugin.settings.colors).filter(([e,i])=>e&&Ki(i))),this.plugin.settings.defaultColor&&!(this.plugin.settings.defaultColor in this.plugin.settings.colors)&&(this.plugin.settings.defaultColor=""),this.plugin.settings.backlinkHoverColor&&!(this.plugin.settings.backlinkHoverColor in this.plugin.settings.colors)&&(this.plugin.settings.backlinkHoverColor=""),this.plugin.settings.copyCommands=this.plugin.settings.copyCommands.filter(e=>e.name&&e.template),this.plugin.settings.displayTextFormats=this.plugin.settings.displayTextFormats.filter(e=>e.name),this.plugin.settings.enablePDFEdit&&!this.plugin.settings.author&&(this.plugin.settings.enablePDFEdit=!1,new se.Notice(`${this.plugin.manifest.name}: Cannot enable writing highlights into PDF files because the "Annotation author" option is empty.`)),this.plugin.validateAutoFocusAndAutoPasteSettings(),await this.plugin.saveSettings(),this.plugin.loadStyle(),this.promises=[],this.component.unload()}};var Fx=async(n,t,e)=>{if(t.palette){if(Te.Platform.isDesktopApp){let i=window.electron;i&&e.isTrusted&&(e.stopPropagation(),e.stopImmediatePropagation(),await new Promise(r=>{let o=e.win.setTimeout(()=>r(null),1e3);i.ipcRenderer.once("context-menu",(s,a)=>{e.win.clearTimeout(o),r(a)}),i.ipcRenderer.send("context-menu")}))}e.defaultPrevented||await ng(n,t,e)}};async function ng(n,t,e){let i=await aa.fromMouseEvent(n,t,e);t.clearEphemeralUI(),i.showAtMouseEvent(e),t.pdfViewer.isEmbed&&e.preventDefault()}async function Fh(n,t,e){if(!e||!e.focusNode||e.isCollapsed)return;let i=e.focusNode,r=e.focusOffset,o=i.doc,s=o.createRange();s.setStart(i,r),s.setEnd(i,r);let{x:a,y:c}=s.getBoundingClientRect(),l=new aa(n,t);await l.addItems(),t.clearEphemeralUI(),n.shownMenus.forEach(d=>d.hide()),l.showAtPosition({x:a,y:c},o)}var Px=(n,t,e)=>{var o;let{lib:i}=n,r=e.targetNode;if(r&&r.instanceOf(HTMLElement)&&r.hasClass("thumbnail")&&r.dataset.pageNumber!==void 0){let s=parseInt(r.dataset.pageNumber);if(Number.isNaN(s))return;let a=t.getMarkdownLink(`#page=${s}`,t.getPageLinkAlias(s)),l=(o=t.getPage(s).pageLabel)!=null?o:""+s,d=t.pdfViewer.pagesCount,h=""+s===l?`Copy link to page ${s}`:`Copy link to page ${l} (${s}/${d})`,u=new Te.Menu().addItem(f=>{f.setTitle(h).setIcon("lucide-copy").onClick(()=>{var g;((g=e.view)!=null?g:activeWindow).navigator.clipboard.writeText(a);let p=t.file;p&&(n.lastCopiedDestInfo={file:p,destArray:[s-1,"XYZ",null,null,null]})})});i.isEditable(t)&&u.addItem(f=>{f.setTitle("Insert page before this page").setIcon("lucide-plus").onClick(()=>{let p=t.file;if(!p){new Te.Notice(`${n.manifest.name}: Failed to insert the page.`);return}i.commands._insertPage(p,s,s)})}).addItem(f=>{f.setTitle("Insert page after this page").setIcon("lucide-plus").onClick(()=>{let p=t.file;if(!p){new Te.Notice(`${n.manifest.name}: Failed to insert the page.`);return}i.commands._insertPage(p,s+1,s)})}).addItem(f=>{f.setTitle("Delete page").setIcon("lucide-trash").onClick(()=>{let p=t.file;if(!p){new Te.Notice(`${n.manifest.name}: Failed to delete the page.`);return}i.commands._deletePage(p,s)})}).addItem(f=>{f.setTitle("Extract page to new file").setIcon("lucide-file-output").onClick(()=>{let p=t.file;if(!p){new Te.Notice(`${n.manifest.name}: Failed to extract the page.`);return}i.commands._extractPage(p,s)})}).addItem(f=>{f.setTitle("Divide document at this page").setIcon("lucide-split-square-vertical").onClick(()=>{let p=t.file;if(!p){new Te.Notice(`${n.manifest.name}: Failed to divide the document.`);return}i.commands._dividePDF(p,s)})}).addSeparator().addItem(f=>{f.setTitle("Customize...").setIcon("lucide-settings").onClick(()=>{n.openSettingTab().scrollToHeading("thumbnail")})}),u.showAtMouseEvent(e)}},kx=(n,t,e,i,r)=>{let{app:o,lib:s}=n;t.pdfViewer.isEmbed&&r.preventDefault();let a=s.toSingleLine(i.item.title),c=a?`Copy link to "${a.length<=40?a:a.slice(0,39).trim()+"\u2026"}"`:"Copy link to section",l=new Te.Menu().addItem(d=>{d.setTitle(c).setIcon("lucide-copy").onClick(async()=>{var f;let h=await s.copyLink.getTextToCopyForOutlineItem(t,e,i);((f=r.view)!=null?f:activeWindow).navigator.clipboard.writeText(h);let u=i.item.dest;if(typeof u=="string")n.lastCopiedDestInfo={file:e,destName:u};else{let p=await i.getPageNumber(),g=s.normalizePDFJsDestArray(u,p);n.lastCopiedDestInfo={file:e,destArray:g}}})});s.isEditable(t)&&l.addItem(d=>{d.setTitle("Add subitem").setIcon("lucide-plus").onClick(()=>{new vr(n,"Add subitem to outline").ask().then(async({title:h})=>{let u=s.getPDFViewFromChild(t);if(u){let f=u.getState(),p=s.viewStateToDestArray(f,!0);if(p){await Ce.findAndProcessOutlineItem(i,g=>{g.createChild(h,p).updateCountForAllAncestors(),g.sortChildren()},e,n);return}}new Te.Notice(`${n.manifest.name}: Failed to add the subitem.`)})})}).addItem(d=>{d.setTitle("Rename...").setIcon("lucide-pencil").onClick(()=>{new vr(n,"Rename outline item").presetTitle(i.item.title).ask().then(async({title:h})=>{await Ce.findAndProcessOutlineItem(i,u=>{u.title=h},e,n)})})}).addItem(d=>{d.setTitle("Move item to...").setIcon("lucide-folder-tree").onClick(async()=>{let h=await Ce.fromFile(e,n),u=await h.findPDFjsOutlineTreeNode(i);if(!u){new Te.Notice(`${n.manifest.name}: Failed to load the PDF document.`);return}new hh(h,u).askDestination().then(async f=>{f.appendChild(u),f.sortChildren();let p=await h.doc.save();await o.vault.modifyBinary(e,p)})})}).addItem(d=>{d.setTitle("Delete").setIcon("lucide-trash").onClick(async()=>{await Ce.findAndProcessOutlineItem(i,h=>{h.remove(),h.updateCountForAllAncestors()},e,n)})}).addItem(d=>{d.setTitle("Extract to new file").setIcon("lucide-file-output").onClick(async()=>{let{lib:h,settings:u}=n,f=await Ce.fromFile(e,n),p=await f.findPDFjsOutlineTreeNode(i);if(!p){new Te.Notice(`${n.manifest.name}: Failed to process the outline item.`);return}let{doc:g}=f,m=p.getExplicitDestination(),b=m?m[0]+1:null,w=null,F=p;for(;!F.nextSibling&&F.parent;)F=F.parent;let v=F.nextSibling;if(v){let k=v.getExplicitDestination();k&&(w=k[0]+1)}else w=g.getPageCount()+1;if(b===null||w===null){new Te.Notice(`${n.manifest.name}: Failed to fetch page numbers from the outline item.`);return}if(b>w){new Te.Notice(`${n.manifest.name}: The page numbers are invalid: the beginning of this section is page ${b}, whereas the next section starts at page ${w}.`);return}b===w&&(w=b+1);let P=h.getAvailablePathForCopy(e);new Nn(n,u.askPageLabelUpdateWhenExtractPage,u.pageLabelUpdateWhenExtractPage,u.askExtractPageInPlace,u.extractPageInPlace).ask().then((k,C)=>{h.composer.extractPages(e,{from:b,to:w-1},P,!1,k,C).then(async D=>{if(!D){new Te.Notice(`${n.manifest.name}: Failed to extract section from PDF.`);return}if(u.openAfterExtractPages){let T=h.workspace.getLeaf(u.howToOpenExtractedPDF);await T.openFile(D),await h.workspace.revealLeaf(T)}})})})}).addSeparator().addItem(d=>{d.setTitle("Customize...").setIcon("lucide-settings").onClick(()=>{n.openSettingTab().scrollToHeading("outline")})}),l.showAtMouseEvent(r)},Dx=(n,t,e,i)=>{let{lib:r}=n;r.isEditable(t)&&new Te.Menu().addItem(o=>{o.setTitle("Add top-level item").setIcon("lucide-plus").onClick(()=>{new vr(n,"Add item to outline").ask().then(async({title:s})=>{let a=r.getPDFViewFromChild(t);if(a){let c=a.getState(),l=r.viewStateToDestArray(c,!0);if(l){await Ce.processOutlineRoot(d=>{d.createChild(s,l).updateCountForAllAncestors(),d.sortChildren()},e,n);return}}new Te.Notice(`${n.manifest.name}: Failed to add the item.`)})})}).showAtMouseEvent(i)},ig=class extends Te.Menu{constructor(e){super();this.plugin=e}get app(){return this.plugin.app}get settings(){return this.plugin.settings}get lib(){return this.plugin.lib}},aa=class extends ig{constructor(e,i){super(e);this.child=i,this.setUseNativeMenu(!1),this.addSections(Object.keys(Ti.contextMenuConfig)),e.settings.enableVimInContextMenu&&Zp(this)}static async fromMouseEvent(e,i,r){let o=new aa(e,i);return await o.addItems(r),o}get win(){return this.child.containerEl.win}async addItems(e){var b,w;let{child:i,plugin:r,lib:o,app:s}=this,a=i.pdfViewer.pdfViewer,c=this.win.getSelection(),l=(b=o.copyLink.getPageAndTextRangeFromSelection(c))!=null?b:a?{page:a.currentPageNumber}:null;if(!l)return;let{page:d,selection:h}=l,u=o.toSingleLine((w=c==null?void 0:c.toString())!=null?w:""),f=F=>{var v;return(v=this.settings.contextMenuConfig.find(P=>P.id===F))==null?void 0:v.visible};Te.Platform.isMacOS&&Te.Platform.isDesktopApp&&this.win.electron&&u&&f("action")&&this.addItem(F=>F.setSection("action").setTitle(`Look up "${u.length<=25?u:u.slice(0,24).trim()+"\u2026"}"`).setIcon("lucide-library").onClick(()=>{this.win.electron.remote.getCurrentWebContents().showDefinitionForSelection()})),u&&u&&h&&i.palette&&(f("selection")&&Bo.create(this,i.palette).setSection("selection","Copy link to selection","lucide-copy").addItems(r.settings.selectionProductMenuConfig).onItemClick(({copyFormat:F,displayTextFormat:v,colorName:P})=>{o.copyLink.copyLinkToSelection(!1,{copyFormat:F,displayTextFormat:v},P!=null?P:void 0)}),o.isEditable(i)&&f("write-file")&&Bo.create(this,i.palette).setSection("write-file",`Add ${r.settings.selectionBacklinkVisualizeStyle} to file`,"lucide-edit").setShowNoColorButton(!1).addItems(r.settings.writeFileProductMenuConfig).onItemClick(({copyFormat:F,displayTextFormat:v,colorName:P})=>{o.copyLink.writeHighlightAnnotationToSelectionIntoFileAndCopyLink(!1,{copyFormat:F,displayTextFormat:v},P!=null?P:void 0)}));let p=i.getPage(d),g=e&&i.getAnnotationFromEvt(p,e),m=null;if(await(async()=>{var F;if(g){let{id:v}=o.getAnnotationInfoFromAnnotationElement(g);if(m=await i.getAnnotatedText(p,v),i.palette&&f("annotation")&&Bo.create(this,i.palette).setSection("annotation","Copy link to annotation","lucide-copy").addItems(r.settings.annotationProductMenuConfig).onItemClick(({copyFormat:P,displayTextFormat:k})=>{o.copyLink.copyLinkToAnnotation(i,!1,{copyFormat:P,displayTextFormat:k},d,v,!1,!0)}),o.isEditable(i)&&f("modify-annotation")){if(r.settings.enableAnnotationContentEdit&&Mn.isSubtypeSupported(g.data.subtype)){let P=g.data.subtype;this.addItem(k=>k.setSection("modify-annotation").setTitle("Edit annotation").setIcon("lucide-pencil").onClick(()=>{i.file&&Mn.forSubtype(P,r,i.file,d,v).open()}))}r.settings.enableAnnotationDeletion&&this.addItem(P=>P.setSection("modify-annotation").setTitle("Delete annotation").setIcon("lucide-trash").onClick(()=>{i.file&&new ra(r,i.file,d,v).openIfNeccessary()}))}if(g.data.subtype==="Link"&&f("link")){let P=(F=i.pdfViewer.pdfViewer)==null?void 0:F.pdfDocument;if("dest"in g.data&&typeof g.data.dest=="string"&&P&&i.file){let k=g.data.dest,C=i.file;this.addItem(D=>{D.setSection("link").setTitle("Copy PDF link").setIcon("lucide-copy").onClick(async()=>{let T=await o.destIdToSubpath(k,P);if(typeof T=="string"){let O=m;!O&&g.data.rect&&(O=i.getTextByRect(p,g.data.rect));let E=o.generateMarkdownLink(C,"",T,O!=null?O:void 0).slice(1);navigator.clipboard.writeText(E),r.lastCopiedDestInfo={file:C,destName:k}}})}),k.startsWith("cite.")&&this.addItem(D=>{D.setSection("link").setTitle("Search on Google Scholar").setIcon("lucide-search").onClick(()=>{var O;let T=(O=this.child.bib)==null?void 0:O.getGoogleScholarSearchUrlFromDest(k);if(typeof T!="string"){new Te.Notice(`${r.manifest.name}: Failed to find bibliographic information.`);return}window.open(T,"_blank")})})}if("url"in g.data&&typeof g.data.url=="string"){let k=g.data.url;this.addItem(C=>{C.setSection("link").setTitle("Copy URL").setIcon("lucide-copy").onClick(()=>{navigator.clipboard.writeText(k)})})}}}})(),u&&h&&o.isEditable(i)&&r.lastCopiedDestInfo&&r.lastCopiedDestInfo.file===i.file&&f("link")){if("destArray"in r.lastCopiedDestInfo){let F=r.lastCopiedDestInfo.destArray;this.addItem(v=>v.setSection("link").setTitle("Paste copied PDF link to selection").setIcon("lucide-clipboard-paste").onClick(()=>{o.highlight.writeFile.addLinkAnnotationToSelection(F)}))}else if("destName"in r.lastCopiedDestInfo){let F=r.lastCopiedDestInfo.destName;this.addItem(v=>v.setSection("link").setTitle("Paste copied link to selection").setIcon("lucide-clipboard-paste").onClick(()=>{o.highlight.writeFile.addLinkAnnotationToSelection(F)}))}}u&&f("text")&&this.addItem(F=>F.setSection("text").setTitle("Copy selected text").setIcon("lucide-copy").onClick(()=>{var v;navigator.clipboard.writeText(this.plugin.settings.copyAsSingleLine?u:(v=c==null?void 0:c.toString())!=null?v:"")})),m&&f("text")&&this.addItem(F=>F.setSection("text").setTitle("Copy annotated text").setIcon("lucide-copy").onClick(()=>{navigator.clipboard.writeText(m)})),u&&h&&f("search")&&this.addItem(F=>{F.setSection("search").setTitle("Copy link to search").setIcon("lucide-search").onClick(()=>{o.copyLink.copyLinkToSearch(!1,i,d,u.trim())})}),o.speech.isEnabled()&&u&&f("speech")&&this.addItem(F=>{F.setSection("speech").setTitle("Read aloud selected text").setIcon("lucide-speech").onClick(()=>{o.speech.speak(u)})}),!this.items.length&&f("page")&&this.addItem(F=>{F.setSection("page").setTitle("Copy link to page").setIcon("lucide-copy").onClick(v=>{let P=i.getMarkdownLink(`#page=${d}`,i.getPageLinkAlias(d));v.win.navigator.clipboard.writeText(P);let k=i.file;k&&(r.lastCopiedDestInfo={file:k,destArray:[d-1,"XYZ",null,null,null]})})}),this.items.length&&f("settings")&&this.addItem(F=>{F.setSection("settings").setIcon("lucide-settings").setTitle("Customize menu...").onClick(()=>{this.plugin.openSettingTab().scrollToHeading("context-menu")})}),s.workspace.trigger("pdf-menu",this,{pageNumber:d,selection:u,annot:g})}},Bo=class extends de{constructor(e,i){super(i.plugin);this.clickItemCallback=null;this.itemToColorName=new Map;this.itemToCopyFormat=new Map;this.itemToDisplayTextFormat=new Map;this.rootMenu=e,this.palette=i,this.showNoColorButton=this.settings.noColorButtonInColorPalette}static create(e,i){return e.addChild(new Bo(e,i))}then(e){return e(this),this}setShowNoColorButton(e){return this.showNoColorButton=e,this}setSection(e,i,r){return this.section=e,this.sectionTitle=i,this.sectionIcon=r,this}addSectionTitle(){this.section&&this.sectionTitle&&this.rootMenu.addItem(e=>{e.setSection(this.section).setTitle(this.sectionTitle).setDisabled(!0),this.sectionIcon&&e.setIcon(this.sectionIcon)})}addItems(e){return this.addSectionTitle(),Te.Platform.isDesktopApp||(e=e.slice(0,1)),gx(this.rootMenu,e.map(i=>{switch(i){case"color":return this.addColorItems.bind(this);case"copy-format":return this.addCopyFormatItems.bind(this);case"display":return this.addDisplayTextItems.bind(this)}}),{clickableParentItem:!0,vim:this.settings.enableVimInContextMenu}),this}addColorItems(e){let i=Object.keys(this.settings.colors),r=this.palette.getState().selectedColorName,o=r?i.map(s=>s.toLowerCase()).indexOf(r.toLowerCase()):-1;for(let s=this.showNoColorButton?-1:0;s<i.length;s++)e.addItem(a=>{a.setTitle(s>=0?i[s]:"Don't specify color").onClick(()=>{this.finish({colorName:s>=0?i[s]:null})}),e!==this.rootMenu&&a.setChecked(s===o),this.section&&e===this.rootMenu&&a.setSection(this.section),this.itemToColorName.set(a,s>=0?i[s]:null);let c=this.settings.colors[s>=0?i[s]:"transparent"];a.dom.addClass("pdf-plus-color-menu-item"),a.titleEl.before(createDiv("pdf-plus-color-indicator",l=>{l.setCssStyles({backgroundColor:c})}))});Xp(e,100)}addNamedTemplateItems(e,i,r,o,s){for(let a=0;a<i.length;a++)e.addItem(c=>{c.setTitle(i[a].name).onClick(()=>{s(i[a])}),e!==this.rootMenu&&c.setChecked(a===r),o.set(c,i[a].template),this.section&&e===this.rootMenu&&c.setSection(this.section)});Xp(e,100)}addDisplayTextItems(e){this.addNamedTemplateItems(e,this.settings.displayTextFormats,this.palette.getState().displayTextFormatIndex,this.itemToDisplayTextFormat,({template:i})=>this.finish({displayTextFormat:i}))}addCopyFormatItems(e){this.addNamedTemplateItems(e,this.settings.copyCommands,this.palette.getState().actionIndex,this.itemToCopyFormat,({template:i})=>this.finish({copyFormat:i}))}getOptionsFromColorPalette(){return{colorName:this.palette.getColorName(),copyFormat:this.palette.getCopyFormat(),displayTextFormat:this.palette.getDisplayTextFormat()}}getOptions(e){let i=this.getOptionsFromColorPalette();if(Te.Platform.isDesktopApp){let{items:r}=mx(this.rootMenu);for(let o of r)this.itemToColorName.has(o)?i.colorName=this.itemToColorName.get(o):this.itemToCopyFormat.has(o)?i.copyFormat=this.itemToCopyFormat.get(o):this.itemToDisplayTextFormat.has(o)&&(i.displayTextFormat=this.itemToDisplayTextFormat.get(o))}return Object.assign(i,e),i}updateColorPaletteState(e){let i=e.colorName,r=this.settings.copyCommands.findIndex(({template:s})=>s===e.copyFormat),o=this.settings.displayTextFormats.findIndex(({template:s})=>s===e.displayTextFormat);this.palette.setState({selectedColorName:i,actionIndex:r,displayTextFormatIndex:o}),this.settings.syncColorPaletteItem&&this.settings.syncDefaultColorPaletteItem&&(this.settings.defaultColorPaletteItemIndex=i?Object.keys(this.settings.colors).indexOf(i)+1:0),this.settings.syncColorPaletteAction&&this.settings.syncDefaultColorPaletteAction&&(this.settings.defaultColorPaletteActionIndex=r),this.plugin.settings.syncDisplayTextFormat&&this.plugin.settings.syncDefaultDisplayTextFormat&&(this.plugin.settings.defaultDisplayTextFormatIndex=o),this.plugin.trigger("color-palette-state-change",{source:this.palette})}finish(e){var r;let i=this.getOptions(e);this.settings.updateColorPaletteStateFromContextMenu&&this.updateColorPaletteState(i),(r=this.clickItemCallback)==null||r.call(this,i),this.rootMenu.hide()}onItemClick(e){this.clickItemCallback=e}},Sx=(n,t,e)=>{var l;if(n.defaultPrevented||(l=activeWindow.getSelection())!=null&&l.toString())return;let{lib:i,settings:r,child:o}=t;if(e.page){let d=o.getPage(e.page);if(o.getAnnotationFromEvt(d,n))return}let s=e.getColor(),a=(s==null?void 0:s.type)==="name"?s.name:void 0,c=new Te.Menu().addSections(["copy","color","image"]);s&&c.addItem(d=>{d.setSection("color").setTitle("Unset color").setIcon("lucide-palette").onClick(()=>{i.composer.linkUpdater.updateLinkColor(e.refCache,e.sourcePath,null)})});for(let d of Object.keys(r.colors))d.toLowerCase()!==(a==null?void 0:a.toLowerCase())&&c.addItem(h=>{h.setSection("color").setTitle(`Change color to "${d}"`).setIcon("lucide-palette").onClick(()=>{i.composer.linkUpdater.updateLinkColor(e.refCache,e.sourcePath,{type:"name",name:d})})});if(e.page&&e.FitR){let d=o.getPage(e.page).pdfPage,{left:h,bottom:u,right:f,top:p}=e.FitR;c.addItem(g=>{g.setSection("image").setTitle("Copy as image").setIcon("lucide-image").onClick(()=>{let m=i.pdfPageToImageArrayBuffer(d,{type:"image/png",encoderOptions:1,cropRect:[h,u,f,p]}).then(b=>new Blob([b],{type:"image/png"}));navigator.clipboard.write([new ClipboardItem({"image/png":m})])})})}c.showAtMouseEvent(n),n.preventDefault()};var rg=require("obsidian");var Cx=async(n,t,e,i)=>{let{app:r,lib:o}=n,s=[];for(let a of t.allItems)s.push((async()=>{let c=await o.copyLink.getTextToCopyForOutlineItemDynamic(e,i,a),l=o.toSingleLine(a.item.title),d=l?`${l.length<=40?l:l.slice(0,39).trim()+"\u2026"}`:"PDF section";r.dragManager.handleDrag(a.selfEl,h=>(r.dragManager.updateSource([a.selfEl],"is-being-dragged"),{source:"pdf-plus",type:"pdf-offset",icon:"lucide-heading",title:d,getText:c,item:a})),r.dragManager.handleDrop(a.selfEl,(h,u,f)=>{if(!o.isEditable(e)||!u||u.source!=="pdf-plus"||u.type!=="pdf-offset")return;let p=u.item;if(p&&!Mp(p,a,!0)&&p.parent!==a&&a.owner===p.owner)return f||(async()=>{let g=await Ce.fromFile(i,n),[m,b]=await Promise.all([g.findPDFjsOutlineTreeNode(a),g.findPDFjsOutlineTreeNode(p)]);if(!m||!b){new rg.Notice(`${n.manifest.name}: Failed to move the outline item.`);return}m.appendChild(b),m.sortChildren();let w=await g.doc.save();await r.vault.modifyBinary(i,w)})(),{action:`Move into "${d}"`,dropEffect:"move",hoverEl:a.el,hoverClass:"is-being-dragged-over"}},!1)})());await Promise.all(s),r.dragManager.handleDrop(t.childrenEl,(a,c,l)=>{if(!o.isEditable(e)||!c||c.source!=="pdf-plus"||c.type!=="pdf-offset"||a.target!==a.currentTarget)return;let d=c.item;if(d&&d.parent&&t===d.owner)return l||(async()=>{let h=await Ce.fromFile(i,n),u=await(h==null?void 0:h.findPDFjsOutlineTreeNode(d));if(!u){new rg.Notice(`${n.manifest.name}: Failed to move the outline item.`);return}let f=h.ensureRoot();f.appendChild(u),f.sortChildren();let p=await h.doc.save();await r.vault.modifyBinary(i,p)})(),{action:"Move to top level",dropEffect:"move",hoverEl:t.childrenEl,hoverClass:"is-being-dragged-over"}},!1)},Tx=(n,t,e)=>{let{app:i,lib:r}=n;t.pdfViewer.pdfThumbnailViewer.container.querySelectorAll("div.thumbnail[data-page-number]").forEach(o=>{var h;let s=parseInt(o.dataset.pageNumber),c=(h=t.getPage(s).pageLabel)!=null?h:""+s,l=t.pdfViewer.pagesCount,d=""+s===c?`Page ${s}`:`Page ${c} (${s}/${l})`;i.dragManager.handleDrag(o,u=>(i.dragManager.updateSource([o],"is-being-dragged"),{source:"pdf-plus",type:"pdf-page",icon:"lucide-book-open",title:d,getText:f=>r.copyLink.getTextToCopy(t,n.settings.thumbnailLinkCopyFormat,n.settings.thumbnailLinkDisplayTextFormat,e,s,`#page=${s}`,"","",f)}))})},Ex=(n,t,e,i,r,o)=>{let{app:s,lib:a}=n,c=e.getPage(r);e.getAnnotatedText(c,o).then(l=>{s.dragManager.handleDrag(t,d=>{s.dragManager.updateSource([t],"is-being-dragged");let h=a.getColorPaletteFromChild(e);if(!h)return null;let u=n.settings.copyCommands[h.actionIndex].template;return{source:"pdf-plus",type:"pdf-annotation",icon:"lucide-highlighter",title:"PDF annotation",getText:f=>a.copyLink.getTextToCopy(e,u,void 0,i,r,`#page=${r}&annotation=${o}`,l!=null?l:"","",f)}})})};var Ph=require("obsidian");var Cr=require("obsidian");var la=class extends de{constructor(e,i){super(e);this.file=i,this.events=new Cr.Events}onload(){this.init(),this.registerEvent(this.app.metadataCache.on("changed",(e,i,r)=>{this.update(e.path,r),this.trigger("update")})),this.registerEvent(this.app.metadataCache.on("deleted",e=>{this.deleteCachesForSourcePath(e.path),this.trigger("update")})),this.registerEvent(this.app.vault.on("rename",(e,i)=>{if(e instanceof Cr.TFile){this.deleteCachesForSourcePath(i);let r=this.app.metadataCache.getFileCache(e);r&&this.update(e.path,r),this.trigger("update")}}))}init(){this.pagesMap=new Map,this.sourcePaths=new Ut,this.backlinks=new Set;let e=this.app.metadataCache.getBacklinksForFile(this.file);for(let i of e.keys()){let r=e.get(i);for(let o of r!=null?r:[])this.createCache(o,i)}}update(e,i){var o,s,a;this.deleteCachesForSourcePath(e);let r=[...(o=i.links)!=null?o:[],...(s=i.embeds)!=null?s:[],...(a=i.frontmatterLinks)!=null?a:[]];for(let c of r){let l=c.link;this.app.metadataCache.getFirstLinkpathDest((0,Cr.getLinkpath)(l),e)===this.file&&this.createCache(c,e)}}delete(e){this.backlinks.delete(e),this.sourcePaths.deleteValue(e.sourcePath,e),e.page&&this.getPageIndex(e.page).delete(e)}deleteCachesForSourcePath(e){let i=this.sourcePaths.get(e);for(let r of i)this.delete(r)}getPageIndex(e){return this.pagesMap.has(e)||this.pagesMap.set(e,new Le(this,e)),this.pagesMap.get(e)}createCache(e,i){let r=new og(this,e);this.backlinks.add(r),r.sourcePath=i;let{subpath:o}=(0,Cr.parseLinktext)(e.link),s=new URLSearchParams(o.startsWith("#")?o.slice(1):o);if(!s.has("page"))return r;let a=+s.get("page");if(!Number.isInteger(a))return r;if(r.page=a,s.has("selection")){let c=s.get("selection").split(",").map(l=>parseInt(l.trim()));if(c.length===4&&c.every(l=>!isNaN(l))){let[l,d,h,u]=c;r.selection={beginIndex:l,beginOffset:d,endIndex:h,endOffset:u}}}if(s.has("annotation")){let c=s.get("annotation");r.annotation={id:c}}if(s.has("offset")){let c=s.get("offset").split(",").map(u=>parseInt(u)),l=c[0],d=c[1],h=c[2];isNaN(h)?r.FitBH={top:d}:r.XYZ={left:l,top:d,zoom:h}}if(s.has("rect")){let c=s.get("rect").split(",").map(f=>parseFloat(f)),[l,d,h,u]=c;r.FitR={left:l,bottom:d,right:h,top:u}}if(s.has("color")){let c=s.get("color"),l=c.split(",").map(d=>parseInt(d));l.length===3&&l.every(d=>!isNaN(d))?r.setColor({rgb:{r:l[0],g:l[1],b:l[2]}}):r.setColor({name:c})}return r}on(e,i,r){return this.events.on(e,i,r)}trigger(e,...i){this.events.trigger(e,...i)}},Le=class{constructor(t,e){this.sourcePaths=new Ut;this.backlinks=new Set;this.selections=new Ut;this.annotations=new Ut;this.XYZs=new Ut;this.FitBHs=new Ut;this.FitRs=new Ut;this.index=t,this.pageNumber=e}add(t){this.backlinks.add(t),this.sourcePaths.addValue(t.sourcePath,t),t.selection&&this.selections.addValue(Le.selectionId(t.selection),t),t.annotation&&this.annotations.addValue(t.annotation.id,t),t.XYZ&&this.XYZs.addValue(Le.XYZId(t.XYZ),t),t.FitBH&&this.FitBHs.addValue(Le.FitBHId(t.FitBH),t),t.FitR&&this.FitRs.addValue(Le.FitRId(t.FitR),t)}delete(t){this.backlinks.delete(t),this.sourcePaths.deleteValue(t.sourcePath,t),t.selection&&this.selections.deleteValue(Le.selectionId(t.selection),t),t.annotation&&this.annotations.deleteValue(t.annotation.id,t),t.XYZ&&this.XYZs.deleteValue(Le.XYZId(t.XYZ),t),t.FitBH&&this.FitBHs.deleteValue(Le.FitBHId(t.FitBH),t),t.FitR&&this.FitRs.deleteValue(Le.FitRId(t.FitR),t)}static selectionId(t){return`${t.beginIndex},${t.beginOffset},${t.endIndex},${t.endOffset}`}static selectionIdToParams(t){let[e,i,r,o]=t.split(",").map(s=>parseInt(s));return{beginIndex:e,beginOffset:i,endIndex:r,endOffset:o}}static XYZId(t){return`${t.left},${t.top},${t.zoom}`}static XYZIdToParams(t){let[e,i,r]=t.split(",").map(o=>parseFloat(o));return{left:e,top:i,zoom:r}}static FitBHId(t){return`${t.top}`}static FitBHIdToParams(t){return{top:parseFloat(t)}}static FitRId(t){return`${t.left},${t.bottom},${t.right},${t.top}`}static FitRIdToParams(t){let[e,i,r,o]=t.split(",").map(s=>parseFloat(s));return{left:e,bottom:i,right:r,top:o}}},og=class{constructor(t,e){this._sourcePath="";this._page=null;this._selection=null;this._annotation=null;this._XYZ=null;this._FitBH=null;this._FitR=null;this._color=null;this.index=t,this.refCache=e}getPageIndex(){return this.page?this.index.getPageIndex(this.page):null}get file(){return this.index.file}get sourcePath(){return this._sourcePath}set sourcePath(t){this._sourcePath=t,this.index.sourcePaths.addValue(t,this),this.page&&this.index.getPageIndex(this.page).sourcePaths.addValue(t,this)}get page(){return this._page}set page(t){this.page&&this.index.getPageIndex(this.page).delete(this),t&&this.index.getPageIndex(t).add(this),this._page=t}get selection(){return this._selection}set selection(t){let e=this.getPageIndex();e&&(this.selection&&(e==null||e.selections.deleteValue(Le.selectionId(this.selection),this)),t&&e.selections.addValue(Le.selectionId(t),this)),this._selection=t}get annotation(){return this._annotation}set annotation(t){let e=this.getPageIndex();e&&(this.annotation&&(e==null||e.annotations.deleteValue(this.annotation.id,this)),t&&e.annotations.addValue(t.id,this)),this._annotation=t}get XYZ(){return this._XYZ}set XYZ(t){let e=this.getPageIndex();e&&(this.XYZ&&(e==null||e.XYZs.deleteValue(Le.XYZId(this.XYZ),this)),t&&e.XYZs.addValue(Le.XYZId(t),this)),this._XYZ=t}get FitBH(){return this._FitBH}set FitBH(t){let e=this.getPageIndex();e&&(this.FitBH&&(e==null||e.FitBHs.deleteValue(Le.FitBHId(this.FitBH),this)),t&&e.FitBHs.addValue(Le.FitBHId(t),this)),this._FitBH=t}get FitR(){return this._FitR}set FitR(t){let e=this.getPageIndex();e&&(this.FitR&&(e==null||e.FitRs.deleteValue(Le.FitRId(this.FitR),this)),t&&e.FitRs.addValue(Le.FitRId(t),this)),this._FitR=t}setColor(t){"rgb"in t?this._color={type:"rgb",rgb:t.rgb}:this._color={type:"name",name:t.name}}getColor(){return this._color}};var sg=class extends de{constructor(e,i){super(e);this.file=i}get index(){var e;return(e=this._index)!=null?e:this._index=this.addChild(new la(this.plugin,this.file))}processSelection(e,i,r){}processAnnotation(e,i,r){}processXYZ(e,i,r){}processFitBH(e,i,r){}processFitR(e,i,r){}},ag=class extends de{constructor(e){super(e.plugin);this.pagewiseCacheToDomsMap=new Map;this.pagewiseStatus=new Map;this.pagewiseOnClearDomCallbacksMap=new Ut;this.visualizer=e}get file(){return this.visualizer.file}getCacheToDomsMap(e){let i=this.pagewiseCacheToDomsMap.get(e);return i||(i=new vc,this.pagewiseCacheToDomsMap.set(e,i)),i}clearDomInPage(e){let i=this.getCacheToDomsMap(e);for(let r of i.values())r.closest(".pdf-plus-backlink-highlight-layer")&&r.remove();this.pagewiseOnClearDomCallbacksMap.get(e).forEach(r=>r()),this.pagewiseCacheToDomsMap.delete(e),this.updateStatus(e,{onPageReady:!1,onTextLayerReady:!1,onAnnotationLayerReady:!1})}clear(){for(let e of this.pagewiseCacheToDomsMap.keys())this.clearDomInPage(e)}getStatus(e){let i=this.pagewiseStatus.get(e);return i||(i={onPageReady:!1,onTextLayerReady:!1,onAnnotationLayerReady:!1},this.pagewiseStatus.set(e,i)),i}isPageProcessed(e){let i=this.getStatus(e);return i.onPageReady&&i.onTextLayerReady&&i.onAnnotationLayerReady}updateStatus(e,i){let r=this.getStatus(e);Object.assign(r,i)}postProcessPageIfReady(e){this.isPageProcessed(e)&&this.postProcessPage(e)}postProcessPage(e){let i=this.getCacheToDomsMap(e);for(let r of i.keys()){let o=r.getColor();for(let s of i.get(r))this.hookBacklinkOpeners(s,r),this.hookBacklinkViewEventHandlers(s,r),this.hookContextMenuHandler(s,r),this.hookClassAdderOnMouseOver(s,r),this.setHighlightColor(s,o)}}hookBacklinkOpeners(e,i){let r="position"in i.refCache?i.refCache.position:void 0,o=r==null?void 0:r.start.line,s={isTriggeredFromBacklinkVisualizer:!0};typeof o=="number"&&(s.scroll=o),this.registerDomEventForCache(i,e,"mouseover",a=>{this.app.workspace.trigger("hover-link",{event:a,source:"pdf-plus",hoverParent:this.visualizer,targetEl:e,linktext:i.sourcePath,sourcePath:this.file.path,state:s})}),this.registerDomEventForCache(i,e,"dblclick",a=>{if(this.plugin.settings.doubleClickHighlightToOpenBacklink){let c=Ph.Keymap.isModEvent(a);this.lib.workspace.openMarkdownLinkFromPDF(i.sourcePath,this.file.path,c,r?{pos:r}:void 0)}})}hookBacklinkViewEventHandlers(e,i){this.registerDomEventForCache(i,e,"mouseover",r=>{this.plugin.settings.highlightBacklinksPane&&this.lib.workspace.iterateBacklinkViews(o=>{if(this.file!==o.file||!o.containerEl.isShown()||!o.pdfManager)return;let s=o.pdfManager.findBacklinkItemEl(i);if(s){s.addClass("hovered-backlink");let a=c=>{fi(c,s)&&(s.removeClass("hovered-backlink"),e.removeEventListener("mouseout",a))};e.addEventListener("mouseout",a)}})})}hookContextMenuHandler(e,i){this.registerDomEventForCache(i,e,"contextmenu",r=>{Sx(r,this.visualizer,i)})}hookClassAdderOnMouseOver(e,i){let r=i.page;if(typeof r=="number"){let o="is-hovered";this.registerDomEventForCache(i,e,"mouseover",()=>{for(let a of this.getCacheToDomsMap(r).get(i))a.addClass(o);let s=()=>{for(let a of this.getCacheToDomsMap(r).get(i))a.removeClass(o);e.removeEventListener("mouseout",s)};e.addEventListener("mouseout",s)})}}setHighlightColor(e,i){if((i==null?void 0:i.type)==="name")e.dataset.highlightColor=i.name.toLowerCase();else if((i==null?void 0:i.type)==="rgb"){let{r,g:o,b:s}=i.rgb;e.setCssProps({"--pdf-plus-color":`rgb(${r}, ${o}, ${s})`,"--pdf-plus-backlink-icon-color":`rgb(${r}, ${o}, ${s})`,"--pdf-plus-rect-color":`rgb(${r}, ${o}, ${s})`})}}onClearDomInPage(e,i){this.pagewiseOnClearDomCallbacksMap.addValue(e,i)}registerDomEventForCache(e,i,r,o,s){this.registerDomEvent(i,r,o,s),e.page&&e.annotation&&this.onClearDomInPage(e.page,()=>{i.removeEventListener(r,o)})}},lg=class extends de{constructor(e){super(e.plugin);this.visualizer=e,this.pagewiseIdToRectsMap=new Map}get file(){return this.visualizer.file}get child(){return this.visualizer.child}onload(){this.registerEvent(this.app.vault.on("modify",e=>{e===this.file&&this.pagewiseIdToRectsMap.clear()}))}getIdToRectsMap(e){let i=this.pagewiseIdToRectsMap.get(e);return i||(i=new Map,this.pagewiseIdToRectsMap.set(e,i)),i}getRectsForSelection(e,i){var s;let r=this.getIdToRectsMap(e),o=(s=r.get(i))!=null?s:null;return o||(o=this.computeRectsForSelection(e,i),o?(r.set(i,o),o):null)}computeRectsForSelection(e,i){let r=this.child.getPage(e),{beginIndex:o,beginOffset:s,endIndex:a,endOffset:c}=Le.selectionIdToParams(i),l=r.textLayer;return!l||!l.textDivs.length?null:this.lib.highlight.geometry.computeMergedHighlightRects(l,o,s,a,c)}},ca=class extends sg{constructor(e,i,r){super(e,i);this.child=r}static create(e,i,r){return e.addChild(new ca(e,i,r))}get hoverPopover(){return this.child.hoverPopover}set hoverPopover(e){this.child.hoverPopover=e}onload(){this.shouldVisualizeBacklinks()&&(this.domManager=this.addChild(new ag(this)),this.rectangleCache=this.addChild(new lg(this)),this.visualize(),this.registerEvent(this.index.on("update",()=>{this.visualize()})))}shouldVisualizeBacklinks(){let e=this.child.pdfViewer;return this.settings.highlightBacklinks&&(On(e)||this.settings.highlightBacklinksInCanvas&&ia(e)||this.settings.highlightBacklinksInHoverPopover&&na(e)||this.settings.highlightBacklinksInEmbed&&Ec(e))}visualize(){let e=this.child.pdfViewer;this.lib.onPageReady(e,this,i=>{this.domManager.clearDomInPage(i);let r=this.index.getPageIndex(i);for(let[o,s]of r.XYZs)this.processXYZ(i,o,s);for(let[o,s]of r.FitBHs)this.processFitBH(i,o,s);for(let[o,s]of r.FitRs)this.processFitR(i,o,s);this.domManager.updateStatus(i,{onPageReady:!0}),this.domManager.postProcessPageIfReady(i)}),this.lib.onTextLayerReady(e,this,i=>{let r=this.domManager.getStatus(i);if(!r.onPageReady||r.onTextLayerReady)return;let o=this.index.getPageIndex(i);for(let[s,a]of o.selections)this.processSelection(i,s,a);this.domManager.updateStatus(i,{onTextLayerReady:!0}),this.domManager.postProcessPageIfReady(i)}),this.lib.onAnnotationLayerReady(e,this,i=>{let r=this.domManager.getStatus(i);if(!r.onPageReady||r.onAnnotationLayerReady)return;let o=this.index.getPageIndex(i);for(let[s,a]of o.annotations)this.processAnnotation(i,s,a);this.domManager.updateStatus(i,{onAnnotationLayerReady:!0}),this.domManager.postProcessPageIfReady(i)})}processSelection(e,i,r){var l;super.processSelection(e,i,r);let o=this.child.getPage(e),s=this.domManager.getCacheToDomsMap(e),a=o.textLayer;if(!a||!a.textDivs.length)return;let c=this.rectangleCache.getRectsForSelection(e,i);if(c){for(let{rect:d,indices:h}of c){let u=this.lib.highlight.viewer.placeRectInPage(d,o);u.addClasses(["pdf-plus-backlink","pdf-plus-backlink-selection"]);let f=a.textDivs[h[0]];u.setCssStyles({fontSize:f.style.fontSize}),u.dataset.backlinkId=i;for(let p of r)s.addValue(p,u)}if(this.settings.showBacklinkIconForSelection){let d=(l=c.last())==null?void 0:l.rect;if(d){let h=this.showIcon(d[2],d[3],o);for(let u of r)s.addValue(u,h)}}}}processAnnotation(e,i,r){var f;super.processAnnotation(e,i,r);let o=this.child.getPage(e),s=(f=o.annotationLayer)==null?void 0:f.annotationLayer;if(!s)return;let a=s.getAnnotation(i);if(!a)return;a.container.addClasses(["pdf-plus-backlink","pdf-plus-backlink-annotation"]);let[,,c,l]=a.data.rect,d;this.settings.showBacklinkIconForAnnotation&&(d=this.showIcon(c,l,o));let h;this.settings.showBoundingRectForBacklinkedAnnot&&(h=this.lib.highlight.viewer.placeRectInPage(a.data.rect,o),h.addClass("pdf-plus-annotation-bounding-rect"));let u=this.domManager.getCacheToDomsMap(e);for(let p of r){u.addValue(p,a.container),d&&u.addValue(p,d),h&&u.addValue(p,h);let[g,m,b]=a.data.color;p.setColor({rgb:{r:g,g:m,b}})}}processXYZ(e,i,r){if(super.processXYZ(e,i,r),this.settings.showBacklinkIconForOffset){let o=this.child.getPage(e),{left:s,top:a}=Le.XYZIdToParams(i),c=this.showIcon(s,a,o,"left"),l=this.domManager.getCacheToDomsMap(e);for(let d of r)l.addValue(d,c)}}processFitBH(e,i,r){if(super.processFitBH(e,i,r),this.settings.showBacklinkIconForOffset){let o=this.child.getPage(e),{top:s}=Le.FitBHIdToParams(i),a=this.showIcon(0,s,o),c=this.domManager.getCacheToDomsMap(e);for(let l of r)c.addValue(l,a)}}processFitR(e,i,r){super.processFitR(e,i,r);let o=this.child.getPage(e),{left:s,bottom:a,right:c,top:l}=Le.FitRIdToParams(i),d=this.lib.highlight.viewer.placeRectInPage([s,a,c,l],o);d.addClasses(["pdf-plus-backlink","pdf-plus-backlink-fit-r"]);let h=this.domManager.getCacheToDomsMap(e);for(let u of r)h.addValue(u,d);if(this.settings.showBacklinkIconForRect){let u=this.showIcon(c,l,o);for(let f of r)h.addValue(f,u)}}showIcon(e,i,r,o="right"){var u;let s=Math.min(r.viewport.rawDims.pageWidth,r.viewport.rawDims.pageWidth)*this.settings.backlinkIconSize/2e3,a=[e,i-s,e+s,i],c=[e-s,i-s,e,i],l=o==="left"&&c[0]>=((u=r.viewport.rawDims.pageX)!=null?u:0)?c:a,d=this.lib.highlight.viewer.placeRectInPage(l,r);d.addClass("pdf-plus-backlink-icon"),(0,Ph.setIcon)(d,"links-coming-in");let h=d.querySelector("svg");return h==null||h.setAttribute("stroke","var(--pdf-plus-backlink-icon-color)"),d}};var Tr=require("obsidian");var Be=require("obsidian");var _i=class extends de{constructor(e,i,r){super(e);this.child=i,this.toolbarLeftEl=r,this.spacerEl=null,this.paletteEl=null,this.itemEls=[],this.actionMenuEl=null,this.displayTextFormatMenuEl=null,this.writeFileButtonEl=null,this.cropButtonEl=null,this.statusContainerEl=null,this.statusEl=null,this.importButtonEl=null,this.selectedColorName=null,this.actionIndex=e.settings.defaultColorPaletteActionIndex,this.displayTextFormatIndex=e.settings.defaultDisplayTextFormatIndex,this.writeFile=this.lib.isEditable(this.child)&&e.settings.defaultWriteFileToggle}onload(){if(this.toolbarLeftEl.querySelectorAll("."+_i.CLS).forEach(e=>{var i;(i=_i.elInstanceMap.get(e))==null||i.unload()}),!(!this.plugin.settings.colorPaletteInEmbedToolbar&&this.toolbarLeftEl.closest(".pdf-embed"))){if(this.spacerEl=this.toolbarLeftEl.createDiv("pdf-toolbar-spacer"),this.paletteEl=this.toolbarLeftEl.createDiv(_i.CLS),_i.elInstanceMap.set(this.paletteEl,this),this.plugin.settings.colorPaletteInToolbar){this.addItem(this.paletteEl,null,"transparent");for(let[e,i]of Object.entries(this.plugin.settings.colors))this.addItem(this.paletteEl,e,i);this.setActiveItem([null,...Object.keys(this.plugin.settings.colors)][this.plugin.settings.defaultColorPaletteItemIndex])}this.actionMenuEl=this.addCopyActionDropdown(this.paletteEl),this.displayTextFormatMenuEl=this.addDisplayTextFormatDropdown(this.paletteEl),this.addCropButton(this.paletteEl),this.child.isFileExternal?this.addImportButton(this.paletteEl):this.addWriteFileToggle(this.paletteEl),this.statusContainerEl=this.paletteEl.createDiv("pdf-plus-color-palette-status-container"),this.statusEl=this.statusContainerEl.createSpan("pdf-plus-color-palette-status"),this.registerEvent(this.plugin.on("color-palette-state-change",({source:e})=>{e!==this&&this.syncTo(e)}))}}onunload(){var e;(e=this.spacerEl)==null||e.remove(),this.paletteEl&&(this.paletteEl.remove(),_i.elInstanceMap.delete(this.paletteEl))}addItem(e,i,r){if(i&&!Ki(r)||i===null&&!this.plugin.settings.noColorButtonInColorPalette)return;let o=e.createDiv({cls:[_i.CLS+"-item","clickable-icon"],attr:i?{"data-highlight-color":i.toLowerCase()}:void 0});this.itemEls.push(o),o.createDiv(_i.CLS+"-item-inner"),this.setTooltipToActionItem(o,i),o.addEventListener("pointerup",a=>this.onItemPointerUp(o,i,a));let s=!1;o.addEventListener("contextmenu",()=>{if(s)return;let a=new Be.Menu().addItem(c=>{c.setIcon("lucide-settings").setTitle("Customize...").onClick(()=>{this.plugin.openSettingTab().scrollTo("colors")})});a.onHide(()=>{s=!1}),An(a,o),s=!0})}onItemPointerUp(e,i,r){let o=!e.hasClass("is-active");this.setActiveItem(i),this.plugin.settings.syncColorPaletteItem&&this.plugin.settings.syncDefaultColorPaletteItem&&(this.plugin.settings.defaultColorPaletteItemIndex=i?Object.keys(this.plugin.settings.colors).indexOf(i)+1:0),o&&this.plugin.trigger("color-palette-state-change",{source:this});let s=this.plugin.settings.copyCommands[this.actionIndex].template;this.writeFile?this.lib.copyLink.writeHighlightAnnotationToSelectionIntoFileAndCopyLink(!1,{copyFormat:s},i!=null?i:void 0):this.lib.copyLink.copyLinkToSelection(!1,{copyFormat:s},i!=null?i:void 0),r.preventDefault()}setActiveItem(e){this.selectedColorName=e?e.toLowerCase():null,this.itemEls.forEach(i=>{i.toggleClass("is-active",this.selectedColorName===i.dataset.highlightColor||this.selectedColorName===null&&i.dataset.highlightColor===void 0)})}addDropdown(e,i,r,o,s,a){return e.createDiv("clickable-icon",c=>{(0,Be.setIcon)(c,"lucide-chevron-down"),(0,Be.setTooltip)(c,o),c.dataset.checkedIndex=""+this[r];let l=!1;c.addEventListener("click",()=>{if(l)return;let d=new Be.Menu;for(let h=0;h<i.length;h++){let u=i[h];d.addItem(f=>{f.setTitle(u).setChecked(this[r]===h).onClick(()=>{let p=this[r]!==h;this.setCheckedIndex(r,h,c),s==null||s(),p&&this.plugin.trigger("color-palette-state-change",{source:this})})})}a==null||a(d),d.onHide(()=>{l=!1}),An(d,c),l=!0})})}setCheckedIndex(e,i,r){this[e]=i,r.dataset.checkedIndex=""+i}setActionIndex(e){this.actionMenuEl&&this.setCheckedIndex("actionIndex",e,this.actionMenuEl),this.updateTooltips()}setDisplayTextFormatIndex(e){this.displayTextFormatMenuEl&&this.setCheckedIndex("displayTextFormatIndex",e,this.displayTextFormatMenuEl)}addCopyActionDropdown(e){let i="Link copy format";this.plugin.settings.colorPaletteInToolbar||(i=`${this.plugin.manifest.name}: link copy options (trigger via hotkeys)`);let r=this.addDropdown(e,this.plugin.settings.copyCommands.map(o=>o.name),"actionIndex",i,()=>{this.updateTooltips(),this.plugin.settings.syncColorPaletteAction&&this.plugin.settings.syncDefaultColorPaletteAction&&(this.plugin.settings.defaultColorPaletteActionIndex=this.actionIndex)},o=>{o.addItem(s=>{s.setTitle("Customize...").setIcon("lucide-settings").onClick(()=>{this.plugin.openSettingTab().scrollTo("copyCommands")})})});return r.addClass("pdf-plus-action-menu"),r}addDisplayTextFormatDropdown(e){let i=this.addDropdown(e,this.plugin.settings.displayTextFormats.map(r=>r.name),"displayTextFormatIndex","Display text format",()=>{this.plugin.settings.syncDisplayTextFormat&&this.plugin.settings.syncDefaultDisplayTextFormat&&(this.plugin.settings.defaultDisplayTextFormatIndex=this.displayTextFormatIndex)},r=>{r.addItem(o=>{o.setTitle("Customize...").setIcon("lucide-settings").onClick(()=>{this.plugin.openSettingTab().scrollTo("displayTextFormats")})})});return i.addClass("pdf-plus-display-text-format-menu"),i}addWriteFileToggle(e){this.removeWriteFileToggle(),this.writeFileButtonEl=e.createDiv("clickable-icon",i=>{(0,Be.setIcon)(i,"lucide-edit"),(0,Be.setTooltip)(i,`Add ${this.plugin.settings.selectionBacklinkVisualizeStyle}s to file directly`),i.toggleClass("is-disabled",!this.lib.isEditable(this.child));let r=!1;i.addEventListener("click",()=>{if(!this.lib.isEditable(this.child)){if(r)return;let o=new Be.Menu().addItem(s=>{s.setIcon("lucide-settings").setTitle("Enable PDF editing...").onClick(()=>{this.plugin.openSettingTab().scrollToHeading("edit")})});o.onHide(()=>{r=!1}),An(o,i),r=!0;return}this.setWriteFile(!this.writeFile),this.plugin.settings.syncWriteFileToggle&&this.plugin.settings.syncDefaultWriteFileToggle&&(this.plugin.settings.defaultWriteFileToggle=this.writeFile),this.plugin.trigger("color-palette-state-change",{source:this})}),i.addEventListener("contextmenu",()=>{if(r)return;let o=new Be.Menu;this.lib.isEditable(this.child)&&o.addItem(s=>{s.setIcon("lucide-settings").setTitle("Customize...").onClick(()=>{this.plugin.openSettingTab().scrollToHeading("annot")})}),o.addItem(s=>{s.setIcon("lucide-settings").setTitle(this.lib.isEditable(this.child)?"Disable PDF editing...":"Enable PDF editing...").onClick(()=>{this.plugin.openSettingTab().scrollToHeading("edit")})}),o.onHide(()=>{r=!1}),An(o,i),r=!0})}),this.cropButtonEl&&e.insertAfter(this.writeFileButtonEl,this.cropButtonEl),this.setWriteFile(this.writeFile)}removeWriteFileToggle(){var e;(e=this.writeFileButtonEl)==null||e.remove(),this.writeFileButtonEl=null}addImportButton(e){this.removeImportButton(),this.importButtonEl=e.createDiv("clickable-icon",i=>{(0,Be.setIcon)(i,"lucide-import"),(0,Be.setTooltip)(i,"Import external PDF into vault"),i.addEventListener("click",()=>{this.importFile()})}),this.cropButtonEl&&e.insertAfter(this.importButtonEl,this.cropButtonEl)}removeImportButton(){var e;(e=this.importButtonEl)==null||e.remove(),this.importButtonEl=null}async importFile(){let e=this.child.externalFileUrl,i=this.child.file;if(!e||!i)return;if(!Be.Platform.isDesktopApp&&e.startsWith(Be.Platform.resourcePathPrefix)){new Be.Notice(`${this.plugin.manifest.name}: Importing local PDFs outside the vault is supported only on the desktop app.`);return}let r=await fetch(e);if(r.ok){let o=await r.arrayBuffer();await this.app.vault.modifyBinary(i,o),this.removeImportButton(),this.paletteEl&&this.addWriteFileToggle(this.paletteEl),new Be.Notice(`${this.plugin.manifest.name}: Successfully imported the PDF file into the vault.`);return}new Be.Notice(`${this.plugin.manifest.name}: Import failed. Response status: ${r.status}`)}setWriteFile(e){var i;this.writeFile=e,(i=this.writeFileButtonEl)==null||i.toggleClass("is-active",e)}addCropButton(e){this.cropButtonEl=e.createDiv("clickable-icon pdf-plus-rect-select",i=>{(0,Be.setIcon)(i,"lucide-box-select"),(0,Be.setTooltip)(i,"Copy embed link to rectangular selection"),i.addEventListener("click",()=>{this.startRectangularSelection(!1)});let r=!1;i.addEventListener("contextmenu",()=>{if(r)return;let o=new Be.Menu().addItem(s=>{s.setIcon("lucide-settings").setTitle("Customize...").onClick(()=>{this.plugin.openSettingTab().scrollToHeading("rect")})});o.onHide(()=>{r=!1}),An(o,i),r=!0})})}startRectangularSelection(e){var l;let i=this.cropButtonEl;if(!i)return;let r=this.lib.getPDFViewerChildAssociatedWithNode(this.paletteEl);if(!r||!((l=r.pdfViewer.dom)!=null&&l.viewerEl))return;let o=r.pdfViewer.dom.viewerEl,s={left:0,top:0,width:0,height:0},a=d=>{if(!vt(d,d.target))return;let h=d.target.closest(".pdf-viewer div.page[data-page-number]");if(!h)return;let u=h.dataset.pageNumber;if(!u)return;let f=r.getPage(+u),{x:p,y:g}=eh(d);s.left=p,s.top=g;let m=h.createDiv("pdf-plus-select-box"),b=h.getBoundingClientRect(),w=getComputedStyle(h),F=parseFloat(w.borderTopWidth),v=parseFloat(w.borderLeftWidth),P=parseFloat(w.paddingTop),k=parseFloat(w.paddingLeft);m.setCssStyles({left:s.left-(b.left+v+k)+"px",top:s.top-(b.top+F+P)+"px"});let C=T=>{let{x:O,y:E}=eh(T),V=h.getBoundingClientRect();s.width=O-s.left-(V.left-b.left),s.height=E-s.top-(V.top-b.top),m.setCssStyles({width:s.width+"px",height:s.height+"px"}),T.preventDefault(),T.stopImmediatePropagation()},D=()=>{var B;if(h.removeEventListener("mousemove",C),h.removeEventListener("touchmove",C),h.removeEventListener("mouseup",D),h.removeEventListener("touchend",D),h.removeChild(m),s.height<=0||s.width<=0)return;let T=s.left-(b.left+v+k),O=s.top-(b.top+F+P),E=T+s.width,V=O+s.height,W=window.pdfjsLib.Util.normalizeRect([...f.getPagePoint(T,V),...f.getPagePoint(E,O)]);this.lib.copyLink.copyEmbedLinkToRect(!1,r,f.id,W,this.plugin.settings.includeColorWhenCopyingRectLink&&(B=this.selectedColorName)!=null?B:void 0,e),c()};this.registerDomEvent(h,"mousemove",C),this.registerDomEvent(h,"touchmove",C),this.registerDomEvent(h,"mouseup",D),this.registerDomEvent(h,"touchend",D)},c=()=>{var d;i.toggleClass("is-active",!i.hasClass("is-active")),o.toggleClass("pdf-plus-selecting",i.hasClass("is-active")),this.register(()=>o.removeClass("pdf-plus-selecting")),(d=activeWindow.getSelection())==null||d.empty(),i.hasClass("is-active")?(this.registerDomEvent(o,"mousedown",a),this.registerDomEvent(o,"touchstart",a)):(o.removeEventListener("mousedown",a),o.removeEventListener("touchstart",a))};c()}setStatus(e,i){this.plugin.settings.showStatusInToolbar&&this.statusEl&&(this.statusEl.setText(e),i>0&&setTimeout(()=>{var r;((r=this.statusEl)==null?void 0:r.getText())===e&&this.statusEl.setText("")},i))}setTooltipToActionItem(e,i){let r=e.querySelector(":scope > ."+_i.CLS+"-item-inner"),o=this.plugin.settings.copyCommands[this.actionIndex].name,s=this.plugin.settings.quietColorPaletteTooltip,a=i!==null?s?i:`Copy link with format "${o}" & add ${i.toLowerCase()} ${this.plugin.settings.selectionBacklinkVisualizeStyle}`:s?"No color specified":`Copy link with "${o}" format without specifying color`;(0,Be.setTooltip)(r,a)}updateTooltips(){this.itemEls.forEach(e=>{var i;this.setTooltipToActionItem(e,(i=e.dataset.highlightColor)!=null?i:null)})}getState(){return{selectedColorName:this.selectedColorName,actionIndex:this.actionIndex,displayTextFormatIndex:this.displayTextFormatIndex,writeFile:this.writeFile}}setState(e){typeof e.selectedColorName=="string"&&this.setActiveItem(e.selectedColorName),typeof e.actionIndex=="number"&&this.setActionIndex(e.actionIndex),typeof e.displayTextFormatIndex=="number"&&this.setDisplayTextFormatIndex(e.displayTextFormatIndex),typeof e.writeFile=="boolean"&&this.setWriteFile(e.writeFile)}getColorName(){return this.getState().selectedColorName}getCopyFormat(){let e=this.getState();return this.plugin.settings.copyCommands[e.actionIndex].template}getDisplayTextFormat(){let e=this.getState();return this.plugin.settings.displayTextFormats[e.displayTextFormatIndex].template}syncTo(e){let i=e.getState();this.plugin.settings.syncColorPaletteItem||delete i.selectedColorName,this.plugin.settings.syncColorPaletteAction||delete i.actionIndex,this.plugin.settings.syncDisplayTextFormat||delete i.displayTextFormatIndex,this.plugin.settings.syncWriteFileToggle||delete i.writeFile,this.setState(i)}},Pt=_i;Pt.CLS="pdf-plus-color-palette",Pt.elInstanceMap=new Map;var da=class extends de{constructor(e,i,r){super(e);this.toolbar=i,this.child=r}onload(){this.addColorPalette(),this.replaceDisplayOptionsDropdown(),this.addZoomLevelInputEl(),this.makeDropdownInToolbarHoverable()}onunload(){}addColorPalette(){this.child.palette=this.addChild(new Pt(this.plugin,this.child,this.toolbar.toolbarLeftEl))}makeDropdownInToolbarHoverable(){let{toolbar:e,plugin:i}=this;!i.settings.hoverableDropdownMenuInToolbar||Tr.Platform.isPhone||e.toolbarLeftEl.querySelectorAll("div.clickable-icon").forEach(r=>{let o=r.firstElementChild;if(o&&o.matches("svg.lucide-chevron-down")){let s=null;Pc({parentEl:r,createChildEl:()=>{if(!r.hasClass("has-active-menu")){r.click();for(let a of i.shownMenus)if(a.parentEl===r)return s=a,a.dom}return s=null},removeChildEl:()=>{s&&(s.hide(),s=null)},component:this.child.component,timeout:200})}})}replaceDisplayOptionsDropdown(){let{app:e,toolbar:i,child:r}=this,o=i.zoomInEl.nextElementSibling;if(!(o!=null&&o.hasClass("clickable-icon")))return;let s=o.firstElementChild;if(!(s!=null&&s.matches("svg.lucide-chevron-down")))return;let a=i.pdfViewer.eventBus,c=i.pdfViewer.pdfViewer;!a||!c||i.zoomInEl.after(createDiv("clickable-icon",l=>{(0,Tr.setIcon)(l,"lucide-chevron-down"),(0,Tr.setTooltip)(l,"Display options");let d=!1;l.addEventListener("click",()=>{if(!d){let h=c.currentScaleValue,u=c.scrollMode,f=c.spreadMode,p=!!e.loadLocalStorage("pdfjs-is-themed"),g=new Tr.Menu().addSections(["zoom","scroll","spread","appearance","settings"]).addItem(m=>{m.setSection("zoom").setIcon("lucide-move-horizontal").setTitle("Fit width").setChecked(h==="page-width").onClick(()=>a.dispatch("scalechanged",{source:i,value:"page-width"}))}).addItem(m=>{m.setSection("zoom").setIcon("lucide-move-vertical").setTitle("Fit height").setChecked(h==="page-height").onClick(()=>a.dispatch("scalechanged",{source:i,value:"page-height"}))}).addItem(m=>{m.setSection("zoom").setIcon("lucide-move").setTitle("Fit page").setChecked(h==="page-fit").onClick(()=>a.dispatch("scalechanged",{source:i,value:"page-fit"}))}).addItem(m=>{m.setSection("scroll").setIcon("lucide-chevrons-up-down").setTitle("Vertical scroll").setChecked(u===0).onClick(()=>{a.dispatch("switchscrollmode",{source:i,mode:0})})}).addItem(m=>{m.setSection("scroll").setIcon("lucide-chevrons-left-right").setTitle("Hotizontal scroll").setChecked(u===1).onClick(()=>{a.dispatch("switchscrollmode",{source:i,mode:1})})}).addItem(m=>{m.setSection("scroll").setIcon("lucide-wrap-text").setTitle("Wrapped scroll").setChecked(u===2).onClick(()=>{a.dispatch("switchscrollmode",{source:i,mode:2})})}).addItem(m=>{m.setSection("spread").setIcon("lucide-rectangle-vertical").setTitle("Single page").setChecked(f===0).onClick(()=>{a.dispatch("switchspreadmode",{source:i,mode:0})})}).addItem(m=>{m.setSection("spread").setIcon("rectangle-vertical-double").setTitle("Two pages (odd)").setChecked(f===1).onClick(()=>{a.dispatch("switchspreadmode",{source:i,mode:1})})}).addItem(m=>{m.setSection("spread").setIcon("rectangle-vertical-double").setTitle("Two pages (even)").setChecked(f===2).onClick(()=>{a.dispatch("switchspreadmode",{source:i,mode:2})})}).addItem(m=>{m.setSection("appearance").setIcon("lucide-palette").setTitle("Adapt to theme").setChecked(p).onClick(()=>{e.saveLocalStorage("pdfjs-is-themed",p?null:"true"),r.onCSSChange()})}).addItem(m=>{m.setSection("settings").setIcon("lucide-settings").setTitle("Customize defaults...").onClick(()=>{this.plugin.openSettingTab().scrollToHeading("viewer-option")})});g.onHide(()=>{d=!1}),An(g,l),d=!0}}),i.toolbarEl.doc.win.setTimeout(()=>{o.remove(),i.toolbarLeftEl.insertAfter(l,i.zoomInEl)})}))}addZoomLevelInputEl(){if(!this.settings.zoomLevelInputBoxInToolbar)return;let{toolbar:e}=this,i=e.pdfViewer.eventBus,r=e.pdfViewer.pdfViewer;if(!i||!r)return;let o=e.zoomOutEl.nextElementSibling;o!=null&&o.hasClass("pdf-toolbar-divider")&&(o.remove(),this.register(()=>e.zoomOutEl.after(createDiv("pdf-toolbar-divider"))),e.zoomOutEl.after(createEl("input","pdf-zoom-level-input",s=>{this.register(()=>s.remove()),s.type="number",s.addEventListener("click",()=>s.select()),s.addEventListener("change",()=>{let a=s.valueAsNumber/100,c=Math.min(Math.max(a,window.pdfjsViewer.MIN_SCALE),window.pdfjsViewer.MAX_SCALE);r.currentScale=c}),i.on("scalechanging",({scale:a})=>{s.value=Math.round(a*100)+""}),r.currentScale&&(s.value=Math.round(r.currentScale*100)+""),s.doc.win.setTimeout(()=>{s.after(createSpan({cls:"pdf-zoom-level-percent",text:"%"},a=>{this.register(()=>a.remove())}))})})))}};da.elInstanceMap=new Map;var cg=Un(require("obsidian"));var Ho=class extends de{constructor(e,i){super(e);this.child=i}get file(){return this.child.file}get pdf(){return this.file}get folder(){var e,i;return(i=(e=this.file)==null?void 0:e.parent)!=null?i:null}get pdfViewer(){return this.child.pdfViewer}get dom(){return this.child.pdfViewer.dom}get doc(){return this.child.containerEl.doc}get obsidian(){return cg}get text(){var i;let e=(i=this.doc.getSelection())==null?void 0:i.toString();return e?this.lib.toSingleLine(e):""}get selection(){return this.text}get page(){var i,r,o,s;let e=this.doc.getSelection();return(s=(o=e&&((i=this.lib.copyLink.getPageAndTextRangeFromSelection(e))==null?void 0:i.page))!=null?o:(r=this.pdfViewer.pdfViewer)==null?void 0:r.currentPageNumber)!=null?s:null}get pageLabel(){let e=this.page;return e!==null?this.child.getPage(e).pageLabel:null}get pageCount(){var e,i;return(i=(e=this.pdfViewer.pdfViewer)==null?void 0:e.pagesCount)!=null?i:null}get color(){var e,i,r;return(r=(i=(e=this.child.palette)==null?void 0:e.getColorName())==null?void 0:i.toLowerCase())!=null?r:null}evaluateTemplate(e,i,r){if(!this.file||typeof this.page!="number")return"";let o=this.lib.copyLink.getPageAndTextRangeFromSelection(this.doc.getSelection());if(!o)return"";let{page:s,selection:a}=o;if(!a)return"";let c=Cc({page:s,selection:`${a.beginIndex},${a.beginOffset},${a.endIndex},${a.endOffset}`,color:r?r.toLowerCase():void 0});return this.lib.copyLink.getTextToCopy(this.child,e,i,this.file,this.page,c,this.text,r?r.toLowerCase():"")}writeFile(e,i,r){var o;return this.lib.write(cg.normalizePath(e),i,(o=r==null?void 0:r.existOk)!=null?o:!1)}async run(e){return Bp("const app=this.app;const api = this;"+e,this)}};var Ax=require("obsidian");var kP=n=>vt(n,n.target)&&xp(n.target),Er=class extends Ax.Scope{constructor(e){super(e);this.modeToKeymaps={};this.currentMode=null;this.currentKeys="";this.searchFrom=0;this.searchTo=-1;this.onEscapeCallbacks=[];this.escapeAliases=[];this.typableModes=[]}registerKeymaps(e,i){let r=(o,s)=>Mo(o.keys,s.keys);for(let o of e){if(!this.modeToKeymaps.hasOwnProperty(o)){this.modeToKeymaps[o]=Object.entries(i).map(([s,a])=>({keys:s,func:a})).sort(r);continue}for(let s in i){let a=i[s],c={keys:s,func:a},l=this.modeToKeymaps[o],{found:d,index:h}=Gi(l,u=>r(c,u));d?l[h]=c:l.splice(h,0,c)}}}unregisterAllKeymaps(e){for(let i of e)this.modeToKeymaps[i]&&(this.modeToKeymaps[i].length=0)}map(e,i){for(let r of e){let o=Object.fromEntries(Object.entries(i).map(([s,a])=>[s,c=>{let{found:l,index:d}=Gi(this.modeToKeymaps[r],h=>Mo(a,h.keys));if(l){let h=this.modeToKeymaps[r][d].func;return h(c)}}]));this.registerKeymaps([r],o)}}noremap(e,i){for(let r of e)if(this.modeToKeymaps.hasOwnProperty(r))for(let o in i){let s=i[o],{found:a,index:c}=Gi(this.modeToKeymaps[r],l=>Mo(s,l.keys));if(a){let l=this.modeToKeymaps[r][c];this.registerKeymaps([r],{[o]:l.func})}}}unmap(e,i){for(let r of e)if(this.modeToKeymaps.hasOwnProperty(r))for(let o of i){let{found:s,index:a}=Gi(this.modeToKeymaps[r],c=>Mo(o,c.keys));s&&this.modeToKeymaps[r].splice(a,1)}}setMode(e){this.currentMode=e,this.reset()}clearKeys(){this.currentKeys=""}reset(){this.clearKeys(),this.searchFrom=0,this.searchTo=-1}onEscape(e){this.onEscapeCallbacks.push(e)}addEscapeAliases(...e){this.escapeAliases.push(...e)}setTypable(...e){this.typableModes.push(...e)}handleKey(e,i){let r=!0;(()=>{if(this.currentMode===null)return this.reset();if(this.typableModes.includes(this.currentMode)!==kP(e))return;let o=Er.canonicalizeKey(i);if(o===null)return this.reset();if(o==="<Esc>"||this.escapeAliases.includes(o))return this.onEscapeCallbacks.forEach(h=>h(o==="<Esc>")),this.reset();this.currentKeys+=o;let s=this.currentKeys.match(/^([1-9]\d*)?([\D0][\d\D]*)?/);if(!s)return this.reset();let a=s[1]?+s[1]:void 0,c=s[2];if(!c)return;let l=this.modeToKeymaps[this.currentMode];if(!l||l.length===0)return this.reset();let d=Np(l,c,h=>h.keys,{from:(l.length+this.searchFrom)%l.length,to:(l.length+this.searchTo)%l.length});if(!d)return this.reset();if(d.from===d.to){let h=l[d.from];if(h.keys===c){this.reset(),h.func(a),e.preventDefault(),r=!1;return}}this.searchFrom=d.from,this.searchTo=d.to})(),r&&this.parent&&this.parent.handleKey(e,i)}static canonicalizeKey(e){var r;if(e.modifiers===null||e.key===null)return null;let i=Er.canonicalizeSpecialKey(e.key);switch(e.modifiers){case"":return i?`<${i}>`:e.key;case"Shift":return e.key.length===1&&e.key!==" "?e.key:`<S-${i!=null?i:e.key}>`;case"Ctrl":return`<C-${i!=null?i:e.key}>`;case"Alt":return`<M-${(r=Er.canonicalizeSpecialKey(e.vkey))!=null?r:e.vkey.toLowerCase()}>`;case"Meta":return`<M-${i!=null?i:e.key}>`;default:return null}}static canonicalizeSpecialKey(e){switch(e){case"<":return"lt";case"Backspace":return"BS";case"Tab":return"Tab";case"Enter":return"CR";case"Escape":return"Esc";case" ":return"Space";case"\\":return"Bslash";case"|":return"Bar";case"ArrowUp":return"Up";case"ArrowDown":return"Down";case"ArrowLeft":return"Left";case"ArrowRight":return"Right";default:return null}}};var kh=class{constructor(t){this.lastScroll=0;this.lastScrollInterval=0;this.vim=t}get settings(){return this.vim.settings}get viewerContainerEl(){var t,e;return(e=(t=this.vim.obsidianViewer)==null?void 0:t.dom)==null?void 0:e.viewerContainerEl}getPageDiv(t=0){var i;let e=this.vim.pdfViewer;if(e)return(i=e._pages[e.currentPageNumber-1+t])==null?void 0:i.div}scrollTo(t,e){let i=this.viewerContainerEl;if(!i)return;let r=this.isFirstScrollInAWhile(),o=r?this.settings.vimScrollSize:this.settings.vimContinuousScrollSpeed*this.lastScrollInterval;this.vim.pdfViewer&&this.settings.vimLargerScrollSizeWhenZoomIn&&(o*=Math.max(1,this.vim.pdfViewer.currentScale)),e!=null||(e=1),o*=e;let a={behavior:this.settings.vimSmoothScroll&&r?"smooth":"instant"};switch(t){case"left":a.left=-o;break;case"right":a.left=o;break;case"up":a.top=-o;break;case"down":a.top=o;break}i.scrollBy(a)}isFirstScrollInAWhile(){let t=Date.now();return this.lastScrollInterval=t-this.lastScroll,this.lastScroll=t,this.lastScrollInterval>100}scrollToTop(){if(!this.viewerContainerEl)return;let t=this.getPageDiv();t&&this.viewerContainerEl.scrollTo({top:t.offsetTop,behavior:this.settings.vimSmoothScroll?"smooth":"instant"})}scrollToBottom(){if(!this.viewerContainerEl)return;let t=this.getPageDiv();t&&this.viewerContainerEl.scrollTo({top:t.offsetTop+t.offsetHeight-this.viewerContainerEl.clientHeight,behavior:this.settings.vimSmoothScroll?"smooth":"instant"})}scrollVerticallyByVisualPage(t){if(!this.viewerContainerEl)return;let e=this.viewerContainerEl.clientHeight;e*=t,this.viewerContainerEl.scrollBy({top:e,behavior:this.settings.vimSmoothScroll?"smooth":"instant"})}scrollHorizontallyByVisualPage(t){if(!this.viewerContainerEl)return;let e=this.viewerContainerEl.clientWidth;e*=t,this.viewerContainerEl.scrollBy({left:e,behavior:this.settings.vimSmoothScroll?"smooth":"instant"})}};var Lx=require("obsidian");var Ix=200,Dh=class{constructor(t){this.isActive=!1;this.isForward=!0;this.vim=t}get settings(){return this.vim.settings}get lib(){return this.vim.lib}get incsearch(){return this.settings.vimIncsearch}get hlsearch(){return this.settings.vimHlsearch}get findBar(){var t;return(t=this.vim.obsidianViewer)==null?void 0:t.findBar}findNext(t=1,e=!0){if(this.isActive&&this.findBar){for(this.vim.visualMode.rememberSelection();t-- >0;)this.findBar.dispatchEvent("again",e?!this.isForward:this.isForward);this.restoreSelectionAndExtendToMatch()}}findPrevious(t){this.findNext(t,!1)}restoreSelectionAndExtendToMatch(){setTimeout(()=>{let t=this.vim.doc.getSelection();if((!t||t.isCollapsed)&&this.vim.visualMode.restorePreviousSelection(),t=this.vim.doc.getSelection(),t&&!t.isCollapsed){let e=this.getSelectedMatchEl();e&&this.vim.visualMode.extendSelectionToNode(e)}},Ix)}start(t){let e=this.findBar;if(!e)return;if(this.vim.visualMode.rememberSelection(),e.opened){e.searchComponent.inputEl.select();return}this.isActive=!0,this.isForward=t,e.searchSettings.highlightAll=this.hlsearch,this.lib.updateSearchSettingsUI(e);let i=e.searchComponent.changeCallback;this.incsearch?e.searchComponent.onChange((0,Lx.debounce)(()=>{e.dispatchEvent("again")},250,!0)):e.searchComponent.onChange(()=>{}),e.showSearch();let r=o=>{this.isActive&&(o.isComposing||o.key==="Enter"&&(vt(o,o.target)&&o.target.blur(),o.stopPropagation(),this.incsearch?this.restoreSelectionAndExtendToMatch():this.findNext()))};e.searchComponent.inputEl.addEventListener("keypress",r,!0),this.lib.registerPDFEvent("findbarclose",e.eventBus,null,()=>{this.isActive=!1,e.searchComponent.inputEl.removeEventListener("keypress",r,!0),i&&e.searchComponent.onChange(i)})}findAndSelectNextMatch(t,e){this.findNext(t,e),setTimeout(()=>{let i=this.vim.doc.getSelection();if(!i)return;let r=this.getSelectedMatchEl();r&&(i.isCollapsed?i.selectAllChildren(r):this.vim.visualMode.extendSelectionToNode(r,1))},Ix+1)}getSelectedMatchEl(){var i,r;let t=(r=(i=this.vim.obsidianViewer)==null?void 0:i.dom)==null?void 0:r.viewerEl;return t?t.querySelector(".textLayer .textLayerNode > .highlight.selected"):null}};var $i=class extends de{constructor(e){super(e.plugin);this.vim=e}get vimScope(){return this.vim.vimScope}get doc(){return this.vim.doc}get viewer(){return this.vim.viewer}get obsidianViewer(){return this.vim.obsidianViewer}get pdfViewer(){return this.vim.pdfViewer}};var Sh=class extends $i{constructor(e){super(e);this.selectionChangedByVisualMotion=!1;this.previousSelection=null;this.defineKeymaps()}get structureParser(){return this.vim.structureParser}onload(){this.registerDomEvent(this.doc,"selectionchange",()=>{let e=this.doc.getSelection();switch(this.vim.vimScope.currentMode){case"visual":(!e||e.isCollapsed)&&(this.selectionChangedByVisualMotion||this.vim.vimScope.setMode("normal"));break;default:if(e&&!e.isCollapsed&&e.rangeCount>0){let i=e.getRangeAt(0);this.vim.viewer.containerEl.contains(i.commonAncestorContainer)&&this.vim.vimScope.setMode("visual")}}this.selectionChangedByVisualMotion=!1})}defineKeymaps(){let e=i=>r=>(i(r),this.selectionChangedByVisualMotion=!0);this.vimScope.registerKeymaps(["visual"],{...this.settings.vimVisualMotion?{j:e(i=>this.extendSelectionByLine(i!=null?i:1)),k:e(i=>this.extendSelectionByLine(-(i!=null?i:1))),h:e(i=>this.extendSelectionByChar(i!=null?i:1,!1)),l:e(i=>this.extendSelectionByChar(i!=null?i:1,!0)),w:e(i=>{let r=this.doc.getSelection();r&&(No(()=>{r.modify("extend","forward","word"),r.modify("extend","forward","word"),r.modify("extend","backward","word"),Xi(r)&&r.modify("extend","forward","character")},i),this.ensureSelectionHeadAtTextDiv(r,!1))}),e:e(i=>{let r=this.doc.getSelection();r&&(No(()=>{Xi(r)||r.modify("extend","forward","character"),r.modify("extend","forward","word"),Xi(r)||r.modify("extend","backward","character")},i),this.ensureSelectionHeadAtTextDiv(r,!1))}),b:e(i=>{let r=this.doc.getSelection();r&&(No(()=>{Xi(r)&&r.modify("extend","backward","character"),r.modify("extend","backward","word"),Xi(r)&&r.modify("extend","forward","character")},i),this.ensureSelectionHeadAtTextDiv(r,!0))}),0:e(()=>this.extendSelctionToLineBoundary(!1)),"^":e(()=>this.extendSelctionToLineBoundary(!1)),$:e(()=>this.extendSelctionToLineBoundary(!0))}:{},o:e(()=>{let i=this.doc.getSelection();i&&Dc(i)}),y:()=>{let i=this.doc.getSelection();if(i){let r=i.toString();r&&navigator.clipboard.writeText(r),i.empty()}},c:()=>{var i;this.lib.commands.copyLink(!1),(i=this.doc.getSelection())==null||i.empty()},C:()=>{let i=this.doc.getSelection();i&&setTimeout(()=>{this.viewer.then(r=>{Fh(this.plugin,r,i)})})}})}getTextDivContainingNode(e){let i=e.instanceOf(Element)?e:e.parentElement;if(!i)return null;let r=i.closest(".textLayerNode");return r||null}getTextDivAtSelectionHead(e){let{focusNode:i}=e;return i?this.getTextDivContainingNode(i):null}getSelectionPos(e,i){let r=i==="head",o=r?e.focusNode:e.anchorNode;if(!o)return null;let s=this.getTextDivContainingNode(o);if(!s||s.dataset.idx===void 0)return null;let a=+s.dataset.idx,c=(()=>{let d=r?e.focusOffset:e.anchorOffset,h=this.doc.createNodeIterator(s,NodeFilter.SHOW_ALL),u,f=0;for(;u=h.nextNode();){if(u===o)return f+=u.nodeType===Node.TEXT_NODE?d:Array.from(o.childNodes).slice(0,d).map(p=>p.textContent.length).reduce((p,g)=>p+g,0),f;u.nodeType===Node.TEXT_NODE&&(f+=u.textContent.length)}return f})();if(typeof c!="number")return null;Xi(e)===r&&c--;let l=d=>d.instanceOf(HTMLElement)&&d.hasClass("textLayerNode")&&!!d.textContent;if(c<0){let d=s.previousSibling;for(;d&&!l(d);)d=d.previousSibling;d&&l(d)&&d.dataset.idx!==void 0&&(a=+d.dataset.idx,c=d.textContent.length-1)}else if(s.textContent&&c>=s.textContent.length){let d=s.nextSibling;for(;d&&!l(d);)d=d.nextSibling;d&&l(d)&&d.dataset.idx!==void 0&&(a=+d.dataset.idx,c=0)}return{index:a,offset:c}}extendSelection(e){var l,d,h;let i=this.doc.getSelection();if(!i)return;let r=this.lib.getPageElFromSelection(i);if(!r||r.dataset.pageNumber===void 0)return;let o=+r.dataset.pageNumber,s=(l=this.structureParser)==null?void 0:l.getPageParser(o);if(!s)return;let a=this.getSelectionPos(i,"head");if(!a)return;let c=e({currentHeadPos:a,pageNumber:o,pageParser:s});if(c){let u=s.divs[c.index],f=c.offset;f<0&&(f+=(h=(d=u.textContent)==null?void 0:d.length)!=null?h:0);let p=ea(u,f);if(!p)return;this.extendSelectionToNode(p.node,p.offset)}}extendSelectionToNode(e,i){let r=this.doc.getSelection();r&&(r.extend(e,i),Xi(r)&&r.modify("extend","forward","character"))}extendSelectionByLine(e){this.extendSelection(({currentHeadPos:i,pageParser:r})=>r.getLineShiftPosition(i,e))}extendSelctionToLineBoundary(e){this.extendSelection(({currentHeadPos:i,pageParser:r})=>{let o=r.getBoundIndicesOfLine(i.index,0);return o?e?{index:o.end,offset:-1}:{index:o.start,offset:0}:null})}extendSelectionByChar(e,i){let r=this.doc.getSelection();r&&(No(()=>r.modify("extend",i?"forward":"backward","character"),e),this.ensureSelectionHeadAtTextDiv(r,i))}selectMatch(){var i;let e=this.vim.search.getSelectedMatchEl();e&&((i=this.vim.doc.getSelection())==null||i.selectAllChildren(e))}ensureSelectionHeadAtTextDiv(e,i){let r=this.getTextDivAtSelectionHead(e);for(;!r;)e.modify("extend",i?"forward":"backward","character"),r=this.getTextDivAtSelectionHead(e)}setSelectionByPos(e,i){let r=this.doc.getSelection();if(!r)return;let o=c=>{var f,p;let{page:l,pos:d}=c,h=(p=(f=this.vim.child)==null?void 0:f.getPage(l).textLayer)==null?void 0:p.textDivs;if(!h||!h.length)return;let u=h[d.index];return ea(u,d.offset)},s=o(e),a=o(i);if(s&&a){r.setBaseAndExtent(s.node,s.offset,a.node,a.offset);let c=Xi(r);c||Dc(r),r.modify("extend","forward","character"),c||Dc(r)}}rememberSelection(){var i,r;let e=this.doc.getSelection();if(e&&!e.isCollapsed&&e.anchorNode&&e.focusNode){let o=(i=this.lib.getPageElAssociatedWithNode(e.anchorNode))==null?void 0:i.dataset.pageNumber,s=(r=this.lib.getPageElAssociatedWithNode(e.focusNode))==null?void 0:r.dataset.pageNumber;if(o&&s){let a=this.getSelectionPos(e,"anchor"),c=this.getSelectionPos(e,"head");a&&c&&(this.previousSelection={anchor:{page:+o,pos:a},head:{page:+s,pos:c}})}}}restorePreviousSelection(){if(this.vim.doc.getSelection()&&this.vim.visualMode.previousSelection){let{anchor:i,head:r}=this.vim.visualMode.previousSelection;this.setSelectionByPos(i,r)}}forgetPreviousSelection(){this.previousSelection=null}};var Ch=class extends $i{constructor(t){super(t),this.defineKeymaps()}onload(){this.viewer.then(t=>{this.lib.registerPDFEvent("sidebarviewchanged",t.pdfViewer.eventBus,this,({view:e})=>{e===2?this.vim.enterOutlineMode():this.vim.enterNormalMode()}),this.lib.registerPDFEvent("outlineloaded",t.pdfViewer.eventBus,this,({source:e})=>{t.pdfViewer.pdfSidebar.active===2?this.vim.enterOutlineMode():this.vim.enterNormalMode()})})}defineKeymaps(){this.registerOutlineKeymaps({j:(t,e)=>this.navigateOutline(t,!0,e),k:(t,e)=>this.navigateOutline(t,!1,e),h:t=>{let e=t.highlighted;e&&e.parent&&(this.changeActiveItemTo(e.parent),this.collapse(e.parent))},l:t=>{let e=t.highlighted;if(e){this.expand(e);let i=e.children[0];i&&this.changeActiveItemTo(i)}},H:t=>{let e=t.highlighted;if(t.allItems.forEach(i=>{this.collapse(i)}),e){let i=e;for(;i.parent;)i=i.parent;this.changeActiveItemTo(i)}},L:t=>{t.allItems.forEach(e=>{this.expand(e)})},"<CR>":t=>{let e=t.highlighted;e&&e.selfEl.click()}}),this.vimScope.noremap(["outline"],{"<Space>":"<CR>","<Down>":"j","<Up>":"k","<Left>":"h","<Right>":"l","<S-Left>":"H","<S-Right>":"L"})}registerOutlineKeymaps(t){let e={};for(let i in t)e[i]=this.toVimCommand(t[i]);this.vimScope.registerKeymaps(["outline"],e)}toVimCommand(t){return e=>{var r;let i=(r=this.obsidianViewer)==null?void 0:r.pdfOutlineViewer;i&&t(i,e)}}changeActiveItemTo(t){var i;let e=t.owner;(i=e.highlighted)==null||i.setActive(!1),t.setActive(!0),e.highlighted=t,t.selfEl.scrollIntoView({block:"center",behavior:this.settings.vimSmoothOutlineMode?"smooth":"instant"})}collapse(t){t.setCollapsed(!0,this.settings.vimSmoothOutlineMode)}expand(t){t.setCollapsed(!1,this.settings.vimSmoothOutlineMode)}navigateOutline(t,e,i){let r=t.highlighted;if(r){let o=(()=>{i!=null||(i=1);let s=1/0,a=t.children.slice().reverse(),c=[];for(;a.length;){let l=a.pop();if(c.push(l),l===r&&(s=c.length-1+(e?i:-i)),c.length>s)return c[s];!l.children.length||l.collapsed||a.push(...l.children.slice().reverse())}})();o&&this.changeActiveItemTo(o)}}};var Uo=require("obsidian");var Vx=require("obsidian");var Nx=require("obsidian");function*Mx(n,t){let e=DP(t),i=Math.max(0,Math.ceil((n-t.length)/(t.length-1)));yield*CP(e,i,n+i)}function*DP(n){for(let t=1;;t++)yield*TP(SP(n,t),e=>e.join(""))}function*SP(n,t){let e=n.length,i=new Array(t).fill(0),r=1;for(let o of dg(Math.pow(e,t))){yield i.map(s=>n[s]);for(let s of dg(i.length))Ox(r,Math.pow(e,i.length-1-s))===0&&(i[s]=Ox(i[s]+1,e));r++}}function*CP(n,t,e){let i=n[Symbol.iterator]();e===void 0&&(e=t,t=0);for(let r of dg(t))if(i.next().done)return;for(let r=t;r<e;r++){let o=i.next();if(o.done)return;yield o.value}}function*dg(n){if(!(n<0))for(let t=0;t<n;t++)yield t}function*TP(n,t){for(let e of n)yield t(e)}function Ox(n,t){return n-t*Math.floor(n/t)}var Th={[0]:".annotationLayer > section.linkAnnotation:has(> a)",[1]:".annotationLayer > section:not(.linkAnnotation)",[2]:".pdf-plus-backlink-highlight-layer > .pdf-plus-backlink"},en=class extends $i{constructor(){super(...arguments);this.onExitCallbacks=[];this.targets=[]}setTarget(...e){this.targets=e}getTargetSelector(){return this.targets.map(e=>Th[e]).join(",")}enter(){if(this.targets.length===0&&this.setTarget(0),this.pdfViewer){let e=this.pdfViewer.currentPageNumber;if(this.hintPage(e),this.targets.includes(2)){let i=this.vim.eventBus;if(i){let r=()=>this.hintPage(e);i.on("textlayerrendered",r),this.onExit(()=>i.off("textlayerrendered",r))}}}}exit(){this.vimScope.unregisterAllKeymaps(["hint"]),this.onExitCallbacks.forEach(e=>e())}onExit(e){this.onExitCallbacks.push(e)}hintPage(e){if(!this.pdfViewer)return;let i=this.pdfViewer.getPageView(e-1),r=i.div;if(!r)return;let o={},s="pdf-plus-vim-hint-mode",a="pdfPlusVimHint";r.addClass(s),this.onExit(()=>r.removeClass(s));let c=this.getTargetSelector(),l=r.querySelectorAll(c),d=l.length;if(d===0){new Nx.Notice(`${this.plugin.manifest.name} (Vim mode): No hintable element found on this page`),this.exit(),this.vim.enterNormalMode();return}let h=Mx(d,this.settings.vimHintChars),u=null,f=null;l.forEach(p=>{var m;if(en.isLink(p)){let b=p.querySelector(":scope > a");if(u&&u.href===b.href&&EP(u,b))return;u=b}else u=null;if(en.isBacklinkHighlight(p)){let b=(m=p.dataset.backlinkId)!=null?m:null;if(f&&b&&f===b)return;f=b}else f=null;let g=""+h.next().value;p.dataset[a]=g,this.onExit(()=>delete p.dataset[a]),o[g]=()=>{this.openHintableEl(p,i),this.exit(),this.vim.enterNormalMode()}}),this.vimScope.unregisterAllKeymaps(["hint"]),this.vimScope.registerKeymaps(["hint"],o)}openHintableEl(e,i){var r,o;if(en.isLink(e))e.querySelector(":scope > a").click();else if(en.isNonLinkAnnot(e)){ih(e);let s=e.dataset.annotationId,a=s&&((r=i==null?void 0:i.annotationLayer)==null?void 0:r.annotationLayer.getAnnotation(s));a&&((o=this.vim.child)==null||o.renderAnnotationPopup(a))}else en.isBacklinkHighlight(e)&&ih(e)}static isLink(e){return e.matches(Th[0])}static isNonLinkAnnot(e){return e.matches(Th[1])}static isBacklinkHighlight(e){return e.matches(Th[2])}},EP=(n,t)=>{let e=n.getBoundingClientRect(),i=t.getBoundingClientRect(),r=Math.min(i.height,i.width)*.5,o=r*5;return Math.abs((i.top+i.bottom)/2-(e.top+e.bottom)/2)<r&&(Math.abs(i.left-e.right)<o||Math.abs(i.right-e.left)<o)||Math.abs((i.left+i.right)/2-(e.left+e.right)/2)<r&&(Math.abs(i.top-e.bottom)<o||Math.abs(i.bottom-e.top)<o)};var Rx=require("obsidian");var ha=class extends rt{constructor(){super(...arguments);this.markdown=""}static renderAsModal(e,i){let r=new ha(e);return r.markdown=i,r.open(),r}onOpen(){Rx.MarkdownRenderer.render(this.app,this.markdown,this.contentEl.createDiv("markdown-rendered"),"",this.component)}};var Bx=n=>[{id:"nextpage",func:()=>{var t;return(t=n.pdfViewer)==null?void 0:t.nextPage()}},{id:"prevpage",func:()=>{var t;return(t=n.pdfViewer)==null?void 0:t.previousPage()}},{id:"0",description:":0 - Go to the first page (same as :1)",func:()=>n.pdfViewer&&(n.pdfViewer.currentPageNumber=1)},{id:"$",description:":$ - Go to the last page.",func:()=>n.pdfViewer&&(n.pdfViewer.currentPageNumber=n.pdfViewer.pagesCount)},{id:"gotopage",pattern:/^go(to(page)?)?$/,description:":go[to[page]] <page> - Go to the specified page. If the PDF has page labels, the argument is treated as a page label. Otherwise, it is treated as a page number.",minNargs:1,func:async t=>{if(n.pdfViewer){let e=await n.pdfViewer.pdfDocument.getPageLabels();if(e){let i=e.indexOf(t);if(i!==-1){let r=i+1;n.pdfViewer.currentPageNumber=r;return}}n.pdfViewer.currentPageNumber=+t}}},{id:"pagetop",func:()=>n.scroll.scrollToTop()},{id:"pagebottom",func:()=>n.scroll.scrollToBottom()},{id:"searchforward",pattern:/^search(f(orward)?)?$/,func:()=>setTimeout(()=>n.search.start(!0))},{id:"searchbackward",pattern:/^searchb(ackward)?$/,func:()=>setTimeout(()=>n.search.start(!1))},{id:"findnext",func:()=>n.search.findNext()},{id:"findprev",func:()=>n.search.findPrevious()},{id:"zoom",description:":zoom <number> - Set the zoom level to <number> percent.",minNargs:1,func:t=>n.pdfViewer&&(n.pdfViewer.currentScale=.01*+t)},{id:"zoomin",func:()=>{var t;return(t=n.obsidianViewer)==null?void 0:t.zoomIn()}},{id:"zoomout",func:()=>{var t;return(t=n.obsidianViewer)==null?void 0:t.zoomOut()}},{id:"zoomreset",func:()=>{var t;return(t=n.obsidianViewer)==null?void 0:t.zoomReset()}},{id:"rotate",func:()=>{var t;return(t=n.obsidianViewer)==null?void 0:t.rotatePages(90)}},{id:"yank",pattern:/^y(ank)?$/,func:()=>{let t=n.doc.getSelection();if(t){let e=t.toString();e&&navigator.clipboard.writeText(e),n.enterNormalMode()}}},{id:"outline",pattern:/^(outline)|(toc)$/,description:":outline or :toc - Show the outline view.",func:()=>n.lib.commands.showOutline(!1)},{id:"thumbnail",pattern:/^thumb(nail)?$/,description:":thumb[nail] - Show the thumbnails view.",func:()=>n.lib.commands.showThumbnail(!1)},{id:"closesidebar",func:()=>n.lib.commands.closeSidebar(!1)},{id:"help",pattern:/^h(elp)?$/,func:t=>{if(t&&t.startsWith(":")){let e=t.slice(1).split(" ")[0],i=n.commandLineMode.findCommand(e);if(i&&i.description){ha.renderAsModal(n.plugin,AP(i.description));return}}n.plugin.openSettingTab().scrollToHeading("vim")}},{id:"map",minNargs:2,func:(t,...e)=>n.map(["normal","visual","outline"],t,e.join(" ")),description:Ar("map",["normal","visual","outline"])},{id:"noremap",pattern:/^no(remap)$/,minNargs:2,func:(t,...e)=>n.noremap(["normal","visual","outline"],t,e.join(" ")),description:Ar("no[remap]",["normal","visual","outline"],!0)},{id:"nmap",pattern:/^nm(ap)?$/,minNargs:2,func:(t,...e)=>n.map(["normal"],t,e.join(" ")),description:Ar("nm[ap]",["normal"])},{id:"nnoremap",pattern:/^nn(oremap)?$/,minNargs:2,func:(t,...e)=>n.noremap(["normal","visual","outline"],t,e.join(" ")),description:Ar("nn[oremap]",["normal"],!0)},{id:"vmap",pattern:/^vm(ap)?$/,minNargs:2,func:(t,...e)=>n.map(["visual"],t,e.join(" ")),description:Ar("vm[ap]",["visual"])},{id:"vnoremap",pattern:/^vn(oremap)?$/,minNargs:2,func:(t,...e)=>n.noremap(["visual"],t,e.join(" ")),description:Ar("vn[oremap]",["visual"],!0)},{id:"omap",pattern:/^om(ap)?$/,minNargs:2,func:(t,...e)=>n.map(["outline"],t,e.join(" ")),description:Ar("om[ap]",["outline"])},{id:"onoremap",pattern:/^ono(remap)?$/,minNargs:2,func:(t,...e)=>n.noremap(["outline"],t,e.join(" ")),description:Ar("ono[remap]",["outline"],!0)},{id:"unmap",pattern:/^unm(ap)?$/,minNargs:1,func:t=>n.vimScope.unmap(["normal","visual","outline"],[t]),description:":unm[ap] <key> - Unmap <key> in all modes."},{id:"nunmap",pattern:/^nun(map)?$/,minNargs:1,func:t=>n.vimScope.unmap(["normal"],[t]),description:":nun[map] <key> - Unmap <key> in normal mode."},{id:"vunmap",pattern:/^vu(nmap)?$/,minNargs:1,func:t=>n.vimScope.unmap(["visual"],[t]),description:":vu[nmap] <key> - Unmap <key> in visual mode."},{id:"ounmap",pattern:/^ou(nmap)?$/,minNargs:1,func:t=>n.vimScope.unmap(["outline"],[t]),description:":ou[nmap] <key> - Unmap <key> in outline mode."},{id:"js",pattern:/^js(command)?$/,minNargs:1,func:(...t)=>n.evalUserScript(t.join(" ")),description:`:js[command] <code>: Execute the given javascript <code> in a context where "this" points to a "${Ho.name}" object.`},{id:"jsfile",minNargs:1,func:async(...t)=>{var r,o;let e=(0,Vx.normalizePath)(t.join(" ")),i=await n.app.vault.adapter.read((o=(r=n.app.metadataCache.getFirstLinkpathDest(e,""))==null?void 0:r.path)!=null?o:e);return await n.evalUserScript(i)},description:`:jsfile <path> - Execute the javascript code in the file at <path> (relative to the vault root; can be just the filename if it's unique). It can be any plain text file with arbitrary file extension. The code will be evaluated in a context where "this" points to a "${Ho.name}" object.`},{id:"obcommand",description:":obcommand <command-id> - Execute the Obsidian command with the specified ID. Inspired by esm's awesome Vimrc Support plugin.",minNargs:1,func:t=>n.app.commands.executeCommandById(t)},{id:"hint",description:`
:hint [<target1> <target2> ...] - Enter hint mode and show hint marks for the specified targets in the current page. Inspired by [Tridactyl](https://github.com/tridactyl/tridactyl)'s hint mode.
If no target is specified, the default targets (configured in PDF++ settings) will be used.
The accepted targets are:
- \`all\`: all of the followings
- \`link\`: internal & external links
- \`annot\`: (non-link) annotations written in the file
- \`backlink\`: backlink highlighting, i.e., highlights that is not written in the file itself
`,func:(...t)=>{t.length===0&&(t=n.settings.vimHintArgs.trim().split(/\s+/)),t.includes("all")&&(t=["link","annot","backlink"]),n.hintMode.setTarget(...t.map(e=>{switch(e){case"link":return 0;case"annot":return 1;case"backlink":return 2;default:throw Error(`Unknown hint target: ${e}`)}})),setTimeout(()=>n.enterHintMode())}}],AP=(n,t=12,e=!0)=>(n=n.replace(new RegExp(`^ {${t}}`,"gm"),"").replace(/^\s*/,""),e?n.replace(/([<>])/g,"\\$1"):n),Ar=(n,t,e=!1)=>`:${n} <from> <to> - Map <from> to <to> ${e?"non-recusively ":""}in ${t.length>1?t.slice(0,-1).join(", ")+" and "+t.at(-1)+" modes":t[0]+" mode"}. If <to> is an ex-command, it must be start with ":".`;var Eh=class extends $i{constructor(e){super(e);this.history=[];this.historyIndex=0;this.isActive=!1;this.dom=this.vim.viewer.containerEl.createDiv("pdf-plus-vim-command",i=>{this.register(()=>i.remove()),i.appendText(":"),this.inputEl=i.createEl("input",{cls:"pdf-plus-vim-command-input"},r=>{r.placeholder="type a command or page number...",r.addEventListener("focusout",()=>{setTimeout(()=>{this.isActive&&this.vim.enterNormalMode()})}),r.addEventListener("keydown",o=>{if(!o.isComposing&&o.key==="Enter"){this.submitCommand();return}if(o.key==="Escape"||o.key==="Backspace"&&!r.value){this.vim.enterNormalMode(),o.preventDefault();return}if(o.key==="ArrowUp"||o.key==="ArrowDown"){o.preventDefault(),this.navigateHistory(o.key==="ArrowDown");return}})}),i.hide()}),this.vimScope.registerKeymaps(["command"],{"<C-u>":()=>this.inputEl.value="","<C-w>":()=>this.inputEl.value=this.inputEl.value.replace(/\S+\s*$/,"")}),this.excmds=Bx(this.vim),this.suggest=new hg(this).onSelect(({item:{minNargs:i}})=>setTimeout(()=>{if(!i){this.submitCommand();return}this.inputEl.value+=" "})),this.settings.vimrcPath&&this.viewer.then(i=>{let r=i.pdfViewer.eventBus;r&&r.on("pagesloaded",()=>setTimeout(()=>{if(this.plugin.vimrc===null){let o=(0,Uo.normalizePath)(this.settings.vimrcPath);this.app.vault.adapter.read(o).then(s=>this.runScript(this.plugin.vimrc=s))}else this.runScript(this.plugin.vimrc)},{once:!0}))})}async executeCommand(e,i={error:["notice","console.error"],history:!0}){if(i={error:[],history:!0,...i},i.history&&(this.history.push(e),this.history.length>100&&this.history.shift(),this.historyIndex=this.history.length),e.startsWith("!")){if(!Uo.Platform.isDesktopApp){this.reportError(`${this.plugin.manifest.name} (Vim mode): Shell command is not supported on mobile`,i.error);return}let{exec:a}=require("child_process"),c=process.env;return this.settings.PATH&&(c.PATH=this.settings.PATH),new Promise((l,d)=>a(e.slice(1),{env:c},(h,u,f)=>{h&&d(h),u&&(alert(u),l(u)),f&&console.warn(f)}))}if(/^[1-9]\d*$/.test(e)){let a=+e;this.pdfViewer&&(this.pdfViewer.currentPageNumber=a);return}let[r,...o]=e.split(/\s+/),s=this.findCommand(r);if(s){if(s.minNargs&&o.length<s.minNargs){this.reportError(`${this.plugin.manifest.name} (Vim mode): Expected ${s.minNargs} or more arguments for command "${s.id}" but got ${o.length}`,i.error);return}return s.func(...o)}this.reportError(`${this.plugin.manifest.name} (Vim mode): Unknown command "${e}"`,i.error)}findCommand(e){return this.excmds.find(i=>i.pattern&&i.pattern.test(e)||i.id===e)}submitCommand(){let e=this.inputEl.value.trim();if(e){this.history[this.historyIndex]===e&&this.history.splice(this.historyIndex,1);try{this.executeCommand(e)}catch(r){new Uo.Notice(`${this.plugin.manifest.name} (Vim mode): Error occurred while executing the command : ${r}`),console.error(r)}}this.vim.enterNormalMode()}runScript(e){this.parseScript(e).forEach(r=>this.executeCommand(r,{error:["console.warn"],history:!1}))}parseScript(e){return e.split(/\r?\n/).filter(i=>i.trim()&&!i.trimStart().startsWith('"')).join(`
`).replace(/\\\n/g,"").split(`
`)}enter(){this.inputEl.value="",this.dom.show(),this.inputEl.focus(),this.isActive=!0}exit(){this.isActive=!1,this.inputEl.value="",this.dom.hide()}navigateHistory(e){let i=this.inputEl;if(this.historyIndex<this.history.length||!i.value){let r=this.historyIndex+(e?1:-1);if(r<0)return;r<=this.history.length&&(this.historyIndex=r);let o=this.history[r]||"";i.value=o,i.setSelectionRange(o.length,o.length)}}reportError(e,i){for(let r of i)r==="notice"?new Uo.Notice(e):r==="console.error"?console.error(e):r==="console.warn"&&console.warn(e)}},hg=class extends gr{constructor(e){super(e.app,e.inputEl,{blurOnSelect:!1});this.commandLineMode=e;let i=this.scope.keys.find(s=>s.key==="Escape"&&s.modifiers==="");i&&this.scope.unregister(i);let r=this.scope.keys.find(s=>s.key==="ArrowDown"&&s.modifiers===""),o=this.scope.keys.find(s=>s.key==="ArrowUp"&&s.modifiers==="");r&&(this.scope.unregister(r),this.scope.register([],"Tab",r.func)),o&&(this.scope.unregister(o),this.scope.register(["Shift"],"Tab",o.func))}getItems(){return this.commandLineMode.excmds}getItemText(e){return e.id}};var Ah=class extends de{constructor(e,i,r){super(e);this.pages=new Map;this.pdfViewer=i,this.file=r}onload(){this.registerEvent(this.app.vault.on("modify",e=>{e===this.file&&this.pages.clear()}))}getPageParser(e){var r,o;let i=this.pages.get(e);if(!i){let s=this.pdfViewer.getPageView(e-1);if(s){let a=(r=s.textLayer)==null?void 0:r.textContentItems,c=(o=s.textLayer)==null?void 0:o.textDivs;a&&c&&(i=new ug(s,a,c),this.pages.set(e,i))}}return i}},ug=class{constructor(t,e,i){this.lineStartIndices=null;this.pageView=t,this.items=e,this.divs=i}getBoundIndicesOfLine(t,e){var a;let i=this._getIndexWithinLineStartIndicesForLineContainingItem(t),r=(a=this.lineStartIndices[i+e])!=null?a:null;if(r===null)return null;let o=this.lineStartIndices[i+1+e],s=o===void 0?this.items.length-1:o-1;for(;s>r&&!this.items[s].str.length;)s--;return{start:r,end:s}}getLineShiftPosition(t,e){let i=this.getBoundIndicesOfLine(t.index,e);if(!i)return null;let r=this._getHorizontalRangeOfChar(t);if(!r)return null;let{start:o,end:s}=i,a=o;for(;a<=s;a++){let d=this.items[a],h=this._getHorizontalRangeOfItem(d);if(Rp(r,h))break}for(a>s&&(a=s);a>o&&!this.items[a].str.length;)a--;let c=this.items[a],l=0;for(;;){let d=this._getHorizontalRangeOfChar({index:a,offset:l});if(!d)return null;if(d.from>=r.from||d.to>=r.to)return{index:a,offset:l};if(l+1<c.str.length)l++;else return{index:a,offset:c.str.length-1}}}_getIndexWithinLineStartIndicesForLineContainingItem(t){this.lineStartIndices||this.parse();let{found:e,index:i}=Gi(this.lineStartIndices,r=>t-r);return e?i:i-1}parse(){let t=this._findIndexOfFirstNonEmptyItem();if(t===-1){this.lineStartIndices=[0];return}this.lineStartIndices=[t];let e=[this.items[t]];for(let i=t+1;i<this.items.length;i++){let r=this.items[i];if(this.isItemNonEmpty(r)){let o=this._getVerticalRangeOfItem(r),s=this._getMergedRangeOfItems(e.slice(-10));e.push(r),s&&!Vp(o,s)&&this.lineStartIndices.push(i)}}}_findIndexOfFirstNonEmptyItem(){return this.items.findIndex(t=>this.isItemNonEmpty(t))}isItemNonEmpty(t){let e=this._getVerticalRangeOfItem(t);return e.from<e.to}_getVerticalRangeOfItem(t){return{from:t.transform[5],to:t.transform[5]+t.height}}_getMergedRangeOfItems(t,e="vertical"){if(t.length===0)return null;let i=t.map(e==="vertical"?this._getVerticalRangeOfItem.bind(this):this._getHorizontalRangeOfItem.bind(this)),r=Math.min(...i.map(s=>s.from)),o=Math.max(...i.map(s=>s.to));return{from:r,to:o}}_getHorizontalRangeOfItem(t){return{from:t.transform[4],to:t.transform[4]+t.width}}_getHorizontalRangeOfChar(t){let e=t.index,i=t.offset,r=this.items[e];if(r.chars&&r.chars.length>=r.str.length){let f=r.chars[i];return{from:f.r[0],to:f.r[2]}}let o=this.divs[e],s=ea(o,i);if(!s)return null;let{node:a,offset:c}=s,l=o.doc.createRange();l.setStart(a,c),l.setEnd(a,c+1);let d=l.getBoundingClientRect(),[[h],[u]]=[...oh(this.pageView,[{x:d.left,y:d.bottom},{x:d.right,y:d.top}])];return{from:h,to:u}}};var ua=class extends de{constructor(e,i){super(e);this._structureParser=null;this.viewer=i,this.vimScope=new Er(this.viewer.scope),this.vimScope.registerKeymaps(["normal","visual","outline"],{":":()=>this.enterCommandMode(),"<Tab>":()=>{if(this.obsidianViewer){let r=this.obsidianViewer.pdfSidebar;r.isOpen&&r.active===2?r.close():r.switchView(2,!0)}},"<S-Tab>":()=>{if(this.obsidianViewer){let r=this.obsidianViewer.pdfSidebar;r.isOpen&&r.active===1?r.close():r.switchView(1,!0)}},f:()=>this.commandLineMode.executeCommand("hint")}),this.vimScope.registerKeymaps(["normal","visual","outline"],{j:r=>this.scroll.scrollTo("down",r),k:r=>this.scroll.scrollTo("up",r),h:r=>this.scroll.scrollTo("left",r),l:r=>this.scroll.scrollTo("right",r),J:ah(()=>{var r;return(r=this.pdfViewer)==null?void 0:r.nextPage()}),K:ah(()=>{var r;return(r=this.pdfViewer)==null?void 0:r.previousPage()}),gg:()=>this.pdfViewer&&(this.pdfViewer.currentPageNumber=1),G:r=>this.pdfViewer&&(this.pdfViewer.currentPageNumber=r!=null?r:this.pdfViewer.pagesCount),0:()=>this.scroll.scrollToTop(),"^":()=>this.scroll.scrollToTop(),$:()=>this.scroll.scrollToBottom(),"<C-f>":r=>this.scroll.scrollVerticallyByVisualPage(r!=null?r:1),"<C-b>":r=>this.scroll.scrollVerticallyByVisualPage(-(r!=null?r:1)),"<C-d>":r=>this.scroll.scrollVerticallyByVisualPage(.5*(r!=null?r:1)),"<C-u>":r=>this.scroll.scrollVerticallyByVisualPage(-.5*(r!=null?r:1)),"/":()=>this.search.start(!0),"?":()=>this.search.start(!1),n:r=>this.search.findNext(r),N:r=>this.search.findPrevious(r),gn:r=>this.search.findAndSelectNextMatch((r!=null?r:1)-1),gN:r=>this.search.findAndSelectNextMatch((r!=null?r:1)-1,!1),"+":r=>{var o;return(o=this.obsidianViewer)==null?void 0:o.zoomIn(r)},"-":r=>{var o;return(o=this.obsidianViewer)==null?void 0:o.zoomOut(r)},"=":r=>{var o;if(typeof r=="number"&&this.pdfViewer){this.pdfViewer.currentScaleValue=""+.01*r;return}(o=this.obsidianViewer)==null||o.zoomReset()},r:r=>{var o;return(o=this.obsidianViewer)==null?void 0:o.rotatePages(90*(r!=null?r:1))},R:r=>{var o;return(o=this.obsidianViewer)==null?void 0:o.rotatePages(-90*(r!=null?r:1))}}),this.vimScope.noremap(["normal","visual","outline"],{H:"^",L:"$",zi:"+",zo:"-",z0:"="}),this.vimScope.setMode("normal"),this.vimScope.setTypable("command"),this.vimScope.onEscape(r=>{var o,s,a;this.enterNormalMode(),(o=this.obsidianViewer)==null||o.pdfSidebar.close(),(a=(s=this.child)==null?void 0:s.hoverPopover)==null||a.hide(),r||this.viewer.then(c=>{c.clearEphemeralUI(),c.findBar.close()})}),this.vimScope.addEscapeAliases("<C-[>","<C-c>"),this.scroll=new kh(this),this.search=new Dh(this),this.visualMode=this.addChild(new Sh(this)),this.commandLineMode=this.addChild(new Eh(this)),this.outlineMode=this.addChild(new Ch(this)),this.hintMode=this.addChild(new en(this))}get child(){return this.viewer.child}get obsidianViewer(){var e;return(e=this.viewer.child)==null?void 0:e.pdfViewer}get pdfViewer(){var e,i;return(i=(e=this.viewer.child)==null?void 0:e.pdfViewer)==null?void 0:i.pdfViewer}get eventBus(){var e;return(e=this.obsidianViewer)==null?void 0:e.eventBus}get file(){var e;return(e=this.viewer.child)==null?void 0:e.file}get structureParser(){var e;return!this._structureParser&&this.pdfViewer&&((e=this.viewer.child)!=null&&e.file)&&(this._structureParser=this.addChild(new Ah(this.plugin,this.pdfViewer,this.viewer.child.file))),this._structureParser}get doc(){return this.viewer.containerEl.doc}onload(){this.lib.workspace.iteratePDFViews(e=>{e.viewer===this.viewer&&(e.scope=this.vimScope)})}onunload(){this.lib.workspace.iteratePDFViews(e=>{e.viewer===this.viewer&&(e.scope=this.viewer.scope)})}static register(e,i){e.settings.vim&&(i.vim=e.addChild(i.addChild(new ua(e,i))))}enterNormalMode(){var e;this.vimScope.setMode("normal"),(e=this.doc.getSelection())==null||e.empty(),this.commandLineMode.exit(),this.hintMode.exit(),this.visualMode.forgetPreviousSelection()}enterCommandMode(){this.vimScope.setMode("command"),this.commandLineMode.enter()}enterOutlineMode(){if(this.settings.enableVimOutlineMode&&this.obsidianViewer){this.vimScope.setMode("outline");let e=this.obsidianViewer.pdfOutlineViewer;if(!e.highlighted){let i=e.children[0];i.setActive(!0),e.highlighted=i}}}enterHintMode(){this.vimScope.setMode("hint"),this.hintMode.enter()}mapOrNoremap(e,i,r,o){r.startsWith(":")?this.vimScope.registerKeymaps(e,{[i]:()=>this.commandLineMode.executeCommand(r.slice(1))}):r==="<Nop>"?this.vimScope.registerKeymaps(e,{[i]:()=>{}}):this.vimScope[o?"noremap":"map"](e,{[i]:r})}map(e,i,r){this.mapOrNoremap(e,i,r,!1)}noremap(e,i,r){this.mapOrNoremap(e,i,r,!0)}async evalUserScript(e){return new Promise(i=>{this.viewer.then(async r=>{let o=this.addChild(new Ho(this.plugin,r));i(await o.run(e))})})}};var fa=async(n,t)=>n.patchStatus.pdfInternals?!0:new Promise(e=>{t.then(i=>{var o;return n.patchStatus.pdfInternals?e(!0):(LP(n,t),!i.toolbar||(OP(n,i),!i.pdfViewer)?e(!1):(MP(n,i.pdfViewer),NP(n),n.patchStatus.pdfInternals=!0,n.classes.PDFViewerComponent=t.constructor,n.classes.PDFViewerChild=i.constructor,n.classes.ObsidianViewer=(o=i.pdfViewer)==null?void 0:o.constructor,IP(n),e(!0)))})});function IP(n){let{lib:t}=n;t.workspace.iteratePDFViewerComponents((e,i)=>{e.unload();let r=e.scope.keys.find(o=>o.modifiers===""&&o.key==="Escape");r&&e.scope.unregister(r),e.load(),i&&e.loadFile(i,n.subpathWhenPatched)})}var LP=(n,t)=>{n.register(Ze(t.constructor.prototype,{loadFile(e){return async function(i,r){let o=await e.call(this,i,r);return this.then(s=>{var a;s.parent=this,(!this.visualizer||this.visualizer.file!==i)&&((a=this.visualizer)==null||a.unload(),this.visualizer=this.addChild(ca.create(n,i,s)))}),o}},onload(e){return async function(){let i=await e.call(this);return ua.register(n,this),i}}}))},OP=(n,t)=>{let{app:e,lib:i}=n;n.register(Ze(t.constructor.prototype,{load(o){return async function(...s){var f,p,g;this.hoverPopover=null,this.isFileExternal=!1,this.externalFileUrl=null,this.palette=null,this.rectHighlight=null,this.bib=null,this.component||(this.component=n.addChild(new he.Component)),this.component.load();let a=await o.call(this,...s),c=(p=(f=this.pdfViewer)==null?void 0:f.dom)==null?void 0:p.viewerContainerEl;if(c){let m=!1,b=F=>{m||(m=Tp(n.settings.showContextMenuOnMouseUpIf)&&he.Keymap.isModifier(F,n.settings.showContextMenuOnMouseUpIf))};this.component.registerDomEvent(c,"pointerdown",F=>{var v;i.highlight.viewer.clearRectHighlight(this),b(F),(v=this.component)==null||v.registerDomEvent(c,"mouseup",w)});let w=F=>{var v;if(b(F),n.settings.autoCopy){i.commands.copyLink(!1,!1);return}n.settings.replaceContextMenu&&(n.settings.showContextMenuOnMouseUpIf==="always"||m)&&(v=F.win.getSelection())!=null&&v.toString()&&F.win.setTimeout(()=>ng(n,this,F),80),c.removeEventListener("mouseup",w),m=!1}}let l=()=>{var m,b;try{if(this.toolbar)n.domManager.addChild(new da(n,this.toolbar,this));else{let F=window.setInterval(()=>{this.toolbar&&(n.domManager.addChild(new da(n,this.toolbar,this)),window.clearInterval(F))},100);window.setTimeout(()=>{window.clearInterval(F)},1e3)}let w=(b=(m=this.pdfViewer)==null?void 0:m.dom)==null?void 0:b.viewerContainerEl;n.settings.autoHidePDFSidebar&&w&&(this.component||(this.component=n.addChild(new he.Component)),this.component.registerDomEvent(w,"click",()=>{this.pdfViewer.pdfSidebar.switchView(0)}))}catch(w){new he.Notice(`${n.manifest.name}: An error occurred while mounting the color palette to the toolbar.`),console.error(w)}};if(l(),n.on("update-dom",l),!he.Platform.isMobile){let m=this.pdfViewer.eventBus;m&&m.on("textlayerrendered",({source:b})=>{var F;let w=(F=b==null?void 0:b.textLayer)==null?void 0:F.div;w&&w.addEventListener("copy",r)})}let d="1.7.0",h=(g=this.findBar)==null?void 0:g.findNextButtonEl,u=h.firstElementChild;return!(0,he.requireApiVersion)(d)&&u&&u.matches("svg.lucide-arrow-up")&&(0,he.setIcon)(h,"lucide-arrow-down"),a}},unload(o){return function(){var s;return(s=this.component)==null||s.unload(),o.call(this)}},onResize(o){return function(){let s=this.containerEl.querySelector(".pdf-viewer");return s&&n.pdfViewerChildren.set(s,this),o.call(this)}},loadFile(o){return async function(s,a){var d;this.component||(this.component=n.addChild(new he.Component));let c=!1;if(s.stat.size<300){let h=await i.getExternalPDFUrl(s);if(h){let u=e.vault.getResourcePath(s).replace(/\?\d+$/,"");this.pdfViewer.pdfPlusRedirect={from:u,to:h},await o.call(this,s,a),this.component.register(()=>URL.revokeObjectURL(h)),c=!0,this.isFileExternal=!0,this.externalFileUrl=h,this.palette&&this.palette.paletteEl&&(this.palette.removeWriteFileToggle(),this.palette.addImportButton(this.palette.paletteEl))}}c||(this.isFileExternal=!1,this.externalFileUrl=null,await o.call(this,s,a));let l=this.containerEl.querySelector(".pdf-viewer");l&&n.pdfViewerChildren.set(l,this),(d=this.bib)==null||d.unload(),this.bib=this.component.addChild(new Ci(n,this)),i.registerPDFEvent("annotationlayerrendered",this.pdfViewer.eventBus,this.component,h=>{var f,p;let{source:u}=h;(p=(f=u.annotationLayer)==null?void 0:f.div)==null||p.querySelectorAll("section[data-annotation-id]").forEach(g=>{var w,F;let m=g.dataset.annotationId;if(!m)return;let b=(w=u.annotationLayer)==null?void 0:w.annotationLayer.getAnnotation(m);b&&b.container.dataset.pdfPlusIsAnnotationPostProcessed!=="true"&&(b.data.subtype==="Link"&&typeof b.container.dataset.internalLink=="string"?Yi.registerEvents(n,this,b):b.data.subtype==="Link"&&b.data.url&&Vn.registerEvents(n,this,b),n.settings.hideReplyAnnotation&&b.data.inReplyTo&&b.data.replyType==="R"&&b.container.hide(),!he.Platform.isPhone&&n.settings.showAnnotationPopupOnHover&&((F=b.data.contentsObj)!=null&&F.str)&&Pc({parentEl:b.container,createChildEl:()=>(this.destroyAnnotationPopup(),this.renderAnnotationPopup(b),this.activeAnnotationPopupEl),removeChildEl:()=>{var v;((v=this.activeAnnotationPopupEl)==null?void 0:v.dataset.annotationId)===b.data.id&&this.destroyAnnotationPopup()},component:this.component}),b.container.dataset.pdfPlusIsAnnotationPostProcessed="true")})}),i.registerPDFEvent("outlineloaded",this.pdfViewer.eventBus,null,async h=>{let u=h.source;if(!n.patchStatus.pdfOutlineViewer){let p=Hx(n,u);n.patchStatus.pdfOutlineViewer=p}if(!h.outlineCount)return;let f=this.file;f&&(n.settings.outlineDrag&&await Cx(n,u,this,f),u.allItems.forEach(p=>Ji.registerEvents(n,this,p)),n.settings.outlineContextMenu&&n.registerDomEvent(u.childrenEl,"contextmenu",p=>{p.target===p.currentTarget&&Dx(n,this,f,p)}))}),i.registerPDFEvent("thumbnailrendered",this.pdfViewer.eventBus,null,()=>{let h=this.file;h&&(n.settings.thumbnailDrag&&Tx(n,this,h),Qi.registerEvents(n,this))}),n.settings.noSpreadModeInEmbed&&!On(this.pdfViewer)&&i.registerPDFEvent("pagerendered",this.pdfViewer.eventBus,null,()=>{this.pdfViewer.eventBus.dispatch("switchspreadmode",{mode:0})}),i.registerPDFEvent("sidebarviewchanged",this.pdfViewer.eventBus,null,h=>{let{source:u}=h;n.settings.noSidebarInEmbed&&!On(this.pdfViewer)&&u.close(),n.settings.defaultSidebarView===2&&u.haveOutline&&u.switchView(2)}),On(this.pdfViewer)&&i.registerPDFEvent("pagechanging",this.pdfViewer.eventBus,this.component,(0,he.debounce)(({pageNumber:h})=>{if(n.settings.viewSyncFollowPageNumber){let u=i.workspace.getActivePDFView();if(u&&u.viewer.child===this){let f={state:{file:this.file.path,page:h}};e.workspace.trigger("view-sync:state-change",u,f)}}},n.settings.viewSyncPageDebounceInterval*1e3))}},applySubpath(o){return function(s){let a=l=>{if(!l)return null;let d=parseInt(l);return Number.isNaN(d)?null:d},c=l=>{if(!l)return null;let d=parseFloat(l);return Number.isNaN(d)?null:d};if(s){s=s.startsWith("#")?s.substring(1):s;let l=this.pdfViewer,d=new URLSearchParams(s);if(d.has("search")&&this.findBar){let p=d.get("search"),g={};n.settings.searchLinkHighlightAll!=="default"&&(g.highlightAll=n.settings.searchLinkHighlightAll==="true"),n.settings.searchLinkCaseSensitive!=="default"&&(g.caseSensitive=n.settings.searchLinkCaseSensitive==="true"),n.settings.searchLinkMatchDiacritics!=="default"&&(g.matchDiacritics=n.settings.searchLinkMatchDiacritics==="true"),n.settings.searchLinkEntireWord!=="default"&&(g.entireWord=n.settings.searchLinkEntireWord==="true");let m=b=>{let w=Fp(b);if(d.has(w)){let F=d.get(w);(F==="true"||F==="false")&&(g[b]=F==="true")}};m("highlightAll"),m("caseSensitive"),m("matchDiacritics"),m("entireWord"),setTimeout(()=>i.search(this.findBar,p,g));return}let{dest:h,highlight:u}=(p=>{var w,F,v;if(!d.has("page"))return{dest:p,highlight:null};let g=(w=a(d.get("page")))!=null?w:1,m=null;if(n.settings.zoomToFitRect&&d.has("rect")){let P=d.get("rect").split(",").map(c);P.length===4&&P.every(k=>k!==null)&&(m=[g-1,{name:"FitR"},...P])}if(!m)if(d.has("offset")){let P=d.get("offset").split(","),k=c(P[0]),C=c(P[1]),D=c(P[2]);m=D===null?[g-1,{name:"FitBH"},C]:[g-1,{name:"XYZ"},k,C,D]}else if(!this.opts.isEmbed&&n.settings.dontFitWidthWhenOpenPDFLink){let P=(F=this.pdfViewer)==null?void 0:F.pdfViewer,k=P==null?void 0:P._location;n.settings.preserveCurrentLeftOffsetWhenOpenPDFLink?m=[g-1,{name:"XYZ"},(v=k==null?void 0:k.left)!=null?v:null,null,null]:m=[g-1,{name:"XYZ"},null,null,null]}else m=[g-1,{name:"FitBH"},null];let b=null;if(d.has("annotation"))b={type:"annotation",page:g,id:d.get("annotation")};else if(d.has("selection")){let P=d.get("selection").split(",").map(a),[k,C,D,T]=P;k!==null&&C!==null&&D!==null&&T!==null&&(b={type:"text",page:g,range:[[k,C],[D,T]]})}else if(d.has("rect")){let P=d.get("rect").split(",").map(c);P.length===4&&P.every(k=>k!==null)&&(b={type:"rect",page:g,rect:P})}return{dest:JSON.stringify(m),highlight:b}})(s),f=l.pdfLoadingTask;f?f.promise.then(()=>l.applySubpath(h)):l.subpath=h,this.subpathHighlight=u}}},getMarkdownLink(o){return function(s,a,c){if(!this.file)return o.call(this,s,a,c);let l=i.generateMarkdownLink(this.file,"",s,a);return c?l:l.slice(1)}},getPageLinkAlias(o){return function(s){var a,c;if(this.file){let l=i.copyLink.getDisplayText(this,void 0,this.file,s,i.toSingleLine((c=(a=activeWindow.getSelection())==null?void 0:a.toString())!=null?c:""));if(l)return l}return o.call(this,s)}},highlightText(o){return function(s,a){var h,u,f,p,g;let c=this.getPage(s),l=a[0][0],d=(h=c.textLayer)==null?void 0:h.textDivs[l];if(n.settings.trimSelectionEmbed&&this.pdfViewer.isEmbed&&this.pdfViewer.dom&&!(n.settings.ignoreHeightParamInPopoverPreview&&((u=this.pdfViewer.dom.containerEl.parentElement)!=null&&u.matches(".hover-popover")))){let m=a[1][0],b=(f=c.textLayer)==null?void 0:f.textDivs[m];d&&b&&setTimeout(()=>{let w=this.pdfViewer.dom.viewerContainerEl.getBoundingClientRect(),F=d.getBoundingClientRect(),P=b.getBoundingClientRect().bottom-F.top+2*Math.abs(F.top-w.top);this.pdfViewer.setHeight(P)},100)}n.settings.noTextHighlightsInEmbed&&this.pdfViewer.isEmbed&&!((g=(p=this.pdfViewer.dom)==null?void 0:p.containerEl.parentElement)!=null&&g.matches(".hover-popover"))||o.call(this,s,a),window.pdfjsViewer.scrollIntoView(d,{top:-n.settings.embedMargin},!0),n.trigger("highlight",{type:"selection",source:"obsidian",pageNumber:s,child:this})}},highlightAnnotation(o){return function(s,a){var d,h,u;let c=()=>{var p;return this.annotationHighlight?this.annotationHighlight:(p=this.getPage(s).annotationLayer)==null?void 0:p.div.querySelector(`[data-annotation-id="${a}"]`)};n.settings.trimSelectionEmbed&&this.pdfViewer.isEmbed&&this.pdfViewer.dom&&!(n.settings.ignoreHeightParamInPopoverPreview&&((d=this.pdfViewer.dom.containerEl.parentElement)!=null&&d.matches(".hover-popover")))&&setTimeout(()=>{let f=c();if(f){let p=this.pdfViewer.dom.viewerContainerEl.getBoundingClientRect(),g=f.getBoundingClientRect(),m=g.bottom-g.top+2*Math.abs(g.top-p.top);this.pdfViewer.setHeight(m)}},100),n.settings.noAnnotationHighlightsInEmbed&&this.pdfViewer.isEmbed&&!((u=(h=this.pdfViewer.dom)==null?void 0:h.containerEl.parentElement)!=null&&u.matches(".hover-popover"))||o.call(this,s,a);let l=c();l&&activeWindow.setTimeout(()=>{window.pdfjsViewer.scrollIntoView(l,{top:-n.settings.embedMargin},!0)}),n.trigger("highlight",{type:"annotation",source:"obsidian",pageNumber:s,child:this})}},clearTextHighlight(o){return function(){var s,a;n.settings.persistentTextHighlightsInEmbed&&((a=(s=this.pdfViewer)==null?void 0:s.isEmbed)!=null?a:this.opts.isEmbed)||o.call(this)}},clearAnnotationHighlight(o){return function(){n.settings.persistentAnnotationHighlightsInEmbed&&this.pdfViewer.isEmbed||o.call(this)}},clearEphemeralUI(o){return function(){o.call(this),i.highlight.viewer.clearRectHighlight(this)}},renderAnnotationPopup(o){return function(s,...a){var u,f;if(s.data.subtype==="Link")return;let c=o.call(this,s,...a);n.lastAnnotationPopupChild=this;let{page:l,id:d}=i.getAnnotationInfoFromAnnotationElement(s);if(n.settings.renderMarkdownInStickyNote&&this.file){let p=(u=this.activeAnnotationPopupEl)==null?void 0:u.querySelector(".popupContent");p&&(p.textContent="",i.highlight.writeFile.getAnnotationContents(this.file,l,d).then(async g=>{var m,b;g&&(p.addClass("markdown-rendered"),this.component||(this.component=n.addChild(new he.Component)),await he.MarkdownRenderer.render(e,g,p,"",this.component),Fc(e,p,(b=(m=this.file)==null?void 0:m.path)!=null?b:""))}))}let h=p=>{p.createDiv("pdf-plus-annotation-icon-container",g=>{let m=p==null?void 0:p.querySelector(".clickable-icon:last-child");if(m&&(m.remove(),g.createDiv("clickable-icon pdf-plus-copy-annotation-link",b=>{(0,he.setIcon)(b,"lucide-copy"),(0,he.setTooltip)(b,"Copy link"),b.addEventListener("click",async()=>{let w=i.getColorPaletteAssociatedWithNode(p);if(!w)return;let F=n.settings.copyCommands[w.actionIndex].template;i.copyLink.copyLinkToAnnotation(this,!1,{copyFormat:F},l,d),(0,he.setIcon)(b,"lucide-check")})})),i.isEditable(this)&&n.settings.enableAnnotationContentEdit&&Mn.isSubtypeSupported(s.data.subtype)){let b=s.data.subtype;g.createDiv("clickable-icon pdf-plus-edit-annotation",w=>{(0,he.setIcon)(w,"lucide-pencil"),(0,he.setTooltip)(w,"Edit"),w.addEventListener("click",async()=>{this.file&&Mn.forSubtype(b,n,this.file,l,d).open()})})}i.isEditable(t)&&n.settings.enableAnnotationDeletion&&g.createDiv("clickable-icon pdf-plus-delete-annotation",b=>{(0,he.setIcon)(b,"lucide-trash"),(0,he.setTooltip)(b,"Delete"),b.addEventListener("click",async()=>{this.file&&new ra(n,this.file,l,d).openIfNeccessary()})})}),p.addEventListener("contextmenu",g=>{new he.Menu().addItem(m=>{m.setTitle("Customize...").setIcon("lucide-settings").onClick(()=>{n.openSettingTab().scrollToHeading("annot")})}).showAtMouseEvent(g),g.preventDefault()})};if(he.Platform.isPhone){let p=new MutationObserver((g,m)=>{for(let b of g)for(let w of b.addedNodes)if(w.instanceOf(HTMLElement)&&w.matches("div.modal-container.pdf-annotation-modal")){let F=w.querySelector(".popupMeta");if(F){h(F),m.disconnect();return}}});activeWindow.setTimeout(()=>p.observe(activeDocument.body,{childList:!0})),activeWindow.setTimeout(()=>p.disconnect(),1e3)}else{let p=(f=this.activeAnnotationPopupEl)==null?void 0:f.querySelector(".popupMeta");p&&h(p)}if(n.settings.annotationPopupDrag&&this.activeAnnotationPopupEl&&this.file){let p=this.activeAnnotationPopupEl,g=this.file;Ex(n,p,this,g,l,d),p.addClass("pdf-plus-draggable")}return c}},destroyAnnotationPopup(o){return function(){return n.lastAnnotationPopupChild=null,o.call(this)}},onContextMenu(o){return async function(s){if(!he.Platform.isPhone&&!(he.Platform.isTablet&&!n.settings.showContextMenuOnTablet)){if(!n.settings.replaceContextMenu)return await o.call(this,s);Fx(n,this,s)}}},onMobileCopy(o){return function(s,a){switch(n.settings.mobileCopyAction){case"text":r(s);return;case"pdf-plus":setTimeout(()=>i.commands.copyLink(!1));return;case"obsidian":return o.call(this,s,a)}}},onThumbnailContextMenu(o){return function(s){if(!n.settings.thumbnailContextMenu)return o.call(this,s);Px(n,this,s)}},getTextByRect(o){return function(s,a){var h,u;let c="",l=(h=s.textLayer)==null?void 0:h.textContentItems,d=(u=s.textLayer)==null?void 0:u.textDivs;if(l){let[f,p,g,m]=a;for(let b=0;b<l.length;b++){let w=l[b];if(w.chars&&w.chars.length)for(let F=0;F<w.chars.length;F++){let v=w.chars[F],P=(v.r[0]+v.r[2])/2,k=(v.r[1]+v.r[3])/2;f<=P&&P<=g&&p<=k&&k<=m&&(c+=v.u)}else if(d&&d[b])for(let{char:F,rect:v}of Dp(s,d[b])){let P=(v[0]+v[2])/2,k=(v[1]+v[3])/2;f<=P&&P<=g&&p<=k&&k<=m&&(c+=F)}}}return c}}}));let r=o=>{var c;if(!n.settings.copyAsSingleLine)return;let s=o.clipboardData;if(!s)return;let a=(c=o.target.win.getSelection())==null?void 0:c.toString();a&&(a=i.toSingleLine(a),s.setData("text/plain",a))}},MP=(n,t)=>{n.register(Ze(t.constructor.prototype,{open(e){return async function(i){if(this.pdfPlusRedirect){let{from:r,to:o}=this.pdfPlusRedirect,s=i.url;typeof s=="string"&&s.startsWith(r)&&(i.url=o)}return delete this.pdfPlusRedirect,await e.call(this,i)}},load(e){return function(i,...r){let o=this.pdfPlusCallbacksOnDocumentLoaded;if(o)for(let s of o)s(i);return delete this.pdfPlusCallbacksOnDocumentLoaded,e.call(this,i,...r)}}}))},NP=n=>{n.register(Ze(window.pdfjsViewer.ObsidianServices.prototype,{createPreferences(t){return function(...e){return Object.assign(this.preferences,{defaultZoomValue:n.settings.defaultZoomValue,scrollModeOnLoad:n.settings.scrollModeOnLoad,spreadModeOnLoad:n.settings.spreadModeOnLoad}),t.call(this,...e)}}}))};var Ux=n=>{if(n.patchStatus.pdfView&&n.patchStatus.pdfInternals)return!0;let t=n.lib,e=t.getPDFView();return e&&(n.patchStatus.pdfView||(n.register(Ze(e.constructor.prototype,{getState(i){return function(){var c,l,d,h,u;let r=i.call(this),s=this.viewer.child,a=(c=s==null?void 0:s.pdfViewer)==null?void 0:c.pdfViewer;return a&&(r.page=(d=(l=a._location)==null?void 0:l.pageNumber)!=null?d:a.currentPageNumber,r.left=(h=a._location)==null?void 0:h.left,r.top=(u=a._location)==null?void 0:u.top,r.zoom=a.currentScale),r}},setState(i){return function(r,o){return n.settings.alwaysRecordHistory&&(o.history=!0),i.call(this,r,o).then(()=>{var l;let a=this.viewer.child,c=(l=a==null?void 0:a.pdfViewer)==null?void 0:l.pdfViewer;typeof r.page=="number"&&c&&t.applyPDFViewStateToViewer(c,r)})}},onLoadFile(i){return async function(r){let o=this,s=o.getState(),a=t.viewStateToSubpath(s);return o.viewer.loadFile(r,a!=null?a:void 0)}}})),n.patchStatus.pdfView=!0,n.classes.PDFView=e.constructor),n.patchStatus.pdfInternals||fa(n,e.viewer)),!1};var zx=n=>{if(n.patchStatus.pdfInternals)return!0;let{lib:t}=n,e=t.getPDFEmbed();return e&&fa(n,e.viewer),!1};var Hx=(n,t)=>(n.register(Ze(t.constructor.prototype,{onItemContextMenu(e){return async function(i,r){let o=this,s=o.viewer,a=s.file;if(!n.settings.outlineContextMenu||!a)return await e.call(o,i,r);kx(n,s,a,i,r)}}})),!0);var pa=require("obsidian");var qx=n=>{let t=n.app,e=n.lib;n.register(Ze(pa.Workspace.prototype,{openLinkText(i){return function(r,o,s,a){var c;if((n.settings.openPDFWithDefaultApp||n.settings.singleTabForSinglePDF||n.settings.openLinkNextToExistingPDFTab||n.settings.paneTypeForFirstPDFLeaf)&&!s){let{path:l}=(0,pa.parseLinktext)(r),d=t.metadataCache.getFirstLinkpathDest(l,o);if(d&&d.extension==="pdf"){if(pa.Platform.isDesktopApp&&n.settings.openPDFWithDefaultApp){if(n.settings.openPDFWithDefaultAppAndObsidian&&n.settings.syncWithDefaultApp)return;let h=t.openWithDefaultApp(d.path);if(n.settings.focusObsidianAfterOpenPDFWithDefaultApp&&Ac(),!n.settings.openPDFWithDefaultAppAndObsidian)return h}if(n.settings.singleTabForSinglePDF){let{exists:h,promise:u}=e.workspace.openPDFLinkTextInExistingLeafForTargetPDF(r,o,a,d);if(h)return u}if(n.settings.openLinkNextToExistingPDFTab||n.settings.paneTypeForFirstPDFLeaf){let h=(c=e.getPDFView())==null?void 0:c.leaf;if(h){if(n.settings.openLinkNextToExistingPDFTab&&h.parentSplit){let u=t.workspace.createLeafInParent(h.parentSplit,-1);return e.workspace.openPDFLinkTextInLeaf(u,r,o,a)}}else if(n.settings.paneTypeForFirstPDFLeaf){let u=e.workspace.getLeaf(n.settings.paneTypeForFirstPDFLeaf);return e.workspace.openPDFLinkTextInLeaf(u,r,o,a)}}}}return i.call(this,r,o,s,a)}}})),n.patchStatus.workspace=!0};var Wx=require("obsidian");var jx=n=>{let t=n.app,e=n.lib,i=t.internalPlugins.plugins["page-preview"].instance;return n.register(Ze(i,{onLinkHover(r){return function(o,s,a,c,l){let{path:d,subpath:h}=(0,Wx.parseLinktext)(a),u=t.metadataCache.getFirstLinkpathDest(d,c);if((!c||c.endsWith(".pdf"))&&n.settings.hoverHighlightAction==="open"&&(l!=null&&l.isTriggeredFromBacklinkVisualizer)){e.workspace.openMarkdownLinkFromPDF(a,c,!1,{line:l.scroll});return}if((u==null?void 0:u.extension)==="pdf"&&c.endsWith(".md")){if(n.settings.hoverPDFLinkToOpen){let{exists:f}=e.workspace.openPDFLinkTextInExistingLeafForTargetPDF(a,c,void 0,u);if(f)return}if(n.settings.ignoreHeightParamInPopoverPreview&&h.contains("height=")){let f=new URLSearchParams(h.slice(1));a=d+"#"+Array.from(f.entries()).filter(([p])=>p!=="height").map(([p,g])=>`${p}=${g}`).join("&")}}r.call(this,o,s,a,c,l)}}})),n.patchStatus.pagePreview=!0,!0};var Kx=require("obsidian");var Ih=class extends de{constructor(e,i,r){super(e);this.navButtonEl=null;this.renderer=i,this.file=r,this.pageTracker=new fg(e,i,r),this.isTrackingPage=e.settings.filterBacklinksByPageDefault}onload(){this.navButtonEl=this.renderer.headerDom.addNavButton("lucide-filter","Show only backlinks in the current page",()=>{this.isTrackingPage=!this.isTrackingPage,this.updatePageTracker()}),this.updatePageTracker(),this.registerDomEvent(this.renderer.backlinkDom.el,"mouseover",e=>{this.processBacklinkVisualizerDomForEvent(e,(i,r,o,s)=>{if(!this.settings.highlightOnHoverBacklinkPane||!fi(e,i))return;for(let l of r)l.addClass("hovered-highlight");let a=null;if(o.page&&o.annotation){let l=o.page,d=o.annotation.id;s.then(h=>{var p;let u=h.getPage(l),f=(p=u.annotationLayer)==null?void 0:p.annotationLayer.getAnnotation(d);f&&(a=this.lib.highlight.viewer.placeRectInPage(f.data.rect,u),a.addClass("pdf-plus-annotation-bounding-rect"))})}if(o.page&&o.FitR){let l=o.page,{left:d,bottom:h,right:u,top:f}=o.FitR;s.then(p=>{let g=p.getPage(l);a=this.lib.highlight.viewer.placeRectInPage([d,h,u,f],g),a.addClass("rect-highlight")})}let c=l=>{if(fi(l,i)){for(let d of r)d.removeClass("hovered-highlight");a&&a.remove(),i.removeEventListener("mouseout",c)}};i.addEventListener("mouseout",c)})})}onunload(){var e;(e=this.navButtonEl)==null||e.remove(),this.pageTracker.unload()}setParents(...e){return e.forEach(i=>i.addChild(this)),this.register(()=>e.forEach(i=>i.removeChild(this))),this}updatePageTracker(){this.navButtonEl.toggleClass("is-active",this.isTrackingPage),this.isTrackingPage?this.pageTracker.load():this.pageTracker.unload()}findBacklinkItemEl(e){var l,d;let{refCache:i,sourcePath:r}=e,o=this.renderer.backlinkDom,s=this.app.vault.getAbstractFileByPath(r);if(!(s instanceof Kx.TFile))return null;let a=o.getResult(s);if(!a)return null;if(!!a.childrenEl.querySelector(".better-search-views-tree")){let h=this.app.metadataCache.getFileCache(s);if(!(h!=null&&h.sections)||!("position"in i))return null;let u=new Set;for(let[p,g]of a.result.content){let m=h.sections.find(b=>b.position.start.offset<=p&&g<=b.position.end.offset);if(m&&(u.add(m),p===i.position.start.offset&&i.position.end.offset===g))break}let f=u.size-1;return f===-1?null:(d=a==null?void 0:a.childrenEl.querySelectorAll(".search-result-file-match")[f])!=null?d:null}else{let h=a==null?void 0:a.vChildren.children;if(!h)return null;let u=h.find(f=>{if("position"in i)return f.start<=i.position.start.offset&&i.position.end.offset<=f.end;for(let p of f.matches)return"key"in p&&p.key===i.key;return!1});return(l=u==null?void 0:u.el)!=null?l:null}}processBacklinkVisualizerDomForEvent(e,i){let r=e.target;if(!vt(e,r))return;let o=this.renderer.backlinkDom.vChildren.children.find(s=>s.el.contains(r));if(o){let s=o.file.path;this.lib.workspace.iteratePDFViewerComponents(a=>{if(a.visualizer){let c=a.visualizer.index.sourcePaths.get(s);for(let l of c){if(l.page===null)continue;let d=this.findBacklinkItemEl(l);if(d!=null&&d.contains(r)){let u=a.visualizer.domManager.getCacheToDomsMap(l.page).get(l);i(d,u,l,a)}}}})}}},fg=class extends de{constructor(e,i,r){super(e);this.renderer=i;this.file=r;this.matchCountObserver=new kc(this.renderer.backlinkDom.el,()=>{if(this.updateBacklinkCountEl(o=>`${o} in this page`),this.renderer.collapseAll)for(let o of this.renderer.backlinkDom.el.querySelectorAll(".tree-item.search-result")){let s=o.querySelector(":scope>.tree-item-self.search-result-file-title>.collapse-icon");s?s.style.visibility==="hidden"&&o.remove():o.remove()}else for(let o of this.renderer.backlinkDom.el.querySelectorAll(".tree-item.search-result:not(:has( .search-result-file-match))"))o.hasClass("is-collapsed")||o.remove()},{childList:!0,subtree:!0})}async onload(){this.renderer.backlinkDom.filter=void 0;let e=this.lib.workspace.getExistingLeafForPDFFile(this.file);if(e){await this.lib.workspace.ensureViewLoaded(e);let i=e.view;this.lib.isPDFView(i)&&i.viewer.then(r=>{this.renderer.backlinkDom.filter=(o,s)=>r.pdfViewer.pdfViewer?this.filter(r.pdfViewer.pdfViewer.currentPageNumber,s):!0,this.updateBacklinkDom(),this.lib.registerPDFEvent("pagechanging",r.pdfViewer.eventBus,this,o=>{var a;let s=typeof o.pageNumber=="number"?o.pageNumber:(a=r.pdfViewer.pdfViewer)==null?void 0:a.currentPageNumber;s&&(this.renderer.backlinkDom.filter=(c,l)=>this.filter(s,l)),this.updateBacklinkDom()})})}this.addChild(this.matchCountObserver)}onunload(){this.renderer.backlinkDom.filter=void 0,this.updateBacklinkDom()}updateBacklinkDom(){this.renderer.recomputeBacklink(this.file)}updateBacklinkCountEl(e){var r;let i=Array.from(this.renderer.backlinkDom.el.querySelectorAll("div.search-result-file-title span.tree-item-flair")).map(o=>+o.getText()).reduce((o,s)=>o+s,0);(r=this.renderer.backlinkCountEl)==null||r.setText(e?e(i):`${i}`)}filter(e,i){let r=Op(i.link),o=new URLSearchParams(r);return o.has("page")?!this.settings.showBacklinkToPage&&!o.has("selection")&&!o.has("annotation")&&!o.has("offset")&&!o.has("rect")?!1:+o.get("page")===e:!1}};var Gx=n=>{var o;let{app:t,lib:e}=n,i=(o=t.workspace.getLeavesOfType("backlink").find(s=>e.isBacklinkView(s.view)))==null?void 0:o.view,r=i==null?void 0:i.backlink;return!i||!r?!1:(n.register(Ze(Object.getPrototypeOf(i.constructor.prototype),{onLoadFile(s){return async function(a){await s.call(this,a),this.getViewType()==="backlink"&&a.extension==="pdf"&&(this.pdfManager=new Ih(n,this.backlink,a).setParents(n,this))}},onUnloadFile(s){return async function(a){let c=this;a.extension==="pdf"&&c.pdfManager&&c.pdfManager.unload(),await s.call(this,a)}}})),n.register(Ze(r.backlinkDom.constructor.prototype,{addResult(s){return function(a,c,l,d){var u;let h=this;if(h.filter){let f=t.metadataCache.getFileCache(a);if(f){let p=[];for(let[m,b]of c.content){let w=Ip(f,m,b);w&&h.filter(a,w)&&p.push([m,b])}c.content.length=0,c.content.push(...p);let g=[];for(let m of c.properties){let b=(u=f.frontmatterLinks)==null?void 0:u.find(w=>w.key===m.key);b&&h.filter(a,b)&&g.push(m)}c.properties.length=0,c.properties.push(...g)}}return s.call(this,a,c,l,d)}}})),e.workspace.iterateBacklinkViews(s=>{var a;((a=s.file)==null?void 0:a.extension)==="pdf"&&s.onLoadFile(s.file)}),n.patchStatus.backlink=!0,!0)};var ga=require("obsidian");var Xx=n=>{let t=n.app,e;return t.workspace.iterateAllLeaves(i=>{i.view instanceof ga.MarkdownView&&(e=i.view.editMode.clipboardManager)}),e?(n.register(Ze(e.constructor.prototype,{handleDragOver(i){return function(r){let o=t.dragManager.draggable;if(!o||o.source!=="pdf-plus")return i.call(this,r);(ga.Platform.isMacOS?r.shiftKey:r.altKey)||(VP(r,"link"),t.dragManager.setAction("Insert link here"))}},handleDrop(i){return function(r){let o=t.dragManager.draggable;if(!o||o.source!=="pdf-plus")return i.call(this,r);if(this.info instanceof ga.MarkdownView&&(ga.Platform.isMacOS?r.shiftKey:r.altKey))return r.preventDefault(),this.info.handleDrop(r,o,!1),!0;let s=this.info.editor;if(!s)return!1;let a=o.getText(this.getPath()),c=s.cm.posAtCoords({x:r.clientX,y:r.clientY},!1),l=s.offsetToPos(c);return s.setCursor(l),typeof a=="string"?(s.replaceSelection(a),s.focus(),r.preventDefault(),!0):!1}}})),!0):!1},RP={none:[],copy:["copy"],copyLink:["copy","link"],copyMove:["copy","move"],link:["link"],linkMove:["link","move"],move:["move"],all:["copy","link","move"],uninitialized:[]};function VP(n,t){if(!n.dataTransfer||n.dataTransfer.effectAllowed==="none"||n.dataTransfer.effectAllowed==="uninitialized")return;if(t==="none")return n.dataTransfer.dropEffect=t;RP[n.dataTransfer.effectAllowed].contains(t)&&(n.dataTransfer.dropEffect=t)}var Zx=require("obsidian");var Yx=n=>{n.register(Ze(Zx.Menu.prototype,{showAtPosition(t){return function(...e){var i;return n.settings.hoverableDropdownMenuInToolbar&&((i=this.parentEl)!=null&&i.closest("div.pdf-toolbar"))&&this.setUseNativeMenu(!1),n.shownMenus.add(this),t.call(this,...e)}},hide(t){return function(...e){return n.shownMenus.delete(this),t.call(this,...e)}}}))};var ge=require("obsidian");var Ei=require("obsidian");var ke=class{constructor(t){this.app=t.app,this.plugin=t}get lib(){return this.plugin.lib}get settings(){return this.plugin.settings}};var zo=require("obsidian"),BP=Un(require("obsidian")),Rc=class{constructor(t,e){this.plugin=t;this.variables=e}setVariable(t,e){this.variables[t]=e}evalPart(t){let e=new Function(...Object.keys(this.variables),`return ${t};`)(...Object.values(this.variables));if(e===void 0)throw Error(`The expression "${t}" cannot be evaluated.`);return e}evalTemplate(t){return t.replace(/{{(.*?)}}/g,(e,i)=>this.evalPart(i))}},Vc=class extends Rc{constructor(e,i){var h,u,f,p,g,m;let{app:r}=e;"colorName"in i&&(i.color=i.colorName);super(e,{...i,app:r,obsidian:BP,pdf:i.file,folder:i.file.parent,selection:i.text});this.app=r,this.lib=e.lib;let o=this.findMarkdownFileAssociatedToPDF(i.file),s=(u=o&&((h=r.metadataCache.getFileCache(o))==null?void 0:h.frontmatter))!=null?u:{};this.setVariable("md",o),this.setVariable("properties",s);let a=this.findLinkedFile(i.file),c=(p=a&&((f=r.metadataCache.getFileCache(a))==null?void 0:f.frontmatter))!=null?p:{};this.setVariable("linkedFile",a),this.setVariable("linkedFileProperties",c);let l=(g=r.plugins.plugins.dataview)==null?void 0:g.api,d=(m=r.plugins.plugins.quickadd)==null?void 0:m.api;l&&this.setVariable("dv",l),d&&this.setVariable("quickAddApi",d)}findMarkdownFileAssociatedToPDF(e){var s,a,c;let i=this.plugin.app,r=[],o=(s=i.plugins.plugins.dataview)==null?void 0:s.api;if(o)r=o.pages().where(d=>{var h;return o.array((h=d[this.plugin.settings.proxyMDProperty])!=null?h:[]).path.includes(e.path)}).map(d=>i.vault.getAbstractFileByPath(d.file.path)).filter(d=>d instanceof zo.TFile);else{let l=i.metadataCache.getBacklinksForFile(e);for(let d of l.keys()){let h=i.metadataCache.getCache(d);if(h&&((a=h.frontmatterLinks)==null?void 0:a.some(f=>{if(f.key!==this.plugin.settings.proxyMDProperty&&!new RegExp(`${this.plugin.settings.proxyMDProperty}.\\d+`).test(f.key))return!1;let p=(0,zo.getLinkpath)(f.link),g=i.metadataCache.getFirstLinkpathDest(p,d);return g&&g.path===e.path}))){let f=i.vault.getAbstractFileByPath(d);f instanceof zo.TFile&&r.push(f)}}}if(r.length>1){let l=`Multiple markdown files are associated with this PDF file:
${r.map(d=>"- "+d.path).join(`
`)}
Aborting.`;throw Error(l)}return(c=r.first())!=null?c:null}findLinkedFile(e){let i=null,r=this.lib.workspace.getActiveGroupLeaves();if(r){for(let o of r)if(o.view instanceof zo.FileView&&o.view.file&&o.view.file!==e){i=o.view.file;break}}return i}};var Lh=class extends ke{constructor(){super(...arguments);this.statusDurationMs=2e3}getPageAndTextRangeFromSelection(e){if(e=e!=null?e:activeWindow.getSelection(),!e)return null;let i=this.lib.getPageElFromSelection(e);if(!i||i.dataset.pageNumber===void 0)return null;let r=+i.dataset.pageNumber,o=e.rangeCount>0?e.getRangeAt(0):null;if(o){let s=this.getTextSelectionRange(i,o);if(s)return{page:r,selection:s}}return{page:r}}getTextSelectionRange(e,i){if(i&&!i.collapsed){let r=nh(e,i.startContainer),o=nh(e,i.endContainer);if(r&&o){let s=r.dataset.idx,a=o.dataset.idx,c=rh(r,i.startContainer,i.startOffset),l=rh(o,i.endContainer,i.endOffset);if(s!==void 0&&a!==void 0&&c!==null&&l!==null)return{beginIndex:+s,beginOffset:c,endIndex:+a,endOffset:l}}}return null}getTemplateVariables(e){var l,d,h;let i=activeWindow.getSelection();if(!i)return null;let r=this.lib.getPageElFromSelection(i);if(!r||r.dataset.pageNumber===void 0)return null;let o=this.lib.getPDFViewerChildAssociatedWithNode(r),s=o==null?void 0:o.file;if(!s)return null;let a=+r.dataset.pageNumber;i.toString()||(a=(d=(l=o.pdfViewer.pdfViewer)==null?void 0:l.currentPageNumber)!=null?d:a);let c=Cc({page:a,selection:o.getTextSelectionRangeStr(r),...e});return{child:o,file:s,subpath:c,page:a,pageCount:o.pdfViewer.pagesCount,pageLabel:(h=o.getPage(a).pageLabel)!=null?h:""+a,text:this.lib.toSingleLine(i.toString())}}getLinkTemplateVariables(e,i,r,o,s,a,c,l){l=l!=null?l:"";let d=this.app.fileManager.generateMarkdownLink(r,l,o).slice(1),h=this.app.metadataCache.fileToLinktext(r,l)+o;this.app.vault.getConfig("useMarkdownLinks")&&(h=xr(h));let u=this.getDisplayText(e,i,r,s,a,c),f=this.lib.generateMarkdownLink(r,l,o,u||void 0).slice(1),p=this.app.fileManager.generateMarkdownLink(r,l,`#page=${s}`).slice(1),g=this.lib.generateMarkdownLink(r,l,`#page=${s}`,u||void 0).slice(1);return{link:d,linktext:h,display:u,linkWithDisplay:f,linkToPage:p,linkToPageWithDisplay:g}}getDisplayText(e,i,r,o,s,a){var c;if(!i){let l=this.lib.getColorPaletteFromChild(e);l?i=this.settings.displayTextFormats[l.displayTextFormatIndex].template:i=this.settings.displayTextFormats[this.settings.defaultDisplayTextFormatIndex].template}try{return new Vc(this.plugin,{file:r,page:o,pageCount:e.pdfViewer.pagesCount,pageLabel:(c=e.getPage(o).pageLabel)!=null?c:""+o,text:s,comment:a!=null?a:""}).evalTemplate(i).trim()}catch(l){console.error(l),new Ei.Notice(`${this.plugin.manifest.name}: Display text format is invalid. Error: ${l.message}`,3e3)}}getTextToCopy(e,i,r,o,s,a,c,l,d,h){var g,m,b,w,F,v;let u=e.getPage(s);if(typeof h!="string"){let P=ta(a).get("annotation");h=typeof P=="string"&&((F=(w=(b=(m=(g=u==null?void 0:u.annotationLayer)==null?void 0:g.annotationLayer)==null?void 0:m.getAnnotation(P))==null?void 0:b.data)==null?void 0:w.contentsObj)==null?void 0:F.str),h=this.lib.toSingleLine(h||"")}return new Vc(this.plugin,{file:o,page:s,pageLabel:(v=u.pageLabel)!=null?v:""+s,pageCount:e.pdfViewer.pagesCount,text:c,comment:h,colorName:l,calloutType:this.settings.calloutType,...this.lib.copyLink.getLinkTemplateVariables(e,r,o,a,s,c,h,d)}).evalTemplate(i)}async getTextToCopyForOutlineItem(e,i,r,o){return(await this.getTextToCopyForOutlineItemDynamic(e,i,r))(o)}async getTextToCopyForOutlineItemDynamic(e,i,r){let o=await r.getExplicitDestination(),s=await r.getPageNumber(),a=this.lib.normalizePDFJsDestArray(o,s),c=this.lib.destArrayToSubpath(a);return l=>this.getTextToCopy(e,this.settings.outlineLinkCopyFormat,this.settings.outlineLinkDisplayTextFormat,i,s,c,r.item.title,"",l)}getSelectionLinkInfo(){var s;let e=this.lib.getColorPaletteAssociatedWithSelection();if(!e)return null;let i=this.settings.copyCommands[e.actionIndex].template,r=(s=e.selectedColorName)!=null?s:void 0,o=e.writeFile;return{template:i,colorName:r,writeFile:o}}getAnnotationLinkInfo(){let e=this.plugin.lastAnnotationPopupChild;if(!e)return null;let i=e.activeAnnotationPopupEl;if(!i)return null;let r=i.querySelector(".popupMeta div.clickable-icon:has(svg.lucide-copy)");if(!r)return null;let o=this.lib.getColorPaletteAssociatedWithNode(r),s;o?s=this.settings.copyCommands[o.actionIndex].template:s=this.settings.copyCommands[this.settings.defaultColorPaletteActionIndex].template;let a=this.lib.getAnnotationInfoFromPopupEl(i);if(!a)return null;let{page:c,id:l}=a;return{child:e,copyButtonEl:r,template:s,page:c,id:l}}copyLinkToSelection(e,i,r,o){let s=this.getTemplateVariables(r?{color:r.toLowerCase()}:{});if(s){let{child:a,file:c,subpath:l,page:d,text:h}=s;if(!h)if(this.settings.useAnotherCopyTemplateWhenNoSelection)i.copyFormat=this.settings.copyTemplateWhenNoSelection;else return!1;return e||(async()=>{var g,m;let u=this.getTextToCopy(a,i.copyFormat,i.displayTextFormat,c,d,l,h,(g=r==null?void 0:r.toLowerCase())!=null?g:"");await navigator.clipboard.writeText(u),this.onCopyFinish(u);let f=this.lib.getColorPaletteFromChild(a);f==null||f.setStatus("Link copied",this.statusDurationMs),this.autoFocusOrAutoPaste(u,o,f!=null?f:void 0);let p=Ln(l);if(p&&"beginIndex"in p){let b=(m=a.getPage(d).textLayer)==null?void 0:m.textContentItems[p.beginIndex];if(b){let w=b.transform[4],F=b.transform[5]+b.height;typeof w=="number"&&typeof F=="number"&&(this.plugin.lastCopiedDestInfo={file:c,destArray:[d-1,"XYZ",w,F,null]})}}})(),!0}return!1}copyLinkToAnnotation(e,i,r,o,s,a,c){let l=e.file;if(!l)return!1;if(!i){let d=e.getPage(o);e.getAnnotatedText(d,s).then(async h=>{var v,P,k,C;let u=(C=(k=(P=(v=d.annotationLayer)==null?void 0:v.annotationLayer)==null?void 0:P.getAnnotation(s))==null?void 0:k.data)!=null?C:(await d.pdfPage.getAnnotations()).find(D=>D.id===s),f=u!=null&&u.color?`${u.color[0]}, ${u.color[1]}, ${u.color[2]}`:"",p=`#page=${o}&annotation=${s}`;if(u.subtype==="Square"){let D=u.rect;p+=`&rect=${D[0]},${D[1]},${D[2]},${D[3]}`}let g=this.getTextToCopy(e,r.copyFormat,r.displayTextFormat,l,o,p,h!=null?h:"",f);await navigator.clipboard.writeText(g),this.onCopyFinish(g);let m=this.lib.getColorPaletteFromChild(e);c&&(m==null||m.setStatus("Link copied",this.statusDurationMs)),this.autoFocusOrAutoPaste(g,a,m!=null?m:void 0);let b=u==null?void 0:u.rect,w=b==null?void 0:b[0],F=b==null?void 0:b[3];typeof w=="number"&&typeof F=="number"&&(this.plugin.lastCopiedDestInfo={file:l,destArray:[o-1,"XYZ",w,F,null]})})}return!0}copyLinkToAnnotationWithGivenTextAndFile(e,i,r,o,s,a,c,l,d){return o||(async()=>{let h=this.getTextToCopy(r,s.copyFormat,s.displayTextFormat,i,a,`#page=${a}&annotation=${c}`,e,l);await navigator.clipboard.writeText(h),this.onCopyFinish(h);let u=this.lib.getColorPaletteFromChild(r);u==null||u.setStatus("Link copied",this.statusDurationMs),this.autoFocusOrAutoPaste(h,d,u!=null?u:void 0)})(),!0}writeHighlightAnnotationToSelectionIntoFileAndCopyLink(e,i,r,o){let s=activeWindow.getSelection();if(!s)return!1;let a=this.lib.toSingleLine(s.toString());if(!a)return!1;if(!e){let c=this.lib.getColorPaletteAssociatedWithSelection();c==null||c.setStatus("Writing highlight annotation into file...",1e4),this.lib.highlight.writeFile.addTextMarkupAnnotationToSelection(this.settings.selectionBacklinkVisualizeStyle==="highlight"?"Highlight":"Underline",r).then(l=>{if(!l)return;let{child:d,file:h,page:u,annotationID:f,rects:p}=l;!f||!h||setTimeout(()=>{let g=this.lib.getColorPaletteFromChild(d);g==null||g.setStatus("Link copied",this.statusDurationMs);let{r:m,g:b,b:w}=this.plugin.domManager.getRgb(r);if(this.copyLinkToAnnotationWithGivenTextAndFile(a,h,d,!1,i,u,f,`${m}, ${b}, ${w}`,o),p){let F=Math.min(...p.map(P=>P[0])),v=Math.max(...p.map(P=>P[3]));typeof F=="number"&&typeof v=="number"&&(this.plugin.lastCopiedDestInfo={file:h,destArray:[u-1,"XYZ",F,v,null]})}},300)})}return!0}copyEmbedLinkToRect(e,i,r,o,s,a,c){if(a||(a=this.settings.autoPaste),!i.file)return!1;let l=i.file,d=this.lib.getColorPaletteFromChild(i);if(o.some(h=>isNaN(h)))return d==null||d.setStatus("Invalid selection",this.statusDurationMs),!1;if(!e){let h=this.getDisplayText(i,void 0,l,r,""),u=`#page=${r}&rect=${o.map(p=>Math.round(p)).join(",")}`;s&&(u+=`&color=${s}`);let f=this.lib.generateMarkdownLink(l,c!=null?c:"",u,h);(async()=>{let p=f,g=i.getPage(r).pdfPage,m=this.settings.rectImageExtension;if(!this.settings.rectEmbedStaticImage)await navigator.clipboard.writeText(p),this.onCopyFinish(p);else if(this.settings.rectImageFormat==="file"){let b=await this.app.fileManager.getAvailablePathForAttachment(l.basename+"."+m,"");p=(!this.app.vault.getConfig("useMarkdownLinks")?`![[${b}]]`:`![](${xr(b)})`)+`
`+f.slice(1),await navigator.clipboard.writeText(p);let v=async()=>{let P=await this.lib.pdfPageToImageArrayBuffer(g,{type:`image/${m}`,cropRect:o});return await this.app.vault.createBinary(b,P)};a?(await v(),this.onCopyFinish(p)):this.onCopyFinish(p,v)}else p=`![](${await this.lib.pdfPageToImageDataUrl(g,{type:`image/${m}`,cropRect:o})})`+`
`+f.slice(1),await navigator.clipboard.writeText(p),this.onCopyFinish(p);this.plugin.lastCopiedDestInfo={file:l,destArray:[r-1,"FitR",...o]},d==null||d.setStatus("Link copied",this.statusDurationMs),await this.autoFocusOrAutoPaste(p,a,d!=null?d:void 0)})()}return!0}copyLinkToSearch(e,i,r,o,s,a){if(!i.file)return!1;let c=i.file,l=this.lib.getColorPaletteFromChild(i);if(!e){let d=this.lib.copyLink.getDisplayText(i,void 0,c,r,o),h=this.lib.generateMarkdownLink(c,"",`#search=${o}`,d).slice(1);(async()=>(await navigator.clipboard.writeText(h),this.onCopyFinish(h),l==null||l.setStatus("Link copied",this.statusDurationMs),await this.autoFocusOrAutoPaste(h,s,l!=null?l:void 0)))()}return!0}makeCanvasTextNodeFromSelection(e,i,r,o){var a;let s=this.getTemplateVariables(o?{color:o.toLowerCase()}:{});if(s){let{child:c,file:l,subpath:d,page:h,text:u}=s;if(!u)return!1;if(!e){let f=this.getTextToCopy(c,r,void 0,l,h,d,u,(a=o==null?void 0:o.toLowerCase())!=null?a:"");i.createTextNode({pos:i.posCenter(),position:"center",text:f})}return!0}return!1}makeCanvasTextNodeFromAnnotation(e,i,r,o,s,a){let c=r.file;if(!c)return!1;if(!e){let l=r.getPage(s);r.getAnnotatedText(l,a).then(d=>{let h=this.getTextToCopy(r,o,void 0,c,s,`#page=${s}&annotation=${a}`,d!=null?d:"","");i.createTextNode({pos:i.posCenter(),position:"center",text:h})})}return!0}async autoPaste(e){let i=this.getAutoFocusOrAutoPasteTarget(this.settings.autoPasteTarget);if(i)return await this.pasteTextToFile(e,i),!0;if(!this.settings.executeCommandWhenTargetNotIdentified)return!1;let r=this.app.commands.findCommand(this.settings.commandToExecuteWhenTargetNotIdentified);if(!r)return new Ei.Notice(`${this.plugin.manifest.name}: Command "${this.settings.commandToExecuteWhenTargetNotIdentified}" was not found. Please update the "Command to execute when pasting a link for the first time with auto-focus or auto-paste" setting.`),!1;let o=!1;return new Promise(s=>{let a=this.app.workspace.on("file-open",async l=>{l&&l.extension==="md"&&(this.app.workspace.offref(a),await this.pasteTextToFile(e,l,!0),this.plugin.lastPasteFile=l,s(!0))}),c=this.lib.workspace.hoverEditor;this.plugin.registerOneTimeEvent(this.app.workspace,"active-leaf-change",l=>{l&&c.isHoverEditorLeaf(l)&&c.postProcessHoverEditorLeaf(l)}),this.app.commands.executeCommandById(r.id),activeWindow.setTimeout(()=>{if(!o){let{noticeEl:l}=new Ei.Notice(`${this.plugin.manifest.name}: Could not find the auto-paste target markdown file within ${this.settings.autoPasteTargetDialogTimeoutSec} seconds.`);l.appendText(" Click "),l.createEl("a",{text:"here"},d=>{d.addEventListener("click",()=>{this.plugin.openSettingTab().scrollTo("autoPasteTargetDialogTimeoutSec")})}),l.appendText(" to change the timeout duration."),this.app.workspace.offref(a),s(!1)}},this.settings.autoPasteTargetDialogTimeoutSec*1e3)}).then(s=>(o=!0,s))}async autoFocus(){let e=this.getAutoFocusOrAutoPasteTarget(this.settings.autoFocusTarget);if(e){let{leaf:o,isExistingLeaf:s}=await this.prepareMarkdownLeafForPaste(e);return o&&o.view instanceof Ei.MarkdownView&&await this.updateAndRevealCursorInEditor(o.view,{focus:!0,goEnd:!s}),!0}if(!this.settings.executeCommandWhenTargetNotIdentified)return!1;let i=this.app.commands.findCommand(this.settings.commandToExecuteWhenTargetNotIdentified);if(!i)return new Ei.Notice(`${this.plugin.manifest.name}: Command "${this.settings.commandToExecuteWhenTargetNotIdentified}" was not found. Please update the "Command to execute when pasting a link for the first time with auto-focus or auto-paste" setting.`),!1;let r=this.lib.workspace.hoverEditor;return this.plugin.registerOneTimeEvent(this.app.workspace,"active-leaf-change",o=>{o&&r.isHoverEditorLeaf(o)&&r.postProcessHoverEditorLeaf(o)}),this.app.commands.executeCommandById(i.id)}getAutoFocusOrAutoPasteTarget(e){let i=this.plugin.lastActiveMarkdownFile,r=this.plugin.lastPasteFile,o=!!(i&&this.lib.workspace.isMarkdownFileOpened(i)),s=null;return e==="last-paste"?s=r:e==="last-active"?s=i:e==="last-active-and-open"?o&&(s=i):e==="last-paste-then-last-active"?s=r!=null?r:i:e==="last-paste-then-last-active-and-open"?r?s=r:o&&(s=i):e==="last-active-and-open-then-last-paste"&&(o?s=i:r&&(s=r)),s&&s.extension==="md"?s:null}async prepareMarkdownLeafForPaste(e){let i=this.lib.workspace.getExistingLeafForMarkdownFile(e),r=!!i;if(!i&&this.settings.openAutoFocusTargetIfNotOpened){let o=this.settings.howToOpenAutoFocusTargetIfNotOpened;if(o==="hover-editor"){let s=await this.lib.workspace.hoverEditor.createNewHoverEditorLeaf({hoverPopover:null},null,e.path,"");s&&(i=s)}else i=this.lib.workspace.getLeaf(o),await i.openFile(e,{active:!1});if(i&&this.settings.openAutoFocusTargetInEditingView){await this.lib.workspace.ensureViewLoaded(i);let s=i.view;s instanceof Ei.MarkdownView&&(await s.setState({mode:"source"},{history:!1}),s.setEphemeralState({focus:!1}))}}return i&&(await this.lib.workspace.ensureViewLoaded(i),this.lib.workspace.hoverEditor.postProcessHoverEditorLeaf(i),this.settings.closeSidebarWhenLostFocus&&this.lib.workspace.registerHideSidebar(i)),{leaf:i,isExistingLeaf:r}}async pasteTextToFile(e,i,r=!1){let{leaf:o,isExistingLeaf:s}=await this.prepareMarkdownLeafForPaste(i);if(!r&&o&&s&&o.view instanceof Ei.MarkdownView&&o.view.getMode()==="source"){let a=o.view,c=a.editor;if(this.settings.respectCursorPositionWhenAutoPaste)c.replaceSelection(e);else{let l=c.getValue();l=l.trimEnd(),l&&(l+=`
`),l+=e,c.setValue(l)}a.save(),await this.updateAndRevealCursorInEditor(o.view,{focus:this.settings.focusEditorAfterAutoPaste,goEnd:!this.settings.respectCursorPositionWhenAutoPaste})}else await this.app.vault.process(i,a=>(a=a.trimEnd(),a&&(a+=`
`),a+=e,a)),o&&activeWindow.setTimeout(async()=>{o.view instanceof Ei.MarkdownView&&await this.updateAndRevealCursorInEditor(o.view,{focus:this.settings.focusEditorAfterAutoPaste,goEnd:!0})})}async updateAndRevealCursorInEditor(e,i){let{focus:r,goEnd:o}=i,s=e.editor;r&&(o&&s.exec("goEnd"),await this.lib.workspace.revealLeaf(e.leaf),this.app.workspace.setActiveLeaf(e.leaf),s.focus());let a=s.coordsAtPos(s.getCursor(),!0);if(a){let c=s.getScrollInfo();if(a.top<c.top||a.top>c.top+c.clientHeight){let l={from:s.getCursor("from"),to:s.getCursor("to")};s.scrollIntoView(l,!0)}}}watchPaste(e,i){this.plugin.registerOneTimeEvent(this.app.workspace,"editor-paste",(r,o,s)=>{var d;if(((d=s.file)==null?void 0:d.extension)!=="md"||!r.clipboardData)return;let c=r.clipboardData.getData("text/plain").replace(/\r\n/g,`
`),l=e.replace(/\r\n/g,`
`);c===l&&(this.plugin.lastPasteFile=s.file,i==null||i()),s instanceof Ei.MarkdownView&&setTimeout(()=>s.save())})}onCopyFinish(e,i){this.watchPaste(e,i),this.plugin.lastCopiedDestInfo=null}async autoFocusOrAutoPaste(e,i,r){if(i||this.settings.autoPaste)if(await this.autoPaste(e)){if(r==null||r.setStatus("Link copied & pasted",this.statusDurationMs),!this.settings.focusEditorAfterAutoPaste&&this.settings.clearSelectionAfterAutoPaste){let s=activeWindow.getSelection();s&&this.lib.copyLink.getPageAndTextRangeFromSelection(s)&&s.empty()}}else r==null||r.setStatus("Link copied but paste target not identified",this.statusDurationMs);else this.settings.autoFocus&&(await this.autoFocus()||r==null||r.setStatus("Link copied but paste target not identified",this.statusDurationMs))}};var Oh=class extends ke{computeMergedHighlightRects(t,e,i,r,o){let{textContentItems:s,textDivs:a,div:c}=t,l=[],d=null,h=[];o===0&&(r--,o=s[r].str.length);for(let u=e;u<=r;u++){let f=s[u],p=a[u];if(!f.str)continue;let g=this.computeHighlightRectForItem(c,f,p,u,e,i,r,o);g&&(d?this.areRectanglesMergeable(d,g)?(d=this.mergeRectangles(d,g),h.push(u)):(l.push({rect:d,indices:h}),d=g,h=[u]):(d=g,h=[u]))}return d&&l.push({rect:d,indices:h}),l}computeHighlightRectForItem(t,e,i,r,o,s,a,c){return e.chars&&e.chars.length>=e.str.length?this.computeHighlightRectForItemFromChars(e,r,o,s,a,c):this.computeHighlightRectForItemFromTextLayer(t,e,i,r,o,s,a,c)}computeHighlightRectForItemFromChars(t,e,i,r,o,s){let a=t.chars.slice(t.chars.findIndex(u=>u.c===t.str.charAt(0)),t.chars.findLastIndex(u=>u.c===t.str.charAt(t.str.length-1))+1),c=e===i?r:0,l=(e===o?Math.min(s,a.length):a.length)-1;if(c>a.length-1||l<0)return null;let d=a[c],h=a[l];return[Math.min(d.r[0],h.r[0]),Math.min(d.r[1],h.r[1]),Math.max(d.r[2],h.r[2]),Math.max(d.r[3],h.r[3])]}computeHighlightRectForItemFromTextLayer(t,e,i,r,o,s,a,c){let l=r===o?s:0,d=r===a?c:void 0,h=e.transform[4],u=e.transform[5],f=e.transform[4]+e.width,p=e.transform[5]+e.height,g=i.cloneNode();t.appendChild(g);let m=e.str.substring(0,l);g.appendText(m);let b=e.str.substring(l,d),w=g.createSpan();if(w.appendText(b),d!==void 0){let P=e.str.substring(d);g.appendText(P)}let F=w.getBoundingClientRect(),v=i.getBoundingClientRect();return g.remove(),[h+(F.left-v.left)/v.width*e.width,u+(F.bottom-v.bottom)/v.height*e.height,f-(v.right-F.right)/v.width*e.width,p-(v.top-F.top)/v.height*e.height]}areRectanglesMergeable(t,e){return this.areRectanglesMergeableHorizontally(t,e)||this.areRectanglesMergeableVertically(t,e)}areRectanglesMergeableHorizontally(t,e){let[i,r,o,s]=t,[a,c,l,d]=e,h=(r+s)/2,u=(c+d)/2,f=Math.abs(s-r),p=Math.abs(d-c),g=Math.max(f,p)*.5;return Math.abs(h-u)<g}areRectanglesMergeableVertically(t,e){let[i,r,o,s]=t,[a,c,l,d]=e,h=Math.abs(o-i),u=Math.abs(l-a),f=Math.abs(s-r),p=Math.abs(d-c),g=Math.max(h,u)*.1;return Math.abs(i-a)<g&&Math.abs(o-l)<g&&f/h>.85&&p/u>.85}mergeRectangles(...t){let e=t.map(s=>s[0]),i=t.map(s=>s[1]),r=t.map(s=>s[2]),o=t.map(s=>s[3]);return[Math.min(...e),Math.min(...i),Math.max(...r),Math.max(...o)]}rectsToQuadPoints(t){return t.flatMap(([e,i,r,o])=>[e,o,r,o,e,i,r,i])}};var Mh=require("obsidian");var Nh=class extends ke{getPDFPlusBacklinkHighlightLayer(t){var i;let e=t.div;return(i=e.querySelector("div.pdf-plus-backlink-highlight-layer"))!=null?i:e.createDiv("pdf-plus-backlink-highlight-layer",r=>{window.pdfjsLib.setLayerDimensions(r,t.viewport)})}placeRectInPage(t,e){let i=e.pdfPage.view,r=i[0],o=i[1],s=i[2]-i[0],a=i[3]-i[1],c=window.pdfjsLib.Util.normalizeRect([t[0],i[3]-t[1]+i[1],t[2],i[3]-t[3]+i[1]]),d=this.getPDFPlusBacklinkHighlightLayer(e).createDiv("pdf-plus-backlink");return d.setCssStyles({left:`${100*(c[0]-r)/s}%`,top:`${100*(c[1]-o)/a}%`,width:`${100*(c[2]-c[0])/s}%`,height:`${100*(c[3]-c[1])/a}%`}),d}highlightSubpath(t,e){var i,r,o;if(((i=t.subpathHighlight)==null?void 0:i.type)==="text"){let s=new Mh.Component;s.load(),this.lib.onTextLayerReady(t.pdfViewer,s,a=>{var d;if(((d=t.subpathHighlight)==null?void 0:d.type)!=="text")return;let{page:c,range:l}=t.subpathHighlight;c===a&&(t.highlightText(c,l),e>0&&setTimeout(()=>{t.clearTextHighlight()},e*1e3),s.unload())})}else if(((r=t.subpathHighlight)==null?void 0:r.type)==="annotation"){let s=new Mh.Component;s.load(),this.lib.onAnnotationLayerReady(t.pdfViewer,s,a=>{var d;if(((d=t.subpathHighlight)==null?void 0:d.type)!=="annotation")return;let{page:c,id:l}=t.subpathHighlight;c===a&&(t.highlightAnnotation(c,l),e>0&&setTimeout(()=>t.clearAnnotationHighlight(),e*1e3),s.unload())})}else if(((o=t.subpathHighlight)==null?void 0:o.type)==="rect"){let s=new Mh.Component;s.load(),this.lib.onPageReady(t.pdfViewer,s,a=>{var d;if(((d=t.subpathHighlight)==null?void 0:d.type)!=="rect")return;let{page:c,rect:l}=t.subpathHighlight;c===a&&(this.highlightRect(t,c,l),e>0&&setTimeout(()=>{this.clearRectHighlight(t)},e*1e3),s.unload())})}}highlightRect(t,e,i){if(this.clearRectHighlight(t),1<=e&&e<=t.pdfViewer.pagesCount){let r=t.getPage(e);r!=null&&r.div.dataset.loaded&&(t.rectHighlight=this.placeRectInPage(i,r),t.rectHighlight.addClass("rect-highlight"),this.settings.zoomToFitRect||activeWindow.setTimeout(()=>{window.pdfjsViewer.scrollIntoView(t.rectHighlight,{top:-this.settings.embedMargin})}))}}clearRectHighlight(t){t.rectHighlight&&(t.rectHighlight.detach(),t.rectHighlight=null)}};var Jx=require("obsidian");var Rh=class extends ke{async addTextMarkupAnnotation(t,e,i,r,o,s){if(!this.plugin.settings.author)throw new Error(`${this.plugin.manifest.name}: The author name is not set. Please set it in the plugin settings.`);return await this.process(t,a=>{let c=a.getPage(e-1),{r:l,g:d,b:h}=this.plugin.domManager.getRgb(o),u=mp(),f=this.lib.highlight.geometry,p=this.addAnnotation(c,{Subtype:r,Rect:f.mergeRectangles(...i),QuadPoints:f.rectsToQuadPoints(i),Contents:M.fromText(s!=null?s:""),M:G.fromDate(new Date),T:M.fromText(this.plugin.settings.author),CA:r==="Highlight"?this.plugin.settings.writeHighlightToFileOpacity:1,Border:r==="Highlight"?[u,u,0]:void 0,C:[l/255,d/255,h/255]});return Tc(p.objectNumber,p.generationNumber)})}async addHighlightAnnotation(t,e,i,r,o){return await this.addTextMarkupAnnotation(t,e,i,"Highlight",r,o)}async addLinkAnnotation(t,e,i,r,o,s){return await this.process(t,a=>{let c=a.getPage(e-1),l=pr(this.plugin.settings.pdfLinkColor),{r:d,g:h,b:u}=l!=null?l:{r:0,g:0,b:0},f=this.lib.highlight.geometry,p;typeof r=="string"?p=G.of(r):p=[a.getPage(r[0]).ref,r[1],...r.slice(2).map(w=>typeof w=="number"?N.of(w):Me)];let g=this.addAnnotation(c,{Subtype:"Link",Rect:f.mergeRectangles(...i),QuadPoints:f.rectsToQuadPoints(i),Dest:p,M:G.fromDate(new Date),Border:[0,0,this.plugin.settings.pdfLinkBorder?1:0],C:[d/255,h/255,u/255]});return Tc(g.objectNumber,g.generationNumber)})}async process(t,e){let i=await this.lib.loadPdfLibDocument(t),r=await e(i);return await this.app.vault.modifyBinary(t,await i.save()),r}async read(t,e){let i=await this.lib.loadPdfLibDocument(t);return await e(i)}addAnnotation(t,e){let i=t.doc.context,r=i.register(i.obj({Type:"Annot",...e}));return t.node.addAnnot(r),r}async deleteAnnotation(t,e,i){await this.process(t,r=>{let o=r.getPage(e-1),s=this.findAnnotationRef(o,i);s&&o.node.removeAnnot(s)})}async getAnnotationContents(t,e,i){let r=await this.getAnnotation(t,e,i);if(r){let o=this.getContentsFromAnnotation(r);return o!=null?o:null}return null}async setAnnotationContents(t,e,i,r){await this.processAnnotation(t,e,i,o=>{this.setContentsToAnnotation(o,r)})}async getAnnotationColor(t,e,i){var o;let r=await this.getAnnotation(t,e,i);return r&&(o=this.getColorFromAnnotation(r))!=null?o:null}async setAnnotationColor(t,e,i,r){await this.processAnnotation(t,e,i,async o=>{this.setColorToAnnotation(o,r)})}async getAnnotationOpacity(t,e,i){var o;let r=await this.getAnnotation(t,e,i);return r&&(o=this.getOpacityFromAnnotation(r))!=null?o:null}async setAnnotationOpacity(t,e,i,r){await this.processAnnotation(t,e,i,async o=>{this.setOpacityToAnnotation(o,r)})}findAnnotationRef(t,e){var i;return(i=t.node.Annots())==null?void 0:i.asArray().find(r=>r instanceof q&&Tc(r.objectNumber,r.generationNumber)===e)}async getAnnotation(t,e,i){return await this.read(t,r=>{let o=r.getPage(e-1),s=this.findAnnotationRef(o,i);return s?o.node.context.lookup(s,R):null})}async processAnnotation(t,e,i,r){return await this.process(t,async o=>{let s=o.getPage(e-1),a=this.findAnnotationRef(s,i);if(a){let c=s.node.context.lookup(a,R);await r(c)}})}getColorFromAnnotation(t){if(!t.get(x.of("AP"))){let i=t.get(x.of("C"));if(i instanceof H){let r=i.asArray();if(r.length===3){let[o,s,a]=r.map(c=>{if(c instanceof N)return Math.round(c.asNumber()*255);throw new Error(`${this.plugin.manifest.name}: Invalid color`)});return{r:o,g:s,b:a}}}}}setColorToAnnotation(t,e){let i=t.get(x.of("C"));i instanceof H&&(i.set(0,N.of(e.r/255)),i.set(1,N.of(e.g/255)),i.set(2,N.of(e.b/255)))}getContentsFromAnnotation(t){let e=t.get(x.of("Contents"));if(e instanceof G||e instanceof M)return e.decodeText()}setContentsToAnnotation(t,e){t.set(x.of("Contents"),M.fromText(e))}getOpacityFromAnnotation(t){if(!t.get(x.of("AP"))){let i=t.get(x.of("CA"));if(i instanceof N)return i.asNumber()}}setOpacityToAnnotation(t,e){t.set(x.of("CA"),N.of(e))}getAuthorFromAnnotation(t){let e=t.get(x.of("T"));if(e instanceof G||e instanceof M)return e.decodeText()}setAuthorToAnnotation(t,e){t.set(x.of("T"),M.fromText(e))}getBorderWidthFromAnnotation(t){let e=t.get(x.of("Border"));if(e instanceof H){let i=e.asArray()[2];if(i instanceof N)return i.asNumber()}}setBorderWidthToAnnotation(t,e){let i=t.get(x.of("Border"));i instanceof H&&i.set(2,N.of(e))}};var Vh=class extends ke{constructor(e){super(e);this.pdflib=new Rh(e)}getPdfIo(){return this.pdflib}async addTextMarkupAnnotationToSelection(e,i){return this.addAnnotationToSelection(async(r,o,s)=>await this.getPdfIo().addTextMarkupAnnotation(r,o,s,e,i))}async addLinkAnnotationToSelection(e){return this.addAnnotationToSelection(async(i,r,o)=>await this.getPdfIo().addLinkAnnotation(i,r,o,e))}async addAnnotationToSelection(e){let i=this.lib.copyLink.getTemplateVariables({});if(!i)return;let{subpath:r,child:o}=i,s=Ln(r);if(s&&"beginIndex"in s){let{page:a,beginIndex:c,beginOffset:l,endIndex:d,endOffset:h}=s;return{child:o,file:o.file,page:a,...await this.addAnnotationToTextRange(e,o,a,c,l,d,h)}}return null}async addAnnotationToTextRange(e,i,r,o,s,a,c){if(i.file&&1<=r&&r<=i.pdfViewer.pagesCount){let l=i.getPage(r);if(l!=null&&l.textLayer&&l.div.dataset.loaded){let h=this.lib.highlight.geometry.computeMergedHighlightRects(l.textLayer,o,s,a,c).map(({rect:f})=>f),u;try{u=await e(i.file,r,h)}catch(f){new Jx.Notice(`${this.plugin.manifest.name}: An error occurred while attemping to add an annotation.`),console.error(f)}return{annotationID:u,rects:h}}}}async deleteAnnotation(e,i,r){await this.getPdfIo().deleteAnnotation(e,i,r)}async getAnnotationContents(e,i,r){return await this.getPdfIo().getAnnotationContents(e,i,r)}async setAnnotationContents(e,i,r,o){return await this.getPdfIo().setAnnotationContents(e,i,r,o)}};var Bh=class extends ke{async getAnnotatedTextsInDocument(t){let e=new Map;for(let i=1;i<=t.numPages;i++){let r=await t.getPage(i),o=await this.getAnnotatedTextsInPage(r);e.set(i,o)}return e}async getAnnotatedTextsInPage(t){var o;let[{items:e},i]=await Promise.all([t.getTextContent({includeChars:!0}),t.getAnnotations()]),r=[];for(let s of i){if(!["Highlight","Underline","Squiggly","StrikeOut"].includes(s.subtype))continue;let c=[];for(let u of s.quadPoints){let f=u[1],p=u[2],g=[p.x,p.y,f.x,f.y];if(g.some(m=>typeof m!="number"))throw new Error("Invalid rect");g=window.pdfjsLib.Util.normalizeRect(g),c.push(this.getTextByRect(e,g))}let l=s.color?{r:s.color[0],g:s.color[1],b:s.color[2]}:null,d=(o=s.contentsObj)==null?void 0:o.str,h=s.quadPoints[0];r.push({id:s.id,textRanges:c,rgb:l,comment:d,left:h[0].x,top:h[0].y})}return new Map(r.sort((s,a)=>{if(s.textRanges.length&&a.textRanges.length){let c=s.textRanges[0].from,l=a.textRanges[0].from;return c.index-l.index||c.offset-l.offset}return a.top-s.top||s.left-a.left}).map(s=>{let a=s.textRanges.map(c=>c.text).join(`
`);return a=this.lib.toSingleLine(a),[s.id,{text:a,rgb:s.rgb,comment:s.comment}]}))}getTextByRect(t,e){let[i,r,o,s]=e,a="",c={index:-1,offset:-1},l={index:-1,offset:-1};for(let d=0;d<t.length;d++){let h=t[d];if(h.chars&&h.chars.length)for(let u=0;u<h.chars.length;u++){let f=h.chars[u],p=(f.r[0]+f.r[2])/2,g=(f.r[1]+f.r[3])/2;i<=p&&p<=o&&r<=g&&g<=s&&(a+=f.u,c.index===-1&&c.offset===-1&&(c={index:d,offset:u}),l={index:d,offset:u+1})}}return{text:a,from:c,to:l}}};var Hh=class extends ke{constructor(e){super(e);this.plugin=e;this.geometry=new Oh(e),this.viewer=new Nh(e),this.writeFile=new Vh(e),this.extract=new Bh(e)}};var Ye=require("obsidian");function HP(n){return["tab","split","window"].contains(n)}function UP(n){return["right","left","down","up"].contains(n)}function Qx(n){return["right-sidebar","left-sidebar"].contains(n)}var Uh=class extends ke{constructor(...e){super(...e);this.hoverEditor=new pg(...e)}iteratePDFViews(e){this.app.workspace.iterateAllLeaves(i=>{let r=i.view;this.lib.isPDFView(r)&&e(r)})}iterateBacklinkViews(e){this.app.workspace.getLeavesOfType("backlink").forEach(i=>e(i.view))}iterateCanvasViews(e){this.app.workspace.iterateAllLeaves(i=>{let r=i.view;this.lib.isCanvasView(r)&&e(r)})}iteratePDFViewerComponents(e){this.app.workspace.iterateAllLeaves(i=>{let r=i.view;this.lib.isPDFView(r)?e(r.viewer,r.file):r instanceof Ye.MarkdownView?this.lib.getAllPDFEmbedInMarkdownView(r).forEach(o=>e(o.viewer,o.file)):this.lib.isCanvasView(r)&&this.lib.getAllPDFEmbedInCanvasView(r).forEach(o=>e(o.viewer,o.file))})}iteratePDFViewerChild(e){this.iteratePDFViewerComponents(i=>{i.then(r=>e(r))})}getActivePDFView(){var i;if(this.plugin.classes.PDFView)return this.app.workspace.getActiveViewOfType(this.plugin.classes.PDFView);let e=(i=this.app.workspace.activeLeaf)==null?void 0:i.view;return e&&this.lib.isPDFView(e)?e:null}getActiveCanvasView(){var i;let e=(i=this.app.workspace.activeLeaf)==null?void 0:i.view;return e&&this.lib.isCanvasView(e)?e:null}getExistingLeafForPDFFile(e){return this.getExistingLeafForFile(e)}getActiveGroupLeaves(){var i;let e=(i=this.app.workspace.activeLeaf)==null?void 0:i.group;return e?this.app.workspace.getGroupLeaves(e):null}async openMarkdownLinkFromPDF(e,i,r,o){var c;let s;r?s=this.app.workspace.getLeaf(r):Qx(this.settings.paneTypeForFirstMDLeaf)&&this.settings.alwaysUseSidebar?s=this.getMarkdownLeafInSidebar(this.settings.paneTypeForFirstMDLeaf):s=this.getMarkdownLeafForLinkFromPDF(e,i);let a={};if(o){if("pos"in o){let{pos:l}=o;a.eState={line:l.start.line,startLoc:l.start,endLoc:l.end}}else{let{line:l}=o;a.eState={line:l}}a.eState.scroll=a.eState.line,a.eState.focus=!this.settings.dontActivateAfterOpenMD}s.parentSplit instanceof Ye.WorkspaceTabs&&s.parentSplit===((c=this.app.workspace.activeLeaf)==null?void 0:c.parentSplit)||(a.active=!this.plugin.settings.dontActivateAfterOpenMD),await s.openLinkText(e,i,a),await this.revealLeaf(s)}getMarkdownLeafInSidebar(e){var i;return this.settings.singleMDLeafInSidebar?(i=this.lib.workspace.getExistingMarkdownLeafInSidebar(e))!=null?i:this.lib.workspace.getNewLeafInSidebar(e):this.lib.workspace.getNewLeafInSidebar(e)}getMarkdownLeafForLinkFromPDF(e,i){var c;let{path:r}=(0,Ye.parseLinktext)(e),o=this.app.metadataCache.getFirstLinkpathDest(r,i),s,a;return this.app.workspace.iterateAllLeaves(l=>{if(s)return;let d=!0;if(l.view.getViewType()==="markdown"){let h=l.getRoot();for(let u of this.settings.ignoreExistingMarkdownTabIn)if(h===this.app.workspace[u])return;l.parentSplit instanceof Ye.WorkspaceTabs&&l.parentSplit.children.some(f=>{if(f instanceof Ye.WorkspaceLeaf&&f.view.getViewType()==="pdf")return this.getFilePathFromView(f.view)===i})&&(d=!1),d&&(a=l.parentSplit),o&&this.getFilePathFromView(l.view)===o.path&&(s=l)}}),s||(Qx(this.settings.paneTypeForFirstMDLeaf)&&this.settings.singleMDLeafInSidebar&&a&&this.isInSidebar(a)?s=(c=this.getExistingMarkdownLeafInSidebar(this.settings.paneTypeForFirstMDLeaf))!=null?c:this.lib.workspace.getNewLeafInSidebar(this.settings.paneTypeForFirstMDLeaf):s=a?this.app.workspace.createLeafInParent(a,-1):this.getLeaf(this.plugin.settings.paneTypeForFirstMDLeaf)),s}isInSidebar(e){let i=e.getRoot();return i===this.app.workspace.rightSplit||i===this.app.workspace.leftSplit}getLeaf(e){return e===""&&(e=!1),typeof e=="boolean"||HP(e)?this.app.workspace.getLeaf(e):UP(e)?this.getLeafBySplit(e):this.getLeafInSidebar(e)}getLeafBySplit(e){let i=this.app.workspace.getMostRecentLeaf();if(i){if(["right","left"].contains(e))return this.app.workspace.createLeafBySplit(i,"vertical",e==="left");if(["down","up"].contains(e))return this.app.workspace.createLeafBySplit(i,"horizontal",e==="up")}return this.app.workspace.createLeafInParent(this.app.workspace.rootSplit,0)}getLeafInSidebar(e){return this.getNewLeafInSidebar(e)}getExistingMarkdownLeafInSidebar(e){let i,r=e==="right-sidebar"?this.app.workspace.rightSplit:this.app.workspace.leftSplit;return this.app.workspace.iterateAllLeaves(o=>{i||o.getRoot()!==r||o.view.getViewType()==="markdown"&&(i=o)}),i!=null?i:null}getNewLeafInSidebar(e){let i=e==="right-sidebar"?this.app.workspace.getRightLeaf(!1):this.app.workspace.getLeftLeaf(!1);if(!i)throw new Error("No sidebar leaf found");return i}async revealLeaf(e){if((0,Ye.requireApiVersion)("1.5.11")){await this.app.workspace.revealLeaf(e);return}if(!Ye.Platform.isDesktopApp){this.app.workspace.revealLeaf(e);return}let i=e.getRoot();i instanceof Ye.WorkspaceSidedock&&i.collapsed&&i.toggle();let r=e.parent;r instanceof Ye.WorkspaceTabs&&r.selectTab(e),e.getContainer().focus()}openPDFLinkTextInLeaf(e,i,r,o){let{subpath:s}=(0,Ye.parseLinktext)(i);return this.plugin.patchStatus.pdfInternals||(this.plugin.subpathWhenPatched=s),e.openLinkText(i,r,o).then(async()=>{await this.revealLeaf(e);let a=e.view;this.lib.isPDFView(a)&&a.viewer.then(c=>{let l=this.plugin.settings.highlightDuration;this.lib.highlight.viewer.highlightSubpath(c,l)})})}openPDFLinkTextInExistingLeafForTargetPDF(e,i,r,o){var c,l;if(!o){let{path:d}=(0,Ye.parseLinktext)(e);o=(c=this.app.metadataCache.getFirstLinkpathDest(d,i))!=null?c:void 0}if(!o)return{exists:!1,promise:Promise.resolve()};let s=this.getExistingLeafForPDFFile(o);return s?(s.parentSplit instanceof Ye.WorkspaceTabs&&s.parentSplit===((l=this.app.workspace.activeLeaf)==null?void 0:l.parentSplit)||(r=r!=null?r:{},r.active=!this.settings.dontActivateAfterOpenPDF),s.isVisible()&&this.settings.highlightExistingTab&&(s.containerEl.addClass("pdf-plus-link-opened","is-highlighted"),setTimeout(()=>s.containerEl.removeClass("pdf-plus-link-opened","is-highlighted"),this.settings.existingTabHighlightDuration*1e3)),{exists:!0,promise:this.openPDFLinkTextInLeaf(s,e,i,r)}):{exists:!1,promise:Promise.resolve()}}getExistingLeafForFile(e){let i=this.app.viewRegistry.getTypeByExtension(e.extension);if(!i)return null;let r=null;return this.app.workspace.iterateAllLeaves(o=>{r||o.view.getViewType()===i&&this.getFilePathFromView(o.view)===e.path&&(r=o)}),r}getExistingLeafForMarkdownFile(e){return this.getExistingLeafForFile(e)}isMarkdownFileOpened(e){return!!this.getExistingLeafForMarkdownFile(e)}registerHideSidebar(e){let i=e.getRoot();if(i===this.app.workspace.leftSplit||i===this.app.workspace.rightSplit){let r=i,o=this.app.workspace.on("active-leaf-change",s=>{s&&s.getRoot()!==r&&(r.collapse(),this.app.workspace.offref(o))})}}getFilePathFromView(e){let i=e.getState().file;return typeof i=="string"?i:null}async ensureViewLoaded(e){(0,Ye.requireApiVersion)("1.7.2")&&await e.loadIfDeferred()}},pg=class extends ke{get hoverEditorPlugin(){var t;return(t=this.app.plugins.plugins["obsidian-hover-editor"])!=null?t:null}get waitTime(){var t;return(t=this.hoverEditorPlugin)==null?void 0:t.settings.triggerDelay}isHoverEditorLeaf(t){return t.containerEl.closest(".popover.hover-popover.hover-editor")!==null}async createNewHoverEditorLeaf(t,e,i,r,o){return this.hoverEditorPlugin?new Promise(s=>{var c;let a=this.app.workspace.on("active-leaf-change",l=>{l&&this.isHoverEditorLeaf(l)&&(this.app.workspace.offref(a),s(l))});this.app.workspace.trigger("link-hover",t,e,i,r,o),window.setTimeout(()=>{this.app.workspace.offref(a),s(null)},((c=this.waitTime)!=null?c:300)+300)}):null}iterateHoverEditorLeaves(t){this.app.workspace.iterateAllLeaves(e=>{this.isHoverEditorLeaf(e)&&t(e)})}getHoverEditorForLeaf(t){var e,i;return(i=(e=this.hoverEditorPlugin)==null?void 0:e.activePopovers.find(r=>r.hoverEl.contains(t.containerEl)))!=null?i:null}postProcessHoverEditorLeaf(t){if(this.isHoverEditorLeaf(t)){let e=this.getHoverEditorForLeaf(t);if(e&&(e.hoverEl.hasClass("is-minimized")&&e.toggleMinimized(),this.settings.closeHoverEditorWhenLostFocus)){let i=this.app.workspace.on("active-leaf-change",r=>{r!==t&&(e.hide(),this.app.workspace.offref(i))})}}}};var st=require("obsidian");var zh=class extends ke{constructor(...e){super(...e);let i=[{id:"copy-link-to-selection",name:"Copy link to selection or annotation",checkCallback:r=>this.copyLink(r,!1)},{id:"rectangular-selection",name:"Start rectangular selection",checkCallback:r=>this.copyEmbedLinkToRectangularSelection(r,!1)},{id:"context-menu",name:"Show context menu at selection",checkCallback:r=>this.showContextMenu(r)},{id:"extract-annotation-and-copy-links",name:"Extract & copy annotations in this PDF",checkCallback:r=>this.extractHighlightedText(r)},{id:"copy-link-to-page-view",name:"Copy link to current page view",checkCallback:r=>this.copyLinkToPageView(r)},{id:"outline",name:"Show outline",checkCallback:r=>this.showOutline(r)},{id:"thumbnail",name:"Show thumbnail",checkCallback:r=>this.showThumbnail(r)},{id:"close-sidebar",name:"Close PDF sidebar",checkCallback:r=>this.closeSidebar(r)},{id:"fit-width",name:"Fit width",checkCallback:r=>this.setScaleValue(r,"page-width")},{id:"fit-height",name:"Fit height",checkCallback:r=>this.setScaleValue(r,"page-height")},{id:"zoom-in",name:"Zoom in",checkCallback:r=>this.zoom(r,!0)},{id:"zoom-out",name:"Zoom out",checkCallback:r=>this.zoom(r,!1)},{id:"adapt-to-theme",name:"Adapt to theme",checkCallback:r=>this.toggleAdaptToTheme(r,!0)},{id:"not-adapt-to-theme",name:"Don't adapt to theme",checkCallback:r=>this.toggleAdaptToTheme(r,!1)},{id:"toggle-adapt-to-theme",name:'Toggle "adapt to theme"',checkCallback:r=>this.toggleAdaptToTheme(r)},{id:"go-to-page",name:"Go to page",checkCallback:r=>this.focusAndSelectPageNumberEl(r)},{id:"copy-format-menu",name:"Show copy format menu",checkCallback:r=>this.showCopyFormatMenu(r)},{id:"display-text-format-menu",name:"Show display text format menu",checkCallback:r=>this.showDisplayTextFormatMenu(r)},{id:"enable-pdf-edit",name:"Enable PDF edit",checkCallback:r=>this.setWriteFile(r,!0)},{id:"disable-pdf-edit",name:"Disable PDF edit",checkCallback:r=>this.setWriteFile(r,!1)},{id:"toggle-auto-focus",name:"Toggle auto-focus",callback:()=>this.toggleAutoFocus()},{id:"toggle-auto-paste",name:"Toggle auto-paste",callback:()=>this.toggleAutoPaste()},{id:"toggle-auto-copy",name:"Toggle auto-copy",callback:()=>this.plugin.autoCopyMode.toggle()},{id:"add-page",name:"Add new page at the end",checkCallback:r=>this.addPage(r)},{id:"insert-page-before",name:"Insert page before this page",checkCallback:r=>this.insertPage(r,!0)},{id:"insert-page-after",name:"Insert page after this page",checkCallback:r=>this.insertPage(r,!1)},{id:"delete-page",name:"Delete this page",checkCallback:r=>this.deletePage(r)},{id:"extract-this-page",name:"Extract this page to a new file",checkCallback:r=>this.extractThisPage(r)},{id:"divide",name:"Divide this PDF into two files at this page",checkCallback:r=>this.dividePDF(r)},{id:"edit-page-labels",name:"Edit page labels",checkCallback:r=>this.editPageLabels(r)},{id:"copy-outline-as-list",name:"Copy PDF outline as markdown list",checkCallback:r=>this.copyOutline(r,"list")},{id:"copy-outline-as-headings",name:"Copy PDF outline as markdown headings",checkCallback:r=>this.copyOutline(r,"heading")},{id:"add-outline-item",name:"Add to outline (bookmark)",checkCallback:r=>this.addOutlineItem(r)},{id:"create-new-note",name:"Create new note for auto-focus or auto-paste",callback:()=>this.createNewNote()},{id:"copy-debug-info",name:"Copy debug info",callback:()=>this.copyDebugInfo()},{id:"load-debug-info",name:"Load debug info",checkCallback:r=>this.loadDebugInfo(r)},{id:"create-pdf",name:"Create new PDF",callback:()=>this.createPDF()},{id:"import",name:"Import this PDF into vault",checkCallback:r=>this.importExternalFileIntoVault(r)},{id:"open-external",name:"Open this PDF in the original location",checkCallback:r=>this.openExternalSource(r)},{id:"create-dummy",name:"Create dummy file for external PDF",callback:()=>this.createDummyForExternalPDF()}];this.commands={};for(let r of i)this.commands[r.id]=r}registerCommands(){Object.values(this.commands).forEach(e=>this.plugin.addCommand(e))}getCommand(e){return e.startsWith(this.plugin.manifest.id+":")&&(e=e.slice(this.plugin.manifest.id.length+1)),this.commands[e]}listCommands(){return Object.values(this.commands)}listCommandNames(){return Object.values(this.commands).map(e=>this.stripCommandNamePrefix(e.name))}stripCommandNamePrefix(e){return e.startsWith(this.plugin.manifest.name+": ")?e.slice(this.plugin.manifest.name.length+2):e}copyLink(e,i=!1){return!this.writeHighlightAnnotationToSelectionIntoFileAndCopyLink(e,i)&&!this.copyLinkToAnnotation(e,i)?this.copyLinkToSelection(e,i):!0}createCanvasCard(e){return this.createCanvasCardFromAnnotation(e)?!0:this.createCanvasCardFromSelection(e)}copyLinkToSelection(e,i=!1){let r=this.lib.copyLink.getSelectionLinkInfo();if(!r)return!1;let{template:o,colorName:s}=r;return this.lib.copyLink.copyLinkToSelection(e,{copyFormat:o},s,i)}copyLinkToAnnotation(e,i=!1){let r=this.lib.copyLink.getAnnotationLinkInfo();if(!r)return!1;let{child:o,copyButtonEl:s,template:a,page:c,id:l}=r,d=this.lib.copyLink.copyLinkToAnnotation(o,e,{copyFormat:a},c,l,i);return!e&&d&&(0,st.setIcon)(s,"lucide-check"),d}writeHighlightAnnotationToSelectionIntoFileAndCopyLink(e,i=!1){var a;let r=this.lib.getColorPaletteAssociatedWithSelection();if(!r||!r.writeFile)return!1;let o=this.settings.copyCommands[r.actionIndex].template,s=(a=r.selectedColorName)!=null?a:void 0;return this.lib.copyLink.writeHighlightAnnotationToSelectionIntoFileAndCopyLink(e,{copyFormat:o},s,i)}copyEmbedLinkToRectangularSelection(e,i){let r=this.lib.getColorPalette();return!r||!r.cropButtonEl?!1:(e||r.startRectangularSelection(i),!0)}createCanvasCardFromSelection(e){var a;let i=(a=this.lib.workspace.getActiveCanvasView())==null?void 0:a.canvas;if(!i)return!1;let r=this.lib.copyLink.getSelectionLinkInfo();if(!r)return!1;let{template:o,colorName:s}=r;return this.lib.copyLink.makeCanvasTextNodeFromSelection(e,i,o,s)}createCanvasCardFromAnnotation(e){var d;let i=(d=this.lib.workspace.getActiveCanvasView())==null?void 0:d.canvas;if(!i)return!1;let r=this.lib.copyLink.getAnnotationLinkInfo();if(!r)return!1;let{child:o,template:s,page:a,id:c}=r;return this.lib.copyLink.makeCanvasTextNodeFromAnnotation(e,i,o,s,a,c)}copyLinkToPageView(e){var o,s,a,c,l;let i=this.lib.getPDFView(!0);if(!i||!i.file)return!1;let r=i.getState();if(typeof r.left!="number"||typeof r.top!="number")return!1;if(!e){let d=`#page=${r.page}`,h;((s=(o=i.viewer.child)==null?void 0:o.pdfViewer.pdfViewer)==null?void 0:s.currentScaleValue)==="page-width"?(d+=`&offset=,${r.top},`,h=[r.page-1,"FitBH",r.top]):(d+=`&offset=${r.left},${r.top},${(a=r.zoom)!=null?a:0}`,h=[r.page-1,"XYZ",r.left,r.top,(c=r.zoom)!=null?c:0]);let f=(l=i.viewer.child)==null?void 0:l.getPageLinkAlias(r.page),p=this.lib.generateMarkdownLink(i.file,"",d,f).slice(1);navigator.clipboard.writeText(p),new st.Notice(`${this.plugin.manifest.name}: Link copied to clipboard`),this.plugin.lastCopiedDestInfo={file:i.file,destArray:h}}return!0}showOutline(e){var o;let i=this.lib.getObsidianViewer(!0);if(!i)return!1;let r=(o=i.dom)==null?void 0:o.containerEl;if(!i.isEmbed||r&&r.contains(r.doc.activeElement)){let s=i==null?void 0:i.pdfSidebar;if(s)return s.haveOutline?s.isOpen&&s.active===2?this.settings.closeSidebarWithShowCommandIfExist?(e||s.close(),!0):!1:(e||s.switchView(2,!0),!0):!1}return this.settings.executeBuiltinCommandForOutline&&this.app.internalPlugins.plugins.outline.enabled?(e||this.app.commands.executeCommandById("outline:open"),!0):!1}showThumbnail(e){var r;let i=(r=this.lib.getObsidianViewer(!0))==null?void 0:r.pdfSidebar;return i?i.isOpen&&i.active===1?this.settings.closeSidebarWithShowCommandIfExist?(e||i.close(),!0):!1:(e||i.switchView(1,!0),!0):!1}closeSidebar(e){var r;let i=(r=this.lib.getObsidianViewer(!0))==null?void 0:r.pdfSidebar;return!i||!i.isOpen?!1:(e||i.close(),!0)}setScaleValue(e,i){let r=this.lib.getPDFViewer(!0);return r?(e||(r.currentScaleValue=i),!0):!1}zoom(e,i){var s;let r=this.lib.getObsidianViewer(!0);if(!r)return!1;let o=(s=r.dom)==null?void 0:s.containerEl;if((!r.isEmbed||o&&o.contains(o.doc.activeElement))&&r)return e||(i?r.zoomIn():r.zoomOut()),!0;if(this.settings.executeFontSizeAdjusterCommand){let a=i?"font-size:increment-font-size":"font-size:decrement-font-size";if(this.app.commands.findCommand(a))return e||this.app.commands.executeCommandById(a),!0}if(this.settings.executeBuiltinCommandForZoom){let a=i?"window:zoom-in":"window:zoom-out";return this.app.commands.findCommand(a)?(e||this.app.commands.executeCommandById(a),!0):!1}return!1}toggleAdaptToTheme(e,i){let r=this.lib.getPDFViewerChild(!0);if(!r)return!1;let o=!!this.app.loadLocalStorage("pdfjs-is-themed");return typeof i=="boolean"&&(i&&o||!i&&!o)?!1:(i=i!=null?i:!o,e||(this.app.saveLocalStorage("pdfjs-is-themed",i?"true":null),r.onCSSChange()),!0)}focusAndSelectPageNumberEl(e){let i=this.lib.getToolbar(!0);return i?(e||(i.pageInputEl.focus(),i.pageInputEl.select()),!0):!1}showCopyFormatMenu(e){let i=this.lib.getColorPalette();return!i||!i.actionMenuEl?!1:(e||i.actionMenuEl.click(),!0)}showDisplayTextFormatMenu(e){let i=this.lib.getColorPalette();return!i||!i.displayTextFormatMenuEl?!1:(e||i.displayTextFormatMenuEl.click(),!0)}setWriteFile(e,i){let r=this.lib.getColorPalette();return!r||!this.lib.isEditable(r.child)||r.writeFile===i?!1:(e||r.setWriteFile(i),!0)}toggleAutoFocus(){this.plugin.toggleAutoFocus()}toggleAutoPaste(){this.plugin.toggleAutoPaste()}addPage(e){if(!this.lib.composer.isEnabled())return!1;let i=this.app.workspace.getActiveFile();return!i||i.extension!=="pdf"?!1:(e||this.lib.composer.addPage(i),!0)}insertPage(e,i){if(!this.lib.composer.isEnabled())return!1;let r=this.lib.workspace.getActivePDFView();if(!r||!r.file)return!1;let o=r.file,s=r.getState().page,a=s+(i?0:1);return e||this._insertPage(o,a,s),!0}_insertPage(e,i,r){new Nn(this.plugin,this.settings.askPageLabelUpdateWhenInsertPage,this.settings.pageLabelUpdateWhenInsertPage,!1,!1).ask().then(o=>{this.lib.composer.insertPage(e,i,r,o)})}deletePage(e){if(!this.lib.composer.isEnabled())return!1;let i=this.lib.workspace.getActivePDFView();if(!i||!i.file)return!1;let r=i.file,o=i.getState().page;return e||this._deletePage(r,o),!0}_deletePage(e,i){new ch(e,i,this.plugin).openIfNeccessary().then(()=>{new Nn(this.plugin,this.settings.askPageLabelUpdateWhenDeletePage,this.settings.pageLabelUpdateWhenDeletePage,!1,!1).ask().then(r=>{this.lib.composer.removePage(e,i,r)})})}extractThisPage(e){if(!this.lib.composer.isEnabled())return!1;let i=this.lib.workspace.getActivePDFView();if(!i)return!1;let r=i.file;if(!r)return!1;if(!e){let o=i.getState().page;this._extractPage(r,o)}return!0}_extractPage(e,i){let r=this.lib.getAvailablePathForCopy(e);new Nn(this.plugin,this.settings.askPageLabelUpdateWhenExtractPage,this.settings.pageLabelUpdateWhenExtractPage,this.settings.askExtractPageInPlace,this.settings.extractPageInPlace).ask().then((o,s)=>{this.lib.composer.extractPages(e,[i],r,!1,o,s).then(async a=>{if(!a){new st.Notice(`${this.plugin.manifest.name}: Failed to extract page.`);return}if(this.settings.openAfterExtractPages){let c=this.lib.workspace.getLeaf(this.settings.howToOpenExtractedPDF);await c.openFile(a),await this.lib.workspace.revealLeaf(c)}})})}dividePDF(e){if(!this.lib.composer.isEnabled())return!1;let i=this.lib.workspace.getActivePDFView();if(!i)return!1;let r=i.file;if(!r)return!1;if(!e){let o=i.getState().page;this._dividePDF(r,o)}return!0}_dividePDF(e,i){let r=this.lib.getAvailablePathForCopy(e);new Nn(this.plugin,this.settings.askPageLabelUpdateWhenExtractPage,this.settings.pageLabelUpdateWhenExtractPage,this.settings.askExtractPageInPlace,this.settings.extractPageInPlace).ask().then((o,s)=>{this.lib.composer.extractPages(e,{from:i},r,!1,o,s).then(async a=>{if(!a){new st.Notice(`${this.plugin.manifest.name}: Failed to divide PDF.`);return}if(this.settings.openAfterExtractPages){let c=this.lib.workspace.getLeaf(this.settings.howToOpenExtractedPDF);await c.openFile(a),await this.lib.workspace.revealLeaf(c)}})})}createPDF(){var a,c,l;let e=this.app.workspace.getActiveFile(),i=this.settings.newPDFLocation,r=i==="root"?"/":i=="current"?(c=(a=e==null?void 0:e.parent)==null?void 0:a.path)!=null?c:"":(0,st.normalizePath)(this.settings.newPDFFolderPath),o=(l=this.app.vault.getAbstractFileByPath(r))!=null?l:this.app.vault.getRoot(),s=this.app.vault.getAvailablePath((0,st.normalizePath)(o.path+"/Untitled"),"pdf");new dh(this.plugin).askOptions().then(async d=>{let h=await this.app.vault.createBinary(s,await d.save());await this.app.workspace.getLeaf("tab").openFile(h)})}editPageLabels(e){let i=this.lib.workspace.getActivePDFView();if(!i||!i.viewer.child||!this.lib.isEditable(i.viewer.child))return!1;let r=i.file;return r?(e||new ph(this.plugin,r).open(),!0):!1}copyOutline(e,i){let r=this.lib.getPDFViewerChild(!0),o=r==null?void 0:r.file;if(!r||!o||!r.pdfViewer.pdfSidebar.haveOutline)return!1;if(!e){let a=i==="list"?this.settings.copyOutlineAsListFormat:this.settings.copyOutlineAsHeadingsFormat,c=i==="list"?this.settings.copyOutlineAsListDisplayTextFormat:this.settings.copyOutlineAsHeadingsDisplayTextFormat,l=this.settings.copyOutlineAsHeadingsMinLevel;(async()=>{let d=await Ce.fromFile(o,this.plugin),h="",u=this.app.vault.getConfig("useTab"),f=this.app.vault.getConfig("tabSize"),p=u?" ":" ".repeat(f);await d.iterAsync({enter:async g=>{var m;if(!g.isRoot()){let b=null,w=g.getExplicitDestination();w&&(b=await this.lib.destArrayToSubpath(w));let F=b?(m=Ln(b))==null?void 0:m.page:void 0,v=b&&F!==void 0?this.lib.copyLink.getTextToCopy(r,a,c,o,F,b,g.title,"",""):g.title;i==="list"?h+=`${p.repeat(g.depth-1)}- ${v}
`:i==="heading"&&(h+="#".repeat(g.depth+l-1)+` ${v}
`)}}}),navigator.clipboard.writeText(h),new st.Notice(`${this.plugin.manifest.name}: Outline copied to clipboard.`)})()}return!0}addOutlineItem(e){let i=this.lib.workspace.getActivePDFView(),r=i==null?void 0:i.file,o=i==null?void 0:i.viewer.child;if(!i||!r||!o||!this.lib.isEditable(o))return!1;let s=i.getState(),a=this.lib.viewStateToDestArray(s,!0);return a?(e||new vr(this.plugin,"Add to outline").ask().then(async({title:c})=>{let l=await Ce.fromFile(r,this.plugin),d=l.doc;l.ensureRoot().createChild(c,a).updateCountForAllAncestors(),l.ensureRoot().sortChildren(),await this.app.vault.modifyBinary(r,await d.save())}),!0):!1}async createNewNote(){var h;let e=this.app.workspace.getActiveFile(),i=(h=e==null?void 0:e.path)!=null?h:"",r=this.app.fileManager.getNewFileParent(i),o="",s="";if(e&&e.extension==="pdf"){let u=new Rc(this.plugin,{file:e,folder:e.parent,app:this.app}),f=this.settings.newFileNameFormat;f&&(o=u.evalTemplate(f));let p=this.settings.newFileTemplatePath;if(p){let g=this.app.vault.getAbstractFileByPath(p);g instanceof st.TFile&&(s=await this.app.vault.read(g),s=u.evalTemplate(s))}}let a=await this.app.fileManager.createNewMarkdownFile(r,o,s||void 0),c=async()=>{let{leaf:u,isExistingLeaf:f}=await this.lib.copyLink.prepareMarkdownLeafForPaste(a);if(u){await this.lib.workspace.revealLeaf(u),this.app.workspace.setActiveLeaf(u);let p=u.view;if(p instanceof st.MarkdownView){let g=p.editor;g.focus(),f||g.exec("goEnd")}}};if(this.settings.howToOpenAutoFocusTargetIfNotOpened!=="hover-editor"){await c();return}let d=this.app.metadataCache.on("resolve",async u=>{u===a&&(this.app.metadataCache.offref(d),setTimeout(()=>c(),100))})}extractHighlightedText(e){let i=this.lib.getPDFViewerChild();if(!i)return!1;let r=i.file;if(!r)return!1;if(!e){let o=this.lib.getColorPaletteFromChild(i),s=o?this.settings.copyCommands[o.actionIndex].template:this.settings.copyCommands[this.settings.defaultColorPaletteActionIndex].template,a="";(async()=>{var d;let c=(d=this.lib.getPDFDocument(!0))!=null?d:await this.lib.loadPDFDocument(r);(await this.lib.highlight.extract.getAnnotatedTextsInDocument(c)).forEach((h,u)=>{h.forEach(({text:f,rgb:p,comment:g},m)=>{a&&(a=a.trimEnd()+`
`);let b=p?`${p.r},${p.g},${p.b}`:"";a+=this.lib.copyLink.getTextToCopy(i,s,void 0,r,u,`#page=${u}&annotation=${m}`,f,b,void 0,g)})}),navigator.clipboard.writeText(a),new st.Notice(`${this.plugin.manifest.name}: Highlighted text copied to clipboard.`)})()}return!0}copyDebugInfo(){var s;let e=Object.assign({},this.settings,{author:"*".repeat(this.settings.author.length)}),i=(s=this.app.plugins.plugins["obsidian-style-settings"])==null?void 0:s.settingsManager.settings,r=i?Object.fromEntries(Object.entries(i).filter(([a])=>a.startsWith("pdf-plus@@"))):null,o=this.plugin.domManager.styleEl.textContent;navigator.clipboard.writeText(JSON.stringify({settings:e,styleSettings:r,styleSheet:o},null,4)),new st.Notice(`${this.plugin.manifest.name}: Debug info copied to clipboard.`)}loadDebugInfo(e){return this.plugin.isDebugMode?(e||(async()=>{try{let{settings:i,styleSettings:r,styleSheet:o}=JSON.parse(await navigator.clipboard.readText());new st.Notice(`${this.plugin.manifest.name}: Debug info loaded from clipboard.`),console.debug("Loaded debug info:"),console.debug("- settings:",i),console.debug("- styleSettings:",r),console.debug("- styleSheet:",o),window.pdfPlusDebugInfo={settings:i,styleSettings:r,styleSheet:o},this.plugin.settings=i;let s=this.app.setting.pluginTabs.find(a=>a.id===this.plugin.manifest.id);s&&await s.hide()}catch(i){new st.Notice(`${this.plugin.manifest.name}: Debug info not found in clipboard.`)}})(),!0):!1}importExternalFileIntoVault(e){let i=this.lib.getPDFViewerChild(!0);return!i||!i.isFileExternal||!i.palette?!1:(e||i.palette.importFile(),!0)}openExternalSource(e){let i=this.lib.getPDFViewerChild(!0),r=i==null?void 0:i.file;return!i||!i.isFileExternal||!r?!1:(e||(async()=>{let o=(await this.app.vault.read(r)).trim();window.open(o,"_blank")})(),!0)}createDummyForExternalPDF(){new Pr(this.plugin).open()}showContextMenu(e){let i=this.lib.getPDFViewerChild(!0);if(!i)return!1;let o=i.containerEl.doc.getSelection();return!o||!o.focusNode||o.isCollapsed?!1:(e||Fh(this.plugin,i,o),!0)}};var qt=require("obsidian");var qh=class extends ke{constructor(...e){super(...e);this.fileOperator=new gg(this.plugin),this.linkUpdater=new mg(this.plugin)}isEnabled(){return this.settings.enablePDFEdit}async addPage(e){return await this.linkUpdater.updateLinks(()=>this.fileOperator.addPage(e),[e],(i,r)=>({}))}async insertPage(e,i,r,o){return await this.linkUpdater.updateLinks(()=>this.fileOperator.insertPage(e,i,r,o),[e],(s,a)=>({pageNumber:typeof a=="number"&&a>=i?a+1:a}))}async removePage(e,i,r){return await this.linkUpdater.updateLinks(()=>this.fileOperator.removePage(e,i,r),[e],(o,s)=>({pageNumber:typeof s=="number"&&s>i?s-1:s}))}async mergeFiles(e,i,r){let o=(await this.fileOperator.read(e)).getPageCount();return await this.linkUpdater.updateLinks(()=>this.fileOperator.mergeFiles(e,i,r),[e,i],(s,a)=>s===e?{}:{file:e,pageNumber:typeof a=="number"?a+o:a})}async extractPages(e,i,r,o,s,a){let c;return Array.isArray(i)?c=i:(i.from===void 0&&(i.from=1),i.to===void 0&&(i.to=(await this.fileOperator.read(e)).getPageCount()),c=kp(i.from,i.to+1)),await this.linkUpdater.updateLinks(()=>this.fileOperator.extractPages(e,c,r,o,s,a),[e],(l,d)=>{if(d===void 0)return{};if(c.includes(d))return{file:r,pageNumber:c.filter(h=>h<=d).length};if(a){let h=c.filter(u=>u<d).length;return h>0?{pageNumber:d-h}:{}}return{}})}},gg=class extends ke{constructor(...e){super(...e);this.pageLabelUpdater=new bg(this.plugin)}async read(e){return await this.lib.loadPdfLibDocument(e)}async write(e,i,r){let o=await i.save(),s=this.app.vault.getAbstractFileByPath(e);if(s instanceof qt.TFile)return r||new qt.Notice(`${this.plugin.manifest.name}: File already exists: ${e}`),await this.app.vault.modifyBinary(s,o),s;if(s===null){let a=(0,qt.normalizePath)(e.split("/").slice(0,-1).join("/"));return a&&(this.app.vault.getAbstractFileByPath(a)||await this.app.vault.createFolder(a)),await this.app.vault.createBinary(e,o)}return null}async addPage(e){let i=await this.read(e),r=i.getPage(i.getPageCount()-1),{width:o,height:s}=r.getSize();return i.addPage([o,s]),await this.write(e.path,i,!0)}async insertPage(e,i,r,o){let s=await this.read(e);this.pageLabelUpdater.insertPage(s,i,o);let a=s.getPage(r-1),{width:c,height:l}=a.getSize();return s.insertPage(i-1,[c,l]),await this.write(e.path,s,!0)}async removePage(e,i,r){let o=await this.read(e);return this.pageLabelUpdater.removePage(o,i,r),o.removePage(i-1),await(await Ce.fromDocument(o,this.plugin)).prune(),await this.write(e.path,o,!0)}async mergeFiles(e,i,r){let[o,s]=await Promise.all([this.read(e),this.read(i)]);this.pageLabelUpdater.mergeFiles(o,s,r);let a=await o.copyPages(s,s.getPageIndices());for(let l of a)o.addPage(l);let c=await this.write(e.path,o,!0);return c===null?null:(await this.app.vault.delete(i),c)}async extractPages(e,i,r,o,s,a){if(i.length===0)throw new Error("No pages to extract");return a?await this.extractPagesInPlace(e,i,r,o,s):await this.extractPagesAsNewFile(e,i,r,o,s)}async extractPagesInPlace(e,i,r,o,s){let[a,c]=await Promise.all([this.read(e),this.read(e)]),l=[];for(let u=1;u<=a.getPageCount();u++)i.includes(u)||l.push(u);this.pageLabelUpdater.removePages(a,i,s),this.pageLabelUpdater.removePages(c,l,s);for(let u=a.getPageCount();u>=1;u--)i.includes(u)?a.removePage(u-1):c.removePage(u-1);await Promise.all([a,c].map(async u=>{await(await Ce.fromDocument(u,this.plugin)).prune()}));let[d,h]=await Promise.all([this.write(e.path,a,!0),this.write(r,c,o)]);return h}async extractPagesAsNewFile(e,i,r,o,s){let a=await this.read(e),c=[];for(let d=1;d<=a.getPageCount();d++)i.includes(d)||c.push(d);this.pageLabelUpdater.removePages(a,c,s);for(let d of c.sort((h,u)=>u-h))a.removePage(d-1);return await(await Ce.fromDocument(a,this.plugin)).prune(),await this.write(r,a,o)}},mg=class extends ke{async updateLinks(t,e,i){await this.lib.metadataCacheUpdatePromise;let r=new Map;for(let c of e){let l=this.app.metadataCache.getBacklinksForFile(c);for(let d of l.keys()){let h=l.get(d);for(let u of h!=null?h:[]){let f=this.getNewLinkText(u.link,d,c,i);if(typeof f!="string")continue;let p=this.getNewLink(u,f),g=u.position;r.has(d)||r.set(d,[]),r.get(d).push({position:g,newLink:p})}}}let o=await t();if(!o)return null;let s=[],a={files:0,links:0};for(let[c,l]of r){let d=this.app.vault.getAbstractFileByPath(c);d instanceof qt.TFile&&(l.sort((h,u)=>u.position.start.offset-h.position.start.offset),s.push(this.app.vault.process(d,h=>{for(let{position:u,newLink:f}of l)h=h.slice(0,u.start.offset)+f+h.slice(u.end.offset),a.links++;return h})),l.length>0&&a.files++)}return await Promise.all(s),a.links&&new qt.Notice(`${this.plugin.manifest.name}: Updated ${a.links} links in ${a.files} files.`),o}getNewLinkText(t,e,i,r){let{path:o,subpath:s}=(0,qt.parseLinktext)(t),a;s.startsWith("#")&&(s=s.slice(1));let c=new URLSearchParams(s),l=c.get("page");l!==null&&(a=+l);let{file:d,pageNumber:h}=r(i,a);if(d===void 0&&h===void 0)return;let u=o;if(d instanceof qt.TFile){let g=!this.app.vault.getConfig("useMarkdownLinks");u=this.app.metadataCache.fileToLinktext(d,e,g)}else typeof d=="string"&&(u=d);let f=s;if(typeof h=="number"){f="",c.set("page",""+h);for(let[g,m]of c)f+=`${g}=${m}&`;f.endsWith("&")&&(f=f.slice(0,-1))}return u+(f?"#"+f:"")}getNewDisplay(t){return t}getNewLink(t,e){let i=t.original,r=t.displayText,o=t.link,s=i.startsWith("!");s&&(i=i.slice(1));let a="";return i.startsWith("[[")&&i.endsWith("]]")?typeof r=="string"&&i===`[[${o}|${r}]]`?a=`[[${e}|${r}]]`:a=`[[${e}]]`:i.startsWith("[")&&i.endsWith(")")&&(a=`[${r!=null?r:""}](${xr(e)})`),s&&(a="!"+a),a}async updateLinkColor(t,e,i,r){r=Object.assign({linktext:!0,callout:!0},r);let o=this.app.vault.getAbstractFileByPath(e);if(!(o instanceof qt.TFile))return;let s=t.link,{path:a,subpath:c}=(0,qt.parseLinktext)(s),l=new URLSearchParams(c.startsWith("#")?c.slice(1):c);i&&r.linktext?l.set("color",i.type==="name"?i.name.toLowerCase():`${i.rgb.r},${i.rgb.g},${i.rgb.b}`):l.delete("color");let d="";for(let[f,p]of l.entries())d+=d?`&${f}=${p}`:`#${f}=${p}`;let h=a+d,u=this.getNewLink(t,h);if("position"in t){let f=t.position;await this.app.vault.process(o,p=>{var g,m;if(p=p.slice(0,f.start.offset)+u+p.slice(f.end.offset),r.callout){let w=((m=(g=this.app.metadataCache.getFileCache(o))==null?void 0:g.sections)!=null?m:[]).find(F=>F.position.start.offset<=f.start.offset&&f.end.offset<=F.position.end.offset);if(w&&w.type==="callout"){let F=p.split(/\r?\n/),v=w.position.start.line,P=F[v],k=new RegExp(`> *\\[\\! *${this.settings.calloutType} *(\\|(.*?))?\\]`,"i");F[v]=P.replace(k,`> [!${this.settings.calloutType}${i?`|${i.type==="name"?i.name.toLowerCase():`${i.rgb.r},${i.rgb.g},${i.rgb.b}`}`:""}]`),p=F.join(`
`)}}return p})}else{let f=t.key;await this.app.fileManager.processFrontMatter(o,p=>{p[f]=u})}}},bg=class extends ke{addPage(t){}insertPage(t,e,i){Ft.processDocument(t,r=>{if(i){r.divideRangeAtPage(e,!0).shiftRangesAfterPage(e,1).divideRangeAtPage(e,!1,o=>{delete o.prefix,delete o.style});return}r.shiftRangesAfterPage(e,1)})}removePage(t,e,i){this.removePages(t,[e],i)}removePages(t,e,i){Ft.processDocument(t,r=>{e.sort((o,s)=>s-o).forEach(o=>{this.removePageFromLabels(r,o,i)})})}removePageFromLabels(t,e,i){if(i){t.divideRangeAtPage(e+1,!0).shiftRangesAfterPage(e+1,-1);return}t.shiftRangesAfterPage(e+1,-1)}mergeFiles(t,e,i){}};var _x=require("obsidian"),qo=class extends _x.Component{constructor(e,i,r,o,s,a,c){super();this.plugin=e;this.ctx=i;this.file=r;this.subpath=o;this.pageNumber=s;this.rect=a;this.width=c;this.app=i.app,this.containerEl=i.containerEl,this.rect=window.pdfjsLib.Util.normalizeRect(a),this.containerEl.addClass("pdf-cropped-embed"),c&&this.containerEl.setAttribute("width",""+c)}get lib(){return this.plugin.lib}async loadFile(){let e=await this.lib.loadPDFDocument(this.file);this.register(()=>e.destroy());let i=await e.getPage(this.pageNumber),r=await this.lib.pdfPageToImageDataUrl(i,{type:"image/bmp",encoderOptions:1,cropRect:this.rect});await new Promise((o,s)=>{this.containerEl.empty(),this.containerEl.createEl("img",{attr:{src:r}},a=>{a.addEventListener("load",()=>o()),a.addEventListener("error",d=>s(d));let c=this.containerEl.getAttribute("width"),l=this.containerEl.getAttribute("height");c&&a.setAttribute("width",c),l&&a.setAttribute("height",l)}),activeWindow.setTimeout(()=>s(),5e3)})}};var Wh=class extends ke{get ttsPlugin(){var t;return(t=this.app.plugins.plugins["obsidian-tts"])!=null?t:null}isEnabled(){return!!this.ttsPlugin}async speak(t){var e;await((e=this.ttsPlugin)==null?void 0:e.say(t))}};var jh=class{constructor(t){this.PDFOutlines=Ce;this.NameTree=sa;this.NumberTree=Fr;this.PDFNamedDestinations=Rn;this.PDFPageLabels=Ft;this.utils=Hp;this.app=t.app,this.plugin=t,this.commands=new zh(t),this.copyLink=new Lh(t),this.highlight=new Hh(t),this.workspace=new Uh(t),this.composer=new qh(t),this.speech=new Wh(t)}registerPDFEvent(t,e,i,r){let o=async s=>{await r(s),i||e.off(t,o)};i==null||i.register(()=>e.off(t,o)),e.on(t,o)}onPageReady(t,e,i){var r;(r=t.pdfViewer)==null||r._pages.forEach((o,s)=>{i(s+1,o,!1)}),this.registerPDFEvent("pagerendered",t.eventBus,e,o=>{i(o.pageNumber,o.source,!0)})}onTextLayerReady(t,e,i){var r;(r=t.pdfViewer)==null||r._pages.forEach((o,s)=>{o.textLayer&&i(s+1,o,!1)}),this.registerPDFEvent("textlayerrendered",t.eventBus,e,o=>{i(o.pageNumber,o.source,!0)})}onAnnotationLayerReady(t,e,i){var r;(r=t.pdfViewer)==null||r._pages.forEach((o,s)=>{o.annotationLayer&&i(s+1,o,!1)}),this.registerPDFEvent("annotationlayerrendered",t.eventBus,e,o=>{i(o.pageNumber,o.source,!0)})}applyPDFViewStateToViewer(t,e){let i=()=>{typeof e.left=="number"&&typeof e.top=="number"&&typeof e.zoom=="number"?t.scrollPageIntoView({pageNumber:e.page,destArray:[e.page,{name:"XYZ"},e.left,e.top,e.zoom]}):t.currentPageNumber=e.page};t.pagesCount?i():this.registerPDFEvent("pagesloaded",t.eventBus,null,()=>i())}getPageElAssociatedWithNode(t){let e=t.instanceOf(HTMLElement)?t:t.parentElement;if(!e)return null;let i=e.closest(".page");return!i||!i.instanceOf(HTMLElement)?null:i}getPageElFromSelection(t){let e=t.rangeCount>0?t.getRangeAt(0):null;return e?this.getPageElAssociatedWithNode(e.startContainer):null}getPageElFromEvent(t){return th(t,t.target)?this.getPageElAssociatedWithNode(t.target):null}getPageNumberFromEvent(t){let e=this.getPageElFromEvent(t),i=e==null?void 0:e.dataset.pageNumber;return i===void 0?null:+i}getToolbarAssociatedWithNode(t){let e=t.instanceOf(HTMLElement)?t:t.parentElement;if(!e)return null;let i=e.closest(".pdf-container"),r=i==null?void 0:i.previousElementSibling;return r&&r.hasClass("pdf-toolbar")?r:null}getToolbarAssociatedWithSelection(){let t=activeWindow.getSelection();if(t&&t.rangeCount>0){let e=t.getRangeAt(0);return this.getToolbarAssociatedWithNode(e.startContainer)}return null}getColorPalette(){var e;let t=(e=this.getPDFViewerChild(!0))!=null?e:this.plugin.lastAnnotationPopupChild;return t?this.getColorPaletteFromChild(t):this.getColorPaletteAssociatedWithSelection()}getColorPaletteOptions(){let t=this.getColorPalette();if(t)return t.getState();let e=this.plugin.settings;return{selectedColorName:[null,...Object.keys(e.colors)][e.defaultColorPaletteItemIndex],actionIndex:e.defaultColorPaletteActionIndex,displayTextFormatIndex:e.defaultDisplayTextFormatIndex,writeFile:e.defaultWriteFileToggle}}getColorPaletteAssociatedWithNode(t){var r;let e=this.getToolbarAssociatedWithNode(t);if(!e)return null;let i=e.querySelector("."+Pt.CLS);return i&&(r=Pt.elInstanceMap.get(i))!=null?r:null}getColorPaletteAssociatedWithSelection(){let t=activeWindow.getSelection();if(t&&t.rangeCount>0){let e=t.getRangeAt(0);return this.getColorPaletteAssociatedWithNode(e.startContainer)}return null}getColorPaletteFromChild(t){var i;let e=(i=t.pdfViewer.dom)==null?void 0:i.viewerEl;return e?this.getColorPaletteAssociatedWithNode(e):null}getColorPaletteContainedIn(t){for(let[e,i]of Pt.elInstanceMap)if(t.contains(e))return i;return null}getPDFViewerChildAssociatedWithNode(t){let e,i=t.instanceOf(HTMLElement)?t:t.parentElement;if(i){let r=i.closest(".pdf-viewer");r&&(e=this.plugin.pdfViewerChildren.get(r))}return e||this.workspace.iteratePDFViewerChild(r=>{!e&&r.containerEl.contains(t)&&(e=r)}),e!=null?e:null}async destIdToSubpath(t,e){let i=await e.getDestination(t);return i?this.pdfJsDestArrayToSubpath(i,e):null}async pdfJsDestArrayToSubpath(t,e){let i=await e.getPageIndex(t[0]);return this.destArrayToSubpath(this.normalizePDFJsDestArray(t,i+1))}normalizePDFJsDestArray(t,e){return[e-1,t[1].name,...t.slice(2)]}normalizePdfLibDestArray(t,e){let i=t.get(0);if(!(i instanceof q))return null;let r=e.getPages().findIndex(s=>s.ref===i);if(r===-1)return null;let o=t.get(1);return o instanceof x?[r,o.decodeText(),...t.asArray().slice(2).map(s=>s instanceof N?s.asNumber():null)]:null}async ensureDestArray(t,e){if(typeof t=="string"){let i=await e.getDestination(t);if(!i)return null;t=this.normalizePDFJsDestArray(i,await e.getPageIndex(i[0])+1)}return t}async destToPageNumber(t,e){if(typeof t=="string"){let i=await e.getDestination(t);return i?await e.getPageIndex(i[0])+1:null}return t[0]+1}destArrayToSubpath(t){var a;let e=t[0],i="",r="",o="";return t[1]==="XYZ"?(typeof t[2]=="number"&&(r+=Math.round(t[2])),typeof t[3]=="number"&&(i+=Math.round(t[3])),o=""+Math.round(((a=t[4])!=null?a:0)*100)/100):t[1]==="FitBH"&&typeof t[2]=="number"&&(i+=t[2]),`#page=${e+1}&offset=${r},${i},${o}`}viewStateToSubpath(t,e=!1){var i;if(typeof t.left=="number"&&typeof t.top=="number"){let r=`#page=${t.page}`;return e?r+=`&offset=,${t.top},`:r+=`&offset=${t.left},${t.top},${(i=t.zoom)!=null?i:0}`,r}return null}viewStateToDestArray(t,e=!1){var i;return typeof t.left=="number"&&typeof t.top=="number"?e?[t.page-1,"FitBH",t.top]:[t.page-1,"XYZ",t.left,t.top,(i=t.zoom)!=null?i:0]:null}getPageLabelTree(t){let e=et(t.catalog,"PageLabels");return e instanceof R?new Fr(e):null}getAnnotationInfoFromAnnotationElement(t){return{page:t.parent.page.pageNumber,id:t.data.id}}getAnnotationInfoFromPopupEl(t){if(!t.matches(".popupWrapper[data-annotation-id]"))return null;let e=t.closest("div.page");if(!e||e.dataset.pageNumber===void 0)return null;let i=+e.dataset.pageNumber,r=t.dataset.annotationId;return r===void 0?null:{page:i,id:r}}registerGlobalDomEvent(t,e,i,r){t.registerDomEvent(document,e,i,r),this.app.workspace.onLayoutReady(()=>{let o=new Set;this.app.workspace.iterateAllLeaves(s=>{let a=s.getContainer().win;a!==window&&o.add(a)}),o.forEach(s=>{t.registerDomEvent(s.document,e,i,r)}),t.registerEvent(this.app.workspace.on("window-open",(s,a)=>{t.registerDomEvent(a.document,e,i,r)}))})}generateMarkdownLink(t,e,i,r){let o=this.app,s=o.vault.getConfig("useMarkdownLinks"),a=!s,l=o.metadataCache.fileToLinktext(t,e,a)+(i||"");t.path===e&&i&&(l=i);let d;return s?d="[".concat(r||t.basename,"](").concat(xr(l),")"):(r&&r.toLowerCase()===l.toLowerCase()&&(l=r,r=void 0),d=r?"[[".concat(l,"|").concat(r,"]]"):"[[".concat(l,"]]")),t.extension!=="md"?"!"+d:d}getBacklinkIndexForFile(t){return new la(this.plugin,t)}async getLatestBacklinkIndexForFile(t){let e=this.getBacklinkIndexForFile(t);return await this.metadataCacheUpdatePromise,e.init(),e}async getLatestBacklinksForAnnotation(t,e,i){return(await this.getLatestBacklinkIndexForFile(t)).getPageIndex(e).annotations.get(i)}isBacklinked(t,e){if(e){let{page:c,selection:l,annotation:d}=e;if(isNaN(c)||c<1)throw new Error("Invalid page number");if(l&&(l.length!==4||l.some(h=>isNaN(h))))throw new Error("Invalid selection");if(l&&typeof d=="string")throw new Error("Selection and annotation cannot be used together")}let i=!e,r=e&&!e.selection&&!e.annotation,o=e&&!!e.selection,s=typeof(e==null?void 0:e.annotation)=="string",a=this.app.metadataCache.getBacklinksForFile(t);if(i)return a.count()>0;for(let c of a.keys()){let l=a.get(c);if(l)for(let d of l){let{subpath:h}=(0,ge.parseLinktext)(d.link),u=Ln(h);if(u&&(r&&u.page===e.page||o&&"beginIndex"in u&&u.page===e.page&&u.beginIndex===e.selection[0]&&u.beginOffset===e.selection[1]&&u.endIndex===e.selection[2]&&u.endOffset===e.selection[3]||s&&"annotation"in u&&u.page===e.page&&u.annotation===e.annotation))return!0}}return!1}getPDFView(t=!1){let e=this.workspace.getActivePDFView();if(e)return e;if(!t){let i;if(this.app.workspace.iterateAllLeaves(r=>{this.isPDFView(r.view)&&(i=r.view)}),i)return i}return null}getPDFEmbedInMarkdownView(t){let i=t.currentMode._children.find(r=>this.isPDFEmbed(r));return i!=null?i:null}getAllPDFEmbedInMarkdownView(t){return t.currentMode._children.filter(i=>this.isPDFEmbed(i))}getPDFEmbedInCanvasView(t){var i;let e=Array.from(t.canvas.nodes.values()).find(r=>this.isCanvasPDFNode(r));return(i=e==null?void 0:e.child)!=null?i:null}getAllPDFEmbedInCanvasView(t){return Array.from(t.canvas.nodes.values()).filter(e=>this.isCanvasPDFNode(e)).map(e=>e.child)}getPDFEmbedInActiveView(){let t=this.app.workspace.getActiveViewOfType(ge.MarkdownView);if(t){let i=this.getPDFEmbedInMarkdownView(t);if(i)return i}let e=this.workspace.getActiveCanvasView();if(e){let i=this.getPDFEmbedInCanvasView(e);if(i)return i}return null}getPDFEmbed(t=!1){let e=this.getPDFEmbedInActiveView();if(e)return e;if(!t){let i=null;if(this.app.workspace.iterateAllLeaves(r=>{if(i)return;let o=r.view;o instanceof ge.MarkdownView?i=this.getPDFEmbedInMarkdownView(o):this.isCanvasView(o)&&(i=this.getPDFEmbedInCanvasView(o))}),i)return i}return null}getPDFViewerComponent(t=!1){var e,i;return(i=(e=this.getPDFView(t))!=null?e:this.getPDFEmbed())==null?void 0:i.viewer}getPDFViewerChild(t=!1){var e;return(e=this.getPDFViewerComponent(t))==null?void 0:e.child}getObsidianViewer(t=!1){var e;return(e=this.getPDFViewerChild(t))==null?void 0:e.pdfViewer}getPDFViewer(t=!1){var e;return(e=this.getObsidianViewer(t))==null?void 0:e.pdfViewer}getToolbar(t=!1){var e;return(e=this.getPDFViewerChild(t))==null?void 0:e.toolbar}getPage(t=!1){let e=this.getPDFViewer(t);return e?e.getPageView(e.currentPageNumber-1):null}getAnnotation(t){var e,i;return(i=(e=this.getPage(!0))==null?void 0:e.annotationLayer)==null?void 0:i.annotationLayer.getAnnotation(t)}getTextContentItems(){var t,e;return(e=(t=this.getPage(!0))==null?void 0:t.textLayer)==null?void 0:e.textContentItems}getPDFDocument(t=!1){var e;return(e=this.getPDFViewer(t))==null?void 0:e.pdfDocument}getBacklinkVisualizer(t=!1){var e;return(e=this.getPDFViewerComponent(t))==null?void 0:e.visualizer}getBibliographyManager(t=!1){var e;return(e=this.getPDFViewerChild(t))==null?void 0:e.bib}getVim(t=!1){var e;return(e=this.getPDFViewerComponent(t))==null?void 0:e.vim}search(t,e,i,r){t.showSearch(),t.searchComponent.setValue(e),Object.assign(t.searchSettings,i),t.dispatchEvent("",r),this.updateSearchSettingsUI(t)}updateSearchSettingsUI(t){let e=t.settingsEl.querySelectorAll("div.checkbox-container"),i=e[0],r=e[1],o=e[2],s=t.searchComponent.containerEl.querySelector(".input-right-decorator.clickable-icon");i&&i.toggleClass("is-enabled",t.searchSettings.highlightAll),r&&r.toggleClass("is-enabled",t.searchSettings.matchDiacritics),o&&o.toggleClass("is-enabled",t.searchSettings.entireWord),s&&s.toggleClass("is-active",t.searchSettings.caseSensitive)}async getExternalPDFUrl(t){if(t.stat.size>300)return null;let e=(await this.app.vault.read(t)).trim();if(e.startsWith("https://")||e.startsWith("http://")){let i=await(0,ge.requestUrl)(e);if(i.status===200)return URL.createObjectURL(new Blob([i.arrayBuffer],{type:"application/pdf"}))}else if(e.startsWith("file:///"))return ge.Platform.resourcePathPrefix+e.substring(8);return null}async loadPDFDocument(t){let e=await this.getExternalPDFUrl(t);if(e)return await this.loadPDFDocumentFromArrayBufferOrUrl({url:e});let i=await this.app.vault.readBinary(t);return await this.loadPDFDocumentFromArrayBufferOrUrl({data:i})}async loadPDFDocumentFromArrayBuffer(t){return await this.loadPDFDocumentFromArrayBufferOrUrl({data:t})}async loadPDFDocumentFromArrayBufferOrUrl(t){return await window.pdfjsLib.getDocument({...t,cMapPacked:!0,cMapUrl:"/lib/pdfjs/cmaps/",standardFontDataUrl:"/lib/pdfjs/standard_fonts/"}).promise}async loadPdfLibDocument(t,e=!1){let i=await this.app.vault.readBinary(t);return await this.loadPdfLibDocumentFromArrayBuffer(i)}async loadPdfLibDocumentFromArrayBuffer(t,e=!1){try{return await pe.load(t,{ignoreEncryption:e||this.plugin.settings.enableEditEncryptedPDF})}catch(i){throw i instanceof ko&&!this.plugin.settings.enableEditEncryptedPDF&&new ge.Notice(`${this.plugin.manifest.name}: The PDF file is encrypted. Please consider enabling "Enable editing encrypted PDF files" in the plugin settings.`),i}}async getPdfLibDocument(t=!1){let e=this.getPDFDocument(t);if(e)return await this.loadPdfLibDocumentFromArrayBuffer(await e.getData())}async getPdfLibPage(t=!1){let e=this.getPDFViewer(t);if(!e)return;let i=e.currentPageNumber;if(i===void 0)return;let r=await this.loadPdfLibDocumentFromArrayBuffer(await e.pdfDocument.getData());if(r)return r.getPage(i-1)}async getPDFOutlines(){let t=await this.getPdfLibDocument();if(t)return new Ce(this.plugin,t)}getPDFViewFromChild(t){let e=null;return this.workspace.iteratePDFViews(i=>{i.viewer.child===t&&(e=i)}),e}isPDFView(t){return this.plugin.classes.PDFView?t instanceof this.plugin.classes.PDFView:t instanceof ge.EditableFileView&&t.getViewType()==="pdf"}isPDFEmbed(t){var e;return"loadFile"in t&&"file"in t&&"containerEl"in t&&t.file instanceof ge.TFile&&t.file.extension==="pdf"&&t.containerEl.instanceOf(HTMLElement)&&((e=t.containerEl)==null?void 0:e.matches(".pdf-embed"))&&t instanceof ge.Component&&!(t instanceof qo)}isCanvasView(t){return t instanceof ge.TextFileView&&t.getViewType()==="canvas"&&"canvas"in t}isCanvasPDFNode(t){return!!("file"in t&&t.file instanceof ge.TFile&&t.file.extension==="pdf"&&t.child instanceof ge.Component&&this.isPDFEmbed(t.child))}isBacklinkView(t){return t instanceof ge.FileView&&t.getViewType()==="backlink"}getAvailablePathForCopy(t){return this.app.vault.getAvailablePath(Lp(t.path),t.extension)}get metadataCacheUpdatePromise(){return new Promise(t=>this.app.metadataCache.onCleanCache(t))}async renderPDFPageToCanvas(t,e){var c;let i=createEl("canvas"),r=i.getContext("2d"),o=t.getViewport({scale:1}),s=(c=e!=null?e:window.devicePixelRatio)!=null?c:1;i.width=Math.floor(o.width*s),i.height=Math.floor(o.height*s),i.setCssStyles({width:Math.floor(o.width)+"px",height:Math.floor(o.height)+"px"});let a=[s,0,0,s,0,0];return await t.render({canvasContext:r,transform:a,viewport:o}).promise,i}async pdfPageToImageDataUrl(t,e){let[i,r,o,s]=t.view,a=o-i,c=s-r,l=e==null?void 0:e.type,d=e==null?void 0:e.encoderOptions,h=e==null?void 0:e.resolution;typeof h!="number"&&(h=(ge.Platform.isDesktop?7:ge.Platform.isTablet?4:window.devicePixelRatio||1)*(this.plugin.settings.rectEmbedResolution/100));let u=e==null?void 0:e.cropRect,f=await this.renderPDFPageToCanvas(t,h);if(!u)return f.toDataURL(l,d);let p=$d(f,360-t.rotate),g=p.width/a,m=p.height/c,b={left:(u[0]-i)*g,top:(r+c-u[3])*m,width:(u[2]-u[0])*g,height:(u[3]-u[1])*m};return $d(bp(p,b),t.rotate).toDataURL(l,d)}async pdfPageToImageArrayBuffer(t,e){var o;let r=(o=(await this.pdfPageToImageDataUrl(t,e)).match(/^data:image\/\w+;base64,(.*)/))==null?void 0:o[1];if(!r)throw new Error("Failed to convert data URL to base64");return(0,ge.base64ToArrayBuffer)(r)}getSelectedText(t,e,i,r,o){if(e===r)return this.toSingleLine(t[e].str.slice(i,o));let s=[];s.push(t[e].str.slice(i));for(let a=e+1;a<r;a++)s.push(t[a].str);return s.push(t[r].str.slice(0,o)),this.toSingleLine(s.join(`
`))}isEditable(t){return this.plugin.settings.enablePDFEdit&&!t.isFileExternal}requirePluginVersion(t,e){let i=this.app.plugins.plugins[t];if(!i)return!1;let r=i.manifest.version;return r===e||Sc(r,e)}requirePluginNewerThan(t,e){let i=this.app.plugins.plugins[t];if(!i)return!1;let r=i.manifest.version;return Sc(r,e)}onDocumentReady(t,e){if(t.pdfLoadingTask){t.pdfLoadingTask.promise.then(i=>e(i));return}t.pdfPlusCallbacksOnDocumentLoaded||(t.pdfPlusCallbacksOnDocumentLoaded=[]),t.pdfPlusCallbacksOnDocumentLoaded.push(e)}toSingleLine(t){return Ic(t,this.plugin.settings.removeWhitespaceBetweenCJChars)}async write(t,e,i){let r=this.app.vault.getAbstractFileByPath(t);if(r instanceof ge.TFile)return i||new ge.Notice(`${this.plugin.manifest.name}: File already exists: ${t}`),typeof e=="string"?await this.app.vault.modify(r,e):await this.app.vault.modifyBinary(r,e),r;if(r===null){let o=(0,ge.normalizePath)(t.split("/").slice(0,-1).join("/"));return o&&(this.app.vault.getAbstractFileByPath(o)||await this.app.vault.createFolder(o)),typeof e=="string"?await this.app.vault.create(t,e):await this.app.vault.createBinary(t,e)}return null}};var $x=require("obsidian");var Kh=class extends de{constructor(e){super(e);if(this.settings.autoCopyToggleRibbonIcon){let i=!1;this.iconEl=e.settings.autoCopyToggleRibbonIcon?e.addRibbonIcon(this.settings.autoCopyIconName,`${e.manifest.name}: Toggle auto-copy`,()=>{i||this.toggle()}):null,this.iconEl&&this.registerDomEvent(this.iconEl,"contextmenu",r=>{if(i)return;let o=new $x.Menu;o.addItem(s=>{s.setIcon("lucide-settings").setTitle("Customize...").onClick(()=>{this.plugin.openSettingTab().scrollToHeading("auto-copy")})}),o.onHide(()=>{i=!1}),o.showAtMouseEvent(r),i=!0})}}toggle(e){e=e!=null?e:!this.settings.autoCopy,e?this.enable():this.disable()}enable(){this.settings.autoCopy=!0,this.plugin.saveSettings(),this.load()}disable(){this.settings.autoCopy=!1,this.plugin.saveSettings(),this.unload()}onload(){var e;(e=this.iconEl)==null||e.addClass("is-active")}onunload(){var e;(e=this.iconEl)==null||e.removeClass("is-active")}};var ey=require("obsidian");var Gh=class extends de{constructor(e){super(e);this.styleEl=e.registerEl(createEl("style",{attr:{id:"pdf-plus-style"}})),document.head.append(this.styleEl)}update(){this.unload(),this.plugin.removeChild(this),this.plugin.addChild(this)}registerEl(e){return this.register(()=>e.remove()),e}onload(){this.plugin.trigger("update-dom"),this.updateStyleEl(),this.updateClass("pdf-plus-click-embed-to-open-link",this.settings.dblclickEmbedToOpenLink),this.updateClass("pdf-plus-backlink-selection-highlight",this.settings.selectionBacklinkVisualizeStyle==="highlight"),this.updateClass("pdf-plus-backlink-selection-underline",this.settings.selectionBacklinkVisualizeStyle==="underline"),this.app.workspace.trigger("css-change")}updateClass(e,i){document.body.toggleClass(e,i),this.register(()=>document.body.removeClass(e))}updateStyleEl(){let e=this.plugin.settings;this.styleEl.textContent=Object.entries(e.colors).map(([o,s])=>Ki(s)?[`.pdf-plus-backlink-highlight-layer .pdf-plus-backlink:not(.hovered-highlight)[data-highlight-color="${o.toLowerCase()}"],`,`.pdf-embed[data-highlight-color="${o.toLowerCase()}"] .textLayer .mod-focused {`,` --pdf-plus-color: ${s};`,` --pdf-plus-backlink-icon-color: ${s};`,` --pdf-plus-rect-color: ${s};`,"}"].join(`
`):"").join(`
`);let i=e.colors[e.defaultColor];(!i||!Ki(i))&&(i="rgb(var(--text-highlight-bg-rgb))"),this.styleEl.textContent+=[`
.pdf-plus-backlink-highlight-layer .pdf-plus-backlink:not(.hovered-highlight) {`,` --pdf-plus-color: ${i};`,` --pdf-plus-backlink-icon-color: ${i};`,` --pdf-plus-rect-color: ${i};`,"}"].join(`
`);let r=e.colors[e.backlinkHoverColor];(!r||!Ki(r))&&(r=vx),this.styleEl.textContent+=[`
.pdf-plus-backlink-highlight-layer .pdf-plus-backlink.hovered-highlight {`,` --pdf-plus-color: ${r};`,` --pdf-plus-backlink-icon-color: ${r};`,` --pdf-plus-rect-color: ${r};`,"}"].join(`
`);for(let[o,s]of Object.entries(e.colors))Ki(s)&&(this.styleEl.textContent+=[`
.${Pt.CLS}-item[data-highlight-color="${o.toLowerCase()}"] > .${Pt.CLS}-item-inner {`,` background-color: ${s};`,"}"].join(`
`));this.styleEl.textContent+=[`
.${Pt.CLS}-item:not([data-highlight-color]) > .${Pt.CLS}-item-inner {`," background-color: transparent;","}"].join(`
`),this.styleEl.textContent+=[`
.workspace-leaf.pdf-plus-link-opened.is-highlighted::before {`,` opacity: ${e.existingTabHighlightOpacity};`,"}"].join(`
`),this.setCSSColorVariables(),this.updateCalloutStyle()}updateCalloutStyle(){var r;if(!this.plugin.settings.useCallout)return;let e=this.plugin.settings.calloutType.toLowerCase();for(let o of Object.keys(this.plugin.settings.colors)){let s=(r=this.toCSSVariableName(o))!=null?r:"--pdf-plus-default-color-rgb";this.styleEl.textContent+=[`
.callout[data-callout="${e}"][data-callout-metadata="${o.toLowerCase()}"] {`,` --callout-color: var(${s});`," background-color: rgba(var(--callout-color), var(--pdf-plus-highlight-opacity, 0.2))","}"].join(`
`)}this.styleEl.textContent+=[`
.callout[data-callout="${e}"] {`," --callout-color: var(--pdf-plus-default-color-rgb);"," background-color: rgba(var(--callout-color), var(--pdf-plus-highlight-opacity, 0.2))","}"].join(`
`);let i=this.plugin.settings.calloutIcon;i?this.styleEl.textContent+=[`
.callout[data-callout="${e}"] {`,` --callout-icon: lucide-${i};`,"}"].join(`
`):this.styleEl.textContent+=[`
.callout[data-callout="${e}"] .callout-icon {`," display: none;","}"].join(`
`)}registerCalloutRenderer(){let e=this.plugin.settings.calloutType.toLowerCase();this.plugin.registerMarkdownPostProcessor((i,r)=>{for(let o of i.querySelectorAll(`.callout[data-callout="${e}"][data-callout-metadata*=","]`))r.addChild(new xg(o))})}setCSSColorVariables(){let e=this.plugin.settings;for(let[r,o]of Object.entries(e.colors)){let s=this.toCSSVariableName(r),a=pr(o);if(s!==null&&a!==null){let{r:c,g:l,b:d}=a;this.styleEl.textContent+=[`
body {`,` ${s}: ${c}, ${l}, ${d}`,"}"].join(`
`)}}let i=!1;if(e.defaultColor in e.colors){let r=this.toCSSVariableName(e.defaultColor);r!==null&&(this.styleEl.textContent+=[`
body {`,` --pdf-plus-default-color-rgb: var(${r})`,"}"].join(`
`),i=!0)}i||(this.styleEl.textContent+=[`
body {`," --pdf-plus-default-color-rgb: var(--text-highlight-bg-rgb)","}"].join(`
`))}toCSSVariableName(e){let i=e.toLowerCase().replace(/[^a-z0-9]+/g,"-");return i=i.replace(/^-+|-+$/g,""),i?"--pdf-plus-"+i+"-rgb":null}getRgb(e){let i="--pdf-plus-default-color-rgb";if(e){let s=this.toCSSVariableName(e);s&&(i=s)}let r=getComputedStyle(document.body).getPropertyValue(i);return gp(r)}},xg=class extends ey.MarkdownRenderChild{onload(){let t=this.containerEl.dataset.calloutMetadata;if(t){let e=t.split(",").map(r=>parseInt(r));e.length===3&&e.every(r=>0<=r&&r<=255)&&this.containerEl.style.setProperty("--callout-color",e.join(", "))}}};var Xh=class extends De.Plugin{constructor(){super(...arguments);this.lib=new jh(this);this.events=new De.Events;this.autoFocusToggleIconEl=null;this.autoPasteToggleIconEl=null;this.patchStatus={workspace:!1,pagePreview:!1,pdfView:!1,pdfInternals:!1,pdfOutlineViewer:!1,backlink:!1};this.classes={};this.lastPasteFile=null;this.lastActiveMarkdownFile=null;this.lastAnnotationPopupChild=null;this.lastCopiedDestInfo=null;this.vimrc=null;this.pdfViewerChildren=new Map;this.shownMenus=new Set;this.isDebugMode=!1}async onload(){this.checkVersion(),this.addIcons(),await(0,De.loadPdfJs)(),await this.loadSettings(),await this.saveSettings(),this.domManager=this.addChild(new Gh(this)),this.domManager.registerCalloutRenderer(),this.registerRibbonIcons(),this.patchObsidian(),this.registerPDFEmbedCreator(),this.registerHoverLinkSources(),this.registerCommands(),this.registerGlobalVariables(),this.registerEvents(),this.startTrackingActiveMarkdownFile(),this.registerObsidianProtocolHandler("pdf-plus",this.obsidianProtocolHandler.bind(this)),this.addSettingTab(this.settingTab=new wh(this)),this.registerStyleSettings()}async onunload(){await this.cleanUpResources()}async cleanUpResources(){await this.cleanUpAnystyleFiles()}async cleanUpAnystyleFiles(){let e=this.app.vault.adapter;if(De.Platform.isDesktopApp&&e instanceof De.FileSystemAdapter){let i=this.getAnyStyleInputDir();if(i)try{await e.rmdir(i,!0)}catch(r){if(r.code!=="ENOENT")throw r}}}checkVersion(){let e="1.8.0";(0,De.requireApiVersion)(e)&&console.warn(`${this.manifest.name}: This plugin has not been tested on Obsidian ${e} or above. Please report any issue you encounter on GitHub (https://github.com/RyotaUshio/obsidian-pdf-plus/issues/new/choose).`),kr.openIfNecessary(this)}addIcons(){(0,De.addIcon)("vim",'<text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle" font-family="Arial" font-size="48" fill="currentColor" style="letter-spacing:2; font-weight:bold;">VIM</text>')}async restoreDefaultSettings(){this.settings=structuredClone(Ti),await this.saveSettings()}async loadSettings(){if(this.settings=Object.assign(structuredClone(Ti),await this.loadData()),!this.settings.anystylePath){let e=this.loadLocalStorage("anystylePath");typeof e=="string"&&(this.settings.anystylePath=e)}(this.settings.defaultDisplayTextFormatIndex<0||this.settings.defaultDisplayTextFormatIndex>=this.settings.displayTextFormats.length)&&(this.settings.defaultDisplayTextFormatIndex=0),(this.settings.defaultColorPaletteActionIndex<0||this.settings.defaultColorPaletteActionIndex>=this.settings.copyCommands.length)&&(this.settings.defaultColorPaletteActionIndex=0),this.validateAutoFocusAndAutoPasteSettings();for(let[e,i]of Object.entries(this.settings.colors))this.settings.colors[e]=i.toLowerCase();this.settings.paneTypeForFirstMDLeaf==="split"&&(this.settings.paneTypeForFirstMDLeaf="right");for(let e of this.settings.copyCommands)e.hasOwnProperty("format")&&(e.template=e.format,delete e.format);if(this.settings.hasOwnProperty("aliasFormat")&&(this.settings.displayTextFormats.push({name:"Custom",template:this.settings.aliasFormat}),delete this.settings.aliasFormat),this.settings.hasOwnProperty("showCopyLinkToSearchInContextMenu")){let e=this.settings.contextMenuConfig.find(({id:i})=>i==="search");e&&e.visible&&(e.visible=this.settings.showCopyLinkToSearchInContextMenu),delete this.settings.showCopyLinkToSearchInContextMenu}this.settings.showContextMenuOnMouseUpIf==="mod"&&(this.settings.showContextMenuOnMouseUpIf="Mod"),this.renameSetting("enalbeWriteHighlightToFile","enablePDFEdit"),this.renameSetting("selectToCopyToggleRibbonIcon","autoCopyToggleRibbonIcon"),this.renameCommand("pdf-plus:toggle-select-to-copy",`${this.manifest.id}:toggle-auto-copy`),this.renameSetting("removeWhitespaceBetweenCJKChars","removeWhitespaceBetweenCJChars"),this.loadContextMenuConfig()}renameSetting(e,i){this.settings.hasOwnProperty(e)&&(this.settings[i]=this.settings[e],delete this.settings[e])}renameCommand(e,i){let{hotkeyManager:r}=this.app,o=r.getHotkeys(e);o&&(r.removeHotkeys(e),r.setHotkeys(i,o))}loadContextMenuConfig(){let e=Ti.contextMenuConfig,i=[];for(let r of e){let o=this.settings.contextMenuConfig.find(({id:s})=>s===r.id);i.push(o!=null?o:r)}this.settings.contextMenuConfig.length=0,this.settings.contextMenuConfig.push(...i)}validateAutoFocusAndAutoPasteSettings(){this.settings.autoFocus&&this.settings.autoPaste&&(this.settings.autoFocus=!1)}async saveSettings(){let e=Object.assign({},this.settings);this.saveLocalStorage("anystylePath",e.anystylePath),delete e.anystylePath,await this.saveData(e)}loadLocalStorage(e){return this.app.loadLocalStorage(this.manifest.id+"-"+e)}saveLocalStorage(e,i){this.app.saveLocalStorage(this.manifest.id+"-"+e,i)}registerStyleSettings(){this.app.workspace.trigger("parse-style-settings"),this.register(()=>this.app.workspace.trigger("parse-style-settings"))}registerRibbonIcons(){if(this.autoCopyMode=new Kh(this),this.autoCopyMode.toggle(this.settings.autoCopy),this.register(()=>this.autoCopyMode.unload()),this.settings.autoFocusToggleRibbonIcon){let e=!1;this.autoFocusToggleIconEl=this.addRibbonIcon(this.settings.autoFocusIconName,`${this.manifest.name}: Toggle auto-focus`,()=>{e||this.toggleAutoFocus()}),this.autoFocusToggleIconEl.toggleClass("is-active",this.settings.autoFocus),this.registerDomEvent(this.autoFocusToggleIconEl,"contextmenu",i=>{if(e)return;let r=new De.Menu;r.addItem(o=>{o.setIcon("lucide-settings").setTitle("Customize...").onClick(()=>{this.openSettingTab().scrollToHeading("auto-focus")})}),r.onHide(()=>{e=!1}),r.showAtMouseEvent(i),e=!0})}if(this.settings.autoPasteToggleRibbonIcon){let e=!1;this.autoPasteToggleIconEl=this.addRibbonIcon(this.settings.autoPasteIconName,`${this.manifest.name}: Toggle auto-paste`,()=>{e||this.toggleAutoPaste()}),this.autoPasteToggleIconEl.toggleClass("is-active",this.settings.autoPaste),this.registerDomEvent(this.autoPasteToggleIconEl,"contextmenu",i=>{if(e)return;let r=new De.Menu;r.addItem(o=>{o.setIcon("lucide-settings").setTitle("Customize...").onClick(()=>{this.openSettingTab().scrollToHeading("auto-paste")})}),r.onHide(()=>{e=!1}),r.showAtMouseEvent(i),e=!0})}}toggleAutoFocusRibbonIcon(e){let i=this.autoFocusToggleIconEl;i&&(e=e!=null?e:!i.hasClass("is-active"),i.toggleClass("is-active",e))}toggleAutoPasteRibbonIcon(e){let i=this.autoPasteToggleIconEl;i&&(e=e!=null?e:!i.hasClass("is-active"),i.toggleClass("is-active",e))}async toggleAutoFocus(e,i){e=e!=null?e:!this.settings.autoFocus,this.toggleAutoFocusRibbonIcon(e),this.settings.autoFocus=e,this.settings.autoFocus&&this.settings.autoPaste&&this.toggleAutoPaste(!1,!1),(i==null||i)&&await this.saveSettings()}async toggleAutoPaste(e,i){e=e!=null?e:!this.settings.autoPaste,this.toggleAutoPasteRibbonIcon(e),this.settings.autoPaste=e,this.settings.autoPaste&&this.settings.autoFocus&&this.toggleAutoFocus(!1,!1),(i==null||i)&&await this.saveSettings()}patchObsidian(){this.app.workspace.onLayoutReady(()=>{qx(this),jx(this),Yx(this)}),this.tryPatchUntilSuccess(Ux),this.tryPatchUntilSuccess(zx),this.tryPatchUntilSuccess(Gx),this.tryPatchUntilSuccess(Xx)}tryPatchUntilSuccess(e,i){this.app.workspace.onLayoutReady(()=>{if(!e(this)){let o=i==null?void 0:i(),s=this.app.workspace.on("layout-change",()=>{e(this)&&(this.app.workspace.offref(s),o==null||o.hide())});this.registerEvent(s)}})}registerEl(e){return this.register(()=>e.remove()),e}loadStyle(){this.domManager.update()}registerPDFEmbedCreator(){let e=this.app.embedRegistry.embedByExtension.pdf;this.register(()=>{this.app.embedRegistry.unregisterExtension("pdf"),this.app.embedRegistry.registerExtension("pdf",e)}),this.app.embedRegistry.unregisterExtension("pdf"),this.app.embedRegistry.registerExtension("pdf",(i,r,o)=>{let s=ta(o),a=null;if(s.has("rect")&&s.has("page")){let c=parseInt(s.get("page")),l=s.get("rect").split(",").map(h=>parseFloat(h)),d=s.has("width")?parseFloat(s.get("width")):void 0;Number.isInteger(c)&&l.length===4&&(a=new qo(this,i,r,o,c,l,d))}if(a||(a=e(i,r,o),this.classes.PDFEmbed||(this.classes.PDFEmbed=a.constructor),this.patchStatus.pdfInternals||fa(this,a.viewer)),this.registerDomEvent(a.containerEl,"dblclick",c=>{if(this.settings.dblclickEmbedToOpenLink&&vt(c,c.target)&&(c.target.closest(".pdf-embed[src] > .pdf-container")||c.target.closest(".pdf-cropped-embed"))){let l=r.path+o;this.app.workspace.openLinkText(l,"",De.Keymap.isModEvent(c)),c.preventDefault()}}),this.settings.embedUnscrollable)for(let c of["wheel","touchmove"])this.registerDomEvent(a.containerEl,c,l=>{vt(l,l.target)&&l.target.closest('.pdf-embed[src*="#"] .pdf-viewer-container')&&l.preventDefault()},{passive:!1});return a instanceof qo&&this.registerDomEvent(a.containerEl,"click",c=>{vt(c,c.target)&&c.target.closest(".cm-editor")&&c.preventDefault()}),s.has("color")?a.containerEl.dataset.highlightColor=s.get("color").toLowerCase():this.settings.defaultColor&&(a.containerEl.dataset.highlightColor=this.settings.defaultColor.toLowerCase()),a})}registerGlobalVariable(e,i,r=!0){if(e in window){if(r)throw new Error(`${this.manifest.name}: Global variable "${e}" already exists.`);return}window[e]=i,this.register(()=>delete window[e])}registerGlobalVariables(){this.registerGlobalVariable("pdfPlus",this,!1),this.registerGlobalVariable("pdflib",fp,!1)}registerEvents(){this.registerEvent(this.app.workspace.on("layout-change",()=>{for(let e of this.pdfViewerChildren.keys())e!=null&&e.isShown()||this.pdfViewerChildren.delete(e)})),De.Platform.isDesktopApp&&this.registerEvent(this.app.workspace.on("active-leaf-change",e=>{if(this.settings.syncWithDefaultApp&&e&&this.lib.isPDFView(e.view)){let i=e.view.file;i&&(this.app.openWithDefaultApp(i.path),this.settings.focusObsidianAfterOpenPDFWithDefaultApp&&Ac())}})),this.registerEvent(this.app.vault.on("delete",e=>{e instanceof De.TFile&&e===this.lastPasteFile&&(this.lastPasteFile=null)})),this.registerEvent(this.app.vault.on("rename",(e,i)=>{e instanceof De.TFile&&this.settings.newFileTemplatePath===i&&(this.settings.newFileTemplatePath=e.path,this.saveSettings())})),this.registerEvent(this.app.vault.on("delete",e=>{e instanceof De.TFile&&this.settings.newFileTemplatePath===e.path&&(this.settings.newFileTemplatePath="",this.saveSettings())})),this.registerEvent(this.app.vault.on("modify",async e=>{e instanceof De.TFile&&e.path===this.settings.vimrcPath&&(this.vimrc=await this.app.vault.read(e))})),this.registerEvent(this.app.workspace.on("quit",async()=>{await this.cleanUpResources()}))}registerOneTimeEvent(e,...[i,r,o]){let s=e.on(i,(...a)=>{r.call(o,...a),e.offref(s)},o);this.registerEvent(s)}registerHoverLinkSources(){this.registerHoverLinkSource("pdf-plus",{defaultMod:!0,display:"PDF++: backlink highlights"}),this.registerHoverLinkSource(Yi.HOVER_LINK_SOURCE_ID,{defaultMod:!0,display:"PDF++: internal links in PDF (except for citations)"}),this.registerHoverLinkSource(Ci.HOVER_LINK_SOURCE_ID,{defaultMod:!1,display:"PDF++: citation links in PDF"}),this.registerHoverLinkSource(Vn.HOVER_LINK_SOURCE_ID,{defaultMod:!0,display:"PDF++: external links in PDF"}),this.registerHoverLinkSource(Ji.HOVER_LINK_SOURCE_ID,{defaultMod:!0,display:"PDF++: outlines (bookmarks)"}),this.registerHoverLinkSource(Qi.HOVER_LINK_SOURCE_ID,{defaultMod:!0,display:"PDF++: thumbnails"})}registerCommands(){this.lib.commands.registerCommands()}startTrackingActiveMarkdownFile(){let{workspace:e,vault:i}=this.app;e.onLayoutReady(()=>{let r=e.getActiveFile();if(r&&r.extension==="md")this.lastActiveMarkdownFile=r;else{let o=e.recentFileTracker.getRecentFiles({showMarkdown:!0,showCanvas:!1,showNonImageAttachments:!1,showImages:!1,maxCount:1}).first();if(o){let s=i.getAbstractFileByPath(o);s instanceof De.TFile&&s.extension==="md"&&(this.lastActiveMarkdownFile=s)}}this.registerEvent(e.on("file-open",o=>{o instanceof De.TFile&&o.extension==="md"&&(this.lastActiveMarkdownFile=o)})),this.registerEvent(i.on("delete",o=>{o instanceof De.TFile&&o===this.lastActiveMarkdownFile&&(this.lastActiveMarkdownFile=null)}))})}obsidianProtocolHandler(e){if("create-dummy"in e)return Pr.createDummyFilesFromObsidianUrl(this,e);if("setting"in e)return this.settingTab.openFromObsidianUrl(e)}on(e,i,r){return this.events.on(e,i,r)}off(e,i){this.events.off(e,i)}offref(e){this.events.offref(e)}trigger(e,...i){this.events.trigger(e,...i)}requireModKeyForLinkHover(e="pdf-plus"){var i,r,o;return(o=(r=this.app.internalPlugins.plugins["page-preview"].instance.overrides[e])!=null?r:(i=this.app.workspace.hoverLinkSources[e])==null?void 0:i.defaultMod)!=null?o:!1}openSettingTab(){return this.app.setting.open(),this.app.setting.openTabById(this.manifest.id)}openHotkeySettingTab(e){this.app.setting.open();let i=this.app.setting.openTabById("hotkeys");return i.setQuery(e!=null?e:this.manifest.id),i}getAnyStyleInputDir(){let e=this.manifest.dir;return e?e+"/anystyle":null}};