@brftech/filex 0.1.77 → 0.1.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ArchiveViewer-CI3r148m.js → ArchiveViewer-CA9ioXbi.js} +2 -2
- package/dist/{ArchiveViewer-CI3r148m.js.map → ArchiveViewer-CA9ioXbi.js.map} +1 -1
- package/dist/{CsvViewer-O1CSjczN.js → CsvViewer-jphwOgRh.js} +2 -2
- package/dist/{CsvViewer-O1CSjczN.js.map → CsvViewer-jphwOgRh.js.map} +1 -1
- package/dist/{DrawioViewer-DleWTwqo.js → DrawioViewer-BDYGyODy.js} +2 -2
- package/dist/{DrawioViewer-DleWTwqo.js.map → DrawioViewer-BDYGyODy.js.map} +1 -1
- package/dist/{EpubViewer-CB5CJOqK.js → EpubViewer-CNF97lJM.js} +2 -2
- package/dist/{EpubViewer-CB5CJOqK.js.map → EpubViewer-CNF97lJM.js.map} +1 -1
- package/dist/{IpynbViewer-BvNXSqcW.js → IpynbViewer-CI3Dp_WF.js} +2 -2
- package/dist/{IpynbViewer-BvNXSqcW.js.map → IpynbViewer-CI3Dp_WF.js.map} +1 -1
- package/dist/{MermaidViewer-BeMv4t1c.js → MermaidViewer-DaF4vbgh.js} +2 -2
- package/dist/{MermaidViewer-BeMv4t1c.js.map → MermaidViewer-DaF4vbgh.js.map} +1 -1
- package/dist/{PsdViewer-D9aK9vTH.js → PsdViewer-B0BuaP_x.js} +2 -2
- package/dist/{PsdViewer-D9aK9vTH.js.map → PsdViewer-B0BuaP_x.js.map} +1 -1
- package/dist/{TiffViewer-szPuWepZ.js → TiffViewer-BfEOIZ-5.js} +2 -2
- package/dist/{TiffViewer-szPuWepZ.js.map → TiffViewer-BfEOIZ-5.js.map} +1 -1
- package/dist/{Viewer3D-g8FvCPRg.js → Viewer3D-B5ABBooo.js} +2 -2
- package/dist/{Viewer3D-g8FvCPRg.js.map → Viewer3D-B5ABBooo.js.map} +1 -1
- package/dist/filex.js +1 -1
- package/dist/filex.umd.cjs +14 -14
- package/dist/filex.umd.cjs.map +1 -1
- package/dist/{index-D3PS0MnR.js → index-Dih5ciBz.js} +1104 -1096
- package/dist/index-Dih5ciBz.js.map +1 -0
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/dist/index-D3PS0MnR.js.map +0 -1
package/dist/filex.umd.cjs
CHANGED
|
@@ -13,16 +13,16 @@
|
|
|
13
13
|
**/const ul=[];let ju=!1;function IM(e,...t){if(ju)return;ju=!0,oa();const r=ul.length?ul[ul.length-1].component:null,n=r&&r.appContext.config.warnHandler,a=Lb();if(n)lo(n,r,11,[e+t.map(i=>{var o,l;return(l=(o=i.toString)==null?void 0:o.call(i))!=null?l:JSON.stringify(i)}).join(""),r&&r.proxy,a.map(({vnode:i})=>`at <${kh(r,i.type)}>`).join(`
|
|
14
14
|
`),a]);else{const i=[`[Vue warn]: ${e}`,...t];a.length&&i.push(`
|
|
15
15
|
`,...Bb(a)),console.warn(...i)}la(),ju=!1}function Lb(){let e=ul[ul.length-1];if(!e)return[];const t=[];for(;e;){const r=t[0];r&&r.vnode===e?r.recurseCount++:t.push({vnode:e,recurseCount:0});const n=e.component&&e.component.parent;e=n&&n.vnode}return t}function Bb(e){const t=[];return e.forEach((r,n)=>{t.push(...n===0?[]:[`
|
|
16
|
-
`],...Nb(r))}),t}function Nb({vnode:e,recurseCount:t}){const r=t>0?`... (${t} recursive calls)`:"",n=e.component?e.component.parent==null:!1,a=` at <${kh(e.component,e.type,n)}`,i=">"+r;return e.props?[a,...$b(e.props),i]:[a+i]}function $b(e){const t=[],r=Object.keys(e);return r.slice(0,3).forEach(n=>{t.push(...p1(n,e[n]))}),r.length>3&&t.push(" ..."),t}function p1(e,t,r){return Qt(t)?(t=JSON.stringify(t),r?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?r?t:[`${e}=${t}`]:Rr(t)?(t=p1(e,Lt(t.value),!0),r?t:[`${e}=Ref<`,t,">"]):St(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=Lt(t),r?t:[`${e}=`,t])}function lo(e,t,r,n){try{return n?e(...n):e()}catch(a){Ms(a,t,r)}}function qn(e,t,r,n){if(St(e)){const a=lo(e,t,r,n);return a&&Ud(a)&&a.catch(i=>{Ms(i,t,r)}),a}if(bt(e)){const a=[];for(let i=0;i<e.length;i++)a.push(qn(e[i],t,r,n));return a}}function Ms(e,t,r,n=!0){const a=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||Kt;if(t){let l=t.parent;const s=t.proxy,u=`https://vuejs.org/error-reference/#runtime-${r}`;for(;l;){const c=l.ec;if(c){for(let f=0;f<c.length;f++)if(c[f](e,s,u)===!1)return}l=l.parent}if(i){oa(),lo(i,null,10,[e,s,u]),la();return}}Ub(e,r,a,n,o)}function Ub(e,t,r,n=!0,a=!1){if(a)throw e;console.error(e)}const Xr=[];let ua=-1;const so=[];let ti=null,uo=0;const v1=Promise.resolve();let Ds=null;function za(e){const t=Ds||v1;return e?t.then(this?e.bind(this):e):t}function Hb(e){let t=ua+1,r=Xr.length;for(;t<r;){const n=t+r>>>1,a=Xr[n],i=cl(a);i<e||i===e&&a.flags&2?t=n+1:r=n}return t}function Gu(e){if(!(e.flags&1)){const t=cl(e),r=Xr[Xr.length-1];!r||!(e.flags&2)&&t>=cl(r)?Xr.push(e):Xr.splice(Hb(t),0,e),e.flags|=1,m1()}}function m1(){Ds||(Ds=v1.then(y1))}function jb(e){bt(e)?so.push(...e):ti&&e.id===-1?ti.splice(uo+1,0,e):e.flags&1||(so.push(e),e.flags|=1),m1()}function g1(e,t,r=ua+1){for(;r<Xr.length;r++){const n=Xr[r];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;Xr.splice(r,1),r--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function b1(e){if(so.length){const t=[...new Set(so)].sort((r,n)=>cl(r)-cl(n));if(so.length=0,ti){ti.push(...t);return}for(ti=t,uo=0;uo<ti.length;uo++){const r=ti[uo];r.flags&4&&(r.flags&=-2),r.flags&8||r(),r.flags&=-2}ti=null,uo=0}}const cl=e=>e.id==null?e.flags&2?-1:1/0:e.id;function y1(e){try{for(ua=0;ua<Xr.length;ua++){const t=Xr[ua];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),lo(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;ua<Xr.length;ua++){const t=Xr[ua];t&&(t.flags&=-2)}ua=-1,Xr.length=0,b1(),Ds=null,(Xr.length||so.length)&&y1()}}let Lr=null,x1=null;function Is(e){const t=Lr;return Lr=e,x1=e&&e.type.__scopeId||null,t}function Tr(e,t=Lr,r){if(!t||e._n)return e;const n=(...a)=>{n._d&&$s(-1);const i=Is(t);let o;try{o=e(...a)}finally{Is(i),n._d&&$s(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function rr(e,t){if(Lr===null)return e;const r=js(Lr),n=e.dirs||(e.dirs=[]);for(let a=0;a<t.length;a++){let[i,o,l,s=Kt]=t[a];i&&(St(i)&&(i={mounted:i,updated:i}),i.deep&&Ia(o),n.push({dir:i,instance:r,value:o,oldValue:void 0,arg:l,modifiers:s}))}return e}function Ii(e,t,r,n){const a=e.dirs,i=t&&t.dirs;for(let o=0;o<a.length;o++){const l=a[o];i&&(l.oldValue=i[o].value);let s=l.dir[n];s&&(oa(),qn(s,r,8,[e.el,l,e,t]),la())}}function Gb(e,t){if(Vr){let r=Vr.provides;const n=Vr.parent&&Vr.parent.provides;n===r&&(r=Vr.provides=Object.create(n)),r[e]=t}}function zs(e,t,r=!1){const n=oc();if(n||fo){let a=fo?fo._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(a&&e in a)return a[e];if(arguments.length>1)return r&&St(t)?t.call(n&&n.proxy):t}}const Vb=Symbol.for("v-scx"),qb=()=>zs(Vb);function tr(e,t,r){return _1(e,t,r)}function _1(e,t,r=Kt){const{immediate:n,deep:a,flush:i,once:o}=r,l=ir({},r),s=t&&n||!t&&i!=="post";let u;if(_l){if(i==="sync"){const h=qb();u=h.__watcherHandles||(h.__watcherHandles=[])}else if(!s){const h=()=>{};return h.stop=aa,h.resume=aa,h.pause=aa,h}}const c=Vr;l.call=(h,y,p)=>qn(h,c,y,p);let f=!1;i==="post"?l.scheduler=h=>{Zr(h,c&&c.suspense)}:i!=="sync"&&(f=!0,l.scheduler=(h,y)=>{y?h():Gu(h)}),l.augmentJob=h=>{t&&(h.flags|=4),f&&(h.flags|=2,c&&(h.id=c.uid,h.i=c))};const d=Rb(e,t,l);return _l&&(u?u.push(d):s&&d()),d}function Wb(e,t,r){const n=this.proxy,a=Qt(e)?e.includes(".")?w1(n,e):()=>n[e]:e.bind(n,n);let i;St(t)?i=t:(i=t.handler,r=t);const o=xl(this),l=_1(a,i.bind(n),r);return o(),l}function w1(e,t){const r=t.split(".");return()=>{let n=e;for(let a=0;a<r.length&&n;a++)n=n[r[a]];return n}}const ri=new WeakMap,k1=Symbol("_vte"),S1=e=>e.__isTeleport,zi=e=>e&&(e.disabled||e.disabled===""),Kb=e=>e&&(e.defer||e.defer===""),C1=e=>typeof SVGElement<"u"&&e instanceof SVGElement,A1=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Vu=(e,t)=>{const r=e&&e.to;return Qt(r)?t?t(r):null:r},Xb={name:"Teleport",__isTeleport:!0,process(e,t,r,n,a,i,o,l,s,u){const{mc:c,pc:f,pbc:d,o:{insert:h,querySelector:y,createText:p,createComment:x,parentNode:g}}=u,m=zi(t.props);let{dynamicChildren:b}=t;const v=(A,_,E)=>{A.shapeFlag&16&&c(A.children,_,E,a,i,o,l,s)},S=(A=t)=>{const _=zi(A.props),E=A.target=Vu(A.props,y),M=qu(E,A,p,h);E&&(o!=="svg"&&C1(E)?o="svg":o!=="mathml"&&A1(E)&&(o="mathml"),a&&a.isCE&&(a.ce._teleportTargets||(a.ce._teleportTargets=new Set)).add(E),_||(v(A,E,M),fl(A,!1)))},C=A=>{const _=()=>{if(ri.get(A)===_){if(ri.delete(A),zi(A.props)){const E=g(A.el)||r;v(A,E,A.anchor),fl(A,!0)}S(A)}};ri.set(A,_),Zr(_,i)};if(e==null){const A=t.el=p(""),_=t.anchor=p("");if(h(A,r,n),h(_,r,n),Kb(t.props)||i&&i.pendingBranch){C(t);return}m&&(v(t,r,_),fl(t,!0)),S()}else{t.el=e.el;const A=t.anchor=e.anchor,_=ri.get(e);if(_){_.flags|=8,ri.delete(e),C(t);return}t.targetStart=e.targetStart;const E=t.target=e.target,M=t.targetAnchor=e.targetAnchor,z=zi(e.props),N=z?r:E,R=z?A:M;if(o==="svg"||C1(E)?o="svg":(o==="mathml"||A1(E))&&(o="mathml"),b?(d(e.dynamicChildren,b,N,a,i,o,l),nc(e,t,!0)):s||f(e,t,N,R,a,i,o,l,!1),m)z?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Fs(t,r,A,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const $=t.target=Vu(t.props,y);$&&Fs(t,$,null,u,0)}else z&&Fs(t,E,M,u,1);fl(t,m)}},remove(e,t,r,{um:n,o:{remove:a}},i){const{shapeFlag:o,children:l,anchor:s,targetStart:u,targetAnchor:c,target:f,props:d}=e;let h=i||!zi(d);const y=ri.get(e);if(y&&(y.flags|=8,ri.delete(e),h=!1),f&&(a(u),a(c)),i&&a(s),o&16)for(let p=0;p<l.length;p++){const x=l[p];n(x,t,r,h,!!x.dynamicChildren)}},move:Fs,hydrate:Yb};function Fs(e,t,r,{o:{insert:n},m:a},i=2){i===0&&n(e.targetAnchor,t,r);const{el:o,anchor:l,shapeFlag:s,children:u,props:c}=e,f=i===2;if(f&&n(o,t,r),!ri.has(e)&&(!f||zi(c))&&s&16)for(let d=0;d<u.length;d++)a(u[d],t,r,2);f&&n(l,t,r)}function Yb(e,t,r,n,a,i,{o:{nextSibling:o,parentNode:l,querySelector:s,insert:u,createText:c}},f){function d(x,g){let m=g;for(;m;){if(m&&m.nodeType===8){if(m.data==="teleport start anchor")t.targetStart=m;else if(m.data==="teleport anchor"){t.targetAnchor=m,x._lpa=t.targetAnchor&&o(t.targetAnchor);break}}m=o(m)}}function h(x,g){g.anchor=f(o(x),g,l(x),r,n,a,i)}const y=t.target=Vu(t.props,s),p=zi(t.props);if(y){const x=y._lpa||y.firstChild;t.shapeFlag&16&&(p?(h(e,t),d(y,x),t.targetAnchor||qu(y,t,c,u,l(e)===y?e:null)):(t.anchor=o(e),d(y,x),t.targetAnchor||qu(y,t,c,u),f(x&&o(x),t,y,r,n,a,i))),fl(t,p)}else p&&t.shapeFlag&16&&(h(e,t),t.targetStart=e,t.targetAnchor=o(e));return t.anchor&&o(t.anchor)}const Zb=Xb;function fl(e,t){const r=e.ctx;if(r&&r.ut){let n,a;for(t?(n=e.el,a=e.anchor):(n=e.targetStart,a=e.targetAnchor);n&&n!==a;)n.nodeType===1&&n.setAttribute("data-v-owner",r.uid),n=n.nextSibling;r.ut()}}function qu(e,t,r,n,a=null){const i=t.targetStart=r(""),o=t.targetAnchor=r("");return i[k1]=o,e&&(n(i,e,a),n(o,e,a)),o}const ca=Symbol("_leaveCb"),dl=Symbol("_enterCb");function E1(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return pr(()=>{e.isMounted=!0}),Br(()=>{e.isUnmounting=!0}),e}const Dn=[Function,Array],T1={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Dn,onEnter:Dn,onAfterEnter:Dn,onEnterCancelled:Dn,onBeforeLeave:Dn,onLeave:Dn,onAfterLeave:Dn,onLeaveCancelled:Dn,onBeforeAppear:Dn,onAppear:Dn,onAfterAppear:Dn,onAppearCancelled:Dn},M1=e=>{const t=e.subTree;return t.component?M1(t.component):t},Jb={name:"BaseTransition",props:T1,setup(e,{slots:t}){const r=oc(),n=E1();return()=>{const a=t.default&&Ku(t.default(),!0),i=a&&a.length?D1(a):r.subTree?rt():void 0;if(!i)return;const o=Lt(e),{mode:l}=o;if(n.isLeaving)return Wu(i);const s=z1(i);if(!s)return Wu(i);let u=hl(s,o,n,r,f=>u=f);s.type!==Gr&&Fi(s,u);let c=r.subTree&&z1(r.subTree);if(c&&c.type!==Gr&&!Pi(c,s)&&M1(r).type!==Gr){let f=hl(c,o,n,r);if(Fi(c,f),l==="out-in"&&s.type!==Gr)return n.isLeaving=!0,f.afterLeave=()=>{n.isLeaving=!1,r.job.flags&8||r.update(),delete f.afterLeave,c=void 0},Wu(i);l==="in-out"&&s.type!==Gr?f.delayLeave=(d,h,y)=>{const p=I1(n,c);p[String(c.key)]=c,d[ca]=()=>{h(),d[ca]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{y(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return i}}};function D1(e){let t=e[0];if(e.length>1){for(const r of e)if(r.type!==Gr){t=r;break}}return t}const Qb=Jb;function I1(e,t){const{leavingVNodes:r}=e;let n=r.get(t.type);return n||(n=Object.create(null),r.set(t.type,n)),n}function hl(e,t,r,n,a){const{appear:i,mode:o,persisted:l=!1,onBeforeEnter:s,onEnter:u,onAfterEnter:c,onEnterCancelled:f,onBeforeLeave:d,onLeave:h,onAfterLeave:y,onLeaveCancelled:p,onBeforeAppear:x,onAppear:g,onAfterAppear:m,onAppearCancelled:b}=t,v=String(e.key),S=I1(r,e),C=(E,M)=>{E&&qn(E,n,9,M)},A=(E,M)=>{const z=M[1];C(E,M),bt(E)?E.every(N=>N.length<=1)&&z():E.length<=1&&z()},_={mode:o,persisted:l,beforeEnter(E){let M=s;if(!r.isMounted)if(i)M=x||s;else return;E[ca]&&E[ca](!0);const z=S[v];z&&Pi(e,z)&&z.el[ca]&&z.el[ca](),C(M,[E])},enter(E){if(S[v]===e)return;let M=u,z=c,N=f;if(!r.isMounted)if(i)M=g||u,z=m||c,N=b||f;else return;let R=!1;E[dl]=q=>{R||(R=!0,q?C(N,[E]):C(z,[E]),_.delayedLeave&&_.delayedLeave(),E[dl]=void 0)};const $=E[dl].bind(null,!1);M?A(M,[E,$]):$()},leave(E,M){const z=String(e.key);if(E[dl]&&E[dl](!0),r.isUnmounting)return M();C(d,[E]);let N=!1;E[ca]=$=>{N||(N=!0,M(),$?C(p,[E]):C(y,[E]),E[ca]=void 0,S[z]===e&&delete S[z])};const R=E[ca].bind(null,!1);S[z]=e,h?A(h,[E,R]):R()},clone(E){const M=hl(E,t,r,n,a);return a&&a(M),M}};return _}function Wu(e){if(Ps(e))return e=ni(e),e.children=null,e}function z1(e){if(!Ps(e))return S1(e.type)&&e.children?D1(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:r}=e;if(r){if(t&16)return r[0];if(t&32&&St(r.default))return r.default()}}function Fi(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Fi(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Ku(e,t=!1,r){let n=[],a=0;for(let i=0;i<e.length;i++){let o=e[i];const l=r==null?o.key:String(r)+String(o.key!=null?o.key:i);o.type===yt?(o.patchFlag&128&&a++,n=n.concat(Ku(o.children,t,l))):(t||o.type!==Gr)&&n.push(l!=null?ni(o,{key:l}):o)}if(a>1)for(let i=0;i<n.length;i++)n[i].patchFlag=-2;return n}function qt(e,t){return St(e)?ir({name:e.name},t,{setup:e}):e}function F1(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function O1(e,t){let r;return!!((r=Object.getOwnPropertyDescriptor(e,t))&&!r.configurable)}const Os=new WeakMap;function pl(e,t,r,n,a=!1){if(bt(e)){e.forEach((p,x)=>pl(p,t&&(bt(t)?t[x]:t),r,n,a));return}if(co(n)&&!a){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&pl(e,t,r,n.component.subTree);return}const i=n.shapeFlag&4?js(n.component):n.el,o=a?null:i,{i:l,r:s}=e,u=t&&t.r,c=l.refs===Kt?l.refs={}:l.refs,f=l.setupState,d=Lt(f),h=f===Kt?Nd:p=>O1(c,p)?!1:$t(d,p),y=(p,x)=>!(x&&O1(c,x));if(u!=null&&u!==s){if(P1(t),Qt(u))c[u]=null,h(u)&&(f[u]=null);else if(Rr(u)){const p=t;y(u,p.k)&&(u.value=null),p.k&&(c[p.k]=null)}}if(St(s))lo(s,l,12,[o,c]);else{const p=Qt(s),x=Rr(s);if(p||x){const g=()=>{if(e.f){const m=p?h(s)?f[s]:c[s]:y()||!e.k?s.value:c[e.k];if(a)bt(m)&&Su(m,i);else if(bt(m))m.includes(i)||m.push(i);else if(p)c[s]=[i],h(s)&&(f[s]=c[s]);else{const b=[i];y(s,e.k)&&(s.value=b),e.k&&(c[e.k]=b)}}else p?(c[s]=o,h(s)&&(f[s]=o)):x&&(y(s,e.k)&&(s.value=o),e.k&&(c[e.k]=o))};if(o){const m=()=>{g(),Os.delete(e)};m.id=-1,Os.set(e,m),Zr(m,r)}else P1(e),g()}}}function P1(e){const t=Os.get(e);t&&(t.flags|=8,Os.delete(e))}xs().requestIdleCallback,xs().cancelIdleCallback;const co=e=>!!e.type.__asyncLoader,Ps=e=>e.type.__isKeepAlive;function e5(e,t){R1(e,"a",t)}function t5(e,t){R1(e,"da",t)}function R1(e,t,r=Vr){const n=e.__wdc||(e.__wdc=()=>{let a=r;for(;a;){if(a.isDeactivated)return;a=a.parent}return e()});if(Rs(t,n,r),r){let a=r.parent;for(;a&&a.parent;)Ps(a.parent.vnode)&&r5(n,t,r,a),a=a.parent}}function r5(e,t,r,n){const a=Rs(t,e,n,!0);B1(()=>{Su(n[t],a)},r)}function Rs(e,t,r=Vr,n=!1){if(r){const a=r[e]||(r[e]=[]),i=t.__weh||(t.__weh=(...o)=>{oa();const l=xl(r),s=qn(t,r,e,o);return l(),la(),s});return n?a.unshift(i):a.push(i),i}}const Fa=e=>(t,r=Vr)=>{(!_l||e==="sp")&&Rs(e,(...n)=>t(...n),r)},n5=Fa("bm"),pr=Fa("m"),a5=Fa("bu"),L1=Fa("u"),Br=Fa("bum"),B1=Fa("um"),i5=Fa("sp"),o5=Fa("rtg"),l5=Fa("rtc");function s5(e,t=Vr){Rs("ec",e,t)}const N1="components";function u5(e,t){return U1(N1,e,!0,t)||e}const $1=Symbol.for("v-ndc");function c5(e){return Qt(e)?U1(N1,e,!1)||e:e||$1}function U1(e,t,r=!0,n=!1){const a=Lr||Vr;if(a){const i=a.type;{const l=wh(i,!1);if(l&&(l===t||l===Er(t)||l===gs(Er(t))))return i}const o=H1(a[e]||i[e],t)||H1(a.appContext[e],t);return!o&&n?i:o}}function H1(e,t){return e&&(e[t]||e[Er(t)]||e[gs(Er(t))])}function nr(e,t,r,n){let a;const i=r,o=bt(e);if(o||Qt(e)){const l=o&&Mi(e);let s=!1,u=!1;l&&(s=!Mn(e),u=Da(e),e=ws(e)),a=new Array(e.length);for(let c=0,f=e.length;c<f;c++)a[c]=t(s?u?oo(Vn(e[c])):Vn(e[c]):e[c],c,void 0,i)}else if(typeof e=="number"){a=new Array(e);for(let l=0;l<e;l++)a[l]=t(l+1,l,void 0,i)}else if(Vt(e))if(e[Symbol.iterator])a=Array.from(e,(l,s)=>t(l,s,void 0,i));else{const l=Object.keys(e);a=new Array(l.length);for(let s=0,u=l.length;s<u;s++){const c=l[s];a[s]=t(e[c],c,s,i)}}else a=[];return a}function j1(e,t,r={},n,a){if(Lr.ce||Lr.parent&&co(Lr.parent)&&Lr.parent.ce){const u=Object.keys(r).length>0;return t!=="default"&&(r.name=t),Q(),kr(yt,null,[Bt("slot",r,n)],u?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),Q();const o=i&&G1(i(r)),l=r.key||o&&o.key,s=kr(yt,{key:(l&&!jn(l)?l:`_${t}`)+(!o&&n?"_fb":"")},o||[],o&&e._===1?64:-2);return s.scopeId&&(s.slotScopeIds=[s.scopeId+"-s"]),i&&i._c&&(i._d=!0),s}function G1(e){return e.some(t=>yl(t)?!(t.type===Gr||t.type===yt&&!G1(t.children)):!0)?e:null}const Xu=e=>e?yh(e)?js(e):Xu(e.parent):null,vl=ir(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Xu(e.parent),$root:e=>Xu(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>K1(e),$forceUpdate:e=>e.f||(e.f=()=>{Gu(e.update)}),$nextTick:e=>e.n||(e.n=za.bind(e.proxy)),$watch:e=>Wb.bind(e)}),Yu=(e,t)=>e!==Kt&&!e.__isScriptSetup&&$t(e,t),f5={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:r,setupState:n,data:a,props:i,accessCache:o,type:l,appContext:s}=e;if(t[0]!=="$"){const d=o[t];if(d!==void 0)switch(d){case 1:return n[t];case 2:return a[t];case 4:return r[t];case 3:return i[t]}else{if(Yu(n,t))return o[t]=1,n[t];if(a!==Kt&&$t(a,t))return o[t]=2,a[t];if($t(i,t))return o[t]=3,i[t];if(r!==Kt&&$t(r,t))return o[t]=4,r[t];Zu&&(o[t]=0)}}const u=vl[t];let c,f;if(u)return t==="$attrs"&&jr(e.attrs,"get",""),u(e);if((c=l.__cssModules)&&(c=c[t]))return c;if(r!==Kt&&$t(r,t))return o[t]=4,r[t];if(f=s.config.globalProperties,$t(f,t))return f[t]},set({_:e},t,r){const{data:n,setupState:a,ctx:i}=e;return Yu(a,t)?(a[t]=r,!0):n!==Kt&&$t(n,t)?(n[t]=r,!0):$t(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=r,!0)},has({_:{data:e,setupState:t,accessCache:r,ctx:n,appContext:a,props:i,type:o}},l){let s;return!!(r[l]||e!==Kt&&l[0]!=="$"&&$t(e,l)||Yu(t,l)||$t(i,l)||$t(n,l)||$t(vl,l)||$t(a.config.globalProperties,l)||(s=o.__cssModules)&&s[l])},defineProperty(e,t,r){return r.get!=null?e._.accessCache[t]=0:$t(r,"value")&&this.set(e,t,r.value,null),Reflect.defineProperty(e,t,r)}};function V1(e){return bt(e)?e.reduce((t,r)=>(t[r]=null,t),{}):e}let Zu=!0;function d5(e){const t=K1(e),r=e.proxy,n=e.ctx;Zu=!1,t.beforeCreate&&q1(t.beforeCreate,e,"bc");const{data:a,computed:i,methods:o,watch:l,provide:s,inject:u,created:c,beforeMount:f,mounted:d,beforeUpdate:h,updated:y,activated:p,deactivated:x,beforeDestroy:g,beforeUnmount:m,destroyed:b,unmounted:v,render:S,renderTracked:C,renderTriggered:A,errorCaptured:_,serverPrefetch:E,expose:M,inheritAttrs:z,components:N,directives:R,filters:$}=t;if(u&&h5(u,n,null),o)for(const Z in o){const te=o[Z];St(te)&&(n[Z]=te.bind(r))}if(a){const Z=a.call(r,r);Vt(Z)&&(e.data=$u(Z))}if(Zu=!0,i)for(const Z in i){const te=i[Z],ne=St(te)?te.bind(r,r):St(te.get)?te.get.bind(r,r):aa,_e=!St(te)&&St(te.set)?te.set.bind(r):aa,pe=gt({get:ne,set:_e});Object.defineProperty(n,Z,{enumerable:!0,configurable:!0,get:()=>pe.value,set:we=>pe.value=we})}if(l)for(const Z in l)W1(l[Z],n,r,Z);if(s){const Z=St(s)?s.call(r):s;Reflect.ownKeys(Z).forEach(te=>{Gb(te,Z[te])})}c&&q1(c,e,"c");function W(Z,te){bt(te)?te.forEach(ne=>Z(ne.bind(r))):te&&Z(te.bind(r))}if(W(n5,f),W(pr,d),W(a5,h),W(L1,y),W(e5,p),W(t5,x),W(s5,_),W(l5,C),W(o5,A),W(Br,m),W(B1,v),W(i5,E),bt(M))if(M.length){const Z=e.exposed||(e.exposed={});M.forEach(te=>{Object.defineProperty(Z,te,{get:()=>r[te],set:ne=>r[te]=ne,enumerable:!0})})}else e.exposed||(e.exposed={});S&&e.render===aa&&(e.render=S),z!=null&&(e.inheritAttrs=z),N&&(e.components=N),R&&(e.directives=R),E&&F1(e)}function h5(e,t,r=aa){bt(e)&&(e=Ju(e));for(const n in e){const a=e[n];let i;Vt(a)?"default"in a?i=zs(a.from||n,a.default,!0):i=zs(a.from||n):i=zs(a),Rr(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[n]=i}}function q1(e,t,r){qn(bt(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,r)}function W1(e,t,r,n){let a=n.includes(".")?w1(r,n):()=>r[n];if(Qt(e)){const i=t[e];St(i)&&tr(a,i)}else if(St(e))tr(a,e.bind(r));else if(Vt(e))if(bt(e))e.forEach(i=>W1(i,t,r,n));else{const i=St(e.handler)?e.handler.bind(r):t[e.handler];St(i)&&tr(a,i,e)}}function K1(e){const t=e.type,{mixins:r,extends:n}=t,{mixins:a,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,l=i.get(t);let s;return l?s=l:!a.length&&!r&&!n?s=t:(s={},a.length&&a.forEach(u=>Ls(s,u,o,!0)),Ls(s,t,o)),Vt(t)&&i.set(t,s),s}function Ls(e,t,r,n=!1){const{mixins:a,extends:i}=t;i&&Ls(e,i,r,!0),a&&a.forEach(o=>Ls(e,o,r,!0));for(const o in t)if(!(n&&o==="expose")){const l=p5[o]||r&&r[o];e[o]=l?l(e[o],t[o]):t[o]}return e}const p5={data:X1,props:Y1,emits:Y1,methods:ml,computed:ml,beforeCreate:Yr,created:Yr,beforeMount:Yr,mounted:Yr,beforeUpdate:Yr,updated:Yr,beforeDestroy:Yr,beforeUnmount:Yr,destroyed:Yr,unmounted:Yr,activated:Yr,deactivated:Yr,errorCaptured:Yr,serverPrefetch:Yr,components:ml,directives:ml,watch:m5,provide:X1,inject:v5};function X1(e,t){return t?e?function(){return ir(St(e)?e.call(this,this):e,St(t)?t.call(this,this):t)}:t:e}function v5(e,t){return ml(Ju(e),Ju(t))}function Ju(e){if(bt(e)){const t={};for(let r=0;r<e.length;r++)t[e[r]]=e[r];return t}return e}function Yr(e,t){return e?[...new Set([].concat(e,t))]:t}function ml(e,t){return e?ir(Object.create(null),e,t):t}function Y1(e,t){return e?bt(e)&&bt(t)?[...new Set([...e,...t])]:ir(Object.create(null),V1(e),V1(t??{})):t}function m5(e,t){if(!e)return t;if(!t)return e;const r=ir(Object.create(null),e);for(const n in t)r[n]=Yr(e[n],t[n]);return r}function Z1(){return{app:null,config:{isNativeTag:Nd,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let g5=0;function b5(e,t){return function(n,a=null){St(n)||(n=ir({},n)),a!=null&&!Vt(a)&&(a=null);const i=Z1(),o=new WeakSet,l=[];let s=!1;const u=i.app={_uid:g5++,_component:n,_props:a,_container:null,_context:i,_instance:null,version:Y5,get config(){return i.config},set config(c){},use(c,...f){return o.has(c)||(c&&St(c.install)?(o.add(c),c.install(u,...f)):St(c)&&(o.add(c),c(u,...f))),u},mixin(c){return i.mixins.includes(c)||i.mixins.push(c),u},component(c,f){return f?(i.components[c]=f,u):i.components[c]},directive(c,f){return f?(i.directives[c]=f,u):i.directives[c]},mount(c,f,d){if(!s){const h=u._ceVNode||Bt(n,a);return h.appContext=i,d===!0?d="svg":d===!1&&(d=void 0),e(h,c,d),s=!0,u._container=c,c.__vue_app__=u,js(h.component)}},onUnmount(c){l.push(c)},unmount(){s&&(qn(l,u._instance,16),e(null,u._container),delete u._container.__vue_app__)},provide(c,f){return i.provides[c]=f,u},runWithContext(c){const f=fo;fo=u;try{return c()}finally{fo=f}}};return u}}let fo=null;const y5=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Er(t)}Modifiers`]||e[`${hn(t)}Modifiers`];function x5(e,t,...r){if(e.isUnmounted)return;const n=e.vnode.props||Kt;let a=r;const i=t.startsWith("update:"),o=i&&y5(n,t.slice(7));o&&(o.trim&&(a=r.map(c=>Qt(c)?c.trim():c)),o.number&&(a=r.map(ys)));let l,s=n[l=Au(t)]||n[l=Au(Er(t))];!s&&i&&(s=n[l=Au(hn(t))]),s&&qn(s,e,6,a);const u=n[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,qn(u,e,6,a)}}const _5=new WeakMap;function J1(e,t,r=!1){const n=r?_5:t.emitsCache,a=n.get(e);if(a!==void 0)return a;const i=e.emits;let o={},l=!1;if(!St(e)){const s=u=>{const c=J1(u,t,!0);c&&(l=!0,ir(o,c))};!r&&t.mixins.length&&t.mixins.forEach(s),e.extends&&s(e.extends),e.mixins&&e.mixins.forEach(s)}return!i&&!l?(Vt(e)&&n.set(e,null),null):(bt(i)?i.forEach(s=>o[s]=null):ir(o,i),Vt(e)&&n.set(e,o),o)}function Bs(e,t){return!e||!hs(t)?!1:(t=t.slice(2).replace(/Once$/,""),$t(e,t[0].toLowerCase()+t.slice(1))||$t(e,hn(t))||$t(e,t))}function zM(){}function Q1(e){const{type:t,vnode:r,proxy:n,withProxy:a,propsOptions:[i],slots:o,attrs:l,emit:s,render:u,renderCache:c,props:f,data:d,setupState:h,ctx:y,inheritAttrs:p}=e,x=Is(e);let g,m;try{if(r.shapeFlag&4){const v=a||n,S=v;g=fa(u.call(S,v,c,f,h,d,y)),m=l}else{const v=t;g=fa(v.length>1?v(f,{attrs:l,slots:o,emit:s}):v(f,null)),m=t.props?l:w5(l)}}catch(v){gl.length=0,Ms(v,e,1),g=Bt(Gr)}let b=g;if(m&&p!==!1){const v=Object.keys(m),{shapeFlag:S}=b;v.length&&S&7&&(i&&v.some(ps)&&(m=k5(m,i)),b=ni(b,m,!1,!0))}return r.dirs&&(b=ni(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(r.dirs):r.dirs),r.transition&&Fi(b,r.transition),g=b,Is(x),g}const w5=e=>{let t;for(const r in e)(r==="class"||r==="style"||hs(r))&&((t||(t={}))[r]=e[r]);return t},k5=(e,t)=>{const r={};for(const n in e)(!ps(n)||!(n.slice(9)in t))&&(r[n]=e[n]);return r};function S5(e,t,r){const{props:n,children:a,component:i}=e,{props:o,children:l,patchFlag:s}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(r&&s>=0){if(s&1024)return!0;if(s&16)return n?eh(n,o,u):!!o;if(s&8){const c=t.dynamicProps;for(let f=0;f<c.length;f++){const d=c[f];if(th(o,n,d)&&!Bs(u,d))return!0}}}else return(a||l)&&(!l||!l.$stable)?!0:n===o?!1:n?o?eh(n,o,u):!0:!!o;return!1}function eh(e,t,r){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let a=0;a<n.length;a++){const i=n[a];if(th(t,e,i)&&!Bs(r,i))return!0}return!1}function th(e,t,r){const n=e[r],a=t[r];return r==="style"&&Vt(n)&&Vt(a)?!ao(n,a):n!==a}function C5({vnode:e,parent:t,suspense:r},n){for(;t;){const a=t.subTree;if(a.suspense&&a.suspense.activeBranch===e&&(a.suspense.vnode.el=a.el=n,e=a),a===e)(e=t.vnode).el=n,t=t.parent;else break}r&&r.activeBranch===e&&(r.vnode.el=n)}const rh={},nh=()=>Object.create(rh),ah=e=>Object.getPrototypeOf(e)===rh;function A5(e,t,r,n=!1){const a={},i=nh();e.propsDefaults=Object.create(null),ih(e,t,a,i);for(const o in e.propsOptions[0])o in a||(a[o]=void 0);r?e.props=n?a:Ab(a):e.type.props?e.props=a:e.props=i,e.attrs=i}function E5(e,t,r,n){const{props:a,attrs:i,vnode:{patchFlag:o}}=e,l=Lt(a),[s]=e.propsOptions;let u=!1;if((n||o>0)&&!(o&16)){if(o&8){const c=e.vnode.dynamicProps;for(let f=0;f<c.length;f++){let d=c[f];if(Bs(e.emitsOptions,d))continue;const h=t[d];if(s)if($t(i,d))h!==i[d]&&(i[d]=h,u=!0);else{const y=Er(d);a[y]=Qu(s,l,y,h,e,!1)}else h!==i[d]&&(i[d]=h,u=!0)}}}else{ih(e,t,a,i)&&(u=!0);let c;for(const f in l)(!t||!$t(t,f)&&((c=hn(f))===f||!$t(t,c)))&&(s?r&&(r[f]!==void 0||r[c]!==void 0)&&(a[f]=Qu(s,l,f,void 0,e,!0)):delete a[f]);if(i!==l)for(const f in i)(!t||!$t(t,f))&&(delete i[f],u=!0)}u&&Ta(e.attrs,"set","")}function ih(e,t,r,n){const[a,i]=e.propsOptions;let o=!1,l;if(t)for(let s in t){if(nl(s))continue;const u=t[s];let c;a&&$t(a,c=Er(s))?!i||!i.includes(c)?r[c]=u:(l||(l={}))[c]=u:Bs(e.emitsOptions,s)||(!(s in n)||u!==n[s])&&(n[s]=u,o=!0)}if(i){const s=Lt(r),u=l||Kt;for(let c=0;c<i.length;c++){const f=i[c];r[f]=Qu(a,s,f,u[f],e,!$t(u,f))}}return o}function Qu(e,t,r,n,a,i){const o=e[r];if(o!=null){const l=$t(o,"default");if(l&&n===void 0){const s=o.default;if(o.type!==Function&&!o.skipFactory&&St(s)){const{propsDefaults:u}=a;if(r in u)n=u[r];else{const c=xl(a);n=u[r]=s.call(null,t),c()}}else n=s;a.ce&&a.ce._setProp(r,n)}o[0]&&(i&&!l?n=!1:o[1]&&(n===""||n===hn(r))&&(n=!0))}return n}const T5=new WeakMap;function oh(e,t,r=!1){const n=r?T5:t.propsCache,a=n.get(e);if(a)return a;const i=e.props,o={},l=[];let s=!1;if(!St(e)){const c=f=>{s=!0;const[d,h]=oh(f,t,!0);ir(o,d),h&&l.push(...h)};!r&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!i&&!s)return Vt(e)&&n.set(e,to),to;if(bt(i))for(let c=0;c<i.length;c++){const f=Er(i[c]);lh(f)&&(o[f]=Kt)}else if(i)for(const c in i){const f=Er(c);if(lh(f)){const d=i[c],h=o[f]=bt(d)||St(d)?{type:d}:ir({},d),y=h.type;let p=!1,x=!0;if(bt(y))for(let g=0;g<y.length;++g){const m=y[g],b=St(m)&&m.name;if(b==="Boolean"){p=!0;break}else b==="String"&&(x=!1)}else p=St(y)&&y.name==="Boolean";h[0]=p,h[1]=x,(p||$t(h,"default"))&&l.push(f)}}const u=[o,l];return Vt(e)&&n.set(e,u),u}function lh(e){return e[0]!=="$"&&!nl(e)}const ec=e=>e==="_"||e==="_ctx"||e==="$stable",tc=e=>bt(e)?e.map(fa):[fa(e)],M5=(e,t,r)=>{if(t._n)return t;const n=Tr((...a)=>tc(t(...a)),r);return n._c=!1,n},sh=(e,t,r)=>{const n=e._ctx;for(const a in e){if(ec(a))continue;const i=e[a];if(St(i))t[a]=M5(a,i,n);else if(i!=null){const o=tc(i);t[a]=()=>o}}},uh=(e,t)=>{const r=tc(t);e.slots.default=()=>r},ch=(e,t,r)=>{for(const n in t)(r||!ec(n))&&(e[n]=t[n])},D5=(e,t,r)=>{const n=e.slots=nh();if(e.vnode.shapeFlag&32){const a=t._;a?(ch(n,t,r),r&&jd(n,"_",a,!0)):sh(t,n)}else t&&uh(e,t)},I5=(e,t,r)=>{const{vnode:n,slots:a}=e;let i=!0,o=Kt;if(n.shapeFlag&32){const l=t._;l?r&&l===1?i=!1:ch(a,t,r):(i=!t.$stable,sh(t,a)),o=t}else t&&(uh(e,t),o={default:1});if(i)for(const l in a)!ec(l)&&o[l]==null&&delete a[l]},Zr=R5;function z5(e){return F5(e)}function F5(e,t){const r=xs();r.__VUE__=!0;const{insert:n,remove:a,patchProp:i,createElement:o,createText:l,createComment:s,setText:u,setElementText:c,parentNode:f,nextSibling:d,setScopeId:h=aa,insertStaticContent:y}=e,p=(P,V,fe,de=null,ie=null,oe=null,se=void 0,ge=null,Ce=!!V.dynamicChildren)=>{if(P===V)return;P&&!Pi(P,V)&&(de=Le(P),we(P,ie,oe,!0),P=null),V.patchFlag===-2&&(Ce=!1,V.dynamicChildren=null);const{type:xe,ref:Ve,shapeFlag:Ue}=V;switch(xe){case Ns:x(P,V,fe,de);break;case Gr:g(P,V,fe,de);break;case ac:P==null&&m(V,fe,de,se);break;case yt:N(P,V,fe,de,ie,oe,se,ge,Ce);break;default:Ue&1?S(P,V,fe,de,ie,oe,se,ge,Ce):Ue&6?R(P,V,fe,de,ie,oe,se,ge,Ce):(Ue&64||Ue&128)&&xe.process(P,V,fe,de,ie,oe,se,ge,Ce,be)}Ve!=null&&ie?pl(Ve,P&&P.ref,oe,V||P,!V):Ve==null&&P&&P.ref!=null&&pl(P.ref,null,oe,P,!0)},x=(P,V,fe,de)=>{if(P==null)n(V.el=l(V.children),fe,de);else{const ie=V.el=P.el;V.children!==P.children&&u(ie,V.children)}},g=(P,V,fe,de)=>{P==null?n(V.el=s(V.children||""),fe,de):V.el=P.el},m=(P,V,fe,de)=>{[P.el,P.anchor]=y(P.children,V,fe,de,P.el,P.anchor)},b=({el:P,anchor:V},fe,de)=>{let ie;for(;P&&P!==V;)ie=d(P),n(P,fe,de),P=ie;n(V,fe,de)},v=({el:P,anchor:V})=>{let fe;for(;P&&P!==V;)fe=d(P),a(P),P=fe;a(V)},S=(P,V,fe,de,ie,oe,se,ge,Ce)=>{if(V.type==="svg"?se="svg":V.type==="math"&&(se="mathml"),P==null)C(V,fe,de,ie,oe,se,ge,Ce);else{const xe=P.el&&P.el._isVueCE?P.el:null;try{xe&&xe._beginPatch(),E(P,V,ie,oe,se,ge,Ce)}finally{xe&&xe._endPatch()}}},C=(P,V,fe,de,ie,oe,se,ge)=>{let Ce,xe;const{props:Ve,shapeFlag:Ue,transition:Ne,dirs:qe}=P;if(Ce=P.el=o(P.type,oe,Ve&&Ve.is,Ve),Ue&8?c(Ce,P.children):Ue&16&&_(P.children,Ce,null,de,ie,rc(P,oe),se,ge),qe&&Ii(P,null,de,"created"),A(Ce,P,P.scopeId,se,de),Ve){for(const ct in Ve)ct!=="value"&&!nl(ct)&&i(Ce,ct,null,Ve[ct],oe,de);"value"in Ve&&i(Ce,"value",null,Ve.value,oe),(xe=Ve.onVnodeBeforeMount)&&da(xe,de,P)}qe&&Ii(P,null,de,"beforeMount");const it=O5(ie,Ne);it&&Ne.beforeEnter(Ce),n(Ce,V,fe),((xe=Ve&&Ve.onVnodeMounted)||it||qe)&&Zr(()=>{try{xe&&da(xe,de,P),it&&Ne.enter(Ce),qe&&Ii(P,null,de,"mounted")}finally{}},ie)},A=(P,V,fe,de,ie)=>{if(fe&&h(P,fe),de)for(let oe=0;oe<de.length;oe++)h(P,de[oe]);if(ie){let oe=ie.subTree;if(V===oe||ph(oe.type)&&(oe.ssContent===V||oe.ssFallback===V)){const se=ie.vnode;A(P,se,se.scopeId,se.slotScopeIds,ie.parent)}}},_=(P,V,fe,de,ie,oe,se,ge,Ce=0)=>{for(let xe=Ce;xe<P.length;xe++){const Ve=P[xe]=ge?Oa(P[xe]):fa(P[xe]);p(null,Ve,V,fe,de,ie,oe,se,ge)}},E=(P,V,fe,de,ie,oe,se)=>{const ge=V.el=P.el;let{patchFlag:Ce,dynamicChildren:xe,dirs:Ve}=V;Ce|=P.patchFlag&16;const Ue=P.props||Kt,Ne=V.props||Kt;let qe;if(fe&&Oi(fe,!1),(qe=Ne.onVnodeBeforeUpdate)&&da(qe,fe,V,P),Ve&&Ii(V,P,fe,"beforeUpdate"),fe&&Oi(fe,!0),(Ue.innerHTML&&Ne.innerHTML==null||Ue.textContent&&Ne.textContent==null)&&c(ge,""),xe?M(P.dynamicChildren,xe,ge,fe,de,rc(V,ie),oe):se||te(P,V,ge,null,fe,de,rc(V,ie),oe,!1),Ce>0){if(Ce&16)z(ge,Ue,Ne,fe,ie);else if(Ce&2&&Ue.class!==Ne.class&&i(ge,"class",null,Ne.class,ie),Ce&4&&i(ge,"style",Ue.style,Ne.style,ie),Ce&8){const it=V.dynamicProps;for(let ct=0;ct<it.length;ct++){const ot=it[ct],wt=Ue[ot],Me=Ne[ot];(Me!==wt||ot==="value")&&i(ge,ot,wt,Me,ie,fe)}}Ce&1&&P.children!==V.children&&c(ge,V.children)}else!se&&xe==null&&z(ge,Ue,Ne,fe,ie);((qe=Ne.onVnodeUpdated)||Ve)&&Zr(()=>{qe&&da(qe,fe,V,P),Ve&&Ii(V,P,fe,"updated")},de)},M=(P,V,fe,de,ie,oe,se)=>{for(let ge=0;ge<V.length;ge++){const Ce=P[ge],xe=V[ge],Ve=Ce.el&&(Ce.type===yt||!Pi(Ce,xe)||Ce.shapeFlag&198)?f(Ce.el):fe;p(Ce,xe,Ve,null,de,ie,oe,se,!0)}},z=(P,V,fe,de,ie)=>{if(V!==fe){if(V!==Kt)for(const oe in V)!nl(oe)&&!(oe in fe)&&i(P,oe,V[oe],null,ie,de);for(const oe in fe){if(nl(oe))continue;const se=fe[oe],ge=V[oe];se!==ge&&oe!=="value"&&i(P,oe,ge,se,ie,de)}"value"in fe&&i(P,"value",V.value,fe.value,ie)}},N=(P,V,fe,de,ie,oe,se,ge,Ce)=>{const xe=V.el=P?P.el:l(""),Ve=V.anchor=P?P.anchor:l("");let{patchFlag:Ue,dynamicChildren:Ne,slotScopeIds:qe}=V;qe&&(ge=ge?ge.concat(qe):qe),P==null?(n(xe,fe,de),n(Ve,fe,de),_(V.children||[],fe,Ve,ie,oe,se,ge,Ce)):Ue>0&&Ue&64&&Ne&&P.dynamicChildren&&P.dynamicChildren.length===Ne.length?(M(P.dynamicChildren,Ne,fe,ie,oe,se,ge),(V.key!=null||ie&&V===ie.subTree)&&nc(P,V,!0)):te(P,V,fe,Ve,ie,oe,se,ge,Ce)},R=(P,V,fe,de,ie,oe,se,ge,Ce)=>{V.slotScopeIds=ge,P==null?V.shapeFlag&512?ie.ctx.activate(V,fe,de,se,Ce):$(V,fe,de,ie,oe,se,Ce):q(P,V,Ce)},$=(P,V,fe,de,ie,oe,se)=>{const ge=P.component=H5(P,de,ie);if(Ps(P)&&(ge.ctx.renderer=be),j5(ge,!1,se),ge.asyncDep){if(ie&&ie.registerDep(ge,W,se),!P.el){const Ce=ge.subTree=Bt(Gr);g(null,Ce,V,fe),P.placeholder=Ce.el}}else W(ge,P,V,fe,ie,oe,se)},q=(P,V,fe)=>{const de=V.component=P.component;if(S5(P,V,fe))if(de.asyncDep&&!de.asyncResolved){Z(de,V,fe);return}else de.next=V,de.update();else V.el=P.el,de.vnode=V},W=(P,V,fe,de,ie,oe,se)=>{const ge=()=>{if(P.isMounted){let{next:Ue,bu:Ne,u:qe,parent:it,vnode:ct}=P;{const ue=fh(P);if(ue){Ue&&(Ue.el=ct.el,Z(P,Ue,se)),ue.asyncDep.then(()=>{Zr(()=>{P.isUnmounted||xe()},ie)});return}}let ot=Ue,wt;Oi(P,!1),Ue?(Ue.el=ct.el,Z(P,Ue,se)):Ue=ct,Ne&&bs(Ne),(wt=Ue.props&&Ue.props.onVnodeBeforeUpdate)&&da(wt,it,Ue,ct),Oi(P,!0);const Me=Q1(P),D=P.subTree;P.subTree=Me,p(D,Me,f(D.el),Le(D),P,ie,oe),Ue.el=Me.el,ot===null&&C5(P,Me.el),qe&&Zr(qe,ie),(wt=Ue.props&&Ue.props.onVnodeUpdated)&&Zr(()=>da(wt,it,Ue,ct),ie)}else{let Ue;const{el:Ne,props:qe}=V,{bm:it,m:ct,parent:ot,root:wt,type:Me}=P,D=co(V);Oi(P,!1),it&&bs(it),!D&&(Ue=qe&&qe.onVnodeBeforeMount)&&da(Ue,ot,V),Oi(P,!0);{wt.ce&&wt.ce._hasShadowRoot()&&wt.ce._injectChildStyle(Me,P.parent?P.parent.type:void 0);const ue=P.subTree=Q1(P);p(null,ue,fe,de,P,ie,oe),V.el=ue.el}if(ct&&Zr(ct,ie),!D&&(Ue=qe&&qe.onVnodeMounted)){const ue=V;Zr(()=>da(Ue,ot,ue),ie)}(V.shapeFlag&256||ot&&co(ot.vnode)&&ot.vnode.shapeFlag&256)&&P.a&&Zr(P.a,ie),P.isMounted=!0,V=fe=de=null}};P.scope.on();const Ce=P.effect=new Kd(ge);P.scope.off();const xe=P.update=Ce.run.bind(Ce),Ve=P.job=Ce.runIfDirty.bind(Ce);Ve.i=P,Ve.id=P.uid,Ce.scheduler=()=>Gu(Ve),Oi(P,!0),xe()},Z=(P,V,fe)=>{V.component=P;const de=P.vnode.props;P.vnode=V,P.next=null,E5(P,V.props,de,fe),I5(P,V.children,fe),oa(),g1(P),la()},te=(P,V,fe,de,ie,oe,se,ge,Ce=!1)=>{const xe=P&&P.children,Ve=P?P.shapeFlag:0,Ue=V.children,{patchFlag:Ne,shapeFlag:qe}=V;if(Ne>0){if(Ne&128){_e(xe,Ue,fe,de,ie,oe,se,ge,Ce);return}else if(Ne&256){ne(xe,Ue,fe,de,ie,oe,se,ge,Ce);return}}qe&8?(Ve&16&&Ie(xe,ie,oe),Ue!==xe&&c(fe,Ue)):Ve&16?qe&16?_e(xe,Ue,fe,de,ie,oe,se,ge,Ce):Ie(xe,ie,oe,!0):(Ve&8&&c(fe,""),qe&16&&_(Ue,fe,de,ie,oe,se,ge,Ce))},ne=(P,V,fe,de,ie,oe,se,ge,Ce)=>{P=P||to,V=V||to;const xe=P.length,Ve=V.length,Ue=Math.min(xe,Ve);let Ne;for(Ne=0;Ne<Ue;Ne++){const qe=V[Ne]=Ce?Oa(V[Ne]):fa(V[Ne]);p(P[Ne],qe,fe,null,ie,oe,se,ge,Ce)}xe>Ve?Ie(P,ie,oe,!0,!1,Ue):_(V,fe,de,ie,oe,se,ge,Ce,Ue)},_e=(P,V,fe,de,ie,oe,se,ge,Ce)=>{let xe=0;const Ve=V.length;let Ue=P.length-1,Ne=Ve-1;for(;xe<=Ue&&xe<=Ne;){const qe=P[xe],it=V[xe]=Ce?Oa(V[xe]):fa(V[xe]);if(Pi(qe,it))p(qe,it,fe,null,ie,oe,se,ge,Ce);else break;xe++}for(;xe<=Ue&&xe<=Ne;){const qe=P[Ue],it=V[Ne]=Ce?Oa(V[Ne]):fa(V[Ne]);if(Pi(qe,it))p(qe,it,fe,null,ie,oe,se,ge,Ce);else break;Ue--,Ne--}if(xe>Ue){if(xe<=Ne){const qe=Ne+1,it=qe<Ve?V[qe].el:de;for(;xe<=Ne;)p(null,V[xe]=Ce?Oa(V[xe]):fa(V[xe]),fe,it,ie,oe,se,ge,Ce),xe++}}else if(xe>Ne)for(;xe<=Ue;)we(P[xe],ie,oe,!0),xe++;else{const qe=xe,it=xe,ct=new Map;for(xe=it;xe<=Ne;xe++){const re=V[xe]=Ce?Oa(V[xe]):fa(V[xe]);re.key!=null&&ct.set(re.key,xe)}let ot,wt=0;const Me=Ne-it+1;let D=!1,ue=0;const ke=new Array(Me);for(xe=0;xe<Me;xe++)ke[xe]=0;for(xe=qe;xe<=Ue;xe++){const re=P[xe];if(wt>=Me){we(re,ie,oe,!0);continue}let me;if(re.key!=null)me=ct.get(re.key);else for(ot=it;ot<=Ne;ot++)if(ke[ot-it]===0&&Pi(re,V[ot])){me=ot;break}me===void 0?we(re,ie,oe,!0):(ke[me-it]=xe+1,me>=ue?ue=me:D=!0,p(re,V[me],fe,null,ie,oe,se,ge,Ce),wt++)}const ze=D?P5(ke):to;for(ot=ze.length-1,xe=Me-1;xe>=0;xe--){const re=it+xe,me=V[re],O=V[re+1],Fe=re+1<Ve?O.el||hh(O):de;ke[xe]===0?p(null,me,fe,Fe,ie,oe,se,ge,Ce):D&&(ot<0||xe!==ze[ot]?pe(me,fe,Fe,2):ot--)}}},pe=(P,V,fe,de,ie=null)=>{const{el:oe,type:se,transition:ge,children:Ce,shapeFlag:xe}=P;if(xe&6){pe(P.component.subTree,V,fe,de);return}if(xe&128){P.suspense.move(V,fe,de);return}if(xe&64){se.move(P,V,fe,be);return}if(se===yt){n(oe,V,fe);for(let Ue=0;Ue<Ce.length;Ue++)pe(Ce[Ue],V,fe,de);n(P.anchor,V,fe);return}if(se===ac){b(P,V,fe);return}if(de!==2&&xe&1&&ge)if(de===0)ge.beforeEnter(oe),n(oe,V,fe),Zr(()=>ge.enter(oe),ie);else{const{leave:Ue,delayLeave:Ne,afterLeave:qe}=ge,it=()=>{P.ctx.isUnmounted?a(oe):n(oe,V,fe)},ct=()=>{oe._isLeaving&&oe[ca](!0),Ue(oe,()=>{it(),qe&&qe()})};Ne?Ne(oe,it,ct):ct()}else n(oe,V,fe)},we=(P,V,fe,de=!1,ie=!1)=>{const{type:oe,props:se,ref:ge,children:Ce,dynamicChildren:xe,shapeFlag:Ve,patchFlag:Ue,dirs:Ne,cacheIndex:qe,memo:it}=P;if(Ue===-2&&(ie=!1),ge!=null&&(oa(),pl(ge,null,fe,P,!0),la()),qe!=null&&(V.renderCache[qe]=void 0),Ve&256){V.ctx.deactivate(P);return}const ct=Ve&1&&Ne,ot=!co(P);let wt;if(ot&&(wt=se&&se.onVnodeBeforeUnmount)&&da(wt,V,P),Ve&6)Se(P.component,fe,de);else{if(Ve&128){P.suspense.unmount(fe,de);return}ct&&Ii(P,null,V,"beforeUnmount"),Ve&64?P.type.remove(P,V,fe,be,de):xe&&!xe.hasOnce&&(oe!==yt||Ue>0&&Ue&64)?Ie(xe,V,fe,!1,!0):(oe===yt&&Ue&384||!ie&&Ve&16)&&Ie(Ce,V,fe),de&&ve(P)}const Me=it!=null&&qe==null;(ot&&(wt=se&&se.onVnodeUnmounted)||ct||Me)&&Zr(()=>{wt&&da(wt,V,P),ct&&Ii(P,null,V,"unmounted"),Me&&(P.el=null)},fe)},ve=P=>{const{type:V,el:fe,anchor:de,transition:ie}=P;if(V===yt){Te(fe,de);return}if(V===ac){v(P);return}const oe=()=>{a(fe),ie&&!ie.persisted&&ie.afterLeave&&ie.afterLeave()};if(P.shapeFlag&1&&ie&&!ie.persisted){const{leave:se,delayLeave:ge}=ie,Ce=()=>se(fe,oe);ge?ge(P.el,oe,Ce):Ce()}else oe()},Te=(P,V)=>{let fe;for(;P!==V;)fe=d(P),a(P),P=fe;a(V)},Se=(P,V,fe)=>{const{bum:de,scope:ie,job:oe,subTree:se,um:ge,m:Ce,a:xe}=P;dh(Ce),dh(xe),de&&bs(de),ie.stop(),oe&&(oe.flags|=8,we(se,P,V,fe)),ge&&Zr(ge,V),Zr(()=>{P.isUnmounted=!0},V)},Ie=(P,V,fe,de=!1,ie=!1,oe=0)=>{for(let se=oe;se<P.length;se++)we(P[se],V,fe,de,ie)},Le=P=>{if(P.shapeFlag&6)return Le(P.component.subTree);if(P.shapeFlag&128)return P.suspense.next();const V=d(P.anchor||P.el),fe=V&&V[k1];return fe?d(fe):V};let Ae=!1;const Be=(P,V,fe)=>{let de;P==null?V._vnode&&(we(V._vnode,null,null,!0),de=V._vnode.component):p(V._vnode||null,P,V,null,null,null,fe),V._vnode=P,Ae||(Ae=!0,g1(de),b1(),Ae=!1)},be={p,um:we,m:pe,r:ve,mt:$,mc:_,pc:te,pbc:M,n:Le,o:e};return{render:Be,hydrate:void 0,createApp:b5(Be)}}function rc({type:e,props:t},r){return r==="svg"&&e==="foreignObject"||r==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:r}function Oi({effect:e,job:t},r){r?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function O5(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function nc(e,t,r=!1){const n=e.children,a=t.children;if(bt(n)&&bt(a))for(let i=0;i<n.length;i++){const o=n[i];let l=a[i];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=a[i]=Oa(a[i]),l.el=o.el),!r&&l.patchFlag!==-2&&nc(o,l)),l.type===Ns&&(l.patchFlag===-1&&(l=a[i]=Oa(l)),l.el=o.el),l.type===Gr&&!l.el&&(l.el=o.el)}}function P5(e){const t=e.slice(),r=[0];let n,a,i,o,l;const s=e.length;for(n=0;n<s;n++){const u=e[n];if(u!==0){if(a=r[r.length-1],e[a]<u){t[n]=a,r.push(n);continue}for(i=0,o=r.length-1;i<o;)l=i+o>>1,e[r[l]]<u?i=l+1:o=l;u<e[r[i]]&&(i>0&&(t[n]=r[i-1]),r[i]=n)}}for(i=r.length,o=r[i-1];i-- >0;)r[i]=o,o=t[o];return r}function fh(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:fh(t)}function dh(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function hh(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?hh(t.subTree):null}const ph=e=>e.__isSuspense;function R5(e,t){t&&t.pendingBranch?bt(e)?t.effects.push(...e):t.effects.push(e):jb(e)}const yt=Symbol.for("v-fgt"),Ns=Symbol.for("v-txt"),Gr=Symbol.for("v-cmt"),ac=Symbol.for("v-stc"),gl=[];let pn=null;function Q(e=!1){gl.push(pn=e?null:[])}function L5(){gl.pop(),pn=gl[gl.length-1]||null}let bl=1;function $s(e,t=!1){bl+=e,e<0&&pn&&t&&(pn.hasOnce=!0)}function vh(e){return e.dynamicChildren=bl>0?pn||to:null,L5(),bl>0&&pn&&pn.push(e),e}function ae(e,t,r,n,a,i){return vh(L(e,t,r,n,a,i,!0))}function kr(e,t,r,n,a){return vh(Bt(e,t,r,n,a,!0))}function yl(e){return e?e.__v_isVNode===!0:!1}function Pi(e,t){return e.type===t.type&&e.key===t.key}const mh=({key:e})=>e??null,Us=({ref:e,ref_key:t,ref_for:r})=>(typeof e=="number"&&(e=""+e),e!=null?Qt(e)||Rr(e)||St(e)?{i:Lr,r:e,k:t,f:!!r}:e:null);function L(e,t=null,r=null,n=0,a=null,i=e===yt?0:1,o=!1,l=!1){const s={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&mh(t),ref:t&&Us(t),scopeId:x1,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:n,dynamicProps:a,dynamicChildren:null,appContext:null,ctx:Lr};return l?(ic(s,r),i&128&&e.normalize(s)):r&&(s.shapeFlag|=Qt(r)?8:16),bl>0&&!o&&pn&&(s.patchFlag>0||i&6)&&s.patchFlag!==32&&pn.push(s),s}const Bt=B5;function B5(e,t=null,r=null,n=0,a=null,i=!1){if((!e||e===$1)&&(e=Gr),yl(e)){const l=ni(e,t,!0);return r&&ic(l,r),bl>0&&!i&&pn&&(l.shapeFlag&6?pn[pn.indexOf(e)]=l:pn.push(l)),l.patchFlag=-2,l}if(X5(e)&&(e=e.__vccOpts),t){t=N5(t);let{class:l,style:s}=t;l&&!Qt(l)&&(t.class=Xt(l)),Vt(s)&&(Hu(s)&&!bt(s)&&(s=ir({},s)),t.style=Ea(s))}const o=Qt(e)?1:ph(e)?128:S1(e)?64:Vt(e)?4:St(e)?2:0;return L(e,t,r,n,a,o,i,!0)}function N5(e){return e?Hu(e)||ah(e)?ir({},e):e:null}function ni(e,t,r=!1,n=!1){const{props:a,ref:i,patchFlag:o,children:l,transition:s}=e,u=t?gh(a||{},t):a,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&mh(u),ref:t&&t.ref?r&&i?bt(i)?i.concat(Us(t)):[i,Us(t)]:Us(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==yt?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:s,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ni(e.ssContent),ssFallback:e.ssFallback&&ni(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return s&&n&&Fi(c,s.clone(c)),c}function gr(e=" ",t=0){return Bt(Ns,null,e,t)}function rt(e="",t=!1){return t?(Q(),kr(Gr,null,e)):Bt(Gr,null,e)}function fa(e){return e==null||typeof e=="boolean"?Bt(Gr):bt(e)?Bt(yt,null,e.slice()):yl(e)?Oa(e):Bt(Ns,null,String(e))}function Oa(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ni(e)}function ic(e,t){let r=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(bt(t))r=16;else if(typeof t=="object")if(n&65){const a=t.default;a&&(a._c&&(a._d=!1),ic(e,a()),a._c&&(a._d=!0));return}else{r=32;const a=t._;!a&&!ah(t)?t._ctx=Lr:a===3&&Lr&&(Lr.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else St(t)?(t={default:t,_ctx:Lr},r=32):(t=String(t),n&64?(r=16,t=[gr(t)]):r=8);e.children=t,e.shapeFlag|=r}function gh(...e){const t={};for(let r=0;r<e.length;r++){const n=e[r];for(const a in n)if(a==="class")t.class!==n.class&&(t.class=Xt([t.class,n.class]));else if(a==="style")t.style=Ea([t.style,n.style]);else if(hs(a)){const i=t[a],o=n[a];o&&i!==o&&!(bt(i)&&i.includes(o))?t[a]=i?[].concat(i,o):o:o==null&&i==null&&!ps(a)&&(t[a]=o)}else a!==""&&(t[a]=n[a])}return t}function da(e,t,r,n=null){qn(e,t,7,[r,n])}const $5=Z1();let U5=0;function H5(e,t,r){const n=e.type,a=(t?t.appContext:e.appContext)||$5,i={uid:U5++,vnode:e,type:n,parent:t,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new ob(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(a.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:oh(n,a),emitsOptions:J1(n,a),emit:null,emitted:null,propsDefaults:Kt,inheritAttrs:n.inheritAttrs,ctx:Kt,data:Kt,props:Kt,attrs:Kt,slots:Kt,refs:Kt,setupState:Kt,setupContext:null,suspense:r,suspenseId:r?r.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=x5.bind(null,i),e.ce&&e.ce(i),i}let Vr=null;const oc=()=>Vr||Lr;let Hs,lc;{const e=xs(),t=(r,n)=>{let a;return(a=e[r])||(a=e[r]=[]),a.push(n),i=>{a.length>1?a.forEach(o=>o(i)):a[0](i)}};Hs=t("__VUE_INSTANCE_SETTERS__",r=>Vr=r),lc=t("__VUE_SSR_SETTERS__",r=>_l=r)}const xl=e=>{const t=Vr;return Hs(e),e.scope.on(),()=>{e.scope.off(),Hs(t)}},bh=()=>{Vr&&Vr.scope.off(),Hs(null)};function yh(e){return e.vnode.shapeFlag&4}let _l=!1;function j5(e,t=!1,r=!1){t&&lc(t);const{props:n,children:a}=e.vnode,i=yh(e);A5(e,n,i,t),D5(e,a,r||t);const o=i?G5(e,t):void 0;return t&&lc(!1),o}function G5(e,t){const r=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,f5);const{setup:n}=r;if(n){oa();const a=e.setupContext=n.length>1?q5(e):null,i=xl(e),o=lo(n,e,0,[e.props,a]),l=Ud(o);if(la(),i(),(l||e.sp)&&!co(e)&&F1(e),l){if(o.then(bh,bh),t)return o.then(s=>{xh(e,s)}).catch(s=>{Ms(s,e,0)});e.asyncDep=o}else xh(e,o)}else _h(e)}function xh(e,t,r){St(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Vt(t)&&(e.setupState=h1(t)),_h(e)}function _h(e,t,r){const n=e.type;e.render||(e.render=n.render||aa);{const a=xl(e);oa();try{d5(e)}finally{la(),a()}}}const V5={get(e,t){return jr(e,"get",""),e[t]}};function q5(e){const t=r=>{e.exposed=r||{}};return{attrs:new Proxy(e.attrs,V5),slots:e.slots,emit:e.emit,expose:t}}function js(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(h1(Eb(e.exposed)),{get(t,r){if(r in t)return t[r];if(r in vl)return vl[r](e)},has(t,r){return r in t||r in vl}})):e.proxy}const W5=/(?:^|[-_])\w/g,K5=e=>e.replace(W5,t=>t.toUpperCase()).replace(/[-_]/g,"");function wh(e,t=!0){return St(e)?e.displayName||e.name:e.name||t&&e.__name}function kh(e,t,r=!1){let n=wh(t);if(!n&&t.__file){const a=t.__file.match(/([^/\\]+)\.\w+$/);a&&(n=a[1])}if(!n&&e){const a=i=>{for(const o in i)if(i[o]===t)return o};n=a(e.components)||e.parent&&a(e.parent.type.components)||a(e.appContext.components)}return n?K5(n):r?"App":"Anonymous"}function X5(e){return St(e)&&"__vccOpts"in e}const gt=(e,t)=>Ob(e,t,_l);function Sh(e,t,r){try{$s(-1);const n=arguments.length;return n===2?Vt(t)&&!bt(t)?yl(t)?Bt(e,null,[t]):Bt(e,t):Bt(e,null,t):(n>3?r=Array.prototype.slice.call(arguments,2):n===3&&yl(r)&&(r=[r]),Bt(e,t,r))}finally{$s(1)}}const Y5="3.5.34";/**
|
|
16
|
+
`],...Nb(r))}),t}function Nb({vnode:e,recurseCount:t}){const r=t>0?`... (${t} recursive calls)`:"",n=e.component?e.component.parent==null:!1,a=` at <${kh(e.component,e.type,n)}`,i=">"+r;return e.props?[a,...$b(e.props),i]:[a+i]}function $b(e){const t=[],r=Object.keys(e);return r.slice(0,3).forEach(n=>{t.push(...p1(n,e[n]))}),r.length>3&&t.push(" ..."),t}function p1(e,t,r){return Qt(t)?(t=JSON.stringify(t),r?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?r?t:[`${e}=${t}`]:Rr(t)?(t=p1(e,Lt(t.value),!0),r?t:[`${e}=Ref<`,t,">"]):St(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=Lt(t),r?t:[`${e}=`,t])}function lo(e,t,r,n){try{return n?e(...n):e()}catch(a){Ms(a,t,r)}}function qn(e,t,r,n){if(St(e)){const a=lo(e,t,r,n);return a&&Ud(a)&&a.catch(i=>{Ms(i,t,r)}),a}if(bt(e)){const a=[];for(let i=0;i<e.length;i++)a.push(qn(e[i],t,r,n));return a}}function Ms(e,t,r,n=!0){const a=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||Kt;if(t){let l=t.parent;const s=t.proxy,u=`https://vuejs.org/error-reference/#runtime-${r}`;for(;l;){const c=l.ec;if(c){for(let f=0;f<c.length;f++)if(c[f](e,s,u)===!1)return}l=l.parent}if(i){oa(),lo(i,null,10,[e,s,u]),la();return}}Ub(e,r,a,n,o)}function Ub(e,t,r,n=!0,a=!1){if(a)throw e;console.error(e)}const Xr=[];let ua=-1;const so=[];let ti=null,uo=0;const v1=Promise.resolve();let Ds=null;function za(e){const t=Ds||v1;return e?t.then(this?e.bind(this):e):t}function Hb(e){let t=ua+1,r=Xr.length;for(;t<r;){const n=t+r>>>1,a=Xr[n],i=cl(a);i<e||i===e&&a.flags&2?t=n+1:r=n}return t}function Gu(e){if(!(e.flags&1)){const t=cl(e),r=Xr[Xr.length-1];!r||!(e.flags&2)&&t>=cl(r)?Xr.push(e):Xr.splice(Hb(t),0,e),e.flags|=1,m1()}}function m1(){Ds||(Ds=v1.then(y1))}function jb(e){bt(e)?so.push(...e):ti&&e.id===-1?ti.splice(uo+1,0,e):e.flags&1||(so.push(e),e.flags|=1),m1()}function g1(e,t,r=ua+1){for(;r<Xr.length;r++){const n=Xr[r];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;Xr.splice(r,1),r--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function b1(e){if(so.length){const t=[...new Set(so)].sort((r,n)=>cl(r)-cl(n));if(so.length=0,ti){ti.push(...t);return}for(ti=t,uo=0;uo<ti.length;uo++){const r=ti[uo];r.flags&4&&(r.flags&=-2),r.flags&8||r(),r.flags&=-2}ti=null,uo=0}}const cl=e=>e.id==null?e.flags&2?-1:1/0:e.id;function y1(e){try{for(ua=0;ua<Xr.length;ua++){const t=Xr[ua];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),lo(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;ua<Xr.length;ua++){const t=Xr[ua];t&&(t.flags&=-2)}ua=-1,Xr.length=0,b1(),Ds=null,(Xr.length||so.length)&&y1()}}let Lr=null,x1=null;function Is(e){const t=Lr;return Lr=e,x1=e&&e.type.__scopeId||null,t}function Tr(e,t=Lr,r){if(!t||e._n)return e;const n=(...a)=>{n._d&&$s(-1);const i=Is(t);let o;try{o=e(...a)}finally{Is(i),n._d&&$s(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function rr(e,t){if(Lr===null)return e;const r=js(Lr),n=e.dirs||(e.dirs=[]);for(let a=0;a<t.length;a++){let[i,o,l,s=Kt]=t[a];i&&(St(i)&&(i={mounted:i,updated:i}),i.deep&&Ia(o),n.push({dir:i,instance:r,value:o,oldValue:void 0,arg:l,modifiers:s}))}return e}function Ii(e,t,r,n){const a=e.dirs,i=t&&t.dirs;for(let o=0;o<a.length;o++){const l=a[o];i&&(l.oldValue=i[o].value);let s=l.dir[n];s&&(oa(),qn(s,r,8,[e.el,l,e,t]),la())}}function Gb(e,t){if(Vr){let r=Vr.provides;const n=Vr.parent&&Vr.parent.provides;n===r&&(r=Vr.provides=Object.create(n)),r[e]=t}}function zs(e,t,r=!1){const n=oc();if(n||fo){let a=fo?fo._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(a&&e in a)return a[e];if(arguments.length>1)return r&&St(t)?t.call(n&&n.proxy):t}}const Vb=Symbol.for("v-scx"),qb=()=>zs(Vb);function tr(e,t,r){return _1(e,t,r)}function _1(e,t,r=Kt){const{immediate:n,deep:a,flush:i,once:o}=r,l=ir({},r),s=t&&n||!t&&i!=="post";let u;if(_l){if(i==="sync"){const h=qb();u=h.__watcherHandles||(h.__watcherHandles=[])}else if(!s){const h=()=>{};return h.stop=aa,h.resume=aa,h.pause=aa,h}}const c=Vr;l.call=(h,y,p)=>qn(h,c,y,p);let f=!1;i==="post"?l.scheduler=h=>{Zr(h,c&&c.suspense)}:i!=="sync"&&(f=!0,l.scheduler=(h,y)=>{y?h():Gu(h)}),l.augmentJob=h=>{t&&(h.flags|=4),f&&(h.flags|=2,c&&(h.id=c.uid,h.i=c))};const d=Rb(e,t,l);return _l&&(u?u.push(d):s&&d()),d}function Wb(e,t,r){const n=this.proxy,a=Qt(e)?e.includes(".")?w1(n,e):()=>n[e]:e.bind(n,n);let i;St(t)?i=t:(i=t.handler,r=t);const o=xl(this),l=_1(a,i.bind(n),r);return o(),l}function w1(e,t){const r=t.split(".");return()=>{let n=e;for(let a=0;a<r.length&&n;a++)n=n[r[a]];return n}}const ri=new WeakMap,k1=Symbol("_vte"),S1=e=>e.__isTeleport,zi=e=>e&&(e.disabled||e.disabled===""),Kb=e=>e&&(e.defer||e.defer===""),C1=e=>typeof SVGElement<"u"&&e instanceof SVGElement,A1=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Vu=(e,t)=>{const r=e&&e.to;return Qt(r)?t?t(r):null:r},Xb={name:"Teleport",__isTeleport:!0,process(e,t,r,n,a,i,o,l,s,u){const{mc:c,pc:f,pbc:d,o:{insert:h,querySelector:y,createText:p,createComment:x,parentNode:g}}=u,m=zi(t.props);let{dynamicChildren:b}=t;const v=(A,_,E)=>{A.shapeFlag&16&&c(A.children,_,E,a,i,o,l,s)},S=(A=t)=>{const _=zi(A.props),E=A.target=Vu(A.props,y),M=qu(E,A,p,h);E&&(o!=="svg"&&C1(E)?o="svg":o!=="mathml"&&A1(E)&&(o="mathml"),a&&a.isCE&&(a.ce._teleportTargets||(a.ce._teleportTargets=new Set)).add(E),_||(v(A,E,M),fl(A,!1)))},C=A=>{const _=()=>{if(ri.get(A)===_){if(ri.delete(A),zi(A.props)){const E=g(A.el)||r;v(A,E,A.anchor),fl(A,!0)}S(A)}};ri.set(A,_),Zr(_,i)};if(e==null){const A=t.el=p(""),_=t.anchor=p("");if(h(A,r,n),h(_,r,n),Kb(t.props)||i&&i.pendingBranch){C(t);return}m&&(v(t,r,_),fl(t,!0)),S()}else{t.el=e.el;const A=t.anchor=e.anchor,_=ri.get(e);if(_){_.flags|=8,ri.delete(e),C(t);return}t.targetStart=e.targetStart;const E=t.target=e.target,M=t.targetAnchor=e.targetAnchor,z=zi(e.props),N=z?r:E,R=z?A:M;if(o==="svg"||C1(E)?o="svg":(o==="mathml"||A1(E))&&(o="mathml"),b?(d(e.dynamicChildren,b,N,a,i,o,l),nc(e,t,!0)):s||f(e,t,N,R,a,i,o,l,!1),m)z?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Fs(t,r,A,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const $=t.target=Vu(t.props,y);$&&Fs(t,$,null,u,0)}else z&&Fs(t,E,M,u,1);fl(t,m)}},remove(e,t,r,{um:n,o:{remove:a}},i){const{shapeFlag:o,children:l,anchor:s,targetStart:u,targetAnchor:c,target:f,props:d}=e;let h=i||!zi(d);const y=ri.get(e);if(y&&(y.flags|=8,ri.delete(e),h=!1),f&&(a(u),a(c)),i&&a(s),o&16)for(let p=0;p<l.length;p++){const x=l[p];n(x,t,r,h,!!x.dynamicChildren)}},move:Fs,hydrate:Yb};function Fs(e,t,r,{o:{insert:n},m:a},i=2){i===0&&n(e.targetAnchor,t,r);const{el:o,anchor:l,shapeFlag:s,children:u,props:c}=e,f=i===2;if(f&&n(o,t,r),!ri.has(e)&&(!f||zi(c))&&s&16)for(let d=0;d<u.length;d++)a(u[d],t,r,2);f&&n(l,t,r)}function Yb(e,t,r,n,a,i,{o:{nextSibling:o,parentNode:l,querySelector:s,insert:u,createText:c}},f){function d(x,g){let m=g;for(;m;){if(m&&m.nodeType===8){if(m.data==="teleport start anchor")t.targetStart=m;else if(m.data==="teleport anchor"){t.targetAnchor=m,x._lpa=t.targetAnchor&&o(t.targetAnchor);break}}m=o(m)}}function h(x,g){g.anchor=f(o(x),g,l(x),r,n,a,i)}const y=t.target=Vu(t.props,s),p=zi(t.props);if(y){const x=y._lpa||y.firstChild;t.shapeFlag&16&&(p?(h(e,t),d(y,x),t.targetAnchor||qu(y,t,c,u,l(e)===y?e:null)):(t.anchor=o(e),d(y,x),t.targetAnchor||qu(y,t,c,u),f(x&&o(x),t,y,r,n,a,i))),fl(t,p)}else p&&t.shapeFlag&16&&(h(e,t),t.targetStart=e,t.targetAnchor=o(e));return t.anchor&&o(t.anchor)}const Zb=Xb;function fl(e,t){const r=e.ctx;if(r&&r.ut){let n,a;for(t?(n=e.el,a=e.anchor):(n=e.targetStart,a=e.targetAnchor);n&&n!==a;)n.nodeType===1&&n.setAttribute("data-v-owner",r.uid),n=n.nextSibling;r.ut()}}function qu(e,t,r,n,a=null){const i=t.targetStart=r(""),o=t.targetAnchor=r("");return i[k1]=o,e&&(n(i,e,a),n(o,e,a)),o}const ca=Symbol("_leaveCb"),dl=Symbol("_enterCb");function E1(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return pr(()=>{e.isMounted=!0}),Br(()=>{e.isUnmounting=!0}),e}const Dn=[Function,Array],T1={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Dn,onEnter:Dn,onAfterEnter:Dn,onEnterCancelled:Dn,onBeforeLeave:Dn,onLeave:Dn,onAfterLeave:Dn,onLeaveCancelled:Dn,onBeforeAppear:Dn,onAppear:Dn,onAfterAppear:Dn,onAppearCancelled:Dn},M1=e=>{const t=e.subTree;return t.component?M1(t.component):t},Jb={name:"BaseTransition",props:T1,setup(e,{slots:t}){const r=oc(),n=E1();return()=>{const a=t.default&&Ku(t.default(),!0),i=a&&a.length?D1(a):r.subTree?rt():void 0;if(!i)return;const o=Lt(e),{mode:l}=o;if(n.isLeaving)return Wu(i);const s=z1(i);if(!s)return Wu(i);let u=hl(s,o,n,r,f=>u=f);s.type!==Gr&&Fi(s,u);let c=r.subTree&&z1(r.subTree);if(c&&c.type!==Gr&&!Pi(c,s)&&M1(r).type!==Gr){let f=hl(c,o,n,r);if(Fi(c,f),l==="out-in"&&s.type!==Gr)return n.isLeaving=!0,f.afterLeave=()=>{n.isLeaving=!1,r.job.flags&8||r.update(),delete f.afterLeave,c=void 0},Wu(i);l==="in-out"&&s.type!==Gr?f.delayLeave=(d,h,y)=>{const p=I1(n,c);p[String(c.key)]=c,d[ca]=()=>{h(),d[ca]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{y(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return i}}};function D1(e){let t=e[0];if(e.length>1){for(const r of e)if(r.type!==Gr){t=r;break}}return t}const Qb=Jb;function I1(e,t){const{leavingVNodes:r}=e;let n=r.get(t.type);return n||(n=Object.create(null),r.set(t.type,n)),n}function hl(e,t,r,n,a){const{appear:i,mode:o,persisted:l=!1,onBeforeEnter:s,onEnter:u,onAfterEnter:c,onEnterCancelled:f,onBeforeLeave:d,onLeave:h,onAfterLeave:y,onLeaveCancelled:p,onBeforeAppear:x,onAppear:g,onAfterAppear:m,onAppearCancelled:b}=t,v=String(e.key),S=I1(r,e),C=(E,M)=>{E&&qn(E,n,9,M)},A=(E,M)=>{const z=M[1];C(E,M),bt(E)?E.every(N=>N.length<=1)&&z():E.length<=1&&z()},_={mode:o,persisted:l,beforeEnter(E){let M=s;if(!r.isMounted)if(i)M=x||s;else return;E[ca]&&E[ca](!0);const z=S[v];z&&Pi(e,z)&&z.el[ca]&&z.el[ca](),C(M,[E])},enter(E){if(S[v]===e)return;let M=u,z=c,N=f;if(!r.isMounted)if(i)M=g||u,z=m||c,N=b||f;else return;let R=!1;E[dl]=q=>{R||(R=!0,q?C(N,[E]):C(z,[E]),_.delayedLeave&&_.delayedLeave(),E[dl]=void 0)};const $=E[dl].bind(null,!1);M?A(M,[E,$]):$()},leave(E,M){const z=String(e.key);if(E[dl]&&E[dl](!0),r.isUnmounting)return M();C(d,[E]);let N=!1;E[ca]=$=>{N||(N=!0,M(),$?C(p,[E]):C(y,[E]),E[ca]=void 0,S[z]===e&&delete S[z])};const R=E[ca].bind(null,!1);S[z]=e,h?A(h,[E,R]):R()},clone(E){const M=hl(E,t,r,n,a);return a&&a(M),M}};return _}function Wu(e){if(Ps(e))return e=ni(e),e.children=null,e}function z1(e){if(!Ps(e))return S1(e.type)&&e.children?D1(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:r}=e;if(r){if(t&16)return r[0];if(t&32&&St(r.default))return r.default()}}function Fi(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Fi(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Ku(e,t=!1,r){let n=[],a=0;for(let i=0;i<e.length;i++){let o=e[i];const l=r==null?o.key:String(r)+String(o.key!=null?o.key:i);o.type===yt?(o.patchFlag&128&&a++,n=n.concat(Ku(o.children,t,l))):(t||o.type!==Gr)&&n.push(l!=null?ni(o,{key:l}):o)}if(a>1)for(let i=0;i<n.length;i++)n[i].patchFlag=-2;return n}function qt(e,t){return St(e)?ir({name:e.name},t,{setup:e}):e}function F1(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function O1(e,t){let r;return!!((r=Object.getOwnPropertyDescriptor(e,t))&&!r.configurable)}const Os=new WeakMap;function pl(e,t,r,n,a=!1){if(bt(e)){e.forEach((p,x)=>pl(p,t&&(bt(t)?t[x]:t),r,n,a));return}if(co(n)&&!a){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&pl(e,t,r,n.component.subTree);return}const i=n.shapeFlag&4?js(n.component):n.el,o=a?null:i,{i:l,r:s}=e,u=t&&t.r,c=l.refs===Kt?l.refs={}:l.refs,f=l.setupState,d=Lt(f),h=f===Kt?Nd:p=>O1(c,p)?!1:$t(d,p),y=(p,x)=>!(x&&O1(c,x));if(u!=null&&u!==s){if(P1(t),Qt(u))c[u]=null,h(u)&&(f[u]=null);else if(Rr(u)){const p=t;y(u,p.k)&&(u.value=null),p.k&&(c[p.k]=null)}}if(St(s))lo(s,l,12,[o,c]);else{const p=Qt(s),x=Rr(s);if(p||x){const g=()=>{if(e.f){const m=p?h(s)?f[s]:c[s]:y()||!e.k?s.value:c[e.k];if(a)bt(m)&&Su(m,i);else if(bt(m))m.includes(i)||m.push(i);else if(p)c[s]=[i],h(s)&&(f[s]=c[s]);else{const b=[i];y(s,e.k)&&(s.value=b),e.k&&(c[e.k]=b)}}else p?(c[s]=o,h(s)&&(f[s]=o)):x&&(y(s,e.k)&&(s.value=o),e.k&&(c[e.k]=o))};if(o){const m=()=>{g(),Os.delete(e)};m.id=-1,Os.set(e,m),Zr(m,r)}else P1(e),g()}}}function P1(e){const t=Os.get(e);t&&(t.flags|=8,Os.delete(e))}xs().requestIdleCallback,xs().cancelIdleCallback;const co=e=>!!e.type.__asyncLoader,Ps=e=>e.type.__isKeepAlive;function e5(e,t){R1(e,"a",t)}function t5(e,t){R1(e,"da",t)}function R1(e,t,r=Vr){const n=e.__wdc||(e.__wdc=()=>{let a=r;for(;a;){if(a.isDeactivated)return;a=a.parent}return e()});if(Rs(t,n,r),r){let a=r.parent;for(;a&&a.parent;)Ps(a.parent.vnode)&&r5(n,t,r,a),a=a.parent}}function r5(e,t,r,n){const a=Rs(t,e,n,!0);B1(()=>{Su(n[t],a)},r)}function Rs(e,t,r=Vr,n=!1){if(r){const a=r[e]||(r[e]=[]),i=t.__weh||(t.__weh=(...o)=>{oa();const l=xl(r),s=qn(t,r,e,o);return l(),la(),s});return n?a.unshift(i):a.push(i),i}}const Fa=e=>(t,r=Vr)=>{(!_l||e==="sp")&&Rs(e,(...n)=>t(...n),r)},n5=Fa("bm"),pr=Fa("m"),a5=Fa("bu"),L1=Fa("u"),Br=Fa("bum"),B1=Fa("um"),i5=Fa("sp"),o5=Fa("rtg"),l5=Fa("rtc");function s5(e,t=Vr){Rs("ec",e,t)}const N1="components";function u5(e,t){return U1(N1,e,!0,t)||e}const $1=Symbol.for("v-ndc");function c5(e){return Qt(e)?U1(N1,e,!1)||e:e||$1}function U1(e,t,r=!0,n=!1){const a=Lr||Vr;if(a){const i=a.type;{const l=wh(i,!1);if(l&&(l===t||l===Er(t)||l===gs(Er(t))))return i}const o=H1(a[e]||i[e],t)||H1(a.appContext[e],t);return!o&&n?i:o}}function H1(e,t){return e&&(e[t]||e[Er(t)]||e[gs(Er(t))])}function nr(e,t,r,n){let a;const i=r,o=bt(e);if(o||Qt(e)){const l=o&&Mi(e);let s=!1,u=!1;l&&(s=!Mn(e),u=Da(e),e=ws(e)),a=new Array(e.length);for(let c=0,f=e.length;c<f;c++)a[c]=t(s?u?oo(Vn(e[c])):Vn(e[c]):e[c],c,void 0,i)}else if(typeof e=="number"){a=new Array(e);for(let l=0;l<e;l++)a[l]=t(l+1,l,void 0,i)}else if(Vt(e))if(e[Symbol.iterator])a=Array.from(e,(l,s)=>t(l,s,void 0,i));else{const l=Object.keys(e);a=new Array(l.length);for(let s=0,u=l.length;s<u;s++){const c=l[s];a[s]=t(e[c],c,s,i)}}else a=[];return a}function j1(e,t,r={},n,a){if(Lr.ce||Lr.parent&&co(Lr.parent)&&Lr.parent.ce){const u=Object.keys(r).length>0;return t!=="default"&&(r.name=t),Q(),kr(yt,null,[Bt("slot",r,n)],u?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),Q();const o=i&&G1(i(r)),l=r.key||o&&o.key,s=kr(yt,{key:(l&&!jn(l)?l:`_${t}`)+(!o&&n?"_fb":"")},o||[],o&&e._===1?64:-2);return s.scopeId&&(s.slotScopeIds=[s.scopeId+"-s"]),i&&i._c&&(i._d=!0),s}function G1(e){return e.some(t=>yl(t)?!(t.type===Gr||t.type===yt&&!G1(t.children)):!0)?e:null}const Xu=e=>e?yh(e)?js(e):Xu(e.parent):null,vl=ir(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Xu(e.parent),$root:e=>Xu(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>K1(e),$forceUpdate:e=>e.f||(e.f=()=>{Gu(e.update)}),$nextTick:e=>e.n||(e.n=za.bind(e.proxy)),$watch:e=>Wb.bind(e)}),Yu=(e,t)=>e!==Kt&&!e.__isScriptSetup&&$t(e,t),f5={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:r,setupState:n,data:a,props:i,accessCache:o,type:l,appContext:s}=e;if(t[0]!=="$"){const d=o[t];if(d!==void 0)switch(d){case 1:return n[t];case 2:return a[t];case 4:return r[t];case 3:return i[t]}else{if(Yu(n,t))return o[t]=1,n[t];if(a!==Kt&&$t(a,t))return o[t]=2,a[t];if($t(i,t))return o[t]=3,i[t];if(r!==Kt&&$t(r,t))return o[t]=4,r[t];Zu&&(o[t]=0)}}const u=vl[t];let c,f;if(u)return t==="$attrs"&&jr(e.attrs,"get",""),u(e);if((c=l.__cssModules)&&(c=c[t]))return c;if(r!==Kt&&$t(r,t))return o[t]=4,r[t];if(f=s.config.globalProperties,$t(f,t))return f[t]},set({_:e},t,r){const{data:n,setupState:a,ctx:i}=e;return Yu(a,t)?(a[t]=r,!0):n!==Kt&&$t(n,t)?(n[t]=r,!0):$t(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=r,!0)},has({_:{data:e,setupState:t,accessCache:r,ctx:n,appContext:a,props:i,type:o}},l){let s;return!!(r[l]||e!==Kt&&l[0]!=="$"&&$t(e,l)||Yu(t,l)||$t(i,l)||$t(n,l)||$t(vl,l)||$t(a.config.globalProperties,l)||(s=o.__cssModules)&&s[l])},defineProperty(e,t,r){return r.get!=null?e._.accessCache[t]=0:$t(r,"value")&&this.set(e,t,r.value,null),Reflect.defineProperty(e,t,r)}};function V1(e){return bt(e)?e.reduce((t,r)=>(t[r]=null,t),{}):e}let Zu=!0;function d5(e){const t=K1(e),r=e.proxy,n=e.ctx;Zu=!1,t.beforeCreate&&q1(t.beforeCreate,e,"bc");const{data:a,computed:i,methods:o,watch:l,provide:s,inject:u,created:c,beforeMount:f,mounted:d,beforeUpdate:h,updated:y,activated:p,deactivated:x,beforeDestroy:g,beforeUnmount:m,destroyed:b,unmounted:v,render:S,renderTracked:C,renderTriggered:A,errorCaptured:_,serverPrefetch:E,expose:M,inheritAttrs:z,components:N,directives:R,filters:$}=t;if(u&&h5(u,n,null),o)for(const Z in o){const te=o[Z];St(te)&&(n[Z]=te.bind(r))}if(a){const Z=a.call(r,r);Vt(Z)&&(e.data=$u(Z))}if(Zu=!0,i)for(const Z in i){const te=i[Z],ne=St(te)?te.bind(r,r):St(te.get)?te.get.bind(r,r):aa,_e=!St(te)&&St(te.set)?te.set.bind(r):aa,pe=mt({get:ne,set:_e});Object.defineProperty(n,Z,{enumerable:!0,configurable:!0,get:()=>pe.value,set:we=>pe.value=we})}if(l)for(const Z in l)W1(l[Z],n,r,Z);if(s){const Z=St(s)?s.call(r):s;Reflect.ownKeys(Z).forEach(te=>{Gb(te,Z[te])})}c&&q1(c,e,"c");function W(Z,te){bt(te)?te.forEach(ne=>Z(ne.bind(r))):te&&Z(te.bind(r))}if(W(n5,f),W(pr,d),W(a5,h),W(L1,y),W(e5,p),W(t5,x),W(s5,_),W(l5,C),W(o5,A),W(Br,m),W(B1,v),W(i5,E),bt(M))if(M.length){const Z=e.exposed||(e.exposed={});M.forEach(te=>{Object.defineProperty(Z,te,{get:()=>r[te],set:ne=>r[te]=ne,enumerable:!0})})}else e.exposed||(e.exposed={});S&&e.render===aa&&(e.render=S),z!=null&&(e.inheritAttrs=z),N&&(e.components=N),R&&(e.directives=R),E&&F1(e)}function h5(e,t,r=aa){bt(e)&&(e=Ju(e));for(const n in e){const a=e[n];let i;Vt(a)?"default"in a?i=zs(a.from||n,a.default,!0):i=zs(a.from||n):i=zs(a),Rr(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[n]=i}}function q1(e,t,r){qn(bt(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,r)}function W1(e,t,r,n){let a=n.includes(".")?w1(r,n):()=>r[n];if(Qt(e)){const i=t[e];St(i)&&tr(a,i)}else if(St(e))tr(a,e.bind(r));else if(Vt(e))if(bt(e))e.forEach(i=>W1(i,t,r,n));else{const i=St(e.handler)?e.handler.bind(r):t[e.handler];St(i)&&tr(a,i,e)}}function K1(e){const t=e.type,{mixins:r,extends:n}=t,{mixins:a,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,l=i.get(t);let s;return l?s=l:!a.length&&!r&&!n?s=t:(s={},a.length&&a.forEach(u=>Ls(s,u,o,!0)),Ls(s,t,o)),Vt(t)&&i.set(t,s),s}function Ls(e,t,r,n=!1){const{mixins:a,extends:i}=t;i&&Ls(e,i,r,!0),a&&a.forEach(o=>Ls(e,o,r,!0));for(const o in t)if(!(n&&o==="expose")){const l=p5[o]||r&&r[o];e[o]=l?l(e[o],t[o]):t[o]}return e}const p5={data:X1,props:Y1,emits:Y1,methods:ml,computed:ml,beforeCreate:Yr,created:Yr,beforeMount:Yr,mounted:Yr,beforeUpdate:Yr,updated:Yr,beforeDestroy:Yr,beforeUnmount:Yr,destroyed:Yr,unmounted:Yr,activated:Yr,deactivated:Yr,errorCaptured:Yr,serverPrefetch:Yr,components:ml,directives:ml,watch:m5,provide:X1,inject:v5};function X1(e,t){return t?e?function(){return ir(St(e)?e.call(this,this):e,St(t)?t.call(this,this):t)}:t:e}function v5(e,t){return ml(Ju(e),Ju(t))}function Ju(e){if(bt(e)){const t={};for(let r=0;r<e.length;r++)t[e[r]]=e[r];return t}return e}function Yr(e,t){return e?[...new Set([].concat(e,t))]:t}function ml(e,t){return e?ir(Object.create(null),e,t):t}function Y1(e,t){return e?bt(e)&&bt(t)?[...new Set([...e,...t])]:ir(Object.create(null),V1(e),V1(t??{})):t}function m5(e,t){if(!e)return t;if(!t)return e;const r=ir(Object.create(null),e);for(const n in t)r[n]=Yr(e[n],t[n]);return r}function Z1(){return{app:null,config:{isNativeTag:Nd,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let g5=0;function b5(e,t){return function(n,a=null){St(n)||(n=ir({},n)),a!=null&&!Vt(a)&&(a=null);const i=Z1(),o=new WeakSet,l=[];let s=!1;const u=i.app={_uid:g5++,_component:n,_props:a,_container:null,_context:i,_instance:null,version:Y5,get config(){return i.config},set config(c){},use(c,...f){return o.has(c)||(c&&St(c.install)?(o.add(c),c.install(u,...f)):St(c)&&(o.add(c),c(u,...f))),u},mixin(c){return i.mixins.includes(c)||i.mixins.push(c),u},component(c,f){return f?(i.components[c]=f,u):i.components[c]},directive(c,f){return f?(i.directives[c]=f,u):i.directives[c]},mount(c,f,d){if(!s){const h=u._ceVNode||Bt(n,a);return h.appContext=i,d===!0?d="svg":d===!1&&(d=void 0),e(h,c,d),s=!0,u._container=c,c.__vue_app__=u,js(h.component)}},onUnmount(c){l.push(c)},unmount(){s&&(qn(l,u._instance,16),e(null,u._container),delete u._container.__vue_app__)},provide(c,f){return i.provides[c]=f,u},runWithContext(c){const f=fo;fo=u;try{return c()}finally{fo=f}}};return u}}let fo=null;const y5=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Er(t)}Modifiers`]||e[`${hn(t)}Modifiers`];function x5(e,t,...r){if(e.isUnmounted)return;const n=e.vnode.props||Kt;let a=r;const i=t.startsWith("update:"),o=i&&y5(n,t.slice(7));o&&(o.trim&&(a=r.map(c=>Qt(c)?c.trim():c)),o.number&&(a=r.map(ys)));let l,s=n[l=Au(t)]||n[l=Au(Er(t))];!s&&i&&(s=n[l=Au(hn(t))]),s&&qn(s,e,6,a);const u=n[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,qn(u,e,6,a)}}const _5=new WeakMap;function J1(e,t,r=!1){const n=r?_5:t.emitsCache,a=n.get(e);if(a!==void 0)return a;const i=e.emits;let o={},l=!1;if(!St(e)){const s=u=>{const c=J1(u,t,!0);c&&(l=!0,ir(o,c))};!r&&t.mixins.length&&t.mixins.forEach(s),e.extends&&s(e.extends),e.mixins&&e.mixins.forEach(s)}return!i&&!l?(Vt(e)&&n.set(e,null),null):(bt(i)?i.forEach(s=>o[s]=null):ir(o,i),Vt(e)&&n.set(e,o),o)}function Bs(e,t){return!e||!hs(t)?!1:(t=t.slice(2).replace(/Once$/,""),$t(e,t[0].toLowerCase()+t.slice(1))||$t(e,hn(t))||$t(e,t))}function zM(){}function Q1(e){const{type:t,vnode:r,proxy:n,withProxy:a,propsOptions:[i],slots:o,attrs:l,emit:s,render:u,renderCache:c,props:f,data:d,setupState:h,ctx:y,inheritAttrs:p}=e,x=Is(e);let g,m;try{if(r.shapeFlag&4){const v=a||n,S=v;g=fa(u.call(S,v,c,f,h,d,y)),m=l}else{const v=t;g=fa(v.length>1?v(f,{attrs:l,slots:o,emit:s}):v(f,null)),m=t.props?l:w5(l)}}catch(v){gl.length=0,Ms(v,e,1),g=Bt(Gr)}let b=g;if(m&&p!==!1){const v=Object.keys(m),{shapeFlag:S}=b;v.length&&S&7&&(i&&v.some(ps)&&(m=k5(m,i)),b=ni(b,m,!1,!0))}return r.dirs&&(b=ni(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(r.dirs):r.dirs),r.transition&&Fi(b,r.transition),g=b,Is(x),g}const w5=e=>{let t;for(const r in e)(r==="class"||r==="style"||hs(r))&&((t||(t={}))[r]=e[r]);return t},k5=(e,t)=>{const r={};for(const n in e)(!ps(n)||!(n.slice(9)in t))&&(r[n]=e[n]);return r};function S5(e,t,r){const{props:n,children:a,component:i}=e,{props:o,children:l,patchFlag:s}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(r&&s>=0){if(s&1024)return!0;if(s&16)return n?eh(n,o,u):!!o;if(s&8){const c=t.dynamicProps;for(let f=0;f<c.length;f++){const d=c[f];if(th(o,n,d)&&!Bs(u,d))return!0}}}else return(a||l)&&(!l||!l.$stable)?!0:n===o?!1:n?o?eh(n,o,u):!0:!!o;return!1}function eh(e,t,r){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let a=0;a<n.length;a++){const i=n[a];if(th(t,e,i)&&!Bs(r,i))return!0}return!1}function th(e,t,r){const n=e[r],a=t[r];return r==="style"&&Vt(n)&&Vt(a)?!ao(n,a):n!==a}function C5({vnode:e,parent:t,suspense:r},n){for(;t;){const a=t.subTree;if(a.suspense&&a.suspense.activeBranch===e&&(a.suspense.vnode.el=a.el=n,e=a),a===e)(e=t.vnode).el=n,t=t.parent;else break}r&&r.activeBranch===e&&(r.vnode.el=n)}const rh={},nh=()=>Object.create(rh),ah=e=>Object.getPrototypeOf(e)===rh;function A5(e,t,r,n=!1){const a={},i=nh();e.propsDefaults=Object.create(null),ih(e,t,a,i);for(const o in e.propsOptions[0])o in a||(a[o]=void 0);r?e.props=n?a:Ab(a):e.type.props?e.props=a:e.props=i,e.attrs=i}function E5(e,t,r,n){const{props:a,attrs:i,vnode:{patchFlag:o}}=e,l=Lt(a),[s]=e.propsOptions;let u=!1;if((n||o>0)&&!(o&16)){if(o&8){const c=e.vnode.dynamicProps;for(let f=0;f<c.length;f++){let d=c[f];if(Bs(e.emitsOptions,d))continue;const h=t[d];if(s)if($t(i,d))h!==i[d]&&(i[d]=h,u=!0);else{const y=Er(d);a[y]=Qu(s,l,y,h,e,!1)}else h!==i[d]&&(i[d]=h,u=!0)}}}else{ih(e,t,a,i)&&(u=!0);let c;for(const f in l)(!t||!$t(t,f)&&((c=hn(f))===f||!$t(t,c)))&&(s?r&&(r[f]!==void 0||r[c]!==void 0)&&(a[f]=Qu(s,l,f,void 0,e,!0)):delete a[f]);if(i!==l)for(const f in i)(!t||!$t(t,f))&&(delete i[f],u=!0)}u&&Ta(e.attrs,"set","")}function ih(e,t,r,n){const[a,i]=e.propsOptions;let o=!1,l;if(t)for(let s in t){if(nl(s))continue;const u=t[s];let c;a&&$t(a,c=Er(s))?!i||!i.includes(c)?r[c]=u:(l||(l={}))[c]=u:Bs(e.emitsOptions,s)||(!(s in n)||u!==n[s])&&(n[s]=u,o=!0)}if(i){const s=Lt(r),u=l||Kt;for(let c=0;c<i.length;c++){const f=i[c];r[f]=Qu(a,s,f,u[f],e,!$t(u,f))}}return o}function Qu(e,t,r,n,a,i){const o=e[r];if(o!=null){const l=$t(o,"default");if(l&&n===void 0){const s=o.default;if(o.type!==Function&&!o.skipFactory&&St(s)){const{propsDefaults:u}=a;if(r in u)n=u[r];else{const c=xl(a);n=u[r]=s.call(null,t),c()}}else n=s;a.ce&&a.ce._setProp(r,n)}o[0]&&(i&&!l?n=!1:o[1]&&(n===""||n===hn(r))&&(n=!0))}return n}const T5=new WeakMap;function oh(e,t,r=!1){const n=r?T5:t.propsCache,a=n.get(e);if(a)return a;const i=e.props,o={},l=[];let s=!1;if(!St(e)){const c=f=>{s=!0;const[d,h]=oh(f,t,!0);ir(o,d),h&&l.push(...h)};!r&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!i&&!s)return Vt(e)&&n.set(e,to),to;if(bt(i))for(let c=0;c<i.length;c++){const f=Er(i[c]);lh(f)&&(o[f]=Kt)}else if(i)for(const c in i){const f=Er(c);if(lh(f)){const d=i[c],h=o[f]=bt(d)||St(d)?{type:d}:ir({},d),y=h.type;let p=!1,x=!0;if(bt(y))for(let g=0;g<y.length;++g){const m=y[g],b=St(m)&&m.name;if(b==="Boolean"){p=!0;break}else b==="String"&&(x=!1)}else p=St(y)&&y.name==="Boolean";h[0]=p,h[1]=x,(p||$t(h,"default"))&&l.push(f)}}const u=[o,l];return Vt(e)&&n.set(e,u),u}function lh(e){return e[0]!=="$"&&!nl(e)}const ec=e=>e==="_"||e==="_ctx"||e==="$stable",tc=e=>bt(e)?e.map(fa):[fa(e)],M5=(e,t,r)=>{if(t._n)return t;const n=Tr((...a)=>tc(t(...a)),r);return n._c=!1,n},sh=(e,t,r)=>{const n=e._ctx;for(const a in e){if(ec(a))continue;const i=e[a];if(St(i))t[a]=M5(a,i,n);else if(i!=null){const o=tc(i);t[a]=()=>o}}},uh=(e,t)=>{const r=tc(t);e.slots.default=()=>r},ch=(e,t,r)=>{for(const n in t)(r||!ec(n))&&(e[n]=t[n])},D5=(e,t,r)=>{const n=e.slots=nh();if(e.vnode.shapeFlag&32){const a=t._;a?(ch(n,t,r),r&&jd(n,"_",a,!0)):sh(t,n)}else t&&uh(e,t)},I5=(e,t,r)=>{const{vnode:n,slots:a}=e;let i=!0,o=Kt;if(n.shapeFlag&32){const l=t._;l?r&&l===1?i=!1:ch(a,t,r):(i=!t.$stable,sh(t,a)),o=t}else t&&(uh(e,t),o={default:1});if(i)for(const l in a)!ec(l)&&o[l]==null&&delete a[l]},Zr=R5;function z5(e){return F5(e)}function F5(e,t){const r=xs();r.__VUE__=!0;const{insert:n,remove:a,patchProp:i,createElement:o,createText:l,createComment:s,setText:u,setElementText:c,parentNode:f,nextSibling:d,setScopeId:h=aa,insertStaticContent:y}=e,p=(P,V,fe,de=null,ie=null,oe=null,se=void 0,ge=null,Ce=!!V.dynamicChildren)=>{if(P===V)return;P&&!Pi(P,V)&&(de=Le(P),we(P,ie,oe,!0),P=null),V.patchFlag===-2&&(Ce=!1,V.dynamicChildren=null);const{type:xe,ref:Ve,shapeFlag:Ue}=V;switch(xe){case Ns:x(P,V,fe,de);break;case Gr:g(P,V,fe,de);break;case ac:P==null&&m(V,fe,de,se);break;case yt:N(P,V,fe,de,ie,oe,se,ge,Ce);break;default:Ue&1?S(P,V,fe,de,ie,oe,se,ge,Ce):Ue&6?R(P,V,fe,de,ie,oe,se,ge,Ce):(Ue&64||Ue&128)&&xe.process(P,V,fe,de,ie,oe,se,ge,Ce,be)}Ve!=null&&ie?pl(Ve,P&&P.ref,oe,V||P,!V):Ve==null&&P&&P.ref!=null&&pl(P.ref,null,oe,P,!0)},x=(P,V,fe,de)=>{if(P==null)n(V.el=l(V.children),fe,de);else{const ie=V.el=P.el;V.children!==P.children&&u(ie,V.children)}},g=(P,V,fe,de)=>{P==null?n(V.el=s(V.children||""),fe,de):V.el=P.el},m=(P,V,fe,de)=>{[P.el,P.anchor]=y(P.children,V,fe,de,P.el,P.anchor)},b=({el:P,anchor:V},fe,de)=>{let ie;for(;P&&P!==V;)ie=d(P),n(P,fe,de),P=ie;n(V,fe,de)},v=({el:P,anchor:V})=>{let fe;for(;P&&P!==V;)fe=d(P),a(P),P=fe;a(V)},S=(P,V,fe,de,ie,oe,se,ge,Ce)=>{if(V.type==="svg"?se="svg":V.type==="math"&&(se="mathml"),P==null)C(V,fe,de,ie,oe,se,ge,Ce);else{const xe=P.el&&P.el._isVueCE?P.el:null;try{xe&&xe._beginPatch(),E(P,V,ie,oe,se,ge,Ce)}finally{xe&&xe._endPatch()}}},C=(P,V,fe,de,ie,oe,se,ge)=>{let Ce,xe;const{props:Ve,shapeFlag:Ue,transition:Ne,dirs:qe}=P;if(Ce=P.el=o(P.type,oe,Ve&&Ve.is,Ve),Ue&8?c(Ce,P.children):Ue&16&&_(P.children,Ce,null,de,ie,rc(P,oe),se,ge),qe&&Ii(P,null,de,"created"),A(Ce,P,P.scopeId,se,de),Ve){for(const ct in Ve)ct!=="value"&&!nl(ct)&&i(Ce,ct,null,Ve[ct],oe,de);"value"in Ve&&i(Ce,"value",null,Ve.value,oe),(xe=Ve.onVnodeBeforeMount)&&da(xe,de,P)}qe&&Ii(P,null,de,"beforeMount");const it=O5(ie,Ne);it&&Ne.beforeEnter(Ce),n(Ce,V,fe),((xe=Ve&&Ve.onVnodeMounted)||it||qe)&&Zr(()=>{try{xe&&da(xe,de,P),it&&Ne.enter(Ce),qe&&Ii(P,null,de,"mounted")}finally{}},ie)},A=(P,V,fe,de,ie)=>{if(fe&&h(P,fe),de)for(let oe=0;oe<de.length;oe++)h(P,de[oe]);if(ie){let oe=ie.subTree;if(V===oe||ph(oe.type)&&(oe.ssContent===V||oe.ssFallback===V)){const se=ie.vnode;A(P,se,se.scopeId,se.slotScopeIds,ie.parent)}}},_=(P,V,fe,de,ie,oe,se,ge,Ce=0)=>{for(let xe=Ce;xe<P.length;xe++){const Ve=P[xe]=ge?Oa(P[xe]):fa(P[xe]);p(null,Ve,V,fe,de,ie,oe,se,ge)}},E=(P,V,fe,de,ie,oe,se)=>{const ge=V.el=P.el;let{patchFlag:Ce,dynamicChildren:xe,dirs:Ve}=V;Ce|=P.patchFlag&16;const Ue=P.props||Kt,Ne=V.props||Kt;let qe;if(fe&&Oi(fe,!1),(qe=Ne.onVnodeBeforeUpdate)&&da(qe,fe,V,P),Ve&&Ii(V,P,fe,"beforeUpdate"),fe&&Oi(fe,!0),(Ue.innerHTML&&Ne.innerHTML==null||Ue.textContent&&Ne.textContent==null)&&c(ge,""),xe?M(P.dynamicChildren,xe,ge,fe,de,rc(V,ie),oe):se||te(P,V,ge,null,fe,de,rc(V,ie),oe,!1),Ce>0){if(Ce&16)z(ge,Ue,Ne,fe,ie);else if(Ce&2&&Ue.class!==Ne.class&&i(ge,"class",null,Ne.class,ie),Ce&4&&i(ge,"style",Ue.style,Ne.style,ie),Ce&8){const it=V.dynamicProps;for(let ct=0;ct<it.length;ct++){const ot=it[ct],wt=Ue[ot],Me=Ne[ot];(Me!==wt||ot==="value")&&i(ge,ot,wt,Me,ie,fe)}}Ce&1&&P.children!==V.children&&c(ge,V.children)}else!se&&xe==null&&z(ge,Ue,Ne,fe,ie);((qe=Ne.onVnodeUpdated)||Ve)&&Zr(()=>{qe&&da(qe,fe,V,P),Ve&&Ii(V,P,fe,"updated")},de)},M=(P,V,fe,de,ie,oe,se)=>{for(let ge=0;ge<V.length;ge++){const Ce=P[ge],xe=V[ge],Ve=Ce.el&&(Ce.type===yt||!Pi(Ce,xe)||Ce.shapeFlag&198)?f(Ce.el):fe;p(Ce,xe,Ve,null,de,ie,oe,se,!0)}},z=(P,V,fe,de,ie)=>{if(V!==fe){if(V!==Kt)for(const oe in V)!nl(oe)&&!(oe in fe)&&i(P,oe,V[oe],null,ie,de);for(const oe in fe){if(nl(oe))continue;const se=fe[oe],ge=V[oe];se!==ge&&oe!=="value"&&i(P,oe,ge,se,ie,de)}"value"in fe&&i(P,"value",V.value,fe.value,ie)}},N=(P,V,fe,de,ie,oe,se,ge,Ce)=>{const xe=V.el=P?P.el:l(""),Ve=V.anchor=P?P.anchor:l("");let{patchFlag:Ue,dynamicChildren:Ne,slotScopeIds:qe}=V;qe&&(ge=ge?ge.concat(qe):qe),P==null?(n(xe,fe,de),n(Ve,fe,de),_(V.children||[],fe,Ve,ie,oe,se,ge,Ce)):Ue>0&&Ue&64&&Ne&&P.dynamicChildren&&P.dynamicChildren.length===Ne.length?(M(P.dynamicChildren,Ne,fe,ie,oe,se,ge),(V.key!=null||ie&&V===ie.subTree)&&nc(P,V,!0)):te(P,V,fe,Ve,ie,oe,se,ge,Ce)},R=(P,V,fe,de,ie,oe,se,ge,Ce)=>{V.slotScopeIds=ge,P==null?V.shapeFlag&512?ie.ctx.activate(V,fe,de,se,Ce):$(V,fe,de,ie,oe,se,Ce):q(P,V,Ce)},$=(P,V,fe,de,ie,oe,se)=>{const ge=P.component=H5(P,de,ie);if(Ps(P)&&(ge.ctx.renderer=be),j5(ge,!1,se),ge.asyncDep){if(ie&&ie.registerDep(ge,W,se),!P.el){const Ce=ge.subTree=Bt(Gr);g(null,Ce,V,fe),P.placeholder=Ce.el}}else W(ge,P,V,fe,ie,oe,se)},q=(P,V,fe)=>{const de=V.component=P.component;if(S5(P,V,fe))if(de.asyncDep&&!de.asyncResolved){Z(de,V,fe);return}else de.next=V,de.update();else V.el=P.el,de.vnode=V},W=(P,V,fe,de,ie,oe,se)=>{const ge=()=>{if(P.isMounted){let{next:Ue,bu:Ne,u:qe,parent:it,vnode:ct}=P;{const ue=fh(P);if(ue){Ue&&(Ue.el=ct.el,Z(P,Ue,se)),ue.asyncDep.then(()=>{Zr(()=>{P.isUnmounted||xe()},ie)});return}}let ot=Ue,wt;Oi(P,!1),Ue?(Ue.el=ct.el,Z(P,Ue,se)):Ue=ct,Ne&&bs(Ne),(wt=Ue.props&&Ue.props.onVnodeBeforeUpdate)&&da(wt,it,Ue,ct),Oi(P,!0);const Me=Q1(P),D=P.subTree;P.subTree=Me,p(D,Me,f(D.el),Le(D),P,ie,oe),Ue.el=Me.el,ot===null&&C5(P,Me.el),qe&&Zr(qe,ie),(wt=Ue.props&&Ue.props.onVnodeUpdated)&&Zr(()=>da(wt,it,Ue,ct),ie)}else{let Ue;const{el:Ne,props:qe}=V,{bm:it,m:ct,parent:ot,root:wt,type:Me}=P,D=co(V);Oi(P,!1),it&&bs(it),!D&&(Ue=qe&&qe.onVnodeBeforeMount)&&da(Ue,ot,V),Oi(P,!0);{wt.ce&&wt.ce._hasShadowRoot()&&wt.ce._injectChildStyle(Me,P.parent?P.parent.type:void 0);const ue=P.subTree=Q1(P);p(null,ue,fe,de,P,ie,oe),V.el=ue.el}if(ct&&Zr(ct,ie),!D&&(Ue=qe&&qe.onVnodeMounted)){const ue=V;Zr(()=>da(Ue,ot,ue),ie)}(V.shapeFlag&256||ot&&co(ot.vnode)&&ot.vnode.shapeFlag&256)&&P.a&&Zr(P.a,ie),P.isMounted=!0,V=fe=de=null}};P.scope.on();const Ce=P.effect=new Kd(ge);P.scope.off();const xe=P.update=Ce.run.bind(Ce),Ve=P.job=Ce.runIfDirty.bind(Ce);Ve.i=P,Ve.id=P.uid,Ce.scheduler=()=>Gu(Ve),Oi(P,!0),xe()},Z=(P,V,fe)=>{V.component=P;const de=P.vnode.props;P.vnode=V,P.next=null,E5(P,V.props,de,fe),I5(P,V.children,fe),oa(),g1(P),la()},te=(P,V,fe,de,ie,oe,se,ge,Ce=!1)=>{const xe=P&&P.children,Ve=P?P.shapeFlag:0,Ue=V.children,{patchFlag:Ne,shapeFlag:qe}=V;if(Ne>0){if(Ne&128){_e(xe,Ue,fe,de,ie,oe,se,ge,Ce);return}else if(Ne&256){ne(xe,Ue,fe,de,ie,oe,se,ge,Ce);return}}qe&8?(Ve&16&&Ie(xe,ie,oe),Ue!==xe&&c(fe,Ue)):Ve&16?qe&16?_e(xe,Ue,fe,de,ie,oe,se,ge,Ce):Ie(xe,ie,oe,!0):(Ve&8&&c(fe,""),qe&16&&_(Ue,fe,de,ie,oe,se,ge,Ce))},ne=(P,V,fe,de,ie,oe,se,ge,Ce)=>{P=P||to,V=V||to;const xe=P.length,Ve=V.length,Ue=Math.min(xe,Ve);let Ne;for(Ne=0;Ne<Ue;Ne++){const qe=V[Ne]=Ce?Oa(V[Ne]):fa(V[Ne]);p(P[Ne],qe,fe,null,ie,oe,se,ge,Ce)}xe>Ve?Ie(P,ie,oe,!0,!1,Ue):_(V,fe,de,ie,oe,se,ge,Ce,Ue)},_e=(P,V,fe,de,ie,oe,se,ge,Ce)=>{let xe=0;const Ve=V.length;let Ue=P.length-1,Ne=Ve-1;for(;xe<=Ue&&xe<=Ne;){const qe=P[xe],it=V[xe]=Ce?Oa(V[xe]):fa(V[xe]);if(Pi(qe,it))p(qe,it,fe,null,ie,oe,se,ge,Ce);else break;xe++}for(;xe<=Ue&&xe<=Ne;){const qe=P[Ue],it=V[Ne]=Ce?Oa(V[Ne]):fa(V[Ne]);if(Pi(qe,it))p(qe,it,fe,null,ie,oe,se,ge,Ce);else break;Ue--,Ne--}if(xe>Ue){if(xe<=Ne){const qe=Ne+1,it=qe<Ve?V[qe].el:de;for(;xe<=Ne;)p(null,V[xe]=Ce?Oa(V[xe]):fa(V[xe]),fe,it,ie,oe,se,ge,Ce),xe++}}else if(xe>Ne)for(;xe<=Ue;)we(P[xe],ie,oe,!0),xe++;else{const qe=xe,it=xe,ct=new Map;for(xe=it;xe<=Ne;xe++){const re=V[xe]=Ce?Oa(V[xe]):fa(V[xe]);re.key!=null&&ct.set(re.key,xe)}let ot,wt=0;const Me=Ne-it+1;let D=!1,ue=0;const ke=new Array(Me);for(xe=0;xe<Me;xe++)ke[xe]=0;for(xe=qe;xe<=Ue;xe++){const re=P[xe];if(wt>=Me){we(re,ie,oe,!0);continue}let me;if(re.key!=null)me=ct.get(re.key);else for(ot=it;ot<=Ne;ot++)if(ke[ot-it]===0&&Pi(re,V[ot])){me=ot;break}me===void 0?we(re,ie,oe,!0):(ke[me-it]=xe+1,me>=ue?ue=me:D=!0,p(re,V[me],fe,null,ie,oe,se,ge,Ce),wt++)}const ze=D?P5(ke):to;for(ot=ze.length-1,xe=Me-1;xe>=0;xe--){const re=it+xe,me=V[re],O=V[re+1],Fe=re+1<Ve?O.el||hh(O):de;ke[xe]===0?p(null,me,fe,Fe,ie,oe,se,ge,Ce):D&&(ot<0||xe!==ze[ot]?pe(me,fe,Fe,2):ot--)}}},pe=(P,V,fe,de,ie=null)=>{const{el:oe,type:se,transition:ge,children:Ce,shapeFlag:xe}=P;if(xe&6){pe(P.component.subTree,V,fe,de);return}if(xe&128){P.suspense.move(V,fe,de);return}if(xe&64){se.move(P,V,fe,be);return}if(se===yt){n(oe,V,fe);for(let Ue=0;Ue<Ce.length;Ue++)pe(Ce[Ue],V,fe,de);n(P.anchor,V,fe);return}if(se===ac){b(P,V,fe);return}if(de!==2&&xe&1&&ge)if(de===0)ge.beforeEnter(oe),n(oe,V,fe),Zr(()=>ge.enter(oe),ie);else{const{leave:Ue,delayLeave:Ne,afterLeave:qe}=ge,it=()=>{P.ctx.isUnmounted?a(oe):n(oe,V,fe)},ct=()=>{oe._isLeaving&&oe[ca](!0),Ue(oe,()=>{it(),qe&&qe()})};Ne?Ne(oe,it,ct):ct()}else n(oe,V,fe)},we=(P,V,fe,de=!1,ie=!1)=>{const{type:oe,props:se,ref:ge,children:Ce,dynamicChildren:xe,shapeFlag:Ve,patchFlag:Ue,dirs:Ne,cacheIndex:qe,memo:it}=P;if(Ue===-2&&(ie=!1),ge!=null&&(oa(),pl(ge,null,fe,P,!0),la()),qe!=null&&(V.renderCache[qe]=void 0),Ve&256){V.ctx.deactivate(P);return}const ct=Ve&1&&Ne,ot=!co(P);let wt;if(ot&&(wt=se&&se.onVnodeBeforeUnmount)&&da(wt,V,P),Ve&6)Se(P.component,fe,de);else{if(Ve&128){P.suspense.unmount(fe,de);return}ct&&Ii(P,null,V,"beforeUnmount"),Ve&64?P.type.remove(P,V,fe,be,de):xe&&!xe.hasOnce&&(oe!==yt||Ue>0&&Ue&64)?Ie(xe,V,fe,!1,!0):(oe===yt&&Ue&384||!ie&&Ve&16)&&Ie(Ce,V,fe),de&&ve(P)}const Me=it!=null&&qe==null;(ot&&(wt=se&&se.onVnodeUnmounted)||ct||Me)&&Zr(()=>{wt&&da(wt,V,P),ct&&Ii(P,null,V,"unmounted"),Me&&(P.el=null)},fe)},ve=P=>{const{type:V,el:fe,anchor:de,transition:ie}=P;if(V===yt){Te(fe,de);return}if(V===ac){v(P);return}const oe=()=>{a(fe),ie&&!ie.persisted&&ie.afterLeave&&ie.afterLeave()};if(P.shapeFlag&1&&ie&&!ie.persisted){const{leave:se,delayLeave:ge}=ie,Ce=()=>se(fe,oe);ge?ge(P.el,oe,Ce):Ce()}else oe()},Te=(P,V)=>{let fe;for(;P!==V;)fe=d(P),a(P),P=fe;a(V)},Se=(P,V,fe)=>{const{bum:de,scope:ie,job:oe,subTree:se,um:ge,m:Ce,a:xe}=P;dh(Ce),dh(xe),de&&bs(de),ie.stop(),oe&&(oe.flags|=8,we(se,P,V,fe)),ge&&Zr(ge,V),Zr(()=>{P.isUnmounted=!0},V)},Ie=(P,V,fe,de=!1,ie=!1,oe=0)=>{for(let se=oe;se<P.length;se++)we(P[se],V,fe,de,ie)},Le=P=>{if(P.shapeFlag&6)return Le(P.component.subTree);if(P.shapeFlag&128)return P.suspense.next();const V=d(P.anchor||P.el),fe=V&&V[k1];return fe?d(fe):V};let Ee=!1;const Be=(P,V,fe)=>{let de;P==null?V._vnode&&(we(V._vnode,null,null,!0),de=V._vnode.component):p(V._vnode||null,P,V,null,null,null,fe),V._vnode=P,Ee||(Ee=!0,g1(de),b1(),Ee=!1)},be={p,um:we,m:pe,r:ve,mt:$,mc:_,pc:te,pbc:M,n:Le,o:e};return{render:Be,hydrate:void 0,createApp:b5(Be)}}function rc({type:e,props:t},r){return r==="svg"&&e==="foreignObject"||r==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:r}function Oi({effect:e,job:t},r){r?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function O5(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function nc(e,t,r=!1){const n=e.children,a=t.children;if(bt(n)&&bt(a))for(let i=0;i<n.length;i++){const o=n[i];let l=a[i];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=a[i]=Oa(a[i]),l.el=o.el),!r&&l.patchFlag!==-2&&nc(o,l)),l.type===Ns&&(l.patchFlag===-1&&(l=a[i]=Oa(l)),l.el=o.el),l.type===Gr&&!l.el&&(l.el=o.el)}}function P5(e){const t=e.slice(),r=[0];let n,a,i,o,l;const s=e.length;for(n=0;n<s;n++){const u=e[n];if(u!==0){if(a=r[r.length-1],e[a]<u){t[n]=a,r.push(n);continue}for(i=0,o=r.length-1;i<o;)l=i+o>>1,e[r[l]]<u?i=l+1:o=l;u<e[r[i]]&&(i>0&&(t[n]=r[i-1]),r[i]=n)}}for(i=r.length,o=r[i-1];i-- >0;)r[i]=o,o=t[o];return r}function fh(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:fh(t)}function dh(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function hh(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?hh(t.subTree):null}const ph=e=>e.__isSuspense;function R5(e,t){t&&t.pendingBranch?bt(e)?t.effects.push(...e):t.effects.push(e):jb(e)}const yt=Symbol.for("v-fgt"),Ns=Symbol.for("v-txt"),Gr=Symbol.for("v-cmt"),ac=Symbol.for("v-stc"),gl=[];let pn=null;function Q(e=!1){gl.push(pn=e?null:[])}function L5(){gl.pop(),pn=gl[gl.length-1]||null}let bl=1;function $s(e,t=!1){bl+=e,e<0&&pn&&t&&(pn.hasOnce=!0)}function vh(e){return e.dynamicChildren=bl>0?pn||to:null,L5(),bl>0&&pn&&pn.push(e),e}function ae(e,t,r,n,a,i){return vh(L(e,t,r,n,a,i,!0))}function kr(e,t,r,n,a){return vh(Bt(e,t,r,n,a,!0))}function yl(e){return e?e.__v_isVNode===!0:!1}function Pi(e,t){return e.type===t.type&&e.key===t.key}const mh=({key:e})=>e??null,Us=({ref:e,ref_key:t,ref_for:r})=>(typeof e=="number"&&(e=""+e),e!=null?Qt(e)||Rr(e)||St(e)?{i:Lr,r:e,k:t,f:!!r}:e:null);function L(e,t=null,r=null,n=0,a=null,i=e===yt?0:1,o=!1,l=!1){const s={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&mh(t),ref:t&&Us(t),scopeId:x1,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:n,dynamicProps:a,dynamicChildren:null,appContext:null,ctx:Lr};return l?(ic(s,r),i&128&&e.normalize(s)):r&&(s.shapeFlag|=Qt(r)?8:16),bl>0&&!o&&pn&&(s.patchFlag>0||i&6)&&s.patchFlag!==32&&pn.push(s),s}const Bt=B5;function B5(e,t=null,r=null,n=0,a=null,i=!1){if((!e||e===$1)&&(e=Gr),yl(e)){const l=ni(e,t,!0);return r&&ic(l,r),bl>0&&!i&&pn&&(l.shapeFlag&6?pn[pn.indexOf(e)]=l:pn.push(l)),l.patchFlag=-2,l}if(X5(e)&&(e=e.__vccOpts),t){t=N5(t);let{class:l,style:s}=t;l&&!Qt(l)&&(t.class=Xt(l)),Vt(s)&&(Hu(s)&&!bt(s)&&(s=ir({},s)),t.style=Ea(s))}const o=Qt(e)?1:ph(e)?128:S1(e)?64:Vt(e)?4:St(e)?2:0;return L(e,t,r,n,a,o,i,!0)}function N5(e){return e?Hu(e)||ah(e)?ir({},e):e:null}function ni(e,t,r=!1,n=!1){const{props:a,ref:i,patchFlag:o,children:l,transition:s}=e,u=t?gh(a||{},t):a,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&mh(u),ref:t&&t.ref?r&&i?bt(i)?i.concat(Us(t)):[i,Us(t)]:Us(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==yt?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:s,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ni(e.ssContent),ssFallback:e.ssFallback&&ni(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return s&&n&&Fi(c,s.clone(c)),c}function gr(e=" ",t=0){return Bt(Ns,null,e,t)}function rt(e="",t=!1){return t?(Q(),kr(Gr,null,e)):Bt(Gr,null,e)}function fa(e){return e==null||typeof e=="boolean"?Bt(Gr):bt(e)?Bt(yt,null,e.slice()):yl(e)?Oa(e):Bt(Ns,null,String(e))}function Oa(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ni(e)}function ic(e,t){let r=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(bt(t))r=16;else if(typeof t=="object")if(n&65){const a=t.default;a&&(a._c&&(a._d=!1),ic(e,a()),a._c&&(a._d=!0));return}else{r=32;const a=t._;!a&&!ah(t)?t._ctx=Lr:a===3&&Lr&&(Lr.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else St(t)?(t={default:t,_ctx:Lr},r=32):(t=String(t),n&64?(r=16,t=[gr(t)]):r=8);e.children=t,e.shapeFlag|=r}function gh(...e){const t={};for(let r=0;r<e.length;r++){const n=e[r];for(const a in n)if(a==="class")t.class!==n.class&&(t.class=Xt([t.class,n.class]));else if(a==="style")t.style=Ea([t.style,n.style]);else if(hs(a)){const i=t[a],o=n[a];o&&i!==o&&!(bt(i)&&i.includes(o))?t[a]=i?[].concat(i,o):o:o==null&&i==null&&!ps(a)&&(t[a]=o)}else a!==""&&(t[a]=n[a])}return t}function da(e,t,r,n=null){qn(e,t,7,[r,n])}const $5=Z1();let U5=0;function H5(e,t,r){const n=e.type,a=(t?t.appContext:e.appContext)||$5,i={uid:U5++,vnode:e,type:n,parent:t,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new ob(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(a.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:oh(n,a),emitsOptions:J1(n,a),emit:null,emitted:null,propsDefaults:Kt,inheritAttrs:n.inheritAttrs,ctx:Kt,data:Kt,props:Kt,attrs:Kt,slots:Kt,refs:Kt,setupState:Kt,setupContext:null,suspense:r,suspenseId:r?r.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=x5.bind(null,i),e.ce&&e.ce(i),i}let Vr=null;const oc=()=>Vr||Lr;let Hs,lc;{const e=xs(),t=(r,n)=>{let a;return(a=e[r])||(a=e[r]=[]),a.push(n),i=>{a.length>1?a.forEach(o=>o(i)):a[0](i)}};Hs=t("__VUE_INSTANCE_SETTERS__",r=>Vr=r),lc=t("__VUE_SSR_SETTERS__",r=>_l=r)}const xl=e=>{const t=Vr;return Hs(e),e.scope.on(),()=>{e.scope.off(),Hs(t)}},bh=()=>{Vr&&Vr.scope.off(),Hs(null)};function yh(e){return e.vnode.shapeFlag&4}let _l=!1;function j5(e,t=!1,r=!1){t&&lc(t);const{props:n,children:a}=e.vnode,i=yh(e);A5(e,n,i,t),D5(e,a,r||t);const o=i?G5(e,t):void 0;return t&&lc(!1),o}function G5(e,t){const r=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,f5);const{setup:n}=r;if(n){oa();const a=e.setupContext=n.length>1?q5(e):null,i=xl(e),o=lo(n,e,0,[e.props,a]),l=Ud(o);if(la(),i(),(l||e.sp)&&!co(e)&&F1(e),l){if(o.then(bh,bh),t)return o.then(s=>{xh(e,s)}).catch(s=>{Ms(s,e,0)});e.asyncDep=o}else xh(e,o)}else _h(e)}function xh(e,t,r){St(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Vt(t)&&(e.setupState=h1(t)),_h(e)}function _h(e,t,r){const n=e.type;e.render||(e.render=n.render||aa);{const a=xl(e);oa();try{d5(e)}finally{la(),a()}}}const V5={get(e,t){return jr(e,"get",""),e[t]}};function q5(e){const t=r=>{e.exposed=r||{}};return{attrs:new Proxy(e.attrs,V5),slots:e.slots,emit:e.emit,expose:t}}function js(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(h1(Eb(e.exposed)),{get(t,r){if(r in t)return t[r];if(r in vl)return vl[r](e)},has(t,r){return r in t||r in vl}})):e.proxy}const W5=/(?:^|[-_])\w/g,K5=e=>e.replace(W5,t=>t.toUpperCase()).replace(/[-_]/g,"");function wh(e,t=!0){return St(e)?e.displayName||e.name:e.name||t&&e.__name}function kh(e,t,r=!1){let n=wh(t);if(!n&&t.__file){const a=t.__file.match(/([^/\\]+)\.\w+$/);a&&(n=a[1])}if(!n&&e){const a=i=>{for(const o in i)if(i[o]===t)return o};n=a(e.components)||e.parent&&a(e.parent.type.components)||a(e.appContext.components)}return n?K5(n):r?"App":"Anonymous"}function X5(e){return St(e)&&"__vccOpts"in e}const mt=(e,t)=>Ob(e,t,_l);function Sh(e,t,r){try{$s(-1);const n=arguments.length;return n===2?Vt(t)&&!bt(t)?yl(t)?Bt(e,null,[t]):Bt(e,t):Bt(e,null,t):(n>3?r=Array.prototype.slice.call(arguments,2):n===3&&yl(r)&&(r=[r]),Bt(e,t,r))}finally{$s(1)}}const Y5="3.5.34";/**
|
|
17
17
|
* @vue/runtime-dom v3.5.34
|
|
18
18
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
19
19
|
* @license MIT
|
|
20
|
-
**/let sc;const Ch=typeof window<"u"&&window.trustedTypes;if(Ch)try{sc=Ch.createPolicy("vue",{createHTML:e=>e})}catch{}const Ah=sc?e=>sc.createHTML(e):e=>e,Z5="http://www.w3.org/2000/svg",J5="http://www.w3.org/1998/Math/MathML",Pa=typeof document<"u"?document:null,Eh=Pa&&Pa.createElement("template"),Q5={insert:(e,t,r)=>{t.insertBefore(e,r||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,r,n)=>{const a=t==="svg"?Pa.createElementNS(Z5,e):t==="mathml"?Pa.createElementNS(J5,e):r?Pa.createElement(e,{is:r}):Pa.createElement(e);return e==="select"&&n&&n.multiple!=null&&a.setAttribute("multiple",n.multiple),a},createText:e=>Pa.createTextNode(e),createComment:e=>Pa.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Pa.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,r,n,a,i){const o=r?r.previousSibling:t.lastChild;if(a&&(a===i||a.nextSibling))for(;t.insertBefore(a.cloneNode(!0),r),!(a===i||!(a=a.nextSibling)););else{Eh.innerHTML=Ah(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const l=Eh.content;if(n==="svg"||n==="mathml"){const s=l.firstChild;for(;s.firstChild;)l.appendChild(s.firstChild);l.removeChild(s)}t.insertBefore(l,r)}return[o?o.nextSibling:t.firstChild,r?r.previousSibling:t.lastChild]}},ai="transition",wl="animation",ho=Symbol("_vtc"),Th={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Mh=ir({},T1,Th),po=(e=>(e.displayName="Transition",e.props=Mh,e))((e,{slots:t})=>Sh(Qb,Ih(e),t)),Ri=(e,t=[])=>{bt(e)?e.forEach(r=>r(...t)):e&&e(...t)},Dh=e=>e?bt(e)?e.some(t=>t.length>1):e.length>1:!1;function Ih(e){const t={};for(const N in e)N in Th||(t[N]=e[N]);if(e.css===!1)return t;const{name:r="v",type:n,duration:a,enterFromClass:i=`${r}-enter-from`,enterActiveClass:o=`${r}-enter-active`,enterToClass:l=`${r}-enter-to`,appearFromClass:s=i,appearActiveClass:u=o,appearToClass:c=l,leaveFromClass:f=`${r}-leave-from`,leaveActiveClass:d=`${r}-leave-active`,leaveToClass:h=`${r}-leave-to`}=e,y=e6(a),p=y&&y[0],x=y&&y[1],{onBeforeEnter:g,onEnter:m,onEnterCancelled:b,onLeave:v,onLeaveCancelled:S,onBeforeAppear:C=g,onAppear:A=m,onAppearCancelled:_=b}=t,E=(N,R,$,q)=>{N._enterCancelled=q,ii(N,R?c:l),ii(N,R?u:o),$&&$()},M=(N,R)=>{N._isLeaving=!1,ii(N,f),ii(N,h),ii(N,d),R&&R()},z=N=>(R,$)=>{const q=N?A:m,W=()=>E(R,N,$);Ri(q,[R,W]),zh(()=>{ii(R,N?s:i),ha(R,N?c:l),Dh(q)||Fh(R,n,p,W)})};return ir(t,{onBeforeEnter(N){Ri(g,[N]),ha(N,i),ha(N,o)},onBeforeAppear(N){Ri(C,[N]),ha(N,s),ha(N,u)},onEnter:z(!1),onAppear:z(!0),onLeave(N,R){N._isLeaving=!0;const $=()=>M(N,R);ha(N,f),N._enterCancelled?(ha(N,d),cc(N)):(cc(N),ha(N,d)),zh(()=>{N._isLeaving&&(ii(N,f),ha(N,h),Dh(v)||Fh(N,n,x,$))}),Ri(v,[N,$])},onEnterCancelled(N){E(N,!1,void 0,!0),Ri(b,[N])},onAppearCancelled(N){E(N,!0,void 0,!0),Ri(_,[N])},onLeaveCancelled(N){M(N),Ri(S,[N])}})}function e6(e){if(e==null)return null;if(Vt(e))return[uc(e.enter),uc(e.leave)];{const t=uc(e);return[t,t]}}function uc(e){return Eu(e)}function ha(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.add(r)),(e[ho]||(e[ho]=new Set)).add(t)}function ii(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const r=e[ho];r&&(r.delete(t),r.size||(e[ho]=void 0))}function zh(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let t6=0;function Fh(e,t,r,n){const a=e._endId=++t6,i=()=>{a===e._endId&&n()};if(r!=null)return setTimeout(i,r);const{type:o,timeout:l,propCount:s}=Oh(e,t);if(!o)return n();const u=o+"end";let c=0;const f=()=>{e.removeEventListener(u,d),i()},d=h=>{h.target===e&&++c>=s&&f()};setTimeout(()=>{c<s&&f()},l+1),e.addEventListener(u,d)}function Oh(e,t){const r=window.getComputedStyle(e),n=y=>(r[y]||"").split(", "),a=n(`${ai}Delay`),i=n(`${ai}Duration`),o=Ph(a,i),l=n(`${wl}Delay`),s=n(`${wl}Duration`),u=Ph(l,s);let c=null,f=0,d=0;t===ai?o>0&&(c=ai,f=o,d=i.length):t===wl?u>0&&(c=wl,f=u,d=s.length):(f=Math.max(o,u),c=f>0?o>u?ai:wl:null,d=c?c===ai?i.length:s.length:0);const h=c===ai&&/\b(?:transform|all)(?:,|$)/.test(n(`${ai}Property`).toString());return{type:c,timeout:f,propCount:d,hasTransform:h}}function Ph(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((r,n)=>Rh(r)+Rh(e[n])))}function Rh(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function cc(e){return(e?e.ownerDocument:document).body.offsetHeight}function r6(e,t,r){const n=e[ho];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):r?e.setAttribute("class",t):e.className=t}const Gs=Symbol("_vod"),Lh=Symbol("_vsh"),fc={name:"show",beforeMount(e,{value:t},{transition:r}){e[Gs]=e.style.display==="none"?"":e.style.display,r&&t?r.beforeEnter(e):kl(e,t)},mounted(e,{value:t},{transition:r}){r&&t&&r.enter(e)},updated(e,{value:t,oldValue:r},{transition:n}){!t!=!r&&(n?t?(n.beforeEnter(e),kl(e,!0),n.enter(e)):n.leave(e,()=>{kl(e,!1)}):kl(e,t))},beforeUnmount(e,{value:t}){kl(e,t)}};function kl(e,t){e.style.display=t?e[Gs]:"none",e[Lh]=!t}const n6=Symbol(""),a6=/(?:^|;)\s*display\s*:/;function i6(e,t,r){const n=e.style,a=Qt(r);let i=!1;if(r&&!a){if(t)if(Qt(t))for(const o of t.split(";")){const l=o.slice(0,o.indexOf(":")).trim();r[l]==null&&Sl(n,l,"")}else for(const o in t)r[o]==null&&Sl(n,o,"");for(const o in r){o==="display"&&(i=!0);const l=r[o];l!=null?l6(e,o,!Qt(t)&&t?t[o]:void 0,l)||Sl(n,o,l):Sl(n,o,"")}}else if(a){if(t!==r){const o=n[n6];o&&(r+=";"+o),n.cssText=r,i=a6.test(r)}}else t&&e.removeAttribute("style");Gs in e&&(e[Gs]=i?n.display:"",e[Lh]&&(n.display="none"))}const Bh=/\s*!important$/;function Sl(e,t,r){if(bt(r))r.forEach(n=>Sl(e,t,n));else if(r==null&&(r=""),t.startsWith("--"))e.setProperty(t,r);else{const n=o6(e,t);Bh.test(r)?e.setProperty(hn(n),r.replace(Bh,""),"important"):e[n]=r}}const Nh=["Webkit","Moz","ms"],dc={};function o6(e,t){const r=dc[t];if(r)return r;let n=Er(t);if(n!=="filter"&&n in e)return dc[t]=n;n=gs(n);for(let a=0;a<Nh.length;a++){const i=Nh[a]+n;if(i in e)return dc[t]=i}return t}function l6(e,t,r,n){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&Qt(n)&&r===n}const $h="http://www.w3.org/1999/xlink";function Uh(e,t,r,n,a,i=ab(t)){n&&t.startsWith("xlink:")?r==null?e.removeAttributeNS($h,t.slice(6,t.length)):e.setAttributeNS($h,t,r):r==null||i&&!Vd(r)?e.removeAttribute(t):e.setAttribute(t,i?"":jn(r)?String(r):r)}function Hh(e,t,r,n,a){if(t==="innerHTML"||t==="textContent"){r!=null&&(e[t]=t==="innerHTML"?Ah(r):r);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const l=i==="OPTION"?e.getAttribute("value")||"":e.value,s=r==null?e.type==="checkbox"?"on":"":String(r);(l!==s||!("_value"in e))&&(e.value=s),r==null&&e.removeAttribute(t),e._value=r;return}let o=!1;if(r===""||r==null){const l=typeof e[t];l==="boolean"?r=Vd(r):r==null&&l==="string"?(r="",o=!0):l==="number"&&(r=0,o=!0)}try{e[t]=r}catch{}o&&e.removeAttribute(a||t)}function oi(e,t,r,n){e.addEventListener(t,r,n)}function s6(e,t,r,n){e.removeEventListener(t,r,n)}const jh=Symbol("_vei");function u6(e,t,r,n,a=null){const i=e[jh]||(e[jh]={}),o=i[t];if(n&&o)o.value=n;else{const[l,s]=c6(t);if(n){const u=i[t]=h6(n,a);oi(e,l,u,s)}else o&&(s6(e,l,o,s),i[t]=void 0)}}const Gh=/(?:Once|Passive|Capture)$/;function c6(e){let t;if(Gh.test(e)){t={};let n;for(;n=e.match(Gh);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):hn(e.slice(2)),t]}let hc=0;const f6=Promise.resolve(),d6=()=>hc||(f6.then(()=>hc=0),hc=Date.now());function h6(e,t){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;qn(p6(n,r.value),t,5,[n])};return r.value=e,r.attached=d6(),r}function p6(e,t){if(bt(t)){const r=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{r.call(e),e._stopped=!0},t.map(n=>a=>!a._stopped&&n&&n(a))}else return t}const Vh=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,v6=(e,t,r,n,a,i)=>{const o=a==="svg";t==="class"?r6(e,n,o):t==="style"?i6(e,r,n):hs(t)?ps(t)||u6(e,t,r,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):m6(e,t,n,o))?(Hh(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Uh(e,t,n,o,i,t!=="value")):e._isVueCE&&(g6(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Qt(n)))?Hh(e,Er(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Uh(e,t,n,o))};function m6(e,t,r,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Vh(t)&&St(r));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const a=e.tagName;if(a==="IMG"||a==="VIDEO"||a==="CANVAS"||a==="SOURCE")return!1}return Vh(t)&&Qt(r)?!1:t in e}function g6(e,t){const r=e._def.props;if(!r)return!1;const n=Er(t);return Array.isArray(r)?r.some(a=>Er(a)===n):Object.keys(r).some(a=>Er(a)===n)}const qh={};function b6(e,t,r){let n=qt(e,t);vs(n)&&(n=ir({},n,t));class a extends pc{constructor(o){super(n,o,r)}}return a.def=n,a}const y6=typeof HTMLElement<"u"?HTMLElement:class{};class pc extends y6{constructor(t,r={},n=ap){super(),this._def=t,this._props=r,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._styleAnchors=new WeakMap,this._ob=null,this.shadowRoot&&n!==ap?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(ir({},t.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.assignedSlot||t.parentNode||t.host);)if(t instanceof pc){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._inheritParentContext(t))}_inheritParentContext(t=this._parent){t&&this._app&&Object.setPrototypeOf(this._app._context.provides,t._instance.provides)}disconnectedCallback(){this._connected=!1,za(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(t){for(const r of t)this._setAttr(r.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let n=0;n<this.attributes.length;n++)this._setAttr(this.attributes[n].name);this._ob=new MutationObserver(this._processMutations.bind(this)),this._ob.observe(this,{attributes:!0});const t=(n,a=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:i,styles:o}=n;let l;if(i&&!bt(i))for(const s in i){const u=i[s];(u===Number||u&&u.type===Number)&&(s in this._props&&(this._props[s]=Eu(this._props[s])),(l||(l=Object.create(null)))[Er(s)]=!0)}this._numberProps=l,this._resolveProps(n),this.shadowRoot&&this._applyStyles(o),this._mount(n)},r=this._def.__asyncLoader;r?this._pendingResolve=r().then(n=>{n.configureApp=this._def.configureApp,t(this._def=n,!0)}):t(this._def)}_mount(t){this._app=this._createApp(t),this._inheritParentContext(),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const r=this._instance&&this._instance.exposed;if(r)for(const n in r)$t(this,n)||Object.defineProperty(this,n,{get:()=>Qe(r[n])})}_resolveProps(t){const{props:r}=t,n=bt(r)?r:Object.keys(r||{});for(const a of Object.keys(this))a[0]!=="_"&&n.includes(a)&&this._setProp(a,this[a]);for(const a of n.map(Er))Object.defineProperty(this,a,{get(){return this._getProp(a)},set(i){this._setProp(a,i,!0,!this._patching)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const r=this.hasAttribute(t);let n=r?this.getAttribute(t):qh;const a=Er(t);r&&this._numberProps&&this._numberProps[a]&&(n=Eu(n)),this._setProp(a,n,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,r,n=!0,a=!1){if(r!==this._props[t]&&(this._dirty=!0,r===qh?delete this._props[t]:(this._props[t]=r,t==="key"&&this._app&&(this._app._ceVNode.key=r)),a&&this._instance&&this._update(),n)){const i=this._ob;i&&(this._processMutations(i.takeRecords()),i.disconnect()),r===!0?this.setAttribute(hn(t),""):typeof r=="string"||typeof r=="number"?this.setAttribute(hn(t),r+""):r||this.removeAttribute(hn(t)),i&&i.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),D6(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const r=Bt(this._def,ir(t,this._props));return this._instance||(r.ce=n=>{this._instance=n,n.ce=this,n.isCE=!0;const a=(i,o)=>{this.dispatchEvent(new CustomEvent(i,vs(o[0])?ir({detail:o},o[0]):{detail:o}))};n.emit=(i,...o)=>{a(i,o),hn(i)!==i&&a(hn(i),o)},this._setParent()}),r}_applyStyles(t,r,n){if(!t)return;if(r){if(r===this._def||this._styleChildren.has(r))return;this._styleChildren.add(r)}const a=this._nonce,i=this.shadowRoot,o=n?this._getStyleAnchor(n)||this._getStyleAnchor(this._def):this._getRootStyleInsertionAnchor(i);let l=null;for(let s=t.length-1;s>=0;s--){const u=document.createElement("style");a&&u.setAttribute("nonce",a),u.textContent=t[s],i.insertBefore(u,l||o),l=u,s===0&&(n||this._styleAnchors.set(this._def,u),r&&this._styleAnchors.set(r,u))}}_getStyleAnchor(t){if(!t)return null;const r=this._styleAnchors.get(t);return r&&r.parentNode===this.shadowRoot?r:(r&&this._styleAnchors.delete(t),null)}_getRootStyleInsertionAnchor(t){for(let r=0;r<t.childNodes.length;r++){const n=t.childNodes[r];if(!(n instanceof HTMLStyleElement))return n}return null}_parseSlots(){const t=this._slots={};let r;for(;r=this.firstChild;){const n=r.nodeType===1&&r.getAttribute("slot")||"default";(t[n]||(t[n]=[])).push(r),this.removeChild(r)}}_renderSlots(){const t=this._getSlots(),r=this._instance.type.__scopeId;for(let n=0;n<t.length;n++){const a=t[n],i=a.getAttribute("name")||"default",o=this._slots[i],l=a.parentNode;if(o)for(const s of o){if(r&&s.nodeType===1){const u=r+"-s",c=document.createTreeWalker(s,1);s.setAttribute(u,"");let f;for(;f=c.nextNode();)f.setAttribute(u,"")}l.insertBefore(s,a)}else for(;a.firstChild;)l.insertBefore(a.firstChild,a);l.removeChild(a)}}_getSlots(){const t=[this];this._teleportTargets&&t.push(...this._teleportTargets);const r=new Set;for(const n of t){const a=n.querySelectorAll("slot");for(let i=0;i<a.length;i++)r.add(a[i])}return Array.from(r)}_injectChildStyle(t,r){this._applyStyles(t.styles,t,r)}_beginPatch(){this._patching=!0,this._dirty=!1}_endPatch(){this._patching=!1,this._dirty&&this._instance&&this._update()}_hasShadowRoot(){return this._def.shadowRoot!==!1}_removeChildStyle(t){}}const Wh=new WeakMap,Kh=new WeakMap,Vs=Symbol("_moveCb"),Xh=Symbol("_enterCb"),x6=(e=>(delete e.props.mode,e))({name:"TransitionGroup",props:ir({},Mh,{tag:String,moveClass:String}),setup(e,{slots:t}){const r=oc(),n=E1();let a,i;return L1(()=>{if(!a.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!S6(a[0].el,r.vnode.el,o)){a=[];return}a.forEach(_6),a.forEach(w6);const l=a.filter(k6);cc(r.vnode.el),l.forEach(s=>{const u=s.el,c=u.style;ha(u,o),c.transform=c.webkitTransform=c.transitionDuration="";const f=u[Vs]=d=>{d&&d.target!==u||(!d||d.propertyName.endsWith("transform"))&&(u.removeEventListener("transitionend",f),u[Vs]=null,ii(u,o))};u.addEventListener("transitionend",f)}),a=[]}),()=>{const o=Lt(e),l=Ih(o);let s=o.tag||yt;if(a=[],i)for(let u=0;u<i.length;u++){const c=i[u];c.el&&c.el instanceof Element&&(a.push(c),Fi(c,hl(c,l,n,r)),Wh.set(c,Yh(c.el)))}i=t.default?Ku(t.default()):[];for(let u=0;u<i.length;u++){const c=i[u];c.key!=null&&Fi(c,hl(c,l,n,r))}return Bt(s,null,i)}}});function _6(e){const t=e.el;t[Vs]&&t[Vs](),t[Xh]&&t[Xh]()}function w6(e){Kh.set(e,Yh(e.el))}function k6(e){const t=Wh.get(e),r=Kh.get(e),n=t.left-r.left,a=t.top-r.top;if(n||a){const i=e.el,o=i.style,l=i.getBoundingClientRect();let s=1,u=1;return i.offsetWidth&&(s=l.width/i.offsetWidth),i.offsetHeight&&(u=l.height/i.offsetHeight),(!Number.isFinite(s)||s===0)&&(s=1),(!Number.isFinite(u)||u===0)&&(u=1),Math.abs(s-1)<.01&&(s=1),Math.abs(u-1)<.01&&(u=1),o.transform=o.webkitTransform=`translate(${n/s}px,${a/u}px)`,o.transitionDuration="0s",e}}function Yh(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function S6(e,t,r){const n=e.cloneNode(),a=e[ho];a&&a.forEach(l=>{l.split(/\s+/).forEach(s=>s&&n.classList.remove(s))}),r.split(/\s+/).forEach(l=>l&&n.classList.add(l)),n.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(n);const{hasTransform:o}=Oh(n);return i.removeChild(n),o}const vo=e=>{const t=e.props["onUpdate:modelValue"]||!1;return bt(t)?r=>bs(t,r):t};function C6(e){e.target.composing=!0}function Zh(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ra=Symbol("_assign");function Jh(e,t,r){return t&&(e=e.trim()),r&&(e=ys(e)),e}const sn={created(e,{modifiers:{lazy:t,trim:r,number:n}},a){e[Ra]=vo(a);const i=n||a.props&&a.props.type==="number";oi(e,t?"change":"input",o=>{o.target.composing||e[Ra](Jh(e.value,r,i))}),(r||i)&&oi(e,"change",()=>{e.value=Jh(e.value,r,i)}),t||(oi(e,"compositionstart",C6),oi(e,"compositionend",Zh),oi(e,"change",Zh))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:r,modifiers:{lazy:n,trim:a,number:i}},o){if(e[Ra]=vo(o),e.composing)return;const l=(i||e.type==="number")&&!/^0\d/.test(e.value)?ys(e.value):e.value,s=t??"";if(l===s)return;const u=e.getRootNode();(u instanceof Document||u instanceof ShadowRoot)&&u.activeElement===e&&e.type!=="range"&&(n&&t===r||a&&e.value.trim()===s)||(e.value=s)}},qs={deep:!0,created(e,t,r){e[Ra]=vo(r),oi(e,"change",()=>{const n=e._modelValue,a=Cl(e),i=e.checked,o=e[Ra];if(bt(n)){const l=Tu(n,a),s=l!==-1;if(i&&!s)o(n.concat(a));else if(!i&&s){const u=[...n];u.splice(l,1),o(u)}}else if(no(n)){const l=new Set(n);i?l.add(a):l.delete(a),o(l)}else o(tp(e,i))})},mounted:Qh,beforeUpdate(e,t,r){e[Ra]=vo(r),Qh(e,t,r)}};function Qh(e,{value:t,oldValue:r},n){e._modelValue=t;let a;if(bt(t))a=Tu(t,n.props.value)>-1;else if(no(t))a=t.has(n.props.value);else{if(t===r)return;a=ao(t,tp(e,!0))}e.checked!==a&&(e.checked=a)}const Ws={deep:!0,created(e,{value:t,modifiers:{number:r}},n){const a=no(t);oi(e,"change",()=>{const i=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>r?ys(Cl(o)):Cl(o));e[Ra](e.multiple?a?new Set(i):i:i[0]),e._assigning=!0,za(()=>{e._assigning=!1})}),e[Ra]=vo(n)},mounted(e,{value:t}){ep(e,t)},beforeUpdate(e,t,r){e[Ra]=vo(r)},updated(e,{value:t}){e._assigning||ep(e,t)}};function ep(e,t){const r=e.multiple,n=bt(t);if(!(r&&!n&&!no(t))){for(let a=0,i=e.options.length;a<i;a++){const o=e.options[a],l=Cl(o);if(r)if(n){const s=typeof l;s==="string"||s==="number"?o.selected=t.some(u=>String(u)===String(l)):o.selected=Tu(t,l)>-1}else o.selected=t.has(l);else if(ao(Cl(o),t)){e.selectedIndex!==a&&(e.selectedIndex=a);return}}!r&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Cl(e){return"_value"in e?e._value:e.value}function tp(e,t){const r=t?"_trueValue":"_falseValue";return r in e?e[r]:t}const A6=["ctrl","shift","alt","meta"],E6={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>A6.some(r=>e[`${r}Key`]&&!t.includes(r))},vr=(e,t)=>{if(!e)return e;const r=e._withMods||(e._withMods={}),n=t.join(".");return r[n]||(r[n]=(a,...i)=>{for(let o=0;o<t.length;o++){const l=E6[t[o]];if(l&&l(a,t))return}return e(a,...i)})},T6={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},pa=(e,t)=>{const r=e._withKeys||(e._withKeys={}),n=t.join(".");return r[n]||(r[n]=a=>{if(!("key"in a))return;const i=hn(a.key);if(t.some(o=>o===i||T6[o]===i))return e(a)})},M6=ir({patchProp:v6},Q5);let rp;function np(){return rp||(rp=z5(M6))}const D6=(...e)=>{np().render(...e)},ap=(...e)=>{const t=np().createApp(...e),{mount:r}=t;return t.mount=n=>{const a=z6(n);if(!a)return;const i=t._component;!St(i)&&!i.render&&!i.template&&(i.template=a.innerHTML),a.nodeType===1&&(a.textContent="");const o=r(a,!1,I6(a));return a instanceof Element&&(a.removeAttribute("v-cloak"),a.setAttribute("data-v-app","")),o},t};function I6(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function z6(e){return Qt(e)?document.querySelector(e):e}function ip(e){return!!e&&e.enabled&&e.state==="ok"}function F6(e){const t=e.apiBase!=null?e.apiBase.replace(/\/+$/,""):null;function r(a,i){return a||(t===null?null:`${t}${i}`)}const n=e.endpoint??(t!==null?`${t}/api/files/manager`:null);if(!n)throw new Error("[@brftech/filex-core] config requires either `apiBase` or `endpoint`");return{manager:n,uploadInit:r(e.uploadInit,"/api/files/upload/init"),uploadFinalize:r(e.uploadFinalize,"/api/files/upload/finalize"),uploadAbort:r(e.uploadAbort,"/api/files/upload/abort"),shareCreate:r(e.shareCreate,"/api/files/share"),shareList:r(e.shareList,"/api/files/share"),shareDelete:r(e.shareDelete,"/api/files/share/{uuid}"),limits:r(e.limits,"/api/files/limits"),capabilities:r(e.capabilities,"/api/files/capabilities"),archiveList:r(e.archiveList,"/api/files/archive/list"),archiveExtract:r(e.archiveExtract,"/api/files/archive/extract"),archiveAdd:r(e.archiveAdd,"/api/files/archive/add"),copy:r(e.copy,"/api/files/copy"),moveAsync:r(e.moveAsync,"/api/files/move"),deleteAsync:r(e.deleteAsync,"/api/files/delete"),opsList:r(e.opsList,"/api/files/ops"),opsShow:r(e.opsShow,"/api/files/ops/{id}"),onlyOfficeConfig:r(e.onlyOfficeConfig,"/api/files/onlyoffice/config"),saveText:r(e.saveText,"/api/files/save-text"),restore:r(e.restore,"/api/files/restore"),trashList:r(e.trashList,"/api/files/manager/trash"),trashRestore:r(e.trashRestore,"/api/files/manager/restore")}}async function O6(e){if(typeof e=="function"){const t=e();return t instanceof Promise?await t:t}return e}function P6(e){return e?"kind"in e?e:e.type==="bearer"?{kind:"bearer",token:e.token}:e.type==="csrf"?{kind:"csrf",csrf:e.csrf}:{kind:"none"}:{kind:"none"}}function R6(e){const t=F6(e),r=P6(e.auth);async function n(be={}){const ye={Accept:"application/json",...be};if(r.kind==="bearer"){const P=await O6(r.token);P&&(ye.Authorization=`Bearer ${P}`)}else if(r.kind==="csrf")ye["X-CSRF-TOKEN"]=r.csrf,ye["X-Requested-With"]="XMLHttpRequest";else if(r.kind==="basic"){const P=btoa(`${r.user}:${r.pass}`);ye.Authorization=`Basic ${P}`}return ye}function a(be={}){const ye={Accept:"application/json",...be};if(r.kind==="bearer"&&typeof r.token=="string")ye.Authorization=`Bearer ${r.token}`;else if(r.kind==="csrf")ye["X-CSRF-TOKEN"]=r.csrf,ye["X-Requested-With"]="XMLHttpRequest";else if(r.kind==="basic"){const P=btoa(`${r.user}:${r.pass}`);ye.Authorization=`Basic ${P}`}return ye}function i(){return r.kind==="csrf"?"include":"same-origin"}function o(be){const ye=(e.locale??"tr")!=="en",V={400:["Geçersiz istek","Bad request"],401:["Oturum gerekli, tekrar giriş yapın","Sign-in required"],403:["Bu işlem için yetkiniz yok","You are not allowed to do this"],404:["Bulunamadı","Not found"],409:["Zaten var / çakışma","Already exists / conflict"],413:["Dosya çok büyük","File too large"],415:["Bu dosya türü desteklenmiyor","Unsupported file type"],422:["Geçersiz veri","Invalid data"],429:["Çok fazla istek, biraz bekleyin","Too many requests"],500:["Sunucu hatası","Server error"],501:["Bu işlem desteklenmiyor","Not supported"],503:["Servis şu an kullanılamıyor","Service unavailable"]}[be];return V?ye?V[0]:V[1]:ye?`Hata (${be})`:`Error (${be})`}async function l(be,ye={}){const P={...await n(),...ye.headers??{}},V=await fetch(be,{...ye,headers:P,credentials:i()});if(!V.ok){const fe=await V.text().catch(()=>""),de=new Error(o(V.status));throw de.status=V.status,de.detail=fe.slice(0,300),de}return V.json()}function s(be=""){return t.manager.replace(/\/manager(\?.*)?$/,"/permissions")+be}async function u(be){return l(s()+"?path="+encodeURIComponent(be))}async function c(be){return l(s("/resolve")+"?email="+encodeURIComponent(be))}async function f(be){return l(s("/users")+"?q="+encodeURIComponent(be))}async function d(be){return l(s(),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(be)})}async function h(be,ye){return l(s("/"+be),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({level:ye})})}async function y(be){return l(s("/"+be),{method:"DELETE"})}async function p(be){return l(s("/invite"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(be)})}async function x(be){return l(s("/share-mail"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(be)})}function g(be){const ye=new URLSearchParams;for(const[P,V]of Object.entries(be))V!=null&&ye.set(P,String(V));return ye.toString()}function m(be,ye={}){const P=t.manager.includes("?")?"&":"?";return`${t.manager}${P}${g({q:be,action:be,...ye})}`}async function b(be){return l(m("index",{path:be}))}async function v(be,ye){return l(m("search",{path:be,filter:ye}))}async function S(be){return l(m("subfolders",{path:be}))}async function C(be,ye){return l(m("newfolder"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:be,name:ye})})}async function A(be,ye,P){return l(m("rename"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:be,item:ye,name:P})})}async function _(be,ye,P){return l(m("move"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:be,item:P,items:ye.map(V=>({path:V}))})})}async function E(be,ye){return l(m("delete"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:be,items:ye.map(P=>({path:P}))})})}async function M(be,ye){if(!t.copy)throw new Error("copy endpoint not configured");return l(t.copy,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source:be,target:ye})})}async function z(be,ye,P){if(!t.moveAsync)throw new Error("moveAsync endpoint not configured");return l(t.moveAsync,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source:be,target:ye,sourceDir:P})})}async function N(be,ye){if(!t.deleteAsync)throw new Error("deleteAsync endpoint not configured");return l(t.deleteAsync,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source:be,sourceDir:ye})})}async function R(be){if(!t.restore)throw new Error("restore endpoint not configured");return l(t.restore,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source:be})})}async function $(be){if(!t.trashList)throw new Error("trashList endpoint not configured");const ye=t.trashList,P=ye.includes("?")?"&":"?",V=be?`${ye}${P}storage=${encodeURIComponent(be)}`:ye;return l(V)}async function q(be){const ye=t.trashRestore;if(!ye)throw new Error("trashRestore endpoint not configured");let P=0;for(const V of be)try{await l(ye,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({node_id:V})}),P++}catch{}return{restored:P}}async function W(be,ye,P){const V=new FormData;V.append("path",be);for(const de of ye)V.append("file[]",de,de.name);const fe=await n();return new Promise((de,ie)=>{const oe=new XMLHttpRequest;oe.open("POST",m("upload"));for(const[se,ge]of Object.entries(fe))se!=="Content-Type"&&oe.setRequestHeader(se,ge);oe.withCredentials=i()==="include",oe.upload.onprogress=se=>{P&&se.lengthComputable&&P(Math.round(se.loaded/se.total*100))},oe.onload=()=>{if(oe.status>=200&&oe.status<300)try{de(JSON.parse(oe.responseText))}catch(se){ie(se)}else ie(new Error(`${oe.status} ${oe.statusText}: ${oe.responseText.slice(0,200)}`))},oe.onerror=()=>ie(new Error("Network error")),oe.send(V)})}function Z(be){return m("download",{path:be})}function te(be){return m("preview",{path:be})}async function ne(be){const ye=await n(),P=await fetch(te(be),{headers:ye,credentials:i()});if(!P.ok){const ie=await P.text().catch(()=>"");throw new Error(`${P.status} ${P.statusText}${ie?" — "+ie.slice(0,200):""}`)}const V=await P.blob(),fe=V.type||P.headers.get("content-type")||"";return{url:URL.createObjectURL(V),blob:V,mime:fe}}async function _e(be){const ye=await n(),P=await fetch(te(be),{headers:ye,credentials:i()});if(!P.ok){const V=await P.text().catch(()=>"");throw new Error(`${P.status} ${P.statusText}${V?" — "+V.slice(0,200):""}`)}return P.arrayBuffer()}async function pe(){return t.limits?l(t.limits):{max_upload_mb:1024}}async function we(){return t.capabilities?l(t.capabilities):{ffmpeg:!1,ghostscript:!1,libreoffice:!1,max_chunk_mb:5,upload_limit_mb:1024,onlyoffice_url:e.onlyOfficeBase??null,drawio_url:e.drawioBase??null,convert_url:e.convertBase??null}}async function ve(be){if(!t.shareCreate)throw new Error("shareCreate endpoint not configured");return l(t.shareCreate,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(be)})}async function Te(be){if(!t.shareList)return{shares:[]};const ye=t.shareList.includes("?")?"&":"?";return l(`${t.shareList}${ye}path=${encodeURIComponent(be)}`)}async function Se(be){if(!t.shareDelete)throw new Error("shareDelete endpoint not configured");const ye=t.shareDelete.replace("{uuid}",encodeURIComponent(be));return l(ye,{method:"DELETE"})}async function Ie(be){if(!t.archiveList)throw new Error("archiveList endpoint not configured");return{entries:(await l(t.archiveList,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:be})})).entries.map(P=>({name:P.name,size:P.size,isDir:P.is_dir,lastModified:P.mtime}))}}async function Le(be,ye){if(!t.archiveExtract)throw new Error("archiveExtract endpoint not configured");return l(t.archiveExtract,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:be,members:ye})})}async function Ae(be,ye){if(!t.archiveAdd)throw new Error("archiveAdd endpoint not configured");return l(t.archiveAdd,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:be,files:ye})})}async function Be(){const be=t.manager.replace(/\/manager(\?.*)?$/,"/ws-ticket");try{return await l(be,{method:"POST"})}catch{return null}}return{wsTicket:Be,index:b,search:v,subfolders:S,newFolder:C,rename:A,move:_,copy:M,moveAsync:z,deleteAsync:N,deleteItems:E,restore:R,listTrash:$,restoreIds:q,uploadMultipart:W,downloadUrl:Z,previewUrl:te,fetchBlob:ne,fetchArrayBuffer:_e,limits:pe,capabilities:we,createShare:ve,listShares:Te,revokeShare:Se,archiveList:Ie,archiveExtract:Le,archiveAdd:Ae,listPermissions:u,resolveEmail:c,searchUsers:f,addPermission:d,updatePermission:h,deletePermission:y,invitePermission:p,shareMail:x,endpoints:t,authHeaders:n,authHeadersSync:a,credentialsMode:i,jsonFetch:l}}function L6(e,t){const r=e.chunkSize??5242880,n=Math.max(1,Math.min(8,e.parallelChunks??4));async function a(i){var d,h;const o=i.chunkSize??r,l=i.parallelChunks??n,s={id:crypto.randomUUID(),file:i.file,path:i.path,totalBytes:i.file.size,uploadedBytes:0,percent:0,status:"initializing",cancel:()=>{}};let u=!1;const c=[];s.cancel=()=>{u=!0;for(const y of c)y.abort()};function f(){var y;s.percent=s.totalBytes>0?Math.min(100,Math.round(s.uploadedBytes/s.totalBytes*100)):0,(y=i.onProgress)==null||y.call(i,s)}try{if(!t.endpoints.uploadInit)throw new Error("uploadInit not configured");const y=await t.jsonFetch(t.endpoints.uploadInit,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:i.path,filename:i.file.name,size:i.file.size,mime:i.file.type||"application/octet-stream"})});s.uploadId=y.uploadId,s.status="uploading",f();const p=y.chunkBytes??o,x=new Map,g=[];let m=0;async function b(E){const z=(E.partNumber-1)*(y.chunkBytes??o),N=Math.min(z+(y.chunkBytes??o),i.file.size),R=i.file.slice(z,N),$=new AbortController;c.push($),await new Promise((q,W)=>{const Z=new XMLHttpRequest;Z.open("PUT",E.presignedUrl),Z.upload.onprogress=te=>{if(te.lengthComputable){const ne=x.get(E.partNumber)??0,_e=te.loaded-ne;x.set(E.partNumber,te.loaded),s.uploadedBytes+=_e,f()}},Z.onload=()=>{if(Z.status>=200&&Z.status<300){const te=(Z.getResponseHeader("ETag")||Z.getResponseHeader("etag")||"").trim();if(!te){W(new Error("Missing ETag on S3 response"));return}const ne=N-z,_e=x.get(E.partNumber)??0;_e<ne&&(s.uploadedBytes+=ne-_e,x.set(E.partNumber,ne)),g.push({partNumber:E.partNumber,etag:te}),q()}else W(new Error(`S3 PUT ${E.partNumber} → ${Z.status}: ${Z.responseText.slice(0,200)}`))},Z.onerror=()=>W(new Error(`S3 PUT ${E.partNumber} network error`)),Z.onabort=()=>W(new DOMException("Aborted","AbortError")),$.signal.addEventListener("abort",()=>Z.abort()),Z.send(R)})}const v=2;async function S(E,M=0){try{await b(E)}catch(z){if(u)throw z;const N=z instanceof Error?z:new Error(String(z));if(N.name==="AbortError"||M>=v)throw N;const R=x.get(E.partNumber)??0;R>0&&(s.uploadedBytes=Math.max(0,s.uploadedBytes-R),x.delete(E.partNumber),f());const $=500*(M+1)+Math.floor(Math.random()*250);return await new Promise(q=>setTimeout(q,$)),S(E,M+1)}}async function C(){for(;!u&&m<y.parts.length;){const E=y.parts[m++];await S(E)}}const A=[];for(let E=0;E<l;E++)A.push(C());if(await Promise.all(A),u)throw new DOMException("Aborted by user","AbortError");if(!t.endpoints.uploadFinalize)throw new Error("uploadFinalize not configured");s.status="finalizing",g.sort((E,M)=>E.partNumber-M.partNumber);const _=await t.jsonFetch(t.endpoints.uploadFinalize,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({uploadId:y.uploadId,parts:g})});return s.status="done",s.uploadedBytes=s.totalBytes,s.percent=100,f(),(d=i.onDone)==null||d.call(i,s,_),_}catch(y){const p=y instanceof Error?y:new Error(String(y));if(s.status=p.name==="AbortError"?"aborted":"error",s.error=p.message,f(),s.uploadId&&t.endpoints.uploadAbort&&s.status==="aborted")try{await t.jsonFetch(t.endpoints.uploadAbort,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({uploadId:s.uploadId})})}catch{}throw(h=i.onError)==null||h.call(i,s,p),p}}return{uploadFile:a}}function B6(e){const t=he(new Set),r=he(null);function n(d,h={}){if(h.shift&&r.value){const y=e(),p=y.findIndex(v=>v.path===r.value),x=y.findIndex(v=>v.path===d);if(p===-1||x===-1){t.value=new Set([d]),r.value=d;return}const[g,m]=p<x?[p,x]:[x,p],b=new Set;for(let v=g;v<=m;v++)b.add(y[v].path);t.value=b;return}if(h.ctrl){const y=new Set(t.value);y.has(d)?y.delete(d):y.add(d),t.value=y,r.value=d;return}t.value=new Set([d]),r.value=d}function a(){t.value=new Set,r.value=null}function i(){t.value=new Set(e().map(d=>d.path))}function o(d){return t.value.has(d)}function l(d){const h=new Set(t.value);h.add(d),t.value=h}function s(d){const h=new Set(t.value);h.delete(d),t.value=h}const u=gt(()=>t.value.size),c=gt(()=>t.value.size===0),f=gt(()=>e().filter(h=>t.value.has(h.path)));return{selected:t,anchor:r,click:n,clear:a,selectAll:i,has:o,add:l,remove:s,size:u,isEmpty:c,nodes:f}}function N6(e,t){function r(n){var l;if(!e.value)return;const i=n.target;if(i&&(i.tagName==="INPUT"||i.tagName==="TEXTAREA"||i.isContentEditable)&&n.key!=="Escape")return;const o=n.ctrlKey||n.metaKey;switch(n.key){case"Delete":t.onDelete&&(n.preventDefault(),t.onDelete());break;case"Backspace":(l=t.hasSelection)!=null&&l.call(t)&&t.onDelete?(n.preventDefault(),t.onDelete()):t.onGoUp&&(n.preventDefault(),t.onGoUp());break;case"F2":t.onRename&&(n.preventDefault(),t.onRename());break;case"Enter":t.onOpen&&t.onOpen();break;case"Escape":t.onClose&&t.onClose();break;case"/":t.onFocusSearch&&!o&&(n.preventDefault(),t.onFocusSearch());break;case"a":case"A":o&&t.onSelectAll&&(n.preventDefault(),t.onSelectAll());break;case"x":case"X":o&&t.onCut&&(n.preventDefault(),t.onCut());break;case"c":case"C":o&&t.onCopy&&(n.preventDefault(),t.onCopy());break;case"v":case"V":o&&t.onPaste&&(n.preventDefault(),t.onPaste());break;case"d":case"D":o&&t.onDuplicate&&(n.preventDefault(),t.onDuplicate());break;case"k":case"K":o&&t.onPathJump&&(n.preventDefault(),t.onPathJump());break;case"ArrowUp":n.altKey&&t.onGoUp&&(n.preventDefault(),t.onGoUp());break}}pr(()=>window.addEventListener("keydown",r)),Br(()=>window.removeEventListener("keydown",r))}const op={tr:{"toolbar.new_folder":"Yeni Klasör","toolbar.upload":"Yükle","toolbar.search":"Ara","toolbar.search.placeholder":"Dosya adı…","toolbar.view.list":"Liste","toolbar.view.grid":"Izgara","toolbar.refresh":"Yenile","toolbar.go_up":"Üst Klasör","ctx.open":"Aç","ctx.preview":"Önizle","ctx.download":"İndir","ctx.convert":"Dönüştür","ctx.rename":"Yeniden Adlandır","ctx.delete":"Sil","ctx.delete_perm":"Kalıcı Olarak Sil","ctx.restore":"Geri Getir","ctx.share":"Paylaş","ctx.move":"Taşı","ctx.copy":"Kopyala","ctx.cut":"Kes","ctx.paste":"Yapıştır","ctx.info":"Bilgi","ctx.duplicate":"Kopyasını Oluştur","ctx.new_file":"Yeni Dosya","modal.delete.title":"Silinsin mi?","modal.delete.message":"{count} öğe çöpe atılacak.","modal.delete.confirm":"Çöpe At","modal.delete.cancel":"Vazgeç","modal.rename.title":"Yeniden Adlandır","modal.rename.save":"Kaydet","modal.rename.cancel":"Vazgeç","modal.newfolder.title":"Yeni Klasör","modal.newfolder.placeholder":"Klasör adı","modal.newfolder.create":"Oluştur","modal.newfolder.cancel":"Vazgeç","modal.share.title":"Paylaşım Linki","modal.share.pin":"PIN koruması","modal.share.expires":"Son kullanma","modal.share.max_downloads":"İndirme limiti","modal.share.create":"Paylaş","modal.share.cancel":"Vazgeç","modal.share.copy":"Kopyala","modal.share.url_copied":"Link kopyalandı","modal.share.pin_copied":"PIN kopyalandı","modal.share.cli_copied":"CLI komutu kopyalandı","upload.progress":"Yükleniyor","upload.done":"Tamamlandı","upload.error":"Hata","upload.aborted":"İptal edildi","upload.cancel":"İptal","empty.folder":"Bu klasör boş","empty.search":"Sonuç bulunamadı",loading:"Yükleniyor…","notFound.title":"Klasör bulunamadı","notFound.desc":"Bu klasör mevcut değil, taşınmış ya da erişim yetkiniz yok.","notFound.goRoot":"Kök klasöre dön","col.name":"Ad","col.size":"Boyut","col.modified":"Tarih","col.type":"Tür","unit.bytes":"B","unit.kb":"KB","unit.mb":"MB","unit.gb":"GB","unit.tb":"TB","breadcrumb.root":"Kök","breadcrumb.copy_path":"Yolu Kopyala","breadcrumb.go_to_path":"Yola Git","breadcrumb.path_placeholder":"fileman/foo/bar","ops.copy":"Kopyalanıyor","ops.move":"Taşınıyor","ops.delete":"Siliniyor","ops.queued":"sırada","ops.done":"tamamlandı","ops.error":"hata","node.trash":"Çöp Kutusu","viewer.open_in_new_tab":"Yeni Sekmede Aç","viewer.loading":"Yükleniyor…","viewer.failed_to_load":"Dosya yüklenemedi","viewer.peer_not_installed":"Bu dosya tipi için opsiyonel kütüphane kurulu değil. Peer dependency yükle veya İndir düğmesini kullan.","viewer.format_unsupported_3d":"Bu 3B format tarayıcı önizlemesinde desteklenmiyor (model-viewer yalnızca .glb / .gltf / .usdz okur). Lütfen indirip yerel bir araçta açın.","viewer.zoom_in":"Yakınlaştır","viewer.zoom_out":"Uzaklaştır","viewer.fit_width":"Sayfa genişliğine sığdır","viewer.next_page":"Sonraki sayfa","viewer.prev_page":"Önceki sayfa","viewer.page_n_of_m":"Sayfa {n} / {m}","viewer.tags":"Etiketler","viewer.layers":"Katmanlar","viewer.toc":"İçindekiler","viewer.font_smaller":"Yazıyı küçült","viewer.font_larger":"Yazıyı büyüt","viewer.search":"Ara","viewer.download":"İndir","viewer.save_annotations":"Açıklamaları kaydet","viewer.annotations_on":"Açıklamalar: açık","viewer.annotations_off":"Açıklamalar: kapalı","viewer.read_only":"Salt okunur","viewer.csv_first_row_header":"İlk satır başlık olsun","viewer.csv_filter":"Satır filtrele…","viewer.epub_prev":"Önceki","viewer.epub_next":"Sonraki","viewer.drawio.disabled":"diagrams.net editörü bu filex kurulumunda yapılandırılmamış — yönetici FILEX_DRAWIO_URL'yi ayarlamalı.","viewer.archive.entries":"{n} dosya","viewer.archive.empty":"Arşiv boş.","viewer.archive.error":"Arşiv okunamadı.","viewer.name":"Ad","viewer.size":"Boyut"},en:{"toolbar.new_folder":"New Folder","toolbar.upload":"Upload","toolbar.search":"Search","toolbar.search.placeholder":"File name…","toolbar.view.list":"List","toolbar.view.grid":"Grid","toolbar.refresh":"Refresh","toolbar.go_up":"Up one level","ctx.open":"Open","ctx.preview":"Preview","ctx.download":"Download","ctx.convert":"Convert","ctx.rename":"Rename","ctx.delete":"Delete","ctx.delete_perm":"Delete Permanently","ctx.restore":"Restore","ctx.share":"Share","ctx.move":"Move","ctx.copy":"Copy","ctx.cut":"Cut","ctx.paste":"Paste","ctx.info":"Info","ctx.duplicate":"Duplicate","ctx.new_file":"New File","modal.delete.title":"Delete?","modal.delete.message":"{count} item(s) will be moved to trash.","modal.delete.confirm":"Move to Trash","modal.delete.cancel":"Cancel","modal.rename.title":"Rename","modal.rename.save":"Save","modal.rename.cancel":"Cancel","modal.newfolder.title":"New Folder","modal.newfolder.placeholder":"Folder name","modal.newfolder.create":"Create","modal.newfolder.cancel":"Cancel","modal.share.title":"Share Link","modal.share.pin":"PIN protected","modal.share.expires":"Expires at","modal.share.max_downloads":"Download limit","modal.share.create":"Share","modal.share.cancel":"Cancel","modal.share.copy":"Copy","modal.share.url_copied":"Link copied","modal.share.pin_copied":"PIN copied","modal.share.cli_copied":"CLI command copied","upload.progress":"Uploading","upload.done":"Done","upload.error":"Error","upload.aborted":"Aborted","upload.cancel":"Cancel","empty.folder":"This folder is empty","empty.search":"No results",loading:"Loading…","notFound.title":"Folder not found","notFound.desc":"This folder does not exist, was moved, or you do not have access to it.","notFound.goRoot":"Go to root folder","col.name":"Name","col.size":"Size","col.modified":"Modified","col.type":"Type","unit.bytes":"B","unit.kb":"KB","unit.mb":"MB","unit.gb":"GB","unit.tb":"TB","breadcrumb.root":"Root","breadcrumb.copy_path":"Copy Path","breadcrumb.go_to_path":"Go To Path","breadcrumb.path_placeholder":"fileman/foo/bar","ops.copy":"Copying","ops.move":"Moving","ops.delete":"Deleting","ops.queued":"queued","ops.done":"done","ops.error":"error","node.trash":"Trash","viewer.open_in_new_tab":"Open in New Tab","viewer.loading":"Loading…","viewer.failed_to_load":"Failed to load file","viewer.peer_not_installed":"Optional viewer library is not installed. Install the peer dependency or use the download button.","viewer.format_unsupported_3d":"This 3D format is not supported in the browser preview (model-viewer only reads .glb / .gltf / .usdz). Please download and open with a local tool.","viewer.zoom_in":"Zoom in","viewer.zoom_out":"Zoom out","viewer.fit_width":"Fit width","viewer.next_page":"Next page","viewer.prev_page":"Previous page","viewer.page_n_of_m":"Page {n} of {m}","viewer.tags":"Tags","viewer.layers":"Layers","viewer.toc":"Contents","viewer.font_smaller":"Smaller text","viewer.font_larger":"Larger text","viewer.search":"Search","viewer.download":"Download","viewer.save_annotations":"Save annotations","viewer.annotations_on":"Annotations: on","viewer.annotations_off":"Annotations: off","viewer.read_only":"Read only","viewer.csv_first_row_header":"First row as header","viewer.csv_filter":"Filter rows…","viewer.epub_prev":"Previous","viewer.epub_next":"Next","viewer.drawio.disabled":"diagrams.net embed is not configured for this filex instance — operator must wire FILEX_DRAWIO_URL to enable the editor.","viewer.archive.entries":"{n} files","viewer.archive.empty":"Archive is empty.","viewer.archive.error":"Could not read archive contents.","viewer.name":"Name","viewer.size":"Size"}};function In(e){const t=gt(()=>{const i=typeof e=="function"?e():e.value;return op[i]??op.tr});function r(i,o={}){const l=t.value[i]??i;return Object.entries(o).reduce((s,[u,c])=>s.replaceAll(`{${u}}`,String(c)),l)}function n(i){if(i==null||i<0)return"—";if(i===0)return`0 ${r("unit.bytes")}`;const o=[[1024**4,"unit.tb"],[1024**3,"unit.gb"],[1024**2,"unit.mb"],[1024,"unit.kb"],[1,"unit.bytes"]];for(const[l,s]of o)if(i>=l){const u=i/l;return`${u>=100?Math.round(u):u.toFixed(u>=10?1:2)} ${r(s)}`}return`${i} ${r("unit.bytes")}`}function a(i){if(i.basename===".trash")return r("node.trash");const o=i.basename.match(/^\d{8}-\d{6}-[A-Za-z0-9]+__(.+)$/);return o?o[1]:i.basename}return{t:r,formatSize:n,nodeDisplayName:a}}const $6=2e3,U6=8e3;function lp(e){const t=(...l)=>{for(const s of l)if(typeof s=="number")return s;return 0},r=(...l)=>{for(const s of l)if(typeof s=="string"&&s!=="")return s;return null},n=String(e.status??"pending"),a=n==="ok"||n==="done"?"done":n==="failed"||n==="partial"||n==="error"?"error":n==="running"?"running":"pending",i=Array.isArray(e.sources)?e.sources:[],o=r(e.op_type,e.kind)??"delete";return{id:t(e.id),op_type:o==="copy"||o==="move"?o:"delete",status:a,progress_total:t(e.progress_total,e.total,i.length),progress_done:t(e.progress_done,e.done),target_path:r(e.target_path,e.dest),source_dir:r(e.source_dir),source_count:t(e.source_count,i.length),error_message:r(e.error_message,e.error),started_at:r(e.started_at),finished_at:r(e.finished_at),created_at:r(e.created_at)}}function H6(e,t,r={}){const n=he([]),a=new Set,i=new Map;let o=!1;const l=gt(()=>n.value.some(y=>y.status==="pending"||y.status==="running"));let s;function u(){s||t.endpoints.opsList&&(s=setInterval(()=>{f()},$6),f())}function c(){s&&(clearInterval(s),s=void 0)}async function f(){var y;if(t.endpoints.opsList)try{const x=((await t.jsonFetch(t.endpoints.opsList)).ops||[]).map(lp);for(const _ of x)(_.status==="done"||_.status==="error")&&!a.has(_.id)&&(a.add(_.id),i.set(_.id,Date.now()),o&&((y=r.onSettled)==null||y.call(r,_)));const g=new Set(n.value.map(_=>_.id)),m=x.filter(_=>_.status==="pending"||_.status==="running"?!0:o?g.has(_.id):!1),b=new Set(m.map(_=>_.id)),v=n.value.filter(_=>!b.has(_.id)),S=[...m,...v];o=!0;const C=Date.now(),A=S.filter(_=>{if(_.status==="pending"||_.status==="running")return!0;const E=i.get(_.id);return E!==void 0&&C-E<U6});n.value=A,!l.value&&A.length===0&&c()}catch(p){console.warn("[usePendingOps] poll failed:",p)}}function d(y){const p=lp(y);n.value.some(g=>g.id===p.id)||(n.value=[p,...n.value]),u()}function h(y){n.value=n.value.filter(p=>p.id!==y),i.delete(y)}return Br(()=>{c()}),{ops:n,hasActive:l,register:d,dismiss:h,poll:f,startPolling:u,stopPolling:c}}const j6=25e3,G6=15e3,V6=6;class q6{constructor(t){na(this,"ws",null);na(this,"opts");na(this,"closed",!1);na(this,"connecting",!1);na(this,"retries",0);na(this,"fallback",!1);na(this,"pingTimer",null);na(this,"reconnectTimer",null);na(this,"currentPath",null);na(this,"currentFocus",null);this.opts=t,this.connect()}subscribe(t){this.currentPath=t,this.currentFocus=null,t&&this.send({type:"subscribe",path:t})}setFocus(t){this.currentFocus=t,this.send({type:"focus",file:t})}close(){this.closed=!0,this.clearTimers(),this.dropSocket()}async connect(){if(this.closed||this.connecting||this.ws)return;this.connecting=!0;let t=null;try{t=await this.opts.getTicket()}catch{t=null}if(this.connecting=!1,this.closed)return;if(!t||!t.ticket||!t.ws_url){this.fail();return}const r=t.ws_url.includes("?")?"&":"?";let n;try{n=new WebSocket(`${t.ws_url}${r}ticket=${encodeURIComponent(t.ticket)}`)}catch{this.fail();return}this.ws=n,n.onopen=()=>{var a,i;this.retries=0,this.setFallback(!1),(i=(a=this.opts.handlers).onStatus)==null||i.call(a,!0),this.currentPath&&this.send({type:"subscribe",path:this.currentPath}),this.currentFocus!==null&&this.send({type:"focus",file:this.currentFocus}),this.startPing()},n.onmessage=a=>{var l,s,u,c;let i;try{i=JSON.parse(typeof a.data=="string"?a.data:"")}catch{return}const o=i;(o==null?void 0:o.type)==="change"?(s=(l=this.opts.handlers).onChange)==null||s.call(l,i):(o==null?void 0:o.type)==="presence"&&((c=(u=this.opts.handlers).onPresence)==null||c.call(u,i))},n.onerror=()=>{},n.onclose=()=>{var a,i;this.stopPing(),this.ws=null,(i=(a=this.opts.handlers).onStatus)==null||i.call(a,!1),this.fail()}}fail(){if(this.closed||this.reconnectTimer)return;if(this.retries>=V6){this.setFallback(!0);return}const t=Math.min(1e3*2**this.retries,G6);this.retries+=1,this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},t)}setFallback(t){var r,n;this.fallback!==t&&(this.fallback=t,(n=(r=this.opts.handlers).onFallback)==null||n.call(r,t))}send(t){const r=this.ws;if(!(!r||r.readyState!==WebSocket.OPEN))try{r.send(JSON.stringify(t))}catch{}}startPing(){this.stopPing(),this.pingTimer=setInterval(()=>this.send({type:"ping"}),j6)}stopPing(){this.pingTimer&&(clearInterval(this.pingTimer),this.pingTimer=null)}dropSocket(){if(this.ws){try{this.ws.onclose=null,this.ws.close()}catch{}this.ws=null}}clearTimers(){this.stopPing(),this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}}const W6=200,K6=12e3;function X6(e,t){const r=he([]),n=he(!1);let a=null,i=null,o=null,l=null;function s(){o&&clearTimeout(o),o=setTimeout(()=>{o=null,t.reload()},W6)}function u(p){i&&p.path&&p.path!==i||(r.value=Array.isArray(p.users)?p.users:[])}function c(p){p?(r.value=[],l||(l=setInterval(()=>t.reload(),K6))):l&&(clearInterval(l),l=null)}function f(){a||(a=new q6({getTicket:()=>e.wsTicket(),handlers:{onChange:s,onPresence:u,onFallback:c,onStatus:p=>{n.value=p}}}))}function d(p){r.value=[],i=p,a==null||a.subscribe(p)}function h(p){a==null||a.setFocus(p)}function y(){o&&(clearTimeout(o),o=null),l&&(clearInterval(l),l=null),a==null||a.close(),a=null}return{presenceUsers:r,connected:n,start:f,subscribe:d,setFocus:h,stop:y}}let Ks=null,Xs=null,Ys=null,vc=null;function mc(){Ks||(Ks=import("monaco-editor").then(e=>(Ys=e.default??e,Ys)).catch(()=>(Ys=null,null))),Xs||(Xs=import("highlight.js").then(e=>(vc=e.default??e,vc)).catch(()=>(vc=null,null)))}async function sp(){return Ks||mc(),Ks}async function up(){return Xs||mc(),Xs}function Y6(){return Ys}const Z6=["title"],J6={class:"fx-presence-avatars"},Q6=["title"],e8={key:0,class:"fx-presence-dot","aria-hidden":"true"},t8={key:0,class:"fx-presence-more"},r8={class:"fx-presence-text"},n8={class:"fx-presence-file"},a8=qt({__name:"PresenceBar",props:{users:{},selfId:{}},setup(e){const t=e,r=gt(()=>(t.users??[]).filter(o=>t.selfId==null||o.id!==t.selfId));function n(o){const l=o.trim().split(/\s+/).filter(Boolean);return l.length===0?"?":l.length===1?l[0].slice(0,2).toUpperCase():(l[0][0]+l[l.length-1][0]).toUpperCase()}function a(o){return o*47%360}function i(o){return o.file?`${o.name} · ${o.file}`:o.name}return(o,l)=>r.value.length?(Q(),ae("div",{key:0,class:"fx-presence",title:r.value.map(i).join(", ")},[L("div",J6,[(Q(!0),ae(yt,null,nr(r.value.slice(0,5),s=>(Q(),ae("span",{key:s.id,class:"fx-presence-avatar",style:Ea({backgroundColor:`hsl(${a(s.id)} 60% 45%)`}),title:i(s)},[gr(le(n(s.name))+" ",1),s.file?(Q(),ae("span",e8)):rt("",!0)],12,Q6))),128)),r.value.length>5?(Q(),ae("span",t8,"+"+le(r.value.length-5),1)):rt("",!0)]),L("span",r8,[gr(le(r.value.length===1?r.value[0].name:`${r.value.length} kişi`)+" ",1),r.value.length===1&&r.value[0].file?(Q(),ae(yt,{key:0},[l[0]||(l[0]=gr(" · ",-1)),L("span",n8,le(r.value[0].file),1)],64)):rt("",!0)])],8,Z6)):rt("",!0)}}),Jr=(e,t)=>{const r=e.__vccOpts||e;for(const[n,a]of t)r[n]=a;return r},i8=Jr(a8,[["__scopeId","data-v-592da79f"]]),o8={class:"fe-toolbar"},l8={class:"fe-toolbar__primary"},s8=["title","aria-label"],u8=["title"],c8={class:"fe-btn__label"},f8=["disabled","title","onClick"],d8={class:"fe-icon"},h8={class:"fe-btn__label"},p8=["title"],v8={class:"fe-btn__label"},m8={class:"fe-toolbar__search-group"},g8={class:"fe-search"},b8=["placeholder","value"],y8=["title"],x8=["title"],_8={class:"fe-toolbar__view",role:"tablist","aria-label":"View"},w8=["aria-selected","title"],k8=["aria-selected","title"],S8=qt({__name:"Toolbar",props:{viewMode:{},searchQuery:{},trashActive:{type:Boolean},actions:{},selectionMode:{},pasteEnabled:{type:Boolean},convertEnabled:{type:Boolean},canGoUp:{type:Boolean},atVirtualRoot:{type:Boolean},canWrite:{type:Boolean},locale:{}},emits:["update:viewMode","update:searchQuery","new-folder","upload","refresh","go-up","action","open-recents"],setup(e,{expose:t,emit:r}){const n=e,a=r,{t:i}=In(()=>n.locale),o=he(null),l=he(n.searchQuery);tr(()=>n.searchQuery,y=>{l.value=y});let s;function u(y){const p=y.target.value;l.value=p,s&&clearTimeout(s),s=setTimeout(()=>a("update:searchQuery",p),200)}function c(){var y,p;(y=o.value)==null||y.focus(),(p=o.value)==null||p.select()}t({focusSearch:c});const f=gt(()=>n.selectionMode??"none"),d=gt(()=>n.actions.filter(y=>!y.divider&&!y.hidden));function h(y){a("action",y)}return(y,p)=>(Q(),ae("div",o8,[L("div",l8,[e.canGoUp?(Q(),ae("button",{key:0,type:"button",class:"fe-btn fe-btn--icon-only",title:Qe(i)("toolbar.go_up"),"aria-label":Qe(i)("toolbar.go_up"),onClick:p[0]||(p[0]=x=>a("go-up"))},[...p[7]||(p[7]=[L("span",{class:"fe-icon"},"↑",-1)])],8,s8)):rt("",!0),f.value==="none"&&!e.trashActive&&!e.atVirtualRoot&&e.canWrite!==!1?(Q(),ae("button",{key:1,type:"button",class:"fe-btn fe-btn--primary",title:Qe(i)("toolbar.new_folder"),onClick:p[1]||(p[1]=x=>a("new-folder"))},[p[8]||(p[8]=L("span",{class:"fe-icon"},"📁",-1)),L("span",c8,le(Qe(i)("toolbar.new_folder")),1)],8,u8)):rt("",!0),(Q(!0),ae(yt,null,nr(d.value,x=>(Q(),ae("button",{key:x.key,type:"button",class:Xt(["fe-btn",{"fe-btn--danger":x.danger,"is-disabled":x.disabled}]),disabled:x.disabled,title:x.label,onClick:g=>h(x.key)},[L("span",d8,le(x.icon),1),L("span",h8,le(x.label),1)],10,f8))),128)),e.pasteEnabled&&f.value==="none"&&!e.trashActive&&!e.atVirtualRoot&&e.canWrite!==!1?(Q(),ae("button",{key:2,type:"button",class:"fe-btn",title:Qe(i)("ctx.paste"),onClick:p[2]||(p[2]=x=>h("paste"))},[p[9]||(p[9]=L("span",{class:"fe-icon"},"📋",-1)),L("span",v8,le(Qe(i)("ctx.paste")),1)],8,p8)):rt("",!0)]),p[14]||(p[14]=L("div",{class:"fe-toolbar__spacer"},null,-1)),L("div",m8,[L("div",g8,[L("input",{ref_key:"searchEl",ref:o,type:"search",class:"fe-search__input",placeholder:Qe(i)("toolbar.search.placeholder"),value:l.value,"aria-label":"Search",onInput:u},null,40,b8)]),!e.atVirtualRoot&&e.canWrite!==!1?(Q(),ae("button",{key:0,type:"button",class:"fe-btn fe-btn--icon-only",title:Qe(i)("toolbar.upload"),onClick:p[3]||(p[3]=x=>a("upload"))},[...p[10]||(p[10]=[L("span",{class:"fe-icon"},"⬆",-1)])],8,y8)):rt("",!0),L("button",{type:"button",class:"fe-btn fe-btn--icon-only",title:Qe(i)("toolbar.refresh"),onClick:p[4]||(p[4]=x=>a("refresh"))},[...p[11]||(p[11]=[L("span",{class:"fe-icon"},"↻",-1)])],8,x8)]),L("div",_8,[L("button",{type:"button",class:Xt(["fe-btn fe-btn--icon-only",{"is-active":e.viewMode==="list"}]),role:"tab","aria-selected":e.viewMode==="list",title:Qe(i)("toolbar.view.list"),onClick:p[5]||(p[5]=x=>a("update:viewMode","list"))},[...p[12]||(p[12]=[L("span",{class:"fe-icon"},"☰",-1)])],10,w8),L("button",{type:"button",class:Xt(["fe-btn fe-btn--icon-only",{"is-active":e.viewMode==="grid"}]),role:"tab","aria-selected":e.viewMode==="grid",title:Qe(i)("toolbar.view.grid"),onClick:p[6]||(p[6]=x=>a("update:viewMode","grid"))},[...p[13]||(p[13]=[L("span",{class:"fe-icon"},"▦",-1)])],10,k8)])]))}}),C8=["onClick"],A8=Jr(qt({__name:"TagPicker",props:{nodeId:{},apiBase:{},authHeaders:{type:Function},palette:{}},emits:["change","error"],setup(e,{emit:t}){const r=e,n=t,a=he([]),i=he(!1),o=he(!1),l=he(""),s=gt(()=>r.palette??["#ef4444","#f59e0b","#10b981","#3b82f6","#8b5cf6","#ec4899","#14b8a6","#f97316"]);function u(p){let x=0;for(let m=0;m<p.length;m++)x=x*31+p.charCodeAt(m)|0;const g=s.value;return g[Math.abs(x)%g.length]}async function c(p={}){return{...await(r.authHeaders??(()=>({})))(),...p}}async function f(){i.value=!0;try{const p=r.apiBase??"",x=await fetch(`${p}/api/files/manager/tags?node_id=${r.nodeId}`,{headers:await c(),credentials:"include"});if(x.ok){const g=await x.json();a.value=Array.isArray(g.tags)?g.tags:[]}}catch(p){n("error",p instanceof Error?p.message:String(p))}finally{i.value=!1}}async function d(p){const x=[...a.value];a.value=p;try{const g=r.apiBase??"",m=await fetch(`${g}/api/files/manager/tags`,{method:"POST",headers:await c({"Content-Type":"application/json"}),credentials:"include",body:JSON.stringify({node_id:r.nodeId,tags:p})});if(!m.ok)throw new Error(`tag save failed: ${m.status}`);n("change",p)}catch(g){a.value=x,n("error",g instanceof Error?g.message:String(g))}}function h(){const p=l.value.trim();if(!p||a.value.includes(p)){l.value="",o.value=!1;return}d([...a.value,p]),l.value="",o.value=!1}function y(p){d(a.value.filter(x=>x!==p))}return pr(f),tr(()=>r.nodeId,f),(p,x)=>(Q(),ae("div",{class:Xt(["filex-tag-picker",{"is-loading":i.value}])},[(Q(!0),ae(yt,null,nr(a.value,g=>(Q(),ae("span",{key:g,class:"filex-tag",style:Ea({"--filex-tag-color":u(g)})},[gr(le(g)+" ",1),L("button",{class:"filex-tag-x",type:"button",onClick:m=>y(g),"aria-label":"Remove tag"},"×",8,C8)],4))),128)),o.value?(Q(),ae("form",{key:0,class:"filex-tag-add",onSubmit:vr(h,["prevent"])},[rr(L("input",{"onUpdate:modelValue":x[0]||(x[0]=g=>l.value=g),autofocus:"",placeholder:"tag name",onBlur:h,onKeydown:x[1]||(x[1]=pa(g=>{o.value=!1,l.value=""},["escape"]))},null,544),[[sn,l.value]])],32)):(Q(),ae("button",{key:1,class:"filex-tag-add-btn",type:"button",onClick:x[2]||(x[2]=g=>o.value=!0)},"+ Add tag"))],2))}}),[["__scopeId","data-v-f2104118"]]),E8={class:"filex-recent"},T8=["disabled"],M8={key:0},D8=["onClick"],I8={class:"filex-recent-name"},z8={class:"filex-recent-meta"},F8={key:1,class:"filex-recent-empty"},O8={key:2,class:"filex-recent-empty"},P8=Jr(qt({__name:"RecentlyOpened",props:{apiBase:{},authHeaders:{type:Function},limit:{},refreshKey:{}},emits:["open","error"],setup(e,{emit:t}){const r=e,n=t,a=he([]),i=he(!1);async function o(){i.value=!0;try{const s=await(r.authHeaders??(()=>({})))(),u=r.apiBase??"",c=r.limit??20,f=await fetch(`${u}/api/files/manager/recent?limit=${c}`,{headers:s,credentials:"include"});if(f.ok){const d=await f.json();a.value=Array.isArray(d.entries)?d.entries:Array.isArray(d)?d:[]}}catch(s){n("error",s instanceof Error?s.message:String(s))}finally{i.value=!1}}function l(s){if(!s)return"";const u=new Date(s).getTime();if(Number.isNaN(u))return"";const c=Date.now()-u;return c<6e4?"just now":c<36e5?`${Math.floor(c/6e4)}m ago`:c<864e5?`${Math.floor(c/36e5)}h ago`:`${Math.floor(c/864e5)}d ago`}return pr(o),tr(()=>r.refreshKey,o),(s,u)=>(Q(),ae("div",E8,[L("header",null,[u[0]||(u[0]=L("h3",null,"Recently opened",-1)),L("button",{class:"filex-recent-refresh",type:"button",onClick:o,disabled:i.value}," ↻ ",8,T8)]),a.value.length?(Q(),ae("ul",M8,[(Q(!0),ae(yt,null,nr(a.value,c=>(Q(),ae("li",{key:c.id},[L("button",{type:"button",onClick:f=>n("open",c),class:"filex-recent-item"},[L("span",I8,le(c.name),1),L("span",z8,le(l(c.last_opened)),1)],8,D8)]))),128))])):i.value?(Q(),ae("p",O8,"Loading…")):(Q(),ae("p",F8,"Nothing here yet."))]))}}),[["__scopeId","data-v-ff50baed"]]),R8={class:"fe-breadcrumb","aria-label":"Breadcrumb"},L8=["aria-current","onClick","onContextmenu","onDrop"],B8={key:0,class:"fe-breadcrumb__sep","aria-hidden":"true"},N8=["title","aria-label"],$8=["placeholder","onKeydown"],U8=qt({__name:"Breadcrumb",props:{dirname:{},adapter:{},rootLabel:{},locale:{},multiStorageRoot:{type:Boolean},rootPath:{}},emits:["navigate","copy-path","crumb-context","crumb-drop"],setup(e,{emit:t}){const r=e,n=gt(()=>{if(!r.rootPath)return"";const m=r.rootPath,b=m.indexOf("://");return(b>=0?m.slice(b+3):m).replace(/^\/+|\/+$/g,"")}),a=gt(()=>{const m=n.value;if(!m)return r.rootLabel||r.adapter;const b=m.split("/");return b[b.length-1]||r.rootLabel||r.adapter}),{t:i}=In(()=>r.locale),o=t,l=gt(()=>{const m=`${r.adapter}://`,b=r.dirname.startsWith(m)?r.dirname.slice(m.length):r.dirname,v=b.split("/").filter(Boolean),S=[];if(r.rootPath){const A=n.value,_=b.replace(/^\/+|\/+$/g,""),E=A&&(_===A||_.startsWith(A+"/"))?_.slice(A.length).replace(/^\/+/,""):"";S.push({label:a.value,adapterPath:r.rootPath});let M=A;for(const z of E.split("/").filter(Boolean))M=M?`${M}/${z}`:z,S.push({label:z===".trash"?i("node.trash"):z,adapterPath:`${m}${M}`});return S}r.multiStorageRoot?(S.push({label:"/",adapterPath:""}),r.adapter&&S.push({label:r.rootLabel||r.adapter,adapterPath:m})):S.push({label:r.rootLabel||r.adapter,adapterPath:m});let C="";for(const A of v){C=C?`${C}/${A}`:A;const _=A===".trash"?i("node.trash"):A;S.push({label:_,adapterPath:`${m}${C}`})}return S});function s(m){o("navigate",m.adapterPath)}function u(m,b){m.preventDefault(),m.stopPropagation(),o("crumb-context",{x:m.clientX,y:m.clientY,adapterPath:b.adapterPath,label:b.label})}function c(m){var b;(b=m.dataTransfer)!=null&&b.types.includes("application/x-brf-files")&&(m.preventDefault(),m.stopPropagation(),m.dataTransfer&&(m.dataTransfer.dropEffect="move"))}function f(m,b){var v;(v=m.dataTransfer)!=null&&v.types.includes("application/x-brf-files")&&(m.preventDefault(),m.stopPropagation(),o("crumb-drop",b.adapterPath,m))}const d=he(!1),h=he(""),y=he(null);function p(){const m=`${r.adapter}://`,b=r.dirname.startsWith(m)?r.dirname.slice(m.length):r.dirname;if(r.rootPath){const v=n.value,S=b.replace(/^\/+|\/+$/g,""),C=v&&(S===v||S.startsWith(v+"/"))?S.slice(v.length).replace(/^\/+/,""):"";h.value=C?`/${C}`:"/",d.value=!0,za(()=>{var A,_;(A=y.value)==null||A.focus(),(_=y.value)==null||_.select()});return}if(r.multiStorageRoot)if(!r.adapter)h.value="/";else{const v=b.replace(/^\/+|\/+$/g,"");h.value=v?`/${r.adapter}/${v}`:`/${r.adapter}`}else h.value=b;d.value=!0,za(()=>{var v,S;(v=y.value)==null||v.focus(),(S=y.value)==null||S.select()})}function x(){const m=h.value.trim();if(d.value=!1,r.rootPath){const v=m.replace(/^\/+|\/+$/g,""),S=n.value,C=v?S?`${S}/${v}`:v:S;o("navigate",C?`${r.adapter}://${C}`:`${r.adapter}://`);return}if(r.multiStorageRoot){const v=m.replace(/^\/+|\/+$/g,"");if(!v){o("navigate","");return}const S=v.indexOf("/"),C=S===-1?v:v.slice(0,S),A=S===-1?"":v.slice(S+1);o("navigate",A?`${C}://${A}`:`${C}://`);return}const b=m.replace(/^\/+|\/+$/g,"");b&&o("navigate",`${r.adapter}://${b}`)}function g(){d.value=!1}return(m,b)=>(Q(),ae("nav",R8,[d.value?rr((Q(),ae("input",{key:1,ref_key:"pathInput",ref:y,"onUpdate:modelValue":b[0]||(b[0]=v=>h.value=v),type:"text",class:"fe-breadcrumb__input",placeholder:Qe(i)("breadcrumb.path_placeholder"),spellcheck:"false",autocomplete:"off",onKeydown:[pa(vr(x,["prevent"]),["enter"]),pa(vr(g,["prevent"]),["escape"])],onBlur:g},null,40,$8)),[[sn,h.value]]):(Q(),ae(yt,{key:0},[(Q(!0),ae(yt,null,nr(l.value,(v,S)=>(Q(),ae("button",{key:v.adapterPath,class:Xt(["fe-breadcrumb__crumb",{"is-last":S===l.value.length-1}]),type:"button","aria-current":S===l.value.length-1?"page":void 0,onClick:C=>s(v),onContextmenu:C=>u(C,v),onDragover:c,onDrop:C=>f(C,v)},[L("span",null,le(v.label),1),S<l.value.length-1?(Q(),ae("span",B8,"›")):rt("",!0)],42,L8))),128)),L("button",{type:"button",class:"fe-breadcrumb__edit",title:Qe(i)("breadcrumb.go_to_path"),"aria-label":Qe(i)("breadcrumb.go_to_path"),onClick:p},"✏",8,N8)],64))]))}}),H8=["aria-pressed","title"],j8={viewBox:"0 0 24 24",width:"16",height:"16","aria-hidden":"true"},G8=["fill"],V8={key:0,class:"filex-star-label"},q8=Jr(qt({__name:"StarButton",props:{starred:{type:Boolean},nodeId:{},apiBase:{},authHeaders:{type:Function},compact:{type:Boolean}},emits:["change","error"],setup(e,{emit:t}){const r=e,n=t,a=he(r.starred);tr(()=>r.starred,o=>{a.value=o});async function i(){const o=!a.value;a.value=o;try{const l={"Content-Type":"application/json",...await(r.authHeaders??(()=>({})))()},s=r.apiBase??"",u=await fetch(`${s}/api/files/manager/star`,{method:"POST",headers:l,credentials:"include",body:JSON.stringify({node_id:r.nodeId,starred:o})});if(!u.ok)throw new Error(`star toggle failed: ${u.status}`);n("change",o)}catch(l){a.value=!o,n("error",l instanceof Error?l.message:String(l))}}return(o,l)=>(Q(),ae("button",{type:"button",class:Xt(["filex-star-btn",{"is-starred":a.value,"is-compact":e.compact}]),"aria-pressed":a.value,title:a.value?"Unstar":"Star",onClick:vr(i,["stop"])},[(Q(),ae("svg",j8,[L("path",{fill:a.value?"currentColor":"none",stroke:"currentColor","stroke-width":"2","stroke-linejoin":"round",d:"M12 2.5l3.09 6.26 6.91 1-5 4.87 1.18 6.87L12 18.27l-6.18 3.23L7 14.63 2 9.76l6.91-1z"},null,8,G8)])),e.compact?rt("",!0):(Q(),ae("span",V8,le(a.value?"Starred":"Star"),1))],10,H8))}}),[["__scopeId","data-v-1b788147"]]),W8={class:"fe-list__head",role:"row"},K8={class:"fe-list__col fe-list__col--name",role:"columnheader"},X8={class:"fe-list__col fe-list__col--size",role:"columnheader"},Y8={class:"fe-list__col fe-list__col--mod",role:"columnheader"},Z8={class:"fe-list__body",role:"rowgroup"},J8=["onClick","onDblclick","onContextmenu","onDragstart","onDragover","onDrop","onTouchstartPassive"],Q8={class:"fe-list__col fe-list__col--name"},e7={class:"fe-list__icon","aria-hidden":"true"},t7={class:"fe-list__name-wrap"},r7=["title"],n7=["title"],a7={class:"fe-list__col fe-list__col--size"},i7={class:"fe-list__col fe-list__col--mod"},o7={key:0,class:"fe-list__empty"},l7=qt({__name:"ListView",props:{files:{},selected:{},clipped:{},showParentPath:{type:Boolean},locale:{},loading:{type:Boolean},starredIds:{},apiBase:{},authHeaders:{type:Function}},emits:["click-row","dbl-row","context-row","item-drag-start","item-drop-into","star-change"],setup(e,{emit:t}){const r=e,n=t,{t:a,formatSize:i,nodeDisplayName:o}=In(()=>r.locale);function l(C){return r.selected.has(C.path)}function s(C,A){n("click-row",C,{ctrl:A.ctrlKey||A.metaKey,shift:A.shiftKey})}function u(C){n("dbl-row",C)}function c(C,A){A.preventDefault(),A.stopPropagation(),n("context-row",C,A)}function f(C,A){n("item-drag-start",C,A)}function d(C,A){var _;C.type==="dir"&&(_=A.dataTransfer)!=null&&_.types.includes("application/x-brf-files")&&(A.preventDefault(),A.stopPropagation(),A.dataTransfer&&(A.dataTransfer.dropEffect="move"))}function h(C,A){var _;C.type==="dir"&&(_=A.dataTransfer)!=null&&_.types.includes("application/x-brf-files")&&(A.preventDefault(),A.stopPropagation(),n("item-drop-into",C,A))}let y,p=null;function x(C,A){p=C,y&&clearTimeout(y),y=setTimeout(()=>{if(p){const _=A.touches[0];n("context-row",p,{clientX:_.clientX,clientY:_.clientY,preventDefault:()=>{}})}},500)}function g(){y&&clearTimeout(y),p=null}function m(C){if(C.basename===".trash")return"🗑";if(C.mime_type==="inode/storage")return"💾";if(C.type==="dir")return"📁";const A=(C.extension||"").toLowerCase();return["jpg","jpeg","png","webp","gif","bmp","avif","heic","svg"].includes(A)?"🖼":["mp4","webm","mov","mkv","avi","ogv","m4v"].includes(A)?"🎞":["mp3","wav","flac","ogg","m4a","aac","opus"].includes(A)?"🎵":A==="pdf"?"📕":["doc","docx","odt","rtf"].includes(A)?"📄":["xls","xlsx","ods","csv"].includes(A)?"📊":["ppt","pptx","odp"].includes(A)?"📽":["zip","tar","gz","bz2","7z","rar"].includes(A)?"🗜":["txt","md","log","json","yml","yaml","xml"].includes(A)?"📝":"📎"}function b(C){return C?new Date(C*(C<1e12?1e3:1)).toLocaleString():"—"}function v(C){const A=C.replace(/^[a-z][a-z0-9+.-]*:\/\//i,""),_=A.lastIndexOf("/");return _===-1?"":A.slice(0,_)}const S=gt(()=>r.files);return(C,A)=>(Q(),ae("div",{class:Xt(["fe-list",{"is-loading":e.loading,"has-star-col":!!e.apiBase||e.apiBase===""}])},[L("div",W8,[A[1]||(A[1]=L("div",{class:"fe-list__col fe-list__col--star",role:"columnheader","aria-label":"Star"},null,-1)),L("div",K8,le(Qe(a)("col.name")),1),L("div",X8,le(Qe(a)("col.size")),1),L("div",Y8,le(Qe(a)("col.modified")),1)]),L("div",Z8,[(Q(!0),ae(yt,null,nr(S.value,_=>{var E,M;return Q(),ae("div",{key:_.path,class:Xt(["fe-list__row",{"is-selected":l(_),"is-dir":_.type==="dir","is-trash":_.trashed,"is-clipped":(E=e.clipped)==null?void 0:E.has(_.path)}]),role:"row",tabindex:"0",draggable:"true",onClick:z=>s(_,z),onDblclick:z=>u(_),onContextmenu:z=>c(_,z),onDragstart:z=>f(_,z),onDragover:z=>d(_,z),onDrop:z=>h(_,z),onTouchstartPassive:z=>x(_,z),onTouchend:g,onTouchmove:g},[L("div",{class:"fe-list__col fe-list__col--star",onClick:A[0]||(A[0]=vr(()=>{},["stop"]))},[typeof _.id=="number"&&_.type==="file"?(Q(),kr(q8,{key:0,starred:!!((M=e.starredIds)!=null&&M.has(_.id)),"node-id":_.id,"api-base":e.apiBase,"auth-headers":e.authHeaders,compact:"",onChange:z=>n("star-change",_,z)},null,8,["starred","node-id","api-base","auth-headers","onChange"])):rt("",!0)]),L("div",Q8,[L("span",e7,le(m(_)),1),L("div",t7,[L("span",{class:"fe-list__name",title:_.basename},le(Qe(o)(_)),9,r7),e.showParentPath?(Q(),ae("span",{key:0,class:"fe-list__parent",title:v(_.path)},le(v(_.path)||"—"),9,n7)):rt("",!0)])]),L("div",a7,le(Qe(i)(_.size)),1),L("div",i7,le(b(_.last_modified)),1)],42,J8)}),128)),!e.loading&&S.value.length===0?(Q(),ae("div",o7,le(Qe(a)("empty.folder")),1)):rt("",!0)])],2))}}),s7=["onClick","onDblclick","onContextmenu","onDragstart","onDragover","onDrop","onTouchstartPassive"],u7={class:"fe-grid__thumb"},c7=["src","alt"],f7={key:1,class:"fe-grid__icon"},d7=["title"],h7=["title"],p7={class:"fe-grid__meta"},v7={key:0,class:"fe-grid__empty"},m7=qt({__name:"GridView",props:{files:{},selected:{},clipped:{},showParentPath:{type:Boolean},locale:{},loading:{type:Boolean}},emits:["click-card","dbl-card","context-card","item-drag-start","item-drop-into"],setup(e,{emit:t}){const r=e,n=t,{t:a,formatSize:i,nodeDisplayName:o}=In(()=>r.locale);function l(v){return r.selected.has(v.path)}function s(v,S){n("click-card",v,{ctrl:S.ctrlKey||S.metaKey,shift:S.shiftKey})}function u(v){n("dbl-card",v)}function c(v,S){S.preventDefault(),S.stopPropagation(),n("context-card",v,S)}function f(v,S){n("item-drag-start",v,S)}function d(v,S){var C;v.type==="dir"&&(C=S.dataTransfer)!=null&&C.types.includes("application/x-brf-files")&&(S.preventDefault(),S.stopPropagation(),S.dataTransfer&&(S.dataTransfer.dropEffect="move"))}function h(v,S){var C;v.type==="dir"&&(C=S.dataTransfer)!=null&&C.types.includes("application/x-brf-files")&&(S.preventDefault(),S.stopPropagation(),n("item-drop-into",v,S))}let y,p=null;function x(v,S){p=v,y&&clearTimeout(y),y=setTimeout(()=>{if(p){const C=S.touches[0];n("context-card",p,{clientX:C.clientX,clientY:C.clientY,preventDefault:()=>{}})}},500)}function g(){y&&clearTimeout(y),p=null}function m(v){const S=v.replace(/^[a-z][a-z0-9+.-]*:\/\//i,""),C=S.lastIndexOf("/");return C===-1?"":S.slice(0,C)}function b(v){if(v.basename===".trash")return"🗑";if(v.mime_type==="inode/storage")return"💾";if(v.type==="dir")return"📁";const S=(v.extension||"").toLowerCase();return["jpg","jpeg","png","webp","gif","bmp","svg"].includes(S)?"🖼":["mp4","webm","mov","mkv"].includes(S)?"🎞":["mp3","wav","flac","ogg"].includes(S)?"🎵":S==="pdf"?"📕":["doc","docx","odt"].includes(S)?"📄":["xls","xlsx","csv"].includes(S)?"📊":["ppt","pptx"].includes(S)?"📽":["zip","tar","gz","7z"].includes(S)?"🗜":"📎"}return(v,S)=>(Q(),ae("div",{class:Xt(["fe-grid",{"is-loading":e.loading}])},[(Q(!0),ae(yt,null,nr(e.files,C=>{var A;return Q(),ae("div",{key:C.path,class:Xt(["fe-grid__card",{"is-selected":l(C),"is-dir":C.type==="dir","is-trash":C.trashed,"is-clipped":(A=e.clipped)==null?void 0:A.has(C.path)}]),tabindex:"0",draggable:"true",onClick:_=>s(C,_),onDblclick:_=>u(C),onContextmenu:_=>c(C,_),onDragstart:_=>f(C,_),onDragover:_=>d(C,_),onDrop:_=>h(C,_),onTouchstartPassive:_=>x(C,_),onTouchend:g,onTouchmove:g},[L("div",u7,[C.thumb_url?(Q(),ae("img",{key:0,src:C.thumb_url,alt:C.basename,loading:"lazy",draggable:"false"},null,8,c7)):(Q(),ae("span",f7,le(b(C)),1))]),L("div",{class:"fe-grid__label",title:C.basename},le(Qe(o)(C)),9,d7),e.showParentPath?(Q(),ae("div",{key:0,class:"fe-grid__parent",title:m(C.path)},le(m(C.path)||"—"),9,h7)):rt("",!0),L("div",p7,le(Qe(i)(C.size)),1)],42,s7)}),128)),!e.loading&&e.files.length===0?(Q(),ae("div",v7,le(Qe(a)("empty.folder")),1)):rt("",!0)],2))}}),g7=["data-prefers-dark"],b7={key:0,class:"fe-ctx__sep"},y7=["disabled","onClick"],x7={key:0,class:"fe-ctx__icon","aria-hidden":"true"},_7={class:"fe-ctx__label"},w7=qt({__name:"ContextMenu",props:{locale:{},actions:{},theme:{}},emits:["select"],setup(e,{expose:t,emit:r}){const n=e,a=r,i=he(!1),o=he(0),l=he(0),s=he([]),u=he(null);async function c(v,S){i.value=!0,o.value=v.clientX,l.value=v.clientY,s.value=S,await za(),f()}function f(){const v=u.value;if(!v||typeof window>"u")return;const S=v.getBoundingClientRect(),C=8,A=window.innerWidth,_=window.innerHeight;l.value+S.height>_-C&&(l.value=Math.max(C,_-S.height-C)),o.value+S.width>A-C&&(o.value=Math.max(C,A-S.width-C))}function d(){i.value=!1}function h(v){v.disabled||(a("select",v,s.value),d())}function y(v){v.key==="Escape"&&d()}const p=gt(()=>n.actions.filter(v=>!v.hidden)),x=he(!1);let g;function m(v){x.value=!!(v&&"matches"in v&&v.matches)}pr(()=>{var v;typeof window>"u"||(g=window.matchMedia("(prefers-color-scheme: dark)"),m(g),(v=g.addEventListener)==null||v.call(g,"change",m))}),Br(()=>{var v;(v=g==null?void 0:g.removeEventListener)==null||v.call(g,"change",m)});const b=gt(()=>`fe-ctx-backdrop--theme-${n.theme||"auto"}`);return t({show:c,hide:d}),(v,S)=>(Q(),kr(Zb,{to:"body"},[Bt(po,{name:"fe-ctx"},{default:Tr(()=>[i.value?(Q(),ae("div",{key:0,class:Xt(["fe-ctx-backdrop",b.value]),"data-prefers-dark":x.value?"1":"0",onClick:d,onContextmenu:vr(d,["prevent"]),onKeydown:y},[L("div",{ref_key:"menuEl",ref:u,class:"fe-ctx",role:"menu",style:Ea({top:l.value+"px",left:o.value+"px"}),onClick:S[0]||(S[0]=vr(()=>{},["stop"]))},[(Q(!0),ae(yt,null,nr(p.value,(C,A)=>(Q(),ae(yt,{key:C.key||A},[C.divider?(Q(),ae("div",b7)):(Q(),ae("button",{key:1,type:"button",class:Xt(["fe-ctx__item",{"is-danger":C.danger,"is-disabled":C.disabled}]),disabled:C.disabled,role:"menuitem",onClick:_=>h(C)},[C.icon?(Q(),ae("span",x7,le(C.icon),1)):rt("",!0),L("span",_7,le(C.label),1)],10,y7))],64))),128))],4)],42,g7)):rt("",!0)]),_:1})]))}}),k7={key:0,class:"fe-upload"},S7={class:"fe-upload__header"},C7={class:"fe-upload__count"},A7={class:"fe-upload__list"},E7=["title"],T7=["aria-valuenow"],M7={class:"fe-upload__meta"},D7=["onClick"],I7=["onClick"],z7=qt({__name:"UploadProgress",props:{jobs:{},locale:{}},emits:["cancel","dismiss"],setup(e,{emit:t}){const r=e,n=t,{t:a,formatSize:i}=In(()=>r.locale),o=gt(()=>r.jobs);function l(s){switch(s.status){case"done":return a("upload.done");case"error":return`${a("upload.error")}: ${s.error??""}`;case"aborted":return a("upload.aborted");default:return a("upload.progress")}}return(s,u)=>(Q(),kr(po,{name:"fe-upload-slide"},{default:Tr(()=>[o.value.length>0?(Q(),ae("div",k7,[L("div",S7,[L("strong",null,le(Qe(a)("upload.progress")),1),L("span",C7,le(o.value.length),1)]),L("ul",A7,[(Q(!0),ae(yt,null,nr(o.value,c=>(Q(),ae("li",{key:c.id,class:Xt(["fe-upload__item",`is-${c.status}`])},[L("div",{class:"fe-upload__name",title:c.file.name},le(c.file.name),9,E7),L("div",{class:"fe-upload__bar","aria-valuenow":c.percent,role:"progressbar"},[L("div",{class:"fe-upload__bar-fill",style:Ea({width:c.percent+"%"})},null,4)],8,T7),L("div",M7,[L("span",null,le(l(c)),1),L("span",null,le(Qe(i)(c.uploadedBytes))+" / "+le(Qe(i)(c.totalBytes)),1),c.status==="uploading"||c.status==="initializing"?(Q(),ae("button",{key:0,type:"button",class:"fe-upload__cancel",onClick:f=>n("cancel",c)},le(Qe(a)("upload.cancel")),9,D7)):(Q(),ae("button",{key:1,type:"button",class:"fe-upload__cancel",onClick:f=>n("dismiss",c)},"×",8,I7))])],2))),128))])])):rt("",!0)]),_:1}))}}),F7={class:"fe-ops__row"},O7=["title"],P7=["onClick"],R7={class:"fe-ops__bar"},L7={key:0,class:"fe-ops__error"},B7=qt({__name:"PendingOpsTray",props:{ops:{},locale:{}},emits:["dismiss"],setup(e,{emit:t}){const r=e,n=t,{t:a}=In(()=>r.locale),i=gt(()=>[...r.ops].sort((u,c)=>c.id-u.id));function o(u){return u.status==="done"?100:u.progress_total<=0?0:Math.min(100,Math.round(u.progress_done/u.progress_total*100))}function l(u){return u.status==="done"?"is-done":u.status==="error"?"is-error":""}function s(u){const c=u.op_type==="copy"?a("ops.copy"):u.op_type==="move"?a("ops.move"):a("ops.delete");return u.status==="pending"?`${c} (${a("ops.queued")})`:u.status==="running"?`${c} ${u.progress_done}/${u.progress_total}`:u.status==="done"?`${c} ${a("ops.done")} (${u.progress_total})`:u.status==="error"?`${c} ${a("ops.error")}`:c}return(u,c)=>i.value.length>0?(Q(),kr(x6,{key:0,name:"fe-ops-slide",tag:"div",class:"fe-ops",role:"status","aria-live":"polite"},{default:Tr(()=>[(Q(!0),ae(yt,null,nr(i.value,f=>(Q(),ae("div",{key:f.id,class:Xt(["fe-ops__item",l(f)])},[L("div",F7,[L("span",{class:"fe-ops__title",title:f.target_path||f.source_dir||""},le(s(f)),9,O7),f.status==="done"||f.status==="error"?(Q(),ae("button",{key:0,type:"button",class:"fe-ops__dismiss","aria-label":"Dismiss",onClick:d=>n("dismiss",f.id)},"×",8,P7)):rt("",!0)]),L("div",R7,[L("div",{class:"fe-ops__bar-fill",style:Ea({width:o(f)+"%"})},null,4)]),f.status==="error"&&f.error_message?(Q(),ae("div",L7,le(f.error_message),1)):rt("",!0)],2))),128))]),_:1})):rt("",!0)}}),N7={key:0,class:"fe-modal__head"},$7={class:"fe-modal__title"},U7={class:"fe-modal__body"},H7={key:1,class:"fe-modal__actions"},Al=qt({__name:"Modal",props:{open:{type:Boolean},title:{},size:{},closeOnBackdrop:{type:Boolean},chromeless:{type:Boolean},theme:{}},emits:["close"],setup(e,{emit:t}){const r=e,n=t,a=he(null);tr(()=>r.open,l=>{l?(document.addEventListener("keydown",i),setTimeout(()=>{var u;const s=(u=a.value)==null?void 0:u.querySelector('input,select,textarea,button,[tabindex]:not([tabindex="-1"])');s==null||s.focus()},30)):document.removeEventListener("keydown",i)}),Br(()=>document.removeEventListener("keydown",i));function i(l){l.key==="Escape"&&n("close")}function o(){r.closeOnBackdrop!==!1&&n("close")}return(l,s)=>(Q(),kr(po,{name:"fe-modal"},{default:Tr(()=>[e.open?(Q(),ae("div",{key:0,class:Xt(["fe fe-modal__backdrop",[{"fe-modal__backdrop--chromeless":e.chromeless},e.theme==="light"?"fe--theme-light":"",e.theme==="dark"?"fe--theme-dark":""]]),role:"presentation",onClick:o},[L("div",{ref_key:"cardEl",ref:a,class:Xt(["fe-modal__card",[`fe-modal__card--${e.size||"md"}`,e.chromeless&&"fe-modal__card--chromeless"]]),role:"dialog","aria-modal":"true",onClick:s[1]||(s[1]=vr(()=>{},["stop"]))},[e.title&&!e.chromeless?(Q(),ae("header",N7,[L("h2",$7,le(e.title),1),L("button",{type:"button",class:"fe-modal__close","aria-label":"Close",onClick:s[0]||(s[0]=u=>n("close"))},"×")])):rt("",!0),L("div",U7,[j1(l.$slots,"default")]),l.$slots.actions&&!e.chromeless?(Q(),ae("footer",H7,[j1(l.$slots,"actions")])):rt("",!0)],2)],2)):rt("",!0)]),_:3}))}}),j7=["placeholder","onKeydown"],G7={key:0,class:"fe-form__error"},V7=qt({__name:"NewFolderModal",props:{open:{type:Boolean},locale:{}},emits:["close","submit"],setup(e,{emit:t}){const r=e,n=t,{t:a}=In(()=>r.locale),i=he(""),o=he(null);tr(()=>r.open,s=>{s&&(i.value="",o.value=null)});function l(){const s=i.value.trim();if(!s){o.value=a("modal.newfolder.placeholder");return}if(/[\\/]/.test(s)||s==="."||s===".."){o.value="Geçersiz karakter";return}n("submit",s)}return(s,u)=>(Q(),kr(Al,{open:e.open,title:Qe(a)("modal.newfolder.title"),size:"sm",onClose:u[2]||(u[2]=c=>n("close"))},{actions:Tr(()=>[L("button",{type:"button",class:"fe-btn",onClick:u[1]||(u[1]=c=>n("close"))},le(Qe(a)("modal.newfolder.cancel")),1),L("button",{type:"button",class:"fe-btn fe-btn--primary",onClick:l},le(Qe(a)("modal.newfolder.create")),1)]),default:Tr(()=>[L("form",{onSubmit:vr(l,["prevent"])},[rr(L("input",{"onUpdate:modelValue":u[0]||(u[0]=c=>i.value=c),type:"text",class:"fe-input",placeholder:Qe(a)("modal.newfolder.placeholder"),autocomplete:"off",onKeydown:pa(vr(l,["prevent"]),["enter"])},null,40,j7),[[sn,i.value]]),o.value?(Q(),ae("p",G7,le(o.value),1)):rt("",!0)],32)]),_:1},8,["open","title"]))}}),q7=["onKeydown"],W7=qt({__name:"RenameModal",props:{open:{type:Boolean},locale:{},currentName:{}},emits:["close","submit"],setup(e,{emit:t}){const r=e,n=t,{t:a}=In(()=>r.locale),i=he("");tr(()=>[r.open,r.currentName],([l,s])=>{l&&(i.value=s)});function o(){const l=i.value.trim();l&&(/[\\/]/.test(l)||l==="."||l===".."||n("submit",l))}return(l,s)=>(Q(),kr(Al,{open:e.open,title:Qe(a)("modal.rename.title"),size:"sm",onClose:s[2]||(s[2]=u=>n("close"))},{actions:Tr(()=>[L("button",{type:"button",class:"fe-btn",onClick:s[1]||(s[1]=u=>n("close"))},le(Qe(a)("modal.rename.cancel")),1),L("button",{type:"button",class:"fe-btn fe-btn--primary",onClick:o},le(Qe(a)("modal.rename.save")),1)]),default:Tr(()=>[L("form",{onSubmit:vr(o,["prevent"])},[rr(L("input",{"onUpdate:modelValue":s[0]||(s[0]=u=>i.value=u),type:"text",class:"fe-input",autocomplete:"off",onKeydown:pa(vr(o,["prevent"]),["enter"])},null,40,q7),[[sn,i.value]])],32)]),_:1},8,["open","title"]))}}),K7=qt({__name:"DeleteConfirmModal",props:{open:{type:Boolean},locale:{},count:{}},emits:["close","confirm"],setup(e,{emit:t}){const r=e,n=t,{t:a}=In(()=>r.locale);return(i,o)=>(Q(),kr(Al,{open:e.open,title:Qe(a)("modal.delete.title"),size:"sm",onClose:o[2]||(o[2]=l=>n("close"))},{actions:Tr(()=>[L("button",{type:"button",class:"fe-btn",onClick:o[0]||(o[0]=l=>n("close"))},le(Qe(a)("modal.delete.cancel")),1),L("button",{type:"button",class:"fe-btn fe-btn--danger",onClick:o[1]||(o[1]=l=>n("confirm"))},le(Qe(a)("modal.delete.confirm")),1)]),default:Tr(()=>[L("p",null,le(Qe(a)("modal.delete.message",{count:e.count})),1)]),_:1},8,["open","title"]))}}),X7={class:"fe-form__row"},Y7={class:"fe-form__row fe-form__row--stack"},Z7={class:"fe-form__row fe-form__row--stack"},J7={key:1,class:"fe-share-result"},Q7={class:"fe-share-result__row"},ey={class:"fe-share-result__copy"},ty=["value"],ry={key:0,class:"fe-share-result__row"},ny={class:"fe-share-result__copy"},ay=["value"],iy={class:"fe-share-result__row"},oy={class:"fe-share-result__copy"},ly=["value"],sy=qt({__name:"ShareModal",props:{open:{type:Boolean},locale:{},share:{}},emits:["close","submit","toast"],setup(e,{emit:t}){const r=e,n=t,{t:a}=In(()=>r.locale),i=he(!1),o=he(""),l=he("");tr(()=>r.open,d=>{d&&(i.value=!1,o.value="",l.value="")});function s(){n("submit",{password:i.value,expires_at:o.value?new Date(o.value).toISOString():null,max_downloads:l.value?Number(l.value):null})}async function u(d,h){try{await navigator.clipboard.writeText(d),n("toast",h)}catch{}}function c(d){return`'${d.replace(/'/g,"'\\''")}'`}const f=gt(()=>{const d=r.share;if(!d)return"";let h=d.url;return d.password_pin&&(h+=(h.includes("?")?"&":"?")+"pin="+encodeURIComponent(d.password_pin)),`curl -fSL ${d.filename?`-o ${c(d.filename)} `:"-OJ "}${c(h)}`});return(d,h)=>(Q(),kr(Al,{open:e.open,title:Qe(a)("modal.share.title"),size:"md",onClose:h[7]||(h[7]=y=>n("close"))},{actions:Tr(()=>[L("button",{type:"button",class:"fe-btn",onClick:h[6]||(h[6]=y=>n("close"))},le(e.share?"Kapat":Qe(a)("modal.share.cancel")),1),e.share?rt("",!0):(Q(),ae("button",{key:0,type:"button",class:"fe-btn fe-btn--primary",onClick:s},le(Qe(a)("modal.share.create")),1))]),default:Tr(()=>[e.share?(Q(),ae("div",J7,[L("div",Q7,[h[8]||(h[8]=L("label",null,"Link",-1)),L("div",ey,[L("input",{value:e.share.url,readonly:"",class:"fe-input"},null,8,ty),L("button",{type:"button",class:"fe-btn",onClick:h[3]||(h[3]=y=>u(e.share.url,Qe(a)("modal.share.url_copied")))},le(Qe(a)("modal.share.copy")),1)])]),e.share.password_pin?(Q(),ae("div",ry,[h[9]||(h[9]=L("label",null,"PIN",-1)),L("div",ny,[L("input",{value:e.share.password_pin,readonly:"",class:"fe-input fe-input--mono"},null,8,ay),L("button",{type:"button",class:"fe-btn",onClick:h[4]||(h[4]=y=>u(e.share.password_pin,Qe(a)("modal.share.pin_copied")))},le(Qe(a)("modal.share.copy")),1)])])):rt("",!0),L("div",iy,[h[10]||(h[10]=L("label",null,"CLI",-1)),L("div",oy,[L("input",{value:f.value,readonly:"",class:"fe-input fe-input--mono"},null,8,ly),L("button",{type:"button",class:"fe-btn",onClick:h[5]||(h[5]=y=>u(f.value,Qe(a)("modal.share.cli_copied")))},le(Qe(a)("modal.share.copy")),1)])])])):(Q(),ae("form",{key:0,class:"fe-form",onSubmit:vr(s,["prevent"])},[L("label",X7,[rr(L("input",{"onUpdate:modelValue":h[0]||(h[0]=y=>i.value=y),type:"checkbox"},null,512),[[qs,i.value]]),L("span",null,le(Qe(a)("modal.share.pin")),1)]),L("label",Y7,[L("span",null,le(Qe(a)("modal.share.expires")),1),rr(L("input",{"onUpdate:modelValue":h[1]||(h[1]=y=>o.value=y),type:"datetime-local",class:"fe-input"},null,512),[[sn,o.value]])]),L("label",Z7,[L("span",null,le(Qe(a)("modal.share.max_downloads")),1),rr(L("input",{"onUpdate:modelValue":h[2]||(h[2]=y=>l.value=y),type:"number",min:"1",class:"fe-input"},null,512),[[sn,l.value]])])],32))]),_:1},8,["open","title"]))}}),uy={key:0,class:"fe-preview"},cy=["src","alt"],fy=["src"],dy=["src"],hy=["data"],py={class:"fe-preview__fallback"},vy=["href"],my={key:0,class:"fe-preview__fallback"},gy={key:1,class:"fe-preview__fallback"},by=["href"],yy={key:2,class:"fe-preview__md-split"},xy={class:"fe-preview__md-split-bar"},_y={key:0,class:"fe-preview__md-split-error"},wy=["disabled"],ky={class:"fe-preview__md-split-body"},Sy=["onKeydown"],Cy=["innerHTML"],Ay={key:3,class:"fe-preview__fallback"},Ey=["href"],Ty=["innerHTML"],My={key:5,class:"fe-preview__pre"},Dy={key:0,class:"fe-preview__fallback"},Iy=["href"],zy={key:1,class:"fe-preview__fallback"},Fy={key:0,class:"fe-preview__fallback"},Oy={key:1,class:"fe-preview__fallback"},Py=["href"],Ry={key:2,class:"fe-preview__fallback"},Ly=["href"],By={key:3,class:"fe-preview__code-wrap"},Ny={class:"fe-preview__code-toolbar"},$y={class:"fe-preview__code-lang"},Uy={key:0,class:"fe-preview__code-status"},Hy={key:1,class:"fe-preview__code-status fe-preview__code-status--ok"},jy=["title"],Gy={key:3,class:"fe-preview__code-status"},Vy=["disabled"],qy={key:0,class:"fe-preview__pre fe-preview__code hljs"},Wy=["innerHTML"],Ky=["data-lang"],Xy={key:0,class:"fe-preview__fallback"},Yy=["href"],Zy={key:8,class:"fe-preview__fallback"},Jy=["href"],Qy=["href"],gc=1e6,cp="fe-onlyoffice-api-js",ex=qt({__name:"PreviewModal",props:{open:{type:Boolean},locale:{},file:{},previewUrl:{type:Function},downloadUrl:{type:Function},onlyOfficeBase:{},onlyOfficeConfigEndpoint:{},saveTextEndpoint:{},openMode:{},authHeaders:{type:Function},authCredentials:{},drawioUrl:{},pdfWorkerUrl:{},pdfSaveUrl:{},viewerBaseUrl:{},chromeless:{type:Boolean},theme:{}},emits:["close"],setup(e,{emit:t}){const r=e,n=t,{t:a}=In(()=>r.locale);function i(Me){return((Me==null?void 0:Me.extension)||"").toLowerCase()}const o=["jpg","jpeg","png","webp","gif","bmp","avif","svg","heic"],l=["mp4","webm","mov","mkv","m4v","ogv"],s=["mp3","wav","ogg","flac","m4a","aac","opus"],u={md:"markdown",markdown:"markdown",txt:"plaintext",log:"plaintext",js:"javascript",mjs:"javascript",cjs:"javascript",ts:"typescript",tsx:"typescript",jsx:"javascript",vue:"xml",svelte:"xml",html:"xml",htm:"xml",xml:"xml",svg:"xml",css:"css",scss:"scss",sass:"scss",less:"less",json:"json",jsonc:"json",yml:"yaml",yaml:"yaml",php:"php",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",kt:"kotlin",swift:"swift",cpp:"cpp",c:"c",h:"cpp",hpp:"cpp",cs:"csharp",dart:"dart",sh:"bash",bash:"bash",zsh:"bash",fish:"bash",sql:"sql",toml:"ini",ini:"ini",conf:"ini",env:"bash",cfg:"ini",dockerfile:"dockerfile",graphql:"graphql",gql:"graphql",diff:"diff",patch:"diff"},c=["txt","log"],f=["docx","doc","xlsx","xls","pptx","ppt","odt","ods","odp","rtf"],d={glb:()=>Promise.resolve().then(()=>mo),gltf:()=>Promise.resolve().then(()=>mo),obj:()=>Promise.resolve().then(()=>mo),stl:()=>Promise.resolve().then(()=>mo),fbx:()=>Promise.resolve().then(()=>mo),"3ds":()=>Promise.resolve().then(()=>mo),epub:()=>Promise.resolve().then(()=>Ew),mmd:()=>Promise.resolve().then(()=>gp),mermaid:()=>Promise.resolve().then(()=>gp),drawio:()=>Promise.resolve().then(()=>bp),dio:()=>Promise.resolve().then(()=>bp),tif:()=>Promise.resolve().then(()=>yp),tiff:()=>Promise.resolve().then(()=>yp),psd:()=>Promise.resolve().then(()=>qw),ipynb:()=>Promise.resolve().then(()=>c9),csv:()=>Promise.resolve().then(()=>_p),tsv:()=>Promise.resolve().then(()=>_p),zip:()=>Promise.resolve().then(()=>z9)},h=gt(()=>{const Me=i(r.file);if(!Me)return"other";if(o.includes(Me))return"image";if(l.includes(Me))return"video";if(s.includes(Me))return"audio";if(Me==="pdf")return"pdf";const D=r.openMode!=="view";return Me==="md"||Me==="markdown"?"markdown":Me in u?"code":Me in d?"viewer":f.includes(Me)?"office":c.includes(Me)?D?"code":"text":"other"}),y=Tb(null),p=he(null),x=he(!1);async function g(Me){y.value=null,p.value=null;const D=d[Me];if(D)try{const ue=await D();y.value=ue.default??ue}catch(ue){p.value=ue instanceof Error?ue.message:"viewer load failed",Me==="pdf"&&(x.value=!0)}}function m(){x.value=!0}const b=gt(()=>{var ue;const Me=i(r.file),D={url:E.value,ext:Me,mime:(ue=r.file)==null?void 0:ue.mime_type,t:a,authHeaders:r.authHeaders,authCredentials:r.authCredentials};return r.file&&(D.filePath=z(r.file.path),(Me==="zip"||Me==="rar"||Me==="7z"||Me==="tar"||Me==="gz"||Me==="tgz")&&(D.filePath=r.file.path)),(Me==="drawio"||Me==="dio")&&(D.drawioUrl=r.drawioUrl??void 0,D.saveUrl=r.saveTextEndpoint??void 0,D.readOnly=r.openMode==="view"),Me==="pdf"&&(D.pdfWorkerUrl=r.pdfWorkerUrl??void 0,D.pdfSaveUrl=r.pdfSaveUrl??void 0),D});function v(){C(r.openMode||"edit")}function S(){C("edit")}function C(Me){if(!r.file)return;const D=i(r.file),ue=r.viewerBaseUrl||"/files/edit",ke=ue.includes("?")?"&":"?",ze=`${ue}${ke}path=${encodeURIComponent(r.file.path)}&type=${encodeURIComponent(D)}&mode=${encodeURIComponent(Me)}`;window.open(ze,"_blank","noopener")}const A=new Set(["docx","doc","xlsx","xls","pptx","ppt","odt","ods","odp","rtf","drawio","dio","mmd","mermaid","md","markdown","txt","log","json","jsonc","yaml","yml","xml","svg","html","htm","js","mjs","cjs","ts","tsx","jsx","vue","svelte","css","scss","sass","less","php","py","rb","go","rs","java","kt","swift","cpp","c","h","hpp","cs","dart","sh","bash","sql","toml","ini","conf","cfg","env","dockerfile","graphql","gql"]),_=gt(()=>!!r.file&&A.has(i(r.file))),E=gt(()=>r.file?r.previewUrl(r.file.path):""),M=gt(()=>r.file?r.downloadUrl(r.file.path):"");function z(Me){const D=Me.indexOf("://");return D===-1?Me:Me.slice(D+3)}const N=he(!1),R=he(null),$=he(""),q=he(!1),W=he(!1),Z=he(!1);let te,ne;function _e(){W.value=!0,te&&clearTimeout(te),te=setTimeout(()=>{Se($.value)},250),ne&&clearTimeout(ne),ne=setTimeout(()=>{pe()},1500)}async function pe(){if(!(!r.saveTextEndpoint||!r.file||Z.value)){Z.value=!0,R.value=null;try{const Me={"Content-Type":"application/json",...await(r.authHeaders??(()=>({})))()},D=await fetch(r.saveTextEndpoint,{method:"POST",headers:Me,credentials:r.authCredentials||"same-origin",body:JSON.stringify({path:z(r.file.path),content:$.value})});if(!D.ok)throw new Error(`save failed: ${D.status} ${await D.text()}`);W.value=!1}catch(Me){R.value=Me instanceof Error?Me.message:String(Me)}finally{Z.value=!1}}}async function we(Me){N.value=!0,R.value=null,$.value="",q.value=!1;try{const D={};r.authHeaders&&Object.assign(D,r.authHeaders());const ue=await fetch(Me,{credentials:r.authCredentials||"include",headers:D});if(!ue.ok)throw new Error(`${ue.status} ${ue.statusText}`);if(Number(ue.headers.get("content-length")||"0")>gc){q.value=!0;return}const ze=await ue.text();ze.length>gc?(q.value=!0,$.value=ze.slice(0,gc)):$.value=ze}catch(D){R.value=D instanceof Error?D.message:String(D)}finally{N.value=!1}}const ve=he(""),Te=he(null);async function Se(Me){try{const D=await import("markdown-it").catch(()=>null);if(!D){ve.value="";return}const ue=D.default??D,ze=new ue({html:!0,linkify:!0,breaks:!0,typographer:!0}).render(Me);ve.value=Ie(ze),await new Promise(re=>setTimeout(re,0)),await Le()}catch(D){ve.value="",R.value=D instanceof Error?D.message:String(D)}}function Ie(Me){return Me.replace(/<\s*script\b[^<]*(?:(?!<\s*\/\s*script\s*>)<[^<]*)*<\s*\/\s*script\s*>/gi,"").replace(/<\s*iframe\b[\s\S]*?<\s*\/\s*iframe\s*>/gi,"").replace(/<\s*object\b[\s\S]*?<\s*\/\s*object\s*>/gi,"").replace(/<\s*embed\b[^>]*>/gi,"").replace(/\son\w+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi,"").replace(/(href|src|action|formaction|xlink:href)\s*=\s*(?:"\s*javascript:[^"]*"|'\s*javascript:[^']*')/gi,'$1="#"')}async function Le(){var ze,re,me;if(!Te.value)return;const Me=Te.value,D=Array.from(Me.querySelectorAll("pre > code"));if(D.length===0)return;let ue,ke;for(const O of D){const Fe=O.className||"",mt=/\blanguage-mermaid\b/.test(Fe)||/\blanguage-mmd\b/.test(Fe),k=/\blanguage-math\b/.test(Fe)||/\blanguage-latex\b/.test(Fe)||/\blanguage-tex\b/.test(Fe);if(mt){if(ue===void 0)try{const K=await import("mermaid");ue=K.default??K,(ze=ue.initialize)==null||ze.call(ue,{startOnLoad:!1,securityLevel:"strict"})}catch{ue=null}if(!ue)continue;try{const K=`filex-md-mermaid-${Math.random().toString(36).slice(2)}`,{svg:H}=await ue.render(K,O.textContent||""),I=document.createElement("div");I.className="fe-preview__md-mermaid",I.innerHTML=H,(re=O.parentElement)==null||re.replaceWith(I)}catch{}}else if(k){if(ke===void 0)try{const K=await Promise.resolve().then(()=>mS);ke=K.default??K}catch{ke=null}if(!ke)continue;try{const K=ke.renderToString(O.textContent||"",{displayMode:!0,throwOnError:!1}),H=document.createElement("div");H.className="fe-preview__md-math",H.innerHTML=K,(me=O.parentElement)==null||me.replaceWith(H)}catch{}}}}const Ae=he("");async function Be(Me,D){try{const ue=await up();if(!ue){Ae.value="";return}const ke=ue.default??ue;if(ke.getLanguage(D)){const ze=ke.highlight(Me,{language:D,ignoreIllegals:!0});Ae.value=ze.value}else{const ze=ke.highlightAuto(Me);Ae.value=ze.value}}catch(ue){Ae.value="",R.value=ue instanceof Error?ue.message:String(ue)}}const be=he(null);let ye=null,P;const V=he(!1),fe=he(!1),de=he(!1),ie=he(null);function oe(){if(ye){try{ye.dispose()}catch{}ye=null}V.value=!1,de.value=!1,ie.value=null}function se(Me){return{js:"javascript",mjs:"javascript",cjs:"javascript",ts:"typescript",tsx:"typescript",jsx:"javascript",json:"json",jsonc:"json",css:"css",scss:"scss",sass:"scss",less:"less",html:"html",htm:"html",vue:"html",svelte:"html",xml:"xml",svg:"xml",md:"markdown",markdown:"markdown",php:"php",py:"python",yml:"yaml",yaml:"yaml",go:"go",rs:"rust",sql:"sql",cpp:"cpp",c:"c",h:"cpp",hpp:"cpp",sh:"shell",bash:"shell",dockerfile:"dockerfile",toml:"ini",ini:"ini",conf:"ini",cfg:"ini"}[Me]??"plaintext"}async function ge(Me,D){var ke;const ue=await sp();if(!ue||!be.value)return!1;try{oe();const ze=!!r.saveTextEndpoint&&r.openMode!=="view",re=r.theme==="dark"?!0:r.theme==="light"?!1:(ke=window.matchMedia)==null?void 0:ke.call(window,"(prefers-color-scheme: dark)").matches;return ye=ue.editor.create(be.value,{value:Me,language:se(D),readOnly:!ze,theme:re?"vs-dark":"vs",automaticLayout:!0,minimap:{enabled:!1},fontSize:13}),ze&&(ye.addCommand(ue.KeyMod.CtrlCmd|ue.KeyCode.KeyS,()=>void Ce()),ye.onDidChangeModelContent(()=>{P&&clearTimeout(P),P=setTimeout(()=>{Ce()},1500)})),V.value=!0,!0}catch(ze){return R.value=`Monaco mount fail: ${ze.message}`,!1}}async function Ce(){if(!(!r.saveTextEndpoint||!r.file)&&r.openMode!=="view"&&!fe.value){fe.value=!0,de.value=!1,ie.value=null;try{const Me=ye?ye.getValue():"",D={"Content-Type":"application/json"};r.authHeaders&&Object.assign(D,r.authHeaders());const ue=await fetch(r.saveTextEndpoint,{method:"POST",headers:D,credentials:r.authCredentials||"same-origin",body:JSON.stringify({path:z(r.file.path),content:Me})});if(!ue.ok){const ke=await ue.text().catch(()=>"");throw new Error(`${ue.status} ${ue.statusText}${ke?" — "+ke.slice(0,150):""}`)}de.value=!0,setTimeout(()=>{de.value=!1},2500)}catch(Me){ie.value=Me.message}finally{fe.value=!1}}}async function xe(Me,D,ue){if($.value="",ve.value="",Ae.value="",R.value=null,Ne.value=null,y.value=null,p.value=null,x.value=!1,ct(),oe(),!(!Me||!D)){if(ue==="viewer"){await g(i(r.file));return}if(ue==="markdown"||ue==="code"||ue==="text"){if(await we(D),q.value)return;if(ue==="markdown"){await Se($.value);return}const ke=u[i(r.file)]||"";Y6()?(await new Promise(me=>setTimeout(me,0)),await ge($.value,i(r.file))||await Be($.value,ke)):(ue==="code"&&await Be($.value,ke),sp().then(async re=>{re&&r.open&&(await new Promise(me=>setTimeout(me,0)),await ge($.value,i(r.file)))}))}else ue==="office"&&(await new Promise(ke=>setTimeout(ke,0)),await it())}}tr(()=>[r.open,E.value,h.value,r.openMode],([Me,D,ue])=>{xe(Me,D,ue)}),pr(()=>{za(()=>{r.open&&xe(r.open,E.value,h.value)})});const Ve=gt(()=>u[i(r.file)]||"plaintext"),Ue=he(null),Ne=he(null);let qe=null;async function it(){if(Ne.value=null,!(!r.file||h.value!=="office")){if(!r.onlyOfficeConfigEndpoint){Ne.value="OnlyOffice yapılandırması yok";return}if(Ue.value)try{const Me={"Content-Type":"application/json"};r.authHeaders&&Object.assign(Me,r.authHeaders());const D=await fetch(r.onlyOfficeConfigEndpoint,{method:"POST",headers:Me,credentials:r.authCredentials||"same-origin",body:JSON.stringify({path:r.file.path,mode:r.openMode||"edit"})});if(!D.ok)throw new Error(`Config fetch ${D.status}: ${(await D.text()).slice(0,200)}`);const{config:ue,documentServerUrl:ke}=await D.json();await wt(ke),ct();const ze="fe-onlyoffice-mount";Ue.value.id=ze,ue.events={onError:me=>{Ne.value=ot(me)}};const re=window;if(!re.DocsAPI||!re.DocsAPI.DocEditor)throw new Error("DocsAPI not available after script load");qe=new re.DocsAPI.DocEditor(ze,ue)}catch(Me){Ne.value=Me instanceof Error?Me.message:String(Me)}}}function ct(){var Me;try{(Me=qe==null?void 0:qe.destroyEditor)==null||Me.call(qe)}catch{}qe=null}Br(()=>{ct(),oe()});function ot(Me){if(typeof Me=="string")return Me;const D=Me;if(D!=null&&D.data&&typeof D.data=="object"){const ue=D.data;if(typeof ue.errorDescription=="string")return ue.errorDescription;if(typeof ue.message=="string")return ue.message;if(ue.errorCode!==void 0)return`OnlyOffice error ${ue.errorCode}`}if(typeof(D==null?void 0:D.data)=="string")return D.data;if(typeof(D==null?void 0:D.errorDescription)=="string")return D.errorDescription;if(typeof(D==null?void 0:D.message)=="string")return D.message;try{return JSON.stringify(Me)}catch{return"OnlyOffice error"}}function wt(Me){return new Promise((D,ue)=>{var re;if((re=window.DocsAPI)!=null&&re.DocEditor){D();return}const ke=document.getElementById(cp);if(ke){ke.addEventListener("load",()=>D()),ke.addEventListener("error",()=>ue(new Error("OnlyOffice api.js load failed")));return}const ze=document.createElement("script");ze.id=cp,ze.src=`${Me.replace(/\/$/,"")}/web-apps/apps/api/documents/api.js`,ze.async=!0,ze.onload=()=>D(),ze.onerror=()=>ue(new Error("OnlyOffice api.js load failed")),document.head.appendChild(ze)})}return(Me,D)=>{var ue;return Q(),kr(Al,{open:e.open,size:"xl",title:((ue=e.file)==null?void 0:ue.basename)||"",chromeless:e.chromeless,theme:e.theme,onClose:D[2]||(D[2]=ke=>n("close"))},{actions:Tr(()=>[e.file&&e.openMode==="view"&&_.value?(Q(),ae("button",{key:0,type:"button",class:"fe-btn fe-btn--primary",onClick:S},"✏ Düzenle")):rt("",!0),e.file?(Q(),ae("button",{key:1,type:"button",class:"fe-btn",onClick:v},"↗ "+le(Qe(a)("viewer.open_in_new_tab")),1)):rt("",!0),e.file?(Q(),ae("a",{key:2,href:M.value,class:"fe-btn"},le(Qe(a)("viewer.download")),9,Qy)):rt("",!0),L("button",{type:"button",class:"fe-btn",onClick:D[1]||(D[1]=ke=>n("close"))},"Kapat")]),default:Tr(()=>[e.file?(Q(),ae("div",uy,[h.value==="image"?(Q(),ae("img",{key:0,src:E.value,alt:e.file.basename,class:"fe-preview__image"},null,8,cy)):h.value==="video"?(Q(),ae("video",{key:1,src:E.value,controls:"",preload:"metadata",class:"fe-preview__video"},null,8,fy)):h.value==="audio"?(Q(),ae("audio",{key:2,src:E.value,controls:"",class:"fe-preview__audio"},null,8,dy)):h.value==="pdf"?(Q(),ae("object",{key:3,data:E.value,type:"application/pdf",class:"fe-preview__iframe"},[L("div",py,[D[3]||(D[3]=L("span",{class:"fe-preview__fallback-icon"},"📕",-1)),D[4]||(D[4]=L("p",null,"Tarayıcı PDF'i inline açamadı.",-1)),L("a",{href:M.value,class:"fe-btn fe-btn--primary",target:"_blank",rel:"noopener"},"PDF'i Yeni Sekmede Aç",8,vy)])],8,hy)):h.value==="markdown"?(Q(),ae(yt,{key:4},[N.value?(Q(),ae("div",my,le(Qe(a)("viewer.loading")),1)):q.value?(Q(),ae("div",gy,[D[5]||(D[5]=gr(" Dosya çok büyük (>1 MB). ",-1)),L("a",{href:M.value,class:"fe-btn"},le(Qe(a)("viewer.download")),9,by)])):e.openMode==="edit"&&e.saveTextEndpoint?(Q(),ae("div",yy,[L("div",xy,[D[6]||(D[6]=L("span",{class:"fe-preview__md-split-label"},"MARKDOWN",-1)),R.value?(Q(),ae("span",_y,le(R.value),1)):rt("",!0),L("button",{type:"button",class:"fe-btn fe-btn--primary",disabled:!W.value||Z.value,onClick:pe},le(Z.value?"Kaydediliyor…":W.value?"Kaydet (Ctrl+S)":"Kaydedildi"),9,wy)]),L("div",ky,[rr(L("textarea",{class:"fe-preview__md-split-input","onUpdate:modelValue":D[0]||(D[0]=ke=>$.value=ke),onInput:_e,onKeydown:[pa(vr(pe,["ctrl","prevent"]),["s"]),pa(vr(pe,["meta","prevent"]),["s"])],spellcheck:"false",placeholder:"# Markdown buraya…"},null,40,Sy),[[sn,$.value]]),L("div",{ref_key:"markdownEl",ref:Te,class:"fe-preview__md-split-output fe-preview__md",innerHTML:ve.value},null,8,Cy)])])):R.value?(Q(),ae("div",Ay,[L("p",null,le(R.value),1),L("a",{href:M.value,class:"fe-btn fe-btn--primary"},le(Qe(a)("viewer.download")),9,Ey)])):ve.value?(Q(),ae("div",{key:4,ref_key:"markdownEl",ref:Te,class:"fe-preview__md",innerHTML:ve.value},null,8,Ty)):(Q(),ae("pre",My,le($.value),1))],64)):h.value==="viewer"?(Q(),ae(yt,{key:5},[p.value&&!x.value?(Q(),ae("div",Dy,[D[7]||(D[7]=L("span",{class:"fe-preview__fallback-icon"},"⚠️",-1)),L("p",null,le(p.value),1),L("a",{href:M.value,class:"fe-btn fe-btn--primary"},le(Qe(a)("viewer.download")),9,Iy)])):y.value?(Q(),kr(c5(y.value),gh({key:2},b.value,{class:"fe-preview__viewer",onFallback:m}),null,16)):(Q(),ae("div",zy,[D[8]||(D[8]=L("span",{class:"fe-preview__fallback-icon"},"⏳",-1)),L("p",null,le(Qe(a)("viewer.loading")),1)]))],64)):h.value==="code"||h.value==="text"?(Q(),ae(yt,{key:6},[N.value?(Q(),ae("div",Fy,le(Qe(a)("viewer.loading")),1)):q.value?(Q(),ae("div",Oy,[D[9]||(D[9]=gr(" Dosya çok büyük (>1 MB). ",-1)),L("a",{href:M.value,class:"fe-btn"},le(Qe(a)("viewer.download")),9,Py)])):R.value?(Q(),ae("div",Ry,[L("p",null,le(R.value),1),L("a",{href:M.value,class:"fe-btn fe-btn--primary"},le(Qe(a)("viewer.download")),9,Ly)])):(Q(),ae("div",By,[L("div",Ny,[L("span",$y,le(Ve.value),1),!V.value&&Ae.value?(Q(),ae("span",Uy,le(e.saveTextEndpoint?"Editör yükleniyor…":"Salt okunur"),1)):rt("",!0),de.value?(Q(),ae("span",Hy,"✓ Kaydedildi")):rt("",!0),ie.value?(Q(),ae("span",{key:2,class:"fe-preview__code-status fe-preview__code-status--err",title:ie.value},"✗ Hata",8,jy)):rt("",!0),e.openMode==="view"?(Q(),ae("span",Gy,"Salt okunur")):e.saveTextEndpoint&&V.value?(Q(),ae("button",{key:4,type:"button",class:"fe-btn fe-btn--primary",disabled:fe.value,onClick:Ce},le(fe.value?"Kaydediliyor…":"Kaydet (Ctrl+S)"),9,Vy)):rt("",!0)]),L("div",{ref_key:"monacoEl",ref:be,class:Xt(["fe-preview__code-editor",{"is-hidden":!V.value}])},null,2),!V.value&&Ae.value?(Q(),ae("pre",qy,[L("code",{class:Xt(`language-${Ve.value}`),innerHTML:Ae.value},null,10,Wy)])):!V.value&&!Ae.value?(Q(),ae("pre",{key:1,class:"fe-preview__pre","data-lang":Ve.value},le($.value),9,Ky)):rt("",!0)]))],64)):h.value==="office"?(Q(),ae(yt,{key:7},[Ne.value?(Q(),ae("div",Xy,[D[10]||(D[10]=L("span",{class:"fe-preview__fallback-icon"},"📄",-1)),L("p",null,le(Ne.value),1),L("a",{href:M.value,class:"fe-btn fe-btn--primary"},"İndir",8,Yy)])):(Q(),ae("div",{key:1,ref_key:"officeEl",ref:Ue,class:"fe-preview__office"},null,512))],64)):(Q(),ae("div",Zy,[D[11]||(D[11]=L("span",{class:"fe-preview__fallback-icon"},"📎",-1)),D[12]||(D[12]=L("p",null,"Bu dosya tipi için önizleme henüz yok.",-1)),L("a",{href:M.value,class:"fe-btn fe-btn--primary"},"İndir",8,Jy)]))])):rt("",!0)]),_:1},8,["open","title","chromeless","theme"])}}}),tx={class:"filex-cv"},rx={class:"filex-cv__head"},nx={key:0,class:"filex-cv__msg"},ax={key:1,class:"filex-cv__msg filex-cv__ok"},ix={class:"filex-cv__src"},ox=["placeholder"],lx={class:"filex-cv__list"},sx=["onClick"],ux={key:0,class:"filex-cv__empty"},cx={key:0,class:"filex-cv__err"},fx={class:"filex-cv__foot"},dx=["disabled"],hx=["src"],px=Jr(qt({__name:"ConvertModal",props:{convertUrl:{},fileName:{},fetchBytes:{type:Function},upload:{type:Function},t:{type:Function}},emits:["close","done"],setup(e,{emit:t}){const r=e,n=t,a=he(null),i=he("loading"),o=he(null),l=he([]),s=he(""),u=he(null),c=gt(()=>(r.fileName.split(".").pop()||"").toLowerCase()),f=gt(()=>{const S=l.value.filter(C=>C.from);return S.find(C=>(C.ext||"").toLowerCase()===c.value)||S.find(C=>(C.format||"").toLowerCase()===c.value)||null}),d=gt(()=>{const S=s.value.trim().toLowerCase(),C=new Set,A=[];for(const _ of l.value){if(!_.to)continue;const E=(_.ext||_.format||"").toLowerCase();!E||C.has(E)||(C.add(E),A.push(_))}return A.sort((_,E)=>(_.ext||_.format).localeCompare(E.ext||E.format)),S?A.filter(_=>(_.ext||"").toLowerCase().includes(S)||(_.format||"").toLowerCase().includes(S)||(_.name||"").toLowerCase().includes(S)||(_.mime||"").toLowerCase().includes(S)):A}),h=gt(()=>`${r.convertUrl.replace(/\/$/,"")}/?embed=1`);let y=0;const p=new Map;function x(S,C={},A=[]){const _=++y;return new Promise((E,M)=>{var z,N;p.set(_,{resolve:E,reject:M}),(N=(z=a.value)==null?void 0:z.contentWindow)==null||N.postMessage({target:"convert-embed",id:_,cmd:S,...C},"*",A),setTimeout(()=>{p.has(_)&&(p.delete(_),M(new Error("convert timeout")))},18e4)})}function g(S){const C=S.data;if(!C||C.source!=="convert-embed")return;if(C.event==="ready"){m();return}const A=p.get(C.id);A&&(p.delete(C.id),C.ok?A.resolve(C):A.reject(new Error(C.error||"convert error")))}async function m(){try{const S=await x("listFormats");l.value=S.formats||[],i.value="ready",f.value||(o.value=v("convert.unsupportedInput","Bu dosya tipi için kaynak format bulunamadı."))}catch(S){o.value=S.message,i.value="error"}}async function b(){if(!(!u.value||!f.value)){i.value="converting",o.value=null;try{const S=await r.fetchBytes(),C=await x("convert",{name:r.fileName,bytes:S,fromIndex:f.value.index,toIndex:u.value.index},[S]),A=r.fileName.replace(/\.[^.]+$/,""),_=C.ext||u.value.ext||u.value.format,E=`${A}.${_}`,M=new File([C.bytes],E,{type:u.value.mime||"application/octet-stream"});await r.upload(M),i.value="done",n("done",E)}catch(S){o.value=S.message,i.value="error"}}}function v(S,C){return r.t?r.t(S,C):C}return pr(()=>window.addEventListener("message",g)),Br(()=>window.removeEventListener("message",g)),(S,C)=>(Q(),ae("div",{class:"filex-cv__bg",onClick:C[3]||(C[3]=vr(A=>n("close"),["self"]))},[L("div",tx,[L("header",rx,[L("h3",null,le(v("convert.title","Dönüştür"))+" — "+le(e.fileName),1),L("button",{class:"filex-cv__x",onClick:C[0]||(C[0]=A=>n("close"))},"✕")]),i.value==="loading"?(Q(),ae("div",nx,le(v("convert.loading","Dönüştürücü yükleniyor…")),1)):i.value==="done"?(Q(),ae("div",ax,[L("p",null,"✓ "+le(v("convert.done","Dönüştürüldü ve klasöre yüklendi.")),1),L("button",{class:"filex-cv__convert",onClick:C[1]||(C[1]=A=>n("close"))},le(v("convert.close","Kapat")),1)])):(Q(),ae(yt,{key:2},[L("p",ix,[gr(le(v("convert.from","Kaynak"))+": ",1),L("b",null,le(c.value||"?"),1)]),rr(L("input",{"onUpdate:modelValue":C[2]||(C[2]=A=>s.value=A),class:"filex-cv__search",placeholder:v("convert.searchFmt","Hedef format ara (pdf, mp4, png…)")},null,8,ox),[[sn,s.value]]),L("div",lx,[(Q(!0),ae(yt,null,nr(d.value,A=>{var _;return Q(),ae("button",{key:A.index,class:Xt(["filex-cv__fmt",{"is-sel":((_=u.value)==null?void 0:_.index)===A.index}]),onClick:E=>u.value=A},[L("b",null,le((A.ext||A.format).toUpperCase()),1),L("small",null,le(A.name),1)],10,sx)}),128)),d.value.length===0?(Q(),ae("div",ux,le(v("convert.noFmt","Eşleşen format yok.")),1)):rt("",!0)]),o.value?(Q(),ae("div",cx,le(o.value),1)):rt("",!0),L("footer",fx,[L("button",{class:"filex-cv__convert",disabled:!u.value||!f.value||i.value==="converting",onClick:b},le(i.value==="converting"?v("convert.converting","Dönüştürülüyor…"):v("convert.convert","Dönüştür")),9,dx)])],64)),L("iframe",{ref_key:"iframeRef",ref:a,src:h.value,class:"filex-cv__frame",title:"converter"},null,8,hx)])]))}}),[["__scopeId","data-v-dfaf8d90"]]),vx={class:"fx-perm-modal"},mx={class:"fx-perm-head"},gx={class:"fx-perm-title"},bx={class:"fx-perm-ico","aria-hidden":"true"},yx={class:"fx-perm-titletext"},xx=["title"],_x={class:"fx-perm-subdim"},wx={class:"fx-perm-tabs"},kx={class:"fx-perm-body"},Sx={key:0,class:"fx-perm-warn"},Cx={key:1,class:"fx-perm-warn"},Ax={key:2,class:"fx-perm-muted"},Ex={class:"fx-perm-addcard"},Tx={class:"fx-perm-add"},Mx={class:"fx-perm-emailwrap"},Dx=["placeholder"],Ix={key:0,class:"fx-perm-suggest"},zx=["onMousedown"],Fx={class:"fx-perm-suggest-av"},Ox={class:"fx-perm-suggest-txt"},Px={class:"fx-perm-suggest-name"},Rx={class:"fx-perm-suggest-meta"},Lx=["title"],Bx=["value"],Nx=["disabled"],$x={key:0,class:"fx-perm-invite"},Ux={class:"fx-perm-muted"},Hx={class:"fx-perm-invite-actions"},jx={class:"fx-perm-invite-row"},Gx={value:"user"},Vx={value:"viewer"},qx=["disabled"],Wx=["disabled"],Kx={key:1,class:"fx-perm-notice"},Xx={key:2,class:"fx-perm-reveal"},Yx={class:"fx-perm-section"},Zx={key:0,class:"fx-perm-empty"},Jx={class:"fx-perm-av"},Qx=["title"],e_=["value","onChange"],t_=["value"],r_=["disabled","title","onClick"],n_={class:"fx-perm-av fx-perm-av--dim"},a_=["title"],i_={class:"fx-perm-badge"},o_=["title"],l_={class:"fx-perm-addcard"},s_={class:"fx-perm-share-opts"},u_={class:"fx-perm-check"},c_={class:"fx-perm-expiry"},f_={class:"fx-perm-muted"},d_=["value"],h_=["disabled"],p_={key:0,class:"fx-perm-warn"},v_={key:1,class:"fx-perm-result"},m_={class:"fx-perm-linkrow"},g_=["href"],b_={key:0,class:"fx-perm-pin"},y_={class:"fx-perm-mailrow"},x_=["placeholder"],__=["disabled"],w_={key:1,class:"fx-perm-notice"},k_={key:2,class:"fx-perm-hint"},S_={class:"fx-perm-section"},C_={key:0,class:"fx-perm-empty"},A_=["title"],E_=["onClick"],T_=["disabled","title","onClick"],M_={key:2,class:"fx-perm-addcard"},D_={class:"fx-perm-muted fx-perm-dropintro"},I_={class:"fx-perm-share-opts"},z_={class:"fx-perm-check"},F_={class:"fx-perm-expiry"},O_={class:"fx-perm-muted"},P_=["value"],R_=["disabled"],L_={key:0,class:"fx-perm-adv"},B_={class:"fx-perm-adv-row"},N_={class:"fx-perm-muted"},$_={class:"fx-perm-adv-row"},U_={class:"fx-perm-muted"},H_={class:"fx-perm-adv-row"},j_={class:"fx-perm-muted"},G_=["placeholder"],V_={class:"fx-perm-check"},q_={key:1,class:"fx-perm-warn"},W_={key:2,class:"fx-perm-result"},K_={class:"fx-perm-linkrow"},X_=["href"],Y_={key:0,class:"fx-perm-pin"},Z_={class:"fx-perm-mailrow"},J_=["placeholder"],Q_=["disabled"],ew={key:1,class:"fx-perm-notice"},tw=Jr(qt({__name:"PermissionsModal",props:{api:{},path:{},isDir:{type:Boolean},size:{},locale:{}},emits:["close"],setup(e,{emit:t}){const r=e,n=t,a=gt(()=>(r.locale??"tr")!=="en");function i(K,H){return a.value?K:H}const o=gt(()=>{const K=/^([^:]+):\/\/(.*)$/.exec(r.path),H=K?K[1]:"",I=K?K[2]:r.path,ee=I.split("/").filter(Boolean);return{adapter:H,name:ee.length?ee[ee.length-1]:H,rel:I}}),l=he("perms"),s=he(!1),u=he(!0),c=he(""),f=he([]),d=he([]),h=he(!0),y=he(""),p=he("viewer"),x=he(!1),g=he(""),m=he(!1),b=he("user"),v=he(null),S=he([]),C=he(!1);let A;const _=[{v:"viewer",l:i("Görüntüleyen","Viewer"),d:i("görüntüle + indir","view + download")},{v:"editor",l:i("Düzenleyen","Editor"),d:i("oku + yaz + sil","read + write + delete")},{v:"owner",l:i("Sahip","Owner"),d:i("düzenle + izin yönet","edit + manage access")}];function E(K){var H;return((H=_.find(I=>I.v===K))==null?void 0:H.l)??K}const M=he([]),z=he(!1),N=he(!1),R=he(0),$=he(null),q=he(""),W=he(""),Z=he(""),te=he(!1),ne=he(""),_e=[{v:0,l:i("Süresiz","Never")},{v:1,l:i("1 gün","1 day")},{v:7,l:i("7 gün","7 days")},{v:30,l:i("30 gün","30 days")}],pe=he(!1),we=he(0),ve=he(!1),Te=he(""),Se=he(""),Ie=he(""),Le=he(!0),Ae=he(!1),Be=he(""),be=he(null),ye=he(""),P=he(!1),V=he("");function fe(K){const H=new Set,I=[];for(const ee of K.split(/[,;\s]+/)){const X=ee.trim().toLowerCase();X&&X.includes("@")&&!H.has(X)&&(H.add(X),I.push(X))}return I}function de(K){var ee,X;const H=((ee=K.sent)==null?void 0:ee.length)??0,I=((X=K.failed)==null?void 0:X.length)??0;return I===0?i(`E-posta gönderildi ✓ (${H})`,`Email sent ✓ (${H})`):i(`${H} gönderildi, ${I} başarısız`,`${H} sent, ${I} failed`)}async function ie(){u.value=!0,c.value="";try{const K=await r.api.listPermissions(r.path);f.value=K.direct??[],d.value=K.inherited??[],h.value=K.storage_rbac,s.value=!0}catch(K){K.status===403?(s.value=!1,l.value="share"):c.value=K instanceof Error?K.message:String(K)}finally{u.value=!1}}async function oe(){try{const K=await r.api.listShares(r.path);M.value=K.shares??[]}catch{M.value=[]}}pr(async()=>{await ie(),await oe()}),Br(()=>{A&&clearTimeout(A)});function se(){m.value=!1,v.value=null,g.value="";const K=y.value.trim();if(A&&clearTimeout(A),K.length<1){S.value=[],C.value=!1;return}A=setTimeout(async()=>{try{const H=await r.api.searchUsers(K);S.value=H.users??[],C.value=S.value.length>0}catch{C.value=!1}},180)}async function ge(K){C.value=!1,y.value=K.email;let H=p.value;K.role==="viewer"&&H!=="viewer"&&(H="viewer"),x.value=!0,g.value="";try{await r.api.addPermission({path:r.path,user_id:K.id,level:H,is_dir:!!r.isDir}),y.value="",S.value=[],await ie(),g.value=i("Yetki verildi.","Access granted.")}catch(I){g.value=I instanceof Error?I.message:String(I)}finally{x.value=!1}}async function Ce(){const K=y.value.trim().toLowerCase();if(!K||!K.includes("@")){g.value=i("Geçerli bir e-posta girin.","Enter a valid email.");return}C.value=!1,x.value=!0,g.value="",v.value=null;try{const H=await r.api.resolveEmail(K);if(H.found&&H.user){let I=p.value;H.user.role==="viewer"&&I!=="viewer"&&(I="viewer"),await r.api.addPermission({path:r.path,user_id:H.user.id,level:I,is_dir:!!r.isDir}),y.value="",await ie(),g.value=i("Yetki verildi.","Access granted.")}else m.value=!0}catch(H){g.value=H instanceof Error?H.message:String(H)}finally{x.value=!1}}async function xe(){x.value=!0,g.value="";try{const K=await r.api.invitePermission({path:r.path,email:y.value.trim().toLowerCase(),level:p.value,create_user:!0,role:b.value,is_dir:!!r.isDir,locale:r.locale??"tr"});v.value={tempPassword:K.temp_password},g.value=K.emailed?i("Kullanıcı açıldı, davet e-postası gönderildi.","User created, invite emailed."):i("Kullanıcı açıldı. Geçici parolayı iletin.","User created. Share the temp password."),m.value=!1,y.value="",await ie()}catch(K){g.value=K instanceof Error?K.message:String(K)}finally{x.value=!1}}function Ve(){Z.value=y.value.trim().toLowerCase(),m.value=!1,g.value="",l.value="share"}async function Ue(K,H){if(H!==K.level){x.value=!0;try{await r.api.updatePermission(K.id,H),await ie()}catch(I){g.value=I instanceof Error?I.message:String(I)}finally{x.value=!1}}}async function Ne(K){x.value=!0;try{await r.api.deletePermission(K.id),await ie()}catch(H){g.value=H instanceof Error?H.message:String(H)}finally{x.value=!1}}function qe(K){return K.user_display_name||K.user_email||`#${K.user_id}`}function it(K){return(K.user_display_name||K.user_email||"?").charAt(0).toUpperCase()}function ct(){return R.value?new Date(Date.now()+R.value*864e5).toISOString():null}async function ot(){z.value=!0,q.value="",$.value=null,ne.value="";try{const K=await r.api.createShare({path:r.path,password:N.value,expires_at:ct()});$.value={url:K.share.url,pin:K.share.password_pin??null},await oe()}catch(K){q.value=K instanceof Error?K.message:String(K)}finally{z.value=!1}}async function wt(){var H;const K=fe(Z.value);if(!K.length){ne.value=i("Geçerli bir e-posta girin.","Enter a valid email.");return}if((H=$.value)!=null&&H.url){te.value=!0,ne.value="";try{const I=await r.api.shareMail({path:r.path,emails:K,url:$.value.url,pin:$.value.pin??void 0,expires_days:R.value||void 0,locale:r.locale??"tr",is_dir:!!r.isDir,size:r.size});ne.value=de(I)}catch(I){const ee=I.detail??"";ee.includes("not_configured")?ne.value=i("SMTP ayarlı/doğrulanmış değil — linki elle iletin.","SMTP not set up/verified — share the link manually."):ee.includes("send_failed")?ne.value=i("Gönderilemedi (geçici hata) — tekrar deneyin.","Send failed (temporary) — please retry."):ne.value=I instanceof Error?I.message:String(I)}finally{te.value=!1}}}function Me(){return we.value?new Date(Date.now()+we.value*864e5).toISOString():null}async function D(){Ae.value=!0,Be.value="",be.value=null,V.value="";try{const K={ask_name:Le.value};Te.value&&(K.max_files=Number(Te.value)),Se.value&&(K.max_file_size_mb=Number(Se.value));const H=Ie.value.split(/[,\s]+/).map(ee=>ee.trim().replace(/^\./,"")).filter(Boolean);H.length&&(K.allowed_ext=H);const I=await r.api.createShare({path:r.path,kind:"drop",password:pe.value,expires_at:Me(),drop_settings:K});be.value={url:I.share.url,pin:I.share.password_pin??null}}catch(K){Be.value=K instanceof Error?K.message:String(K)}finally{Ae.value=!1}}async function ue(){var H;const K=fe(ye.value);if(!K.length){V.value=i("Geçerli bir e-posta girin.","Enter a valid email.");return}if((H=be.value)!=null&&H.url){P.value=!0,V.value="";try{const I=await r.api.shareMail({path:r.path,emails:K,url:be.value.url,pin:be.value.pin??void 0,expires_days:we.value||void 0,locale:r.locale??"tr",is_dir:!0,mode:"drop"});V.value=de(I)}catch(I){(I.detail??"").includes("not_configured")?V.value=i("SMTP ayarlı/doğrulanmış değil — linki elle iletin.","SMTP not set up/verified — share the link manually."):V.value=I instanceof Error?I.message:String(I)}finally{P.value=!1}}}async function ke(K){z.value=!0;try{await r.api.revokeShare(K.uuid),await oe()}catch(H){q.value=H instanceof Error?H.message:String(H)}finally{z.value=!1}}function ze(K,H="url"){var I;(I=navigator.clipboard)==null||I.writeText(K),W.value=H,setTimeout(()=>{W.value===H&&(W.value="")},1400)}const re=gt(()=>typeof navigator<"u"&&typeof navigator.share=="function");function me(K){if(!K||K<=0)return"";const H=1024;if(K<H)return`${K} B`;const I=["K","M","G","T","P","E"];let ee=H,X=0;for(let Xe=K/H;Xe>=H;Xe/=H)ee*=H,X++;return`${(K/ee).toFixed(1)} ${I[X]}B`}function O(K){return K>0?i(`Bu bağlantı ${K} gün geçerlidir.`,`This link is valid for ${K} day(s).`):i("Bu bağlantının süresi yoktur.","This link does not expire.")}function Fe(){var Ke,tt;const K=o.value.name,H=((Ke=$.value)==null?void 0:Ke.url)??"",I=((tt=$.value)==null?void 0:tt.pin)??"",ee=r.isDir?i("klasör","folder"):i("dosya","file"),X=a.value?`${K} ${r.isDir?"klasörü":"dosyası"} sizinle paylaşıldı`:`${K} has been shared with you`,Xe=[];if(Xe.push(i("Merhaba,","Hello,"),""),Xe.push(i(`Sizinle bir ${ee} paylaşıldı:`,`A ${ee} has been shared with you:`),""),r.isDir)Xe.push(i(`Klasör: ${K}`,`Folder: ${K}`));else{Xe.push(i(`Dosya: ${K}`,`File: ${K}`));const At=me(r.size);At&&Xe.push(i(`Boyut: ${At}`,`Size: ${At}`))}return Xe.push("",i("İndirmek için:","Download it here:"),H),I&&Xe.push("",i(`PIN (erişim kodu): ${I}`,`PIN (access code): ${I}`)),Xe.push("",O(R.value)),{title:X,text:Xe.join(`
|
|
21
|
-
`)}}function
|
|
22
|
-
`)}}async function k(K){if(re.value)try{await navigator.share(K)}catch{}}return(K,H)=>{var I,ee;return Q(),ae("div",{class:"fx-perm-overlay",onClick:H[24]||(H[24]=vr(X=>n("close"),["self"]))},[L("div",vx,[L("header",mx,[L("div",gx,[L("span",bx,le(e.isDir?"📁":"📄"),1),L("div",yx,[L("h3",null,le(i("Paylaş / İzinler","Share / Permissions")),1),L("span",{class:"fx-perm-sub",title:e.path},[gr(le(o.value.name),1),L("span",_x," · "+le(o.value.adapter),1)],8,xx)])]),L("button",{class:"fx-perm-x",onClick:H[0]||(H[0]=X=>n("close")),"aria-label":"close"},"✕")]),L("div",wx,[s.value?(Q(),ae("button",{key:0,class:Xt(["fx-perm-tab",{"is-active":l.value==="perms"}]),onClick:H[1]||(H[1]=X=>l.value="perms")},le(i("Kişiler","People")),3)):rt("",!0),L("button",{class:Xt(["fx-perm-tab",{"is-active":l.value==="share"}]),onClick:H[2]||(H[2]=X=>l.value="share")},le(i("Bağlantı","Link")),3),e.isDir?(Q(),ae("button",{key:1,class:Xt(["fx-perm-tab",{"is-active":l.value==="drop"}]),onClick:H[3]||(H[3]=X=>l.value="drop")},le(i("Dosya İste","Request files")),3)):rt("",!0)]),L("div",kx,[l.value==="perms"&&s.value?(Q(),ae(yt,{key:0},[h.value?rt("",!0):(Q(),ae("div",Sx,le(i("Bu diskte RBAC kapalı — izinler yalnızca RBAC açık disklerde geçerli.","RBAC is off on this storage — grants only apply when RBAC is enabled.")),1)),c.value?(Q(),ae("div",Cx,le(c.value),1)):rt("",!0),u.value?(Q(),ae("div",Ax,le(i("Yükleniyor…","Loading…")),1)):(Q(),ae(yt,{key:3},[L("div",Ex,[L("div",Tx,[L("div",Mx,[rr(L("input",{"onUpdate:modelValue":H[4]||(H[4]=X=>y.value=X),type:"email",class:"fx-perm-input",autocomplete:"off",placeholder:i("İsim veya e-posta","Name or email"),onInput:se,onKeyup:pa(Ce,["enter"]),onFocus:se},null,40,Dx),[[sn,y.value]]),C.value?(Q(),ae("ul",Ix,[(Q(!0),ae(yt,null,nr(S.value,X=>(Q(),ae("li",{key:X.id,onMousedown:vr(Xe=>ge(X),["prevent"])},[L("span",Fx,le((X.display_name||X.email).charAt(0).toUpperCase()),1),L("span",Ox,[L("span",Px,le(X.display_name||X.email),1),L("span",Rx,le(X.email)+" · "+le(X.role),1)])],40,zx))),128))])):rt("",!0)]),rr(L("select",{"onUpdate:modelValue":H[5]||(H[5]=X=>p.value=X),class:"fx-perm-sel",title:(I=_.find(X=>X.v===p.value))==null?void 0:I.d},[(Q(),ae(yt,null,nr(_,X=>L("option",{key:X.v,value:X.v},le(X.l),9,Bx)),64))],8,Lx),[[Ws,p.value]]),L("button",{class:"fx-perm-btn fx-perm-btn--primary",disabled:x.value,onClick:Ce},le(i("Ekle","Add")),9,Nx)]),m.value?(Q(),ae("div",$x,[L("p",Ux,le(i("Bu e-postada hesap yok. Ne yapmak istersiniz?","No account for this email — what next?")),1),L("div",Hx,[L("div",jx,[rr(L("select",{"onUpdate:modelValue":H[6]||(H[6]=X=>b.value=X),class:"fx-perm-sel"},[L("option",Gx,le(i("Kullanıcı","User")),1),L("option",Vx,le(i("Görüntüleyen","Viewer")),1)],512),[[Ws,b.value]]),L("button",{class:"fx-perm-btn fx-perm-btn--primary",disabled:x.value,onClick:xe},le(i("Kullanıcı oluştur + yetki ver","Create user + grant")),9,qx)]),L("button",{class:"fx-perm-btn fx-perm-btn--ghost",disabled:x.value,onClick:Ve},le(i("Sadece paylaşım linki gönder →","Just send a share link →")),9,Wx)])])):rt("",!0),g.value?(Q(),ae("div",Kx,le(g.value),1)):rt("",!0),(ee=v.value)!=null&&ee.tempPassword?(Q(),ae("div",Xx,[gr(le(i("Geçici parola:","Temp password:"))+" ",1),L("code",null,le(v.value.tempPassword),1)])):rt("",!0)]),L("div",Yx,[L("h4",null,le(i("Erişimi olanlar","People with access")),1),!f.value.length&&!d.value.length?(Q(),ae("div",Zx,le(i("Henüz kimseyle paylaşılmadı.","Not shared with anyone yet.")),1)):rt("",!0),(Q(!0),ae(yt,null,nr(f.value,X=>(Q(),ae("div",{key:"d"+X.id,class:"fx-perm-person"},[L("span",Jx,le(it(X)),1),L("span",{class:"fx-perm-user",title:X.user_email},le(qe(X)),9,Qx),L("select",{class:"fx-perm-sel fx-perm-sel--sm",value:X.level,onChange:Xe=>Ue(X,Xe.target.value)},[(Q(),ae(yt,null,nr(_,Xe=>L("option",{key:Xe.v,value:Xe.v},le(Xe.l),9,t_)),64))],40,e_),L("button",{class:"fx-perm-del",disabled:x.value,title:i("Kaldır","Remove"),onClick:Xe=>Ne(X)},"✕",8,r_)]))),128)),(Q(!0),ae(yt,null,nr(d.value,X=>(Q(),ae("div",{key:"i"+X.id,class:"fx-perm-person fx-perm-inh"},[L("span",n_,le(it(X)),1),L("span",{class:"fx-perm-user",title:X.user_email},le(qe(X)),9,a_),L("span",i_,le(E(X.level)),1),L("span",{class:"fx-perm-from",title:i("Üst klasörden gelir","Inherited from")+": "+(X.path_prefix||"/")}," ↳ "+le(X.path_prefix||"/"),9,o_)]))),128))])],64))],64)):rt("",!0),l.value==="share"?(Q(),ae(yt,{key:1},[L("div",l_,[L("div",s_,[L("label",u_,[rr(L("input",{type:"checkbox","onUpdate:modelValue":H[7]||(H[7]=X=>N.value=X)},null,512),[[qs,N.value]]),gr(" "+le(i("PIN ile koru","Protect with a PIN")),1)]),L("label",c_,[L("span",f_,le(i("Süre","Expiry")),1),rr(L("select",{"onUpdate:modelValue":H[8]||(H[8]=X=>R.value=X),class:"fx-perm-sel fx-perm-sel--sm"},[(Q(),ae(yt,null,nr(_e,X=>L("option",{key:X.v,value:X.v},le(X.l),9,d_)),64))],512),[[Ws,R.value,void 0,{number:!0}]])]),L("button",{class:"fx-perm-btn fx-perm-btn--primary",disabled:z.value,onClick:ot},le(i("Bağlantı oluştur","Create link")),9,h_)]),q.value?(Q(),ae("div",p_,le(q.value),1)):rt("",!0),$.value?(Q(),ae("div",v_,[L("div",m_,[L("a",{href:$.value.url,target:"_blank",rel:"noopener",class:"fx-perm-link"},le($.value.url),9,g_),L("button",{class:"fx-perm-btn fx-perm-btn--sm",onClick:H[9]||(H[9]=X=>ze($.value.url,"new"))},le(W.value==="new"?i("Kopyalandı ✓","Copied ✓"):i("Kopyala","Copy")),1)]),$.value.pin?(Q(),ae("div",b_,[L("span",null,[H[25]||(H[25]=gr("PIN: ",-1)),L("code",null,le($.value.pin),1)]),L("button",{class:"fx-perm-btn fx-perm-btn--sm",onClick:H[10]||(H[10]=X=>ze($.value.pin,"sharepin"))},le(W.value==="sharepin"?i("Kopyalandı ✓","Copied ✓"):i("Kopyala","Copy")),1)])):rt("",!0),L("div",y_,[rr(L("input",{"onUpdate:modelValue":H[11]||(H[11]=X=>Z.value=X),type:"text",class:"fx-perm-input",autocomplete:"off",placeholder:i("e-posta(lar) — virgülle ayırın","email(s) — comma separated"),onKeyup:pa(wt,["enter"])},null,40,x_),[[sn,Z.value]]),L("button",{class:"fx-perm-btn",disabled:te.value,onClick:wt},le(i("Gönder","Send")),9,__)]),ne.value?(Q(),ae("div",w_,le(ne.value),1)):rt("",!0),re.value?(Q(),ae("button",{key:2,type:"button",class:"fx-perm-btn fx-perm-btn--ghost fx-perm-sharebtn",onClick:H[12]||(H[12]=X=>k(Fe()))},[H[26]||(H[26]=L("span",{"aria-hidden":"true"},"📤",-1)),gr(" "+le(i("Paylaş","Share")),1)])):rt("",!0)])):Z.value?(Q(),ae("p",k_,[gr(le(i("Aşağıdan bir bağlantı oluşturun, ardından","Create a link below, then it will be sent to"))+" ",1),L("strong",null,le(Z.value),1),gr(" "+le(i("adresine gönderin.",".")),1)])):rt("",!0)]),L("div",S_,[L("h4",null,le(i("Mevcut bağlantılar","Existing links")),1),M.value.length?rt("",!0):(Q(),ae("div",C_,le(i("Yok","None")),1)),(Q(!0),ae(yt,null,nr(M.value,X=>(Q(),ae("div",{key:X.uuid,class:"fx-perm-person"},[L("span",{class:"fx-perm-user fx-perm-link",title:X.url},le(X.url),9,A_),L("button",{class:"fx-perm-btn fx-perm-btn--sm",onClick:Xe=>ze(X.url,X.uuid)},le(W.value===X.uuid?i("✓","✓"):i("Kopyala","Copy")),9,E_),L("button",{class:"fx-perm-del",disabled:z.value,title:i("İptal","Revoke"),onClick:Xe=>ke(X)},"✕",8,T_)]))),128))])],64)):rt("",!0),l.value==="drop"?(Q(),ae("div",M_,[L("p",D_,le(i("Bu klasöre herkesin dosya YÜKLEYEBİLECEĞİ herkese açık bir bağlantı. Yükleyenler klasördeki mevcut dosyaları göremez.","A public link that lets anyone UPLOAD files into this folder. Uploaders never see the folder's existing files.")),1),L("div",I_,[L("label",z_,[rr(L("input",{type:"checkbox","onUpdate:modelValue":H[13]||(H[13]=X=>pe.value=X)},null,512),[[qs,pe.value]]),gr(" "+le(i("PIN ile koru","Protect with a PIN")),1)]),L("label",F_,[L("span",O_,le(i("Süre","Expiry")),1),rr(L("select",{"onUpdate:modelValue":H[14]||(H[14]=X=>we.value=X),class:"fx-perm-sel fx-perm-sel--sm"},[(Q(),ae(yt,null,nr(_e,X=>L("option",{key:X.v,value:X.v},le(X.l),9,P_)),64))],512),[[Ws,we.value,void 0,{number:!0}]])]),L("button",{class:"fx-perm-btn fx-perm-btn--primary",disabled:Ae.value,onClick:D},le(i("Bağlantı oluştur","Create link")),9,R_)]),L("button",{type:"button",class:"fx-perm-btn fx-perm-btn--ghost fx-perm-advtoggle",onClick:H[15]||(H[15]=X=>ve.value=!ve.value)},le(ve.value?i("Gelişmiş ▲","Advanced ▲"):i("Gelişmiş ▼","Advanced ▼")),1),ve.value?(Q(),ae("div",L_,[L("label",B_,[L("span",N_,le(i("En fazla dosya","Max files")),1),rr(L("input",{"onUpdate:modelValue":H[16]||(H[16]=X=>Te.value=X),type:"number",min:"1",class:"fx-perm-input fx-perm-input--sm",placeholder:"20"},null,512),[[sn,Te.value]])]),L("label",$_,[L("span",U_,le(i("Dosya başı MB","MB / file")),1),rr(L("input",{"onUpdate:modelValue":H[17]||(H[17]=X=>Se.value=X),type:"number",min:"1",class:"fx-perm-input fx-perm-input--sm",placeholder:"500"},null,512),[[sn,Se.value]])]),L("label",H_,[L("span",j_,le(i("İzinli türler","Allowed types")),1),rr(L("input",{"onUpdate:modelValue":H[18]||(H[18]=X=>Ie.value=X),type:"text",class:"fx-perm-input fx-perm-input--sm",placeholder:i("hepsi (örn. pdf, jpg)","all (e.g. pdf, jpg)")},null,8,G_),[[sn,Ie.value]])]),L("label",V_,[rr(L("input",{type:"checkbox","onUpdate:modelValue":H[19]||(H[19]=X=>Le.value=X)},null,512),[[qs,Le.value]]),gr(" "+le(i("Yükleyenin adını sor","Ask uploader name")),1)])])):rt("",!0),Be.value?(Q(),ae("div",q_,le(Be.value),1)):rt("",!0),be.value?(Q(),ae("div",W_,[L("div",K_,[L("a",{href:be.value.url,target:"_blank",rel:"noopener",class:"fx-perm-link"},le(be.value.url),9,X_),L("button",{class:"fx-perm-btn fx-perm-btn--sm",onClick:H[20]||(H[20]=X=>ze(be.value.url,"drop"))},le(W.value==="drop"?i("Kopyalandı ✓","Copied ✓"):i("Kopyala","Copy")),1)]),be.value.pin?(Q(),ae("div",Y_,[L("span",null,[H[27]||(H[27]=gr("PIN: ",-1)),L("code",null,le(be.value.pin),1)]),L("button",{class:"fx-perm-btn fx-perm-btn--sm",onClick:H[21]||(H[21]=X=>ze(be.value.pin,"droppin"))},le(W.value==="droppin"?i("Kopyalandı ✓","Copied ✓"):i("Kopyala","Copy")),1)])):rt("",!0),L("div",Z_,[rr(L("input",{"onUpdate:modelValue":H[22]||(H[22]=X=>ye.value=X),type:"text",class:"fx-perm-input",autocomplete:"off",placeholder:i("e-posta(lar) — virgülle ayırın","email(s) — comma separated"),onKeyup:pa(ue,["enter"])},null,40,J_),[[sn,ye.value]]),L("button",{class:"fx-perm-btn",disabled:P.value,onClick:ue},le(i("Gönder","Send")),9,Q_)]),V.value?(Q(),ae("div",ew,le(V.value),1)):rt("",!0),re.value?(Q(),ae("button",{key:2,type:"button",class:"fx-perm-btn fx-perm-btn--ghost fx-perm-sharebtn",onClick:H[23]||(H[23]=X=>k(mt()))},[H[28]||(H[28]=L("span",{"aria-hidden":"true"},"📤",-1)),gr(" "+le(i("Paylaş","Share")),1)])):rt("",!0)])):rt("",!0)])):rt("",!0)])])])}}}),[["__scopeId","data-v-53f367d0"]]),rw={key:0,class:"fe__presence"},nw={key:0,class:"fe__loading"},aw={class:"fe__loading-text"},iw={key:1,class:"fe__notfound"},ow={class:"fe__notfound-title"},lw={class:"fe__notfound-path"},sw={class:"fe__notfound-desc"},uw={key:1,class:"fe__dragover"},cw={class:"fe-recents__header"},fw={class:"fe-modal__head"},dw={class:"fe-modal__title"},hw={class:"fe-modal__body"},pw={key:0,class:"fe-toast"},fp="brf-file-explorer:view-mode",bc="brf-file-explorer:path",El="application/x-brf-files",vw=qt({__name:"FileExplorer",props:{config:{}},emits:["share-created","file-opened","error","upload-progress","selection-change","navigate"],setup(e,{expose:t,emit:r}){const n=e,a=r,i=R6(n.config),o=X6(i,{reload:()=>H()}),l=o.presenceUsers;function s(U){const j=(U||"").replace(/^\/+|\/+$/g,"");return!j||j===".trash"||j.startsWith(".trash/")?null:mt(j)||null}pr(()=>{o.start(),o.subscribe(s(p.value))}),Br(()=>o.stop());const u=L6(n.config,i),c=H6(n.config,i,{onSettled:U=>{if(U.status==="error")me(U.error_message||"İşlem başarısız");else{const j=U.op_type==="copy"?"Kopyalandı":U.op_type==="move"?"Taşındı":"Silindi";me(`${j} (${U.progress_total})`)}H()}}),f=he(!1),d=(n.config.rootPath||"").trim(),h=d.replace("://","/").replace(/^\/+|\/+$/g,""),y=h||n.config.initialPath||"",p=he(y),x=he(n.config.defaultAdapter||"brf"),g=he(y),m=he([]),b=he(""),v=he(""),S=zb((U,j)=>{let Ee=(()=>{try{const Pe=localStorage.getItem(fp);if(Pe==="list"||Pe==="grid")return Pe}catch{}return n.config.viewMode??"list"})();return{get(){return U(),Ee},set(Pe){if(Pe!==Ee){Ee=Pe;try{localStorage.setItem(fp,Pe)}catch{}j()}}}}),C=he(""),A=he(!1),_=he(""),E=gt(()=>A.value),M=gt(()=>n.config.locale||"tr"),z=gt(()=>{const U=(p.value??"").replace(/^\/+|\/+$/g,"");return h&&U===h?!1:U.length>0}),N=gt(()=>O.value?!(p.value??"").replace(/^\/+|\/+$/g,""):!1);function R(){if(A.value){H(_.value);return}const U=(p.value??"").replace(/^\/+|\/+$/g,"");if(!U||U===h)return;const j=U.lastIndexOf("/");let Ee=j===-1?"":U.slice(0,j);h&&!(Ee===h||Ee.startsWith(h+"/"))&&(Ee=h),H(Ee)}const{t:$}=In(M),q=B6(()=>m.value);tr(()=>[...q.selected.value],()=>{a("selection-change",q.nodes.value.map(j=>({path:j.path,basename:j.basename,type:j.type})));const U=q.nodes.value.filter(j=>j.type==="file");o.setFocus(U.length===1?U[0].basename:null)});const W=he({mode:null,items:[],sourcePath:null}),Z=he(null),te=he(new Set),ne=he(!1),_e=he(!1),pe=he(null),we=he(0);async function ve(){try{const U=await tl(),j=n.config.apiBase??"",Ee=await fetch(`${j}/api/files/manager/star/list?limit=500`,{headers:U,credentials:"include"});if(!Ee.ok)return;const Pe=await Ee.json(),xt=Array.isArray(Pe)?Pe:Array.isArray(Pe==null?void 0:Pe.entries)?Pe.entries:Array.isArray(Pe==null?void 0:Pe.nodes)?Pe.nodes:[];te.value=new Set(xt.map(lt=>lt.id).filter(lt=>typeof lt=="number"))}catch{}}function Te(U,j){if(typeof U.id!="number")return;const Ee=new Set(te.value);j?Ee.add(U.id):Ee.delete(U.id),te.value=Ee}async function Se(U){if(typeof U.id=="number")try{const j=n.config.apiBase??"";await fetch(`${j}/api/files/manager/recent`,{method:"POST",headers:await tl({"Content-Type":"application/json"}),credentials:"include",body:JSON.stringify({node_id:U.id})}),we.value+=1}catch{}}function Ie(U){typeof U.id=="number"&&(pe.value=U,_e.value=!0)}function Le(U){const j={type:"file",path:U.path,basename:U.name,extension:(U.name.split(".").pop()||"").toLowerCase(),id:U.id};ne.value=!1,ra(j)}const Ae=gt(()=>{var j,Ee,Pe;if(n.config.onlyOfficeBase)return n.config.onlyOfficeBase;const U=(Ee=(j=Z.value)==null?void 0:j.external)==null?void 0:Ee.onlyoffice;return U&&!ip(U)?null:((Pe=Z.value)==null?void 0:Pe.onlyoffice_url)||null}),Be=gt(()=>Ae.value&&i.endpoints.onlyOfficeConfig||null),be=gt(()=>{var Ee,Pe,xt;const U=n.config.drawioUrl||n.config.drawioBase;if(U)return U;const j=(Pe=(Ee=Z.value)==null?void 0:Ee.external)==null?void 0:Pe.drawio;return j&&!ip(j)?null:((xt=Z.value)==null?void 0:xt.drawio_url)||null}),ye=gt(()=>{var U;return n.config.convertBase||((U=Z.value)==null?void 0:U.convert_url)||null}),P=he([]),V=he(null),fe=he(!1),de=he(!1),ie=he(!1),oe=he(!1),se=he(!1),ge=he(null),Ce=he(null),xe=he(null),Ve=he(null),Ue=he("edit"),Ne=he(!1),qe=he(null),it=he(!1),ct=he(null);function ot(U){return U===void 0||U==="editor"||U==="owner"}function wt(U){var j;return U.length===1&&typeof((j=U[0])==null?void 0:j.perm)=="string"?U[0].perm:b.value}const Me=gt(()=>ot(b.value)),D=he(null),ue=he(null),ke=he(null),ze=he(null);let re;function me(U){ze.value=U,re&&clearTimeout(re),re=setTimeout(()=>ze.value=null,2500)}const O=gt(()=>n.config.multiStorageRoot===!0);function Fe(U){const j=U.replace(/^\/+|\/+$/g,"");if(!j)return{adapter:"",rel:""};const Ee=j.indexOf("/");return Ee===-1?{adapter:j,rel:""}:{adapter:j.slice(0,Ee),rel:j.slice(Ee+1)}}function mt(U){if(U.includes("://"))return U;const{adapter:j,rel:Ee}=Fe(U);return j?Ee?`${j}://${Ee}`:`${j}://`:""}function k(U){const j=U.indexOf("://");if(j===-1)return U.replace(/^\/+|\/+$/g,"");const Ee=U.slice(0,j),Pe=U.slice(j+3).replace(/^\/+|\/+$/g,"");return Pe?`${Ee}/${Pe}`:Ee}function K(){return(n.config.storages??[]).map(j=>({type:"dir",path:j.name,basename:j.label||j.name,extension:"",storage:j.name,visibility:"private",file_size:0,mime_type:"inode/storage",extra_metadata:{driver:j.driver,readOnly:j.readOnly}}))}async function H(U){f.value=!0,A.value=!1;let j=U??p.value??"";try{if(v.value="",h){const Or=String(j).replace(/^\/+|\/+$/g,"");(!Or||!(Or===h||Or.startsWith(h+"/")))&&(j=h)}if(O.value&&!mt(j)){p.value="",x.value="",g.value="",m.value=K();return}const Ee=O.value?mt(j):Ke(j),Pe=C.value?await i.search(Ee,C.value):await i.index(Ee);x.value=Pe.adapter,g.value=Pe.dirname,b.value=Pe.perm||"",m.value=(Pe.files||[]).filter(Or=>!(Or.path.includes(".thumbs")||Or.path.includes(".versions")||Or.basename===".versions"||Or.basename===".trash"||Or.basename===".keepdir"));const xt=I(Pe.dirname),lt=xt==="fileman"||xt==="",ar=xt.startsWith("fileman/.trash"),Hr=n.config.trashVisible!==!1;!ar&<&&Hr&&(m.value.unshift({type:"dir",path:`${Pe.adapter}://fileman/.trash`,basename:".trash",extension:"",storage:Pe.adapter,visibility:"private",size:0,file_size:0,mime_type:"inode/directory",extra_metadata:{}}),X(Pe.adapter)),p.value=O.value?k(Pe.dirname):I(Pe.dirname)}catch(Ee){const Pe=Ee instanceof Error?Ee.message:String(Ee),xt=Ee.status;if(xt===404||xt===403){v.value=String(j),m.value=[],a("error",{message:Pe,context:{path:U}});return}a("error",{message:Pe,context:{path:U}}),me(Pe)}finally{f.value=!1}}function I(U){const j=U.indexOf("://");return j===-1?U:U.slice(j+3)}function ee(){v.value="",H("")}async function X(U){try{const{entries:j}=await i.listTrash(U),Ee=m.value.find(lt=>lt.basename===".trash");if(!Ee)return;let Pe=0,xt=0;for(const lt of j){Pe+=lt.size||0;const ar=Date.parse(lt.deleted_at);!Number.isNaN(ar)&&ar>xt&&(xt=ar)}Ee.size=Pe,xt>0&&(Ee.last_modified=xt)}catch{}}async function Xe(){f.value=!0,_.value=x.value||"",A.value=!0,q.clear();try{const{entries:U}=await i.listTrash();m.value=U.map(j=>({type:"file",id:j.id,path:j.storage_name?`${j.storage_name}://${j.path}`:j.path,basename:j.name,extension:j.name.includes(".")&&j.name.split(".").pop()||"",storage:j.storage_name||"",visibility:"private",file_size:j.size,mime_type:j.mime||"",extra_metadata:{deleted_at:j.deleted_at,ttl_days:j.ttl_days??null}})),g.value=".trash",p.value=".trash"}catch(U){const j=U instanceof Error?U.message:String(U);a("error",{message:j,context:{op:"trash-list"}}),me(j)}finally{f.value=!1}}function Ke(U){if(U&&U.includes("://"))return U;if(O.value){const j=mt(U??"");return j||(x.value?`${x.value}://`:"")}return U?`${x.value}://${U.replace(/^\/+/,"")}`:`${x.value}://`}tr(()=>C.value,()=>void H());function tt(){return n.config.pathPersist??"hash"}function At(){const U=tt();return U==="hash"||U==="hash+localStorage"}function fn(U){try{return decodeURIComponent(U)}catch{return U}}function Jt(){try{return localStorage.getItem(bc)||""}catch{return""}}function zt(){const U=window.location.hash||"";return U.startsWith("#")?fn(U.slice(1)).replace(/^\/+|\/+$/g,""):""}function mr(){if(typeof window>"u")return"";const U=tt();if(U==="none")return"";if(U==="localStorage")return Jt();const j=zt();return j||U==="hash"?j:y?"":Jt()}function Fr(U){if(typeof window>"u")return;const j=tt();if(j==="none")return;if(j==="localStorage"||j==="hash+localStorage"){try{U?localStorage.setItem(bc,U):localStorage.removeItem(bc)}catch{}if(j==="localStorage")return}const Ee=U?U.split("/").map(encodeURIComponent).join("/"):"",Pe=Ee?`#${Ee}`:"";(window.location.hash||"")!==Pe&&history.replaceState(null,"",Pe||window.location.pathname+window.location.search)}function Ur(){if(!At())return;const U=zt();U&&U!==p.value&&H(U)}tr(p,U=>{Fr(U),a("navigate",{path:U}),o.subscribe(s(U))}),t({reload:()=>H()}),pr(async()=>{var j;mc();const U=mr();await H(U||void 0),await za(),(j=ue.value)==null||j.focus(),ve(),At()&&window.addEventListener("hashchange",Ur),i.endpoints.opsList&&c.startPolling(),i.endpoints.capabilities&&i.capabilities().then(Ee=>{Z.value=Ee}).catch(()=>{})}),N6(ue,{onDelete:()=>{q.isEmpty.value||(ie.value=!0)},onRename:()=>{q.nodes.value.length===1&&(ge.value=q.nodes.value[0],de.value=!0)},onSelectAll:()=>q.selectAll(),onOpen:()=>{const U=q.nodes.value[0];U&&ra(U)},onClose:()=>{var U;fe.value=!1,de.value=!1,ie.value=!1,oe.value=!1,se.value=!1,(U=D.value)==null||U.hide()},onFocusSearch:()=>{var U;return(U=ke.value)==null?void 0:U.focusSearch()},onCut:()=>rM(),onCopy:()=>nM(),onPaste:()=>$3(),onGoUp:()=>R(),hasSelection:()=>!q.isEmpty.value});const el=new Set(["docx","xlsx","pptx","doc","xls","ppt","odt","ods","odp"]);function ra(U){if(U.basename===".trash"){Xe();return}if(U.type==="dir"){const Ee=O.value?k(U.path):I(U.path);H(Ee);return}const j=(U.extension||"").toLowerCase();Ue.value=ot(U.perm??b.value)?dn(j):"view",Ve.value=U,se.value=!0,a("file-opened",{path:U.path,basename:U.basename}),Se(U)}const hr=new Set([...el,"drawio","dio","pdf","epub","ipynb","tiff","tif","psd","mmd","mermaid","glb","gltf","obj","stl","fbx","3ds","zip","rar","7z","tar","gz","tgz","jpg","jpeg","png","webp","gif","bmp","avif","svg","heic","mp4","webm","mov","mkv","m4v","ogv","mp3","wav","ogg","flac","m4a","aac","opus"]);function dn(U){return hr.has(U)?"view":"edit"}async function Ar(U){const j=U??q.nodes.value;if(j.length!==0)try{if(A.value){const xt=j.map(ar=>ar.id).filter(ar=>typeof ar=="number"),{restored:lt}=await i.restoreIds(xt);me(`${lt} öğe geri getirildi`),q.clear(),await Xe();return}if(!i.endpoints.restore)return;const Ee=j.map(xt=>xt.path),{restored:Pe}=await i.restore(Ee);me(`${Pe} öğe geri getirildi`),q.clear(),await H()}catch(Ee){a("error",{message:Ee.message,context:{op:"restore"}})}}function Un(U){Ue.value="view",Ve.value=U,se.value=!0,Se(U)}function Hn(U){if(U.type==="dir"){const lt=O.value?k(U.path):I(U.path);H(lt);return}if(!ot(U.perm??b.value)){Un(U);return}const j=(U.extension||"").toLowerCase(),Ee=n.config.openPageBase;if(!Ee){ra(U);return}const Pe=Ee.includes("?")?"&":"?",xt=`${Ee}${Pe}path=${encodeURIComponent(U.path)}&type=${encodeURIComponent(j)}&mode=edit`;window.open(xt,"_blank","noopener"),a("file-opened",{path:U.path,basename:U.basename}),Se(U)}const Ei=he("selection"),Rd=he(""),KT=he(""),XT=gt(()=>{const U=q.nodes.value;return U.length===0?"none":U.length===1?U[0].type==="dir"?"single-dir":"single-file":"multi"});async function YT(U){const j=q.nodes.value;if(U==="open"){j[0]&&ra(j[0]);return}await N3(U,j)}async function L3(U,j){var Ee;Ei.value="selection",q.has(U.path)||(q.click(U.path),await za()),(Ee=D.value)==null||Ee.show({clientX:j.clientX,clientY:j.clientY},q.nodes.value)}function ZT(U){var j;U.preventDefault(),Ei.value="selection",q.clear(),(j=D.value)==null||j.show({clientX:U.clientX,clientY:U.clientY},[])}function JT(U){var j;Ei.value="breadcrumb",Rd.value=U.adapterPath,KT.value=U.label,(j=D.value)==null||j.show({clientX:U.x,clientY:U.y},[])}const QT=gt(()=>{if(Ei.value==="breadcrumb")return[{key:"open",label:$("ctx.open"),icon:"↗"},{key:"copy-path",label:$("breadcrumb.copy_path"),icon:"📋"}];const U=q.nodes.value,j=U.length>0,Ee=U.length===1;if(E.value)return j?[{key:"restore",label:$("ctx.restore"),icon:"↩"},{divider:!0,key:"sep1",label:""},{key:"delete",label:$("ctx.delete_perm"),icon:"🗑",danger:!0}]:[];const Pe=(p.value??"").replace(/^\/+|\/+$/g,"");return O.value&&Pe===""?j?Ee?[{key:"open",label:$("ctx.open"),icon:"↗"}]:[]:[]:j?B3(U):ot(b.value)?[{key:"new-folder",label:$("toolbar.new_folder"),icon:"📁"},{key:"paste",label:$("ctx.paste"),icon:"📋",disabled:!W.value.mode}]:[]});function B3(U){var K3,X3;const j=U.length>0,Ee=U.length===1,Pe=Ee&&((K3=U[0])==null?void 0:K3.type)==="file",xt=M.value==="en"?"Tags…":"Etiketler…",lt=Ee&&typeof((X3=U[0])==null?void 0:X3.id)=="number",ar=M.value==="en"?"Copy node id":"Node id'yi kopyala",Hr=wt(U),Or=ot(Hr),AM=M.value==="en"?"Share / Permissions":"Paylaş / İzinler";return[{key:"open",label:$("ctx.open"),icon:"↗",hidden:!Ee},{key:"preview",label:$("ctx.preview"),icon:"👁",hidden:!Ee,disabled:!Pe},{key:"download",label:$("ctx.download"),icon:"⬇",hidden:!Ee,disabled:!Pe},{key:"convert",label:$("ctx.convert"),icon:"🔄",hidden:!Ee||!ye.value||!Or,disabled:!Pe},{key:"access",label:AM,icon:"🔗",hidden:!Ee||!Or},{key:"copy-id",label:ar,icon:"🆔",hidden:!lt,disabled:!lt},{divider:!0,key:"sep1",label:"",hidden:!Or},{key:"rename",label:$("ctx.rename"),icon:"✎",hidden:!Ee||!Or,disabled:!Ee},{key:"cut",label:$("ctx.cut"),icon:"✂",hidden:!j||!Or,disabled:!j},{key:"copy",label:$("ctx.copy"),icon:"❐",hidden:!j,disabled:!j},{key:"paste",label:$("ctx.paste"),icon:"📋",hidden:!Or,disabled:!W.value.mode},{divider:!0,key:"sep-meta",label:"",hidden:!lt},{key:"tags",label:xt,icon:"🏷",hidden:!lt,disabled:!lt},{divider:!0,key:"sep2",label:"",hidden:!Or},{key:"delete",label:$("ctx.delete"),icon:"🗑",danger:!0,hidden:!j||!Or,disabled:!j}]}const eM=gt(()=>{const U=q.nodes.value;if(E.value)return U.length===0?[]:[{key:"restore",label:$("ctx.restore"),icon:"↩"},{key:"delete",label:$("ctx.delete_perm"),icon:"🗑",danger:!0}];const j=(p.value??"").replace(/^\/+|\/+$/g,"");return O.value&&j===""?U.length===1?[{key:"open",label:$("ctx.open"),icon:"↗"}]:[]:U.length===0?[]:B3(U)});async function tM(U,j){if(Ei.value==="breadcrumb"){U.key==="open"?H(I(Rd.value)):U.key==="copy-path"&&await W3(Rd.value);return}await N3(U.key,j)}async function N3(U,j){var Ee;switch(U){case"open":j[0]&&Hn(j[0]);break;case"preview":j[0]&&Un(j[0]);break;case"download":j[0]&&iM(j[0]);break;case"convert":j[0]&&cM(j[0]);break;case"share":j[0]&&uM(j[0]);break;case"access":j[0]&&(ct.value=j[0],it.value=!0);break;case"copy-id":if(j[0]&&typeof j[0].id=="number"){const Pe=j[0].id;(Ee=navigator.clipboard)==null||Ee.writeText(String(Pe)).then(()=>me(M.value==="en"?`Node id ${Pe} copied`:`Node id ${Pe} kopyalandı`),()=>me(`#${Pe}`))}break;case"tags":j[0]&&Ie(j[0]);break;case"rename":j[0]&&(ge.value=j[0],de.value=!0);break;case"cut":W.value={mode:"cut",items:j,sourcePath:p.value},me("Kes → Yapıştır hazır");break;case"copy":W.value={mode:"copy",items:j,sourcePath:p.value},me("Kopyala → Yapıştır hazır");break;case"paste":await $3();break;case"delete":ie.value=!0;break;case"restore":j.length>0&&await Ar(j);break;case"new-folder":fe.value=!0;break;case"duplicate":j[0]&&await aM(j[0]);break}}function rM(){q.isEmpty.value||(W.value={mode:"cut",items:q.nodes.value,sourcePath:p.value},me("Kesildi"))}function nM(){q.isEmpty.value||(W.value={mode:"copy",items:q.nodes.value,sourcePath:p.value},me("Kopyalandı"))}async function $3(){const U=W.value;if(!(!U.mode||U.items.length===0))try{const j=U.items.map(xt=>xt.path),Ee=U.sourcePath||"";if(U.mode==="cut"&&Ee===p.value){me("Aynı klasöre kesilemez");return}if(U.mode==="cut"){const{op:xt}=await i.moveAsync(j,Ke(p.value),Ke(Ee)||void 0);c.register(xt),me("Taşıma kuyruğa alındı")}else{const{op:xt}=await i.copy(j,Ke(p.value));c.register(xt),me("Kopyalama kuyruğa alındı")}W.value={mode:null,items:[],sourcePath:null}}catch(j){a("error",{message:j.message,context:{op:"paste"}})}}async function aM(U){try{const{op:j}=await i.copy([U.path],Ke(p.value));c.register(j)}catch(j){a("error",{message:j.message,context:{op:"duplicate"}})}}function iM(U){const j=i.downloadUrl(U.path);window.open(j,"_blank")}async function oM(U){try{await i.newFolder(Ke(p.value),U),fe.value=!1,await H()}catch(j){a("error",{message:j.message,context:{op:"newfolder"}})}}async function lM(U){const j=ge.value;if(j)try{await i.rename(Ke(p.value),j.path,U),de.value=!1,ge.value=null,await H()}catch(Ee){a("error",{message:Ee.message,context:{op:"rename"}})}}async function sM(){if(A.value){ie.value=!1,me("Çöpteki öğeler saklama süresi sonunda otomatik silinir. Kalıcı silme yönetici panelinden yapılır.");return}const U=q.nodes.value.map(j=>j.path);if(U.length===0){ie.value=!1;return}try{if(i.endpoints.deleteAsync){const{op:j}=await i.deleteAsync(U,Ke(p.value));c.register(j),me("Silme kuyruğa alındı")}else await i.deleteItems(Ke(p.value),U),await H();ie.value=!1,q.clear()}catch(j){a("error",{message:j.message,context:{op:"delete"}})}}function uM(U){Ce.value=U,xe.value=null,oe.value=!0}function cM(U){qe.value=U,Ne.value=!0}function fM(U){me(M.value==="en"?`Converted → ${U}`:`Dönüştürüldü → ${U}`),H()}async function dM(U){const j=Ce.value;if(j)try{const{share:Ee}=await i.createShare({path:j.path,password:U.password,expires_at:U.expires_at,max_downloads:U.max_downloads});xe.value=Ee,a("share-created",{path:j.path,url:Ee.url,pin:Ee.password_pin??null})}catch(Ee){a("error",{message:Ee.message,context:{op:"share"}})}}function hM(){oe.value=!1,Ce.value=null,xe.value=null}function pM(){var U;if(!Me.value){me(M.value==="en"?"Read-only here":"Burada yazma yetkiniz yok");return}(U=V.value)==null||U.click()}function vM(U){const j=U.target,Ee=j.files?Array.from(j.files):[];j.value="",U3(Ee)}async function U3(U){if(U.length===0)return;const j=!!(i.endpoints.uploadInit&&i.endpoints.uploadFinalize);for(const Ee of U)j&&Ee.size>=10*1024*1024&&await gM(Ee)||await mM(Ee);await H()}async function mM(U){const j=crypto.randomUUID(),Ee=Ke(p.value);P.value=[...P.value,{id:j,file:U,path:Ee,totalBytes:U.size,uploadedBytes:0,percent:0,status:"uploading",cancel(){}}];const Pe=xt=>{const lt=P.value.findIndex(Hr=>Hr.id===j);if(lt===-1)return;const ar=[...P.value];ar[lt]={...ar[lt],...xt},P.value=ar};try{await i.uploadMultipart(Ee,[U],xt=>{Pe({percent:xt,uploadedBytes:Math.round(xt/100*U.size)}),a("upload-progress",{uploadId:j,percent:xt,done:xt>=100})}),Pe({percent:100,uploadedBytes:U.size,status:"done"}),a("upload-progress",{uploadId:j,percent:100,done:!0})}catch(xt){Pe({status:"error"}),a("error",{message:xt.message,context:{op:"upload",file:U.name}})}}async function gM(U){const j=crypto.randomUUID();let Ee=!1;try{return await u.uploadFile({path:Ke(p.value),file:U,onProgress:Pe=>{if(Ee){const xt=P.value.findIndex(lt=>lt.id===j);if(xt!==-1){const lt=[...P.value];lt[xt]={...Pe,id:j},P.value=lt}}else{if(Pe.status!=="uploading"&&Pe.uploadedBytes<=0)return;P.value=[...P.value,{...Pe,id:j}],Ee=!0}a("upload-progress",{uploadId:Pe.uploadId??j,percent:Pe.percent,done:Pe.status==="done"})}}),!0}catch{return Ee&&(P.value=P.value.filter(Pe=>Pe.id!==j)),!1}}const Qi=he(0),eo=he(!1);function Ld(U){const j=U.dataTransfer;if(!j||j.types&&j.types.includes(El))return!1;if(j.items&&j.items.length>0){let Ee=!1;for(const Pe of Array.from(j.items))if(Pe.kind==="file"){Ee=!0;break}return Ee}return j.types?j.types.includes("Files"):!1}function bM(U){Ld(U)&&(U.preventDefault(),Qi.value++,eo.value=!0)}function yM(){Qi.value=Math.max(0,Qi.value-1),Qi.value===0&&(eo.value=!1)}function xM(U){Ld(U)&&U.preventDefault()}function _M(U){var Ee,Pe;if((Ee=U.dataTransfer)!=null&&Ee.types.includes(El)){Qi.value=0,eo.value=!1;return}if(!Ld(U)){Qi.value=0,eo.value=!1;return}if(U.preventDefault(),Qi.value=0,eo.value=!1,!Me.value){me(M.value==="en"?"Read-only here":"Burada yazma yetkiniz yok");return}const j=(Pe=U.dataTransfer)!=null&&Pe.files?Array.from(U.dataTransfer.files):[];j.length!==0&&U3(j)}function H3(U){var j;(j=U.dataTransfer)!=null&&j.types.includes("Files")&&U.preventDefault()}function j3(U){const j=ue.value,Ee=U.target;j&&Ee&&!j.contains(Ee)&&U.preventDefault()}pr(()=>{window.addEventListener("dragover",H3),window.addEventListener("drop",j3)}),Br(()=>{window.removeEventListener("dragover",H3),window.removeEventListener("drop",j3),window.removeEventListener("hashchange",Ur)});const Bd=gt(()=>W.value.mode!=="cut"?new Set:new Set(W.value.items.map(U=>U.path)));function G3(U,j){if(!j.dataTransfer)return;if(U.basename===".trash"){j.preventDefault();return}q.has(U.path)||q.click(U.path);const Ee=q.nodes.value.filter(Pe=>!Bd.value.has(Pe.path)).filter(Pe=>Pe.basename!==".trash").map(Pe=>({path:Pe.path,basename:Pe.basename,type:Pe.type}));j.dataTransfer.setData(El,JSON.stringify(Ee)),j.dataTransfer.setData("text/plain",Ee.map(Pe=>Pe.path).join(`
|
|
23
|
-
`)),j.dataTransfer.effectAllowed="move"}async function V3(U,j,Ee){try{if(i.endpoints.moveAsync){const{op:Pe}=await i.moveAsync(U,j,Ke(p.value));c.register(Pe),me("Taşıma kuyruğa alındı")}else await i.move(Ke(p.value),U,j),await H();q.clear()}catch(Pe){a("error",{message:Pe.message,context:{op:Ee,targetDir:j}})}}async function q3(U,j){var ar;if(U.type!=="dir")return;const Ee=(ar=j.dataTransfer)==null?void 0:ar.getData(El);if(!Ee)return;let Pe=[];try{Pe=JSON.parse(Ee)}catch{return}if(Pe.length===0)return;const xt=U.path,lt=Pe.map(Hr=>Hr.path).filter(Hr=>Hr&&Hr!==xt&&!xt.startsWith(Hr+"/"));if(lt.length===0){me("Aynı klasöre taşınamaz");return}await V3(lt,xt,"move-dnd")}async function wM(U,j){var ar;const Ee=(ar=j.dataTransfer)==null?void 0:ar.getData(El);if(!Ee)return;let Pe=[];try{Pe=JSON.parse(Ee)}catch{return}if(Pe.length===0)return;const xt=U,lt=Pe.map(Hr=>Hr.path).filter(Hr=>Hr&&Hr!==xt&&!xt.startsWith(Hr+"/"));lt.length!==0&&await V3(lt,xt,"move-dnd-crumb")}function kM(U){U.cancel()}function SM(U){P.value=P.value.filter(j=>j.id!==U.id)}function CM(U){if(O.value&&!U){H("");return}if(O.value){H(k(U));return}H(I(U))}async function W3(U){try{await navigator.clipboard.writeText(U),me($("breadcrumb.copy_path"))}catch{}}function tl(U={}){return i.authHeadersSync({...U})}return(U,j)=>{var Ee,Pe,xt;return Q(),ae("div",{ref_key:"rootEl",ref:ue,class:Xt(["fe",{"fe--theme-light":e.config.theme==="light","fe--theme-dark":e.config.theme==="dark","fe--is-dragover":eo.value}]),tabindex:"-1",onDragenter:bM,onDragover:xM,onDragleave:yM,onDrop:_M,onContextmenu:ZT},[Bt(S8,{ref_key:"toolbarRef",ref:ke,"view-mode":S.value,"search-query":C.value,"trash-active":E.value,actions:eM.value,"selection-mode":XT.value,"paste-enabled":!!W.value.mode,"convert-enabled":!!ye.value,"can-go-up":z.value,"at-virtual-root":N.value,"can-write":Me.value,locale:M.value,"onUpdate:viewMode":j[0]||(j[0]=lt=>S.value=lt),"onUpdate:searchQuery":j[1]||(j[1]=lt=>C.value=lt),onNewFolder:j[2]||(j[2]=lt=>fe.value=!0),onUpload:pM,onRefresh:j[3]||(j[3]=()=>H()),onGoUp:R,onAction:YT,onOpenRecents:j[4]||(j[4]=lt=>ne.value=!0)},null,8,["view-mode","search-query","trash-active","actions","selection-mode","paste-enabled","convert-enabled","can-go-up","at-virtual-root","can-write","locale"]),Bt(U8,{dirname:g.value,adapter:x.value,"root-label":x.value,locale:M.value,"multi-storage-root":O.value,"root-path":Qe(d),onNavigate:CM,onCopyPath:W3,onCrumbContext:JT,onCrumbDrop:wM},null,8,["dirname","adapter","root-label","locale","multi-storage-root","root-path"]),Qe(l).length?(Q(),ae("div",rw,[Bt(i8,{users:Qe(l)},null,8,["users"])])):rt("",!0),L("div",{class:"fe__body",onClick:j[7]||(j[7]=vr(lt=>Qe(q).clear(),["self"]))},[f.value&&m.value.length===0?(Q(),ae("div",nw,[j[23]||(j[23]=L("span",{class:"fe__spinner","aria-hidden":"true"},null,-1)),L("p",aw,le(Qe($)("loading")),1)])):v.value?(Q(),ae("div",iw,[j[24]||(j[24]=L("span",{class:"fe__notfound-icon","aria-hidden":"true"},"📁",-1)),L("p",ow,le(Qe($)("notFound.title")),1),L("p",lw,le(v.value),1),L("p",sw,le(Qe($)("notFound.desc")),1),L("button",{type:"button",class:"fe-btn",onClick:ee},le(Qe($)("notFound.goRoot")),1)])):S.value==="list"?(Q(),kr(l7,{key:2,files:m.value,selected:Qe(q).selected.value,clipped:Bd.value,"show-parent-path":!!C.value,locale:M.value,loading:f.value,"starred-ids":te.value,"api-base":n.config.apiBase??"","auth-headers":()=>tl(),onClickRow:j[5]||(j[5]=(lt,ar)=>Qe(q).click(lt.path,ar)),onDblRow:ra,onContextRow:L3,onItemDragStart:G3,onItemDropInto:q3,onStarChange:Te},null,8,["files","selected","clipped","show-parent-path","locale","loading","starred-ids","api-base","auth-headers"])):(Q(),kr(m7,{key:3,files:m.value,selected:Qe(q).selected.value,clipped:Bd.value,"show-parent-path":!!C.value,locale:M.value,loading:f.value,onClickCard:j[6]||(j[6]=(lt,ar)=>Qe(q).click(lt.path,ar)),onDblCard:ra,onContextCard:L3,onItemDragStart:G3,onItemDropInto:q3},null,8,["files","selected","clipped","show-parent-path","locale","loading"]))]),eo.value?(Q(),ae("div",uw,[...j[25]||(j[25]=[L("div",{class:"fe__dragover-card"},[L("span",{class:"fe-icon"},"⬆"),L("p",null,"Dosyaları buraya bırak")],-1)])])):rt("",!0),Bt(z7,{jobs:P.value,locale:M.value,onCancel:kM,onDismiss:SM},null,8,["jobs","locale"]),Bt(B7,{ops:Qe(c).ops.value,locale:M.value,onDismiss:j[8]||(j[8]=lt=>Qe(c).dismiss(lt))},null,8,["ops","locale"]),Bt(w7,{ref_key:"ctxRef",ref:D,locale:M.value,theme:e.config.theme||"auto",actions:QT.value,onSelect:tM},null,8,["locale","theme","actions"]),Bt(V7,{open:fe.value,locale:M.value,onClose:j[9]||(j[9]=lt=>fe.value=!1),onSubmit:oM},null,8,["open","locale"]),Bt(W7,{open:de.value,locale:M.value,"current-name":((Ee=ge.value)==null?void 0:Ee.basename)||"",onClose:j[10]||(j[10]=lt=>de.value=!1),onSubmit:lM},null,8,["open","locale","current-name"]),Bt(K7,{open:ie.value,locale:M.value,count:Qe(q).size.value,onClose:j[11]||(j[11]=lt=>ie.value=!1),onConfirm:sM},null,8,["open","locale","count"]),Bt(sy,{open:oe.value,locale:M.value,share:xe.value,onClose:hM,onSubmit:dM,onToast:me},null,8,["open","locale","share"]),Bt(ex,{open:se.value,locale:M.value,file:Ve.value,theme:e.config.theme||"auto","preview-url":lt=>Qe(i).previewUrl(lt),"download-url":lt=>Qe(i).downloadUrl(lt),"only-office-base":Ae.value,"only-office-config-endpoint":Be.value,"save-text-endpoint":Qe(i).endpoints.saveText||null,"open-mode":Ue.value,"auth-headers":()=>tl({"Content-Type":"application/json"}),"auth-credentials":Qe(i).credentialsMode(),"drawio-url":be.value,"pdf-worker-url":n.config.pdfWorkerUrl||null,"pdf-save-url":n.config.pdfSaveUrl||null,"viewer-base-url":n.config.viewerBaseUrl||null,onClose:j[12]||(j[12]=lt=>se.value=!1)},null,8,["open","locale","file","theme","preview-url","download-url","only-office-base","only-office-config-endpoint","save-text-endpoint","open-mode","auth-headers","auth-credentials","drawio-url","pdf-worker-url","pdf-save-url","viewer-base-url"]),Ne.value&&qe.value&&ye.value?(Q(),kr(px,{key:2,"convert-url":ye.value,"file-name":((Pe=qe.value)==null?void 0:Pe.basename)||((xt=qe.value)==null?void 0:xt.path)||"","fetch-bytes":()=>{var lt;return Qe(i).fetchArrayBuffer(((lt=qe.value)==null?void 0:lt.path)??"")},upload:lt=>Qe(i).uploadMultipart(Ke(p.value),[lt]).then(()=>{}),onClose:j[13]||(j[13]=lt=>Ne.value=!1),onDone:fM},null,8,["convert-url","file-name","fetch-bytes","upload"])):rt("",!0),it.value&&ct.value?(Q(),kr(tw,{key:3,api:Qe(i),path:ct.value.path,"is-dir":ct.value.type==="dir",size:typeof ct.value.size=="number"?ct.value.size:void 0,locale:M.value==="en"?"en":"tr",onClose:j[14]||(j[14]=lt=>it.value=!1)},null,8,["api","path","is-dir","size","locale"])):rt("",!0),Bt(po,{name:"fe-modal"},{default:Tr(()=>[ne.value?(Q(),ae("div",{key:0,class:Xt(["fe fe-modal__backdrop fe-recents__backdrop",{"fe--theme-light":e.config.theme==="light","fe--theme-dark":e.config.theme==="dark"}]),onClick:j[18]||(j[18]=lt=>ne.value=!1)},[L("div",{class:"fe-recents__panel",onClick:j[17]||(j[17]=vr(()=>{},["stop"]))},[L("div",cw,[L("strong",null,le(M.value==="en"?"Recently opened":"Son açılanlar"),1),L("button",{class:"fe-recents__close","aria-label":"Close",onClick:j[15]||(j[15]=lt=>ne.value=!1)},"×")]),Bt(P8,{"api-base":n.config.apiBase??"","auth-headers":()=>tl(),limit:20,"refresh-key":we.value,onOpen:Le,onError:j[16]||(j[16]=lt=>a("error",{message:lt,context:{op:"recents"}}))},null,8,["api-base","auth-headers","refresh-key"])])],2)):rt("",!0)]),_:1}),Bt(po,{name:"fe-modal"},{default:Tr(()=>[_e.value&&pe.value&&typeof pe.value.id=="number"?(Q(),ae("div",{key:0,class:"fe-modal__backdrop",onClick:j[22]||(j[22]=lt=>_e.value=!1)},[L("div",{class:"fe-modal__card fe-modal__card--md",onClick:j[21]||(j[21]=vr(()=>{},["stop"]))},[L("header",fw,[L("h2",dw,le(M.value==="en"?"Tags":"Etiketler")+" — "+le(pe.value.basename),1),L("button",{class:"fe-modal__close","aria-label":"Close",onClick:j[19]||(j[19]=lt=>_e.value=!1)},"×")]),L("div",hw,[Bt(A8,{"node-id":pe.value.id,"api-base":n.config.apiBase??"","auth-headers":()=>tl(),onError:j[20]||(j[20]=lt=>a("error",{message:lt,context:{op:"tags"}}))},null,8,["node-id","api-base","auth-headers"])])])])):rt("",!0)]),_:1}),L("input",{ref_key:"fileInputEl",ref:V,type:"file",multiple:"",class:"fe__file-input",onChange:vM},null,544),Bt(po,{name:"fe-toast"},{default:Tr(()=>[ze.value?(Q(),ae("div",pw,le(ze.value),1)):rt("",!0)]),_:1})],34)}}}),mw='.fx-presence[data-v-1c69ff03]{display:inline-flex;align-items:center;gap:.5rem;max-width:100%}.fx-presence-avatars[data-v-1c69ff03]{display:inline-flex;align-items:center}.fx-presence-avatar[data-v-1c69ff03]{position:relative;display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;margin-left:-.4rem;border-radius:9999px;border:2px solid var(--fx-presence-ring, #ffffff);color:#fff;font-size:.6rem;font-weight:600;line-height:1;-webkit-user-select:none;user-select:none}.fx-presence-avatar[data-v-1c69ff03]:first-child{margin-left:0}.fx-presence-dot[data-v-1c69ff03]{position:absolute;right:-1px;bottom:-1px;width:.5rem;height:.5rem;border-radius:9999px;background:#22c55e;border:1.5px solid var(--fx-presence-ring, #ffffff)}.fx-presence-more[data-v-1c69ff03]{margin-left:.15rem;font-size:.7rem;color:#71717a}.fx-presence-text[data-v-1c69ff03]{font-size:.75rem;color:#71717a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:14rem}.fx-presence-file[data-v-1c69ff03]{color:#52525b;font-weight:500}.dark{--fx-presence-ring: #18181b}.filex-tag-picker[data-v-7040583c]{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.filex-tag-picker.is-loading[data-v-7040583c]{opacity:.6;pointer-events:none}.filex-tag[data-v-7040583c]{display:inline-flex;align-items:center;gap:4px;border-radius:999px;padding:2px 10px;font-size:12px;font-weight:500;color:#fff;background:var(--filex-tag-color)}.filex-tag-x[data-v-7040583c]{background:transparent;border:none;color:#ffffffd9;cursor:pointer;padding:0 2px;font-size:14px;line-height:1}.filex-tag-x[data-v-7040583c]:hover{color:#fff}.filex-tag-add input[data-v-7040583c]{border:1px solid var(--filex-border, #d1d5db);border-radius:12px;padding:2px 10px;font-size:12px;width:110px}.filex-tag-add-btn[data-v-7040583c]{border:1px dashed var(--filex-border, #d1d5db);background:transparent;border-radius:999px;padding:2px 10px;font-size:12px;color:var(--filex-text-muted, #6b7280);cursor:pointer}.filex-tag-add-btn[data-v-7040583c]:hover{border-color:var(--filex-accent, #6366f1);color:var(--filex-accent, #6366f1)}.filex-recent[data-v-559f2c71]{background:var(--fe-bg-elev, var(--filex-bg-card, #ffffff));border:1px solid var(--fe-border, var(--filex-border, #e5e7eb));border-radius:8px;padding:12px;font-size:13px}.filex-recent header[data-v-559f2c71]{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.filex-recent h3[data-v-559f2c71]{margin:0;font-size:13px;font-weight:600;color:var(--fe-text, var(--filex-text, #111827))}.filex-recent-refresh[data-v-559f2c71]{background:transparent;border:none;color:var(--fe-text-muted, var(--filex-text-muted, #9ca3af));cursor:pointer;font-size:14px;padding:2px 6px}.filex-recent ul[data-v-559f2c71]{list-style:none;margin:0;padding:0}.filex-recent-item[data-v-559f2c71]{display:flex;justify-content:space-between;align-items:center;width:100%;background:transparent;border:none;padding:6px 8px;cursor:pointer;border-radius:4px;text-align:left}.filex-recent-item[data-v-559f2c71]:hover{background:var(--fe-bg-hover, var(--filex-bg-soft, #f3f4f6))}.filex-recent-name[data-v-559f2c71]{color:var(--fe-text, var(--filex-text, #111827));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.filex-recent-meta[data-v-559f2c71]{color:var(--fe-text-muted, var(--filex-text-muted, #9ca3af));font-size:11px;margin-left:8px;flex-shrink:0}.filex-recent-empty[data-v-559f2c71]{color:var(--fe-text-muted, var(--filex-text-muted, #9ca3af));margin:4px 0 0}.filex-star-btn[data-v-12a2f9c5]{display:inline-flex;align-items:center;gap:6px;background:transparent;border:1px solid transparent;border-radius:6px;padding:4px 8px;color:var(--filex-text-muted, #9ca3af);cursor:pointer;transition:color .12s,background .12s}.filex-star-btn[data-v-12a2f9c5]:hover{color:var(--filex-accent-amber, #f59e0b);background:var(--filex-bg-soft, rgba(0, 0, 0, .04))}.filex-star-btn.is-starred[data-v-12a2f9c5]{color:var(--filex-accent-amber, #f59e0b)}.filex-star-btn.is-compact[data-v-12a2f9c5]{padding:4px}.filex-star-label[data-v-12a2f9c5]{font-size:13px}.fe-preview__code-editor.is-hidden{display:none}.fe-preview__viewer{width:100%;height:100%;min-height:70vh;display:flex;flex-direction:column}.fe-preview .fe-preview__viewer{align-self:stretch}.fe-preview__md-mermaid{display:flex;justify-content:center;margin:16px 0}.fe-preview__md-mermaid svg{max-width:100%;height:auto}.fe-preview__md-math{margin:16px 0;text-align:center;overflow-x:auto}.filex-cv__bg[data-v-4363f1ac]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;background:#0000008c;display:flex;align-items:center;justify-content:center}.filex-cv[data-v-4363f1ac]{width:min(560px,92vw);max-height:80vh;overflow:hidden;display:flex;flex-direction:column;background:var(--fe-bg, #fff);color:var(--fe-text, #1a1f29);border:1px solid var(--fe-border, #e2e6ed);border-radius:12px;box-shadow:0 20px 60px #00000059}.filex-cv__head[data-v-4363f1ac]{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid var(--fe-border, #e2e6ed)}.filex-cv__head h3[data-v-4363f1ac]{margin:0;font-size:14px;font-weight:600}.filex-cv__x[data-v-4363f1ac]{border:0;background:none;cursor:pointer;font-size:16px;color:var(--fe-text-muted, #5a6475)}.filex-cv__msg[data-v-4363f1ac]{padding:28px;text-align:center;color:var(--fe-text-muted, #5a6475)}.filex-cv__ok[data-v-4363f1ac]{color:#059669}.filex-cv__src[data-v-4363f1ac]{padding:12px 16px 0;font-size:13px;color:var(--fe-text-muted, #5a6475)}.filex-cv__search[data-v-4363f1ac]{margin:8px 16px;padding:8px 10px;border:1px solid var(--fe-border, #e2e6ed);border-radius:8px;background:var(--fe-bg-elev, #f7f8fa);color:inherit;font-size:13px}.filex-cv__list[data-v-4363f1ac]{flex:1;overflow-y:auto;padding:4px 12px 12px;display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:8px}.filex-cv__fmt[data-v-4363f1ac]{display:flex;flex-direction:column;gap:2px;align-items:flex-start;padding:8px 10px;cursor:pointer;text-align:left;border:1px solid var(--fe-border, #e2e6ed);border-radius:8px;background:var(--fe-bg-elev, #f7f8fa);color:inherit}.filex-cv__fmt small[data-v-4363f1ac]{color:var(--fe-text-muted, #5a6475);font-size:11px}.filex-cv__fmt.is-sel[data-v-4363f1ac]{border-color:#44c878;background:#44c8781f}.filex-cv__empty[data-v-4363f1ac]{grid-column:1 / -1;text-align:center;color:var(--fe-text-muted, #5a6475);padding:16px}.filex-cv__err[data-v-4363f1ac]{padding:0 16px;color:var(--fe-danger, #dc2626);font-size:13px}.filex-cv__foot[data-v-4363f1ac]{padding:12px 16px;border-top:1px solid var(--fe-border, #e2e6ed);text-align:right}.filex-cv__convert[data-v-4363f1ac]{padding:8px 18px;border:0;border-radius:8px;cursor:pointer;background:#44c878;color:#03200f;font-weight:600;font-size:13px}.filex-cv__convert[data-v-4363f1ac]:disabled{opacity:.5;cursor:default}.filex-cv__frame[data-v-4363f1ac]{position:absolute;width:0;height:0;border:0;left:-9999px}.fx-perm-overlay[data-v-23e7820c]{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:10000;font-family:var(--fe-font)}.fx-perm-modal[data-v-23e7820c]{display:flex;flex-direction:column;background:var(--fe-bg);color:var(--fe-text);width:min(520px,94vw);max-height:86vh;border:1px solid var(--fe-border);border-radius:var(--fe-radius-lg, 14px);box-shadow:var(--fe-shadow);font-size:14px;overflow:hidden}.fx-perm-head[data-v-23e7820c]{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:16px 18px 12px;flex:none}.fx-perm-title[data-v-23e7820c]{display:flex;align-items:center;gap:10px;min-width:0}.fx-perm-ico[data-v-23e7820c]{font-size:22px;line-height:1}.fx-perm-titletext[data-v-23e7820c]{display:flex;flex-direction:column;min-width:0}.fx-perm-title h3[data-v-23e7820c]{margin:0;font-size:15px;font-weight:600;color:var(--fe-text)}.fx-perm-sub[data-v-23e7820c]{font-size:12px;color:var(--fe-text);max-width:340px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fx-perm-subdim[data-v-23e7820c]{color:var(--fe-text-muted)}.fx-perm-x[data-v-23e7820c]{background:none;border:none;font-size:17px;cursor:pointer;color:var(--fe-text-muted);flex:none;line-height:1;padding:2px 4px;border-radius:6px}.fx-perm-x[data-v-23e7820c]:hover{color:var(--fe-text);background:var(--fe-bg-hover)}.fx-perm-tabs[data-v-23e7820c]{display:flex;gap:2px;padding:0 18px;border-bottom:1px solid var(--fe-border);flex:none}.fx-perm-tab[data-v-23e7820c]{background:none;border:none;border-bottom:2px solid transparent;padding:8px 12px;cursor:pointer;color:var(--fe-text-muted);font-size:13px;font-family:inherit;font-weight:500}.fx-perm-tab[data-v-23e7820c]:hover{color:var(--fe-text)}.fx-perm-tab.is-active[data-v-23e7820c]{color:var(--fe-primary);border-bottom-color:var(--fe-primary)}.fx-perm-body[data-v-23e7820c]{flex:1 1 auto;overflow-y:auto;padding:14px 18px 18px}.fx-perm-addcard[data-v-23e7820c]{padding:12px;border-radius:var(--fe-radius-md, 10px);background:var(--fe-bg-elev);border:1px solid var(--fe-border)}.fx-perm-section[data-v-23e7820c]{margin-top:16px}.fx-perm-section h4[data-v-23e7820c]{margin:0 0 8px;font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--fe-text-muted)}.fx-perm-empty[data-v-23e7820c]{color:var(--fe-text-muted);font-size:13px;padding:8px 2px}.fx-perm-person[data-v-23e7820c]{display:flex;align-items:center;gap:10px;padding:7px 2px}.fx-perm-person+.fx-perm-person[data-v-23e7820c]{border-top:1px solid var(--fe-border)}.fx-perm-inh[data-v-23e7820c]{color:var(--fe-text-muted)}.fx-perm-av[data-v-23e7820c]{width:28px;height:28px;flex:none;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--fe-primary);color:var(--fe-text-on-primary, #fff);font-size:12px;font-weight:600}.fx-perm-av--dim[data-v-23e7820c]{background:var(--fe-bg-hover);color:var(--fe-text-muted)}.fx-perm-user[data-v-23e7820c]{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--fe-text);min-width:0}.fx-perm-from[data-v-23e7820c]{font-size:11px;color:var(--fe-text-muted);white-space:nowrap}.fx-perm-badge[data-v-23e7820c]{font-size:11px;padding:2px 9px;border-radius:999px;background:var(--fe-bg-hover);color:var(--fe-text)}.fx-perm-sel[data-v-23e7820c],.fx-perm-input[data-v-23e7820c]{padding:7px 9px;border-radius:var(--fe-radius-sm, 7px);border:1px solid var(--fe-border);background:var(--fe-bg);color:var(--fe-text);font-size:13px;font-family:inherit}.fx-perm-sel--sm[data-v-23e7820c]{padding:5px 7px;font-size:12px}.fx-perm-sel[data-v-23e7820c]:focus,.fx-perm-input[data-v-23e7820c]:focus{outline:none;border-color:var(--fe-primary)}.fx-perm-add[data-v-23e7820c]{display:flex;gap:8px;align-items:stretch}.fx-perm-emailwrap[data-v-23e7820c]{position:relative;flex:1;min-width:120px}.fx-perm-input[data-v-23e7820c]{width:100%;box-sizing:border-box}.fx-perm-suggest[data-v-23e7820c]{position:absolute;top:calc(100% + 3px);left:0;right:0;z-index:5;margin:0;padding:4px;list-style:none;background:var(--fe-bg);border:1px solid var(--fe-border);border-radius:var(--fe-radius-sm, 7px);box-shadow:var(--fe-shadow);max-height:210px;overflow:auto}.fx-perm-suggest li[data-v-23e7820c]{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:6px;cursor:pointer}.fx-perm-suggest li[data-v-23e7820c]:hover{background:var(--fe-bg-hover)}.fx-perm-suggest-av[data-v-23e7820c]{width:24px;height:24px;flex:none;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--fe-bg-hover);color:var(--fe-text);font-size:11px;font-weight:600}.fx-perm-suggest-txt[data-v-23e7820c]{display:flex;flex-direction:column;min-width:0}.fx-perm-suggest-name[data-v-23e7820c]{color:var(--fe-text);font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fx-perm-suggest-meta[data-v-23e7820c]{color:var(--fe-text-muted);font-size:11px}.fx-perm-check[data-v-23e7820c]{display:inline-flex;gap:6px;align-items:center;font-size:13px;color:var(--fe-text);cursor:pointer}.fx-perm-btn[data-v-23e7820c]{padding:7px 13px;border-radius:var(--fe-radius-sm, 7px);border:1px solid var(--fe-border);background:var(--fe-bg);color:var(--fe-text);font-size:13px;font-family:inherit;cursor:pointer;white-space:nowrap}.fx-perm-btn[data-v-23e7820c]:hover:not(:disabled){background:var(--fe-bg-hover)}.fx-perm-btn[data-v-23e7820c]:disabled{opacity:.55;cursor:default}.fx-perm-btn--sm[data-v-23e7820c]{padding:5px 10px;font-size:12px}.fx-perm-btn--primary[data-v-23e7820c]{background:var(--fe-primary);border-color:var(--fe-primary);color:var(--fe-text-on-primary, #fff)}.fx-perm-btn--primary[data-v-23e7820c]:hover:not(:disabled){background:var(--fe-primary-hover, var(--fe-primary));filter:brightness(1.05)}.fx-perm-btn--ghost[data-v-23e7820c]{background:none;border-color:transparent;color:var(--fe-primary);padding-left:2px}.fx-perm-btn--ghost[data-v-23e7820c]:hover:not(:disabled){background:none;text-decoration:underline}.fx-perm-del[data-v-23e7820c]{background:none;border:none;color:var(--fe-danger);cursor:pointer;font-size:14px;flex:none;padding:2px 4px}.fx-perm-del[data-v-23e7820c]:hover:not(:disabled){filter:brightness(1.15)}.fx-perm-invite[data-v-23e7820c]{margin-top:10px;padding-top:10px;border-top:1px dashed var(--fe-border)}.fx-perm-invite-actions[data-v-23e7820c]{display:flex;flex-direction:column;gap:8px;margin-top:6px}.fx-perm-invite-row[data-v-23e7820c]{display:flex;gap:8px;align-items:stretch}.fx-perm-invite-row .fx-perm-btn--primary[data-v-23e7820c]{flex:1}.fx-perm-share-opts[data-v-23e7820c]{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.fx-perm-expiry[data-v-23e7820c]{display:inline-flex;gap:6px;align-items:center;font-size:13px}.fx-perm-share-opts .fx-perm-btn--primary[data-v-23e7820c]{margin-left:auto}.fx-perm-result[data-v-23e7820c]{margin-top:12px;padding-top:12px;border-top:1px solid var(--fe-border)}.fx-perm-linkrow[data-v-23e7820c]{display:flex;gap:8px;align-items:center}.fx-perm-link[data-v-23e7820c]{color:var(--fe-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;text-decoration:none}.fx-perm-link[data-v-23e7820c]:hover{text-decoration:underline}.fx-perm-pin[data-v-23e7820c]{margin:8px 0 0;font-size:13px;color:var(--fe-text);display:flex;align-items:center;gap:8px}.fx-perm-pin code[data-v-23e7820c],.fx-perm-reveal code[data-v-23e7820c]{font-family:var(--fe-font-mono, monospace);background:var(--fe-bg-hover);padding:1px 6px;border-radius:5px}.fx-perm-mailrow[data-v-23e7820c]{display:flex;gap:8px;margin-top:10px}.fx-perm-mailrow .fx-perm-input[data-v-23e7820c]{flex:1}.fx-perm-hint[data-v-23e7820c]{font-size:13px;color:var(--fe-text-muted);margin:10px 0 0}.fx-perm-sharebtn[data-v-23e7820c]{display:flex;width:100%;align-items:center;justify-content:center;gap:6px;margin-top:8px}.fx-perm-dropintro[data-v-23e7820c]{margin:0 0 12px;line-height:1.4}.fx-perm-advtoggle[data-v-23e7820c]{margin-top:10px;padding-left:2px}.fx-perm-adv[data-v-23e7820c]{margin-top:8px;padding-top:10px;border-top:1px dashed var(--fe-border);display:flex;flex-direction:column;gap:8px}.fx-perm-adv-row[data-v-23e7820c]{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px}.fx-perm-input--sm[data-v-23e7820c]{width:130px;padding:5px 8px;font-size:12px}.fx-perm-warn[data-v-23e7820c]{background:#f59e0b24;border:1px solid rgba(245,158,11,.4);border-radius:var(--fe-radius-sm, 7px);padding:8px 10px;font-size:13px;margin-bottom:10px;color:var(--fe-text)}.fx-perm-notice[data-v-23e7820c]{margin-top:8px;font-size:13px;color:var(--fe-text-muted)}.fx-perm-reveal[data-v-23e7820c]{margin-top:8px;font-size:13px;word-break:break-all;color:var(--fe-text)}.fx-perm-muted[data-v-23e7820c]{color:var(--fe-text-muted);font-size:13px}:root{--fe-bg: #ffffff;--fe-bg-elev: #f7f8fa;--fe-bg-hover: #edf0f5;--fe-bg-selected: #dfe8ff;--fe-border: #e2e6ed;--fe-border-strong: #c7ced9;--fe-text: #1a1e27;--fe-text-muted: #5a6475;--fe-text-on-primary: #ffffff;--fe-primary: #3b82f6;--fe-primary-hover: #2563eb;--fe-danger: #dc2626;--fe-danger-hover: #b91c1c;--fe-shadow: 0 10px 32px rgba(15, 23, 42, .14);--fe-shadow-sm: 0 2px 6px rgba(15, 23, 42, .08);--fe-radius: 8px;--fe-radius-sm: 4px;--fe-radius-lg: 12px;--fe-font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;--fe-font-mono: ui-monospace, "SF Mono", Consolas, Menlo, monospace;--fe-gap: 12px}.fe--theme-dark,:root[data-theme=dark] .fe,.fe.fe--theme-dark,:root.dark,.dark,:root.dark .fe,.dark .fe,.fe-ctx-backdrop--theme-dark,.fe-ctx-backdrop--theme-auto[data-prefers-dark="1"]{--fe-bg: #0f1419;--fe-bg-elev: #161c25;--fe-bg-hover: #1f2733;--fe-bg-selected: #23324a;--fe-border: #2a323e;--fe-border-strong: #3a4453;--fe-text: #e5e9f0;--fe-text-muted: #8b95a7;--fe-primary: #60a5fa;--fe-primary-hover: #3b82f6;--fe-danger: #f87171;--fe-danger-hover: #ef4444;--fe-shadow: 0 12px 32px rgba(0, 0, 0, .45);--fe-shadow-sm: 0 2px 6px rgba(0, 0, 0, .25)}@media (prefers-color-scheme: dark){.fe:not(.fe--theme-light),.fe-ctx-backdrop--theme-auto:not(.fe-ctx-backdrop--theme-light){--fe-bg: #0f1419;--fe-bg-elev: #161c25;--fe-bg-hover: #1f2733;--fe-bg-selected: #23324a;--fe-border: #2a323e;--fe-border-strong: #3a4453;--fe-text: #e5e9f0;--fe-text-muted: #8b95a7;--fe-primary: #60a5fa;--fe-primary-hover: #3b82f6;--fe-danger: #f87171;--fe-danger-hover: #ef4444;--fe-shadow: 0 12px 32px rgba(0, 0, 0, .45);--fe-shadow-sm: 0 2px 6px rgba(0, 0, 0, .25)}}.fe{position:relative;display:flex;flex-direction:column;min-height:420px;height:100%;background:var(--fe-bg);color:var(--fe-text);font-family:var(--fe-font);font-size:14px;border:1px solid var(--fe-border);border-radius:var(--fe-radius);overflow:hidden;outline:none}.fe *{box-sizing:border-box}.fe__body{flex:1 1 auto;overflow:auto;background:var(--fe-bg)}.fe__presence{flex:0 0 auto;padding:.25rem .75rem;border-bottom:1px solid var(--fe-border, rgba(0, 0, 0, .06))}.fe__loading{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;min-height:240px;height:100%;color:var(--fe-text-muted)}.fe__spinner{width:34px;height:34px;border-radius:50%;border:3px solid color-mix(in srgb,var(--fe-text-muted) 30%,transparent);border-top-color:var(--fe-primary);animation:fe-spin .7s linear infinite}.fe__loading-text{margin:0;font-size:13px}@keyframes fe-spin{to{transform:rotate(360deg)}}.fe__notfound{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:240px;height:100%;color:var(--fe-text-muted);text-align:center;padding:24px}.fe__notfound-icon{font-size:40px;filter:grayscale(1);opacity:.6}.fe__notfound-title{margin:4px 0 0;font-size:15px;font-weight:600;color:var(--fe-text)}.fe__notfound-path{margin:0;font-size:12px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;word-break:break-all;max-width:480px}.fe__notfound-desc{margin:0 0 10px;font-size:13px}.fe__file-input{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}.fe-btn{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;background:var(--fe-bg-elev);border:1px solid var(--fe-border);border-radius:var(--fe-radius-sm);color:var(--fe-text);font:inherit;cursor:pointer;transition:background .12s,border-color .12s;white-space:nowrap}.fe-btn:hover:not(:disabled){background:var(--fe-bg-hover);border-color:var(--fe-border-strong)}.fe-btn:disabled{opacity:.5;cursor:not-allowed}.fe-btn--primary{background:var(--fe-primary);border-color:var(--fe-primary);color:var(--fe-text-on-primary)}.fe-btn--primary:hover:not(:disabled){background:var(--fe-primary-hover);border-color:var(--fe-primary-hover)}.fe-btn--danger{background:var(--fe-danger);border-color:var(--fe-danger);color:var(--fe-text-on-primary)}.fe-btn--danger:hover:not(:disabled){background:var(--fe-danger-hover);border-color:var(--fe-danger-hover)}.fe-btn--icon-only{padding:6px 8px}.fe-btn.is-active{background:var(--fe-bg-selected);border-color:var(--fe-primary)}.fe-btn__label{line-height:1}.fe-icon{font-size:1.05em;line-height:1}.fe-toolbar{display:flex;align-items:center;gap:8px;padding:10px 12px;background:var(--fe-bg-elev);border-bottom:1px solid var(--fe-border);flex-wrap:wrap}.fe-toolbar__primary{display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap}.fe-toolbar__spacer{flex:1 1 auto}.fe-toolbar__search-group{display:inline-flex;align-items:center;gap:4px;background:var(--fe-bg);border:1px solid var(--fe-border);border-radius:var(--fe-radius-sm);padding:2px}.fe-toolbar__search-group .fe-search__input{border:0;background:transparent;padding:4px 8px}.fe-toolbar__search-group .fe-btn{border:0;background:transparent;padding:4px 6px}.fe-toolbar__search-group .fe-btn:hover:not(:disabled){background:var(--fe-bg-hover)}.fe-toolbar__view{display:inline-flex;gap:2px;padding:2px;background:var(--fe-bg);border:1px solid var(--fe-border);border-radius:var(--fe-radius-sm)}.fe-toolbar__view .fe-btn{border:0;background:transparent}.fe-toolbar__view .fe-btn.is-active{background:var(--fe-bg-selected)}.fe-search{position:relative}.fe-search__input{background:var(--fe-bg);border:1px solid var(--fe-border);border-radius:var(--fe-radius-sm);padding:6px 10px;font:inherit;color:var(--fe-text);min-width:200px}.fe-search__input:focus-visible{outline:2px solid var(--fe-primary);outline-offset:1px}.fe-breadcrumb{display:flex;align-items:center;gap:4px;flex-wrap:wrap;padding:6px 12px;background:var(--fe-bg);border-bottom:1px solid var(--fe-border);font-size:13px;color:var(--fe-text-muted)}.fe-breadcrumb__crumb{display:inline-flex;align-items:center;gap:4px;background:transparent;border:0;color:inherit;padding:2px 6px;border-radius:var(--fe-radius-sm);cursor:pointer;font:inherit}.fe-breadcrumb__crumb:hover{background:var(--fe-bg-hover);color:var(--fe-text)}.fe-breadcrumb__crumb.is-last{color:var(--fe-text);font-weight:600}.fe-breadcrumb__sep{color:var(--fe-text-muted)}.fe-breadcrumb__edit{margin-left:auto;background:none;border:1px solid transparent;color:var(--fe-text-muted);cursor:pointer;font-size:14px;line-height:1;padding:4px 8px;border-radius:4px}.fe-breadcrumb__edit:hover{background:var(--fe-bg-hover);color:var(--fe-text);border-color:var(--fe-border)}.fe-breadcrumb__input{flex:1;background:var(--fe-bg);color:var(--fe-text);border:1px solid var(--fe-accent, #2563eb);border-radius:4px;padding:4px 8px;font-family:var(--fe-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);font-size:13px;outline:none}.fe-list{display:flex;flex-direction:column}.fe-list__head{display:grid;grid-template-columns:32px minmax(0,1fr) 120px 180px;gap:8px;padding:8px 12px;font-weight:600;color:var(--fe-text-muted);font-size:12px;text-transform:uppercase;letter-spacing:.04em;background:var(--fe-bg-elev);border-bottom:1px solid var(--fe-border)}.fe-list__body{display:flex;flex-direction:column}.fe-list__row{display:grid;grid-template-columns:32px minmax(0,1fr) 120px 180px;gap:8px;padding:8px 12px;align-items:center;cursor:pointer;border-bottom:1px solid var(--fe-border);transition:background .08s;-webkit-user-select:none;user-select:none}.fe-list__row:hover{background:var(--fe-bg-hover)}.fe-list__row.is-selected{background:var(--fe-bg-selected)}.fe-list__row.is-trash{opacity:.7}.fe-list__row.is-clipped,.fe-grid__card.is-clipped{opacity:.45;font-style:italic}.fe-list__row:focus-visible{outline:2px solid var(--fe-primary);outline-offset:-2px}.fe-list__col--star{display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .12s}.fe-list__row:hover .fe-list__col--star,.fe-list__row:focus-within .fe-list__col--star,.fe-list__col--star:has(.is-starred){opacity:1}.fe-list__col--star .filex-star-btn.is-starred{color:var(--fe-warning, #f59e0b)}.fe-list__col--name{display:flex;align-items:center;gap:8px;min-width:0}.fe-list__icon{flex-shrink:0;font-size:16px}.fe-list__name-wrap{display:flex;flex-direction:column;min-width:0;flex:1 1 auto}.fe-list__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fe-list__parent{font-size:11px;color:var(--fe-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:2px}.fe-list__col--size,.fe-list__col--mod{color:var(--fe-text-muted);font-size:13px}.fe-list__empty{padding:40px 20px;text-align:center;color:var(--fe-text-muted)}.fe-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:var(--fe-gap);padding:var(--fe-gap)}.fe-grid__card{display:flex;flex-direction:column;align-items:stretch;padding:8px;border:1px solid var(--fe-border);border-radius:var(--fe-radius);background:var(--fe-bg-elev);cursor:pointer;transition:background .08s,border-color .08s;-webkit-user-select:none;user-select:none}.fe-grid__card:hover{background:var(--fe-bg-hover);border-color:var(--fe-border-strong)}.fe-grid__card.is-selected{background:var(--fe-bg-selected);border-color:var(--fe-primary)}.fe-grid__card.is-trash{opacity:.7}.fe-grid__thumb{display:flex;align-items:center;justify-content:center;aspect-ratio:1 / 1;background:var(--fe-bg);border-radius:var(--fe-radius-sm);margin-bottom:8px;overflow:hidden}.fe-grid__thumb img{width:100%;height:100%;object-fit:cover}.fe-grid__icon{font-size:32px}.fe-grid__label{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fe-grid__meta{font-size:11px;color:var(--fe-text-muted);margin-top:2px}.fe-grid__parent{font-size:11px;color:var(--fe-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:2px;font-style:italic}.fe-grid__empty{grid-column:1 / -1;padding:40px 20px;text-align:center;color:var(--fe-text-muted)}.fe__dragover{position:absolute;top:0;right:0;bottom:0;left:0;z-index:30;display:flex;align-items:center;justify-content:center;background:#3b82f61f;border:3px dashed var(--fe-primary);pointer-events:none}.fe__dragover-card{background:var(--fe-bg);border-radius:var(--fe-radius-lg);padding:24px 40px;box-shadow:var(--fe-shadow);text-align:center}.fe__dragover-card .fe-icon{font-size:32px;display:block;margin-bottom:8px}.fe-upload{position:absolute;right:16px;bottom:16px;width:min(360px,calc(100% - 32px));background:var(--fe-bg);border:1px solid var(--fe-border);border-radius:var(--fe-radius);box-shadow:var(--fe-shadow);z-index:40;max-height:40vh;display:flex;flex-direction:column;overflow:hidden}.fe-upload__header{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;background:var(--fe-bg-elev);border-bottom:1px solid var(--fe-border);font-size:13px}.fe-upload__count{background:var(--fe-primary);color:var(--fe-text-on-primary);font-size:12px;padding:1px 7px;border-radius:999px}.fe-upload__list{list-style:none;padding:0;margin:0;overflow:auto}.fe-upload__item{padding:10px 14px;border-bottom:1px solid var(--fe-border)}.fe-upload__item:last-child{border-bottom:0}.fe-upload__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;margin-bottom:4px}.fe-upload__bar{background:var(--fe-bg-elev);border-radius:99px;height:6px;overflow:hidden;margin-bottom:4px}.fe-upload__bar-fill{background:var(--fe-primary);height:100%;transition:width .2s}.fe-upload__item.is-error .fe-upload__bar-fill,.fe-upload__item.is-aborted .fe-upload__bar-fill{background:var(--fe-danger)}.fe-upload__item.is-done .fe-upload__bar-fill{background:#16a34a}.fe-upload__meta{display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:11px;color:var(--fe-text-muted)}.fe-upload__cancel{background:transparent;border:0;color:var(--fe-primary);cursor:pointer;font:inherit}.fe-upload-slide-enter-active,.fe-upload-slide-leave-active{transition:transform .2s,opacity .2s}.fe-upload-slide-enter-from,.fe-upload-slide-leave-to{opacity:0;transform:translateY(10px)}.fe-ops{position:absolute;left:16px;bottom:16px;width:min(320px,calc(100% - 32px));display:flex;flex-direction:column;gap:8px;z-index:40}.fe-ops__item{background:var(--fe-bg);border:1px solid var(--fe-border);border-radius:var(--fe-radius);box-shadow:var(--fe-shadow);padding:10px 14px;font-size:13px}.fe-ops__item.is-done{border-color:#16a34a}.fe-ops__item.is-error{border-color:var(--fe-danger)}.fe-ops__row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px}.fe-ops__title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 1 auto}.fe-ops__dismiss{background:transparent;border:0;color:var(--fe-text-muted);cursor:pointer;font-size:18px;line-height:1;padding:0 4px}.fe-ops__bar{background:var(--fe-bg-elev);border-radius:99px;height:6px;overflow:hidden}.fe-ops__bar-fill{background:var(--fe-primary);height:100%;transition:width .25s}.fe-ops__item.is-done .fe-ops__bar-fill{background:#16a34a}.fe-ops__item.is-error .fe-ops__bar-fill{background:var(--fe-danger)}.fe-ops__error{margin-top:6px;font-size:11px;color:var(--fe-danger)}.fe-ops-slide-enter-active,.fe-ops-slide-leave-active{transition:transform .2s,opacity .2s}.fe-ops-slide-enter-from,.fe-ops-slide-leave-to{opacity:0;transform:translateY(10px)}.fe-ctx-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:80;color:var(--fe-text);font-family:var(--fe-font);font-size:14px}.fe-ctx{position:absolute;min-width:180px;background:var(--fe-bg);border:1px solid var(--fe-border);border-radius:var(--fe-radius);box-shadow:var(--fe-shadow);padding:4px;z-index:90;color:var(--fe-text)}.fe-ctx__item{display:flex;align-items:center;gap:8px;padding:6px 10px;border-radius:var(--fe-radius-sm);border:0;background:transparent;color:var(--fe-text);font:inherit;width:100%;text-align:left;cursor:pointer}.fe-ctx__item:hover:not(.is-disabled){background:var(--fe-bg-hover)}.fe-ctx__item.is-danger{color:var(--fe-danger)}.fe-ctx__item.is-disabled{opacity:.45;cursor:not-allowed}.fe-ctx__icon{width:1.2em;text-align:center}.fe-ctx__sep{height:1px;background:var(--fe-border);margin:4px 0}.fe-ctx-enter-active,.fe-ctx-leave-active{transition:opacity .1s}.fe-ctx-enter-from,.fe-ctx-leave-to{opacity:0}.fe-modal__backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:70;display:flex;align-items:center;justify-content:center;background:#0d131b7a;padding:16px}.fe-modal__card{background:var(--fe-bg);border-radius:var(--fe-radius);box-shadow:var(--fe-shadow);width:100%;max-height:calc(100vh - 32px);display:flex;flex-direction:column;overflow:hidden}.fe-modal__card--sm{max-width:420px}.fe-modal__card--md{max-width:560px}.fe-modal__card--lg{max-width:800px}.fe-modal__card--xl{max-width:1080px;height:calc(100vh - 64px)}.fe-recents__backdrop{align-items:flex-start!important;padding-top:60px}.fe-recents__panel{background:var(--fe-bg, #fff);border-radius:var(--fe-radius, 8px);box-shadow:var(--fe-shadow, 0 6px 24px rgba(0, 0, 0, .18));width:min(480px,calc(100vw - 32px));max-height:calc(100vh - 96px);display:flex;flex-direction:column;overflow:hidden}.fe-recents__header{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:1px solid var(--fe-border, #e2e6ed)}.fe-recents__close{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;font-size:22px;line-height:1;cursor:pointer;color:var(--fe-text-muted, #6b7280);padding:0 4px}.fe-recents__close:hover{color:var(--fe-text, #111)}.fe-preview__md-split{display:flex;flex-direction:column;height:100%;width:100%;min-height:0}.fe-preview__md-split-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 14px;background:var(--fe-bg-elev, #f6f7f9);border-bottom:1px solid var(--fe-border, #e2e6ed);flex:0 0 auto}.fe-preview__md-split-label{font-family:var(--fe-font-mono, ui-monospace, monospace);font-size:11px;letter-spacing:.06em;color:var(--fe-text-muted, #6b7280)}.fe-preview__md-split-error{flex:1 1 auto;font-size:12px;color:var(--fe-danger, #dc2626);text-align:center}.fe-preview__md-split-body{flex:1 1 auto;display:grid;grid-template-columns:1fr 1fr;min-height:0}.fe-preview__md-split-input{resize:none;border:0;outline:0;padding:16px 20px;font-family:var(--fe-font-mono, ui-monospace, monospace);font-size:13px;line-height:1.6;background:var(--fe-bg, #fff);color:var(--fe-text, #111);border-right:1px solid var(--fe-border, #e2e6ed);overflow:auto;-moz-tab-size:2;tab-size:2}.fe-preview__md-split-output{overflow:auto;padding:16px 24px;background:var(--fe-bg, #fff)}.fe-preview__md-split-output.fe-preview__md{max-height:none;min-height:0;height:100%}@media (max-width: 900px){.fe-preview__md-split-body{grid-template-columns:1fr;grid-template-rows:1fr 1fr}.fe-preview__md-split-input{border-right:0;border-bottom:1px solid var(--fe-border, #e2e6ed)}}.fe-modal__backdrop--chromeless{background:transparent;padding:0}.fe-modal__card--chromeless{max-width:none;width:100vw;height:100vh;max-height:100vh;border-radius:0;box-shadow:none}.fe-modal__card--chromeless .fe-modal__body{flex:1 1 auto;min-height:0;padding:0}.fe-modal__card--chromeless .fe-preview{align-items:stretch;justify-content:stretch;min-height:0;flex:1 1 auto}.fe-modal__card--chromeless .fe-preview>*{width:100%;height:100%}.fe-modal__head{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid var(--fe-border)}.fe-modal__title{font-size:16px;font-weight:600;margin:0}.fe-modal__close{background:transparent;border:0;color:var(--fe-text-muted);font-size:22px;cursor:pointer;padding:0 4px;line-height:1}.fe-modal__body{padding:16px;overflow:auto;flex:1 1 auto}.fe-modal__actions{display:flex;justify-content:flex-end;gap:8px;padding:12px 16px;border-top:1px solid var(--fe-border);background:var(--fe-bg-elev)}.fe-modal-enter-active,.fe-modal-leave-active{transition:opacity .15s}.fe-modal-enter-from,.fe-modal-leave-to{opacity:0}.fe-input{width:100%;padding:8px 10px;background:var(--fe-bg);border:1px solid var(--fe-border);border-radius:var(--fe-radius-sm);font:inherit;color:var(--fe-text)}.fe-input:focus-visible{outline:2px solid var(--fe-primary);outline-offset:1px}.fe-input--mono{font-family:var(--fe-font-mono);letter-spacing:.1em}.fe-form{display:flex;flex-direction:column;gap:12px}.fe-form__row{display:flex;align-items:center;gap:8px}.fe-form__row--stack{flex-direction:column;align-items:stretch}.fe-form__error{color:var(--fe-danger);font-size:12px;margin:6px 0 0}.fe-share-result{display:flex;flex-direction:column;gap:12px}.fe-share-result__row label{display:block;font-size:12px;font-weight:600;color:var(--fe-text-muted);margin-bottom:4px}.fe-share-result__copy{display:flex;gap:6px}.fe-preview{display:flex;align-items:center;justify-content:center;width:100%;height:100%;min-height:50vh;background:var(--fe-bg-elev)}.fe-preview__image{max-width:100%;max-height:70vh;object-fit:contain}.fe-preview__video,.fe-preview__audio{max-width:100%;max-height:70vh}.fe-preview__iframe{width:100%;height:70vh;border:0;background:#fff}.fe-preview__office{width:100%;height:78vh;background:var(--fe-bg)}.fe-preview__code-wrap{display:flex;flex-direction:column;width:100%;height:78vh}.fe-preview__code-toolbar{display:flex;align-items:center;gap:12px;padding:8px 12px;background:var(--fe-bg-hover, #f3f4f6);border-bottom:1px solid var(--fe-border, #e5e7eb);font-size:12px}.fe-preview__code-lang{font-family:var(--fe-font-mono, ui-monospace, monospace);color:var(--fe-text-muted);text-transform:uppercase;letter-spacing:.04em}.fe-preview__code-toolbar>.fe-btn{margin-left:auto}.fe-preview__code-status{font-size:12px;font-weight:500}.fe-preview__code-status--ok{color:#059669}.fe-preview__code-status--err{color:#dc2626;cursor:help}.fe-preview__code-editor{flex:1;min-height:0;overflow:hidden}.fe-preview__code-editor .cm-editor{height:100%;font-size:13px}.fe-preview__code-editor .cm-scroller{font-family:var(--fe-font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace)}.fe-preview__fallback{text-align:center;color:var(--fe-text-muted);padding:40px 20px}.fe-preview__fallback-icon{font-size:48px;display:block;margin-bottom:12px}.fe-preview__pre{margin:0;padding:16px;width:100%;max-height:70vh;overflow:auto;background:var(--fe-bg);color:var(--fe-text);font-family:var(--fe-font-mono);font-size:13px;line-height:1.5;white-space:pre-wrap;word-wrap:break-word}.fe-preview__code{white-space:pre;word-wrap:normal}.hljs{background:var(--fe-bg);color:var(--fe-text)}.hljs-comment,.hljs-quote{color:var(--fe-text-muted);font-style:italic}.hljs-keyword,.hljs-selector-tag,.hljs-built_in,.hljs-section,.hljs-meta{color:#c678dd}.hljs-string,.hljs-attr,.hljs-symbol,.hljs-bullet,.hljs-addition,.hljs-link{color:#98c379}.hljs-number,.hljs-literal,.hljs-deletion{color:#d19a66}.hljs-title,.hljs-name,.hljs-selector-id,.hljs-selector-class,.hljs-template-tag,.hljs-template-variable{color:#61aeee}.hljs-type,.hljs-tag{color:#e06c75}.hljs-variable,.hljs-attribute{color:#d19a66}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.fe-preview__md{width:100%;max-height:70vh;overflow:auto;padding:24px 32px;background:var(--fe-bg);color:var(--fe-text);line-height:1.6;font-size:15px}.fe-preview__md h1,.fe-preview__md h2,.fe-preview__md h3,.fe-preview__md h4{margin:1.2em 0 .6em;font-weight:600}.fe-preview__md h1{font-size:1.8em;border-bottom:1px solid var(--fe-border);padding-bottom:.3em}.fe-preview__md h2{font-size:1.4em;border-bottom:1px solid var(--fe-border);padding-bottom:.3em}.fe-preview__md h3{font-size:1.2em}.fe-preview__md p{margin:.8em 0}.fe-preview__md a{color:var(--fe-primary);text-decoration:underline}.fe-preview__md code{font-family:var(--fe-font-mono);background:var(--fe-bg-elev);padding:1px 5px;border-radius:3px;font-size:.92em}.fe-preview__md pre{background:var(--fe-bg-elev);border:1px solid var(--fe-border);border-radius:var(--fe-radius-sm);padding:12px 16px;overflow:auto;font-size:.9em}.fe-preview__md pre code{background:transparent;padding:0}.fe-preview__md ul,.fe-preview__md ol{padding-left:2em;margin:.8em 0}.fe-preview__md li{margin:.3em 0}.fe-preview__md blockquote{border-left:3px solid var(--fe-border-strong);padding:0 1em;color:var(--fe-text-muted);margin:.8em 0}.fe-preview__md table{border-collapse:collapse;margin:1em 0;width:100%}.fe-preview__md th,.fe-preview__md td{border:1px solid var(--fe-border);padding:6px 10px;text-align:left}.fe-preview__md th{background:var(--fe-bg-elev)}.fe-preview__md img{max-width:100%}.fe-toast{position:absolute;bottom:24px;left:50%;transform:translate(-50%);background:var(--fe-text);color:var(--fe-bg);padding:8px 14px;border-radius:var(--fe-radius);font-size:13px;box-shadow:var(--fe-shadow-sm);z-index:95}.fe-toast-enter-active,.fe-toast-leave-active{transition:opacity .2s,transform .2s}.fe-toast-enter-from,.fe-toast-leave-to{opacity:0;transform:translate(-50%,10px)}@media (max-width: 640px){.fe-list__head,.fe-list__row{grid-template-columns:28px minmax(0,1fr) 90px}.fe-list__col--mod{display:none}.fe-toolbar{padding:8px}.fe-search__input{min-width:120px}}.filex-viewer-3d[data-v-f9492fd4]{width:100%;height:100%;min-height:480px;background:#1a1a1a;display:flex;align-items:center;justify-content:center}.filex-viewer-3d[data-v-f9492fd4] model-viewer{width:100%;height:100%;min-height:480px;background:#1a1a1a;display:block}.filex-viewer-fallback[data-v-f9492fd4]{text-align:center;color:#c8cdd6;padding:32px;max-width:480px}.filex-viewer-fallback__icon[data-v-f9492fd4]{font-size:48px;display:block;margin-bottom:12px}.filex-viewer-epub__nav[data-v-12eb7133]{position:absolute;bottom:12px;left:50%;transform:translate(-50%);display:flex;gap:8px;padding:4px 8px;background:var(--fe-bg-elev, rgba(255, 255, 255, .9));border:1px solid var(--fe-border, #e2e6ed);border-radius:6px;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.filex-viewer-epub[data-v-12eb7133]{display:flex;flex-direction:column;width:100%;height:100%;min-height:70vh;background:var(--fe-bg, #fff);color:var(--fe-text, #1a1e27);position:relative}.filex-viewer-epub__bar[data-v-12eb7133]{display:flex;align-items:center;gap:6px;padding:8px 12px;background:var(--fe-bg-elev, #f7f8fa);border-bottom:1px solid var(--fe-border, #e2e6ed);font-size:13px}.filex-viewer-spacer[data-v-12eb7133]{flex:1}.filex-viewer-epub__fs[data-v-12eb7133]{display:inline-block;min-width:40px;text-align:center;font-variant-numeric:tabular-nums;font-size:12px;color:var(--fe-text-muted, #5a6475)}.filex-viewer-epub__main[data-v-12eb7133]{flex:1;min-height:0;display:flex}.filex-viewer-epub__rendition[data-v-12eb7133]{flex:1;min-height:0}.filex-viewer-epub__toc[data-v-12eb7133]{width:260px;border-right:1px solid var(--fe-border, #e2e6ed);overflow-y:auto;padding:12px 0;background:var(--fe-bg-elev, #f7f8fa)}.filex-viewer-epub__toc ul[data-v-12eb7133]{list-style:none;margin:0;padding:0}.filex-viewer-epub__toc-link[data-v-12eb7133]{display:block;width:100%;text-align:left;background:transparent;border:0;padding:6px 14px;font:inherit;color:inherit;cursor:pointer}.filex-viewer-epub__toc-link[data-v-12eb7133]:hover{background:var(--fe-bg-hover, #edf0f5)}.filex-viewer-epub__toc-link.is-child[data-v-12eb7133]{padding-left:28px;color:var(--fe-text-muted, #5a6475);font-size:12px}.filex-viewer-epub__loading[data-v-12eb7133]{position:absolute;inset:auto 0 0 0;text-align:center;padding:6px;background:#0000000d;font-size:12px;color:var(--fe-text-muted, #5a6475)}.filex-viewer-fallback[data-v-12eb7133]{text-align:center;padding:32px;color:var(--fe-text-muted, #5a6475)}.filex-viewer-fallback__icon[data-v-12eb7133]{font-size:48px;display:block;margin-bottom:12px}.filex-viewer-btn[data-v-12eb7133]{border:1px solid var(--fe-border, #e2e6ed);background:var(--fe-bg, #fff);color:var(--fe-text, #1a1e27);padding:4px 10px;border-radius:4px;cursor:pointer;font:inherit;font-size:12px}.filex-viewer-btn[data-v-12eb7133]:hover:not(:disabled){background:var(--fe-bg-hover, #edf0f5)}.filex-viewer-btn[data-v-12eb7133]:disabled{opacity:.5;cursor:not-allowed}.filex-viewer-mermaid[data-v-939eea2b]{display:flex;flex-direction:column;width:100%;height:100%;min-height:70vh;background:var(--fe-bg, #fff);color:var(--fe-text, #1a1e27)}.filex-viewer-mermaid__bar[data-v-939eea2b]{display:flex;align-items:center;gap:6px;padding:8px 12px;background:var(--fe-bg-elev, #f7f8fa);border-bottom:1px solid var(--fe-border, #e2e6ed);font-size:13px}.filex-viewer-mermaid__zoom[data-v-939eea2b]{min-width:50px;text-align:center;font-variant-numeric:tabular-nums;font-size:12px}.filex-viewer-mermaid__pane[data-v-939eea2b]{flex:1;overflow:hidden;position:relative;cursor:grab;background:var(--fe-bg-elev, #f7f8fa);touch-action:none}.filex-viewer-mermaid__pane[data-v-939eea2b]:active{cursor:grabbing}.filex-viewer-mermaid__surface[data-v-939eea2b]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;transform-origin:center center;transition:transform .05s linear;-webkit-user-select:none;user-select:none}.filex-viewer-mermaid__surface[data-v-939eea2b] svg{max-width:90%;max-height:90%}.filex-viewer-fallback[data-v-939eea2b]{text-align:center;padding:32px;color:var(--fe-text-muted, #5a6475);width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}.filex-viewer-fallback__icon[data-v-939eea2b]{font-size:48px;display:block;margin-bottom:12px}.filex-viewer-btn[data-v-939eea2b]{border:1px solid var(--fe-border, #e2e6ed);background:var(--fe-bg, #fff);color:var(--fe-text, #1a1e27);padding:4px 10px;border-radius:4px;cursor:pointer;font:inherit;font-size:12px}.filex-viewer-btn[data-v-939eea2b]:hover:not(:disabled){background:var(--fe-bg-hover, #edf0f5)}.filex-viewer-drawio[data-v-2e4b5f3b]{display:flex;flex-direction:column;width:100%;height:100%;min-height:70vh;background:var(--fe-bg, #fff)}.filex-viewer-drawio__bar[data-v-2e4b5f3b]{display:flex;align-items:center;gap:12px;padding:6px 12px;background:var(--fe-bg-elev, #f7f8fa);border-bottom:1px solid var(--fe-border, #e2e6ed);font-size:12px;color:var(--fe-text-muted, #5a6475)}.filex-viewer-drawio__status[data-state=error][data-v-2e4b5f3b]{color:var(--fe-danger, #dc2626)}.filex-viewer-drawio__status[data-state=saved][data-v-2e4b5f3b]{color:#059669}.filex-viewer-drawio__readonly[data-v-2e4b5f3b]{font-style:italic;margin-left:auto}.filex-viewer-drawio__frame[data-v-2e4b5f3b]{flex:1;width:100%;border:0;background:#fafafa;min-height:0}.filex-viewer-fallback[data-v-2e4b5f3b]{text-align:center;padding:32px;color:var(--fe-text-muted, #5a6475)}.filex-viewer-fallback__icon[data-v-2e4b5f3b]{font-size:48px;display:block;margin-bottom:12px}.filex-viewer-tiff__pager[data-v-c6b84f5d]{position:absolute;bottom:12px;left:50%;transform:translate(-50%);display:flex;align-items:center;gap:8px;padding:4px 8px;background:var(--fe-bg-elev, rgba(255, 255, 255, .9));border:1px solid var(--fe-border, #e2e6ed);border-radius:6px;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.filex-viewer-tiff__pages[data-v-c6b84f5d]{font-size:12px;font-variant-numeric:tabular-nums}.filex-viewer-tiff[data-v-c6b84f5d]{display:flex;flex-direction:column;width:100%;height:100%;min-height:70vh;background:var(--fe-bg, #fff)}.filex-viewer-tiff__bar[data-v-c6b84f5d]{display:flex;align-items:center;gap:6px;padding:8px 12px;background:var(--fe-bg-elev, #f7f8fa);border-bottom:1px solid var(--fe-border, #e2e6ed);font-size:13px}.filex-viewer-tiff__pages[data-v-c6b84f5d]{min-width:110px;text-align:center;font-variant-numeric:tabular-nums;font-size:12px}.filex-viewer-tiff__zoom[data-v-c6b84f5d]{min-width:50px;text-align:center;font-variant-numeric:tabular-nums;font-size:12px}.filex-viewer-spacer[data-v-c6b84f5d]{flex:1}.filex-viewer-tiff__pane[data-v-c6b84f5d]{flex:1;overflow:auto;padding:16px;background:#2a2d33;display:flex;align-items:flex-start;justify-content:flex-start}.filex-viewer-tiff__pane canvas[data-v-c6b84f5d]{background:#fff;box-shadow:0 4px 16px #0000004d}.filex-viewer-fallback[data-v-c6b84f5d]{text-align:center;padding:32px;color:#c8cdd6;margin:auto}.filex-viewer-fallback__icon[data-v-c6b84f5d]{font-size:48px;display:block;margin-bottom:12px}.filex-viewer-btn[data-v-c6b84f5d]{border:1px solid var(--fe-border, #e2e6ed);background:var(--fe-bg, #fff);color:var(--fe-text, #1a1e27);padding:4px 10px;border-radius:4px;cursor:pointer;font:inherit;font-size:12px}.filex-viewer-btn[data-v-c6b84f5d]:hover:not(:disabled){background:var(--fe-bg-hover, #edf0f5)}.filex-viewer-btn[data-v-c6b84f5d]:disabled{opacity:.4;cursor:not-allowed}.filex-viewer-psd[data-v-001123c3]{display:flex;flex-direction:column;width:100%;height:100%;min-height:70vh;background:var(--fe-bg, #fff)}.filex-viewer-psd__bar[data-v-001123c3]{display:flex;align-items:center;gap:6px;padding:8px 12px;background:var(--fe-bg-elev, #f7f8fa);border-bottom:1px solid var(--fe-border, #e2e6ed);font-size:13px}.filex-viewer-spacer[data-v-001123c3]{flex:1}.filex-viewer-psd__dim[data-v-001123c3]{font-size:12px;color:var(--fe-text-muted, #5a6475)}.filex-viewer-psd__zoom[data-v-001123c3]{min-width:50px;text-align:center;font-variant-numeric:tabular-nums;font-size:12px}.filex-viewer-psd__main[data-v-001123c3]{flex:1;display:flex;min-height:0}.filex-viewer-psd__layers[data-v-001123c3]{width:240px;border-right:1px solid var(--fe-border, #e2e6ed);overflow-y:auto;padding:8px 0;background:var(--fe-bg-elev, #f7f8fa)}.filex-viewer-psd__layers ul[data-v-001123c3]{list-style:none;margin:0;padding:0}.filex-viewer-psd__layers li[data-v-001123c3]{display:flex;align-items:center;gap:6px;padding:4px 12px;font-size:12px}.filex-viewer-psd__layer-vis[data-v-001123c3]{width:14px;text-align:center;color:var(--fe-text-muted, #5a6475)}.filex-viewer-psd__layer-vis[data-hidden="1"][data-v-001123c3]{color:var(--fe-border-strong, #c7ced9)}.filex-viewer-psd__layer-name[data-v-001123c3]{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.filex-viewer-psd__pane[data-v-001123c3]{flex:1;overflow:auto;padding:16px;background:#2a2d33;display:flex;align-items:flex-start;justify-content:flex-start}.filex-viewer-psd__pane canvas[data-v-001123c3]{background:#fff repeating-conic-gradient(#e0e0e0 0% 25%,transparent 0% 50%) 50% / 16px 16px;box-shadow:0 4px 16px #0000004d}.filex-viewer-fallback[data-v-001123c3]{text-align:center;padding:32px;color:#c8cdd6;margin:auto}.filex-viewer-fallback__icon[data-v-001123c3]{font-size:48px;display:block;margin-bottom:12px}.filex-viewer-btn[data-v-001123c3]{border:1px solid var(--fe-border, #e2e6ed);background:var(--fe-bg, #fff);color:var(--fe-text, #1a1e27);padding:4px 10px;border-radius:4px;cursor:pointer;font:inherit;font-size:12px}.filex-viewer-btn[data-v-001123c3]:hover:not(:disabled){background:var(--fe-bg-hover, #edf0f5)}.filex-viewer-btn.is-active[data-v-001123c3]{background:var(--fe-bg-selected, #dfe8ff);border-color:var(--fe-primary, #3b82f6)}.filex-viewer-ipynb[data-v-eece712d]{display:flex;flex-direction:column;width:100%;height:100%;min-height:70vh;background:var(--fe-bg, #fff);color:var(--fe-text, #1a1e27)}.filex-viewer-ipynb__bar[data-v-eece712d]{display:flex;align-items:center;gap:12px;padding:8px 12px;background:var(--fe-bg-elev, #f7f8fa);border-bottom:1px solid var(--fe-border, #e2e6ed);font-size:12px;color:var(--fe-text-muted, #5a6475)}.filex-viewer-ipynb__lang[data-v-eece712d]{font-family:var(--fe-font-mono, monospace);text-transform:uppercase;letter-spacing:.04em}.filex-viewer-ipynb__pane[data-v-eece712d]{flex:1;overflow:auto;padding:16px 24px}.filex-viewer-ipynb__cell[data-v-eece712d]{border:1px solid var(--fe-border, #e2e6ed);border-radius:6px;margin-bottom:16px;overflow:hidden}.filex-viewer-ipynb__cell[data-type=code][data-v-eece712d]{background:var(--fe-bg-elev, #f7f8fa)}.filex-viewer-ipynb__exec[data-v-eece712d]{padding:4px 12px;font-family:var(--fe-font-mono, monospace);font-size:11px;color:var(--fe-text-muted, #5a6475);background:#0000000a}.filex-viewer-ipynb__src[data-v-eece712d]{margin:0;padding:12px;font-family:var(--fe-font-mono, monospace);font-size:12px;line-height:1.5;white-space:pre;overflow-x:auto}.filex-viewer-ipynb__outputs[data-v-eece712d]{border-top:1px dashed var(--fe-border, #e2e6ed);background:var(--fe-bg, #fff);padding:8px 12px}.filex-viewer-ipynb__out[data-v-eece712d]{margin:0;padding:4px 0;font-family:var(--fe-font-mono, monospace);font-size:12px;white-space:pre-wrap;word-wrap:break-word}.filex-viewer-ipynb__out[data-type=error][data-v-eece712d]{color:var(--fe-danger, #dc2626)}.filex-viewer-ipynb__img[data-v-eece712d]{display:block;max-width:100%;height:auto;margin:8px 0}.filex-viewer-ipynb__html[data-v-eece712d]{font-size:13px}.filex-viewer-ipynb__md[data-v-eece712d]{padding:12px 16px;font-size:14px;line-height:1.6}.filex-viewer-ipynb__md-raw[data-v-eece712d]{padding:12px;margin:0;font-family:var(--fe-font-mono, monospace);font-size:12px;white-space:pre-wrap}.filex-viewer-fallback[data-v-eece712d]{text-align:center;padding:32px;color:var(--fe-text-muted, #5a6475)}.filex-viewer-fallback__icon[data-v-eece712d]{font-size:48px;display:block;margin-bottom:12px}.filex-viewer-csv[data-v-db55a104]{display:flex;flex-direction:column;width:100%;height:100%;min-height:70vh;background:var(--fe-bg, #fff);color:var(--fe-text, #1a1e27)}.filex-viewer-csv__bar[data-v-db55a104]{display:flex;align-items:center;gap:12px;padding:8px 12px;background:var(--fe-bg-elev, #f7f8fa);border-bottom:1px solid var(--fe-border, #e2e6ed);font-size:12px}.filex-viewer-csv__check[data-v-db55a104]{display:flex;align-items:center;gap:4px;font-size:12px}.filex-viewer-csv__select[data-v-db55a104],.filex-viewer-csv__filter[data-v-db55a104]{border:1px solid var(--fe-border, #e2e6ed);background:var(--fe-bg, #fff);color:inherit;padding:4px 8px;border-radius:4px;font:inherit;font-size:12px}.filex-viewer-csv__filter[data-v-db55a104]{flex:0 1 240px}.filex-viewer-spacer[data-v-db55a104]{flex:1}.filex-viewer-csv__count[data-v-db55a104]{font-size:11px;color:var(--fe-text-muted, #5a6475);font-variant-numeric:tabular-nums}.filex-viewer-csv__pane[data-v-db55a104]{flex:1;overflow:auto}.filex-viewer-csv__table[data-v-db55a104]{border-collapse:collapse;width:max-content;min-width:100%;font-size:12px;font-family:var(--fe-font-mono, monospace)}.filex-viewer-csv__table th[data-v-db55a104],.filex-viewer-csv__table td[data-v-db55a104]{padding:4px 10px;border:1px solid var(--fe-border, #e2e6ed);white-space:nowrap;max-width:320px;overflow:hidden;text-overflow:ellipsis}.filex-viewer-csv__table th[data-v-db55a104]{background:var(--fe-bg-elev, #f7f8fa);position:sticky;top:0;font-weight:600;text-align:left}.filex-viewer-csv__table tbody tr[data-v-db55a104]:nth-child(2n){background:var(--fe-bg-hover, rgba(0, 0, 0, .02))}.filex-viewer-csv__rownum[data-v-db55a104]{color:var(--fe-text-muted, #5a6475);text-align:right;background:var(--fe-bg-elev, #f7f8fa);font-variant-numeric:tabular-nums;position:sticky;left:0}.filex-viewer-csv__pager[data-v-db55a104]{display:flex;justify-content:center;align-items:center;gap:8px;padding:6px;background:var(--fe-bg-elev, #f7f8fa);border-top:1px solid var(--fe-border, #e2e6ed);font-size:12px}.filex-viewer-csv__pageno[data-v-db55a104]{font-variant-numeric:tabular-nums;font-size:12px}.filex-viewer-fallback[data-v-db55a104]{text-align:center;padding:32px;color:var(--fe-text-muted, #5a6475)}.filex-viewer-fallback__icon[data-v-db55a104]{font-size:48px;display:block;margin-bottom:12px}.filex-viewer-btn[data-v-db55a104]{border:1px solid var(--fe-border, #e2e6ed);background:var(--fe-bg, #fff);color:var(--fe-text, #1a1e27);padding:4px 10px;border-radius:4px;cursor:pointer;font:inherit;font-size:12px}.filex-viewer-btn[data-v-db55a104]:hover:not(:disabled){background:var(--fe-bg-hover, #edf0f5)}.filex-viewer-btn[data-v-db55a104]:disabled{opacity:.4;cursor:not-allowed}.filex-viewer-archive[data-v-93df7b13]{display:flex;flex-direction:column;width:100%;height:100%;min-height:70vh;background:var(--fe-bg, #fff);color:var(--fe-text, #1a1e27)}.filex-viewer-archive__pane[data-v-93df7b13]{flex:1;overflow:auto;padding:16px 20px}.filex-viewer-archive__summary[data-v-93df7b13]{font-size:12px;color:var(--fe-text-muted, #5a6475);margin-bottom:12px;font-variant-numeric:tabular-nums}.filex-viewer-archive__table[data-v-93df7b13]{width:100%;border-collapse:collapse;font-size:13px;font-family:var(--fe-font-mono, monospace)}.filex-viewer-archive__table th[data-v-93df7b13],.filex-viewer-archive__table td[data-v-93df7b13]{padding:6px 12px;border-bottom:1px solid var(--fe-border, #e2e6ed);text-align:left}.filex-viewer-archive__table th[data-v-93df7b13]{background:var(--fe-bg-elev, #f7f8fa);font-weight:600;position:sticky;top:0}.filex-viewer-archive__size[data-v-93df7b13]{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--fe-text-muted, #5a6475)}.filex-viewer-archive__icon[data-v-93df7b13]{margin-right:6px}.filex-viewer-archive__table tr[data-dir="1"][data-v-93df7b13]{color:var(--fe-text-muted, #5a6475)}.filex-viewer-fallback[data-v-93df7b13]{text-align:center;padding:32px;color:var(--fe-text-muted, #5a6475)}.filex-viewer-fallback__icon[data-v-93df7b13]{font-size:48px;display:block;margin-bottom:12px}';let dp=!1;function gw(){if(dp||typeof document>"u")return;const e=document.createElement("style");e.setAttribute("data-filex",""),e.textContent=mw,document.head.appendChild(e),dp=!0}function hp(e,t){const r={};return e.apiBase&&(r.apiBase=e.apiBase),e.endpoint&&(r.endpoint=e.endpoint),(e.locale==="tr"||e.locale==="en")&&(r.locale=e.locale),(e.theme==="light"||e.theme==="dark"||e.theme==="auto")&&(r.theme=e.theme),e.trashVisible!==void 0&&(r.trashVisible=e.trashVisible===!0||e.trashVisible==="true"||e.trashVisible===""),{...r,...t??{}}}const pp=b6({props:{config:{type:Object,default:null},apiBase:{type:String,default:""},endpoint:{type:String,default:""},locale:{type:String,default:""},theme:{type:String,default:""},trashVisible:{type:[Boolean,String],default:void 0}},emits:["share-created","file-opened","error","upload-progress","selection-change"],setup(e,{emit:t}){gw();const r=he(hp({apiBase:e.apiBase,endpoint:e.endpoint,locale:e.locale,theme:e.theme,trashVisible:e.trashVisible},e.config));return tr(()=>[e.config,e.apiBase,e.endpoint,e.locale,e.theme,e.trashVisible],()=>{r.value=hp({apiBase:e.apiBase,endpoint:e.endpoint,locale:e.locale,theme:e.theme,trashVisible:e.trashVisible},e.config)},{deep:!0}),()=>Sh(vw,{config:r.value,onShareCreated:n=>t("share-created",n),onFileOpened:n=>t("file-opened",n),onError:n=>t("error",n),onUploadProgress:n=>t("upload-progress",n),onSelectionChange:n=>t("selection-change",n)})}},{shadowRoot:!1}),bw=pp;typeof customElements<"u"&&!customElements.get("filex-explorer")&&customElements.define("filex-explorer",pp);const yw={class:"filex-viewer-3d"},xw={key:1,class:"filex-viewer-fallback"},_w={key:2,class:"filex-viewer-fallback"},mo=Object.freeze(Object.defineProperty({__proto__:null,default:Jr(qt({__name:"Viewer3D",props:{url:{},mime:{},ext:{},t:{type:Function}},setup(e){const t=e,r=new Set(["glb","gltf","usdz"]),n=gt(()=>r.has((t.ext||"").toLowerCase())),a=he(null),i=he(!1);async function o(){if(i.value=!1,a.value=null,!n.value){a.value=t.t?t.t("viewer.format_unsupported_3d"):`3D format ".${t.ext}" not supported in browser preview — please download.`;return}try{await import("@google/model-viewer"),i.value=!0}catch{a.value=t.t?t.t("viewer.peer_not_installed"):"3D viewer requires `@google/model-viewer` — install or use download."}}return pr(o),tr(()=>t.url,()=>{o()}),(l,s)=>{const u=u5("model-viewer");return Q(),ae("div",yw,[i.value&&!a.value?(Q(),kr(u,{key:0,src:e.url,"auto-rotate":"","camera-controls":"","touch-action":"pan-y","shadow-intensity":"1",alt:e.ext+" model",style:{width:"100%",height:"100%","min-height":"480px",display:"block"}},null,8,["src","alt"])):a.value?(Q(),ae("div",xw,[s[0]||(s[0]=L("span",{class:"filex-viewer-fallback__icon"},"📦",-1)),L("p",null,le(a.value),1)])):(Q(),ae("div",_w,[s[1]||(s[1]=L("span",{class:"filex-viewer-fallback__icon"},"⏳",-1)),L("p",null,le(e.t?e.t("viewer.loading"):"Loading…"),1)]))])}}}),[["__scopeId","data-v-299b3816"]])},Symbol.toStringTag,{value:"Module"})),ww={key:0,class:"filex-viewer-fallback"},kw={key:0,class:"filex-viewer-epub__nav"},Sw=["disabled"],Cw=["disabled"],Aw={key:1,class:"filex-viewer-epub__loading"},Ew=Object.freeze(Object.defineProperty({__proto__:null,default:Jr(qt({__name:"EpubViewer",props:{url:{},mime:{},ext:{},t:{type:Function},authHeaders:{type:Function},authCredentials:{}},setup(e){const t=e,r=he(null),n=he(null),a=he(null),i=he([]),o=he(100),l=he(!1),s=he(!0);let u=null,c=null;async function f(){s.value=!0,l.value=!1,a.value=null;let x=null;try{x=await import("epubjs")}catch{a.value=t.t?t.t("viewer.peer_not_installed"):"EPUB viewer requires `epubjs` — install or use download.",s.value=!1;return}try{const g=x.default??x;let m=t.url;if(t.authHeaders){const v=t.authHeaders(),S=await fetch(t.url,{headers:v,credentials:t.authCredentials||"same-origin"});if(!S.ok)throw new Error(`${S.status} ${S.statusText}`);m=await S.arrayBuffer()}if(u=g(m),!n.value)throw new Error("EPUB mount target missing");c=u.renderTo(n.value,{width:"100%",height:"100%",flow:"paginated",manager:"default"}),await c.display(),c.themes.fontSize(o.value+"%");const b=await u.loaded.navigation;i.value=(b==null?void 0:b.toc)??[],l.value=!0}catch(g){a.value=g instanceof Error?g.message:"EPUB load failed"}finally{s.value=!1}}function d(){var x;(x=c==null?void 0:c.next)==null||x.call(c)}function h(){var x;(x=c==null?void 0:c.prev)==null||x.call(c)}function y(x){x.key==="ArrowRight"||x.key==="PageDown"?d():(x.key==="ArrowLeft"||x.key==="PageUp")&&h()}pr(()=>{f(),window.addEventListener("keydown",y)}),Br(()=>{var x,g;window.removeEventListener("keydown",y);try{(x=c==null?void 0:c.destroy)==null||x.call(c)}catch{}try{(g=u==null?void 0:u.destroy)==null||g.call(u)}catch{}c=null,u=null}),tr(()=>t.url,()=>{if(c)try{c.destroy()}catch{}if(u)try{u.destroy()}catch{}u=null,c=null,f()});function p(x,g){return t.t?t.t(x):g}return(x,g)=>(Q(),ae("div",{ref_key:"root",ref:r,class:"filex-viewer-epub"},[a.value?(Q(),ae("div",ww,[g[0]||(g[0]=L("span",{class:"filex-viewer-fallback__icon"},"📖",-1)),L("p",null,le(a.value),1)])):(Q(),ae(yt,{key:1},[L("div",{ref_key:"containerRef",ref:n,class:"filex-viewer-epub__rendition"},null,512),l.value?(Q(),ae("div",kw,[L("button",{type:"button",class:"filex-viewer-btn",onClick:h,disabled:!l.value},"‹",8,Sw),L("button",{type:"button",class:"filex-viewer-btn",onClick:d,disabled:!l.value},"›",8,Cw)])):rt("",!0),s.value?(Q(),ae("div",Aw,le(p("viewer.loading","Loading…")),1)):rt("",!0)],64))],512))}}),[["__scopeId","data-v-639afd99"]])},Symbol.toStringTag,{value:"Module"}));async function vp(e){const t=await fetch(e.url,{headers:e.headers??{},credentials:e.credentials??"same-origin",signal:e.signal});if(!t.ok){const r=await t.text().catch(()=>"");throw new Error(`${t.status} ${t.statusText}${r?" — "+r.slice(0,200):""}`)}return t}async function mp(e){return(await vp(e)).arrayBuffer()}async function Zs(e){return(await vp(e)).text()}const Tw={class:"filex-viewer-mermaid"},Mw={key:0,class:"filex-viewer-fallback"},Dw={key:1,class:"filex-viewer-fallback"},gp=Object.freeze(Object.defineProperty({__proto__:null,default:Jr(qt({__name:"MermaidViewer",props:{url:{},mime:{},ext:{},t:{type:Function},authHeaders:{type:Function},authCredentials:{}},setup(e){const t=e,r=he(null),n=he(null),a=he(!0),i=he(1),o=he(0),l=he(0);let s=!1,u=null,c=0,f=null;async function d(){var b,v;if(f)return f;try{const S=await import("mermaid");return f=S.default??S,(v=f.initialize)==null||v.call(f,{startOnLoad:!1,securityLevel:"strict",theme:(b=window.matchMedia)!=null&&b.call(window,"(prefers-color-scheme: dark)").matches?"dark":"default"}),f}catch{return null}}async function h(){var C;a.value=!0,n.value=null;const b=++c,v=await d();if(b!==c)return;if(!v){n.value=t.t?t.t("viewer.peer_not_installed"):"Mermaid viewer requires `mermaid` — install or use download.",a.value=!1;return}let S;try{S=await Zs({url:t.url,headers:((C=t.authHeaders)==null?void 0:C.call(t))??{},credentials:t.authCredentials})}catch(A){n.value=A instanceof Error?A.message:"fetch failed",a.value=!1;return}if(b===c)try{const A=`filex-mermaid-${Date.now()}`,{svg:_}=await v.render(A,S);if(b!==c)return;if(r.value){r.value.innerHTML=_;const E=r.value.querySelector("svg");E&&(E.style.maxWidth="100%",E.style.height="auto")}}catch(A){n.value=A instanceof Error?A.message:"render failed"}finally{a.value=!1}}function y(b){if(!b.ctrlKey&&!b.metaKey)return;b.preventDefault();const S=-b.deltaY>0?1.1:1/1.1;i.value=Math.max(.2,Math.min(8,i.value*S))}function p(b){var v,S;s=!0,u={x:b.clientX,y:b.clientY,tx:o.value,ty:l.value},(S=(v=b.target).setPointerCapture)==null||S.call(v,b.pointerId)}function x(b){!s||!u||(o.value=u.tx+(b.clientX-u.x),l.value=u.ty+(b.clientY-u.y))}function g(){s=!1,u=null}pr(h),Br(()=>{c++});function m(b,v){return t.t?t.t(b):v}return(b,v)=>(Q(),ae("div",Tw,[L("div",{class:"filex-viewer-mermaid__pane",onWheel:y,onPointerdown:p,onPointermove:x,onPointerup:g,onPointercancel:g},[n.value?(Q(),ae("div",Mw,[v[0]||(v[0]=L("span",{class:"filex-viewer-fallback__icon"},"📊",-1)),L("p",null,le(n.value),1)])):a.value?(Q(),ae("div",Dw,[v[1]||(v[1]=L("span",{class:"filex-viewer-fallback__icon"},"⏳",-1)),L("p",null,le(m("viewer.loading","Loading…")),1)])):rt("",!0),rr(L("div",{ref_key:"surface",ref:r,class:"filex-viewer-mermaid__surface",style:Ea({transform:`translate(${o.value}px, ${l.value}px) scale(${i.value})`})},null,4),[[fc,!a.value&&!n.value]])],32)]))}}),[["__scopeId","data-v-e19076c3"]])},Symbol.toStringTag,{value:"Module"})),Iw={class:"filex-viewer-drawio"},zw={key:0,class:"filex-viewer-fallback"},Fw=["src"],bp=Object.freeze(Object.defineProperty({__proto__:null,default:Jr(qt({__name:"DrawioViewer",props:{url:{},filePath:{},ext:{},drawioUrl:{},saveUrl:{},readOnly:{type:Boolean},t:{type:Function},authHeaders:{type:Function},authCredentials:{}},setup(e){const t=e,r=he(null),n=he(null),a=he("loading"),i=he(!!t.readOnly||!t.saveUrl),o=gt(()=>t.drawioUrl?t.drawioUrl.replace(/\/$/,""):null),l=gt(()=>{if(!o.value)return"";const p=new URLSearchParams({embed:"1",proto:"json",spin:"1",saveAndExit:"0",noSaveBtn:i.value?"1":"0",noExitBtn:"1",ui:"kennedy",modified:"unsavedChanges"});return`${o.value}/?${p.toString()}`});let s="";async function u(){var p;a.value="loading",n.value=null;try{s=await Zs({url:t.url,headers:((p=t.authHeaders)==null?void 0:p.call(t))??{},credentials:t.authCredentials})}catch(x){n.value=x instanceof Error?x.message:"fetch failed",a.value="error"}}function c(p){var x,g;(g=(x=r.value)==null?void 0:x.contentWindow)==null||g.postMessage(JSON.stringify(p),"*")}async function f(p){var x;if(t.saveUrl){a.value="saving";try{const g={"Content-Type":"application/json",...((x=t.authHeaders)==null?void 0:x.call(t))??{}},m=await fetch(t.saveUrl,{method:"POST",headers:g,credentials:t.authCredentials||"same-origin",body:JSON.stringify({path:t.filePath,content:p})});if(!m.ok)throw new Error(`${m.status} ${m.statusText}`);a.value="saved",setTimeout(()=>{a.value==="saved"&&(a.value="ready")},2500)}catch(g){n.value=g instanceof Error?g.message:"save failed",a.value="error"}}}function d(p){if(typeof p.data!="string"||p.data.length===0)return;const x=p.data[0];if(x!=="{"&&x!=="<")return;let g;try{g=JSON.parse(p.data)}catch{return}if(!(!g||typeof g!="object"))switch(g.event){case"init":c({action:"load",xml:s,autosave:0}),a.value="ready";break;case"save":typeof g.xml=="string"&&f(g.xml);break;case"export":break;case"autosave":typeof g.xml=="string"&&!i.value&&f(g.xml);break}}function h(){if(!o.value){n.value=y("viewer.drawio.disabled","Drawio (diagrams.net) yapılandırılmamış."),a.value="error";return}n.value===y("viewer.drawio.disabled","Drawio (diagrams.net) yapılandırılmamış.")&&(n.value=null,a.value="loading"),u()}pr(()=>{window.addEventListener("message",d),h()}),tr(()=>t.drawioUrl,h),Br(()=>{window.removeEventListener("message",d)});function y(p,x){return t.t?t.t(p):x}return(p,x)=>(Q(),ae("div",Iw,[n.value?(Q(),ae("div",zw,[x[0]||(x[0]=L("span",{class:"filex-viewer-fallback__icon"},"📐",-1)),L("p",null,le(n.value),1)])):(Q(),ae("iframe",{key:1,ref_key:"iframeRef",ref:r,src:l.value,class:"filex-viewer-drawio__frame",title:"diagrams.net editor"},null,8,Fw))]))}}),[["__scopeId","data-v-680c72a8"]])},Symbol.toStringTag,{value:"Module"})),Ow={class:"filex-viewer-tiff"},Pw={class:"filex-viewer-tiff__pane"},Rw={key:0,class:"filex-viewer-fallback"},Lw={key:1,class:"filex-viewer-fallback"},Bw={key:2,class:"filex-viewer-tiff__pager"},Nw=["disabled"],$w={class:"filex-viewer-tiff__pages"},Uw=["disabled"],yp=Object.freeze(Object.defineProperty({__proto__:null,default:Jr(qt({__name:"TiffViewer",props:{url:{},mime:{},ext:{},t:{type:Function},authHeaders:{type:Function},authCredentials:{}},setup(e){const t=e,r=he(null),n=he(null),a=he(!0),i=he(0),o=he(0),l=he({width:0,height:0});let s=null,u=null,c=0;async function f(){if(s)return s;try{const m=await Promise.resolve().then(()=>TS);return s=m.default??m,s}catch{return null}}async function d(){var v;a.value=!0,n.value=null,u=null,i.value=0,o.value=0;const m=++c,b=await f();if(m===c){if(!b){n.value=t.t?t.t("viewer.peer_not_installed"):"TIFF viewer requires `utif` — install or use download.",a.value=!1;return}try{const S=await mp({url:t.url,headers:((v=t.authHeaders)==null?void 0:v.call(t))??{},credentials:t.authCredentials});if(m!==c)return;if(u=b.decode(S),o.value=(u==null?void 0:u.length)??0,o.value===0)throw new Error("No pages decoded");h()}catch(S){n.value=S instanceof Error?S.message:"TIFF decode failed"}finally{a.value=!1}}}function h(){if(!s||!u||!r.value)return;const m=Math.max(0,Math.min(i.value,u.length-1)),b=u[m];try{s.decodeImage(void 0,b)}catch{}const v=s.toRGBA8(b),S=b.width,C=b.height;l.value={width:S,height:C};const A=r.value;A.width=S,A.height=C;const _=A.getContext("2d");if(!_)return;const E=_.createImageData(S,C);E.data.set(v),_.putImageData(E,0,0)}function y(){i.value<o.value-1&&(i.value++,h())}function p(){i.value>0&&(i.value--,h())}pr(d),Br(()=>{c++,u=null}),tr(()=>t.url,d);const x=gt(()=>(t.t&&t.t("viewer.page_n_of_m")||"Page {n} of {m}").replace("{n}",String(i.value+1)).replace("{m}",String(o.value)));function g(m,b){return t.t?t.t(m):b}return(m,b)=>(Q(),ae("div",Ow,[L("div",Pw,[n.value?(Q(),ae("div",Rw,[b[0]||(b[0]=L("span",{class:"filex-viewer-fallback__icon"},"🖼️",-1)),L("p",null,le(n.value),1)])):a.value?(Q(),ae("div",Lw,[b[1]||(b[1]=L("span",{class:"filex-viewer-fallback__icon"},"⏳",-1)),L("p",null,le(g("viewer.loading","Loading…")),1)])):rt("",!0),rr(L("canvas",{ref_key:"canvasEl",ref:r,style:{imageRendering:"pixelated"}},null,512),[[fc,!a.value&&!n.value]]),!a.value&&!n.value&&o.value>1?(Q(),ae("div",Bw,[L("button",{type:"button",class:"filex-viewer-btn",disabled:i.value===0,onClick:p},"‹",8,Nw),L("span",$w,le(x.value),1),L("button",{type:"button",class:"filex-viewer-btn",disabled:i.value>=o.value-1,onClick:y},"›",8,Uw)])):rt("",!0)])]))}}),[["__scopeId","data-v-11c3469a"]])},Symbol.toStringTag,{value:"Module"})),Hw={class:"filex-viewer-psd"},jw={class:"filex-viewer-psd__pane"},Gw={key:0,class:"filex-viewer-fallback"},Vw={key:1,class:"filex-viewer-fallback"},qw=Object.freeze(Object.defineProperty({__proto__:null,default:Jr(qt({__name:"PsdViewer",props:{url:{},mime:{},ext:{},t:{type:Function},authHeaders:{type:Function},authCredentials:{}},setup(e){const t=e,r=he(null),n=he([]),a=he(null),i=he(!0),o=he({width:0,height:0});let l=0,s=null;async function u(){if(s)return s;try{return s=await Promise.resolve().then(()=>qT),s}catch{return null}}function c(h,y){if(h&&Array.isArray(h.children))for(const p of h.children)y.push({index:y.length,name:p.name??"(unnamed)",hidden:!!p.hidden}),p.children&&c(p,y)}async function f(){var p;i.value=!0,a.value=null,n.value=[];const h=++l,y=await u();if(h===l){if(!y){a.value=t.t?t.t("viewer.peer_not_installed"):"PSD viewer requires `ag-psd` — install or use download.",i.value=!1;return}try{const x=await mp({url:t.url,headers:((p=t.authHeaders)==null?void 0:p.call(t))??{},credentials:t.authCredentials});if(h!==l)return;const g=y.readPsd(x,{skipLayerImageData:!1,skipCompositeImageData:!1,skipThumbnail:!0});o.value={width:g.width,height:g.height};const m=g.canvas;if(m&&r.value){const v=r.value;v.width=g.width,v.height=g.height;const S=v.getContext("2d");S==null||S.drawImage(m,0,0)}else throw new Error("PSD has no composite image (skipCompositeImageData?)");const b=[];c(g,b),n.value=b}catch(x){a.value=x instanceof Error?x.message:"PSD decode failed"}finally{i.value=!1}}}pr(f),Br(()=>{l++}),tr(()=>t.url,f);function d(h,y){return t.t?t.t(h):y}return(h,y)=>(Q(),ae("div",Hw,[L("div",jw,[a.value?(Q(),ae("div",Gw,[y[0]||(y[0]=L("span",{class:"filex-viewer-fallback__icon"},"🎨",-1)),L("p",null,le(a.value),1)])):i.value?(Q(),ae("div",Vw,[y[1]||(y[1]=L("span",{class:"filex-viewer-fallback__icon"},"⏳",-1)),L("p",null,le(d("viewer.loading","Loading…")),1)])):rt("",!0),rr(L("canvas",{ref_key:"canvasEl",ref:r},null,512),[[fc,!i.value&&!a.value]])])]))}}),[["__scopeId","data-v-46b5b3c2"]])},Symbol.toStringTag,{value:"Module"})),Ww={class:"filex-viewer-ipynb"},Kw={class:"filex-viewer-ipynb__pane"},Xw={key:0,class:"filex-viewer-fallback"},Yw={key:1,class:"filex-viewer-fallback"},Zw={key:2},Jw=["data-type"],Qw={class:"filex-viewer-ipynb__exec"},e9={class:"filex-viewer-ipynb__src hljs"},t9=["innerHTML"],r9={key:1},n9={key:0,class:"filex-viewer-ipynb__outputs"},a9=["src","alt"],i9=["innerHTML"],o9=["data-type"],l9=["innerHTML"],s9={key:1,class:"filex-viewer-ipynb__md-raw"},u9={key:2,class:"filex-viewer-ipynb__src"},c9=Object.freeze(Object.defineProperty({__proto__:null,default:Jr(qt({__name:"IpynbViewer",props:{url:{},ext:{},t:{type:Function},authHeaders:{type:Function},authCredentials:{}},setup(e){const t=e,r=he([]),n=he("python"),a=he(null),i=he(!0),o=he(new Map),l=he(new Map);let s=0,u=null,c=null;async function f(){if(c!==null)return c||null;try{const m=await import("markdown-it"),b=m.default??m;return c=new b({html:!1,linkify:!0,breaks:!0}),c}catch{return c=!1,null}}function d(m){return Array.isArray(m)?m.join(""):m??""}async function h(){var C,A,_,E;i.value=!0,a.value=null,r.value=[],o.value=new Map,l.value=new Map;const m=++s;let b;try{b=await Zs({url:t.url,headers:((C=t.authHeaders)==null?void 0:C.call(t))??{},credentials:t.authCredentials})}catch(M){a.value=M instanceof Error?M.message:"fetch failed",i.value=!1;return}if(m!==s)return;let v;try{v=JSON.parse(b)}catch{a.value="Invalid notebook JSON",i.value=!1;return}if(r.value=Array.isArray(v.cells)?v.cells:[],n.value=((_=(A=v.metadata)==null?void 0:A.kernelspec)==null?void 0:_.language)||"python",u=await up(),m!==s)return;if(u){const M=u.default??u,z=(E=M.getLanguage)!=null&&E.call(M,n.value)?n.value:null;r.value.forEach((N,R)=>{if(N.cell_type==="code"){const $=d(N.source);try{const q=z?M.highlight($,{language:z,ignoreIllegals:!0}):M.highlightAuto($);o.value.set(R,q.value)}catch{}}})}const S=await f();m===s&&(S&&r.value.forEach((M,z)=>{if(M.cell_type==="markdown")try{l.value.set(z,S.render(d(M.source)))}catch{}}),i.value=!1)}function y(m){var b;return m?m.output_type==="stream"?d(m.text):m.output_type==="error"?[m.ename,m.evalue,...m.traceback||[]].filter(Boolean).join(`
|
|
20
|
+
**/let sc;const Ch=typeof window<"u"&&window.trustedTypes;if(Ch)try{sc=Ch.createPolicy("vue",{createHTML:e=>e})}catch{}const Ah=sc?e=>sc.createHTML(e):e=>e,Z5="http://www.w3.org/2000/svg",J5="http://www.w3.org/1998/Math/MathML",Pa=typeof document<"u"?document:null,Eh=Pa&&Pa.createElement("template"),Q5={insert:(e,t,r)=>{t.insertBefore(e,r||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,r,n)=>{const a=t==="svg"?Pa.createElementNS(Z5,e):t==="mathml"?Pa.createElementNS(J5,e):r?Pa.createElement(e,{is:r}):Pa.createElement(e);return e==="select"&&n&&n.multiple!=null&&a.setAttribute("multiple",n.multiple),a},createText:e=>Pa.createTextNode(e),createComment:e=>Pa.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Pa.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,r,n,a,i){const o=r?r.previousSibling:t.lastChild;if(a&&(a===i||a.nextSibling))for(;t.insertBefore(a.cloneNode(!0),r),!(a===i||!(a=a.nextSibling)););else{Eh.innerHTML=Ah(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const l=Eh.content;if(n==="svg"||n==="mathml"){const s=l.firstChild;for(;s.firstChild;)l.appendChild(s.firstChild);l.removeChild(s)}t.insertBefore(l,r)}return[o?o.nextSibling:t.firstChild,r?r.previousSibling:t.lastChild]}},ai="transition",wl="animation",ho=Symbol("_vtc"),Th={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Mh=ir({},T1,Th),po=(e=>(e.displayName="Transition",e.props=Mh,e))((e,{slots:t})=>Sh(Qb,Ih(e),t)),Ri=(e,t=[])=>{bt(e)?e.forEach(r=>r(...t)):e&&e(...t)},Dh=e=>e?bt(e)?e.some(t=>t.length>1):e.length>1:!1;function Ih(e){const t={};for(const N in e)N in Th||(t[N]=e[N]);if(e.css===!1)return t;const{name:r="v",type:n,duration:a,enterFromClass:i=`${r}-enter-from`,enterActiveClass:o=`${r}-enter-active`,enterToClass:l=`${r}-enter-to`,appearFromClass:s=i,appearActiveClass:u=o,appearToClass:c=l,leaveFromClass:f=`${r}-leave-from`,leaveActiveClass:d=`${r}-leave-active`,leaveToClass:h=`${r}-leave-to`}=e,y=e6(a),p=y&&y[0],x=y&&y[1],{onBeforeEnter:g,onEnter:m,onEnterCancelled:b,onLeave:v,onLeaveCancelled:S,onBeforeAppear:C=g,onAppear:A=m,onAppearCancelled:_=b}=t,E=(N,R,$,q)=>{N._enterCancelled=q,ii(N,R?c:l),ii(N,R?u:o),$&&$()},M=(N,R)=>{N._isLeaving=!1,ii(N,f),ii(N,h),ii(N,d),R&&R()},z=N=>(R,$)=>{const q=N?A:m,W=()=>E(R,N,$);Ri(q,[R,W]),zh(()=>{ii(R,N?s:i),ha(R,N?c:l),Dh(q)||Fh(R,n,p,W)})};return ir(t,{onBeforeEnter(N){Ri(g,[N]),ha(N,i),ha(N,o)},onBeforeAppear(N){Ri(C,[N]),ha(N,s),ha(N,u)},onEnter:z(!1),onAppear:z(!0),onLeave(N,R){N._isLeaving=!0;const $=()=>M(N,R);ha(N,f),N._enterCancelled?(ha(N,d),cc(N)):(cc(N),ha(N,d)),zh(()=>{N._isLeaving&&(ii(N,f),ha(N,h),Dh(v)||Fh(N,n,x,$))}),Ri(v,[N,$])},onEnterCancelled(N){E(N,!1,void 0,!0),Ri(b,[N])},onAppearCancelled(N){E(N,!0,void 0,!0),Ri(_,[N])},onLeaveCancelled(N){M(N),Ri(S,[N])}})}function e6(e){if(e==null)return null;if(Vt(e))return[uc(e.enter),uc(e.leave)];{const t=uc(e);return[t,t]}}function uc(e){return Eu(e)}function ha(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.add(r)),(e[ho]||(e[ho]=new Set)).add(t)}function ii(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const r=e[ho];r&&(r.delete(t),r.size||(e[ho]=void 0))}function zh(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let t6=0;function Fh(e,t,r,n){const a=e._endId=++t6,i=()=>{a===e._endId&&n()};if(r!=null)return setTimeout(i,r);const{type:o,timeout:l,propCount:s}=Oh(e,t);if(!o)return n();const u=o+"end";let c=0;const f=()=>{e.removeEventListener(u,d),i()},d=h=>{h.target===e&&++c>=s&&f()};setTimeout(()=>{c<s&&f()},l+1),e.addEventListener(u,d)}function Oh(e,t){const r=window.getComputedStyle(e),n=y=>(r[y]||"").split(", "),a=n(`${ai}Delay`),i=n(`${ai}Duration`),o=Ph(a,i),l=n(`${wl}Delay`),s=n(`${wl}Duration`),u=Ph(l,s);let c=null,f=0,d=0;t===ai?o>0&&(c=ai,f=o,d=i.length):t===wl?u>0&&(c=wl,f=u,d=s.length):(f=Math.max(o,u),c=f>0?o>u?ai:wl:null,d=c?c===ai?i.length:s.length:0);const h=c===ai&&/\b(?:transform|all)(?:,|$)/.test(n(`${ai}Property`).toString());return{type:c,timeout:f,propCount:d,hasTransform:h}}function Ph(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((r,n)=>Rh(r)+Rh(e[n])))}function Rh(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function cc(e){return(e?e.ownerDocument:document).body.offsetHeight}function r6(e,t,r){const n=e[ho];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):r?e.setAttribute("class",t):e.className=t}const Gs=Symbol("_vod"),Lh=Symbol("_vsh"),fc={name:"show",beforeMount(e,{value:t},{transition:r}){e[Gs]=e.style.display==="none"?"":e.style.display,r&&t?r.beforeEnter(e):kl(e,t)},mounted(e,{value:t},{transition:r}){r&&t&&r.enter(e)},updated(e,{value:t,oldValue:r},{transition:n}){!t!=!r&&(n?t?(n.beforeEnter(e),kl(e,!0),n.enter(e)):n.leave(e,()=>{kl(e,!1)}):kl(e,t))},beforeUnmount(e,{value:t}){kl(e,t)}};function kl(e,t){e.style.display=t?e[Gs]:"none",e[Lh]=!t}const n6=Symbol(""),a6=/(?:^|;)\s*display\s*:/;function i6(e,t,r){const n=e.style,a=Qt(r);let i=!1;if(r&&!a){if(t)if(Qt(t))for(const o of t.split(";")){const l=o.slice(0,o.indexOf(":")).trim();r[l]==null&&Sl(n,l,"")}else for(const o in t)r[o]==null&&Sl(n,o,"");for(const o in r){o==="display"&&(i=!0);const l=r[o];l!=null?l6(e,o,!Qt(t)&&t?t[o]:void 0,l)||Sl(n,o,l):Sl(n,o,"")}}else if(a){if(t!==r){const o=n[n6];o&&(r+=";"+o),n.cssText=r,i=a6.test(r)}}else t&&e.removeAttribute("style");Gs in e&&(e[Gs]=i?n.display:"",e[Lh]&&(n.display="none"))}const Bh=/\s*!important$/;function Sl(e,t,r){if(bt(r))r.forEach(n=>Sl(e,t,n));else if(r==null&&(r=""),t.startsWith("--"))e.setProperty(t,r);else{const n=o6(e,t);Bh.test(r)?e.setProperty(hn(n),r.replace(Bh,""),"important"):e[n]=r}}const Nh=["Webkit","Moz","ms"],dc={};function o6(e,t){const r=dc[t];if(r)return r;let n=Er(t);if(n!=="filter"&&n in e)return dc[t]=n;n=gs(n);for(let a=0;a<Nh.length;a++){const i=Nh[a]+n;if(i in e)return dc[t]=i}return t}function l6(e,t,r,n){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&Qt(n)&&r===n}const $h="http://www.w3.org/1999/xlink";function Uh(e,t,r,n,a,i=ab(t)){n&&t.startsWith("xlink:")?r==null?e.removeAttributeNS($h,t.slice(6,t.length)):e.setAttributeNS($h,t,r):r==null||i&&!Vd(r)?e.removeAttribute(t):e.setAttribute(t,i?"":jn(r)?String(r):r)}function Hh(e,t,r,n,a){if(t==="innerHTML"||t==="textContent"){r!=null&&(e[t]=t==="innerHTML"?Ah(r):r);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const l=i==="OPTION"?e.getAttribute("value")||"":e.value,s=r==null?e.type==="checkbox"?"on":"":String(r);(l!==s||!("_value"in e))&&(e.value=s),r==null&&e.removeAttribute(t),e._value=r;return}let o=!1;if(r===""||r==null){const l=typeof e[t];l==="boolean"?r=Vd(r):r==null&&l==="string"?(r="",o=!0):l==="number"&&(r=0,o=!0)}try{e[t]=r}catch{}o&&e.removeAttribute(a||t)}function oi(e,t,r,n){e.addEventListener(t,r,n)}function s6(e,t,r,n){e.removeEventListener(t,r,n)}const jh=Symbol("_vei");function u6(e,t,r,n,a=null){const i=e[jh]||(e[jh]={}),o=i[t];if(n&&o)o.value=n;else{const[l,s]=c6(t);if(n){const u=i[t]=h6(n,a);oi(e,l,u,s)}else o&&(s6(e,l,o,s),i[t]=void 0)}}const Gh=/(?:Once|Passive|Capture)$/;function c6(e){let t;if(Gh.test(e)){t={};let n;for(;n=e.match(Gh);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):hn(e.slice(2)),t]}let hc=0;const f6=Promise.resolve(),d6=()=>hc||(f6.then(()=>hc=0),hc=Date.now());function h6(e,t){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;qn(p6(n,r.value),t,5,[n])};return r.value=e,r.attached=d6(),r}function p6(e,t){if(bt(t)){const r=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{r.call(e),e._stopped=!0},t.map(n=>a=>!a._stopped&&n&&n(a))}else return t}const Vh=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,v6=(e,t,r,n,a,i)=>{const o=a==="svg";t==="class"?r6(e,n,o):t==="style"?i6(e,r,n):hs(t)?ps(t)||u6(e,t,r,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):m6(e,t,n,o))?(Hh(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Uh(e,t,n,o,i,t!=="value")):e._isVueCE&&(g6(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Qt(n)))?Hh(e,Er(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Uh(e,t,n,o))};function m6(e,t,r,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Vh(t)&&St(r));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const a=e.tagName;if(a==="IMG"||a==="VIDEO"||a==="CANVAS"||a==="SOURCE")return!1}return Vh(t)&&Qt(r)?!1:t in e}function g6(e,t){const r=e._def.props;if(!r)return!1;const n=Er(t);return Array.isArray(r)?r.some(a=>Er(a)===n):Object.keys(r).some(a=>Er(a)===n)}const qh={};function b6(e,t,r){let n=qt(e,t);vs(n)&&(n=ir({},n,t));class a extends pc{constructor(o){super(n,o,r)}}return a.def=n,a}const y6=typeof HTMLElement<"u"?HTMLElement:class{};class pc extends y6{constructor(t,r={},n=ap){super(),this._def=t,this._props=r,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._styleAnchors=new WeakMap,this._ob=null,this.shadowRoot&&n!==ap?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(ir({},t.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.assignedSlot||t.parentNode||t.host);)if(t instanceof pc){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._inheritParentContext(t))}_inheritParentContext(t=this._parent){t&&this._app&&Object.setPrototypeOf(this._app._context.provides,t._instance.provides)}disconnectedCallback(){this._connected=!1,za(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(t){for(const r of t)this._setAttr(r.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let n=0;n<this.attributes.length;n++)this._setAttr(this.attributes[n].name);this._ob=new MutationObserver(this._processMutations.bind(this)),this._ob.observe(this,{attributes:!0});const t=(n,a=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:i,styles:o}=n;let l;if(i&&!bt(i))for(const s in i){const u=i[s];(u===Number||u&&u.type===Number)&&(s in this._props&&(this._props[s]=Eu(this._props[s])),(l||(l=Object.create(null)))[Er(s)]=!0)}this._numberProps=l,this._resolveProps(n),this.shadowRoot&&this._applyStyles(o),this._mount(n)},r=this._def.__asyncLoader;r?this._pendingResolve=r().then(n=>{n.configureApp=this._def.configureApp,t(this._def=n,!0)}):t(this._def)}_mount(t){this._app=this._createApp(t),this._inheritParentContext(),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const r=this._instance&&this._instance.exposed;if(r)for(const n in r)$t(this,n)||Object.defineProperty(this,n,{get:()=>Qe(r[n])})}_resolveProps(t){const{props:r}=t,n=bt(r)?r:Object.keys(r||{});for(const a of Object.keys(this))a[0]!=="_"&&n.includes(a)&&this._setProp(a,this[a]);for(const a of n.map(Er))Object.defineProperty(this,a,{get(){return this._getProp(a)},set(i){this._setProp(a,i,!0,!this._patching)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const r=this.hasAttribute(t);let n=r?this.getAttribute(t):qh;const a=Er(t);r&&this._numberProps&&this._numberProps[a]&&(n=Eu(n)),this._setProp(a,n,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,r,n=!0,a=!1){if(r!==this._props[t]&&(this._dirty=!0,r===qh?delete this._props[t]:(this._props[t]=r,t==="key"&&this._app&&(this._app._ceVNode.key=r)),a&&this._instance&&this._update(),n)){const i=this._ob;i&&(this._processMutations(i.takeRecords()),i.disconnect()),r===!0?this.setAttribute(hn(t),""):typeof r=="string"||typeof r=="number"?this.setAttribute(hn(t),r+""):r||this.removeAttribute(hn(t)),i&&i.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),D6(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const r=Bt(this._def,ir(t,this._props));return this._instance||(r.ce=n=>{this._instance=n,n.ce=this,n.isCE=!0;const a=(i,o)=>{this.dispatchEvent(new CustomEvent(i,vs(o[0])?ir({detail:o},o[0]):{detail:o}))};n.emit=(i,...o)=>{a(i,o),hn(i)!==i&&a(hn(i),o)},this._setParent()}),r}_applyStyles(t,r,n){if(!t)return;if(r){if(r===this._def||this._styleChildren.has(r))return;this._styleChildren.add(r)}const a=this._nonce,i=this.shadowRoot,o=n?this._getStyleAnchor(n)||this._getStyleAnchor(this._def):this._getRootStyleInsertionAnchor(i);let l=null;for(let s=t.length-1;s>=0;s--){const u=document.createElement("style");a&&u.setAttribute("nonce",a),u.textContent=t[s],i.insertBefore(u,l||o),l=u,s===0&&(n||this._styleAnchors.set(this._def,u),r&&this._styleAnchors.set(r,u))}}_getStyleAnchor(t){if(!t)return null;const r=this._styleAnchors.get(t);return r&&r.parentNode===this.shadowRoot?r:(r&&this._styleAnchors.delete(t),null)}_getRootStyleInsertionAnchor(t){for(let r=0;r<t.childNodes.length;r++){const n=t.childNodes[r];if(!(n instanceof HTMLStyleElement))return n}return null}_parseSlots(){const t=this._slots={};let r;for(;r=this.firstChild;){const n=r.nodeType===1&&r.getAttribute("slot")||"default";(t[n]||(t[n]=[])).push(r),this.removeChild(r)}}_renderSlots(){const t=this._getSlots(),r=this._instance.type.__scopeId;for(let n=0;n<t.length;n++){const a=t[n],i=a.getAttribute("name")||"default",o=this._slots[i],l=a.parentNode;if(o)for(const s of o){if(r&&s.nodeType===1){const u=r+"-s",c=document.createTreeWalker(s,1);s.setAttribute(u,"");let f;for(;f=c.nextNode();)f.setAttribute(u,"")}l.insertBefore(s,a)}else for(;a.firstChild;)l.insertBefore(a.firstChild,a);l.removeChild(a)}}_getSlots(){const t=[this];this._teleportTargets&&t.push(...this._teleportTargets);const r=new Set;for(const n of t){const a=n.querySelectorAll("slot");for(let i=0;i<a.length;i++)r.add(a[i])}return Array.from(r)}_injectChildStyle(t,r){this._applyStyles(t.styles,t,r)}_beginPatch(){this._patching=!0,this._dirty=!1}_endPatch(){this._patching=!1,this._dirty&&this._instance&&this._update()}_hasShadowRoot(){return this._def.shadowRoot!==!1}_removeChildStyle(t){}}const Wh=new WeakMap,Kh=new WeakMap,Vs=Symbol("_moveCb"),Xh=Symbol("_enterCb"),x6=(e=>(delete e.props.mode,e))({name:"TransitionGroup",props:ir({},Mh,{tag:String,moveClass:String}),setup(e,{slots:t}){const r=oc(),n=E1();let a,i;return L1(()=>{if(!a.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!S6(a[0].el,r.vnode.el,o)){a=[];return}a.forEach(_6),a.forEach(w6);const l=a.filter(k6);cc(r.vnode.el),l.forEach(s=>{const u=s.el,c=u.style;ha(u,o),c.transform=c.webkitTransform=c.transitionDuration="";const f=u[Vs]=d=>{d&&d.target!==u||(!d||d.propertyName.endsWith("transform"))&&(u.removeEventListener("transitionend",f),u[Vs]=null,ii(u,o))};u.addEventListener("transitionend",f)}),a=[]}),()=>{const o=Lt(e),l=Ih(o);let s=o.tag||yt;if(a=[],i)for(let u=0;u<i.length;u++){const c=i[u];c.el&&c.el instanceof Element&&(a.push(c),Fi(c,hl(c,l,n,r)),Wh.set(c,Yh(c.el)))}i=t.default?Ku(t.default()):[];for(let u=0;u<i.length;u++){const c=i[u];c.key!=null&&Fi(c,hl(c,l,n,r))}return Bt(s,null,i)}}});function _6(e){const t=e.el;t[Vs]&&t[Vs](),t[Xh]&&t[Xh]()}function w6(e){Kh.set(e,Yh(e.el))}function k6(e){const t=Wh.get(e),r=Kh.get(e),n=t.left-r.left,a=t.top-r.top;if(n||a){const i=e.el,o=i.style,l=i.getBoundingClientRect();let s=1,u=1;return i.offsetWidth&&(s=l.width/i.offsetWidth),i.offsetHeight&&(u=l.height/i.offsetHeight),(!Number.isFinite(s)||s===0)&&(s=1),(!Number.isFinite(u)||u===0)&&(u=1),Math.abs(s-1)<.01&&(s=1),Math.abs(u-1)<.01&&(u=1),o.transform=o.webkitTransform=`translate(${n/s}px,${a/u}px)`,o.transitionDuration="0s",e}}function Yh(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function S6(e,t,r){const n=e.cloneNode(),a=e[ho];a&&a.forEach(l=>{l.split(/\s+/).forEach(s=>s&&n.classList.remove(s))}),r.split(/\s+/).forEach(l=>l&&n.classList.add(l)),n.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(n);const{hasTransform:o}=Oh(n);return i.removeChild(n),o}const vo=e=>{const t=e.props["onUpdate:modelValue"]||!1;return bt(t)?r=>bs(t,r):t};function C6(e){e.target.composing=!0}function Zh(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ra=Symbol("_assign");function Jh(e,t,r){return t&&(e=e.trim()),r&&(e=ys(e)),e}const sn={created(e,{modifiers:{lazy:t,trim:r,number:n}},a){e[Ra]=vo(a);const i=n||a.props&&a.props.type==="number";oi(e,t?"change":"input",o=>{o.target.composing||e[Ra](Jh(e.value,r,i))}),(r||i)&&oi(e,"change",()=>{e.value=Jh(e.value,r,i)}),t||(oi(e,"compositionstart",C6),oi(e,"compositionend",Zh),oi(e,"change",Zh))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:r,modifiers:{lazy:n,trim:a,number:i}},o){if(e[Ra]=vo(o),e.composing)return;const l=(i||e.type==="number")&&!/^0\d/.test(e.value)?ys(e.value):e.value,s=t??"";if(l===s)return;const u=e.getRootNode();(u instanceof Document||u instanceof ShadowRoot)&&u.activeElement===e&&e.type!=="range"&&(n&&t===r||a&&e.value.trim()===s)||(e.value=s)}},qs={deep:!0,created(e,t,r){e[Ra]=vo(r),oi(e,"change",()=>{const n=e._modelValue,a=Cl(e),i=e.checked,o=e[Ra];if(bt(n)){const l=Tu(n,a),s=l!==-1;if(i&&!s)o(n.concat(a));else if(!i&&s){const u=[...n];u.splice(l,1),o(u)}}else if(no(n)){const l=new Set(n);i?l.add(a):l.delete(a),o(l)}else o(tp(e,i))})},mounted:Qh,beforeUpdate(e,t,r){e[Ra]=vo(r),Qh(e,t,r)}};function Qh(e,{value:t,oldValue:r},n){e._modelValue=t;let a;if(bt(t))a=Tu(t,n.props.value)>-1;else if(no(t))a=t.has(n.props.value);else{if(t===r)return;a=ao(t,tp(e,!0))}e.checked!==a&&(e.checked=a)}const Ws={deep:!0,created(e,{value:t,modifiers:{number:r}},n){const a=no(t);oi(e,"change",()=>{const i=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>r?ys(Cl(o)):Cl(o));e[Ra](e.multiple?a?new Set(i):i:i[0]),e._assigning=!0,za(()=>{e._assigning=!1})}),e[Ra]=vo(n)},mounted(e,{value:t}){ep(e,t)},beforeUpdate(e,t,r){e[Ra]=vo(r)},updated(e,{value:t}){e._assigning||ep(e,t)}};function ep(e,t){const r=e.multiple,n=bt(t);if(!(r&&!n&&!no(t))){for(let a=0,i=e.options.length;a<i;a++){const o=e.options[a],l=Cl(o);if(r)if(n){const s=typeof l;s==="string"||s==="number"?o.selected=t.some(u=>String(u)===String(l)):o.selected=Tu(t,l)>-1}else o.selected=t.has(l);else if(ao(Cl(o),t)){e.selectedIndex!==a&&(e.selectedIndex=a);return}}!r&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Cl(e){return"_value"in e?e._value:e.value}function tp(e,t){const r=t?"_trueValue":"_falseValue";return r in e?e[r]:t}const A6=["ctrl","shift","alt","meta"],E6={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>A6.some(r=>e[`${r}Key`]&&!t.includes(r))},vr=(e,t)=>{if(!e)return e;const r=e._withMods||(e._withMods={}),n=t.join(".");return r[n]||(r[n]=(a,...i)=>{for(let o=0;o<t.length;o++){const l=E6[t[o]];if(l&&l(a,t))return}return e(a,...i)})},T6={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},pa=(e,t)=>{const r=e._withKeys||(e._withKeys={}),n=t.join(".");return r[n]||(r[n]=a=>{if(!("key"in a))return;const i=hn(a.key);if(t.some(o=>o===i||T6[o]===i))return e(a)})},M6=ir({patchProp:v6},Q5);let rp;function np(){return rp||(rp=z5(M6))}const D6=(...e)=>{np().render(...e)},ap=(...e)=>{const t=np().createApp(...e),{mount:r}=t;return t.mount=n=>{const a=z6(n);if(!a)return;const i=t._component;!St(i)&&!i.render&&!i.template&&(i.template=a.innerHTML),a.nodeType===1&&(a.textContent="");const o=r(a,!1,I6(a));return a instanceof Element&&(a.removeAttribute("v-cloak"),a.setAttribute("data-v-app","")),o},t};function I6(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function z6(e){return Qt(e)?document.querySelector(e):e}function ip(e){return!!e&&e.enabled&&e.state==="ok"}function F6(e){const t=e.apiBase!=null?e.apiBase.replace(/\/+$/,""):null;function r(a,i){return a||(t===null?null:`${t}${i}`)}const n=e.endpoint??(t!==null?`${t}/api/files/manager`:null);if(!n)throw new Error("[@brftech/filex-core] config requires either `apiBase` or `endpoint`");return{manager:n,uploadInit:r(e.uploadInit,"/api/files/upload/init"),uploadFinalize:r(e.uploadFinalize,"/api/files/upload/finalize"),uploadAbort:r(e.uploadAbort,"/api/files/upload/abort"),shareCreate:r(e.shareCreate,"/api/files/share"),shareList:r(e.shareList,"/api/files/share"),shareDelete:r(e.shareDelete,"/api/files/share/{uuid}"),limits:r(e.limits,"/api/files/limits"),capabilities:r(e.capabilities,"/api/files/capabilities"),archiveList:r(e.archiveList,"/api/files/archive/list"),archiveExtract:r(e.archiveExtract,"/api/files/archive/extract"),archiveAdd:r(e.archiveAdd,"/api/files/archive/add"),copy:r(e.copy,"/api/files/copy"),moveAsync:r(e.moveAsync,"/api/files/move"),deleteAsync:r(e.deleteAsync,"/api/files/delete"),opsList:r(e.opsList,"/api/files/ops"),opsShow:r(e.opsShow,"/api/files/ops/{id}"),onlyOfficeConfig:r(e.onlyOfficeConfig,"/api/files/onlyoffice/config"),saveText:r(e.saveText,"/api/files/save-text"),restore:r(e.restore,"/api/files/restore"),trashList:r(e.trashList,"/api/files/manager/trash"),trashRestore:r(e.trashRestore,"/api/files/manager/restore")}}async function O6(e){if(typeof e=="function"){const t=e();return t instanceof Promise?await t:t}return e}function P6(e){return e?"kind"in e?e:e.type==="bearer"?{kind:"bearer",token:e.token}:e.type==="csrf"?{kind:"csrf",csrf:e.csrf}:{kind:"none"}:{kind:"none"}}function R6(e){const t=F6(e),r=P6(e.auth);async function n(be={}){const ye={Accept:"application/json",...be};if(r.kind==="bearer"){const P=await O6(r.token);P&&(ye.Authorization=`Bearer ${P}`)}else if(r.kind==="csrf")ye["X-CSRF-TOKEN"]=r.csrf,ye["X-Requested-With"]="XMLHttpRequest";else if(r.kind==="basic"){const P=btoa(`${r.user}:${r.pass}`);ye.Authorization=`Basic ${P}`}return ye}function a(be={}){const ye={Accept:"application/json",...be};if(r.kind==="bearer"&&typeof r.token=="string")ye.Authorization=`Bearer ${r.token}`;else if(r.kind==="csrf")ye["X-CSRF-TOKEN"]=r.csrf,ye["X-Requested-With"]="XMLHttpRequest";else if(r.kind==="basic"){const P=btoa(`${r.user}:${r.pass}`);ye.Authorization=`Basic ${P}`}return ye}function i(){return r.kind==="csrf"?"include":"same-origin"}function o(be){const ye=(e.locale??"tr")!=="en",V={400:["Geçersiz istek","Bad request"],401:["Oturum gerekli, tekrar giriş yapın","Sign-in required"],403:["Bu işlem için yetkiniz yok","You are not allowed to do this"],404:["Bulunamadı","Not found"],409:["Zaten var / çakışma","Already exists / conflict"],413:["Dosya çok büyük","File too large"],415:["Bu dosya türü desteklenmiyor","Unsupported file type"],422:["Geçersiz veri","Invalid data"],429:["Çok fazla istek, biraz bekleyin","Too many requests"],500:["Sunucu hatası","Server error"],501:["Bu işlem desteklenmiyor","Not supported"],503:["Servis şu an kullanılamıyor","Service unavailable"]}[be];return V?ye?V[0]:V[1]:ye?`Hata (${be})`:`Error (${be})`}async function l(be,ye={}){const P={...await n(),...ye.headers??{}},V=await fetch(be,{...ye,headers:P,credentials:i()});if(!V.ok){const fe=await V.text().catch(()=>""),de=new Error(o(V.status));throw de.status=V.status,de.detail=fe.slice(0,300),de}return V.json()}function s(be=""){return t.manager.replace(/\/manager(\?.*)?$/,"/permissions")+be}async function u(be){return l(s()+"?path="+encodeURIComponent(be))}async function c(be){return l(s("/resolve")+"?email="+encodeURIComponent(be))}async function f(be){return l(s("/users")+"?q="+encodeURIComponent(be))}async function d(be){return l(s(),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(be)})}async function h(be,ye){return l(s("/"+be),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({level:ye})})}async function y(be){return l(s("/"+be),{method:"DELETE"})}async function p(be){return l(s("/invite"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(be)})}async function x(be){return l(s("/share-mail"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(be)})}function g(be){const ye=new URLSearchParams;for(const[P,V]of Object.entries(be))V!=null&&ye.set(P,String(V));return ye.toString()}function m(be,ye={}){const P=t.manager.includes("?")?"&":"?";return`${t.manager}${P}${g({q:be,action:be,...ye})}`}async function b(be){return l(m("index",{path:be}))}async function v(be,ye){return l(m("search",{path:be,filter:ye}))}async function S(be){return l(m("subfolders",{path:be}))}async function C(be,ye){return l(m("newfolder"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:be,name:ye})})}async function A(be,ye,P){return l(m("rename"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:be,item:ye,name:P})})}async function _(be,ye,P){return l(m("move"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:be,item:P,items:ye.map(V=>({path:V}))})})}async function E(be,ye){return l(m("delete"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:be,items:ye.map(P=>({path:P}))})})}async function M(be,ye){if(!t.copy)throw new Error("copy endpoint not configured");return l(t.copy,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source:be,target:ye})})}async function z(be,ye,P){if(!t.moveAsync)throw new Error("moveAsync endpoint not configured");return l(t.moveAsync,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source:be,target:ye,sourceDir:P})})}async function N(be,ye){if(!t.deleteAsync)throw new Error("deleteAsync endpoint not configured");return l(t.deleteAsync,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source:be,sourceDir:ye})})}async function R(be){if(!t.restore)throw new Error("restore endpoint not configured");return l(t.restore,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source:be})})}async function $(be){if(!t.trashList)throw new Error("trashList endpoint not configured");const ye=t.trashList,P=ye.includes("?")?"&":"?",V=be?`${ye}${P}storage=${encodeURIComponent(be)}`:ye;return l(V)}async function q(be){const ye=t.trashRestore;if(!ye)throw new Error("trashRestore endpoint not configured");let P=0;for(const V of be)try{await l(ye,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({node_id:V})}),P++}catch{}return{restored:P}}async function W(be,ye,P){const V=new FormData;V.append("path",be);for(const de of ye)V.append("file[]",de,de.name);const fe=await n();return new Promise((de,ie)=>{const oe=new XMLHttpRequest;oe.open("POST",m("upload"));for(const[se,ge]of Object.entries(fe))se!=="Content-Type"&&oe.setRequestHeader(se,ge);oe.withCredentials=i()==="include",oe.upload.onprogress=se=>{P&&se.lengthComputable&&P(Math.round(se.loaded/se.total*100))},oe.onload=()=>{if(oe.status>=200&&oe.status<300)try{de(JSON.parse(oe.responseText))}catch(se){ie(se)}else ie(new Error(`${oe.status} ${oe.statusText}: ${oe.responseText.slice(0,200)}`))},oe.onerror=()=>ie(new Error("Network error")),oe.send(V)})}function Z(be){return m("download",{path:be})}function te(be){return m("preview",{path:be})}async function ne(be){const ye=await n(),P=await fetch(te(be),{headers:ye,credentials:i()});if(!P.ok){const ie=await P.text().catch(()=>"");throw new Error(`${P.status} ${P.statusText}${ie?" — "+ie.slice(0,200):""}`)}const V=await P.blob(),fe=V.type||P.headers.get("content-type")||"";return{url:URL.createObjectURL(V),blob:V,mime:fe}}async function _e(be){const ye=await n(),P=await fetch(te(be),{headers:ye,credentials:i()});if(!P.ok){const V=await P.text().catch(()=>"");throw new Error(`${P.status} ${P.statusText}${V?" — "+V.slice(0,200):""}`)}return P.arrayBuffer()}async function pe(){return t.limits?l(t.limits):{max_upload_mb:1024}}async function we(){return t.capabilities?l(t.capabilities):{ffmpeg:!1,ghostscript:!1,libreoffice:!1,max_chunk_mb:5,upload_limit_mb:1024,onlyoffice_url:e.onlyOfficeBase??null,drawio_url:e.drawioBase??null,convert_url:e.convertBase??null}}async function ve(be){if(!t.shareCreate)throw new Error("shareCreate endpoint not configured");return l(t.shareCreate,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(be)})}async function Te(be){if(!t.shareList)return{shares:[]};const ye=t.shareList.includes("?")?"&":"?";return l(`${t.shareList}${ye}path=${encodeURIComponent(be)}`)}async function Se(be){if(!t.shareDelete)throw new Error("shareDelete endpoint not configured");const ye=t.shareDelete.replace("{uuid}",encodeURIComponent(be));return l(ye,{method:"DELETE"})}async function Ie(be){if(!t.archiveList)throw new Error("archiveList endpoint not configured");return{entries:(await l(t.archiveList,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:be})})).entries.map(P=>({name:P.name,size:P.size,isDir:P.is_dir,lastModified:P.mtime}))}}async function Le(be,ye){if(!t.archiveExtract)throw new Error("archiveExtract endpoint not configured");return l(t.archiveExtract,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:be,members:ye})})}async function Ee(be,ye){if(!t.archiveAdd)throw new Error("archiveAdd endpoint not configured");return l(t.archiveAdd,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:be,files:ye})})}async function Be(){const be=t.manager.replace(/\/manager(\?.*)?$/,"/ws-ticket");try{return await l(be,{method:"POST"})}catch{return null}}return{wsTicket:Be,index:b,search:v,subfolders:S,newFolder:C,rename:A,move:_,copy:M,moveAsync:z,deleteAsync:N,deleteItems:E,restore:R,listTrash:$,restoreIds:q,uploadMultipart:W,downloadUrl:Z,previewUrl:te,fetchBlob:ne,fetchArrayBuffer:_e,limits:pe,capabilities:we,createShare:ve,listShares:Te,revokeShare:Se,archiveList:Ie,archiveExtract:Le,archiveAdd:Ee,listPermissions:u,resolveEmail:c,searchUsers:f,addPermission:d,updatePermission:h,deletePermission:y,invitePermission:p,shareMail:x,endpoints:t,authHeaders:n,authHeadersSync:a,credentialsMode:i,jsonFetch:l}}function L6(e,t){const r=e.chunkSize??5242880,n=Math.max(1,Math.min(8,e.parallelChunks??4));async function a(i){var d,h;const o=i.chunkSize??r,l=i.parallelChunks??n,s={id:crypto.randomUUID(),file:i.file,path:i.path,totalBytes:i.file.size,uploadedBytes:0,percent:0,status:"initializing",cancel:()=>{}};let u=!1;const c=[];s.cancel=()=>{u=!0;for(const y of c)y.abort()};function f(){var y;s.percent=s.totalBytes>0?Math.min(100,Math.round(s.uploadedBytes/s.totalBytes*100)):0,(y=i.onProgress)==null||y.call(i,s)}try{if(!t.endpoints.uploadInit)throw new Error("uploadInit not configured");const y=await t.jsonFetch(t.endpoints.uploadInit,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:i.path,filename:i.file.name,size:i.file.size,mime:i.file.type||"application/octet-stream"})});s.uploadId=y.uploadId,s.status="uploading",f();const p=y.chunkBytes??o,x=new Map,g=[];let m=0;async function b(E){const z=(E.partNumber-1)*(y.chunkBytes??o),N=Math.min(z+(y.chunkBytes??o),i.file.size),R=i.file.slice(z,N),$=new AbortController;c.push($),await new Promise((q,W)=>{const Z=new XMLHttpRequest;Z.open("PUT",E.presignedUrl),Z.upload.onprogress=te=>{if(te.lengthComputable){const ne=x.get(E.partNumber)??0,_e=te.loaded-ne;x.set(E.partNumber,te.loaded),s.uploadedBytes+=_e,f()}},Z.onload=()=>{if(Z.status>=200&&Z.status<300){const te=(Z.getResponseHeader("ETag")||Z.getResponseHeader("etag")||"").trim();if(!te){W(new Error("Missing ETag on S3 response"));return}const ne=N-z,_e=x.get(E.partNumber)??0;_e<ne&&(s.uploadedBytes+=ne-_e,x.set(E.partNumber,ne)),g.push({partNumber:E.partNumber,etag:te}),q()}else W(new Error(`S3 PUT ${E.partNumber} → ${Z.status}: ${Z.responseText.slice(0,200)}`))},Z.onerror=()=>W(new Error(`S3 PUT ${E.partNumber} network error`)),Z.onabort=()=>W(new DOMException("Aborted","AbortError")),$.signal.addEventListener("abort",()=>Z.abort()),Z.send(R)})}const v=2;async function S(E,M=0){try{await b(E)}catch(z){if(u)throw z;const N=z instanceof Error?z:new Error(String(z));if(N.name==="AbortError"||M>=v)throw N;const R=x.get(E.partNumber)??0;R>0&&(s.uploadedBytes=Math.max(0,s.uploadedBytes-R),x.delete(E.partNumber),f());const $=500*(M+1)+Math.floor(Math.random()*250);return await new Promise(q=>setTimeout(q,$)),S(E,M+1)}}async function C(){for(;!u&&m<y.parts.length;){const E=y.parts[m++];await S(E)}}const A=[];for(let E=0;E<l;E++)A.push(C());if(await Promise.all(A),u)throw new DOMException("Aborted by user","AbortError");if(!t.endpoints.uploadFinalize)throw new Error("uploadFinalize not configured");s.status="finalizing",g.sort((E,M)=>E.partNumber-M.partNumber);const _=await t.jsonFetch(t.endpoints.uploadFinalize,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({uploadId:y.uploadId,parts:g})});return s.status="done",s.uploadedBytes=s.totalBytes,s.percent=100,f(),(d=i.onDone)==null||d.call(i,s,_),_}catch(y){const p=y instanceof Error?y:new Error(String(y));if(s.status=p.name==="AbortError"?"aborted":"error",s.error=p.message,f(),s.uploadId&&t.endpoints.uploadAbort&&s.status==="aborted")try{await t.jsonFetch(t.endpoints.uploadAbort,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({uploadId:s.uploadId})})}catch{}throw(h=i.onError)==null||h.call(i,s,p),p}}return{uploadFile:a}}function B6(e){const t=he(new Set),r=he(null);function n(d,h={}){if(h.shift&&r.value){const y=e(),p=y.findIndex(v=>v.path===r.value),x=y.findIndex(v=>v.path===d);if(p===-1||x===-1){t.value=new Set([d]),r.value=d;return}const[g,m]=p<x?[p,x]:[x,p],b=new Set;for(let v=g;v<=m;v++)b.add(y[v].path);t.value=b;return}if(h.ctrl){const y=new Set(t.value);y.has(d)?y.delete(d):y.add(d),t.value=y,r.value=d;return}t.value=new Set([d]),r.value=d}function a(){t.value=new Set,r.value=null}function i(){t.value=new Set(e().map(d=>d.path))}function o(d){return t.value.has(d)}function l(d){const h=new Set(t.value);h.add(d),t.value=h}function s(d){const h=new Set(t.value);h.delete(d),t.value=h}const u=mt(()=>t.value.size),c=mt(()=>t.value.size===0),f=mt(()=>e().filter(h=>t.value.has(h.path)));return{selected:t,anchor:r,click:n,clear:a,selectAll:i,has:o,add:l,remove:s,size:u,isEmpty:c,nodes:f}}function N6(e,t){function r(n){var l;if(!e.value)return;const i=n.target;if(i&&(i.tagName==="INPUT"||i.tagName==="TEXTAREA"||i.isContentEditable)&&n.key!=="Escape")return;const o=n.ctrlKey||n.metaKey;switch(n.key){case"Delete":t.onDelete&&(n.preventDefault(),t.onDelete());break;case"Backspace":(l=t.hasSelection)!=null&&l.call(t)&&t.onDelete?(n.preventDefault(),t.onDelete()):t.onGoUp&&(n.preventDefault(),t.onGoUp());break;case"F2":t.onRename&&(n.preventDefault(),t.onRename());break;case"Enter":t.onOpen&&t.onOpen();break;case"Escape":t.onClose&&t.onClose();break;case"/":t.onFocusSearch&&!o&&(n.preventDefault(),t.onFocusSearch());break;case"a":case"A":o&&t.onSelectAll&&(n.preventDefault(),t.onSelectAll());break;case"x":case"X":o&&t.onCut&&(n.preventDefault(),t.onCut());break;case"c":case"C":o&&t.onCopy&&(n.preventDefault(),t.onCopy());break;case"v":case"V":o&&t.onPaste&&(n.preventDefault(),t.onPaste());break;case"d":case"D":o&&t.onDuplicate&&(n.preventDefault(),t.onDuplicate());break;case"k":case"K":o&&t.onPathJump&&(n.preventDefault(),t.onPathJump());break;case"ArrowUp":n.altKey&&t.onGoUp&&(n.preventDefault(),t.onGoUp());break}}pr(()=>window.addEventListener("keydown",r)),Br(()=>window.removeEventListener("keydown",r))}const op={tr:{"toolbar.new_folder":"Yeni Klasör","toolbar.upload":"Yükle","toolbar.search":"Ara","toolbar.search.placeholder":"Dosya adı…","toolbar.view.list":"Liste","toolbar.view.grid":"Izgara","toolbar.refresh":"Yenile","toolbar.go_up":"Üst Klasör","ctx.open":"Aç","ctx.preview":"Önizle","ctx.download":"İndir","ctx.convert":"Dönüştür","ctx.rename":"Yeniden Adlandır","ctx.delete":"Sil","ctx.delete_perm":"Kalıcı Olarak Sil","ctx.restore":"Geri Getir","ctx.share":"Paylaş","ctx.move":"Taşı","ctx.copy":"Kopyala","ctx.cut":"Kes","ctx.paste":"Yapıştır","ctx.info":"Bilgi","ctx.duplicate":"Kopyasını Oluştur","ctx.new_file":"Yeni Dosya","modal.delete.title":"Silinsin mi?","modal.delete.message":"{count} öğe çöpe atılacak.","modal.delete.confirm":"Çöpe At","modal.delete.cancel":"Vazgeç","modal.rename.title":"Yeniden Adlandır","modal.rename.save":"Kaydet","modal.rename.cancel":"Vazgeç","modal.newfolder.title":"Yeni Klasör","modal.newfolder.placeholder":"Klasör adı","modal.newfolder.create":"Oluştur","modal.newfolder.cancel":"Vazgeç","modal.share.title":"Paylaşım Linki","modal.share.pin":"PIN koruması","modal.share.expires":"Son kullanma","modal.share.max_downloads":"İndirme limiti","modal.share.create":"Paylaş","modal.share.cancel":"Vazgeç","modal.share.copy":"Kopyala","modal.share.url_copied":"Link kopyalandı","modal.share.pin_copied":"PIN kopyalandı","modal.share.cli_copied":"CLI komutu kopyalandı","upload.progress":"Yükleniyor","upload.done":"Tamamlandı","upload.error":"Hata","upload.aborted":"İptal edildi","upload.cancel":"İptal","empty.folder":"Bu klasör boş","empty.search":"Sonuç bulunamadı",loading:"Yükleniyor…","notFound.title":"Klasör bulunamadı","notFound.desc":"Bu klasör mevcut değil, taşınmış ya da erişim yetkiniz yok.","notFound.goRoot":"Kök klasöre dön","col.name":"Ad","col.size":"Boyut","col.modified":"Tarih","col.type":"Tür","unit.bytes":"B","unit.kb":"KB","unit.mb":"MB","unit.gb":"GB","unit.tb":"TB","breadcrumb.root":"Kök","breadcrumb.copy_path":"Yolu Kopyala","breadcrumb.go_to_path":"Yola Git","breadcrumb.path_placeholder":"fileman/foo/bar","ops.copy":"Kopyalanıyor","ops.move":"Taşınıyor","ops.delete":"Siliniyor","ops.queued":"sırada","ops.done":"tamamlandı","ops.error":"hata","node.trash":"Çöp Kutusu","viewer.open_in_new_tab":"Yeni Sekmede Aç","viewer.loading":"Yükleniyor…","viewer.failed_to_load":"Dosya yüklenemedi","viewer.peer_not_installed":"Bu dosya tipi için opsiyonel kütüphane kurulu değil. Peer dependency yükle veya İndir düğmesini kullan.","viewer.format_unsupported_3d":"Bu 3B format tarayıcı önizlemesinde desteklenmiyor (model-viewer yalnızca .glb / .gltf / .usdz okur). Lütfen indirip yerel bir araçta açın.","viewer.zoom_in":"Yakınlaştır","viewer.zoom_out":"Uzaklaştır","viewer.fit_width":"Sayfa genişliğine sığdır","viewer.next_page":"Sonraki sayfa","viewer.prev_page":"Önceki sayfa","viewer.page_n_of_m":"Sayfa {n} / {m}","viewer.tags":"Etiketler","viewer.layers":"Katmanlar","viewer.toc":"İçindekiler","viewer.font_smaller":"Yazıyı küçült","viewer.font_larger":"Yazıyı büyüt","viewer.search":"Ara","viewer.download":"İndir","viewer.save_annotations":"Açıklamaları kaydet","viewer.annotations_on":"Açıklamalar: açık","viewer.annotations_off":"Açıklamalar: kapalı","viewer.read_only":"Salt okunur","viewer.csv_first_row_header":"İlk satır başlık olsun","viewer.csv_filter":"Satır filtrele…","viewer.epub_prev":"Önceki","viewer.epub_next":"Sonraki","viewer.drawio.disabled":"diagrams.net editörü bu filex kurulumunda yapılandırılmamış — yönetici FILEX_DRAWIO_URL'yi ayarlamalı.","viewer.archive.entries":"{n} dosya","viewer.archive.empty":"Arşiv boş.","viewer.archive.error":"Arşiv okunamadı.","viewer.name":"Ad","viewer.size":"Boyut"},en:{"toolbar.new_folder":"New Folder","toolbar.upload":"Upload","toolbar.search":"Search","toolbar.search.placeholder":"File name…","toolbar.view.list":"List","toolbar.view.grid":"Grid","toolbar.refresh":"Refresh","toolbar.go_up":"Up one level","ctx.open":"Open","ctx.preview":"Preview","ctx.download":"Download","ctx.convert":"Convert","ctx.rename":"Rename","ctx.delete":"Delete","ctx.delete_perm":"Delete Permanently","ctx.restore":"Restore","ctx.share":"Share","ctx.move":"Move","ctx.copy":"Copy","ctx.cut":"Cut","ctx.paste":"Paste","ctx.info":"Info","ctx.duplicate":"Duplicate","ctx.new_file":"New File","modal.delete.title":"Delete?","modal.delete.message":"{count} item(s) will be moved to trash.","modal.delete.confirm":"Move to Trash","modal.delete.cancel":"Cancel","modal.rename.title":"Rename","modal.rename.save":"Save","modal.rename.cancel":"Cancel","modal.newfolder.title":"New Folder","modal.newfolder.placeholder":"Folder name","modal.newfolder.create":"Create","modal.newfolder.cancel":"Cancel","modal.share.title":"Share Link","modal.share.pin":"PIN protected","modal.share.expires":"Expires at","modal.share.max_downloads":"Download limit","modal.share.create":"Share","modal.share.cancel":"Cancel","modal.share.copy":"Copy","modal.share.url_copied":"Link copied","modal.share.pin_copied":"PIN copied","modal.share.cli_copied":"CLI command copied","upload.progress":"Uploading","upload.done":"Done","upload.error":"Error","upload.aborted":"Aborted","upload.cancel":"Cancel","empty.folder":"This folder is empty","empty.search":"No results",loading:"Loading…","notFound.title":"Folder not found","notFound.desc":"This folder does not exist, was moved, or you do not have access to it.","notFound.goRoot":"Go to root folder","col.name":"Name","col.size":"Size","col.modified":"Modified","col.type":"Type","unit.bytes":"B","unit.kb":"KB","unit.mb":"MB","unit.gb":"GB","unit.tb":"TB","breadcrumb.root":"Root","breadcrumb.copy_path":"Copy Path","breadcrumb.go_to_path":"Go To Path","breadcrumb.path_placeholder":"fileman/foo/bar","ops.copy":"Copying","ops.move":"Moving","ops.delete":"Deleting","ops.queued":"queued","ops.done":"done","ops.error":"error","node.trash":"Trash","viewer.open_in_new_tab":"Open in New Tab","viewer.loading":"Loading…","viewer.failed_to_load":"Failed to load file","viewer.peer_not_installed":"Optional viewer library is not installed. Install the peer dependency or use the download button.","viewer.format_unsupported_3d":"This 3D format is not supported in the browser preview (model-viewer only reads .glb / .gltf / .usdz). Please download and open with a local tool.","viewer.zoom_in":"Zoom in","viewer.zoom_out":"Zoom out","viewer.fit_width":"Fit width","viewer.next_page":"Next page","viewer.prev_page":"Previous page","viewer.page_n_of_m":"Page {n} of {m}","viewer.tags":"Tags","viewer.layers":"Layers","viewer.toc":"Contents","viewer.font_smaller":"Smaller text","viewer.font_larger":"Larger text","viewer.search":"Search","viewer.download":"Download","viewer.save_annotations":"Save annotations","viewer.annotations_on":"Annotations: on","viewer.annotations_off":"Annotations: off","viewer.read_only":"Read only","viewer.csv_first_row_header":"First row as header","viewer.csv_filter":"Filter rows…","viewer.epub_prev":"Previous","viewer.epub_next":"Next","viewer.drawio.disabled":"diagrams.net embed is not configured for this filex instance — operator must wire FILEX_DRAWIO_URL to enable the editor.","viewer.archive.entries":"{n} files","viewer.archive.empty":"Archive is empty.","viewer.archive.error":"Could not read archive contents.","viewer.name":"Name","viewer.size":"Size"}};function In(e){const t=mt(()=>{const i=typeof e=="function"?e():e.value;return op[i]??op.tr});function r(i,o={}){const l=t.value[i]??i;return Object.entries(o).reduce((s,[u,c])=>s.replaceAll(`{${u}}`,String(c)),l)}function n(i){if(i==null||i<0)return"—";if(i===0)return`0 ${r("unit.bytes")}`;const o=[[1024**4,"unit.tb"],[1024**3,"unit.gb"],[1024**2,"unit.mb"],[1024,"unit.kb"],[1,"unit.bytes"]];for(const[l,s]of o)if(i>=l){const u=i/l;return`${u>=100?Math.round(u):u.toFixed(u>=10?1:2)} ${r(s)}`}return`${i} ${r("unit.bytes")}`}function a(i){if(i.basename===".trash")return r("node.trash");const o=i.basename.match(/^\d{8}-\d{6}-[A-Za-z0-9]+__(.+)$/);return o?o[1]:i.basename}return{t:r,formatSize:n,nodeDisplayName:a}}const $6=2e3,U6=8e3;function lp(e){const t=(...l)=>{for(const s of l)if(typeof s=="number")return s;return 0},r=(...l)=>{for(const s of l)if(typeof s=="string"&&s!=="")return s;return null},n=String(e.status??"pending"),a=n==="ok"||n==="done"?"done":n==="failed"||n==="partial"||n==="error"?"error":n==="running"?"running":"pending",i=Array.isArray(e.sources)?e.sources:[],o=r(e.op_type,e.kind)??"delete";return{id:t(e.id),op_type:o==="copy"||o==="move"?o:"delete",status:a,progress_total:t(e.progress_total,e.total,i.length),progress_done:t(e.progress_done,e.done),target_path:r(e.target_path,e.dest),source_dir:r(e.source_dir),source_count:t(e.source_count,i.length),error_message:r(e.error_message,e.error),started_at:r(e.started_at),finished_at:r(e.finished_at),created_at:r(e.created_at)}}function H6(e,t,r={}){const n=he([]),a=new Set,i=new Map;let o=!1;const l=mt(()=>n.value.some(y=>y.status==="pending"||y.status==="running"));let s;function u(){s||t.endpoints.opsList&&(s=setInterval(()=>{f()},$6),f())}function c(){s&&(clearInterval(s),s=void 0)}async function f(){var y;if(t.endpoints.opsList)try{const x=((await t.jsonFetch(t.endpoints.opsList)).ops||[]).map(lp);for(const _ of x)(_.status==="done"||_.status==="error")&&!a.has(_.id)&&(a.add(_.id),i.set(_.id,Date.now()),o&&((y=r.onSettled)==null||y.call(r,_)));const g=new Set(n.value.map(_=>_.id)),m=x.filter(_=>_.status==="pending"||_.status==="running"?!0:o?g.has(_.id):!1),b=new Set(m.map(_=>_.id)),v=n.value.filter(_=>!b.has(_.id)),S=[...m,...v];o=!0;const C=Date.now(),A=S.filter(_=>{if(_.status==="pending"||_.status==="running")return!0;const E=i.get(_.id);return E!==void 0&&C-E<U6});n.value=A,!l.value&&A.length===0&&c()}catch(p){console.warn("[usePendingOps] poll failed:",p)}}function d(y){const p=lp(y);n.value.some(g=>g.id===p.id)||(n.value=[p,...n.value]),u()}function h(y){n.value=n.value.filter(p=>p.id!==y),i.delete(y)}return Br(()=>{c()}),{ops:n,hasActive:l,register:d,dismiss:h,poll:f,startPolling:u,stopPolling:c}}const j6=25e3,G6=15e3,V6=6;class q6{constructor(t){na(this,"ws",null);na(this,"opts");na(this,"closed",!1);na(this,"connecting",!1);na(this,"retries",0);na(this,"fallback",!1);na(this,"pingTimer",null);na(this,"reconnectTimer",null);na(this,"currentPath",null);na(this,"currentFocus",null);this.opts=t,this.connect()}subscribe(t){this.currentPath=t,this.currentFocus=null,t&&this.send({type:"subscribe",path:t})}setFocus(t){this.currentFocus=t,this.send({type:"focus",file:t})}close(){this.closed=!0,this.clearTimers(),this.dropSocket()}async connect(){if(this.closed||this.connecting||this.ws)return;this.connecting=!0;let t=null;try{t=await this.opts.getTicket()}catch{t=null}if(this.connecting=!1,this.closed)return;if(!t||!t.ticket||!t.ws_url){this.fail();return}const r=t.ws_url.includes("?")?"&":"?";let n;try{n=new WebSocket(`${t.ws_url}${r}ticket=${encodeURIComponent(t.ticket)}`)}catch{this.fail();return}this.ws=n,n.onopen=()=>{var a,i;this.retries=0,this.setFallback(!1),(i=(a=this.opts.handlers).onStatus)==null||i.call(a,!0),this.currentPath&&this.send({type:"subscribe",path:this.currentPath}),this.currentFocus!==null&&this.send({type:"focus",file:this.currentFocus}),this.startPing()},n.onmessage=a=>{var l,s,u,c;let i;try{i=JSON.parse(typeof a.data=="string"?a.data:"")}catch{return}const o=i;(o==null?void 0:o.type)==="change"?(s=(l=this.opts.handlers).onChange)==null||s.call(l,i):(o==null?void 0:o.type)==="presence"&&((c=(u=this.opts.handlers).onPresence)==null||c.call(u,i))},n.onerror=()=>{},n.onclose=()=>{var a,i;this.stopPing(),this.ws=null,(i=(a=this.opts.handlers).onStatus)==null||i.call(a,!1),this.fail()}}fail(){if(this.closed||this.reconnectTimer)return;if(this.retries>=V6){this.setFallback(!0);return}const t=Math.min(1e3*2**this.retries,G6);this.retries+=1,this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},t)}setFallback(t){var r,n;this.fallback!==t&&(this.fallback=t,(n=(r=this.opts.handlers).onFallback)==null||n.call(r,t))}send(t){const r=this.ws;if(!(!r||r.readyState!==WebSocket.OPEN))try{r.send(JSON.stringify(t))}catch{}}startPing(){this.stopPing(),this.pingTimer=setInterval(()=>this.send({type:"ping"}),j6)}stopPing(){this.pingTimer&&(clearInterval(this.pingTimer),this.pingTimer=null)}dropSocket(){if(this.ws){try{this.ws.onclose=null,this.ws.close()}catch{}this.ws=null}}clearTimers(){this.stopPing(),this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}}const W6=200,K6=12e3;function X6(e,t){const r=he([]),n=he(!1);let a=null,i=null,o=null,l=null;function s(){o&&clearTimeout(o),o=setTimeout(()=>{o=null,t.reload()},W6)}function u(p){i&&p.path&&p.path!==i||(r.value=Array.isArray(p.users)?p.users:[])}function c(p){p?(r.value=[],l||(l=setInterval(()=>t.reload(),K6))):l&&(clearInterval(l),l=null)}function f(){a||(a=new q6({getTicket:()=>e.wsTicket(),handlers:{onChange:s,onPresence:u,onFallback:c,onStatus:p=>{n.value=p}}}))}function d(p){r.value=[],i=p,a==null||a.subscribe(p)}function h(p){a==null||a.setFocus(p)}function y(){o&&(clearTimeout(o),o=null),l&&(clearInterval(l),l=null),a==null||a.close(),a=null}return{presenceUsers:r,connected:n,start:f,subscribe:d,setFocus:h,stop:y}}let Ks=null,Xs=null,Ys=null,vc=null;function mc(){Ks||(Ks=import("monaco-editor").then(e=>(Ys=e.default??e,Ys)).catch(()=>(Ys=null,null))),Xs||(Xs=import("highlight.js").then(e=>(vc=e.default??e,vc)).catch(()=>(vc=null,null)))}async function sp(){return Ks||mc(),Ks}async function up(){return Xs||mc(),Xs}function Y6(){return Ys}const Z6=["title"],J6={class:"fx-presence-avatars"},Q6=["title"],e8={key:0,class:"fx-presence-dot","aria-hidden":"true"},t8={key:0,class:"fx-presence-more"},r8={class:"fx-presence-text"},n8={class:"fx-presence-file"},a8=qt({__name:"PresenceBar",props:{users:{},selfId:{}},setup(e){const t=e,r=mt(()=>(t.users??[]).filter(l=>t.selfId==null||l.id!==t.selfId));function n(l){return l.uid??String(l.id)}function a(l){const s=l.trim().split(/\s+/).filter(Boolean);return s.length===0?"?":s.length===1?s[0].slice(0,2).toUpperCase():(s[0][0]+s[s.length-1][0]).toUpperCase()}function i(l){const s=n(l);let u=0;for(let c=0;c<s.length;c++)u=u*31+s.charCodeAt(c)>>>0;return u%360}function o(l){return l.file?`${l.name} · ${l.file}`:l.name}return(l,s)=>r.value.length?(Q(),ae("div",{key:0,class:"fx-presence",title:r.value.map(o).join(", ")},[L("div",J6,[(Q(!0),ae(yt,null,nr(r.value.slice(0,5),u=>(Q(),ae("span",{key:n(u),class:"fx-presence-avatar",style:Ea({backgroundColor:`hsl(${i(u)} 60% 45%)`}),title:o(u)},[gr(le(a(u.name))+" ",1),u.file?(Q(),ae("span",e8)):rt("",!0)],12,Q6))),128)),r.value.length>5?(Q(),ae("span",t8,"+"+le(r.value.length-5),1)):rt("",!0)]),L("span",r8,[gr(le(r.value.length===1?r.value[0].name:`${r.value.length} kişi`)+" ",1),r.value.length===1&&r.value[0].file?(Q(),ae(yt,{key:0},[s[0]||(s[0]=gr(" · ",-1)),L("span",n8,le(r.value[0].file),1)],64)):rt("",!0)])],8,Z6)):rt("",!0)}}),Jr=(e,t)=>{const r=e.__vccOpts||e;for(const[n,a]of t)r[n]=a;return r},i8=Jr(a8,[["__scopeId","data-v-14d406d0"]]),o8={class:"fe-toolbar"},l8={class:"fe-toolbar__primary"},s8=["title","aria-label"],u8=["title"],c8={class:"fe-btn__label"},f8=["disabled","title","onClick"],d8={class:"fe-icon"},h8={class:"fe-btn__label"},p8=["title"],v8={class:"fe-btn__label"},m8={class:"fe-toolbar__search-group"},g8={class:"fe-search"},b8=["placeholder","value"],y8=["title"],x8=["title"],_8={class:"fe-toolbar__view",role:"tablist","aria-label":"View"},w8=["aria-selected","title"],k8=["aria-selected","title"],S8=qt({__name:"Toolbar",props:{viewMode:{},searchQuery:{},trashActive:{type:Boolean},actions:{},selectionMode:{},pasteEnabled:{type:Boolean},convertEnabled:{type:Boolean},canGoUp:{type:Boolean},atVirtualRoot:{type:Boolean},canWrite:{type:Boolean},locale:{}},emits:["update:viewMode","update:searchQuery","new-folder","upload","refresh","go-up","action","open-recents"],setup(e,{expose:t,emit:r}){const n=e,a=r,{t:i}=In(()=>n.locale),o=he(null),l=he(n.searchQuery);tr(()=>n.searchQuery,y=>{l.value=y});let s;function u(y){const p=y.target.value;l.value=p,s&&clearTimeout(s),s=setTimeout(()=>a("update:searchQuery",p),200)}function c(){var y,p;(y=o.value)==null||y.focus(),(p=o.value)==null||p.select()}t({focusSearch:c});const f=mt(()=>n.selectionMode??"none"),d=mt(()=>n.actions.filter(y=>!y.divider&&!y.hidden));function h(y){a("action",y)}return(y,p)=>(Q(),ae("div",o8,[L("div",l8,[e.canGoUp?(Q(),ae("button",{key:0,type:"button",class:"fe-btn fe-btn--icon-only",title:Qe(i)("toolbar.go_up"),"aria-label":Qe(i)("toolbar.go_up"),onClick:p[0]||(p[0]=x=>a("go-up"))},[...p[7]||(p[7]=[L("span",{class:"fe-icon"},"↑",-1)])],8,s8)):rt("",!0),f.value==="none"&&!e.trashActive&&!e.atVirtualRoot&&e.canWrite!==!1?(Q(),ae("button",{key:1,type:"button",class:"fe-btn fe-btn--primary",title:Qe(i)("toolbar.new_folder"),onClick:p[1]||(p[1]=x=>a("new-folder"))},[p[8]||(p[8]=L("span",{class:"fe-icon"},"📁",-1)),L("span",c8,le(Qe(i)("toolbar.new_folder")),1)],8,u8)):rt("",!0),(Q(!0),ae(yt,null,nr(d.value,x=>(Q(),ae("button",{key:x.key,type:"button",class:Xt(["fe-btn",{"fe-btn--danger":x.danger,"is-disabled":x.disabled}]),disabled:x.disabled,title:x.label,onClick:g=>h(x.key)},[L("span",d8,le(x.icon),1),L("span",h8,le(x.label),1)],10,f8))),128)),e.pasteEnabled&&f.value==="none"&&!e.trashActive&&!e.atVirtualRoot&&e.canWrite!==!1?(Q(),ae("button",{key:2,type:"button",class:"fe-btn",title:Qe(i)("ctx.paste"),onClick:p[2]||(p[2]=x=>h("paste"))},[p[9]||(p[9]=L("span",{class:"fe-icon"},"📋",-1)),L("span",v8,le(Qe(i)("ctx.paste")),1)],8,p8)):rt("",!0)]),p[14]||(p[14]=L("div",{class:"fe-toolbar__spacer"},null,-1)),L("div",m8,[L("div",g8,[L("input",{ref_key:"searchEl",ref:o,type:"search",class:"fe-search__input",placeholder:Qe(i)("toolbar.search.placeholder"),value:l.value,"aria-label":"Search",onInput:u},null,40,b8)]),!e.atVirtualRoot&&e.canWrite!==!1?(Q(),ae("button",{key:0,type:"button",class:"fe-btn fe-btn--icon-only",title:Qe(i)("toolbar.upload"),onClick:p[3]||(p[3]=x=>a("upload"))},[...p[10]||(p[10]=[L("span",{class:"fe-icon"},"⬆",-1)])],8,y8)):rt("",!0),L("button",{type:"button",class:"fe-btn fe-btn--icon-only",title:Qe(i)("toolbar.refresh"),onClick:p[4]||(p[4]=x=>a("refresh"))},[...p[11]||(p[11]=[L("span",{class:"fe-icon"},"↻",-1)])],8,x8)]),L("div",_8,[L("button",{type:"button",class:Xt(["fe-btn fe-btn--icon-only",{"is-active":e.viewMode==="list"}]),role:"tab","aria-selected":e.viewMode==="list",title:Qe(i)("toolbar.view.list"),onClick:p[5]||(p[5]=x=>a("update:viewMode","list"))},[...p[12]||(p[12]=[L("span",{class:"fe-icon"},"☰",-1)])],10,w8),L("button",{type:"button",class:Xt(["fe-btn fe-btn--icon-only",{"is-active":e.viewMode==="grid"}]),role:"tab","aria-selected":e.viewMode==="grid",title:Qe(i)("toolbar.view.grid"),onClick:p[6]||(p[6]=x=>a("update:viewMode","grid"))},[...p[13]||(p[13]=[L("span",{class:"fe-icon"},"▦",-1)])],10,k8)])]))}}),C8=["onClick"],A8=Jr(qt({__name:"TagPicker",props:{nodeId:{},apiBase:{},authHeaders:{type:Function},palette:{}},emits:["change","error"],setup(e,{emit:t}){const r=e,n=t,a=he([]),i=he(!1),o=he(!1),l=he(""),s=mt(()=>r.palette??["#ef4444","#f59e0b","#10b981","#3b82f6","#8b5cf6","#ec4899","#14b8a6","#f97316"]);function u(p){let x=0;for(let m=0;m<p.length;m++)x=x*31+p.charCodeAt(m)|0;const g=s.value;return g[Math.abs(x)%g.length]}async function c(p={}){return{...await(r.authHeaders??(()=>({})))(),...p}}async function f(){i.value=!0;try{const p=r.apiBase??"",x=await fetch(`${p}/api/files/manager/tags?node_id=${r.nodeId}`,{headers:await c(),credentials:"include"});if(x.ok){const g=await x.json();a.value=Array.isArray(g.tags)?g.tags:[]}}catch(p){n("error",p instanceof Error?p.message:String(p))}finally{i.value=!1}}async function d(p){const x=[...a.value];a.value=p;try{const g=r.apiBase??"",m=await fetch(`${g}/api/files/manager/tags`,{method:"POST",headers:await c({"Content-Type":"application/json"}),credentials:"include",body:JSON.stringify({node_id:r.nodeId,tags:p})});if(!m.ok)throw new Error(`tag save failed: ${m.status}`);n("change",p)}catch(g){a.value=x,n("error",g instanceof Error?g.message:String(g))}}function h(){const p=l.value.trim();if(!p||a.value.includes(p)){l.value="",o.value=!1;return}d([...a.value,p]),l.value="",o.value=!1}function y(p){d(a.value.filter(x=>x!==p))}return pr(f),tr(()=>r.nodeId,f),(p,x)=>(Q(),ae("div",{class:Xt(["filex-tag-picker",{"is-loading":i.value}])},[(Q(!0),ae(yt,null,nr(a.value,g=>(Q(),ae("span",{key:g,class:"filex-tag",style:Ea({"--filex-tag-color":u(g)})},[gr(le(g)+" ",1),L("button",{class:"filex-tag-x",type:"button",onClick:m=>y(g),"aria-label":"Remove tag"},"×",8,C8)],4))),128)),o.value?(Q(),ae("form",{key:0,class:"filex-tag-add",onSubmit:vr(h,["prevent"])},[rr(L("input",{"onUpdate:modelValue":x[0]||(x[0]=g=>l.value=g),autofocus:"",placeholder:"tag name",onBlur:h,onKeydown:x[1]||(x[1]=pa(g=>{o.value=!1,l.value=""},["escape"]))},null,544),[[sn,l.value]])],32)):(Q(),ae("button",{key:1,class:"filex-tag-add-btn",type:"button",onClick:x[2]||(x[2]=g=>o.value=!0)},"+ Add tag"))],2))}}),[["__scopeId","data-v-f2104118"]]),E8={class:"filex-recent"},T8=["disabled"],M8={key:0},D8=["onClick"],I8={class:"filex-recent-name"},z8={class:"filex-recent-meta"},F8={key:1,class:"filex-recent-empty"},O8={key:2,class:"filex-recent-empty"},P8=Jr(qt({__name:"RecentlyOpened",props:{apiBase:{},authHeaders:{type:Function},limit:{},refreshKey:{}},emits:["open","error"],setup(e,{emit:t}){const r=e,n=t,a=he([]),i=he(!1);async function o(){i.value=!0;try{const s=await(r.authHeaders??(()=>({})))(),u=r.apiBase??"",c=r.limit??20,f=await fetch(`${u}/api/files/manager/recent?limit=${c}`,{headers:s,credentials:"include"});if(f.ok){const d=await f.json();a.value=Array.isArray(d.entries)?d.entries:Array.isArray(d)?d:[]}}catch(s){n("error",s instanceof Error?s.message:String(s))}finally{i.value=!1}}function l(s){if(!s)return"";const u=new Date(s).getTime();if(Number.isNaN(u))return"";const c=Date.now()-u;return c<6e4?"just now":c<36e5?`${Math.floor(c/6e4)}m ago`:c<864e5?`${Math.floor(c/36e5)}h ago`:`${Math.floor(c/864e5)}d ago`}return pr(o),tr(()=>r.refreshKey,o),(s,u)=>(Q(),ae("div",E8,[L("header",null,[u[0]||(u[0]=L("h3",null,"Recently opened",-1)),L("button",{class:"filex-recent-refresh",type:"button",onClick:o,disabled:i.value}," ↻ ",8,T8)]),a.value.length?(Q(),ae("ul",M8,[(Q(!0),ae(yt,null,nr(a.value,c=>(Q(),ae("li",{key:c.id},[L("button",{type:"button",onClick:f=>n("open",c),class:"filex-recent-item"},[L("span",I8,le(c.name),1),L("span",z8,le(l(c.last_opened)),1)],8,D8)]))),128))])):i.value?(Q(),ae("p",O8,"Loading…")):(Q(),ae("p",F8,"Nothing here yet."))]))}}),[["__scopeId","data-v-ff50baed"]]),R8={class:"fe-breadcrumb","aria-label":"Breadcrumb"},L8=["aria-current","onClick","onContextmenu","onDrop"],B8={key:0,class:"fe-breadcrumb__sep","aria-hidden":"true"},N8=["title","aria-label"],$8=["placeholder","onKeydown"],U8=qt({__name:"Breadcrumb",props:{dirname:{},adapter:{},rootLabel:{},locale:{},multiStorageRoot:{type:Boolean},rootPath:{}},emits:["navigate","copy-path","crumb-context","crumb-drop"],setup(e,{emit:t}){const r=e,n=mt(()=>{if(!r.rootPath)return"";const m=r.rootPath,b=m.indexOf("://");return(b>=0?m.slice(b+3):m).replace(/^\/+|\/+$/g,"")}),a=mt(()=>{const m=n.value;if(!m)return r.rootLabel||r.adapter;const b=m.split("/");return b[b.length-1]||r.rootLabel||r.adapter}),{t:i}=In(()=>r.locale),o=t,l=mt(()=>{const m=`${r.adapter}://`,b=r.dirname.startsWith(m)?r.dirname.slice(m.length):r.dirname,v=b.split("/").filter(Boolean),S=[];if(r.rootPath){const A=n.value,_=b.replace(/^\/+|\/+$/g,""),E=A&&(_===A||_.startsWith(A+"/"))?_.slice(A.length).replace(/^\/+/,""):"";S.push({label:a.value,adapterPath:r.rootPath});let M=A;for(const z of E.split("/").filter(Boolean))M=M?`${M}/${z}`:z,S.push({label:z===".trash"?i("node.trash"):z,adapterPath:`${m}${M}`});return S}r.multiStorageRoot?(S.push({label:"/",adapterPath:""}),r.adapter&&S.push({label:r.rootLabel||r.adapter,adapterPath:m})):S.push({label:r.rootLabel||r.adapter,adapterPath:m});let C="";for(const A of v){C=C?`${C}/${A}`:A;const _=A===".trash"?i("node.trash"):A;S.push({label:_,adapterPath:`${m}${C}`})}return S});function s(m){o("navigate",m.adapterPath)}function u(m,b){m.preventDefault(),m.stopPropagation(),o("crumb-context",{x:m.clientX,y:m.clientY,adapterPath:b.adapterPath,label:b.label})}function c(m){var b;(b=m.dataTransfer)!=null&&b.types.includes("application/x-brf-files")&&(m.preventDefault(),m.stopPropagation(),m.dataTransfer&&(m.dataTransfer.dropEffect="move"))}function f(m,b){var v;(v=m.dataTransfer)!=null&&v.types.includes("application/x-brf-files")&&(m.preventDefault(),m.stopPropagation(),o("crumb-drop",b.adapterPath,m))}const d=he(!1),h=he(""),y=he(null);function p(){const m=`${r.adapter}://`,b=r.dirname.startsWith(m)?r.dirname.slice(m.length):r.dirname;if(r.rootPath){const v=n.value,S=b.replace(/^\/+|\/+$/g,""),C=v&&(S===v||S.startsWith(v+"/"))?S.slice(v.length).replace(/^\/+/,""):"";h.value=C?`/${C}`:"/",d.value=!0,za(()=>{var A,_;(A=y.value)==null||A.focus(),(_=y.value)==null||_.select()});return}if(r.multiStorageRoot)if(!r.adapter)h.value="/";else{const v=b.replace(/^\/+|\/+$/g,"");h.value=v?`/${r.adapter}/${v}`:`/${r.adapter}`}else h.value=b;d.value=!0,za(()=>{var v,S;(v=y.value)==null||v.focus(),(S=y.value)==null||S.select()})}function x(){const m=h.value.trim();if(d.value=!1,r.rootPath){const v=m.replace(/^\/+|\/+$/g,""),S=n.value,C=v?S?`${S}/${v}`:v:S;o("navigate",C?`${r.adapter}://${C}`:`${r.adapter}://`);return}if(r.multiStorageRoot){const v=m.replace(/^\/+|\/+$/g,"");if(!v){o("navigate","");return}const S=v.indexOf("/"),C=S===-1?v:v.slice(0,S),A=S===-1?"":v.slice(S+1);o("navigate",A?`${C}://${A}`:`${C}://`);return}const b=m.replace(/^\/+|\/+$/g,"");b&&o("navigate",`${r.adapter}://${b}`)}function g(){d.value=!1}return(m,b)=>(Q(),ae("nav",R8,[d.value?rr((Q(),ae("input",{key:1,ref_key:"pathInput",ref:y,"onUpdate:modelValue":b[0]||(b[0]=v=>h.value=v),type:"text",class:"fe-breadcrumb__input",placeholder:Qe(i)("breadcrumb.path_placeholder"),spellcheck:"false",autocomplete:"off",onKeydown:[pa(vr(x,["prevent"]),["enter"]),pa(vr(g,["prevent"]),["escape"])],onBlur:g},null,40,$8)),[[sn,h.value]]):(Q(),ae(yt,{key:0},[(Q(!0),ae(yt,null,nr(l.value,(v,S)=>(Q(),ae("button",{key:v.adapterPath,class:Xt(["fe-breadcrumb__crumb",{"is-last":S===l.value.length-1}]),type:"button","aria-current":S===l.value.length-1?"page":void 0,onClick:C=>s(v),onContextmenu:C=>u(C,v),onDragover:c,onDrop:C=>f(C,v)},[L("span",null,le(v.label),1),S<l.value.length-1?(Q(),ae("span",B8,"›")):rt("",!0)],42,L8))),128)),L("button",{type:"button",class:"fe-breadcrumb__edit",title:Qe(i)("breadcrumb.go_to_path"),"aria-label":Qe(i)("breadcrumb.go_to_path"),onClick:p},"✏",8,N8)],64))]))}}),H8=["aria-pressed","title"],j8={viewBox:"0 0 24 24",width:"16",height:"16","aria-hidden":"true"},G8=["fill"],V8={key:0,class:"filex-star-label"},q8=Jr(qt({__name:"StarButton",props:{starred:{type:Boolean},nodeId:{},apiBase:{},authHeaders:{type:Function},compact:{type:Boolean}},emits:["change","error"],setup(e,{emit:t}){const r=e,n=t,a=he(r.starred);tr(()=>r.starred,o=>{a.value=o});async function i(){const o=!a.value;a.value=o;try{const l={"Content-Type":"application/json",...await(r.authHeaders??(()=>({})))()},s=r.apiBase??"",u=await fetch(`${s}/api/files/manager/star`,{method:"POST",headers:l,credentials:"include",body:JSON.stringify({node_id:r.nodeId,starred:o})});if(!u.ok)throw new Error(`star toggle failed: ${u.status}`);n("change",o)}catch(l){a.value=!o,n("error",l instanceof Error?l.message:String(l))}}return(o,l)=>(Q(),ae("button",{type:"button",class:Xt(["filex-star-btn",{"is-starred":a.value,"is-compact":e.compact}]),"aria-pressed":a.value,title:a.value?"Unstar":"Star",onClick:vr(i,["stop"])},[(Q(),ae("svg",j8,[L("path",{fill:a.value?"currentColor":"none",stroke:"currentColor","stroke-width":"2","stroke-linejoin":"round",d:"M12 2.5l3.09 6.26 6.91 1-5 4.87 1.18 6.87L12 18.27l-6.18 3.23L7 14.63 2 9.76l6.91-1z"},null,8,G8)])),e.compact?rt("",!0):(Q(),ae("span",V8,le(a.value?"Starred":"Star"),1))],10,H8))}}),[["__scopeId","data-v-1b788147"]]),W8={class:"fe-list__head",role:"row"},K8={class:"fe-list__col fe-list__col--name",role:"columnheader"},X8={class:"fe-list__col fe-list__col--size",role:"columnheader"},Y8={class:"fe-list__col fe-list__col--mod",role:"columnheader"},Z8={class:"fe-list__body",role:"rowgroup"},J8=["onClick","onDblclick","onContextmenu","onDragstart","onDragover","onDrop","onTouchstartPassive"],Q8={class:"fe-list__col fe-list__col--name"},e7={class:"fe-list__icon","aria-hidden":"true"},t7={class:"fe-list__name-wrap"},r7=["title"],n7=["title"],a7={class:"fe-list__col fe-list__col--size"},i7={class:"fe-list__col fe-list__col--mod"},o7={key:0,class:"fe-list__empty"},l7=qt({__name:"ListView",props:{files:{},selected:{},clipped:{},showParentPath:{type:Boolean},locale:{},loading:{type:Boolean},starredIds:{},apiBase:{},authHeaders:{type:Function}},emits:["click-row","dbl-row","context-row","item-drag-start","item-drop-into","star-change"],setup(e,{emit:t}){const r=e,n=t,{t:a,formatSize:i,nodeDisplayName:o}=In(()=>r.locale);function l(C){return r.selected.has(C.path)}function s(C,A){n("click-row",C,{ctrl:A.ctrlKey||A.metaKey,shift:A.shiftKey})}function u(C){n("dbl-row",C)}function c(C,A){A.preventDefault(),A.stopPropagation(),n("context-row",C,A)}function f(C,A){n("item-drag-start",C,A)}function d(C,A){var _;C.type==="dir"&&(_=A.dataTransfer)!=null&&_.types.includes("application/x-brf-files")&&(A.preventDefault(),A.stopPropagation(),A.dataTransfer&&(A.dataTransfer.dropEffect="move"))}function h(C,A){var _;C.type==="dir"&&(_=A.dataTransfer)!=null&&_.types.includes("application/x-brf-files")&&(A.preventDefault(),A.stopPropagation(),n("item-drop-into",C,A))}let y,p=null;function x(C,A){p=C,y&&clearTimeout(y),y=setTimeout(()=>{if(p){const _=A.touches[0];n("context-row",p,{clientX:_.clientX,clientY:_.clientY,preventDefault:()=>{}})}},500)}function g(){y&&clearTimeout(y),p=null}function m(C){if(C.basename===".trash")return"🗑";if(C.mime_type==="inode/storage")return"💾";if(C.type==="dir")return"📁";const A=(C.extension||"").toLowerCase();return["jpg","jpeg","png","webp","gif","bmp","avif","heic","svg"].includes(A)?"🖼":["mp4","webm","mov","mkv","avi","ogv","m4v"].includes(A)?"🎞":["mp3","wav","flac","ogg","m4a","aac","opus"].includes(A)?"🎵":A==="pdf"?"📕":["doc","docx","odt","rtf"].includes(A)?"📄":["xls","xlsx","ods","csv"].includes(A)?"📊":["ppt","pptx","odp"].includes(A)?"📽":["zip","tar","gz","bz2","7z","rar"].includes(A)?"🗜":["txt","md","log","json","yml","yaml","xml"].includes(A)?"📝":"📎"}function b(C){return C?new Date(C*(C<1e12?1e3:1)).toLocaleString():"—"}function v(C){const A=C.replace(/^[a-z][a-z0-9+.-]*:\/\//i,""),_=A.lastIndexOf("/");return _===-1?"":A.slice(0,_)}const S=mt(()=>r.files);return(C,A)=>(Q(),ae("div",{class:Xt(["fe-list",{"is-loading":e.loading,"has-star-col":!!e.apiBase||e.apiBase===""}])},[L("div",W8,[A[1]||(A[1]=L("div",{class:"fe-list__col fe-list__col--star",role:"columnheader","aria-label":"Star"},null,-1)),L("div",K8,le(Qe(a)("col.name")),1),L("div",X8,le(Qe(a)("col.size")),1),L("div",Y8,le(Qe(a)("col.modified")),1)]),L("div",Z8,[(Q(!0),ae(yt,null,nr(S.value,_=>{var E,M;return Q(),ae("div",{key:_.path,class:Xt(["fe-list__row",{"is-selected":l(_),"is-dir":_.type==="dir","is-trash":_.trashed,"is-clipped":(E=e.clipped)==null?void 0:E.has(_.path)}]),role:"row",tabindex:"0",draggable:"true",onClick:z=>s(_,z),onDblclick:z=>u(_),onContextmenu:z=>c(_,z),onDragstart:z=>f(_,z),onDragover:z=>d(_,z),onDrop:z=>h(_,z),onTouchstartPassive:z=>x(_,z),onTouchend:g,onTouchmove:g},[L("div",{class:"fe-list__col fe-list__col--star",onClick:A[0]||(A[0]=vr(()=>{},["stop"]))},[typeof _.id=="number"&&_.type==="file"?(Q(),kr(q8,{key:0,starred:!!((M=e.starredIds)!=null&&M.has(_.id)),"node-id":_.id,"api-base":e.apiBase,"auth-headers":e.authHeaders,compact:"",onChange:z=>n("star-change",_,z)},null,8,["starred","node-id","api-base","auth-headers","onChange"])):rt("",!0)]),L("div",Q8,[L("span",e7,le(m(_)),1),L("div",t7,[L("span",{class:"fe-list__name",title:_.basename},le(Qe(o)(_)),9,r7),e.showParentPath?(Q(),ae("span",{key:0,class:"fe-list__parent",title:v(_.path)},le(v(_.path)||"—"),9,n7)):rt("",!0)])]),L("div",a7,le(Qe(i)(_.size)),1),L("div",i7,le(b(_.last_modified)),1)],42,J8)}),128)),!e.loading&&S.value.length===0?(Q(),ae("div",o7,le(Qe(a)("empty.folder")),1)):rt("",!0)])],2))}}),s7=["onClick","onDblclick","onContextmenu","onDragstart","onDragover","onDrop","onTouchstartPassive"],u7={class:"fe-grid__thumb"},c7=["src","alt"],f7={key:1,class:"fe-grid__icon"},d7=["title"],h7=["title"],p7={class:"fe-grid__meta"},v7={key:0,class:"fe-grid__empty"},m7=qt({__name:"GridView",props:{files:{},selected:{},clipped:{},showParentPath:{type:Boolean},locale:{},loading:{type:Boolean}},emits:["click-card","dbl-card","context-card","item-drag-start","item-drop-into"],setup(e,{emit:t}){const r=e,n=t,{t:a,formatSize:i,nodeDisplayName:o}=In(()=>r.locale);function l(v){return r.selected.has(v.path)}function s(v,S){n("click-card",v,{ctrl:S.ctrlKey||S.metaKey,shift:S.shiftKey})}function u(v){n("dbl-card",v)}function c(v,S){S.preventDefault(),S.stopPropagation(),n("context-card",v,S)}function f(v,S){n("item-drag-start",v,S)}function d(v,S){var C;v.type==="dir"&&(C=S.dataTransfer)!=null&&C.types.includes("application/x-brf-files")&&(S.preventDefault(),S.stopPropagation(),S.dataTransfer&&(S.dataTransfer.dropEffect="move"))}function h(v,S){var C;v.type==="dir"&&(C=S.dataTransfer)!=null&&C.types.includes("application/x-brf-files")&&(S.preventDefault(),S.stopPropagation(),n("item-drop-into",v,S))}let y,p=null;function x(v,S){p=v,y&&clearTimeout(y),y=setTimeout(()=>{if(p){const C=S.touches[0];n("context-card",p,{clientX:C.clientX,clientY:C.clientY,preventDefault:()=>{}})}},500)}function g(){y&&clearTimeout(y),p=null}function m(v){const S=v.replace(/^[a-z][a-z0-9+.-]*:\/\//i,""),C=S.lastIndexOf("/");return C===-1?"":S.slice(0,C)}function b(v){if(v.basename===".trash")return"🗑";if(v.mime_type==="inode/storage")return"💾";if(v.type==="dir")return"📁";const S=(v.extension||"").toLowerCase();return["jpg","jpeg","png","webp","gif","bmp","svg"].includes(S)?"🖼":["mp4","webm","mov","mkv"].includes(S)?"🎞":["mp3","wav","flac","ogg"].includes(S)?"🎵":S==="pdf"?"📕":["doc","docx","odt"].includes(S)?"📄":["xls","xlsx","csv"].includes(S)?"📊":["ppt","pptx"].includes(S)?"📽":["zip","tar","gz","7z"].includes(S)?"🗜":"📎"}return(v,S)=>(Q(),ae("div",{class:Xt(["fe-grid",{"is-loading":e.loading}])},[(Q(!0),ae(yt,null,nr(e.files,C=>{var A;return Q(),ae("div",{key:C.path,class:Xt(["fe-grid__card",{"is-selected":l(C),"is-dir":C.type==="dir","is-trash":C.trashed,"is-clipped":(A=e.clipped)==null?void 0:A.has(C.path)}]),tabindex:"0",draggable:"true",onClick:_=>s(C,_),onDblclick:_=>u(C),onContextmenu:_=>c(C,_),onDragstart:_=>f(C,_),onDragover:_=>d(C,_),onDrop:_=>h(C,_),onTouchstartPassive:_=>x(C,_),onTouchend:g,onTouchmove:g},[L("div",u7,[C.thumb_url?(Q(),ae("img",{key:0,src:C.thumb_url,alt:C.basename,loading:"lazy",draggable:"false"},null,8,c7)):(Q(),ae("span",f7,le(b(C)),1))]),L("div",{class:"fe-grid__label",title:C.basename},le(Qe(o)(C)),9,d7),e.showParentPath?(Q(),ae("div",{key:0,class:"fe-grid__parent",title:m(C.path)},le(m(C.path)||"—"),9,h7)):rt("",!0),L("div",p7,le(Qe(i)(C.size)),1)],42,s7)}),128)),!e.loading&&e.files.length===0?(Q(),ae("div",v7,le(Qe(a)("empty.folder")),1)):rt("",!0)],2))}}),g7=["data-prefers-dark"],b7={key:0,class:"fe-ctx__sep"},y7=["disabled","onClick"],x7={key:0,class:"fe-ctx__icon","aria-hidden":"true"},_7={class:"fe-ctx__label"},w7=qt({__name:"ContextMenu",props:{locale:{},actions:{},theme:{}},emits:["select"],setup(e,{expose:t,emit:r}){const n=e,a=r,i=he(!1),o=he(0),l=he(0),s=he([]),u=he(null);async function c(v,S){i.value=!0,o.value=v.clientX,l.value=v.clientY,s.value=S,await za(),f()}function f(){const v=u.value;if(!v||typeof window>"u")return;const S=v.getBoundingClientRect(),C=8,A=window.innerWidth,_=window.innerHeight;l.value+S.height>_-C&&(l.value=Math.max(C,_-S.height-C)),o.value+S.width>A-C&&(o.value=Math.max(C,A-S.width-C))}function d(){i.value=!1}function h(v){v.disabled||(a("select",v,s.value),d())}function y(v){v.key==="Escape"&&d()}const p=mt(()=>n.actions.filter(v=>!v.hidden)),x=he(!1);let g;function m(v){x.value=!!(v&&"matches"in v&&v.matches)}pr(()=>{var v;typeof window>"u"||(g=window.matchMedia("(prefers-color-scheme: dark)"),m(g),(v=g.addEventListener)==null||v.call(g,"change",m))}),Br(()=>{var v;(v=g==null?void 0:g.removeEventListener)==null||v.call(g,"change",m)});const b=mt(()=>`fe-ctx-backdrop--theme-${n.theme||"auto"}`);return t({show:c,hide:d}),(v,S)=>(Q(),kr(Zb,{to:"body"},[Bt(po,{name:"fe-ctx"},{default:Tr(()=>[i.value?(Q(),ae("div",{key:0,class:Xt(["fe-ctx-backdrop",b.value]),"data-prefers-dark":x.value?"1":"0",onClick:d,onContextmenu:vr(d,["prevent"]),onKeydown:y},[L("div",{ref_key:"menuEl",ref:u,class:"fe-ctx",role:"menu",style:Ea({top:l.value+"px",left:o.value+"px"}),onClick:S[0]||(S[0]=vr(()=>{},["stop"]))},[(Q(!0),ae(yt,null,nr(p.value,(C,A)=>(Q(),ae(yt,{key:C.key||A},[C.divider?(Q(),ae("div",b7)):(Q(),ae("button",{key:1,type:"button",class:Xt(["fe-ctx__item",{"is-danger":C.danger,"is-disabled":C.disabled}]),disabled:C.disabled,role:"menuitem",onClick:_=>h(C)},[C.icon?(Q(),ae("span",x7,le(C.icon),1)):rt("",!0),L("span",_7,le(C.label),1)],10,y7))],64))),128))],4)],42,g7)):rt("",!0)]),_:1})]))}}),k7={key:0,class:"fe-upload"},S7={class:"fe-upload__header"},C7={class:"fe-upload__count"},A7={class:"fe-upload__list"},E7=["title"],T7=["aria-valuenow"],M7={class:"fe-upload__meta"},D7=["onClick"],I7=["onClick"],z7=qt({__name:"UploadProgress",props:{jobs:{},locale:{}},emits:["cancel","dismiss"],setup(e,{emit:t}){const r=e,n=t,{t:a,formatSize:i}=In(()=>r.locale),o=mt(()=>r.jobs);function l(s){switch(s.status){case"done":return a("upload.done");case"error":return`${a("upload.error")}: ${s.error??""}`;case"aborted":return a("upload.aborted");default:return a("upload.progress")}}return(s,u)=>(Q(),kr(po,{name:"fe-upload-slide"},{default:Tr(()=>[o.value.length>0?(Q(),ae("div",k7,[L("div",S7,[L("strong",null,le(Qe(a)("upload.progress")),1),L("span",C7,le(o.value.length),1)]),L("ul",A7,[(Q(!0),ae(yt,null,nr(o.value,c=>(Q(),ae("li",{key:c.id,class:Xt(["fe-upload__item",`is-${c.status}`])},[L("div",{class:"fe-upload__name",title:c.file.name},le(c.file.name),9,E7),L("div",{class:"fe-upload__bar","aria-valuenow":c.percent,role:"progressbar"},[L("div",{class:"fe-upload__bar-fill",style:Ea({width:c.percent+"%"})},null,4)],8,T7),L("div",M7,[L("span",null,le(l(c)),1),L("span",null,le(Qe(i)(c.uploadedBytes))+" / "+le(Qe(i)(c.totalBytes)),1),c.status==="uploading"||c.status==="initializing"?(Q(),ae("button",{key:0,type:"button",class:"fe-upload__cancel",onClick:f=>n("cancel",c)},le(Qe(a)("upload.cancel")),9,D7)):(Q(),ae("button",{key:1,type:"button",class:"fe-upload__cancel",onClick:f=>n("dismiss",c)},"×",8,I7))])],2))),128))])])):rt("",!0)]),_:1}))}}),F7={class:"fe-ops__row"},O7=["title"],P7=["onClick"],R7={class:"fe-ops__bar"},L7={key:0,class:"fe-ops__error"},B7=qt({__name:"PendingOpsTray",props:{ops:{},locale:{}},emits:["dismiss"],setup(e,{emit:t}){const r=e,n=t,{t:a}=In(()=>r.locale),i=mt(()=>[...r.ops].sort((u,c)=>c.id-u.id));function o(u){return u.status==="done"?100:u.progress_total<=0?0:Math.min(100,Math.round(u.progress_done/u.progress_total*100))}function l(u){return u.status==="done"?"is-done":u.status==="error"?"is-error":""}function s(u){const c=u.op_type==="copy"?a("ops.copy"):u.op_type==="move"?a("ops.move"):a("ops.delete");return u.status==="pending"?`${c} (${a("ops.queued")})`:u.status==="running"?`${c} ${u.progress_done}/${u.progress_total}`:u.status==="done"?`${c} ${a("ops.done")} (${u.progress_total})`:u.status==="error"?`${c} ${a("ops.error")}`:c}return(u,c)=>i.value.length>0?(Q(),kr(x6,{key:0,name:"fe-ops-slide",tag:"div",class:"fe-ops",role:"status","aria-live":"polite"},{default:Tr(()=>[(Q(!0),ae(yt,null,nr(i.value,f=>(Q(),ae("div",{key:f.id,class:Xt(["fe-ops__item",l(f)])},[L("div",F7,[L("span",{class:"fe-ops__title",title:f.target_path||f.source_dir||""},le(s(f)),9,O7),f.status==="done"||f.status==="error"?(Q(),ae("button",{key:0,type:"button",class:"fe-ops__dismiss","aria-label":"Dismiss",onClick:d=>n("dismiss",f.id)},"×",8,P7)):rt("",!0)]),L("div",R7,[L("div",{class:"fe-ops__bar-fill",style:Ea({width:o(f)+"%"})},null,4)]),f.status==="error"&&f.error_message?(Q(),ae("div",L7,le(f.error_message),1)):rt("",!0)],2))),128))]),_:1})):rt("",!0)}}),N7={key:0,class:"fe-modal__head"},$7={class:"fe-modal__title"},U7={class:"fe-modal__body"},H7={key:1,class:"fe-modal__actions"},Al=qt({__name:"Modal",props:{open:{type:Boolean},title:{},size:{},closeOnBackdrop:{type:Boolean},chromeless:{type:Boolean},theme:{}},emits:["close"],setup(e,{emit:t}){const r=e,n=t,a=he(null);tr(()=>r.open,l=>{l?(document.addEventListener("keydown",i),setTimeout(()=>{var u;const s=(u=a.value)==null?void 0:u.querySelector('input,select,textarea,button,[tabindex]:not([tabindex="-1"])');s==null||s.focus()},30)):document.removeEventListener("keydown",i)}),Br(()=>document.removeEventListener("keydown",i));function i(l){l.key==="Escape"&&n("close")}function o(){r.closeOnBackdrop!==!1&&n("close")}return(l,s)=>(Q(),kr(po,{name:"fe-modal"},{default:Tr(()=>[e.open?(Q(),ae("div",{key:0,class:Xt(["fe fe-modal__backdrop",[{"fe-modal__backdrop--chromeless":e.chromeless},e.theme==="light"?"fe--theme-light":"",e.theme==="dark"?"fe--theme-dark":""]]),role:"presentation",onClick:o},[L("div",{ref_key:"cardEl",ref:a,class:Xt(["fe-modal__card",[`fe-modal__card--${e.size||"md"}`,e.chromeless&&"fe-modal__card--chromeless"]]),role:"dialog","aria-modal":"true",onClick:s[1]||(s[1]=vr(()=>{},["stop"]))},[e.title&&!e.chromeless?(Q(),ae("header",N7,[L("h2",$7,le(e.title),1),L("button",{type:"button",class:"fe-modal__close","aria-label":"Close",onClick:s[0]||(s[0]=u=>n("close"))},"×")])):rt("",!0),L("div",U7,[j1(l.$slots,"default")]),l.$slots.actions&&!e.chromeless?(Q(),ae("footer",H7,[j1(l.$slots,"actions")])):rt("",!0)],2)],2)):rt("",!0)]),_:3}))}}),j7=["placeholder","onKeydown"],G7={key:0,class:"fe-form__error"},V7=qt({__name:"NewFolderModal",props:{open:{type:Boolean},locale:{}},emits:["close","submit"],setup(e,{emit:t}){const r=e,n=t,{t:a}=In(()=>r.locale),i=he(""),o=he(null);tr(()=>r.open,s=>{s&&(i.value="",o.value=null)});function l(){const s=i.value.trim();if(!s){o.value=a("modal.newfolder.placeholder");return}if(/[\\/]/.test(s)||s==="."||s===".."){o.value="Geçersiz karakter";return}n("submit",s)}return(s,u)=>(Q(),kr(Al,{open:e.open,title:Qe(a)("modal.newfolder.title"),size:"sm",onClose:u[2]||(u[2]=c=>n("close"))},{actions:Tr(()=>[L("button",{type:"button",class:"fe-btn",onClick:u[1]||(u[1]=c=>n("close"))},le(Qe(a)("modal.newfolder.cancel")),1),L("button",{type:"button",class:"fe-btn fe-btn--primary",onClick:l},le(Qe(a)("modal.newfolder.create")),1)]),default:Tr(()=>[L("form",{onSubmit:vr(l,["prevent"])},[rr(L("input",{"onUpdate:modelValue":u[0]||(u[0]=c=>i.value=c),type:"text",class:"fe-input",placeholder:Qe(a)("modal.newfolder.placeholder"),autocomplete:"off",onKeydown:pa(vr(l,["prevent"]),["enter"])},null,40,j7),[[sn,i.value]]),o.value?(Q(),ae("p",G7,le(o.value),1)):rt("",!0)],32)]),_:1},8,["open","title"]))}}),q7=["onKeydown"],W7=qt({__name:"RenameModal",props:{open:{type:Boolean},locale:{},currentName:{}},emits:["close","submit"],setup(e,{emit:t}){const r=e,n=t,{t:a}=In(()=>r.locale),i=he("");tr(()=>[r.open,r.currentName],([l,s])=>{l&&(i.value=s)});function o(){const l=i.value.trim();l&&(/[\\/]/.test(l)||l==="."||l===".."||n("submit",l))}return(l,s)=>(Q(),kr(Al,{open:e.open,title:Qe(a)("modal.rename.title"),size:"sm",onClose:s[2]||(s[2]=u=>n("close"))},{actions:Tr(()=>[L("button",{type:"button",class:"fe-btn",onClick:s[1]||(s[1]=u=>n("close"))},le(Qe(a)("modal.rename.cancel")),1),L("button",{type:"button",class:"fe-btn fe-btn--primary",onClick:o},le(Qe(a)("modal.rename.save")),1)]),default:Tr(()=>[L("form",{onSubmit:vr(o,["prevent"])},[rr(L("input",{"onUpdate:modelValue":s[0]||(s[0]=u=>i.value=u),type:"text",class:"fe-input",autocomplete:"off",onKeydown:pa(vr(o,["prevent"]),["enter"])},null,40,q7),[[sn,i.value]])],32)]),_:1},8,["open","title"]))}}),K7=qt({__name:"DeleteConfirmModal",props:{open:{type:Boolean},locale:{},count:{}},emits:["close","confirm"],setup(e,{emit:t}){const r=e,n=t,{t:a}=In(()=>r.locale);return(i,o)=>(Q(),kr(Al,{open:e.open,title:Qe(a)("modal.delete.title"),size:"sm",onClose:o[2]||(o[2]=l=>n("close"))},{actions:Tr(()=>[L("button",{type:"button",class:"fe-btn",onClick:o[0]||(o[0]=l=>n("close"))},le(Qe(a)("modal.delete.cancel")),1),L("button",{type:"button",class:"fe-btn fe-btn--danger",onClick:o[1]||(o[1]=l=>n("confirm"))},le(Qe(a)("modal.delete.confirm")),1)]),default:Tr(()=>[L("p",null,le(Qe(a)("modal.delete.message",{count:e.count})),1)]),_:1},8,["open","title"]))}}),X7={class:"fe-form__row"},Y7={class:"fe-form__row fe-form__row--stack"},Z7={class:"fe-form__row fe-form__row--stack"},J7={key:1,class:"fe-share-result"},Q7={class:"fe-share-result__row"},ey={class:"fe-share-result__copy"},ty=["value"],ry={key:0,class:"fe-share-result__row"},ny={class:"fe-share-result__copy"},ay=["value"],iy={class:"fe-share-result__row"},oy={class:"fe-share-result__copy"},ly=["value"],sy=qt({__name:"ShareModal",props:{open:{type:Boolean},locale:{},share:{}},emits:["close","submit","toast"],setup(e,{emit:t}){const r=e,n=t,{t:a}=In(()=>r.locale),i=he(!1),o=he(""),l=he("");tr(()=>r.open,d=>{d&&(i.value=!1,o.value="",l.value="")});function s(){n("submit",{password:i.value,expires_at:o.value?new Date(o.value).toISOString():null,max_downloads:l.value?Number(l.value):null})}async function u(d,h){try{await navigator.clipboard.writeText(d),n("toast",h)}catch{}}function c(d){return`'${d.replace(/'/g,"'\\''")}'`}const f=mt(()=>{const d=r.share;if(!d)return"";let h=d.url;return d.password_pin&&(h+=(h.includes("?")?"&":"?")+"pin="+encodeURIComponent(d.password_pin)),`curl -fSL ${d.filename?`-o ${c(d.filename)} `:"-OJ "}${c(h)}`});return(d,h)=>(Q(),kr(Al,{open:e.open,title:Qe(a)("modal.share.title"),size:"md",onClose:h[7]||(h[7]=y=>n("close"))},{actions:Tr(()=>[L("button",{type:"button",class:"fe-btn",onClick:h[6]||(h[6]=y=>n("close"))},le(e.share?"Kapat":Qe(a)("modal.share.cancel")),1),e.share?rt("",!0):(Q(),ae("button",{key:0,type:"button",class:"fe-btn fe-btn--primary",onClick:s},le(Qe(a)("modal.share.create")),1))]),default:Tr(()=>[e.share?(Q(),ae("div",J7,[L("div",Q7,[h[8]||(h[8]=L("label",null,"Link",-1)),L("div",ey,[L("input",{value:e.share.url,readonly:"",class:"fe-input"},null,8,ty),L("button",{type:"button",class:"fe-btn",onClick:h[3]||(h[3]=y=>u(e.share.url,Qe(a)("modal.share.url_copied")))},le(Qe(a)("modal.share.copy")),1)])]),e.share.password_pin?(Q(),ae("div",ry,[h[9]||(h[9]=L("label",null,"PIN",-1)),L("div",ny,[L("input",{value:e.share.password_pin,readonly:"",class:"fe-input fe-input--mono"},null,8,ay),L("button",{type:"button",class:"fe-btn",onClick:h[4]||(h[4]=y=>u(e.share.password_pin,Qe(a)("modal.share.pin_copied")))},le(Qe(a)("modal.share.copy")),1)])])):rt("",!0),L("div",iy,[h[10]||(h[10]=L("label",null,"CLI",-1)),L("div",oy,[L("input",{value:f.value,readonly:"",class:"fe-input fe-input--mono"},null,8,ly),L("button",{type:"button",class:"fe-btn",onClick:h[5]||(h[5]=y=>u(f.value,Qe(a)("modal.share.cli_copied")))},le(Qe(a)("modal.share.copy")),1)])])])):(Q(),ae("form",{key:0,class:"fe-form",onSubmit:vr(s,["prevent"])},[L("label",X7,[rr(L("input",{"onUpdate:modelValue":h[0]||(h[0]=y=>i.value=y),type:"checkbox"},null,512),[[qs,i.value]]),L("span",null,le(Qe(a)("modal.share.pin")),1)]),L("label",Y7,[L("span",null,le(Qe(a)("modal.share.expires")),1),rr(L("input",{"onUpdate:modelValue":h[1]||(h[1]=y=>o.value=y),type:"datetime-local",class:"fe-input"},null,512),[[sn,o.value]])]),L("label",Z7,[L("span",null,le(Qe(a)("modal.share.max_downloads")),1),rr(L("input",{"onUpdate:modelValue":h[2]||(h[2]=y=>l.value=y),type:"number",min:"1",class:"fe-input"},null,512),[[sn,l.value]])])],32))]),_:1},8,["open","title"]))}}),uy={key:0,class:"fe-preview"},cy=["src","alt"],fy=["src"],dy=["src"],hy=["data"],py={class:"fe-preview__fallback"},vy=["href"],my={key:0,class:"fe-preview__fallback"},gy={key:1,class:"fe-preview__fallback"},by=["href"],yy={key:2,class:"fe-preview__md-split"},xy={class:"fe-preview__md-split-bar"},_y={key:0,class:"fe-preview__md-split-error"},wy=["disabled"],ky={class:"fe-preview__md-split-body"},Sy=["onKeydown"],Cy=["innerHTML"],Ay={key:3,class:"fe-preview__fallback"},Ey=["href"],Ty=["innerHTML"],My={key:5,class:"fe-preview__pre"},Dy={key:0,class:"fe-preview__fallback"},Iy=["href"],zy={key:1,class:"fe-preview__fallback"},Fy={key:0,class:"fe-preview__fallback"},Oy={key:1,class:"fe-preview__fallback"},Py=["href"],Ry={key:2,class:"fe-preview__fallback"},Ly=["href"],By={key:3,class:"fe-preview__code-wrap"},Ny={class:"fe-preview__code-toolbar"},$y={class:"fe-preview__code-lang"},Uy={key:0,class:"fe-preview__code-status"},Hy={key:1,class:"fe-preview__code-status fe-preview__code-status--ok"},jy=["title"],Gy={key:3,class:"fe-preview__code-status"},Vy=["disabled"],qy={key:0,class:"fe-preview__pre fe-preview__code hljs"},Wy=["innerHTML"],Ky=["data-lang"],Xy={key:0,class:"fe-preview__fallback"},Yy=["href"],Zy={key:8,class:"fe-preview__fallback"},Jy=["href"],Qy=["href"],gc=1e6,cp="fe-onlyoffice-api-js",ex=qt({__name:"PreviewModal",props:{open:{type:Boolean},locale:{},file:{},previewUrl:{type:Function},downloadUrl:{type:Function},onlyOfficeBase:{},onlyOfficeConfigEndpoint:{},saveTextEndpoint:{},openMode:{},authHeaders:{type:Function},authCredentials:{},drawioUrl:{},pdfWorkerUrl:{},pdfSaveUrl:{},viewerBaseUrl:{},chromeless:{type:Boolean},theme:{}},emits:["close"],setup(e,{emit:t}){const r=e,n=t,{t:a}=In(()=>r.locale);function i(Me){return((Me==null?void 0:Me.extension)||"").toLowerCase()}const o=["jpg","jpeg","png","webp","gif","bmp","avif","svg","heic"],l=["mp4","webm","mov","mkv","m4v","ogv"],s=["mp3","wav","ogg","flac","m4a","aac","opus"],u={md:"markdown",markdown:"markdown",txt:"plaintext",log:"plaintext",js:"javascript",mjs:"javascript",cjs:"javascript",ts:"typescript",tsx:"typescript",jsx:"javascript",vue:"xml",svelte:"xml",html:"xml",htm:"xml",xml:"xml",svg:"xml",css:"css",scss:"scss",sass:"scss",less:"less",json:"json",jsonc:"json",yml:"yaml",yaml:"yaml",php:"php",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",kt:"kotlin",swift:"swift",cpp:"cpp",c:"c",h:"cpp",hpp:"cpp",cs:"csharp",dart:"dart",sh:"bash",bash:"bash",zsh:"bash",fish:"bash",sql:"sql",toml:"ini",ini:"ini",conf:"ini",env:"bash",cfg:"ini",dockerfile:"dockerfile",graphql:"graphql",gql:"graphql",diff:"diff",patch:"diff"},c=["txt","log"],f=["docx","doc","xlsx","xls","pptx","ppt","odt","ods","odp","rtf"],d={glb:()=>Promise.resolve().then(()=>mo),gltf:()=>Promise.resolve().then(()=>mo),obj:()=>Promise.resolve().then(()=>mo),stl:()=>Promise.resolve().then(()=>mo),fbx:()=>Promise.resolve().then(()=>mo),"3ds":()=>Promise.resolve().then(()=>mo),epub:()=>Promise.resolve().then(()=>Ew),mmd:()=>Promise.resolve().then(()=>gp),mermaid:()=>Promise.resolve().then(()=>gp),drawio:()=>Promise.resolve().then(()=>bp),dio:()=>Promise.resolve().then(()=>bp),tif:()=>Promise.resolve().then(()=>yp),tiff:()=>Promise.resolve().then(()=>yp),psd:()=>Promise.resolve().then(()=>qw),ipynb:()=>Promise.resolve().then(()=>c9),csv:()=>Promise.resolve().then(()=>_p),tsv:()=>Promise.resolve().then(()=>_p),zip:()=>Promise.resolve().then(()=>z9)},h=mt(()=>{const Me=i(r.file);if(!Me)return"other";if(o.includes(Me))return"image";if(l.includes(Me))return"video";if(s.includes(Me))return"audio";if(Me==="pdf")return"pdf";const D=r.openMode!=="view";return Me==="md"||Me==="markdown"?"markdown":Me in u?"code":Me in d?"viewer":f.includes(Me)?"office":c.includes(Me)?D?"code":"text":"other"}),y=Tb(null),p=he(null),x=he(!1);async function g(Me){y.value=null,p.value=null;const D=d[Me];if(D)try{const ue=await D();y.value=ue.default??ue}catch(ue){p.value=ue instanceof Error?ue.message:"viewer load failed",Me==="pdf"&&(x.value=!0)}}function m(){x.value=!0}const b=mt(()=>{var ue;const Me=i(r.file),D={url:E.value,ext:Me,mime:(ue=r.file)==null?void 0:ue.mime_type,t:a,authHeaders:r.authHeaders,authCredentials:r.authCredentials};return r.file&&(D.filePath=z(r.file.path),(Me==="zip"||Me==="rar"||Me==="7z"||Me==="tar"||Me==="gz"||Me==="tgz")&&(D.filePath=r.file.path)),(Me==="drawio"||Me==="dio")&&(D.drawioUrl=r.drawioUrl??void 0,D.saveUrl=r.saveTextEndpoint??void 0,D.readOnly=r.openMode==="view"),Me==="pdf"&&(D.pdfWorkerUrl=r.pdfWorkerUrl??void 0,D.pdfSaveUrl=r.pdfSaveUrl??void 0),D});function v(){C(r.openMode||"edit")}function S(){C("edit")}function C(Me){if(!r.file)return;const D=i(r.file),ue=r.viewerBaseUrl||"/files/edit",ke=ue.includes("?")?"&":"?",ze=`${ue}${ke}path=${encodeURIComponent(r.file.path)}&type=${encodeURIComponent(D)}&mode=${encodeURIComponent(Me)}`;window.open(ze,"_blank","noopener")}const A=new Set(["docx","doc","xlsx","xls","pptx","ppt","odt","ods","odp","rtf","drawio","dio","mmd","mermaid","md","markdown","txt","log","json","jsonc","yaml","yml","xml","svg","html","htm","js","mjs","cjs","ts","tsx","jsx","vue","svelte","css","scss","sass","less","php","py","rb","go","rs","java","kt","swift","cpp","c","h","hpp","cs","dart","sh","bash","sql","toml","ini","conf","cfg","env","dockerfile","graphql","gql"]),_=mt(()=>!!r.file&&A.has(i(r.file))),E=mt(()=>r.file?r.previewUrl(r.file.path):""),M=mt(()=>r.file?r.downloadUrl(r.file.path):"");function z(Me){const D=Me.indexOf("://");return D===-1?Me:Me.slice(D+3)}const N=he(!1),R=he(null),$=he(""),q=he(!1),W=he(!1),Z=he(!1);let te,ne;function _e(){W.value=!0,te&&clearTimeout(te),te=setTimeout(()=>{Se($.value)},250),ne&&clearTimeout(ne),ne=setTimeout(()=>{pe()},1500)}async function pe(){if(!(!r.saveTextEndpoint||!r.file||Z.value)){Z.value=!0,R.value=null;try{const Me={"Content-Type":"application/json",...await(r.authHeaders??(()=>({})))()},D=await fetch(r.saveTextEndpoint,{method:"POST",headers:Me,credentials:r.authCredentials||"same-origin",body:JSON.stringify({path:z(r.file.path),content:$.value})});if(!D.ok)throw new Error(`save failed: ${D.status} ${await D.text()}`);W.value=!1}catch(Me){R.value=Me instanceof Error?Me.message:String(Me)}finally{Z.value=!1}}}async function we(Me){N.value=!0,R.value=null,$.value="",q.value=!1;try{const D={};r.authHeaders&&Object.assign(D,r.authHeaders());const ue=await fetch(Me,{credentials:r.authCredentials||"include",headers:D});if(!ue.ok)throw new Error(`${ue.status} ${ue.statusText}`);if(Number(ue.headers.get("content-length")||"0")>gc){q.value=!0;return}const ze=await ue.text();ze.length>gc?(q.value=!0,$.value=ze.slice(0,gc)):$.value=ze}catch(D){R.value=D instanceof Error?D.message:String(D)}finally{N.value=!1}}const ve=he(""),Te=he(null);async function Se(Me){try{const D=await import("markdown-it").catch(()=>null);if(!D){ve.value="";return}const ue=D.default??D,ze=new ue({html:!0,linkify:!0,breaks:!0,typographer:!0}).render(Me);ve.value=Ie(ze),await new Promise(re=>setTimeout(re,0)),await Le()}catch(D){ve.value="",R.value=D instanceof Error?D.message:String(D)}}function Ie(Me){return Me.replace(/<\s*script\b[^<]*(?:(?!<\s*\/\s*script\s*>)<[^<]*)*<\s*\/\s*script\s*>/gi,"").replace(/<\s*iframe\b[\s\S]*?<\s*\/\s*iframe\s*>/gi,"").replace(/<\s*object\b[\s\S]*?<\s*\/\s*object\s*>/gi,"").replace(/<\s*embed\b[^>]*>/gi,"").replace(/\son\w+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi,"").replace(/(href|src|action|formaction|xlink:href)\s*=\s*(?:"\s*javascript:[^"]*"|'\s*javascript:[^']*')/gi,'$1="#"')}async function Le(){var ze,re,me;if(!Te.value)return;const Me=Te.value,D=Array.from(Me.querySelectorAll("pre > code"));if(D.length===0)return;let ue,ke;for(const O of D){const Fe=O.className||"",gt=/\blanguage-mermaid\b/.test(Fe)||/\blanguage-mmd\b/.test(Fe),k=/\blanguage-math\b/.test(Fe)||/\blanguage-latex\b/.test(Fe)||/\blanguage-tex\b/.test(Fe);if(gt){if(ue===void 0)try{const K=await import("mermaid");ue=K.default??K,(ze=ue.initialize)==null||ze.call(ue,{startOnLoad:!1,securityLevel:"strict"})}catch{ue=null}if(!ue)continue;try{const K=`filex-md-mermaid-${Math.random().toString(36).slice(2)}`,{svg:H}=await ue.render(K,O.textContent||""),I=document.createElement("div");I.className="fe-preview__md-mermaid",I.innerHTML=H,(re=O.parentElement)==null||re.replaceWith(I)}catch{}}else if(k){if(ke===void 0)try{const K=await Promise.resolve().then(()=>mS);ke=K.default??K}catch{ke=null}if(!ke)continue;try{const K=ke.renderToString(O.textContent||"",{displayMode:!0,throwOnError:!1}),H=document.createElement("div");H.className="fe-preview__md-math",H.innerHTML=K,(me=O.parentElement)==null||me.replaceWith(H)}catch{}}}}const Ee=he("");async function Be(Me,D){try{const ue=await up();if(!ue){Ee.value="";return}const ke=ue.default??ue;if(ke.getLanguage(D)){const ze=ke.highlight(Me,{language:D,ignoreIllegals:!0});Ee.value=ze.value}else{const ze=ke.highlightAuto(Me);Ee.value=ze.value}}catch(ue){Ee.value="",R.value=ue instanceof Error?ue.message:String(ue)}}const be=he(null);let ye=null,P;const V=he(!1),fe=he(!1),de=he(!1),ie=he(null);function oe(){if(ye){try{ye.dispose()}catch{}ye=null}V.value=!1,de.value=!1,ie.value=null}function se(Me){return{js:"javascript",mjs:"javascript",cjs:"javascript",ts:"typescript",tsx:"typescript",jsx:"javascript",json:"json",jsonc:"json",css:"css",scss:"scss",sass:"scss",less:"less",html:"html",htm:"html",vue:"html",svelte:"html",xml:"xml",svg:"xml",md:"markdown",markdown:"markdown",php:"php",py:"python",yml:"yaml",yaml:"yaml",go:"go",rs:"rust",sql:"sql",cpp:"cpp",c:"c",h:"cpp",hpp:"cpp",sh:"shell",bash:"shell",dockerfile:"dockerfile",toml:"ini",ini:"ini",conf:"ini",cfg:"ini"}[Me]??"plaintext"}async function ge(Me,D){var ke;const ue=await sp();if(!ue||!be.value)return!1;try{oe();const ze=!!r.saveTextEndpoint&&r.openMode!=="view",re=r.theme==="dark"?!0:r.theme==="light"?!1:(ke=window.matchMedia)==null?void 0:ke.call(window,"(prefers-color-scheme: dark)").matches;return ye=ue.editor.create(be.value,{value:Me,language:se(D),readOnly:!ze,theme:re?"vs-dark":"vs",automaticLayout:!0,minimap:{enabled:!1},fontSize:13}),ze&&(ye.addCommand(ue.KeyMod.CtrlCmd|ue.KeyCode.KeyS,()=>void Ce()),ye.onDidChangeModelContent(()=>{P&&clearTimeout(P),P=setTimeout(()=>{Ce()},1500)})),V.value=!0,!0}catch(ze){return R.value=`Monaco mount fail: ${ze.message}`,!1}}async function Ce(){if(!(!r.saveTextEndpoint||!r.file)&&r.openMode!=="view"&&!fe.value){fe.value=!0,de.value=!1,ie.value=null;try{const Me=ye?ye.getValue():"",D={"Content-Type":"application/json"};r.authHeaders&&Object.assign(D,r.authHeaders());const ue=await fetch(r.saveTextEndpoint,{method:"POST",headers:D,credentials:r.authCredentials||"same-origin",body:JSON.stringify({path:z(r.file.path),content:Me})});if(!ue.ok){const ke=await ue.text().catch(()=>"");throw new Error(`${ue.status} ${ue.statusText}${ke?" — "+ke.slice(0,150):""}`)}de.value=!0,setTimeout(()=>{de.value=!1},2500)}catch(Me){ie.value=Me.message}finally{fe.value=!1}}}async function xe(Me,D,ue){if($.value="",ve.value="",Ee.value="",R.value=null,Ne.value=null,y.value=null,p.value=null,x.value=!1,ct(),oe(),!(!Me||!D)){if(ue==="viewer"){await g(i(r.file));return}if(ue==="markdown"||ue==="code"||ue==="text"){if(await we(D),q.value)return;if(ue==="markdown"){await Se($.value);return}const ke=u[i(r.file)]||"";Y6()?(await new Promise(me=>setTimeout(me,0)),await ge($.value,i(r.file))||await Be($.value,ke)):(ue==="code"&&await Be($.value,ke),sp().then(async re=>{re&&r.open&&(await new Promise(me=>setTimeout(me,0)),await ge($.value,i(r.file)))}))}else ue==="office"&&(await new Promise(ke=>setTimeout(ke,0)),await it())}}tr(()=>[r.open,E.value,h.value,r.openMode],([Me,D,ue])=>{xe(Me,D,ue)}),pr(()=>{za(()=>{r.open&&xe(r.open,E.value,h.value)})});const Ve=mt(()=>u[i(r.file)]||"plaintext"),Ue=he(null),Ne=he(null);let qe=null;async function it(){if(Ne.value=null,!(!r.file||h.value!=="office")){if(!r.onlyOfficeConfigEndpoint){Ne.value="OnlyOffice yapılandırması yok";return}if(Ue.value)try{const Me={"Content-Type":"application/json"};r.authHeaders&&Object.assign(Me,r.authHeaders());const D=await fetch(r.onlyOfficeConfigEndpoint,{method:"POST",headers:Me,credentials:r.authCredentials||"same-origin",body:JSON.stringify({path:r.file.path,mode:r.openMode||"edit"})});if(!D.ok)throw new Error(`Config fetch ${D.status}: ${(await D.text()).slice(0,200)}`);const{config:ue,documentServerUrl:ke}=await D.json();await wt(ke),ct();const ze="fe-onlyoffice-mount";Ue.value.id=ze,ue.events={onError:me=>{Ne.value=ot(me)}};const re=window;if(!re.DocsAPI||!re.DocsAPI.DocEditor)throw new Error("DocsAPI not available after script load");qe=new re.DocsAPI.DocEditor(ze,ue)}catch(Me){Ne.value=Me instanceof Error?Me.message:String(Me)}}}function ct(){var Me;try{(Me=qe==null?void 0:qe.destroyEditor)==null||Me.call(qe)}catch{}qe=null}Br(()=>{ct(),oe()});function ot(Me){if(typeof Me=="string")return Me;const D=Me;if(D!=null&&D.data&&typeof D.data=="object"){const ue=D.data;if(typeof ue.errorDescription=="string")return ue.errorDescription;if(typeof ue.message=="string")return ue.message;if(ue.errorCode!==void 0)return`OnlyOffice error ${ue.errorCode}`}if(typeof(D==null?void 0:D.data)=="string")return D.data;if(typeof(D==null?void 0:D.errorDescription)=="string")return D.errorDescription;if(typeof(D==null?void 0:D.message)=="string")return D.message;try{return JSON.stringify(Me)}catch{return"OnlyOffice error"}}function wt(Me){return new Promise((D,ue)=>{var re;if((re=window.DocsAPI)!=null&&re.DocEditor){D();return}const ke=document.getElementById(cp);if(ke){ke.addEventListener("load",()=>D()),ke.addEventListener("error",()=>ue(new Error("OnlyOffice api.js load failed")));return}const ze=document.createElement("script");ze.id=cp,ze.src=`${Me.replace(/\/$/,"")}/web-apps/apps/api/documents/api.js`,ze.async=!0,ze.onload=()=>D(),ze.onerror=()=>ue(new Error("OnlyOffice api.js load failed")),document.head.appendChild(ze)})}return(Me,D)=>{var ue;return Q(),kr(Al,{open:e.open,size:"xl",title:((ue=e.file)==null?void 0:ue.basename)||"",chromeless:e.chromeless,theme:e.theme,onClose:D[2]||(D[2]=ke=>n("close"))},{actions:Tr(()=>[e.file&&e.openMode==="view"&&_.value?(Q(),ae("button",{key:0,type:"button",class:"fe-btn fe-btn--primary",onClick:S},"✏ Düzenle")):rt("",!0),e.file?(Q(),ae("button",{key:1,type:"button",class:"fe-btn",onClick:v},"↗ "+le(Qe(a)("viewer.open_in_new_tab")),1)):rt("",!0),e.file?(Q(),ae("a",{key:2,href:M.value,class:"fe-btn"},le(Qe(a)("viewer.download")),9,Qy)):rt("",!0),L("button",{type:"button",class:"fe-btn",onClick:D[1]||(D[1]=ke=>n("close"))},"Kapat")]),default:Tr(()=>[e.file?(Q(),ae("div",uy,[h.value==="image"?(Q(),ae("img",{key:0,src:E.value,alt:e.file.basename,class:"fe-preview__image"},null,8,cy)):h.value==="video"?(Q(),ae("video",{key:1,src:E.value,controls:"",preload:"metadata",class:"fe-preview__video"},null,8,fy)):h.value==="audio"?(Q(),ae("audio",{key:2,src:E.value,controls:"",class:"fe-preview__audio"},null,8,dy)):h.value==="pdf"?(Q(),ae("object",{key:3,data:E.value,type:"application/pdf",class:"fe-preview__iframe"},[L("div",py,[D[3]||(D[3]=L("span",{class:"fe-preview__fallback-icon"},"📕",-1)),D[4]||(D[4]=L("p",null,"Tarayıcı PDF'i inline açamadı.",-1)),L("a",{href:M.value,class:"fe-btn fe-btn--primary",target:"_blank",rel:"noopener"},"PDF'i Yeni Sekmede Aç",8,vy)])],8,hy)):h.value==="markdown"?(Q(),ae(yt,{key:4},[N.value?(Q(),ae("div",my,le(Qe(a)("viewer.loading")),1)):q.value?(Q(),ae("div",gy,[D[5]||(D[5]=gr(" Dosya çok büyük (>1 MB). ",-1)),L("a",{href:M.value,class:"fe-btn"},le(Qe(a)("viewer.download")),9,by)])):e.openMode==="edit"&&e.saveTextEndpoint?(Q(),ae("div",yy,[L("div",xy,[D[6]||(D[6]=L("span",{class:"fe-preview__md-split-label"},"MARKDOWN",-1)),R.value?(Q(),ae("span",_y,le(R.value),1)):rt("",!0),L("button",{type:"button",class:"fe-btn fe-btn--primary",disabled:!W.value||Z.value,onClick:pe},le(Z.value?"Kaydediliyor…":W.value?"Kaydet (Ctrl+S)":"Kaydedildi"),9,wy)]),L("div",ky,[rr(L("textarea",{class:"fe-preview__md-split-input","onUpdate:modelValue":D[0]||(D[0]=ke=>$.value=ke),onInput:_e,onKeydown:[pa(vr(pe,["ctrl","prevent"]),["s"]),pa(vr(pe,["meta","prevent"]),["s"])],spellcheck:"false",placeholder:"# Markdown buraya…"},null,40,Sy),[[sn,$.value]]),L("div",{ref_key:"markdownEl",ref:Te,class:"fe-preview__md-split-output fe-preview__md",innerHTML:ve.value},null,8,Cy)])])):R.value?(Q(),ae("div",Ay,[L("p",null,le(R.value),1),L("a",{href:M.value,class:"fe-btn fe-btn--primary"},le(Qe(a)("viewer.download")),9,Ey)])):ve.value?(Q(),ae("div",{key:4,ref_key:"markdownEl",ref:Te,class:"fe-preview__md",innerHTML:ve.value},null,8,Ty)):(Q(),ae("pre",My,le($.value),1))],64)):h.value==="viewer"?(Q(),ae(yt,{key:5},[p.value&&!x.value?(Q(),ae("div",Dy,[D[7]||(D[7]=L("span",{class:"fe-preview__fallback-icon"},"⚠️",-1)),L("p",null,le(p.value),1),L("a",{href:M.value,class:"fe-btn fe-btn--primary"},le(Qe(a)("viewer.download")),9,Iy)])):y.value?(Q(),kr(c5(y.value),gh({key:2},b.value,{class:"fe-preview__viewer",onFallback:m}),null,16)):(Q(),ae("div",zy,[D[8]||(D[8]=L("span",{class:"fe-preview__fallback-icon"},"⏳",-1)),L("p",null,le(Qe(a)("viewer.loading")),1)]))],64)):h.value==="code"||h.value==="text"?(Q(),ae(yt,{key:6},[N.value?(Q(),ae("div",Fy,le(Qe(a)("viewer.loading")),1)):q.value?(Q(),ae("div",Oy,[D[9]||(D[9]=gr(" Dosya çok büyük (>1 MB). ",-1)),L("a",{href:M.value,class:"fe-btn"},le(Qe(a)("viewer.download")),9,Py)])):R.value?(Q(),ae("div",Ry,[L("p",null,le(R.value),1),L("a",{href:M.value,class:"fe-btn fe-btn--primary"},le(Qe(a)("viewer.download")),9,Ly)])):(Q(),ae("div",By,[L("div",Ny,[L("span",$y,le(Ve.value),1),!V.value&&Ee.value?(Q(),ae("span",Uy,le(e.saveTextEndpoint?"Editör yükleniyor…":"Salt okunur"),1)):rt("",!0),de.value?(Q(),ae("span",Hy,"✓ Kaydedildi")):rt("",!0),ie.value?(Q(),ae("span",{key:2,class:"fe-preview__code-status fe-preview__code-status--err",title:ie.value},"✗ Hata",8,jy)):rt("",!0),e.openMode==="view"?(Q(),ae("span",Gy,"Salt okunur")):e.saveTextEndpoint&&V.value?(Q(),ae("button",{key:4,type:"button",class:"fe-btn fe-btn--primary",disabled:fe.value,onClick:Ce},le(fe.value?"Kaydediliyor…":"Kaydet (Ctrl+S)"),9,Vy)):rt("",!0)]),L("div",{ref_key:"monacoEl",ref:be,class:Xt(["fe-preview__code-editor",{"is-hidden":!V.value}])},null,2),!V.value&&Ee.value?(Q(),ae("pre",qy,[L("code",{class:Xt(`language-${Ve.value}`),innerHTML:Ee.value},null,10,Wy)])):!V.value&&!Ee.value?(Q(),ae("pre",{key:1,class:"fe-preview__pre","data-lang":Ve.value},le($.value),9,Ky)):rt("",!0)]))],64)):h.value==="office"?(Q(),ae(yt,{key:7},[Ne.value?(Q(),ae("div",Xy,[D[10]||(D[10]=L("span",{class:"fe-preview__fallback-icon"},"📄",-1)),L("p",null,le(Ne.value),1),L("a",{href:M.value,class:"fe-btn fe-btn--primary"},"İndir",8,Yy)])):(Q(),ae("div",{key:1,ref_key:"officeEl",ref:Ue,class:"fe-preview__office"},null,512))],64)):(Q(),ae("div",Zy,[D[11]||(D[11]=L("span",{class:"fe-preview__fallback-icon"},"📎",-1)),D[12]||(D[12]=L("p",null,"Bu dosya tipi için önizleme henüz yok.",-1)),L("a",{href:M.value,class:"fe-btn fe-btn--primary"},"İndir",8,Jy)]))])):rt("",!0)]),_:1},8,["open","title","chromeless","theme"])}}}),tx={class:"filex-cv"},rx={class:"filex-cv__head"},nx={key:0,class:"filex-cv__msg"},ax={key:1,class:"filex-cv__msg filex-cv__ok"},ix={class:"filex-cv__src"},ox=["placeholder"],lx={class:"filex-cv__list"},sx=["onClick"],ux={key:0,class:"filex-cv__empty"},cx={key:0,class:"filex-cv__err"},fx={class:"filex-cv__foot"},dx=["disabled"],hx=["src"],px=Jr(qt({__name:"ConvertModal",props:{convertUrl:{},fileName:{},fetchBytes:{type:Function},upload:{type:Function},t:{type:Function}},emits:["close","done"],setup(e,{emit:t}){const r=e,n=t,a=he(null),i=he("loading"),o=he(null),l=he([]),s=he(""),u=he(null),c=mt(()=>(r.fileName.split(".").pop()||"").toLowerCase()),f=mt(()=>{const S=l.value.filter(C=>C.from);return S.find(C=>(C.ext||"").toLowerCase()===c.value)||S.find(C=>(C.format||"").toLowerCase()===c.value)||null}),d=mt(()=>{const S=s.value.trim().toLowerCase(),C=new Set,A=[];for(const _ of l.value){if(!_.to)continue;const E=(_.ext||_.format||"").toLowerCase();!E||C.has(E)||(C.add(E),A.push(_))}return A.sort((_,E)=>(_.ext||_.format).localeCompare(E.ext||E.format)),S?A.filter(_=>(_.ext||"").toLowerCase().includes(S)||(_.format||"").toLowerCase().includes(S)||(_.name||"").toLowerCase().includes(S)||(_.mime||"").toLowerCase().includes(S)):A}),h=mt(()=>`${r.convertUrl.replace(/\/$/,"")}/?embed=1`);let y=0;const p=new Map;function x(S,C={},A=[]){const _=++y;return new Promise((E,M)=>{var z,N;p.set(_,{resolve:E,reject:M}),(N=(z=a.value)==null?void 0:z.contentWindow)==null||N.postMessage({target:"convert-embed",id:_,cmd:S,...C},"*",A),setTimeout(()=>{p.has(_)&&(p.delete(_),M(new Error("convert timeout")))},18e4)})}function g(S){const C=S.data;if(!C||C.source!=="convert-embed")return;if(C.event==="ready"){m();return}const A=p.get(C.id);A&&(p.delete(C.id),C.ok?A.resolve(C):A.reject(new Error(C.error||"convert error")))}async function m(){try{const S=await x("listFormats");l.value=S.formats||[],i.value="ready",f.value||(o.value=v("convert.unsupportedInput","Bu dosya tipi için kaynak format bulunamadı."))}catch(S){o.value=S.message,i.value="error"}}async function b(){if(!(!u.value||!f.value)){i.value="converting",o.value=null;try{const S=await r.fetchBytes(),C=await x("convert",{name:r.fileName,bytes:S,fromIndex:f.value.index,toIndex:u.value.index},[S]),A=r.fileName.replace(/\.[^.]+$/,""),_=C.ext||u.value.ext||u.value.format,E=`${A}.${_}`,M=new File([C.bytes],E,{type:u.value.mime||"application/octet-stream"});await r.upload(M),i.value="done",n("done",E)}catch(S){o.value=S.message,i.value="error"}}}function v(S,C){return r.t?r.t(S,C):C}return pr(()=>window.addEventListener("message",g)),Br(()=>window.removeEventListener("message",g)),(S,C)=>(Q(),ae("div",{class:"filex-cv__bg",onClick:C[3]||(C[3]=vr(A=>n("close"),["self"]))},[L("div",tx,[L("header",rx,[L("h3",null,le(v("convert.title","Dönüştür"))+" — "+le(e.fileName),1),L("button",{class:"filex-cv__x",onClick:C[0]||(C[0]=A=>n("close"))},"✕")]),i.value==="loading"?(Q(),ae("div",nx,le(v("convert.loading","Dönüştürücü yükleniyor…")),1)):i.value==="done"?(Q(),ae("div",ax,[L("p",null,"✓ "+le(v("convert.done","Dönüştürüldü ve klasöre yüklendi.")),1),L("button",{class:"filex-cv__convert",onClick:C[1]||(C[1]=A=>n("close"))},le(v("convert.close","Kapat")),1)])):(Q(),ae(yt,{key:2},[L("p",ix,[gr(le(v("convert.from","Kaynak"))+": ",1),L("b",null,le(c.value||"?"),1)]),rr(L("input",{"onUpdate:modelValue":C[2]||(C[2]=A=>s.value=A),class:"filex-cv__search",placeholder:v("convert.searchFmt","Hedef format ara (pdf, mp4, png…)")},null,8,ox),[[sn,s.value]]),L("div",lx,[(Q(!0),ae(yt,null,nr(d.value,A=>{var _;return Q(),ae("button",{key:A.index,class:Xt(["filex-cv__fmt",{"is-sel":((_=u.value)==null?void 0:_.index)===A.index}]),onClick:E=>u.value=A},[L("b",null,le((A.ext||A.format).toUpperCase()),1),L("small",null,le(A.name),1)],10,sx)}),128)),d.value.length===0?(Q(),ae("div",ux,le(v("convert.noFmt","Eşleşen format yok.")),1)):rt("",!0)]),o.value?(Q(),ae("div",cx,le(o.value),1)):rt("",!0),L("footer",fx,[L("button",{class:"filex-cv__convert",disabled:!u.value||!f.value||i.value==="converting",onClick:b},le(i.value==="converting"?v("convert.converting","Dönüştürülüyor…"):v("convert.convert","Dönüştür")),9,dx)])],64)),L("iframe",{ref_key:"iframeRef",ref:a,src:h.value,class:"filex-cv__frame",title:"converter"},null,8,hx)])]))}}),[["__scopeId","data-v-dfaf8d90"]]),vx={class:"fx-perm-modal"},mx={class:"fx-perm-head"},gx={class:"fx-perm-title"},bx={class:"fx-perm-ico","aria-hidden":"true"},yx={class:"fx-perm-titletext"},xx=["title"],_x={class:"fx-perm-subdim"},wx={class:"fx-perm-tabs"},kx={class:"fx-perm-body"},Sx={key:0,class:"fx-perm-warn"},Cx={key:1,class:"fx-perm-warn"},Ax={key:2,class:"fx-perm-muted"},Ex={class:"fx-perm-addcard"},Tx={class:"fx-perm-add"},Mx={class:"fx-perm-emailwrap"},Dx=["placeholder"],Ix={key:0,class:"fx-perm-suggest"},zx=["onMousedown"],Fx={class:"fx-perm-suggest-av"},Ox={class:"fx-perm-suggest-txt"},Px={class:"fx-perm-suggest-name"},Rx={class:"fx-perm-suggest-meta"},Lx=["title"],Bx=["value"],Nx=["disabled"],$x={key:0,class:"fx-perm-invite"},Ux={class:"fx-perm-muted"},Hx={class:"fx-perm-invite-actions"},jx={class:"fx-perm-invite-row"},Gx={value:"user"},Vx={value:"viewer"},qx=["disabled"],Wx=["disabled"],Kx={key:1,class:"fx-perm-notice"},Xx={key:2,class:"fx-perm-reveal"},Yx={class:"fx-perm-section"},Zx={key:0,class:"fx-perm-empty"},Jx={class:"fx-perm-av"},Qx=["title"],e_=["value","onChange"],t_=["value"],r_=["disabled","title","onClick"],n_={class:"fx-perm-av fx-perm-av--dim"},a_=["title"],i_={class:"fx-perm-badge"},o_=["title"],l_={class:"fx-perm-addcard"},s_={class:"fx-perm-share-opts"},u_={class:"fx-perm-check"},c_={class:"fx-perm-expiry"},f_={class:"fx-perm-muted"},d_=["value"],h_=["disabled"],p_={key:0,class:"fx-perm-warn"},v_={key:1,class:"fx-perm-result"},m_={class:"fx-perm-linkrow"},g_=["href"],b_={key:0,class:"fx-perm-pin"},y_={class:"fx-perm-mailrow"},x_=["placeholder"],__=["disabled"],w_={key:1,class:"fx-perm-notice"},k_={key:2,class:"fx-perm-hint"},S_={class:"fx-perm-section"},C_={key:0,class:"fx-perm-empty"},A_=["title"],E_=["onClick"],T_=["disabled","title","onClick"],M_={key:2,class:"fx-perm-addcard"},D_={class:"fx-perm-muted fx-perm-dropintro"},I_={class:"fx-perm-share-opts"},z_={class:"fx-perm-check"},F_={class:"fx-perm-expiry"},O_={class:"fx-perm-muted"},P_=["value"],R_=["disabled"],L_={key:0,class:"fx-perm-adv"},B_={class:"fx-perm-adv-row"},N_={class:"fx-perm-muted"},$_={class:"fx-perm-adv-row"},U_={class:"fx-perm-muted"},H_={class:"fx-perm-adv-row"},j_={class:"fx-perm-muted"},G_=["placeholder"],V_={class:"fx-perm-check"},q_={key:1,class:"fx-perm-warn"},W_={key:2,class:"fx-perm-result"},K_={class:"fx-perm-linkrow"},X_=["href"],Y_={key:0,class:"fx-perm-pin"},Z_={class:"fx-perm-mailrow"},J_=["placeholder"],Q_=["disabled"],ew={key:1,class:"fx-perm-notice"},tw=Jr(qt({__name:"PermissionsModal",props:{api:{},path:{},isDir:{type:Boolean},size:{},locale:{}},emits:["close"],setup(e,{emit:t}){const r=e,n=t,a=mt(()=>(r.locale??"tr")!=="en");function i(K,H){return a.value?K:H}const o=mt(()=>{const K=/^([^:]+):\/\/(.*)$/.exec(r.path),H=K?K[1]:"",I=K?K[2]:r.path,ee=I.split("/").filter(Boolean);return{adapter:H,name:ee.length?ee[ee.length-1]:H,rel:I}}),l=he("perms"),s=he(!1),u=he(!0),c=he(""),f=he([]),d=he([]),h=he(!0),y=he(""),p=he("viewer"),x=he(!1),g=he(""),m=he(!1),b=he("user"),v=he(null),S=he([]),C=he(!1);let A;const _=[{v:"viewer",l:i("Görüntüleyen","Viewer"),d:i("görüntüle + indir","view + download")},{v:"editor",l:i("Düzenleyen","Editor"),d:i("oku + yaz + sil","read + write + delete")},{v:"owner",l:i("Sahip","Owner"),d:i("düzenle + izin yönet","edit + manage access")}];function E(K){var H;return((H=_.find(I=>I.v===K))==null?void 0:H.l)??K}const M=he([]),z=he(!1),N=he(!1),R=he(0),$=he(null),q=he(""),W=he(""),Z=he(""),te=he(!1),ne=he(""),_e=[{v:0,l:i("Süresiz","Never")},{v:1,l:i("1 gün","1 day")},{v:7,l:i("7 gün","7 days")},{v:30,l:i("30 gün","30 days")}],pe=he(!1),we=he(0),ve=he(!1),Te=he(""),Se=he(""),Ie=he(""),Le=he(!0),Ee=he(!1),Be=he(""),be=he(null),ye=he(""),P=he(!1),V=he("");function fe(K){const H=new Set,I=[];for(const ee of K.split(/[,;\s]+/)){const X=ee.trim().toLowerCase();X&&X.includes("@")&&!H.has(X)&&(H.add(X),I.push(X))}return I}function de(K){var ee,X;const H=((ee=K.sent)==null?void 0:ee.length)??0,I=((X=K.failed)==null?void 0:X.length)??0;return I===0?i(`E-posta gönderildi ✓ (${H})`,`Email sent ✓ (${H})`):i(`${H} gönderildi, ${I} başarısız`,`${H} sent, ${I} failed`)}async function ie(){u.value=!0,c.value="";try{const K=await r.api.listPermissions(r.path);f.value=K.direct??[],d.value=K.inherited??[],h.value=K.storage_rbac,s.value=!0}catch(K){K.status===403?(s.value=!1,l.value="share"):c.value=K instanceof Error?K.message:String(K)}finally{u.value=!1}}async function oe(){try{const K=await r.api.listShares(r.path);M.value=K.shares??[]}catch{M.value=[]}}pr(async()=>{await ie(),await oe()}),Br(()=>{A&&clearTimeout(A)});function se(){m.value=!1,v.value=null,g.value="";const K=y.value.trim();if(A&&clearTimeout(A),K.length<1){S.value=[],C.value=!1;return}A=setTimeout(async()=>{try{const H=await r.api.searchUsers(K);S.value=H.users??[],C.value=S.value.length>0}catch{C.value=!1}},180)}async function ge(K){C.value=!1,y.value=K.email;let H=p.value;K.role==="viewer"&&H!=="viewer"&&(H="viewer"),x.value=!0,g.value="";try{await r.api.addPermission({path:r.path,user_id:K.id,level:H,is_dir:!!r.isDir}),y.value="",S.value=[],await ie(),g.value=i("Yetki verildi.","Access granted.")}catch(I){g.value=I instanceof Error?I.message:String(I)}finally{x.value=!1}}async function Ce(){const K=y.value.trim().toLowerCase();if(!K||!K.includes("@")){g.value=i("Geçerli bir e-posta girin.","Enter a valid email.");return}C.value=!1,x.value=!0,g.value="",v.value=null;try{const H=await r.api.resolveEmail(K);if(H.found&&H.user){let I=p.value;H.user.role==="viewer"&&I!=="viewer"&&(I="viewer"),await r.api.addPermission({path:r.path,user_id:H.user.id,level:I,is_dir:!!r.isDir}),y.value="",await ie(),g.value=i("Yetki verildi.","Access granted.")}else m.value=!0}catch(H){g.value=H instanceof Error?H.message:String(H)}finally{x.value=!1}}async function xe(){x.value=!0,g.value="";try{const K=await r.api.invitePermission({path:r.path,email:y.value.trim().toLowerCase(),level:p.value,create_user:!0,role:b.value,is_dir:!!r.isDir,locale:r.locale??"tr"});v.value={tempPassword:K.temp_password},g.value=K.emailed?i("Kullanıcı açıldı, davet e-postası gönderildi.","User created, invite emailed."):i("Kullanıcı açıldı. Geçici parolayı iletin.","User created. Share the temp password."),m.value=!1,y.value="",await ie()}catch(K){g.value=K instanceof Error?K.message:String(K)}finally{x.value=!1}}function Ve(){Z.value=y.value.trim().toLowerCase(),m.value=!1,g.value="",l.value="share"}async function Ue(K,H){if(H!==K.level){x.value=!0;try{await r.api.updatePermission(K.id,H),await ie()}catch(I){g.value=I instanceof Error?I.message:String(I)}finally{x.value=!1}}}async function Ne(K){x.value=!0;try{await r.api.deletePermission(K.id),await ie()}catch(H){g.value=H instanceof Error?H.message:String(H)}finally{x.value=!1}}function qe(K){return K.user_display_name||K.user_email||`#${K.user_id}`}function it(K){return(K.user_display_name||K.user_email||"?").charAt(0).toUpperCase()}function ct(){return R.value?new Date(Date.now()+R.value*864e5).toISOString():null}async function ot(){z.value=!0,q.value="",$.value=null,ne.value="";try{const K=await r.api.createShare({path:r.path,password:N.value,expires_at:ct()});$.value={url:K.share.url,pin:K.share.password_pin??null},await oe()}catch(K){q.value=K instanceof Error?K.message:String(K)}finally{z.value=!1}}async function wt(){var H;const K=fe(Z.value);if(!K.length){ne.value=i("Geçerli bir e-posta girin.","Enter a valid email.");return}if((H=$.value)!=null&&H.url){te.value=!0,ne.value="";try{const I=await r.api.shareMail({path:r.path,emails:K,url:$.value.url,pin:$.value.pin??void 0,expires_days:R.value||void 0,locale:r.locale??"tr",is_dir:!!r.isDir,size:r.size});ne.value=de(I)}catch(I){const ee=I.detail??"";ee.includes("not_configured")?ne.value=i("SMTP ayarlı/doğrulanmış değil — linki elle iletin.","SMTP not set up/verified — share the link manually."):ee.includes("send_failed")?ne.value=i("Gönderilemedi (geçici hata) — tekrar deneyin.","Send failed (temporary) — please retry."):ne.value=I instanceof Error?I.message:String(I)}finally{te.value=!1}}}function Me(){return we.value?new Date(Date.now()+we.value*864e5).toISOString():null}async function D(){Ee.value=!0,Be.value="",be.value=null,V.value="";try{const K={ask_name:Le.value};Te.value&&(K.max_files=Number(Te.value)),Se.value&&(K.max_file_size_mb=Number(Se.value));const H=Ie.value.split(/[,\s]+/).map(ee=>ee.trim().replace(/^\./,"")).filter(Boolean);H.length&&(K.allowed_ext=H);const I=await r.api.createShare({path:r.path,kind:"drop",password:pe.value,expires_at:Me(),drop_settings:K});be.value={url:I.share.url,pin:I.share.password_pin??null}}catch(K){Be.value=K instanceof Error?K.message:String(K)}finally{Ee.value=!1}}async function ue(){var H;const K=fe(ye.value);if(!K.length){V.value=i("Geçerli bir e-posta girin.","Enter a valid email.");return}if((H=be.value)!=null&&H.url){P.value=!0,V.value="";try{const I=await r.api.shareMail({path:r.path,emails:K,url:be.value.url,pin:be.value.pin??void 0,expires_days:we.value||void 0,locale:r.locale??"tr",is_dir:!0,mode:"drop"});V.value=de(I)}catch(I){(I.detail??"").includes("not_configured")?V.value=i("SMTP ayarlı/doğrulanmış değil — linki elle iletin.","SMTP not set up/verified — share the link manually."):V.value=I instanceof Error?I.message:String(I)}finally{P.value=!1}}}async function ke(K){z.value=!0;try{await r.api.revokeShare(K.uuid),await oe()}catch(H){q.value=H instanceof Error?H.message:String(H)}finally{z.value=!1}}function ze(K,H="url"){var I;(I=navigator.clipboard)==null||I.writeText(K),W.value=H,setTimeout(()=>{W.value===H&&(W.value="")},1400)}const re=mt(()=>typeof navigator<"u"&&typeof navigator.share=="function");function me(K){if(!K||K<=0)return"";const H=1024;if(K<H)return`${K} B`;const I=["K","M","G","T","P","E"];let ee=H,X=0;for(let Xe=K/H;Xe>=H;Xe/=H)ee*=H,X++;return`${(K/ee).toFixed(1)} ${I[X]}B`}function O(K){return K>0?i(`Bu bağlantı ${K} gün geçerlidir.`,`This link is valid for ${K} day(s).`):i("Bu bağlantının süresi yoktur.","This link does not expire.")}function Fe(){var We,tt;const K=o.value.name,H=((We=$.value)==null?void 0:We.url)??"",I=((tt=$.value)==null?void 0:tt.pin)??"",ee=r.isDir?i("klasör","folder"):i("dosya","file"),X=a.value?`${K} ${r.isDir?"klasörü":"dosyası"} sizinle paylaşıldı`:`${K} has been shared with you`,Xe=[];if(Xe.push(i("Merhaba,","Hello,"),""),Xe.push(i(`Sizinle bir ${ee} paylaşıldı:`,`A ${ee} has been shared with you:`),""),r.isDir)Xe.push(i(`Klasör: ${K}`,`Folder: ${K}`));else{Xe.push(i(`Dosya: ${K}`,`File: ${K}`));const At=me(r.size);At&&Xe.push(i(`Boyut: ${At}`,`Size: ${At}`))}return Xe.push("",i("İndirmek için:","Download it here:"),H),I&&Xe.push("",i(`PIN (erişim kodu): ${I}`,`PIN (access code): ${I}`)),Xe.push("",O(R.value)),{title:X,text:Xe.join(`
|
|
21
|
+
`)}}function gt(){var At,fn;const K=o.value.name,H=((At=be.value)==null?void 0:At.url)??"",I=((fn=be.value)==null?void 0:fn.pin)??"",ee=Number(Te.value)||20,X=Number(Se.value)||500,Xe=Ie.value.split(/[,\s]+/).map(Jt=>Jt.trim().replace(/^\./,"")).filter(Boolean),We=i(`${K} adlı klasöre dosya eklemeniz istendi`,`You've been asked to add files to ${K}`),tt=[];return tt.push(i("Merhaba,","Hello,"),""),tt.push(i("Dosya yüklemeniz istendi.","You've been invited to upload files."),""),tt.push(i(`Klasör: ${K}`,`Folder: ${K}`)),tt.push(i(`Sınır: en fazla ${ee} dosya, dosya başına ${X} MB.`,`Limit: up to ${ee} file(s), ${X} MB per file.`)),tt.push(Xe.length?i(`İzinli türler: ${Xe.join(", ")}`,`Allowed types: ${Xe.join(", ")}`):i("İzinli türler: tüm türler","Allowed types: all")),tt.push("",i("Dosyalarınızı buradan yükleyebilirsiniz:","Upload your files here:"),H),I&&tt.push("",i(`PIN (erişim kodu): ${I}`,`PIN (access code): ${I}`)),tt.push("",O(we.value)),{title:We,text:tt.join(`
|
|
22
|
+
`)}}async function k(K){if(re.value)try{await navigator.share(K)}catch{}}return(K,H)=>{var I,ee;return Q(),ae("div",{class:"fx-perm-overlay",onClick:H[24]||(H[24]=vr(X=>n("close"),["self"]))},[L("div",vx,[L("header",mx,[L("div",gx,[L("span",bx,le(e.isDir?"📁":"📄"),1),L("div",yx,[L("h3",null,le(i("Paylaş / İzinler","Share / Permissions")),1),L("span",{class:"fx-perm-sub",title:e.path},[gr(le(o.value.name),1),L("span",_x," · "+le(o.value.adapter),1)],8,xx)])]),L("button",{class:"fx-perm-x",onClick:H[0]||(H[0]=X=>n("close")),"aria-label":"close"},"✕")]),L("div",wx,[s.value?(Q(),ae("button",{key:0,class:Xt(["fx-perm-tab",{"is-active":l.value==="perms"}]),onClick:H[1]||(H[1]=X=>l.value="perms")},le(i("Kişiler","People")),3)):rt("",!0),L("button",{class:Xt(["fx-perm-tab",{"is-active":l.value==="share"}]),onClick:H[2]||(H[2]=X=>l.value="share")},le(i("Bağlantı","Link")),3),e.isDir?(Q(),ae("button",{key:1,class:Xt(["fx-perm-tab",{"is-active":l.value==="drop"}]),onClick:H[3]||(H[3]=X=>l.value="drop")},le(i("Dosya İste","Request files")),3)):rt("",!0)]),L("div",kx,[l.value==="perms"&&s.value?(Q(),ae(yt,{key:0},[h.value?rt("",!0):(Q(),ae("div",Sx,le(i("Bu diskte RBAC kapalı — izinler yalnızca RBAC açık disklerde geçerli.","RBAC is off on this storage — grants only apply when RBAC is enabled.")),1)),c.value?(Q(),ae("div",Cx,le(c.value),1)):rt("",!0),u.value?(Q(),ae("div",Ax,le(i("Yükleniyor…","Loading…")),1)):(Q(),ae(yt,{key:3},[L("div",Ex,[L("div",Tx,[L("div",Mx,[rr(L("input",{"onUpdate:modelValue":H[4]||(H[4]=X=>y.value=X),type:"email",class:"fx-perm-input",autocomplete:"off",placeholder:i("İsim veya e-posta","Name or email"),onInput:se,onKeyup:pa(Ce,["enter"]),onFocus:se},null,40,Dx),[[sn,y.value]]),C.value?(Q(),ae("ul",Ix,[(Q(!0),ae(yt,null,nr(S.value,X=>(Q(),ae("li",{key:X.id,onMousedown:vr(Xe=>ge(X),["prevent"])},[L("span",Fx,le((X.display_name||X.email).charAt(0).toUpperCase()),1),L("span",Ox,[L("span",Px,le(X.display_name||X.email),1),L("span",Rx,le(X.email)+" · "+le(X.role),1)])],40,zx))),128))])):rt("",!0)]),rr(L("select",{"onUpdate:modelValue":H[5]||(H[5]=X=>p.value=X),class:"fx-perm-sel",title:(I=_.find(X=>X.v===p.value))==null?void 0:I.d},[(Q(),ae(yt,null,nr(_,X=>L("option",{key:X.v,value:X.v},le(X.l),9,Bx)),64))],8,Lx),[[Ws,p.value]]),L("button",{class:"fx-perm-btn fx-perm-btn--primary",disabled:x.value,onClick:Ce},le(i("Ekle","Add")),9,Nx)]),m.value?(Q(),ae("div",$x,[L("p",Ux,le(i("Bu e-postada hesap yok. Ne yapmak istersiniz?","No account for this email — what next?")),1),L("div",Hx,[L("div",jx,[rr(L("select",{"onUpdate:modelValue":H[6]||(H[6]=X=>b.value=X),class:"fx-perm-sel"},[L("option",Gx,le(i("Kullanıcı","User")),1),L("option",Vx,le(i("Görüntüleyen","Viewer")),1)],512),[[Ws,b.value]]),L("button",{class:"fx-perm-btn fx-perm-btn--primary",disabled:x.value,onClick:xe},le(i("Kullanıcı oluştur + yetki ver","Create user + grant")),9,qx)]),L("button",{class:"fx-perm-btn fx-perm-btn--ghost",disabled:x.value,onClick:Ve},le(i("Sadece paylaşım linki gönder →","Just send a share link →")),9,Wx)])])):rt("",!0),g.value?(Q(),ae("div",Kx,le(g.value),1)):rt("",!0),(ee=v.value)!=null&&ee.tempPassword?(Q(),ae("div",Xx,[gr(le(i("Geçici parola:","Temp password:"))+" ",1),L("code",null,le(v.value.tempPassword),1)])):rt("",!0)]),L("div",Yx,[L("h4",null,le(i("Erişimi olanlar","People with access")),1),!f.value.length&&!d.value.length?(Q(),ae("div",Zx,le(i("Henüz kimseyle paylaşılmadı.","Not shared with anyone yet.")),1)):rt("",!0),(Q(!0),ae(yt,null,nr(f.value,X=>(Q(),ae("div",{key:"d"+X.id,class:"fx-perm-person"},[L("span",Jx,le(it(X)),1),L("span",{class:"fx-perm-user",title:X.user_email},le(qe(X)),9,Qx),L("select",{class:"fx-perm-sel fx-perm-sel--sm",value:X.level,onChange:Xe=>Ue(X,Xe.target.value)},[(Q(),ae(yt,null,nr(_,Xe=>L("option",{key:Xe.v,value:Xe.v},le(Xe.l),9,t_)),64))],40,e_),L("button",{class:"fx-perm-del",disabled:x.value,title:i("Kaldır","Remove"),onClick:Xe=>Ne(X)},"✕",8,r_)]))),128)),(Q(!0),ae(yt,null,nr(d.value,X=>(Q(),ae("div",{key:"i"+X.id,class:"fx-perm-person fx-perm-inh"},[L("span",n_,le(it(X)),1),L("span",{class:"fx-perm-user",title:X.user_email},le(qe(X)),9,a_),L("span",i_,le(E(X.level)),1),L("span",{class:"fx-perm-from",title:i("Üst klasörden gelir","Inherited from")+": "+(X.path_prefix||"/")}," ↳ "+le(X.path_prefix||"/"),9,o_)]))),128))])],64))],64)):rt("",!0),l.value==="share"?(Q(),ae(yt,{key:1},[L("div",l_,[L("div",s_,[L("label",u_,[rr(L("input",{type:"checkbox","onUpdate:modelValue":H[7]||(H[7]=X=>N.value=X)},null,512),[[qs,N.value]]),gr(" "+le(i("PIN ile koru","Protect with a PIN")),1)]),L("label",c_,[L("span",f_,le(i("Süre","Expiry")),1),rr(L("select",{"onUpdate:modelValue":H[8]||(H[8]=X=>R.value=X),class:"fx-perm-sel fx-perm-sel--sm"},[(Q(),ae(yt,null,nr(_e,X=>L("option",{key:X.v,value:X.v},le(X.l),9,d_)),64))],512),[[Ws,R.value,void 0,{number:!0}]])]),L("button",{class:"fx-perm-btn fx-perm-btn--primary",disabled:z.value,onClick:ot},le(i("Bağlantı oluştur","Create link")),9,h_)]),q.value?(Q(),ae("div",p_,le(q.value),1)):rt("",!0),$.value?(Q(),ae("div",v_,[L("div",m_,[L("a",{href:$.value.url,target:"_blank",rel:"noopener",class:"fx-perm-link"},le($.value.url),9,g_),L("button",{class:"fx-perm-btn fx-perm-btn--sm",onClick:H[9]||(H[9]=X=>ze($.value.url,"new"))},le(W.value==="new"?i("Kopyalandı ✓","Copied ✓"):i("Kopyala","Copy")),1)]),$.value.pin?(Q(),ae("div",b_,[L("span",null,[H[25]||(H[25]=gr("PIN: ",-1)),L("code",null,le($.value.pin),1)]),L("button",{class:"fx-perm-btn fx-perm-btn--sm",onClick:H[10]||(H[10]=X=>ze($.value.pin,"sharepin"))},le(W.value==="sharepin"?i("Kopyalandı ✓","Copied ✓"):i("Kopyala","Copy")),1)])):rt("",!0),L("div",y_,[rr(L("input",{"onUpdate:modelValue":H[11]||(H[11]=X=>Z.value=X),type:"text",class:"fx-perm-input",autocomplete:"off",placeholder:i("e-posta(lar) — virgülle ayırın","email(s) — comma separated"),onKeyup:pa(wt,["enter"])},null,40,x_),[[sn,Z.value]]),L("button",{class:"fx-perm-btn",disabled:te.value,onClick:wt},le(i("Gönder","Send")),9,__)]),ne.value?(Q(),ae("div",w_,le(ne.value),1)):rt("",!0),re.value?(Q(),ae("button",{key:2,type:"button",class:"fx-perm-btn fx-perm-btn--ghost fx-perm-sharebtn",onClick:H[12]||(H[12]=X=>k(Fe()))},[H[26]||(H[26]=L("span",{"aria-hidden":"true"},"📤",-1)),gr(" "+le(i("Paylaş","Share")),1)])):rt("",!0)])):Z.value?(Q(),ae("p",k_,[gr(le(i("Aşağıdan bir bağlantı oluşturun, ardından","Create a link below, then it will be sent to"))+" ",1),L("strong",null,le(Z.value),1),gr(" "+le(i("adresine gönderin.",".")),1)])):rt("",!0)]),L("div",S_,[L("h4",null,le(i("Mevcut bağlantılar","Existing links")),1),M.value.length?rt("",!0):(Q(),ae("div",C_,le(i("Yok","None")),1)),(Q(!0),ae(yt,null,nr(M.value,X=>(Q(),ae("div",{key:X.uuid,class:"fx-perm-person"},[L("span",{class:"fx-perm-user fx-perm-link",title:X.url},le(X.url),9,A_),L("button",{class:"fx-perm-btn fx-perm-btn--sm",onClick:Xe=>ze(X.url,X.uuid)},le(W.value===X.uuid?i("✓","✓"):i("Kopyala","Copy")),9,E_),L("button",{class:"fx-perm-del",disabled:z.value,title:i("İptal","Revoke"),onClick:Xe=>ke(X)},"✕",8,T_)]))),128))])],64)):rt("",!0),l.value==="drop"?(Q(),ae("div",M_,[L("p",D_,le(i("Bu klasöre herkesin dosya YÜKLEYEBİLECEĞİ herkese açık bir bağlantı. Yükleyenler klasördeki mevcut dosyaları göremez.","A public link that lets anyone UPLOAD files into this folder. Uploaders never see the folder's existing files.")),1),L("div",I_,[L("label",z_,[rr(L("input",{type:"checkbox","onUpdate:modelValue":H[13]||(H[13]=X=>pe.value=X)},null,512),[[qs,pe.value]]),gr(" "+le(i("PIN ile koru","Protect with a PIN")),1)]),L("label",F_,[L("span",O_,le(i("Süre","Expiry")),1),rr(L("select",{"onUpdate:modelValue":H[14]||(H[14]=X=>we.value=X),class:"fx-perm-sel fx-perm-sel--sm"},[(Q(),ae(yt,null,nr(_e,X=>L("option",{key:X.v,value:X.v},le(X.l),9,P_)),64))],512),[[Ws,we.value,void 0,{number:!0}]])]),L("button",{class:"fx-perm-btn fx-perm-btn--primary",disabled:Ee.value,onClick:D},le(i("Bağlantı oluştur","Create link")),9,R_)]),L("button",{type:"button",class:"fx-perm-btn fx-perm-btn--ghost fx-perm-advtoggle",onClick:H[15]||(H[15]=X=>ve.value=!ve.value)},le(ve.value?i("Gelişmiş ▲","Advanced ▲"):i("Gelişmiş ▼","Advanced ▼")),1),ve.value?(Q(),ae("div",L_,[L("label",B_,[L("span",N_,le(i("En fazla dosya","Max files")),1),rr(L("input",{"onUpdate:modelValue":H[16]||(H[16]=X=>Te.value=X),type:"number",min:"1",class:"fx-perm-input fx-perm-input--sm",placeholder:"20"},null,512),[[sn,Te.value]])]),L("label",$_,[L("span",U_,le(i("Dosya başı MB","MB / file")),1),rr(L("input",{"onUpdate:modelValue":H[17]||(H[17]=X=>Se.value=X),type:"number",min:"1",class:"fx-perm-input fx-perm-input--sm",placeholder:"500"},null,512),[[sn,Se.value]])]),L("label",H_,[L("span",j_,le(i("İzinli türler","Allowed types")),1),rr(L("input",{"onUpdate:modelValue":H[18]||(H[18]=X=>Ie.value=X),type:"text",class:"fx-perm-input fx-perm-input--sm",placeholder:i("hepsi (örn. pdf, jpg)","all (e.g. pdf, jpg)")},null,8,G_),[[sn,Ie.value]])]),L("label",V_,[rr(L("input",{type:"checkbox","onUpdate:modelValue":H[19]||(H[19]=X=>Le.value=X)},null,512),[[qs,Le.value]]),gr(" "+le(i("Yükleyenin adını sor","Ask uploader name")),1)])])):rt("",!0),Be.value?(Q(),ae("div",q_,le(Be.value),1)):rt("",!0),be.value?(Q(),ae("div",W_,[L("div",K_,[L("a",{href:be.value.url,target:"_blank",rel:"noopener",class:"fx-perm-link"},le(be.value.url),9,X_),L("button",{class:"fx-perm-btn fx-perm-btn--sm",onClick:H[20]||(H[20]=X=>ze(be.value.url,"drop"))},le(W.value==="drop"?i("Kopyalandı ✓","Copied ✓"):i("Kopyala","Copy")),1)]),be.value.pin?(Q(),ae("div",Y_,[L("span",null,[H[27]||(H[27]=gr("PIN: ",-1)),L("code",null,le(be.value.pin),1)]),L("button",{class:"fx-perm-btn fx-perm-btn--sm",onClick:H[21]||(H[21]=X=>ze(be.value.pin,"droppin"))},le(W.value==="droppin"?i("Kopyalandı ✓","Copied ✓"):i("Kopyala","Copy")),1)])):rt("",!0),L("div",Z_,[rr(L("input",{"onUpdate:modelValue":H[22]||(H[22]=X=>ye.value=X),type:"text",class:"fx-perm-input",autocomplete:"off",placeholder:i("e-posta(lar) — virgülle ayırın","email(s) — comma separated"),onKeyup:pa(ue,["enter"])},null,40,J_),[[sn,ye.value]]),L("button",{class:"fx-perm-btn",disabled:P.value,onClick:ue},le(i("Gönder","Send")),9,Q_)]),V.value?(Q(),ae("div",ew,le(V.value),1)):rt("",!0),re.value?(Q(),ae("button",{key:2,type:"button",class:"fx-perm-btn fx-perm-btn--ghost fx-perm-sharebtn",onClick:H[23]||(H[23]=X=>k(gt()))},[H[28]||(H[28]=L("span",{"aria-hidden":"true"},"📤",-1)),gr(" "+le(i("Paylaş","Share")),1)])):rt("",!0)])):rt("",!0)])):rt("",!0)])])])}}}),[["__scopeId","data-v-53f367d0"]]),rw={key:0,class:"fe__presence"},nw={key:0,class:"fe__loading"},aw={class:"fe__loading-text"},iw={key:1,class:"fe__notfound"},ow={class:"fe__notfound-title"},lw={class:"fe__notfound-path"},sw={class:"fe__notfound-desc"},uw={key:1,class:"fe__dragover"},cw={class:"fe-recents__header"},fw={class:"fe-modal__head"},dw={class:"fe-modal__title"},hw={class:"fe-modal__body"},pw={key:0,class:"fe-toast"},fp="brf-file-explorer:view-mode",bc="brf-file-explorer:path",El="application/x-brf-files",vw=qt({__name:"FileExplorer",props:{config:{}},emits:["share-created","file-opened","error","upload-progress","selection-change","navigate"],setup(e,{expose:t,emit:r}){const n=e,a=r,i=R6(n.config),o=X6(i,{reload:()=>H()}),l=o.presenceUsers;function s(U){const G=(U||"").replace(/^\/+|\/+$/g,"");if(G===".trash"||G.startsWith(".trash/"))return null;const Ae=We(G);return!Ae||!Ae.includes("://")||Ae.startsWith("://")?null:Ae}pr(()=>{o.start(),o.subscribe(s(p.value))}),Br(()=>o.stop());const u=L6(n.config,i),c=H6(n.config,i,{onSettled:U=>{if(U.status==="error")me(U.error_message||"İşlem başarısız");else{const G=U.op_type==="copy"?"Kopyalandı":U.op_type==="move"?"Taşındı":"Silindi";me(`${G} (${U.progress_total})`)}H()}}),f=he(!1),d=(n.config.rootPath||"").trim(),h=d.replace("://","/").replace(/^\/+|\/+$/g,""),y=h||n.config.initialPath||"",p=he(y),x=he(n.config.defaultAdapter||"brf"),g=he(y),m=he([]),b=he(""),v=he(""),S=zb((U,G)=>{let Ae=(()=>{try{const Pe=localStorage.getItem(fp);if(Pe==="list"||Pe==="grid")return Pe}catch{}return n.config.viewMode??"list"})();return{get(){return U(),Ae},set(Pe){if(Pe!==Ae){Ae=Pe;try{localStorage.setItem(fp,Pe)}catch{}G()}}}}),C=he(""),A=he(!1),_=he(""),E=mt(()=>A.value),M=mt(()=>n.config.locale||"tr"),z=mt(()=>{const U=(p.value??"").replace(/^\/+|\/+$/g,"");return h&&U===h?!1:U.length>0}),N=mt(()=>O.value?!(p.value??"").replace(/^\/+|\/+$/g,""):!1);function R(){if(A.value){H(_.value);return}const U=(p.value??"").replace(/^\/+|\/+$/g,"");if(!U||U===h)return;const G=U.lastIndexOf("/");let Ae=G===-1?"":U.slice(0,G);h&&!(Ae===h||Ae.startsWith(h+"/"))&&(Ae=h),H(Ae)}const{t:$}=In(M),q=B6(()=>m.value);tr(()=>[...q.selected.value],()=>{a("selection-change",q.nodes.value.map(G=>({path:G.path,basename:G.basename,type:G.type})));const U=q.nodes.value.filter(G=>G.type==="file");o.setFocus(U.length===1?U[0].basename:null)});const W=he({mode:null,items:[],sourcePath:null}),Z=he(null),te=he(new Set),ne=he(!1),_e=he(!1),pe=he(null),we=he(0);async function ve(){try{const U=await tl(),G=n.config.apiBase??"",Ae=await fetch(`${G}/api/files/manager/star/list?limit=500`,{headers:U,credentials:"include"});if(!Ae.ok)return;const Pe=await Ae.json(),xt=Array.isArray(Pe)?Pe:Array.isArray(Pe==null?void 0:Pe.entries)?Pe.entries:Array.isArray(Pe==null?void 0:Pe.nodes)?Pe.nodes:[];te.value=new Set(xt.map(lt=>lt.id).filter(lt=>typeof lt=="number"))}catch{}}function Te(U,G){if(typeof U.id!="number")return;const Ae=new Set(te.value);G?Ae.add(U.id):Ae.delete(U.id),te.value=Ae}async function Se(U){if(typeof U.id=="number")try{const G=n.config.apiBase??"";await fetch(`${G}/api/files/manager/recent`,{method:"POST",headers:await tl({"Content-Type":"application/json"}),credentials:"include",body:JSON.stringify({node_id:U.id})}),we.value+=1}catch{}}function Ie(U){typeof U.id=="number"&&(pe.value=U,_e.value=!0)}function Le(U){const G={type:"file",path:U.path,basename:U.name,extension:(U.name.split(".").pop()||"").toLowerCase(),id:U.id};ne.value=!1,ra(G)}const Ee=mt(()=>{var G,Ae,Pe;if(n.config.onlyOfficeBase)return n.config.onlyOfficeBase;const U=(Ae=(G=Z.value)==null?void 0:G.external)==null?void 0:Ae.onlyoffice;return U&&!ip(U)?null:((Pe=Z.value)==null?void 0:Pe.onlyoffice_url)||null}),Be=mt(()=>Ee.value&&i.endpoints.onlyOfficeConfig||null),be=mt(()=>{var Ae,Pe,xt;const U=n.config.drawioUrl||n.config.drawioBase;if(U)return U;const G=(Pe=(Ae=Z.value)==null?void 0:Ae.external)==null?void 0:Pe.drawio;return G&&!ip(G)?null:((xt=Z.value)==null?void 0:xt.drawio_url)||null}),ye=mt(()=>{var U;return n.config.convertBase||((U=Z.value)==null?void 0:U.convert_url)||null}),P=he([]),V=he(null),fe=he(!1),de=he(!1),ie=he(!1),oe=he(!1),se=he(!1),ge=he(null),Ce=he(null),xe=he(null),Ve=he(null),Ue=he("edit"),Ne=he(!1),qe=he(null),it=he(!1),ct=he(null);function ot(U){return U===void 0||U==="editor"||U==="owner"}function wt(U){var G;return U.length===1&&typeof((G=U[0])==null?void 0:G.perm)=="string"?U[0].perm:b.value}const Me=mt(()=>ot(b.value)),D=he(null),ue=he(null),ke=he(null),ze=he(null);let re;function me(U){ze.value=U,re&&clearTimeout(re),re=setTimeout(()=>ze.value=null,2500)}const O=mt(()=>n.config.multiStorageRoot===!0);function Fe(U){const G=U.replace(/^\/+|\/+$/g,"");if(!G)return{adapter:"",rel:""};const Ae=G.indexOf("/");return Ae===-1?{adapter:G,rel:""}:{adapter:G.slice(0,Ae),rel:G.slice(Ae+1)}}function gt(U){if(U.includes("://"))return U;const{adapter:G,rel:Ae}=Fe(U);return G?Ae?`${G}://${Ae}`:`${G}://`:""}function k(U){const G=U.indexOf("://");if(G===-1)return U.replace(/^\/+|\/+$/g,"");const Ae=U.slice(0,G),Pe=U.slice(G+3).replace(/^\/+|\/+$/g,"");return Pe?`${Ae}/${Pe}`:Ae}function K(){return(n.config.storages??[]).map(G=>({type:"dir",path:G.name,basename:G.label||G.name,extension:"",storage:G.name,visibility:"private",file_size:0,mime_type:"inode/storage",extra_metadata:{driver:G.driver,readOnly:G.readOnly}}))}async function H(U){f.value=!0,A.value=!1;let G=U??p.value??"";try{if(v.value="",h){const Or=String(G).replace(/^\/+|\/+$/g,"");(!Or||!(Or===h||Or.startsWith(h+"/")))&&(G=h)}if(O.value&&!gt(G)){p.value="",x.value="",g.value="",m.value=K();return}const Ae=O.value?gt(G):We(G),Pe=C.value?await i.search(Ae,C.value):await i.index(Ae);x.value=Pe.adapter,g.value=Pe.dirname,b.value=Pe.perm||"",m.value=(Pe.files||[]).filter(Or=>!(Or.path.includes(".thumbs")||Or.path.includes(".versions")||Or.basename===".versions"||Or.basename===".trash"||Or.basename===".keepdir"));const xt=I(Pe.dirname),lt=xt==="fileman"||xt==="",ar=xt.startsWith("fileman/.trash"),Hr=n.config.trashVisible!==!1;!ar&<&&Hr&&(m.value.unshift({type:"dir",path:`${Pe.adapter}://fileman/.trash`,basename:".trash",extension:"",storage:Pe.adapter,visibility:"private",size:0,file_size:0,mime_type:"inode/directory",extra_metadata:{}}),X(Pe.adapter)),p.value=O.value?k(Pe.dirname):I(Pe.dirname)}catch(Ae){const Pe=Ae instanceof Error?Ae.message:String(Ae),xt=Ae.status;if(xt===404||xt===403){v.value=String(G),m.value=[],a("error",{message:Pe,context:{path:U}});return}a("error",{message:Pe,context:{path:U}}),me(Pe)}finally{f.value=!1}}function I(U){const G=U.indexOf("://");return G===-1?U:U.slice(G+3)}function ee(){v.value="",H("")}async function X(U){try{const{entries:G}=await i.listTrash(U),Ae=m.value.find(lt=>lt.basename===".trash");if(!Ae)return;let Pe=0,xt=0;for(const lt of G){Pe+=lt.size||0;const ar=Date.parse(lt.deleted_at);!Number.isNaN(ar)&&ar>xt&&(xt=ar)}Ae.size=Pe,xt>0&&(Ae.last_modified=xt)}catch{}}async function Xe(){f.value=!0,_.value=x.value||"",A.value=!0,q.clear();try{const{entries:U}=await i.listTrash();m.value=U.map(G=>({type:"file",id:G.id,path:G.storage_name?`${G.storage_name}://${G.path}`:G.path,basename:G.name,extension:G.name.includes(".")&&G.name.split(".").pop()||"",storage:G.storage_name||"",visibility:"private",file_size:G.size,mime_type:G.mime||"",extra_metadata:{deleted_at:G.deleted_at,ttl_days:G.ttl_days??null}})),g.value=".trash",p.value=".trash"}catch(U){const G=U instanceof Error?U.message:String(U);a("error",{message:G,context:{op:"trash-list"}}),me(G)}finally{f.value=!1}}function We(U){if(U&&U.includes("://"))return U;if(O.value){const G=gt(U??"");return G||(x.value?`${x.value}://`:"")}return U?`${x.value}://${U.replace(/^\/+/,"")}`:`${x.value}://`}tr(()=>C.value,()=>void H());function tt(){return n.config.pathPersist??"hash"}function At(){const U=tt();return U==="hash"||U==="hash+localStorage"}function fn(U){try{return decodeURIComponent(U)}catch{return U}}function Jt(){try{return localStorage.getItem(bc)||""}catch{return""}}function zt(){const U=window.location.hash||"";return U.startsWith("#")?fn(U.slice(1)).replace(/^\/+|\/+$/g,""):""}function mr(){if(typeof window>"u")return"";const U=tt();if(U==="none")return"";if(U==="localStorage")return Jt();const G=zt();return G||U==="hash"?G:y?"":Jt()}function Fr(U){if(typeof window>"u")return;const G=tt();if(G==="none")return;if(G==="localStorage"||G==="hash+localStorage"){try{U?localStorage.setItem(bc,U):localStorage.removeItem(bc)}catch{}if(G==="localStorage")return}const Ae=U?U.split("/").map(encodeURIComponent).join("/"):"",Pe=Ae?`#${Ae}`:"";(window.location.hash||"")!==Pe&&history.replaceState(null,"",Pe||window.location.pathname+window.location.search)}function Ur(){if(!At())return;const U=zt();U&&U!==p.value&&H(U)}tr(p,U=>{Fr(U),a("navigate",{path:U}),o.subscribe(s(U))}),t({reload:()=>H()}),pr(async()=>{var G;mc();const U=mr();await H(U||void 0),await za(),(G=ue.value)==null||G.focus(),ve(),At()&&window.addEventListener("hashchange",Ur),i.endpoints.opsList&&c.startPolling(),i.endpoints.capabilities&&i.capabilities().then(Ae=>{Z.value=Ae}).catch(()=>{})}),N6(ue,{onDelete:()=>{q.isEmpty.value||(ie.value=!0)},onRename:()=>{q.nodes.value.length===1&&(ge.value=q.nodes.value[0],de.value=!0)},onSelectAll:()=>q.selectAll(),onOpen:()=>{const U=q.nodes.value[0];U&&ra(U)},onClose:()=>{var U;fe.value=!1,de.value=!1,ie.value=!1,oe.value=!1,se.value=!1,(U=D.value)==null||U.hide()},onFocusSearch:()=>{var U;return(U=ke.value)==null?void 0:U.focusSearch()},onCut:()=>rM(),onCopy:()=>nM(),onPaste:()=>$3(),onGoUp:()=>R(),hasSelection:()=>!q.isEmpty.value});const el=new Set(["docx","xlsx","pptx","doc","xls","ppt","odt","ods","odp"]);function ra(U){if(U.basename===".trash"){Xe();return}if(U.type==="dir"){const Ae=O.value?k(U.path):I(U.path);H(Ae);return}const G=(U.extension||"").toLowerCase();Ue.value=ot(U.perm??b.value)?dn(G):"view",Ve.value=U,se.value=!0,a("file-opened",{path:U.path,basename:U.basename}),Se(U)}const hr=new Set([...el,"drawio","dio","pdf","epub","ipynb","tiff","tif","psd","mmd","mermaid","glb","gltf","obj","stl","fbx","3ds","zip","rar","7z","tar","gz","tgz","jpg","jpeg","png","webp","gif","bmp","avif","svg","heic","mp4","webm","mov","mkv","m4v","ogv","mp3","wav","ogg","flac","m4a","aac","opus"]);function dn(U){return hr.has(U)?"view":"edit"}async function Ar(U){const G=U??q.nodes.value;if(G.length!==0)try{if(A.value){const xt=G.map(ar=>ar.id).filter(ar=>typeof ar=="number"),{restored:lt}=await i.restoreIds(xt);me(`${lt} öğe geri getirildi`),q.clear(),await Xe();return}if(!i.endpoints.restore)return;const Ae=G.map(xt=>xt.path),{restored:Pe}=await i.restore(Ae);me(`${Pe} öğe geri getirildi`),q.clear(),await H()}catch(Ae){a("error",{message:Ae.message,context:{op:"restore"}})}}function Un(U){Ue.value="view",Ve.value=U,se.value=!0,Se(U)}function Hn(U){if(U.type==="dir"){const lt=O.value?k(U.path):I(U.path);H(lt);return}if(!ot(U.perm??b.value)){Un(U);return}const G=(U.extension||"").toLowerCase(),Ae=n.config.openPageBase;if(!Ae){ra(U);return}const Pe=Ae.includes("?")?"&":"?",xt=`${Ae}${Pe}path=${encodeURIComponent(U.path)}&type=${encodeURIComponent(G)}&mode=edit`;window.open(xt,"_blank","noopener"),a("file-opened",{path:U.path,basename:U.basename}),Se(U)}const Ei=he("selection"),Rd=he(""),KT=he(""),XT=mt(()=>{const U=q.nodes.value;return U.length===0?"none":U.length===1?U[0].type==="dir"?"single-dir":"single-file":"multi"});async function YT(U){const G=q.nodes.value;if(U==="open"){G[0]&&ra(G[0]);return}await N3(U,G)}async function L3(U,G){var Ae;Ei.value="selection",q.has(U.path)||(q.click(U.path),await za()),(Ae=D.value)==null||Ae.show({clientX:G.clientX,clientY:G.clientY},q.nodes.value)}function ZT(U){var G;U.preventDefault(),Ei.value="selection",q.clear(),(G=D.value)==null||G.show({clientX:U.clientX,clientY:U.clientY},[])}function JT(U){var G;Ei.value="breadcrumb",Rd.value=U.adapterPath,KT.value=U.label,(G=D.value)==null||G.show({clientX:U.x,clientY:U.y},[])}const QT=mt(()=>{if(Ei.value==="breadcrumb")return[{key:"open",label:$("ctx.open"),icon:"↗"},{key:"copy-path",label:$("breadcrumb.copy_path"),icon:"📋"}];const U=q.nodes.value,G=U.length>0,Ae=U.length===1;if(E.value)return G?[{key:"restore",label:$("ctx.restore"),icon:"↩"},{divider:!0,key:"sep1",label:""},{key:"delete",label:$("ctx.delete_perm"),icon:"🗑",danger:!0}]:[];const Pe=(p.value??"").replace(/^\/+|\/+$/g,"");return O.value&&Pe===""?G?Ae?[{key:"open",label:$("ctx.open"),icon:"↗"}]:[]:[]:G?B3(U):ot(b.value)?[{key:"new-folder",label:$("toolbar.new_folder"),icon:"📁"},{key:"paste",label:$("ctx.paste"),icon:"📋",disabled:!W.value.mode}]:[]});function B3(U){var K3,X3;const G=U.length>0,Ae=U.length===1,Pe=Ae&&((K3=U[0])==null?void 0:K3.type)==="file",xt=M.value==="en"?"Tags…":"Etiketler…",lt=Ae&&typeof((X3=U[0])==null?void 0:X3.id)=="number",ar=M.value==="en"?"Copy node id":"Node id'yi kopyala",Hr=wt(U),Or=ot(Hr),AM=M.value==="en"?"Share / Permissions":"Paylaş / İzinler";return[{key:"open",label:$("ctx.open"),icon:"↗",hidden:!Ae},{key:"preview",label:$("ctx.preview"),icon:"👁",hidden:!Ae,disabled:!Pe},{key:"download",label:$("ctx.download"),icon:"⬇",hidden:!Ae,disabled:!Pe},{key:"convert",label:$("ctx.convert"),icon:"🔄",hidden:!Ae||!ye.value||!Or,disabled:!Pe},{key:"access",label:AM,icon:"🔗",hidden:!Ae||!Or},{key:"copy-id",label:ar,icon:"🆔",hidden:!lt,disabled:!lt},{divider:!0,key:"sep1",label:"",hidden:!Or},{key:"rename",label:$("ctx.rename"),icon:"✎",hidden:!Ae||!Or,disabled:!Ae},{key:"cut",label:$("ctx.cut"),icon:"✂",hidden:!G||!Or,disabled:!G},{key:"copy",label:$("ctx.copy"),icon:"❐",hidden:!G,disabled:!G},{key:"paste",label:$("ctx.paste"),icon:"📋",hidden:!Or,disabled:!W.value.mode},{divider:!0,key:"sep-meta",label:"",hidden:!lt},{key:"tags",label:xt,icon:"🏷",hidden:!lt,disabled:!lt},{divider:!0,key:"sep2",label:"",hidden:!Or},{key:"delete",label:$("ctx.delete"),icon:"🗑",danger:!0,hidden:!G||!Or,disabled:!G}]}const eM=mt(()=>{const U=q.nodes.value;if(E.value)return U.length===0?[]:[{key:"restore",label:$("ctx.restore"),icon:"↩"},{key:"delete",label:$("ctx.delete_perm"),icon:"🗑",danger:!0}];const G=(p.value??"").replace(/^\/+|\/+$/g,"");return O.value&&G===""?U.length===1?[{key:"open",label:$("ctx.open"),icon:"↗"}]:[]:U.length===0?[]:B3(U)});async function tM(U,G){if(Ei.value==="breadcrumb"){U.key==="open"?H(I(Rd.value)):U.key==="copy-path"&&await W3(Rd.value);return}await N3(U.key,G)}async function N3(U,G){var Ae;switch(U){case"open":G[0]&&Hn(G[0]);break;case"preview":G[0]&&Un(G[0]);break;case"download":G[0]&&iM(G[0]);break;case"convert":G[0]&&cM(G[0]);break;case"share":G[0]&&uM(G[0]);break;case"access":G[0]&&(ct.value=G[0],it.value=!0);break;case"copy-id":if(G[0]&&typeof G[0].id=="number"){const Pe=G[0].id;(Ae=navigator.clipboard)==null||Ae.writeText(String(Pe)).then(()=>me(M.value==="en"?`Node id ${Pe} copied`:`Node id ${Pe} kopyalandı`),()=>me(`#${Pe}`))}break;case"tags":G[0]&&Ie(G[0]);break;case"rename":G[0]&&(ge.value=G[0],de.value=!0);break;case"cut":W.value={mode:"cut",items:G,sourcePath:p.value},me("Kes → Yapıştır hazır");break;case"copy":W.value={mode:"copy",items:G,sourcePath:p.value},me("Kopyala → Yapıştır hazır");break;case"paste":await $3();break;case"delete":ie.value=!0;break;case"restore":G.length>0&&await Ar(G);break;case"new-folder":fe.value=!0;break;case"duplicate":G[0]&&await aM(G[0]);break}}function rM(){q.isEmpty.value||(W.value={mode:"cut",items:q.nodes.value,sourcePath:p.value},me("Kesildi"))}function nM(){q.isEmpty.value||(W.value={mode:"copy",items:q.nodes.value,sourcePath:p.value},me("Kopyalandı"))}async function $3(){const U=W.value;if(!(!U.mode||U.items.length===0))try{const G=U.items.map(xt=>xt.path),Ae=U.sourcePath||"";if(U.mode==="cut"&&Ae===p.value){me("Aynı klasöre kesilemez");return}if(U.mode==="cut"){const{op:xt}=await i.moveAsync(G,We(p.value),We(Ae)||void 0);c.register(xt),me("Taşıma kuyruğa alındı")}else{const{op:xt}=await i.copy(G,We(p.value));c.register(xt),me("Kopyalama kuyruğa alındı")}W.value={mode:null,items:[],sourcePath:null}}catch(G){a("error",{message:G.message,context:{op:"paste"}})}}async function aM(U){try{const{op:G}=await i.copy([U.path],We(p.value));c.register(G)}catch(G){a("error",{message:G.message,context:{op:"duplicate"}})}}function iM(U){const G=i.downloadUrl(U.path);window.open(G,"_blank")}async function oM(U){try{await i.newFolder(We(p.value),U),fe.value=!1,await H()}catch(G){a("error",{message:G.message,context:{op:"newfolder"}})}}async function lM(U){const G=ge.value;if(G)try{await i.rename(We(p.value),G.path,U),de.value=!1,ge.value=null,await H()}catch(Ae){a("error",{message:Ae.message,context:{op:"rename"}})}}async function sM(){if(A.value){ie.value=!1,me("Çöpteki öğeler saklama süresi sonunda otomatik silinir. Kalıcı silme yönetici panelinden yapılır.");return}const U=q.nodes.value.map(G=>G.path);if(U.length===0){ie.value=!1;return}try{if(i.endpoints.deleteAsync){const{op:G}=await i.deleteAsync(U,We(p.value));c.register(G),me("Silme kuyruğa alındı")}else await i.deleteItems(We(p.value),U),await H();ie.value=!1,q.clear()}catch(G){a("error",{message:G.message,context:{op:"delete"}})}}function uM(U){Ce.value=U,xe.value=null,oe.value=!0}function cM(U){qe.value=U,Ne.value=!0}function fM(U){me(M.value==="en"?`Converted → ${U}`:`Dönüştürüldü → ${U}`),H()}async function dM(U){const G=Ce.value;if(G)try{const{share:Ae}=await i.createShare({path:G.path,password:U.password,expires_at:U.expires_at,max_downloads:U.max_downloads});xe.value=Ae,a("share-created",{path:G.path,url:Ae.url,pin:Ae.password_pin??null})}catch(Ae){a("error",{message:Ae.message,context:{op:"share"}})}}function hM(){oe.value=!1,Ce.value=null,xe.value=null}function pM(){var U;if(!Me.value){me(M.value==="en"?"Read-only here":"Burada yazma yetkiniz yok");return}(U=V.value)==null||U.click()}function vM(U){const G=U.target,Ae=G.files?Array.from(G.files):[];G.value="",U3(Ae)}async function U3(U){if(U.length===0)return;const G=!!(i.endpoints.uploadInit&&i.endpoints.uploadFinalize);for(const Ae of U)G&&Ae.size>=10*1024*1024&&await gM(Ae)||await mM(Ae);await H()}async function mM(U){const G=crypto.randomUUID(),Ae=We(p.value);P.value=[...P.value,{id:G,file:U,path:Ae,totalBytes:U.size,uploadedBytes:0,percent:0,status:"uploading",cancel(){}}];const Pe=xt=>{const lt=P.value.findIndex(Hr=>Hr.id===G);if(lt===-1)return;const ar=[...P.value];ar[lt]={...ar[lt],...xt},P.value=ar};try{await i.uploadMultipart(Ae,[U],xt=>{Pe({percent:xt,uploadedBytes:Math.round(xt/100*U.size)}),a("upload-progress",{uploadId:G,percent:xt,done:xt>=100})}),Pe({percent:100,uploadedBytes:U.size,status:"done"}),a("upload-progress",{uploadId:G,percent:100,done:!0})}catch(xt){Pe({status:"error"}),a("error",{message:xt.message,context:{op:"upload",file:U.name}})}}async function gM(U){const G=crypto.randomUUID();let Ae=!1;try{return await u.uploadFile({path:We(p.value),file:U,onProgress:Pe=>{if(Ae){const xt=P.value.findIndex(lt=>lt.id===G);if(xt!==-1){const lt=[...P.value];lt[xt]={...Pe,id:G},P.value=lt}}else{if(Pe.status!=="uploading"&&Pe.uploadedBytes<=0)return;P.value=[...P.value,{...Pe,id:G}],Ae=!0}a("upload-progress",{uploadId:Pe.uploadId??G,percent:Pe.percent,done:Pe.status==="done"})}}),!0}catch{return Ae&&(P.value=P.value.filter(Pe=>Pe.id!==G)),!1}}const Qi=he(0),eo=he(!1);function Ld(U){const G=U.dataTransfer;if(!G||G.types&&G.types.includes(El))return!1;if(G.items&&G.items.length>0){let Ae=!1;for(const Pe of Array.from(G.items))if(Pe.kind==="file"){Ae=!0;break}return Ae}return G.types?G.types.includes("Files"):!1}function bM(U){Ld(U)&&(U.preventDefault(),Qi.value++,eo.value=!0)}function yM(){Qi.value=Math.max(0,Qi.value-1),Qi.value===0&&(eo.value=!1)}function xM(U){Ld(U)&&U.preventDefault()}function _M(U){var Ae,Pe;if((Ae=U.dataTransfer)!=null&&Ae.types.includes(El)){Qi.value=0,eo.value=!1;return}if(!Ld(U)){Qi.value=0,eo.value=!1;return}if(U.preventDefault(),Qi.value=0,eo.value=!1,!Me.value){me(M.value==="en"?"Read-only here":"Burada yazma yetkiniz yok");return}const G=(Pe=U.dataTransfer)!=null&&Pe.files?Array.from(U.dataTransfer.files):[];G.length!==0&&U3(G)}function H3(U){var G;(G=U.dataTransfer)!=null&&G.types.includes("Files")&&U.preventDefault()}function j3(U){const G=ue.value,Ae=U.target;G&&Ae&&!G.contains(Ae)&&U.preventDefault()}pr(()=>{window.addEventListener("dragover",H3),window.addEventListener("drop",j3)}),Br(()=>{window.removeEventListener("dragover",H3),window.removeEventListener("drop",j3),window.removeEventListener("hashchange",Ur)});const Bd=mt(()=>W.value.mode!=="cut"?new Set:new Set(W.value.items.map(U=>U.path)));function G3(U,G){if(!G.dataTransfer)return;if(U.basename===".trash"){G.preventDefault();return}q.has(U.path)||q.click(U.path);const Ae=q.nodes.value.filter(Pe=>!Bd.value.has(Pe.path)).filter(Pe=>Pe.basename!==".trash").map(Pe=>({path:Pe.path,basename:Pe.basename,type:Pe.type}));G.dataTransfer.setData(El,JSON.stringify(Ae)),G.dataTransfer.setData("text/plain",Ae.map(Pe=>Pe.path).join(`
|
|
23
|
+
`)),G.dataTransfer.effectAllowed="move"}async function V3(U,G,Ae){try{if(i.endpoints.moveAsync){const{op:Pe}=await i.moveAsync(U,G,We(p.value));c.register(Pe),me("Taşıma kuyruğa alındı")}else await i.move(We(p.value),U,G),await H();q.clear()}catch(Pe){a("error",{message:Pe.message,context:{op:Ae,targetDir:G}})}}async function q3(U,G){var ar;if(U.type!=="dir")return;const Ae=(ar=G.dataTransfer)==null?void 0:ar.getData(El);if(!Ae)return;let Pe=[];try{Pe=JSON.parse(Ae)}catch{return}if(Pe.length===0)return;const xt=U.path,lt=Pe.map(Hr=>Hr.path).filter(Hr=>Hr&&Hr!==xt&&!xt.startsWith(Hr+"/"));if(lt.length===0){me("Aynı klasöre taşınamaz");return}await V3(lt,xt,"move-dnd")}async function wM(U,G){var ar;const Ae=(ar=G.dataTransfer)==null?void 0:ar.getData(El);if(!Ae)return;let Pe=[];try{Pe=JSON.parse(Ae)}catch{return}if(Pe.length===0)return;const xt=U,lt=Pe.map(Hr=>Hr.path).filter(Hr=>Hr&&Hr!==xt&&!xt.startsWith(Hr+"/"));lt.length!==0&&await V3(lt,xt,"move-dnd-crumb")}function kM(U){U.cancel()}function SM(U){P.value=P.value.filter(G=>G.id!==U.id)}function CM(U){if(O.value&&!U){H("");return}if(O.value){H(k(U));return}H(I(U))}async function W3(U){try{await navigator.clipboard.writeText(U),me($("breadcrumb.copy_path"))}catch{}}function tl(U={}){return i.authHeadersSync({...U})}return(U,G)=>{var Ae,Pe,xt;return Q(),ae("div",{ref_key:"rootEl",ref:ue,class:Xt(["fe",{"fe--theme-light":e.config.theme==="light","fe--theme-dark":e.config.theme==="dark","fe--is-dragover":eo.value}]),tabindex:"-1",onDragenter:bM,onDragover:xM,onDragleave:yM,onDrop:_M,onContextmenu:ZT},[Bt(S8,{ref_key:"toolbarRef",ref:ke,"view-mode":S.value,"search-query":C.value,"trash-active":E.value,actions:eM.value,"selection-mode":XT.value,"paste-enabled":!!W.value.mode,"convert-enabled":!!ye.value,"can-go-up":z.value,"at-virtual-root":N.value,"can-write":Me.value,locale:M.value,"onUpdate:viewMode":G[0]||(G[0]=lt=>S.value=lt),"onUpdate:searchQuery":G[1]||(G[1]=lt=>C.value=lt),onNewFolder:G[2]||(G[2]=lt=>fe.value=!0),onUpload:pM,onRefresh:G[3]||(G[3]=()=>H()),onGoUp:R,onAction:YT,onOpenRecents:G[4]||(G[4]=lt=>ne.value=!0)},null,8,["view-mode","search-query","trash-active","actions","selection-mode","paste-enabled","convert-enabled","can-go-up","at-virtual-root","can-write","locale"]),Bt(U8,{dirname:g.value,adapter:x.value,"root-label":x.value,locale:M.value,"multi-storage-root":O.value,"root-path":Qe(d),onNavigate:CM,onCopyPath:W3,onCrumbContext:JT,onCrumbDrop:wM},null,8,["dirname","adapter","root-label","locale","multi-storage-root","root-path"]),Qe(l).length?(Q(),ae("div",rw,[Bt(i8,{users:Qe(l)},null,8,["users"])])):rt("",!0),L("div",{class:"fe__body",onClick:G[7]||(G[7]=vr(lt=>Qe(q).clear(),["self"]))},[f.value&&m.value.length===0?(Q(),ae("div",nw,[G[23]||(G[23]=L("span",{class:"fe__spinner","aria-hidden":"true"},null,-1)),L("p",aw,le(Qe($)("loading")),1)])):v.value?(Q(),ae("div",iw,[G[24]||(G[24]=L("span",{class:"fe__notfound-icon","aria-hidden":"true"},"📁",-1)),L("p",ow,le(Qe($)("notFound.title")),1),L("p",lw,le(v.value),1),L("p",sw,le(Qe($)("notFound.desc")),1),L("button",{type:"button",class:"fe-btn",onClick:ee},le(Qe($)("notFound.goRoot")),1)])):S.value==="list"?(Q(),kr(l7,{key:2,files:m.value,selected:Qe(q).selected.value,clipped:Bd.value,"show-parent-path":!!C.value,locale:M.value,loading:f.value,"starred-ids":te.value,"api-base":n.config.apiBase??"","auth-headers":()=>tl(),onClickRow:G[5]||(G[5]=(lt,ar)=>Qe(q).click(lt.path,ar)),onDblRow:ra,onContextRow:L3,onItemDragStart:G3,onItemDropInto:q3,onStarChange:Te},null,8,["files","selected","clipped","show-parent-path","locale","loading","starred-ids","api-base","auth-headers"])):(Q(),kr(m7,{key:3,files:m.value,selected:Qe(q).selected.value,clipped:Bd.value,"show-parent-path":!!C.value,locale:M.value,loading:f.value,onClickCard:G[6]||(G[6]=(lt,ar)=>Qe(q).click(lt.path,ar)),onDblCard:ra,onContextCard:L3,onItemDragStart:G3,onItemDropInto:q3},null,8,["files","selected","clipped","show-parent-path","locale","loading"]))]),eo.value?(Q(),ae("div",uw,[...G[25]||(G[25]=[L("div",{class:"fe__dragover-card"},[L("span",{class:"fe-icon"},"⬆"),L("p",null,"Dosyaları buraya bırak")],-1)])])):rt("",!0),Bt(z7,{jobs:P.value,locale:M.value,onCancel:kM,onDismiss:SM},null,8,["jobs","locale"]),Bt(B7,{ops:Qe(c).ops.value,locale:M.value,onDismiss:G[8]||(G[8]=lt=>Qe(c).dismiss(lt))},null,8,["ops","locale"]),Bt(w7,{ref_key:"ctxRef",ref:D,locale:M.value,theme:e.config.theme||"auto",actions:QT.value,onSelect:tM},null,8,["locale","theme","actions"]),Bt(V7,{open:fe.value,locale:M.value,onClose:G[9]||(G[9]=lt=>fe.value=!1),onSubmit:oM},null,8,["open","locale"]),Bt(W7,{open:de.value,locale:M.value,"current-name":((Ae=ge.value)==null?void 0:Ae.basename)||"",onClose:G[10]||(G[10]=lt=>de.value=!1),onSubmit:lM},null,8,["open","locale","current-name"]),Bt(K7,{open:ie.value,locale:M.value,count:Qe(q).size.value,onClose:G[11]||(G[11]=lt=>ie.value=!1),onConfirm:sM},null,8,["open","locale","count"]),Bt(sy,{open:oe.value,locale:M.value,share:xe.value,onClose:hM,onSubmit:dM,onToast:me},null,8,["open","locale","share"]),Bt(ex,{open:se.value,locale:M.value,file:Ve.value,theme:e.config.theme||"auto","preview-url":lt=>Qe(i).previewUrl(lt),"download-url":lt=>Qe(i).downloadUrl(lt),"only-office-base":Ee.value,"only-office-config-endpoint":Be.value,"save-text-endpoint":Qe(i).endpoints.saveText||null,"open-mode":Ue.value,"auth-headers":()=>tl({"Content-Type":"application/json"}),"auth-credentials":Qe(i).credentialsMode(),"drawio-url":be.value,"pdf-worker-url":n.config.pdfWorkerUrl||null,"pdf-save-url":n.config.pdfSaveUrl||null,"viewer-base-url":n.config.viewerBaseUrl||null,onClose:G[12]||(G[12]=lt=>se.value=!1)},null,8,["open","locale","file","theme","preview-url","download-url","only-office-base","only-office-config-endpoint","save-text-endpoint","open-mode","auth-headers","auth-credentials","drawio-url","pdf-worker-url","pdf-save-url","viewer-base-url"]),Ne.value&&qe.value&&ye.value?(Q(),kr(px,{key:2,"convert-url":ye.value,"file-name":((Pe=qe.value)==null?void 0:Pe.basename)||((xt=qe.value)==null?void 0:xt.path)||"","fetch-bytes":()=>{var lt;return Qe(i).fetchArrayBuffer(((lt=qe.value)==null?void 0:lt.path)??"")},upload:lt=>Qe(i).uploadMultipart(We(p.value),[lt]).then(()=>{}),onClose:G[13]||(G[13]=lt=>Ne.value=!1),onDone:fM},null,8,["convert-url","file-name","fetch-bytes","upload"])):rt("",!0),it.value&&ct.value?(Q(),kr(tw,{key:3,api:Qe(i),path:ct.value.path,"is-dir":ct.value.type==="dir",size:typeof ct.value.size=="number"?ct.value.size:void 0,locale:M.value==="en"?"en":"tr",onClose:G[14]||(G[14]=lt=>it.value=!1)},null,8,["api","path","is-dir","size","locale"])):rt("",!0),Bt(po,{name:"fe-modal"},{default:Tr(()=>[ne.value?(Q(),ae("div",{key:0,class:Xt(["fe fe-modal__backdrop fe-recents__backdrop",{"fe--theme-light":e.config.theme==="light","fe--theme-dark":e.config.theme==="dark"}]),onClick:G[18]||(G[18]=lt=>ne.value=!1)},[L("div",{class:"fe-recents__panel",onClick:G[17]||(G[17]=vr(()=>{},["stop"]))},[L("div",cw,[L("strong",null,le(M.value==="en"?"Recently opened":"Son açılanlar"),1),L("button",{class:"fe-recents__close","aria-label":"Close",onClick:G[15]||(G[15]=lt=>ne.value=!1)},"×")]),Bt(P8,{"api-base":n.config.apiBase??"","auth-headers":()=>tl(),limit:20,"refresh-key":we.value,onOpen:Le,onError:G[16]||(G[16]=lt=>a("error",{message:lt,context:{op:"recents"}}))},null,8,["api-base","auth-headers","refresh-key"])])],2)):rt("",!0)]),_:1}),Bt(po,{name:"fe-modal"},{default:Tr(()=>[_e.value&&pe.value&&typeof pe.value.id=="number"?(Q(),ae("div",{key:0,class:"fe-modal__backdrop",onClick:G[22]||(G[22]=lt=>_e.value=!1)},[L("div",{class:"fe-modal__card fe-modal__card--md",onClick:G[21]||(G[21]=vr(()=>{},["stop"]))},[L("header",fw,[L("h2",dw,le(M.value==="en"?"Tags":"Etiketler")+" — "+le(pe.value.basename),1),L("button",{class:"fe-modal__close","aria-label":"Close",onClick:G[19]||(G[19]=lt=>_e.value=!1)},"×")]),L("div",hw,[Bt(A8,{"node-id":pe.value.id,"api-base":n.config.apiBase??"","auth-headers":()=>tl(),onError:G[20]||(G[20]=lt=>a("error",{message:lt,context:{op:"tags"}}))},null,8,["node-id","api-base","auth-headers"])])])])):rt("",!0)]),_:1}),L("input",{ref_key:"fileInputEl",ref:V,type:"file",multiple:"",class:"fe__file-input",onChange:vM},null,544),Bt(po,{name:"fe-toast"},{default:Tr(()=>[ze.value?(Q(),ae("div",pw,le(ze.value),1)):rt("",!0)]),_:1})],34)}}}),mw='.fx-presence[data-v-5c353c6c]{display:inline-flex;align-items:center;gap:.5rem;max-width:100%}.fx-presence-avatars[data-v-5c353c6c]{display:inline-flex;align-items:center}.fx-presence-avatar[data-v-5c353c6c]{position:relative;display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;margin-left:-.4rem;border-radius:9999px;border:2px solid var(--fx-presence-ring, #ffffff);color:#fff;font-size:.6rem;font-weight:600;line-height:1;-webkit-user-select:none;user-select:none}.fx-presence-avatar[data-v-5c353c6c]:first-child{margin-left:0}.fx-presence-dot[data-v-5c353c6c]{position:absolute;right:-1px;bottom:-1px;width:.5rem;height:.5rem;border-radius:9999px;background:#22c55e;border:1.5px solid var(--fx-presence-ring, #ffffff)}.fx-presence-more[data-v-5c353c6c]{margin-left:.15rem;font-size:.7rem;color:#71717a}.fx-presence-text[data-v-5c353c6c]{font-size:.75rem;color:#71717a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:14rem}.fx-presence-file[data-v-5c353c6c]{color:#52525b;font-weight:500}.dark{--fx-presence-ring: #18181b}.filex-tag-picker[data-v-7040583c]{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.filex-tag-picker.is-loading[data-v-7040583c]{opacity:.6;pointer-events:none}.filex-tag[data-v-7040583c]{display:inline-flex;align-items:center;gap:4px;border-radius:999px;padding:2px 10px;font-size:12px;font-weight:500;color:#fff;background:var(--filex-tag-color)}.filex-tag-x[data-v-7040583c]{background:transparent;border:none;color:#ffffffd9;cursor:pointer;padding:0 2px;font-size:14px;line-height:1}.filex-tag-x[data-v-7040583c]:hover{color:#fff}.filex-tag-add input[data-v-7040583c]{border:1px solid var(--filex-border, #d1d5db);border-radius:12px;padding:2px 10px;font-size:12px;width:110px}.filex-tag-add-btn[data-v-7040583c]{border:1px dashed var(--filex-border, #d1d5db);background:transparent;border-radius:999px;padding:2px 10px;font-size:12px;color:var(--filex-text-muted, #6b7280);cursor:pointer}.filex-tag-add-btn[data-v-7040583c]:hover{border-color:var(--filex-accent, #6366f1);color:var(--filex-accent, #6366f1)}.filex-recent[data-v-559f2c71]{background:var(--fe-bg-elev, var(--filex-bg-card, #ffffff));border:1px solid var(--fe-border, var(--filex-border, #e5e7eb));border-radius:8px;padding:12px;font-size:13px}.filex-recent header[data-v-559f2c71]{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.filex-recent h3[data-v-559f2c71]{margin:0;font-size:13px;font-weight:600;color:var(--fe-text, var(--filex-text, #111827))}.filex-recent-refresh[data-v-559f2c71]{background:transparent;border:none;color:var(--fe-text-muted, var(--filex-text-muted, #9ca3af));cursor:pointer;font-size:14px;padding:2px 6px}.filex-recent ul[data-v-559f2c71]{list-style:none;margin:0;padding:0}.filex-recent-item[data-v-559f2c71]{display:flex;justify-content:space-between;align-items:center;width:100%;background:transparent;border:none;padding:6px 8px;cursor:pointer;border-radius:4px;text-align:left}.filex-recent-item[data-v-559f2c71]:hover{background:var(--fe-bg-hover, var(--filex-bg-soft, #f3f4f6))}.filex-recent-name[data-v-559f2c71]{color:var(--fe-text, var(--filex-text, #111827));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.filex-recent-meta[data-v-559f2c71]{color:var(--fe-text-muted, var(--filex-text-muted, #9ca3af));font-size:11px;margin-left:8px;flex-shrink:0}.filex-recent-empty[data-v-559f2c71]{color:var(--fe-text-muted, var(--filex-text-muted, #9ca3af));margin:4px 0 0}.filex-star-btn[data-v-12a2f9c5]{display:inline-flex;align-items:center;gap:6px;background:transparent;border:1px solid transparent;border-radius:6px;padding:4px 8px;color:var(--filex-text-muted, #9ca3af);cursor:pointer;transition:color .12s,background .12s}.filex-star-btn[data-v-12a2f9c5]:hover{color:var(--filex-accent-amber, #f59e0b);background:var(--filex-bg-soft, rgba(0, 0, 0, .04))}.filex-star-btn.is-starred[data-v-12a2f9c5]{color:var(--filex-accent-amber, #f59e0b)}.filex-star-btn.is-compact[data-v-12a2f9c5]{padding:4px}.filex-star-label[data-v-12a2f9c5]{font-size:13px}.fe-preview__code-editor.is-hidden{display:none}.fe-preview__viewer{width:100%;height:100%;min-height:70vh;display:flex;flex-direction:column}.fe-preview .fe-preview__viewer{align-self:stretch}.fe-preview__md-mermaid{display:flex;justify-content:center;margin:16px 0}.fe-preview__md-mermaid svg{max-width:100%;height:auto}.fe-preview__md-math{margin:16px 0;text-align:center;overflow-x:auto}.filex-cv__bg[data-v-4363f1ac]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;background:#0000008c;display:flex;align-items:center;justify-content:center}.filex-cv[data-v-4363f1ac]{width:min(560px,92vw);max-height:80vh;overflow:hidden;display:flex;flex-direction:column;background:var(--fe-bg, #fff);color:var(--fe-text, #1a1f29);border:1px solid var(--fe-border, #e2e6ed);border-radius:12px;box-shadow:0 20px 60px #00000059}.filex-cv__head[data-v-4363f1ac]{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid var(--fe-border, #e2e6ed)}.filex-cv__head h3[data-v-4363f1ac]{margin:0;font-size:14px;font-weight:600}.filex-cv__x[data-v-4363f1ac]{border:0;background:none;cursor:pointer;font-size:16px;color:var(--fe-text-muted, #5a6475)}.filex-cv__msg[data-v-4363f1ac]{padding:28px;text-align:center;color:var(--fe-text-muted, #5a6475)}.filex-cv__ok[data-v-4363f1ac]{color:#059669}.filex-cv__src[data-v-4363f1ac]{padding:12px 16px 0;font-size:13px;color:var(--fe-text-muted, #5a6475)}.filex-cv__search[data-v-4363f1ac]{margin:8px 16px;padding:8px 10px;border:1px solid var(--fe-border, #e2e6ed);border-radius:8px;background:var(--fe-bg-elev, #f7f8fa);color:inherit;font-size:13px}.filex-cv__list[data-v-4363f1ac]{flex:1;overflow-y:auto;padding:4px 12px 12px;display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:8px}.filex-cv__fmt[data-v-4363f1ac]{display:flex;flex-direction:column;gap:2px;align-items:flex-start;padding:8px 10px;cursor:pointer;text-align:left;border:1px solid var(--fe-border, #e2e6ed);border-radius:8px;background:var(--fe-bg-elev, #f7f8fa);color:inherit}.filex-cv__fmt small[data-v-4363f1ac]{color:var(--fe-text-muted, #5a6475);font-size:11px}.filex-cv__fmt.is-sel[data-v-4363f1ac]{border-color:#44c878;background:#44c8781f}.filex-cv__empty[data-v-4363f1ac]{grid-column:1 / -1;text-align:center;color:var(--fe-text-muted, #5a6475);padding:16px}.filex-cv__err[data-v-4363f1ac]{padding:0 16px;color:var(--fe-danger, #dc2626);font-size:13px}.filex-cv__foot[data-v-4363f1ac]{padding:12px 16px;border-top:1px solid var(--fe-border, #e2e6ed);text-align:right}.filex-cv__convert[data-v-4363f1ac]{padding:8px 18px;border:0;border-radius:8px;cursor:pointer;background:#44c878;color:#03200f;font-weight:600;font-size:13px}.filex-cv__convert[data-v-4363f1ac]:disabled{opacity:.5;cursor:default}.filex-cv__frame[data-v-4363f1ac]{position:absolute;width:0;height:0;border:0;left:-9999px}.fx-perm-overlay[data-v-23e7820c]{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:10000;font-family:var(--fe-font)}.fx-perm-modal[data-v-23e7820c]{display:flex;flex-direction:column;background:var(--fe-bg);color:var(--fe-text);width:min(520px,94vw);max-height:86vh;border:1px solid var(--fe-border);border-radius:var(--fe-radius-lg, 14px);box-shadow:var(--fe-shadow);font-size:14px;overflow:hidden}.fx-perm-head[data-v-23e7820c]{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:16px 18px 12px;flex:none}.fx-perm-title[data-v-23e7820c]{display:flex;align-items:center;gap:10px;min-width:0}.fx-perm-ico[data-v-23e7820c]{font-size:22px;line-height:1}.fx-perm-titletext[data-v-23e7820c]{display:flex;flex-direction:column;min-width:0}.fx-perm-title h3[data-v-23e7820c]{margin:0;font-size:15px;font-weight:600;color:var(--fe-text)}.fx-perm-sub[data-v-23e7820c]{font-size:12px;color:var(--fe-text);max-width:340px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fx-perm-subdim[data-v-23e7820c]{color:var(--fe-text-muted)}.fx-perm-x[data-v-23e7820c]{background:none;border:none;font-size:17px;cursor:pointer;color:var(--fe-text-muted);flex:none;line-height:1;padding:2px 4px;border-radius:6px}.fx-perm-x[data-v-23e7820c]:hover{color:var(--fe-text);background:var(--fe-bg-hover)}.fx-perm-tabs[data-v-23e7820c]{display:flex;gap:2px;padding:0 18px;border-bottom:1px solid var(--fe-border);flex:none}.fx-perm-tab[data-v-23e7820c]{background:none;border:none;border-bottom:2px solid transparent;padding:8px 12px;cursor:pointer;color:var(--fe-text-muted);font-size:13px;font-family:inherit;font-weight:500}.fx-perm-tab[data-v-23e7820c]:hover{color:var(--fe-text)}.fx-perm-tab.is-active[data-v-23e7820c]{color:var(--fe-primary);border-bottom-color:var(--fe-primary)}.fx-perm-body[data-v-23e7820c]{flex:1 1 auto;overflow-y:auto;padding:14px 18px 18px}.fx-perm-addcard[data-v-23e7820c]{padding:12px;border-radius:var(--fe-radius-md, 10px);background:var(--fe-bg-elev);border:1px solid var(--fe-border)}.fx-perm-section[data-v-23e7820c]{margin-top:16px}.fx-perm-section h4[data-v-23e7820c]{margin:0 0 8px;font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--fe-text-muted)}.fx-perm-empty[data-v-23e7820c]{color:var(--fe-text-muted);font-size:13px;padding:8px 2px}.fx-perm-person[data-v-23e7820c]{display:flex;align-items:center;gap:10px;padding:7px 2px}.fx-perm-person+.fx-perm-person[data-v-23e7820c]{border-top:1px solid var(--fe-border)}.fx-perm-inh[data-v-23e7820c]{color:var(--fe-text-muted)}.fx-perm-av[data-v-23e7820c]{width:28px;height:28px;flex:none;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--fe-primary);color:var(--fe-text-on-primary, #fff);font-size:12px;font-weight:600}.fx-perm-av--dim[data-v-23e7820c]{background:var(--fe-bg-hover);color:var(--fe-text-muted)}.fx-perm-user[data-v-23e7820c]{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--fe-text);min-width:0}.fx-perm-from[data-v-23e7820c]{font-size:11px;color:var(--fe-text-muted);white-space:nowrap}.fx-perm-badge[data-v-23e7820c]{font-size:11px;padding:2px 9px;border-radius:999px;background:var(--fe-bg-hover);color:var(--fe-text)}.fx-perm-sel[data-v-23e7820c],.fx-perm-input[data-v-23e7820c]{padding:7px 9px;border-radius:var(--fe-radius-sm, 7px);border:1px solid var(--fe-border);background:var(--fe-bg);color:var(--fe-text);font-size:13px;font-family:inherit}.fx-perm-sel--sm[data-v-23e7820c]{padding:5px 7px;font-size:12px}.fx-perm-sel[data-v-23e7820c]:focus,.fx-perm-input[data-v-23e7820c]:focus{outline:none;border-color:var(--fe-primary)}.fx-perm-add[data-v-23e7820c]{display:flex;gap:8px;align-items:stretch}.fx-perm-emailwrap[data-v-23e7820c]{position:relative;flex:1;min-width:120px}.fx-perm-input[data-v-23e7820c]{width:100%;box-sizing:border-box}.fx-perm-suggest[data-v-23e7820c]{position:absolute;top:calc(100% + 3px);left:0;right:0;z-index:5;margin:0;padding:4px;list-style:none;background:var(--fe-bg);border:1px solid var(--fe-border);border-radius:var(--fe-radius-sm, 7px);box-shadow:var(--fe-shadow);max-height:210px;overflow:auto}.fx-perm-suggest li[data-v-23e7820c]{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:6px;cursor:pointer}.fx-perm-suggest li[data-v-23e7820c]:hover{background:var(--fe-bg-hover)}.fx-perm-suggest-av[data-v-23e7820c]{width:24px;height:24px;flex:none;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--fe-bg-hover);color:var(--fe-text);font-size:11px;font-weight:600}.fx-perm-suggest-txt[data-v-23e7820c]{display:flex;flex-direction:column;min-width:0}.fx-perm-suggest-name[data-v-23e7820c]{color:var(--fe-text);font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fx-perm-suggest-meta[data-v-23e7820c]{color:var(--fe-text-muted);font-size:11px}.fx-perm-check[data-v-23e7820c]{display:inline-flex;gap:6px;align-items:center;font-size:13px;color:var(--fe-text);cursor:pointer}.fx-perm-btn[data-v-23e7820c]{padding:7px 13px;border-radius:var(--fe-radius-sm, 7px);border:1px solid var(--fe-border);background:var(--fe-bg);color:var(--fe-text);font-size:13px;font-family:inherit;cursor:pointer;white-space:nowrap}.fx-perm-btn[data-v-23e7820c]:hover:not(:disabled){background:var(--fe-bg-hover)}.fx-perm-btn[data-v-23e7820c]:disabled{opacity:.55;cursor:default}.fx-perm-btn--sm[data-v-23e7820c]{padding:5px 10px;font-size:12px}.fx-perm-btn--primary[data-v-23e7820c]{background:var(--fe-primary);border-color:var(--fe-primary);color:var(--fe-text-on-primary, #fff)}.fx-perm-btn--primary[data-v-23e7820c]:hover:not(:disabled){background:var(--fe-primary-hover, var(--fe-primary));filter:brightness(1.05)}.fx-perm-btn--ghost[data-v-23e7820c]{background:none;border-color:transparent;color:var(--fe-primary);padding-left:2px}.fx-perm-btn--ghost[data-v-23e7820c]:hover:not(:disabled){background:none;text-decoration:underline}.fx-perm-del[data-v-23e7820c]{background:none;border:none;color:var(--fe-danger);cursor:pointer;font-size:14px;flex:none;padding:2px 4px}.fx-perm-del[data-v-23e7820c]:hover:not(:disabled){filter:brightness(1.15)}.fx-perm-invite[data-v-23e7820c]{margin-top:10px;padding-top:10px;border-top:1px dashed var(--fe-border)}.fx-perm-invite-actions[data-v-23e7820c]{display:flex;flex-direction:column;gap:8px;margin-top:6px}.fx-perm-invite-row[data-v-23e7820c]{display:flex;gap:8px;align-items:stretch}.fx-perm-invite-row .fx-perm-btn--primary[data-v-23e7820c]{flex:1}.fx-perm-share-opts[data-v-23e7820c]{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.fx-perm-expiry[data-v-23e7820c]{display:inline-flex;gap:6px;align-items:center;font-size:13px}.fx-perm-share-opts .fx-perm-btn--primary[data-v-23e7820c]{margin-left:auto}.fx-perm-result[data-v-23e7820c]{margin-top:12px;padding-top:12px;border-top:1px solid var(--fe-border)}.fx-perm-linkrow[data-v-23e7820c]{display:flex;gap:8px;align-items:center}.fx-perm-link[data-v-23e7820c]{color:var(--fe-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;text-decoration:none}.fx-perm-link[data-v-23e7820c]:hover{text-decoration:underline}.fx-perm-pin[data-v-23e7820c]{margin:8px 0 0;font-size:13px;color:var(--fe-text);display:flex;align-items:center;gap:8px}.fx-perm-pin code[data-v-23e7820c],.fx-perm-reveal code[data-v-23e7820c]{font-family:var(--fe-font-mono, monospace);background:var(--fe-bg-hover);padding:1px 6px;border-radius:5px}.fx-perm-mailrow[data-v-23e7820c]{display:flex;gap:8px;margin-top:10px}.fx-perm-mailrow .fx-perm-input[data-v-23e7820c]{flex:1}.fx-perm-hint[data-v-23e7820c]{font-size:13px;color:var(--fe-text-muted);margin:10px 0 0}.fx-perm-sharebtn[data-v-23e7820c]{display:flex;width:100%;align-items:center;justify-content:center;gap:6px;margin-top:8px}.fx-perm-dropintro[data-v-23e7820c]{margin:0 0 12px;line-height:1.4}.fx-perm-advtoggle[data-v-23e7820c]{margin-top:10px;padding-left:2px}.fx-perm-adv[data-v-23e7820c]{margin-top:8px;padding-top:10px;border-top:1px dashed var(--fe-border);display:flex;flex-direction:column;gap:8px}.fx-perm-adv-row[data-v-23e7820c]{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px}.fx-perm-input--sm[data-v-23e7820c]{width:130px;padding:5px 8px;font-size:12px}.fx-perm-warn[data-v-23e7820c]{background:#f59e0b24;border:1px solid rgba(245,158,11,.4);border-radius:var(--fe-radius-sm, 7px);padding:8px 10px;font-size:13px;margin-bottom:10px;color:var(--fe-text)}.fx-perm-notice[data-v-23e7820c]{margin-top:8px;font-size:13px;color:var(--fe-text-muted)}.fx-perm-reveal[data-v-23e7820c]{margin-top:8px;font-size:13px;word-break:break-all;color:var(--fe-text)}.fx-perm-muted[data-v-23e7820c]{color:var(--fe-text-muted);font-size:13px}:root{--fe-bg: #ffffff;--fe-bg-elev: #f7f8fa;--fe-bg-hover: #edf0f5;--fe-bg-selected: #dfe8ff;--fe-border: #e2e6ed;--fe-border-strong: #c7ced9;--fe-text: #1a1e27;--fe-text-muted: #5a6475;--fe-text-on-primary: #ffffff;--fe-primary: #3b82f6;--fe-primary-hover: #2563eb;--fe-danger: #dc2626;--fe-danger-hover: #b91c1c;--fe-shadow: 0 10px 32px rgba(15, 23, 42, .14);--fe-shadow-sm: 0 2px 6px rgba(15, 23, 42, .08);--fe-radius: 8px;--fe-radius-sm: 4px;--fe-radius-lg: 12px;--fe-font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;--fe-font-mono: ui-monospace, "SF Mono", Consolas, Menlo, monospace;--fe-gap: 12px}.fe--theme-dark,:root[data-theme=dark] .fe,.fe.fe--theme-dark,:root.dark,.dark,:root.dark .fe,.dark .fe,.fe-ctx-backdrop--theme-dark,.fe-ctx-backdrop--theme-auto[data-prefers-dark="1"]{--fe-bg: #0f1419;--fe-bg-elev: #161c25;--fe-bg-hover: #1f2733;--fe-bg-selected: #23324a;--fe-border: #2a323e;--fe-border-strong: #3a4453;--fe-text: #e5e9f0;--fe-text-muted: #8b95a7;--fe-primary: #60a5fa;--fe-primary-hover: #3b82f6;--fe-danger: #f87171;--fe-danger-hover: #ef4444;--fe-shadow: 0 12px 32px rgba(0, 0, 0, .45);--fe-shadow-sm: 0 2px 6px rgba(0, 0, 0, .25)}@media (prefers-color-scheme: dark){.fe:not(.fe--theme-light),.fe-ctx-backdrop--theme-auto:not(.fe-ctx-backdrop--theme-light){--fe-bg: #0f1419;--fe-bg-elev: #161c25;--fe-bg-hover: #1f2733;--fe-bg-selected: #23324a;--fe-border: #2a323e;--fe-border-strong: #3a4453;--fe-text: #e5e9f0;--fe-text-muted: #8b95a7;--fe-primary: #60a5fa;--fe-primary-hover: #3b82f6;--fe-danger: #f87171;--fe-danger-hover: #ef4444;--fe-shadow: 0 12px 32px rgba(0, 0, 0, .45);--fe-shadow-sm: 0 2px 6px rgba(0, 0, 0, .25)}}.fe{position:relative;display:flex;flex-direction:column;min-height:420px;height:100%;background:var(--fe-bg);color:var(--fe-text);font-family:var(--fe-font);font-size:14px;border:1px solid var(--fe-border);border-radius:var(--fe-radius);overflow:hidden;outline:none}.fe *{box-sizing:border-box}.fe__body{flex:1 1 auto;overflow:auto;background:var(--fe-bg)}.fe__presence{flex:0 0 auto;padding:.25rem .75rem;border-bottom:1px solid var(--fe-border, rgba(0, 0, 0, .06))}.fe__loading{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;min-height:240px;height:100%;color:var(--fe-text-muted)}.fe__spinner{width:34px;height:34px;border-radius:50%;border:3px solid color-mix(in srgb,var(--fe-text-muted) 30%,transparent);border-top-color:var(--fe-primary);animation:fe-spin .7s linear infinite}.fe__loading-text{margin:0;font-size:13px}@keyframes fe-spin{to{transform:rotate(360deg)}}.fe__notfound{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:240px;height:100%;color:var(--fe-text-muted);text-align:center;padding:24px}.fe__notfound-icon{font-size:40px;filter:grayscale(1);opacity:.6}.fe__notfound-title{margin:4px 0 0;font-size:15px;font-weight:600;color:var(--fe-text)}.fe__notfound-path{margin:0;font-size:12px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;word-break:break-all;max-width:480px}.fe__notfound-desc{margin:0 0 10px;font-size:13px}.fe__file-input{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}.fe-btn{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;background:var(--fe-bg-elev);border:1px solid var(--fe-border);border-radius:var(--fe-radius-sm);color:var(--fe-text);font:inherit;cursor:pointer;transition:background .12s,border-color .12s;white-space:nowrap}.fe-btn:hover:not(:disabled){background:var(--fe-bg-hover);border-color:var(--fe-border-strong)}.fe-btn:disabled{opacity:.5;cursor:not-allowed}.fe-btn--primary{background:var(--fe-primary);border-color:var(--fe-primary);color:var(--fe-text-on-primary)}.fe-btn--primary:hover:not(:disabled){background:var(--fe-primary-hover);border-color:var(--fe-primary-hover)}.fe-btn--danger{background:var(--fe-danger);border-color:var(--fe-danger);color:var(--fe-text-on-primary)}.fe-btn--danger:hover:not(:disabled){background:var(--fe-danger-hover);border-color:var(--fe-danger-hover)}.fe-btn--icon-only{padding:6px 8px}.fe-btn.is-active{background:var(--fe-bg-selected);border-color:var(--fe-primary)}.fe-btn__label{line-height:1}.fe-icon{font-size:1.05em;line-height:1}.fe-toolbar{display:flex;align-items:center;gap:8px;padding:10px 12px;background:var(--fe-bg-elev);border-bottom:1px solid var(--fe-border);flex-wrap:wrap}.fe-toolbar__primary{display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap}.fe-toolbar__spacer{flex:1 1 auto}.fe-toolbar__search-group{display:inline-flex;align-items:center;gap:4px;background:var(--fe-bg);border:1px solid var(--fe-border);border-radius:var(--fe-radius-sm);padding:2px}.fe-toolbar__search-group .fe-search__input{border:0;background:transparent;padding:4px 8px}.fe-toolbar__search-group .fe-btn{border:0;background:transparent;padding:4px 6px}.fe-toolbar__search-group .fe-btn:hover:not(:disabled){background:var(--fe-bg-hover)}.fe-toolbar__view{display:inline-flex;gap:2px;padding:2px;background:var(--fe-bg);border:1px solid var(--fe-border);border-radius:var(--fe-radius-sm)}.fe-toolbar__view .fe-btn{border:0;background:transparent}.fe-toolbar__view .fe-btn.is-active{background:var(--fe-bg-selected)}.fe-search{position:relative}.fe-search__input{background:var(--fe-bg);border:1px solid var(--fe-border);border-radius:var(--fe-radius-sm);padding:6px 10px;font:inherit;color:var(--fe-text);min-width:200px}.fe-search__input:focus-visible{outline:2px solid var(--fe-primary);outline-offset:1px}.fe-breadcrumb{display:flex;align-items:center;gap:4px;flex-wrap:wrap;padding:6px 12px;background:var(--fe-bg);border-bottom:1px solid var(--fe-border);font-size:13px;color:var(--fe-text-muted)}.fe-breadcrumb__crumb{display:inline-flex;align-items:center;gap:4px;background:transparent;border:0;color:inherit;padding:2px 6px;border-radius:var(--fe-radius-sm);cursor:pointer;font:inherit}.fe-breadcrumb__crumb:hover{background:var(--fe-bg-hover);color:var(--fe-text)}.fe-breadcrumb__crumb.is-last{color:var(--fe-text);font-weight:600}.fe-breadcrumb__sep{color:var(--fe-text-muted)}.fe-breadcrumb__edit{margin-left:auto;background:none;border:1px solid transparent;color:var(--fe-text-muted);cursor:pointer;font-size:14px;line-height:1;padding:4px 8px;border-radius:4px}.fe-breadcrumb__edit:hover{background:var(--fe-bg-hover);color:var(--fe-text);border-color:var(--fe-border)}.fe-breadcrumb__input{flex:1;background:var(--fe-bg);color:var(--fe-text);border:1px solid var(--fe-accent, #2563eb);border-radius:4px;padding:4px 8px;font-family:var(--fe-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);font-size:13px;outline:none}.fe-list{display:flex;flex-direction:column}.fe-list__head{display:grid;grid-template-columns:32px minmax(0,1fr) 120px 180px;gap:8px;padding:8px 12px;font-weight:600;color:var(--fe-text-muted);font-size:12px;text-transform:uppercase;letter-spacing:.04em;background:var(--fe-bg-elev);border-bottom:1px solid var(--fe-border)}.fe-list__body{display:flex;flex-direction:column}.fe-list__row{display:grid;grid-template-columns:32px minmax(0,1fr) 120px 180px;gap:8px;padding:8px 12px;align-items:center;cursor:pointer;border-bottom:1px solid var(--fe-border);transition:background .08s;-webkit-user-select:none;user-select:none}.fe-list__row:hover{background:var(--fe-bg-hover)}.fe-list__row.is-selected{background:var(--fe-bg-selected)}.fe-list__row.is-trash{opacity:.7}.fe-list__row.is-clipped,.fe-grid__card.is-clipped{opacity:.45;font-style:italic}.fe-list__row:focus-visible{outline:2px solid var(--fe-primary);outline-offset:-2px}.fe-list__col--star{display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .12s}.fe-list__row:hover .fe-list__col--star,.fe-list__row:focus-within .fe-list__col--star,.fe-list__col--star:has(.is-starred){opacity:1}.fe-list__col--star .filex-star-btn.is-starred{color:var(--fe-warning, #f59e0b)}.fe-list__col--name{display:flex;align-items:center;gap:8px;min-width:0}.fe-list__icon{flex-shrink:0;font-size:16px}.fe-list__name-wrap{display:flex;flex-direction:column;min-width:0;flex:1 1 auto}.fe-list__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fe-list__parent{font-size:11px;color:var(--fe-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:2px}.fe-list__col--size,.fe-list__col--mod{color:var(--fe-text-muted);font-size:13px}.fe-list__empty{padding:40px 20px;text-align:center;color:var(--fe-text-muted)}.fe-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:var(--fe-gap);padding:var(--fe-gap)}.fe-grid__card{display:flex;flex-direction:column;align-items:stretch;padding:8px;border:1px solid var(--fe-border);border-radius:var(--fe-radius);background:var(--fe-bg-elev);cursor:pointer;transition:background .08s,border-color .08s;-webkit-user-select:none;user-select:none}.fe-grid__card:hover{background:var(--fe-bg-hover);border-color:var(--fe-border-strong)}.fe-grid__card.is-selected{background:var(--fe-bg-selected);border-color:var(--fe-primary)}.fe-grid__card.is-trash{opacity:.7}.fe-grid__thumb{display:flex;align-items:center;justify-content:center;aspect-ratio:1 / 1;background:var(--fe-bg);border-radius:var(--fe-radius-sm);margin-bottom:8px;overflow:hidden}.fe-grid__thumb img{width:100%;height:100%;object-fit:cover}.fe-grid__icon{font-size:32px}.fe-grid__label{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fe-grid__meta{font-size:11px;color:var(--fe-text-muted);margin-top:2px}.fe-grid__parent{font-size:11px;color:var(--fe-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:2px;font-style:italic}.fe-grid__empty{grid-column:1 / -1;padding:40px 20px;text-align:center;color:var(--fe-text-muted)}.fe__dragover{position:absolute;top:0;right:0;bottom:0;left:0;z-index:30;display:flex;align-items:center;justify-content:center;background:#3b82f61f;border:3px dashed var(--fe-primary);pointer-events:none}.fe__dragover-card{background:var(--fe-bg);border-radius:var(--fe-radius-lg);padding:24px 40px;box-shadow:var(--fe-shadow);text-align:center}.fe__dragover-card .fe-icon{font-size:32px;display:block;margin-bottom:8px}.fe-upload{position:absolute;right:16px;bottom:16px;width:min(360px,calc(100% - 32px));background:var(--fe-bg);border:1px solid var(--fe-border);border-radius:var(--fe-radius);box-shadow:var(--fe-shadow);z-index:40;max-height:40vh;display:flex;flex-direction:column;overflow:hidden}.fe-upload__header{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;background:var(--fe-bg-elev);border-bottom:1px solid var(--fe-border);font-size:13px}.fe-upload__count{background:var(--fe-primary);color:var(--fe-text-on-primary);font-size:12px;padding:1px 7px;border-radius:999px}.fe-upload__list{list-style:none;padding:0;margin:0;overflow:auto}.fe-upload__item{padding:10px 14px;border-bottom:1px solid var(--fe-border)}.fe-upload__item:last-child{border-bottom:0}.fe-upload__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;margin-bottom:4px}.fe-upload__bar{background:var(--fe-bg-elev);border-radius:99px;height:6px;overflow:hidden;margin-bottom:4px}.fe-upload__bar-fill{background:var(--fe-primary);height:100%;transition:width .2s}.fe-upload__item.is-error .fe-upload__bar-fill,.fe-upload__item.is-aborted .fe-upload__bar-fill{background:var(--fe-danger)}.fe-upload__item.is-done .fe-upload__bar-fill{background:#16a34a}.fe-upload__meta{display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:11px;color:var(--fe-text-muted)}.fe-upload__cancel{background:transparent;border:0;color:var(--fe-primary);cursor:pointer;font:inherit}.fe-upload-slide-enter-active,.fe-upload-slide-leave-active{transition:transform .2s,opacity .2s}.fe-upload-slide-enter-from,.fe-upload-slide-leave-to{opacity:0;transform:translateY(10px)}.fe-ops{position:absolute;left:16px;bottom:16px;width:min(320px,calc(100% - 32px));display:flex;flex-direction:column;gap:8px;z-index:40}.fe-ops__item{background:var(--fe-bg);border:1px solid var(--fe-border);border-radius:var(--fe-radius);box-shadow:var(--fe-shadow);padding:10px 14px;font-size:13px}.fe-ops__item.is-done{border-color:#16a34a}.fe-ops__item.is-error{border-color:var(--fe-danger)}.fe-ops__row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px}.fe-ops__title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 1 auto}.fe-ops__dismiss{background:transparent;border:0;color:var(--fe-text-muted);cursor:pointer;font-size:18px;line-height:1;padding:0 4px}.fe-ops__bar{background:var(--fe-bg-elev);border-radius:99px;height:6px;overflow:hidden}.fe-ops__bar-fill{background:var(--fe-primary);height:100%;transition:width .25s}.fe-ops__item.is-done .fe-ops__bar-fill{background:#16a34a}.fe-ops__item.is-error .fe-ops__bar-fill{background:var(--fe-danger)}.fe-ops__error{margin-top:6px;font-size:11px;color:var(--fe-danger)}.fe-ops-slide-enter-active,.fe-ops-slide-leave-active{transition:transform .2s,opacity .2s}.fe-ops-slide-enter-from,.fe-ops-slide-leave-to{opacity:0;transform:translateY(10px)}.fe-ctx-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:80;color:var(--fe-text);font-family:var(--fe-font);font-size:14px}.fe-ctx{position:absolute;min-width:180px;background:var(--fe-bg);border:1px solid var(--fe-border);border-radius:var(--fe-radius);box-shadow:var(--fe-shadow);padding:4px;z-index:90;color:var(--fe-text)}.fe-ctx__item{display:flex;align-items:center;gap:8px;padding:6px 10px;border-radius:var(--fe-radius-sm);border:0;background:transparent;color:var(--fe-text);font:inherit;width:100%;text-align:left;cursor:pointer}.fe-ctx__item:hover:not(.is-disabled){background:var(--fe-bg-hover)}.fe-ctx__item.is-danger{color:var(--fe-danger)}.fe-ctx__item.is-disabled{opacity:.45;cursor:not-allowed}.fe-ctx__icon{width:1.2em;text-align:center}.fe-ctx__sep{height:1px;background:var(--fe-border);margin:4px 0}.fe-ctx-enter-active,.fe-ctx-leave-active{transition:opacity .1s}.fe-ctx-enter-from,.fe-ctx-leave-to{opacity:0}.fe-modal__backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:70;display:flex;align-items:center;justify-content:center;background:#0d131b7a;padding:16px}.fe-modal__card{background:var(--fe-bg);border-radius:var(--fe-radius);box-shadow:var(--fe-shadow);width:100%;max-height:calc(100vh - 32px);display:flex;flex-direction:column;overflow:hidden}.fe-modal__card--sm{max-width:420px}.fe-modal__card--md{max-width:560px}.fe-modal__card--lg{max-width:800px}.fe-modal__card--xl{max-width:1080px;height:calc(100vh - 64px)}.fe-recents__backdrop{align-items:flex-start!important;padding-top:60px}.fe-recents__panel{background:var(--fe-bg, #fff);border-radius:var(--fe-radius, 8px);box-shadow:var(--fe-shadow, 0 6px 24px rgba(0, 0, 0, .18));width:min(480px,calc(100vw - 32px));max-height:calc(100vh - 96px);display:flex;flex-direction:column;overflow:hidden}.fe-recents__header{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:1px solid var(--fe-border, #e2e6ed)}.fe-recents__close{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;font-size:22px;line-height:1;cursor:pointer;color:var(--fe-text-muted, #6b7280);padding:0 4px}.fe-recents__close:hover{color:var(--fe-text, #111)}.fe-preview__md-split{display:flex;flex-direction:column;height:100%;width:100%;min-height:0}.fe-preview__md-split-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 14px;background:var(--fe-bg-elev, #f6f7f9);border-bottom:1px solid var(--fe-border, #e2e6ed);flex:0 0 auto}.fe-preview__md-split-label{font-family:var(--fe-font-mono, ui-monospace, monospace);font-size:11px;letter-spacing:.06em;color:var(--fe-text-muted, #6b7280)}.fe-preview__md-split-error{flex:1 1 auto;font-size:12px;color:var(--fe-danger, #dc2626);text-align:center}.fe-preview__md-split-body{flex:1 1 auto;display:grid;grid-template-columns:1fr 1fr;min-height:0}.fe-preview__md-split-input{resize:none;border:0;outline:0;padding:16px 20px;font-family:var(--fe-font-mono, ui-monospace, monospace);font-size:13px;line-height:1.6;background:var(--fe-bg, #fff);color:var(--fe-text, #111);border-right:1px solid var(--fe-border, #e2e6ed);overflow:auto;-moz-tab-size:2;tab-size:2}.fe-preview__md-split-output{overflow:auto;padding:16px 24px;background:var(--fe-bg, #fff)}.fe-preview__md-split-output.fe-preview__md{max-height:none;min-height:0;height:100%}@media (max-width: 900px){.fe-preview__md-split-body{grid-template-columns:1fr;grid-template-rows:1fr 1fr}.fe-preview__md-split-input{border-right:0;border-bottom:1px solid var(--fe-border, #e2e6ed)}}.fe-modal__backdrop--chromeless{background:transparent;padding:0}.fe-modal__card--chromeless{max-width:none;width:100vw;height:100vh;max-height:100vh;border-radius:0;box-shadow:none}.fe-modal__card--chromeless .fe-modal__body{flex:1 1 auto;min-height:0;padding:0}.fe-modal__card--chromeless .fe-preview{align-items:stretch;justify-content:stretch;min-height:0;flex:1 1 auto}.fe-modal__card--chromeless .fe-preview>*{width:100%;height:100%}.fe-modal__head{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid var(--fe-border)}.fe-modal__title{font-size:16px;font-weight:600;margin:0}.fe-modal__close{background:transparent;border:0;color:var(--fe-text-muted);font-size:22px;cursor:pointer;padding:0 4px;line-height:1}.fe-modal__body{padding:16px;overflow:auto;flex:1 1 auto}.fe-modal__actions{display:flex;justify-content:flex-end;gap:8px;padding:12px 16px;border-top:1px solid var(--fe-border);background:var(--fe-bg-elev)}.fe-modal-enter-active,.fe-modal-leave-active{transition:opacity .15s}.fe-modal-enter-from,.fe-modal-leave-to{opacity:0}.fe-input{width:100%;padding:8px 10px;background:var(--fe-bg);border:1px solid var(--fe-border);border-radius:var(--fe-radius-sm);font:inherit;color:var(--fe-text)}.fe-input:focus-visible{outline:2px solid var(--fe-primary);outline-offset:1px}.fe-input--mono{font-family:var(--fe-font-mono);letter-spacing:.1em}.fe-form{display:flex;flex-direction:column;gap:12px}.fe-form__row{display:flex;align-items:center;gap:8px}.fe-form__row--stack{flex-direction:column;align-items:stretch}.fe-form__error{color:var(--fe-danger);font-size:12px;margin:6px 0 0}.fe-share-result{display:flex;flex-direction:column;gap:12px}.fe-share-result__row label{display:block;font-size:12px;font-weight:600;color:var(--fe-text-muted);margin-bottom:4px}.fe-share-result__copy{display:flex;gap:6px}.fe-preview{display:flex;align-items:center;justify-content:center;width:100%;height:100%;min-height:50vh;background:var(--fe-bg-elev)}.fe-preview__image{max-width:100%;max-height:70vh;object-fit:contain}.fe-preview__video,.fe-preview__audio{max-width:100%;max-height:70vh}.fe-preview__iframe{width:100%;height:70vh;border:0;background:#fff}.fe-preview__office{width:100%;height:78vh;background:var(--fe-bg)}.fe-preview__code-wrap{display:flex;flex-direction:column;width:100%;height:78vh}.fe-preview__code-toolbar{display:flex;align-items:center;gap:12px;padding:8px 12px;background:var(--fe-bg-hover, #f3f4f6);border-bottom:1px solid var(--fe-border, #e5e7eb);font-size:12px}.fe-preview__code-lang{font-family:var(--fe-font-mono, ui-monospace, monospace);color:var(--fe-text-muted);text-transform:uppercase;letter-spacing:.04em}.fe-preview__code-toolbar>.fe-btn{margin-left:auto}.fe-preview__code-status{font-size:12px;font-weight:500}.fe-preview__code-status--ok{color:#059669}.fe-preview__code-status--err{color:#dc2626;cursor:help}.fe-preview__code-editor{flex:1;min-height:0;overflow:hidden}.fe-preview__code-editor .cm-editor{height:100%;font-size:13px}.fe-preview__code-editor .cm-scroller{font-family:var(--fe-font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace)}.fe-preview__fallback{text-align:center;color:var(--fe-text-muted);padding:40px 20px}.fe-preview__fallback-icon{font-size:48px;display:block;margin-bottom:12px}.fe-preview__pre{margin:0;padding:16px;width:100%;max-height:70vh;overflow:auto;background:var(--fe-bg);color:var(--fe-text);font-family:var(--fe-font-mono);font-size:13px;line-height:1.5;white-space:pre-wrap;word-wrap:break-word}.fe-preview__code{white-space:pre;word-wrap:normal}.hljs{background:var(--fe-bg);color:var(--fe-text)}.hljs-comment,.hljs-quote{color:var(--fe-text-muted);font-style:italic}.hljs-keyword,.hljs-selector-tag,.hljs-built_in,.hljs-section,.hljs-meta{color:#c678dd}.hljs-string,.hljs-attr,.hljs-symbol,.hljs-bullet,.hljs-addition,.hljs-link{color:#98c379}.hljs-number,.hljs-literal,.hljs-deletion{color:#d19a66}.hljs-title,.hljs-name,.hljs-selector-id,.hljs-selector-class,.hljs-template-tag,.hljs-template-variable{color:#61aeee}.hljs-type,.hljs-tag{color:#e06c75}.hljs-variable,.hljs-attribute{color:#d19a66}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.fe-preview__md{width:100%;max-height:70vh;overflow:auto;padding:24px 32px;background:var(--fe-bg);color:var(--fe-text);line-height:1.6;font-size:15px}.fe-preview__md h1,.fe-preview__md h2,.fe-preview__md h3,.fe-preview__md h4{margin:1.2em 0 .6em;font-weight:600}.fe-preview__md h1{font-size:1.8em;border-bottom:1px solid var(--fe-border);padding-bottom:.3em}.fe-preview__md h2{font-size:1.4em;border-bottom:1px solid var(--fe-border);padding-bottom:.3em}.fe-preview__md h3{font-size:1.2em}.fe-preview__md p{margin:.8em 0}.fe-preview__md a{color:var(--fe-primary);text-decoration:underline}.fe-preview__md code{font-family:var(--fe-font-mono);background:var(--fe-bg-elev);padding:1px 5px;border-radius:3px;font-size:.92em}.fe-preview__md pre{background:var(--fe-bg-elev);border:1px solid var(--fe-border);border-radius:var(--fe-radius-sm);padding:12px 16px;overflow:auto;font-size:.9em}.fe-preview__md pre code{background:transparent;padding:0}.fe-preview__md ul,.fe-preview__md ol{padding-left:2em;margin:.8em 0}.fe-preview__md li{margin:.3em 0}.fe-preview__md blockquote{border-left:3px solid var(--fe-border-strong);padding:0 1em;color:var(--fe-text-muted);margin:.8em 0}.fe-preview__md table{border-collapse:collapse;margin:1em 0;width:100%}.fe-preview__md th,.fe-preview__md td{border:1px solid var(--fe-border);padding:6px 10px;text-align:left}.fe-preview__md th{background:var(--fe-bg-elev)}.fe-preview__md img{max-width:100%}.fe-toast{position:absolute;bottom:24px;left:50%;transform:translate(-50%);background:var(--fe-text);color:var(--fe-bg);padding:8px 14px;border-radius:var(--fe-radius);font-size:13px;box-shadow:var(--fe-shadow-sm);z-index:95}.fe-toast-enter-active,.fe-toast-leave-active{transition:opacity .2s,transform .2s}.fe-toast-enter-from,.fe-toast-leave-to{opacity:0;transform:translate(-50%,10px)}@media (max-width: 640px){.fe-list__head,.fe-list__row{grid-template-columns:28px minmax(0,1fr) 90px}.fe-list__col--mod{display:none}.fe-toolbar{padding:8px}.fe-search__input{min-width:120px}}.filex-viewer-3d[data-v-f9492fd4]{width:100%;height:100%;min-height:480px;background:#1a1a1a;display:flex;align-items:center;justify-content:center}.filex-viewer-3d[data-v-f9492fd4] model-viewer{width:100%;height:100%;min-height:480px;background:#1a1a1a;display:block}.filex-viewer-fallback[data-v-f9492fd4]{text-align:center;color:#c8cdd6;padding:32px;max-width:480px}.filex-viewer-fallback__icon[data-v-f9492fd4]{font-size:48px;display:block;margin-bottom:12px}.filex-viewer-epub__nav[data-v-12eb7133]{position:absolute;bottom:12px;left:50%;transform:translate(-50%);display:flex;gap:8px;padding:4px 8px;background:var(--fe-bg-elev, rgba(255, 255, 255, .9));border:1px solid var(--fe-border, #e2e6ed);border-radius:6px;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.filex-viewer-epub[data-v-12eb7133]{display:flex;flex-direction:column;width:100%;height:100%;min-height:70vh;background:var(--fe-bg, #fff);color:var(--fe-text, #1a1e27);position:relative}.filex-viewer-epub__bar[data-v-12eb7133]{display:flex;align-items:center;gap:6px;padding:8px 12px;background:var(--fe-bg-elev, #f7f8fa);border-bottom:1px solid var(--fe-border, #e2e6ed);font-size:13px}.filex-viewer-spacer[data-v-12eb7133]{flex:1}.filex-viewer-epub__fs[data-v-12eb7133]{display:inline-block;min-width:40px;text-align:center;font-variant-numeric:tabular-nums;font-size:12px;color:var(--fe-text-muted, #5a6475)}.filex-viewer-epub__main[data-v-12eb7133]{flex:1;min-height:0;display:flex}.filex-viewer-epub__rendition[data-v-12eb7133]{flex:1;min-height:0}.filex-viewer-epub__toc[data-v-12eb7133]{width:260px;border-right:1px solid var(--fe-border, #e2e6ed);overflow-y:auto;padding:12px 0;background:var(--fe-bg-elev, #f7f8fa)}.filex-viewer-epub__toc ul[data-v-12eb7133]{list-style:none;margin:0;padding:0}.filex-viewer-epub__toc-link[data-v-12eb7133]{display:block;width:100%;text-align:left;background:transparent;border:0;padding:6px 14px;font:inherit;color:inherit;cursor:pointer}.filex-viewer-epub__toc-link[data-v-12eb7133]:hover{background:var(--fe-bg-hover, #edf0f5)}.filex-viewer-epub__toc-link.is-child[data-v-12eb7133]{padding-left:28px;color:var(--fe-text-muted, #5a6475);font-size:12px}.filex-viewer-epub__loading[data-v-12eb7133]{position:absolute;inset:auto 0 0 0;text-align:center;padding:6px;background:#0000000d;font-size:12px;color:var(--fe-text-muted, #5a6475)}.filex-viewer-fallback[data-v-12eb7133]{text-align:center;padding:32px;color:var(--fe-text-muted, #5a6475)}.filex-viewer-fallback__icon[data-v-12eb7133]{font-size:48px;display:block;margin-bottom:12px}.filex-viewer-btn[data-v-12eb7133]{border:1px solid var(--fe-border, #e2e6ed);background:var(--fe-bg, #fff);color:var(--fe-text, #1a1e27);padding:4px 10px;border-radius:4px;cursor:pointer;font:inherit;font-size:12px}.filex-viewer-btn[data-v-12eb7133]:hover:not(:disabled){background:var(--fe-bg-hover, #edf0f5)}.filex-viewer-btn[data-v-12eb7133]:disabled{opacity:.5;cursor:not-allowed}.filex-viewer-mermaid[data-v-939eea2b]{display:flex;flex-direction:column;width:100%;height:100%;min-height:70vh;background:var(--fe-bg, #fff);color:var(--fe-text, #1a1e27)}.filex-viewer-mermaid__bar[data-v-939eea2b]{display:flex;align-items:center;gap:6px;padding:8px 12px;background:var(--fe-bg-elev, #f7f8fa);border-bottom:1px solid var(--fe-border, #e2e6ed);font-size:13px}.filex-viewer-mermaid__zoom[data-v-939eea2b]{min-width:50px;text-align:center;font-variant-numeric:tabular-nums;font-size:12px}.filex-viewer-mermaid__pane[data-v-939eea2b]{flex:1;overflow:hidden;position:relative;cursor:grab;background:var(--fe-bg-elev, #f7f8fa);touch-action:none}.filex-viewer-mermaid__pane[data-v-939eea2b]:active{cursor:grabbing}.filex-viewer-mermaid__surface[data-v-939eea2b]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;transform-origin:center center;transition:transform .05s linear;-webkit-user-select:none;user-select:none}.filex-viewer-mermaid__surface[data-v-939eea2b] svg{max-width:90%;max-height:90%}.filex-viewer-fallback[data-v-939eea2b]{text-align:center;padding:32px;color:var(--fe-text-muted, #5a6475);width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}.filex-viewer-fallback__icon[data-v-939eea2b]{font-size:48px;display:block;margin-bottom:12px}.filex-viewer-btn[data-v-939eea2b]{border:1px solid var(--fe-border, #e2e6ed);background:var(--fe-bg, #fff);color:var(--fe-text, #1a1e27);padding:4px 10px;border-radius:4px;cursor:pointer;font:inherit;font-size:12px}.filex-viewer-btn[data-v-939eea2b]:hover:not(:disabled){background:var(--fe-bg-hover, #edf0f5)}.filex-viewer-drawio[data-v-2e4b5f3b]{display:flex;flex-direction:column;width:100%;height:100%;min-height:70vh;background:var(--fe-bg, #fff)}.filex-viewer-drawio__bar[data-v-2e4b5f3b]{display:flex;align-items:center;gap:12px;padding:6px 12px;background:var(--fe-bg-elev, #f7f8fa);border-bottom:1px solid var(--fe-border, #e2e6ed);font-size:12px;color:var(--fe-text-muted, #5a6475)}.filex-viewer-drawio__status[data-state=error][data-v-2e4b5f3b]{color:var(--fe-danger, #dc2626)}.filex-viewer-drawio__status[data-state=saved][data-v-2e4b5f3b]{color:#059669}.filex-viewer-drawio__readonly[data-v-2e4b5f3b]{font-style:italic;margin-left:auto}.filex-viewer-drawio__frame[data-v-2e4b5f3b]{flex:1;width:100%;border:0;background:#fafafa;min-height:0}.filex-viewer-fallback[data-v-2e4b5f3b]{text-align:center;padding:32px;color:var(--fe-text-muted, #5a6475)}.filex-viewer-fallback__icon[data-v-2e4b5f3b]{font-size:48px;display:block;margin-bottom:12px}.filex-viewer-tiff__pager[data-v-c6b84f5d]{position:absolute;bottom:12px;left:50%;transform:translate(-50%);display:flex;align-items:center;gap:8px;padding:4px 8px;background:var(--fe-bg-elev, rgba(255, 255, 255, .9));border:1px solid var(--fe-border, #e2e6ed);border-radius:6px;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.filex-viewer-tiff__pages[data-v-c6b84f5d]{font-size:12px;font-variant-numeric:tabular-nums}.filex-viewer-tiff[data-v-c6b84f5d]{display:flex;flex-direction:column;width:100%;height:100%;min-height:70vh;background:var(--fe-bg, #fff)}.filex-viewer-tiff__bar[data-v-c6b84f5d]{display:flex;align-items:center;gap:6px;padding:8px 12px;background:var(--fe-bg-elev, #f7f8fa);border-bottom:1px solid var(--fe-border, #e2e6ed);font-size:13px}.filex-viewer-tiff__pages[data-v-c6b84f5d]{min-width:110px;text-align:center;font-variant-numeric:tabular-nums;font-size:12px}.filex-viewer-tiff__zoom[data-v-c6b84f5d]{min-width:50px;text-align:center;font-variant-numeric:tabular-nums;font-size:12px}.filex-viewer-spacer[data-v-c6b84f5d]{flex:1}.filex-viewer-tiff__pane[data-v-c6b84f5d]{flex:1;overflow:auto;padding:16px;background:#2a2d33;display:flex;align-items:flex-start;justify-content:flex-start}.filex-viewer-tiff__pane canvas[data-v-c6b84f5d]{background:#fff;box-shadow:0 4px 16px #0000004d}.filex-viewer-fallback[data-v-c6b84f5d]{text-align:center;padding:32px;color:#c8cdd6;margin:auto}.filex-viewer-fallback__icon[data-v-c6b84f5d]{font-size:48px;display:block;margin-bottom:12px}.filex-viewer-btn[data-v-c6b84f5d]{border:1px solid var(--fe-border, #e2e6ed);background:var(--fe-bg, #fff);color:var(--fe-text, #1a1e27);padding:4px 10px;border-radius:4px;cursor:pointer;font:inherit;font-size:12px}.filex-viewer-btn[data-v-c6b84f5d]:hover:not(:disabled){background:var(--fe-bg-hover, #edf0f5)}.filex-viewer-btn[data-v-c6b84f5d]:disabled{opacity:.4;cursor:not-allowed}.filex-viewer-psd[data-v-001123c3]{display:flex;flex-direction:column;width:100%;height:100%;min-height:70vh;background:var(--fe-bg, #fff)}.filex-viewer-psd__bar[data-v-001123c3]{display:flex;align-items:center;gap:6px;padding:8px 12px;background:var(--fe-bg-elev, #f7f8fa);border-bottom:1px solid var(--fe-border, #e2e6ed);font-size:13px}.filex-viewer-spacer[data-v-001123c3]{flex:1}.filex-viewer-psd__dim[data-v-001123c3]{font-size:12px;color:var(--fe-text-muted, #5a6475)}.filex-viewer-psd__zoom[data-v-001123c3]{min-width:50px;text-align:center;font-variant-numeric:tabular-nums;font-size:12px}.filex-viewer-psd__main[data-v-001123c3]{flex:1;display:flex;min-height:0}.filex-viewer-psd__layers[data-v-001123c3]{width:240px;border-right:1px solid var(--fe-border, #e2e6ed);overflow-y:auto;padding:8px 0;background:var(--fe-bg-elev, #f7f8fa)}.filex-viewer-psd__layers ul[data-v-001123c3]{list-style:none;margin:0;padding:0}.filex-viewer-psd__layers li[data-v-001123c3]{display:flex;align-items:center;gap:6px;padding:4px 12px;font-size:12px}.filex-viewer-psd__layer-vis[data-v-001123c3]{width:14px;text-align:center;color:var(--fe-text-muted, #5a6475)}.filex-viewer-psd__layer-vis[data-hidden="1"][data-v-001123c3]{color:var(--fe-border-strong, #c7ced9)}.filex-viewer-psd__layer-name[data-v-001123c3]{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.filex-viewer-psd__pane[data-v-001123c3]{flex:1;overflow:auto;padding:16px;background:#2a2d33;display:flex;align-items:flex-start;justify-content:flex-start}.filex-viewer-psd__pane canvas[data-v-001123c3]{background:#fff repeating-conic-gradient(#e0e0e0 0% 25%,transparent 0% 50%) 50% / 16px 16px;box-shadow:0 4px 16px #0000004d}.filex-viewer-fallback[data-v-001123c3]{text-align:center;padding:32px;color:#c8cdd6;margin:auto}.filex-viewer-fallback__icon[data-v-001123c3]{font-size:48px;display:block;margin-bottom:12px}.filex-viewer-btn[data-v-001123c3]{border:1px solid var(--fe-border, #e2e6ed);background:var(--fe-bg, #fff);color:var(--fe-text, #1a1e27);padding:4px 10px;border-radius:4px;cursor:pointer;font:inherit;font-size:12px}.filex-viewer-btn[data-v-001123c3]:hover:not(:disabled){background:var(--fe-bg-hover, #edf0f5)}.filex-viewer-btn.is-active[data-v-001123c3]{background:var(--fe-bg-selected, #dfe8ff);border-color:var(--fe-primary, #3b82f6)}.filex-viewer-ipynb[data-v-eece712d]{display:flex;flex-direction:column;width:100%;height:100%;min-height:70vh;background:var(--fe-bg, #fff);color:var(--fe-text, #1a1e27)}.filex-viewer-ipynb__bar[data-v-eece712d]{display:flex;align-items:center;gap:12px;padding:8px 12px;background:var(--fe-bg-elev, #f7f8fa);border-bottom:1px solid var(--fe-border, #e2e6ed);font-size:12px;color:var(--fe-text-muted, #5a6475)}.filex-viewer-ipynb__lang[data-v-eece712d]{font-family:var(--fe-font-mono, monospace);text-transform:uppercase;letter-spacing:.04em}.filex-viewer-ipynb__pane[data-v-eece712d]{flex:1;overflow:auto;padding:16px 24px}.filex-viewer-ipynb__cell[data-v-eece712d]{border:1px solid var(--fe-border, #e2e6ed);border-radius:6px;margin-bottom:16px;overflow:hidden}.filex-viewer-ipynb__cell[data-type=code][data-v-eece712d]{background:var(--fe-bg-elev, #f7f8fa)}.filex-viewer-ipynb__exec[data-v-eece712d]{padding:4px 12px;font-family:var(--fe-font-mono, monospace);font-size:11px;color:var(--fe-text-muted, #5a6475);background:#0000000a}.filex-viewer-ipynb__src[data-v-eece712d]{margin:0;padding:12px;font-family:var(--fe-font-mono, monospace);font-size:12px;line-height:1.5;white-space:pre;overflow-x:auto}.filex-viewer-ipynb__outputs[data-v-eece712d]{border-top:1px dashed var(--fe-border, #e2e6ed);background:var(--fe-bg, #fff);padding:8px 12px}.filex-viewer-ipynb__out[data-v-eece712d]{margin:0;padding:4px 0;font-family:var(--fe-font-mono, monospace);font-size:12px;white-space:pre-wrap;word-wrap:break-word}.filex-viewer-ipynb__out[data-type=error][data-v-eece712d]{color:var(--fe-danger, #dc2626)}.filex-viewer-ipynb__img[data-v-eece712d]{display:block;max-width:100%;height:auto;margin:8px 0}.filex-viewer-ipynb__html[data-v-eece712d]{font-size:13px}.filex-viewer-ipynb__md[data-v-eece712d]{padding:12px 16px;font-size:14px;line-height:1.6}.filex-viewer-ipynb__md-raw[data-v-eece712d]{padding:12px;margin:0;font-family:var(--fe-font-mono, monospace);font-size:12px;white-space:pre-wrap}.filex-viewer-fallback[data-v-eece712d]{text-align:center;padding:32px;color:var(--fe-text-muted, #5a6475)}.filex-viewer-fallback__icon[data-v-eece712d]{font-size:48px;display:block;margin-bottom:12px}.filex-viewer-csv[data-v-db55a104]{display:flex;flex-direction:column;width:100%;height:100%;min-height:70vh;background:var(--fe-bg, #fff);color:var(--fe-text, #1a1e27)}.filex-viewer-csv__bar[data-v-db55a104]{display:flex;align-items:center;gap:12px;padding:8px 12px;background:var(--fe-bg-elev, #f7f8fa);border-bottom:1px solid var(--fe-border, #e2e6ed);font-size:12px}.filex-viewer-csv__check[data-v-db55a104]{display:flex;align-items:center;gap:4px;font-size:12px}.filex-viewer-csv__select[data-v-db55a104],.filex-viewer-csv__filter[data-v-db55a104]{border:1px solid var(--fe-border, #e2e6ed);background:var(--fe-bg, #fff);color:inherit;padding:4px 8px;border-radius:4px;font:inherit;font-size:12px}.filex-viewer-csv__filter[data-v-db55a104]{flex:0 1 240px}.filex-viewer-spacer[data-v-db55a104]{flex:1}.filex-viewer-csv__count[data-v-db55a104]{font-size:11px;color:var(--fe-text-muted, #5a6475);font-variant-numeric:tabular-nums}.filex-viewer-csv__pane[data-v-db55a104]{flex:1;overflow:auto}.filex-viewer-csv__table[data-v-db55a104]{border-collapse:collapse;width:max-content;min-width:100%;font-size:12px;font-family:var(--fe-font-mono, monospace)}.filex-viewer-csv__table th[data-v-db55a104],.filex-viewer-csv__table td[data-v-db55a104]{padding:4px 10px;border:1px solid var(--fe-border, #e2e6ed);white-space:nowrap;max-width:320px;overflow:hidden;text-overflow:ellipsis}.filex-viewer-csv__table th[data-v-db55a104]{background:var(--fe-bg-elev, #f7f8fa);position:sticky;top:0;font-weight:600;text-align:left}.filex-viewer-csv__table tbody tr[data-v-db55a104]:nth-child(2n){background:var(--fe-bg-hover, rgba(0, 0, 0, .02))}.filex-viewer-csv__rownum[data-v-db55a104]{color:var(--fe-text-muted, #5a6475);text-align:right;background:var(--fe-bg-elev, #f7f8fa);font-variant-numeric:tabular-nums;position:sticky;left:0}.filex-viewer-csv__pager[data-v-db55a104]{display:flex;justify-content:center;align-items:center;gap:8px;padding:6px;background:var(--fe-bg-elev, #f7f8fa);border-top:1px solid var(--fe-border, #e2e6ed);font-size:12px}.filex-viewer-csv__pageno[data-v-db55a104]{font-variant-numeric:tabular-nums;font-size:12px}.filex-viewer-fallback[data-v-db55a104]{text-align:center;padding:32px;color:var(--fe-text-muted, #5a6475)}.filex-viewer-fallback__icon[data-v-db55a104]{font-size:48px;display:block;margin-bottom:12px}.filex-viewer-btn[data-v-db55a104]{border:1px solid var(--fe-border, #e2e6ed);background:var(--fe-bg, #fff);color:var(--fe-text, #1a1e27);padding:4px 10px;border-radius:4px;cursor:pointer;font:inherit;font-size:12px}.filex-viewer-btn[data-v-db55a104]:hover:not(:disabled){background:var(--fe-bg-hover, #edf0f5)}.filex-viewer-btn[data-v-db55a104]:disabled{opacity:.4;cursor:not-allowed}.filex-viewer-archive[data-v-93df7b13]{display:flex;flex-direction:column;width:100%;height:100%;min-height:70vh;background:var(--fe-bg, #fff);color:var(--fe-text, #1a1e27)}.filex-viewer-archive__pane[data-v-93df7b13]{flex:1;overflow:auto;padding:16px 20px}.filex-viewer-archive__summary[data-v-93df7b13]{font-size:12px;color:var(--fe-text-muted, #5a6475);margin-bottom:12px;font-variant-numeric:tabular-nums}.filex-viewer-archive__table[data-v-93df7b13]{width:100%;border-collapse:collapse;font-size:13px;font-family:var(--fe-font-mono, monospace)}.filex-viewer-archive__table th[data-v-93df7b13],.filex-viewer-archive__table td[data-v-93df7b13]{padding:6px 12px;border-bottom:1px solid var(--fe-border, #e2e6ed);text-align:left}.filex-viewer-archive__table th[data-v-93df7b13]{background:var(--fe-bg-elev, #f7f8fa);font-weight:600;position:sticky;top:0}.filex-viewer-archive__size[data-v-93df7b13]{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--fe-text-muted, #5a6475)}.filex-viewer-archive__icon[data-v-93df7b13]{margin-right:6px}.filex-viewer-archive__table tr[data-dir="1"][data-v-93df7b13]{color:var(--fe-text-muted, #5a6475)}.filex-viewer-fallback[data-v-93df7b13]{text-align:center;padding:32px;color:var(--fe-text-muted, #5a6475)}.filex-viewer-fallback__icon[data-v-93df7b13]{font-size:48px;display:block;margin-bottom:12px}';let dp=!1;function gw(){if(dp||typeof document>"u")return;const e=document.createElement("style");e.setAttribute("data-filex",""),e.textContent=mw,document.head.appendChild(e),dp=!0}function hp(e,t){const r={};return e.apiBase&&(r.apiBase=e.apiBase),e.endpoint&&(r.endpoint=e.endpoint),(e.locale==="tr"||e.locale==="en")&&(r.locale=e.locale),(e.theme==="light"||e.theme==="dark"||e.theme==="auto")&&(r.theme=e.theme),e.trashVisible!==void 0&&(r.trashVisible=e.trashVisible===!0||e.trashVisible==="true"||e.trashVisible===""),{...r,...t??{}}}const pp=b6({props:{config:{type:Object,default:null},apiBase:{type:String,default:""},endpoint:{type:String,default:""},locale:{type:String,default:""},theme:{type:String,default:""},trashVisible:{type:[Boolean,String],default:void 0}},emits:["share-created","file-opened","error","upload-progress","selection-change"],setup(e,{emit:t}){gw();const r=he(hp({apiBase:e.apiBase,endpoint:e.endpoint,locale:e.locale,theme:e.theme,trashVisible:e.trashVisible},e.config));return tr(()=>[e.config,e.apiBase,e.endpoint,e.locale,e.theme,e.trashVisible],()=>{r.value=hp({apiBase:e.apiBase,endpoint:e.endpoint,locale:e.locale,theme:e.theme,trashVisible:e.trashVisible},e.config)},{deep:!0}),()=>Sh(vw,{config:r.value,onShareCreated:n=>t("share-created",n),onFileOpened:n=>t("file-opened",n),onError:n=>t("error",n),onUploadProgress:n=>t("upload-progress",n),onSelectionChange:n=>t("selection-change",n)})}},{shadowRoot:!1}),bw=pp;typeof customElements<"u"&&!customElements.get("filex-explorer")&&customElements.define("filex-explorer",pp);const yw={class:"filex-viewer-3d"},xw={key:1,class:"filex-viewer-fallback"},_w={key:2,class:"filex-viewer-fallback"},mo=Object.freeze(Object.defineProperty({__proto__:null,default:Jr(qt({__name:"Viewer3D",props:{url:{},mime:{},ext:{},t:{type:Function}},setup(e){const t=e,r=new Set(["glb","gltf","usdz"]),n=mt(()=>r.has((t.ext||"").toLowerCase())),a=he(null),i=he(!1);async function o(){if(i.value=!1,a.value=null,!n.value){a.value=t.t?t.t("viewer.format_unsupported_3d"):`3D format ".${t.ext}" not supported in browser preview — please download.`;return}try{await import("@google/model-viewer"),i.value=!0}catch{a.value=t.t?t.t("viewer.peer_not_installed"):"3D viewer requires `@google/model-viewer` — install or use download."}}return pr(o),tr(()=>t.url,()=>{o()}),(l,s)=>{const u=u5("model-viewer");return Q(),ae("div",yw,[i.value&&!a.value?(Q(),kr(u,{key:0,src:e.url,"auto-rotate":"","camera-controls":"","touch-action":"pan-y","shadow-intensity":"1",alt:e.ext+" model",style:{width:"100%",height:"100%","min-height":"480px",display:"block"}},null,8,["src","alt"])):a.value?(Q(),ae("div",xw,[s[0]||(s[0]=L("span",{class:"filex-viewer-fallback__icon"},"📦",-1)),L("p",null,le(a.value),1)])):(Q(),ae("div",_w,[s[1]||(s[1]=L("span",{class:"filex-viewer-fallback__icon"},"⏳",-1)),L("p",null,le(e.t?e.t("viewer.loading"):"Loading…"),1)]))])}}}),[["__scopeId","data-v-299b3816"]])},Symbol.toStringTag,{value:"Module"})),ww={key:0,class:"filex-viewer-fallback"},kw={key:0,class:"filex-viewer-epub__nav"},Sw=["disabled"],Cw=["disabled"],Aw={key:1,class:"filex-viewer-epub__loading"},Ew=Object.freeze(Object.defineProperty({__proto__:null,default:Jr(qt({__name:"EpubViewer",props:{url:{},mime:{},ext:{},t:{type:Function},authHeaders:{type:Function},authCredentials:{}},setup(e){const t=e,r=he(null),n=he(null),a=he(null),i=he([]),o=he(100),l=he(!1),s=he(!0);let u=null,c=null;async function f(){s.value=!0,l.value=!1,a.value=null;let x=null;try{x=await import("epubjs")}catch{a.value=t.t?t.t("viewer.peer_not_installed"):"EPUB viewer requires `epubjs` — install or use download.",s.value=!1;return}try{const g=x.default??x;let m=t.url;if(t.authHeaders){const v=t.authHeaders(),S=await fetch(t.url,{headers:v,credentials:t.authCredentials||"same-origin"});if(!S.ok)throw new Error(`${S.status} ${S.statusText}`);m=await S.arrayBuffer()}if(u=g(m),!n.value)throw new Error("EPUB mount target missing");c=u.renderTo(n.value,{width:"100%",height:"100%",flow:"paginated",manager:"default"}),await c.display(),c.themes.fontSize(o.value+"%");const b=await u.loaded.navigation;i.value=(b==null?void 0:b.toc)??[],l.value=!0}catch(g){a.value=g instanceof Error?g.message:"EPUB load failed"}finally{s.value=!1}}function d(){var x;(x=c==null?void 0:c.next)==null||x.call(c)}function h(){var x;(x=c==null?void 0:c.prev)==null||x.call(c)}function y(x){x.key==="ArrowRight"||x.key==="PageDown"?d():(x.key==="ArrowLeft"||x.key==="PageUp")&&h()}pr(()=>{f(),window.addEventListener("keydown",y)}),Br(()=>{var x,g;window.removeEventListener("keydown",y);try{(x=c==null?void 0:c.destroy)==null||x.call(c)}catch{}try{(g=u==null?void 0:u.destroy)==null||g.call(u)}catch{}c=null,u=null}),tr(()=>t.url,()=>{if(c)try{c.destroy()}catch{}if(u)try{u.destroy()}catch{}u=null,c=null,f()});function p(x,g){return t.t?t.t(x):g}return(x,g)=>(Q(),ae("div",{ref_key:"root",ref:r,class:"filex-viewer-epub"},[a.value?(Q(),ae("div",ww,[g[0]||(g[0]=L("span",{class:"filex-viewer-fallback__icon"},"📖",-1)),L("p",null,le(a.value),1)])):(Q(),ae(yt,{key:1},[L("div",{ref_key:"containerRef",ref:n,class:"filex-viewer-epub__rendition"},null,512),l.value?(Q(),ae("div",kw,[L("button",{type:"button",class:"filex-viewer-btn",onClick:h,disabled:!l.value},"‹",8,Sw),L("button",{type:"button",class:"filex-viewer-btn",onClick:d,disabled:!l.value},"›",8,Cw)])):rt("",!0),s.value?(Q(),ae("div",Aw,le(p("viewer.loading","Loading…")),1)):rt("",!0)],64))],512))}}),[["__scopeId","data-v-639afd99"]])},Symbol.toStringTag,{value:"Module"}));async function vp(e){const t=await fetch(e.url,{headers:e.headers??{},credentials:e.credentials??"same-origin",signal:e.signal});if(!t.ok){const r=await t.text().catch(()=>"");throw new Error(`${t.status} ${t.statusText}${r?" — "+r.slice(0,200):""}`)}return t}async function mp(e){return(await vp(e)).arrayBuffer()}async function Zs(e){return(await vp(e)).text()}const Tw={class:"filex-viewer-mermaid"},Mw={key:0,class:"filex-viewer-fallback"},Dw={key:1,class:"filex-viewer-fallback"},gp=Object.freeze(Object.defineProperty({__proto__:null,default:Jr(qt({__name:"MermaidViewer",props:{url:{},mime:{},ext:{},t:{type:Function},authHeaders:{type:Function},authCredentials:{}},setup(e){const t=e,r=he(null),n=he(null),a=he(!0),i=he(1),o=he(0),l=he(0);let s=!1,u=null,c=0,f=null;async function d(){var b,v;if(f)return f;try{const S=await import("mermaid");return f=S.default??S,(v=f.initialize)==null||v.call(f,{startOnLoad:!1,securityLevel:"strict",theme:(b=window.matchMedia)!=null&&b.call(window,"(prefers-color-scheme: dark)").matches?"dark":"default"}),f}catch{return null}}async function h(){var C;a.value=!0,n.value=null;const b=++c,v=await d();if(b!==c)return;if(!v){n.value=t.t?t.t("viewer.peer_not_installed"):"Mermaid viewer requires `mermaid` — install or use download.",a.value=!1;return}let S;try{S=await Zs({url:t.url,headers:((C=t.authHeaders)==null?void 0:C.call(t))??{},credentials:t.authCredentials})}catch(A){n.value=A instanceof Error?A.message:"fetch failed",a.value=!1;return}if(b===c)try{const A=`filex-mermaid-${Date.now()}`,{svg:_}=await v.render(A,S);if(b!==c)return;if(r.value){r.value.innerHTML=_;const E=r.value.querySelector("svg");E&&(E.style.maxWidth="100%",E.style.height="auto")}}catch(A){n.value=A instanceof Error?A.message:"render failed"}finally{a.value=!1}}function y(b){if(!b.ctrlKey&&!b.metaKey)return;b.preventDefault();const S=-b.deltaY>0?1.1:1/1.1;i.value=Math.max(.2,Math.min(8,i.value*S))}function p(b){var v,S;s=!0,u={x:b.clientX,y:b.clientY,tx:o.value,ty:l.value},(S=(v=b.target).setPointerCapture)==null||S.call(v,b.pointerId)}function x(b){!s||!u||(o.value=u.tx+(b.clientX-u.x),l.value=u.ty+(b.clientY-u.y))}function g(){s=!1,u=null}pr(h),Br(()=>{c++});function m(b,v){return t.t?t.t(b):v}return(b,v)=>(Q(),ae("div",Tw,[L("div",{class:"filex-viewer-mermaid__pane",onWheel:y,onPointerdown:p,onPointermove:x,onPointerup:g,onPointercancel:g},[n.value?(Q(),ae("div",Mw,[v[0]||(v[0]=L("span",{class:"filex-viewer-fallback__icon"},"📊",-1)),L("p",null,le(n.value),1)])):a.value?(Q(),ae("div",Dw,[v[1]||(v[1]=L("span",{class:"filex-viewer-fallback__icon"},"⏳",-1)),L("p",null,le(m("viewer.loading","Loading…")),1)])):rt("",!0),rr(L("div",{ref_key:"surface",ref:r,class:"filex-viewer-mermaid__surface",style:Ea({transform:`translate(${o.value}px, ${l.value}px) scale(${i.value})`})},null,4),[[fc,!a.value&&!n.value]])],32)]))}}),[["__scopeId","data-v-e19076c3"]])},Symbol.toStringTag,{value:"Module"})),Iw={class:"filex-viewer-drawio"},zw={key:0,class:"filex-viewer-fallback"},Fw=["src"],bp=Object.freeze(Object.defineProperty({__proto__:null,default:Jr(qt({__name:"DrawioViewer",props:{url:{},filePath:{},ext:{},drawioUrl:{},saveUrl:{},readOnly:{type:Boolean},t:{type:Function},authHeaders:{type:Function},authCredentials:{}},setup(e){const t=e,r=he(null),n=he(null),a=he("loading"),i=he(!!t.readOnly||!t.saveUrl),o=mt(()=>t.drawioUrl?t.drawioUrl.replace(/\/$/,""):null),l=mt(()=>{if(!o.value)return"";const p=new URLSearchParams({embed:"1",proto:"json",spin:"1",saveAndExit:"0",noSaveBtn:i.value?"1":"0",noExitBtn:"1",ui:"kennedy",modified:"unsavedChanges"});return`${o.value}/?${p.toString()}`});let s="";async function u(){var p;a.value="loading",n.value=null;try{s=await Zs({url:t.url,headers:((p=t.authHeaders)==null?void 0:p.call(t))??{},credentials:t.authCredentials})}catch(x){n.value=x instanceof Error?x.message:"fetch failed",a.value="error"}}function c(p){var x,g;(g=(x=r.value)==null?void 0:x.contentWindow)==null||g.postMessage(JSON.stringify(p),"*")}async function f(p){var x;if(t.saveUrl){a.value="saving";try{const g={"Content-Type":"application/json",...((x=t.authHeaders)==null?void 0:x.call(t))??{}},m=await fetch(t.saveUrl,{method:"POST",headers:g,credentials:t.authCredentials||"same-origin",body:JSON.stringify({path:t.filePath,content:p})});if(!m.ok)throw new Error(`${m.status} ${m.statusText}`);a.value="saved",setTimeout(()=>{a.value==="saved"&&(a.value="ready")},2500)}catch(g){n.value=g instanceof Error?g.message:"save failed",a.value="error"}}}function d(p){if(typeof p.data!="string"||p.data.length===0)return;const x=p.data[0];if(x!=="{"&&x!=="<")return;let g;try{g=JSON.parse(p.data)}catch{return}if(!(!g||typeof g!="object"))switch(g.event){case"init":c({action:"load",xml:s,autosave:0}),a.value="ready";break;case"save":typeof g.xml=="string"&&f(g.xml);break;case"export":break;case"autosave":typeof g.xml=="string"&&!i.value&&f(g.xml);break}}function h(){if(!o.value){n.value=y("viewer.drawio.disabled","Drawio (diagrams.net) yapılandırılmamış."),a.value="error";return}n.value===y("viewer.drawio.disabled","Drawio (diagrams.net) yapılandırılmamış.")&&(n.value=null,a.value="loading"),u()}pr(()=>{window.addEventListener("message",d),h()}),tr(()=>t.drawioUrl,h),Br(()=>{window.removeEventListener("message",d)});function y(p,x){return t.t?t.t(p):x}return(p,x)=>(Q(),ae("div",Iw,[n.value?(Q(),ae("div",zw,[x[0]||(x[0]=L("span",{class:"filex-viewer-fallback__icon"},"📐",-1)),L("p",null,le(n.value),1)])):(Q(),ae("iframe",{key:1,ref_key:"iframeRef",ref:r,src:l.value,class:"filex-viewer-drawio__frame",title:"diagrams.net editor"},null,8,Fw))]))}}),[["__scopeId","data-v-680c72a8"]])},Symbol.toStringTag,{value:"Module"})),Ow={class:"filex-viewer-tiff"},Pw={class:"filex-viewer-tiff__pane"},Rw={key:0,class:"filex-viewer-fallback"},Lw={key:1,class:"filex-viewer-fallback"},Bw={key:2,class:"filex-viewer-tiff__pager"},Nw=["disabled"],$w={class:"filex-viewer-tiff__pages"},Uw=["disabled"],yp=Object.freeze(Object.defineProperty({__proto__:null,default:Jr(qt({__name:"TiffViewer",props:{url:{},mime:{},ext:{},t:{type:Function},authHeaders:{type:Function},authCredentials:{}},setup(e){const t=e,r=he(null),n=he(null),a=he(!0),i=he(0),o=he(0),l=he({width:0,height:0});let s=null,u=null,c=0;async function f(){if(s)return s;try{const m=await Promise.resolve().then(()=>TS);return s=m.default??m,s}catch{return null}}async function d(){var v;a.value=!0,n.value=null,u=null,i.value=0,o.value=0;const m=++c,b=await f();if(m===c){if(!b){n.value=t.t?t.t("viewer.peer_not_installed"):"TIFF viewer requires `utif` — install or use download.",a.value=!1;return}try{const S=await mp({url:t.url,headers:((v=t.authHeaders)==null?void 0:v.call(t))??{},credentials:t.authCredentials});if(m!==c)return;if(u=b.decode(S),o.value=(u==null?void 0:u.length)??0,o.value===0)throw new Error("No pages decoded");h()}catch(S){n.value=S instanceof Error?S.message:"TIFF decode failed"}finally{a.value=!1}}}function h(){if(!s||!u||!r.value)return;const m=Math.max(0,Math.min(i.value,u.length-1)),b=u[m];try{s.decodeImage(void 0,b)}catch{}const v=s.toRGBA8(b),S=b.width,C=b.height;l.value={width:S,height:C};const A=r.value;A.width=S,A.height=C;const _=A.getContext("2d");if(!_)return;const E=_.createImageData(S,C);E.data.set(v),_.putImageData(E,0,0)}function y(){i.value<o.value-1&&(i.value++,h())}function p(){i.value>0&&(i.value--,h())}pr(d),Br(()=>{c++,u=null}),tr(()=>t.url,d);const x=mt(()=>(t.t&&t.t("viewer.page_n_of_m")||"Page {n} of {m}").replace("{n}",String(i.value+1)).replace("{m}",String(o.value)));function g(m,b){return t.t?t.t(m):b}return(m,b)=>(Q(),ae("div",Ow,[L("div",Pw,[n.value?(Q(),ae("div",Rw,[b[0]||(b[0]=L("span",{class:"filex-viewer-fallback__icon"},"🖼️",-1)),L("p",null,le(n.value),1)])):a.value?(Q(),ae("div",Lw,[b[1]||(b[1]=L("span",{class:"filex-viewer-fallback__icon"},"⏳",-1)),L("p",null,le(g("viewer.loading","Loading…")),1)])):rt("",!0),rr(L("canvas",{ref_key:"canvasEl",ref:r,style:{imageRendering:"pixelated"}},null,512),[[fc,!a.value&&!n.value]]),!a.value&&!n.value&&o.value>1?(Q(),ae("div",Bw,[L("button",{type:"button",class:"filex-viewer-btn",disabled:i.value===0,onClick:p},"‹",8,Nw),L("span",$w,le(x.value),1),L("button",{type:"button",class:"filex-viewer-btn",disabled:i.value>=o.value-1,onClick:y},"›",8,Uw)])):rt("",!0)])]))}}),[["__scopeId","data-v-11c3469a"]])},Symbol.toStringTag,{value:"Module"})),Hw={class:"filex-viewer-psd"},jw={class:"filex-viewer-psd__pane"},Gw={key:0,class:"filex-viewer-fallback"},Vw={key:1,class:"filex-viewer-fallback"},qw=Object.freeze(Object.defineProperty({__proto__:null,default:Jr(qt({__name:"PsdViewer",props:{url:{},mime:{},ext:{},t:{type:Function},authHeaders:{type:Function},authCredentials:{}},setup(e){const t=e,r=he(null),n=he([]),a=he(null),i=he(!0),o=he({width:0,height:0});let l=0,s=null;async function u(){if(s)return s;try{return s=await Promise.resolve().then(()=>qT),s}catch{return null}}function c(h,y){if(h&&Array.isArray(h.children))for(const p of h.children)y.push({index:y.length,name:p.name??"(unnamed)",hidden:!!p.hidden}),p.children&&c(p,y)}async function f(){var p;i.value=!0,a.value=null,n.value=[];const h=++l,y=await u();if(h===l){if(!y){a.value=t.t?t.t("viewer.peer_not_installed"):"PSD viewer requires `ag-psd` — install or use download.",i.value=!1;return}try{const x=await mp({url:t.url,headers:((p=t.authHeaders)==null?void 0:p.call(t))??{},credentials:t.authCredentials});if(h!==l)return;const g=y.readPsd(x,{skipLayerImageData:!1,skipCompositeImageData:!1,skipThumbnail:!0});o.value={width:g.width,height:g.height};const m=g.canvas;if(m&&r.value){const v=r.value;v.width=g.width,v.height=g.height;const S=v.getContext("2d");S==null||S.drawImage(m,0,0)}else throw new Error("PSD has no composite image (skipCompositeImageData?)");const b=[];c(g,b),n.value=b}catch(x){a.value=x instanceof Error?x.message:"PSD decode failed"}finally{i.value=!1}}}pr(f),Br(()=>{l++}),tr(()=>t.url,f);function d(h,y){return t.t?t.t(h):y}return(h,y)=>(Q(),ae("div",Hw,[L("div",jw,[a.value?(Q(),ae("div",Gw,[y[0]||(y[0]=L("span",{class:"filex-viewer-fallback__icon"},"🎨",-1)),L("p",null,le(a.value),1)])):i.value?(Q(),ae("div",Vw,[y[1]||(y[1]=L("span",{class:"filex-viewer-fallback__icon"},"⏳",-1)),L("p",null,le(d("viewer.loading","Loading…")),1)])):rt("",!0),rr(L("canvas",{ref_key:"canvasEl",ref:r},null,512),[[fc,!i.value&&!a.value]])])]))}}),[["__scopeId","data-v-46b5b3c2"]])},Symbol.toStringTag,{value:"Module"})),Ww={class:"filex-viewer-ipynb"},Kw={class:"filex-viewer-ipynb__pane"},Xw={key:0,class:"filex-viewer-fallback"},Yw={key:1,class:"filex-viewer-fallback"},Zw={key:2},Jw=["data-type"],Qw={class:"filex-viewer-ipynb__exec"},e9={class:"filex-viewer-ipynb__src hljs"},t9=["innerHTML"],r9={key:1},n9={key:0,class:"filex-viewer-ipynb__outputs"},a9=["src","alt"],i9=["innerHTML"],o9=["data-type"],l9=["innerHTML"],s9={key:1,class:"filex-viewer-ipynb__md-raw"},u9={key:2,class:"filex-viewer-ipynb__src"},c9=Object.freeze(Object.defineProperty({__proto__:null,default:Jr(qt({__name:"IpynbViewer",props:{url:{},ext:{},t:{type:Function},authHeaders:{type:Function},authCredentials:{}},setup(e){const t=e,r=he([]),n=he("python"),a=he(null),i=he(!0),o=he(new Map),l=he(new Map);let s=0,u=null,c=null;async function f(){if(c!==null)return c||null;try{const m=await import("markdown-it"),b=m.default??m;return c=new b({html:!1,linkify:!0,breaks:!0}),c}catch{return c=!1,null}}function d(m){return Array.isArray(m)?m.join(""):m??""}async function h(){var C,A,_,E;i.value=!0,a.value=null,r.value=[],o.value=new Map,l.value=new Map;const m=++s;let b;try{b=await Zs({url:t.url,headers:((C=t.authHeaders)==null?void 0:C.call(t))??{},credentials:t.authCredentials})}catch(M){a.value=M instanceof Error?M.message:"fetch failed",i.value=!1;return}if(m!==s)return;let v;try{v=JSON.parse(b)}catch{a.value="Invalid notebook JSON",i.value=!1;return}if(r.value=Array.isArray(v.cells)?v.cells:[],n.value=((_=(A=v.metadata)==null?void 0:A.kernelspec)==null?void 0:_.language)||"python",u=await up(),m!==s)return;if(u){const M=u.default??u,z=(E=M.getLanguage)!=null&&E.call(M,n.value)?n.value:null;r.value.forEach((N,R)=>{if(N.cell_type==="code"){const $=d(N.source);try{const q=z?M.highlight($,{language:z,ignoreIllegals:!0}):M.highlightAuto($);o.value.set(R,q.value)}catch{}}})}const S=await f();m===s&&(S&&r.value.forEach((M,z)=>{if(M.cell_type==="markdown")try{l.value.set(z,S.render(d(M.source)))}catch{}}),i.value=!1)}function y(m){var b;return m?m.output_type==="stream"?d(m.text):m.output_type==="error"?[m.ename,m.evalue,...m.traceback||[]].filter(Boolean).join(`
|
|
24
24
|
`):(m.output_type==="execute_result"||m.output_type==="display_data")&&(b=m.data)!=null&&b["text/plain"]?d(m.data["text/plain"]):null:null}function p(m){if(!(m!=null&&m.data))return null;if(m.data["image/png"])return`data:image/png;base64,${m.data["image/png"]}`;if(m.data["image/jpeg"])return`data:image/jpeg;base64,${m.data["image/jpeg"]}`;if(m.data["image/svg+xml"]){const b=d(m.data["image/svg+xml"]);return`data:image/svg+xml;utf8,${encodeURIComponent(b)}`}return null}function x(m){return m!=null&&m.data&&m.data["text/html"]?d(m.data["text/html"]).replace(/<script[\s\S]*?<\/script>/gi,""):null}pr(h),Br(()=>{s++}),tr(()=>t.url,h);function g(m,b){return t.t?t.t(m):b}return(m,b)=>(Q(),ae("div",Ww,[L("div",Kw,[a.value?(Q(),ae("div",Xw,[b[0]||(b[0]=L("span",{class:"filex-viewer-fallback__icon"},"📓",-1)),L("p",null,le(a.value),1)])):i.value?(Q(),ae("div",Yw,[b[1]||(b[1]=L("span",{class:"filex-viewer-fallback__icon"},"⏳",-1)),L("p",null,le(g("viewer.loading","Loading…")),1)])):(Q(),ae("div",Zw,[(Q(!0),ae(yt,null,nr(r.value,(v,S)=>(Q(),ae("div",{key:S,class:"filex-viewer-ipynb__cell","data-type":v.cell_type},[v.cell_type==="code"?(Q(),ae(yt,{key:0},[L("div",Qw," In ["+le(v.execution_count??" ")+"]: ",1),L("pre",e9,[o.value.get(S)?(Q(),ae("code",{key:0,innerHTML:o.value.get(S)},null,8,t9)):(Q(),ae("code",r9,le(d(v.source)),1))]),v.outputs&&v.outputs.length?(Q(),ae("div",n9,[(Q(!0),ae(yt,null,nr(v.outputs,(C,A)=>(Q(),ae(yt,{key:A},[p(C)?(Q(),ae("img",{key:0,src:p(C)||"",class:"filex-viewer-ipynb__img",alt:`output ${A}`},null,8,a9)):x(C)?(Q(),ae("div",{key:1,class:"filex-viewer-ipynb__html",innerHTML:x(C)},null,8,i9)):y(C)?(Q(),ae("pre",{key:2,class:"filex-viewer-ipynb__out","data-type":C.output_type},le(y(C)),9,o9)):rt("",!0)],64))),128))])):rt("",!0)],64)):v.cell_type==="markdown"?(Q(),ae(yt,{key:1},[l.value.get(S)?(Q(),ae("div",{key:0,class:"filex-viewer-ipynb__md",innerHTML:l.value.get(S)},null,8,l9)):(Q(),ae("pre",s9,le(d(v.source)),1))],64)):(Q(),ae("pre",u9,le(d(v.source)),1))],8,Jw))),128))]))])]))}}),[["__scopeId","data-v-10bd637a"]])},Symbol.toStringTag,{value:"Module"})),f9={class:"filex-viewer-csv"},d9={class:"filex-viewer-csv__pane"},h9={key:0,class:"filex-viewer-fallback"},p9={key:1,class:"filex-viewer-fallback"},v9={key:2,class:"filex-viewer-csv__table"},m9={class:"filex-viewer-csv__rownum"},g9={key:0,class:"filex-viewer-csv__pager"},b9=["disabled"],y9={class:"filex-viewer-csv__pageno"},x9=["disabled"],yc=100,xp=1e3,_p=Object.freeze(Object.defineProperty({__proto__:null,default:Jr(qt({__name:"CsvViewer",props:{url:{},ext:{},t:{type:Function},authHeaders:{type:Function},authCredentials:{}},setup(e){const t=e,r=he([]),n=he(null),a=he(!0),i=he(!0),o=he(""),l=he(1),s=he(","),u=he("auto");let c=0;function f(v){const S=v.split(/\r?\n/).slice(0,5).join(`
|
|
25
|
-
`),C=(S.match(/\t/g)||[]).length,A=(S.match(/;/g)||[]).length,_=(S.match(/,/g)||[]).length;return C>_&&C>A?" ":A>_&&A>C?";":","}async function d(v,S){try{const C=await Promise.resolve().then(()=>WT);return(C.default??C).parse(v,{delimiter:S,skipEmptyLines:!0,header:!1}).data.slice(0,xp)}catch{return v.split(/\r?\n/).filter(C=>C.length>0).slice(0,xp).map(C=>C.split(S))}}async function h(){var A;a.value=!0,n.value=null,r.value=[],l.value=1;const v=++c;let S;try{S=await Zs({url:t.url,headers:((A=t.authHeaders)==null?void 0:A.call(t))??{},credentials:t.authCredentials})}catch(_){n.value=_ instanceof Error?_.message:"fetch failed",a.value=!1;return}if(v!==c)return;t.ext==="tsv"?s.value=" ":s.value=f(S.slice(0,4096));const C=u.value==="auto"?s.value:u.value;r.value=await d(S,C),a.value=!1}pr(h),tr(()=>t.url,h),tr(()=>u.value,()=>{r.value.length!==0&&h()});const y=gt(()=>!i.value||r.value.length===0?r.value.length===0?[]:r.value[0].map((v,S)=>`Col ${S+1}`):r.value[0]),p=gt(()=>i.value?r.value.slice(1):r.value),x=gt(()=>{const v=o.value.trim().toLowerCase();return v?p.value.filter(S=>S.some(C=>(C||"").toLowerCase().includes(v))):p.value}),g=gt(()=>Math.max(1,Math.ceil(x.value.length/yc))),m=gt(()=>{const v=(l.value-1)*yc;return x.value.slice(v,v+yc)});tr(o,()=>{l.value=1});function b(v,S){return t.t?t.t(v):S}return(v,S)=>(Q(),ae("div",f9,[L("div",d9,[n.value?(Q(),ae("div",h9,[S[2]||(S[2]=L("span",{class:"filex-viewer-fallback__icon"},"📊",-1)),L("p",null,le(n.value),1)])):a.value?(Q(),ae("div",p9,[S[3]||(S[3]=L("span",{class:"filex-viewer-fallback__icon"},"⏳",-1)),L("p",null,le(b("viewer.loading","Loading…")),1)])):(Q(),ae("table",v9,[L("thead",null,[L("tr",null,[S[4]||(S[4]=L("th",{class:"filex-viewer-csv__rownum"},"#",-1)),(Q(!0),ae(yt,null,nr(y.value,(C,A)=>(Q(),ae("th",{key:A},le(C),1))),128))])]),L("tbody",null,[(Q(!0),ae(yt,null,nr(m.value,(C,A)=>(Q(),ae("tr",{key:A},[L("td",m9,le((l.value-1)*100+A+1),1),(Q(!0),ae(yt,null,nr(C,(_,E)=>(Q(),ae("td",{key:E},le(_),1))),128))]))),128))])]))]),!a.value&&!n.value&&g.value>1?(Q(),ae("div",g9,[L("button",{type:"button",class:"filex-viewer-btn",disabled:l.value<=1,onClick:S[0]||(S[0]=C=>l.value--)},"‹",8,b9),L("span",y9,le(l.value)+" / "+le(g.value)+" ("+le(x.value.length)+" satır)",1),L("button",{type:"button",class:"filex-viewer-btn",disabled:l.value>=g.value,onClick:S[1]||(S[1]=C=>l.value++)},"›",8,x9)])):rt("",!0)]))}}),[["__scopeId","data-v-1a0b9c8e"]])},Symbol.toStringTag,{value:"Module"})),_9={class:"filex-viewer-archive"},w9={key:0,class:"filex-viewer-fallback"},k9={key:1,class:"filex-viewer-fallback"},S9={key:2,class:"filex-viewer-fallback"},C9={key:3,class:"filex-viewer-archive__pane"},A9={class:"filex-viewer-archive__summary"},E9={class:"filex-viewer-archive__table"},T9={class:"filex-viewer-archive__size"},M9=["data-dir"],D9={class:"filex-viewer-archive__icon"},I9={class:"filex-viewer-archive__size"},z9=Object.freeze(Object.defineProperty({__proto__:null,default:Jr(qt({__name:"ArchiveViewer",props:{url:{},filePath:{},ext:{},t:{type:Function},authHeaders:{type:Function},authCredentials:{}},setup(e){const t=e,r=he([]),n=he(!0),a=he(null);function i(c,f){return t.t?t.t(c):f}function o(c){return c<1024?`${c} B`:c<1024*1024?`${(c/1024).toFixed(1)} KB`:c<1024*1024*1024?`${(c/(1024*1024)).toFixed(1)} MB`:`${(c/(1024*1024*1024)).toFixed(2)} GB`}async function l(){if(n.value=!0,a.value=null,r.value=[],!t.filePath){a.value=i("viewer.archive.error","Could not read archive contents."),n.value=!1;return}try{const c=await fetch("/api/files/archive/list",{method:"POST",credentials:t.authCredentials||"include",headers:{"Content-Type":"application/json",...t.authHeaders?t.authHeaders():{}},body:JSON.stringify({path:t.filePath})});if(!c.ok)throw new Error(`${c.status} ${c.statusText}`);const f=await c.json();r.value=f.entries??[]}catch(c){a.value=c instanceof Error?c.message:i("viewer.archive.error","Could not read archive contents.")}finally{n.value=!1}}pr(l),tr(()=>t.filePath,l);const s=gt(()=>r.value.reduce((c,f)=>c+(f.size||0),0)),u=gt(()=>r.value.filter(c=>!c.is_dir).length);return(c,f)=>(Q(),ae("div",_9,[a.value?(Q(),ae("div",w9,[f[0]||(f[0]=L("span",{class:"filex-viewer-fallback__icon"},"🗜️",-1)),L("p",null,le(a.value),1)])):n.value?(Q(),ae("div",k9,[f[1]||(f[1]=L("span",{class:"filex-viewer-fallback__icon"},"⏳",-1)),L("p",null,le(i("viewer.loading","Loading…")),1)])):r.value.length===0?(Q(),ae("div",S9,[f[2]||(f[2]=L("span",{class:"filex-viewer-fallback__icon"},"🗜️",-1)),L("p",null,le(i("viewer.archive.empty","Archive is empty.")),1)])):(Q(),ae("div",C9,[L("div",A9,le(u.value)+" "+le(i("viewer.archive.entries","{n} files").replace("{n}",String(u.value)))+" · "+le(o(s.value)),1),L("table",E9,[L("thead",null,[L("tr",null,[L("th",null,le(i("viewer.name","Name")),1),L("th",T9,le(i("viewer.size","Size")),1)])]),L("tbody",null,[(Q(!0),ae(yt,null,nr(r.value,(d,h)=>(Q(),ae("tr",{key:h,"data-dir":d.is_dir?"1":"0"},[L("td",null,[L("span",D9,le(d.is_dir?"📁":"📄"),1),gr(" "+le(d.name),1)]),L("td",I9,le(d.is_dir?"":o(d.size)),1)],8,M9))),128))])])]))]))}}),[["__scopeId","data-v-d3ad0fc4"]])},Symbol.toStringTag,{value:"Module"}));class He extends Error{constructor(t,r){var n="KaTeX parse error: "+t,a,i,o=r&&r.loc;if(o&&o.start<=o.end){var l=o.lexer.input;a=o.start,i=o.end,a===l.length?n+=" at end of input: ":n+=" at position "+(a+1)+": ";var s=l.slice(a,i).replace(/[^]/g,"$&̲"),u;a>15?u="…"+l.slice(a-15,a):u=l.slice(0,a);var c;i+15<l.length?c=l.slice(i,i+15)+"…":c=l.slice(i),n+=u+s+c}super(n),this.name="ParseError",Object.setPrototypeOf(this,He.prototype),this.position=a,a!=null&&i!=null&&(this.length=i-a),this.rawMessage=t}}var F9=/([A-Z])/g,xc=e=>e.replace(F9,"-$1").toLowerCase(),O9={"&":"&",">":">","<":"<",'"':""","'":"'"},P9=/[&><"']/g,qr=e=>String(e).replace(P9,t=>O9[t]),Js=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?Js(e.body[0]):e:e.type==="font"?Js(e.body):e,R9=new Set(["mathord","textord","atom"]),La=e=>R9.has(Js(e).type),L9=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?t[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():"_relative"},Qs={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function B9(e){if("default"in e)return e.default;var t=e.type,r=Array.isArray(t)?t[0]:t;if(typeof r!="string")return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class _c{constructor(t){t===void 0&&(t={}),t=t||{};for(var r of Object.keys(Qs)){var n=Qs[r],a=t[r];this[r]=a!==void 0?n.processor?n.processor(a):a:B9(n)}}reportNonstrict(t,r,n){var a=this.strict;if(typeof a=="function"&&(a=a(t,r,n)),!(!a||a==="ignore")){if(a===!0||a==="error")throw new He("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+t+"]"),n);a==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+t+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+a+"': "+r+" ["+t+"]"))}}useStrictBehavior(t,r,n){var a=this.strict;if(typeof a=="function")try{a=a(t,r,n)}catch{a="error"}return!a||a==="ignore"?!1:a===!0||a==="error"?!0:a==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+t+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+a+"': "+r+" ["+t+"]")),!1)}isTrusted(t){if("url"in t&&t.url&&!t.protocol){var r=L9(t.url);if(r==null)return!1;t.protocol=r}var n=typeof this.trust=="function"?this.trust(t):this.trust;return!!n}}class li{constructor(t,r,n){this.id=t,this.size=r,this.cramped=n}sup(){return va[N9[this.id]]}sub(){return va[$9[this.id]]}fracNum(){return va[U9[this.id]]}fracDen(){return va[H9[this.id]]}cramp(){return va[j9[this.id]]}text(){return va[G9[this.id]]}isTight(){return this.size>=2}}var wc=0,e0=1,go=2,Ba=3,Tl=4,zn=5,bo=6,Qr=7,va=[new li(wc,0,!1),new li(e0,0,!0),new li(go,1,!1),new li(Ba,1,!0),new li(Tl,2,!1),new li(zn,2,!0),new li(bo,3,!1),new li(Qr,3,!0)],N9=[Tl,zn,Tl,zn,bo,Qr,bo,Qr],$9=[zn,zn,zn,zn,Qr,Qr,Qr,Qr],U9=[go,Ba,Tl,zn,bo,Qr,bo,Qr],H9=[Ba,Ba,zn,zn,Qr,Qr,Qr,Qr],j9=[e0,e0,Ba,Ba,zn,zn,Qr,Qr],G9=[wc,e0,go,Ba,go,Ba,go,Ba],Ct={DISPLAY:va[wc],TEXT:va[go],SCRIPT:va[Tl],SCRIPTSCRIPT:va[bo]},kc=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function V9(e){for(var t=0;t<kc.length;t++)for(var r=kc[t],n=0;n<r.blocks.length;n++){var a=r.blocks[n];if(e>=a[0]&&e<=a[1])return r.name}return null}var t0=[];kc.forEach(e=>e.blocks.forEach(t=>t0.push(...t)));function wp(e){for(var t=0;t<t0.length;t+=2)if(e>=t0[t]&&e<=t0[t+1])return!0;return!1}var Sr=e=>e+" "+e,yo=80,q9=function(t,r){return"M95,"+(622+t+r)+`
|
|
25
|
+
`),C=(S.match(/\t/g)||[]).length,A=(S.match(/;/g)||[]).length,_=(S.match(/,/g)||[]).length;return C>_&&C>A?" ":A>_&&A>C?";":","}async function d(v,S){try{const C=await Promise.resolve().then(()=>WT);return(C.default??C).parse(v,{delimiter:S,skipEmptyLines:!0,header:!1}).data.slice(0,xp)}catch{return v.split(/\r?\n/).filter(C=>C.length>0).slice(0,xp).map(C=>C.split(S))}}async function h(){var A;a.value=!0,n.value=null,r.value=[],l.value=1;const v=++c;let S;try{S=await Zs({url:t.url,headers:((A=t.authHeaders)==null?void 0:A.call(t))??{},credentials:t.authCredentials})}catch(_){n.value=_ instanceof Error?_.message:"fetch failed",a.value=!1;return}if(v!==c)return;t.ext==="tsv"?s.value=" ":s.value=f(S.slice(0,4096));const C=u.value==="auto"?s.value:u.value;r.value=await d(S,C),a.value=!1}pr(h),tr(()=>t.url,h),tr(()=>u.value,()=>{r.value.length!==0&&h()});const y=mt(()=>!i.value||r.value.length===0?r.value.length===0?[]:r.value[0].map((v,S)=>`Col ${S+1}`):r.value[0]),p=mt(()=>i.value?r.value.slice(1):r.value),x=mt(()=>{const v=o.value.trim().toLowerCase();return v?p.value.filter(S=>S.some(C=>(C||"").toLowerCase().includes(v))):p.value}),g=mt(()=>Math.max(1,Math.ceil(x.value.length/yc))),m=mt(()=>{const v=(l.value-1)*yc;return x.value.slice(v,v+yc)});tr(o,()=>{l.value=1});function b(v,S){return t.t?t.t(v):S}return(v,S)=>(Q(),ae("div",f9,[L("div",d9,[n.value?(Q(),ae("div",h9,[S[2]||(S[2]=L("span",{class:"filex-viewer-fallback__icon"},"📊",-1)),L("p",null,le(n.value),1)])):a.value?(Q(),ae("div",p9,[S[3]||(S[3]=L("span",{class:"filex-viewer-fallback__icon"},"⏳",-1)),L("p",null,le(b("viewer.loading","Loading…")),1)])):(Q(),ae("table",v9,[L("thead",null,[L("tr",null,[S[4]||(S[4]=L("th",{class:"filex-viewer-csv__rownum"},"#",-1)),(Q(!0),ae(yt,null,nr(y.value,(C,A)=>(Q(),ae("th",{key:A},le(C),1))),128))])]),L("tbody",null,[(Q(!0),ae(yt,null,nr(m.value,(C,A)=>(Q(),ae("tr",{key:A},[L("td",m9,le((l.value-1)*100+A+1),1),(Q(!0),ae(yt,null,nr(C,(_,E)=>(Q(),ae("td",{key:E},le(_),1))),128))]))),128))])]))]),!a.value&&!n.value&&g.value>1?(Q(),ae("div",g9,[L("button",{type:"button",class:"filex-viewer-btn",disabled:l.value<=1,onClick:S[0]||(S[0]=C=>l.value--)},"‹",8,b9),L("span",y9,le(l.value)+" / "+le(g.value)+" ("+le(x.value.length)+" satır)",1),L("button",{type:"button",class:"filex-viewer-btn",disabled:l.value>=g.value,onClick:S[1]||(S[1]=C=>l.value++)},"›",8,x9)])):rt("",!0)]))}}),[["__scopeId","data-v-1a0b9c8e"]])},Symbol.toStringTag,{value:"Module"})),_9={class:"filex-viewer-archive"},w9={key:0,class:"filex-viewer-fallback"},k9={key:1,class:"filex-viewer-fallback"},S9={key:2,class:"filex-viewer-fallback"},C9={key:3,class:"filex-viewer-archive__pane"},A9={class:"filex-viewer-archive__summary"},E9={class:"filex-viewer-archive__table"},T9={class:"filex-viewer-archive__size"},M9=["data-dir"],D9={class:"filex-viewer-archive__icon"},I9={class:"filex-viewer-archive__size"},z9=Object.freeze(Object.defineProperty({__proto__:null,default:Jr(qt({__name:"ArchiveViewer",props:{url:{},filePath:{},ext:{},t:{type:Function},authHeaders:{type:Function},authCredentials:{}},setup(e){const t=e,r=he([]),n=he(!0),a=he(null);function i(c,f){return t.t?t.t(c):f}function o(c){return c<1024?`${c} B`:c<1024*1024?`${(c/1024).toFixed(1)} KB`:c<1024*1024*1024?`${(c/(1024*1024)).toFixed(1)} MB`:`${(c/(1024*1024*1024)).toFixed(2)} GB`}async function l(){if(n.value=!0,a.value=null,r.value=[],!t.filePath){a.value=i("viewer.archive.error","Could not read archive contents."),n.value=!1;return}try{const c=await fetch("/api/files/archive/list",{method:"POST",credentials:t.authCredentials||"include",headers:{"Content-Type":"application/json",...t.authHeaders?t.authHeaders():{}},body:JSON.stringify({path:t.filePath})});if(!c.ok)throw new Error(`${c.status} ${c.statusText}`);const f=await c.json();r.value=f.entries??[]}catch(c){a.value=c instanceof Error?c.message:i("viewer.archive.error","Could not read archive contents.")}finally{n.value=!1}}pr(l),tr(()=>t.filePath,l);const s=mt(()=>r.value.reduce((c,f)=>c+(f.size||0),0)),u=mt(()=>r.value.filter(c=>!c.is_dir).length);return(c,f)=>(Q(),ae("div",_9,[a.value?(Q(),ae("div",w9,[f[0]||(f[0]=L("span",{class:"filex-viewer-fallback__icon"},"🗜️",-1)),L("p",null,le(a.value),1)])):n.value?(Q(),ae("div",k9,[f[1]||(f[1]=L("span",{class:"filex-viewer-fallback__icon"},"⏳",-1)),L("p",null,le(i("viewer.loading","Loading…")),1)])):r.value.length===0?(Q(),ae("div",S9,[f[2]||(f[2]=L("span",{class:"filex-viewer-fallback__icon"},"🗜️",-1)),L("p",null,le(i("viewer.archive.empty","Archive is empty.")),1)])):(Q(),ae("div",C9,[L("div",A9,le(u.value)+" "+le(i("viewer.archive.entries","{n} files").replace("{n}",String(u.value)))+" · "+le(o(s.value)),1),L("table",E9,[L("thead",null,[L("tr",null,[L("th",null,le(i("viewer.name","Name")),1),L("th",T9,le(i("viewer.size","Size")),1)])]),L("tbody",null,[(Q(!0),ae(yt,null,nr(r.value,(d,h)=>(Q(),ae("tr",{key:h,"data-dir":d.is_dir?"1":"0"},[L("td",null,[L("span",D9,le(d.is_dir?"📁":"📄"),1),gr(" "+le(d.name),1)]),L("td",I9,le(d.is_dir?"":o(d.size)),1)],8,M9))),128))])])]))]))}}),[["__scopeId","data-v-d3ad0fc4"]])},Symbol.toStringTag,{value:"Module"}));class He extends Error{constructor(t,r){var n="KaTeX parse error: "+t,a,i,o=r&&r.loc;if(o&&o.start<=o.end){var l=o.lexer.input;a=o.start,i=o.end,a===l.length?n+=" at end of input: ":n+=" at position "+(a+1)+": ";var s=l.slice(a,i).replace(/[^]/g,"$&̲"),u;a>15?u="…"+l.slice(a-15,a):u=l.slice(0,a);var c;i+15<l.length?c=l.slice(i,i+15)+"…":c=l.slice(i),n+=u+s+c}super(n),this.name="ParseError",Object.setPrototypeOf(this,He.prototype),this.position=a,a!=null&&i!=null&&(this.length=i-a),this.rawMessage=t}}var F9=/([A-Z])/g,xc=e=>e.replace(F9,"-$1").toLowerCase(),O9={"&":"&",">":">","<":"<",'"':""","'":"'"},P9=/[&><"']/g,qr=e=>String(e).replace(P9,t=>O9[t]),Js=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?Js(e.body[0]):e:e.type==="font"?Js(e.body):e,R9=new Set(["mathord","textord","atom"]),La=e=>R9.has(Js(e).type),L9=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?t[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():"_relative"},Qs={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function B9(e){if("default"in e)return e.default;var t=e.type,r=Array.isArray(t)?t[0]:t;if(typeof r!="string")return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class _c{constructor(t){t===void 0&&(t={}),t=t||{};for(var r of Object.keys(Qs)){var n=Qs[r],a=t[r];this[r]=a!==void 0?n.processor?n.processor(a):a:B9(n)}}reportNonstrict(t,r,n){var a=this.strict;if(typeof a=="function"&&(a=a(t,r,n)),!(!a||a==="ignore")){if(a===!0||a==="error")throw new He("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+t+"]"),n);a==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+t+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+a+"': "+r+" ["+t+"]"))}}useStrictBehavior(t,r,n){var a=this.strict;if(typeof a=="function")try{a=a(t,r,n)}catch{a="error"}return!a||a==="ignore"?!1:a===!0||a==="error"?!0:a==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+t+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+a+"': "+r+" ["+t+"]")),!1)}isTrusted(t){if("url"in t&&t.url&&!t.protocol){var r=L9(t.url);if(r==null)return!1;t.protocol=r}var n=typeof this.trust=="function"?this.trust(t):this.trust;return!!n}}class li{constructor(t,r,n){this.id=t,this.size=r,this.cramped=n}sup(){return va[N9[this.id]]}sub(){return va[$9[this.id]]}fracNum(){return va[U9[this.id]]}fracDen(){return va[H9[this.id]]}cramp(){return va[j9[this.id]]}text(){return va[G9[this.id]]}isTight(){return this.size>=2}}var wc=0,e0=1,go=2,Ba=3,Tl=4,zn=5,bo=6,Qr=7,va=[new li(wc,0,!1),new li(e0,0,!0),new li(go,1,!1),new li(Ba,1,!0),new li(Tl,2,!1),new li(zn,2,!0),new li(bo,3,!1),new li(Qr,3,!0)],N9=[Tl,zn,Tl,zn,bo,Qr,bo,Qr],$9=[zn,zn,zn,zn,Qr,Qr,Qr,Qr],U9=[go,Ba,Tl,zn,bo,Qr,bo,Qr],H9=[Ba,Ba,zn,zn,Qr,Qr,Qr,Qr],j9=[e0,e0,Ba,Ba,zn,zn,Qr,Qr],G9=[wc,e0,go,Ba,go,Ba,go,Ba],Ct={DISPLAY:va[wc],TEXT:va[go],SCRIPT:va[Tl],SCRIPTSCRIPT:va[bo]},kc=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function V9(e){for(var t=0;t<kc.length;t++)for(var r=kc[t],n=0;n<r.blocks.length;n++){var a=r.blocks[n];if(e>=a[0]&&e<=a[1])return r.name}return null}var t0=[];kc.forEach(e=>e.blocks.forEach(t=>t0.push(...t)));function wp(e){for(var t=0;t<t0.length;t+=2)if(e>=t0[t]&&e<=t0[t+1])return!0;return!1}var Sr=e=>e+" "+e,yo=80,q9=function(t,r){return"M95,"+(622+t+r)+`
|
|
26
26
|
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
|
27
27
|
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
|
|
28
28
|
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
|
|
@@ -273,12 +273,12 @@ c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
|
|
|
273
273
|
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
|
|
274
274
|
l0,-`+(r+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
|
|
275
275
|
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};class xo{constructor(t){this.children=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return this.classes.includes(t)}toNode(){for(var t=document.createDocumentFragment(),r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t}toMarkup(){for(var t="",r=0;r<this.children.length;r++)t+=this.children[r].toMarkup();return t}toText(){var t=r=>r.toText();return this.children.map(t).join("")}}var Sc={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},rk={ex:!0,em:!0,mu:!0},Sp=function(t){return typeof t!="string"&&(t=t.unit),t in Sc||t in rk||t==="ex"},ur=function(t,r){var n;if(t.unit in Sc)n=Sc[t.unit]/r.fontMetrics().ptPerEm/r.sizeMultiplier;else if(t.unit==="mu")n=r.fontMetrics().cssEmPerMu;else{var a;if(r.style.isTight()?a=r.havingStyle(r.style.text()):a=r,t.unit==="ex")n=a.fontMetrics().xHeight;else if(t.unit==="em")n=a.fontMetrics().quad;else throw new He("Invalid unit: '"+t.unit+"'");a!==r&&(n*=a.sizeMultiplier/r.sizeMultiplier)}return Math.min(t.number*n,r.maxSize)},Ye=function(t){return+t.toFixed(4)+"em"},si=function(t){return t.filter(r=>r).join(" ")},Cp=function(t,r,n){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},r){r.style.isTight()&&this.classes.push("mtight");var a=r.getColor();a&&(this.style.color=a)}},Ap=function(t){var r=document.createElement(t);r.className=si(this.classes);for(var n of Object.keys(this.style))r.style[n]=this.style[n];for(var a of Object.keys(this.attributes))r.setAttribute(a,this.attributes[a]);for(var i=0;i<this.children.length;i++)r.appendChild(this.children[i].toNode());return r},nk=/[\s"'>/=\x00-\x1f]/,Ep=function(t){var r="<"+t;this.classes.length&&(r+=' class="'+qr(si(this.classes))+'"');var n="";for(var a of Object.keys(this.style))n+=xc(a)+":"+this.style[a]+";";n&&(r+=' style="'+qr(n)+'"');for(var i of Object.keys(this.attributes)){if(nk.test(i))throw new He("Invalid attribute name '"+i+"'");r+=" "+i+'="'+qr(this.attributes[i])+'"'}r+=">";for(var o=0;o<this.children.length;o++)r+=this.children[o].toMarkup();return r+="</"+t+">",r};class _o{constructor(t,r,n,a){Cp.call(this,t,n,a),this.children=r||[]}setAttribute(t,r){this.attributes[t]=r}hasClass(t){return this.classes.includes(t)}toNode(){return Ap.call(this,"span")}toMarkup(){return Ep.call(this,"span")}}class r0{constructor(t,r,n,a){Cp.call(this,r,a),this.children=n||[],this.setAttribute("href",t)}setAttribute(t,r){this.attributes[t]=r}hasClass(t){return this.classes.includes(t)}toNode(){return Ap.call(this,"a")}toMarkup(){return Ep.call(this,"a")}}class ak{constructor(t,r,n){this.alt=r,this.src=t,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createElement("img");t.src=this.src,t.alt=this.alt,t.className="mord";for(var r of Object.keys(this.style))t.style[r]=this.style[r];return t}toMarkup(){var t='<img src="'+qr(this.src)+'"'+(' alt="'+qr(this.alt)+'"'),r="";for(var n of Object.keys(this.style))r+=xc(n)+":"+this.style[n]+";";return r&&(t+=' style="'+qr(r)+'"'),t+="'/>",t}}var ik={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class vn{constructor(t,r,n,a,i,o,l,s){this.text=t,this.height=r||0,this.depth=n||0,this.italic=a||0,this.skew=i||0,this.width=o||0,this.classes=l||[],this.style=s||{},this.maxFontSize=0;var u=V9(this.text.charCodeAt(0));u&&this.classes.push(u+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=ik[this.text])}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createTextNode(this.text),r=null;this.italic>0&&(r=document.createElement("span"),r.style.marginRight=Ye(this.italic)),this.classes.length>0&&(r=r||document.createElement("span"),r.className=si(this.classes));for(var n of Object.keys(this.style))r=r||document.createElement("span"),r.style[n]=this.style[n];return r?(r.appendChild(t),r):t}toMarkup(){var t=!1,r="<span";this.classes.length&&(t=!0,r+=' class="',r+=qr(si(this.classes)),r+='"');var n="";this.italic>0&&(n+="margin-right:"+Ye(this.italic)+";");for(var a of Object.keys(this.style))n+=xc(a)+":"+this.style[a]+";";n&&(t=!0,r+=' style="'+qr(n)+'"');var i=qr(this.text);return t?(r+=">",r+=i,r+="</span>",r):i}}class Na{constructor(t,r){this.children=t||[],this.attributes=r||{}}toNode(){var t="http://www.w3.org/2000/svg",r=document.createElementNS(t,"svg");for(var n of Object.keys(this.attributes))r.setAttribute(n,this.attributes[n]);for(var a=0;a<this.children.length;a++)r.appendChild(this.children[a].toNode());return r}toMarkup(){var t='<svg xmlns="http://www.w3.org/2000/svg"';for(var r of Object.keys(this.attributes))t+=" "+r+'="'+qr(this.attributes[r])+'"';t+=">";for(var n=0;n<this.children.length;n++)t+=this.children[n].toMarkup();return t+="</svg>",t}}class ui{constructor(t,r){this.pathName=t,this.alternate=r}toNode(){var t="http://www.w3.org/2000/svg",r=document.createElementNS(t,"path");return this.alternate?r.setAttribute("d",this.alternate):r.setAttribute("d",kp[this.pathName]),r}toMarkup(){return this.alternate?'<path d="'+qr(this.alternate)+'"/>':'<path d="'+qr(kp[this.pathName])+'"/>'}}class Cc{constructor(t){this.attributes=t||{}}toNode(){var t="http://www.w3.org/2000/svg",r=document.createElementNS(t,"line");for(var n of Object.keys(this.attributes))r.setAttribute(n,this.attributes[n]);return r}toMarkup(){var t="<line";for(var r of Object.keys(this.attributes))t+=" "+r+'="'+qr(this.attributes[r])+'"';return t+="/>",t}}function ok(e){if(e instanceof vn)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}function lk(e){if(e instanceof _o)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}var sk=e=>e instanceof _o||e instanceof r0||e instanceof xo,ma={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},n0={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},Tp={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function Mp(e,t){ma[e]=t}function Ac(e,t,r){if(!ma[t])throw new Error("Font metrics not found for font: "+t+".");var n=e.charCodeAt(0),a=ma[t][n];if(!a&&e[0]in Tp&&(n=Tp[e[0]].charCodeAt(0),a=ma[t][n]),!a&&r==="text"&&wp(n)&&(a=ma[t][77]),a)return{depth:a[0],height:a[1],italic:a[2],skew:a[3],width:a[4]}}var Ec={};function uk(e){var t;if(e>=5?t=0:e>=3?t=1:t=2,!Ec[t]){var r=Ec[t]={cssEmPerMu:n0.quad[t]/18};for(var n in n0)n0.hasOwnProperty(n)&&(r[n]=n0[n][t])}return Ec[t]}var ck={bin:1,close:1,inner:1,open:1,punct:1,rel:1},fk={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},or={math:{},text:{}};function w(e,t,r,n,a,i){or[e][a]={font:t,group:r,replace:n},i&&n&&(or[e][n]=or[e][a])}var T="math",Re="text",F="main",Y="ams",lr="accent-token",ut="bin",en="close",wo="inner",_t="mathord",br="op-token",mn="open",Ml="punct",J="rel",$a="spacing",ce="textord";w(T,F,J,"≡","\\equiv",!0),w(T,F,J,"≺","\\prec",!0),w(T,F,J,"≻","\\succ",!0),w(T,F,J,"∼","\\sim",!0),w(T,F,J,"⊥","\\perp"),w(T,F,J,"⪯","\\preceq",!0),w(T,F,J,"⪰","\\succeq",!0),w(T,F,J,"≃","\\simeq",!0),w(T,F,J,"∣","\\mid",!0),w(T,F,J,"≪","\\ll",!0),w(T,F,J,"≫","\\gg",!0),w(T,F,J,"≍","\\asymp",!0),w(T,F,J,"∥","\\parallel"),w(T,F,J,"⋈","\\bowtie",!0),w(T,F,J,"⌣","\\smile",!0),w(T,F,J,"⊑","\\sqsubseteq",!0),w(T,F,J,"⊒","\\sqsupseteq",!0),w(T,F,J,"≐","\\doteq",!0),w(T,F,J,"⌢","\\frown",!0),w(T,F,J,"∋","\\ni",!0),w(T,F,J,"∝","\\propto",!0),w(T,F,J,"⊢","\\vdash",!0),w(T,F,J,"⊣","\\dashv",!0),w(T,F,J,"∋","\\owns"),w(T,F,Ml,".","\\ldotp"),w(T,F,Ml,"⋅","\\cdotp"),w(T,F,Ml,"⋅","·"),w(Re,F,ce,"⋅","·"),w(T,F,ce,"#","\\#"),w(Re,F,ce,"#","\\#"),w(T,F,ce,"&","\\&"),w(Re,F,ce,"&","\\&"),w(T,F,ce,"ℵ","\\aleph",!0),w(T,F,ce,"∀","\\forall",!0),w(T,F,ce,"ℏ","\\hbar",!0),w(T,F,ce,"∃","\\exists",!0),w(T,F,ce,"∇","\\nabla",!0),w(T,F,ce,"♭","\\flat",!0),w(T,F,ce,"ℓ","\\ell",!0),w(T,F,ce,"♮","\\natural",!0),w(T,F,ce,"♣","\\clubsuit",!0),w(T,F,ce,"℘","\\wp",!0),w(T,F,ce,"♯","\\sharp",!0),w(T,F,ce,"♢","\\diamondsuit",!0),w(T,F,ce,"ℜ","\\Re",!0),w(T,F,ce,"♡","\\heartsuit",!0),w(T,F,ce,"ℑ","\\Im",!0),w(T,F,ce,"♠","\\spadesuit",!0),w(T,F,ce,"§","\\S",!0),w(Re,F,ce,"§","\\S"),w(T,F,ce,"¶","\\P",!0),w(Re,F,ce,"¶","\\P"),w(T,F,ce,"†","\\dag"),w(Re,F,ce,"†","\\dag"),w(Re,F,ce,"†","\\textdagger"),w(T,F,ce,"‡","\\ddag"),w(Re,F,ce,"‡","\\ddag"),w(Re,F,ce,"‡","\\textdaggerdbl"),w(T,F,en,"⎱","\\rmoustache",!0),w(T,F,mn,"⎰","\\lmoustache",!0),w(T,F,en,"⟯","\\rgroup",!0),w(T,F,mn,"⟮","\\lgroup",!0),w(T,F,ut,"∓","\\mp",!0),w(T,F,ut,"⊖","\\ominus",!0),w(T,F,ut,"⊎","\\uplus",!0),w(T,F,ut,"⊓","\\sqcap",!0),w(T,F,ut,"∗","\\ast"),w(T,F,ut,"⊔","\\sqcup",!0),w(T,F,ut,"◯","\\bigcirc",!0),w(T,F,ut,"∙","\\bullet",!0),w(T,F,ut,"‡","\\ddagger"),w(T,F,ut,"≀","\\wr",!0),w(T,F,ut,"⨿","\\amalg"),w(T,F,ut,"&","\\And"),w(T,F,J,"⟵","\\longleftarrow",!0),w(T,F,J,"⇐","\\Leftarrow",!0),w(T,F,J,"⟸","\\Longleftarrow",!0),w(T,F,J,"⟶","\\longrightarrow",!0),w(T,F,J,"⇒","\\Rightarrow",!0),w(T,F,J,"⟹","\\Longrightarrow",!0),w(T,F,J,"↔","\\leftrightarrow",!0),w(T,F,J,"⟷","\\longleftrightarrow",!0),w(T,F,J,"⇔","\\Leftrightarrow",!0),w(T,F,J,"⟺","\\Longleftrightarrow",!0),w(T,F,J,"↦","\\mapsto",!0),w(T,F,J,"⟼","\\longmapsto",!0),w(T,F,J,"↗","\\nearrow",!0),w(T,F,J,"↩","\\hookleftarrow",!0),w(T,F,J,"↪","\\hookrightarrow",!0),w(T,F,J,"↘","\\searrow",!0),w(T,F,J,"↼","\\leftharpoonup",!0),w(T,F,J,"⇀","\\rightharpoonup",!0),w(T,F,J,"↙","\\swarrow",!0),w(T,F,J,"↽","\\leftharpoondown",!0),w(T,F,J,"⇁","\\rightharpoondown",!0),w(T,F,J,"↖","\\nwarrow",!0),w(T,F,J,"⇌","\\rightleftharpoons",!0),w(T,Y,J,"≮","\\nless",!0),w(T,Y,J,"","\\@nleqslant"),w(T,Y,J,"","\\@nleqq"),w(T,Y,J,"⪇","\\lneq",!0),w(T,Y,J,"≨","\\lneqq",!0),w(T,Y,J,"","\\@lvertneqq"),w(T,Y,J,"⋦","\\lnsim",!0),w(T,Y,J,"⪉","\\lnapprox",!0),w(T,Y,J,"⊀","\\nprec",!0),w(T,Y,J,"⋠","\\npreceq",!0),w(T,Y,J,"⋨","\\precnsim",!0),w(T,Y,J,"⪹","\\precnapprox",!0),w(T,Y,J,"≁","\\nsim",!0),w(T,Y,J,"","\\@nshortmid"),w(T,Y,J,"∤","\\nmid",!0),w(T,Y,J,"⊬","\\nvdash",!0),w(T,Y,J,"⊭","\\nvDash",!0),w(T,Y,J,"⋪","\\ntriangleleft"),w(T,Y,J,"⋬","\\ntrianglelefteq",!0),w(T,Y,J,"⊊","\\subsetneq",!0),w(T,Y,J,"","\\@varsubsetneq"),w(T,Y,J,"⫋","\\subsetneqq",!0),w(T,Y,J,"","\\@varsubsetneqq"),w(T,Y,J,"≯","\\ngtr",!0),w(T,Y,J,"","\\@ngeqslant"),w(T,Y,J,"","\\@ngeqq"),w(T,Y,J,"⪈","\\gneq",!0),w(T,Y,J,"≩","\\gneqq",!0),w(T,Y,J,"","\\@gvertneqq"),w(T,Y,J,"⋧","\\gnsim",!0),w(T,Y,J,"⪊","\\gnapprox",!0),w(T,Y,J,"⊁","\\nsucc",!0),w(T,Y,J,"⋡","\\nsucceq",!0),w(T,Y,J,"⋩","\\succnsim",!0),w(T,Y,J,"⪺","\\succnapprox",!0),w(T,Y,J,"≆","\\ncong",!0),w(T,Y,J,"","\\@nshortparallel"),w(T,Y,J,"∦","\\nparallel",!0),w(T,Y,J,"⊯","\\nVDash",!0),w(T,Y,J,"⋫","\\ntriangleright"),w(T,Y,J,"⋭","\\ntrianglerighteq",!0),w(T,Y,J,"","\\@nsupseteqq"),w(T,Y,J,"⊋","\\supsetneq",!0),w(T,Y,J,"","\\@varsupsetneq"),w(T,Y,J,"⫌","\\supsetneqq",!0),w(T,Y,J,"","\\@varsupsetneqq"),w(T,Y,J,"⊮","\\nVdash",!0),w(T,Y,J,"⪵","\\precneqq",!0),w(T,Y,J,"⪶","\\succneqq",!0),w(T,Y,J,"","\\@nsubseteqq"),w(T,Y,ut,"⊴","\\unlhd"),w(T,Y,ut,"⊵","\\unrhd"),w(T,Y,J,"↚","\\nleftarrow",!0),w(T,Y,J,"↛","\\nrightarrow",!0),w(T,Y,J,"⇍","\\nLeftarrow",!0),w(T,Y,J,"⇏","\\nRightarrow",!0),w(T,Y,J,"↮","\\nleftrightarrow",!0),w(T,Y,J,"⇎","\\nLeftrightarrow",!0),w(T,Y,J,"△","\\vartriangle"),w(T,Y,ce,"ℏ","\\hslash"),w(T,Y,ce,"▽","\\triangledown"),w(T,Y,ce,"◊","\\lozenge"),w(T,Y,ce,"Ⓢ","\\circledS"),w(T,Y,ce,"®","\\circledR"),w(Re,Y,ce,"®","\\circledR"),w(T,Y,ce,"∡","\\measuredangle",!0),w(T,Y,ce,"∄","\\nexists"),w(T,Y,ce,"℧","\\mho"),w(T,Y,ce,"Ⅎ","\\Finv",!0),w(T,Y,ce,"⅁","\\Game",!0),w(T,Y,ce,"‵","\\backprime"),w(T,Y,ce,"▲","\\blacktriangle"),w(T,Y,ce,"▼","\\blacktriangledown"),w(T,Y,ce,"■","\\blacksquare"),w(T,Y,ce,"⧫","\\blacklozenge"),w(T,Y,ce,"★","\\bigstar"),w(T,Y,ce,"∢","\\sphericalangle",!0),w(T,Y,ce,"∁","\\complement",!0),w(T,Y,ce,"ð","\\eth",!0),w(Re,F,ce,"ð","ð"),w(T,Y,ce,"╱","\\diagup"),w(T,Y,ce,"╲","\\diagdown"),w(T,Y,ce,"□","\\square"),w(T,Y,ce,"□","\\Box"),w(T,Y,ce,"◊","\\Diamond"),w(T,Y,ce,"¥","\\yen",!0),w(Re,Y,ce,"¥","\\yen",!0),w(T,Y,ce,"✓","\\checkmark",!0),w(Re,Y,ce,"✓","\\checkmark"),w(T,Y,ce,"ℶ","\\beth",!0),w(T,Y,ce,"ℸ","\\daleth",!0),w(T,Y,ce,"ℷ","\\gimel",!0),w(T,Y,ce,"ϝ","\\digamma",!0),w(T,Y,ce,"ϰ","\\varkappa"),w(T,Y,mn,"┌","\\@ulcorner",!0),w(T,Y,en,"┐","\\@urcorner",!0),w(T,Y,mn,"└","\\@llcorner",!0),w(T,Y,en,"┘","\\@lrcorner",!0),w(T,Y,J,"≦","\\leqq",!0),w(T,Y,J,"⩽","\\leqslant",!0),w(T,Y,J,"⪕","\\eqslantless",!0),w(T,Y,J,"≲","\\lesssim",!0),w(T,Y,J,"⪅","\\lessapprox",!0),w(T,Y,J,"≊","\\approxeq",!0),w(T,Y,ut,"⋖","\\lessdot"),w(T,Y,J,"⋘","\\lll",!0),w(T,Y,J,"≶","\\lessgtr",!0),w(T,Y,J,"⋚","\\lesseqgtr",!0),w(T,Y,J,"⪋","\\lesseqqgtr",!0),w(T,Y,J,"≑","\\doteqdot"),w(T,Y,J,"≓","\\risingdotseq",!0),w(T,Y,J,"≒","\\fallingdotseq",!0),w(T,Y,J,"∽","\\backsim",!0),w(T,Y,J,"⋍","\\backsimeq",!0),w(T,Y,J,"⫅","\\subseteqq",!0),w(T,Y,J,"⋐","\\Subset",!0),w(T,Y,J,"⊏","\\sqsubset",!0),w(T,Y,J,"≼","\\preccurlyeq",!0),w(T,Y,J,"⋞","\\curlyeqprec",!0),w(T,Y,J,"≾","\\precsim",!0),w(T,Y,J,"⪷","\\precapprox",!0),w(T,Y,J,"⊲","\\vartriangleleft"),w(T,Y,J,"⊴","\\trianglelefteq"),w(T,Y,J,"⊨","\\vDash",!0),w(T,Y,J,"⊪","\\Vvdash",!0),w(T,Y,J,"⌣","\\smallsmile"),w(T,Y,J,"⌢","\\smallfrown"),w(T,Y,J,"≏","\\bumpeq",!0),w(T,Y,J,"≎","\\Bumpeq",!0),w(T,Y,J,"≧","\\geqq",!0),w(T,Y,J,"⩾","\\geqslant",!0),w(T,Y,J,"⪖","\\eqslantgtr",!0),w(T,Y,J,"≳","\\gtrsim",!0),w(T,Y,J,"⪆","\\gtrapprox",!0),w(T,Y,ut,"⋗","\\gtrdot"),w(T,Y,J,"⋙","\\ggg",!0),w(T,Y,J,"≷","\\gtrless",!0),w(T,Y,J,"⋛","\\gtreqless",!0),w(T,Y,J,"⪌","\\gtreqqless",!0),w(T,Y,J,"≖","\\eqcirc",!0),w(T,Y,J,"≗","\\circeq",!0),w(T,Y,J,"≜","\\triangleq",!0),w(T,Y,J,"∼","\\thicksim"),w(T,Y,J,"≈","\\thickapprox"),w(T,Y,J,"⫆","\\supseteqq",!0),w(T,Y,J,"⋑","\\Supset",!0),w(T,Y,J,"⊐","\\sqsupset",!0),w(T,Y,J,"≽","\\succcurlyeq",!0),w(T,Y,J,"⋟","\\curlyeqsucc",!0),w(T,Y,J,"≿","\\succsim",!0),w(T,Y,J,"⪸","\\succapprox",!0),w(T,Y,J,"⊳","\\vartriangleright"),w(T,Y,J,"⊵","\\trianglerighteq"),w(T,Y,J,"⊩","\\Vdash",!0),w(T,Y,J,"∣","\\shortmid"),w(T,Y,J,"∥","\\shortparallel"),w(T,Y,J,"≬","\\between",!0),w(T,Y,J,"⋔","\\pitchfork",!0),w(T,Y,J,"∝","\\varpropto"),w(T,Y,J,"◀","\\blacktriangleleft"),w(T,Y,J,"∴","\\therefore",!0),w(T,Y,J,"∍","\\backepsilon"),w(T,Y,J,"▶","\\blacktriangleright"),w(T,Y,J,"∵","\\because",!0),w(T,Y,J,"⋘","\\llless"),w(T,Y,J,"⋙","\\gggtr"),w(T,Y,ut,"⊲","\\lhd"),w(T,Y,ut,"⊳","\\rhd"),w(T,Y,J,"≂","\\eqsim",!0),w(T,F,J,"⋈","\\Join"),w(T,Y,J,"≑","\\Doteq",!0),w(T,Y,ut,"∔","\\dotplus",!0),w(T,Y,ut,"∖","\\smallsetminus"),w(T,Y,ut,"⋒","\\Cap",!0),w(T,Y,ut,"⋓","\\Cup",!0),w(T,Y,ut,"⩞","\\doublebarwedge",!0),w(T,Y,ut,"⊟","\\boxminus",!0),w(T,Y,ut,"⊞","\\boxplus",!0),w(T,Y,ut,"⋇","\\divideontimes",!0),w(T,Y,ut,"⋉","\\ltimes",!0),w(T,Y,ut,"⋊","\\rtimes",!0),w(T,Y,ut,"⋋","\\leftthreetimes",!0),w(T,Y,ut,"⋌","\\rightthreetimes",!0),w(T,Y,ut,"⋏","\\curlywedge",!0),w(T,Y,ut,"⋎","\\curlyvee",!0),w(T,Y,ut,"⊝","\\circleddash",!0),w(T,Y,ut,"⊛","\\circledast",!0),w(T,Y,ut,"⋅","\\centerdot"),w(T,Y,ut,"⊺","\\intercal",!0),w(T,Y,ut,"⋒","\\doublecap"),w(T,Y,ut,"⋓","\\doublecup"),w(T,Y,ut,"⊠","\\boxtimes",!0),w(T,Y,J,"⇢","\\dashrightarrow",!0),w(T,Y,J,"⇠","\\dashleftarrow",!0),w(T,Y,J,"⇇","\\leftleftarrows",!0),w(T,Y,J,"⇆","\\leftrightarrows",!0),w(T,Y,J,"⇚","\\Lleftarrow",!0),w(T,Y,J,"↞","\\twoheadleftarrow",!0),w(T,Y,J,"↢","\\leftarrowtail",!0),w(T,Y,J,"↫","\\looparrowleft",!0),w(T,Y,J,"⇋","\\leftrightharpoons",!0),w(T,Y,J,"↶","\\curvearrowleft",!0),w(T,Y,J,"↺","\\circlearrowleft",!0),w(T,Y,J,"↰","\\Lsh",!0),w(T,Y,J,"⇈","\\upuparrows",!0),w(T,Y,J,"↿","\\upharpoonleft",!0),w(T,Y,J,"⇃","\\downharpoonleft",!0),w(T,F,J,"⊶","\\origof",!0),w(T,F,J,"⊷","\\imageof",!0),w(T,Y,J,"⊸","\\multimap",!0),w(T,Y,J,"↭","\\leftrightsquigarrow",!0),w(T,Y,J,"⇉","\\rightrightarrows",!0),w(T,Y,J,"⇄","\\rightleftarrows",!0),w(T,Y,J,"↠","\\twoheadrightarrow",!0),w(T,Y,J,"↣","\\rightarrowtail",!0),w(T,Y,J,"↬","\\looparrowright",!0),w(T,Y,J,"↷","\\curvearrowright",!0),w(T,Y,J,"↻","\\circlearrowright",!0),w(T,Y,J,"↱","\\Rsh",!0),w(T,Y,J,"⇊","\\downdownarrows",!0),w(T,Y,J,"↾","\\upharpoonright",!0),w(T,Y,J,"⇂","\\downharpoonright",!0),w(T,Y,J,"⇝","\\rightsquigarrow",!0),w(T,Y,J,"⇝","\\leadsto"),w(T,Y,J,"⇛","\\Rrightarrow",!0),w(T,Y,J,"↾","\\restriction"),w(T,F,ce,"‘","`"),w(T,F,ce,"$","\\$"),w(Re,F,ce,"$","\\$"),w(Re,F,ce,"$","\\textdollar"),w(T,F,ce,"%","\\%"),w(Re,F,ce,"%","\\%"),w(T,F,ce,"_","\\_"),w(Re,F,ce,"_","\\_"),w(Re,F,ce,"_","\\textunderscore"),w(T,F,ce,"∠","\\angle",!0),w(T,F,ce,"∞","\\infty",!0),w(T,F,ce,"′","\\prime"),w(T,F,ce,"△","\\triangle"),w(T,F,ce,"Γ","\\Gamma",!0),w(T,F,ce,"Δ","\\Delta",!0),w(T,F,ce,"Θ","\\Theta",!0),w(T,F,ce,"Λ","\\Lambda",!0),w(T,F,ce,"Ξ","\\Xi",!0),w(T,F,ce,"Π","\\Pi",!0),w(T,F,ce,"Σ","\\Sigma",!0),w(T,F,ce,"Υ","\\Upsilon",!0),w(T,F,ce,"Φ","\\Phi",!0),w(T,F,ce,"Ψ","\\Psi",!0),w(T,F,ce,"Ω","\\Omega",!0),w(T,F,ce,"A","Α"),w(T,F,ce,"B","Β"),w(T,F,ce,"E","Ε"),w(T,F,ce,"Z","Ζ"),w(T,F,ce,"H","Η"),w(T,F,ce,"I","Ι"),w(T,F,ce,"K","Κ"),w(T,F,ce,"M","Μ"),w(T,F,ce,"N","Ν"),w(T,F,ce,"O","Ο"),w(T,F,ce,"P","Ρ"),w(T,F,ce,"T","Τ"),w(T,F,ce,"X","Χ"),w(T,F,ce,"¬","\\neg",!0),w(T,F,ce,"¬","\\lnot"),w(T,F,ce,"⊤","\\top"),w(T,F,ce,"⊥","\\bot"),w(T,F,ce,"∅","\\emptyset"),w(T,Y,ce,"∅","\\varnothing"),w(T,F,_t,"α","\\alpha",!0),w(T,F,_t,"β","\\beta",!0),w(T,F,_t,"γ","\\gamma",!0),w(T,F,_t,"δ","\\delta",!0),w(T,F,_t,"ϵ","\\epsilon",!0),w(T,F,_t,"ζ","\\zeta",!0),w(T,F,_t,"η","\\eta",!0),w(T,F,_t,"θ","\\theta",!0),w(T,F,_t,"ι","\\iota",!0),w(T,F,_t,"κ","\\kappa",!0),w(T,F,_t,"λ","\\lambda",!0),w(T,F,_t,"μ","\\mu",!0),w(T,F,_t,"ν","\\nu",!0),w(T,F,_t,"ξ","\\xi",!0),w(T,F,_t,"ο","\\omicron",!0),w(T,F,_t,"π","\\pi",!0),w(T,F,_t,"ρ","\\rho",!0),w(T,F,_t,"σ","\\sigma",!0),w(T,F,_t,"τ","\\tau",!0),w(T,F,_t,"υ","\\upsilon",!0),w(T,F,_t,"ϕ","\\phi",!0),w(T,F,_t,"χ","\\chi",!0),w(T,F,_t,"ψ","\\psi",!0),w(T,F,_t,"ω","\\omega",!0),w(T,F,_t,"ε","\\varepsilon",!0),w(T,F,_t,"ϑ","\\vartheta",!0),w(T,F,_t,"ϖ","\\varpi",!0),w(T,F,_t,"ϱ","\\varrho",!0),w(T,F,_t,"ς","\\varsigma",!0),w(T,F,_t,"φ","\\varphi",!0),w(T,F,ut,"∗","*",!0),w(T,F,ut,"+","+"),w(T,F,ut,"−","-",!0),w(T,F,ut,"⋅","\\cdot",!0),w(T,F,ut,"∘","\\circ",!0),w(T,F,ut,"÷","\\div",!0),w(T,F,ut,"±","\\pm",!0),w(T,F,ut,"×","\\times",!0),w(T,F,ut,"∩","\\cap",!0),w(T,F,ut,"∪","\\cup",!0),w(T,F,ut,"∖","\\setminus",!0),w(T,F,ut,"∧","\\land"),w(T,F,ut,"∨","\\lor"),w(T,F,ut,"∧","\\wedge",!0),w(T,F,ut,"∨","\\vee",!0),w(T,F,ce,"√","\\surd"),w(T,F,mn,"⟨","\\langle",!0),w(T,F,mn,"∣","\\lvert"),w(T,F,mn,"∥","\\lVert"),w(T,F,en,"?","?"),w(T,F,en,"!","!"),w(T,F,en,"⟩","\\rangle",!0),w(T,F,en,"∣","\\rvert"),w(T,F,en,"∥","\\rVert"),w(T,F,J,"=","="),w(T,F,J,":",":"),w(T,F,J,"≈","\\approx",!0),w(T,F,J,"≅","\\cong",!0),w(T,F,J,"≥","\\ge"),w(T,F,J,"≥","\\geq",!0),w(T,F,J,"←","\\gets"),w(T,F,J,">","\\gt",!0),w(T,F,J,"∈","\\in",!0),w(T,F,J,"","\\@not"),w(T,F,J,"⊂","\\subset",!0),w(T,F,J,"⊃","\\supset",!0),w(T,F,J,"⊆","\\subseteq",!0),w(T,F,J,"⊇","\\supseteq",!0),w(T,Y,J,"⊈","\\nsubseteq",!0),w(T,Y,J,"⊉","\\nsupseteq",!0),w(T,F,J,"⊨","\\models"),w(T,F,J,"←","\\leftarrow",!0),w(T,F,J,"≤","\\le"),w(T,F,J,"≤","\\leq",!0),w(T,F,J,"<","\\lt",!0),w(T,F,J,"→","\\rightarrow",!0),w(T,F,J,"→","\\to"),w(T,Y,J,"≱","\\ngeq",!0),w(T,Y,J,"≰","\\nleq",!0),w(T,F,$a," ","\\ "),w(T,F,$a," ","\\space"),w(T,F,$a," ","\\nobreakspace"),w(Re,F,$a," ","\\ "),w(Re,F,$a," "," "),w(Re,F,$a," ","\\space"),w(Re,F,$a," ","\\nobreakspace"),w(T,F,$a,null,"\\nobreak"),w(T,F,$a,null,"\\allowbreak"),w(T,F,Ml,",",","),w(T,F,Ml,";",";"),w(T,Y,ut,"⊼","\\barwedge",!0),w(T,Y,ut,"⊻","\\veebar",!0),w(T,F,ut,"⊙","\\odot",!0),w(T,F,ut,"⊕","\\oplus",!0),w(T,F,ut,"⊗","\\otimes",!0),w(T,F,ce,"∂","\\partial",!0),w(T,F,ut,"⊘","\\oslash",!0),w(T,Y,ut,"⊚","\\circledcirc",!0),w(T,Y,ut,"⊡","\\boxdot",!0),w(T,F,ut,"△","\\bigtriangleup"),w(T,F,ut,"▽","\\bigtriangledown"),w(T,F,ut,"†","\\dagger"),w(T,F,ut,"⋄","\\diamond"),w(T,F,ut,"⋆","\\star"),w(T,F,ut,"◃","\\triangleleft"),w(T,F,ut,"▹","\\triangleright"),w(T,F,mn,"{","\\{"),w(Re,F,ce,"{","\\{"),w(Re,F,ce,"{","\\textbraceleft"),w(T,F,en,"}","\\}"),w(Re,F,ce,"}","\\}"),w(Re,F,ce,"}","\\textbraceright"),w(T,F,mn,"{","\\lbrace"),w(T,F,en,"}","\\rbrace"),w(T,F,mn,"[","\\lbrack",!0),w(Re,F,ce,"[","\\lbrack",!0),w(T,F,en,"]","\\rbrack",!0),w(Re,F,ce,"]","\\rbrack",!0),w(T,F,mn,"(","\\lparen",!0),w(T,F,en,")","\\rparen",!0),w(Re,F,ce,"<","\\textless",!0),w(Re,F,ce,">","\\textgreater",!0),w(T,F,mn,"⌊","\\lfloor",!0),w(T,F,en,"⌋","\\rfloor",!0),w(T,F,mn,"⌈","\\lceil",!0),w(T,F,en,"⌉","\\rceil",!0),w(T,F,ce,"\\","\\backslash"),w(T,F,ce,"∣","|"),w(T,F,ce,"∣","\\vert"),w(Re,F,ce,"|","\\textbar",!0),w(T,F,ce,"∥","\\|"),w(T,F,ce,"∥","\\Vert"),w(Re,F,ce,"∥","\\textbardbl"),w(Re,F,ce,"~","\\textasciitilde"),w(Re,F,ce,"\\","\\textbackslash"),w(Re,F,ce,"^","\\textasciicircum"),w(T,F,J,"↑","\\uparrow",!0),w(T,F,J,"⇑","\\Uparrow",!0),w(T,F,J,"↓","\\downarrow",!0),w(T,F,J,"⇓","\\Downarrow",!0),w(T,F,J,"↕","\\updownarrow",!0),w(T,F,J,"⇕","\\Updownarrow",!0),w(T,F,br,"∐","\\coprod"),w(T,F,br,"⋁","\\bigvee"),w(T,F,br,"⋀","\\bigwedge"),w(T,F,br,"⨄","\\biguplus"),w(T,F,br,"⋂","\\bigcap"),w(T,F,br,"⋃","\\bigcup"),w(T,F,br,"∫","\\int"),w(T,F,br,"∫","\\intop"),w(T,F,br,"∬","\\iint"),w(T,F,br,"∭","\\iiint"),w(T,F,br,"∏","\\prod"),w(T,F,br,"∑","\\sum"),w(T,F,br,"⨂","\\bigotimes"),w(T,F,br,"⨁","\\bigoplus"),w(T,F,br,"⨀","\\bigodot"),w(T,F,br,"∮","\\oint"),w(T,F,br,"∯","\\oiint"),w(T,F,br,"∰","\\oiiint"),w(T,F,br,"⨆","\\bigsqcup"),w(T,F,br,"∫","\\smallint"),w(Re,F,wo,"…","\\textellipsis"),w(T,F,wo,"…","\\mathellipsis"),w(Re,F,wo,"…","\\ldots",!0),w(T,F,wo,"…","\\ldots",!0),w(T,F,wo,"⋯","\\@cdots",!0),w(T,F,wo,"⋱","\\ddots",!0),w(T,F,ce,"⋮","\\varvdots"),w(Re,F,ce,"⋮","\\varvdots"),w(T,F,lr,"ˊ","\\acute"),w(T,F,lr,"ˋ","\\grave"),w(T,F,lr,"¨","\\ddot"),w(T,F,lr,"~","\\tilde"),w(T,F,lr,"ˉ","\\bar"),w(T,F,lr,"˘","\\breve"),w(T,F,lr,"ˇ","\\check"),w(T,F,lr,"^","\\hat"),w(T,F,lr,"⃗","\\vec"),w(T,F,lr,"˙","\\dot"),w(T,F,lr,"˚","\\mathring"),w(T,F,_t,"","\\@imath"),w(T,F,_t,"","\\@jmath"),w(T,F,ce,"ı","ı"),w(T,F,ce,"ȷ","ȷ"),w(Re,F,ce,"ı","\\i",!0),w(Re,F,ce,"ȷ","\\j",!0),w(Re,F,ce,"ß","\\ss",!0),w(Re,F,ce,"æ","\\ae",!0),w(Re,F,ce,"œ","\\oe",!0),w(Re,F,ce,"ø","\\o",!0),w(Re,F,ce,"Æ","\\AE",!0),w(Re,F,ce,"Œ","\\OE",!0),w(Re,F,ce,"Ø","\\O",!0),w(Re,F,lr,"ˊ","\\'"),w(Re,F,lr,"ˋ","\\`"),w(Re,F,lr,"ˆ","\\^"),w(Re,F,lr,"˜","\\~"),w(Re,F,lr,"ˉ","\\="),w(Re,F,lr,"˘","\\u"),w(Re,F,lr,"˙","\\."),w(Re,F,lr,"¸","\\c"),w(Re,F,lr,"˚","\\r"),w(Re,F,lr,"ˇ","\\v"),w(Re,F,lr,"¨",'\\"'),w(Re,F,lr,"˝","\\H"),w(Re,F,lr,"◯","\\textcircled");var Dp={"--":!0,"---":!0,"``":!0,"''":!0};w(Re,F,ce,"–","--",!0),w(Re,F,ce,"–","\\textendash"),w(Re,F,ce,"—","---",!0),w(Re,F,ce,"—","\\textemdash"),w(Re,F,ce,"‘","`",!0),w(Re,F,ce,"‘","\\textquoteleft"),w(Re,F,ce,"’","'",!0),w(Re,F,ce,"’","\\textquoteright"),w(Re,F,ce,"“","``",!0),w(Re,F,ce,"“","\\textquotedblleft"),w(Re,F,ce,"”","''",!0),w(Re,F,ce,"”","\\textquotedblright"),w(T,F,ce,"°","\\degree",!0),w(Re,F,ce,"°","\\degree"),w(Re,F,ce,"°","\\textdegree",!0),w(T,F,ce,"£","\\pounds"),w(T,F,ce,"£","\\mathsterling",!0),w(Re,F,ce,"£","\\pounds"),w(Re,F,ce,"£","\\textsterling",!0),w(T,Y,ce,"✠","\\maltese"),w(Re,Y,ce,"✠","\\maltese");for(var Ip='0123456789/@."',Tc=0;Tc<Ip.length;Tc++){var zp=Ip.charAt(Tc);w(T,F,ce,zp,zp)}for(var Fp='0123456789!@*()-=+";:?/.,',Mc=0;Mc<Fp.length;Mc++){var Op=Fp.charAt(Mc);w(Re,F,ce,Op,Op)}for(var a0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Dc=0;Dc<a0.length;Dc++){var i0=a0.charAt(Dc);w(T,F,_t,i0,i0),w(Re,F,ce,i0,i0)}w(T,Y,ce,"C","ℂ"),w(Re,Y,ce,"C","ℂ"),w(T,Y,ce,"H","ℍ"),w(Re,Y,ce,"H","ℍ"),w(T,Y,ce,"N","ℕ"),w(Re,Y,ce,"N","ℕ"),w(T,Y,ce,"P","ℙ"),w(Re,Y,ce,"P","ℙ"),w(T,Y,ce,"Q","ℚ"),w(Re,Y,ce,"Q","ℚ"),w(T,Y,ce,"R","ℝ"),w(Re,Y,ce,"R","ℝ"),w(T,Y,ce,"Z","ℤ"),w(Re,Y,ce,"Z","ℤ"),w(T,F,_t,"h","ℎ"),w(Re,F,_t,"h","ℎ");for(var kt="",tn=0;tn<a0.length;tn++){var fr=a0.charAt(tn);kt=String.fromCharCode(55349,56320+tn),w(T,F,_t,fr,kt),w(Re,F,ce,fr,kt),kt=String.fromCharCode(55349,56372+tn),w(T,F,_t,fr,kt),w(Re,F,ce,fr,kt),kt=String.fromCharCode(55349,56424+tn),w(T,F,_t,fr,kt),w(Re,F,ce,fr,kt),kt=String.fromCharCode(55349,56580+tn),w(T,F,_t,fr,kt),w(Re,F,ce,fr,kt),kt=String.fromCharCode(55349,56684+tn),w(T,F,_t,fr,kt),w(Re,F,ce,fr,kt),kt=String.fromCharCode(55349,56736+tn),w(T,F,_t,fr,kt),w(Re,F,ce,fr,kt),kt=String.fromCharCode(55349,56788+tn),w(T,F,_t,fr,kt),w(Re,F,ce,fr,kt),kt=String.fromCharCode(55349,56840+tn),w(T,F,_t,fr,kt),w(Re,F,ce,fr,kt),kt=String.fromCharCode(55349,56944+tn),w(T,F,_t,fr,kt),w(Re,F,ce,fr,kt),tn<26&&(kt=String.fromCharCode(55349,56632+tn),w(T,F,_t,fr,kt),w(Re,F,ce,fr,kt),kt=String.fromCharCode(55349,56476+tn),w(T,F,_t,fr,kt),w(Re,F,ce,fr,kt))}kt="𝕜",w(T,F,_t,"k",kt),w(Re,F,ce,"k",kt);for(var Li=0;Li<10;Li++){var ci=Li.toString();kt=String.fromCharCode(55349,57294+Li),w(T,F,_t,ci,kt),w(Re,F,ce,ci,kt),kt=String.fromCharCode(55349,57314+Li),w(T,F,_t,ci,kt),w(Re,F,ce,ci,kt),kt=String.fromCharCode(55349,57324+Li),w(T,F,_t,ci,kt),w(Re,F,ce,ci,kt),kt=String.fromCharCode(55349,57334+Li),w(T,F,_t,ci,kt),w(Re,F,ce,ci,kt)}for(var Ic="ÐÞþ",zc=0;zc<Ic.length;zc++){var o0=Ic.charAt(zc);w(T,F,_t,o0,o0),w(Re,F,ce,o0,o0)}var l0=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],Pp=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],dk=(e,t)=>{var r=e.charCodeAt(0),n=e.charCodeAt(1),a=(r-55296)*1024+(n-56320)+65536,i=t==="math"?0:1;if(119808<=a&&a<120484){var o=Math.floor((a-119808)/26);return[l0[o][2],l0[o][i]]}else if(120782<=a&&a<=120831){var l=Math.floor((a-120782)/10);return[Pp[l][2],Pp[l][i]]}else{if(a===120485||a===120486)return[l0[0][2],l0[0][i]];if(120486<a&&a<120782)return["",""];throw new He("Unsupported character: "+e)}},s0=function(t,r,n){if(or[n][t]){var a=or[n][t].replace;a&&(t=a)}return{value:t,metrics:Ac(t,r,n)}},rn=function(t,r,n,a,i){var o=s0(t,r,n),l=o.metrics;t=o.value;var s;if(l){var u=l.italic;(n==="text"||a&&a.font==="mathit")&&(u=0),s=new vn(t,l.height,l.depth,u,l.skew,l.width,i)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+t+"' in style '"+r+"' and mode '"+n+"'")),s=new vn(t,0,0,0,0,0,i);if(a){s.maxFontSize=a.sizeMultiplier,a.style.isTight()&&s.classes.push("mtight");var c=a.getColor();c&&(s.style.color=c)}return s},Fc=function(t,r,n,a){return a===void 0&&(a=[]),n.font==="boldsymbol"&&s0(t,"Main-Bold",r).metrics?rn(t,"Main-Bold",r,n,a.concat(["mathbf"])):t==="\\"||or[r][t].font==="main"?rn(t,"Main-Regular",r,n,a):rn(t,"AMS-Regular",r,n,a.concat(["amsrm"]))},hk=function(t,r,n,a,i){return i!=="textord"&&s0(t,"Math-BoldItalic",r).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},u0=function(t,r,n){var a=t.mode,i=t.text,o=["mord"],l=a==="math"||a==="text"&&r.font,s=l?r.font:r.fontFamily,u="",c="";if(i.charCodeAt(0)===55349&&([u,c]=dk(i,a)),u.length>0)return rn(i,u,a,r,o.concat(c));if(s){var f,d;if(s==="boldsymbol"){var h=hk(i,a,r,o,n);f=h.fontName,d=[h.fontClass]}else l?(f=Pc[s].fontName,d=[s]):(f=c0(s,r.fontWeight,r.fontShape),d=[s,r.fontWeight,r.fontShape]);if(s0(i,f,a).metrics)return rn(i,f,a,r,o.concat(d));if(Dp.hasOwnProperty(i)&&f.slice(0,10)==="Typewriter"){for(var y=[],p=0;p<i.length;p++)y.push(rn(i[p],f,a,r,o.concat(d)));return Ua(y)}}if(n==="mathord")return rn(i,"Math-Italic",a,r,o.concat(["mathnormal"]));if(n==="textord"){var x=or[a][i]&&or[a][i].font;if(x==="ams"){var g=c0("amsrm",r.fontWeight,r.fontShape);return rn(i,g,a,r,o.concat("amsrm",r.fontWeight,r.fontShape))}else if(x==="main"||!x){var m=c0("textrm",r.fontWeight,r.fontShape);return rn(i,m,a,r,o.concat(r.fontWeight,r.fontShape))}else{var b=c0(x,r.fontWeight,r.fontShape);return rn(i,b,a,r,o.concat(b,r.fontWeight,r.fontShape))}}else throw new Error("unexpected type: "+n+" in makeOrd")},pk=(e,t)=>{if(si(e.classes)!==si(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass("mathnormal"))return!1;if(e.classes.length===1){var r=e.classes[0];if(r==="mbin"||r==="mord")return!1}for(var n of Object.keys(e.style))if(e.style[n]!==t.style[n])return!1;for(var a of Object.keys(t.style))if(e.style[a]!==t.style[a])return!1;return!0},Rp=e=>{for(var t=0;t<e.length-1;t++){var r=e[t],n=e[t+1];r instanceof vn&&n instanceof vn&&pk(r,n)&&(r.text+=n.text,r.height=Math.max(r.height,n.height),r.depth=Math.max(r.depth,n.depth),r.italic=n.italic,e.splice(t+1,1),t--)}return e},Oc=function(t){for(var r=0,n=0,a=0,i=0;i<t.children.length;i++){var o=t.children[i];o.height>r&&(r=o.height),o.depth>n&&(n=o.depth),o.maxFontSize>a&&(a=o.maxFontSize)}t.height=r,t.depth=n,t.maxFontSize=a},$e=function(t,r,n,a){var i=new _o(t,r,n,a);return Oc(i),i},fi=(e,t,r,n)=>new _o(e,t,r,n),ko=function(t,r,n){var a=$e([t],[],r);return a.height=Math.max(n||r.fontMetrics().defaultRuleThickness,r.minRuleThickness),a.style.borderBottomWidth=Ye(a.height),a.maxFontSize=1,a},vk=function(t,r,n,a){var i=new r0(t,r,n,a);return Oc(i),i},Ua=function(t){var r=new xo(t);return Oc(r),r},So=function(t,r){return t instanceof xo?$e([],[t],r):t},mk=function(t){if(t.positionType==="individualShift"){for(var r=t.children,n=[r[0]],a=-r[0].shift-r[0].elem.depth,i=a,o=1;o<r.length;o++){var l=-r[o].shift-i-r[o].elem.depth,s=l-(r[o-1].elem.height+r[o-1].elem.depth);i=i+l,n.push({type:"kern",size:s}),n.push(r[o])}return{children:n,depth:a}}var u;if(t.positionType==="top"){for(var c=t.positionData,f=0;f<t.children.length;f++){var d=t.children[f];c-=d.type==="kern"?d.size:d.elem.height+d.elem.depth}u=c}else if(t.positionType==="bottom")u=-t.positionData;else{var h=t.children[0];if(h.type!=="elem")throw new Error('First child must have type "elem".');if(t.positionType==="shift")u=-h.elem.depth-t.positionData;else if(t.positionType==="firstBaseline")u=-h.elem.depth;else throw new Error("Invalid positionType "+t.positionType+".")}return{children:t.children,depth:u}},Ut=function(t,r){for(var{children:n,depth:a}=mk(t),i=0,o=0;o<n.length;o++){var l=n[o];if(l.type==="elem"){var s=l.elem;i=Math.max(i,s.maxFontSize,s.height)}}i+=2;var u=$e(["pstrut"],[]);u.style.height=Ye(i);for(var c=[],f=a,d=a,h=a,y=0;y<n.length;y++){var p=n[y];if(p.type==="kern")h+=p.size;else{var x=p.elem,g=p.wrapperClasses||[],m=p.wrapperStyle||{},b=$e(g,[u,x],void 0,m);b.style.top=Ye(-i-h-x.depth),p.marginLeft&&(b.style.marginLeft=p.marginLeft),p.marginRight&&(b.style.marginRight=p.marginRight),c.push(b),h+=x.height+x.depth}f=Math.min(f,h),d=Math.max(d,h)}var v=$e(["vlist"],c);v.style.height=Ye(d);var S;if(f<0){var C=$e([],[]),A=$e(["vlist"],[C]);A.style.height=Ye(-f);var _=$e(["vlist-s"],[new vn("")]);S=[$e(["vlist-r"],[v,_]),$e(["vlist-r"],[A])]}else S=[$e(["vlist-r"],[v])];var E=$e(["vlist-t"],S);return S.length===2&&E.classes.push("vlist-t2"),E.height=d,E.depth=-f,E},Lp=(e,t)=>{var r=$e(["mspace"],[],t),n=ur(e,t);return r.style.marginRight=Ye(n),r},c0=function(t,r,n){var a="";switch(t){case"amsrm":a="AMS";break;case"textrm":a="Main";break;case"textsf":a="SansSerif";break;case"texttt":a="Typewriter";break;default:a=t}var i;return r==="textbf"&&n==="textit"?i="BoldItalic":r==="textbf"?i="Bold":r==="textit"?i="Italic":i="Regular",a+"-"+i},Pc={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Bp={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Np=function(t,r){var[n,a,i]=Bp[t],o=new ui(n),l=new Na([o],{width:Ye(a),height:Ye(i),style:"width:"+Ye(a),viewBox:"0 0 "+1e3*a+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),s=fi(["overlay"],[l],r);return s.height=i,s.style.height=Ye(i),s.style.width=Ye(a),s},cr={number:3,unit:"mu"},Bi={number:4,unit:"mu"},Ha={number:5,unit:"mu"},gk={mord:{mop:cr,mbin:Bi,mrel:Ha,minner:cr},mop:{mord:cr,mop:cr,mrel:Ha,minner:cr},mbin:{mord:Bi,mop:Bi,mopen:Bi,minner:Bi},mrel:{mord:Ha,mop:Ha,mopen:Ha,minner:Ha},mopen:{},mclose:{mop:cr,mbin:Bi,mrel:Ha,minner:cr},mpunct:{mord:cr,mop:cr,mrel:Ha,mopen:cr,mclose:cr,mpunct:cr,minner:cr},minner:{mord:cr,mop:cr,mbin:Bi,mrel:Ha,mopen:cr,mpunct:cr,minner:cr}},bk={mord:{mop:cr},mop:{mord:cr,mop:cr},mbin:{},mrel:{},mopen:{},mclose:{mop:cr},mpunct:{},minner:{mop:cr}},$p={},f0={},d0={};function at(e){for(var{type:t,names:r,props:n,handler:a,htmlBuilder:i,mathmlBuilder:o}=e,l={type:t,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:a},s=0;s<r.length;++s)$p[r[s]]=l;t&&(i&&(f0[t]=i),o&&(d0[t]=o))}function Ni(e){var{type:t,htmlBuilder:r,mathmlBuilder:n}=e;at({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:r,mathmlBuilder:n})}var h0=function(t){return t.type==="ordgroup"&&t.body.length===1?t.body[0]:t},yr=function(t){return t.type==="ordgroup"?t.body:[t]},yk=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),xk=new Set(["rightmost","mrel","mclose","mpunct"]),_k={display:Ct.DISPLAY,text:Ct.TEXT,script:Ct.SCRIPT,scriptscript:Ct.SCRIPTSCRIPT},wk={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Cr=function(t,r,n,a){a===void 0&&(a=[null,null]);for(var i=[],o=0;o<t.length;o++){var l=Ht(t[o],r);if(l instanceof xo){var s=l.children;i.push(...s)}else i.push(l)}if(Rp(i),!n)return i;var u=r;if(t.length===1){var c=t[0];c.type==="sizing"?u=r.havingSize(c.size):c.type==="styling"&&(u=r.havingStyle(_k[c.style]))}var f=$e([a[0]||"leftmost"],[],r),d=$e([a[1]||"rightmost"],[],r),h=n==="root";return Rc(i,(y,p)=>{var x=p.classes[0],g=y.classes[0];x==="mbin"&&xk.has(g)?p.classes[0]="mord":g==="mbin"&&yk.has(x)&&(y.classes[0]="mord")},{node:f},d,h),Rc(i,(y,p)=>{var x,g,m=Bc(p),b=Bc(y),v=m&&b?y.hasClass("mtight")?(x=bk[m])==null?void 0:x[b]:(g=gk[m])==null?void 0:g[b]:null;if(v)return Lp(v,u)},{node:f},d,h),i},Rc=function(t,r,n,a,i){a&&t.push(a);for(var o=0;o<t.length;o++){var l=t[o],s=Up(l);if(s){Rc(s.children,r,n,null,i);continue}var u=!l.hasClass("mspace");if(u){var c=r(l,n.node);c&&(n.insertAfter?n.insertAfter(c):(t.unshift(c),o++))}u?n.node=l:i&&l.hasClass("newline")&&(n.node=$e(["leftmost"])),n.insertAfter=(f=>d=>{t.splice(f+1,0,d),o++})(o)}a&&t.pop()},Up=function(t){return t instanceof xo||t instanceof r0||t instanceof _o&&t.hasClass("enclosing")?t:null},Lc=function(t,r){var n=Up(t);if(n){var a=n.children;if(a.length){if(r==="right")return Lc(a[a.length-1],"right");if(r==="left")return Lc(a[0],"left")}}return t},Bc=function(t,r){if(!t)return null;r&&(t=Lc(t,r));var n=t.classes[0];return wk[n]||null},Dl=function(t,r){var n=["nulldelimiter"].concat(t.baseSizingClasses());return $e(r.concat(n))},Ht=function(t,r,n){if(!t)return $e();if(f0[t.type]){var a=f0[t.type](t,r);if(n&&r.size!==n.size){a=$e(r.sizingClasses(n),[a],r);var i=r.sizeMultiplier/n.sizeMultiplier;a.height*=i,a.depth*=i}return a}else throw new He("Got group of unknown type: '"+t.type+"'")};function p0(e,t){var r=$e(["base"],e,t),n=$e(["strut"]);return n.style.height=Ye(r.height+r.depth),r.depth&&(n.style.verticalAlign=Ye(-r.depth)),r.children.unshift(n),r}function Nc(e,t){var r=null;e.length===1&&e[0].type==="tag"&&(r=e[0].tag,e=e[0].body);var n=Cr(e,t,"root"),a;n.length===2&&n[1].hasClass("tag")&&(a=n.pop());for(var i=[],o=[],l=0;l<n.length;l++)if(o.push(n[l]),n[l].hasClass("mbin")||n[l].hasClass("mrel")||n[l].hasClass("allowbreak")){for(var s=!1;l<n.length-1&&n[l+1].hasClass("mspace")&&!n[l+1].hasClass("newline");)l++,o.push(n[l]),n[l].hasClass("nobreak")&&(s=!0);s||(i.push(p0(o,t)),o=[])}else n[l].hasClass("newline")&&(o.pop(),o.length>0&&(i.push(p0(o,t)),o=[]),i.push(n[l]));o.length>0&&i.push(p0(o,t));var u;r?(u=p0(Cr(r,t,!0),t),u.classes=["tag"],i.push(u)):a&&i.push(a);var c=$e(["katex-html"],i);if(c.setAttribute("aria-hidden","true"),u){var f=u.children[0];f.style.height=Ye(c.height+c.depth),c.depth&&(f.style.verticalAlign=Ye(-c.depth))}return c}function Hp(e){return new xo(e)}class je{constructor(t,r,n){this.type=t,this.attributes={},this.children=r||[],this.classes=n||[]}setAttribute(t,r){this.attributes[t]=r}getAttribute(t){return this.attributes[t]}toNode(){var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&t.setAttribute(r,this.attributes[r]);this.classes.length>0&&(t.className=si(this.classes));for(var n=0;n<this.children.length;n++)if(this.children[n]instanceof xr&&this.children[n+1]instanceof xr){for(var a=this.children[n].toText()+this.children[++n].toText();this.children[n+1]instanceof xr;)a+=this.children[++n].toText();t.appendChild(new xr(a).toNode())}else t.appendChild(this.children[n].toNode());return t}toMarkup(){var t="<"+this.type;for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&(t+=" "+r+'="',t+=qr(this.attributes[r]),t+='"');this.classes.length>0&&(t+=' class ="'+qr(si(this.classes))+'"'),t+=">";for(var n=0;n<this.children.length;n++)t+=this.children[n].toMarkup();return t+="</"+this.type+">",t}toText(){return this.children.map(t=>t.toText()).join("")}}class xr{constructor(t){this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return qr(this.toText())}toText(){return this.text}}class jp{constructor(t){this.width=t,t>=.05555&&t<=.05556?this.character=" ":t>=.1666&&t<=.1667?this.character=" ":t>=.2222&&t<=.2223?this.character=" ":t>=.2777&&t<=.2778?this.character=" ":t>=-.05556&&t<=-.05555?this.character=" ":t>=-.1667&&t<=-.1666?this.character=" ":t>=-.2223&&t<=-.2222?this.character=" ":t>=-.2778&&t<=-.2777?this.character=" ":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return t.setAttribute("width",Ye(this.width)),t}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+Ye(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var kk=new Set(["\\imath","\\jmath"]),Sk=new Set(["mrow","mtable"]),Fn=function(t,r,n){return or[r][t]&&or[r][t].replace&&t.charCodeAt(0)!==55349&&!(Dp.hasOwnProperty(t)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(t=or[r][t].replace),new xr(t)},$c=function(t){return t.length===1?t[0]:new je("mrow",t)},Uc=function(t,r){if(r.fontFamily==="texttt")return"monospace";if(r.fontFamily==="textsf")return r.fontShape==="textit"&&r.fontWeight==="textbf"?"sans-serif-bold-italic":r.fontShape==="textit"?"sans-serif-italic":r.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(r.fontShape==="textit"&&r.fontWeight==="textbf")return"bold-italic";if(r.fontShape==="textit")return"italic";if(r.fontWeight==="textbf")return"bold";var n=r.font;if(!n||n==="mathnormal")return null;var a=t.mode;if(n==="mathit")return"italic";if(n==="boldsymbol")return t.type==="textord"?"bold":"bold-italic";if(n==="mathbf")return"bold";if(n==="mathbb")return"double-struck";if(n==="mathsfit")return"sans-serif-italic";if(n==="mathfrak")return"fraktur";if(n==="mathscr"||n==="mathcal")return"script";if(n==="mathsf")return"sans-serif";if(n==="mathtt")return"monospace";var i=t.text;if(kk.has(i))return null;if(or[a][i]){var o=or[a][i].replace;o&&(i=o)}var l=Pc[n].fontName;return Ac(i,l,a)?Pc[n].variant:null};function Hc(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var t=e.children[0];return t instanceof xr&&t.text==="."}else if(e.type==="mo"&&e.children.length===1&&e.getAttribute("separator")==="true"&&e.getAttribute("lspace")==="0em"&&e.getAttribute("rspace")==="0em"){var r=e.children[0];return r instanceof xr&&r.text===","}else return!1}var gn=function(t,r,n){if(t.length===1){var a=Yt(t[0],r);return n&&a instanceof je&&a.type==="mo"&&(a.setAttribute("lspace","0em"),a.setAttribute("rspace","0em")),[a]}for(var i=[],o,l=0;l<t.length;l++){var s=Yt(t[l],r);if(s instanceof je&&o instanceof je){if(s.type==="mtext"&&o.type==="mtext"&&s.getAttribute("mathvariant")===o.getAttribute("mathvariant")){o.children.push(...s.children);continue}else if(s.type==="mn"&&o.type==="mn"){o.children.push(...s.children);continue}else if(Hc(s)&&o.type==="mn"){o.children.push(...s.children);continue}else if(s.type==="mn"&&Hc(o))s.children=[...o.children,...s.children],i.pop();else if((s.type==="msup"||s.type==="msub")&&s.children.length>=1&&(o.type==="mn"||Hc(o))){var u=s.children[0];u instanceof je&&u.type==="mn"&&(u.children=[...o.children,...u.children],i.pop())}else if(o.type==="mi"&&o.children.length===1){var c=o.children[0];if(c instanceof xr&&c.text==="̸"&&(s.type==="mo"||s.type==="mi"||s.type==="mn")){var f=s.children[0];f instanceof xr&&f.text.length>0&&(f.text=f.text.slice(0,1)+"̸"+f.text.slice(1),i.pop())}}}i.push(s),o=s}return i},di=function(t,r,n){return $c(gn(t,r,n))},Yt=function(t,r){if(!t)return new je("mrow");if(d0[t.type]){var n=d0[t.type](t,r);return n}else throw new He("Got group of unknown type: '"+t.type+"'")};function Gp(e,t,r,n,a){var i=gn(e,r),o;i.length===1&&i[0]instanceof je&&Sk.has(i[0].type)?o=i[0]:o=new je("mrow",i);var l=new je("annotation",[new xr(t)]);l.setAttribute("encoding","application/x-tex");var s=new je("semantics",[o,l]),u=new je("math",[s]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&u.setAttribute("display","block");var c=a?"katex":"katex-mathml";return $e([c],[u])}var Ck=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Vp=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],qp=function(t,r){return r.size<2?t:Ck[t-1][r.size-1]};class ja{constructor(t){this.style=t.style,this.color=t.color,this.size=t.size||ja.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=Vp[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var r={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(r,t),new ja(r)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:qp(this.textSize,t)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(t){return this.size===t&&this.textSize===t?this:this.extend({style:this.style.text(),size:t,textSize:t,sizeMultiplier:Vp[t-1]})}havingBaseStyle(t){t=t||this.style.text();var r=qp(ja.BASESIZE,t);return this.size===r&&this.textSize===ja.BASESIZE&&this.style===t?this:this.extend({style:t,size:r})}havingBaseSizing(){var t;switch(this.style.id){case 4:case 5:t=3;break;case 6:case 7:t=1;break;default:t=6}return this.extend({style:this.style.text(),size:t})}withColor(t){return this.extend({color:t})}withPhantom(){return this.extend({phantom:!0})}withFont(t){return this.extend({font:t})}withTextFontFamily(t){return this.extend({fontFamily:t,font:""})}withTextFontWeight(t){return this.extend({fontWeight:t,font:""})}withTextFontShape(t){return this.extend({fontShape:t,font:""})}sizingClasses(t){return t.size!==this.size?["sizing","reset-size"+t.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==ja.BASESIZE?["sizing","reset-size"+this.size,"size"+ja.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=uk(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}ja.BASESIZE=6;var Wp=function(t){return new ja({style:t.displayMode?Ct.DISPLAY:Ct.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},Kp=function(t,r){if(r.displayMode){var n=["katex-display"];r.leqno&&n.push("leqno"),r.fleqn&&n.push("fleqn"),t=$e(n,[t])}return t},Ak=function(t,r,n){var a=Wp(n),i;if(n.output==="mathml")return Gp(t,r,a,n.displayMode,!0);if(n.output==="html"){var o=Nc(t,a);i=$e(["katex"],[o])}else{var l=Gp(t,r,a,n.displayMode,!1),s=Nc(t,a);i=$e(["katex"],[l,s])}return Kp(i,n)},Ek=function(t,r,n){var a=Wp(n),i=Nc(t,a),o=$e(["katex"],[i]);return Kp(o,n)},Tk={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",underbracket:"⎵",overbracket:"⎴",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},v0=function(t){var r=new je("mo",[new xr(Tk[t.replace(/^\\/,"")])]);return r.setAttribute("stretchy","true"),r},Mk={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Dk=new Set(["widehat","widecheck","widetilde","utilde"]),m0=function(t,r){function n(){var l=4e5,s=t.label.slice(1);if(Dk.has(s)){var u=t,c=u.base.type==="ordgroup"?u.base.body.length:1,f,d,h;if(c>5)s==="widehat"||s==="widecheck"?(f=420,l=2364,h=.42,d=s+"4"):(f=312,l=2340,h=.34,d="tilde4");else{var y=[1,1,2,2,3,3][c];s==="widehat"||s==="widecheck"?(l=[0,1062,2364,2364,2364][y],f=[0,239,300,360,420][y],h=[0,.24,.3,.3,.36,.42][y],d=s+y):(l=[0,600,1033,2339,2340][y],f=[0,260,286,306,312][y],h=[0,.26,.286,.3,.306,.34][y],d="tilde"+y)}var p=new ui(d),x=new Na([p],{width:"100%",height:Ye(h),viewBox:"0 0 "+l+" "+f,preserveAspectRatio:"none"});return{span:fi([],[x],r),minWidth:0,height:h}}else{var g=[],m=Mk[s],[b,v,S]=m,C=S/1e3,A=b.length,_,E;if(A===1){var M=m[3];_=["hide-tail"],E=[M]}else if(A===2)_=["halfarrow-left","halfarrow-right"],E=["xMinYMin","xMaxYMin"];else if(A===3)_=["brace-left","brace-center","brace-right"],E=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
|
|
276
|
-
`+A+" children.");for(var z=0;z<A;z++){var N=new ui(b[z]),R=new Na([N],{width:"400em",height:Ye(C),viewBox:"0 0 "+l+" "+S,preserveAspectRatio:E[z]+" slice"}),$=fi([_[z]],[R],r);if(A===1)return{span:$,minWidth:v,height:C};$.style.height=Ye(C),g.push($)}return{span:$e(["stretchy"],g,r),minWidth:v,height:C}}}var{span:a,minWidth:i,height:o}=n();return a.height=o,a.style.height=Ye(o),i>0&&(a.style.minWidth=Ye(i)),a},Ik=function(t,r,n,a,i){var o,l=t.height+t.depth+n+a;if(/fbox|color|angl/.test(r)){if(o=$e(["stretchy",r],[],i),r==="fbox"){var s=i.color&&i.getColor();s&&(o.style.borderColor=s)}}else{var u=[];/^[bx]cancel$/.test(r)&&u.push(new Cc({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&u.push(new Cc({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var c=new Na(u,{width:"100%",height:Ye(l)});o=fi([],[c],i)}return o.height=l,o.style.height=Ye(l),o};function Mt(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function g0(e){var t=b0(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function b0(e){return e&&(e.type==="atom"||fk.hasOwnProperty(e.type))?e:null}var Xp=e=>{if(e instanceof vn)return e;if(sk(e)&&e.children.length===1)return Xp(e.children[0])},jc=(e,t)=>{var r,n,a;e&&e.type==="supsub"?(n=Mt(e.base,"accent"),r=n.base,e.base=r,a=lk(Ht(e,t)),e.base=n):(n=Mt(e,"accent"),r=n.base);var i=Ht(r,t.havingCrampedStyle()),o=n.isShifty&&La(r),l=0;if(o){var s,u;l=(s=(u=Xp(i))==null?void 0:u.skew)!=null?s:0}var c=n.label==="\\c",f=c?i.height+i.depth:Math.min(i.height,t.fontMetrics().xHeight),d;if(n.isStretchy)d=m0(n,t),d=Ut({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:d,wrapperClasses:["svg-align"],wrapperStyle:l>0?{width:"calc(100% - "+Ye(2*l)+")",marginLeft:Ye(2*l)}:void 0}]});else{var h,y;n.label==="\\vec"?(h=Np("vec",t),y=Bp.vec[1]):(h=u0({mode:n.mode,text:n.label},t,"textord"),h=ok(h),h.italic=0,y=h.width,c&&(f+=h.depth)),d=$e(["accent-body"],[h]);var p=n.label==="\\textcircled";p&&(d.classes.push("accent-full"),f=i.height);var x=l;p||(x-=y/2),d.style.left=Ye(x),n.label==="\\textcircled"&&(d.style.top=".2em"),d=Ut({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-f},{type:"elem",elem:d}]})}var g=$e(["mord","accent"],[d],t);return a?(a.children[0]=g,a.height=Math.max(g.height,a.height),a.classes[0]="mord",a):g},Yp=(e,t)=>{var r=e.isStretchy?v0(e.label):new je("mo",[Fn(e.label,e.mode)]),n=new je("mover",[Yt(e.base,t),r]);return n.setAttribute("accent","true"),n},zk=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));at({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var r=h0(t[0]),n=!zk.test(e.funcName),a=!n||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:a,base:r}},htmlBuilder:jc,mathmlBuilder:Yp}),at({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var r=t[0],n=e.parser.mode;return n==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:jc,mathmlBuilder:Yp}),at({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=t[0];return{type:"accentUnder",mode:r.mode,label:n,base:a}},htmlBuilder:(e,t)=>{var r=Ht(e.base,t),n=m0(e,t),a=e.label==="\\utilde"?.12:0,i=Ut({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:a},{type:"elem",elem:r}]});return $e(["mord","accentunder"],[i],t)},mathmlBuilder:(e,t)=>{var r=v0(e.label),n=new je("munder",[Yt(e.base,t),r]);return n.setAttribute("accentunder","true"),n}});var y0=e=>{var t=new je("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};at({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:n,funcName:a}=e;return{type:"xArrow",mode:n.mode,label:a,body:t[0],below:r[0]}},htmlBuilder(e,t){var r=t.style,n=t.havingStyle(r.sup()),a=So(Ht(e.body,n,t),t),i=e.label.slice(0,2)==="\\x"?"x":"cd";a.classes.push(i+"-arrow-pad");var o;e.below&&(n=t.havingStyle(r.sub()),o=So(Ht(e.below,n,t),t),o.classes.push(i+"-arrow-pad"));var l=m0(e,t),s=-t.fontMetrics().axisHeight+.5*l.height,u=-t.fontMetrics().axisHeight-.5*l.height-.111;(a.depth>.25||e.label==="\\xleftequilibrium")&&(u-=a.depth);var c;if(o){var f=-t.fontMetrics().axisHeight+o.height+.5*l.height+.111;c=Ut({positionType:"individualShift",children:[{type:"elem",elem:a,shift:u},{type:"elem",elem:l,shift:s},{type:"elem",elem:o,shift:f}]})}else c=Ut({positionType:"individualShift",children:[{type:"elem",elem:a,shift:u},{type:"elem",elem:l,shift:s}]});return c.children[0].children[0].children[1].classes.push("svg-align"),$e(["mrel","x-arrow"],[c],t)},mathmlBuilder(e,t){var r=v0(e.label);r.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(e.body){var a=y0(Yt(e.body,t));if(e.below){var i=y0(Yt(e.below,t));n=new je("munderover",[r,i,a])}else n=new je("mover",[r,a])}else if(e.below){var o=y0(Yt(e.below,t));n=new je("munder",[r,o])}else n=y0(),n=new je("mover",[r,n]);return n}});function Zp(e,t){var r=Cr(e.body,t,!0);return $e([e.mclass],r,t)}function Jp(e,t){var r,n=gn(e.body,t);return e.mclass==="minner"?r=new je("mpadded",n):e.mclass==="mord"?e.isCharacterBox?(r=n[0],r.type="mi"):r=new je("mi",n):(e.isCharacterBox?(r=n[0],r.type="mo"):r=new je("mo",n),e.mclass==="mbin"?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):e.mclass==="mpunct"?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(r.attributes.lspace="0em",r.attributes.rspace="0em"):e.mclass==="minner"&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}at({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:r,funcName:n}=e,a=t[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:yr(a),isCharacterBox:La(a)}},htmlBuilder:Zp,mathmlBuilder:Jp});var x0=e=>{var t=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return t.type==="atom"&&(t.family==="bin"||t.family==="rel")?"m"+t.family:"mord"};at({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:r}=e;return{type:"mclass",mode:r.mode,mclass:x0(t[0]),body:yr(t[1]),isCharacterBox:La(t[1])}}}),at({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:r,funcName:n}=e,a=t[1],i=t[0],o;n!=="\\stackrel"?o=x0(a):o="mrel";var l={type:"op",mode:a.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:yr(a)},s={type:"supsub",mode:i.mode,base:l,sup:n==="\\underset"?null:i,sub:n==="\\underset"?i:null};return{type:"mclass",mode:r.mode,mclass:o,body:[s],isCharacterBox:La(s)}},htmlBuilder:Zp,mathmlBuilder:Jp}),at({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"pmb",mode:r.mode,mclass:x0(t[0]),body:yr(t[0])}},htmlBuilder(e,t){var r=Cr(e.body,t,!0),n=$e([e.mclass],r,t);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(e,t){var r=gn(e.body,t),n=new je("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var Fk={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Qp=()=>({type:"styling",body:[],mode:"math",style:"display"}),ev=e=>e.type==="textord"&&e.text==="@",Ok=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;function Pk(e,t,r){var n=Fk[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{var a=r.callFunction("\\\\cdleft",[t[0]],[]),i={type:"atom",text:n,mode:"math",family:"rel"},o=r.callFunction("\\Big",[i],[]),l=r.callFunction("\\\\cdright",[t[1]],[]),s={type:"ordgroup",mode:"math",body:[a,o,l]};return r.callFunction("\\\\cdparent",[s],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var u={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[u],[])}default:return{type:"textord",text:" ",mode:"math"}}}function Rk(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var r=e.fetch().text;if(r==="&"||r==="\\\\")e.consume();else if(r==="\\end"){t[t.length-1].length===0&&t.pop();break}else throw new He("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var n=[],a=[n],i=0;i<t.length;i++){for(var o=t[i],l=Qp(),s=0;s<o.length;s++)if(!ev(o[s]))l.body.push(o[s]);else{n.push(l),s+=1;var u=g0(o[s]).text,c=new Array(2);if(c[0]={type:"ordgroup",mode:"math",body:[]},c[1]={type:"ordgroup",mode:"math",body:[]},!"=|.".includes(u))if("<>AV".includes(u))for(var f=0;f<2;f++){for(var d=!0,h=s+1;h<o.length;h++){if(Ok(o[h],u)){d=!1,s=h;break}if(ev(o[h]))throw new He("Missing a "+u+" character to complete a CD arrow.",o[h]);c[f].body.push(o[h])}if(d)throw new He("Missing a "+u+" character to complete a CD arrow.",o[s])}else throw new He('Expected one of "<>AV=|." after @',o[s]);var y=Pk(u,c,e),p={type:"styling",body:[y],mode:"math",style:"display"};n.push(p),l=Qp()}i%2===0?n.push(l):n.shift(),n=[],a.push(n)}e.gullet.endGroup(),e.gullet.endGroup();var x=new Array(a[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:a,arraystretch:1,addJot:!0,rowGaps:[null],cols:x,colSeparationType:"CD",hLinesBeforeRow:new Array(a.length+1).fill([])}}at({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:t[0]}},htmlBuilder(e,t){var r=t.havingStyle(t.style.sup()),n=So(Ht(e.label,r,t),t);return n.classes.push("cd-label-"+e.side),n.style.bottom=Ye(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(e,t){var r=new je("mrow",[Yt(e.label,t)]);return r=new je("mpadded",[r]),r.setAttribute("width","0"),e.side==="left"&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new je("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}}),at({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:r}=e;return{type:"cdlabelparent",mode:r.mode,fragment:t[0]}},htmlBuilder(e,t){var r=So(Ht(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(e,t){return new je("mrow",[Yt(e.fragment,t)])}}),at({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:r}=e,n=Mt(t[0],"ordgroup"),a=n.body,i="",o=0;o<a.length;o++){var l=Mt(a[o],"textord");i+=l.text}var s=parseInt(i),u;if(isNaN(s))throw new He("\\@char has non-numeric argument "+i);if(s<0||s>=1114111)throw new He("\\@char with invalid code point "+i);return s<=65535?u=String.fromCharCode(s):(s-=65536,u=String.fromCharCode((s>>10)+55296,(s&1023)+56320)),{type:"textord",mode:r.mode,text:u}}});var tv=(e,t)=>{var r=Cr(e.body,t.withColor(e.color),!1);return Ua(r)},rv=(e,t)=>{var r=gn(e.body,t.withColor(e.color)),n=new je("mstyle",r);return n.setAttribute("mathcolor",e.color),n};at({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:r}=e,n=Mt(t[0],"color-token").color,a=t[1];return{type:"color",mode:r.mode,color:n,body:yr(a)}},htmlBuilder:tv,mathmlBuilder:rv}),at({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:r,breakOnTokenText:n}=e,a=Mt(t[0],"color-token").color;r.gullet.macros.set("\\current@color",a);var i=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:a,body:i}},htmlBuilder:tv,mathmlBuilder:rv}),at({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var{parser:n}=e,a=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,i=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:i,size:a&&Mt(a,"size").value}},htmlBuilder(e,t){var r=$e(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=Ye(ur(e.size,t)))),r},mathmlBuilder(e,t){var r=new je("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",Ye(ur(e.size,t)))),r}});var Gc={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},nv=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new He("Expected a control sequence",e);return t},Lk=e=>{var t=e.gullet.popToken();return t.text==="="&&(t=e.gullet.popToken(),t.text===" "&&(t=e.gullet.popToken())),t},av=(e,t,r,n)=>{var a=e.gullet.macros.get(r.text);a==null&&(r.noexpand=!0,a={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,a,n)};at({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:r}=e;t.consumeSpaces();var n=t.fetch();if(Gc[n.text])return(r==="\\global"||r==="\\\\globallong")&&(n.text=Gc[n.text]),Mt(t.parseFunction(),"internal");throw new He("Invalid token after macro prefix",n)}}),at({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=t.gullet.popToken(),a=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(a))throw new He("Expected a control sequence",n);for(var i=0,o,l=[[]];t.gullet.future().text!=="{";)if(n=t.gullet.popToken(),n.text==="#"){if(t.gullet.future().text==="{"){o=t.gullet.future(),l[i].push("{");break}if(n=t.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new He('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==i+1)throw new He('Argument number "'+n.text+'" out of order');i++,l.push([])}else{if(n.text==="EOF")throw new He("Expected a macro definition");l[i].push(n.text)}var{tokens:s}=t.gullet.consumeArg();return o&&s.unshift(o),(r==="\\edef"||r==="\\xdef")&&(s=t.gullet.expandTokens(s),s.reverse()),t.gullet.macros.set(a,{tokens:s,numArgs:i,delimiters:l},r===Gc[r]),{type:"internal",mode:t.mode}}}),at({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=nv(t.gullet.popToken());t.gullet.consumeSpaces();var a=Lk(t);return av(t,n,a,r==="\\\\globallet"),{type:"internal",mode:t.mode}}}),at({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=nv(t.gullet.popToken()),a=t.gullet.popToken(),i=t.gullet.popToken();return av(t,n,i,r==="\\\\globalfuture"),t.gullet.pushToken(i),t.gullet.pushToken(a),{type:"internal",mode:t.mode}}});var Il=function(t,r,n){var a=or.math[t]&&or.math[t].replace,i=Ac(a||t,r,n);if(!i)throw new Error("Unsupported symbol "+t+" and font size "+r+".");return i},Vc=function(t,r,n,a){var i=n.havingBaseStyle(r),o=$e(a.concat(i.sizingClasses(n)),[t],n),l=i.sizeMultiplier/n.sizeMultiplier;return o.height*=l,o.depth*=l,o.maxFontSize=i.sizeMultiplier,o},iv=function(t,r,n){var a=r.havingBaseStyle(n),i=(1-r.sizeMultiplier/a.sizeMultiplier)*r.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=Ye(i),t.height-=i,t.depth+=i},Bk=function(t,r,n,a,i,o){var l=rn(t,"Main-Regular",i,a),s=Vc(l,r,a,o);return iv(s,a,r),s},Nk=function(t,r,n,a){return rn(t,"Size"+r+"-Regular",n,a)},ov=function(t,r,n,a,i,o){var l=Nk(t,r,i,a),s=Vc($e(["delimsizing","size"+r],[l],a),Ct.TEXT,a,o);return n&&iv(s,a,Ct.TEXT),s},qc=function(t,r,n){var a;r==="Size1-Regular"?a="delim-size1":a="delim-size4";var i=$e(["delimsizinginner",a],[$e([],[rn(t,r,n)])]);return{type:"elem",elem:i}},Wc=function(t,r,n){var a=ma["Size4-Regular"][t.charCodeAt(0)]?ma["Size4-Regular"][t.charCodeAt(0)][4]:ma["Size1-Regular"][t.charCodeAt(0)][4],i=new ui("inner",ek(t,Math.round(1e3*r))),o=new Na([i],{width:Ye(a),height:Ye(r),style:"width:"+Ye(a),viewBox:"0 0 "+1e3*a+" "+Math.round(1e3*r),preserveAspectRatio:"xMinYMin"}),l=fi([],[o],n);return l.height=r,l.style.height=Ye(r),l.style.width=Ye(a),{type:"elem",elem:l}},Kc=.008,_0={type:"kern",size:-1*Kc},$k=new Set(["|","\\lvert","\\rvert","\\vert"]),Uk=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),lv=function(t,r,n,a,i,o){var l,s,u,c,f="",d=0;l=u=c=t,s=null;var h="Size1-Regular";t==="\\uparrow"?u=c="⏐":t==="\\Uparrow"?u=c="‖":t==="\\downarrow"?l=u="⏐":t==="\\Downarrow"?l=u="‖":t==="\\updownarrow"?(l="\\uparrow",u="⏐",c="\\downarrow"):t==="\\Updownarrow"?(l="\\Uparrow",u="‖",c="\\Downarrow"):$k.has(t)?(u="∣",f="vert",d=333):Uk.has(t)?(u="∥",f="doublevert",d=556):t==="["||t==="\\lbrack"?(l="⎡",u="⎢",c="⎣",h="Size4-Regular",f="lbrack",d=667):t==="]"||t==="\\rbrack"?(l="⎤",u="⎥",c="⎦",h="Size4-Regular",f="rbrack",d=667):t==="\\lfloor"||t==="⌊"?(u=l="⎢",c="⎣",h="Size4-Regular",f="lfloor",d=667):t==="\\lceil"||t==="⌈"?(l="⎡",u=c="⎢",h="Size4-Regular",f="lceil",d=667):t==="\\rfloor"||t==="⌋"?(u=l="⎥",c="⎦",h="Size4-Regular",f="rfloor",d=667):t==="\\rceil"||t==="⌉"?(l="⎤",u=c="⎥",h="Size4-Regular",f="rceil",d=667):t==="("||t==="\\lparen"?(l="⎛",u="⎜",c="⎝",h="Size4-Regular",f="lparen",d=875):t===")"||t==="\\rparen"?(l="⎞",u="⎟",c="⎠",h="Size4-Regular",f="rparen",d=875):t==="\\{"||t==="\\lbrace"?(l="⎧",s="⎨",c="⎩",u="⎪",h="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(l="⎫",s="⎬",c="⎭",u="⎪",h="Size4-Regular"):t==="\\lgroup"||t==="⟮"?(l="⎧",c="⎩",u="⎪",h="Size4-Regular"):t==="\\rgroup"||t==="⟯"?(l="⎫",c="⎭",u="⎪",h="Size4-Regular"):t==="\\lmoustache"||t==="⎰"?(l="⎧",c="⎭",u="⎪",h="Size4-Regular"):(t==="\\rmoustache"||t==="⎱")&&(l="⎫",c="⎩",u="⎪",h="Size4-Regular");var y=Il(l,h,i),p=y.height+y.depth,x=Il(u,h,i),g=x.height+x.depth,m=Il(c,h,i),b=m.height+m.depth,v=0,S=1;if(s!==null){var C=Il(s,h,i);v=C.height+C.depth,S=2}var A=p+b+v,_=Math.max(0,Math.ceil((r-A)/(S*g))),E=A+_*S*g,M=a.fontMetrics().axisHeight;n&&(M*=a.sizeMultiplier);var z=E/2-M,N=[];if(f.length>0){var R=E-p-b,$=Math.round(E*1e3),q=tk(f,Math.round(R*1e3)),W=new ui(f,q),Z=Ye(d/1e3),te=Ye($/1e3),ne=new Na([W],{width:Z,height:te,viewBox:"0 0 "+d+" "+$}),_e=fi([],[ne],a);_e.height=$/1e3,_e.style.width=Z,_e.style.height=te,N.push({type:"elem",elem:_e})}else{if(N.push(qc(c,h,i)),N.push(_0),s===null){var pe=E-p-b+2*Kc;N.push(Wc(u,pe,a))}else{var we=(E-p-b-v)/2+2*Kc;N.push(Wc(u,we,a)),N.push(_0),N.push(qc(s,h,i)),N.push(_0),N.push(Wc(u,we,a))}N.push(_0),N.push(qc(l,h,i))}var ve=a.havingBaseStyle(Ct.TEXT),Te=Ut({positionType:"bottom",positionData:z,children:N});return Vc($e(["delimsizing","mult"],[Te],ve),Ct.TEXT,a,o)},Xc=80,Yc=.08,Zc=function(t,r,n,a,i){var o=Q9(t,a,n),l=new ui(t,o),s=new Na([l],{width:"400em",height:Ye(r),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return fi(["hide-tail"],[s],i)},Hk=function(t,r){var n=r.havingBaseSizing(),a=dv("\\surd",t*n.sizeMultiplier,fv,n),i=n.sizeMultiplier,o=Math.max(0,r.minRuleThickness-r.fontMetrics().sqrtRuleThickness),l,s=0,u=0,c=0,f;return a.type==="small"?(c=1e3+1e3*o+Xc,t<1?i=1:t<1.4&&(i=.7),s=(1+o+Yc)/i,u=(1+o)/i,l=Zc("sqrtMain",s,c,o,r),l.style.minWidth="0.853em",f=.833/i):a.type==="large"?(c=(1e3+Xc)*zl[a.size],u=(zl[a.size]+o)/i,s=(zl[a.size]+o+Yc)/i,l=Zc("sqrtSize"+a.size,s,c,o,r),l.style.minWidth="1.02em",f=1/i):(s=t+o+Yc,u=t+o,c=Math.floor(1e3*t+o)+Xc,l=Zc("sqrtTall",s,c,o,r),l.style.minWidth="0.742em",f=1.056),l.height=u,l.style.height=Ye(s),{span:l,advanceWidth:f,ruleWidth:(r.fontMetrics().sqrtRuleThickness+o)*i}},sv=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),jk=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),uv=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),zl=[0,1.2,1.8,2.4,3],cv=function(t,r,n,a,i){if(t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle"),sv.has(t)||uv.has(t))return ov(t,r,!1,n,a,i);if(jk.has(t))return lv(t,zl[r],!1,n,a,i);throw new He("Illegal delimiter: '"+t+"'")},Gk=[{type:"small",style:Ct.SCRIPTSCRIPT},{type:"small",style:Ct.SCRIPT},{type:"small",style:Ct.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Vk=[{type:"small",style:Ct.SCRIPTSCRIPT},{type:"small",style:Ct.SCRIPT},{type:"small",style:Ct.TEXT},{type:"stack"}],fv=[{type:"small",style:Ct.SCRIPTSCRIPT},{type:"small",style:Ct.SCRIPT},{type:"small",style:Ct.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],qk=function(t){if(t.type==="small")return"Main-Regular";if(t.type==="large")return"Size"+t.size+"-Regular";if(t.type==="stack")return"Size4-Regular";var r=t.type;throw new Error("Add support for delim type '"+r+"' here.")},dv=function(t,r,n,a){for(var i=Math.min(2,3-a.style.size),o=i;o<n.length;o++){var l=n[o];if(l.type==="stack")break;var s=Il(t,qk(l),"math"),u=s.height+s.depth;if(l.type==="small"){var c=a.havingBaseStyle(l.style);u*=c.sizeMultiplier}if(u>r)return l}return n[n.length-1]},Jc=function(t,r,n,a,i,o){t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle");var l;uv.has(t)?l=Gk:sv.has(t)?l=fv:l=Vk;var s=dv(t,r,l,a);return s.type==="small"?Bk(t,s.style,n,a,i,o):s.type==="large"?ov(t,s.size,n,a,i,o):lv(t,r,n,a,i,o)},Qc=function(t,r,n,a,i,o){var l=a.fontMetrics().axisHeight*a.sizeMultiplier,s=901,u=5/a.fontMetrics().ptPerEm,c=Math.max(r-l,n+l),f=Math.max(c/500*s,2*c-u);return Jc(t,f,!0,a,i,o)},hv={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Wk=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function w0(e,t){var r=b0(e);if(r&&Wk.has(r.text))return r;throw r?new He("Invalid delimiter '"+r.text+"' after '"+t.funcName+"'",e):new He("Invalid delimiter type '"+e.type+"'",e)}at({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var r=w0(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:hv[e.funcName].size,mclass:hv[e.funcName].mclass,delim:r.text}},htmlBuilder:(e,t)=>e.delim==="."?$e([e.mclass]):cv(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!=="."&&t.push(Fn(e.delim,e.mode));var r=new je("mo",t);e.mclass==="mopen"||e.mclass==="mclose"?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=Ye(zl[e.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}});function pv(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}at({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=e.parser.gullet.macros.get("\\current@color");if(r&&typeof r!="string")throw new He("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:w0(t[0],e).text,color:r}}}),at({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=w0(t[0],e),n=e.parser;++n.leftrightDepth;var a=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var i=Mt(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:a,left:r.text,right:i.delim,rightColor:i.color}},htmlBuilder:(e,t)=>{pv(e);for(var r=Cr(e.body,t,!0,["mopen","mclose"]),n=0,a=0,i=!1,o=0;o<r.length;o++)r[o].isMiddle?i=!0:(n=Math.max(r[o].height,n),a=Math.max(r[o].depth,a));n*=t.sizeMultiplier,a*=t.sizeMultiplier;var l;if(e.left==="."?l=Dl(t,["mopen"]):l=Qc(e.left,n,a,t,e.mode,["mopen"]),r.unshift(l),i)for(var s=1;s<r.length;s++){var u=r[s],c=u.isMiddle;c&&(r[s]=Qc(c.delim,n,a,c.options,e.mode,[]))}var f;if(e.right===".")f=Dl(t,["mclose"]);else{var d=e.rightColor?t.withColor(e.rightColor):t;f=Qc(e.right,n,a,d,e.mode,["mclose"])}return r.push(f),$e(["minner"],r,t)},mathmlBuilder:(e,t)=>{pv(e);var r=gn(e.body,t);if(e.left!=="."){var n=new je("mo",[Fn(e.left,e.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if(e.right!=="."){var a=new je("mo",[Fn(e.right,e.mode)]);a.setAttribute("fence","true"),e.rightColor&&a.setAttribute("mathcolor",e.rightColor),r.push(a)}return $c(r)}}),at({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=w0(t[0],e);if(!e.parser.leftrightDepth)throw new He("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},htmlBuilder:(e,t)=>{var r;if(e.delim===".")r=Dl(t,[]);else{r=cv(e.delim,1,t,e.mode,[]);var n={delim:e.delim,options:t};r.isMiddle=n}return r},mathmlBuilder:(e,t)=>{var r=e.delim==="\\vert"||e.delim==="|"?Fn("|","text"):Fn(e.delim,e.mode),n=new je("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var k0=(e,t)=>{var r=So(Ht(e.body,t),t),n=e.label.slice(1),a=t.sizeMultiplier,i,o=0,l=La(e.body);if(n==="sout")i=$e(["stretchy","sout"]),i.height=t.fontMetrics().defaultRuleThickness/a,o=-.5*t.fontMetrics().xHeight;else if(n==="phase"){var s=ur({number:.6,unit:"pt"},t),u=ur({number:.35,unit:"ex"},t),c=t.havingBaseSizing();a=a/c.sizeMultiplier;var f=r.height+r.depth+s+u;r.style.paddingLeft=Ye(f/2+s);var d=Math.floor(1e3*f*a),h=Z9(d),y=new Na([new ui("phase",h)],{width:"400em",height:Ye(d/1e3),viewBox:"0 0 400000 "+d,preserveAspectRatio:"xMinYMin slice"});i=fi(["hide-tail"],[y],t),i.style.height=Ye(f),o=r.depth+s+u}else{/cancel/.test(n)?l||r.classes.push("cancel-pad"):n==="angl"?r.classes.push("anglpad"):r.classes.push("boxpad");var p=0,x=0,g=0;/box/.test(n)?(g=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),p=t.fontMetrics().fboxsep+(n==="colorbox"?0:g),x=p):n==="angl"?(g=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),p=4*g,x=Math.max(0,.25-r.depth)):(p=l?.2:0,x=p),i=Ik(r,n,p,x,t),/fbox|boxed|fcolorbox/.test(n)?(i.style.borderStyle="solid",i.style.borderWidth=Ye(g)):n==="angl"&&g!==.049&&(i.style.borderTopWidth=Ye(g),i.style.borderRightWidth=Ye(g)),o=r.depth+x,e.backgroundColor&&(i.style.backgroundColor=e.backgroundColor,e.borderColor&&(i.style.borderColor=e.borderColor))}var m;if(e.backgroundColor)m=Ut({positionType:"individualShift",children:[{type:"elem",elem:i,shift:o},{type:"elem",elem:r,shift:0}]});else{var b=/cancel|phase/.test(n)?["svg-align"]:[];m=Ut({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:i,shift:o,wrapperClasses:b}]})}return/cancel/.test(n)&&(m.height=r.height,m.depth=r.depth),/cancel/.test(n)&&!l?$e(["mord","cancel-lap"],[m],t):$e(["mord"],[m],t)},S0=(e,t)=>{var r=0,n=new je(e.label.includes("colorbox")?"mpadded":"menclose",[Yt(e.body,t)]);switch(e.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),e.label==="\\fcolorbox"){var a=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);n.setAttribute("style","border: "+Ye(a)+" solid "+e.borderColor)}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n};at({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,r){var{parser:n,funcName:a}=e,i=Mt(t[0],"color-token").color,o=t[1];return{type:"enclose",mode:n.mode,label:a,backgroundColor:i,body:o}},htmlBuilder:k0,mathmlBuilder:S0}),at({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,r){var{parser:n,funcName:a}=e,i=Mt(t[0],"color-token").color,o=Mt(t[1],"color-token").color,l=t[2];return{type:"enclose",mode:n.mode,label:a,backgroundColor:o,borderColor:i,body:l}},htmlBuilder:k0,mathmlBuilder:S0}),at({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\fbox",body:t[0]}}}),at({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e,a=t[0];return{type:"enclose",mode:r.mode,label:n,body:a}},htmlBuilder:k0,mathmlBuilder:S0}),at({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e;r.mode==="math"&&r.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var a=t[0];return{type:"enclose",mode:r.mode,label:n,body:a}},htmlBuilder:k0,mathmlBuilder:S0}),at({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\angl",body:t[0]}}});var vv={};function ga(e){for(var{type:t,names:r,props:n,handler:a,htmlBuilder:i,mathmlBuilder:o}=e,l={type:t,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:a},s=0;s<r.length;++s)vv[r[s]]=l;i&&(f0[t]=i),o&&(d0[t]=o)}var mv={};function B(e,t){mv[e]=t}class un{constructor(t,r,n){this.lexer=t,this.start=r,this.end=n}static range(t,r){return r?!t||!t.loc||!r.loc||t.loc.lexer!==r.loc.lexer?null:new un(t.loc.lexer,t.loc.start,r.loc.end):t&&t.loc}}class bn{constructor(t,r){this.text=t,this.loc=r}range(t,r){return new bn(r,un.range(this,t))}}function gv(e){var t=[];e.consumeSpaces();var r=e.fetch().text;for(r==="\\relax"&&(e.consume(),e.consumeSpaces(),r=e.fetch().text);r==="\\hline"||r==="\\hdashline";)e.consume(),t.push(r==="\\hdashline"),e.consumeSpaces(),r=e.fetch().text;return t}var C0=e=>{var t=e.parser.settings;if(!t.displayMode)throw new He("{"+e.envName+"} can be used only in display mode.")},Kk=new Set(["gather","gather*"]);function ef(e){if(!e.includes("ed"))return!e.includes("*")}function hi(e,t,r){var{hskipBeforeAndAfter:n,addJot:a,cols:i,arraystretch:o,colSeparationType:l,autoTag:s,singleRow:u,emptySingleRow:c,maxNumCols:f,leqno:d}=t;if(e.gullet.beginGroup(),u||e.gullet.macros.set("\\cr","\\\\\\relax"),!o){var h=e.gullet.expandMacroAsText("\\arraystretch");if(h==null)o=1;else if(o=parseFloat(h),!o||o<0)throw new He("Invalid \\arraystretch: "+h)}e.gullet.beginGroup();var y=[],p=[y],x=[],g=[],m=s!=null?[]:void 0;function b(){s&&e.gullet.macros.set("\\@eqnsw","1",!0)}function v(){m&&(e.gullet.macros.get("\\df@tag")?(m.push(e.subparse([new bn("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):m.push(!!s&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(b(),g.push(gv(e));;){var S=e.parseExpression(!1,u?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var C={type:"ordgroup",mode:e.mode,body:S};r&&(C={type:"styling",mode:e.mode,style:r,body:[C]}),y.push(C);var A=e.fetch().text;if(A==="&"){if(f&&y.length===f){if(u||l)throw new He("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(A==="\\end"){v(),y.length===1&&C.type==="styling"&&C.body.length===1&&C.body[0].type==="ordgroup"&&C.body[0].body.length===0&&(p.length>1||!c)&&p.pop(),g.length<p.length+1&&g.push([]);break}else if(A==="\\\\"){e.consume();var _=void 0;e.gullet.future().text!==" "&&(_=e.parseSizeGroup(!0)),x.push(_?_.value:null),v(),g.push(gv(e)),y=[],p.push(y),b()}else throw new He("Expected & or \\\\ or \\cr or \\end",e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:a,arraystretch:o,body:p,cols:i,rowGaps:x,hskipBeforeAndAfter:n,hLinesBeforeRow:g,colSeparationType:l,tags:m,leqno:d}}function tf(e){return e.slice(0,1)==="d"?"display":"text"}var ba=function(t,r){var n,a,i=t.body.length,o=t.hLinesBeforeRow,l=0,s=new Array(i),u=[],c=Math.max(r.fontMetrics().arrayRuleWidth,r.minRuleThickness),f=1/r.fontMetrics().ptPerEm,d=5*f;if(t.colSeparationType&&t.colSeparationType==="small"){var h=r.havingStyle(Ct.SCRIPT).sizeMultiplier;d=.2778*(h/r.sizeMultiplier)}var y=t.colSeparationType==="CD"?ur({number:3,unit:"ex"},r):12*f,p=3*f,x=t.arraystretch*y,g=.7*x,m=.3*x,b=0;function v(ot){for(var wt=0;wt<ot.length;++wt)wt>0&&(b+=.25),u.push({pos:b,isDashed:ot[wt]})}for(v(o[0]),n=0;n<t.body.length;++n){var S=t.body[n],C=g,A=m;l<S.length&&(l=S.length);var _=new Array(S.length);for(a=0;a<S.length;++a){var E=Ht(S[a],r);A<E.depth&&(A=E.depth),C<E.height&&(C=E.height),_[a]=E}var M=t.rowGaps[n],z=0;M&&(z=ur(M,r),z>0&&(z+=m,A<z&&(A=z),z=0)),t.addJot&&n<t.body.length-1&&(A+=p),_.height=C,_.depth=A,b+=C,_.pos=b,b+=A+z,s[n]=_,v(o[n+1])}var N=b/2+r.fontMetrics().axisHeight,R=t.cols||[],$=[],q,W,Z=[];if(t.tags&&t.tags.some(ot=>ot))for(n=0;n<i;++n){var te=s[n],ne=te.pos-N,_e=t.tags[n],pe=void 0;_e===!0?pe=$e(["eqn-num"],[],r):_e===!1?pe=$e([],[],r):pe=$e([],Cr(_e,r,!0),r),pe.depth=te.depth,pe.height=te.height,Z.push({type:"elem",elem:pe,shift:ne})}for(a=0,W=0;a<l||W<R.length;++a,++W){for(var we,ve=R[W],Te=!0;((Se=ve)==null?void 0:Se.type)==="separator";){var Se;if(Te||(q=$e(["arraycolsep"],[]),q.style.width=Ye(r.fontMetrics().doubleRuleSep),$.push(q)),ve.separator==="|"||ve.separator===":"){var Ie=ve.separator==="|"?"solid":"dashed",Le=$e(["vertical-separator"],[],r);Le.style.height=Ye(b),Le.style.borderRightWidth=Ye(c),Le.style.borderRightStyle=Ie,Le.style.margin="0 "+Ye(-c/2);var Ae=b-N;Ae&&(Le.style.verticalAlign=Ye(-Ae)),$.push(Le)}else throw new He("Invalid separator type: "+ve.separator);W++,ve=R[W],Te=!1}if(!(a>=l)){var Be=void 0;if(a>0||t.hskipBeforeAndAfter){var be,ye;Be=(be=(ye=ve)==null?void 0:ye.pregap)!=null?be:d,Be!==0&&(q=$e(["arraycolsep"],[]),q.style.width=Ye(Be),$.push(q))}var P=[];for(n=0;n<i;++n){var V=s[n],fe=V[a];if(fe){var de=V.pos-N;fe.depth=V.depth,fe.height=V.height,P.push({type:"elem",elem:fe,shift:de})}}var ie=Ut({positionType:"individualShift",children:P}),oe=$e(["col-align-"+(((we=ve)==null?void 0:we.align)||"c")],[ie]);if($.push(oe),a<l-1||t.hskipBeforeAndAfter){var se,ge;Be=(se=(ge=ve)==null?void 0:ge.postgap)!=null?se:d,Be!==0&&(q=$e(["arraycolsep"],[]),q.style.width=Ye(Be),$.push(q))}}}var Ce=$e(["mtable"],$);if(u.length>0){for(var xe=ko("hline",r,c),Ve=ko("hdashline",r,c),Ue=[{type:"elem",elem:Ce,shift:0}];u.length>0;){var Ne=u.pop(),qe=Ne.pos-N;Ne.isDashed?Ue.push({type:"elem",elem:Ve,shift:qe}):Ue.push({type:"elem",elem:xe,shift:qe})}Ce=Ut({positionType:"individualShift",children:Ue})}if(Z.length===0)return $e(["mord"],[Ce],r);var it=Ut({positionType:"individualShift",children:Z}),ct=$e(["tag"],[it],r);return Ua([Ce,ct])},Xk={c:"center ",l:"left ",r:"right "},ya=function(t,r){for(var n=[],a=new je("mtd",[],["mtr-glue"]),i=new je("mtd",[],["mml-eqn-num"]),o=0;o<t.body.length;o++){for(var l=t.body[o],s=[],u=0;u<l.length;u++)s.push(new je("mtd",[Yt(l[u],r)]));t.tags&&t.tags[o]&&(s.unshift(a),s.push(a),t.leqno?s.unshift(i):s.push(i)),n.push(new je("mtr",s))}var c=new je("mtable",n),f=t.arraystretch===.5?.1:.16+t.arraystretch-1+(t.addJot?.09:0);c.setAttribute("rowspacing",Ye(f));var d="",h="";if(t.cols&&t.cols.length>0){var y=t.cols,p="",x=!1,g=0,m=y.length;y[0].type==="separator"&&(d+="top ",g=1),y[y.length-1].type==="separator"&&(d+="bottom ",m-=1);for(var b=g;b<m;b++){var v=y[b];v.type==="align"?(h+=Xk[v.align],x&&(p+="none "),x=!0):v.type==="separator"&&x&&(p+=v.separator==="|"?"solid ":"dashed ",x=!1)}c.setAttribute("columnalign",h.trim()),/[sd]/.test(p)&&c.setAttribute("columnlines",p.trim())}if(t.colSeparationType==="align"){for(var S=t.cols||[],C="",A=1;A<S.length;A++)C+=A%2?"0em ":"1em ";c.setAttribute("columnspacing",C.trim())}else t.colSeparationType==="alignat"||t.colSeparationType==="gather"?c.setAttribute("columnspacing","0em"):t.colSeparationType==="small"?c.setAttribute("columnspacing","0.2778em"):t.colSeparationType==="CD"?c.setAttribute("columnspacing","0.5em"):c.setAttribute("columnspacing","1em");var _="",E=t.hLinesBeforeRow;d+=E[0].length>0?"left ":"",d+=E[E.length-1].length>0?"right ":"";for(var M=1;M<E.length-1;M++)_+=E[M].length===0?"none ":E[M][0]?"dashed ":"solid ";return/[sd]/.test(_)&&c.setAttribute("rowlines",_.trim()),d!==""&&(c=new je("menclose",[c]),c.setAttribute("notation",d.trim())),t.arraystretch&&t.arraystretch<1&&(c=new je("mstyle",[c]),c.setAttribute("scriptlevel","1")),c},bv=function(t,r){t.envName.includes("ed")||C0(t);var n=[],a=t.envName.includes("at")?"alignat":"align",i=t.envName==="split",o=hi(t.parser,{cols:n,addJot:!0,autoTag:i?void 0:ef(t.envName),emptySingleRow:!0,colSeparationType:a,maxNumCols:i?2:void 0,leqno:t.parser.settings.leqno},"display"),l=0,s=0,u={type:"ordgroup",mode:t.mode,body:[]};if(r[0]&&r[0].type==="ordgroup"){for(var c="",f=0;f<r[0].body.length;f++){var d=Mt(r[0].body[f],"textord");c+=d.text}l=Number(c),s=l*2}var h=!s;o.body.forEach(function(g){for(var m=1;m<g.length;m+=2){var b=Mt(g[m],"styling"),v=Mt(b.body[0],"ordgroup");v.body.unshift(u)}if(h)s<g.length&&(s=g.length);else{var S=g.length/2;if(l<S)throw new He("Too many math in a row: "+("expected "+l+", but got "+S),g[0])}});for(var y=0;y<s;++y){var p="r",x=0;y%2===1?p="l":y>0&&h&&(x=1),n[y]={type:"align",align:p,pregap:x,postgap:0}}return o.colSeparationType=h?"align":"alignat",o};ga({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var r=b0(t[0]),n=r?[t[0]]:Mt(t[0],"ordgroup").body,a=n.map(function(o){var l=g0(o),s=l.text;if("lcr".includes(s))return{type:"align",align:s};if(s==="|")return{type:"separator",separator:"|"};if(s===":")return{type:"separator",separator:":"};throw new He("Unknown column alignment: "+s,o)}),i={cols:a,hskipBeforeAndAfter:!0,maxNumCols:a.length};return hi(e.parser,i,tf(e.envName))},htmlBuilder:ba,mathmlBuilder:ya}),ga({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if(e.envName.charAt(e.envName.length-1)==="*"){var a=e.parser;if(a.consumeSpaces(),a.fetch().text==="["){if(a.consume(),a.consumeSpaces(),r=a.fetch().text,!"lcr".includes(r))throw new He("Expected l or c or r",a.nextToken);a.consume(),a.consumeSpaces(),a.expect("]"),a.consume(),n.cols=[{type:"align",align:r}]}}var i=hi(e.parser,n,tf(e.envName)),o=Math.max(0,...i.body.map(l=>l.length));return i.cols=new Array(o).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[i],left:t[0],right:t[1],rightColor:void 0}:i},htmlBuilder:ba,mathmlBuilder:ya}),ga({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:.5},r=hi(e.parser,t,"script");return r.colSeparationType="small",r},htmlBuilder:ba,mathmlBuilder:ya}),ga({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var r=b0(t[0]),n=r?[t[0]]:Mt(t[0],"ordgroup").body,a=n.map(function(l){var s=g0(l),u=s.text;if("lc".includes(u))return{type:"align",align:u};throw new He("Unknown column alignment: "+u,l)});if(a.length>1)throw new He("{subarray} can contain only one column");var i={cols:a,hskipBeforeAndAfter:!1,arraystretch:.5},o=hi(e.parser,i,"script");if(o.body.length>0&&o.body[0].length>1)throw new He("{subarray} can contain only one column");return o},htmlBuilder:ba,mathmlBuilder:ya}),ga({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},r=hi(e.parser,t,tf(e.envName));return{type:"leftright",mode:e.mode,body:[r],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:ba,mathmlBuilder:ya}),ga({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:bv,htmlBuilder:ba,mathmlBuilder:ya}),ga({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){Kk.has(e.envName)&&C0(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:ef(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return hi(e.parser,t,"display")},htmlBuilder:ba,mathmlBuilder:ya}),ga({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:bv,htmlBuilder:ba,mathmlBuilder:ya}),ga({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){C0(e);var t={autoTag:ef(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return hi(e.parser,t,"display")},htmlBuilder:ba,mathmlBuilder:ya}),ga({type:"array",names:["CD"],props:{numArgs:0},handler(e){return C0(e),Rk(e.parser)},htmlBuilder:ba,mathmlBuilder:ya}),B("\\nonumber","\\gdef\\@eqnsw{0}"),B("\\notag","\\nonumber"),at({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new He(e.funcName+" valid only within array environment")}});var yv=vv;at({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:r,funcName:n}=e,a=t[0];if(a.type!=="ordgroup")throw new He("Invalid environment name",a);for(var i="",o=0;o<a.body.length;++o)i+=Mt(a.body[o],"textord").text;if(n==="\\begin"){if(!yv.hasOwnProperty(i))throw new He("No such environment: "+i,a);var l=yv[i],{args:s,optArgs:u}=r.parseArguments("\\begin{"+i+"}",l),c={mode:r.mode,envName:i,parser:r},f=l.handler(c,s,u);r.expect("\\end",!1);var d=r.nextToken,h=Mt(r.parseFunction(),"environment");if(h.name!==i)throw new He("Mismatch: \\begin{"+i+"} matched by \\end{"+h.name+"}",d);return f}return{type:"environment",mode:r.mode,name:i,nameGroup:a}}});var xv=(e,t)=>{var r=e.font,n=t.withFont(r);return Ht(e.body,n)},_v=(e,t)=>{var r=e.font,n=t.withFont(r);return Yt(e.body,n)},wv={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};at({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=h0(t[0]),i=n;return i in wv&&(i=wv[i]),{type:"font",mode:r.mode,font:i.slice(1),body:a}},htmlBuilder:xv,mathmlBuilder:_v}),at({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"mclass",mode:r.mode,mclass:x0(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:La(n)}}}),at({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n,breakOnTokenText:a}=e,{mode:i}=r,o=r.parseExpression(!0,a),l="math"+n.slice(1);return{type:"font",mode:i,font:l,body:{type:"ordgroup",mode:r.mode,body:o}}},htmlBuilder:xv,mathmlBuilder:_v});var Yk=(e,t)=>{var r=t.style,n=r.fracNum(),a=r.fracDen(),i;i=t.havingStyle(n);var o=Ht(e.numer,i,t);if(e.continued){var l=8.5/t.fontMetrics().ptPerEm,s=3.5/t.fontMetrics().ptPerEm;o.height=o.height<l?l:o.height,o.depth=o.depth<s?s:o.depth}i=t.havingStyle(a);var u=Ht(e.denom,i,t),c,f,d;e.hasBarLine?(e.barSize?(f=ur(e.barSize,t),c=ko("frac-line",t,f)):c=ko("frac-line",t),f=c.height,d=c.height):(c=null,f=0,d=t.fontMetrics().defaultRuleThickness);var h,y,p;r.size===Ct.DISPLAY.size?(h=t.fontMetrics().num1,f>0?y=3*d:y=7*d,p=t.fontMetrics().denom1):(f>0?(h=t.fontMetrics().num2,y=d):(h=t.fontMetrics().num3,y=3*d),p=t.fontMetrics().denom2);var x;if(c){var m=t.fontMetrics().axisHeight;h-o.depth-(m+.5*f)<y&&(h+=y-(h-o.depth-(m+.5*f))),m-.5*f-(u.height-p)<y&&(p+=y-(m-.5*f-(u.height-p)));var b=-(m-.5*f);x=Ut({positionType:"individualShift",children:[{type:"elem",elem:u,shift:p},{type:"elem",elem:c,shift:b},{type:"elem",elem:o,shift:-h}]})}else{var g=h-o.depth-(u.height-p);g<y&&(h+=.5*(y-g),p+=.5*(y-g)),x=Ut({positionType:"individualShift",children:[{type:"elem",elem:u,shift:p},{type:"elem",elem:o,shift:-h}]})}i=t.havingStyle(r),x.height*=i.sizeMultiplier/t.sizeMultiplier,x.depth*=i.sizeMultiplier/t.sizeMultiplier;var v;r.size===Ct.DISPLAY.size?v=t.fontMetrics().delim1:r.size===Ct.SCRIPTSCRIPT.size?v=t.havingStyle(Ct.SCRIPT).fontMetrics().delim2:v=t.fontMetrics().delim2;var S,C;return e.leftDelim==null?S=Dl(t,["mopen"]):S=Jc(e.leftDelim,v,!0,t.havingStyle(r),e.mode,["mopen"]),e.continued?C=$e([]):e.rightDelim==null?C=Dl(t,["mclose"]):C=Jc(e.rightDelim,v,!0,t.havingStyle(r),e.mode,["mclose"]),$e(["mord"].concat(i.sizingClasses(t)),[S,$e(["mfrac"],[x]),C],t)},Zk=(e,t)=>{var r=new je("mfrac",[Yt(e.numer,t),Yt(e.denom,t)]);if(!e.hasBarLine)r.setAttribute("linethickness","0px");else if(e.barSize){var n=ur(e.barSize,t);r.setAttribute("linethickness",Ye(n))}if(e.leftDelim!=null||e.rightDelim!=null){var a=[];if(e.leftDelim!=null){var i=new je("mo",[new xr(e.leftDelim.replace("\\",""))]);i.setAttribute("fence","true"),a.push(i)}if(a.push(r),e.rightDelim!=null){var o=new je("mo",[new xr(e.rightDelim.replace("\\",""))]);o.setAttribute("fence","true"),a.push(o)}return $c(a)}return r},kv=(e,t)=>{if(!t)return e;var r={type:"styling",mode:e.mode,style:t,body:[e]};return r};at({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=t[0],i=t[1],o,l=null,s=null;switch(n){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":o=!0;break;case"\\\\atopfrac":o=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":o=!1,l="(",s=")";break;case"\\\\bracefrac":o=!1,l="\\{",s="\\}";break;case"\\\\brackfrac":o=!1,l="[",s="]";break;default:throw new Error("Unrecognized genfrac command")}var u=n==="\\cfrac",c=null;return u||n.startsWith("\\d")?c="display":n.startsWith("\\t")&&(c="text"),kv({type:"genfrac",mode:r.mode,numer:a,denom:i,continued:u,hasBarLine:o,leftDelim:l,rightDelim:s,barSize:null},c)},htmlBuilder:Yk,mathmlBuilder:Zk}),at({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:r,token:n}=e,a;switch(r){case"\\over":a="\\frac";break;case"\\choose":a="\\binom";break;case"\\atop":a="\\\\atopfrac";break;case"\\brace":a="\\\\bracefrac";break;case"\\brack":a="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:a,token:n}}});var Sv=["display","text","script","scriptscript"],Cv=function(t){var r=null;return t.length>0&&(r=t,r=r==="."?null:r),r};at({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var{parser:r}=e,n=t[4],a=t[5],i=h0(t[0]),o=i.type==="atom"&&i.family==="open"?Cv(i.text):null,l=h0(t[1]),s=l.type==="atom"&&l.family==="close"?Cv(l.text):null,u=Mt(t[2],"size"),c,f=null;u.isBlank?c=!0:(f=u.value,c=f.number>0);var d=null,h=t[3];if(h.type==="ordgroup"){if(h.body.length>0){var y=Mt(h.body[0],"textord");d=Sv[Number(y.text)]}}else h=Mt(h,"textord"),d=Sv[Number(h.text)];return kv({type:"genfrac",mode:r.mode,numer:n,denom:a,continued:!1,hasBarLine:c,barSize:f,leftDelim:o,rightDelim:s},d)}}),at({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:r,funcName:n,token:a}=e;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:Mt(t[0],"size").value,token:a}}}),at({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=t[0],i=Mt(t[1],"infix").size;if(!i)throw new Error("\\\\abovefrac expected size, but got "+String(i));var o=t[2],l=i.number>0;return{type:"genfrac",mode:r.mode,numer:a,denom:o,continued:!1,hasBarLine:l,barSize:i,leftDelim:null,rightDelim:null}}});var Av=(e,t)=>{var r=t.style,n,a;e.type==="supsub"?(n=e.sup?Ht(e.sup,t.havingStyle(r.sup()),t):Ht(e.sub,t.havingStyle(r.sub()),t),a=Mt(e.base,"horizBrace")):a=Mt(e,"horizBrace");var i=Ht(a.base,t.havingBaseStyle(Ct.DISPLAY)),o=m0(a,t),l;if(a.isOver?(l=Ut({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:o}]}),l.children[0].children[0].children[1].classes.push("svg-align")):(l=Ut({positionType:"bottom",positionData:i.depth+.1+o.height,children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:i}]}),l.children[0].children[0].children[0].classes.push("svg-align")),n){var s=$e(["minner",a.isOver?"mover":"munder"],[l],t);a.isOver?l=Ut({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.2},{type:"elem",elem:n}]}):l=Ut({positionType:"bottom",positionData:s.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:s}]})}return $e(["minner",a.isOver?"mover":"munder"],[l],t)},Jk=(e,t)=>{var r=v0(e.label);return new je(e.isOver?"mover":"munder",[Yt(e.base,t),r])};at({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e;return{type:"horizBrace",mode:r.mode,label:n,isOver:n.includes("\\over"),base:t[0]}},htmlBuilder:Av,mathmlBuilder:Jk}),at({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[1],a=Mt(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:a})?{type:"href",mode:r.mode,href:a,body:yr(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var r=Cr(e.body,t,!1);return vk(e.href,[],r,t)},mathmlBuilder:(e,t)=>{var r=di(e.body,t);return r instanceof je||(r=new je("mrow",[r])),r.setAttribute("href",e.href),r}}),at({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=Mt(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var a=[],i=0;i<n.length;i++){var o=n[i];o==="~"&&(o="\\textasciitilde"),a.push({type:"textord",mode:"text",text:o})}var l={type:"text",mode:r.mode,font:"\\texttt",body:a};return{type:"href",mode:r.mode,href:n,body:yr(l)}}}),at({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){var{parser:r}=e;return{type:"hbox",mode:r.mode,body:yr(t[0])}},htmlBuilder(e,t){var r=Cr(e.body,t,!1);return Ua(r)},mathmlBuilder(e,t){return new je("mrow",gn(e.body,t))}}),at({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n,token:a}=e,i=Mt(t[0],"raw").string,o=t[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var l,s={};switch(n){case"\\htmlClass":s.class=i,l={command:"\\htmlClass",class:i};break;case"\\htmlId":s.id=i,l={command:"\\htmlId",id:i};break;case"\\htmlStyle":s.style=i,l={command:"\\htmlStyle",style:i};break;case"\\htmlData":{for(var u=i.split(","),c=0;c<u.length;c++){var f=u[c],d=f.indexOf("=");if(d<0)throw new He("\\htmlData key/value '"+f+"' missing equals sign");var h=f.slice(0,d),y=f.slice(d+1);s["data-"+h.trim()]=y}l={command:"\\htmlData",attributes:s};break}default:throw new Error("Unrecognized html command")}return r.settings.isTrusted(l)?{type:"html",mode:r.mode,attributes:s,body:yr(o)}:r.formatUnsupportedCmd(n)},htmlBuilder:(e,t)=>{var r=Cr(e.body,t,!1),n=["enclosing"];e.attributes.class&&n.push(...e.attributes.class.trim().split(/\s+/));var a=$e(n,r,t);for(var i in e.attributes)i!=="class"&&e.attributes.hasOwnProperty(i)&&a.setAttribute(i,e.attributes[i]);return a},mathmlBuilder:(e,t)=>di(e.body,t)}),at({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"htmlmathml",mode:r.mode,html:yr(t[0]),mathml:yr(t[1])}},htmlBuilder:(e,t)=>{var r=Cr(e.html,t,!1);return Ua(r)},mathmlBuilder:(e,t)=>di(e.mathml,t)});var rf=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!r)throw new He("Invalid size: '"+t+"' in \\includegraphics");var n={number:+(r[1]+r[2]),unit:r[3]};if(!Sp(n))throw new He("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};at({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,r)=>{var{parser:n}=e,a={number:0,unit:"em"},i={number:.9,unit:"em"},o={number:0,unit:"em"},l="";if(r[0])for(var s=Mt(r[0],"raw").string,u=s.split(","),c=0;c<u.length;c++){var f=u[c].split("=");if(f.length===2){var d=f[1].trim();switch(f[0].trim()){case"alt":l=d;break;case"width":a=rf(d);break;case"height":i=rf(d);break;case"totalheight":o=rf(d);break;default:throw new He("Invalid key: '"+f[0]+"' in \\includegraphics.")}}}var h=Mt(t[0],"url").url;return l===""&&(l=h,l=l.replace(/^.*[\\/]/,""),l=l.substring(0,l.lastIndexOf("."))),n.settings.isTrusted({command:"\\includegraphics",url:h})?{type:"includegraphics",mode:n.mode,alt:l,width:a,height:i,totalheight:o,src:h}:n.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var r=ur(e.height,t),n=0;e.totalheight.number>0&&(n=ur(e.totalheight,t)-r);var a=0;e.width.number>0&&(a=ur(e.width,t));var i={height:Ye(r+n)};a>0&&(i.width=Ye(a)),n>0&&(i.verticalAlign=Ye(-n));var o=new ak(e.src,e.alt,i);return o.height=r,o.depth=n,o},mathmlBuilder:(e,t)=>{var r=new je("mglyph",[]);r.setAttribute("alt",e.alt);var n=ur(e.height,t),a=0;if(e.totalheight.number>0&&(a=ur(e.totalheight,t)-n,r.setAttribute("valign",Ye(-a))),r.setAttribute("height",Ye(n+a)),e.width.number>0){var i=ur(e.width,t);r.setAttribute("width",Ye(i))}return r.setAttribute("src",e.src),r}}),at({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e,a=Mt(t[0],"size");if(r.settings.strict){var i=n[1]==="m",o=a.value.unit==="mu";i?(o||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+a.value.unit+" units")),r.mode!=="math"&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):o&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:a.value}},htmlBuilder(e,t){return Lp(e.dimension,t)},mathmlBuilder(e,t){var r=ur(e.dimension,t);return new jp(r)}}),at({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=t[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:a}},htmlBuilder:(e,t)=>{var r;e.alignment==="clap"?(r=$e([],[Ht(e.body,t)]),r=$e(["inner"],[r],t)):r=$e(["inner"],[Ht(e.body,t)]);var n=$e(["fix"],[]),a=$e([e.alignment],[r,n],t),i=$e(["strut"]);return i.style.height=Ye(a.height+a.depth),a.depth&&(i.style.verticalAlign=Ye(-a.depth)),a.children.unshift(i),a=$e(["thinbox"],[a],t),$e(["mord","vbox"],[a],t)},mathmlBuilder:(e,t)=>{var r=new je("mpadded",[Yt(e.body,t)]);if(e.alignment!=="rlap"){var n=e.alignment==="llap"?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r}}),at({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:r,parser:n}=e,a=n.mode;n.switchMode("math");var i=r==="\\("?"\\)":"$",o=n.parseExpression(!1,i);return n.expect(i),n.switchMode(a),{type:"styling",mode:n.mode,style:"text",body:o}}}),at({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new He("Mismatched "+e.funcName)}});var Ev=(e,t)=>{switch(t.style.size){case Ct.DISPLAY.size:return e.display;case Ct.TEXT.size:return e.text;case Ct.SCRIPT.size:return e.script;case Ct.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};at({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"mathchoice",mode:r.mode,display:yr(t[0]),text:yr(t[1]),script:yr(t[2]),scriptscript:yr(t[3])}},htmlBuilder:(e,t)=>{var r=Ev(e,t),n=Cr(r,t,!1);return Ua(n)},mathmlBuilder:(e,t)=>{var r=Ev(e,t);return di(r,t)}});var Tv=(e,t,r,n,a,i,o)=>{e=$e([],[e]);var l=r&&La(r),s,u;if(t){var c=Ht(t,n.havingStyle(a.sup()),n);u={elem:c,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-c.depth)}}if(r){var f=Ht(r,n.havingStyle(a.sub()),n);s={elem:f,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-f.height)}}var d;if(u&&s){var h=n.fontMetrics().bigOpSpacing5+s.elem.height+s.elem.depth+s.kern+e.depth+o;d=Ut({positionType:"bottom",positionData:h,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:Ye(-i)},{type:"kern",size:s.kern},{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:Ye(i)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else if(s){var y=e.height-o;d=Ut({positionType:"top",positionData:y,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:Ye(-i)},{type:"kern",size:s.kern},{type:"elem",elem:e}]})}else if(u){var p=e.depth+o;d=Ut({positionType:"bottom",positionData:p,children:[{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:Ye(i)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else return e;var x=[d];if(s&&i!==0&&!l){var g=$e(["mspace"],[],n);g.style.marginRight=Ye(i),x.unshift(g)}return $e(["mop","op-limits"],x,n)},Mv=new Set(["\\smallint"]),Co=(e,t)=>{var r,n,a=!1,i;e.type==="supsub"?(r=e.sup,n=e.sub,i=Mt(e.base,"op"),a=!0):i=Mt(e,"op");var o=t.style,l=!1;o.size===Ct.DISPLAY.size&&i.symbol&&!Mv.has(i.name)&&(l=!0);var s;if(i.symbol){var u=l?"Size2-Regular":"Size1-Regular",c="";if((i.name==="\\oiint"||i.name==="\\oiiint")&&(c=i.name.slice(1),i.name=c==="oiint"?"\\iint":"\\iiint"),s=rn(i.name,u,"math",t,["mop","op-symbol",l?"large-op":"small-op"]),c.length>0){var f=s.italic,d=Np(c+"Size"+(l?"2":"1"),t);s=Ut({positionType:"individualShift",children:[{type:"elem",elem:s,shift:0},{type:"elem",elem:d,shift:l?.08:0}]}),i.name="\\"+c,s.classes.unshift("mop"),s.italic=f}}else if(i.body){var h=Cr(i.body,t,!0);h.length===1&&h[0]instanceof vn?(s=h[0],s.classes[0]="mop"):s=$e(["mop"],h,t)}else{for(var y=[],p=1;p<i.name.length;p++)y.push(Fc(i.name[p],i.mode,t));s=$e(["mop"],y,t)}var x=0,g=0;return(s instanceof vn||i.name==="\\oiint"||i.name==="\\oiiint")&&!i.suppressBaseShift&&(x=(s.height-s.depth)/2-t.fontMetrics().axisHeight,g=s.italic||0),a?Tv(s,r,n,t,o,g,x):(x&&(s.style.position="relative",s.style.top=Ye(x)),s)},Fl=(e,t)=>{var r;if(e.symbol)r=new je("mo",[Fn(e.name,e.mode)]),Mv.has(e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new je("mo",gn(e.body,t));else{r=new je("mi",[new xr(e.name.slice(1))]);var n=new je("mo",[Fn("","text")]);e.parentIsSupSub?r=new je("mrow",[r,n]):r=Hp([r,n])}return r},Qk={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};at({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=n;return a.length===1&&(a=Qk[a]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:Co,mathmlBuilder:Fl}),at({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:yr(n)}},htmlBuilder:Co,mathmlBuilder:Fl});var eS={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};at({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:Co,mathmlBuilder:Fl}),at({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:Co,mathmlBuilder:Fl}),at({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:r}=e,n=r;return n.length===1&&(n=eS[n]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:Co,mathmlBuilder:Fl});var Dv=(e,t)=>{var r,n,a=!1,i;e.type==="supsub"?(r=e.sup,n=e.sub,i=Mt(e.base,"operatorname"),a=!0):i=Mt(e,"operatorname");var o;if(i.body.length>0){for(var l=i.body.map(f=>{var d="text"in f?f.text:void 0;return typeof d=="string"?{type:"textord",mode:f.mode,text:d}:f}),s=Cr(l,t.withFont("mathrm"),!0),u=0;u<s.length;u++){var c=s[u];c instanceof vn&&(c.text=c.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}o=$e(["mop"],s,t)}else o=$e(["mop"],[],t);return a?Tv(o,r,n,t,t.style,0,0):o},tS=(e,t)=>{for(var r=gn(e.body,t.withFont("mathrm")),n=!0,a=0;a<r.length;a++){var i=r[a];if(!(i instanceof jp))if(i instanceof je)switch(i.type){case"mi":case"mn":case"mspace":case"mtext":break;case"mo":{var o=i.children[0];i.children.length===1&&o instanceof xr?o.text=o.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break}default:n=!1}else n=!1}if(n){var l=r.map(c=>c.toText()).join("");r=[new xr(l)]}var s=new je("mi",r);s.setAttribute("mathvariant","normal");var u=new je("mo",[Fn("","text")]);return e.parentIsSupSub?new je("mrow",[s,u]):Hp([s,u])};at({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=t[0];return{type:"operatorname",mode:r.mode,body:yr(a),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:Dv,mathmlBuilder:tS}),B("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),Ni({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?Ua(Cr(e.body,t,!1)):$e(["mord"],Cr(e.body,t,!0),t)},mathmlBuilder(e,t){return di(e.body,t,!0)}}),at({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:r}=e,n=t[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(e,t){var r=Ht(e.body,t.havingCrampedStyle()),n=ko("overline-line",t),a=t.fontMetrics().defaultRuleThickness,i=Ut({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*a},{type:"elem",elem:n},{type:"kern",size:a}]});return $e(["mord","overline"],[i],t)},mathmlBuilder(e,t){var r=new je("mo",[new xr("‾")]);r.setAttribute("stretchy","true");var n=new je("mover",[Yt(e.body,t),r]);return n.setAttribute("accent","true"),n}}),at({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"phantom",mode:r.mode,body:yr(n)}},htmlBuilder:(e,t)=>{var r=Cr(e.body,t.withPhantom(),!1);return Ua(r)},mathmlBuilder:(e,t)=>{var r=gn(e.body,t);return new je("mphantom",r)}}),B("\\hphantom","\\smash{\\phantom{#1}}"),at({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:(e,t)=>{var r=$e(["inner"],[Ht(e.body,t.withPhantom())]),n=$e(["fix"],[]);return $e(["mord","rlap"],[r,n],t)},mathmlBuilder:(e,t)=>{var r=gn(yr(e.body),t),n=new je("mphantom",r),a=new je("mpadded",[n]);return a.setAttribute("width","0px"),a}}),at({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e,n=Mt(t[0],"size").value,a=t[1];return{type:"raisebox",mode:r.mode,dy:n,body:a}},htmlBuilder(e,t){var r=Ht(e.body,t),n=ur(e.dy,t);return Ut({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]})},mathmlBuilder(e,t){var r=new je("mpadded",[Yt(e.body,t)]),n=e.dy.number+e.dy.unit;return r.setAttribute("voffset",n),r}}),at({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}}),at({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,r){var{parser:n}=e,a=r[0],i=Mt(t[0],"size"),o=Mt(t[1],"size");return{type:"rule",mode:n.mode,shift:a&&Mt(a,"size").value,width:i.value,height:o.value}},htmlBuilder(e,t){var r=$e(["mord","rule"],[],t),n=ur(e.width,t),a=ur(e.height,t),i=e.shift?ur(e.shift,t):0;return r.style.borderRightWidth=Ye(n),r.style.borderTopWidth=Ye(a),r.style.bottom=Ye(i),r.width=n,r.height=a+i,r.depth=-i,r.maxFontSize=a*1.125*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=ur(e.width,t),n=ur(e.height,t),a=e.shift?ur(e.shift,t):0,i=t.color&&t.getColor()||"black",o=new je("mspace");o.setAttribute("mathbackground",i),o.setAttribute("width",Ye(r)),o.setAttribute("height",Ye(n));var l=new je("mpadded",[o]);return a>=0?l.setAttribute("height",Ye(a)):(l.setAttribute("height",Ye(a)),l.setAttribute("depth",Ye(-a))),l.setAttribute("voffset",Ye(a)),l}});function Iv(e,t,r){for(var n=Cr(e,t,!1),a=t.sizeMultiplier/r.sizeMultiplier,i=0;i<n.length;i++){var o=n[i].classes.indexOf("sizing");o<0?Array.prototype.push.apply(n[i].classes,t.sizingClasses(r)):n[i].classes[o+1]==="reset-size"+t.size&&(n[i].classes[o+1]="reset-size"+r.size),n[i].height*=a,n[i].depth*=a}return Ua(n)}var zv=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],rS=(e,t)=>{var r=t.havingSize(e.size);return Iv(e.body,r,t)};at({type:"sizing",names:zv,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:r,funcName:n,parser:a}=e,i=a.parseExpression(!1,r);return{type:"sizing",mode:a.mode,size:zv.indexOf(n)+1,body:i}},htmlBuilder:rS,mathmlBuilder:(e,t)=>{var r=t.havingSize(e.size),n=gn(e.body,r),a=new je("mstyle",n);return a.setAttribute("mathsize",Ye(r.sizeMultiplier)),a}}),at({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,r)=>{var{parser:n}=e,a=!1,i=!1,o=r[0]&&Mt(r[0],"ordgroup");if(o)for(var l="",s=0;s<o.body.length;++s){var u=o.body[s];if(l=g0(u).text,l==="t")a=!0;else if(l==="b")i=!0;else{a=!1,i=!1;break}}else a=!0,i=!0;var c=t[0];return{type:"smash",mode:n.mode,body:c,smashHeight:a,smashDepth:i}},htmlBuilder:(e,t)=>{var r=$e([],[Ht(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0),e.smashDepth&&(r.depth=0),e.smashHeight&&e.smashDepth)return $e(["mord","smash"],[r],t);if(r.children)for(var n=0;n<r.children.length;n++)e.smashHeight&&(r.children[n].height=0),e.smashDepth&&(r.children[n].depth=0);var a=Ut({positionType:"firstBaseline",children:[{type:"elem",elem:r}]});return $e(["mord"],[a],t)},mathmlBuilder:(e,t)=>{var r=new je("mpadded",[Yt(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}}),at({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:n}=e,a=r[0],i=t[0];return{type:"sqrt",mode:n.mode,body:i,index:a}},htmlBuilder(e,t){var r=Ht(e.body,t.havingCrampedStyle());r.height===0&&(r.height=t.fontMetrics().xHeight),r=So(r,t);var n=t.fontMetrics(),a=n.defaultRuleThickness,i=a;t.style.id<Ct.TEXT.id&&(i=t.fontMetrics().xHeight);var o=a+i/4,l=r.height+r.depth+o+a,{span:s,ruleWidth:u,advanceWidth:c}=Hk(l,t),f=s.height-u;f>r.height+r.depth+o&&(o=(o+f-r.height-r.depth)/2);var d=s.height-r.height-o-u;r.style.paddingLeft=Ye(c);var h=Ut({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+d)},{type:"elem",elem:s},{type:"kern",size:u}]});if(e.index){var y=t.havingStyle(Ct.SCRIPTSCRIPT),p=Ht(e.index,y,t),x=.6*(h.height-h.depth),g=Ut({positionType:"shift",positionData:-x,children:[{type:"elem",elem:p}]}),m=$e(["root"],[g]);return $e(["mord","sqrt"],[m,h],t)}else return $e(["mord","sqrt"],[h],t)},mathmlBuilder(e,t){var{body:r,index:n}=e;return n?new je("mroot",[Yt(r,t),Yt(n,t)]):new je("msqrt",[Yt(r,t)])}});var Fv={display:Ct.DISPLAY,text:Ct.TEXT,script:Ct.SCRIPT,scriptscript:Ct.SCRIPTSCRIPT};at({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:r,funcName:n,parser:a}=e,i=a.parseExpression(!0,r),o=n.slice(1,n.length-5);return{type:"styling",mode:a.mode,style:o,body:i}},htmlBuilder(e,t){var r=Fv[e.style],n=t.havingStyle(r).withFont("");return Iv(e.body,n,t)},mathmlBuilder(e,t){var r=Fv[e.style],n=t.havingStyle(r),a=gn(e.body,n),i=new je("mstyle",a),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},l=o[e.style];return i.setAttribute("scriptlevel",l[0]),i.setAttribute("displaystyle",l[1]),i}});var nS=function(t,r){var n=t.base;if(n)if(n.type==="op"){var a=n.limits&&(r.style.size===Ct.DISPLAY.size||n.alwaysHandleSupSub);return a?Co:null}else if(n.type==="operatorname"){var i=n.alwaysHandleSupSub&&(r.style.size===Ct.DISPLAY.size||n.limits);return i?Dv:null}else{if(n.type==="accent")return La(n.base)?jc:null;if(n.type==="horizBrace"){var o=!t.sub;return o===n.isOver?Av:null}else return null}else return null};Ni({type:"supsub",htmlBuilder(e,t){var r=nS(e,t);if(r)return r(e,t);var{base:n,sup:a,sub:i}=e,o=Ht(n,t),l,s,u=t.fontMetrics(),c=0,f=0,d=n&&La(n);if(a){var h=t.havingStyle(t.style.sup());l=Ht(a,h,t),d||(c=o.height-h.fontMetrics().supDrop*h.sizeMultiplier/t.sizeMultiplier)}if(i){var y=t.havingStyle(t.style.sub());s=Ht(i,y,t),d||(f=o.depth+y.fontMetrics().subDrop*y.sizeMultiplier/t.sizeMultiplier)}var p;t.style===Ct.DISPLAY?p=u.sup1:t.style.cramped?p=u.sup3:p=u.sup2;var x=t.sizeMultiplier,g=Ye(.5/u.ptPerEm/x),m=null;if(s){var b=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");(o instanceof vn||b)&&(m=Ye(-o.italic))}var v;if(l&&s){c=Math.max(c,p,l.depth+.25*u.xHeight),f=Math.max(f,u.sub2);var S=u.defaultRuleThickness,C=4*S;if(c-l.depth-(s.height-f)<C){f=C-(c-l.depth)+s.height;var A=.8*u.xHeight-(c-l.depth);A>0&&(c+=A,f-=A)}var _=[{type:"elem",elem:s,shift:f,marginRight:g,marginLeft:m},{type:"elem",elem:l,shift:-c,marginRight:g}];v=Ut({positionType:"individualShift",children:_})}else if(s){f=Math.max(f,u.sub1,s.height-.8*u.xHeight);var E=[{type:"elem",elem:s,marginLeft:m,marginRight:g}];v=Ut({positionType:"shift",positionData:f,children:E})}else if(l)c=Math.max(c,p,l.depth+.25*u.xHeight),v=Ut({positionType:"shift",positionData:-c,children:[{type:"elem",elem:l,marginRight:g}]});else throw new Error("supsub must have either sup or sub.");var M=Bc(o,"right")||"mord";return $e([M],[o,$e(["msupsub"],[v])],t)},mathmlBuilder(e,t){var r=!1,n,a;e.base&&e.base.type==="horizBrace"&&(a=!!e.sup,a===e.base.isOver&&(r=!0,n=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var i=[Yt(e.base,t)];e.sub&&i.push(Yt(e.sub,t)),e.sup&&i.push(Yt(e.sup,t));var o;if(r)o=n?"mover":"munder";else if(e.sub)if(e.sup){var u=e.base;u&&u.type==="op"&&u.limits&&t.style===Ct.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(t.style===Ct.DISPLAY||u.limits)?o="munderover":o="msubsup"}else{var s=e.base;s&&s.type==="op"&&s.limits&&(t.style===Ct.DISPLAY||s.alwaysHandleSupSub)||s&&s.type==="operatorname"&&s.alwaysHandleSupSub&&(s.limits||t.style===Ct.DISPLAY)?o="munder":o="msub"}else{var l=e.base;l&&l.type==="op"&&l.limits&&(t.style===Ct.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||t.style===Ct.DISPLAY)?o="mover":o="msup"}return new je(o,i)}}),Ni({type:"atom",htmlBuilder(e,t){return Fc(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var r=new je("mo",[Fn(e.text,e.mode)]);if(e.family==="bin"){var n=Uc(e,t);n==="bold-italic"&&r.setAttribute("mathvariant",n)}else e.family==="punct"?r.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&r.setAttribute("stretchy","false");return r}});var Ov={mi:"italic",mn:"normal",mtext:"normal"};Ni({type:"mathord",htmlBuilder(e,t){return u0(e,t,"mathord")},mathmlBuilder(e,t){var r=new je("mi",[Fn(e.text,e.mode,t)]),n=Uc(e,t)||"italic";return n!==Ov[r.type]&&r.setAttribute("mathvariant",n),r}}),Ni({type:"textord",htmlBuilder(e,t){return u0(e,t,"textord")},mathmlBuilder(e,t){var r=Fn(e.text,e.mode,t),n=Uc(e,t)||"normal",a;return e.mode==="text"?a=new je("mtext",[r]):/[0-9]/.test(e.text)?a=new je("mn",[r]):e.text==="\\prime"?a=new je("mo",[r]):a=new je("mi",[r]),n!==Ov[a.type]&&a.setAttribute("mathvariant",n),a}});var nf={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},af={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Ni({type:"spacing",htmlBuilder(e,t){if(af.hasOwnProperty(e.text)){var r=af[e.text].className||"";if(e.mode==="text"){var n=u0(e,t,"textord");return n.classes.push(r),n}else return $e(["mspace",r],[Fc(e.text,e.mode,t)],t)}else{if(nf.hasOwnProperty(e.text))return $e(["mspace",nf[e.text]],[],t);throw new He('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,t){var r;if(af.hasOwnProperty(e.text))r=new je("mtext",[new xr(" ")]);else{if(nf.hasOwnProperty(e.text))return new je("mspace");throw new He('Unknown type of space "'+e.text+'"')}return r}});var Pv=()=>{var e=new je("mtd",[]);return e.setAttribute("width","50%"),e};Ni({type:"tag",mathmlBuilder(e,t){var r=new je("mtable",[new je("mtr",[Pv(),new je("mtd",[di(e.body,t)]),Pv(),new je("mtd",[di(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});var Rv={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Lv={"\\textbf":"textbf","\\textmd":"textmd"},aS={"\\textit":"textit","\\textup":"textup"},Bv=(e,t)=>{var r=e.font;if(r){if(Rv[r])return t.withTextFontFamily(Rv[r]);if(Lv[r])return t.withTextFontWeight(Lv[r]);if(r==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit")}else return t;return t.withTextFontShape(aS[r])};at({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e,a=t[0];return{type:"text",mode:r.mode,body:yr(a),font:n}},htmlBuilder(e,t){var r=Bv(e,t),n=Cr(e.body,r,!0);return $e(["mord","text"],n,r)},mathmlBuilder(e,t){var r=Bv(e,t);return di(e.body,r)}}),at({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"underline",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=Ht(e.body,t),n=ko("underline-line",t),a=t.fontMetrics().defaultRuleThickness,i=Ut({positionType:"top",positionData:r.height,children:[{type:"kern",size:a},{type:"elem",elem:n},{type:"kern",size:3*a},{type:"elem",elem:r}]});return $e(["mord","underline"],[i],t)},mathmlBuilder(e,t){var r=new je("mo",[new xr("‾")]);r.setAttribute("stretchy","true");var n=new je("munder",[Yt(e.body,t),r]);return n.setAttribute("accentunder","true"),n}}),at({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"vcenter",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=Ht(e.body,t),n=t.fontMetrics().axisHeight,a=.5*(r.height-n-(r.depth+n));return Ut({positionType:"shift",positionData:a,children:[{type:"elem",elem:r}]})},mathmlBuilder(e,t){var r=new je("mpadded",[Yt(e.body,t)],["vcenter"]);return new je("mrow",[r])}}),at({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new He("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var r=Nv(e),n=[],a=t.havingStyle(t.style.text()),i=0;i<r.length;i++){var o=r[i];o==="~"&&(o="\\textasciitilde"),n.push(rn(o,"Typewriter-Regular",e.mode,a,["mord","texttt"]))}return $e(["mord","text"].concat(a.sizingClasses(t)),Rp(n),a)},mathmlBuilder(e,t){var r=new xr(Nv(e)),n=new je("mtext",[r]);return n.setAttribute("mathvariant","monospace"),n}});var Nv=e=>e.body.replace(/ /g,e.star?"␣":" "),pi=$p,$v=`[ \r
|
|
276
|
+
`+A+" children.");for(var z=0;z<A;z++){var N=new ui(b[z]),R=new Na([N],{width:"400em",height:Ye(C),viewBox:"0 0 "+l+" "+S,preserveAspectRatio:E[z]+" slice"}),$=fi([_[z]],[R],r);if(A===1)return{span:$,minWidth:v,height:C};$.style.height=Ye(C),g.push($)}return{span:$e(["stretchy"],g,r),minWidth:v,height:C}}}var{span:a,minWidth:i,height:o}=n();return a.height=o,a.style.height=Ye(o),i>0&&(a.style.minWidth=Ye(i)),a},Ik=function(t,r,n,a,i){var o,l=t.height+t.depth+n+a;if(/fbox|color|angl/.test(r)){if(o=$e(["stretchy",r],[],i),r==="fbox"){var s=i.color&&i.getColor();s&&(o.style.borderColor=s)}}else{var u=[];/^[bx]cancel$/.test(r)&&u.push(new Cc({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&u.push(new Cc({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var c=new Na(u,{width:"100%",height:Ye(l)});o=fi([],[c],i)}return o.height=l,o.style.height=Ye(l),o};function Mt(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function g0(e){var t=b0(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function b0(e){return e&&(e.type==="atom"||fk.hasOwnProperty(e.type))?e:null}var Xp=e=>{if(e instanceof vn)return e;if(sk(e)&&e.children.length===1)return Xp(e.children[0])},jc=(e,t)=>{var r,n,a;e&&e.type==="supsub"?(n=Mt(e.base,"accent"),r=n.base,e.base=r,a=lk(Ht(e,t)),e.base=n):(n=Mt(e,"accent"),r=n.base);var i=Ht(r,t.havingCrampedStyle()),o=n.isShifty&&La(r),l=0;if(o){var s,u;l=(s=(u=Xp(i))==null?void 0:u.skew)!=null?s:0}var c=n.label==="\\c",f=c?i.height+i.depth:Math.min(i.height,t.fontMetrics().xHeight),d;if(n.isStretchy)d=m0(n,t),d=Ut({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:d,wrapperClasses:["svg-align"],wrapperStyle:l>0?{width:"calc(100% - "+Ye(2*l)+")",marginLeft:Ye(2*l)}:void 0}]});else{var h,y;n.label==="\\vec"?(h=Np("vec",t),y=Bp.vec[1]):(h=u0({mode:n.mode,text:n.label},t,"textord"),h=ok(h),h.italic=0,y=h.width,c&&(f+=h.depth)),d=$e(["accent-body"],[h]);var p=n.label==="\\textcircled";p&&(d.classes.push("accent-full"),f=i.height);var x=l;p||(x-=y/2),d.style.left=Ye(x),n.label==="\\textcircled"&&(d.style.top=".2em"),d=Ut({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-f},{type:"elem",elem:d}]})}var g=$e(["mord","accent"],[d],t);return a?(a.children[0]=g,a.height=Math.max(g.height,a.height),a.classes[0]="mord",a):g},Yp=(e,t)=>{var r=e.isStretchy?v0(e.label):new je("mo",[Fn(e.label,e.mode)]),n=new je("mover",[Yt(e.base,t),r]);return n.setAttribute("accent","true"),n},zk=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));at({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var r=h0(t[0]),n=!zk.test(e.funcName),a=!n||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:a,base:r}},htmlBuilder:jc,mathmlBuilder:Yp}),at({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var r=t[0],n=e.parser.mode;return n==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:jc,mathmlBuilder:Yp}),at({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=t[0];return{type:"accentUnder",mode:r.mode,label:n,base:a}},htmlBuilder:(e,t)=>{var r=Ht(e.base,t),n=m0(e,t),a=e.label==="\\utilde"?.12:0,i=Ut({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:a},{type:"elem",elem:r}]});return $e(["mord","accentunder"],[i],t)},mathmlBuilder:(e,t)=>{var r=v0(e.label),n=new je("munder",[Yt(e.base,t),r]);return n.setAttribute("accentunder","true"),n}});var y0=e=>{var t=new je("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};at({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:n,funcName:a}=e;return{type:"xArrow",mode:n.mode,label:a,body:t[0],below:r[0]}},htmlBuilder(e,t){var r=t.style,n=t.havingStyle(r.sup()),a=So(Ht(e.body,n,t),t),i=e.label.slice(0,2)==="\\x"?"x":"cd";a.classes.push(i+"-arrow-pad");var o;e.below&&(n=t.havingStyle(r.sub()),o=So(Ht(e.below,n,t),t),o.classes.push(i+"-arrow-pad"));var l=m0(e,t),s=-t.fontMetrics().axisHeight+.5*l.height,u=-t.fontMetrics().axisHeight-.5*l.height-.111;(a.depth>.25||e.label==="\\xleftequilibrium")&&(u-=a.depth);var c;if(o){var f=-t.fontMetrics().axisHeight+o.height+.5*l.height+.111;c=Ut({positionType:"individualShift",children:[{type:"elem",elem:a,shift:u},{type:"elem",elem:l,shift:s},{type:"elem",elem:o,shift:f}]})}else c=Ut({positionType:"individualShift",children:[{type:"elem",elem:a,shift:u},{type:"elem",elem:l,shift:s}]});return c.children[0].children[0].children[1].classes.push("svg-align"),$e(["mrel","x-arrow"],[c],t)},mathmlBuilder(e,t){var r=v0(e.label);r.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(e.body){var a=y0(Yt(e.body,t));if(e.below){var i=y0(Yt(e.below,t));n=new je("munderover",[r,i,a])}else n=new je("mover",[r,a])}else if(e.below){var o=y0(Yt(e.below,t));n=new je("munder",[r,o])}else n=y0(),n=new je("mover",[r,n]);return n}});function Zp(e,t){var r=Cr(e.body,t,!0);return $e([e.mclass],r,t)}function Jp(e,t){var r,n=gn(e.body,t);return e.mclass==="minner"?r=new je("mpadded",n):e.mclass==="mord"?e.isCharacterBox?(r=n[0],r.type="mi"):r=new je("mi",n):(e.isCharacterBox?(r=n[0],r.type="mo"):r=new je("mo",n),e.mclass==="mbin"?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):e.mclass==="mpunct"?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(r.attributes.lspace="0em",r.attributes.rspace="0em"):e.mclass==="minner"&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}at({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:r,funcName:n}=e,a=t[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:yr(a),isCharacterBox:La(a)}},htmlBuilder:Zp,mathmlBuilder:Jp});var x0=e=>{var t=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return t.type==="atom"&&(t.family==="bin"||t.family==="rel")?"m"+t.family:"mord"};at({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:r}=e;return{type:"mclass",mode:r.mode,mclass:x0(t[0]),body:yr(t[1]),isCharacterBox:La(t[1])}}}),at({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:r,funcName:n}=e,a=t[1],i=t[0],o;n!=="\\stackrel"?o=x0(a):o="mrel";var l={type:"op",mode:a.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:yr(a)},s={type:"supsub",mode:i.mode,base:l,sup:n==="\\underset"?null:i,sub:n==="\\underset"?i:null};return{type:"mclass",mode:r.mode,mclass:o,body:[s],isCharacterBox:La(s)}},htmlBuilder:Zp,mathmlBuilder:Jp}),at({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"pmb",mode:r.mode,mclass:x0(t[0]),body:yr(t[0])}},htmlBuilder(e,t){var r=Cr(e.body,t,!0),n=$e([e.mclass],r,t);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(e,t){var r=gn(e.body,t),n=new je("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var Fk={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Qp=()=>({type:"styling",body:[],mode:"math",style:"display"}),ev=e=>e.type==="textord"&&e.text==="@",Ok=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;function Pk(e,t,r){var n=Fk[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{var a=r.callFunction("\\\\cdleft",[t[0]],[]),i={type:"atom",text:n,mode:"math",family:"rel"},o=r.callFunction("\\Big",[i],[]),l=r.callFunction("\\\\cdright",[t[1]],[]),s={type:"ordgroup",mode:"math",body:[a,o,l]};return r.callFunction("\\\\cdparent",[s],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var u={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[u],[])}default:return{type:"textord",text:" ",mode:"math"}}}function Rk(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var r=e.fetch().text;if(r==="&"||r==="\\\\")e.consume();else if(r==="\\end"){t[t.length-1].length===0&&t.pop();break}else throw new He("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var n=[],a=[n],i=0;i<t.length;i++){for(var o=t[i],l=Qp(),s=0;s<o.length;s++)if(!ev(o[s]))l.body.push(o[s]);else{n.push(l),s+=1;var u=g0(o[s]).text,c=new Array(2);if(c[0]={type:"ordgroup",mode:"math",body:[]},c[1]={type:"ordgroup",mode:"math",body:[]},!"=|.".includes(u))if("<>AV".includes(u))for(var f=0;f<2;f++){for(var d=!0,h=s+1;h<o.length;h++){if(Ok(o[h],u)){d=!1,s=h;break}if(ev(o[h]))throw new He("Missing a "+u+" character to complete a CD arrow.",o[h]);c[f].body.push(o[h])}if(d)throw new He("Missing a "+u+" character to complete a CD arrow.",o[s])}else throw new He('Expected one of "<>AV=|." after @',o[s]);var y=Pk(u,c,e),p={type:"styling",body:[y],mode:"math",style:"display"};n.push(p),l=Qp()}i%2===0?n.push(l):n.shift(),n=[],a.push(n)}e.gullet.endGroup(),e.gullet.endGroup();var x=new Array(a[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:a,arraystretch:1,addJot:!0,rowGaps:[null],cols:x,colSeparationType:"CD",hLinesBeforeRow:new Array(a.length+1).fill([])}}at({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:t[0]}},htmlBuilder(e,t){var r=t.havingStyle(t.style.sup()),n=So(Ht(e.label,r,t),t);return n.classes.push("cd-label-"+e.side),n.style.bottom=Ye(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(e,t){var r=new je("mrow",[Yt(e.label,t)]);return r=new je("mpadded",[r]),r.setAttribute("width","0"),e.side==="left"&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new je("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}}),at({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:r}=e;return{type:"cdlabelparent",mode:r.mode,fragment:t[0]}},htmlBuilder(e,t){var r=So(Ht(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(e,t){return new je("mrow",[Yt(e.fragment,t)])}}),at({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:r}=e,n=Mt(t[0],"ordgroup"),a=n.body,i="",o=0;o<a.length;o++){var l=Mt(a[o],"textord");i+=l.text}var s=parseInt(i),u;if(isNaN(s))throw new He("\\@char has non-numeric argument "+i);if(s<0||s>=1114111)throw new He("\\@char with invalid code point "+i);return s<=65535?u=String.fromCharCode(s):(s-=65536,u=String.fromCharCode((s>>10)+55296,(s&1023)+56320)),{type:"textord",mode:r.mode,text:u}}});var tv=(e,t)=>{var r=Cr(e.body,t.withColor(e.color),!1);return Ua(r)},rv=(e,t)=>{var r=gn(e.body,t.withColor(e.color)),n=new je("mstyle",r);return n.setAttribute("mathcolor",e.color),n};at({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:r}=e,n=Mt(t[0],"color-token").color,a=t[1];return{type:"color",mode:r.mode,color:n,body:yr(a)}},htmlBuilder:tv,mathmlBuilder:rv}),at({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:r,breakOnTokenText:n}=e,a=Mt(t[0],"color-token").color;r.gullet.macros.set("\\current@color",a);var i=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:a,body:i}},htmlBuilder:tv,mathmlBuilder:rv}),at({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var{parser:n}=e,a=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,i=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:i,size:a&&Mt(a,"size").value}},htmlBuilder(e,t){var r=$e(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=Ye(ur(e.size,t)))),r},mathmlBuilder(e,t){var r=new je("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",Ye(ur(e.size,t)))),r}});var Gc={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},nv=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new He("Expected a control sequence",e);return t},Lk=e=>{var t=e.gullet.popToken();return t.text==="="&&(t=e.gullet.popToken(),t.text===" "&&(t=e.gullet.popToken())),t},av=(e,t,r,n)=>{var a=e.gullet.macros.get(r.text);a==null&&(r.noexpand=!0,a={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,a,n)};at({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:r}=e;t.consumeSpaces();var n=t.fetch();if(Gc[n.text])return(r==="\\global"||r==="\\\\globallong")&&(n.text=Gc[n.text]),Mt(t.parseFunction(),"internal");throw new He("Invalid token after macro prefix",n)}}),at({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=t.gullet.popToken(),a=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(a))throw new He("Expected a control sequence",n);for(var i=0,o,l=[[]];t.gullet.future().text!=="{";)if(n=t.gullet.popToken(),n.text==="#"){if(t.gullet.future().text==="{"){o=t.gullet.future(),l[i].push("{");break}if(n=t.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new He('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==i+1)throw new He('Argument number "'+n.text+'" out of order');i++,l.push([])}else{if(n.text==="EOF")throw new He("Expected a macro definition");l[i].push(n.text)}var{tokens:s}=t.gullet.consumeArg();return o&&s.unshift(o),(r==="\\edef"||r==="\\xdef")&&(s=t.gullet.expandTokens(s),s.reverse()),t.gullet.macros.set(a,{tokens:s,numArgs:i,delimiters:l},r===Gc[r]),{type:"internal",mode:t.mode}}}),at({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=nv(t.gullet.popToken());t.gullet.consumeSpaces();var a=Lk(t);return av(t,n,a,r==="\\\\globallet"),{type:"internal",mode:t.mode}}}),at({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=nv(t.gullet.popToken()),a=t.gullet.popToken(),i=t.gullet.popToken();return av(t,n,i,r==="\\\\globalfuture"),t.gullet.pushToken(i),t.gullet.pushToken(a),{type:"internal",mode:t.mode}}});var Il=function(t,r,n){var a=or.math[t]&&or.math[t].replace,i=Ac(a||t,r,n);if(!i)throw new Error("Unsupported symbol "+t+" and font size "+r+".");return i},Vc=function(t,r,n,a){var i=n.havingBaseStyle(r),o=$e(a.concat(i.sizingClasses(n)),[t],n),l=i.sizeMultiplier/n.sizeMultiplier;return o.height*=l,o.depth*=l,o.maxFontSize=i.sizeMultiplier,o},iv=function(t,r,n){var a=r.havingBaseStyle(n),i=(1-r.sizeMultiplier/a.sizeMultiplier)*r.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=Ye(i),t.height-=i,t.depth+=i},Bk=function(t,r,n,a,i,o){var l=rn(t,"Main-Regular",i,a),s=Vc(l,r,a,o);return iv(s,a,r),s},Nk=function(t,r,n,a){return rn(t,"Size"+r+"-Regular",n,a)},ov=function(t,r,n,a,i,o){var l=Nk(t,r,i,a),s=Vc($e(["delimsizing","size"+r],[l],a),Ct.TEXT,a,o);return n&&iv(s,a,Ct.TEXT),s},qc=function(t,r,n){var a;r==="Size1-Regular"?a="delim-size1":a="delim-size4";var i=$e(["delimsizinginner",a],[$e([],[rn(t,r,n)])]);return{type:"elem",elem:i}},Wc=function(t,r,n){var a=ma["Size4-Regular"][t.charCodeAt(0)]?ma["Size4-Regular"][t.charCodeAt(0)][4]:ma["Size1-Regular"][t.charCodeAt(0)][4],i=new ui("inner",ek(t,Math.round(1e3*r))),o=new Na([i],{width:Ye(a),height:Ye(r),style:"width:"+Ye(a),viewBox:"0 0 "+1e3*a+" "+Math.round(1e3*r),preserveAspectRatio:"xMinYMin"}),l=fi([],[o],n);return l.height=r,l.style.height=Ye(r),l.style.width=Ye(a),{type:"elem",elem:l}},Kc=.008,_0={type:"kern",size:-1*Kc},$k=new Set(["|","\\lvert","\\rvert","\\vert"]),Uk=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),lv=function(t,r,n,a,i,o){var l,s,u,c,f="",d=0;l=u=c=t,s=null;var h="Size1-Regular";t==="\\uparrow"?u=c="⏐":t==="\\Uparrow"?u=c="‖":t==="\\downarrow"?l=u="⏐":t==="\\Downarrow"?l=u="‖":t==="\\updownarrow"?(l="\\uparrow",u="⏐",c="\\downarrow"):t==="\\Updownarrow"?(l="\\Uparrow",u="‖",c="\\Downarrow"):$k.has(t)?(u="∣",f="vert",d=333):Uk.has(t)?(u="∥",f="doublevert",d=556):t==="["||t==="\\lbrack"?(l="⎡",u="⎢",c="⎣",h="Size4-Regular",f="lbrack",d=667):t==="]"||t==="\\rbrack"?(l="⎤",u="⎥",c="⎦",h="Size4-Regular",f="rbrack",d=667):t==="\\lfloor"||t==="⌊"?(u=l="⎢",c="⎣",h="Size4-Regular",f="lfloor",d=667):t==="\\lceil"||t==="⌈"?(l="⎡",u=c="⎢",h="Size4-Regular",f="lceil",d=667):t==="\\rfloor"||t==="⌋"?(u=l="⎥",c="⎦",h="Size4-Regular",f="rfloor",d=667):t==="\\rceil"||t==="⌉"?(l="⎤",u=c="⎥",h="Size4-Regular",f="rceil",d=667):t==="("||t==="\\lparen"?(l="⎛",u="⎜",c="⎝",h="Size4-Regular",f="lparen",d=875):t===")"||t==="\\rparen"?(l="⎞",u="⎟",c="⎠",h="Size4-Regular",f="rparen",d=875):t==="\\{"||t==="\\lbrace"?(l="⎧",s="⎨",c="⎩",u="⎪",h="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(l="⎫",s="⎬",c="⎭",u="⎪",h="Size4-Regular"):t==="\\lgroup"||t==="⟮"?(l="⎧",c="⎩",u="⎪",h="Size4-Regular"):t==="\\rgroup"||t==="⟯"?(l="⎫",c="⎭",u="⎪",h="Size4-Regular"):t==="\\lmoustache"||t==="⎰"?(l="⎧",c="⎭",u="⎪",h="Size4-Regular"):(t==="\\rmoustache"||t==="⎱")&&(l="⎫",c="⎩",u="⎪",h="Size4-Regular");var y=Il(l,h,i),p=y.height+y.depth,x=Il(u,h,i),g=x.height+x.depth,m=Il(c,h,i),b=m.height+m.depth,v=0,S=1;if(s!==null){var C=Il(s,h,i);v=C.height+C.depth,S=2}var A=p+b+v,_=Math.max(0,Math.ceil((r-A)/(S*g))),E=A+_*S*g,M=a.fontMetrics().axisHeight;n&&(M*=a.sizeMultiplier);var z=E/2-M,N=[];if(f.length>0){var R=E-p-b,$=Math.round(E*1e3),q=tk(f,Math.round(R*1e3)),W=new ui(f,q),Z=Ye(d/1e3),te=Ye($/1e3),ne=new Na([W],{width:Z,height:te,viewBox:"0 0 "+d+" "+$}),_e=fi([],[ne],a);_e.height=$/1e3,_e.style.width=Z,_e.style.height=te,N.push({type:"elem",elem:_e})}else{if(N.push(qc(c,h,i)),N.push(_0),s===null){var pe=E-p-b+2*Kc;N.push(Wc(u,pe,a))}else{var we=(E-p-b-v)/2+2*Kc;N.push(Wc(u,we,a)),N.push(_0),N.push(qc(s,h,i)),N.push(_0),N.push(Wc(u,we,a))}N.push(_0),N.push(qc(l,h,i))}var ve=a.havingBaseStyle(Ct.TEXT),Te=Ut({positionType:"bottom",positionData:z,children:N});return Vc($e(["delimsizing","mult"],[Te],ve),Ct.TEXT,a,o)},Xc=80,Yc=.08,Zc=function(t,r,n,a,i){var o=Q9(t,a,n),l=new ui(t,o),s=new Na([l],{width:"400em",height:Ye(r),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return fi(["hide-tail"],[s],i)},Hk=function(t,r){var n=r.havingBaseSizing(),a=dv("\\surd",t*n.sizeMultiplier,fv,n),i=n.sizeMultiplier,o=Math.max(0,r.minRuleThickness-r.fontMetrics().sqrtRuleThickness),l,s=0,u=0,c=0,f;return a.type==="small"?(c=1e3+1e3*o+Xc,t<1?i=1:t<1.4&&(i=.7),s=(1+o+Yc)/i,u=(1+o)/i,l=Zc("sqrtMain",s,c,o,r),l.style.minWidth="0.853em",f=.833/i):a.type==="large"?(c=(1e3+Xc)*zl[a.size],u=(zl[a.size]+o)/i,s=(zl[a.size]+o+Yc)/i,l=Zc("sqrtSize"+a.size,s,c,o,r),l.style.minWidth="1.02em",f=1/i):(s=t+o+Yc,u=t+o,c=Math.floor(1e3*t+o)+Xc,l=Zc("sqrtTall",s,c,o,r),l.style.minWidth="0.742em",f=1.056),l.height=u,l.style.height=Ye(s),{span:l,advanceWidth:f,ruleWidth:(r.fontMetrics().sqrtRuleThickness+o)*i}},sv=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),jk=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),uv=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),zl=[0,1.2,1.8,2.4,3],cv=function(t,r,n,a,i){if(t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle"),sv.has(t)||uv.has(t))return ov(t,r,!1,n,a,i);if(jk.has(t))return lv(t,zl[r],!1,n,a,i);throw new He("Illegal delimiter: '"+t+"'")},Gk=[{type:"small",style:Ct.SCRIPTSCRIPT},{type:"small",style:Ct.SCRIPT},{type:"small",style:Ct.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Vk=[{type:"small",style:Ct.SCRIPTSCRIPT},{type:"small",style:Ct.SCRIPT},{type:"small",style:Ct.TEXT},{type:"stack"}],fv=[{type:"small",style:Ct.SCRIPTSCRIPT},{type:"small",style:Ct.SCRIPT},{type:"small",style:Ct.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],qk=function(t){if(t.type==="small")return"Main-Regular";if(t.type==="large")return"Size"+t.size+"-Regular";if(t.type==="stack")return"Size4-Regular";var r=t.type;throw new Error("Add support for delim type '"+r+"' here.")},dv=function(t,r,n,a){for(var i=Math.min(2,3-a.style.size),o=i;o<n.length;o++){var l=n[o];if(l.type==="stack")break;var s=Il(t,qk(l),"math"),u=s.height+s.depth;if(l.type==="small"){var c=a.havingBaseStyle(l.style);u*=c.sizeMultiplier}if(u>r)return l}return n[n.length-1]},Jc=function(t,r,n,a,i,o){t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle");var l;uv.has(t)?l=Gk:sv.has(t)?l=fv:l=Vk;var s=dv(t,r,l,a);return s.type==="small"?Bk(t,s.style,n,a,i,o):s.type==="large"?ov(t,s.size,n,a,i,o):lv(t,r,n,a,i,o)},Qc=function(t,r,n,a,i,o){var l=a.fontMetrics().axisHeight*a.sizeMultiplier,s=901,u=5/a.fontMetrics().ptPerEm,c=Math.max(r-l,n+l),f=Math.max(c/500*s,2*c-u);return Jc(t,f,!0,a,i,o)},hv={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Wk=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function w0(e,t){var r=b0(e);if(r&&Wk.has(r.text))return r;throw r?new He("Invalid delimiter '"+r.text+"' after '"+t.funcName+"'",e):new He("Invalid delimiter type '"+e.type+"'",e)}at({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var r=w0(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:hv[e.funcName].size,mclass:hv[e.funcName].mclass,delim:r.text}},htmlBuilder:(e,t)=>e.delim==="."?$e([e.mclass]):cv(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!=="."&&t.push(Fn(e.delim,e.mode));var r=new je("mo",t);e.mclass==="mopen"||e.mclass==="mclose"?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=Ye(zl[e.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}});function pv(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}at({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=e.parser.gullet.macros.get("\\current@color");if(r&&typeof r!="string")throw new He("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:w0(t[0],e).text,color:r}}}),at({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=w0(t[0],e),n=e.parser;++n.leftrightDepth;var a=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var i=Mt(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:a,left:r.text,right:i.delim,rightColor:i.color}},htmlBuilder:(e,t)=>{pv(e);for(var r=Cr(e.body,t,!0,["mopen","mclose"]),n=0,a=0,i=!1,o=0;o<r.length;o++)r[o].isMiddle?i=!0:(n=Math.max(r[o].height,n),a=Math.max(r[o].depth,a));n*=t.sizeMultiplier,a*=t.sizeMultiplier;var l;if(e.left==="."?l=Dl(t,["mopen"]):l=Qc(e.left,n,a,t,e.mode,["mopen"]),r.unshift(l),i)for(var s=1;s<r.length;s++){var u=r[s],c=u.isMiddle;c&&(r[s]=Qc(c.delim,n,a,c.options,e.mode,[]))}var f;if(e.right===".")f=Dl(t,["mclose"]);else{var d=e.rightColor?t.withColor(e.rightColor):t;f=Qc(e.right,n,a,d,e.mode,["mclose"])}return r.push(f),$e(["minner"],r,t)},mathmlBuilder:(e,t)=>{pv(e);var r=gn(e.body,t);if(e.left!=="."){var n=new je("mo",[Fn(e.left,e.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if(e.right!=="."){var a=new je("mo",[Fn(e.right,e.mode)]);a.setAttribute("fence","true"),e.rightColor&&a.setAttribute("mathcolor",e.rightColor),r.push(a)}return $c(r)}}),at({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=w0(t[0],e);if(!e.parser.leftrightDepth)throw new He("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},htmlBuilder:(e,t)=>{var r;if(e.delim===".")r=Dl(t,[]);else{r=cv(e.delim,1,t,e.mode,[]);var n={delim:e.delim,options:t};r.isMiddle=n}return r},mathmlBuilder:(e,t)=>{var r=e.delim==="\\vert"||e.delim==="|"?Fn("|","text"):Fn(e.delim,e.mode),n=new je("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var k0=(e,t)=>{var r=So(Ht(e.body,t),t),n=e.label.slice(1),a=t.sizeMultiplier,i,o=0,l=La(e.body);if(n==="sout")i=$e(["stretchy","sout"]),i.height=t.fontMetrics().defaultRuleThickness/a,o=-.5*t.fontMetrics().xHeight;else if(n==="phase"){var s=ur({number:.6,unit:"pt"},t),u=ur({number:.35,unit:"ex"},t),c=t.havingBaseSizing();a=a/c.sizeMultiplier;var f=r.height+r.depth+s+u;r.style.paddingLeft=Ye(f/2+s);var d=Math.floor(1e3*f*a),h=Z9(d),y=new Na([new ui("phase",h)],{width:"400em",height:Ye(d/1e3),viewBox:"0 0 400000 "+d,preserveAspectRatio:"xMinYMin slice"});i=fi(["hide-tail"],[y],t),i.style.height=Ye(f),o=r.depth+s+u}else{/cancel/.test(n)?l||r.classes.push("cancel-pad"):n==="angl"?r.classes.push("anglpad"):r.classes.push("boxpad");var p=0,x=0,g=0;/box/.test(n)?(g=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),p=t.fontMetrics().fboxsep+(n==="colorbox"?0:g),x=p):n==="angl"?(g=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),p=4*g,x=Math.max(0,.25-r.depth)):(p=l?.2:0,x=p),i=Ik(r,n,p,x,t),/fbox|boxed|fcolorbox/.test(n)?(i.style.borderStyle="solid",i.style.borderWidth=Ye(g)):n==="angl"&&g!==.049&&(i.style.borderTopWidth=Ye(g),i.style.borderRightWidth=Ye(g)),o=r.depth+x,e.backgroundColor&&(i.style.backgroundColor=e.backgroundColor,e.borderColor&&(i.style.borderColor=e.borderColor))}var m;if(e.backgroundColor)m=Ut({positionType:"individualShift",children:[{type:"elem",elem:i,shift:o},{type:"elem",elem:r,shift:0}]});else{var b=/cancel|phase/.test(n)?["svg-align"]:[];m=Ut({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:i,shift:o,wrapperClasses:b}]})}return/cancel/.test(n)&&(m.height=r.height,m.depth=r.depth),/cancel/.test(n)&&!l?$e(["mord","cancel-lap"],[m],t):$e(["mord"],[m],t)},S0=(e,t)=>{var r=0,n=new je(e.label.includes("colorbox")?"mpadded":"menclose",[Yt(e.body,t)]);switch(e.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),e.label==="\\fcolorbox"){var a=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);n.setAttribute("style","border: "+Ye(a)+" solid "+e.borderColor)}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n};at({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,r){var{parser:n,funcName:a}=e,i=Mt(t[0],"color-token").color,o=t[1];return{type:"enclose",mode:n.mode,label:a,backgroundColor:i,body:o}},htmlBuilder:k0,mathmlBuilder:S0}),at({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,r){var{parser:n,funcName:a}=e,i=Mt(t[0],"color-token").color,o=Mt(t[1],"color-token").color,l=t[2];return{type:"enclose",mode:n.mode,label:a,backgroundColor:o,borderColor:i,body:l}},htmlBuilder:k0,mathmlBuilder:S0}),at({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\fbox",body:t[0]}}}),at({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e,a=t[0];return{type:"enclose",mode:r.mode,label:n,body:a}},htmlBuilder:k0,mathmlBuilder:S0}),at({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e;r.mode==="math"&&r.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var a=t[0];return{type:"enclose",mode:r.mode,label:n,body:a}},htmlBuilder:k0,mathmlBuilder:S0}),at({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\angl",body:t[0]}}});var vv={};function ga(e){for(var{type:t,names:r,props:n,handler:a,htmlBuilder:i,mathmlBuilder:o}=e,l={type:t,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:a},s=0;s<r.length;++s)vv[r[s]]=l;i&&(f0[t]=i),o&&(d0[t]=o)}var mv={};function B(e,t){mv[e]=t}class un{constructor(t,r,n){this.lexer=t,this.start=r,this.end=n}static range(t,r){return r?!t||!t.loc||!r.loc||t.loc.lexer!==r.loc.lexer?null:new un(t.loc.lexer,t.loc.start,r.loc.end):t&&t.loc}}class bn{constructor(t,r){this.text=t,this.loc=r}range(t,r){return new bn(r,un.range(this,t))}}function gv(e){var t=[];e.consumeSpaces();var r=e.fetch().text;for(r==="\\relax"&&(e.consume(),e.consumeSpaces(),r=e.fetch().text);r==="\\hline"||r==="\\hdashline";)e.consume(),t.push(r==="\\hdashline"),e.consumeSpaces(),r=e.fetch().text;return t}var C0=e=>{var t=e.parser.settings;if(!t.displayMode)throw new He("{"+e.envName+"} can be used only in display mode.")},Kk=new Set(["gather","gather*"]);function ef(e){if(!e.includes("ed"))return!e.includes("*")}function hi(e,t,r){var{hskipBeforeAndAfter:n,addJot:a,cols:i,arraystretch:o,colSeparationType:l,autoTag:s,singleRow:u,emptySingleRow:c,maxNumCols:f,leqno:d}=t;if(e.gullet.beginGroup(),u||e.gullet.macros.set("\\cr","\\\\\\relax"),!o){var h=e.gullet.expandMacroAsText("\\arraystretch");if(h==null)o=1;else if(o=parseFloat(h),!o||o<0)throw new He("Invalid \\arraystretch: "+h)}e.gullet.beginGroup();var y=[],p=[y],x=[],g=[],m=s!=null?[]:void 0;function b(){s&&e.gullet.macros.set("\\@eqnsw","1",!0)}function v(){m&&(e.gullet.macros.get("\\df@tag")?(m.push(e.subparse([new bn("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):m.push(!!s&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(b(),g.push(gv(e));;){var S=e.parseExpression(!1,u?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var C={type:"ordgroup",mode:e.mode,body:S};r&&(C={type:"styling",mode:e.mode,style:r,body:[C]}),y.push(C);var A=e.fetch().text;if(A==="&"){if(f&&y.length===f){if(u||l)throw new He("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(A==="\\end"){v(),y.length===1&&C.type==="styling"&&C.body.length===1&&C.body[0].type==="ordgroup"&&C.body[0].body.length===0&&(p.length>1||!c)&&p.pop(),g.length<p.length+1&&g.push([]);break}else if(A==="\\\\"){e.consume();var _=void 0;e.gullet.future().text!==" "&&(_=e.parseSizeGroup(!0)),x.push(_?_.value:null),v(),g.push(gv(e)),y=[],p.push(y),b()}else throw new He("Expected & or \\\\ or \\cr or \\end",e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:a,arraystretch:o,body:p,cols:i,rowGaps:x,hskipBeforeAndAfter:n,hLinesBeforeRow:g,colSeparationType:l,tags:m,leqno:d}}function tf(e){return e.slice(0,1)==="d"?"display":"text"}var ba=function(t,r){var n,a,i=t.body.length,o=t.hLinesBeforeRow,l=0,s=new Array(i),u=[],c=Math.max(r.fontMetrics().arrayRuleWidth,r.minRuleThickness),f=1/r.fontMetrics().ptPerEm,d=5*f;if(t.colSeparationType&&t.colSeparationType==="small"){var h=r.havingStyle(Ct.SCRIPT).sizeMultiplier;d=.2778*(h/r.sizeMultiplier)}var y=t.colSeparationType==="CD"?ur({number:3,unit:"ex"},r):12*f,p=3*f,x=t.arraystretch*y,g=.7*x,m=.3*x,b=0;function v(ot){for(var wt=0;wt<ot.length;++wt)wt>0&&(b+=.25),u.push({pos:b,isDashed:ot[wt]})}for(v(o[0]),n=0;n<t.body.length;++n){var S=t.body[n],C=g,A=m;l<S.length&&(l=S.length);var _=new Array(S.length);for(a=0;a<S.length;++a){var E=Ht(S[a],r);A<E.depth&&(A=E.depth),C<E.height&&(C=E.height),_[a]=E}var M=t.rowGaps[n],z=0;M&&(z=ur(M,r),z>0&&(z+=m,A<z&&(A=z),z=0)),t.addJot&&n<t.body.length-1&&(A+=p),_.height=C,_.depth=A,b+=C,_.pos=b,b+=A+z,s[n]=_,v(o[n+1])}var N=b/2+r.fontMetrics().axisHeight,R=t.cols||[],$=[],q,W,Z=[];if(t.tags&&t.tags.some(ot=>ot))for(n=0;n<i;++n){var te=s[n],ne=te.pos-N,_e=t.tags[n],pe=void 0;_e===!0?pe=$e(["eqn-num"],[],r):_e===!1?pe=$e([],[],r):pe=$e([],Cr(_e,r,!0),r),pe.depth=te.depth,pe.height=te.height,Z.push({type:"elem",elem:pe,shift:ne})}for(a=0,W=0;a<l||W<R.length;++a,++W){for(var we,ve=R[W],Te=!0;((Se=ve)==null?void 0:Se.type)==="separator";){var Se;if(Te||(q=$e(["arraycolsep"],[]),q.style.width=Ye(r.fontMetrics().doubleRuleSep),$.push(q)),ve.separator==="|"||ve.separator===":"){var Ie=ve.separator==="|"?"solid":"dashed",Le=$e(["vertical-separator"],[],r);Le.style.height=Ye(b),Le.style.borderRightWidth=Ye(c),Le.style.borderRightStyle=Ie,Le.style.margin="0 "+Ye(-c/2);var Ee=b-N;Ee&&(Le.style.verticalAlign=Ye(-Ee)),$.push(Le)}else throw new He("Invalid separator type: "+ve.separator);W++,ve=R[W],Te=!1}if(!(a>=l)){var Be=void 0;if(a>0||t.hskipBeforeAndAfter){var be,ye;Be=(be=(ye=ve)==null?void 0:ye.pregap)!=null?be:d,Be!==0&&(q=$e(["arraycolsep"],[]),q.style.width=Ye(Be),$.push(q))}var P=[];for(n=0;n<i;++n){var V=s[n],fe=V[a];if(fe){var de=V.pos-N;fe.depth=V.depth,fe.height=V.height,P.push({type:"elem",elem:fe,shift:de})}}var ie=Ut({positionType:"individualShift",children:P}),oe=$e(["col-align-"+(((we=ve)==null?void 0:we.align)||"c")],[ie]);if($.push(oe),a<l-1||t.hskipBeforeAndAfter){var se,ge;Be=(se=(ge=ve)==null?void 0:ge.postgap)!=null?se:d,Be!==0&&(q=$e(["arraycolsep"],[]),q.style.width=Ye(Be),$.push(q))}}}var Ce=$e(["mtable"],$);if(u.length>0){for(var xe=ko("hline",r,c),Ve=ko("hdashline",r,c),Ue=[{type:"elem",elem:Ce,shift:0}];u.length>0;){var Ne=u.pop(),qe=Ne.pos-N;Ne.isDashed?Ue.push({type:"elem",elem:Ve,shift:qe}):Ue.push({type:"elem",elem:xe,shift:qe})}Ce=Ut({positionType:"individualShift",children:Ue})}if(Z.length===0)return $e(["mord"],[Ce],r);var it=Ut({positionType:"individualShift",children:Z}),ct=$e(["tag"],[it],r);return Ua([Ce,ct])},Xk={c:"center ",l:"left ",r:"right "},ya=function(t,r){for(var n=[],a=new je("mtd",[],["mtr-glue"]),i=new je("mtd",[],["mml-eqn-num"]),o=0;o<t.body.length;o++){for(var l=t.body[o],s=[],u=0;u<l.length;u++)s.push(new je("mtd",[Yt(l[u],r)]));t.tags&&t.tags[o]&&(s.unshift(a),s.push(a),t.leqno?s.unshift(i):s.push(i)),n.push(new je("mtr",s))}var c=new je("mtable",n),f=t.arraystretch===.5?.1:.16+t.arraystretch-1+(t.addJot?.09:0);c.setAttribute("rowspacing",Ye(f));var d="",h="";if(t.cols&&t.cols.length>0){var y=t.cols,p="",x=!1,g=0,m=y.length;y[0].type==="separator"&&(d+="top ",g=1),y[y.length-1].type==="separator"&&(d+="bottom ",m-=1);for(var b=g;b<m;b++){var v=y[b];v.type==="align"?(h+=Xk[v.align],x&&(p+="none "),x=!0):v.type==="separator"&&x&&(p+=v.separator==="|"?"solid ":"dashed ",x=!1)}c.setAttribute("columnalign",h.trim()),/[sd]/.test(p)&&c.setAttribute("columnlines",p.trim())}if(t.colSeparationType==="align"){for(var S=t.cols||[],C="",A=1;A<S.length;A++)C+=A%2?"0em ":"1em ";c.setAttribute("columnspacing",C.trim())}else t.colSeparationType==="alignat"||t.colSeparationType==="gather"?c.setAttribute("columnspacing","0em"):t.colSeparationType==="small"?c.setAttribute("columnspacing","0.2778em"):t.colSeparationType==="CD"?c.setAttribute("columnspacing","0.5em"):c.setAttribute("columnspacing","1em");var _="",E=t.hLinesBeforeRow;d+=E[0].length>0?"left ":"",d+=E[E.length-1].length>0?"right ":"";for(var M=1;M<E.length-1;M++)_+=E[M].length===0?"none ":E[M][0]?"dashed ":"solid ";return/[sd]/.test(_)&&c.setAttribute("rowlines",_.trim()),d!==""&&(c=new je("menclose",[c]),c.setAttribute("notation",d.trim())),t.arraystretch&&t.arraystretch<1&&(c=new je("mstyle",[c]),c.setAttribute("scriptlevel","1")),c},bv=function(t,r){t.envName.includes("ed")||C0(t);var n=[],a=t.envName.includes("at")?"alignat":"align",i=t.envName==="split",o=hi(t.parser,{cols:n,addJot:!0,autoTag:i?void 0:ef(t.envName),emptySingleRow:!0,colSeparationType:a,maxNumCols:i?2:void 0,leqno:t.parser.settings.leqno},"display"),l=0,s=0,u={type:"ordgroup",mode:t.mode,body:[]};if(r[0]&&r[0].type==="ordgroup"){for(var c="",f=0;f<r[0].body.length;f++){var d=Mt(r[0].body[f],"textord");c+=d.text}l=Number(c),s=l*2}var h=!s;o.body.forEach(function(g){for(var m=1;m<g.length;m+=2){var b=Mt(g[m],"styling"),v=Mt(b.body[0],"ordgroup");v.body.unshift(u)}if(h)s<g.length&&(s=g.length);else{var S=g.length/2;if(l<S)throw new He("Too many math in a row: "+("expected "+l+", but got "+S),g[0])}});for(var y=0;y<s;++y){var p="r",x=0;y%2===1?p="l":y>0&&h&&(x=1),n[y]={type:"align",align:p,pregap:x,postgap:0}}return o.colSeparationType=h?"align":"alignat",o};ga({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var r=b0(t[0]),n=r?[t[0]]:Mt(t[0],"ordgroup").body,a=n.map(function(o){var l=g0(o),s=l.text;if("lcr".includes(s))return{type:"align",align:s};if(s==="|")return{type:"separator",separator:"|"};if(s===":")return{type:"separator",separator:":"};throw new He("Unknown column alignment: "+s,o)}),i={cols:a,hskipBeforeAndAfter:!0,maxNumCols:a.length};return hi(e.parser,i,tf(e.envName))},htmlBuilder:ba,mathmlBuilder:ya}),ga({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if(e.envName.charAt(e.envName.length-1)==="*"){var a=e.parser;if(a.consumeSpaces(),a.fetch().text==="["){if(a.consume(),a.consumeSpaces(),r=a.fetch().text,!"lcr".includes(r))throw new He("Expected l or c or r",a.nextToken);a.consume(),a.consumeSpaces(),a.expect("]"),a.consume(),n.cols=[{type:"align",align:r}]}}var i=hi(e.parser,n,tf(e.envName)),o=Math.max(0,...i.body.map(l=>l.length));return i.cols=new Array(o).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[i],left:t[0],right:t[1],rightColor:void 0}:i},htmlBuilder:ba,mathmlBuilder:ya}),ga({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:.5},r=hi(e.parser,t,"script");return r.colSeparationType="small",r},htmlBuilder:ba,mathmlBuilder:ya}),ga({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var r=b0(t[0]),n=r?[t[0]]:Mt(t[0],"ordgroup").body,a=n.map(function(l){var s=g0(l),u=s.text;if("lc".includes(u))return{type:"align",align:u};throw new He("Unknown column alignment: "+u,l)});if(a.length>1)throw new He("{subarray} can contain only one column");var i={cols:a,hskipBeforeAndAfter:!1,arraystretch:.5},o=hi(e.parser,i,"script");if(o.body.length>0&&o.body[0].length>1)throw new He("{subarray} can contain only one column");return o},htmlBuilder:ba,mathmlBuilder:ya}),ga({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},r=hi(e.parser,t,tf(e.envName));return{type:"leftright",mode:e.mode,body:[r],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:ba,mathmlBuilder:ya}),ga({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:bv,htmlBuilder:ba,mathmlBuilder:ya}),ga({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){Kk.has(e.envName)&&C0(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:ef(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return hi(e.parser,t,"display")},htmlBuilder:ba,mathmlBuilder:ya}),ga({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:bv,htmlBuilder:ba,mathmlBuilder:ya}),ga({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){C0(e);var t={autoTag:ef(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return hi(e.parser,t,"display")},htmlBuilder:ba,mathmlBuilder:ya}),ga({type:"array",names:["CD"],props:{numArgs:0},handler(e){return C0(e),Rk(e.parser)},htmlBuilder:ba,mathmlBuilder:ya}),B("\\nonumber","\\gdef\\@eqnsw{0}"),B("\\notag","\\nonumber"),at({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new He(e.funcName+" valid only within array environment")}});var yv=vv;at({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:r,funcName:n}=e,a=t[0];if(a.type!=="ordgroup")throw new He("Invalid environment name",a);for(var i="",o=0;o<a.body.length;++o)i+=Mt(a.body[o],"textord").text;if(n==="\\begin"){if(!yv.hasOwnProperty(i))throw new He("No such environment: "+i,a);var l=yv[i],{args:s,optArgs:u}=r.parseArguments("\\begin{"+i+"}",l),c={mode:r.mode,envName:i,parser:r},f=l.handler(c,s,u);r.expect("\\end",!1);var d=r.nextToken,h=Mt(r.parseFunction(),"environment");if(h.name!==i)throw new He("Mismatch: \\begin{"+i+"} matched by \\end{"+h.name+"}",d);return f}return{type:"environment",mode:r.mode,name:i,nameGroup:a}}});var xv=(e,t)=>{var r=e.font,n=t.withFont(r);return Ht(e.body,n)},_v=(e,t)=>{var r=e.font,n=t.withFont(r);return Yt(e.body,n)},wv={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};at({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=h0(t[0]),i=n;return i in wv&&(i=wv[i]),{type:"font",mode:r.mode,font:i.slice(1),body:a}},htmlBuilder:xv,mathmlBuilder:_v}),at({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"mclass",mode:r.mode,mclass:x0(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:La(n)}}}),at({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n,breakOnTokenText:a}=e,{mode:i}=r,o=r.parseExpression(!0,a),l="math"+n.slice(1);return{type:"font",mode:i,font:l,body:{type:"ordgroup",mode:r.mode,body:o}}},htmlBuilder:xv,mathmlBuilder:_v});var Yk=(e,t)=>{var r=t.style,n=r.fracNum(),a=r.fracDen(),i;i=t.havingStyle(n);var o=Ht(e.numer,i,t);if(e.continued){var l=8.5/t.fontMetrics().ptPerEm,s=3.5/t.fontMetrics().ptPerEm;o.height=o.height<l?l:o.height,o.depth=o.depth<s?s:o.depth}i=t.havingStyle(a);var u=Ht(e.denom,i,t),c,f,d;e.hasBarLine?(e.barSize?(f=ur(e.barSize,t),c=ko("frac-line",t,f)):c=ko("frac-line",t),f=c.height,d=c.height):(c=null,f=0,d=t.fontMetrics().defaultRuleThickness);var h,y,p;r.size===Ct.DISPLAY.size?(h=t.fontMetrics().num1,f>0?y=3*d:y=7*d,p=t.fontMetrics().denom1):(f>0?(h=t.fontMetrics().num2,y=d):(h=t.fontMetrics().num3,y=3*d),p=t.fontMetrics().denom2);var x;if(c){var m=t.fontMetrics().axisHeight;h-o.depth-(m+.5*f)<y&&(h+=y-(h-o.depth-(m+.5*f))),m-.5*f-(u.height-p)<y&&(p+=y-(m-.5*f-(u.height-p)));var b=-(m-.5*f);x=Ut({positionType:"individualShift",children:[{type:"elem",elem:u,shift:p},{type:"elem",elem:c,shift:b},{type:"elem",elem:o,shift:-h}]})}else{var g=h-o.depth-(u.height-p);g<y&&(h+=.5*(y-g),p+=.5*(y-g)),x=Ut({positionType:"individualShift",children:[{type:"elem",elem:u,shift:p},{type:"elem",elem:o,shift:-h}]})}i=t.havingStyle(r),x.height*=i.sizeMultiplier/t.sizeMultiplier,x.depth*=i.sizeMultiplier/t.sizeMultiplier;var v;r.size===Ct.DISPLAY.size?v=t.fontMetrics().delim1:r.size===Ct.SCRIPTSCRIPT.size?v=t.havingStyle(Ct.SCRIPT).fontMetrics().delim2:v=t.fontMetrics().delim2;var S,C;return e.leftDelim==null?S=Dl(t,["mopen"]):S=Jc(e.leftDelim,v,!0,t.havingStyle(r),e.mode,["mopen"]),e.continued?C=$e([]):e.rightDelim==null?C=Dl(t,["mclose"]):C=Jc(e.rightDelim,v,!0,t.havingStyle(r),e.mode,["mclose"]),$e(["mord"].concat(i.sizingClasses(t)),[S,$e(["mfrac"],[x]),C],t)},Zk=(e,t)=>{var r=new je("mfrac",[Yt(e.numer,t),Yt(e.denom,t)]);if(!e.hasBarLine)r.setAttribute("linethickness","0px");else if(e.barSize){var n=ur(e.barSize,t);r.setAttribute("linethickness",Ye(n))}if(e.leftDelim!=null||e.rightDelim!=null){var a=[];if(e.leftDelim!=null){var i=new je("mo",[new xr(e.leftDelim.replace("\\",""))]);i.setAttribute("fence","true"),a.push(i)}if(a.push(r),e.rightDelim!=null){var o=new je("mo",[new xr(e.rightDelim.replace("\\",""))]);o.setAttribute("fence","true"),a.push(o)}return $c(a)}return r},kv=(e,t)=>{if(!t)return e;var r={type:"styling",mode:e.mode,style:t,body:[e]};return r};at({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=t[0],i=t[1],o,l=null,s=null;switch(n){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":o=!0;break;case"\\\\atopfrac":o=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":o=!1,l="(",s=")";break;case"\\\\bracefrac":o=!1,l="\\{",s="\\}";break;case"\\\\brackfrac":o=!1,l="[",s="]";break;default:throw new Error("Unrecognized genfrac command")}var u=n==="\\cfrac",c=null;return u||n.startsWith("\\d")?c="display":n.startsWith("\\t")&&(c="text"),kv({type:"genfrac",mode:r.mode,numer:a,denom:i,continued:u,hasBarLine:o,leftDelim:l,rightDelim:s,barSize:null},c)},htmlBuilder:Yk,mathmlBuilder:Zk}),at({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:r,token:n}=e,a;switch(r){case"\\over":a="\\frac";break;case"\\choose":a="\\binom";break;case"\\atop":a="\\\\atopfrac";break;case"\\brace":a="\\\\bracefrac";break;case"\\brack":a="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:a,token:n}}});var Sv=["display","text","script","scriptscript"],Cv=function(t){var r=null;return t.length>0&&(r=t,r=r==="."?null:r),r};at({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var{parser:r}=e,n=t[4],a=t[5],i=h0(t[0]),o=i.type==="atom"&&i.family==="open"?Cv(i.text):null,l=h0(t[1]),s=l.type==="atom"&&l.family==="close"?Cv(l.text):null,u=Mt(t[2],"size"),c,f=null;u.isBlank?c=!0:(f=u.value,c=f.number>0);var d=null,h=t[3];if(h.type==="ordgroup"){if(h.body.length>0){var y=Mt(h.body[0],"textord");d=Sv[Number(y.text)]}}else h=Mt(h,"textord"),d=Sv[Number(h.text)];return kv({type:"genfrac",mode:r.mode,numer:n,denom:a,continued:!1,hasBarLine:c,barSize:f,leftDelim:o,rightDelim:s},d)}}),at({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:r,funcName:n,token:a}=e;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:Mt(t[0],"size").value,token:a}}}),at({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=t[0],i=Mt(t[1],"infix").size;if(!i)throw new Error("\\\\abovefrac expected size, but got "+String(i));var o=t[2],l=i.number>0;return{type:"genfrac",mode:r.mode,numer:a,denom:o,continued:!1,hasBarLine:l,barSize:i,leftDelim:null,rightDelim:null}}});var Av=(e,t)=>{var r=t.style,n,a;e.type==="supsub"?(n=e.sup?Ht(e.sup,t.havingStyle(r.sup()),t):Ht(e.sub,t.havingStyle(r.sub()),t),a=Mt(e.base,"horizBrace")):a=Mt(e,"horizBrace");var i=Ht(a.base,t.havingBaseStyle(Ct.DISPLAY)),o=m0(a,t),l;if(a.isOver?(l=Ut({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:o}]}),l.children[0].children[0].children[1].classes.push("svg-align")):(l=Ut({positionType:"bottom",positionData:i.depth+.1+o.height,children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:i}]}),l.children[0].children[0].children[0].classes.push("svg-align")),n){var s=$e(["minner",a.isOver?"mover":"munder"],[l],t);a.isOver?l=Ut({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.2},{type:"elem",elem:n}]}):l=Ut({positionType:"bottom",positionData:s.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:s}]})}return $e(["minner",a.isOver?"mover":"munder"],[l],t)},Jk=(e,t)=>{var r=v0(e.label);return new je(e.isOver?"mover":"munder",[Yt(e.base,t),r])};at({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e;return{type:"horizBrace",mode:r.mode,label:n,isOver:n.includes("\\over"),base:t[0]}},htmlBuilder:Av,mathmlBuilder:Jk}),at({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[1],a=Mt(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:a})?{type:"href",mode:r.mode,href:a,body:yr(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var r=Cr(e.body,t,!1);return vk(e.href,[],r,t)},mathmlBuilder:(e,t)=>{var r=di(e.body,t);return r instanceof je||(r=new je("mrow",[r])),r.setAttribute("href",e.href),r}}),at({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=Mt(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var a=[],i=0;i<n.length;i++){var o=n[i];o==="~"&&(o="\\textasciitilde"),a.push({type:"textord",mode:"text",text:o})}var l={type:"text",mode:r.mode,font:"\\texttt",body:a};return{type:"href",mode:r.mode,href:n,body:yr(l)}}}),at({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){var{parser:r}=e;return{type:"hbox",mode:r.mode,body:yr(t[0])}},htmlBuilder(e,t){var r=Cr(e.body,t,!1);return Ua(r)},mathmlBuilder(e,t){return new je("mrow",gn(e.body,t))}}),at({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n,token:a}=e,i=Mt(t[0],"raw").string,o=t[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var l,s={};switch(n){case"\\htmlClass":s.class=i,l={command:"\\htmlClass",class:i};break;case"\\htmlId":s.id=i,l={command:"\\htmlId",id:i};break;case"\\htmlStyle":s.style=i,l={command:"\\htmlStyle",style:i};break;case"\\htmlData":{for(var u=i.split(","),c=0;c<u.length;c++){var f=u[c],d=f.indexOf("=");if(d<0)throw new He("\\htmlData key/value '"+f+"' missing equals sign");var h=f.slice(0,d),y=f.slice(d+1);s["data-"+h.trim()]=y}l={command:"\\htmlData",attributes:s};break}default:throw new Error("Unrecognized html command")}return r.settings.isTrusted(l)?{type:"html",mode:r.mode,attributes:s,body:yr(o)}:r.formatUnsupportedCmd(n)},htmlBuilder:(e,t)=>{var r=Cr(e.body,t,!1),n=["enclosing"];e.attributes.class&&n.push(...e.attributes.class.trim().split(/\s+/));var a=$e(n,r,t);for(var i in e.attributes)i!=="class"&&e.attributes.hasOwnProperty(i)&&a.setAttribute(i,e.attributes[i]);return a},mathmlBuilder:(e,t)=>di(e.body,t)}),at({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"htmlmathml",mode:r.mode,html:yr(t[0]),mathml:yr(t[1])}},htmlBuilder:(e,t)=>{var r=Cr(e.html,t,!1);return Ua(r)},mathmlBuilder:(e,t)=>di(e.mathml,t)});var rf=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!r)throw new He("Invalid size: '"+t+"' in \\includegraphics");var n={number:+(r[1]+r[2]),unit:r[3]};if(!Sp(n))throw new He("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};at({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,r)=>{var{parser:n}=e,a={number:0,unit:"em"},i={number:.9,unit:"em"},o={number:0,unit:"em"},l="";if(r[0])for(var s=Mt(r[0],"raw").string,u=s.split(","),c=0;c<u.length;c++){var f=u[c].split("=");if(f.length===2){var d=f[1].trim();switch(f[0].trim()){case"alt":l=d;break;case"width":a=rf(d);break;case"height":i=rf(d);break;case"totalheight":o=rf(d);break;default:throw new He("Invalid key: '"+f[0]+"' in \\includegraphics.")}}}var h=Mt(t[0],"url").url;return l===""&&(l=h,l=l.replace(/^.*[\\/]/,""),l=l.substring(0,l.lastIndexOf("."))),n.settings.isTrusted({command:"\\includegraphics",url:h})?{type:"includegraphics",mode:n.mode,alt:l,width:a,height:i,totalheight:o,src:h}:n.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var r=ur(e.height,t),n=0;e.totalheight.number>0&&(n=ur(e.totalheight,t)-r);var a=0;e.width.number>0&&(a=ur(e.width,t));var i={height:Ye(r+n)};a>0&&(i.width=Ye(a)),n>0&&(i.verticalAlign=Ye(-n));var o=new ak(e.src,e.alt,i);return o.height=r,o.depth=n,o},mathmlBuilder:(e,t)=>{var r=new je("mglyph",[]);r.setAttribute("alt",e.alt);var n=ur(e.height,t),a=0;if(e.totalheight.number>0&&(a=ur(e.totalheight,t)-n,r.setAttribute("valign",Ye(-a))),r.setAttribute("height",Ye(n+a)),e.width.number>0){var i=ur(e.width,t);r.setAttribute("width",Ye(i))}return r.setAttribute("src",e.src),r}}),at({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e,a=Mt(t[0],"size");if(r.settings.strict){var i=n[1]==="m",o=a.value.unit==="mu";i?(o||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+a.value.unit+" units")),r.mode!=="math"&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):o&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:a.value}},htmlBuilder(e,t){return Lp(e.dimension,t)},mathmlBuilder(e,t){var r=ur(e.dimension,t);return new jp(r)}}),at({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=t[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:a}},htmlBuilder:(e,t)=>{var r;e.alignment==="clap"?(r=$e([],[Ht(e.body,t)]),r=$e(["inner"],[r],t)):r=$e(["inner"],[Ht(e.body,t)]);var n=$e(["fix"],[]),a=$e([e.alignment],[r,n],t),i=$e(["strut"]);return i.style.height=Ye(a.height+a.depth),a.depth&&(i.style.verticalAlign=Ye(-a.depth)),a.children.unshift(i),a=$e(["thinbox"],[a],t),$e(["mord","vbox"],[a],t)},mathmlBuilder:(e,t)=>{var r=new je("mpadded",[Yt(e.body,t)]);if(e.alignment!=="rlap"){var n=e.alignment==="llap"?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r}}),at({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:r,parser:n}=e,a=n.mode;n.switchMode("math");var i=r==="\\("?"\\)":"$",o=n.parseExpression(!1,i);return n.expect(i),n.switchMode(a),{type:"styling",mode:n.mode,style:"text",body:o}}}),at({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new He("Mismatched "+e.funcName)}});var Ev=(e,t)=>{switch(t.style.size){case Ct.DISPLAY.size:return e.display;case Ct.TEXT.size:return e.text;case Ct.SCRIPT.size:return e.script;case Ct.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};at({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"mathchoice",mode:r.mode,display:yr(t[0]),text:yr(t[1]),script:yr(t[2]),scriptscript:yr(t[3])}},htmlBuilder:(e,t)=>{var r=Ev(e,t),n=Cr(r,t,!1);return Ua(n)},mathmlBuilder:(e,t)=>{var r=Ev(e,t);return di(r,t)}});var Tv=(e,t,r,n,a,i,o)=>{e=$e([],[e]);var l=r&&La(r),s,u;if(t){var c=Ht(t,n.havingStyle(a.sup()),n);u={elem:c,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-c.depth)}}if(r){var f=Ht(r,n.havingStyle(a.sub()),n);s={elem:f,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-f.height)}}var d;if(u&&s){var h=n.fontMetrics().bigOpSpacing5+s.elem.height+s.elem.depth+s.kern+e.depth+o;d=Ut({positionType:"bottom",positionData:h,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:Ye(-i)},{type:"kern",size:s.kern},{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:Ye(i)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else if(s){var y=e.height-o;d=Ut({positionType:"top",positionData:y,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:Ye(-i)},{type:"kern",size:s.kern},{type:"elem",elem:e}]})}else if(u){var p=e.depth+o;d=Ut({positionType:"bottom",positionData:p,children:[{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:Ye(i)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else return e;var x=[d];if(s&&i!==0&&!l){var g=$e(["mspace"],[],n);g.style.marginRight=Ye(i),x.unshift(g)}return $e(["mop","op-limits"],x,n)},Mv=new Set(["\\smallint"]),Co=(e,t)=>{var r,n,a=!1,i;e.type==="supsub"?(r=e.sup,n=e.sub,i=Mt(e.base,"op"),a=!0):i=Mt(e,"op");var o=t.style,l=!1;o.size===Ct.DISPLAY.size&&i.symbol&&!Mv.has(i.name)&&(l=!0);var s;if(i.symbol){var u=l?"Size2-Regular":"Size1-Regular",c="";if((i.name==="\\oiint"||i.name==="\\oiiint")&&(c=i.name.slice(1),i.name=c==="oiint"?"\\iint":"\\iiint"),s=rn(i.name,u,"math",t,["mop","op-symbol",l?"large-op":"small-op"]),c.length>0){var f=s.italic,d=Np(c+"Size"+(l?"2":"1"),t);s=Ut({positionType:"individualShift",children:[{type:"elem",elem:s,shift:0},{type:"elem",elem:d,shift:l?.08:0}]}),i.name="\\"+c,s.classes.unshift("mop"),s.italic=f}}else if(i.body){var h=Cr(i.body,t,!0);h.length===1&&h[0]instanceof vn?(s=h[0],s.classes[0]="mop"):s=$e(["mop"],h,t)}else{for(var y=[],p=1;p<i.name.length;p++)y.push(Fc(i.name[p],i.mode,t));s=$e(["mop"],y,t)}var x=0,g=0;return(s instanceof vn||i.name==="\\oiint"||i.name==="\\oiiint")&&!i.suppressBaseShift&&(x=(s.height-s.depth)/2-t.fontMetrics().axisHeight,g=s.italic||0),a?Tv(s,r,n,t,o,g,x):(x&&(s.style.position="relative",s.style.top=Ye(x)),s)},Fl=(e,t)=>{var r;if(e.symbol)r=new je("mo",[Fn(e.name,e.mode)]),Mv.has(e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new je("mo",gn(e.body,t));else{r=new je("mi",[new xr(e.name.slice(1))]);var n=new je("mo",[Fn("","text")]);e.parentIsSupSub?r=new je("mrow",[r,n]):r=Hp([r,n])}return r},Qk={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};at({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=n;return a.length===1&&(a=Qk[a]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:Co,mathmlBuilder:Fl}),at({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:yr(n)}},htmlBuilder:Co,mathmlBuilder:Fl});var eS={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};at({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:Co,mathmlBuilder:Fl}),at({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:Co,mathmlBuilder:Fl}),at({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:r}=e,n=r;return n.length===1&&(n=eS[n]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:Co,mathmlBuilder:Fl});var Dv=(e,t)=>{var r,n,a=!1,i;e.type==="supsub"?(r=e.sup,n=e.sub,i=Mt(e.base,"operatorname"),a=!0):i=Mt(e,"operatorname");var o;if(i.body.length>0){for(var l=i.body.map(f=>{var d="text"in f?f.text:void 0;return typeof d=="string"?{type:"textord",mode:f.mode,text:d}:f}),s=Cr(l,t.withFont("mathrm"),!0),u=0;u<s.length;u++){var c=s[u];c instanceof vn&&(c.text=c.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}o=$e(["mop"],s,t)}else o=$e(["mop"],[],t);return a?Tv(o,r,n,t,t.style,0,0):o},tS=(e,t)=>{for(var r=gn(e.body,t.withFont("mathrm")),n=!0,a=0;a<r.length;a++){var i=r[a];if(!(i instanceof jp))if(i instanceof je)switch(i.type){case"mi":case"mn":case"mspace":case"mtext":break;case"mo":{var o=i.children[0];i.children.length===1&&o instanceof xr?o.text=o.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break}default:n=!1}else n=!1}if(n){var l=r.map(c=>c.toText()).join("");r=[new xr(l)]}var s=new je("mi",r);s.setAttribute("mathvariant","normal");var u=new je("mo",[Fn("","text")]);return e.parentIsSupSub?new je("mrow",[s,u]):Hp([s,u])};at({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=t[0];return{type:"operatorname",mode:r.mode,body:yr(a),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:Dv,mathmlBuilder:tS}),B("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),Ni({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?Ua(Cr(e.body,t,!1)):$e(["mord"],Cr(e.body,t,!0),t)},mathmlBuilder(e,t){return di(e.body,t,!0)}}),at({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:r}=e,n=t[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(e,t){var r=Ht(e.body,t.havingCrampedStyle()),n=ko("overline-line",t),a=t.fontMetrics().defaultRuleThickness,i=Ut({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*a},{type:"elem",elem:n},{type:"kern",size:a}]});return $e(["mord","overline"],[i],t)},mathmlBuilder(e,t){var r=new je("mo",[new xr("‾")]);r.setAttribute("stretchy","true");var n=new je("mover",[Yt(e.body,t),r]);return n.setAttribute("accent","true"),n}}),at({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"phantom",mode:r.mode,body:yr(n)}},htmlBuilder:(e,t)=>{var r=Cr(e.body,t.withPhantom(),!1);return Ua(r)},mathmlBuilder:(e,t)=>{var r=gn(e.body,t);return new je("mphantom",r)}}),B("\\hphantom","\\smash{\\phantom{#1}}"),at({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:(e,t)=>{var r=$e(["inner"],[Ht(e.body,t.withPhantom())]),n=$e(["fix"],[]);return $e(["mord","rlap"],[r,n],t)},mathmlBuilder:(e,t)=>{var r=gn(yr(e.body),t),n=new je("mphantom",r),a=new je("mpadded",[n]);return a.setAttribute("width","0px"),a}}),at({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e,n=Mt(t[0],"size").value,a=t[1];return{type:"raisebox",mode:r.mode,dy:n,body:a}},htmlBuilder(e,t){var r=Ht(e.body,t),n=ur(e.dy,t);return Ut({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]})},mathmlBuilder(e,t){var r=new je("mpadded",[Yt(e.body,t)]),n=e.dy.number+e.dy.unit;return r.setAttribute("voffset",n),r}}),at({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}}),at({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,r){var{parser:n}=e,a=r[0],i=Mt(t[0],"size"),o=Mt(t[1],"size");return{type:"rule",mode:n.mode,shift:a&&Mt(a,"size").value,width:i.value,height:o.value}},htmlBuilder(e,t){var r=$e(["mord","rule"],[],t),n=ur(e.width,t),a=ur(e.height,t),i=e.shift?ur(e.shift,t):0;return r.style.borderRightWidth=Ye(n),r.style.borderTopWidth=Ye(a),r.style.bottom=Ye(i),r.width=n,r.height=a+i,r.depth=-i,r.maxFontSize=a*1.125*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=ur(e.width,t),n=ur(e.height,t),a=e.shift?ur(e.shift,t):0,i=t.color&&t.getColor()||"black",o=new je("mspace");o.setAttribute("mathbackground",i),o.setAttribute("width",Ye(r)),o.setAttribute("height",Ye(n));var l=new je("mpadded",[o]);return a>=0?l.setAttribute("height",Ye(a)):(l.setAttribute("height",Ye(a)),l.setAttribute("depth",Ye(-a))),l.setAttribute("voffset",Ye(a)),l}});function Iv(e,t,r){for(var n=Cr(e,t,!1),a=t.sizeMultiplier/r.sizeMultiplier,i=0;i<n.length;i++){var o=n[i].classes.indexOf("sizing");o<0?Array.prototype.push.apply(n[i].classes,t.sizingClasses(r)):n[i].classes[o+1]==="reset-size"+t.size&&(n[i].classes[o+1]="reset-size"+r.size),n[i].height*=a,n[i].depth*=a}return Ua(n)}var zv=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],rS=(e,t)=>{var r=t.havingSize(e.size);return Iv(e.body,r,t)};at({type:"sizing",names:zv,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:r,funcName:n,parser:a}=e,i=a.parseExpression(!1,r);return{type:"sizing",mode:a.mode,size:zv.indexOf(n)+1,body:i}},htmlBuilder:rS,mathmlBuilder:(e,t)=>{var r=t.havingSize(e.size),n=gn(e.body,r),a=new je("mstyle",n);return a.setAttribute("mathsize",Ye(r.sizeMultiplier)),a}}),at({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,r)=>{var{parser:n}=e,a=!1,i=!1,o=r[0]&&Mt(r[0],"ordgroup");if(o)for(var l="",s=0;s<o.body.length;++s){var u=o.body[s];if(l=g0(u).text,l==="t")a=!0;else if(l==="b")i=!0;else{a=!1,i=!1;break}}else a=!0,i=!0;var c=t[0];return{type:"smash",mode:n.mode,body:c,smashHeight:a,smashDepth:i}},htmlBuilder:(e,t)=>{var r=$e([],[Ht(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0),e.smashDepth&&(r.depth=0),e.smashHeight&&e.smashDepth)return $e(["mord","smash"],[r],t);if(r.children)for(var n=0;n<r.children.length;n++)e.smashHeight&&(r.children[n].height=0),e.smashDepth&&(r.children[n].depth=0);var a=Ut({positionType:"firstBaseline",children:[{type:"elem",elem:r}]});return $e(["mord"],[a],t)},mathmlBuilder:(e,t)=>{var r=new je("mpadded",[Yt(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}}),at({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:n}=e,a=r[0],i=t[0];return{type:"sqrt",mode:n.mode,body:i,index:a}},htmlBuilder(e,t){var r=Ht(e.body,t.havingCrampedStyle());r.height===0&&(r.height=t.fontMetrics().xHeight),r=So(r,t);var n=t.fontMetrics(),a=n.defaultRuleThickness,i=a;t.style.id<Ct.TEXT.id&&(i=t.fontMetrics().xHeight);var o=a+i/4,l=r.height+r.depth+o+a,{span:s,ruleWidth:u,advanceWidth:c}=Hk(l,t),f=s.height-u;f>r.height+r.depth+o&&(o=(o+f-r.height-r.depth)/2);var d=s.height-r.height-o-u;r.style.paddingLeft=Ye(c);var h=Ut({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+d)},{type:"elem",elem:s},{type:"kern",size:u}]});if(e.index){var y=t.havingStyle(Ct.SCRIPTSCRIPT),p=Ht(e.index,y,t),x=.6*(h.height-h.depth),g=Ut({positionType:"shift",positionData:-x,children:[{type:"elem",elem:p}]}),m=$e(["root"],[g]);return $e(["mord","sqrt"],[m,h],t)}else return $e(["mord","sqrt"],[h],t)},mathmlBuilder(e,t){var{body:r,index:n}=e;return n?new je("mroot",[Yt(r,t),Yt(n,t)]):new je("msqrt",[Yt(r,t)])}});var Fv={display:Ct.DISPLAY,text:Ct.TEXT,script:Ct.SCRIPT,scriptscript:Ct.SCRIPTSCRIPT};at({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:r,funcName:n,parser:a}=e,i=a.parseExpression(!0,r),o=n.slice(1,n.length-5);return{type:"styling",mode:a.mode,style:o,body:i}},htmlBuilder(e,t){var r=Fv[e.style],n=t.havingStyle(r).withFont("");return Iv(e.body,n,t)},mathmlBuilder(e,t){var r=Fv[e.style],n=t.havingStyle(r),a=gn(e.body,n),i=new je("mstyle",a),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},l=o[e.style];return i.setAttribute("scriptlevel",l[0]),i.setAttribute("displaystyle",l[1]),i}});var nS=function(t,r){var n=t.base;if(n)if(n.type==="op"){var a=n.limits&&(r.style.size===Ct.DISPLAY.size||n.alwaysHandleSupSub);return a?Co:null}else if(n.type==="operatorname"){var i=n.alwaysHandleSupSub&&(r.style.size===Ct.DISPLAY.size||n.limits);return i?Dv:null}else{if(n.type==="accent")return La(n.base)?jc:null;if(n.type==="horizBrace"){var o=!t.sub;return o===n.isOver?Av:null}else return null}else return null};Ni({type:"supsub",htmlBuilder(e,t){var r=nS(e,t);if(r)return r(e,t);var{base:n,sup:a,sub:i}=e,o=Ht(n,t),l,s,u=t.fontMetrics(),c=0,f=0,d=n&&La(n);if(a){var h=t.havingStyle(t.style.sup());l=Ht(a,h,t),d||(c=o.height-h.fontMetrics().supDrop*h.sizeMultiplier/t.sizeMultiplier)}if(i){var y=t.havingStyle(t.style.sub());s=Ht(i,y,t),d||(f=o.depth+y.fontMetrics().subDrop*y.sizeMultiplier/t.sizeMultiplier)}var p;t.style===Ct.DISPLAY?p=u.sup1:t.style.cramped?p=u.sup3:p=u.sup2;var x=t.sizeMultiplier,g=Ye(.5/u.ptPerEm/x),m=null;if(s){var b=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");(o instanceof vn||b)&&(m=Ye(-o.italic))}var v;if(l&&s){c=Math.max(c,p,l.depth+.25*u.xHeight),f=Math.max(f,u.sub2);var S=u.defaultRuleThickness,C=4*S;if(c-l.depth-(s.height-f)<C){f=C-(c-l.depth)+s.height;var A=.8*u.xHeight-(c-l.depth);A>0&&(c+=A,f-=A)}var _=[{type:"elem",elem:s,shift:f,marginRight:g,marginLeft:m},{type:"elem",elem:l,shift:-c,marginRight:g}];v=Ut({positionType:"individualShift",children:_})}else if(s){f=Math.max(f,u.sub1,s.height-.8*u.xHeight);var E=[{type:"elem",elem:s,marginLeft:m,marginRight:g}];v=Ut({positionType:"shift",positionData:f,children:E})}else if(l)c=Math.max(c,p,l.depth+.25*u.xHeight),v=Ut({positionType:"shift",positionData:-c,children:[{type:"elem",elem:l,marginRight:g}]});else throw new Error("supsub must have either sup or sub.");var M=Bc(o,"right")||"mord";return $e([M],[o,$e(["msupsub"],[v])],t)},mathmlBuilder(e,t){var r=!1,n,a;e.base&&e.base.type==="horizBrace"&&(a=!!e.sup,a===e.base.isOver&&(r=!0,n=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var i=[Yt(e.base,t)];e.sub&&i.push(Yt(e.sub,t)),e.sup&&i.push(Yt(e.sup,t));var o;if(r)o=n?"mover":"munder";else if(e.sub)if(e.sup){var u=e.base;u&&u.type==="op"&&u.limits&&t.style===Ct.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(t.style===Ct.DISPLAY||u.limits)?o="munderover":o="msubsup"}else{var s=e.base;s&&s.type==="op"&&s.limits&&(t.style===Ct.DISPLAY||s.alwaysHandleSupSub)||s&&s.type==="operatorname"&&s.alwaysHandleSupSub&&(s.limits||t.style===Ct.DISPLAY)?o="munder":o="msub"}else{var l=e.base;l&&l.type==="op"&&l.limits&&(t.style===Ct.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||t.style===Ct.DISPLAY)?o="mover":o="msup"}return new je(o,i)}}),Ni({type:"atom",htmlBuilder(e,t){return Fc(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var r=new je("mo",[Fn(e.text,e.mode)]);if(e.family==="bin"){var n=Uc(e,t);n==="bold-italic"&&r.setAttribute("mathvariant",n)}else e.family==="punct"?r.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&r.setAttribute("stretchy","false");return r}});var Ov={mi:"italic",mn:"normal",mtext:"normal"};Ni({type:"mathord",htmlBuilder(e,t){return u0(e,t,"mathord")},mathmlBuilder(e,t){var r=new je("mi",[Fn(e.text,e.mode,t)]),n=Uc(e,t)||"italic";return n!==Ov[r.type]&&r.setAttribute("mathvariant",n),r}}),Ni({type:"textord",htmlBuilder(e,t){return u0(e,t,"textord")},mathmlBuilder(e,t){var r=Fn(e.text,e.mode,t),n=Uc(e,t)||"normal",a;return e.mode==="text"?a=new je("mtext",[r]):/[0-9]/.test(e.text)?a=new je("mn",[r]):e.text==="\\prime"?a=new je("mo",[r]):a=new je("mi",[r]),n!==Ov[a.type]&&a.setAttribute("mathvariant",n),a}});var nf={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},af={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Ni({type:"spacing",htmlBuilder(e,t){if(af.hasOwnProperty(e.text)){var r=af[e.text].className||"";if(e.mode==="text"){var n=u0(e,t,"textord");return n.classes.push(r),n}else return $e(["mspace",r],[Fc(e.text,e.mode,t)],t)}else{if(nf.hasOwnProperty(e.text))return $e(["mspace",nf[e.text]],[],t);throw new He('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,t){var r;if(af.hasOwnProperty(e.text))r=new je("mtext",[new xr(" ")]);else{if(nf.hasOwnProperty(e.text))return new je("mspace");throw new He('Unknown type of space "'+e.text+'"')}return r}});var Pv=()=>{var e=new je("mtd",[]);return e.setAttribute("width","50%"),e};Ni({type:"tag",mathmlBuilder(e,t){var r=new je("mtable",[new je("mtr",[Pv(),new je("mtd",[di(e.body,t)]),Pv(),new je("mtd",[di(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});var Rv={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Lv={"\\textbf":"textbf","\\textmd":"textmd"},aS={"\\textit":"textit","\\textup":"textup"},Bv=(e,t)=>{var r=e.font;if(r){if(Rv[r])return t.withTextFontFamily(Rv[r]);if(Lv[r])return t.withTextFontWeight(Lv[r]);if(r==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit")}else return t;return t.withTextFontShape(aS[r])};at({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e,a=t[0];return{type:"text",mode:r.mode,body:yr(a),font:n}},htmlBuilder(e,t){var r=Bv(e,t),n=Cr(e.body,r,!0);return $e(["mord","text"],n,r)},mathmlBuilder(e,t){var r=Bv(e,t);return di(e.body,r)}}),at({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"underline",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=Ht(e.body,t),n=ko("underline-line",t),a=t.fontMetrics().defaultRuleThickness,i=Ut({positionType:"top",positionData:r.height,children:[{type:"kern",size:a},{type:"elem",elem:n},{type:"kern",size:3*a},{type:"elem",elem:r}]});return $e(["mord","underline"],[i],t)},mathmlBuilder(e,t){var r=new je("mo",[new xr("‾")]);r.setAttribute("stretchy","true");var n=new je("munder",[Yt(e.body,t),r]);return n.setAttribute("accentunder","true"),n}}),at({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"vcenter",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=Ht(e.body,t),n=t.fontMetrics().axisHeight,a=.5*(r.height-n-(r.depth+n));return Ut({positionType:"shift",positionData:a,children:[{type:"elem",elem:r}]})},mathmlBuilder(e,t){var r=new je("mpadded",[Yt(e.body,t)],["vcenter"]);return new je("mrow",[r])}}),at({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new He("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var r=Nv(e),n=[],a=t.havingStyle(t.style.text()),i=0;i<r.length;i++){var o=r[i];o==="~"&&(o="\\textasciitilde"),n.push(rn(o,"Typewriter-Regular",e.mode,a,["mord","texttt"]))}return $e(["mord","text"].concat(a.sizingClasses(t)),Rp(n),a)},mathmlBuilder(e,t){var r=new xr(Nv(e)),n=new je("mtext",[r]);return n.setAttribute("mathvariant","monospace"),n}});var Nv=e=>e.body.replace(/ /g,e.star?"␣":" "),pi=$p,$v=`[ \r
|
|
277
277
|
]`,iS="\\\\[a-zA-Z@]+",oS="\\\\[^\uD800-\uDFFF]",lS="("+iS+")"+$v+"*",sS=`\\\\(
|
|
278
278
|
|[ \r ]+
|
|
279
279
|
?)[ \r ]*`,of="[̀-ͯ]",uS=new RegExp(of+"+$"),cS="("+$v+"+)|"+(sS+"|")+"([!-\\[\\]-‧-豈-]"+(of+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(of+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+lS)+("|"+oS+")");class Uv{constructor(t,r){this.input=t,this.settings=r,this.tokenRegex=new RegExp(cS,"g"),this.catcodes={"%":14,"~":13}}setCatcode(t,r){this.catcodes[t]=r}lex(){var t=this.input,r=this.tokenRegex.lastIndex;if(r===t.length)return new bn("EOF",new un(this,r,r));var n=this.tokenRegex.exec(t);if(n===null||n.index!==r)throw new He("Unexpected character: '"+t[r]+"'",new bn(t[r],new un(this,r,r+1)));var a=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[a]===14){var i=t.indexOf(`
|
|
280
280
|
`,this.tokenRegex.lastIndex);return i===-1?(this.tokenRegex.lastIndex=t.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=i+1,this.lex()}return new bn(a,new un(this,r,this.tokenRegex.lastIndex))}}class fS{constructor(t,r){t===void 0&&(t={}),r===void 0&&(r={}),this.current=r,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new He("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var t=this.undefStack.pop();for(var r in t)t.hasOwnProperty(r)&&(t[r]==null?delete this.current[r]:this.current[r]=t[r])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(t){return this.current.hasOwnProperty(t)||this.builtins.hasOwnProperty(t)}get(t){return this.current.hasOwnProperty(t)?this.current[t]:this.builtins[t]}set(t,r,n){if(n===void 0&&(n=!1),n){for(var a=0;a<this.undefStack.length;a++)delete this.undefStack[a][t];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][t]=r)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(t)&&(i[t]=this.current[t])}r==null?delete this.current[t]:this.current[t]=r}}var dS=mv;B("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),B("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),B("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}}),B("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}}),B("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var r=e.future();return t[0].length===1&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),B("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),B("\\TextOrMath",function(e){var t=e.consumeArgs(2);return e.mode==="text"?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var Hv={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};B("\\char",function(e){var t=e.popToken(),r,n=0;if(t.text==="'")r=8,t=e.popToken();else if(t.text==='"')r=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]==="\\")n=t.text.charCodeAt(1);else{if(t.text==="EOF")throw new He("\\char` missing argument");n=t.text.charCodeAt(0)}else r=10;if(r){if(n=Hv[t.text],n==null||n>=r)throw new He("Invalid base-"+r+" digit "+t.text);for(var a;(a=Hv[e.future().text])!=null&&a<r;)n*=r,n+=a,e.popToken()}return"\\@char{"+n+"}"});var lf=(e,t,r,n)=>{var a=e.consumeArg().tokens;if(a.length!==1)throw new He("\\newcommand's first argument must be a macro name");var i=a[0].text,o=e.isDefined(i);if(o&&!t)throw new He("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!o&&!r)throw new He("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var l=0;if(a=e.consumeArg().tokens,a.length===1&&a[0].text==="["){for(var s="",u=e.expandNextToken();u.text!=="]"&&u.text!=="EOF";)s+=u.text,u=e.expandNextToken();if(!s.match(/^\s*[0-9]+\s*$/))throw new He("Invalid number of arguments: "+s);l=parseInt(s),a=e.consumeArg().tokens}return o&&n||e.macros.set(i,{tokens:a,numArgs:l}),""};B("\\newcommand",e=>lf(e,!1,!0,!1)),B("\\renewcommand",e=>lf(e,!0,!1,!1)),B("\\providecommand",e=>lf(e,!0,!0,!0)),B("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(r=>r.text).join("")),""}),B("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(r=>r.text).join("")),""}),B("\\show",e=>{var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),pi[r],or.math[r],or.text[r]),""}),B("\\bgroup","{"),B("\\egroup","}"),B("~","\\nobreakspace"),B("\\lq","`"),B("\\rq","'"),B("\\aa","\\r a"),B("\\AA","\\r A"),B("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),B("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),B("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),B("ℬ","\\mathscr{B}"),B("ℰ","\\mathscr{E}"),B("ℱ","\\mathscr{F}"),B("ℋ","\\mathscr{H}"),B("ℐ","\\mathscr{I}"),B("ℒ","\\mathscr{L}"),B("ℳ","\\mathscr{M}"),B("ℛ","\\mathscr{R}"),B("ℭ","\\mathfrak{C}"),B("ℌ","\\mathfrak{H}"),B("ℨ","\\mathfrak{Z}"),B("\\Bbbk","\\Bbb{k}"),B("\\llap","\\mathllap{\\textrm{#1}}"),B("\\rlap","\\mathrlap{\\textrm{#1}}"),B("\\clap","\\mathclap{\\textrm{#1}}"),B("\\mathstrut","\\vphantom{(}"),B("\\underbar","\\underline{\\text{#1}}"),B("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}'),B("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),B("\\ne","\\neq"),B("≠","\\neq"),B("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),B("∉","\\notin"),B("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),B("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),B("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),B("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),B("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),B("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),B("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),B("⟂","\\perp"),B("‼","\\mathclose{!\\mkern-0.8mu!}"),B("∌","\\notni"),B("⌜","\\ulcorner"),B("⌝","\\urcorner"),B("⌞","\\llcorner"),B("⌟","\\lrcorner"),B("©","\\copyright"),B("®","\\textregistered"),B("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),B("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),B("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),B("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),B("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),B("⋮","\\vdots"),B("\\varGamma","\\mathit{\\Gamma}"),B("\\varDelta","\\mathit{\\Delta}"),B("\\varTheta","\\mathit{\\Theta}"),B("\\varLambda","\\mathit{\\Lambda}"),B("\\varXi","\\mathit{\\Xi}"),B("\\varPi","\\mathit{\\Pi}"),B("\\varSigma","\\mathit{\\Sigma}"),B("\\varUpsilon","\\mathit{\\Upsilon}"),B("\\varPhi","\\mathit{\\Phi}"),B("\\varPsi","\\mathit{\\Psi}"),B("\\varOmega","\\mathit{\\Omega}"),B("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),B("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),B("\\boxed","\\fbox{$\\displaystyle{#1}$}"),B("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),B("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),B("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),B("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),B("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var jv={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},hS=new Set(["bin","rel"]);B("\\dots",function(e){var t="\\dotso",r=e.expandAfterFuture().text;return r in jv?t=jv[r]:(r.slice(0,4)==="\\not"||r in or.math&&hS.has(or.math[r].group))&&(t="\\dotsb"),t});var sf={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};B("\\dotso",function(e){var t=e.future().text;return t in sf?"\\ldots\\,":"\\ldots"}),B("\\dotsc",function(e){var t=e.future().text;return t in sf&&t!==","?"\\ldots\\,":"\\ldots"}),B("\\cdots",function(e){var t=e.future().text;return t in sf?"\\@cdots\\,":"\\@cdots"}),B("\\dotsb","\\cdots"),B("\\dotsm","\\cdots"),B("\\dotsi","\\!\\cdots"),B("\\dotsx","\\ldots\\,"),B("\\DOTSI","\\relax"),B("\\DOTSB","\\relax"),B("\\DOTSX","\\relax"),B("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),B("\\,","\\tmspace+{3mu}{.1667em}"),B("\\thinspace","\\,"),B("\\>","\\mskip{4mu}"),B("\\:","\\tmspace+{4mu}{.2222em}"),B("\\medspace","\\:"),B("\\;","\\tmspace+{5mu}{.2777em}"),B("\\thickspace","\\;"),B("\\!","\\tmspace-{3mu}{.1667em}"),B("\\negthinspace","\\!"),B("\\negmedspace","\\tmspace-{4mu}{.2222em}"),B("\\negthickspace","\\tmspace-{5mu}{.277em}"),B("\\enspace","\\kern.5em "),B("\\enskip","\\hskip.5em\\relax"),B("\\quad","\\hskip1em\\relax"),B("\\qquad","\\hskip2em\\relax"),B("\\tag","\\@ifstar\\tag@literal\\tag@paren"),B("\\tag@paren","\\tag@literal{({#1})}"),B("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new He("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),B("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),B("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),B("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),B("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),B("\\newline","\\\\\\relax"),B("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Gv=Ye(ma["Main-Regular"][84][1]-.7*ma["Main-Regular"][65][1]);B("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+Gv+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}"),B("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+Gv+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}"),B("\\hspace","\\@ifstar\\@hspacer\\@hspace"),B("\\@hspace","\\hskip #1\\relax"),B("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),B("\\ordinarycolon",":"),B("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),B("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),B("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),B("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),B("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),B("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),B("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),B("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),B("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),B("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),B("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),B("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),B("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),B("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),B("∷","\\dblcolon"),B("∹","\\eqcolon"),B("≔","\\coloneqq"),B("≕","\\eqqcolon"),B("⩴","\\Coloneqq"),B("\\ratio","\\vcentcolon"),B("\\coloncolon","\\dblcolon"),B("\\colonequals","\\coloneqq"),B("\\coloncolonequals","\\Coloneqq"),B("\\equalscolon","\\eqqcolon"),B("\\equalscoloncolon","\\Eqqcolon"),B("\\colonminus","\\coloneq"),B("\\coloncolonminus","\\Coloneq"),B("\\minuscolon","\\eqcolon"),B("\\minuscoloncolon","\\Eqcolon"),B("\\coloncolonapprox","\\Colonapprox"),B("\\coloncolonsim","\\Colonsim"),B("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),B("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),B("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),B("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),B("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),B("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),B("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),B("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),B("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),B("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),B("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),B("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),B("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),B("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),B("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),B("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),B("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),B("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),B("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),B("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),B("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),B("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),B("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),B("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),B("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),B("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),B("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),B("\\imath","\\html@mathml{\\@imath}{ı}"),B("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),B("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),B("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),B("⟦","\\llbracket"),B("⟧","\\rrbracket"),B("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),B("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),B("⦃","\\lBrace"),B("⦄","\\rBrace"),B("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),B("⦵","\\minuso"),B("\\darr","\\downarrow"),B("\\dArr","\\Downarrow"),B("\\Darr","\\Downarrow"),B("\\lang","\\langle"),B("\\rang","\\rangle"),B("\\uarr","\\uparrow"),B("\\uArr","\\Uparrow"),B("\\Uarr","\\Uparrow"),B("\\N","\\mathbb{N}"),B("\\R","\\mathbb{R}"),B("\\Z","\\mathbb{Z}"),B("\\alef","\\aleph"),B("\\alefsym","\\aleph"),B("\\Alpha","\\mathrm{A}"),B("\\Beta","\\mathrm{B}"),B("\\bull","\\bullet"),B("\\Chi","\\mathrm{X}"),B("\\clubs","\\clubsuit"),B("\\cnums","\\mathbb{C}"),B("\\Complex","\\mathbb{C}"),B("\\Dagger","\\ddagger"),B("\\diamonds","\\diamondsuit"),B("\\empty","\\emptyset"),B("\\Epsilon","\\mathrm{E}"),B("\\Eta","\\mathrm{H}"),B("\\exist","\\exists"),B("\\harr","\\leftrightarrow"),B("\\hArr","\\Leftrightarrow"),B("\\Harr","\\Leftrightarrow"),B("\\hearts","\\heartsuit"),B("\\image","\\Im"),B("\\infin","\\infty"),B("\\Iota","\\mathrm{I}"),B("\\isin","\\in"),B("\\Kappa","\\mathrm{K}"),B("\\larr","\\leftarrow"),B("\\lArr","\\Leftarrow"),B("\\Larr","\\Leftarrow"),B("\\lrarr","\\leftrightarrow"),B("\\lrArr","\\Leftrightarrow"),B("\\Lrarr","\\Leftrightarrow"),B("\\Mu","\\mathrm{M}"),B("\\natnums","\\mathbb{N}"),B("\\Nu","\\mathrm{N}"),B("\\Omicron","\\mathrm{O}"),B("\\plusmn","\\pm"),B("\\rarr","\\rightarrow"),B("\\rArr","\\Rightarrow"),B("\\Rarr","\\Rightarrow"),B("\\real","\\Re"),B("\\reals","\\mathbb{R}"),B("\\Reals","\\mathbb{R}"),B("\\Rho","\\mathrm{P}"),B("\\sdot","\\cdot"),B("\\sect","\\S"),B("\\spades","\\spadesuit"),B("\\sub","\\subset"),B("\\sube","\\subseteq"),B("\\supe","\\supseteq"),B("\\Tau","\\mathrm{T}"),B("\\thetasym","\\vartheta"),B("\\weierp","\\wp"),B("\\Zeta","\\mathrm{Z}"),B("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),B("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),B("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),B("\\bra","\\mathinner{\\langle{#1}|}"),B("\\ket","\\mathinner{|{#1}\\rangle}"),B("\\braket","\\mathinner{\\langle{#1}\\rangle}"),B("\\Bra","\\left\\langle#1\\right|"),B("\\Ket","\\left|#1\\right\\rangle");var Vv=e=>t=>{var r=t.consumeArg().tokens,n=t.consumeArg().tokens,a=t.consumeArg().tokens,i=t.consumeArg().tokens,o=t.macros.get("|"),l=t.macros.get("\\|");t.macros.beginGroup();var s=f=>d=>{e&&(d.macros.set("|",o),a.length&&d.macros.set("\\|",l));var h=f;if(!f&&a.length){var y=d.future();y.text==="|"&&(d.popToken(),h=!0)}return{tokens:h?a:n,numArgs:0}};t.macros.set("|",s(!1)),a.length&&t.macros.set("\\|",s(!0));var u=t.consumeArg().tokens,c=t.expandTokens([...i,...u,...r]);return t.macros.endGroup(),{tokens:c.reverse(),numArgs:0}};B("\\bra@ket",Vv(!1)),B("\\bra@set",Vv(!0)),B("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),B("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),B("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),B("\\angln","{\\angl n}"),B("\\blue","\\textcolor{##6495ed}{#1}"),B("\\orange","\\textcolor{##ffa500}{#1}"),B("\\pink","\\textcolor{##ff00af}{#1}"),B("\\red","\\textcolor{##df0030}{#1}"),B("\\green","\\textcolor{##28ae7b}{#1}"),B("\\gray","\\textcolor{gray}{#1}"),B("\\purple","\\textcolor{##9d38bd}{#1}"),B("\\blueA","\\textcolor{##ccfaff}{#1}"),B("\\blueB","\\textcolor{##80f6ff}{#1}"),B("\\blueC","\\textcolor{##63d9ea}{#1}"),B("\\blueD","\\textcolor{##11accd}{#1}"),B("\\blueE","\\textcolor{##0c7f99}{#1}"),B("\\tealA","\\textcolor{##94fff5}{#1}"),B("\\tealB","\\textcolor{##26edd5}{#1}"),B("\\tealC","\\textcolor{##01d1c1}{#1}"),B("\\tealD","\\textcolor{##01a995}{#1}"),B("\\tealE","\\textcolor{##208170}{#1}"),B("\\greenA","\\textcolor{##b6ffb0}{#1}"),B("\\greenB","\\textcolor{##8af281}{#1}"),B("\\greenC","\\textcolor{##74cf70}{#1}"),B("\\greenD","\\textcolor{##1fab54}{#1}"),B("\\greenE","\\textcolor{##0d923f}{#1}"),B("\\goldA","\\textcolor{##ffd0a9}{#1}"),B("\\goldB","\\textcolor{##ffbb71}{#1}"),B("\\goldC","\\textcolor{##ff9c39}{#1}"),B("\\goldD","\\textcolor{##e07d10}{#1}"),B("\\goldE","\\textcolor{##a75a05}{#1}"),B("\\redA","\\textcolor{##fca9a9}{#1}"),B("\\redB","\\textcolor{##ff8482}{#1}"),B("\\redC","\\textcolor{##f9685d}{#1}"),B("\\redD","\\textcolor{##e84d39}{#1}"),B("\\redE","\\textcolor{##bc2612}{#1}"),B("\\maroonA","\\textcolor{##ffbde0}{#1}"),B("\\maroonB","\\textcolor{##ff92c6}{#1}"),B("\\maroonC","\\textcolor{##ed5fa6}{#1}"),B("\\maroonD","\\textcolor{##ca337c}{#1}"),B("\\maroonE","\\textcolor{##9e034e}{#1}"),B("\\purpleA","\\textcolor{##ddd7ff}{#1}"),B("\\purpleB","\\textcolor{##c6b9fc}{#1}"),B("\\purpleC","\\textcolor{##aa87ff}{#1}"),B("\\purpleD","\\textcolor{##7854ab}{#1}"),B("\\purpleE","\\textcolor{##543b78}{#1}"),B("\\mintA","\\textcolor{##f5f9e8}{#1}"),B("\\mintB","\\textcolor{##edf2df}{#1}"),B("\\mintC","\\textcolor{##e0e5cc}{#1}"),B("\\grayA","\\textcolor{##f6f7f7}{#1}"),B("\\grayB","\\textcolor{##f0f1f2}{#1}"),B("\\grayC","\\textcolor{##e3e5e6}{#1}"),B("\\grayD","\\textcolor{##d6d8da}{#1}"),B("\\grayE","\\textcolor{##babec2}{#1}"),B("\\grayF","\\textcolor{##888d93}{#1}"),B("\\grayG","\\textcolor{##626569}{#1}"),B("\\grayH","\\textcolor{##3b3e40}{#1}"),B("\\grayI","\\textcolor{##21242c}{#1}"),B("\\kaBlue","\\textcolor{##314453}{#1}"),B("\\kaGreen","\\textcolor{##71B307}{#1}");var qv={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class pS{constructor(t,r,n){this.settings=r,this.expansionCount=0,this.feed(t),this.macros=new fS(dS,r.macros),this.mode=n,this.stack=[]}feed(t){this.lexer=new Uv(t,this.settings)}switchMode(t){this.mode=t}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){var r,n,a;if(t){if(this.consumeSpaces(),this.future().text!=="[")return null;r=this.popToken(),{tokens:a,end:n}=this.consumeArg(["]"])}else({tokens:a,start:r,end:n}=this.consumeArg());return this.pushToken(new bn("EOF",n.loc)),this.pushTokens(a),new bn("",un.range(r,n))}consumeSpaces(){for(;;){var t=this.future();if(t.text===" ")this.stack.pop();else break}}consumeArg(t){var r=[],n=t&&t.length>0;n||this.consumeSpaces();var a=this.future(),i,o=0,l=0;do{if(i=this.popToken(),r.push(i),i.text==="{")++o;else if(i.text==="}"){if(--o,o===-1)throw new He("Extra }",i)}else if(i.text==="EOF")throw new He("Unexpected end of input in a macro argument, expected '"+(t&&n?t[l]:"}")+"'",i);if(t&&n)if((o===0||o===1&&t[l]==="{")&&i.text===t[l]){if(++l,l===t.length){r.splice(-l,l);break}}else l=0}while(o!==0||n);return a.text==="{"&&r[r.length-1].text==="}"&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:a,end:i}}consumeArgs(t,r){if(r){if(r.length!==t+1)throw new He("The length of delimiters doesn't match the number of args!");for(var n=r[0],a=0;a<n.length;a++){var i=this.popToken();if(n[a]!==i.text)throw new He("Use of the macro doesn't match its definition",i)}}for(var o=[],l=0;l<t;l++)o.push(this.consumeArg(r&&r[l+1]).tokens);return o}countExpansion(t){if(this.expansionCount+=t,this.expansionCount>this.settings.maxExpand)throw new He("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var r=this.popToken(),n=r.text,a=r.noexpand?null:this._getExpansion(n);if(a==null||t&&a.unexpandable){if(t&&a==null&&n[0]==="\\"&&!this.isDefined(n))throw new He("Undefined control sequence: "+n);return this.pushToken(r),!1}this.countExpansion(1);var i=a.tokens,o=this.consumeArgs(a.numArgs,a.delimiters);if(a.numArgs){i=i.slice();for(var l=i.length-1;l>=0;--l){var s=i[l];if(s.text==="#"){if(l===0)throw new He("Incomplete placeholder at end of macro body",s);if(s=i[--l],s.text==="#")i.splice(l+1,1);else if(/^[1-9]$/.test(s.text))i.splice(l,2,...o[+s.text-1]);else throw new He("Not a valid argument number",s)}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var t=this.stack.pop();return t.treatAsRelax&&(t.text="\\relax"),t}}expandMacro(t){return this.macros.has(t)?this.expandTokens([new bn(t)]):void 0}expandTokens(t){var r=[],n=this.stack.length;for(this.pushTokens(t);this.stack.length>n;)if(this.expandOnce(!0)===!1){var a=this.stack.pop();a.treatAsRelax&&(a.noexpand=!1,a.treatAsRelax=!1),r.push(a)}return this.countExpansion(r.length),r}expandMacroAsText(t){var r=this.expandMacro(t);return r&&r.map(n=>n.text).join("")}_getExpansion(t){var r=this.macros.get(t);if(r==null)return r;if(t.length===1){var n=this.lexer.catcodes[t];if(n!=null&&n!==13)return}var a=typeof r=="function"?r(this):r;if(typeof a=="string"){var i=0;if(a.includes("#"))for(var o=a.replace(/##/g,"");o.includes("#"+(i+1));)++i;for(var l=new Uv(a,this.settings),s=[],u=l.lex();u.text!=="EOF";)s.push(u),u=l.lex();s.reverse();var c={tokens:s,numArgs:i};return c}return a}isDefined(t){return this.macros.has(t)||pi.hasOwnProperty(t)||or.math.hasOwnProperty(t)||or.text.hasOwnProperty(t)||qv.hasOwnProperty(t)}isExpandable(t){var r=this.macros.get(t);return r!=null?typeof r=="string"||typeof r=="function"||!r.unexpandable:pi.hasOwnProperty(t)&&!pi[t].primitive}}var Wv=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,A0=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),uf={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},Kv={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class E0{constructor(t,r){this.mode="math",this.gullet=new pS(t,r,this.mode),this.settings=r,this.leftrightDepth=0,this.nextToken=null}expect(t,r){if(r===void 0&&(r=!0),this.fetch().text!==t)throw new He("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());r&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}}subparse(t){var r=this.nextToken;this.consume(),this.gullet.pushToken(new bn("}")),this.gullet.pushTokens(t);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=r,n}parseExpression(t,r){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var a=this.fetch();if(E0.endOfExpression.has(a.text)||r&&a.text===r||t&&pi[a.text]&&pi[a.text].infix)break;var i=this.parseAtom(r);if(i){if(i.type==="internal")continue}else break;n.push(i)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(t){for(var r=-1,n,a=0;a<t.length;a++){var i=t[a];if(i.type==="infix"){if(r!==-1)throw new He("only one infix operator per group",i.token);r=a,n=i.replaceWith}}if(r!==-1&&n){var o,l,s=t.slice(0,r),u=t.slice(r+1);s.length===1&&s[0].type==="ordgroup"?o=s[0]:o={type:"ordgroup",mode:this.mode,body:s},u.length===1&&u[0].type==="ordgroup"?l=u[0]:l={type:"ordgroup",mode:this.mode,body:u};var c;return n==="\\\\abovefrac"?c=this.callFunction(n,[o,t[r],l],[]):c=this.callFunction(n,[o,l],[]),[c]}else return t}handleSupSubscript(t){var r=this.fetch(),n=r.text;this.consume(),this.consumeSpaces();var a;do{var i;a=this.parseGroup(t)}while(((i=a)==null?void 0:i.type)==="internal");if(!a)throw new He("Expected group after '"+n+"'",r);return a}formatUnsupportedCmd(t){for(var r=[],n=0;n<t.length;n++)r.push({type:"textord",mode:"text",text:t[n]});var a={type:"text",mode:this.mode,body:r},i={type:"color",mode:this.mode,color:this.settings.errorColor,body:[a]};return i}parseAtom(t){var r=this.parseGroup("atom",t);if((r==null?void 0:r.type)==="internal"||this.mode==="text")return r;for(var n,a;;){this.consumeSpaces();var i=this.fetch();if(i.text==="\\limits"||i.text==="\\nolimits"){if(r&&r.type==="op"){var o=i.text==="\\limits";r.limits=o,r.alwaysHandleSupSub=!0}else if(r&&r.type==="operatorname")r.alwaysHandleSupSub&&(r.limits=i.text==="\\limits");else throw new He("Limit controls must follow a math operator",i);this.consume()}else if(i.text==="^"){if(n)throw new He("Double superscript",i);n=this.handleSupSubscript("superscript")}else if(i.text==="_"){if(a)throw new He("Double subscript",i);a=this.handleSupSubscript("subscript")}else if(i.text==="'"){if(n)throw new He("Double superscript",i);var l={type:"textord",mode:this.mode,text:"\\prime"},s=[l];for(this.consume();this.fetch().text==="'";)s.push(l),this.consume();this.fetch().text==="^"&&s.push(this.handleSupSubscript("superscript")),n={type:"ordgroup",mode:this.mode,body:s}}else if(A0[i.text]){var u=Wv.test(i.text),c=[];for(c.push(new bn(A0[i.text])),this.consume();;){var f=this.fetch().text;if(!A0[f]||Wv.test(f)!==u)break;c.unshift(new bn(A0[f])),this.consume()}var d=this.subparse(c);u?a={type:"ordgroup",mode:"math",body:d}:n={type:"ordgroup",mode:"math",body:d}}else break}return n||a?{type:"supsub",mode:this.mode,base:r,sup:n,sub:a}:r}parseFunction(t,r){var n=this.fetch(),a=n.text,i=pi[a];if(!i)return null;if(this.consume(),r&&r!=="atom"&&!i.allowedInArgument)throw new He("Got function '"+a+"' with no arguments"+(r?" as "+r:""),n);if(this.mode==="text"&&!i.allowedInText)throw new He("Can't use function '"+a+"' in text mode",n);if(this.mode==="math"&&i.allowedInMath===!1)throw new He("Can't use function '"+a+"' in math mode",n);var{args:o,optArgs:l}=this.parseArguments(a,i);return this.callFunction(a,o,l,n,t)}callFunction(t,r,n,a,i){var o={funcName:t,parser:this,token:a,breakOnTokenText:i},l=pi[t];if(l&&l.handler)return l.handler(o,r,n);throw new He("No function handler for "+t)}parseArguments(t,r){var n=r.numArgs+r.numOptionalArgs;if(n===0)return{args:[],optArgs:[]};for(var a=[],i=[],o=0;o<n;o++){var l=r.argTypes&&r.argTypes[o],s=o<r.numOptionalArgs;("primitive"in r&&r.primitive&&l==null||r.type==="sqrt"&&o===1&&i[0]==null)&&(l="primitive");var u=this.parseGroupOfType("argument to '"+t+"'",l,s);if(s)i.push(u);else if(u!=null)a.push(u);else throw new He("Null argument, please report this as a bug")}return{args:a,optArgs:i}}parseGroupOfType(t,r,n){switch(r){case"color":return this.parseColorGroup(n);case"size":return this.parseSizeGroup(n);case"url":return this.parseUrlGroup(n);case"math":case"text":return this.parseArgumentGroup(n,r);case"hbox":{var a=this.parseArgumentGroup(n,"text");return a!=null?{type:"styling",mode:a.mode,body:[a],style:"text"}:null}case"raw":{var i=this.parseStringGroup("raw",n);return i!=null?{type:"raw",mode:"text",string:i.text}:null}case"primitive":{if(n)throw new He("A primitive argument cannot be optional");var o=this.parseGroup(t);if(o==null)throw new He("Expected group as "+t,this.fetch());return o}case"original":case null:case void 0:return this.parseArgumentGroup(n);default:throw new He("Unknown group type as "+t,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(t,r){var n=this.gullet.scanArgument(r);if(n==null)return null;for(var a="",i;(i=this.fetch()).text!=="EOF";)a+=i.text,this.consume();return this.consume(),n.text=a,n}parseRegexGroup(t,r){for(var n=this.fetch(),a=n,i="",o;(o=this.fetch()).text!=="EOF"&&t.test(i+o.text);)a=o,i+=a.text,this.consume();if(i==="")throw new He("Invalid "+r+": '"+n.text+"'",n);return n.range(a,i)}parseColorGroup(t){var r=this.parseStringGroup("color",t);if(r==null)return null;var n=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(r.text);if(!n)throw new He("Invalid color: '"+r.text+"'",r);var a=n[0];return/^[0-9a-f]{6}$/i.test(a)&&(a="#"+a),{type:"color-token",mode:this.mode,color:a}}parseSizeGroup(t){var r,n=!1;if(this.gullet.consumeSpaces(),!t&&this.gullet.future().text!=="{"?r=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):r=this.parseStringGroup("size",t),!r)return null;!t&&r.text.length===0&&(r.text="0pt",n=!0);var a=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(r.text);if(!a)throw new He("Invalid size: '"+r.text+"'",r);var i={number:+(a[1]+a[2]),unit:a[3]};if(!Sp(i))throw new He("Invalid unit: '"+i.unit+"'",r);return{type:"size",mode:this.mode,value:i,isBlank:n}}parseUrlGroup(t){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var r=this.parseStringGroup("url",t);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),r==null)return null;var n=r.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:n}}parseArgumentGroup(t,r){var n=this.gullet.scanArgument(t);if(n==null)return null;var a=this.mode;r&&this.switchMode(r),this.gullet.beginGroup();var i=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var o={type:"ordgroup",mode:this.mode,loc:n.loc,body:i};return r&&this.switchMode(a),o}parseGroup(t,r){var n=this.fetch(),a=n.text,i;if(a==="{"||a==="\\begingroup"){this.consume();var o=a==="{"?"}":"\\endgroup";this.gullet.beginGroup();var l=this.parseExpression(!1,o),s=this.fetch();this.expect(o),this.gullet.endGroup(),i={type:"ordgroup",mode:this.mode,loc:un.range(n,s),body:l,semisimple:a==="\\begingroup"||void 0}}else if(i=this.parseFunction(r,t)||this.parseSymbol(),i==null&&a[0]==="\\"&&!qv.hasOwnProperty(a)){if(this.settings.throwOnError)throw new He("Undefined control sequence: "+a,n);i=this.formatUnsupportedCmd(a),this.consume()}return i}formLigatures(t){for(var r=t.length-1,n=0;n<r;++n){var a=t[n];if(a.type==="textord"){var i=a.text,o=t[n+1];if(!(!o||o.type!=="textord")){if(i==="-"&&o.text==="-"){var l=t[n+2];n+1<r&&l&&l.type==="textord"&&l.text==="-"?(t.splice(n,3,{type:"textord",mode:"text",loc:un.range(a,l),text:"---"}),r-=2):(t.splice(n,2,{type:"textord",mode:"text",loc:un.range(a,o),text:"--"}),r-=1)}(i==="'"||i==="`")&&o.text===i&&(t.splice(n,2,{type:"textord",mode:"text",loc:un.range(a,o),text:i+i}),r-=1)}}}}parseSymbol(){var t=this.fetch(),r=t.text;if(/^\\verb[^a-zA-Z]/.test(r)){this.consume();var n=r.slice(5),a=n.charAt(0)==="*";if(a&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new He(`\\verb assertion failed --
|
|
281
|
-
please report what input caused this bug`);return n=n.slice(1,-1),{type:"verb",mode:"text",body:n,star:a}}Kv.hasOwnProperty(r[0])&&!or[this.mode][r[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+r[0]+'" used in math mode',t),r=Kv[r[0]]+r.slice(1));var i=uS.exec(r);i&&(r=r.substring(0,i.index),r==="i"?r="ı":r==="j"&&(r="ȷ"));var o;if(or[this.mode][r]){this.settings.strict&&this.mode==="math"&&Ic.includes(r)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',t);var l=or[this.mode][r].group,s=un.range(t),u;if(ck.hasOwnProperty(l)){var c=l;u={type:"atom",mode:this.mode,family:c,loc:s,text:r}}else u={type:l,mode:this.mode,loc:s,text:r};o=u}else if(r.charCodeAt(0)>=128)this.settings.strict&&(wp(r.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'"'+(" ("+r.charCodeAt(0)+")"),t)),o={type:"textord",mode:"text",loc:un.range(t),text:r};else return null;if(this.consume(),i)for(var f=0;f<i[0].length;f++){var d=i[0][f];if(!uf[d])throw new He("Unknown accent ' "+d+"'",t);var h=uf[d][this.mode]||uf[d].text;if(!h)throw new He("Accent "+d+" unsupported in "+this.mode+" mode",t);o={type:"accent",mode:this.mode,loc:un.range(t),label:h,isStretchy:!1,isShifty:!0,base:o}}return o}}E0.endOfExpression=new Set(["}","\\endgroup","\\end","\\right","&"]);var cf=function(t,r){if(!(typeof t=="string"||t instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new E0(t,r);delete n.gullet.macros.current["\\df@tag"];var a=n.parse();if(delete n.gullet.macros.current["\\current@color"],delete n.gullet.macros.current["\\color"],n.gullet.macros.get("\\df@tag")){if(!r.displayMode)throw new He("\\tag works only in display equations");a=[{type:"tag",mode:"text",body:a,tag:n.subparse([new bn("\\df@tag")])}]}return a},ff=function(t,r,n){r.textContent="";var a=T0(t,n).toNode();r.appendChild(a)};typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),ff=function(){throw new He("KaTeX doesn't work in quirks mode.")});var Xv=function(t,r){var n=T0(t,r).toMarkup();return n},Yv=function(t,r){var n=new _c(r);return cf(t,n)},Zv=function(t,r,n){if(n.throwOnError||!(t instanceof He))throw t;var a=$e(["katex-error"],[new vn(r)]);return a.setAttribute("title",t.toString()),a.setAttribute("style","color:"+n.errorColor),a},T0=function(t,r){var n=new _c(r);try{var a=cf(t,n);return Ak(a,t,n)}catch(i){return Zv(i,t,n)}},Jv=function(t,r){var n=new _c(r);try{var a=cf(t,n);return Ek(a,t,n)}catch(i){return Zv(i,t,n)}},Qv="0.16.45",em={Span:_o,Anchor:r0,SymbolNode:vn,SvgNode:Na,PathNode:ui,LineNode:Cc},vS={version:Qv,render:ff,renderToString:Xv,ParseError:He,SETTINGS_SCHEMA:Qs,__parse:Yv,__renderToDomTree:T0,__renderToHTMLTree:Jv,__setFontMetrics:Mp,__defineSymbol:w,__defineFunction:at,__defineMacro:B,__domTree:em};const mS=Object.freeze(Object.defineProperty({__proto__:null,ParseError:He,SETTINGS_SCHEMA:Qs,__defineFunction:at,__defineMacro:B,__defineSymbol:w,__domTree:em,__parse:Yv,__renderToDomTree:T0,__renderToHTMLTree:Jv,__setFontMetrics:Mp,default:vS,get render(){return ff},renderToString:Xv,version:Qv},Symbol.toStringTag,{value:"Module"}));var gS=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function tm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function bS(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var rm={exports:{}},df={},nm;function vi(){return nm||(nm=1,function(e){var t=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function r(i,o){return Object.prototype.hasOwnProperty.call(i,o)}e.assign=function(i){for(var o=Array.prototype.slice.call(arguments,1);o.length;){var l=o.shift();if(l){if(typeof l!="object")throw new TypeError(l+"must be non-object");for(var s in l)r(l,s)&&(i[s]=l[s])}}return i},e.shrinkBuf=function(i,o){return i.length===o?i:i.subarray?i.subarray(0,o):(i.length=o,i)};var n={arraySet:function(i,o,l,s,u){if(o.subarray&&i.subarray){i.set(o.subarray(l,l+s),u);return}for(var c=0;c<s;c++)i[u+c]=o[l+c]},flattenChunks:function(i){var o,l,s,u,c,f;for(s=0,o=0,l=i.length;o<l;o++)s+=i[o].length;for(f=new Uint8Array(s),u=0,o=0,l=i.length;o<l;o++)c=i[o],f.set(c,u),u+=c.length;return f}},a={arraySet:function(i,o,l,s,u){for(var c=0;c<s;c++)i[u+c]=o[l+c]},flattenChunks:function(i){return[].concat.apply([],i)}};e.setTyped=function(i){i?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,n)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,a))},e.setTyped(t)}(df)),df}var Ao={},Wn={},$i={},am;function yS(){if(am)return $i;am=1;var e=vi(),t=4,r=0,n=1,a=2;function i(D){for(var ue=D.length;--ue>=0;)D[ue]=0}var o=0,l=1,s=2,u=3,c=258,f=29,d=256,h=d+1+f,y=30,p=19,x=2*h+1,g=15,m=16,b=7,v=256,S=16,C=17,A=18,_=[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],E=[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],M=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],N=512,R=new Array((h+2)*2);i(R);var $=new Array(y*2);i($);var q=new Array(N);i(q);var W=new Array(c-u+1);i(W);var Z=new Array(f);i(Z);var te=new Array(y);i(te);function ne(D,ue,ke,ze,re){this.static_tree=D,this.extra_bits=ue,this.extra_base=ke,this.elems=ze,this.max_length=re,this.has_stree=D&&D.length}var _e,pe,we;function ve(D,ue){this.dyn_tree=D,this.max_code=0,this.stat_desc=ue}function Te(D){return D<256?q[D]:q[256+(D>>>7)]}function Se(D,ue){D.pending_buf[D.pending++]=ue&255,D.pending_buf[D.pending++]=ue>>>8&255}function Ie(D,ue,ke){D.bi_valid>m-ke?(D.bi_buf|=ue<<D.bi_valid&65535,Se(D,D.bi_buf),D.bi_buf=ue>>m-D.bi_valid,D.bi_valid+=ke-m):(D.bi_buf|=ue<<D.bi_valid&65535,D.bi_valid+=ke)}function Le(D,ue,ke){Ie(D,ke[ue*2],ke[ue*2+1])}function Ae(D,ue){var ke=0;do ke|=D&1,D>>>=1,ke<<=1;while(--ue>0);return ke>>>1}function Be(D){D.bi_valid===16?(Se(D,D.bi_buf),D.bi_buf=0,D.bi_valid=0):D.bi_valid>=8&&(D.pending_buf[D.pending++]=D.bi_buf&255,D.bi_buf>>=8,D.bi_valid-=8)}function be(D,ue){var ke=ue.dyn_tree,ze=ue.max_code,re=ue.stat_desc.static_tree,me=ue.stat_desc.has_stree,O=ue.stat_desc.extra_bits,Fe=ue.stat_desc.extra_base,mt=ue.stat_desc.max_length,k,K,H,I,ee,X,Xe=0;for(I=0;I<=g;I++)D.bl_count[I]=0;for(ke[D.heap[D.heap_max]*2+1]=0,k=D.heap_max+1;k<x;k++)K=D.heap[k],I=ke[ke[K*2+1]*2+1]+1,I>mt&&(I=mt,Xe++),ke[K*2+1]=I,!(K>ze)&&(D.bl_count[I]++,ee=0,K>=Fe&&(ee=O[K-Fe]),X=ke[K*2],D.opt_len+=X*(I+ee),me&&(D.static_len+=X*(re[K*2+1]+ee)));if(Xe!==0){do{for(I=mt-1;D.bl_count[I]===0;)I--;D.bl_count[I]--,D.bl_count[I+1]+=2,D.bl_count[mt]--,Xe-=2}while(Xe>0);for(I=mt;I!==0;I--)for(K=D.bl_count[I];K!==0;)H=D.heap[--k],!(H>ze)&&(ke[H*2+1]!==I&&(D.opt_len+=(I-ke[H*2+1])*ke[H*2],ke[H*2+1]=I),K--)}}function ye(D,ue,ke){var ze=new Array(g+1),re=0,me,O;for(me=1;me<=g;me++)ze[me]=re=re+ke[me-1]<<1;for(O=0;O<=ue;O++){var Fe=D[O*2+1];Fe!==0&&(D[O*2]=Ae(ze[Fe]++,Fe))}}function P(){var D,ue,ke,ze,re,me=new Array(g+1);for(ke=0,ze=0;ze<f-1;ze++)for(Z[ze]=ke,D=0;D<1<<_[ze];D++)W[ke++]=ze;for(W[ke-1]=ze,re=0,ze=0;ze<16;ze++)for(te[ze]=re,D=0;D<1<<E[ze];D++)q[re++]=ze;for(re>>=7;ze<y;ze++)for(te[ze]=re<<7,D=0;D<1<<E[ze]-7;D++)q[256+re++]=ze;for(ue=0;ue<=g;ue++)me[ue]=0;for(D=0;D<=143;)R[D*2+1]=8,D++,me[8]++;for(;D<=255;)R[D*2+1]=9,D++,me[9]++;for(;D<=279;)R[D*2+1]=7,D++,me[7]++;for(;D<=287;)R[D*2+1]=8,D++,me[8]++;for(ye(R,h+1,me),D=0;D<y;D++)$[D*2+1]=5,$[D*2]=Ae(D,5);_e=new ne(R,_,d+1,h,g),pe=new ne($,E,0,y,g),we=new ne(new Array(0),M,0,p,b)}function V(D){var ue;for(ue=0;ue<h;ue++)D.dyn_ltree[ue*2]=0;for(ue=0;ue<y;ue++)D.dyn_dtree[ue*2]=0;for(ue=0;ue<p;ue++)D.bl_tree[ue*2]=0;D.dyn_ltree[v*2]=1,D.opt_len=D.static_len=0,D.last_lit=D.matches=0}function fe(D){D.bi_valid>8?Se(D,D.bi_buf):D.bi_valid>0&&(D.pending_buf[D.pending++]=D.bi_buf),D.bi_buf=0,D.bi_valid=0}function de(D,ue,ke,ze){fe(D),Se(D,ke),Se(D,~ke),e.arraySet(D.pending_buf,D.window,ue,ke,D.pending),D.pending+=ke}function ie(D,ue,ke,ze){var re=ue*2,me=ke*2;return D[re]<D[me]||D[re]===D[me]&&ze[ue]<=ze[ke]}function oe(D,ue,ke){for(var ze=D.heap[ke],re=ke<<1;re<=D.heap_len&&(re<D.heap_len&&ie(ue,D.heap[re+1],D.heap[re],D.depth)&&re++,!ie(ue,ze,D.heap[re],D.depth));)D.heap[ke]=D.heap[re],ke=re,re<<=1;D.heap[ke]=ze}function se(D,ue,ke){var ze,re,me=0,O,Fe;if(D.last_lit!==0)do ze=D.pending_buf[D.d_buf+me*2]<<8|D.pending_buf[D.d_buf+me*2+1],re=D.pending_buf[D.l_buf+me],me++,ze===0?Le(D,re,ue):(O=W[re],Le(D,O+d+1,ue),Fe=_[O],Fe!==0&&(re-=Z[O],Ie(D,re,Fe)),ze--,O=Te(ze),Le(D,O,ke),Fe=E[O],Fe!==0&&(ze-=te[O],Ie(D,ze,Fe)));while(me<D.last_lit);Le(D,v,ue)}function ge(D,ue){var ke=ue.dyn_tree,ze=ue.stat_desc.static_tree,re=ue.stat_desc.has_stree,me=ue.stat_desc.elems,O,Fe,mt=-1,k;for(D.heap_len=0,D.heap_max=x,O=0;O<me;O++)ke[O*2]!==0?(D.heap[++D.heap_len]=mt=O,D.depth[O]=0):ke[O*2+1]=0;for(;D.heap_len<2;)k=D.heap[++D.heap_len]=mt<2?++mt:0,ke[k*2]=1,D.depth[k]=0,D.opt_len--,re&&(D.static_len-=ze[k*2+1]);for(ue.max_code=mt,O=D.heap_len>>1;O>=1;O--)oe(D,ke,O);k=me;do O=D.heap[1],D.heap[1]=D.heap[D.heap_len--],oe(D,ke,1),Fe=D.heap[1],D.heap[--D.heap_max]=O,D.heap[--D.heap_max]=Fe,ke[k*2]=ke[O*2]+ke[Fe*2],D.depth[k]=(D.depth[O]>=D.depth[Fe]?D.depth[O]:D.depth[Fe])+1,ke[O*2+1]=ke[Fe*2+1]=k,D.heap[1]=k++,oe(D,ke,1);while(D.heap_len>=2);D.heap[--D.heap_max]=D.heap[1],be(D,ue),ye(ke,mt,D.bl_count)}function Ce(D,ue,ke){var ze,re=-1,me,O=ue[0*2+1],Fe=0,mt=7,k=4;for(O===0&&(mt=138,k=3),ue[(ke+1)*2+1]=65535,ze=0;ze<=ke;ze++)me=O,O=ue[(ze+1)*2+1],!(++Fe<mt&&me===O)&&(Fe<k?D.bl_tree[me*2]+=Fe:me!==0?(me!==re&&D.bl_tree[me*2]++,D.bl_tree[S*2]++):Fe<=10?D.bl_tree[C*2]++:D.bl_tree[A*2]++,Fe=0,re=me,O===0?(mt=138,k=3):me===O?(mt=6,k=3):(mt=7,k=4))}function xe(D,ue,ke){var ze,re=-1,me,O=ue[0*2+1],Fe=0,mt=7,k=4;for(O===0&&(mt=138,k=3),ze=0;ze<=ke;ze++)if(me=O,O=ue[(ze+1)*2+1],!(++Fe<mt&&me===O)){if(Fe<k)do Le(D,me,D.bl_tree);while(--Fe!==0);else me!==0?(me!==re&&(Le(D,me,D.bl_tree),Fe--),Le(D,S,D.bl_tree),Ie(D,Fe-3,2)):Fe<=10?(Le(D,C,D.bl_tree),Ie(D,Fe-3,3)):(Le(D,A,D.bl_tree),Ie(D,Fe-11,7));Fe=0,re=me,O===0?(mt=138,k=3):me===O?(mt=6,k=3):(mt=7,k=4)}}function Ve(D){var ue;for(Ce(D,D.dyn_ltree,D.l_desc.max_code),Ce(D,D.dyn_dtree,D.d_desc.max_code),ge(D,D.bl_desc),ue=p-1;ue>=3&&D.bl_tree[z[ue]*2+1]===0;ue--);return D.opt_len+=3*(ue+1)+5+5+4,ue}function Ue(D,ue,ke,ze){var re;for(Ie(D,ue-257,5),Ie(D,ke-1,5),Ie(D,ze-4,4),re=0;re<ze;re++)Ie(D,D.bl_tree[z[re]*2+1],3);xe(D,D.dyn_ltree,ue-1),xe(D,D.dyn_dtree,ke-1)}function Ne(D){var ue=4093624447,ke;for(ke=0;ke<=31;ke++,ue>>>=1)if(ue&1&&D.dyn_ltree[ke*2]!==0)return r;if(D.dyn_ltree[9*2]!==0||D.dyn_ltree[10*2]!==0||D.dyn_ltree[13*2]!==0)return n;for(ke=32;ke<d;ke++)if(D.dyn_ltree[ke*2]!==0)return n;return r}var qe=!1;function it(D){qe||(P(),qe=!0),D.l_desc=new ve(D.dyn_ltree,_e),D.d_desc=new ve(D.dyn_dtree,pe),D.bl_desc=new ve(D.bl_tree,we),D.bi_buf=0,D.bi_valid=0,V(D)}function ct(D,ue,ke,ze){Ie(D,(o<<1)+(ze?1:0),3),de(D,ue,ke)}function ot(D){Ie(D,l<<1,3),Le(D,v,R),Be(D)}function wt(D,ue,ke,ze){var re,me,O=0;D.level>0?(D.strm.data_type===a&&(D.strm.data_type=Ne(D)),ge(D,D.l_desc),ge(D,D.d_desc),O=Ve(D),re=D.opt_len+3+7>>>3,me=D.static_len+3+7>>>3,me<=re&&(re=me)):re=me=ke+5,ke+4<=re&&ue!==-1?ct(D,ue,ke,ze):D.strategy===t||me===re?(Ie(D,(l<<1)+(ze?1:0),3),se(D,R,$)):(Ie(D,(s<<1)+(ze?1:0),3),Ue(D,D.l_desc.max_code+1,D.d_desc.max_code+1,O+1),se(D,D.dyn_ltree,D.dyn_dtree)),V(D),ze&&fe(D)}function Me(D,ue,ke){return D.pending_buf[D.d_buf+D.last_lit*2]=ue>>>8&255,D.pending_buf[D.d_buf+D.last_lit*2+1]=ue&255,D.pending_buf[D.l_buf+D.last_lit]=ke&255,D.last_lit++,ue===0?D.dyn_ltree[ke*2]++:(D.matches++,ue--,D.dyn_ltree[(W[ke]+d+1)*2]++,D.dyn_dtree[Te(ue)*2]++),D.last_lit===D.lit_bufsize-1}return $i._tr_init=it,$i._tr_stored_block=ct,$i._tr_flush_block=wt,$i._tr_tally=Me,$i._tr_align=ot,$i}var hf,im;function om(){if(im)return hf;im=1;function e(t,r,n,a){for(var i=t&65535|0,o=t>>>16&65535|0,l=0;n!==0;){l=n>2e3?2e3:n,n-=l;do i=i+r[a++]|0,o=o+i|0;while(--l);i%=65521,o%=65521}return i|o<<16|0}return hf=e,hf}var pf,lm;function sm(){if(lm)return pf;lm=1;function e(){for(var n,a=[],i=0;i<256;i++){n=i;for(var o=0;o<8;o++)n=n&1?3988292384^n>>>1:n>>>1;a[i]=n}return a}var t=e();function r(n,a,i,o){var l=t,s=o+i;n^=-1;for(var u=o;u<s;u++)n=n>>>8^l[(n^a[u])&255];return n^-1}return pf=r,pf}var vf,um;function mf(){return um||(um=1,vf={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"}),vf}var cm;function xS(){if(cm)return Wn;cm=1;var e=vi(),t=yS(),r=om(),n=sm(),a=mf(),i=0,o=1,l=3,s=4,u=5,c=0,f=1,d=-2,h=-3,y=-5,p=-1,x=1,g=2,m=3,b=4,v=0,S=2,C=8,A=9,_=15,E=8,M=29,z=256,N=z+1+M,R=30,$=19,q=2*N+1,W=15,Z=3,te=258,ne=te+Z+1,_e=32,pe=42,we=69,ve=73,Te=91,Se=103,Ie=113,Le=666,Ae=1,Be=2,be=3,ye=4,P=3;function V(k,K){return k.msg=a[K],K}function fe(k){return(k<<1)-(k>4?9:0)}function de(k){for(var K=k.length;--K>=0;)k[K]=0}function ie(k){var K=k.state,H=K.pending;H>k.avail_out&&(H=k.avail_out),H!==0&&(e.arraySet(k.output,K.pending_buf,K.pending_out,H,k.next_out),k.next_out+=H,K.pending_out+=H,k.total_out+=H,k.avail_out-=H,K.pending-=H,K.pending===0&&(K.pending_out=0))}function oe(k,K){t._tr_flush_block(k,k.block_start>=0?k.block_start:-1,k.strstart-k.block_start,K),k.block_start=k.strstart,ie(k.strm)}function se(k,K){k.pending_buf[k.pending++]=K}function ge(k,K){k.pending_buf[k.pending++]=K>>>8&255,k.pending_buf[k.pending++]=K&255}function Ce(k,K,H,I){var ee=k.avail_in;return ee>I&&(ee=I),ee===0?0:(k.avail_in-=ee,e.arraySet(K,k.input,k.next_in,ee,H),k.state.wrap===1?k.adler=r(k.adler,K,ee,H):k.state.wrap===2&&(k.adler=n(k.adler,K,ee,H)),k.next_in+=ee,k.total_in+=ee,ee)}function xe(k,K){var H=k.max_chain_length,I=k.strstart,ee,X,Xe=k.prev_length,Ke=k.nice_match,tt=k.strstart>k.w_size-ne?k.strstart-(k.w_size-ne):0,At=k.window,fn=k.w_mask,Jt=k.prev,zt=k.strstart+te,mr=At[I+Xe-1],Fr=At[I+Xe];k.prev_length>=k.good_match&&(H>>=2),Ke>k.lookahead&&(Ke=k.lookahead);do if(ee=K,!(At[ee+Xe]!==Fr||At[ee+Xe-1]!==mr||At[ee]!==At[I]||At[++ee]!==At[I+1])){I+=2,ee++;do;while(At[++I]===At[++ee]&&At[++I]===At[++ee]&&At[++I]===At[++ee]&&At[++I]===At[++ee]&&At[++I]===At[++ee]&&At[++I]===At[++ee]&&At[++I]===At[++ee]&&At[++I]===At[++ee]&&I<zt);if(X=te-(zt-I),I=zt-te,X>Xe){if(k.match_start=K,Xe=X,X>=Ke)break;mr=At[I+Xe-1],Fr=At[I+Xe]}}while((K=Jt[K&fn])>tt&&--H!==0);return Xe<=k.lookahead?Xe:k.lookahead}function Ve(k){var K=k.w_size,H,I,ee,X,Xe;do{if(X=k.window_size-k.lookahead-k.strstart,k.strstart>=K+(K-ne)){e.arraySet(k.window,k.window,K,K,0),k.match_start-=K,k.strstart-=K,k.block_start-=K,I=k.hash_size,H=I;do ee=k.head[--H],k.head[H]=ee>=K?ee-K:0;while(--I);I=K,H=I;do ee=k.prev[--H],k.prev[H]=ee>=K?ee-K:0;while(--I);X+=K}if(k.strm.avail_in===0)break;if(I=Ce(k.strm,k.window,k.strstart+k.lookahead,X),k.lookahead+=I,k.lookahead+k.insert>=Z)for(Xe=k.strstart-k.insert,k.ins_h=k.window[Xe],k.ins_h=(k.ins_h<<k.hash_shift^k.window[Xe+1])&k.hash_mask;k.insert&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[Xe+Z-1])&k.hash_mask,k.prev[Xe&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=Xe,Xe++,k.insert--,!(k.lookahead+k.insert<Z)););}while(k.lookahead<ne&&k.strm.avail_in!==0)}function Ue(k,K){var H=65535;for(H>k.pending_buf_size-5&&(H=k.pending_buf_size-5);;){if(k.lookahead<=1){if(Ve(k),k.lookahead===0&&K===i)return Ae;if(k.lookahead===0)break}k.strstart+=k.lookahead,k.lookahead=0;var I=k.block_start+H;if((k.strstart===0||k.strstart>=I)&&(k.lookahead=k.strstart-I,k.strstart=I,oe(k,!1),k.strm.avail_out===0)||k.strstart-k.block_start>=k.w_size-ne&&(oe(k,!1),k.strm.avail_out===0))return Ae}return k.insert=0,K===s?(oe(k,!0),k.strm.avail_out===0?be:ye):(k.strstart>k.block_start&&(oe(k,!1),k.strm.avail_out===0),Ae)}function Ne(k,K){for(var H,I;;){if(k.lookahead<ne){if(Ve(k),k.lookahead<ne&&K===i)return Ae;if(k.lookahead===0)break}if(H=0,k.lookahead>=Z&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+Z-1])&k.hash_mask,H=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),H!==0&&k.strstart-H<=k.w_size-ne&&(k.match_length=xe(k,H)),k.match_length>=Z)if(I=t._tr_tally(k,k.strstart-k.match_start,k.match_length-Z),k.lookahead-=k.match_length,k.match_length<=k.max_lazy_match&&k.lookahead>=Z){k.match_length--;do k.strstart++,k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+Z-1])&k.hash_mask,H=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart;while(--k.match_length!==0);k.strstart++}else k.strstart+=k.match_length,k.match_length=0,k.ins_h=k.window[k.strstart],k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+1])&k.hash_mask;else I=t._tr_tally(k,0,k.window[k.strstart]),k.lookahead--,k.strstart++;if(I&&(oe(k,!1),k.strm.avail_out===0))return Ae}return k.insert=k.strstart<Z-1?k.strstart:Z-1,K===s?(oe(k,!0),k.strm.avail_out===0?be:ye):k.last_lit&&(oe(k,!1),k.strm.avail_out===0)?Ae:Be}function qe(k,K){for(var H,I,ee;;){if(k.lookahead<ne){if(Ve(k),k.lookahead<ne&&K===i)return Ae;if(k.lookahead===0)break}if(H=0,k.lookahead>=Z&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+Z-1])&k.hash_mask,H=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),k.prev_length=k.match_length,k.prev_match=k.match_start,k.match_length=Z-1,H!==0&&k.prev_length<k.max_lazy_match&&k.strstart-H<=k.w_size-ne&&(k.match_length=xe(k,H),k.match_length<=5&&(k.strategy===x||k.match_length===Z&&k.strstart-k.match_start>4096)&&(k.match_length=Z-1)),k.prev_length>=Z&&k.match_length<=k.prev_length){ee=k.strstart+k.lookahead-Z,I=t._tr_tally(k,k.strstart-1-k.prev_match,k.prev_length-Z),k.lookahead-=k.prev_length-1,k.prev_length-=2;do++k.strstart<=ee&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+Z-1])&k.hash_mask,H=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart);while(--k.prev_length!==0);if(k.match_available=0,k.match_length=Z-1,k.strstart++,I&&(oe(k,!1),k.strm.avail_out===0))return Ae}else if(k.match_available){if(I=t._tr_tally(k,0,k.window[k.strstart-1]),I&&oe(k,!1),k.strstart++,k.lookahead--,k.strm.avail_out===0)return Ae}else k.match_available=1,k.strstart++,k.lookahead--}return k.match_available&&(I=t._tr_tally(k,0,k.window[k.strstart-1]),k.match_available=0),k.insert=k.strstart<Z-1?k.strstart:Z-1,K===s?(oe(k,!0),k.strm.avail_out===0?be:ye):k.last_lit&&(oe(k,!1),k.strm.avail_out===0)?Ae:Be}function it(k,K){for(var H,I,ee,X,Xe=k.window;;){if(k.lookahead<=te){if(Ve(k),k.lookahead<=te&&K===i)return Ae;if(k.lookahead===0)break}if(k.match_length=0,k.lookahead>=Z&&k.strstart>0&&(ee=k.strstart-1,I=Xe[ee],I===Xe[++ee]&&I===Xe[++ee]&&I===Xe[++ee])){X=k.strstart+te;do;while(I===Xe[++ee]&&I===Xe[++ee]&&I===Xe[++ee]&&I===Xe[++ee]&&I===Xe[++ee]&&I===Xe[++ee]&&I===Xe[++ee]&&I===Xe[++ee]&&ee<X);k.match_length=te-(X-ee),k.match_length>k.lookahead&&(k.match_length=k.lookahead)}if(k.match_length>=Z?(H=t._tr_tally(k,1,k.match_length-Z),k.lookahead-=k.match_length,k.strstart+=k.match_length,k.match_length=0):(H=t._tr_tally(k,0,k.window[k.strstart]),k.lookahead--,k.strstart++),H&&(oe(k,!1),k.strm.avail_out===0))return Ae}return k.insert=0,K===s?(oe(k,!0),k.strm.avail_out===0?be:ye):k.last_lit&&(oe(k,!1),k.strm.avail_out===0)?Ae:Be}function ct(k,K){for(var H;;){if(k.lookahead===0&&(Ve(k),k.lookahead===0)){if(K===i)return Ae;break}if(k.match_length=0,H=t._tr_tally(k,0,k.window[k.strstart]),k.lookahead--,k.strstart++,H&&(oe(k,!1),k.strm.avail_out===0))return Ae}return k.insert=0,K===s?(oe(k,!0),k.strm.avail_out===0?be:ye):k.last_lit&&(oe(k,!1),k.strm.avail_out===0)?Ae:Be}function ot(k,K,H,I,ee){this.good_length=k,this.max_lazy=K,this.nice_length=H,this.max_chain=I,this.func=ee}var wt;wt=[new ot(0,0,0,0,Ue),new ot(4,4,8,4,Ne),new ot(4,5,16,8,Ne),new ot(4,6,32,32,Ne),new ot(4,4,16,16,qe),new ot(8,16,32,32,qe),new ot(8,16,128,128,qe),new ot(8,32,128,256,qe),new ot(32,128,258,1024,qe),new ot(32,258,258,4096,qe)];function Me(k){k.window_size=2*k.w_size,de(k.head),k.max_lazy_match=wt[k.level].max_lazy,k.good_match=wt[k.level].good_length,k.nice_match=wt[k.level].nice_length,k.max_chain_length=wt[k.level].max_chain,k.strstart=0,k.block_start=0,k.lookahead=0,k.insert=0,k.match_length=k.prev_length=Z-1,k.match_available=0,k.ins_h=0}function D(){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 e.Buf16(q*2),this.dyn_dtree=new e.Buf16((2*R+1)*2),this.bl_tree=new e.Buf16((2*$+1)*2),de(this.dyn_ltree),de(this.dyn_dtree),de(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new e.Buf16(W+1),this.heap=new e.Buf16(2*N+1),de(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new e.Buf16(2*N+1),de(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 ue(k){var K;return!k||!k.state?V(k,d):(k.total_in=k.total_out=0,k.data_type=S,K=k.state,K.pending=0,K.pending_out=0,K.wrap<0&&(K.wrap=-K.wrap),K.status=K.wrap?pe:Ie,k.adler=K.wrap===2?0:1,K.last_flush=i,t._tr_init(K),c)}function ke(k){var K=ue(k);return K===c&&Me(k.state),K}function ze(k,K){return!k||!k.state||k.state.wrap!==2?d:(k.state.gzhead=K,c)}function re(k,K,H,I,ee,X){if(!k)return d;var Xe=1;if(K===p&&(K=6),I<0?(Xe=0,I=-I):I>15&&(Xe=2,I-=16),ee<1||ee>A||H!==C||I<8||I>15||K<0||K>9||X<0||X>b)return V(k,d);I===8&&(I=9);var Ke=new D;return k.state=Ke,Ke.strm=k,Ke.wrap=Xe,Ke.gzhead=null,Ke.w_bits=I,Ke.w_size=1<<Ke.w_bits,Ke.w_mask=Ke.w_size-1,Ke.hash_bits=ee+7,Ke.hash_size=1<<Ke.hash_bits,Ke.hash_mask=Ke.hash_size-1,Ke.hash_shift=~~((Ke.hash_bits+Z-1)/Z),Ke.window=new e.Buf8(Ke.w_size*2),Ke.head=new e.Buf16(Ke.hash_size),Ke.prev=new e.Buf16(Ke.w_size),Ke.lit_bufsize=1<<ee+6,Ke.pending_buf_size=Ke.lit_bufsize*4,Ke.pending_buf=new e.Buf8(Ke.pending_buf_size),Ke.d_buf=1*Ke.lit_bufsize,Ke.l_buf=3*Ke.lit_bufsize,Ke.level=K,Ke.strategy=X,Ke.method=H,ke(k)}function me(k,K){return re(k,K,C,_,E,v)}function O(k,K){var H,I,ee,X;if(!k||!k.state||K>u||K<0)return k?V(k,d):d;if(I=k.state,!k.output||!k.input&&k.avail_in!==0||I.status===Le&&K!==s)return V(k,k.avail_out===0?y:d);if(I.strm=k,H=I.last_flush,I.last_flush=K,I.status===pe)if(I.wrap===2)k.adler=0,se(I,31),se(I,139),se(I,8),I.gzhead?(se(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)),se(I,I.gzhead.time&255),se(I,I.gzhead.time>>8&255),se(I,I.gzhead.time>>16&255),se(I,I.gzhead.time>>24&255),se(I,I.level===9?2:I.strategy>=g||I.level<2?4:0),se(I,I.gzhead.os&255),I.gzhead.extra&&I.gzhead.extra.length&&(se(I,I.gzhead.extra.length&255),se(I,I.gzhead.extra.length>>8&255)),I.gzhead.hcrc&&(k.adler=n(k.adler,I.pending_buf,I.pending,0)),I.gzindex=0,I.status=we):(se(I,0),se(I,0),se(I,0),se(I,0),se(I,0),se(I,I.level===9?2:I.strategy>=g||I.level<2?4:0),se(I,P),I.status=Ie);else{var Xe=C+(I.w_bits-8<<4)<<8,Ke=-1;I.strategy>=g||I.level<2?Ke=0:I.level<6?Ke=1:I.level===6?Ke=2:Ke=3,Xe|=Ke<<6,I.strstart!==0&&(Xe|=_e),Xe+=31-Xe%31,I.status=Ie,ge(I,Xe),I.strstart!==0&&(ge(I,k.adler>>>16),ge(I,k.adler&65535)),k.adler=1}if(I.status===we)if(I.gzhead.extra){for(ee=I.pending;I.gzindex<(I.gzhead.extra.length&65535)&&!(I.pending===I.pending_buf_size&&(I.gzhead.hcrc&&I.pending>ee&&(k.adler=n(k.adler,I.pending_buf,I.pending-ee,ee)),ie(k),ee=I.pending,I.pending===I.pending_buf_size));)se(I,I.gzhead.extra[I.gzindex]&255),I.gzindex++;I.gzhead.hcrc&&I.pending>ee&&(k.adler=n(k.adler,I.pending_buf,I.pending-ee,ee)),I.gzindex===I.gzhead.extra.length&&(I.gzindex=0,I.status=ve)}else I.status=ve;if(I.status===ve)if(I.gzhead.name){ee=I.pending;do{if(I.pending===I.pending_buf_size&&(I.gzhead.hcrc&&I.pending>ee&&(k.adler=n(k.adler,I.pending_buf,I.pending-ee,ee)),ie(k),ee=I.pending,I.pending===I.pending_buf_size)){X=1;break}I.gzindex<I.gzhead.name.length?X=I.gzhead.name.charCodeAt(I.gzindex++)&255:X=0,se(I,X)}while(X!==0);I.gzhead.hcrc&&I.pending>ee&&(k.adler=n(k.adler,I.pending_buf,I.pending-ee,ee)),X===0&&(I.gzindex=0,I.status=Te)}else I.status=Te;if(I.status===Te)if(I.gzhead.comment){ee=I.pending;do{if(I.pending===I.pending_buf_size&&(I.gzhead.hcrc&&I.pending>ee&&(k.adler=n(k.adler,I.pending_buf,I.pending-ee,ee)),ie(k),ee=I.pending,I.pending===I.pending_buf_size)){X=1;break}I.gzindex<I.gzhead.comment.length?X=I.gzhead.comment.charCodeAt(I.gzindex++)&255:X=0,se(I,X)}while(X!==0);I.gzhead.hcrc&&I.pending>ee&&(k.adler=n(k.adler,I.pending_buf,I.pending-ee,ee)),X===0&&(I.status=Se)}else I.status=Se;if(I.status===Se&&(I.gzhead.hcrc?(I.pending+2>I.pending_buf_size&&ie(k),I.pending+2<=I.pending_buf_size&&(se(I,k.adler&255),se(I,k.adler>>8&255),k.adler=0,I.status=Ie)):I.status=Ie),I.pending!==0){if(ie(k),k.avail_out===0)return I.last_flush=-1,c}else if(k.avail_in===0&&fe(K)<=fe(H)&&K!==s)return V(k,y);if(I.status===Le&&k.avail_in!==0)return V(k,y);if(k.avail_in!==0||I.lookahead!==0||K!==i&&I.status!==Le){var tt=I.strategy===g?ct(I,K):I.strategy===m?it(I,K):wt[I.level].func(I,K);if((tt===be||tt===ye)&&(I.status=Le),tt===Ae||tt===be)return k.avail_out===0&&(I.last_flush=-1),c;if(tt===Be&&(K===o?t._tr_align(I):K!==u&&(t._tr_stored_block(I,0,0,!1),K===l&&(de(I.head),I.lookahead===0&&(I.strstart=0,I.block_start=0,I.insert=0))),ie(k),k.avail_out===0))return I.last_flush=-1,c}return K!==s?c:I.wrap<=0?f:(I.wrap===2?(se(I,k.adler&255),se(I,k.adler>>8&255),se(I,k.adler>>16&255),se(I,k.adler>>24&255),se(I,k.total_in&255),se(I,k.total_in>>8&255),se(I,k.total_in>>16&255),se(I,k.total_in>>24&255)):(ge(I,k.adler>>>16),ge(I,k.adler&65535)),ie(k),I.wrap>0&&(I.wrap=-I.wrap),I.pending!==0?c:f)}function Fe(k){var K;return!k||!k.state?d:(K=k.state.status,K!==pe&&K!==we&&K!==ve&&K!==Te&&K!==Se&&K!==Ie&&K!==Le?V(k,d):(k.state=null,K===Ie?V(k,h):c))}function mt(k,K){var H=K.length,I,ee,X,Xe,Ke,tt,At,fn;if(!k||!k.state||(I=k.state,Xe=I.wrap,Xe===2||Xe===1&&I.status!==pe||I.lookahead))return d;for(Xe===1&&(k.adler=r(k.adler,K,H,0)),I.wrap=0,H>=I.w_size&&(Xe===0&&(de(I.head),I.strstart=0,I.block_start=0,I.insert=0),fn=new e.Buf8(I.w_size),e.arraySet(fn,K,H-I.w_size,I.w_size,0),K=fn,H=I.w_size),Ke=k.avail_in,tt=k.next_in,At=k.input,k.avail_in=H,k.next_in=0,k.input=K,Ve(I);I.lookahead>=Z;){ee=I.strstart,X=I.lookahead-(Z-1);do I.ins_h=(I.ins_h<<I.hash_shift^I.window[ee+Z-1])&I.hash_mask,I.prev[ee&I.w_mask]=I.head[I.ins_h],I.head[I.ins_h]=ee,ee++;while(--X);I.strstart=ee,I.lookahead=Z-1,Ve(I)}return I.strstart+=I.lookahead,I.block_start=I.strstart,I.insert=I.lookahead,I.lookahead=0,I.match_length=I.prev_length=Z-1,I.match_available=0,k.next_in=tt,k.input=At,k.avail_in=Ke,I.wrap=Xe,c}return Wn.deflateInit=me,Wn.deflateInit2=re,Wn.deflateReset=ke,Wn.deflateResetKeep=ue,Wn.deflateSetHeader=ze,Wn.deflate=O,Wn.deflateEnd=Fe,Wn.deflateSetDictionary=mt,Wn.deflateInfo="pako deflate (from Nodeca project)",Wn}var Ui={},fm;function dm(){if(fm)return Ui;fm=1;var e=vi(),t=!0,r=!0;try{String.fromCharCode.apply(null,[0])}catch{t=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{r=!1}for(var n=new e.Buf8(256),a=0;a<256;a++)n[a]=a>=252?6:a>=248?5:a>=240?4:a>=224?3:a>=192?2:1;n[254]=n[254]=1,Ui.string2buf=function(o){var l,s,u,c,f,d=o.length,h=0;for(c=0;c<d;c++)s=o.charCodeAt(c),(s&64512)===55296&&c+1<d&&(u=o.charCodeAt(c+1),(u&64512)===56320&&(s=65536+(s-55296<<10)+(u-56320),c++)),h+=s<128?1:s<2048?2:s<65536?3:4;for(l=new e.Buf8(h),f=0,c=0;f<h;c++)s=o.charCodeAt(c),(s&64512)===55296&&c+1<d&&(u=o.charCodeAt(c+1),(u&64512)===56320&&(s=65536+(s-55296<<10)+(u-56320),c++)),s<128?l[f++]=s:s<2048?(l[f++]=192|s>>>6,l[f++]=128|s&63):s<65536?(l[f++]=224|s>>>12,l[f++]=128|s>>>6&63,l[f++]=128|s&63):(l[f++]=240|s>>>18,l[f++]=128|s>>>12&63,l[f++]=128|s>>>6&63,l[f++]=128|s&63);return l};function i(o,l){if(l<65534&&(o.subarray&&r||!o.subarray&&t))return String.fromCharCode.apply(null,e.shrinkBuf(o,l));for(var s="",u=0;u<l;u++)s+=String.fromCharCode(o[u]);return s}return Ui.buf2binstring=function(o){return i(o,o.length)},Ui.binstring2buf=function(o){for(var l=new e.Buf8(o.length),s=0,u=l.length;s<u;s++)l[s]=o.charCodeAt(s);return l},Ui.buf2string=function(o,l){var s,u,c,f,d=l||o.length,h=new Array(d*2);for(u=0,s=0;s<d;){if(c=o[s++],c<128){h[u++]=c;continue}if(f=n[c],f>4){h[u++]=65533,s+=f-1;continue}for(c&=f===2?31:f===3?15:7;f>1&&s<d;)c=c<<6|o[s++]&63,f--;if(f>1){h[u++]=65533;continue}c<65536?h[u++]=c:(c-=65536,h[u++]=55296|c>>10&1023,h[u++]=56320|c&1023)}return i(h,u)},Ui.utf8border=function(o,l){var s;for(l=l||o.length,l>o.length&&(l=o.length),s=l-1;s>=0&&(o[s]&192)===128;)s--;return s<0||s===0?l:s+n[o[s]]>l?s:l},Ui}var gf,hm;function pm(){if(hm)return gf;hm=1;function e(){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}return gf=e,gf}var vm;function _S(){if(vm)return Ao;vm=1;var e=xS(),t=vi(),r=dm(),n=mf(),a=pm(),i=Object.prototype.toString,o=0,l=4,s=0,u=1,c=2,f=-1,d=0,h=8;function y(m){if(!(this instanceof y))return new y(m);this.options=t.assign({level:f,method:h,chunkSize:16384,windowBits:15,memLevel:8,strategy:d,to:""},m||{});var b=this.options;b.raw&&b.windowBits>0?b.windowBits=-b.windowBits:b.gzip&&b.windowBits>0&&b.windowBits<16&&(b.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var v=e.deflateInit2(this.strm,b.level,b.method,b.windowBits,b.memLevel,b.strategy);if(v!==s)throw new Error(n[v]);if(b.header&&e.deflateSetHeader(this.strm,b.header),b.dictionary){var S;if(typeof b.dictionary=="string"?S=r.string2buf(b.dictionary):i.call(b.dictionary)==="[object ArrayBuffer]"?S=new Uint8Array(b.dictionary):S=b.dictionary,v=e.deflateSetDictionary(this.strm,S),v!==s)throw new Error(n[v]);this._dict_set=!0}}y.prototype.push=function(m,b){var v=this.strm,S=this.options.chunkSize,C,A;if(this.ended)return!1;A=b===~~b?b:b===!0?l:o,typeof m=="string"?v.input=r.string2buf(m):i.call(m)==="[object ArrayBuffer]"?v.input=new Uint8Array(m):v.input=m,v.next_in=0,v.avail_in=v.input.length;do{if(v.avail_out===0&&(v.output=new t.Buf8(S),v.next_out=0,v.avail_out=S),C=e.deflate(v,A),C!==u&&C!==s)return this.onEnd(C),this.ended=!0,!1;(v.avail_out===0||v.avail_in===0&&(A===l||A===c))&&(this.options.to==="string"?this.onData(r.buf2binstring(t.shrinkBuf(v.output,v.next_out))):this.onData(t.shrinkBuf(v.output,v.next_out)))}while((v.avail_in>0||v.avail_out===0)&&C!==u);return A===l?(C=e.deflateEnd(this.strm),this.onEnd(C),this.ended=!0,C===s):(A===c&&(this.onEnd(s),v.avail_out=0),!0)},y.prototype.onData=function(m){this.chunks.push(m)},y.prototype.onEnd=function(m){m===s&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=t.flattenChunks(this.chunks)),this.chunks=[],this.err=m,this.msg=this.strm.msg};function p(m,b){var v=new y(b);if(v.push(m,!0),v.err)throw v.msg||n[v.err];return v.result}function x(m,b){return b=b||{},b.raw=!0,p(m,b)}function g(m,b){return b=b||{},b.gzip=!0,p(m,b)}return Ao.Deflate=y,Ao.deflate=p,Ao.deflateRaw=x,Ao.gzip=g,Ao}var Eo={},On={},bf,mm;function wS(){if(mm)return bf;mm=1;var e=30,t=12;return bf=function(n,a){var i,o,l,s,u,c,f,d,h,y,p,x,g,m,b,v,S,C,A,_,E,M,z,N,R;i=n.state,o=n.next_in,N=n.input,l=o+(n.avail_in-5),s=n.next_out,R=n.output,u=s-(a-n.avail_out),c=s+(n.avail_out-257),f=i.dmax,d=i.wsize,h=i.whave,y=i.wnext,p=i.window,x=i.hold,g=i.bits,m=i.lencode,b=i.distcode,v=(1<<i.lenbits)-1,S=(1<<i.distbits)-1;e:do{g<15&&(x+=N[o++]<<g,g+=8,x+=N[o++]<<g,g+=8),C=m[x&v];t:for(;;){if(A=C>>>24,x>>>=A,g-=A,A=C>>>16&255,A===0)R[s++]=C&65535;else if(A&16){_=C&65535,A&=15,A&&(g<A&&(x+=N[o++]<<g,g+=8),_+=x&(1<<A)-1,x>>>=A,g-=A),g<15&&(x+=N[o++]<<g,g+=8,x+=N[o++]<<g,g+=8),C=b[x&S];r:for(;;){if(A=C>>>24,x>>>=A,g-=A,A=C>>>16&255,A&16){if(E=C&65535,A&=15,g<A&&(x+=N[o++]<<g,g+=8,g<A&&(x+=N[o++]<<g,g+=8)),E+=x&(1<<A)-1,E>f){n.msg="invalid distance too far back",i.mode=e;break e}if(x>>>=A,g-=A,A=s-u,E>A){if(A=E-A,A>h&&i.sane){n.msg="invalid distance too far back",i.mode=e;break e}if(M=0,z=p,y===0){if(M+=d-A,A<_){_-=A;do R[s++]=p[M++];while(--A);M=s-E,z=R}}else if(y<A){if(M+=d+y-A,A-=y,A<_){_-=A;do R[s++]=p[M++];while(--A);if(M=0,y<_){A=y,_-=A;do R[s++]=p[M++];while(--A);M=s-E,z=R}}}else if(M+=y-A,A<_){_-=A;do R[s++]=p[M++];while(--A);M=s-E,z=R}for(;_>2;)R[s++]=z[M++],R[s++]=z[M++],R[s++]=z[M++],_-=3;_&&(R[s++]=z[M++],_>1&&(R[s++]=z[M++]))}else{M=s-E;do R[s++]=R[M++],R[s++]=R[M++],R[s++]=R[M++],_-=3;while(_>2);_&&(R[s++]=R[M++],_>1&&(R[s++]=R[M++]))}}else if(A&64){n.msg="invalid distance code",i.mode=e;break e}else{C=b[(C&65535)+(x&(1<<A)-1)];continue r}break}}else if(A&64)if(A&32){i.mode=t;break e}else{n.msg="invalid literal/length code",i.mode=e;break e}else{C=m[(C&65535)+(x&(1<<A)-1)];continue t}break}}while(o<l&&s<c);_=g>>3,o-=_,g-=_<<3,x&=(1<<g)-1,n.next_in=o,n.next_out=s,n.avail_in=o<l?5+(l-o):5-(o-l),n.avail_out=s<c?257+(c-s):257-(s-c),i.hold=x,i.bits=g},bf}var yf,gm;function kS(){if(gm)return yf;gm=1;var e=vi(),t=15,r=852,n=592,a=0,i=1,o=2,l=[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],s=[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],u=[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],c=[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];return yf=function(d,h,y,p,x,g,m,b){var v=b.bits,S=0,C=0,A=0,_=0,E=0,M=0,z=0,N=0,R=0,$=0,q,W,Z,te,ne,_e=null,pe=0,we,ve=new e.Buf16(t+1),Te=new e.Buf16(t+1),Se=null,Ie=0,Le,Ae,Be;for(S=0;S<=t;S++)ve[S]=0;for(C=0;C<p;C++)ve[h[y+C]]++;for(E=v,_=t;_>=1&&ve[_]===0;_--);if(E>_&&(E=_),_===0)return x[g++]=1<<24|64<<16|0,x[g++]=1<<24|64<<16|0,b.bits=1,0;for(A=1;A<_&&ve[A]===0;A++);for(E<A&&(E=A),N=1,S=1;S<=t;S++)if(N<<=1,N-=ve[S],N<0)return-1;if(N>0&&(d===a||_!==1))return-1;for(Te[1]=0,S=1;S<t;S++)Te[S+1]=Te[S]+ve[S];for(C=0;C<p;C++)h[y+C]!==0&&(m[Te[h[y+C]]++]=C);if(d===a?(_e=Se=m,we=19):d===i?(_e=l,pe-=257,Se=s,Ie-=257,we=256):(_e=u,Se=c,we=-1),$=0,C=0,S=A,ne=g,M=E,z=0,Z=-1,R=1<<E,te=R-1,d===i&&R>r||d===o&&R>n)return 1;for(;;){Le=S-z,m[C]<we?(Ae=0,Be=m[C]):m[C]>we?(Ae=Se[Ie+m[C]],Be=_e[pe+m[C]]):(Ae=96,Be=0),q=1<<S-z,W=1<<M,A=W;do W-=q,x[ne+($>>z)+W]=Le<<24|Ae<<16|Be|0;while(W!==0);for(q=1<<S-1;$&q;)q>>=1;if(q!==0?($&=q-1,$+=q):$=0,C++,--ve[S]===0){if(S===_)break;S=h[y+m[C]]}if(S>E&&($&te)!==Z){for(z===0&&(z=E),ne+=A,M=S-z,N=1<<M;M+z<_&&(N-=ve[M+z],!(N<=0));)M++,N<<=1;if(R+=1<<M,d===i&&R>r||d===o&&R>n)return 1;Z=$&te,x[Z]=E<<24|M<<16|ne-g|0}}return $!==0&&(x[ne+$]=S-z<<24|64<<16|0),b.bits=E,0},yf}var bm;function SS(){if(bm)return On;bm=1;var e=vi(),t=om(),r=sm(),n=wS(),a=kS(),i=0,o=1,l=2,s=4,u=5,c=6,f=0,d=1,h=2,y=-2,p=-3,x=-4,g=-5,m=8,b=1,v=2,S=3,C=4,A=5,_=6,E=7,M=8,z=9,N=10,R=11,$=12,q=13,W=14,Z=15,te=16,ne=17,_e=18,pe=19,we=20,ve=21,Te=22,Se=23,Ie=24,Le=25,Ae=26,Be=27,be=28,ye=29,P=30,V=31,fe=32,de=852,ie=592,oe=15,se=oe;function ge(re){return(re>>>24&255)+(re>>>8&65280)+((re&65280)<<8)+((re&255)<<24)}function Ce(){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 e.Buf16(320),this.work=new e.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function xe(re){var me;return!re||!re.state?y:(me=re.state,re.total_in=re.total_out=me.total=0,re.msg="",me.wrap&&(re.adler=me.wrap&1),me.mode=b,me.last=0,me.havedict=0,me.dmax=32768,me.head=null,me.hold=0,me.bits=0,me.lencode=me.lendyn=new e.Buf32(de),me.distcode=me.distdyn=new e.Buf32(ie),me.sane=1,me.back=-1,f)}function Ve(re){var me;return!re||!re.state?y:(me=re.state,me.wsize=0,me.whave=0,me.wnext=0,xe(re))}function Ue(re,me){var O,Fe;return!re||!re.state||(Fe=re.state,me<0?(O=0,me=-me):(O=(me>>4)+1,me<48&&(me&=15)),me&&(me<8||me>15))?y:(Fe.window!==null&&Fe.wbits!==me&&(Fe.window=null),Fe.wrap=O,Fe.wbits=me,Ve(re))}function Ne(re,me){var O,Fe;return re?(Fe=new Ce,re.state=Fe,Fe.window=null,O=Ue(re,me),O!==f&&(re.state=null),O):y}function qe(re){return Ne(re,se)}var it=!0,ct,ot;function wt(re){if(it){var me;for(ct=new e.Buf32(512),ot=new e.Buf32(32),me=0;me<144;)re.lens[me++]=8;for(;me<256;)re.lens[me++]=9;for(;me<280;)re.lens[me++]=7;for(;me<288;)re.lens[me++]=8;for(a(o,re.lens,0,288,ct,0,re.work,{bits:9}),me=0;me<32;)re.lens[me++]=5;a(l,re.lens,0,32,ot,0,re.work,{bits:5}),it=!1}re.lencode=ct,re.lenbits=9,re.distcode=ot,re.distbits=5}function Me(re,me,O,Fe){var mt,k=re.state;return k.window===null&&(k.wsize=1<<k.wbits,k.wnext=0,k.whave=0,k.window=new e.Buf8(k.wsize)),Fe>=k.wsize?(e.arraySet(k.window,me,O-k.wsize,k.wsize,0),k.wnext=0,k.whave=k.wsize):(mt=k.wsize-k.wnext,mt>Fe&&(mt=Fe),e.arraySet(k.window,me,O-Fe,mt,k.wnext),Fe-=mt,Fe?(e.arraySet(k.window,me,O-Fe,Fe,0),k.wnext=Fe,k.whave=k.wsize):(k.wnext+=mt,k.wnext===k.wsize&&(k.wnext=0),k.whave<k.wsize&&(k.whave+=mt))),0}function D(re,me){var O,Fe,mt,k,K,H,I,ee,X,Xe,Ke,tt,At,fn,Jt=0,zt,mr,Fr,Ur,el,ra,hr,dn,Ar=new e.Buf8(4),Un,Hn,Ei=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!re||!re.state||!re.output||!re.input&&re.avail_in!==0)return y;O=re.state,O.mode===$&&(O.mode=q),K=re.next_out,mt=re.output,I=re.avail_out,k=re.next_in,Fe=re.input,H=re.avail_in,ee=O.hold,X=O.bits,Xe=H,Ke=I,dn=f;e:for(;;)switch(O.mode){case b:if(O.wrap===0){O.mode=q;break}for(;X<16;){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}if(O.wrap&2&&ee===35615){O.check=0,Ar[0]=ee&255,Ar[1]=ee>>>8&255,O.check=r(O.check,Ar,2,0),ee=0,X=0,O.mode=v;break}if(O.flags=0,O.head&&(O.head.done=!1),!(O.wrap&1)||(((ee&255)<<8)+(ee>>8))%31){re.msg="incorrect header check",O.mode=P;break}if((ee&15)!==m){re.msg="unknown compression method",O.mode=P;break}if(ee>>>=4,X-=4,hr=(ee&15)+8,O.wbits===0)O.wbits=hr;else if(hr>O.wbits){re.msg="invalid window size",O.mode=P;break}O.dmax=1<<hr,re.adler=O.check=1,O.mode=ee&512?N:$,ee=0,X=0;break;case v:for(;X<16;){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}if(O.flags=ee,(O.flags&255)!==m){re.msg="unknown compression method",O.mode=P;break}if(O.flags&57344){re.msg="unknown header flags set",O.mode=P;break}O.head&&(O.head.text=ee>>8&1),O.flags&512&&(Ar[0]=ee&255,Ar[1]=ee>>>8&255,O.check=r(O.check,Ar,2,0)),ee=0,X=0,O.mode=S;case S:for(;X<32;){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}O.head&&(O.head.time=ee),O.flags&512&&(Ar[0]=ee&255,Ar[1]=ee>>>8&255,Ar[2]=ee>>>16&255,Ar[3]=ee>>>24&255,O.check=r(O.check,Ar,4,0)),ee=0,X=0,O.mode=C;case C:for(;X<16;){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}O.head&&(O.head.xflags=ee&255,O.head.os=ee>>8),O.flags&512&&(Ar[0]=ee&255,Ar[1]=ee>>>8&255,O.check=r(O.check,Ar,2,0)),ee=0,X=0,O.mode=A;case A:if(O.flags&1024){for(;X<16;){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}O.length=ee,O.head&&(O.head.extra_len=ee),O.flags&512&&(Ar[0]=ee&255,Ar[1]=ee>>>8&255,O.check=r(O.check,Ar,2,0)),ee=0,X=0}else O.head&&(O.head.extra=null);O.mode=_;case _:if(O.flags&1024&&(tt=O.length,tt>H&&(tt=H),tt&&(O.head&&(hr=O.head.extra_len-O.length,O.head.extra||(O.head.extra=new Array(O.head.extra_len)),e.arraySet(O.head.extra,Fe,k,tt,hr)),O.flags&512&&(O.check=r(O.check,Fe,tt,k)),H-=tt,k+=tt,O.length-=tt),O.length))break e;O.length=0,O.mode=E;case E:if(O.flags&2048){if(H===0)break e;tt=0;do hr=Fe[k+tt++],O.head&&hr&&O.length<65536&&(O.head.name+=String.fromCharCode(hr));while(hr&&tt<H);if(O.flags&512&&(O.check=r(O.check,Fe,tt,k)),H-=tt,k+=tt,hr)break e}else O.head&&(O.head.name=null);O.length=0,O.mode=M;case M:if(O.flags&4096){if(H===0)break e;tt=0;do hr=Fe[k+tt++],O.head&&hr&&O.length<65536&&(O.head.comment+=String.fromCharCode(hr));while(hr&&tt<H);if(O.flags&512&&(O.check=r(O.check,Fe,tt,k)),H-=tt,k+=tt,hr)break e}else O.head&&(O.head.comment=null);O.mode=z;case z:if(O.flags&512){for(;X<16;){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}if(ee!==(O.check&65535)){re.msg="header crc mismatch",O.mode=P;break}ee=0,X=0}O.head&&(O.head.hcrc=O.flags>>9&1,O.head.done=!0),re.adler=O.check=0,O.mode=$;break;case N:for(;X<32;){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}re.adler=O.check=ge(ee),ee=0,X=0,O.mode=R;case R:if(O.havedict===0)return re.next_out=K,re.avail_out=I,re.next_in=k,re.avail_in=H,O.hold=ee,O.bits=X,h;re.adler=O.check=1,O.mode=$;case $:if(me===u||me===c)break e;case q:if(O.last){ee>>>=X&7,X-=X&7,O.mode=Be;break}for(;X<3;){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}switch(O.last=ee&1,ee>>>=1,X-=1,ee&3){case 0:O.mode=W;break;case 1:if(wt(O),O.mode=we,me===c){ee>>>=2,X-=2;break e}break;case 2:O.mode=ne;break;case 3:re.msg="invalid block type",O.mode=P}ee>>>=2,X-=2;break;case W:for(ee>>>=X&7,X-=X&7;X<32;){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}if((ee&65535)!==(ee>>>16^65535)){re.msg="invalid stored block lengths",O.mode=P;break}if(O.length=ee&65535,ee=0,X=0,O.mode=Z,me===c)break e;case Z:O.mode=te;case te:if(tt=O.length,tt){if(tt>H&&(tt=H),tt>I&&(tt=I),tt===0)break e;e.arraySet(mt,Fe,k,tt,K),H-=tt,k+=tt,I-=tt,K+=tt,O.length-=tt;break}O.mode=$;break;case ne:for(;X<14;){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}if(O.nlen=(ee&31)+257,ee>>>=5,X-=5,O.ndist=(ee&31)+1,ee>>>=5,X-=5,O.ncode=(ee&15)+4,ee>>>=4,X-=4,O.nlen>286||O.ndist>30){re.msg="too many length or distance symbols",O.mode=P;break}O.have=0,O.mode=_e;case _e:for(;O.have<O.ncode;){for(;X<3;){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}O.lens[Ei[O.have++]]=ee&7,ee>>>=3,X-=3}for(;O.have<19;)O.lens[Ei[O.have++]]=0;if(O.lencode=O.lendyn,O.lenbits=7,Un={bits:O.lenbits},dn=a(i,O.lens,0,19,O.lencode,0,O.work,Un),O.lenbits=Un.bits,dn){re.msg="invalid code lengths set",O.mode=P;break}O.have=0,O.mode=pe;case pe:for(;O.have<O.nlen+O.ndist;){for(;Jt=O.lencode[ee&(1<<O.lenbits)-1],zt=Jt>>>24,mr=Jt>>>16&255,Fr=Jt&65535,!(zt<=X);){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}if(Fr<16)ee>>>=zt,X-=zt,O.lens[O.have++]=Fr;else{if(Fr===16){for(Hn=zt+2;X<Hn;){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}if(ee>>>=zt,X-=zt,O.have===0){re.msg="invalid bit length repeat",O.mode=P;break}hr=O.lens[O.have-1],tt=3+(ee&3),ee>>>=2,X-=2}else if(Fr===17){for(Hn=zt+3;X<Hn;){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}ee>>>=zt,X-=zt,hr=0,tt=3+(ee&7),ee>>>=3,X-=3}else{for(Hn=zt+7;X<Hn;){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}ee>>>=zt,X-=zt,hr=0,tt=11+(ee&127),ee>>>=7,X-=7}if(O.have+tt>O.nlen+O.ndist){re.msg="invalid bit length repeat",O.mode=P;break}for(;tt--;)O.lens[O.have++]=hr}}if(O.mode===P)break;if(O.lens[256]===0){re.msg="invalid code -- missing end-of-block",O.mode=P;break}if(O.lenbits=9,Un={bits:O.lenbits},dn=a(o,O.lens,0,O.nlen,O.lencode,0,O.work,Un),O.lenbits=Un.bits,dn){re.msg="invalid literal/lengths set",O.mode=P;break}if(O.distbits=6,O.distcode=O.distdyn,Un={bits:O.distbits},dn=a(l,O.lens,O.nlen,O.ndist,O.distcode,0,O.work,Un),O.distbits=Un.bits,dn){re.msg="invalid distances set",O.mode=P;break}if(O.mode=we,me===c)break e;case we:O.mode=ve;case ve:if(H>=6&&I>=258){re.next_out=K,re.avail_out=I,re.next_in=k,re.avail_in=H,O.hold=ee,O.bits=X,n(re,Ke),K=re.next_out,mt=re.output,I=re.avail_out,k=re.next_in,Fe=re.input,H=re.avail_in,ee=O.hold,X=O.bits,O.mode===$&&(O.back=-1);break}for(O.back=0;Jt=O.lencode[ee&(1<<O.lenbits)-1],zt=Jt>>>24,mr=Jt>>>16&255,Fr=Jt&65535,!(zt<=X);){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}if(mr&&!(mr&240)){for(Ur=zt,el=mr,ra=Fr;Jt=O.lencode[ra+((ee&(1<<Ur+el)-1)>>Ur)],zt=Jt>>>24,mr=Jt>>>16&255,Fr=Jt&65535,!(Ur+zt<=X);){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}ee>>>=Ur,X-=Ur,O.back+=Ur}if(ee>>>=zt,X-=zt,O.back+=zt,O.length=Fr,mr===0){O.mode=Ae;break}if(mr&32){O.back=-1,O.mode=$;break}if(mr&64){re.msg="invalid literal/length code",O.mode=P;break}O.extra=mr&15,O.mode=Te;case Te:if(O.extra){for(Hn=O.extra;X<Hn;){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}O.length+=ee&(1<<O.extra)-1,ee>>>=O.extra,X-=O.extra,O.back+=O.extra}O.was=O.length,O.mode=Se;case Se:for(;Jt=O.distcode[ee&(1<<O.distbits)-1],zt=Jt>>>24,mr=Jt>>>16&255,Fr=Jt&65535,!(zt<=X);){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}if(!(mr&240)){for(Ur=zt,el=mr,ra=Fr;Jt=O.distcode[ra+((ee&(1<<Ur+el)-1)>>Ur)],zt=Jt>>>24,mr=Jt>>>16&255,Fr=Jt&65535,!(Ur+zt<=X);){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}ee>>>=Ur,X-=Ur,O.back+=Ur}if(ee>>>=zt,X-=zt,O.back+=zt,mr&64){re.msg="invalid distance code",O.mode=P;break}O.offset=Fr,O.extra=mr&15,O.mode=Ie;case Ie:if(O.extra){for(Hn=O.extra;X<Hn;){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}O.offset+=ee&(1<<O.extra)-1,ee>>>=O.extra,X-=O.extra,O.back+=O.extra}if(O.offset>O.dmax){re.msg="invalid distance too far back",O.mode=P;break}O.mode=Le;case Le:if(I===0)break e;if(tt=Ke-I,O.offset>tt){if(tt=O.offset-tt,tt>O.whave&&O.sane){re.msg="invalid distance too far back",O.mode=P;break}tt>O.wnext?(tt-=O.wnext,At=O.wsize-tt):At=O.wnext-tt,tt>O.length&&(tt=O.length),fn=O.window}else fn=mt,At=K-O.offset,tt=O.length;tt>I&&(tt=I),I-=tt,O.length-=tt;do mt[K++]=fn[At++];while(--tt);O.length===0&&(O.mode=ve);break;case Ae:if(I===0)break e;mt[K++]=O.length,I--,O.mode=ve;break;case Be:if(O.wrap){for(;X<32;){if(H===0)break e;H--,ee|=Fe[k++]<<X,X+=8}if(Ke-=I,re.total_out+=Ke,O.total+=Ke,Ke&&(re.adler=O.check=O.flags?r(O.check,mt,Ke,K-Ke):t(O.check,mt,Ke,K-Ke)),Ke=I,(O.flags?ee:ge(ee))!==O.check){re.msg="incorrect data check",O.mode=P;break}ee=0,X=0}O.mode=be;case be:if(O.wrap&&O.flags){for(;X<32;){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}if(ee!==(O.total&4294967295)){re.msg="incorrect length check",O.mode=P;break}ee=0,X=0}O.mode=ye;case ye:dn=d;break e;case P:dn=p;break e;case V:return x;case fe:default:return y}return re.next_out=K,re.avail_out=I,re.next_in=k,re.avail_in=H,O.hold=ee,O.bits=X,(O.wsize||Ke!==re.avail_out&&O.mode<P&&(O.mode<Be||me!==s))&&Me(re,re.output,re.next_out,Ke-re.avail_out),Xe-=re.avail_in,Ke-=re.avail_out,re.total_in+=Xe,re.total_out+=Ke,O.total+=Ke,O.wrap&&Ke&&(re.adler=O.check=O.flags?r(O.check,mt,Ke,re.next_out-Ke):t(O.check,mt,Ke,re.next_out-Ke)),re.data_type=O.bits+(O.last?64:0)+(O.mode===$?128:0)+(O.mode===we||O.mode===Z?256:0),(Xe===0&&Ke===0||me===s)&&dn===f&&(dn=g),dn}function ue(re){if(!re||!re.state)return y;var me=re.state;return me.window&&(me.window=null),re.state=null,f}function ke(re,me){var O;return!re||!re.state||(O=re.state,!(O.wrap&2))?y:(O.head=me,me.done=!1,f)}function ze(re,me){var O=me.length,Fe,mt,k;return!re||!re.state||(Fe=re.state,Fe.wrap!==0&&Fe.mode!==R)?y:Fe.mode===R&&(mt=1,mt=t(mt,me,O,0),mt!==Fe.check)?p:(k=Me(re,me,O,O),k?(Fe.mode=V,x):(Fe.havedict=1,f))}return On.inflateReset=Ve,On.inflateReset2=Ue,On.inflateResetKeep=xe,On.inflateInit=qe,On.inflateInit2=Ne,On.inflate=D,On.inflateEnd=ue,On.inflateGetHeader=ke,On.inflateSetDictionary=ze,On.inflateInfo="pako inflate (from Nodeca project)",On}var xf,ym;function xm(){return ym||(ym=1,xf={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}),xf}var _f,_m;function CS(){if(_m)return _f;_m=1;function e(){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}return _f=e,_f}var wm;function AS(){if(wm)return Eo;wm=1;var e=SS(),t=vi(),r=dm(),n=xm(),a=mf(),i=pm(),o=CS(),l=Object.prototype.toString;function s(f){if(!(this instanceof s))return new s(f);this.options=t.assign({chunkSize:16384,windowBits:0,to:""},f||{});var d=this.options;d.raw&&d.windowBits>=0&&d.windowBits<16&&(d.windowBits=-d.windowBits,d.windowBits===0&&(d.windowBits=-15)),d.windowBits>=0&&d.windowBits<16&&!(f&&f.windowBits)&&(d.windowBits+=32),d.windowBits>15&&d.windowBits<48&&(d.windowBits&15||(d.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new i,this.strm.avail_out=0;var h=e.inflateInit2(this.strm,d.windowBits);if(h!==n.Z_OK)throw new Error(a[h]);if(this.header=new o,e.inflateGetHeader(this.strm,this.header),d.dictionary&&(typeof d.dictionary=="string"?d.dictionary=r.string2buf(d.dictionary):l.call(d.dictionary)==="[object ArrayBuffer]"&&(d.dictionary=new Uint8Array(d.dictionary)),d.raw&&(h=e.inflateSetDictionary(this.strm,d.dictionary),h!==n.Z_OK)))throw new Error(a[h])}s.prototype.push=function(f,d){var h=this.strm,y=this.options.chunkSize,p=this.options.dictionary,x,g,m,b,v,S=!1;if(this.ended)return!1;g=d===~~d?d:d===!0?n.Z_FINISH:n.Z_NO_FLUSH,typeof f=="string"?h.input=r.binstring2buf(f):l.call(f)==="[object ArrayBuffer]"?h.input=new Uint8Array(f):h.input=f,h.next_in=0,h.avail_in=h.input.length;do{if(h.avail_out===0&&(h.output=new t.Buf8(y),h.next_out=0,h.avail_out=y),x=e.inflate(h,n.Z_NO_FLUSH),x===n.Z_NEED_DICT&&p&&(x=e.inflateSetDictionary(this.strm,p)),x===n.Z_BUF_ERROR&&S===!0&&(x=n.Z_OK,S=!1),x!==n.Z_STREAM_END&&x!==n.Z_OK)return this.onEnd(x),this.ended=!0,!1;h.next_out&&(h.avail_out===0||x===n.Z_STREAM_END||h.avail_in===0&&(g===n.Z_FINISH||g===n.Z_SYNC_FLUSH))&&(this.options.to==="string"?(m=r.utf8border(h.output,h.next_out),b=h.next_out-m,v=r.buf2string(h.output,m),h.next_out=b,h.avail_out=y-b,b&&t.arraySet(h.output,h.output,m,b,0),this.onData(v)):this.onData(t.shrinkBuf(h.output,h.next_out))),h.avail_in===0&&h.avail_out===0&&(S=!0)}while((h.avail_in>0||h.avail_out===0)&&x!==n.Z_STREAM_END);return x===n.Z_STREAM_END&&(g=n.Z_FINISH),g===n.Z_FINISH?(x=e.inflateEnd(this.strm),this.onEnd(x),this.ended=!0,x===n.Z_OK):(g===n.Z_SYNC_FLUSH&&(this.onEnd(n.Z_OK),h.avail_out=0),!0)},s.prototype.onData=function(f){this.chunks.push(f)},s.prototype.onEnd=function(f){f===n.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=t.flattenChunks(this.chunks)),this.chunks=[],this.err=f,this.msg=this.strm.msg};function u(f,d){var h=new s(d);if(h.push(f,!0),h.err)throw h.msg||a[h.err];return h.result}function c(f,d){return d=d||{},d.raw=!0,u(f,d)}return Eo.Inflate=s,Eo.inflate=u,Eo.inflateRaw=c,Eo.ungzip=u,Eo}var wf,km;function ES(){if(km)return wf;km=1;var e=vi().assign,t=_S(),r=AS(),n=xm(),a={};return e(a,t,r,n),wf=a,wf}(function(e){(function(){var t={};e.exports=t;var r;typeof bS=="function"?r=ES():r=self.pako;function n(){typeof process>"u"&&console.log.apply(console,arguments)}(function(a,i){(function(){var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},l=function(){function u(c){this.message="JPEG error: "+c}return u.prototype=Error(),u.prototype.name="JpegError",u.constructor=u}(),s=function(){function u(c,f){this.message=c,this.g=f}return u.prototype=Error(),u.prototype.name="DNLMarkerError",u.constructor=u}();(function(){function u(){this.M=null,this.B=-1}function c(p,x){for(var g=0,m=[],b,v,S=16;0<S&&!p[S-1];)S--;m.push({children:[],index:0});var C=m[0],A;for(b=0;b<S;b++){for(v=0;v<p[b];v++){for(C=m.pop(),C.children[C.index]=x[g];0<C.index;)C=m.pop();for(C.index++,m.push(C);m.length<=b;)m.push(A={children:[],index:0}),C.children[C.index]=A.children,C=A;g++}b+1<S&&(m.push(A={children:[],index:0}),C.children[C.index]=A.children,C=A)}return m[0].children}function f(p,x,g,m,b,v,S,C,A){function _(){if(0<pe)return pe--,_e>>pe&1;if(_e=p[x++],_e===255){var oe=p[x++];if(oe){if(oe===220&&Z){x+=2;var se=p[x++]<<8|p[x++];if(0<se&&se!==g.g)throw new s("Found DNL marker (0xFFDC) while parsing scan data",se)}throw new l("unexpected marker "+(_e<<8|oe).toString(16))}}return pe=7,_e>>>7}function E(oe){for(;;){if(oe=oe[_()],typeof oe=="number")return oe;if((typeof oe>"u"?"undefined":o(oe))!=="object")throw new l("invalid huffman sequence")}}function M(oe){for(var se=0;0<oe;)se=se<<1|_(),oe--;return se}function z(oe){if(oe===1)return _()===1?1:-1;var se=M(oe);return se>=1<<oe-1?se:se+(-1<<oe)+1}function N(oe,se){var ge=E(oe.D);for(ge=ge===0?0:z(ge),oe.a[se]=oe.m+=ge,ge=1;64>ge;){var Ce=E(oe.o),xe=Ce&15;if(Ce>>=4,xe===0){if(15>Ce)break;ge+=16}else ge+=Ce,oe.a[se+y[ge]]=z(xe),ge++}}function R(oe,se){var ge=E(oe.D);ge=ge===0?0:z(ge)<<A,oe.a[se]=oe.m+=ge}function $(oe,se){oe.a[se]|=_()<<A}function q(oe,se){if(0<we)we--;else for(var ge=v;ge<=S;){var Ce=E(oe.o),xe=Ce&15;if(Ce>>=4,xe===0){if(15>Ce){we=M(Ce)+(1<<Ce)-1;break}ge+=16}else ge+=Ce,oe.a[se+y[ge]]=z(xe)*(1<<A),ge++}}function W(oe,se){for(var ge=v,Ce=0,xe;ge<=S;){xe=se+y[ge];var Ve=0>oe.a[xe]?-1:1;switch(ve){case 0:if(Ce=E(oe.o),xe=Ce&15,Ce>>=4,xe===0)15>Ce?(we=M(Ce)+(1<<Ce),ve=4):(Ce=16,ve=1);else{if(xe!==1)throw new l("invalid ACn encoding");Te=z(xe),ve=Ce?2:3}continue;case 1:case 2:oe.a[xe]?oe.a[xe]+=Ve*(_()<<A):(Ce--,Ce===0&&(ve=ve===2?3:0));break;case 3:oe.a[xe]?oe.a[xe]+=Ve*(_()<<A):(oe.a[xe]=Te<<A,ve=0);break;case 4:oe.a[xe]&&(oe.a[xe]+=Ve*(_()<<A))}ge++}ve===4&&(we--,we===0&&(ve=0))}for(var Z=9<arguments.length&&arguments[9]!==void 0?arguments[9]:!1,te=g.P,ne=x,_e=0,pe=0,we=0,ve=0,Te,Se=m.length,Ie,Le,Ae,Be,be=g.S?v===0?C===0?R:$:C===0?q:W:N,ye=0,P=Se===1?m[0].c*m[0].l:te*g.O,V,fe;ye<P;){var de=b?Math.min(P-ye,b):P;for(Ie=0;Ie<Se;Ie++)m[Ie].m=0;if(we=0,Se===1){var ie=m[0];for(Be=0;Be<de;Be++)be(ie,64*((ie.c+1)*(ye/ie.c|0)+ye%ie.c)),ye++}else for(Be=0;Be<de;Be++){for(Ie=0;Ie<Se;Ie++)for(ie=m[Ie],V=ie.h,fe=ie.j,Le=0;Le<fe;Le++)for(Ae=0;Ae<V;Ae++)be(ie,64*((ie.c+1)*((ye/te|0)*ie.j+Le)+(ye%te*ie.h+Ae)));ye++}if(pe=0,(ie=h(p,x))&&ie.f&&((0,_util.warn)("decodeScan - unexpected MCU data, current marker is: "+ie.f),x=ie.offset),ie=ie&&ie.F,!ie||65280>=ie)throw new l("marker was not found");if(65488<=ie&&65495>=ie)x+=2;else break}return(ie=h(p,x))&&ie.f&&((0,_util.warn)("decodeScan - unexpected Scan data, current marker is: "+ie.f),x=ie.offset),x-ne}function d(p,x){for(var g=x.c,m=x.l,b=new Int16Array(64),v=0;v<m;v++)for(var S=0;S<g;S++){var C=64*((x.c+1)*v+S),A=b,_=x.G,E=x.a;if(!_)throw new l("missing required Quantization Table.");for(var M=0;64>M;M+=8){var z=E[C+M],N=E[C+M+1],R=E[C+M+2],$=E[C+M+3],q=E[C+M+4],W=E[C+M+5],Z=E[C+M+6],te=E[C+M+7];if(z*=_[M],!(N|R|$|q|W|Z|te))z=5793*z+512>>10,A[M]=z,A[M+1]=z,A[M+2]=z,A[M+3]=z,A[M+4]=z,A[M+5]=z,A[M+6]=z,A[M+7]=z;else{N*=_[M+1],R*=_[M+2],$*=_[M+3],q*=_[M+4],W*=_[M+5],Z*=_[M+6],te*=_[M+7];var ne=5793*z+128>>8,_e=5793*q+128>>8,pe=R,we=Z;q=2896*(N-te)+128>>8,te=2896*(N+te)+128>>8,$<<=4,W<<=4,ne=ne+_e+1>>1,_e=ne-_e,z=3784*pe+1567*we+128>>8,pe=1567*pe-3784*we+128>>8,we=z,q=q+W+1>>1,W=q-W,te=te+$+1>>1,$=te-$,ne=ne+we+1>>1,we=ne-we,_e=_e+pe+1>>1,pe=_e-pe,z=2276*q+3406*te+2048>>12,q=3406*q-2276*te+2048>>12,te=z,z=799*$+4017*W+2048>>12,$=4017*$-799*W+2048>>12,W=z,A[M]=ne+te,A[M+7]=ne-te,A[M+1]=_e+W,A[M+6]=_e-W,A[M+2]=pe+$,A[M+5]=pe-$,A[M+3]=we+q,A[M+4]=we-q}}for(_=0;8>_;++_)z=A[_],N=A[_+8],R=A[_+16],$=A[_+24],q=A[_+32],W=A[_+40],Z=A[_+48],te=A[_+56],N|R|$|q|W|Z|te?(ne=5793*z+2048>>12,_e=5793*q+2048>>12,pe=R,we=Z,q=2896*(N-te)+2048>>12,te=2896*(N+te)+2048>>12,ne=(ne+_e+1>>1)+4112,_e=ne-_e,z=3784*pe+1567*we+2048>>12,pe=1567*pe-3784*we+2048>>12,we=z,q=q+W+1>>1,W=q-W,te=te+$+1>>1,$=te-$,ne=ne+we+1>>1,we=ne-we,_e=_e+pe+1>>1,pe=_e-pe,z=2276*q+3406*te+2048>>12,q=3406*q-2276*te+2048>>12,te=z,z=799*$+4017*W+2048>>12,$=4017*$-799*W+2048>>12,W=z,z=ne+te,te=ne-te,N=_e+W,Z=_e-W,R=pe+$,W=pe-$,$=we+q,q=we-q,z=16>z?0:4080<=z?255:z>>4,N=16>N?0:4080<=N?255:N>>4,R=16>R?0:4080<=R?255:R>>4,$=16>$?0:4080<=$?255:$>>4,q=16>q?0:4080<=q?255:q>>4,W=16>W?0:4080<=W?255:W>>4,Z=16>Z?0:4080<=Z?255:Z>>4,te=16>te?0:4080<=te?255:te>>4,E[C+_]=z,E[C+_+8]=N,E[C+_+16]=R,E[C+_+24]=$,E[C+_+32]=q,E[C+_+40]=W,E[C+_+48]=Z,E[C+_+56]=te):(z=5793*z+8192>>14,z=-2040>z?0:2024<=z?255:z+2056>>4,E[C+_]=z,E[C+_+8]=z,E[C+_+16]=z,E[C+_+24]=z,E[C+_+32]=z,E[C+_+40]=z,E[C+_+48]=z,E[C+_+56]=z)}return x.a}function h(p,x){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:x,m=p.length-1;if(g=g<x?g:x,x>=m)return null;var b=p[x]<<8|p[x+1];if(65472<=b&&65534>=b)return{f:null,F:b,offset:x};for(var v=p[g]<<8|p[g+1];!(65472<=v&&65534>=v);){if(++g>=m)return null;v=p[g]<<8|p[g+1]}return{f:b.toString(16),F:v,offset:g}}var y=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]);u.prototype={parse:function(p){function x(){var pe=p[S]<<8|p[S+1];return S+=2,pe}function g(){var pe=x();pe=S+pe-2;var we=h(p,pe,S);return we&&we.f&&((0,_util.warn)("readDataBlock - incorrect length, current marker is: "+we.f),pe=we.offset),pe=p.subarray(S,pe),S+=pe.length,pe}function m(pe){for(var we=Math.ceil(pe.v/8/pe.s),ve=Math.ceil(pe.g/8/pe.u),Te=0;Te<pe.b.length;Te++){ne=pe.b[Te];var Se=Math.ceil(Math.ceil(pe.v/8)*ne.h/pe.s),Ie=Math.ceil(Math.ceil(pe.g/8)*ne.j/pe.u);ne.a=new Int16Array(64*ve*ne.j*(we*ne.h+1)),ne.c=Se,ne.l=Ie}pe.P=we,pe.O=ve}var b=(1<arguments.length&&arguments[1]!==void 0?arguments[1]:{}).N,v=b===void 0?null:b,S=0,C=null,A=0;b=[];var _=[],E=[],M=x();if(M!==65496)throw new l("SOI not found");for(M=x();M!==65497;){switch(M){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var z=g();M===65518&&z[0]===65&&z[1]===100&&z[2]===111&&z[3]===98&&z[4]===101&&(C={version:z[5]<<8|z[6],Y:z[7]<<8|z[8],Z:z[9]<<8|z[10],W:z[11]});break;case 65499:M=x()+S-2;for(var N;S<M;){var R=p[S++],$=new Uint16Array(64);if(R>>4)if(R>>4===1)for(z=0;64>z;z++)N=y[z],$[N]=x();else throw new l("DQT - invalid table spec");else for(z=0;64>z;z++)N=y[z],$[N]=p[S++];b[R&15]=$}break;case 65472:case 65473:case 65474:if(q)throw new l("Only single frame JPEGs supported");x();var q={};for(q.X=M===65473,q.S=M===65474,q.precision=p[S++],M=x(),q.g=v||M,q.v=x(),q.b=[],q.C={},z=p[S++],M=$=R=0;M<z;M++){N=p[S];var W=p[S+1]>>4,Z=p[S+1]&15;R<W&&(R=W),$<Z&&($=Z),W=q.b.push({h:W,j:Z,T:p[S+2],G:null}),q.C[N]=W-1,S+=3}q.s=R,q.u=$,m(q);break;case 65476:for(N=x(),M=2;M<N;){for(R=p[S++],$=new Uint8Array(16),z=W=0;16>z;z++,S++)W+=$[z]=p[S];for(Z=new Uint8Array(W),z=0;z<W;z++,S++)Z[z]=p[S];M+=17+W,(R>>4?_:E)[R&15]=c($,Z)}break;case 65501:x();var te=x();break;case 65498:for(z=++A===1&&!v,x(),R=p[S++],N=[],M=0;M<R;M++){$=q.C[p[S++]];var ne=q.b[$];$=p[S++],ne.D=E[$>>4],ne.o=_[$&15],N.push(ne)}M=p[S++],R=p[S++],$=p[S++];try{var _e=f(p,S,q,N,te,M,R,$>>4,$&15,z);S+=_e}catch(pe){if(pe instanceof s)return(0,_util.warn)('Attempting to re-parse JPEG image using "scanLines" parameter found in DNL marker (0xFFDC) segment.'),this.parse(p,{N:pe.g});throw pe}break;case 65500:S+=4;break;case 65535:p[S]!==255&&S--;break;default:if(p[S-3]===255&&192<=p[S-2]&&254>=p[S-2])S-=3;else if((z=h(p,S-2))&&z.f)(0,_util.warn)("JpegImage.parse - unexpected data, current marker is: "+z.f),S=z.offset;else throw new l("unknown marker "+M.toString(16))}M=x()}for(this.width=q.v,this.height=q.g,this.A=C,this.b=[],M=0;M<q.b.length;M++)ne=q.b[M],(te=b[ne.T])&&(ne.G=te),this.b.push({R:d(q,ne),U:ne.h/q.s,V:ne.j/q.u,c:ne.c,l:ne.l});this.i=this.b.length},L:function(p,x){var g=this.width/p,m=this.height/x,b,v,S=this.b.length,C=p*x*S,A=new Uint8ClampedArray(C),_=new Uint32Array(p);for(v=0;v<S;v++){var E=this.b[v],M=E.U*g,z=E.V*m,N=v,R=E.R,$=E.c+1<<3;for(b=0;b<p;b++)E=0|b*M,_[b]=(E&4294967288)<<3|E&7;for(M=0;M<x;M++)for(E=0|M*z,E=$*(E&4294967288)|(E&7)<<3,b=0;b<p;b++)A[N]=R[E+_[b]],N+=S}if(m=this.M)for(v=0;v<C;)for(g=E=0;E<S;E++,v++,g+=2)A[v]=(A[v]*m[g]>>8)+m[g+1];return A},w:function(){return this.A?!!this.A.W:this.i===3?this.B!==0:this.B===1},I:function(p){for(var x,g,m,b=0,v=p.length;b<v;b+=3)x=p[b],g=p[b+1],m=p[b+2],p[b]=x-179.456+1.402*m,p[b+1]=x+135.459-.344*g-.714*m,p[b+2]=x-226.816+1.772*g;return p},K:function(p){for(var x,g,m,b,v=0,S=0,C=p.length;S<C;S+=4)x=p[S],g=p[S+1],m=p[S+2],b=p[S+3],p[v++]=-122.67195406894+g*(-660635669420364e-19*g+.000437130475926232*m-54080610064599e-18*x+.00048449797120281*b-.154362151871126)+m*(-.000957964378445773*m+.000817076911346625*x-.00477271405408747*b+1.53380253221734)+x*(.000961250184130688*x-.00266257332283933*b+.48357088451265)+b*(-.000336197177618394*b+.484791561490776),p[v++]=107.268039397724+g*(219927104525741e-19*g-.000640992018297945*m+.000659397001245577*x+.000426105652938837*b-.176491792462875)+m*(-.000778269941513683*m+.00130872261408275*x+.000770482631801132*b-.151051492775562)+x*(.00126935368114843*x-.00265090189010898*b+.25802910206845)+b*(-.000318913117588328*b-.213742400323665),p[v++]=-20.810012546947+g*(-.000570115196973677*g-263409051004589e-19*m+.0020741088115012*x-.00288260236853442*b+.814272968359295)+m*(-153496057440975e-19*m-.000132689043961446*x+.000560833691242812*b-.195152027534049)+x*(.00174418132927582*x-.00255243321439347*b+.116935020465145)+b*(-.000343531996510555*b+.24165260232407);return p.subarray(0,v)},J:function(p){for(var x,g,m,b=0,v=p.length;b<v;b+=4)x=p[b],g=p[b+1],m=p[b+2],p[b]=434.456-x-1.402*m,p[b+1]=119.541-x+.344*g+.714*m,p[b+2]=481.816-x-1.772*g;return p},H:function(p){for(var x,g,m,b,v=0,S=1/255,C=0,A=p.length;C<A;C+=4)x=p[C]*S,g=p[C+1]*S,m=p[C+2]*S,b=p[C+3]*S,p[v++]=255+x*(-4.387332384609988*x+54.48615194189176*g+18.82290502165302*m+212.25662451639585*b-285.2331026137004)+g*(1.7149763477362134*g-5.6096736904047315*m-17.873870861415444*b-5.497006427196366)+m*(-2.5217340131683033*m-21.248923337353073*b+17.5119270841813)-b*(21.86122147463605*b+189.48180835922747),p[v++]=255+x*(8.841041422036149*x+60.118027045597366*g+6.871425592049007*m+31.159100130055922*b-79.2970844816548)+g*(-15.310361306967817*g+17.575251261109482*m+131.35250912493976*b-190.9453302588951)+m*(4.444339102852739*m+9.8632861493405*b-24.86741582555878)-b*(20.737325471181034*b+187.80453709719578),p[v++]=255+x*(.8842522430003296*x+8.078677503112928*g+30.89978309703729*m-.23883238689178934*b-14.183576799673286)+g*(10.49593273432072*g+63.02378494754052*m+50.606957656360734*b-112.23884253719248)+m*(.03296041114873217*m+115.60384449646641*b-193.58209356861505)-b*(22.33816807309886*b+180.12613974708367);return p.subarray(0,v)},getData:function(p,x,g){if(4<this.i)throw new l("Unsupported color mode");if(p=this.L(p,x),this.i===1&&g){g=p.length,x=new Uint8ClampedArray(3*g);for(var m=0,b=0;b<g;b++){var v=p[b];x[m++]=v,x[m++]=v,x[m++]=v}return x}if(this.i===3&&this.w())return this.I(p);if(this.i===4){if(this.w())return g?this.K(p):this.J(p);if(g)return this.H(p)}return p}},a.JpegDecoder=u})()})(),a.encodeImage=function(o,l,s,u){var c={t256:[l],t257:[s],t258:[8,8,8,8],t259:[1],t262:[2],t273:[1e3],t277:[4],t278:[s],t279:[l*s*4],t282:[1],t283:[1],t284:[1],t286:[0],t287:[0],t296:[1],t305:["Photopea (UTIF.js)"],t338:[1]};if(u)for(var f in u)c[f]=u[f];for(var d=new Uint8Array(a.encode([c])),h=new Uint8Array(o),y=new Uint8Array(1e3+l*s*4),f=0;f<d.length;f++)y[f]=d[f];for(var f=0;f<h.length;f++)y[1e3+f]=h[f];return y.buffer},a.encode=function(o){var l=new Uint8Array(2e4),s=4,u=a._binBE;l[0]=77,l[1]=77,l[3]=42;var c=8;u.writeUint(l,s,c),s+=4;for(var f=0;f<o.length;f++){var d=a._writeIFD(u,l,c,o[f]);c=d[1],f<o.length-1&&u.writeUint(l,d[0],c)}return l.slice(0,c).buffer},a.decode=function(o){a.decode._decodeG3.allow2D=null;var l=new Uint8Array(o),s=0,u=a._binBE.readASCII(l,s,2);s+=2;var c=u=="II"?a._binLE:a._binBE;c.readUshort(l,s),s+=2;var f=c.readUint(l,s);s+=4;for(var d=[];;){var h=a._readIFD(c,l,f,d,0,!1);if(f=c.readUint(l,h),f==0)break}return d},a.decodeImage=function(o,l,s){var u=new Uint8Array(o),c=a._binBE.readASCII(u,0,2);if(l.t256!=null){l.isLE=c=="II",l.width=l.t256[0],l.height=l.t257[0];var f=l.t259?l.t259[0]:1,d=l.t266?l.t266[0]:1;l.t284&&l.t284[0]==2&&n("PlanarConfiguration 2 should not be used!");var h;l.t258?h=Math.min(32,l.t258[0])*l.t258.length:h=l.t277?l.t277[0]:1,f==1&&l.t279!=null&&l.t278&&l.t262[0]==32803&&(h=Math.round(l.t279[0]*8/(l.width*l.t278[0])));var y=Math.ceil(l.width*h/8)*8,p=l.t273;p==null&&(p=l.t324);var x=l.t279;f==1&&p.length==1&&(x=[l.height*(y>>>3)]),x==null&&(x=l.t325);var g=new Uint8Array(l.height*(y>>>3)),m=0;if(l.t322!=null){for(var b=l.t322[0],v=l.t323[0],S=Math.floor((l.width+b-1)/b),C=Math.floor((l.height+v-1)/v),A=new Uint8Array(Math.ceil(b*v*h/8)|0),_=0;_<C;_++)for(var E=0;E<S;E++){for(var M=_*S+E,z=0;z<A.length;z++)A[z]=0;a.decode._decompress(l,s,u,p[M],x[M],f,A,0,d),f==6?g=A:a._copyTile(A,Math.ceil(b*h/8)|0,v,g,Math.ceil(l.width*h/8)|0,l.height,Math.ceil(E*b*h/8)|0,_*v)}m=g.length*8}else{var N=l.t278?l.t278[0]:l.height;N=Math.min(N,l.height);for(var M=0;M<p.length;M++)a.decode._decompress(l,s,u,p[M],x[M],f,g,Math.ceil(m/8)|0,d),m+=y*N;m=Math.min(m,g.length*8)}l.data=new Uint8Array(g.buffer,0,Math.ceil(m/8)|0)}},a.decode._decompress=function(o,l,s,u,c,f,d,h,y){if(f==1||c==d.length&&f!=32767)for(var p=0;p<c;p++)d[h+p]=s[u+p];else if(f==3)a.decode._decodeG3(s,u,c,d,h,o.width,y);else if(f==4)a.decode._decodeG4(s,u,c,d,h,o.width,y);else if(f==5)a.decode._decodeLZW(s,u,d,h);else if(f==6)a.decode._decodeOldJPEG(o,s,u,c,d,h);else if(f==7)a.decode._decodeNewJPEG(o,s,u,c,d,h);else if(f==8)for(var x=new Uint8Array(s.buffer,u,c),g=i.inflate(x),m=0;m<g.length;m++)d[h+m]=g[m];else f==32767?a.decode._decodeARW(o,s,u,c,d,h):f==32773?a.decode._decodePackBits(s,u,c,d,h):f==32809?a.decode._decodeThunder(s,u,c,d,h):f==34713?a.decode._decodeNikon(o,l,s,u,c,d,h):n("Unknown compression",f);var b=o.t258?Math.min(32,o.t258[0]):1,v=o.t277?o.t277[0]:1,S=b*v>>>3,C=o.t278?o.t278[0]:o.height,A=Math.ceil(b*v*o.width/8);if(b==16&&!o.isLE&&o.t33422==null)for(var _=0;_<C;_++)for(var E=h+_*A,M=1;M<A;M+=2){var z=d[E+M];d[E+M]=d[E+M-1],d[E+M-1]=z}if(o.t317&&o.t317[0]==2)for(var _=0;_<C;_++){var N=h+_*A;if(b==16)for(var p=S;p<A;p+=2){var R=(d[N+p+1]<<8|d[N+p])+(d[N+p-S+1]<<8|d[N+p-S]);d[N+p]=R&255,d[N+p+1]=R>>>8&255}else if(v==3)for(var p=3;p<A;p+=3)d[N+p]=d[N+p]+d[N+p-3]&255,d[N+p+1]=d[N+p+1]+d[N+p-2]&255,d[N+p+2]=d[N+p+2]+d[N+p-1]&255;else for(var p=S;p<A;p++)d[N+p]=d[N+p]+d[N+p-S]&255}},a.decode._ljpeg_diff=function(o,l,s){var u=a.decode._getbithuff,c,f;return c=u(o,l,s[0],s),f=u(o,l,c,0),f&1<<c-1||(f-=(1<<c)-1),f},a.decode._decodeARW=function(o,l,s,u,c,f){var d=o.t256[0],h=o.t257[0],y=o.t258[0],p=o.isLE?a._binLE:a._binBE,x=d*h==u||d*h*1.5==u;if(!x){h+=8;var g=[s,0,0,0],m=new Uint16Array(32770),b=[3857,3856,3599,3342,3085,2828,2571,2314,2057,1800,1543,1286,1029,772,771,768,514,513],ve,v,S,q,$,C=0,A=a.decode._ljpeg_diff;for(m[0]=15,S=ve=0;ve<18;ve++)for(var _=32768>>>(b[ve]>>>8),v=0;v<_;v++)m[++S]=b[ve];for(q=d;q--;)for($=0;$<h+1;$+=2)if($==h&&($=1),C+=A(l,g,m),$<h){var E=C&4095;a.decode._putsF(c,($*d+q)*y,E<<16-y)}return}if(d*h*1.5==u){for(var ve=0;ve<u;ve+=3){var M=l[s+ve+0],z=l[s+ve+1],N=l[s+ve+2];c[f+ve]=z<<4|M>>>4,c[f+ve+1]=M<<4|N>>>4,c[f+ve+2]=N<<4|z>>>4}return}var R=new Uint16Array(16),$,q,W,Z,te,ne,_e,pe,we,ve,Te,Se=new Uint8Array(d+1);for($=0;$<h;$++){for(var Ie=0;Ie<d;Ie++)Se[Ie]=l[s++];for(Te=0,q=0;q<d-30;Te+=16){for(Z=2047&(W=p.readUint(Se,Te)),te=2047&W>>>11,ne=15&W>>>22,_e=15&W>>>26,pe=0;pe<4&&128<<pe<=Z-te;pe++);for(we=30,ve=0;ve<16;ve++)ve==ne?R[ve]=Z:ve==_e?R[ve]=te:(R[ve]=((p.readUshort(Se,Te+(we>>3))>>>(we&7)&127)<<pe)+te,R[ve]>2047&&(R[ve]=2047),we+=7);for(ve=0;ve<16;ve++,q+=2){var E=R[ve]<<1;a.decode._putsF(c,($*d+q)*y,E<<16-y)}q-=q&1?1:31}}},a.decode._decodeNikon=function(o,l,s,u,c,f,d){var h=[[0,0,1,5,1,1,1,1,1,1,2,0,0,0,0,0,0,5,4,3,6,2,7,1,0,8,9,11,10,12],[0,0,1,5,1,1,1,1,1,1,2,0,0,0,0,0,0,57,90,56,39,22,5,4,3,2,1,0,11,12,12],[0,0,1,4,2,3,1,2,0,0,0,0,0,0,0,0,0,5,4,6,3,7,2,8,1,9,0,10,11,12],[0,0,1,4,3,1,1,1,1,1,2,0,0,0,0,0,0,5,6,4,7,8,3,9,2,1,0,10,11,12,13,14],[0,0,1,5,1,1,1,1,1,1,1,2,0,0,0,0,0,8,92,75,58,41,7,6,5,4,3,2,1,0,13,14],[0,0,1,4,2,2,3,1,2,0,0,0,0,0,0,0,0,7,6,8,5,9,4,10,3,11,12,2,0,1,13,14]],y=o.t256[0],p=o.t257[0],x=o.t258[0],g=0,m=0,b=a.decode._make_decoder,v=a.decode._getbithuff,S=l[0].exifIFD.makerNote,C=S.t150?S.t150:S.t140,A=0,_=C[A++],E=C[A++];(_==73||E==88)&&(A+=2110),_==70&&(g=2),x==14&&(g+=3);for(var M=[[0,0],[0,0]],z=o.isLE?a._binLE:a._binBE,W=0;W<2;W++)for(var N=0;N<2;N++)M[W][N]=z.readShort(C,A),A+=2;var R=1<<x&32767,$=0,q=z.readShort(C,A);A+=2,q>1&&($=Math.floor(R/(q-1))),_==68&&E==32&&$>0&&(m=z.readShort(C,562));var W,Z,te,ne,_e,pe,we=[0,0],ve=b(h[g]),Te=[u,0,0,0];for(Z=0;Z<p;Z++)for(m&&Z==m&&(ve=b(h[g+1])),te=0;te<y;te++){W=v(s,Te,ve[0],ve),ne=W&15,_e=W>>>4,pe=(v(s,Te,ne-_e,0)<<1)+1<<_e>>>1,pe&1<<ne-1||(pe-=(1<<ne)-(_e==0?1:0)),te<2?we[te]=M[Z&1][te]+=pe:we[te&1]+=pe;var Se=Math.min(Math.max(we[te&1],0),(1<<x)-1),Ie=(Z*y+te)*x;a.decode._putsF(f,Ie,Se<<16-x)}},a.decode._putsF=function(o,l,s){s=s<<8-(l&7);var u=l>>>3;o[u]|=s>>>16,o[u+1]|=s>>>8,o[u+2]|=s},a.decode._getbithuff=function(o,l,s,u){var c=0;a.decode._get_byte;var f,d=l[0],h=l[1],y=l[2],p=l[3];if(s==0||y<0)return 0;for(;!p&&y<s&&(f=o[d++])!=-1&&!(p=c);)h=(h<<8)+f,y+=8;if(f=h<<32-y>>>32-s,u?(y-=u[f+1]>>>8,f=u[f+1]&255):y-=s,y<0)throw"e";return l[0]=d,l[1]=h,l[2]=y,l[3]=p,f},a.decode._make_decoder=function(o){var l,s,u,c,f,d=[];for(l=16;l!=0&&!o[l];l--);var h=17;for(d[0]=l,u=s=1;s<=l;s++)for(c=0;c<o[s];c++,++h)for(f=0;f<1<<l-s;f++)u<=1<<l&&(d[u++]=s<<8|o[h]);return d},a.decode._decodeNewJPEG=function(o,l,s,u,c,f){var d=o.t347,h=d?d.length:0,y=new Uint8Array(h+u);if(d){for(var p=216,x=217,g=0,m=0;m<h-1&&!(d[m]==255&&d[m+1]==x);m++)y[g++]=d[m];var b=l[s],v=l[s+1];(b!=255||v!=p)&&(y[g++]=b,y[g++]=v);for(var m=2;m<u;m++)y[g++]=l[s+m]}else for(var m=0;m<u;m++)y[m]=l[s+m];if(o.t262[0]==32803||o.t262[0]==34892){var S=o.t258[0],C=a.LosslessJpegDecode(y),A=C.length;if(S==16)if(o.isLE)for(var m=0;m<A;m++)c[f+(m<<1)]=C[m]&255,c[f+(m<<1)+1]=C[m]>>>8;else for(var m=0;m<A;m++)c[f+(m<<1)]=C[m]>>>8,c[f+(m<<1)+1]=C[m]&255;else if(S==14||S==12)for(var _=16-S,m=0;m<A;m++)a.decode._putsF(c,m*S,C[m]<<_);else throw new Error("unsupported bit depth "+S)}else{var E=new a.JpegDecoder;E.parse(y);for(var M=E.getData(E.width,E.height),m=0;m<M.length;m++)c[f+m]=M[m]}o.t262[0]==6&&(o.t262[0]=2)},a.decode._decodeOldJPEGInit=function(o,l,s,u){var c=216,f=219,d=196,h=221,y=192,p=218,x=0,g=0,m,b,v=!1,S,C,A,_=o.t513,E=_?_[0]:0,M=o.t514,z=M?M[0]:0,N=o.t324||o.t273||_,R=o.t530,$=0,q=0,W=o.t277?o.t277[0]:1,Z=o.t515;if(N&&(g=N[0],v=N.length>1),!v){if(l[s]==255&&l[s+1]==c)return{jpegOffset:s};if(_!=null&&(l[s+E]==255&&l[s+E+1]==c?x=s+E:n("JPEGInterchangeFormat does not point to SOI"),M==null?n("JPEGInterchangeFormatLength field is missing"):(E>=g||E+z<=g)&&n("JPEGInterchangeFormatLength field value is invalid"),x!=null))return{jpegOffset:x}}if(R!=null&&($=R[0],q=R[1]),_!=null&&M!=null)if(z>=2&&E+z<=g){for(l[s+E+z-2]==255&&l[s+E+z-1]==c?m=new Uint8Array(z-2):m=new Uint8Array(z),S=0;S<m.length;S++)m[S]=l[s+E+S];n("Incorrect JPEG interchange format: using JPEGInterchangeFormat offset to derive tables")}else n("JPEGInterchangeFormat+JPEGInterchangeFormatLength > offset to first strip or tile");if(m==null){var te=0,ne=[];ne[te++]=255,ne[te++]=c;var _e=o.t519;if(_e==null)throw new Error("JPEGQTables tag is missing");for(S=0;S<_e.length;S++)for(ne[te++]=255,ne[te++]=f,ne[te++]=0,ne[te++]=67,ne[te++]=S,C=0;C<64;C++)ne[te++]=l[s+_e[S]+C];for(A=0;A<2;A++){var pe=o[A==0?"t520":"t521"];if(pe==null)throw new Error((A==0?"JPEGDCTables":"JPEGACTables")+" tag is missing");for(S=0;S<pe.length;S++){ne[te++]=255,ne[te++]=d;var we=19;for(C=0;C<16;C++)we+=l[s+pe[S]+C];for(ne[te++]=we>>>8,ne[te++]=we&255,ne[te++]=S|A<<4,C=0;C<16;C++)ne[te++]=l[s+pe[S]+C];for(C=0;C<we;C++)ne[te++]=l[s+pe[S]+16+C]}}if(ne[te++]=255,ne[te++]=y,ne[te++]=0,ne[te++]=8+3*W,ne[te++]=8,ne[te++]=o.height>>>8&255,ne[te++]=o.height&255,ne[te++]=o.width>>>8&255,ne[te++]=o.width&255,ne[te++]=W,W==1)ne[te++]=1,ne[te++]=17,ne[te++]=0;else for(S=0;S<3;S++)ne[te++]=S+1,ne[te++]=S!=0?17:($&15)<<4|q&15,ne[te++]=S;Z!=null&&Z[0]!=0&&(ne[te++]=255,ne[te++]=h,ne[te++]=0,ne[te++]=4,ne[te++]=Z[0]>>>8&255,ne[te++]=Z[0]&255),m=new Uint8Array(ne)}var ve=-1;for(S=0;S<m.length-1;){if(m[S]==255&&m[S+1]==y){ve=S;break}S++}if(ve==-1){var Te=new Uint8Array(m.length+10+3*W);Te.set(m);var Se=m.length;if(ve=m.length,m=Te,m[Se++]=255,m[Se++]=y,m[Se++]=0,m[Se++]=8+3*W,m[Se++]=8,m[Se++]=o.height>>>8&255,m[Se++]=o.height&255,m[Se++]=o.width>>>8&255,m[Se++]=o.width&255,m[Se++]=W,W==1)m[Se++]=1,m[Se++]=17,m[Se++]=0;else for(S=0;S<3;S++)m[Se++]=S+1,m[Se++]=S!=0?17:($&15)<<4|q&15,m[Se++]=S}if(l[g]==255&&l[g+1]==p){var Ie=l[g+2]<<8|l[g+3];for(b=new Uint8Array(Ie+2),b[0]=l[g],b[1]=l[g+1],b[2]=l[g+2],b[3]=l[g+3],S=0;S<Ie-2;S++)b[S+4]=l[g+S+4]}else{b=new Uint8Array(8+2*W);var Le=0;if(b[Le++]=255,b[Le++]=p,b[Le++]=0,b[Le++]=6+2*W,b[Le++]=W,W==1)b[Le++]=1,b[Le++]=0;else for(S=0;S<3;S++)b[Le++]=S+1,b[Le++]=S<<4|S;b[Le++]=0,b[Le++]=63,b[Le++]=0}return{jpegOffset:s,tables:m,sosMarker:b,sofPosition:ve}},a.decode._decodeOldJPEG=function(o,l,s,u,c,f){var d,h,y,p,x,g=a.decode._decodeOldJPEGInit(o,l,s,u);if(g.jpegOffset!=null)for(h=s+u-g.jpegOffset,p=new Uint8Array(h),d=0;d<h;d++)p[d]=l[g.jpegOffset+d];else{for(y=g.tables.length,p=new Uint8Array(y+g.sosMarker.length+u+2),p.set(g.tables),x=y,p[g.sofPosition+5]=o.height>>>8&255,p[g.sofPosition+6]=o.height&255,p[g.sofPosition+7]=o.width>>>8&255,p[g.sofPosition+8]=o.width&255,(l[s]!=255||l[s+1]!=SOS)&&(p.set(g.sosMarker,x),x+=sosMarker.length),d=0;d<u;d++)p[x++]=l[s+d];p[x++]=255,p[x++]=EOI}var m=new a.JpegDecoder;m.parse(p);for(var b=m.getData(m.width,m.height),d=0;d<b.length;d++)c[f+d]=b[d];o.t262&&o.t262[0]==6&&(o.t262[0]=2)},a.decode._decodePackBits=function(o,l,s,u,c){for(var f=new Int8Array(o.buffer),d=new Int8Array(u.buffer),h=l+s;l<h;){var y=f[l];if(l++,y>=0&&y<128)for(var p=0;p<y+1;p++)d[c]=f[l],c++,l++;if(y>=-127&&y<0){for(var p=0;p<-y+1;p++)d[c]=f[l],c++;l++}}},a.decode._decodeThunder=function(o,l,s,u,c){for(var f=[0,1,0,-1],d=[0,1,2,3,0,-3,-2,-1],h=l+s,y=c*2,p=0;l<h;){var x=o[l],g=x>>>6,m=x&63;if(l++,g==3&&(p=m&15,u[y>>>1]|=p<<4*(1-y&1),y++),g==0)for(var b=0;b<m;b++)u[y>>>1]|=p<<4*(1-y&1),y++;if(g==2)for(var b=0;b<2;b++){var v=m>>>3*(1-b)&7;v!=4&&(p+=d[v],u[y>>>1]|=p<<4*(1-y&1),y++)}if(g==1)for(var b=0;b<3;b++){var v=m>>>2*(2-b)&3;v!=2&&(p+=f[v],u[y>>>1]|=p<<4*(1-y&1),y++)}}},a.decode._dmap={1:0,"011":1,"000011":2,"0000011":3,"010":-1,"000010":-2,"0000010":-3},a.decode._lens=function(){var o=function(y,p,x,g){for(var m=0;m<p.length;m++)y[p[m]]=x+m*g},l="00110101,000111,0111,1000,1011,1100,1110,1111,10011,10100,00111,01000,001000,000011,110100,110101,101010,101011,0100111,0001100,0001000,0010111,0000011,0000100,0101000,0101011,0010011,0100100,0011000,00000010,00000011,00011010,00011011,00010010,00010011,00010100,00010101,00010110,00010111,00101000,00101001,00101010,00101011,00101100,00101101,00000100,00000101,00001010,00001011,01010010,01010011,01010100,01010101,00100100,00100101,01011000,01011001,01011010,01011011,01001010,01001011,00110010,00110011,00110100",s="0000110111,010,11,10,011,0011,0010,00011,000101,000100,0000100,0000101,0000111,00000100,00000111,000011000,0000010111,0000011000,0000001000,00001100111,00001101000,00001101100,00000110111,00000101000,00000010111,00000011000,000011001010,000011001011,000011001100,000011001101,000001101000,000001101001,000001101010,000001101011,000011010010,000011010011,000011010100,000011010101,000011010110,000011010111,000001101100,000001101101,000011011010,000011011011,000001010100,000001010101,000001010110,000001010111,000001100100,000001100101,000001010010,000001010011,000000100100,000000110111,000000111000,000000100111,000000101000,000001011000,000001011001,000000101011,000000101100,000001011010,000001100110,000001100111",u="11011,10010,010111,0110111,00110110,00110111,01100100,01100101,01101000,01100111,011001100,011001101,011010010,011010011,011010100,011010101,011010110,011010111,011011000,011011001,011011010,011011011,010011000,010011001,010011010,011000,010011011",c="0000001111,000011001000,000011001001,000001011011,000000110011,000000110100,000000110101,0000001101100,0000001101101,0000001001010,0000001001011,0000001001100,0000001001101,0000001110010,0000001110011,0000001110100,0000001110101,0000001110110,0000001110111,0000001010010,0000001010011,0000001010100,0000001010101,0000001011010,0000001011011,0000001100100,0000001100101",f="00000001000,00000001100,00000001101,000000010010,000000010011,000000010100,000000010101,000000010110,000000010111,000000011100,000000011101,000000011110,000000011111";l=l.split(","),s=s.split(","),u=u.split(","),c=c.split(","),f=f.split(",");var d={},h={};return o(d,l,0,1),o(d,u,64,64),o(d,f,1792,64),o(h,s,0,1),o(h,c,64,64),o(h,f,1792,64),[d,h]}(),a.decode._decodeG4=function(o,l,s,u,c,f,d){for(var h=a.decode,y=l<<3,p=0,x="",g=[],m=[],b=0;b<f;b++)m.push(0);m=h._makeDiff(m);for(var v=0,S=0,C=0,A=0,_=0,E=0,M="",z=0,N=Math.ceil(f/8)*8;y>>>3<l+s;){C=h._findDiff(m,v+(v==0?0:1),1-_),A=h._findDiff(m,C,_);var R=0;if(d==1&&(R=o[y>>>3]>>>7-(y&7)&1),d==2&&(R=o[y>>>3]>>>(y&7)&1),y++,x+=R,M=="H"){if(h._lens[_][x]!=null){var $=h._lens[_][x];x="",p+=$,$<64&&(h._addNtimes(g,p,_),v+=p,_=1-_,p=0,z--,z==0&&(M=""))}}else x=="0001"&&(x="",h._addNtimes(g,A-v,_),v=A),x=="001"&&(x="",M="H",z=2),h._dmap[x]!=null&&(S=C+h._dmap[x],h._addNtimes(g,S-v,_),v=S,x="",_=1-_);g.length==f&&M==""&&(h._writeBits(g,u,c*8+E*N),_=0,E++,v=0,m=h._makeDiff(g),g=[])}},a.decode._findDiff=function(o,l,s){for(var u=0;u<o.length;u+=2)if(o[u]>=l&&o[u+1]==s)return o[u]},a.decode._makeDiff=function(o){var l=[];o[0]==1&&l.push(0,1);for(var s=1;s<o.length;s++)o[s-1]!=o[s]&&l.push(s,o[s]);return l.push(o.length,0,o.length,1),l},a.decode._decodeG3=function(o,l,s,u,c,f,d){for(var h=a.decode,y=l<<3,p=0,x="",g=[],m=[],b=0;b<f;b++)g.push(0);for(var v=0,S=0,C=0,A=0,_=0,E=-1,M="",z=0,N=!1,R=Math.ceil(f/8)*8;y>>>3<l+s;){C=h._findDiff(m,v+(v==0?0:1),1-_),A=h._findDiff(m,C,_);var $=0;if(d==1&&($=o[y>>>3]>>>7-(y&7)&1),d==2&&($=o[y>>>3]>>>(y&7)&1),y++,x+=$,N){if(h._lens[_][x]!=null){var q=h._lens[_][x];x="",p+=q,q<64&&(h._addNtimes(g,p,_),_=1-_,p=0)}}else if(M=="H"){if(h._lens[_][x]!=null){var q=h._lens[_][x];x="",p+=q,q<64&&(h._addNtimes(g,p,_),v+=p,_=1-_,p=0,z--,z==0&&(M=""))}}else x=="0001"&&(x="",h._addNtimes(g,A-v,_),v=A),x=="001"&&(x="",M="H",z=2),h._dmap[x]!=null&&(S=C+h._dmap[x],h._addNtimes(g,S-v,_),v=S,x="",_=1-_);x.endsWith("000000000001")&&(E>=0&&h._writeBits(g,u,c*8+E*R),d==1&&(N=(o[y>>>3]>>>7-(y&7)&1)==1),d==2&&(N=(o[y>>>3]>>>(y&7)&1)==1),y++,h._decodeG3.allow2D==null&&(h._decodeG3.allow2D=N),h._decodeG3.allow2D||(N=!0,y--),x="",_=0,E++,v=0,m=h._makeDiff(g),g=[])}g.length==f&&h._writeBits(g,u,c*8+E*R)},a.decode._addNtimes=function(o,l,s){for(var u=0;u<l;u++)o.push(s)},a.decode._writeBits=function(o,l,s){for(var u=0;u<o.length;u++)l[s+u>>>3]|=o[u]<<7-(s+u&7)},a.decode._decodeLZW=function(o,l,s,u){if(a.decode._lzwTab==null){for(var c=new Uint32Array(65535),f=new Uint16Array(65535),x=new Uint8Array(2e6),d=0;d<256;d++)x[d<<2]=d,c[d]=d<<2,f[d]=1;a.decode._lzwTab=[c,f,x]}for(var h=a.decode._copyData,y=a.decode._lzwTab[0],p=a.decode._lzwTab[1],x=a.decode._lzwTab[2],g=258,m=1032,b=9,v=l<<3,S=256,C=257,A=0,_=0,E=0;A=o[v>>>3]<<16|o[v+8>>>3]<<8|o[v+16>>>3],_=A>>24-(v&7)-b&(1<<b)-1,v+=b,_!=C;){if(_==S){if(b=9,g=258,m=1032,A=o[v>>>3]<<16|o[v+8>>>3]<<8|o[v+16>>>3],_=A>>24-(v&7)-b&(1<<b)-1,v+=b,_==C)break;s[u]=_,u++}else if(_<g){var M=y[_],z=p[_];if(h(x,M,s,u,z),u+=z,E>=g)y[g]=m,x[y[g]]=M[0],p[g]=1,m=m+1+3&-4,g++;else{y[g]=m;var N=y[E],R=p[E];h(x,N,x,m,R),x[m+R]=x[M],R++,p[g]=R,g++,m=m+R+3&-4}g+1==1<<b&&b++}else{if(E>=g)y[g]=m,p[g]=0,g++;else{y[g]=m;var N=y[E],R=p[E];h(x,N,x,m,R),x[m+R]=x[m],R++,p[g]=R,g++,h(x,m,s,u,R),u+=R,m=m+R+3&-4}g+1==1<<b&&b++}E=_}},a.decode._copyData=function(o,l,s,u,c){for(var f=0;f<c;f+=4)s[u+f]=o[l+f],s[u+f+1]=o[l+f+1],s[u+f+2]=o[l+f+2],s[u+f+3]=o[l+f+3]},a.tags={},a.ttypes={256:3,257:3,258:3,259:3,262:3,273:4,274:3,277:3,278:4,279:4,282:5,283:5,284:3,286:5,287:5,296:3,305:2,306:2,338:3,513:4,514:4,34665:4},a._readIFD=function(o,l,s,u,c,f){var d=o.readUshort(l,s);s+=2;var h={};u.push(h),f&&n(" ".repeat(c),u.length-1,">>>----------------");for(var y=0;y<d;y++){var p=o.readUshort(l,s);s+=2;var x=o.readUshort(l,s);s+=2;var g=o.readUint(l,s);s+=4;var m=o.readUint(l,s);s+=4;var b=[];if((x==1||x==7)&&(b=new Uint8Array(l.buffer,g<5?s-4:m,g)),x==2){var v=g<5?s-4:m,S=l[v];S<128?b.push(o.readASCII(l,v,g-1)):b=new Uint8Array(l.buffer,v,g-1)}if(x==3)for(var C=0;C<g;C++)b.push(o.readUshort(l,(g<3?s-4:m)+2*C));if(x==4)for(var C=0;C<g;C++)b.push(o.readUint(l,(g<2?s-4:m)+4*C));if(x==5)for(var C=0;C<g;C++)b.push(o.readUint(l,m+C*8)/o.readUint(l,m+C*8+4));if(x==8)for(var C=0;C<g;C++)b.push(o.readShort(l,(g<3?s-4:m)+2*C));if(x==9)for(var C=0;C<g;C++)b.push(o.readInt(l,(g<2?s-4:m)+4*C));if(x==10)for(var C=0;C<g;C++)b.push(o.readInt(l,m+C*8)/o.readInt(l,m+C*8+4));if(x==11)for(var C=0;C<g;C++)b.push(o.readFloat(l,m+C*4));if(x==12)for(var C=0;C<g;C++)b.push(o.readDouble(l,m+C*8));if(h["t"+p]=b,g!=0&&b.length==0&&n("unknown TIFF tag type: ",x,"num:",g),f&&n(" ".repeat(c),p,x,a.tags[p],b),!(p==330&&h.t272&&h.t272[0]=="DSLR-A100")){if(p==330||p==34665||p==50740&&o.readUshort(l,o.readUint(b,0))<300){for(var A=p==50740?[o.readUint(b,0)]:b,_=[],C=0;C<A.length;C++)a._readIFD(o,l,A[C],_,c+1,f);p==330&&(h.subIFD=_),p==34665&&(h.exifIFD=_[0]),p==50740&&(h.dngPrvt=_[0])}}if(p==37500){var E=b;if(o.readASCII(E,0,5)=="Nikon")h.makerNote=a.decode(E.slice(10).buffer)[0];else if(o.readUshort(l,m)<300){var M=[];a._readIFD(o,l,m,M,c+1,f),h.makerNote=M[0]}}}return f&&n(" ".repeat(c),"<<<---------------"),s},a._writeIFD=function(o,l,s,u){var c=Object.keys(u);o.writeUshort(l,s,c.length),s+=2;for(var f=s+c.length*12+4,d=0;d<c.length;d++){var h=c[d],y=parseInt(h.slice(1)),p=a.ttypes[y];if(p==null)throw new Error("unknown type of tag: "+y);var x=u[h];p==2&&(x=x[0]+"\0");var g=x.length;o.writeUshort(l,s,y),s+=2,o.writeUshort(l,s,p),s+=2,o.writeUint(l,s,g),s+=4;var m=[-1,1,1,2,4,8,0,0,0,0,0,0,8][p]*g,b=s;if(m>4&&(o.writeUint(l,s,f),b=f),p==2&&o.writeASCII(l,b,x),p==3)for(var v=0;v<g;v++)o.writeUshort(l,b+2*v,x[v]);if(p==4)for(var v=0;v<g;v++)o.writeUint(l,b+4*v,x[v]);if(p==5)for(var v=0;v<g;v++)o.writeUint(l,b+8*v,Math.round(x[v]*1e4)),o.writeUint(l,b+8*v+4,1e4);if(p==12)for(var v=0;v<g;v++)o.writeDouble(l,b+8*v,x[v]);m>4&&(m+=m&1,f+=m),s+=4}return[s,f]},a.toRGBA8=function(o){var l=o.width,s=o.height,u=l*s,c=u*4,f=o.data,d=new Uint8Array(u*4),h=o.t262?o.t262[0]:2,y=o.t258?Math.min(32,o.t258[0]):1;if(h==0)for(var p=Math.ceil(y*l/8),x=0;x<s;x++){var g=x*p,m=x*l;if(y==1)for(var b=0;b<l;b++){var v=m+b<<2,S=f[g+(b>>3)]>>7-(b&7)&1;d[v]=d[v+1]=d[v+2]=(1-S)*255,d[v+3]=255}if(y==4)for(var b=0;b<l;b++){var v=m+b<<2,S=f[g+(b>>1)]>>4-4*(b&1)&15;d[v]=d[v+1]=d[v+2]=(15-S)*17,d[v+3]=255}if(y==8)for(var b=0;b<l;b++){var v=m+b<<2,S=f[g+b];d[v]=d[v+1]=d[v+2]=255-S,d[v+3]=255}}else if(h==1)for(var p=Math.ceil(y*l/8),x=0;x<s;x++){var g=x*p,m=x*l;if(y==1)for(var b=0;b<l;b++){var v=m+b<<2,S=f[g+(b>>3)]>>7-(b&7)&1;d[v]=d[v+1]=d[v+2]=S*255,d[v+3]=255}if(y==2)for(var b=0;b<l;b++){var v=m+b<<2,S=f[g+(b>>2)]>>6-2*(b&3)&3;d[v]=d[v+1]=d[v+2]=S*85,d[v+3]=255}if(y==8)for(var b=0;b<l;b++){var v=m+b<<2,S=f[g+b];d[v]=d[v+1]=d[v+2]=S,d[v+3]=255}if(y==16)for(var b=0;b<l;b++){var v=m+b<<2,S=f[g+(2*b+1)];d[v]=d[v+1]=d[v+2]=Math.min(255,S),d[v+3]=255}}else if(h==2){var C=o.t258?o.t258.length:3;if(y==8){if(C==4)for(var b=0;b<c;b++)d[b]=f[b];if(C==3)for(var b=0;b<u;b++){var v=b<<2,A=b*3;d[v]=f[A],d[v+1]=f[A+1],d[v+2]=f[A+2],d[v+3]=255}}else{if(C==4)for(var b=0;b<u;b++){var v=b<<2,A=b*8+1;d[v]=f[A],d[v+1]=f[A+2],d[v+2]=f[A+4],d[v+3]=f[A+6]}if(C==3)for(var b=0;b<u;b++){var v=b<<2,A=b*6+1;d[v]=f[A],d[v+1]=f[A+2],d[v+2]=f[A+4],d[v+3]=255}}}else if(h==3)for(var _=o.t320,b=0;b<u;b++){var v=b<<2,E=f[b];d[v]=_[E]>>8,d[v+1]=_[256+E]>>8,d[v+2]=_[512+E]>>8,d[v+3]=255}else if(h==5)for(var C=o.t258?o.t258.length:4,M=C>4?1:0,b=0;b<u;b++){var v=b<<2,z=b*C,N=255-f[z],R=255-f[z+1],$=255-f[z+2],q=(255-f[z+3])*(1/255);d[v]=~~(N*q+.5),d[v+1]=~~(R*q+.5),d[v+2]=~~($*q+.5),d[v+3]=255*(1-M)+f[z+4]*M}else n("Unknown Photometric interpretation: "+h);return d},a.replaceIMG=function(o){o==null&&(o=document.getElementsByTagName("img"));for(var l=["tif","tiff","dng","cr2","nef"],s=0;s<o.length;s++){var u=o[s],c=u.getAttribute("src");if(c!=null){var f=c.split(".").pop().toLowerCase();if(l.indexOf(f)!=-1){var d=new XMLHttpRequest;a._xhrs.push(d),a._imgs.push(u),d.open("GET",c),d.responseType="arraybuffer",d.onload=a._imgLoaded,d.send()}}}},a._xhrs=[],a._imgs=[],a._imgLoaded=function(o){var l=o.target.response,s=a.decode(l),u=s,c=0,f=u[0];s[0].subIFD&&(u=u.concat(s[0].subIFD));for(var d=0;d<u.length;d++){var m=u[d];if(!(m.t258==null||m.t258.length<3)){var h=m.t256*m.t257;h>c&&(c=h,f=m)}}a.decodeImage(l,f,s);var y=a.toRGBA8(f),p=f.width,x=f.height,g=a._xhrs.indexOf(o.target),m=a._imgs[g];a._xhrs.splice(g,1),a._imgs.splice(g,1);var b=document.createElement("canvas");b.width=p,b.height=x;for(var v=b.getContext("2d"),S=v.createImageData(p,x),d=0;d<y.length;d++)S.data[d]=y[d];v.putImageData(S,0,0),m.setAttribute("src",b.toDataURL())},a._binBE={nextZero:function(o,l){for(;o[l]!=0;)l++;return l},readUshort:function(o,l){return o[l]<<8|o[l+1]},readShort:function(o,l){var s=a._binBE.ui8;return s[0]=o[l+1],s[1]=o[l+0],a._binBE.i16[0]},readInt:function(o,l){var s=a._binBE.ui8;return s[0]=o[l+3],s[1]=o[l+2],s[2]=o[l+1],s[3]=o[l+0],a._binBE.i32[0]},readUint:function(o,l){var s=a._binBE.ui8;return s[0]=o[l+3],s[1]=o[l+2],s[2]=o[l+1],s[3]=o[l+0],a._binBE.ui32[0]},readASCII:function(o,l,s){for(var u="",c=0;c<s;c++)u+=String.fromCharCode(o[l+c]);return u},readFloat:function(o,l){for(var s=a._binBE.ui8,u=0;u<4;u++)s[u]=o[l+3-u];return a._binBE.fl32[0]},readDouble:function(o,l){for(var s=a._binBE.ui8,u=0;u<8;u++)s[u]=o[l+7-u];return a._binBE.fl64[0]},writeUshort:function(o,l,s){o[l]=s>>8&255,o[l+1]=s&255},writeUint:function(o,l,s){o[l]=s>>24&255,o[l+1]=s>>16&255,o[l+2]=s>>8&255,o[l+3]=s>>0&255},writeASCII:function(o,l,s){for(var u=0;u<s.length;u++)o[l+u]=s.charCodeAt(u)},writeDouble:function(o,l,s){a._binBE.fl64[0]=s;for(var u=0;u<8;u++)o[l+u]=a._binBE.ui8[7-u]}},a._binBE.ui8=new Uint8Array(8),a._binBE.i16=new Int16Array(a._binBE.ui8.buffer),a._binBE.i32=new Int32Array(a._binBE.ui8.buffer),a._binBE.ui32=new Uint32Array(a._binBE.ui8.buffer),a._binBE.fl32=new Float32Array(a._binBE.ui8.buffer),a._binBE.fl64=new Float64Array(a._binBE.ui8.buffer),a._binLE={nextZero:a._binBE.nextZero,readUshort:function(o,l){return o[l+1]<<8|o[l]},readShort:function(o,l){var s=a._binBE.ui8;return s[0]=o[l+0],s[1]=o[l+1],a._binBE.i16[0]},readInt:function(o,l){var s=a._binBE.ui8;return s[0]=o[l+0],s[1]=o[l+1],s[2]=o[l+2],s[3]=o[l+3],a._binBE.i32[0]},readUint:function(o,l){var s=a._binBE.ui8;return s[0]=o[l+0],s[1]=o[l+1],s[2]=o[l+2],s[3]=o[l+3],a._binBE.ui32[0]},readASCII:a._binBE.readASCII,readFloat:function(o,l){for(var s=a._binBE.ui8,u=0;u<4;u++)s[u]=o[l+u];return a._binBE.fl32[0]},readDouble:function(o,l){for(var s=a._binBE.ui8,u=0;u<8;u++)s[u]=o[l+u];return a._binBE.fl64[0]}},a._copyTile=function(o,l,s,u,c,f,d,h){for(var y=Math.min(l,c-d),p=Math.min(s,f-h),x=0;x<p;x++)for(var g=(h+x)*c+d,m=x*l,b=0;b<y;b++)u[g+b]=o[m+b]},a.LosslessJpegDecode=function(){function o(c){this.w=c,this.N=0,this._=0,this.G=0}o.prototype={t:function(c){this.N=Math.max(0,Math.min(this.w.length,c))},i:function(){return this.w[this.N++]},l:function(){var c=this.N;return this.N+=2,this.w[c]<<8|this.w[c+1]},J:function(){return this._==0&&(this.G=this.w[this.N],this.N+=1+(this.G+1>>>8),this._=8),this.G>>>--this._&1},Z:function(c){var f=this._,d=this.G,h=Math.min(f,c);c-=h,f-=h;for(var y=d>>>f&(1<<h)-1;c>0;)d=this.w[this.N],this.N+=1+(d+1>>>8),h=Math.min(8,c),c-=h,f=8-h,y<<=h,y|=d>>>f&(1<<h)-1;return this._=f,this.G=d,y}};var l={};l.X=function(){return[0,0,-1]},l.s=function(c,f,d){c[l.Y(c,0,d)+2]=f},l.Y=function(c,f,d){if(c[f+2]!=-1)return 0;if(d==0)return f;for(var h=0;h<2;h++){c[f+h]==0&&(c[f+h]=c.length,c.push(0),c.push(0),c.push(-1));var y=l.Y(c,c[f+h],d-1);if(y!=0)return y}return 0},l.B=function(c,f){for(var d=0,h=0,y=0,p=f._,x=f.G,g=f.N;;)if(p==0&&(x=f.w[g],g+=1+(x+1>>>8),p=8),y=x>>>--p&1,d=c[d+y],h=c[d+2],h!=-1)return f._=p,f.G=x,f.N=g,h;return-1};function s(c){this.z=new o(c),this.D(this.z)}s.prototype={$:function(c,f){this.Q=c.i(),this.F=c.l(),this.o=c.l();var d=this.O=c.i();this.L=[];for(var h=0;h<d;h++){var y=c.i();c.i(),c.i(),this.L[y]=h}c.t(c.N+f-(6+d*3))},e:function(){var c=0,f=this.z.i();this.H==null&&(this.H={});for(var d=this.H[f]=l.X(),h=[],y=0;y<16;y++)h[y]=this.z.i(),c+=h[y];for(var y=0;y<16;y++)for(var p=0;p<h[y];p++)l.s(d,this.z.i(),y+1);return c+17},W:function(c){for(;c>0;)c-=this.e()},p:function(c,f){var d=c.i();this.U||(this.U=[]);for(var h=0;h<d;h++){var y=c.i(),p=c.i();this.U[this.L[y]]=this.H[p>>>4]}this.g=c.i(),c.t(c.N+f-(2+d*2))},D:function(c){var f=!1,d=c.l();if(d===s.q)do{var d=c.l(),h=c.l()-2;switch(d){case s.m:this.$(c,h);break;case s.K:this.W(h);break;case s.V:this.p(c,h),f=!0;break;default:c.t(c.N+h);break}}while(!f)},I:function(c,f){var d=l.B(f,c);if(d==16)return-32768;var h=c.Z(d);return h&1<<d-1||(h-=(1<<d)-1),h},B:function(c,f){for(var d=this.z,h=this.O,y=this.F,p=this.I,x=this.g,g=this.o*h,m=this.U,b=0;b<h;b++)c[b]=p(d,m[b])+(1<<this.Q-1);for(var v=h;v<g;v+=h)for(var b=0;b<h;b++)c[v+b]=p(d,m[b])+c[v+b-h];for(var S=f,C=1;C<y;C++){for(var b=0;b<h;b++)c[S+b]=p(d,m[b])+c[S+b-f];for(var v=h;v<g;v+=h)for(var b=0;b<h;b++){var A=S+v+b,_=c[A-h];x==6&&(_=c[A-f]+(_-c[A-h-f]>>>1)),c[A]=_+p(d,m[b])}S+=f}}},s.m=65475,s.K=65476,s.q=65496,s.V=65498;function u(c){var f=new s(c),d=f.Q>8?Uint16Array:Uint8Array,h=new d(f.o*f.F*f.O),y=f.o*f.O;return f.B(h,y),h}return u}()})(t,r)})()})(rm);var Sm=rm.exports;const TS=ln({__proto__:null,default:tm(Sm)},[Sm]);/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const MS=4,Cm=0,Am=1,DS=2;function To(e){let t=e.length;for(;--t>=0;)e[t]=0}const IS=0,Em=1,zS=2,FS=3,OS=258,kf=29,Ol=256,Pl=Ol+1+kf,Mo=30,Sf=19,Tm=2*Pl+1,Hi=15,Cf=16,PS=7,Af=256,Mm=16,Dm=17,Im=18,Ef=new Uint8Array([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]),M0=new Uint8Array([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]),RS=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),zm=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),LS=512,Ga=new Array((Pl+2)*2);To(Ga);const Rl=new Array(Mo*2);To(Rl);const Ll=new Array(LS);To(Ll);const Bl=new Array(OS-FS+1);To(Bl);const Tf=new Array(kf);To(Tf);const D0=new Array(Mo);To(D0);function Mf(e,t,r,n,a){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=a,this.has_stree=e&&e.length}let Fm,Om,Pm;function Df(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}const Rm=e=>e<256?Ll[e]:Ll[256+(e>>>7)],Nl=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},cn=(e,t,r)=>{e.bi_valid>Cf-r?(e.bi_buf|=t<<e.bi_valid&65535,Nl(e,e.bi_buf),e.bi_buf=t>>Cf-e.bi_valid,e.bi_valid+=r-Cf):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)},xa=(e,t,r)=>{cn(e,r[t*2],r[t*2+1])},Lm=(e,t)=>{let r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1},BS=e=>{e.bi_valid===16?(Nl(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},NS=(e,t)=>{const r=t.dyn_tree,n=t.max_code,a=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,l=t.stat_desc.extra_base,s=t.stat_desc.max_length;let u,c,f,d,h,y,p=0;for(d=0;d<=Hi;d++)e.bl_count[d]=0;for(r[e.heap[e.heap_max]*2+1]=0,u=e.heap_max+1;u<Tm;u++)c=e.heap[u],d=r[r[c*2+1]*2+1]+1,d>s&&(d=s,p++),r[c*2+1]=d,!(c>n)&&(e.bl_count[d]++,h=0,c>=l&&(h=o[c-l]),y=r[c*2],e.opt_len+=y*(d+h),i&&(e.static_len+=y*(a[c*2+1]+h)));if(p!==0){do{for(d=s-1;e.bl_count[d]===0;)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[s]--,p-=2}while(p>0);for(d=s;d!==0;d--)for(c=e.bl_count[d];c!==0;)f=e.heap[--u],!(f>n)&&(r[f*2+1]!==d&&(e.opt_len+=(d-r[f*2+1])*r[f*2],r[f*2+1]=d),c--)}},Bm=(e,t,r)=>{const n=new Array(Hi+1);let a=0,i,o;for(i=1;i<=Hi;i++)a=a+r[i-1]<<1,n[i]=a;for(o=0;o<=t;o++){let l=e[o*2+1];l!==0&&(e[o*2]=Lm(n[l]++,l))}},$S=()=>{let e,t,r,n,a;const i=new Array(Hi+1);for(r=0,n=0;n<kf-1;n++)for(Tf[n]=r,e=0;e<1<<Ef[n];e++)Bl[r++]=n;for(Bl[r-1]=n,a=0,n=0;n<16;n++)for(D0[n]=a,e=0;e<1<<M0[n];e++)Ll[a++]=n;for(a>>=7;n<Mo;n++)for(D0[n]=a<<7,e=0;e<1<<M0[n]-7;e++)Ll[256+a++]=n;for(t=0;t<=Hi;t++)i[t]=0;for(e=0;e<=143;)Ga[e*2+1]=8,e++,i[8]++;for(;e<=255;)Ga[e*2+1]=9,e++,i[9]++;for(;e<=279;)Ga[e*2+1]=7,e++,i[7]++;for(;e<=287;)Ga[e*2+1]=8,e++,i[8]++;for(Bm(Ga,Pl+1,i),e=0;e<Mo;e++)Rl[e*2+1]=5,Rl[e*2]=Lm(e,5);Fm=new Mf(Ga,Ef,Ol+1,Pl,Hi),Om=new Mf(Rl,M0,0,Mo,Hi),Pm=new Mf(new Array(0),RS,0,Sf,PS)},Nm=e=>{let t;for(t=0;t<Pl;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Mo;t++)e.dyn_dtree[t*2]=0;for(t=0;t<Sf;t++)e.bl_tree[t*2]=0;e.dyn_ltree[Af*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},$m=e=>{e.bi_valid>8?Nl(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Um=(e,t,r,n)=>{const a=t*2,i=r*2;return e[a]<e[i]||e[a]===e[i]&&n[t]<=n[r]},If=(e,t,r)=>{const n=e.heap[r];let a=r<<1;for(;a<=e.heap_len&&(a<e.heap_len&&Um(t,e.heap[a+1],e.heap[a],e.depth)&&a++,!Um(t,n,e.heap[a],e.depth));)e.heap[r]=e.heap[a],r=a,a<<=1;e.heap[r]=n},Hm=(e,t,r)=>{let n,a,i=0,o,l;if(e.sym_next!==0)do n=e.pending_buf[e.sym_buf+i++]&255,n+=(e.pending_buf[e.sym_buf+i++]&255)<<8,a=e.pending_buf[e.sym_buf+i++],n===0?xa(e,a,t):(o=Bl[a],xa(e,o+Ol+1,t),l=Ef[o],l!==0&&(a-=Tf[o],cn(e,a,l)),n--,o=Rm(n),xa(e,o,r),l=M0[o],l!==0&&(n-=D0[o],cn(e,n,l)));while(i<e.sym_next);xa(e,Af,t)},zf=(e,t)=>{const r=t.dyn_tree,n=t.stat_desc.static_tree,a=t.stat_desc.has_stree,i=t.stat_desc.elems;let o,l,s=-1,u;for(e.heap_len=0,e.heap_max=Tm,o=0;o<i;o++)r[o*2]!==0?(e.heap[++e.heap_len]=s=o,e.depth[o]=0):r[o*2+1]=0;for(;e.heap_len<2;)u=e.heap[++e.heap_len]=s<2?++s:0,r[u*2]=1,e.depth[u]=0,e.opt_len--,a&&(e.static_len-=n[u*2+1]);for(t.max_code=s,o=e.heap_len>>1;o>=1;o--)If(e,r,o);u=i;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],If(e,r,1),l=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=l,r[u*2]=r[o*2]+r[l*2],e.depth[u]=(e.depth[o]>=e.depth[l]?e.depth[o]:e.depth[l])+1,r[o*2+1]=r[l*2+1]=u,e.heap[1]=u++,If(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],NS(e,t),Bm(r,s,e.bl_count)},jm=(e,t,r)=>{let n,a=-1,i,o=t[0*2+1],l=0,s=7,u=4;for(o===0&&(s=138,u=3),t[(r+1)*2+1]=65535,n=0;n<=r;n++)i=o,o=t[(n+1)*2+1],!(++l<s&&i===o)&&(l<u?e.bl_tree[i*2]+=l:i!==0?(i!==a&&e.bl_tree[i*2]++,e.bl_tree[Mm*2]++):l<=10?e.bl_tree[Dm*2]++:e.bl_tree[Im*2]++,l=0,a=i,o===0?(s=138,u=3):i===o?(s=6,u=3):(s=7,u=4))},Gm=(e,t,r)=>{let n,a=-1,i,o=t[0*2+1],l=0,s=7,u=4;for(o===0&&(s=138,u=3),n=0;n<=r;n++)if(i=o,o=t[(n+1)*2+1],!(++l<s&&i===o)){if(l<u)do xa(e,i,e.bl_tree);while(--l!==0);else i!==0?(i!==a&&(xa(e,i,e.bl_tree),l--),xa(e,Mm,e.bl_tree),cn(e,l-3,2)):l<=10?(xa(e,Dm,e.bl_tree),cn(e,l-3,3)):(xa(e,Im,e.bl_tree),cn(e,l-11,7));l=0,a=i,o===0?(s=138,u=3):i===o?(s=6,u=3):(s=7,u=4)}},US=e=>{let t;for(jm(e,e.dyn_ltree,e.l_desc.max_code),jm(e,e.dyn_dtree,e.d_desc.max_code),zf(e,e.bl_desc),t=Sf-1;t>=3&&e.bl_tree[zm[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},HS=(e,t,r,n)=>{let a;for(cn(e,t-257,5),cn(e,r-1,5),cn(e,n-4,4),a=0;a<n;a++)cn(e,e.bl_tree[zm[a]*2+1],3);Gm(e,e.dyn_ltree,t-1),Gm(e,e.dyn_dtree,r-1)},jS=e=>{let t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return Cm;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return Am;for(r=32;r<Ol;r++)if(e.dyn_ltree[r*2]!==0)return Am;return Cm};let Vm=!1;const GS=e=>{Vm||($S(),Vm=!0),e.l_desc=new Df(e.dyn_ltree,Fm),e.d_desc=new Df(e.dyn_dtree,Om),e.bl_desc=new Df(e.bl_tree,Pm),e.bi_buf=0,e.bi_valid=0,Nm(e)},qm=(e,t,r,n)=>{cn(e,(IS<<1)+(n?1:0),3),$m(e),Nl(e,r),Nl(e,~r),r&&e.pending_buf.set(e.window.subarray(t,t+r),e.pending),e.pending+=r},VS=e=>{cn(e,Em<<1,3),xa(e,Af,Ga),BS(e)},qS=(e,t,r,n)=>{let a,i,o=0;e.level>0?(e.strm.data_type===DS&&(e.strm.data_type=jS(e)),zf(e,e.l_desc),zf(e,e.d_desc),o=US(e),a=e.opt_len+3+7>>>3,i=e.static_len+3+7>>>3,i<=a&&(a=i)):a=i=r+5,r+4<=a&&t!==-1?qm(e,t,r,n):e.strategy===MS||i===a?(cn(e,(Em<<1)+(n?1:0),3),Hm(e,Ga,Rl)):(cn(e,(zS<<1)+(n?1:0),3),HS(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),Hm(e,e.dyn_ltree,e.dyn_dtree)),Nm(e),n&&$m(e)},WS=(e,t,r)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=r,t===0?e.dyn_ltree[r*2]++:(e.matches++,t--,e.dyn_ltree[(Bl[r]+Ol+1)*2]++,e.dyn_dtree[Rm(t)*2]++),e.sym_next===e.sym_end);var KS=GS,XS=qm,YS=qS,ZS=WS,JS=VS,QS={_tr_init:KS,_tr_stored_block:XS,_tr_flush_block:YS,_tr_tally:ZS,_tr_align:JS},$l=(e,t,r,n)=>{let a=e&65535|0,i=e>>>16&65535|0,o=0;for(;r!==0;){o=r>2e3?2e3:r,r-=o;do a=a+t[n++]|0,i=i+a|0;while(--o);a%=65521,i%=65521}return a|i<<16|0};const eC=()=>{let e,t=[];for(var r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e}return t},tC=new Uint32Array(eC());var Mr=(e,t,r,n)=>{const a=tC,i=n+r;e^=-1;for(let o=n;o<i;o++)e=e>>>8^a[(e^t[o])&255];return e^-1},ji={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"},I0={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_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:rC,_tr_stored_block:Ff,_tr_flush_block:nC,_tr_tally:mi,_tr_align:aC}=QS,{Z_NO_FLUSH:gi,Z_PARTIAL_FLUSH:iC,Z_FULL_FLUSH:oC,Z_FINISH:Pn,Z_BLOCK:Wm,Z_OK:Nr,Z_STREAM_END:Km,Z_STREAM_ERROR:_a,Z_DATA_ERROR:lC,Z_BUF_ERROR:Of,Z_DEFAULT_COMPRESSION:sC,Z_FILTERED:uC,Z_HUFFMAN_ONLY:z0,Z_RLE:cC,Z_FIXED:fC,Z_DEFAULT_STRATEGY:dC,Z_UNKNOWN:hC,Z_DEFLATED:F0}=I0,pC=9,vC=15,mC=8,Pf=256+1+29,gC=30,bC=19,yC=2*Pf+1,xC=15,Ft=3,bi=258,wa=bi+Ft+1,_C=32,Do=42,Rf=57,Lf=69,Bf=73,Nf=91,$f=103,Gi=113,Ul=666,nn=1,Io=2,Vi=3,zo=4,wC=3,qi=(e,t)=>(e.msg=ji[t],t),Xm=e=>e*2-(e>4?9:0),yi=e=>{let t=e.length;for(;--t>=0;)e[t]=0},kC=e=>{let t,r,n,a=e.w_size;t=e.hash_size,n=t;do r=e.head[--n],e.head[n]=r>=a?r-a:0;while(--t);t=a,n=t;do r=e.prev[--n],e.prev[n]=r>=a?r-a:0;while(--t)};let xi=(e,t,r)=>(t<<e.hash_shift^r)&e.hash_mask;const yn=e=>{const t=e.state;let r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+r),e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,t.pending===0&&(t.pending_out=0))},xn=(e,t)=>{nC(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,yn(e.strm)},jt=(e,t)=>{e.pending_buf[e.pending++]=t},Hl=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},Uf=(e,t,r,n)=>{let a=e.avail_in;return a>n&&(a=n),a===0?0:(e.avail_in-=a,t.set(e.input.subarray(e.next_in,e.next_in+a),r),e.state.wrap===1?e.adler=$l(e.adler,t,a,r):e.state.wrap===2&&(e.adler=Mr(e.adler,t,a,r)),e.next_in+=a,e.total_in+=a,a)},Ym=(e,t)=>{let r=e.max_chain_length,n=e.strstart,a,i,o=e.prev_length,l=e.nice_match;const s=e.strstart>e.w_size-wa?e.strstart-(e.w_size-wa):0,u=e.window,c=e.w_mask,f=e.prev,d=e.strstart+bi;let h=u[n+o-1],y=u[n+o];e.prev_length>=e.good_match&&(r>>=2),l>e.lookahead&&(l=e.lookahead);do if(a=t,!(u[a+o]!==y||u[a+o-1]!==h||u[a]!==u[n]||u[++a]!==u[n+1])){n+=2,a++;do;while(u[++n]===u[++a]&&u[++n]===u[++a]&&u[++n]===u[++a]&&u[++n]===u[++a]&&u[++n]===u[++a]&&u[++n]===u[++a]&&u[++n]===u[++a]&&u[++n]===u[++a]&&n<d);if(i=bi-(d-n),n=d-bi,i>o){if(e.match_start=t,o=i,i>=l)break;h=u[n+o-1],y=u[n+o]}}while((t=f[t&c])>s&&--r!==0);return o<=e.lookahead?o:e.lookahead},Fo=e=>{const t=e.w_size;let r,n,a;do{if(n=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-wa)&&(e.window.set(e.window.subarray(t,t+t-n),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),kC(e),n+=t),e.strm.avail_in===0)break;if(r=Uf(e.strm,e.window,e.strstart+e.lookahead,n),e.lookahead+=r,e.lookahead+e.insert>=Ft)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=xi(e,e.ins_h,e.window[a+1]);e.insert&&(e.ins_h=xi(e,e.ins_h,e.window[a+Ft-1]),e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<Ft)););}while(e.lookahead<wa&&e.strm.avail_in!==0)},Zm=(e,t)=>{let r=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,n,a,i,o=0,l=e.strm.avail_in;do{if(n=65535,i=e.bi_valid+42>>3,e.strm.avail_out<i||(i=e.strm.avail_out-i,a=e.strstart-e.block_start,n>a+e.strm.avail_in&&(n=a+e.strm.avail_in),n>i&&(n=i),n<r&&(n===0&&t!==Pn||t===gi||n!==a+e.strm.avail_in)))break;o=t===Pn&&n===a+e.strm.avail_in?1:0,Ff(e,0,0,o),e.pending_buf[e.pending-4]=n,e.pending_buf[e.pending-3]=n>>8,e.pending_buf[e.pending-2]=~n,e.pending_buf[e.pending-1]=~n>>8,yn(e.strm),a&&(a>n&&(a=n),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+a),e.strm.next_out),e.strm.next_out+=a,e.strm.avail_out-=a,e.strm.total_out+=a,e.block_start+=a,n-=a),n&&(Uf(e.strm,e.strm.output,e.strm.next_out,n),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n)}while(o===0);return l-=e.strm.avail_in,l&&(l>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=l&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-l,e.strm.next_in),e.strstart),e.strstart+=l,e.insert+=l>e.w_size-e.insert?e.w_size-e.insert:l),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),o?zo:t!==gi&&t!==Pn&&e.strm.avail_in===0&&e.strstart===e.block_start?Io:(i=e.window_size-e.strstart,e.strm.avail_in>i&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,i+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),i>e.strm.avail_in&&(i=e.strm.avail_in),i&&(Uf(e.strm,e.window,e.strstart,i),e.strstart+=i,e.insert+=i>e.w_size-e.insert?e.w_size-e.insert:i),e.high_water<e.strstart&&(e.high_water=e.strstart),i=e.bi_valid+42>>3,i=e.pending_buf_size-i>65535?65535:e.pending_buf_size-i,r=i>e.w_size?e.w_size:i,a=e.strstart-e.block_start,(a>=r||(a||t===Pn)&&t!==gi&&e.strm.avail_in===0&&a<=i)&&(n=a>i?i:a,o=t===Pn&&e.strm.avail_in===0&&n===a?1:0,Ff(e,e.block_start,n,o),e.block_start+=n,yn(e.strm)),o?Vi:nn)},Hf=(e,t)=>{let r,n;for(;;){if(e.lookahead<wa){if(Fo(e),e.lookahead<wa&&t===gi)return nn;if(e.lookahead===0)break}if(r=0,e.lookahead>=Ft&&(e.ins_h=xi(e,e.ins_h,e.window[e.strstart+Ft-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),r!==0&&e.strstart-r<=e.w_size-wa&&(e.match_length=Ym(e,r)),e.match_length>=Ft)if(n=mi(e,e.strstart-e.match_start,e.match_length-Ft),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=Ft){e.match_length--;do e.strstart++,e.ins_h=xi(e,e.ins_h,e.window[e.strstart+Ft-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=xi(e,e.ins_h,e.window[e.strstart+1]);else n=mi(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(xn(e,!1),e.strm.avail_out===0))return nn}return e.insert=e.strstart<Ft-1?e.strstart:Ft-1,t===Pn?(xn(e,!0),e.strm.avail_out===0?Vi:zo):e.sym_next&&(xn(e,!1),e.strm.avail_out===0)?nn:Io},Oo=(e,t)=>{let r,n,a;for(;;){if(e.lookahead<wa){if(Fo(e),e.lookahead<wa&&t===gi)return nn;if(e.lookahead===0)break}if(r=0,e.lookahead>=Ft&&(e.ins_h=xi(e,e.ins_h,e.window[e.strstart+Ft-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=Ft-1,r!==0&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-wa&&(e.match_length=Ym(e,r),e.match_length<=5&&(e.strategy===uC||e.match_length===Ft&&e.strstart-e.match_start>4096)&&(e.match_length=Ft-1)),e.prev_length>=Ft&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-Ft,n=mi(e,e.strstart-1-e.prev_match,e.prev_length-Ft),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=a&&(e.ins_h=xi(e,e.ins_h,e.window[e.strstart+Ft-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=Ft-1,e.strstart++,n&&(xn(e,!1),e.strm.avail_out===0))return nn}else if(e.match_available){if(n=mi(e,0,e.window[e.strstart-1]),n&&xn(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return nn}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=mi(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<Ft-1?e.strstart:Ft-1,t===Pn?(xn(e,!0),e.strm.avail_out===0?Vi:zo):e.sym_next&&(xn(e,!1),e.strm.avail_out===0)?nn:Io},SC=(e,t)=>{let r,n,a,i;const o=e.window;for(;;){if(e.lookahead<=bi){if(Fo(e),e.lookahead<=bi&&t===gi)return nn;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=Ft&&e.strstart>0&&(a=e.strstart-1,n=o[a],n===o[++a]&&n===o[++a]&&n===o[++a])){i=e.strstart+bi;do;while(n===o[++a]&&n===o[++a]&&n===o[++a]&&n===o[++a]&&n===o[++a]&&n===o[++a]&&n===o[++a]&&n===o[++a]&&a<i);e.match_length=bi-(i-a),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=Ft?(r=mi(e,1,e.match_length-Ft),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=mi(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(xn(e,!1),e.strm.avail_out===0))return nn}return e.insert=0,t===Pn?(xn(e,!0),e.strm.avail_out===0?Vi:zo):e.sym_next&&(xn(e,!1),e.strm.avail_out===0)?nn:Io},CC=(e,t)=>{let r;for(;;){if(e.lookahead===0&&(Fo(e),e.lookahead===0)){if(t===gi)return nn;break}if(e.match_length=0,r=mi(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(xn(e,!1),e.strm.avail_out===0))return nn}return e.insert=0,t===Pn?(xn(e,!0),e.strm.avail_out===0?Vi:zo):e.sym_next&&(xn(e,!1),e.strm.avail_out===0)?nn:Io};function ka(e,t,r,n,a){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=a}const jl=[new ka(0,0,0,0,Zm),new ka(4,4,8,4,Hf),new ka(4,5,16,8,Hf),new ka(4,6,32,32,Hf),new ka(4,4,16,16,Oo),new ka(8,16,32,32,Oo),new ka(8,16,128,128,Oo),new ka(8,32,128,256,Oo),new ka(32,128,258,1024,Oo),new ka(32,258,258,4096,Oo)],AC=e=>{e.window_size=2*e.w_size,yi(e.head),e.max_lazy_match=jl[e.level].max_lazy,e.good_match=jl[e.level].good_length,e.nice_match=jl[e.level].nice_length,e.max_chain_length=jl[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=Ft-1,e.match_available=0,e.ins_h=0};function EC(){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=F0,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 Uint16Array(yC*2),this.dyn_dtree=new Uint16Array((2*gC+1)*2),this.bl_tree=new Uint16Array((2*bC+1)*2),yi(this.dyn_ltree),yi(this.dyn_dtree),yi(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(xC+1),this.heap=new Uint16Array(2*Pf+1),yi(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Pf+1),yi(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Gl=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==Do&&t.status!==Rf&&t.status!==Lf&&t.status!==Bf&&t.status!==Nf&&t.status!==$f&&t.status!==Gi&&t.status!==Ul?1:0},Jm=e=>{if(Gl(e))return qi(e,_a);e.total_in=e.total_out=0,e.data_type=hC;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?Rf:t.wrap?Do:Gi,e.adler=t.wrap===2?0:1,t.last_flush=-2,rC(t),Nr},Qm=e=>{const t=Jm(e);return t===Nr&&AC(e.state),t},TC=(e,t)=>Gl(e)||e.state.wrap!==2?_a:(e.state.gzhead=t,Nr),e2=(e,t,r,n,a,i)=>{if(!e)return _a;let o=1;if(t===sC&&(t=6),n<0?(o=0,n=-n):n>15&&(o=2,n-=16),a<1||a>pC||r!==F0||n<8||n>15||t<0||t>9||i<0||i>fC||n===8&&o!==1)return qi(e,_a);n===8&&(n=9);const l=new EC;return e.state=l,l.strm=e,l.status=Do,l.wrap=o,l.gzhead=null,l.w_bits=n,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=a+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+Ft-1)/Ft),l.window=new Uint8Array(l.w_size*2),l.head=new Uint16Array(l.hash_size),l.prev=new Uint16Array(l.w_size),l.lit_bufsize=1<<a+6,l.pending_buf_size=l.lit_bufsize*4,l.pending_buf=new Uint8Array(l.pending_buf_size),l.sym_buf=l.lit_bufsize,l.sym_end=(l.lit_bufsize-1)*3,l.level=t,l.strategy=i,l.method=r,Qm(e)},MC=(e,t)=>e2(e,t,F0,vC,mC,dC),DC=(e,t)=>{if(Gl(e)||t>Wm||t<0)return e?qi(e,_a):_a;const r=e.state;if(!e.output||e.avail_in!==0&&!e.input||r.status===Ul&&t!==Pn)return qi(e,e.avail_out===0?Of:_a);const n=r.last_flush;if(r.last_flush=t,r.pending!==0){if(yn(e),e.avail_out===0)return r.last_flush=-1,Nr}else if(e.avail_in===0&&Xm(t)<=Xm(n)&&t!==Pn)return qi(e,Of);if(r.status===Ul&&e.avail_in!==0)return qi(e,Of);if(r.status===Do&&r.wrap===0&&(r.status=Gi),r.status===Do){let a=F0+(r.w_bits-8<<4)<<8,i=-1;if(r.strategy>=z0||r.level<2?i=0:r.level<6?i=1:r.level===6?i=2:i=3,a|=i<<6,r.strstart!==0&&(a|=_C),a+=31-a%31,Hl(r,a),r.strstart!==0&&(Hl(r,e.adler>>>16),Hl(r,e.adler&65535)),e.adler=1,r.status=Gi,yn(e),r.pending!==0)return r.last_flush=-1,Nr}if(r.status===Rf){if(e.adler=0,jt(r,31),jt(r,139),jt(r,8),r.gzhead)jt(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),jt(r,r.gzhead.time&255),jt(r,r.gzhead.time>>8&255),jt(r,r.gzhead.time>>16&255),jt(r,r.gzhead.time>>24&255),jt(r,r.level===9?2:r.strategy>=z0||r.level<2?4:0),jt(r,r.gzhead.os&255),r.gzhead.extra&&r.gzhead.extra.length&&(jt(r,r.gzhead.extra.length&255),jt(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=Mr(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=Lf;else if(jt(r,0),jt(r,0),jt(r,0),jt(r,0),jt(r,0),jt(r,r.level===9?2:r.strategy>=z0||r.level<2?4:0),jt(r,wC),r.status=Gi,yn(e),r.pending!==0)return r.last_flush=-1,Nr}if(r.status===Lf){if(r.gzhead.extra){let a=r.pending,i=(r.gzhead.extra.length&65535)-r.gzindex;for(;r.pending+i>r.pending_buf_size;){let l=r.pending_buf_size-r.pending;if(r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+l),r.pending),r.pending=r.pending_buf_size,r.gzhead.hcrc&&r.pending>a&&(e.adler=Mr(e.adler,r.pending_buf,r.pending-a,a)),r.gzindex+=l,yn(e),r.pending!==0)return r.last_flush=-1,Nr;a=0,i-=l}let o=new Uint8Array(r.gzhead.extra);r.pending_buf.set(o.subarray(r.gzindex,r.gzindex+i),r.pending),r.pending+=i,r.gzhead.hcrc&&r.pending>a&&(e.adler=Mr(e.adler,r.pending_buf,r.pending-a,a)),r.gzindex=0}r.status=Bf}if(r.status===Bf){if(r.gzhead.name){let a=r.pending,i;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>a&&(e.adler=Mr(e.adler,r.pending_buf,r.pending-a,a)),yn(e),r.pending!==0)return r.last_flush=-1,Nr;a=0}r.gzindex<r.gzhead.name.length?i=r.gzhead.name.charCodeAt(r.gzindex++)&255:i=0,jt(r,i)}while(i!==0);r.gzhead.hcrc&&r.pending>a&&(e.adler=Mr(e.adler,r.pending_buf,r.pending-a,a)),r.gzindex=0}r.status=Nf}if(r.status===Nf){if(r.gzhead.comment){let a=r.pending,i;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>a&&(e.adler=Mr(e.adler,r.pending_buf,r.pending-a,a)),yn(e),r.pending!==0)return r.last_flush=-1,Nr;a=0}r.gzindex<r.gzhead.comment.length?i=r.gzhead.comment.charCodeAt(r.gzindex++)&255:i=0,jt(r,i)}while(i!==0);r.gzhead.hcrc&&r.pending>a&&(e.adler=Mr(e.adler,r.pending_buf,r.pending-a,a))}r.status=$f}if(r.status===$f){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size&&(yn(e),r.pending!==0))return r.last_flush=-1,Nr;jt(r,e.adler&255),jt(r,e.adler>>8&255),e.adler=0}if(r.status=Gi,yn(e),r.pending!==0)return r.last_flush=-1,Nr}if(e.avail_in!==0||r.lookahead!==0||t!==gi&&r.status!==Ul){let a=r.level===0?Zm(r,t):r.strategy===z0?CC(r,t):r.strategy===cC?SC(r,t):jl[r.level].func(r,t);if((a===Vi||a===zo)&&(r.status=Ul),a===nn||a===Vi)return e.avail_out===0&&(r.last_flush=-1),Nr;if(a===Io&&(t===iC?aC(r):t!==Wm&&(Ff(r,0,0,!1),t===oC&&(yi(r.head),r.lookahead===0&&(r.strstart=0,r.block_start=0,r.insert=0))),yn(e),e.avail_out===0))return r.last_flush=-1,Nr}return t!==Pn?Nr:r.wrap<=0?Km:(r.wrap===2?(jt(r,e.adler&255),jt(r,e.adler>>8&255),jt(r,e.adler>>16&255),jt(r,e.adler>>24&255),jt(r,e.total_in&255),jt(r,e.total_in>>8&255),jt(r,e.total_in>>16&255),jt(r,e.total_in>>24&255)):(Hl(r,e.adler>>>16),Hl(r,e.adler&65535)),yn(e),r.wrap>0&&(r.wrap=-r.wrap),r.pending!==0?Nr:Km)},IC=e=>{if(Gl(e))return _a;const t=e.state.status;return e.state=null,t===Gi?qi(e,lC):Nr},zC=(e,t)=>{let r=t.length;if(Gl(e))return _a;const n=e.state,a=n.wrap;if(a===2||a===1&&n.status!==Do||n.lookahead)return _a;if(a===1&&(e.adler=$l(e.adler,t,r,0)),n.wrap=0,r>=n.w_size){a===0&&(yi(n.head),n.strstart=0,n.block_start=0,n.insert=0);let s=new Uint8Array(n.w_size);s.set(t.subarray(r-n.w_size,r),0),t=s,r=n.w_size}const i=e.avail_in,o=e.next_in,l=e.input;for(e.avail_in=r,e.next_in=0,e.input=t,Fo(n);n.lookahead>=Ft;){let s=n.strstart,u=n.lookahead-(Ft-1);do n.ins_h=xi(n,n.ins_h,n.window[s+Ft-1]),n.prev[s&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=s,s++;while(--u);n.strstart=s,n.lookahead=Ft-1,Fo(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=Ft-1,n.match_available=0,e.next_in=o,e.input=l,e.avail_in=i,n.wrap=a,Nr};var FC=MC,OC=e2,PC=Qm,RC=Jm,LC=TC,BC=DC,NC=IC,$C=zC,UC="pako deflate (from Nodeca project)",Vl={deflateInit:FC,deflateInit2:OC,deflateReset:PC,deflateResetKeep:RC,deflateSetHeader:LC,deflate:BC,deflateEnd:NC,deflateSetDictionary:$C,deflateInfo:UC};const HC=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var jC=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const r=t.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(const n in r)HC(r,n)&&(e[n]=r[n])}}return e},GC=e=>{let t=0;for(let n=0,a=e.length;n<a;n++)t+=e[n].length;const r=new Uint8Array(t);for(let n=0,a=0,i=e.length;n<i;n++){let o=e[n];r.set(o,a),a+=o.length}return r},O0={assign:jC,flattenChunks:GC};let t2=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{t2=!1}const ql=new Uint8Array(256);for(let e=0;e<256;e++)ql[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;ql[254]=ql[254]=1;var VC=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,r,n,a,i,o=e.length,l=0;for(a=0;a<o;a++)r=e.charCodeAt(a),(r&64512)===55296&&a+1<o&&(n=e.charCodeAt(a+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),a++)),l+=r<128?1:r<2048?2:r<65536?3:4;for(t=new Uint8Array(l),i=0,a=0;i<l;a++)r=e.charCodeAt(a),(r&64512)===55296&&a+1<o&&(n=e.charCodeAt(a+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),a++)),r<128?t[i++]=r:r<2048?(t[i++]=192|r>>>6,t[i++]=128|r&63):r<65536?(t[i++]=224|r>>>12,t[i++]=128|r>>>6&63,t[i++]=128|r&63):(t[i++]=240|r>>>18,t[i++]=128|r>>>12&63,t[i++]=128|r>>>6&63,t[i++]=128|r&63);return t};const qC=(e,t)=>{if(t<65534&&e.subarray&&t2)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let r="";for(let n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r};var WC=(e,t)=>{const r=t||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let n,a;const i=new Array(r*2);for(a=0,n=0;n<r;){let o=e[n++];if(o<128){i[a++]=o;continue}let l=ql[o];if(l>4){i[a++]=65533,n+=l-1;continue}for(o&=l===2?31:l===3?15:7;l>1&&n<r;)o=o<<6|e[n++]&63,l--;if(l>1){i[a++]=65533;continue}o<65536?i[a++]=o:(o-=65536,i[a++]=55296|o>>10&1023,i[a++]=56320|o&1023)}return qC(i,a)},KC=(e,t)=>{t=t||e.length,t>e.length&&(t=e.length);let r=t-1;for(;r>=0&&(e[r]&192)===128;)r--;return r<0||r===0?t:r+ql[e[r]]>t?r:t},Wl={string2buf:VC,buf2string:WC,utf8border:KC};function XC(){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}var r2=XC;const n2=Object.prototype.toString,{Z_NO_FLUSH:YC,Z_SYNC_FLUSH:ZC,Z_FULL_FLUSH:JC,Z_FINISH:QC,Z_OK:P0,Z_STREAM_END:eA,Z_DEFAULT_COMPRESSION:tA,Z_DEFAULT_STRATEGY:rA,Z_DEFLATED:nA}=I0;function R0(e){this.options=O0.assign({level:tA,method:nA,chunkSize:16384,windowBits:15,memLevel:8,strategy:rA},e||{});let 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 r2,this.strm.avail_out=0;let r=Vl.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==P0)throw new Error(ji[r]);if(t.header&&Vl.deflateSetHeader(this.strm,t.header),t.dictionary){let n;if(typeof t.dictionary=="string"?n=Wl.string2buf(t.dictionary):n2.call(t.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(t.dictionary):n=t.dictionary,r=Vl.deflateSetDictionary(this.strm,n),r!==P0)throw new Error(ji[r]);this._dict_set=!0}}R0.prototype.push=function(e,t){const r=this.strm,n=this.options.chunkSize;let a,i;if(this.ended)return!1;for(t===~~t?i=t:i=t===!0?QC:YC,typeof e=="string"?r.input=Wl.string2buf(e):n2.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){if(r.avail_out===0&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),(i===ZC||i===JC)&&r.avail_out<=6){this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;continue}if(a=Vl.deflate(r,i),a===eA)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=Vl.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===P0;if(r.avail_out===0){this.onData(r.output);continue}if(i>0&&r.next_out>0){this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;continue}if(r.avail_in===0)break}return!0},R0.prototype.onData=function(e){this.chunks.push(e)},R0.prototype.onEnd=function(e){e===P0&&(this.result=O0.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function aA(e,t){const r=new R0(t);if(r.push(e,!0),r.err)throw r.msg||ji[r.err];return r.result}var iA=aA,oA={deflate:iA};const L0=16209,lA=16191;var sA=function(t,r){let n,a,i,o,l,s,u,c,f,d,h,y,p,x,g,m,b,v,S,C,A,_,E,M;const z=t.state;n=t.next_in,E=t.input,a=n+(t.avail_in-5),i=t.next_out,M=t.output,o=i-(r-t.avail_out),l=i+(t.avail_out-257),s=z.dmax,u=z.wsize,c=z.whave,f=z.wnext,d=z.window,h=z.hold,y=z.bits,p=z.lencode,x=z.distcode,g=(1<<z.lenbits)-1,m=(1<<z.distbits)-1;e:do{y<15&&(h+=E[n++]<<y,y+=8,h+=E[n++]<<y,y+=8),b=p[h&g];t:for(;;){if(v=b>>>24,h>>>=v,y-=v,v=b>>>16&255,v===0)M[i++]=b&65535;else if(v&16){S=b&65535,v&=15,v&&(y<v&&(h+=E[n++]<<y,y+=8),S+=h&(1<<v)-1,h>>>=v,y-=v),y<15&&(h+=E[n++]<<y,y+=8,h+=E[n++]<<y,y+=8),b=x[h&m];r:for(;;){if(v=b>>>24,h>>>=v,y-=v,v=b>>>16&255,v&16){if(C=b&65535,v&=15,y<v&&(h+=E[n++]<<y,y+=8,y<v&&(h+=E[n++]<<y,y+=8)),C+=h&(1<<v)-1,C>s){t.msg="invalid distance too far back",z.mode=L0;break e}if(h>>>=v,y-=v,v=i-o,C>v){if(v=C-v,v>c&&z.sane){t.msg="invalid distance too far back",z.mode=L0;break e}if(A=0,_=d,f===0){if(A+=u-v,v<S){S-=v;do M[i++]=d[A++];while(--v);A=i-C,_=M}}else if(f<v){if(A+=u+f-v,v-=f,v<S){S-=v;do M[i++]=d[A++];while(--v);if(A=0,f<S){v=f,S-=v;do M[i++]=d[A++];while(--v);A=i-C,_=M}}}else if(A+=f-v,v<S){S-=v;do M[i++]=d[A++];while(--v);A=i-C,_=M}for(;S>2;)M[i++]=_[A++],M[i++]=_[A++],M[i++]=_[A++],S-=3;S&&(M[i++]=_[A++],S>1&&(M[i++]=_[A++]))}else{A=i-C;do M[i++]=M[A++],M[i++]=M[A++],M[i++]=M[A++],S-=3;while(S>2);S&&(M[i++]=M[A++],S>1&&(M[i++]=M[A++]))}}else if(v&64){t.msg="invalid distance code",z.mode=L0;break e}else{b=x[(b&65535)+(h&(1<<v)-1)];continue r}break}}else if(v&64)if(v&32){z.mode=lA;break e}else{t.msg="invalid literal/length code",z.mode=L0;break e}else{b=p[(b&65535)+(h&(1<<v)-1)];continue t}break}}while(n<a&&i<l);S=y>>3,n-=S,y-=S<<3,h&=(1<<y)-1,t.next_in=n,t.next_out=i,t.avail_in=n<a?5+(a-n):5-(n-a),t.avail_out=i<l?257+(l-i):257-(i-l),z.hold=h,z.bits=y};const Po=15,a2=852,i2=592,o2=0,jf=1,l2=2,uA=new Uint16Array([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]),cA=new Uint8Array([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]),fA=new Uint16Array([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]),dA=new Uint8Array([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]);var Kl=(e,t,r,n,a,i,o,l)=>{const s=l.bits;let u=0,c=0,f=0,d=0,h=0,y=0,p=0,x=0,g=0,m=0,b,v,S,C,A,_=null,E;const M=new Uint16Array(Po+1),z=new Uint16Array(Po+1);let N=null,R,$,q;for(u=0;u<=Po;u++)M[u]=0;for(c=0;c<n;c++)M[t[r+c]]++;for(h=s,d=Po;d>=1&&M[d]===0;d--);if(h>d&&(h=d),d===0)return a[i++]=1<<24|64<<16|0,a[i++]=1<<24|64<<16|0,l.bits=1,0;for(f=1;f<d&&M[f]===0;f++);for(h<f&&(h=f),x=1,u=1;u<=Po;u++)if(x<<=1,x-=M[u],x<0)return-1;if(x>0&&(e===o2||d!==1))return-1;for(z[1]=0,u=1;u<Po;u++)z[u+1]=z[u]+M[u];for(c=0;c<n;c++)t[r+c]!==0&&(o[z[t[r+c]]++]=c);if(e===o2?(_=N=o,E=20):e===jf?(_=uA,N=cA,E=257):(_=fA,N=dA,E=0),m=0,c=0,u=f,A=i,y=h,p=0,S=-1,g=1<<h,C=g-1,e===jf&&g>a2||e===l2&&g>i2)return 1;for(;;){R=u-p,o[c]+1<E?($=0,q=o[c]):o[c]>=E?($=N[o[c]-E],q=_[o[c]-E]):($=96,q=0),b=1<<u-p,v=1<<y,f=v;do v-=b,a[A+(m>>p)+v]=R<<24|$<<16|q|0;while(v!==0);for(b=1<<u-1;m&b;)b>>=1;if(b!==0?(m&=b-1,m+=b):m=0,c++,--M[u]===0){if(u===d)break;u=t[r+o[c]]}if(u>h&&(m&C)!==S){for(p===0&&(p=h),A+=f,y=u-p,x=1<<y;y+p<d&&(x-=M[y+p],!(x<=0));)y++,x<<=1;if(g+=1<<y,e===jf&&g>a2||e===l2&&g>i2)return 1;S=m&C,a[S]=h<<24|y<<16|A-i|0}}return m!==0&&(a[A+m]=u-p<<24|64<<16|0),l.bits=h,0};const hA=0,s2=1,u2=2,{Z_FINISH:c2,Z_BLOCK:pA,Z_TREES:B0,Z_OK:Wi,Z_STREAM_END:vA,Z_NEED_DICT:mA,Z_STREAM_ERROR:Rn,Z_DATA_ERROR:f2,Z_MEM_ERROR:d2,Z_BUF_ERROR:gA,Z_DEFLATED:h2}=I0,N0=16180,p2=16181,v2=16182,m2=16183,g2=16184,b2=16185,y2=16186,x2=16187,_2=16188,w2=16189,$0=16190,Va=16191,Gf=16192,k2=16193,Vf=16194,S2=16195,C2=16196,A2=16197,E2=16198,U0=16199,H0=16200,T2=16201,M2=16202,D2=16203,I2=16204,z2=16205,qf=16206,F2=16207,O2=16208,sr=16209,P2=16210,R2=16211,bA=852,yA=592,xA=15,L2=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function _A(){this.strm=null,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 Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Ki=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<N0||t.mode>R2?1:0},B2=e=>{if(Ki(e))return Rn;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=N0,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(bA),t.distcode=t.distdyn=new Int32Array(yA),t.sane=1,t.back=-1,Wi},N2=e=>{if(Ki(e))return Rn;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,B2(e)},$2=(e,t)=>{let r;if(Ki(e))return Rn;const n=e.state;return t<0?(r=0,t=-t):(r=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?Rn:(n.window!==null&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,N2(e))},U2=(e,t)=>{if(!e)return Rn;const r=new _A;e.state=r,r.strm=e,r.window=null,r.mode=N0;const n=$2(e,t);return n!==Wi&&(e.state=null),n},wA=e=>U2(e,xA);let H2=!0,Wf,Kf;const kA=e=>{if(H2){Wf=new Int32Array(512),Kf=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Kl(s2,e.lens,0,288,Wf,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Kl(u2,e.lens,0,32,Kf,0,e.work,{bits:5}),H2=!1}e.lencode=Wf,e.lenbits=9,e.distcode=Kf,e.distbits=5},j2=(e,t,r,n)=>{let a;const i=e.state;return i.window===null&&(i.wsize=1<<i.wbits,i.wnext=0,i.whave=0,i.window=new Uint8Array(i.wsize)),n>=i.wsize?(i.window.set(t.subarray(r-i.wsize,r),0),i.wnext=0,i.whave=i.wsize):(a=i.wsize-i.wnext,a>n&&(a=n),i.window.set(t.subarray(r-n,r-n+a),i.wnext),n-=a,n?(i.window.set(t.subarray(r-n,r),0),i.wnext=n,i.whave=i.wsize):(i.wnext+=a,i.wnext===i.wsize&&(i.wnext=0),i.whave<i.wsize&&(i.whave+=a))),0},SA=(e,t)=>{let r,n,a,i,o,l,s,u,c,f,d,h,y,p,x=0,g,m,b,v,S,C,A,_;const E=new Uint8Array(4);let M,z;const N=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Ki(e)||!e.output||!e.input&&e.avail_in!==0)return Rn;r=e.state,r.mode===Va&&(r.mode=Gf),o=e.next_out,a=e.output,s=e.avail_out,i=e.next_in,n=e.input,l=e.avail_in,u=r.hold,c=r.bits,f=l,d=s,_=Wi;e:for(;;)switch(r.mode){case N0:if(r.wrap===0){r.mode=Gf;break}for(;c<16;){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}if(r.wrap&2&&u===35615){r.wbits===0&&(r.wbits=15),r.check=0,E[0]=u&255,E[1]=u>>>8&255,r.check=Mr(r.check,E,2,0),u=0,c=0,r.mode=p2;break}if(r.head&&(r.head.done=!1),!(r.wrap&1)||(((u&255)<<8)+(u>>8))%31){e.msg="incorrect header check",r.mode=sr;break}if((u&15)!==h2){e.msg="unknown compression method",r.mode=sr;break}if(u>>>=4,c-=4,A=(u&15)+8,r.wbits===0&&(r.wbits=A),A>15||A>r.wbits){e.msg="invalid window size",r.mode=sr;break}r.dmax=1<<r.wbits,r.flags=0,e.adler=r.check=1,r.mode=u&512?w2:Va,u=0,c=0;break;case p2:for(;c<16;){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}if(r.flags=u,(r.flags&255)!==h2){e.msg="unknown compression method",r.mode=sr;break}if(r.flags&57344){e.msg="unknown header flags set",r.mode=sr;break}r.head&&(r.head.text=u>>8&1),r.flags&512&&r.wrap&4&&(E[0]=u&255,E[1]=u>>>8&255,r.check=Mr(r.check,E,2,0)),u=0,c=0,r.mode=v2;case v2:for(;c<32;){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}r.head&&(r.head.time=u),r.flags&512&&r.wrap&4&&(E[0]=u&255,E[1]=u>>>8&255,E[2]=u>>>16&255,E[3]=u>>>24&255,r.check=Mr(r.check,E,4,0)),u=0,c=0,r.mode=m2;case m2:for(;c<16;){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}r.head&&(r.head.xflags=u&255,r.head.os=u>>8),r.flags&512&&r.wrap&4&&(E[0]=u&255,E[1]=u>>>8&255,r.check=Mr(r.check,E,2,0)),u=0,c=0,r.mode=g2;case g2:if(r.flags&1024){for(;c<16;){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}r.length=u,r.head&&(r.head.extra_len=u),r.flags&512&&r.wrap&4&&(E[0]=u&255,E[1]=u>>>8&255,r.check=Mr(r.check,E,2,0)),u=0,c=0}else r.head&&(r.head.extra=null);r.mode=b2;case b2:if(r.flags&1024&&(h=r.length,h>l&&(h=l),h&&(r.head&&(A=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(n.subarray(i,i+h),A)),r.flags&512&&r.wrap&4&&(r.check=Mr(r.check,n,h,i)),l-=h,i+=h,r.length-=h),r.length))break e;r.length=0,r.mode=y2;case y2:if(r.flags&2048){if(l===0)break e;h=0;do A=n[i+h++],r.head&&A&&r.length<65536&&(r.head.name+=String.fromCharCode(A));while(A&&h<l);if(r.flags&512&&r.wrap&4&&(r.check=Mr(r.check,n,h,i)),l-=h,i+=h,A)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=x2;case x2:if(r.flags&4096){if(l===0)break e;h=0;do A=n[i+h++],r.head&&A&&r.length<65536&&(r.head.comment+=String.fromCharCode(A));while(A&&h<l);if(r.flags&512&&r.wrap&4&&(r.check=Mr(r.check,n,h,i)),l-=h,i+=h,A)break e}else r.head&&(r.head.comment=null);r.mode=_2;case _2:if(r.flags&512){for(;c<16;){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}if(r.wrap&4&&u!==(r.check&65535)){e.msg="header crc mismatch",r.mode=sr;break}u=0,c=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=Va;break;case w2:for(;c<32;){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}e.adler=r.check=L2(u),u=0,c=0,r.mode=$0;case $0:if(r.havedict===0)return e.next_out=o,e.avail_out=s,e.next_in=i,e.avail_in=l,r.hold=u,r.bits=c,mA;e.adler=r.check=1,r.mode=Va;case Va:if(t===pA||t===B0)break e;case Gf:if(r.last){u>>>=c&7,c-=c&7,r.mode=qf;break}for(;c<3;){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}switch(r.last=u&1,u>>>=1,c-=1,u&3){case 0:r.mode=k2;break;case 1:if(kA(r),r.mode=U0,t===B0){u>>>=2,c-=2;break e}break;case 2:r.mode=C2;break;case 3:e.msg="invalid block type",r.mode=sr}u>>>=2,c-=2;break;case k2:for(u>>>=c&7,c-=c&7;c<32;){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}if((u&65535)!==(u>>>16^65535)){e.msg="invalid stored block lengths",r.mode=sr;break}if(r.length=u&65535,u=0,c=0,r.mode=Vf,t===B0)break e;case Vf:r.mode=S2;case S2:if(h=r.length,h){if(h>l&&(h=l),h>s&&(h=s),h===0)break e;a.set(n.subarray(i,i+h),o),l-=h,i+=h,s-=h,o+=h,r.length-=h;break}r.mode=Va;break;case C2:for(;c<14;){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}if(r.nlen=(u&31)+257,u>>>=5,c-=5,r.ndist=(u&31)+1,u>>>=5,c-=5,r.ncode=(u&15)+4,u>>>=4,c-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=sr;break}r.have=0,r.mode=A2;case A2:for(;r.have<r.ncode;){for(;c<3;){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}r.lens[N[r.have++]]=u&7,u>>>=3,c-=3}for(;r.have<19;)r.lens[N[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,M={bits:r.lenbits},_=Kl(hA,r.lens,0,19,r.lencode,0,r.work,M),r.lenbits=M.bits,_){e.msg="invalid code lengths set",r.mode=sr;break}r.have=0,r.mode=E2;case E2:for(;r.have<r.nlen+r.ndist;){for(;x=r.lencode[u&(1<<r.lenbits)-1],g=x>>>24,m=x>>>16&255,b=x&65535,!(g<=c);){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}if(b<16)u>>>=g,c-=g,r.lens[r.have++]=b;else{if(b===16){for(z=g+2;c<z;){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}if(u>>>=g,c-=g,r.have===0){e.msg="invalid bit length repeat",r.mode=sr;break}A=r.lens[r.have-1],h=3+(u&3),u>>>=2,c-=2}else if(b===17){for(z=g+3;c<z;){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}u>>>=g,c-=g,A=0,h=3+(u&7),u>>>=3,c-=3}else{for(z=g+7;c<z;){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}u>>>=g,c-=g,A=0,h=11+(u&127),u>>>=7,c-=7}if(r.have+h>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=sr;break}for(;h--;)r.lens[r.have++]=A}}if(r.mode===sr)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=sr;break}if(r.lenbits=9,M={bits:r.lenbits},_=Kl(s2,r.lens,0,r.nlen,r.lencode,0,r.work,M),r.lenbits=M.bits,_){e.msg="invalid literal/lengths set",r.mode=sr;break}if(r.distbits=6,r.distcode=r.distdyn,M={bits:r.distbits},_=Kl(u2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,M),r.distbits=M.bits,_){e.msg="invalid distances set",r.mode=sr;break}if(r.mode=U0,t===B0)break e;case U0:r.mode=H0;case H0:if(l>=6&&s>=258){e.next_out=o,e.avail_out=s,e.next_in=i,e.avail_in=l,r.hold=u,r.bits=c,sA(e,d),o=e.next_out,a=e.output,s=e.avail_out,i=e.next_in,n=e.input,l=e.avail_in,u=r.hold,c=r.bits,r.mode===Va&&(r.back=-1);break}for(r.back=0;x=r.lencode[u&(1<<r.lenbits)-1],g=x>>>24,m=x>>>16&255,b=x&65535,!(g<=c);){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}if(m&&!(m&240)){for(v=g,S=m,C=b;x=r.lencode[C+((u&(1<<v+S)-1)>>v)],g=x>>>24,m=x>>>16&255,b=x&65535,!(v+g<=c);){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}u>>>=v,c-=v,r.back+=v}if(u>>>=g,c-=g,r.back+=g,r.length=b,m===0){r.mode=z2;break}if(m&32){r.back=-1,r.mode=Va;break}if(m&64){e.msg="invalid literal/length code",r.mode=sr;break}r.extra=m&15,r.mode=T2;case T2:if(r.extra){for(z=r.extra;c<z;){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}r.length+=u&(1<<r.extra)-1,u>>>=r.extra,c-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=M2;case M2:for(;x=r.distcode[u&(1<<r.distbits)-1],g=x>>>24,m=x>>>16&255,b=x&65535,!(g<=c);){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}if(!(m&240)){for(v=g,S=m,C=b;x=r.distcode[C+((u&(1<<v+S)-1)>>v)],g=x>>>24,m=x>>>16&255,b=x&65535,!(v+g<=c);){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}u>>>=v,c-=v,r.back+=v}if(u>>>=g,c-=g,r.back+=g,m&64){e.msg="invalid distance code",r.mode=sr;break}r.offset=b,r.extra=m&15,r.mode=D2;case D2:if(r.extra){for(z=r.extra;c<z;){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}r.offset+=u&(1<<r.extra)-1,u>>>=r.extra,c-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=sr;break}r.mode=I2;case I2:if(s===0)break e;if(h=d-s,r.offset>h){if(h=r.offset-h,h>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=sr;break}h>r.wnext?(h-=r.wnext,y=r.wsize-h):y=r.wnext-h,h>r.length&&(h=r.length),p=r.window}else p=a,y=o-r.offset,h=r.length;h>s&&(h=s),s-=h,r.length-=h;do a[o++]=p[y++];while(--h);r.length===0&&(r.mode=H0);break;case z2:if(s===0)break e;a[o++]=r.length,s--,r.mode=H0;break;case qf:if(r.wrap){for(;c<32;){if(l===0)break e;l--,u|=n[i++]<<c,c+=8}if(d-=s,e.total_out+=d,r.total+=d,r.wrap&4&&d&&(e.adler=r.check=r.flags?Mr(r.check,a,d,o-d):$l(r.check,a,d,o-d)),d=s,r.wrap&4&&(r.flags?u:L2(u))!==r.check){e.msg="incorrect data check",r.mode=sr;break}u=0,c=0}r.mode=F2;case F2:if(r.wrap&&r.flags){for(;c<32;){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}if(r.wrap&4&&u!==(r.total&4294967295)){e.msg="incorrect length check",r.mode=sr;break}u=0,c=0}r.mode=O2;case O2:_=vA;break e;case sr:_=f2;break e;case P2:return d2;case R2:default:return Rn}return e.next_out=o,e.avail_out=s,e.next_in=i,e.avail_in=l,r.hold=u,r.bits=c,(r.wsize||d!==e.avail_out&&r.mode<sr&&(r.mode<qf||t!==c2))&&j2(e,e.output,e.next_out,d-e.avail_out),f-=e.avail_in,d-=e.avail_out,e.total_in+=f,e.total_out+=d,r.total+=d,r.wrap&4&&d&&(e.adler=r.check=r.flags?Mr(r.check,a,d,e.next_out-d):$l(r.check,a,d,e.next_out-d)),e.data_type=r.bits+(r.last?64:0)+(r.mode===Va?128:0)+(r.mode===U0||r.mode===Vf?256:0),(f===0&&d===0||t===c2)&&_===Wi&&(_=gA),_},CA=e=>{if(Ki(e))return Rn;let t=e.state;return t.window&&(t.window=null),e.state=null,Wi},AA=(e,t)=>{if(Ki(e))return Rn;const r=e.state;return r.wrap&2?(r.head=t,t.done=!1,Wi):Rn},EA=(e,t)=>{const r=t.length;let n,a,i;return Ki(e)||(n=e.state,n.wrap!==0&&n.mode!==$0)?Rn:n.mode===$0&&(a=1,a=$l(a,t,r,0),a!==n.check)?f2:(i=j2(e,t,r,r),i?(n.mode=P2,d2):(n.havedict=1,Wi))};var TA=N2,MA=$2,DA=B2,IA=wA,zA=U2,FA=SA,OA=CA,PA=AA,RA=EA,LA="pako inflate (from Nodeca project)",qa={inflateReset:TA,inflateReset2:MA,inflateResetKeep:DA,inflateInit:IA,inflateInit2:zA,inflate:FA,inflateEnd:OA,inflateGetHeader:PA,inflateSetDictionary:RA,inflateInfo:LA};function BA(){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}var NA=BA;const G2=Object.prototype.toString,{Z_NO_FLUSH:$A,Z_FINISH:UA,Z_OK:Xl,Z_STREAM_END:Xf,Z_NEED_DICT:Yf,Z_STREAM_ERROR:HA,Z_DATA_ERROR:V2,Z_MEM_ERROR:jA}=I0;function j0(e){this.options=O0.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});const 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&&!(e&&e.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 r2,this.strm.avail_out=0;let r=qa.inflateInit2(this.strm,t.windowBits);if(r!==Xl)throw new Error(ji[r]);if(this.header=new NA,qa.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Wl.string2buf(t.dictionary):G2.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=qa.inflateSetDictionary(this.strm,t.dictionary),r!==Xl)))throw new Error(ji[r])}j0.prototype.push=function(e,t){const r=this.strm,n=this.options.chunkSize,a=this.options.dictionary;let i,o,l;if(this.ended)return!1;for(t===~~t?o=t:o=t===!0?UA:$A,G2.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){for(r.avail_out===0&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),i=qa.inflate(r,o),i===Yf&&a&&(i=qa.inflateSetDictionary(r,a),i===Xl?i=qa.inflate(r,o):i===V2&&(i=Yf));r.avail_in>0&&i===Xf&&r.state.wrap>0&&e[r.next_in]!==0;)qa.inflateReset(r),i=qa.inflate(r,o);switch(i){case HA:case V2:case Yf:case jA:return this.onEnd(i),this.ended=!0,!1}if(l=r.avail_out,r.next_out&&(r.avail_out===0||i===Xf))if(this.options.to==="string"){let s=Wl.utf8border(r.output,r.next_out),u=r.next_out-s,c=Wl.buf2string(r.output,s);r.next_out=u,r.avail_out=n-u,u&&r.output.set(r.output.subarray(s,s+u),0),this.onData(c)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(!(i===Xl&&l===0)){if(i===Xf)return i=qa.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,!0;if(r.avail_in===0)break}}return!0},j0.prototype.onData=function(e){this.chunks.push(e)},j0.prototype.onEnd=function(e){e===Xl&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=O0.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function GA(e,t){const r=new j0(t);if(r.push(e),r.err)throw r.msg||ji[r.err];return r.result}var VA=GA,qA={inflate:VA};const{deflate:WA}=oA,{inflate:KA}=qA;var XA=WA,YA=KA,Yl=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),G0=4017,V0=799,q0=3406,W0=2276,K0=1567,X0=3784,Ro=5793,Y0=2896,ZA=100,q2=64*1024*1024,Zf=0;function Lo(e){var t=Zf+e;if(t>q2){var r=Math.ceil((t-q2)/1024/1024);throw new Error("Max memory limit exceeded by at least ".concat(r,"MB"))}Zf=t}function JA(e,t){for(var r=16;r>0&&!e[r-1];)r--;for(var n=[{children:[],index:0}],a=0,i=n[0],o=0;o<r;o++){for(var l=0;l<e[o];l++){for(i=n.pop(),i.children[i.index]=t[a];i.index>0;){if(n.length===0)throw new Error("Could not recreate Huffman Table");i=n.pop()}for(i.index++,n.push(i);n.length<=o;){var s={children:[],index:0};n.push(s),i.children[i.index]=s.children,i=s}a++}if(o+1<r){var s={children:[],index:0};n.push(s),i.children[i.index]=s.children,i=s}}return n[0].children}function QA(e,t,r,n,a,i,o,l,s){var u=r.mcusPerLine,c=r.progressive,f=t,d=0,h=0;function y(){if(h>0)return h--,d>>h&1;if(d=e[t++],d==255){var Te=e[t++];if(Te)throw new Error("unexpected marker: ".concat((d<<8|Te).toString(16)))}return h=7,d>>>7}function p(Te){for(var Se=Te;;){if(Se=Se[y()],typeof Se=="number")return Se;if(Se===void 0)throw new Error("invalid huffman sequence")}}function x(Te){for(var Se=0;Te>0;)Se=Se<<1|y(),Te--;return Se}function g(Te){var Se=x(Te);return Se>=1<<Te-1?Se:Se+(-1<<Te)+1}function m(Te,Se){var Ie=p(Te.huffmanTableDC),Le=Ie===0?0:g(Ie);Se[0]=Te.pred+=Le;for(var Ae=1;Ae<64;){var Be=p(Te.huffmanTableAC),be=Be&15,ye=Be>>4;if(be===0){if(ye<15)break;Ae+=16;continue}Ae+=ye;var P=Yl[Ae];Se[P]=g(be),Ae++}}function b(Te,Se){var Ie=p(Te.huffmanTableDC),Le=Ie===0?0:g(Ie)<<s;Se[0]=Te.pred+=Le}function v(Te,Se){Se[0]|=y()<<s}var S=0;function C(Te,Se){if(S>0){S--;return}for(var Ie=i,Le=o;Ie<=Le;){var Ae=p(Te.huffmanTableAC),Be=Ae&15,be=Ae>>4;if(Be===0){if(be<15){S=x(be)+(1<<be)-1;break}Ie+=16;continue}Ie+=be;var ye=Yl[Ie];Se[ye]=g(Be)*(1<<s),Ie++}}var A=0,_=0;function E(Te,Se){for(var Ie=i,Le=o,Ae=0;Ie<=Le;){var Be=Yl[Ie],be=Se[Be]<0?-1:1;switch(A){case 0:var ye=p(Te.huffmanTableAC),P=ye&15;if(Ae=ye>>4,P===0)Ae<15?(S=x(Ae)+(1<<Ae),A=4):(Ae=16,A=1);else{if(P!==1)throw new Error("invalid ACn encoding");_=g(P),A=Ae?2:3}continue;case 1:case 2:Se[Be]?Se[Be]+=(y()<<s)*be:(Ae--,Ae===0&&(A=A==2?3:0));break;case 3:Se[Be]?Se[Be]+=(y()<<s)*be:(Se[Be]=_<<s,A=0);break;case 4:Se[Be]&&(Se[Be]+=(y()<<s)*be);break}Ie++}A===4&&(S--,S===0&&(A=0))}function M(Te,Se,Ie,Le,Ae){var Be=Ie/u|0,be=Ie%u,ye=Be*Te.v+Le,P=be*Te.h+Ae;Te.blocks[ye]!==void 0&&Se(Te,Te.blocks[ye][P])}function z(Te,Se,Ie){var Le=Ie/Te.blocksPerLine|0,Ae=Ie%Te.blocksPerLine;Te.blocks[Le]!==void 0&&Se(Te,Te.blocks[Le][Ae])}var N=n.length,R,$;c?i===0?$=l===0?b:v:$=l===0?C:E:$=m;var q=0,W;N==1?W=n[0].blocksPerLine*n[0].blocksPerColumn:W=u*r.mcusPerColumn,a||(a=W);for(var Z,te,ne;q<W;){for(var _e=0;_e<N;_e++)n[_e].pred=0;if(S=0,N==1){R=n[0];for(var pe=0;pe<a;pe++)z(R,$,q),q++}else for(var pe=0;pe<a;pe++){for(var _e=0;_e<N;_e++){R=n[_e],Z=R.h,te=R.v;for(var we=0;we<te;we++)for(var ve=0;ve<Z;ve++)M(R,$,q,we,ve)}if(q++,q===W)break}if(q===W)do{if(e[t]===255&&e[t+1]!==0)break;t+=1}while(t<e.length-2);if(h=0,ne=e[t]<<8|e[t+1],ne<65280)throw new Error("marker was not found");if(ne>=65488&&ne<=65495)t+=2;else break}return t-f}function eE(e){var t=[],r=e.blocksPerLine,n=e.blocksPerColumn,a=r<<3,i=new Int32Array(64),o=new Uint8Array(64);function l(x,g,m){for(var b=e.quantizationTable,v=m,S=0;S<64;S++)v[S]=x[S]*b[S];for(var S=0;S<8;++S){var C=8*S;if(v[1+C]==0&&v[2+C]==0&&v[3+C]==0&&v[4+C]==0&&v[5+C]==0&&v[6+C]==0&&v[7+C]==0){var A=Ro*v[0+C]+512>>10;v[0+C]=A,v[1+C]=A,v[2+C]=A,v[3+C]=A,v[4+C]=A,v[5+C]=A,v[6+C]=A,v[7+C]=A;continue}var _=Ro*v[0+C]+128>>8,E=Ro*v[4+C]+128>>8,M=v[2+C],z=v[6+C],N=Y0*(v[1+C]-v[7+C])+128>>8,R=Y0*(v[1+C]+v[7+C])+128>>8,$=v[3+C]<<4,q=v[5+C]<<4,W=_-E+1>>1;_=_+E+1>>1,E=W,W=M*X0+z*K0+128>>8,M=M*K0-z*X0+128>>8,z=W,W=N-q+1>>1,N=N+q+1>>1,q=W,W=R+$+1>>1,$=R-$+1>>1,R=W,W=_-z+1>>1,_=_+z+1>>1,z=W,W=E-M+1>>1,E=E+M+1>>1,M=W,W=N*W0+R*q0+2048>>12,N=N*q0-R*W0+2048>>12,R=W,W=$*V0+q*G0+2048>>12,$=$*G0-q*V0+2048>>12,q=W,v[0+C]=_+R,v[7+C]=_-R,v[1+C]=E+q,v[6+C]=E-q,v[2+C]=M+$,v[5+C]=M-$,v[3+C]=z+N,v[4+C]=z-N}for(var S=0;S<8;++S){var Z=S;if(v[1*8+Z]==0&&v[2*8+Z]==0&&v[3*8+Z]==0&&v[4*8+Z]==0&&v[5*8+Z]==0&&v[6*8+Z]==0&&v[7*8+Z]==0){var te=Ro*m[S+0]+8192>>14;v[0*8+Z]=te,v[1*8+Z]=te,v[2*8+Z]=te,v[3*8+Z]=te,v[4*8+Z]=te,v[5*8+Z]=te,v[6*8+Z]=te,v[7*8+Z]=te;continue}var _=Ro*v[0*8+Z]+2048>>12,E=Ro*v[4*8+Z]+2048>>12,M=v[2*8+Z],z=v[6*8+Z],N=Y0*(v[1*8+Z]-v[7*8+Z])+2048>>12,R=Y0*(v[1*8+Z]+v[7*8+Z])+2048>>12,$=v[3*8+Z],q=v[5*8+Z],W=_-E+1>>1;_=_+E+1>>1,E=W,W=M*X0+z*K0+2048>>12,M=M*K0-z*X0+2048>>12,z=W,W=N-q+1>>1,N=N+q+1>>1,q=W,W=R+$+1>>1,$=R-$+1>>1,R=W,W=_-z+1>>1,_=_+z+1>>1,z=W,W=E-M+1>>1,E=E+M+1>>1,M=W,W=N*W0+R*q0+2048>>12,N=N*q0-R*W0+2048>>12,R=W,W=$*V0+q*G0+2048>>12,$=$*G0-q*V0+2048>>12,q=W,v[0*8+Z]=_+R,v[7*8+Z]=_-R,v[1*8+Z]=E+q,v[6*8+Z]=E-q,v[2*8+Z]=M+$,v[5*8+Z]=M-$,v[3*8+Z]=z+N,v[4*8+Z]=z-N}for(var S=0;S<64;++S){var ne=128+(v[S]+8>>4);g[S]=ne<0?0:ne>255?255:ne}}Lo(a*n*8);for(var s=0;s<n;s++){for(var u=s<<3,c=0;c<8;c++)t.push(new Uint8Array(a));for(var f=0;f<r;f++){l(e.blocks[s][f],o,i);for(var d=0,h=f<<3,y=0;y<8;y++)for(var p=t[u+y],c=0;c<8;c++)p[h+c]=o[d++]}}return t}function Wa(e){return e<0?0:e>255?255:e}function tE(e){var t={width:0,height:0,comments:[],adobe:void 0,components:[],exifBuffer:void 0,jfif:void 0},r=ZA*1e3*1e3,n=0;function a(){var de=e[n]<<8|e[n+1];return n+=2,de}function i(){var de=a(),ie=e.subarray(n,n+de-2);return n+=ie.length,ie}function o(de){var ie=0,oe=0;for(var se in de.components)if(de.components.hasOwnProperty(se)){var ge=de.components[se];ie<ge.h&&(ie=ge.h),oe<ge.v&&(oe=ge.v)}var Ce=Math.ceil(de.samplesPerLine/8/ie),xe=Math.ceil(de.scanLines/8/oe);for(var se in de.components)if(de.components.hasOwnProperty(se)){var ge=de.components[se],Ve=Math.ceil(Math.ceil(de.samplesPerLine/8)*ge.h/ie),Ue=Math.ceil(Math.ceil(de.scanLines/8)*ge.v/oe),Ne=Ce*ge.h,qe=xe*ge.v,it=qe*Ne,ct=[];Lo(it*256);for(var ot=0;ot<qe;ot++){for(var wt=[],Me=0;Me<Ne;Me++)wt.push(new Int32Array(64));ct.push(wt)}ge.blocksPerLine=Ve,ge.blocksPerColumn=Ue,ge.blocks=ct}de.maxH=ie,de.maxV=oe,de.mcusPerLine=Ce,de.mcusPerColumn=xe}var l=null,s=null,u=void 0,c=0,f=[],d=[],h=[],y=[],p=a(),x=-1;if(p!=65496)throw new Error("SOI not found");for(p=a();p!=65497;){switch(p){case 65280:break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:{var g=i();if(p===65534){for(var m="",b=0;b<g.byteLength;b++)m+=String.fromCharCode(g[b]);t.comments.push(m)}p===65504&&g[0]===74&&g[1]===70&&g[2]===73&&g[3]===70&&g[4]===0&&(l={version:{major:g[5],minor:g[6]},densityUnits:g[7],xDensity:g[8]<<8|g[9],yDensity:g[10]<<8|g[11],thumbWidth:g[12],thumbHeight:g[13],thumbData:g.subarray(14,14+3*g[12]*g[13])}),p===65505&&g[0]===69&&g[1]===120&&g[2]===105&&g[3]===102&&g[4]===0&&(t.exifBuffer=g.subarray(5,g.length)),p===65518&&g[0]===65&&g[1]===100&&g[2]===111&&g[3]===98&&g[4]===101&&g[5]===0&&(s={version:g[6],flags0:g[7]<<8|g[8],flags1:g[9]<<8|g[10],transformCode:g[11]});break}case 65499:{for(var v=a(),S=v+n-2;n<S;){var C=e[n++];Lo(64*4);var A=new Int32Array(64);if(C>>4)if(C>>4===1)for(var _=0;_<64;_++){var E=Yl[_];A[E]=a()}else throw new Error("DQT: invalid table spec");else for(var _=0;_<64;_++){var E=Yl[_];A[E]=e[n++]}f[C&15]=A}break}case 65472:case 65473:case 65474:{a(),u={extended:p===65473,progressive:p===65474,precision:e[n++],scanLines:a(),samplesPerLine:a(),components:{},componentsOrder:[],maxH:0,maxV:0,mcusPerLine:0,mcusPerColumn:0};var M=u.scanLines*u.samplesPerLine;if(M>r){var z=Math.ceil((M-r)/1e6);throw new Error("maxResolutionInMP limit exceeded by ".concat(z,"MP"))}for(var N=e[n++],R=0;R<N;R++){var $=e[n],q=e[n+1]>>4,W=e[n+1]&15,Z=e[n+2];u.componentsOrder.push($),u.components[$]={h:q,v:W,quantizationIdx:Z,blocksPerColumn:0,blocksPerLine:0,blocks:[],pred:0},n+=3}o(u),d.push(u);break}case 65476:{for(var te=a(),R=2;R<te;){for(var ne=e[n++],_e=new Uint8Array(16),pe=0,_=0;_<16;_++,n++)pe+=_e[_]=e[n];Lo(16+pe);for(var we=new Uint8Array(pe),_=0;_<pe;_++,n++)we[_]=e[n];R+=17+pe;var ve=ne&15,Te=ne>>4?h:y;Te[ve]=JA(_e,we)}break}case 65501:a(),c=a();break;case 65500:a(),a();break;case 65498:{a();for(var Se=e[n++],Ie=[],R=0;R<Se;R++){var Le=u.components[e[n++]],Ae=e[n++];Le.huffmanTableDC=y[Ae>>4],Le.huffmanTableAC=h[Ae&15],Ie.push(Le)}var Be=e[n++],be=e[n++],ye=e[n++],P=QA(e,n,u,Ie,c,Be,be,ye>>4,ye&15);n+=P;break}case 65535:e[n]!==255&&n--;break;default:{if(e[n-3]==255&&e[n-2]>=192&&e[n-2]<=254){n-=3;break}else if(p===224||p==225){if(x!==-1)throw new Error("first unknown JPEG marker at offset ".concat(x.toString(16),", second unknown JPEG marker ").concat(p.toString(16)," at offset ").concat((n-1).toString(16)));x=n-1;var V=a();if(e[n+V-2]===255){n+=V-2;break}}throw new Error("unknown JPEG marker "+p.toString(16))}}p=a()}if(d.length!=1)throw new Error("only single frame JPEGs supported");for(var R=0;R<d.length;R++){var fe=d[R].components;for(var _ in fe)fe[_].quantizationTable=f[fe[_].quantizationIdx],delete fe[_].quantizationIdx}t.width=u.samplesPerLine,t.height=u.scanLines,t.jfif=l,t.adobe=s,t.components=[];for(var R=0;R<u.componentsOrder.length;R++){var Le=u.components[u.componentsOrder[R]];t.components.push({lines:eE(Le),scaleX:Le.h/u.maxH,scaleY:Le.v/u.maxV})}return t}function rE(e){var t=0,r=!1,n=e.width,a=e.height,i=n*a*e.components.length;Lo(i);var o=new Uint8Array(i);switch(e.components.length){case 1:{for(var l=e.components[0],s=0;s<a;s++)for(var u=l.lines[0|s*l.scaleY],c=0;c<n;c++){var f=u[0|c*l.scaleX];o[t++]=f}break}case 2:{for(var l=e.components[0],d=e.components[1],s=0;s<a;s++)for(var u=l.lines[0|s*l.scaleY],h=d.lines[0|s*d.scaleY],c=0;c<n;c++){var y=u[0|c*l.scaleX];o[t++]=y;var p=h[0|c*d.scaleX];o[t++]=p}break}case 3:{r=!0,e.adobe&&e.adobe.transformCode&&(r=!0);for(var l=e.components[0],d=e.components[1],x=e.components[2],s=0;s<a;s++)for(var u=l.lines[0|s*l.scaleY],h=d.lines[0|s*d.scaleY],g=x.lines[0|s*x.scaleY],c=0;c<n;c++){var f=void 0,m=void 0,b=void 0,v=void 0,S=void 0,C=void 0;r?(f=u[0|c*l.scaleX],m=h[0|c*d.scaleX],b=g[0|c*x.scaleX],v=Wa(f+1.402*(b-128)),S=Wa(f-.3441363*(m-128)-.71413636*(b-128)),C=Wa(f+1.772*(m-128))):(v=u[0|c*l.scaleX],S=h[0|c*d.scaleX],C=g[0|c*x.scaleX]),o[t++]=v,o[t++]=S,o[t++]=C}break}case 4:{if(!e.adobe)throw new Error("Unsupported color mode (4 components)");r=!1,e.adobe&&e.adobe.transformCode&&(r=!0);for(var l=e.components[0],d=e.components[1],x=e.components[2],A=e.components[3],s=0;s<a;s++)for(var u=l.lines[0|s*l.scaleY],h=d.lines[0|s*d.scaleY],g=x.lines[0|s*x.scaleY],_=A.lines[0|s*A.scaleY],c=0;c<n;c++){var f=void 0,m=void 0,b=void 0,E=void 0,M=void 0,z=void 0,N=void 0;r?(f=u[0|c*l.scaleX],m=h[0|c*d.scaleX],b=g[0|c*x.scaleX],E=_[0|c*A.scaleX],M=255-Wa(f+1.402*(b-128)),z=255-Wa(f-.3441363*(m-128)-.71413636*(b-128)),N=255-Wa(f+1.772*(m-128))):(M=u[0|c*l.scaleX],z=h[0|c*d.scaleX],N=g[0|c*x.scaleX],E=_[0|c*A.scaleX]),o[t++]=255-M,o[t++]=255-z,o[t++]=255-N,o[t++]=255-E}break}default:throw new Error("Unsupported color mode")}return o}function nE(e,t){if(Zf=0,e.length===0)throw new Error("Empty jpeg buffer");var r=tE(e);Lo(r.width*r.height*4);var n=rE(r),a=t(r.width,r.height),i=a.width,o=a.height,l=a.data,s=0,u=0;switch(r.components.length){case 1:for(var c=0;c<o;c++)for(var f=0;f<i;f++){var d=n[s++];l[u++]=d,l[u++]=d,l[u++]=d,l[u++]=255}break;case 3:for(var c=0;c<o;c++)for(var f=0;f<i;f++){var h=n[s++],y=n[s++],p=n[s++];l[u++]=h,l[u++]=y,l[u++]=p,l[u++]=255}break;case 4:for(var c=0;c<o;c++)for(var f=0;f<i;f++){var x=n[s++],g=n[s++],d=n[s++],m=n[s++],h=255-Wa(x*(1-m/255)+m),y=255-Wa(g*(1-m/255)+m),p=255-Wa(d*(1-m/255)+m);l[u++]=h,l[u++]=y,l[u++]=p,l[u++]=255}break;default:throw new Error("Unsupported color mode")}return a}var aE=!1,Z0={},Bo={pass:"pass through",norm:"normal",diss:"dissolve",dark:"darken","mul ":"multiply",idiv:"color burn",lbrn:"linear burn",dkCl:"darker color",lite:"lighten",scrn:"screen","div ":"color dodge",lddg:"linear dodge",lgCl:"lighter color",over:"overlay",sLit:"soft light",hLit:"hard light",vLit:"vivid light",lLit:"linear light",pLit:"pin light",hMix:"hard mix",diff:"difference",smud:"exclusion",fsub:"subtract",fdiv:"divide","hue ":"hue","sat ":"saturation",colr:"color","lum ":"luminosity"};Object.keys(Bo).forEach(function(e){return Z0[Bo[e]]=e});var W2=["none","red","orange","yellow","green","blue","violet","gray"],K2=["LMsk","Lr16","Lr32","Layr","Mt16","Mt32","Mtrn","Alph","FMsk","lnk2","FEid","FXid","PxSD","cinf"];function iE(e){var t={};return Object.keys(e).forEach(function(r){return t[e[r]]=r}),t}function vt(e,t,r){var n=iE(r),a=function(o){var l=o.split(".")[1];if(l&&!n[l])throw new Error("Unrecognized value for enum: '".concat(o,"'"));return n[l]||t},i=function(o){if(o&&!r[o])throw new Error("Invalid value for enum: '".concat(o,"'"));return"".concat(e,".").concat(r[o]||r[t])};return{decode:a,encode:i}}var X2;(function(e){e[e.RGB=0]="RGB",e[e.HSB=1]="HSB",e[e.CMYK=2]="CMYK",e[e.Lab=7]="Lab",e[e.Grayscale=8]="Grayscale"})(X2||(X2={}));var Y2;(function(e){e[e.PositionRelativeToLayer=1]="PositionRelativeToLayer",e[e.LayerMaskDisabled=2]="LayerMaskDisabled",e[e.InvertLayerMaskWhenBlending=4]="InvertLayerMaskWhenBlending",e[e.LayerMaskFromRenderingOtherData=8]="LayerMaskFromRenderingOtherData",e[e.MaskHasParametersAppliedToIt=16]="MaskHasParametersAppliedToIt"})(Y2||(Y2={}));var Z2;(function(e){e[e.UserMaskDensity=1]="UserMaskDensity",e[e.UserMaskFeather=2]="UserMaskFeather",e[e.VectorMaskDensity=4]="VectorMaskDensity",e[e.VectorMaskFeather=8]="VectorMaskFeather"})(Z2||(Z2={}));function J2(e,t){switch(e){case 0:return 0;case 1:return 1;case 2:return 2;case 3:return t?3:e+1;case-1:return t?4:3;default:return e+1}}function Jf(e,t,r){return e<t?t:e>r?r:e}function Q2(e){for(var t=e.width*e.height*4,r=3;r<t;r+=4)if(e.data[r]!==255)return!0;return!1}function oE(e){for(var t=e.data,r=t instanceof Float32Array?1:t instanceof Uint16Array?65535:255,n=0,a=t.length|0;n<a;n=n+4|0)t[n+0]=0,t[n+1]=0,t[n+2]=0,t[n+3]=r}function J0(e){var t=No(e.width,e.height),r;if(e.data instanceof Uint8ClampedArray)r=e;else{r=$o(e.width,e.height);var n=e.data,a=r.data;if(n instanceof Float32Array)for(var i=0,o=n.length;i<o;i+=4)a[i+0]=Math.round(Math.pow(n[i+0],1/2.2)*255),a[i+1]=Math.round(Math.pow(n[i+1],1/2.2)*255),a[i+2]=Math.round(Math.pow(n[i+2],1/2.2)*255),a[i+3]=Math.round(n[i+3]*255);else for(var l=n instanceof Uint16Array?8:0,i=0,o=n.length;i<o;i++)a[i]=n[i]>>>l}return t.getContext("2d").putImageData(r,0,0),t}function lE(e,t,r,n){if(!(e instanceof Uint8Array||e instanceof Uint8ClampedArray))throw new Error("Invalid bit depth");for(var a=0,i=0,o=0;a<n;a++)for(var l=0;l<r;)for(var s=e[o++],u=0;u<8&&l<r;u++,l++,i+=4){var c=s&128?0:255;s=s<<1,t[i+0]=c,t[i+1]=c,t[i+2]=c,t[i+3]=255}}function Qf(e,t,r,n){var a=t.data,i=t.width,o=t.height;if(!(!i||!o)){for(var l=4*i|0,s=0,u=r.length*(n?4:2)*o|0,c=0,f=r;c<f.length;c++)for(var d=f[c],h=0,y=d|0;h<o;h++){var p=h*l|0,x=p+l|0,g=x+d-4|0,m=g-4|0,b=u;for(y=p+d|0;y<x;y=y+4|0)if(y<m){var v=a[y];y=y+4|0;var S=a[y];y=y+4|0;var C=a[y];if(v===S&&v===C){for(var A=3;A<128&&y<g&&a[y+4|0]===v;)A=A+1|0,y=y+4|0;e[u++]=1-A,e[u++]=v}else{var _=u,E=!0,A=1;for(e[u++]=0,e[u++]=v;y<g&&A<128;)if(y=y+4|0,v=S,S=C,C=a[y],v===S&&v===C){y=y-12|0,E=!1;break}else A++,e[u++]=v;E&&(A<127?(e[u++]=S,e[u++]=C,A+=2):A<128?(e[u++]=S,A++,y=y-4|0):y=y-8|0),e[_]=A-1}}else y===g?(e[u++]=0,e[u++]=a[y]):(e[u++]=1,e[u++]=a[y],y=y+4|0,e[u++]=a[y]);var M=u-b;n&&(e[s++]=M>>24&255,e[s++]=M>>16&255),e[s++]=M>>8&255,e[s++]=M&255}return e.slice(0,u)}}function e4(e,t){for(var r=e.data,n=e.width,a=e.height,i=n*a,o=new Uint8Array(i),l=[],s=0,u=0,c=t;u<c.length;u++){for(var f=c[u],d=0,h=f;d<i;d++,h+=4)o[d]=r[h];var y=XA(o);l.push(y),s+=y.byteLength}if(l.length>0){for(var y=new Uint8Array(s),f=0,p=0,x=l;p<x.length;p++){var g=x[p];y.set(g,f),f+=g.byteLength}return y}else return l[0]}function sE(e){var t=No(100,100);try{var r=t.getContext("2d"),n=nE(e,function(a,i){return r.createImageData(a,i)});t.width=n.width,t.height=n.height,r.putImageData(n,0,0)}catch(a){console.error("JPEG decompression error",a.message)}return t}var No=function(){throw new Error("Canvas not initialized, use initializeCanvas method to set up createCanvas method")},ed=void 0,$o=function(e,t){return ed||(ed=No(1,1)),ed.getContext("2d").createImageData(e,t)};typeof document<"u"&&(No=function(e,t){var r=document.createElement("canvas");return r.width=e,r.height=t,r});function uE(e,t){No=e,$o=t||$o}for(var t4=pE,r4=gE,Sa=[],Ln=[],cE=typeof Uint8Array<"u"?Uint8Array:Array,td="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Uo=0,fE=td.length;Uo<fE;++Uo)Sa[Uo]=td[Uo],Ln[td.charCodeAt(Uo)]=Uo;Ln[45]=62,Ln[95]=63;function dE(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function hE(e,t,r){return(t+r)*3/4-r}function pE(e){var t,r=dE(e),n=r[0],a=r[1],i=new cE(hE(e,n,a)),o=0,l=a>0?n-4:n,s;for(s=0;s<l;s+=4)t=Ln[e.charCodeAt(s)]<<18|Ln[e.charCodeAt(s+1)]<<12|Ln[e.charCodeAt(s+2)]<<6|Ln[e.charCodeAt(s+3)],i[o++]=t>>16&255,i[o++]=t>>8&255,i[o++]=t&255;return a===2&&(t=Ln[e.charCodeAt(s)]<<2|Ln[e.charCodeAt(s+1)]>>4,i[o++]=t&255),a===1&&(t=Ln[e.charCodeAt(s)]<<10|Ln[e.charCodeAt(s+1)]<<4|Ln[e.charCodeAt(s+2)]>>2,i[o++]=t>>8&255,i[o++]=t&255),i}function vE(e){return Sa[e>>18&63]+Sa[e>>12&63]+Sa[e>>6&63]+Sa[e&63]}function mE(e,t,r){for(var n,a=[],i=t;i<r;i+=3)n=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(e[i+2]&255),a.push(vE(n));return a.join("")}function gE(e){for(var t,r=e.length,n=r%3,a=[],i=16383,o=0,l=r-n;o<l;o+=i)a.push(mE(e,o,o+i>l?l:o+i));return n===1?(t=e[r-1],a.push(Sa[t>>2]+Sa[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],a.push(Sa[t>>10]+Sa[t>>4&63]+Sa[t<<2&63]+"=")),a.join("")}function rd(e){return e&4294967168?e&4294965248?e&4294901760?4:3:2:1}function bE(e){for(var t=0,r=0;r<e.length;r++){var n=e.charCodeAt(r);if(n>=55296&&n<=56319){if(r+1<e.length){var a=e.charCodeAt(r+1);(a&64512)===56320&&(r++,t+=rd(((n&1023)<<10)+(a&1023)+65536))}}else t+=rd(n)}return t}function n4(e,t,r){var n=rd(r);switch(n){case 1:e[t]=r;break;case 2:e[t]=r>>6&31|192,e[t+1]=r&63|128;break;case 3:e[t]=r>>12&15|224,e[t+1]=r>>6&63|128,e[t+2]=r&63|128;break;default:e[t]=r>>18&7|240,e[t+1]=r>>12&63|128,e[t+2]=r>>6&63|128,e[t+3]=r&63|128;break}return n}function yE(e,t,r){for(var n=0;n<r.length;n++){var a=r.charCodeAt(n);if(a>=55296&&a<=56319){if(n+1<r.length){var i=r.charCodeAt(n+1);if((i&64512)===56320){n++;var o=((a&1023)<<10)+(i&1023)+65536;t+=n4(e,t,o)}}}else t+=n4(e,t,a)}return t}function a4(e){if(e.length>1e3&&typeof TextEncoder<"u")return new TextEncoder().encode(e);var t=new Uint8Array(bE(e));return yE(t,0,e),t}function Ho(e,t){if(t>=e.length)throw Error("Invalid byte index");var r=e[t];if((r&192)===128)return r&63;throw Error("Invalid continuation byte")}function i4(e){if(e.byteLength>1e3&&typeof TextDecoder<"u")return new TextDecoder().decode(e);for(var t=[],r=0;r<e.length;){var n=e[r++],a=void 0;if(!(n&128))a=n;else if((n&224)===192){var i=Ho(e,r++);if(a=(n&31)<<6|i,a<128)throw Error("Invalid continuation byte")}else if((n&240)===224){var i=Ho(e,r++),o=Ho(e,r++);if(a=(n&15)<<12|i<<6|o,a<2048)throw Error("Invalid continuation byte");if(a>=55296&&a<=57343)throw Error("Lone surrogate U+".concat(a.toString(16).toUpperCase()," is not a scalar value"))}else if((n&248)===240){var i=Ho(e,r++),o=Ho(e,r++),l=Ho(e,r++);if(a=(n&15)<<18|i<<12|o<<6|l,a<65536||a>1114111)throw Error("Invalid continuation byte")}else throw Error("Invalid UTF-8 detected");a>65535&&(a-=65536,t.push(String.fromCharCode(a>>>10&1023|55296)),a=56320|a&1023),t.push(String.fromCharCode(a))}return t.join("")}var Ka=function(){return Ka=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},Ka.apply(this,arguments)},xE=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};function _E(e){var t={};return Object.keys(e).forEach(function(r){return t[e[r]]=r}),t}var Zl={"#Ang":"Angle","#Rsl":"Density","#Rlt":"Distance","#Nne":"None","#Prc":"Percent","#Pxl":"Pixels","#Mlm":"Millimeters","#Pnt":"Points",RrPi:"Picas",RrIn:"Inches",RrCm:"Centimeters"},Q0=_E(Zl);function et(e,t){return{name:e,classID:t}}for(var It=et("","null"),o4={strokeStyleContent:et("","solidColorLayer"),printProofSetup:et("Proof Setup","proofSetup"),Grad:et("Gradient","Grdn"),Trnf:et("Transform","Trnf"),patternFill:et("","patternFill"),ebbl:et("","ebbl"),SoFi:et("","SoFi"),GrFl:et("","GrFl"),sdwC:et("","RGBC"),hglC:et("","RGBC"),"Clr ":et("","RGBC"),tintColor:et("","RGBC"),Ofst:et("","Pnt "),ChFX:et("","ChFX"),MpgS:et("","ShpC"),DrSh:et("","DrSh"),IrSh:et("","IrSh"),OrGl:et("","OrGl"),IrGl:et("","IrGl"),TrnS:et("","ShpC"),Ptrn:et("","Ptrn"),FrFX:et("","FrFX"),phase:et("","Pnt "),frameStep:It,duration:It,workInTime:It,workOutTime:It,audioClipGroupList:It,bounds:et("","Rctn"),customEnvelopeWarp:et("","customEnvelopeWarp"),warp:et("","warp"),"Sz ":et("","Pnt "),origin:et("","Pnt "),autoExpandOffset:et("","Pnt "),keyOriginShapeBBox:et("","unitRect"),Vrsn:It,psVersion:It,docDefaultNewArtboardBackgroundColor:et("","RGBC"),artboardRect:et("","classFloatRect"),keyOriginRRectRadii:et("","radii"),keyOriginBoxCorners:It,rectangleCornerA:et("","Pnt "),rectangleCornerB:et("","Pnt "),rectangleCornerC:et("","Pnt "),rectangleCornerD:et("","Pnt "),compInfo:It,quiltWarp:et("","quiltWarp"),generatorSettings:It,crema:It,FrIn:It,blendOptions:It,FXRf:It,Lefx:It,time:It,animKey:It,timeScope:It,inTime:It,outTime:It,sheetStyle:It,translation:It,Skew:It,boundingBox:et("","boundingBox"),"Lnk ":et("","ExternalFileLink"),frameReader:et("","FrameReader"),effectParams:et("","motionTrackEffectParams"),Impr:et("None","none"),Anch:et("","Pnt "),"Fwd ":et("","Pnt "),"Bwd ":et("","Pnt "),FlrC:et("","Pnt "),meshBoundaryPath:et("","pathClass"),filterFX:et("","filterFXStyle"),Fltr:et("","rigidTransform"),FrgC:et("","RGBC"),BckC:et("","RGBC"),sdwM:et("Parameters","adaptCorrectTones"),hglM:et("Parameters","adaptCorrectTones"),customShape:et("","customShape"),origFXRefPoint:It,FXRefPoint:It,ClMg:et("","ClMg")},l4={"Crv ":et("","CrPt"),Clrs:et("","Clrt"),Trns:et("","TrnS"),keyDescriptorList:It,solidFillMulti:et("","SoFi"),gradientFillMulti:et("","GrFl"),dropShadowMulti:et("","DrSh"),innerShadowMulti:et("","IrSh"),frameFXMulti:et("","FrFX"),FrIn:It,FSts:It,LaSt:It,sheetTimelineOptions:It,trackList:et("","animationTrack"),globalTrackList:et("","animationTrack"),keyList:It,audioClipGroupList:It,audioClipList:It,countObjectList:et("","countObject"),countGroupList:et("","countGroup"),slices:et("","slice"),"Pts ":et("","Pthp"),SbpL:et("","SbpL"),pathComponents:et("","PaCm"),filterFXList:et("","filterFX"),puppetShapeList:et("","puppetShape"),channelDenoise:et("","channelDenoiseParams"),ShrP:et("","Pnt "),layerSettings:It,list:It,Adjs:et("","CrvA")},s4={TEXT:["Txt ","printerName","Nm ","Idnt","blackAndWhitePresetFileName","LUT3DFileName","presetFileName","curvesPresetFileName","mixerPresetFileName","placed","description","reason","artboardPresetName","json","clipID","relPath","fullPath","mediaDescriptor","Msge","altTag","url","cellText","preset","KnNm","FPth","comment","originalPath"],tdta:["EngineData","LUT3DFileData","indexArray","originalVertexArray","deformedVertexArray","LqMe"],long:["TextIndex","RndS","Mdpn","Smth","Lctn","strokeStyleVersion","LaID","Vrsn","Cnt ","Brgh","Cntr","means","vibrance","Strt","bwPresetKind","comp","compID","originalCompID","curvesPresetKind","mixerPresetKind","uOrder","vOrder","PgNm","totalPages","Crop","numerator","denominator","frameCount","Annt","keyOriginType","unitValueQuadVersion","keyOriginIndex","major","minor","fix","docDefaultNewArtboardBackgroundType","artboardBackgroundType","numModifyingFX","deformNumRows","deformNumCols","FrID","FrDl","FsID","LCnt","AFrm","AFSt","numBefore","numAfter","Spcn","minOpacity","maxOpacity","BlnM","sheetID","gblA","globalAltitude","descVersion","frameReaderType","LyrI","zoomOrigin","fontSize","Rds ","sliceID","topOutset","leftOutset","bottomOutset","rightOutset","filterID","meshQuality","meshExpansion","meshRigidity","VrsM","VrsN","NmbG","WLMn","WLMx","AmMn","AmMx","SclH","SclV","Lvl ","TlNm","TlOf","FlRs","Thsh","ShrS","ShrE","FlRs","Vrnc","Strg","ExtS","ExtD","HrzS","VrtS","NmbR","EdgF","Ang1","Ang2","Ang3","Ang4","lastAppliedComp","capturedInfo"],enum:["textGridding","Ornt","warpStyle","warpRotate","Inte","Bltn","ClrS","BlrQ","bvlT","bvlS","bvlD","Md ","glwS","GrdF","GlwT","RplS","BlrM","SmBM","strokeStyleLineCapType","strokeStyleLineJoinType","strokeStyleLineAlignment","strokeStyleBlendMode","PntT","Styl","lookupType","LUTFormat","dataOrder","tableOrder","enableCompCore","enableCompCoreGPU","compCoreSupport","compCoreGPUSupport","Engn","enableCompCoreThreads","gs99","FrDs","trackID","animInterpStyle","horzAlign","vertAlign","bgColorType","shapeOperation","UndA","Wvtp","Drct","WndM","Edg ","FlCl","IntE","IntC","Cnvr","Fl ","Dstr","MztT","Lns ","ExtT","DspM","ExtR","ZZTy","SphM","SmBQ","placedLayerOCIOConversion","gradientsInterpolationMethod"],bool:["PstS","printSixteenBit","masterFXSwitch","enab","uglg","antialiasGloss","useShape","useTexture","uglg","antialiasGloss","useShape","Vsbl","useTexture","Algn","Rvrs","Dthr","Invr","VctC","ShTr","layerConceals","strokeEnabled","fillEnabled","strokeStyleScaleLock","strokeStyleStrokeAdjust","hardProof","MpBl","paperWhite","useLegacy","Auto","Lab ","useTint","keyShapeInvalidated","autoExpandEnabled","autoNestEnabled","autoPositionEnabled","shrinkwrapOnSaveEnabled","present","showInDialog","overprint","sheetDisclosed","lightsDisclosed","meshesDisclosed","materialsDisclosed","hasMotion","muted","Effc","selected","autoScope","fillCanvas","cellTextIsHTML","Smoo","Clsp","validAtPosition","rigidType","hasoptions","filterMaskEnable","filterMaskLinked","filterMaskExtendWithWhite","removeJPEGArtifact","Mnch","ExtF","ExtM","moreAccurate","GpuY","LIWy","Cnty"],doub:["warpValue","warpPerspective","warpPerspectiveOther","Intr","Wdth","Hght","strokeStyleMiterLimit","strokeStyleResolution","layerTime","keyOriginResolution","xx","xy","yx","yy","tx","ty","FrGA","frameRate","audioLevel","rotation","X ","Y ","redFloat","greenFloat","blueFloat","imageResolution","PuX0","PuX1","PuX2","PuX3","PuY0","PuY1","PuY2","PuY3"],UntF:["sdwO","hglO","lagl","Lald","srgR","blur","Sftn","Opct","Dstn","Angl","Ckmt","Nose","Inpr","ShdN","strokeStyleLineWidth","strokeStyleLineDashOffset","strokeStyleOpacity","H ","Top ","Left","Btom","Rght","Rslt","topRight","topLeft","bottomLeft","bottomRight","ClNs","Shrp"],VlLs:["Crv ","Clrs","Mnm ","Mxm ","Trns","pathList","strokeStyleLineDashSet","FrLs","slices","LaSt","Trnf","nonAffineTransform","keyDescriptorList","guideIndeces","gradientFillMulti","solidFillMulti","frameFXMulti","innerShadowMulti","dropShadowMulti","FrIn","FSts","FsFr","sheetTimelineOptions","audioClipList","trackList","globalTrackList","keyList","audioClipList","warpValues","selectedPin","Pts ","SbpL","pathComponents","pinOffsets","posFinalPins","pinVertexIndices","PinP","PnRt","PnOv","PnDp","filterFXList","puppetShapeList","ShrP","channelDenoise","Mtrx","layerSettings","list","compList","Adjs"],ObAr:["meshPoints","quiltSliceX","quiltSliceY"],"obj ":["null","Chnl"],"Pth ":["DspF"]},wE=["Rd ","Grn ","Bl ","Yllw","Ylw ","Cyn ","Mgnt","Blck","Gry ","Lmnc","A ","B "],u4={"Mnm ":"long","Mxm ":"long",FrLs:"long",strokeStyleLineDashSet:"UntF",Trnf:"doub",nonAffineTransform:"doub",keyDescriptorList:"Objc",gradientFillMulti:"Objc",solidFillMulti:"Objc",frameFXMulti:"Objc",innerShadowMulti:"Objc",dropShadowMulti:"Objc",LaSt:"Objc",FrIn:"Objc",FSts:"Objc",FsFr:"long",blendOptions:"Objc",sheetTimelineOptions:"Objc",keyList:"Objc",warpValues:"doub",selectedPin:"long","Pts ":"Objc",SbpL:"Objc",pathComponents:"Objc",pinOffsets:"doub",posFinalPins:"doub",pinVertexIndices:"long",PinP:"doub",PnRt:"long",PnOv:"bool",PnDp:"doub",filterFXList:"Objc",puppetShapeList:"Objc",ShrP:"Objc",channelDenoise:"Objc",Mtrx:"long",compList:"long",Chnl:"enum"},eu={},nd=0,c4=Object.keys(s4);nd<c4.length;nd++)for(var f4=c4[nd],ad=0,d4=s4[f4];ad<d4.length;ad++){var jo=d4[ad];eu[jo]=f4}for(var id=0,h4=Object.keys(o4);id<h4.length;id++){var jo=h4[id];eu[jo]||(eu[jo]="Objc")}for(var od=0,p4=Object.keys(l4);od<p4.length;od++){var jo=p4[od];u4[jo]="Objc"}function kE(e,t,r,n){return e==="presetKind"?typeof t=="string"?"enum":"long":e==="null"&&r==="slices"?"TEXT":e==="groupID"?r==="slices"?"long":"TEXT":e==="Sz "?"Wdth"in t?"Objc":"units"in t?"UntF":"doub":e==="Type"?typeof t=="string"?"enum":"long":e==="AntA"?typeof t=="string"?"enum":"bool":(e==="Hrzn"||e==="Vrtc")&&(n.Type==="keyType.Pstn"||n._classID==="Ofst")?"long":e==="Hrzn"||e==="Vrtc"||e==="Top "||e==="Left"||e==="Btom"||e==="Rght"?r==="slices"?"long":typeof t=="number"?"doub":"UntF":e==="Vrsn"?typeof t=="number"?"long":"Objc":e==="Rd "||e==="Grn "||e==="Bl "?r==="artd"?"long":"doub":e==="Trnf"?Array.isArray(t)?"VlLs":"Objc":eu[e]}function Xa(e){var t=st(e);return fu(e,t||4)}function Ya(e,t){if(t.length===4&&t!=="warp"&&t!=="time"&&t!=="hold"&&t!=="list")ht(e,0),pt(e,t);else{ht(e,t.length);for(var r=0;r<t.length;r++)Ge(e,t.charCodeAt(r))}}function v4(e,t){for(var r=Xi(e),n=t?{_name:r.name,_classID:r.classID}:{},a=De(e),i=0;i<a;i++){var o=Xa(e),l=Wt(e),s=g4(e,l,t);n[o]=s}return n}function m4(e,t,r,n,a){Ji(e,t),Ya(e,r);var i=Object.keys(n),o=i.length;"_name"in n&&o--,"_classID"in n&&o--,Je(e,o);for(var l=0,s=i;l<s.length;l++){var u=s[l];if(!(u==="_name"||u==="_classID")){var c=kE(u,n[u],a,n),f=o4[u];u==="bounds"&&a==="text"?f=et("","bounds"):u==="origin"?c=a==="slices"?"enum":"Objc":(u==="Cyn "||u==="Mgnt"||u==="Ylw "||u==="Blck")&&n._classID==="CMYC"?c="doub":/^PN[a-z][a-z]$/.test(u)?c="TEXT":/^PT[a-z][a-z]$/.test(u)?c="long":/^PF[a-z][a-z]$/.test(u)||(u==="Rds "||u==="Thsh")&&typeof n[u]=="number"&&n._classID==="SmrB"?c="doub":u==="ClSz"||u==="Rds "||u==="Amnt"?c=typeof n[u]=="number"?"long":"UntF":(u==="sdwM"||u==="hglM")&&typeof n[u]=="string"||u==="blur"&&typeof n[u]=="string"?c="enum":u==="Hght"&&typeof n[u]=="number"&&n._classID==="Embs"||u==="Angl"&&typeof n[u]=="number"&&(n._classID==="Embs"||n._classID==="smartSharpen"||n._classID==="Twrl"||n._classID==="MtnB")?c="long":u==="Angl"&&typeof n[u]=="number"?c="doub":u==="bounds"&&a==="slices"?(c="Objc",f=et("","Rct1")):u==="Scl "?typeof n[u]=="object"&&"Hrzn"in n[u]?(c="Objc",f=It):typeof n[u]=="number"?c="long":c="UntF":u==="audioClipGroupList"&&i.length===1?c="VlLs":(u==="Strt"||u==="Brgh")&&"H "in n?c="doub":u==="Wdth"&&typeof n[u]=="object"?c="UntF":u==="Ofst"&&typeof n[u]=="number"?c="long":u==="Strt"&&typeof n[u]=="object"?(c="Objc",f=It):wE.indexOf(u)!==-1?c=r==="RGBC"&&a!=="artd"?"doub":"long":u==="profile"?c=r==="printOutput"?"TEXT":"tdta":u==="strokeStyleContent"?n[u]["Clr "]?f=et("","solidColorLayer"):n[u].Grad?f=et("","gradientLayer"):n[u].Ptrn&&(f=et("","patternLayer")):u==="bounds"&&a==="quiltWarp"&&(f=et("","classFloatRect")),f&&f.classID==="RGBC"&&"H "in n[u]&&(f={classID:"HSBC",name:""}),Ya(e,u),pt(e,c||"long"),b4(e,c||"long",n[u],u,f,a)}}}function g4(e,t,r){switch(t){case"obj ":return CE(e);case"Objc":case"GlbO":return v4(e,r);case"VlLs":{for(var n=st(e),a=[],i=0;i<n;i++){var o=Wt(e);a.push(g4(e,o,r))}return a}case"doub":return Nn(e);case"UntF":{var l=Wt(e),s=Nn(e);if(!Zl[l])throw new Error("Invalid units: ".concat(l));return{units:Zl[l],value:s}}case"UnFl":{var l=Wt(e),s=Yn(e);if(!Zl[l])throw new Error("Invalid units: ".concat(l));return{units:Zl[l],value:s}}case"TEXT":return _r(e);case"enum":{var u=Xa(e),s=Xa(e);return"".concat(u,".").concat(s)}case"long":return st(e);case"comp":{var c=De(e),f=De(e);return{low:c,high:f}}case"bool":return!!Ze(e);case"type":case"GlbC":return Xi(e);case"alis":{var d=st(e);return fu(e,d)}case"tdta":{var h=st(e);return dr(e,h)}case"ObAr":{st(e),_r(e),Xa(e);for(var y=st(e),a=[],i=0;i<y;i++){var p=Xa(e);Wt(e),Wt(e);for(var x=st(e),g=[],m=0;m<x;m++)g.push(Nn(e));a.push({type:p,values:g})}return a}case"Pth ":{st(e);var b=Wt(e);Pg(e);var v=Pg(e),S=RE(e,v);return{sig:b,path:S}}default:throw new Error("Invalid TySh descriptor OSType: ".concat(t," at ").concat(e.offset.toString(16)))}}var SE={meshPoints:"rationalPoint",quiltSliceX:"UntF",quiltSliceY:"UntF"};function b4(e,t,r,n,a,i){switch(t){case"obj ":AE(e,n,r);break;case"Objc":case"GlbO":{if(typeof r!="object")throw new Error("Invalid struct value: ".concat(JSON.stringify(r),", key: ").concat(n));if(!a)throw new Error("Missing ext type for: '".concat(n,"' (").concat(JSON.stringify(r),")"));var o=r._name||a.name,l=r._classID||a.classID;m4(e,o,l,r,i);break}case"VlLs":if(!Array.isArray(r))throw new Error("Invalid list value: ".concat(JSON.stringify(r),", key: ").concat(n));ht(e,r.length);for(var s=0;s<r.length;s++){var u=u4[n];pt(e,u||"long"),b4(e,u||"long",r[s],"".concat(n,"[]"),l4[n],i)}break;case"doub":if(typeof r!="number")throw new Error("Invalid number value: ".concat(JSON.stringify(r),", key: ").concat(n));$n(e,r);break;case"UntF":if(!Q0[r.units])throw new Error("Invalid units: ".concat(r.units," in ").concat(n));pt(e,Q0[r.units]),$n(e,r.value);break;case"UnFl":if(!Q0[r.units])throw new Error("Invalid units: ".concat(r.units," in ").concat(n));pt(e,Q0[r.units]),Qn(e,r.value);break;case"TEXT":Ji(e,r);break;case"enum":{if(typeof r!="string")throw new Error("Invalid enum value: ".concat(JSON.stringify(r),", key: ").concat(n));var c=r.split("."),f=c[0],d=c[1];Ya(e,f),Ya(e,d);break}case"long":if(typeof r!="number")throw new Error("Invalid integer value: ".concat(JSON.stringify(r),", key: ").concat(n));ht(e,r);break;case"bool":if(typeof r!="boolean")throw new Error("Invalid boolean value: ".concat(JSON.stringify(r),", key: ").concat(n));Ge(e,r?1:0);break;case"tdta":ht(e,r.byteLength),ta(e,r);break;case"ObAr":{ht(e,16),Ji(e,"");var h=SE[n];if(!h)throw new Error("Not implemented ObArType for: ".concat(n));Ya(e,h),ht(e,r.length);for(var s=0;s<r.length;s++){Ya(e,r[s].type),pt(e,"UnFl"),pt(e,"#Pxl"),ht(e,r[s].values.length);for(var y=0;y<r[s].values.length;y++)$n(e,r[s].values[y])}break}case"Pth ":{var p=12+r.path.length*2;ht(e,p),pt(e,r.sig),w3(e,p),w3(e,r.path.length),ST(e,r.path);break}default:throw new Error("Not implemented descriptor OSType: ".concat(t))}}function CE(e){for(var t=st(e),r=[],n=0;n<t;n++){var a=Wt(e);switch(a){case"prop":{Xi(e);var i=Xa(e);r.push(i);break}case"Clss":r.push(Xi(e));break;case"Enmr":{Xi(e);var o=Xa(e),l=Xa(e);r.push("".concat(o,".").concat(l));break}case"rele":{Xi(e),r.push(De(e));break}case"Idnt":r.push(st(e));break;case"indx":r.push(st(e));break;case"name":{Xi(e),r.push(_r(e));break}default:throw new Error("Invalid descriptor reference type: ".concat(a))}}return r}function AE(e,t,r){ht(e,r.length);for(var n=0;n<r.length;n++){var a=r[n],i="unknown";switch(typeof a=="string"&&(/^[a-z ]+\.[a-z ]+$/i.test(a)?i="Enmr":i="name"),pt(e,i),i){case"Enmr":{var o=a.split("."),l=o[0],s=o[1];y4(e,"\0",l),Ya(e,l),Ya(e,s);break}case"name":{y4(e,"\0","Lyr "),En(e,a+"\0");break}default:throw new Error("Invalid descriptor reference type: ".concat(i))}}return r}function Xi(e){var t=_r(e),r=Xa(e);return{name:t,classID:r}}function y4(e,t,r){En(e,t),Ya(e,r)}function Tt(e,t){t===void 0&&(t=!1);var r=De(e);if(r!==16)throw new Error("Invalid descriptor version: ".concat(r));var n=v4(e,t);return n}function Dt(e,t,r,n,a){a===void 0&&(a=""),Je(e,16),m4(e,t,r,n,a)}function Jl(e){return{x:e.Hrzn,y:e.Vrtc}}function Ql(e){return{Hrzn:e.x,Vrtc:e.y}}function x4(e){return{top:Nt(e["Top "]),left:Nt(e.Left),right:Nt(e.Rght),bottom:Nt(e.Btom)}}function _4(e){var t;return t={Left:Zt(e.left,"bounds.left")},t["Top "]=Zt(e.top,"bounds.top"),t.Rght=Zt(e.right,"bounds.right"),t.Btom=Zt(e.bottom,"bounds.bottom"),t}function w4(e){var t={enabled:!!e.enab,position:au.decode(e.Styl),fillType:j4.decode(e.PntT),blendMode:on.decode(e["Md "]),opacity:dt(e.Opct),size:Nt(e["Sz "])};return e.present!==void 0&&(t.present=e.present),e.showInDialog!==void 0&&(t.showInDialog=e.showInDialog),e.overprint!==void 0&&(t.overprint=e.overprint),e["Clr "]&&(t.color=Kn(e["Clr "])),e.Grad&&(t.gradient=D4(e)),e.Ptrn&&(t.pattern=I4(e)),t}function k4(e){var t={};return t.enab=!!e.enabled,e.present!==void 0&&(t.present=!!e.present),e.showInDialog!==void 0&&(t.showInDialog=!!e.showInDialog),t.Styl=au.encode(e.position),t.PntT=j4.encode(e.fillType),t["Md "]=on.encode(e.blendMode),t.Opct=Dr(e.opacity),t["Sz "]=Zt(e.size,"size"),e.color&&(t["Clr "]=Xn(e.color)),e.gradient&&(t=Ka(Ka({},t),z4(e.gradient))),e.pattern&&(t=Ka(Ka({},t),F4(e.pattern))),e.overprint!==void 0&&(t.overprint=!!e.overprint),t}function es(e,t,r){for(var n,a,i,o=r?{"Scl ":Bn((n=e.scale)!==null&&n!==void 0?n:1),masterFXSwitch:!e.disabled}:{masterFXSwitch:!e.disabled,"Scl ":Bn((a=e.scale)!==null&&a!==void 0?a:1)},l=["dropShadow","innerShadow","solidFill","gradientOverlay","stroke"],s=0,u=l;s<u.length;s++){var c=u[s];if(e[c]&&!Array.isArray(e[c]))throw new Error("".concat(c," should be an array"))}var f=function(b){return!!b&&b.length>1&&r},d=function(b){return!!b&&b.length>=1&&(!r||b.length===1)};if(d(e.dropShadow)&&(o.DrSh=wn(e.dropShadow[0],"dropShadow",t)),f(e.dropShadow)&&(o.dropShadowMulti=e.dropShadow.map(function(b){return wn(b,"dropShadow",t)})),d(e.innerShadow)&&(o.IrSh=wn(e.innerShadow[0],"innerShadow",t)),f(e.innerShadow)&&(o.innerShadowMulti=e.innerShadow.map(function(b){return wn(b,"innerShadow",t)})),e.outerGlow&&(o.OrGl=wn(e.outerGlow,"outerGlow",t)),f(e.solidFill)&&(o.solidFillMulti=e.solidFill.map(function(b){return wn(b,"solidFill",t)})),f(e.gradientOverlay)&&(o.gradientFillMulti=e.gradientOverlay.map(function(b){return wn(b,"gradientOverlay",t)})),f(e.stroke)&&(o.frameFXMulti=e.stroke.map(function(b){return k4(b)})),e.innerGlow&&(o.IrGl=wn(e.innerGlow,"innerGlow",t)),e.bevel&&(o.ebbl=wn(e.bevel,"bevel",t)),d(e.solidFill)&&(o.SoFi=wn(e.solidFill[0],"solidFill",t)),e.patternOverlay&&(o.patternFill=wn(e.patternOverlay,"patternOverlay",t)),d(e.gradientOverlay)&&(o.GrFl=wn(e.gradientOverlay[0],"gradientOverlay",t)),e.satin&&(o.ChFX=wn(e.satin,"satin",t)),d(e.stroke)&&(o.FrFX=k4((i=e.stroke)===null||i===void 0?void 0:i[0])),r){o.numModifyingFX=0;for(var h=0,y=Object.keys(e);h<y.length;h++){var c=y[h],p=e[c];if(Array.isArray(p))for(var x=0,g=p;x<g.length;x++){var m=g[x];m.enabled&&o.numModifyingFX++}else p.enabled&&o.numModifyingFX++}}return o}function ts(e,t){var r={},n=e.masterFXSwitch,a=e.DrSh,i=e.dropShadowMulti,o=e.IrSh,l=e.innerShadowMulti,s=e.OrGl,u=e.IrGl,c=e.ebbl,f=e.SoFi,d=e.solidFillMulti,h=e.patternFill,y=e.GrFl,p=e.gradientFillMulti,x=e.ChFX,g=e.FrFX,m=e.frameFXMulti;e.numModifyingFX;var b=xE(e,["masterFXSwitch","DrSh","dropShadowMulti","IrSh","innerShadowMulti","OrGl","IrGl","ebbl","SoFi","solidFillMulti","patternFill","GrFl","gradientFillMulti","ChFX","FrFX","frameFXMulti","numModifyingFX"]);return n||(r.disabled=!0),e["Scl "]&&(r.scale=dt(e["Scl "])),a&&(r.dropShadow=[_n(a,t)]),i&&(r.dropShadow=i.map(function(v){return _n(v,t)})),o&&(r.innerShadow=[_n(o,t)]),l&&(r.innerShadow=l.map(function(v){return _n(v,t)})),s&&(r.outerGlow=_n(s,t)),u&&(r.innerGlow=_n(u,t)),c&&(r.bevel=_n(c,t)),f&&(r.solidFill=[_n(f,t)]),d&&(r.solidFill=d.map(function(v){return _n(v,t)})),h&&(r.patternOverlay=_n(h,t)),y&&(r.gradientOverlay=[_n(y,t)]),p&&(r.gradientOverlay=p.map(function(v){return _n(v,t)})),x&&(r.satin=_n(x,t)),g&&(r.stroke=[w4(g)]),m&&(r.stroke=m.map(function(v){return w4(v)})),t&&Object.keys(b).length>1&&console.log("Unhandled effect keys:",b),r}function S4(e,t){for(var r=[],n=0;n<e.length;n++){var a=e[n],i=a.time,o=i.denominator,l=i.numerator,s=a.selected,u=a.animKey,c={numerator:l,denominator:o},f=U4.decode(a.animInterpStyle);switch(u.Type){case"keyType.Opct":r.push({interpolation:f,time:c,selected:s,type:"opacity",value:dt(u.Opct)});break;case"keyType.Pstn":r.push({interpolation:f,time:c,selected:s,type:"position",x:u.Hrzn,y:u.Vrtc});break;case"keyType.Trnf":r.push({interpolation:f,time:c,selected:s,type:"transform",scale:Jl(u["Scl "]),skew:Jl(u.Skew),rotation:u.rotation,translation:Jl(u.translation)});break;case"keyType.sheetStyle":{var d={interpolation:f,time:c,selected:s,type:"style"};u.sheetStyle.Lefx&&(d.style=ts(u.sheetStyle.Lefx,t)),r.push(d);break}case"keyType.globalLighting":{r.push({interpolation:f,time:c,selected:s,type:"globalLighting",globalAngle:u.gblA,globalAltitude:u.globalAltitude});break}default:throw new Error("Unsupported keyType value")}}return r}function C4(e){for(var t=[],r=0;r<e.length;r++){var n=e[r],a=n.time,i=n.selected,o=i===void 0?!1:i,l=n.interpolation,s=U4.encode(l),u=void 0;switch(n.type){case"opacity":u={Type:"keyType.Opct",Opct:Dr(n.value)};break;case"position":u={Type:"keyType.Pstn",Hrzn:n.x,Vrtc:n.y};break;case"transform":u={Type:"keyType.Trnf","Scl ":Ql(n.scale),Skew:Ql(n.skew),rotation:n.rotation,translation:Ql(n.translation)};break;case"style":u={Type:"keyType.sheetStyle",sheetStyle:{Vrsn:1,blendOptions:{}}},n.style&&(u.sheetStyle={Vrsn:1,Lefx:es(n.style,!1,!1),blendOptions:{}});break;case"globalLighting":{u={Type:"keyType.globalLighting",gblA:n.globalAngle,globalAltitude:n.globalAltitude};break}default:throw new Error("Unsupported keyType value")}t.push({Vrsn:1,animInterpStyle:s,time:a,animKey:u,selected:o})}return t}function A4(e,t){for(var r=[],n=0;n<e.length;n++){var a=e[n],i={type:H4.decode(a.trackID),enabled:a.enab,keys:S4(a.keyList,t)};a.effectParams&&(i.effectParams={fillCanvas:a.effectParams.fillCanvas,zoomOrigin:a.effectParams.zoomOrigin,keys:S4(a.effectParams.keyList,t)}),r.push(i)}return r}function E4(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];t.push(Ka(Ka({trackID:H4.encode(n.type),Vrsn:1,enab:!!n.enabled,Effc:!!n.effectParams},n.effectParams?{effectParams:{keyList:C4(n.keys),fillCanvas:n.effectParams.fillCanvas,zoomOrigin:n.effectParams.zoomOrigin}}:{}),{keyList:C4(n.keys)}))}return t}function _n(e,t){for(var r={},n=0,a=Object.keys(e);n<a.length;n++){var i=a[n],o=e[i];switch(i){case"enab":r.enabled=!!o;break;case"uglg":r.useGlobalLight=!!o;break;case"AntA":r.antialiased=!!o;break;case"Algn":r.align=!!o;break;case"Dthr":r.dither=!!o;break;case"Invr":r.invert=!!o;break;case"Rvrs":r.reverse=!!o;break;case"Clr ":r.color=Kn(o);break;case"hglC":r.highlightColor=Kn(o);break;case"sdwC":r.shadowColor=Kn(o);break;case"Styl":r.position=au.decode(o);break;case"Md ":r.blendMode=on.decode(o);break;case"hglM":r.highlightBlendMode=on.decode(o);break;case"sdwM":r.shadowBlendMode=on.decode(o);break;case"bvlS":r.style=R4.decode(o);break;case"bvlD":r.direction=B4.decode(o);break;case"bvlT":r.technique=L4.decode(o);break;case"GlwT":r.technique=N4.decode(o);break;case"glwS":r.source=$4.decode(o);break;case"Type":r.type=ru.decode(o);break;case"gs99":r.interpolationMethod=Go.decode(o);break;case"Opct":r.opacity=dt(o);break;case"hglO":r.highlightOpacity=dt(o);break;case"sdwO":r.shadowOpacity=dt(o);break;case"lagl":r.angle=_i(o);break;case"Angl":r.angle=_i(o);break;case"Lald":r.altitude=_i(o);break;case"Sftn":r.soften=Nt(o);break;case"srgR":r.strength=dt(o);break;case"blur":r.size=Nt(o);break;case"Nose":r.noise=dt(o);break;case"Inpr":r.range=dt(o);break;case"Ckmt":r.choke=Nt(o);break;case"ShdN":r.jitter=dt(o);break;case"Dstn":r.distance=Nt(o);break;case"Scl ":r.scale=dt(o);break;case"Ptrn":r.pattern={name:o["Nm "],id:o.Idnt};break;case"phase":r.phase={x:o.Hrzn,y:o.Vrtc};break;case"Ofst":r.offset={x:dt(o.Hrzn),y:dt(o.Vrtc)};break;case"MpgS":case"TrnS":r.contour={name:o["Nm "],curve:o["Crv "].map(function(l){return{x:l.Hrzn,y:l.Vrtc}})};break;case"Grad":r.gradient=T4(o);break;case"useTexture":case"useShape":case"layerConceals":case"present":case"showInDialog":case"antialiasGloss":r[i]=o;break;case"_name":case"_classID":break;default:t&&console.log("Invalid effect key: '".concat(i,"', value:"),o)}}return r}function wn(e,t,r){var n={enab:!1};t==="dropShadow"&&(n.TrnS={"Nm ":"","Crv ":[]});for(var a=0,i=Object.keys(e);a<i.length;a++){var o=i[a],l=o,s=e[l];switch(l){case"enabled":n.enab=!!s;break;case"useGlobalLight":n.uglg=!!s;break;case"antialiased":n.AntA=!!s;break;case"align":n.Algn=!!s;break;case"dither":n.Dthr=!!s;break;case"invert":n.Invr=!!s;break;case"reverse":n.Rvrs=!!s;break;case"color":n["Clr "]=Xn(s);break;case"highlightColor":n.hglC=Xn(s);break;case"shadowColor":n.sdwC=Xn(s);break;case"position":n.Styl=au.encode(s);break;case"blendMode":n["Md "]=on.encode(s);break;case"highlightBlendMode":n.hglM=on.encode(s);break;case"shadowBlendMode":n.sdwM=on.encode(s);break;case"style":n.bvlS=R4.encode(s);break;case"direction":n.bvlD=B4.encode(s);break;case"technique":t==="bevel"?n.bvlT=L4.encode(s):n.GlwT=N4.encode(s);break;case"source":n.glwS=$4.encode(s);break;case"type":n.Type=ru.encode(s);break;case"interpolationMethod":n.gs99=Go.encode(s);break;case"opacity":n.Opct=Dr(s);break;case"highlightOpacity":n.hglO=Dr(s);break;case"shadowOpacity":n.sdwO=Dr(s);break;case"angle":t==="gradientOverlay"||t==="patternFill"?n.Angl=as(s):n.lagl=as(s);break;case"altitude":n.Lald=as(s);break;case"soften":n.Sftn=Zt(s,l);break;case"strength":n.srgR=Dr(s);break;case"size":n.blur=Zt(s,l);break;case"noise":n.Nose=Dr(s);break;case"range":n.Inpr=Dr(s);break;case"choke":n.Ckmt=Zt(s,l);break;case"jitter":n.ShdN=Dr(s);break;case"distance":n.Dstn=Zt(s,l);break;case"scale":n["Scl "]=Dr(s);break;case"pattern":n.Ptrn={"Nm ":s.name,Idnt:s.id};break;case"phase":n.phase={Hrzn:s.x,Vrtc:s.y};break;case"offset":n.Ofst={Hrzn:Dr(s.x),Vrtc:Dr(s.y)};break;case"contour":{n[t==="satin"?"MpgS":"TrnS"]={"Nm ":s.name,"Crv ":s.curve.map(function(u){return{Hrzn:u.x,Vrtc:u.y}})};break}case"gradient":n.Grad=M4(s);break;case"useTexture":case"useShape":case"layerConceals":case"present":case"showInDialog":case"antialiasGloss":n[l]=s;break;default:r&&console.log("Invalid effect key: '".concat(l,"', value:"),s)}}return n}function T4(e){if(e.GrdF==="GrdF.CstS"){var t=e.Intr||4096;return{type:"solid",name:e["Nm "],smoothness:e.Intr/4096,colorStops:e.Clrs.map(function(r){return{color:Kn(r["Clr "]),location:r.Lctn/t,midpoint:r.Mdpn/100}}),opacityStops:e.Trns.map(function(r){return{opacity:dt(r.Opct),location:r.Lctn/t,midpoint:r.Mdpn/100}})}}else return{type:"noise",name:e["Nm "],roughness:e.Smth/4096,colorModel:nu.decode(e.ClrS),randomSeed:e.RndS,restrictColors:!!e.VctC,addTransparency:!!e.ShTr,min:e["Mnm "].map(function(r){return r/100}),max:e["Mxm "].map(function(r){return r/100})}}function M4(e){var t,r;if(e.type==="solid"){var n=Math.round(((t=e.smoothness)!==null&&t!==void 0?t:1)*4096);return{"Nm ":e.name||"",GrdF:"GrdF.CstS",Intr:n,Clrs:e.colorStops.map(function(a){var i;return{"Clr ":Xn(a.color),Type:"Clry.UsrS",Lctn:Math.round(a.location*n),Mdpn:Math.round(((i=a.midpoint)!==null&&i!==void 0?i:.5)*100)}}),Trns:e.opacityStops.map(function(a){var i;return{Opct:Dr(a.opacity),Lctn:Math.round(a.location*n),Mdpn:Math.round(((i=a.midpoint)!==null&&i!==void 0?i:.5)*100)}})}}else return{GrdF:"GrdF.ClNs","Nm ":e.name||"",ShTr:!!e.addTransparency,VctC:!!e.restrictColors,ClrS:nu.encode(e.colorModel),RndS:e.randomSeed||0,Smth:Math.round(((r=e.roughness)!==null&&r!==void 0?r:1)*4096),"Mnm ":(e.min||[0,0,0,0]).map(function(a){return a*100}),"Mxm ":(e.max||[1,1,1,1]).map(function(a){return a*100})}}function D4(e){var t=T4(e.Grad);return t.style=ru.decode(e.Type),e.Dthr!==void 0&&(t.dither=e.Dthr),e.gradientsInterpolationMethod!==void 0&&(t.interpolationMethod=Go.decode(e.gradientsInterpolationMethod)),e.Rvrs!==void 0&&(t.reverse=e.Rvrs),e.Angl!==void 0&&(t.angle=_i(e.Angl)),e["Scl "]!==void 0&&(t.scale=dt(e["Scl "])),e.Algn!==void 0&&(t.align=e.Algn),e.Ofst!==void 0&&(t.offset={x:dt(e.Ofst.Hrzn),y:dt(e.Ofst.Vrtc)}),t}function I4(e){var t={name:e.Ptrn["Nm "],id:e.Ptrn.Idnt};return e.Lnkd!==void 0&&(t.linked=e.Lnkd),e.phase!==void 0&&(t.phase={x:e.phase.Hrzn,y:e.phase.Vrtc}),t}function rs(e){if("Grad"in e)return D4(e);if("Ptrn"in e)return Ka({type:"pattern"},I4(e));if("Clr "in e)return{type:"color",color:Kn(e["Clr "])};throw new Error("Invalid vector content")}function z4(e){var t={};return e.dither!==void 0&&(t.Dthr=e.dither),e.interpolationMethod!==void 0&&(t.gradientsInterpolationMethod=Go.encode(e.interpolationMethod)),e.reverse!==void 0&&(t.Rvrs=e.reverse),e.angle!==void 0&&(t.Angl=as(e.angle)),t.Type=ru.encode(e.style),e.align!==void 0&&(t.Algn=e.align),e.scale!==void 0&&(t["Scl "]=Dr(e.scale)),e.offset&&(t.Ofst={Hrzn:Dr(e.offset.x),Vrtc:Dr(e.offset.y)}),t.Grad=M4(e),t}function F4(e){var t={Ptrn:{"Nm ":e.name||"",Idnt:e.id||""}};return e.linked!==void 0&&(t.Lnkd=!!e.linked),e.phase!==void 0&&(t.phase={Hrzn:e.phase.x,Vrtc:e.phase.y}),t}function ns(e){return e.type==="color"?{key:"SoCo",descriptor:{"Clr ":Xn(e.color)}}:e.type==="pattern"?{key:"PtFl",descriptor:F4(e)}:{key:"GdFl",descriptor:z4(e)}}function Kn(e){if("H "in e)return{h:EE(e["H "]),s:e.Strt,b:e.Brgh};if("Rd "in e)return{r:e["Rd "],g:e["Grn "],b:e["Bl "]};if("Cyn "in e)return{c:e["Cyn "],m:e.Mgnt,y:e["Ylw "],k:e.Blck};if("Gry "in e)return{k:e["Gry "]};if("Lmnc"in e)return{l:e.Lmnc,a:e["A "],b:e["B "]};if("redFloat"in e)return{fr:e.redFloat,fg:e.greenFloat,fb:e.blueFloat};throw new Error("Unsupported color descriptor")}function Xn(e){if(e){if("r"in e)return{_name:"",_classID:"RGBC","Rd ":e.r||0,"Grn ":e.g||0,"Bl ":e.b||0};if("fr"in e)return{_name:"",_classID:"RGBC",redFloat:e.fr,greenFloat:e.fg,blueFloat:e.fb};if("h"in e)return{_name:"",_classID:"HSBC","H ":as(e.h*360),Strt:e.s||0,Brgh:e.b||0};if("c"in e)return{_name:"",_classID:"CMYC","Cyn ":e.c||0,Mgnt:e.m||0,"Ylw ":e.y||0,Blck:e.k||0};if("l"in e)return{_name:"",_classID:"LABC",Lmnc:e.l||0,"A ":e.a||0,"B ":e.b||0};if("k"in e)return{_name:"",_classID:"GRYC","Gry ":e.k};throw new Error("Invalid color value")}else return{_name:"",_classID:"RGBC","Rd ":0,"Grn ":0,"Bl ":0}}function _i(e){if(e===void 0)return 0;if(e.units!=="Angle")throw new Error("Invalid units: ".concat(e.units));return e.value}function dt(e){if(e===void 0)return 1;if(e.units!=="Percent")throw new Error("Invalid units: ".concat(e.units));return e.value/100}function EE(e){if(e===void 0)return 1;if(e.units==="Percent")return e.value/100;if(e.units==="Angle")return e.value/360;throw new Error("Invalid units: ".concat(e.units))}function Nt(e){var t=e.units,r=e.value;if(t!=="Pixels"&&t!=="Millimeters"&&t!=="Points"&&t!=="None"&&t!=="Picas"&&t!=="Inches"&&t!=="Centimeters"&&t!=="Density")throw new Error("Invalid units: ".concat(JSON.stringify({units:t,value:r})));return{value:r,units:t}}function wi(e,t){return t===void 0&&(t="Pixels"),typeof e=="number"?{value:e,units:t}:Nt(e)}function tu(e,t){var r=e.units,n=e.value;if(r!==t)throw new Error("Invalid units: ".concat(JSON.stringify({units:r,value:n})));return n}function as(e){return{units:"Angle",value:e||0}}function Dr(e){return{units:"Percent",value:Math.round((e||0)*100)}}function Bn(e){return{units:"Percent",value:(e||0)*100}}function Zt(e,t){if(e==null)return{units:"Pixels",value:0};if(typeof e!="object")throw new Error("Invalid value: ".concat(JSON.stringify(e)," (key: ").concat(t,") (should have value and units)"));var r=e.units,n=e.value;if(typeof n!="number")throw new Error("Invalid value in ".concat(JSON.stringify(e)," (key: ").concat(t,")"));if(r!=="Pixels"&&r!=="Millimeters"&&r!=="Points"&&r!=="None"&&r!=="Picas"&&r!=="Inches"&&r!=="Centimeters"&&r!=="Density")throw new Error("Invalid units in ".concat(JSON.stringify(e)," (key: ").concat(t,")"));return{units:r,value:n}}function an(e){var t=e.numerator,r=e.denominator;return{numerator:t,denominator:r}}var O4=vt("textGridding","none",{none:"None",round:"Rnd "}),is=vt("Ornt","horizontal",{horizontal:"Hrzn",vertical:"Vrtc"}),P4=vt("Annt","sharp",{none:"Anno",sharp:"antiAliasSharp",crisp:"AnCr",strong:"AnSt",smooth:"AnSm",platform:"antiAliasPlatformGray",platformLCD:"antiAliasPlatformLCD"}),ld=vt("warpStyle","none",{none:"warpNone",arc:"warpArc",arcLower:"warpArcLower",arcUpper:"warpArcUpper",arch:"warpArch",bulge:"warpBulge",shellLower:"warpShellLower",shellUpper:"warpShellUpper",flag:"warpFlag",wave:"warpWave",fish:"warpFish",rise:"warpRise",fisheye:"warpFisheye",inflate:"warpInflate",squeeze:"warpSqueeze",twist:"warpTwist",cylinder:"warpCylinder",custom:"warpCustom"}),on=vt("BlnM","normal",{normal:"Nrml",dissolve:"Dslv",darken:"Drkn",multiply:"Mltp","color burn":"CBrn","linear burn":"linearBurn","darker color":"darkerColor",lighten:"Lghn",screen:"Scrn","color dodge":"CDdg","linear dodge":"linearDodge","lighter color":"lighterColor",overlay:"Ovrl","soft light":"SftL","hard light":"HrdL","vivid light":"vividLight","linear light":"linearLight","pin light":"pinLight","hard mix":"hardMix",difference:"Dfrn",exclusion:"Xclu",subtract:"blendSubtraction",divide:"blendDivide",hue:"H ",saturation:"Strt",color:"Clr ",luminosity:"Lmns","linear height":"linearHeight",height:"Hght",subtraction:"Sbtr"}),R4=vt("BESl","inner bevel",{"inner bevel":"InrB","outer bevel":"OtrB",emboss:"Embs","pillow emboss":"PlEb","stroke emboss":"strokeEmboss"}),L4=vt("bvlT","smooth",{smooth:"SfBL","chisel hard":"PrBL","chisel soft":"Slmt"}),B4=vt("BESs","up",{up:"In ",down:"Out "}),N4=vt("BETE","softer",{softer:"SfBL",precise:"PrBL"}),$4=vt("IGSr","edge",{edge:"SrcE",center:"SrcC"}),ru=vt("GrdT","linear",{linear:"Lnr ",radial:"Rdl ",angle:"Angl",reflected:"Rflc",diamond:"Dmnd"}),U4=vt("animInterpStyle","linear",{linear:"Lnr ",hold:"hold"}),H4=vt("stdTrackID","opacity",{opacity:"opacityTrack",style:"styleTrack",sheetTransform:"sheetTransformTrack",sheetPosition:"sheetPositionTrack",globalLighting:"globalLightingTrack"}),Go=vt("gradientInterpolationMethodType","perceptual",{perceptual:"Perc",linear:"Lnr ",classic:"Gcls",smooth:"Smoo"}),nu=vt("ClrS","rgb",{rgb:"RGBC",hsb:"HSBl",lab:"LbCl",hsl:"HSLC"}),au=vt("FStl","outside",{outside:"OutF",center:"CtrF",inside:"InsF"}),j4=vt("FrFl","color",{color:"SClr",gradient:"GrFl",pattern:"Ptrn"}),G4=vt("ESliceType","image",{image:"Img ",noImage:"noImage"}),V4=vt("ESliceHorzAlign","default",{default:"default"}),q4=vt("ESliceVertAlign","default",{default:"default"}),W4=vt("ESliceOrigin","userGenerated",{userGenerated:"userGenerated",autoGenerated:"autoGenerated",layer:"layer"}),K4=vt("ESliceBGColorType","none",{none:"None",matte:"matte",color:"Clr "}),X4=vt("strokeStyleLineCapType","butt",{butt:"strokeStyleButtCap",round:"strokeStyleRoundCap",square:"strokeStyleSquareCap"}),Y4=vt("strokeStyleLineJoinType","miter",{miter:"strokeStyleMiterJoin",round:"strokeStyleRoundJoin",bevel:"strokeStyleBevelJoin"}),Z4=vt("strokeStyleLineAlignment","inside",{inside:"strokeStyleAlignInside",center:"strokeStyleAlignCenter",outside:"strokeStyleAlignOutside"}),J4=vt("BlrM","ispinmage",{spin:"Spn ",zoom:"Zm "}),Q4=vt("BlrQ","good",{draft:"Drft",good:"Gd ",best:"Bst "}),eg=vt("SmBM","normal",{normal:"SBMN","edge only":"SBME","overlay edge":"SBMO"}),tg=vt("SmBQ","medium",{low:"SBQL",medium:"SBQM",high:"SBQH"}),rg=vt("DspM","stretch to fit",{"stretch to fit":"StrF",tile:"Tile"}),Vo=vt("UndA","repeat edge pixels",{"wrap around":"WrpA","repeat edge pixels":"RptE"}),ng=vt("Cnvr","rectangular to polar",{"rectangular to polar":"RctP","polar to rectangular":"PlrR"}),ag=vt("RplS","medium",{small:"Sml ",medium:"Mdm ",large:"Lrg "}),ig=vt("SphM","normal",{normal:"Nrml","horizontal only":"HrzO","vertical only":"VrtO"}),og=vt("Wvtp","sine",{sine:"WvSn",triangle:"WvTr",square:"WvSq"}),lg=vt("ZZTy","pond ripples",{"around center":"ArnC","out from center":"OtFr","pond ripples":"PndR"}),sg=vt("Dstr","uniform",{uniform:"Unfr",gaussian:"Gsn "}),os=vt("Chnl","composite",{red:"Rd ",green:"Grn ",blue:"Bl ",composite:"Cmps"}),ug=vt("MztT","fine dots",{"fine dots":"FnDt","medium dots":"MdmD","grainy dots":"GrnD","coarse dots":"CrsD","short lines":"ShrL","medium lines":"MdmL","long lines":"LngL","short strokes":"ShSt","medium strokes":"MdmS","long strokes":"LngS"}),cg=vt("Lns ","50-300mm zoom",{"50-300mm zoom":"Zm ","32mm prime":"Nkn ","105mm prime":"Nkn1","movie prime":"PnVs"}),fg=vt("blurType","gaussian blur",{"gaussian blur":"GsnB","lens blur":"lensBlur","motion blur":"MtnB"}),dg=vt("DfsM","normal",{normal:"Nrml","darken only":"DrkO","lighten only":"LghO",anisotropic:"anisotropic"}),hg=vt("ExtT","blocks",{blocks:"Blks",pyramids:"Pyrm"}),pg=vt("ExtR","random",{random:"Rndm","level-based":"LvlB"}),vg=vt("FlCl","background color",{"background color":"FlBc","foreground color":"FlFr","inverse image":"FlIn","unaltered image":"FlSm"}),mg=vt("CntE","upper",{lower:"Lwr ",upper:"Upr "}),gg=vt("WndM","wind",{wind:"Wnd ",blast:"Blst",stagger:"Stgr"}),bg=vt("Drct","from the right",{left:"Left",right:"Rght"}),yg=vt("IntE","odd lines",{"odd lines":"ElmO","even lines":"ElmE"}),xg=vt("IntC","interpolation",{duplication:"CrtD",interpolation:"CrtI"}),_g=vt("FlMd","wrap around",{"set to transparent":"Bckg","repeat edge pixels":"Rpt ","wrap around":"Wrp "});vt("prjM","fisheye",{fisheye:"fisP",perspective:"perP",auto:"auto","full spherical":"fusP"});var wg=vt("presetKindType","presetKindCustom",{custom:"presetKindCustom",default:"presetKindDefault"}),qo=function(){return qo=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},qo.apply(this,arguments)},kg=[],Sg={};function Ot(e,t,r,n){var a={key:e,has:t,read:r,write:n};kg.push(a),Sg[a.key]=a}var iu=[void 0,"PPI","PPCM"],ou=[void 0,"Inches","Centimeters","Points","Picas","Columns"],Cg="0123456789abcdef";function Ag(e){return e<=57?e-48:e-87}function TE(e,t){return Ag(e.charCodeAt(t))<<4|Ag(e.charCodeAt(t+1))}function sd(e,t){var r=dr(e,t);return i4(r)}function ud(e,t){var r=a4(t);ta(e,r)}function ME(e){for(var t=Ze(e),r=dr(e,t),n=!1,a=0;a<r.byteLength;a++)if(r[a]&128){n=!0;break}if(n){var i=new TextDecoder("gbk");return i.decode(r)}else return i4(r)}function DE(e,t){for(var r="",n=0,a=t.codePointAt(n++);a!==void 0;a=t.codePointAt(n++))r+=a>127?"?":String.fromCodePoint(a);var i=a4(r);Ge(e,i.byteLength),ta(e,i)}Ot(1061,function(e){return e.captionDigest!==void 0},function(e,t){for(var r="",n=0;n<16;n++){var a=Ze(e);r+=Cg[a>>4],r+=Cg[a&15]}t.captionDigest=r},function(e,t){for(var r=0;r<16;r++)Ge(e,TE(t.captionDigest,r*2))}),Ot(1060,function(e){return e.xmpMetadata!==void 0},function(e,t,r){t.xmpMetadata=sd(e,r())},function(e,t){ud(e,t.xmpMetadata)});var lu=vt("Inte","perceptual",{perceptual:"Img ",saturation:"Grp ","relative colorimetric":"Clrm","absolute colorimetric":"AClr"});Ot(1082,function(e){return e.printInformation!==void 0},function(e,t){var r,n,a=Tt(e);t.printInformation={printerName:a.printerName||"",renderingIntent:lu.decode((r=a.Inte)!==null&&r!==void 0?r:"Inte.Img ")};var i=t.printInformation;a.PstS!==void 0&&(i.printerManagesColors=a.PstS),a["Nm "]!==void 0&&(i.printerProfile=a["Nm "]),a.MpBl!==void 0&&(i.blackPointCompensation=a.MpBl),a.printSixteenBit!==void 0&&(i.printSixteenBit=a.printSixteenBit),a.hardProof!==void 0&&(i.hardProof=a.hardProof),a.printProofSetup&&("Bltn"in a.printProofSetup?i.proofSetup={builtin:a.printProofSetup.Bltn.split(".")[1]}:i.proofSetup={profile:a.printProofSetup.profile,renderingIntent:lu.decode((n=a.printProofSetup.Inte)!==null&&n!==void 0?n:"Inte.Img "),blackPointCompensation:!!a.printProofSetup.MpBl,paperWhite:!!a.printProofSetup.paperWhite})},function(e,t){var r,n,a=t.printInformation,i={};a.printerManagesColors?i.PstS=!0:(a.hardProof!==void 0&&(i.hardProof=!!a.hardProof),i.ClrS="ClrS.RGBC",i["Nm "]=(r=a.printerProfile)!==null&&r!==void 0?r:"CIE RGB"),i.Inte=lu.encode(a.renderingIntent),a.printerManagesColors||(i.MpBl=!!a.blackPointCompensation),i.printSixteenBit=!!a.printSixteenBit,i.printerName=a.printerName||"",a.proofSetup&&"profile"in a.proofSetup?i.printProofSetup={profile:a.proofSetup.profile||"",Inte:lu.encode(a.proofSetup.renderingIntent),MpBl:!!a.proofSetup.blackPointCompensation,paperWhite:!!a.proofSetup.paperWhite}:i.printProofSetup={Bltn:!((n=a.proofSetup)===null||n===void 0)&&n.builtin?"builtinProof.".concat(a.proofSetup.builtin):"builtinProof.proofCMYK"},Dt(e,"","printOutput",i)}),Ot(1005,function(e){return e.resolutionInfo!==void 0},function(e,t){var r=kn(e),n=We(e),a=We(e),i=kn(e),o=We(e),l=We(e);t.resolutionInfo={horizontalResolution:r,horizontalResolutionUnit:iu[n]||"PPI",widthUnit:ou[a]||"Inches",verticalResolution:i,verticalResolutionUnit:iu[o]||"PPI",heightUnit:ou[l]||"Inches"}},function(e,t){var r=t.resolutionInfo;An(e,r.horizontalResolution||0),Oe(e,Math.max(1,iu.indexOf(r.horizontalResolutionUnit))),Oe(e,Math.max(1,ou.indexOf(r.widthUnit))),An(e,r.verticalResolution||0),Oe(e,Math.max(1,iu.indexOf(r.verticalResolutionUnit))),Oe(e,Math.max(1,ou.indexOf(r.heightUnit)))});var Eg=["centered","size to fit","user defined"];Ot(1062,function(e){return e.printScale!==void 0},function(e,t){t.printScale={style:Eg[Et(e)],x:Yn(e),y:Yn(e),scale:Yn(e)}},function(e,t){var r=t.printScale,n=r.style,a=r.x,i=r.y,o=r.scale;Pt(e,Math.max(0,Eg.indexOf(n))),Qn(e,a||0),Qn(e,i||0),Qn(e,o||0)}),Ot(1006,function(e){return e.alphaChannelNames!==void 0},function(e,t,r){if(t.alphaChannelNames)nt(e,r());else for(t.alphaChannelNames=[];r()>0;){var n=ME(e);t.alphaChannelNames.push(n)}},function(e,t){for(var r=0,n=t.alphaChannelNames;r<n.length;r++){var a=n[r];DE(e,a)}}),Ot(1045,function(e){return e.alphaChannelNames!==void 0},function(e,t,r){for(t.alphaChannelNames=[];r()>0;)t.alphaChannelNames.push(_r(e))},function(e,t){for(var r=0,n=t.alphaChannelNames;r<n.length;r++){var a=n[r];Ji(e,a)}}),Ot(1053,function(e){return e.alphaIdentifiers!==void 0},function(e,t,r){for(t.alphaIdentifiers=[];r()>=4;)t.alphaIdentifiers.push(De(e))},function(e,t){for(var r=0,n=t.alphaIdentifiers;r<n.length;r++){var a=n[r];Je(e,a)}}),Ot(1010,function(e){return e.backgroundColor!==void 0},function(e,t){return t.backgroundColor=Ir(e)},function(e,t){return zr(e,t.backgroundColor)}),Ot(1037,function(e){return e.globalAngle!==void 0},function(e,t){return t.globalAngle=st(e)},function(e,t){return ht(e,t.globalAngle)}),Ot(1049,function(e){return e.globalAltitude!==void 0},function(e,t){return t.globalAltitude=De(e)},function(e,t){return Je(e,t.globalAltitude)}),Ot(1011,function(e){return e.printFlags!==void 0},function(e,t){t.printFlags={labels:!!Ze(e),cropMarks:!!Ze(e),colorBars:!!Ze(e),registrationMarks:!!Ze(e),negative:!!Ze(e),flip:!!Ze(e),interpolate:!!Ze(e),caption:!!Ze(e),printFlags:!!Ze(e)}},function(e,t){var r=t.printFlags;Ge(e,r.labels?1:0),Ge(e,r.cropMarks?1:0),Ge(e,r.colorBars?1:0),Ge(e,r.registrationMarks?1:0),Ge(e,r.negative?1:0),Ge(e,r.flip?1:0),Ge(e,r.interpolate?1:0),Ge(e,r.caption?1:0),Ge(e,r.printFlags?1:0)}),Ot(1034,function(e){return e.copyrighted!==void 0},function(e,t){t.copyrighted=!!Ze(e)},function(e,t){Ge(e,t.copyrighted?1:0)}),Ot(1035,function(e){return e.url!==void 0},function(e,t,r){t.url=fu(e,r())},function(e,t){wT(e,t.url)}),Ot(1080,function(e){return e.countInformation!==void 0},function(e,t){var r=Tt(e);t.countInformation=r.countGroupList.map(function(n){return{color:{r:n["Rd "],g:n["Grn "],b:n["Bl "]},name:n["Nm "],size:n["Rds "],fontSize:n.fontSize,visible:n.Vsbl,points:n.countObjectList.map(function(a){return{x:a["X "],y:a["Y "]}})}})},function(e,t){var r={Vrsn:1,countGroupList:t.countInformation.map(function(n){return{"Rd ":n.color.r,"Grn ":n.color.g,"Bl ":n.color.b,"Nm ":n.name,"Rds ":n.size,fontSize:n.fontSize,Vsbl:n.visible,countObjectList:n.points.map(function(a){return{"X ":a.x,"Y ":a.y}})}})};Dt(e,"","Cnt ",r)}),Ot(1024,function(e){return e.layerState!==void 0},function(e,t){return t.layerState=We(e)},function(e,t){return Oe(e,t.layerState)}),Ot(1026,function(e){return e.layersGroup!==void 0},function(e,t,r){for(t.layersGroup=[];r()>0;)t.layersGroup.push(We(e))},function(e,t){for(var r=0,n=t.layersGroup;r<n.length;r++){var a=n[r];Oe(e,a)}}),Ot(1072,function(e){return e.layerGroupsEnabledId!==void 0},function(e,t,r){for(t.layerGroupsEnabledId=[];r()>0;)t.layerGroupsEnabledId.push(Ze(e))},function(e,t){for(var r=0,n=t.layerGroupsEnabledId;r<n.length;r++){var a=n[r];Ge(e,a)}}),Ot(1069,function(e){return e.layerSelectionIds!==void 0},function(e,t){var r=We(e);for(t.layerSelectionIds=[];r--;)t.layerSelectionIds.push(De(e))},function(e,t){Oe(e,t.layerSelectionIds.length);for(var r=0,n=t.layerSelectionIds;r<n.length;r++){var a=n[r];Je(e,a)}}),Ot(1032,function(e){return e.gridAndGuidesInformation!==void 0},function(e,t){var r=De(e),n=De(e),a=De(e),i=De(e);if(r!==1)throw new Error("Invalid 1032 resource version: ".concat(r));t.gridAndGuidesInformation={grid:{horizontal:n,vertical:a},guides:[]};for(var o=0;o<i;o++)t.gridAndGuidesInformation.guides.push({location:De(e)/32,direction:Ze(e)?"horizontal":"vertical"})},function(e,t){var r=t.gridAndGuidesInformation,n=r.grid||{horizontal:18*32,vertical:18*32},a=r.guides||[];Je(e,1),Je(e,n.horizontal),Je(e,n.vertical),Je(e,a.length);for(var i=0,o=a;i<o.length;i++){var l=o[i];Je(e,l.location*32),Ge(e,l.direction==="horizontal"?1:0)}}),Ot(1065,function(e){return e.layerComps!==void 0},function(e,t){var r=Tt(e,!0);t.layerComps={list:[]};for(var n=0,a=r.list;n<a.length;n++){var i=a[n];t.layerComps.list.push({id:i.compID,name:i["Nm "],capturedInfo:i.capturedInfo}),"comment"in i&&(t.layerComps.list[t.layerComps.list.length-1].comment=i.comment)}"lastAppliedComp"in r&&(t.layerComps.lastApplied=r.lastAppliedComp)},function(e,t){for(var r=t.layerComps,n={list:[]},a=0,i=r.list;a<i.length;a++){var o=i[a],l={};l._classID="Comp",l["Nm "]=o.name,"comment"in o&&(l.comment=o.comment),l.compID=o.id,l.capturedInfo=o.capturedInfo,n.list.push(l)}"lastApplied"in r&&(n.lastAppliedComp=r.lastApplied),Dt(e,"","CompList",n)});var Tg=["normal",void 0,void 0,void 0,void 0,void 0,void 0,"multiply","screen",void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,"difference"];Ot(1078,function(e){return e.onionSkins!==void 0},function(e,t){var r=Tt(e);t.onionSkins={enabled:r.enab,framesBefore:r.numBefore,framesAfter:r.numAfter,frameSpacing:r.Spcn,minOpacity:r.minOpacity/100,maxOpacity:r.maxOpacity/100,blendMode:Tg[r.BlnM]||"normal"}},function(e,t){var r=t.onionSkins,n={Vrsn:1,enab:r.enabled,numBefore:r.framesBefore,numAfter:r.framesAfter,Spcn:r.frameSpacing,minOpacity:r.minOpacity*100|0,maxOpacity:r.maxOpacity*100|0,BlnM:Math.max(0,Tg.indexOf(r.blendMode))};Dt(e,"","null",n)}),Ot(1075,function(e){return e.timelineInformation!==void 0},function(e,t){var r,n,a=Tt(e);t.timelineInformation={enabled:a.enab,frameStep:an(a.frameStep),frameRate:a.frameRate,time:an(a.time),duration:an(a.duration),workInTime:an(a.workInTime),workOutTime:an(a.workOutTime),repeats:a.LCnt,hasMotion:a.hasMotion,globalTracks:A4(a.globalTrackList,!!e.logMissingFeatures)},!((n=(r=a.audioClipGroupList)===null||r===void 0?void 0:r.audioClipGroupList)===null||n===void 0)&&n.length&&(t.timelineInformation.audioClipGroups=a.audioClipGroupList.audioClipGroupList.map(function(i){return{id:i.groupID,muted:i.muted,audioClips:i.audioClipList.map(function(o){var l=o.clipID,s=o.timeScope,u=o.muted,c=o.audioLevel,f=o.frameReader;return{id:l,start:an(s.Strt),duration:an(s.duration),inTime:an(s.inTime),outTime:an(s.outTime),muted:u,audioLevel:c,frameReader:{type:f.frameReaderType,mediaDescriptor:f.mediaDescriptor,link:{name:f["Lnk "]["Nm "],fullPath:f["Lnk "].fullPath,relativePath:f["Lnk "].relPath}}}})}}))},function(e,t){var r,n=t.timelineInformation,a={Vrsn:1,enab:n.enabled,frameStep:n.frameStep,frameRate:n.frameRate,time:n.time,duration:n.duration,workInTime:n.workInTime,workOutTime:n.workOutTime,LCnt:n.repeats,globalTrackList:E4(n.globalTracks),audioClipGroupList:{audioClipGroupList:(r=n.audioClipGroups)===null||r===void 0?void 0:r.map(function(i){return{groupID:i.id,muted:i.muted,audioClipList:i.audioClips.map(function(o){return{clipID:o.id,timeScope:{Vrsn:1,Strt:o.start,duration:o.duration,inTime:o.inTime,outTime:o.outTime},frameReader:{frameReaderType:o.frameReader.type,descVersion:1,"Lnk ":{descVersion:1,"Nm ":o.frameReader.link.name,fullPath:o.frameReader.link.fullPath,relPath:o.frameReader.link.relativePath},mediaDescriptor:o.frameReader.mediaDescriptor},muted:o.muted,audioLevel:o.audioLevel}})}})},hasMotion:n.hasMotion};Dt(e,"","null",a,"anim")}),Ot(1076,function(e){return e.sheetDisclosure!==void 0},function(e,t){var r=Tt(e);t.sheetDisclosure={},r.sheetTimelineOptions&&(t.sheetDisclosure.sheetTimelineOptions=r.sheetTimelineOptions.map(function(n){return{sheetID:n.sheetID,sheetDisclosed:n.sheetDisclosed,lightsDisclosed:n.lightsDisclosed,meshesDisclosed:n.meshesDisclosed,materialsDisclosed:n.materialsDisclosed}}))},function(e,t){var r=t.sheetDisclosure,n={Vrsn:1};r.sheetTimelineOptions&&(n.sheetTimelineOptions=r.sheetTimelineOptions.map(function(a){return{Vrsn:2,sheetID:a.sheetID,sheetDisclosed:a.sheetDisclosed,lightsDisclosed:a.lightsDisclosed,meshesDisclosed:a.meshesDisclosed,materialsDisclosed:a.materialsDisclosed}})),Dt(e,"","null",n)}),Ot(1054,function(e){return e.urlsList!==void 0},function(e,t){var r=De(e);t.urlsList=[];for(var n=0;n<r;n++){var a=Wt(e);if(a!=="slic"&&e.throwForMissingFeatures)throw new Error("Unknown long");var i=De(e),o=_r(e);t.urlsList.push({id:i,url:o,ref:"slice"})}},function(e,t){var r=t.urlsList;Je(e,r.length);for(var n=0;n<r.length;n++)pt(e,"slic"),Je(e,r[n].id),En(e,r[n].url)});function Mg(e){return{"Top ":e.top,Left:e.left,Btom:e.bottom,Rght:e.right}}function Dg(e){return{top:e["Top "],left:e.Left,bottom:e.Btom,right:e.Rght}}function su(e,t){return e[Math.max(0,Math.min(e.length-1,t))]}var Ig=["autoGenerated","layer","userGenerated"],zg=["noImage","image"],uu=["default"];Ot(1050,function(e){return e.slices?e.slices.length:0},function(e,t){var r=De(e);if(r===6){t.slices||(t.slices=[]);var n=st(e),a=st(e),i=st(e),o=st(e),l=_r(e),s=De(e);t.slices.push({bounds:{top:n,left:a,bottom:i,right:o},groupName:l,slices:[]});for(var u=t.slices[t.slices.length-1].slices,c=0;c<s;c++){var f=De(e),d=De(e),h=su(Ig,De(e)),y=h=="layer"?De(e):0,p=_r(e),x=su(zg,De(e)),g=st(e),m=st(e),b=st(e),v=st(e),S=_r(e),C=_r(e),A=_r(e),_=_r(e),E=!!Ze(e),M=_r(e),z=su(uu,De(e)),N=su(uu,De(e)),R=Ze(e),$=Ze(e),q=Ze(e),W=Ze(e),Z=R+$+q+W===0?"none":R===0?"matte":"color";u.push({id:f,groupId:d,origin:h,associatedLayerId:y,name:p,target:C,message:A,altTag:_,cellTextIsHTML:E,cellText:M,horizontalAlignment:z,verticalAlignment:N,type:x,url:S,bounds:{top:m,left:g,bottom:v,right:b},backgroundColorType:Z,backgroundColor:{r:$,g:q,b:W,a:R}})}var te=Tt(e);te.slices.forEach(function(ne){var _e=u.find(function(pe){return ne.sliceID==pe.id});_e&&(_e.topOutset=ne.topOutset,_e.leftOutset=ne.leftOutset,_e.bottomOutset=ne.bottomOutset,_e.rightOutset=ne.rightOutset)})}else if(r===7||r===8){var te=Tt(e);t.slices||(t.slices=[]),t.slices.push({groupName:te.baseName,bounds:Dg(te.bounds),slices:te.slices.map(function(_e){return qo(qo({},_e["Nm "]?{name:_e["Nm "]}:{}),{id:_e.sliceID,groupId:_e.groupID,associatedLayerId:0,origin:W4.decode(_e.origin),type:G4.decode(_e.Type),bounds:Dg(_e.bounds),url:_e.url,target:_e.null,message:_e.Msge,altTag:_e.altTag,cellTextIsHTML:_e.cellTextIsHTML,cellText:_e.cellText,horizontalAlignment:V4.decode(_e.horzAlign),verticalAlignment:q4.decode(_e.vertAlign),backgroundColorType:K4.decode(_e.bgColorType),backgroundColor:_e.bgColor?{r:_e.bgColor["Rd "],g:_e.bgColor["Grn "],b:_e.bgColor["Bl "],a:_e.bgColor.alpha}:{r:0,g:0,b:0,a:0},topOutset:_e.topOutset||0,leftOutset:_e.leftOutset||0,bottomOutset:_e.bottomOutset||0,rightOutset:_e.rightOutset||0})})})}else throw new Error("Invalid slices version (".concat(r,")"))},function(e,t,r){var n=t.slices[r],a=n.bounds,i=n.groupName,o=n.slices;Je(e,6),ht(e,a.top),ht(e,a.left),ht(e,a.bottom),ht(e,a.right),En(e,i),Je(e,o.length);for(var l=0;l<o.length;l++){var s=o[l],u=s.backgroundColor,c=u.a,f=u.r,d=u.g,h=u.b;s.backgroundColorType==="none"?c=f=d=h=0:s.backgroundColorType==="matte"&&(c=0,f=d=h=255),Je(e,s.id),Je(e,s.groupId),Je(e,Ig.indexOf(s.origin)),s.origin==="layer"&&Je(e,s.associatedLayerId),En(e,s.name||""),Je(e,zg.indexOf(s.type)),ht(e,s.bounds.left),ht(e,s.bounds.top),ht(e,s.bounds.right),ht(e,s.bounds.bottom),En(e,s.url),En(e,s.target),En(e,s.message),En(e,s.altTag),Ge(e,s.cellTextIsHTML?1:0),En(e,s.cellText),Je(e,uu.indexOf(s.horizontalAlignment)),Je(e,uu.indexOf(s.verticalAlignment)),Ge(e,c),Ge(e,f),Ge(e,d),Ge(e,h)}var y={bounds:Mg(a),slices:[]};o.forEach(function(p){var x=qo(qo({sliceID:p.id,groupID:p.groupId,origin:W4.encode(p.origin),Type:G4.encode(p.type),bounds:Mg(p.bounds)},p.name?{"Nm ":p.name}:{}),{url:p.url,null:p.target,Msge:p.message,altTag:p.altTag,cellTextIsHTML:p.cellTextIsHTML,cellText:p.cellText,horzAlign:V4.encode(p.horizontalAlignment),vertAlign:q4.encode(p.verticalAlignment),bgColorType:K4.encode(p.backgroundColorType)});if(p.backgroundColorType==="color"){var g=p.backgroundColor,m=g.r,b=g.g,v=g.b,S=g.a;x.bgColor={"Rd ":m,"Grn ":b,"Bl ":v,alpha:S}}x.topOutset=p.topOutset||0,x.leftOutset=p.leftOutset||0,x.bottomOutset=p.bottomOutset||0,x.rightOutset=p.rightOutset||0,y.slices.push(x)}),Dt(e,"","null",y,"slices")}),Ot(1064,function(e){return e.pixelAspectRatio!==void 0},function(e,t){if(De(e)>2)throw new Error("Invalid pixelAspectRatio version");t.pixelAspectRatio={aspect:Nn(e)}},function(e,t){Je(e,2),$n(e,t.pixelAspectRatio.aspect)}),Ot(1041,function(e){return e.iccUntaggedProfile!==void 0},function(e,t){t.iccUntaggedProfile=!!Ze(e)},function(e,t){Ge(e,t.iccUntaggedProfile?1:0)}),Ot(1044,function(e){return e.idsSeedNumber!==void 0},function(e,t){return t.idsSeedNumber=De(e)},function(e,t){return Je(e,t.idsSeedNumber)}),Ot(1036,function(e){return e.thumbnail!==void 0||e.thumbnailRaw!==void 0},function(e,t,r){var n=De(e),a=De(e),i=De(e);De(e),De(e),De(e);var o=We(e),l=We(e);if(n!==1||o!==24||l!==1){e.logMissingFeatures&&e.log("Invalid thumbnail data (format: ".concat(n,", bitsPerPixel: ").concat(o,", planes: ").concat(l,")")),nt(e,r());return}var s=r(),u=dr(e,s);e.useRawThumbnail?t.thumbnailRaw={width:a,height:i,data:u}:u.byteLength&&(t.thumbnail=sE(u))},function(e,t){var r,n=0,a=0,i=new Uint8Array(0);if(t.thumbnailRaw)n=t.thumbnailRaw.width,a=t.thumbnailRaw.height,i=t.thumbnailRaw.data;else try{var o=(r=t.thumbnail.toDataURL("image/jpeg",1))===null||r===void 0?void 0:r.substring(23);o&&(i=t4(o),n=t.thumbnail.width,a=t.thumbnail.height)}catch{}var l=24,s=Math.floor((n*l+31)/32)*4,u=1,c=s*a*u,f=i.length;Je(e,1),Je(e,n),Je(e,a),Je(e,s),Je(e,c),Je(e,f),Oe(e,l),Oe(e,u),ta(e,i)}),Ot(1057,function(e){return e.versionInfo!==void 0},function(e,t,r){var n=De(e);if(n!==1)throw new Error("Invalid versionInfo version");t.versionInfo={hasRealMergedData:!!Ze(e),writerName:_r(e),readerName:_r(e),fileVersion:De(e)},nt(e,r())},function(e,t){var r=t.versionInfo;Je(e,1),Ge(e,r.hasRealMergedData?1:0),En(e,r.writerName),En(e,r.readerName),Je(e,r.fileVersion)}),Ot(7e3,function(e){return e.imageReadyVariables!==void 0},function(e,t,r){t.imageReadyVariables=sd(e,r())},function(e,t){ud(e,t.imageReadyVariables)}),Ot(7001,function(e){return e.imageReadyDataSets!==void 0},function(e,t,r){t.imageReadyDataSets=sd(e,r())},function(e,t){ud(e,t.imageReadyDataSets)}),Ot(1088,function(e){return e.pathSelectionState!==void 0},function(e,t,r){var n=Tt(e);t.pathSelectionState=n.null},function(e,t){var r={null:t.pathSelectionState};Dt(e,"","null",r)});var Fg=vt("FrmD","",{auto:"Auto",none:"None",dispose:"Disp"});Ot(4e3,function(e){return e.animations!==void 0},function(e,t,r){var n=Wt(e);if(n==="mani")Ca(e,"IRFR"),Sn(e,1,function(i){for(var o=function(){Ca(e,"8BIM");var l=Wt(e);Sn(e,1,function(s){if(l==="AnDs"){var u=Tt(e);t.animations={frames:u.FrIn.map(function(f){return{id:f.FrID,delay:(f.FrDl||0)/100,dispose:f.FrDs?Fg.decode(f.FrDs):"auto"}}),animations:u.FSts.map(function(f){return{id:f.FsID,frames:f.FsFr,repeats:f.LCnt,activeFrame:f.AFrm||0}})}}else if(l==="Roll"){var c=dr(e,s());e.logDevFeatures&&e.log("#4000 Roll",c)}else e.logMissingFeatures&&e.log("Unhandled subsection in #4000",l)})};i()>0;)o()});else if(n==="mopt"){var a=dr(e,r());e.logDevFeatures&&e.log("#4000 mopt",a)}else e.logMissingFeatures&&e.log("Unhandled key in #4000:",n)},function(e,t){t.animations&&(pt(e,"mani"),pt(e,"IRFR"),$r(e,1,function(){pt(e,"8BIM"),pt(e,"AnDs"),$r(e,1,function(){for(var r={FrIn:[],FSts:[]},n=0;n<t.animations.frames.length;n++){var a=t.animations.frames[n],i={FrID:a.id};a.delay&&(i.FrDl=a.delay*100|0),i.FrDs=Fg.encode(a.dispose),r.FrIn.push(i)}for(var n=0;n<t.animations.animations.length;n++){var o=t.animations.animations[n],l={FsID:o.id,AFrm:o.activeFrame|0,FsFr:o.frames,LCnt:o.repeats|0};r.FSts.push(l)}Dt(e,"","null",r)})}))});var IE=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},Og=[0,1,3,2],zE=["bitmap","grayscale","indexed","RGB","CMYK","multichannel","duotone","lab"];function cu(e){for(var t=e.width*e.height*4,r=0;r<t;r+=4){var n=e.data[r];e.data[r+1]=n,e.data[r+2]=n}}function Wo(e,t,r){var n=new DataView(e,t,r);return{view:n,offset:0,strict:!1,debug:!1,large:!1,globalAlpha:!1,log:console.log}}function cd(e,t){if(e.strict)throw new Error(t);e.debug&&e.log(t)}function Ze(e){return e.offset+=1,e.view.getUint8(e.offset-1)}function FE(e){return e.view.getUint8(e.offset)}function Et(e){return e.offset+=2,e.view.getInt16(e.offset-2,!1)}function We(e){return e.offset+=2,e.view.getUint16(e.offset-2,!1)}function OE(e){return e.offset+=2,e.view.getUint16(e.offset-2,!0)}function st(e){return e.offset+=4,e.view.getInt32(e.offset-4,!1)}function Pg(e){return e.offset+=4,e.view.getInt32(e.offset-4,!0)}function De(e){return e.offset+=4,e.view.getUint32(e.offset-4,!1)}function Yn(e){return e.offset+=4,e.view.getFloat32(e.offset-4,!1)}function Nn(e){return e.offset+=8,e.view.getFloat64(e.offset-8,!1)}function kn(e){return st(e)/65536}function Zn(e){return st(e)/(1<<24)}function dr(e,t){var r=e.view.byteOffset+e.offset;if(e.offset+=t,r+t>e.view.buffer.byteLength){if(cd(e,"Reading bytes exceeding buffer length"),t>100*1024*1024)throw new Error("Reading past end of file");var n=new Uint8Array(t),a=Math.min(t,e.view.byteLength-r);return a>0&&n.set(new Uint8Array(e.view.buffer,r,a)),n}else return new Uint8Array(e.view.buffer,r,t)}function Wt(e){return Rg(e,4)}function PE(e,t){var r=String.fromCharCode(e.view.getUint8(t))+String.fromCharCode(e.view.getUint8(t+1))+String.fromCharCode(e.view.getUint8(t+2))+String.fromCharCode(e.view.getUint8(t+3));return r=="8BIM"||r=="8B64"}function Jn(e,t){for(var r=Ze(e),n=r?Rg(e,r):"";++r%t;)e.offset++;return n}function _r(e){var t=De(e);return fd(e,t)}function fd(e,t){for(var r="";t--;){var n=We(e);(n||t>0)&&(r+=String.fromCharCode(n))}return r}function RE(e,t){for(var r="";t--;){var n=OE(e);(n||t>0)&&(r+=String.fromCharCode(n))}return r}function fu(e,t){for(var r="";t--;)r+=String.fromCharCode(Ze(e));return r}function nt(e,t){e.offset+=t}function Ca(e,t,r){var n=e.offset,a=Wt(e);if(a!==t&&a!==r)throw new Error("Invalid signature: '".concat(a,"' at 0x").concat(n.toString(16)))}function Rg(e,t){for(var r=dr(e,t),n="",a=0;a<r.length;a++)n+=String.fromCharCode(r[a]);return n}function LE(e){return e==="8BIM"||e==="MeSa"||e==="AgHg"||e==="PHUT"||e==="DCSR"}function BE(e,t){var r;t===void 0&&(t={}),Ca(e,"8BPS");var n=We(e);if(n!==1&&n!==2)throw new Error("Invalid PSD file version: ".concat(n));nt(e,6);var a=We(e),i=De(e),o=De(e),l=We(e),s=We(e),u=n===1?3e4:3e5;if(o>u||i>u)throw new Error("Invalid size: ".concat(o,"x").concat(i));if(a>16)throw new Error("Invalid channel count: ".concat(a));if(![1,8,16,32].includes(l))throw new Error("Invalid bitsPerChannel: ".concat(l));if(Og.indexOf(s)===-1)throw new Error("Color mode not supported: ".concat((r=zE[s])!==null&&r!==void 0?r:s));var c={width:o,height:i,channels:a,bitsPerChannel:l,colorMode:s};Object.assign(e,t),e.large=n===2,e.globalAlpha=!1,Sn(e,1,function(p){if(p()){if(s===2){if(p()!=768)throw new Error("Invalid color palette size");c.palette=[];for(var x=0;x<256;x++)c.palette.push({r:Ze(e),g:0,b:0});for(var x=0;x<256;x++)c.palette[x].g=Ze(e);for(var x=0;x<256;x++)c.palette[x].b=Ze(e)}nt(e,p())}});var f={};Sn(e,1,function(p){for(var x=function(){$g(e,LE);var g=We(e);Jn(e,2),Sn(e,2,function(m){var b=Sg[g],v=g===1036&&!!e.skipThumbnail;if(b&&!v)try{b.read(e,f,m)}catch(S){if(e.throwForMissingFeatures)throw S;nt(e,m())}else nt(e,m())})};p()>0;)x()}),f.layersGroup,f.layerGroupsEnabledId;var d=IE(f,["layersGroup","layerGroupsEnabledId"]);Object.keys(d)&&(c.imageResources=d),Sn(e,1,function(p){if(Sn(e,2,function(g){dd(e,c,f),nt(e,g())},void 0,e.large),p()>0){var x=jE(e);x&&(c.globalLayerMaskInfo=x)}else nt(e,p());for(;p()>0;){for(;p()&&FE(e)===0;)nt(e,1);p()>=12?Ug(e,c,c,f):nt(e,p())}},void 0,e.large);var h=c.children&&c.children.length,y=e.skipCompositeImageData&&(e.skipLayerImageData||h);return y||qE(e,c),c}function dd(e,t,r){var n,a,i=r.layersGroup,o=i===void 0?[]:i,l=r.layerGroupsEnabledId,s=l===void 0?[]:l,u=Et(e);u<0&&(e.globalAlpha=!0,u=-u);for(var c=[],f=[],d=0;d<u;d++){var h=NE(e,t,r),y=h.layer,p=h.channels;o[d]!==void 0&&(y.linkGroup=o[d]),s[d]!==void 0&&(y.linkGroupEnabled=!!s[d]),c.push(y),f.push(p)}for(var d=0;d<u;d++)HE(e,t,c[d],f[d]);t.children||(t.children=[]);for(var x=[t],d=c.length-1;d>=0;d--){var g=c[d],m=g.sectionDivider?g.sectionDivider.type:0;m===1||m===2?(g.opened=m===1,g.children=[],!((n=g.sectionDivider)===null||n===void 0)&&n.key&&(g.blendMode=(a=Bo[g.sectionDivider.key])!==null&&a!==void 0?a:g.blendMode),x[x.length-1].children.unshift(g),x.push(g)):m===3?x.pop():x[x.length-1].children.unshift(g)}}function NE(e,t,r){var n={};n.top=st(e),n.left=st(e),n.bottom=st(e),n.right=st(e);for(var a=We(e),i=[],o=0;o<a;o++){var l=Et(e),s=De(e);if(e.large){if(s!==0)throw new Error("Sizes larger than 4GB are not supported");s=De(e)}i.push({id:l,length:s})}Ca(e,"8BIM");var u=Wt(e);if(!Bo[u])throw new Error("Invalid blend mode: '".concat(u,"'"));n.blendMode=Bo[u],n.opacity=Ze(e)/255,n.clipping=Ze(e)===1;var c=Ze(e);return n.transparencyProtected=(c&1)!==0,n.hidden=(c&2)!==0,c&32&&(n.effectsOpen=!0),nt(e,1),Sn(e,1,function(f){$E(e,n);var d=UE(e);for(d&&(n.blendingRanges=d),n.name=Jn(e,1);f()>4&&!PE(e,e.offset);)e.offset++;for(;f()>=12;)Ug(e,n,t,r);nt(e,f())}),{layer:n,channels:i}}function $E(e,t){return Sn(e,1,function(r){if(r()){var n={};t.mask=n,n.top=st(e),n.left=st(e),n.bottom=st(e),n.right=st(e),n.defaultColor=Ze(e);var a=Ze(e);if(n.positionRelativeToLayer=(a&1)!==0,n.disabled=(a&2)!==0,n.fromVectorData=(a&8)!==0,r()>=18){var i={};t.realMask=i;var o=Ze(e);i.positionRelativeToLayer=(o&1)!==0,i.disabled=(o&2)!==0,i.fromVectorData=(o&8)!==0,i.defaultColor=Ze(e),i.top=st(e),i.left=st(e),i.bottom=st(e),i.right=st(e)}if(a&16){var l=Ze(e);l&1&&(n.userMaskDensity=Ze(e)/255),l&2&&(n.userMaskFeather=Nn(e)),l&4&&(n.vectorMaskDensity=Ze(e)/255),l&8&&(n.vectorMaskFeather=Nn(e))}nt(e,r())}})}function du(e){return[Ze(e),Ze(e),Ze(e),Ze(e)]}function UE(e){return Sn(e,1,function(t){for(var r=du(e),n=du(e),a=[];t()>0;){var i=du(e),o=du(e);a.push({sourceRange:i,destRange:o})}return{compositeGrayBlendSource:r,compositeGraphBlendDestinationRange:n,ranges:a}})}function HE(e,t,r,n){if(!e.skipLayerImageData){var a=t.colorMode,i=a===void 0?3:a,o=t.bitsPerChannel,l=o===void 0?8:o;r.rawData={colorMode:i,bitsPerChannel:l,channels:[],large:e.large};for(var s=0,u=n;s<u.length;s++){var c=u[s],f=e.offset,d=0,h=void 0;if(c.length===1)throw new Error("Invalid channel length");if(c.length){if(d=We(e),d>3&&(e.offset-=1,d=We(e)),d>3&&(e.offset-=3,d=We(e)),d>3)throw new Error("Invalid compression: ".concat(d));c.length>2&&(h=dr(e,c.length-2))}e.offset=f+c.length,r.rawData.channels.push({id:c.id,compression:d,data:h})}e.useRawData||Bg(r,!!e.useImageData,!!e.throwForMissingFeatures)}}function Lg(e,t){for(var r=e.data,n=r instanceof Float32Array?1:r instanceof Uint16Array?65535:255,a=(t?4:3)|0,i=r.length|0,o=(t?5:4)|0,l=a;l<i;l=l+o|0)r[l]=n}function Bg(e,t,r){if(e.rawData){var n=e.rawData,a=n.colorMode,i=n.bitsPerChannel,o=n.channels,l=n.large,s=(e.right||0)-(e.left||0),u=(e.bottom||0)-(e.top||0),c=a===4,f,d=!1;if(s&&u)if(c){if(i!==8)throw new Error("bitsPerChannel Not supproted");f={width:s,height:u,data:new Uint8ClampedArray(s*u*5)}}else f=hd(s,u,i);for(var h=0,y=o;h<y.length;h++){var p=y[h],x=p.id,g=p.compression,m=p.data;if(m){var b=Wo(m.buffer,m.byteOffset,m.byteLength);if(x===-2||x===-3){var v=x===-2?e.mask:e.realMask;if(!v)throw new Error("Missing layer ".concat(x===-2?"mask":"real mask"," data"));var S=(v.right||0)-(v.left||0),C=(v.bottom||0)-(v.top||0);if(S<0||C<0||S>3e4||C>3e4)throw new Error("Invalid mask size");if(S&&C){var A=hd(S,C,i);Ng(b,m.byteLength,A,g,S,C,i,0,l,4),cu(A),Lg(A,!1),t?v.imageData=A:v.canvas=J0(A)}}else{var _=J2(x,c),E=f;if(_<0&&(E=void 0,r))throw new Error("Channel not supported: ".concat(x));Ng(b,m.byteLength,E,g,s,u,i,_,l,c?5:4),E&&a===1&&cu(E)}x===-1&&(d=!0)}}if(f){if(d||Lg(f,c),c){var M=f;f=$o(M.width,M.height),Hg(M,f,!1)}t?e.imageData=f:e.canvas=J0(f)}delete e.rawData}}function Ng(e,t,r,n,a,i,o,l,s,u){if(t)if(n===0){t!==a*i*Math.floor(o/8)&&e.log("Invalid length (".concat(t,", ").concat(a*i*Math.floor(o/8),")"));var c=dr(e,t);Gg(c,r,o,u,l)}else if(n===1)ki(e,r,a,i,o,u,[l],s);else if(n===2){var c=dr(e,t);Vg(c,r,a,i,o,u,l,!1)}else if(n===3){var c=dr(e,t);Vg(c,r,a,i,o,u,l,!0)}else throw new Error("Invalid Compression type: ".concat(n))}function jE(e){return Sn(e,1,function(t){if(t()){var r=We(e),n=We(e),a=We(e),i=We(e),o=We(e),l=We(e)/255,s=Ze(e);return nt(e,t()),{overlayColorSpace:r,colorSpace1:n,colorSpace2:a,colorSpace3:i,colorSpace4:o,opacity:l,kind:s}}})}var GE=[0,1,-1,2,-2,3,-3,4,-4];function $g(e,t){for(var r=e.offset,n="",a=0,i=GE;a<i.length;a++){var o=i[a];try{e.offset=r+o,n=Wt(e)}catch{}if(t(n))break}if(!t(n))throw new Error("Invalid signature: '".concat(n,"' at 0x").concat(r.toString(16)));return n}function VE(e){return e==="8BIM"||e==="8B64"}function Ug(e,t,r,n){var a=$g(e,VE),i=Wt(e),o=a==="8B64"||e.large&&K2.indexOf(i)!==-1;Sn(e,2,function(l){var s=vu[i];if(s)try{s.read(e,t,l,r,n)}catch(u){if(e.throwForMissingFeatures)throw u}else e.logMissingFeatures&&e.log("Unhandled additional info: ".concat(i)),nt(e,l());l()&&(e.logMissingFeatures&&e.log("Unread ".concat(l()," bytes left for additional info: ").concat(i)),nt(e,l()))},!1,o)}function hd(e,t,r,n){if(n===void 0&&(n=4),r===1||r===8)return n===4?$o(e,t):{width:e,height:t,data:new Uint8ClampedArray(e*t*n)};if(r===16)return{width:e,height:t,data:new Uint16Array(e*t*n)};if(r===32)return{width:e,height:t,data:new Float32Array(e*t*n)};throw new Error("Invalid bitDepth (".concat(r,")"))}function qE(e,t){var r,n=We(e),a=(r=t.bitsPerChannel)!==null&&r!==void 0?r:8;if(Og.indexOf(t.colorMode)===-1)throw new Error("Color mode not supported: ".concat(t.colorMode));if(n!==0&&n!==1)throw new Error("Compression type not supported: ".concat(n));var i=hd(t.width,t.height,a);switch(oE(i),t.colorMode){case 0:{if(a!==1)throw new Error("Invalid bitsPerChannel for bitmap color mode");var o=void 0;if(n===0)o=dr(e,Math.ceil(t.width/8)*t.height);else if(n===1)o=new Uint8Array(t.width*t.height),ki(e,{data:o,width:t.width,height:t.height},t.width,t.height,8,1,[0],e.large);else throw new Error("Bitmap compression not supported: ".concat(n));lE(o,i.data,t.width,t.height);break}case 3:case 1:{var l=t.colorMode===1?[0]:[0,1,2];if(t.channels&&t.channels>3)for(var s=3;s<t.channels;s++)l.push(s);else e.globalAlpha&&l.push(3);if(n===0)for(var s=0;s<l.length;s++){var u=dr(e,t.width*t.height*Math.floor(a/8));Gg(u,i,a,4,l[s])}else n===1&&(e.offset,ki(e,i,t.width,t.height,a,4,l,e.large));t.colorMode===1&&cu(i);break}case 2:{if(a!==8)throw new Error("bitsPerChannel Not supproted");if(t.channels!==1)throw new Error("Invalid channel count");if(!t.palette)throw new Error("Missing color palette");if(n===0)throw new Error("Not implemented");if(n===1){var c={width:i.width,height:i.height,data:new Uint8Array(i.width*i.height)};ki(e,c,t.width,t.height,a,1,[0],e.large),WE(c,i,t.palette)}else throw new Error("Not implemented");break}case 4:{if(a!==8)throw new Error("bitsPerChannel Not supproted");if(t.channels!==4)throw new Error("Invalid channel count");var l=[0,1,2,3];if(e.globalAlpha&&l.push(4),n===0)throw new Error("Not implemented");if(n===1){var f={width:i.width,height:i.height,data:new Uint8Array(i.width*i.height*5)};e.offset,ki(e,f,t.width,t.height,a,5,l,e.large),Hg(f,i,!0)}else throw new Error("Not implemented");break}default:throw new Error("Color mode not supported: ".concat(t.colorMode))}if(e.globalAlpha){if(t.bitsPerChannel!==8)throw new Error("bitsPerChannel Not supproted");for(var d=i.data,h=i.width*i.height*4,s=0;s<h;s+=4){var y=d[s+3];if(y!=0&&y!=255){var p=y/255,x=1/p,g=255*(1-x);d[s+0]=d[s+0]*x+g,d[s+1]=d[s+1]*x+g,d[s+2]=d[s+2]*x+g}}}e.useImageData?t.imageData=i:t.canvas=J0(i)}function Hg(e,t,r){for(var n=t.width*t.height*4,a=e.data,i=t.data,o=0,l=0;l<n;o+=5,l+=4){var s=a[o],u=a[o+1],c=a[o+2],f=a[o+3];i[l]=(s*f|0)/255|0,i[l+1]=(u*f|0)/255|0,i[l+2]=(c*f|0)/255|0,i[l+3]=r?255-a[o+4]:a[o+4]}}function WE(e,t,r){for(var n=e.width*e.height,a=e.data,i=t.data,o=0,l=0;o<n;o++,l+=4){var s=r[a[o]];i[l+0]=s.r,i[l+1]=s.g,i[l+2]=s.b,i[l+3]=255}}function KE(e,t){if(e.byteLength/e.length!==t.byteLength/t.length)throw new Error("Invalid array types")}function jg(e,t){if(t===8)return e;if(t===16){for(var r=0;r<e.byteLength;r+=2){var n=e[r];e[r]=e[r+1],e[r+1]=n}if(e.byteOffset%2){var a=new Uint16Array(e.byteLength/2);return new Uint8Array(a.buffer,a.byteOffset,a.byteLength).set(e),a}else return new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2)}else if(t===32)if(e.byteOffset%4){var a=new Float32Array(e.byteLength/4);return new Uint8Array(a.buffer,a.byteOffset,a.byteLength).set(e),a}else return new Float32Array(e.buffer,e.byteOffset,e.byteLength/4);else throw new Error("Invalid bitDepth (".concat(t,")"))}function pd(e,t,r,n){KE(e.data,t);for(var a=e.width*e.height,i=e.data,o=0,l=r|0;o<a;o++,l=l+n|0)i[l]=t[o]}function Gg(e,t,r,n,a){if(r==32)for(var i=0;i<e.byteLength;i+=4){var o=e[i+0],l=e[i+1],s=e[i+2],u=e[i+3];e[i+0]=u,e[i+1]=s,e[i+2]=l,e[i+3]=o}var c=jg(e,r);t&&a<n&&pd(t,c,a,n)}function vd(e,t,r,n){for(var a=0;a<r;a++)for(var i=a*t,o=1,l=i+1;o<t;o++,l++)e[l]=(e[l-1]+e[l])%n}function Vg(e,t,r,n,a,i,o,l){var s=YA(e);if(t&&o<i){var u=jg(s,a);if(a===8)l&&vd(s,r,n,256),pd(t,s,o,i);else if(a===16)l&&vd(u,r,n,65536),pd(t,u,o,i);else if(a===32){l&&vd(s,r*4,n,256);for(var c=o,f=new Uint32Array(t.data.buffer,t.data.byteOffset,t.data.length),d=0;d<n;d++)for(var h=r*4*d,y=0;y<r;y++,h++,c+=i){var p=h+r,x=p+r,g=x+r;f[c]=(s[h]<<24|s[p]<<16|s[x]<<8|s[g])>>>0}}else throw new Error("Invalid bitDepth")}}function ki(e,t,r,n,a,i,o,l){var s=t&&t.data,u;if(l){u=new Uint32Array(o.length*n);for(var c=0,f=0;c<o.length;c++)for(var d=0;d<n;d++,f++)u[f]=De(e)}else{u=new Uint16Array(o.length*n);for(var c=0,f=0;c<o.length;c++)for(var d=0;d<n;d++,f++)u[f]=We(e)}for(var h=i-1|0,y=0,f=0;y<o.length;y++){var p=o[y]|0,x=y>h||p>h;if(!s||x)for(var d=0;d<n;d++,f++)nt(e,u[f]);else for(var d=0,g=p|0;d<n;d++,f++)for(var m=u[f],b=dr(e,m),v=0,S=0;v<m;v++){var C=b[v];if(C>128){var A=b[++v];C=256-C|0;for(var _=0;_<=C&&S<r;_=_+1|0,S=S+1|0)s[g]=A,g=g+i|0}else if(C<128)for(var _=0;_<=C&&S<r;_=_+1|0,S=S+1|0)s[g]=b[++v],g=g+i|0}}}function Sn(e,t,r,n,a){n===void 0&&(n=!0),a===void 0&&(a=!1);var i=De(e);if(a){if(i!==0)throw new Error("Sizes larger than 4GB are not supported");i=De(e)}if(!(i<=0&&n)){var o=e.offset+i;if(o>e.view.byteLength)throw new Error("Section exceeds file size");var l=r(function(){return o-e.offset});for(e.offset!==o&&(e.offset>o?cd(e,"Exceeded section limits"):cd(e,"Unread section data"));i%t;)i++,o++;return e.offset=o,l}}function Ir(e){var t=We(e);switch(t){case 0:{var r=We(e)/257,n=We(e)/257,a=We(e)/257;return nt(e,2),{r,g:n,b:a}}case 1:{var i=We(e)/65535,o=We(e)/65535,a=We(e)/65535;return nt(e,2),{h:i,s:o,b:a}}case 2:{var l=We(e)/257,s=We(e)/257,u=We(e)/257,c=We(e)/257;return{c:l,m:s,y:u,k:c}}case 7:{var f=Et(e)/1e4,d=Et(e),h=Et(e),y=d<0?d/12800:d/12700,a=h<0?h/12800:h/12700;return nt(e,2),{l:f,a:y,b:a}}case 8:{var c=We(e)*255/1e4;return nt(e,6),{k:c}}default:throw new Error("Invalid color space")}}function XE(e){for(var t=De(e);t%4;)t++;var r=e.offset+t,n=De(e);if(n!==1)throw new Error("Invalid pattern version: ".concat(n));var a=De(e),i=Et(e),o=Et(e);if(a!==3&&a!==1&&a!==2)throw new Error("Unsupported pattern color mode: ".concat(a));var l=_r(e),s=Jn(e,1),u=[];if(a===2){for(var c=0;c<256;c++)u.push({r:Ze(e),g:Ze(e),b:Ze(e)});nt(e,4)}var f=De(e);if(f!==3)throw new Error("Invalid pattern VMAL version: ".concat(f));De(e);for(var d=De(e),h=De(e),y=De(e),p=De(e),x=De(e),g=p-h,m=y-d,b=new Uint8Array(g*m*4),c=3;c<b.byteLength;c+=4)b[c]=255;for(var c=0,v=0;c<x+2;c++){var S=De(e);if(S){var C=De(e),A=De(e),_=De(e),E=De(e),M=De(e),z=De(e),N=We(e),R=Ze(e),$=C-23,q=dr(e,$);if(A!==8||N!==8)throw new Error("16bit pixel depth not supported for patterns");var W=z-E,Z=M-_,te=E-h,ne=_-d;if(R===0){if(a===3&&v<3)for(var _e=0;_e<Z;_e++)for(var pe=0;pe<W;pe++){var we=pe+_e*W,ve=(te+pe+(_e+ne)*g)*4;b[ve+v]=q[we]}if(a===1&&v<1)for(var Te=0;Te<Z;Te++)for(var Se=0;Se<W;Se++){var we=Se+Te*W,ve=(te+Se+(Te+ne)*g)*4,Ie=q[we];b[ve+0]=Ie,b[ve+1]=Ie,b[ve+2]=Ie}if(a===2)throw new Error("Indexed pattern color mode not implemented")}else if(R===1){var Le={data:b,width:g,height:m},Ae={data:new Uint8Array(W*Z),width:W,height:Z},Be=Wo(q.buffer,q.byteOffset,q.byteLength);if(a===3&&v<3&&(ki(Be,Ae,W,Z,8,1,[0],!1),qg(Ae,Le,te,ne,v)),a===1&&v<1&&(ki(Be,Ae,W,Z,8,1,[0],!1),qg(Ae,Le,te,ne,0),cu(Le)),a===2)throw new Error("Indexed pattern color mode not implemented")}else throw new Error("Invalid pattern compression mode");v++}}return e.offset=r,{id:s,name:l,x:i,y:o,bounds:{x:h,y:d,w:g,h:m},data:b}}function qg(e,t,r,n,a){for(var i=e.width,o=e.height,l=t.width,s=0;s<o;s++)for(var u=0;u<i;u++){var c=u+s*i,f=(r+u+(s+n)*l)*4,d=e.data[c];t.data[f+a]=d}}var Wg=[void 0,"outer bevel","inner bevel","emboss","pillow emboss","stroke emboss"];function Ko(e){return Ca(e,"8BIM"),Bo[Wt(e)]||"normal"}function Xo(e,t){pt(e,"8BIM"),pt(e,Z0[t]||"norm")}function Yo(e){return Ze(e)/255}function Zo(e,t){Ge(e,Math.round(t*255)|0)}function YE(e){var t=We(e);if(t!==0)throw new Error("Invalid effects layer version: ".concat(t));for(var r=We(e),n={},a=0;a<r;a++){Ca(e,"8BIM");var i=Wt(e);switch(i){case"cmnS":{var o=De(e),l=De(e),s=!!Ze(e);if(nt(e,2),o!==7||l!==0||!s)throw new Error("Invalid effects common state");break}case"dsdw":case"isdw":{var u=De(e),c=De(e);if(u!==41&&u!==51)throw new Error("Invalid shadow size: ".concat(u));if(c!==0&&c!==2)throw new Error("Invalid shadow version: ".concat(c));var o=kn(e);kn(e);var f=kn(e),d=kn(e),h=Ir(e),y=Ko(e),p=!!Ze(e),x=!!Ze(e),g=Yo(e);u>=51&&Ir(e);var m={size:{units:"Pixels",value:o},distance:{units:"Pixels",value:d},angle:f,color:h,blendMode:y,enabled:p,useGlobalLight:x,opacity:g};i==="dsdw"?n.dropShadow=[m]:n.innerShadow=[m];break}case"oglw":{var u=De(e),b=De(e);if(u!==32&&u!==42)throw new Error("Invalid outer glow size: ".concat(u));if(b!==0&&b!==2)throw new Error("Invalid outer glow version: ".concat(b));var o=kn(e);kn(e);var h=Ir(e),y=Ko(e),p=!!Ze(e),g=Yo(e);u>=42&&Ir(e),n.outerGlow={size:{units:"Pixels",value:o},color:h,blendMode:y,enabled:p,opacity:g};break}case"iglw":{var u=De(e),v=De(e);if(u!==32&&u!==43)throw new Error("Invalid inner glow size: ".concat(u));if(v!==0&&v!==2)throw new Error("Invalid inner glow version: ".concat(v));var o=kn(e);kn(e);var h=Ir(e),y=Ko(e),p=!!Ze(e),g=Yo(e);u>=43&&(Ze(e),Ir(e)),n.innerGlow={size:{units:"Pixels",value:o},color:h,blendMode:y,enabled:p,opacity:g};break}case"bevl":{var u=De(e),S=De(e);if(u!==58&&u!==78)throw new Error("Invalid bevel size: ".concat(u));if(S!==0&&S!==2)throw new Error("Invalid bevel version: ".concat(S));var f=kn(e),C=kn(e),o=kn(e),A=Ko(e),_=Ko(e),E=Ir(e),M=Ir(e),z=Wg[Ze(e)]||"inner bevel",N=Yo(e),R=Yo(e),p=!!Ze(e),x=!!Ze(e),$=Ze(e)?"down":"up";u>=78&&(Ir(e),Ir(e)),n.bevel={size:{units:"Pixels",value:o},angle:f,strength:C,highlightBlendMode:A,shadowBlendMode:_,highlightColor:E,shadowColor:M,style:z,highlightOpacity:N,shadowOpacity:R,enabled:p,useGlobalLight:x,direction:$};break}case"sofi":{var o=De(e),q=De(e);if(o!==34)throw new Error("Invalid effects solid fill info size: ".concat(o));if(q!==2)throw new Error("Invalid effects solid fill info version: ".concat(q));var y=Ko(e),h=Ir(e),g=Yo(e),p=!!Ze(e);Ir(e),n.solidFill=[{blendMode:y,color:h,opacity:g,enabled:p}];break}default:throw new Error("Invalid effect type: '".concat(i,"'"))}}return n}function Kg(e,t){var r;Je(e,51),Je(e,2),An(e,t.size&&t.size.value||0),An(e,0),An(e,t.angle||0),An(e,t.distance&&t.distance.value||0),zr(e,t.color),Xo(e,t.blendMode),Ge(e,t.enabled?1:0),Ge(e,t.useGlobalLight?1:0),Zo(e,(r=t.opacity)!==null&&r!==void 0?r:1),zr(e,t.color)}function ZE(e,t){var r,n,a,i,o,l,s=(r=t.dropShadow)===null||r===void 0?void 0:r[0],u=(n=t.innerShadow)===null||n===void 0?void 0:n[0],c=t.outerGlow,f=t.innerGlow,d=t.bevel,h=(a=t.solidFill)===null||a===void 0?void 0:a[0],y=1;if(s&&y++,u&&y++,c&&y++,f&&y++,d&&y++,h&&y++,Oe(e,0),Oe(e,y),pt(e,"8BIM"),pt(e,"cmnS"),Je(e,7),Je(e,0),Ge(e,1),Rt(e,2),s&&(pt(e,"8BIM"),pt(e,"dsdw"),Kg(e,s)),u&&(pt(e,"8BIM"),pt(e,"isdw"),Kg(e,u)),c&&(pt(e,"8BIM"),pt(e,"oglw"),Je(e,42),Je(e,2),An(e,((i=c.size)===null||i===void 0?void 0:i.value)||0),An(e,0),zr(e,c.color),Xo(e,c.blendMode),Ge(e,c.enabled?1:0),Zo(e,c.opacity||0),zr(e,c.color)),f&&(pt(e,"8BIM"),pt(e,"iglw"),Je(e,43),Je(e,2),An(e,((o=f.size)===null||o===void 0?void 0:o.value)||0),An(e,0),zr(e,f.color),Xo(e,f.blendMode),Ge(e,f.enabled?1:0),Zo(e,f.opacity||0),Ge(e,0),zr(e,f.color)),d){pt(e,"8BIM"),pt(e,"bevl"),Je(e,78),Je(e,2),An(e,d.angle||0),An(e,d.strength||0),An(e,((l=d.size)===null||l===void 0?void 0:l.value)||0),Xo(e,d.highlightBlendMode),Xo(e,d.shadowBlendMode),zr(e,d.highlightColor),zr(e,d.shadowColor);var p=Wg.indexOf(d.style);Ge(e,p<=0?1:p),Zo(e,d.highlightOpacity||0),Zo(e,d.shadowOpacity||0),Ge(e,d.enabled?1:0),Ge(e,d.useGlobalLight?1:0),Ge(e,d.direction==="down"?1:0),zr(e,d.highlightColor),zr(e,d.shadowColor)}h&&(pt(e,"8BIM"),pt(e,"sofi"),Je(e,34),Je(e,2),Xo(e,h.blendMode),zr(e,h.color),Zo(e,h.opacity||0),Ge(e,h.enabled?1:0),zr(e,h.color))}function Xg(e){return e===32||e===10||e===13||e===9}function Yg(e){return e>=48&&e<=57||e===46||e===45}function Zg(e){var t=0;function r(){for(;t<e.length&&Xg(e[t]);)t++}function n(){var m=e[t];return t++,m===92&&(m=e[t],t++),m}function a(){var m="";if(e[t]===41)return t++,m;if(e[t]!==254||e[t+1]!==255)throw new Error("Invalid utf-16 BOM");for(t+=2;t<e.length&&e[t]!==41;){var b=n(),v=n(),S=b<<8|v;m+=String.fromCharCode(S)}return t++,m}var i=null,o=[];function l(m){o.length?(s(m),o.push(m)):(o.push(m),i=m)}function s(m){if(!o.length)throw new Error("Invalid data");var b=o[o.length-1];if(typeof b=="string")o[o.length-2][b]=m,c();else if(Array.isArray(b))b.push(m);else throw new Error("Invalid data")}function u(m){o.length||l({});var b=o[o.length-1];if(b&&typeof b=="string")s(m==="nil"?null:"/".concat(m));else if(b&&typeof b=="object")o.push(m);else throw new Error("Invalid data")}function c(){if(!o.length)throw new Error("Invalid data");o.pop()}r();for(var f=e.length;f>0&&e[f-1]===0;)f--;for(;t<f;){var d=t,h=e[d];if(h===60&&e[d+1]===60)t+=2,l({});else if(h===62&&e[d+1]===62)t+=2,c();else if(h===47){t+=1;for(var y=t;t<e.length&&!Xg(e[t]);)t++;for(var p="",x=y;x<t;x++)p+=String.fromCharCode(e[x]);u(p)}else if(h===40)t+=1,s(a());else if(h===91)t+=1,l([]);else if(h===93)t+=1,c();else if(h===110&&e[d+1]===117&&e[d+2]===108&&e[d+3]===108)t+=4,s(null);else if(h===116&&e[d+1]===114&&e[d+2]===117&&e[d+3]===101)t+=4,s(!0);else if(h===102&&e[d+1]===97&&e[d+2]===108&&e[d+3]===115&&e[d+4]===101)t+=5,s(!1);else if(Yg(h)){for(var g="";t<e.length&&Yg(e[t]);)g+=String.fromCharCode(e[t]),t++;s(parseFloat(g))}else t+=1,console.log("Invalid token '".concat(String.fromCharCode(h),"' (").concat(h,") at ").concat(t));r()}return i}var JE=["Axis","XY","Zone","WordSpacing","FirstLineIndent","GlyphSpacing","StartIndent","EndIndent","SpaceBefore","SpaceAfter","LetterSpacing","Values","GridSize","GridLeading","PointBase","BoxBounds","TransformPoint0","TransformPoint1","TransformPoint2","FontSize","Leading","HorizontalScale","VerticalScale","BaselineShift","Tsume","OutlineWidth","AutoLeading"],QE=["RunLengthArray"];function eT(e,t){t===void 0&&(t=!1);var r=new Uint8Array(1024),n=0,a=0;function i(m){if(n>=r.length){var b=new Uint8Array(r.length*2);b.set(r),r=b}r[n]=m,n++}function o(m){for(var b=0;b<m.length;b++)i(m.charCodeAt(b))}function l(){if(t)o(" ");else for(var m=0;m<a;m++)o(" ")}function s(m,b){l(),o("/".concat(m)),y(b,m,!0),t||o(`
|
|
281
|
+
please report what input caused this bug`);return n=n.slice(1,-1),{type:"verb",mode:"text",body:n,star:a}}Kv.hasOwnProperty(r[0])&&!or[this.mode][r[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+r[0]+'" used in math mode',t),r=Kv[r[0]]+r.slice(1));var i=uS.exec(r);i&&(r=r.substring(0,i.index),r==="i"?r="ı":r==="j"&&(r="ȷ"));var o;if(or[this.mode][r]){this.settings.strict&&this.mode==="math"&&Ic.includes(r)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',t);var l=or[this.mode][r].group,s=un.range(t),u;if(ck.hasOwnProperty(l)){var c=l;u={type:"atom",mode:this.mode,family:c,loc:s,text:r}}else u={type:l,mode:this.mode,loc:s,text:r};o=u}else if(r.charCodeAt(0)>=128)this.settings.strict&&(wp(r.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'"'+(" ("+r.charCodeAt(0)+")"),t)),o={type:"textord",mode:"text",loc:un.range(t),text:r};else return null;if(this.consume(),i)for(var f=0;f<i[0].length;f++){var d=i[0][f];if(!uf[d])throw new He("Unknown accent ' "+d+"'",t);var h=uf[d][this.mode]||uf[d].text;if(!h)throw new He("Accent "+d+" unsupported in "+this.mode+" mode",t);o={type:"accent",mode:this.mode,loc:un.range(t),label:h,isStretchy:!1,isShifty:!0,base:o}}return o}}E0.endOfExpression=new Set(["}","\\endgroup","\\end","\\right","&"]);var cf=function(t,r){if(!(typeof t=="string"||t instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new E0(t,r);delete n.gullet.macros.current["\\df@tag"];var a=n.parse();if(delete n.gullet.macros.current["\\current@color"],delete n.gullet.macros.current["\\color"],n.gullet.macros.get("\\df@tag")){if(!r.displayMode)throw new He("\\tag works only in display equations");a=[{type:"tag",mode:"text",body:a,tag:n.subparse([new bn("\\df@tag")])}]}return a},ff=function(t,r,n){r.textContent="";var a=T0(t,n).toNode();r.appendChild(a)};typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),ff=function(){throw new He("KaTeX doesn't work in quirks mode.")});var Xv=function(t,r){var n=T0(t,r).toMarkup();return n},Yv=function(t,r){var n=new _c(r);return cf(t,n)},Zv=function(t,r,n){if(n.throwOnError||!(t instanceof He))throw t;var a=$e(["katex-error"],[new vn(r)]);return a.setAttribute("title",t.toString()),a.setAttribute("style","color:"+n.errorColor),a},T0=function(t,r){var n=new _c(r);try{var a=cf(t,n);return Ak(a,t,n)}catch(i){return Zv(i,t,n)}},Jv=function(t,r){var n=new _c(r);try{var a=cf(t,n);return Ek(a,t,n)}catch(i){return Zv(i,t,n)}},Qv="0.16.45",em={Span:_o,Anchor:r0,SymbolNode:vn,SvgNode:Na,PathNode:ui,LineNode:Cc},vS={version:Qv,render:ff,renderToString:Xv,ParseError:He,SETTINGS_SCHEMA:Qs,__parse:Yv,__renderToDomTree:T0,__renderToHTMLTree:Jv,__setFontMetrics:Mp,__defineSymbol:w,__defineFunction:at,__defineMacro:B,__domTree:em};const mS=Object.freeze(Object.defineProperty({__proto__:null,ParseError:He,SETTINGS_SCHEMA:Qs,__defineFunction:at,__defineMacro:B,__defineSymbol:w,__domTree:em,__parse:Yv,__renderToDomTree:T0,__renderToHTMLTree:Jv,__setFontMetrics:Mp,default:vS,get render(){return ff},renderToString:Xv,version:Qv},Symbol.toStringTag,{value:"Module"}));var gS=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function tm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function bS(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var rm={exports:{}},df={},nm;function vi(){return nm||(nm=1,function(e){var t=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function r(i,o){return Object.prototype.hasOwnProperty.call(i,o)}e.assign=function(i){for(var o=Array.prototype.slice.call(arguments,1);o.length;){var l=o.shift();if(l){if(typeof l!="object")throw new TypeError(l+"must be non-object");for(var s in l)r(l,s)&&(i[s]=l[s])}}return i},e.shrinkBuf=function(i,o){return i.length===o?i:i.subarray?i.subarray(0,o):(i.length=o,i)};var n={arraySet:function(i,o,l,s,u){if(o.subarray&&i.subarray){i.set(o.subarray(l,l+s),u);return}for(var c=0;c<s;c++)i[u+c]=o[l+c]},flattenChunks:function(i){var o,l,s,u,c,f;for(s=0,o=0,l=i.length;o<l;o++)s+=i[o].length;for(f=new Uint8Array(s),u=0,o=0,l=i.length;o<l;o++)c=i[o],f.set(c,u),u+=c.length;return f}},a={arraySet:function(i,o,l,s,u){for(var c=0;c<s;c++)i[u+c]=o[l+c]},flattenChunks:function(i){return[].concat.apply([],i)}};e.setTyped=function(i){i?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,n)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,a))},e.setTyped(t)}(df)),df}var Ao={},Wn={},$i={},am;function yS(){if(am)return $i;am=1;var e=vi(),t=4,r=0,n=1,a=2;function i(D){for(var ue=D.length;--ue>=0;)D[ue]=0}var o=0,l=1,s=2,u=3,c=258,f=29,d=256,h=d+1+f,y=30,p=19,x=2*h+1,g=15,m=16,b=7,v=256,S=16,C=17,A=18,_=[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],E=[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],M=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],N=512,R=new Array((h+2)*2);i(R);var $=new Array(y*2);i($);var q=new Array(N);i(q);var W=new Array(c-u+1);i(W);var Z=new Array(f);i(Z);var te=new Array(y);i(te);function ne(D,ue,ke,ze,re){this.static_tree=D,this.extra_bits=ue,this.extra_base=ke,this.elems=ze,this.max_length=re,this.has_stree=D&&D.length}var _e,pe,we;function ve(D,ue){this.dyn_tree=D,this.max_code=0,this.stat_desc=ue}function Te(D){return D<256?q[D]:q[256+(D>>>7)]}function Se(D,ue){D.pending_buf[D.pending++]=ue&255,D.pending_buf[D.pending++]=ue>>>8&255}function Ie(D,ue,ke){D.bi_valid>m-ke?(D.bi_buf|=ue<<D.bi_valid&65535,Se(D,D.bi_buf),D.bi_buf=ue>>m-D.bi_valid,D.bi_valid+=ke-m):(D.bi_buf|=ue<<D.bi_valid&65535,D.bi_valid+=ke)}function Le(D,ue,ke){Ie(D,ke[ue*2],ke[ue*2+1])}function Ee(D,ue){var ke=0;do ke|=D&1,D>>>=1,ke<<=1;while(--ue>0);return ke>>>1}function Be(D){D.bi_valid===16?(Se(D,D.bi_buf),D.bi_buf=0,D.bi_valid=0):D.bi_valid>=8&&(D.pending_buf[D.pending++]=D.bi_buf&255,D.bi_buf>>=8,D.bi_valid-=8)}function be(D,ue){var ke=ue.dyn_tree,ze=ue.max_code,re=ue.stat_desc.static_tree,me=ue.stat_desc.has_stree,O=ue.stat_desc.extra_bits,Fe=ue.stat_desc.extra_base,gt=ue.stat_desc.max_length,k,K,H,I,ee,X,Xe=0;for(I=0;I<=g;I++)D.bl_count[I]=0;for(ke[D.heap[D.heap_max]*2+1]=0,k=D.heap_max+1;k<x;k++)K=D.heap[k],I=ke[ke[K*2+1]*2+1]+1,I>gt&&(I=gt,Xe++),ke[K*2+1]=I,!(K>ze)&&(D.bl_count[I]++,ee=0,K>=Fe&&(ee=O[K-Fe]),X=ke[K*2],D.opt_len+=X*(I+ee),me&&(D.static_len+=X*(re[K*2+1]+ee)));if(Xe!==0){do{for(I=gt-1;D.bl_count[I]===0;)I--;D.bl_count[I]--,D.bl_count[I+1]+=2,D.bl_count[gt]--,Xe-=2}while(Xe>0);for(I=gt;I!==0;I--)for(K=D.bl_count[I];K!==0;)H=D.heap[--k],!(H>ze)&&(ke[H*2+1]!==I&&(D.opt_len+=(I-ke[H*2+1])*ke[H*2],ke[H*2+1]=I),K--)}}function ye(D,ue,ke){var ze=new Array(g+1),re=0,me,O;for(me=1;me<=g;me++)ze[me]=re=re+ke[me-1]<<1;for(O=0;O<=ue;O++){var Fe=D[O*2+1];Fe!==0&&(D[O*2]=Ee(ze[Fe]++,Fe))}}function P(){var D,ue,ke,ze,re,me=new Array(g+1);for(ke=0,ze=0;ze<f-1;ze++)for(Z[ze]=ke,D=0;D<1<<_[ze];D++)W[ke++]=ze;for(W[ke-1]=ze,re=0,ze=0;ze<16;ze++)for(te[ze]=re,D=0;D<1<<E[ze];D++)q[re++]=ze;for(re>>=7;ze<y;ze++)for(te[ze]=re<<7,D=0;D<1<<E[ze]-7;D++)q[256+re++]=ze;for(ue=0;ue<=g;ue++)me[ue]=0;for(D=0;D<=143;)R[D*2+1]=8,D++,me[8]++;for(;D<=255;)R[D*2+1]=9,D++,me[9]++;for(;D<=279;)R[D*2+1]=7,D++,me[7]++;for(;D<=287;)R[D*2+1]=8,D++,me[8]++;for(ye(R,h+1,me),D=0;D<y;D++)$[D*2+1]=5,$[D*2]=Ee(D,5);_e=new ne(R,_,d+1,h,g),pe=new ne($,E,0,y,g),we=new ne(new Array(0),M,0,p,b)}function V(D){var ue;for(ue=0;ue<h;ue++)D.dyn_ltree[ue*2]=0;for(ue=0;ue<y;ue++)D.dyn_dtree[ue*2]=0;for(ue=0;ue<p;ue++)D.bl_tree[ue*2]=0;D.dyn_ltree[v*2]=1,D.opt_len=D.static_len=0,D.last_lit=D.matches=0}function fe(D){D.bi_valid>8?Se(D,D.bi_buf):D.bi_valid>0&&(D.pending_buf[D.pending++]=D.bi_buf),D.bi_buf=0,D.bi_valid=0}function de(D,ue,ke,ze){fe(D),Se(D,ke),Se(D,~ke),e.arraySet(D.pending_buf,D.window,ue,ke,D.pending),D.pending+=ke}function ie(D,ue,ke,ze){var re=ue*2,me=ke*2;return D[re]<D[me]||D[re]===D[me]&&ze[ue]<=ze[ke]}function oe(D,ue,ke){for(var ze=D.heap[ke],re=ke<<1;re<=D.heap_len&&(re<D.heap_len&&ie(ue,D.heap[re+1],D.heap[re],D.depth)&&re++,!ie(ue,ze,D.heap[re],D.depth));)D.heap[ke]=D.heap[re],ke=re,re<<=1;D.heap[ke]=ze}function se(D,ue,ke){var ze,re,me=0,O,Fe;if(D.last_lit!==0)do ze=D.pending_buf[D.d_buf+me*2]<<8|D.pending_buf[D.d_buf+me*2+1],re=D.pending_buf[D.l_buf+me],me++,ze===0?Le(D,re,ue):(O=W[re],Le(D,O+d+1,ue),Fe=_[O],Fe!==0&&(re-=Z[O],Ie(D,re,Fe)),ze--,O=Te(ze),Le(D,O,ke),Fe=E[O],Fe!==0&&(ze-=te[O],Ie(D,ze,Fe)));while(me<D.last_lit);Le(D,v,ue)}function ge(D,ue){var ke=ue.dyn_tree,ze=ue.stat_desc.static_tree,re=ue.stat_desc.has_stree,me=ue.stat_desc.elems,O,Fe,gt=-1,k;for(D.heap_len=0,D.heap_max=x,O=0;O<me;O++)ke[O*2]!==0?(D.heap[++D.heap_len]=gt=O,D.depth[O]=0):ke[O*2+1]=0;for(;D.heap_len<2;)k=D.heap[++D.heap_len]=gt<2?++gt:0,ke[k*2]=1,D.depth[k]=0,D.opt_len--,re&&(D.static_len-=ze[k*2+1]);for(ue.max_code=gt,O=D.heap_len>>1;O>=1;O--)oe(D,ke,O);k=me;do O=D.heap[1],D.heap[1]=D.heap[D.heap_len--],oe(D,ke,1),Fe=D.heap[1],D.heap[--D.heap_max]=O,D.heap[--D.heap_max]=Fe,ke[k*2]=ke[O*2]+ke[Fe*2],D.depth[k]=(D.depth[O]>=D.depth[Fe]?D.depth[O]:D.depth[Fe])+1,ke[O*2+1]=ke[Fe*2+1]=k,D.heap[1]=k++,oe(D,ke,1);while(D.heap_len>=2);D.heap[--D.heap_max]=D.heap[1],be(D,ue),ye(ke,gt,D.bl_count)}function Ce(D,ue,ke){var ze,re=-1,me,O=ue[0*2+1],Fe=0,gt=7,k=4;for(O===0&&(gt=138,k=3),ue[(ke+1)*2+1]=65535,ze=0;ze<=ke;ze++)me=O,O=ue[(ze+1)*2+1],!(++Fe<gt&&me===O)&&(Fe<k?D.bl_tree[me*2]+=Fe:me!==0?(me!==re&&D.bl_tree[me*2]++,D.bl_tree[S*2]++):Fe<=10?D.bl_tree[C*2]++:D.bl_tree[A*2]++,Fe=0,re=me,O===0?(gt=138,k=3):me===O?(gt=6,k=3):(gt=7,k=4))}function xe(D,ue,ke){var ze,re=-1,me,O=ue[0*2+1],Fe=0,gt=7,k=4;for(O===0&&(gt=138,k=3),ze=0;ze<=ke;ze++)if(me=O,O=ue[(ze+1)*2+1],!(++Fe<gt&&me===O)){if(Fe<k)do Le(D,me,D.bl_tree);while(--Fe!==0);else me!==0?(me!==re&&(Le(D,me,D.bl_tree),Fe--),Le(D,S,D.bl_tree),Ie(D,Fe-3,2)):Fe<=10?(Le(D,C,D.bl_tree),Ie(D,Fe-3,3)):(Le(D,A,D.bl_tree),Ie(D,Fe-11,7));Fe=0,re=me,O===0?(gt=138,k=3):me===O?(gt=6,k=3):(gt=7,k=4)}}function Ve(D){var ue;for(Ce(D,D.dyn_ltree,D.l_desc.max_code),Ce(D,D.dyn_dtree,D.d_desc.max_code),ge(D,D.bl_desc),ue=p-1;ue>=3&&D.bl_tree[z[ue]*2+1]===0;ue--);return D.opt_len+=3*(ue+1)+5+5+4,ue}function Ue(D,ue,ke,ze){var re;for(Ie(D,ue-257,5),Ie(D,ke-1,5),Ie(D,ze-4,4),re=0;re<ze;re++)Ie(D,D.bl_tree[z[re]*2+1],3);xe(D,D.dyn_ltree,ue-1),xe(D,D.dyn_dtree,ke-1)}function Ne(D){var ue=4093624447,ke;for(ke=0;ke<=31;ke++,ue>>>=1)if(ue&1&&D.dyn_ltree[ke*2]!==0)return r;if(D.dyn_ltree[9*2]!==0||D.dyn_ltree[10*2]!==0||D.dyn_ltree[13*2]!==0)return n;for(ke=32;ke<d;ke++)if(D.dyn_ltree[ke*2]!==0)return n;return r}var qe=!1;function it(D){qe||(P(),qe=!0),D.l_desc=new ve(D.dyn_ltree,_e),D.d_desc=new ve(D.dyn_dtree,pe),D.bl_desc=new ve(D.bl_tree,we),D.bi_buf=0,D.bi_valid=0,V(D)}function ct(D,ue,ke,ze){Ie(D,(o<<1)+(ze?1:0),3),de(D,ue,ke)}function ot(D){Ie(D,l<<1,3),Le(D,v,R),Be(D)}function wt(D,ue,ke,ze){var re,me,O=0;D.level>0?(D.strm.data_type===a&&(D.strm.data_type=Ne(D)),ge(D,D.l_desc),ge(D,D.d_desc),O=Ve(D),re=D.opt_len+3+7>>>3,me=D.static_len+3+7>>>3,me<=re&&(re=me)):re=me=ke+5,ke+4<=re&&ue!==-1?ct(D,ue,ke,ze):D.strategy===t||me===re?(Ie(D,(l<<1)+(ze?1:0),3),se(D,R,$)):(Ie(D,(s<<1)+(ze?1:0),3),Ue(D,D.l_desc.max_code+1,D.d_desc.max_code+1,O+1),se(D,D.dyn_ltree,D.dyn_dtree)),V(D),ze&&fe(D)}function Me(D,ue,ke){return D.pending_buf[D.d_buf+D.last_lit*2]=ue>>>8&255,D.pending_buf[D.d_buf+D.last_lit*2+1]=ue&255,D.pending_buf[D.l_buf+D.last_lit]=ke&255,D.last_lit++,ue===0?D.dyn_ltree[ke*2]++:(D.matches++,ue--,D.dyn_ltree[(W[ke]+d+1)*2]++,D.dyn_dtree[Te(ue)*2]++),D.last_lit===D.lit_bufsize-1}return $i._tr_init=it,$i._tr_stored_block=ct,$i._tr_flush_block=wt,$i._tr_tally=Me,$i._tr_align=ot,$i}var hf,im;function om(){if(im)return hf;im=1;function e(t,r,n,a){for(var i=t&65535|0,o=t>>>16&65535|0,l=0;n!==0;){l=n>2e3?2e3:n,n-=l;do i=i+r[a++]|0,o=o+i|0;while(--l);i%=65521,o%=65521}return i|o<<16|0}return hf=e,hf}var pf,lm;function sm(){if(lm)return pf;lm=1;function e(){for(var n,a=[],i=0;i<256;i++){n=i;for(var o=0;o<8;o++)n=n&1?3988292384^n>>>1:n>>>1;a[i]=n}return a}var t=e();function r(n,a,i,o){var l=t,s=o+i;n^=-1;for(var u=o;u<s;u++)n=n>>>8^l[(n^a[u])&255];return n^-1}return pf=r,pf}var vf,um;function mf(){return um||(um=1,vf={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"}),vf}var cm;function xS(){if(cm)return Wn;cm=1;var e=vi(),t=yS(),r=om(),n=sm(),a=mf(),i=0,o=1,l=3,s=4,u=5,c=0,f=1,d=-2,h=-3,y=-5,p=-1,x=1,g=2,m=3,b=4,v=0,S=2,C=8,A=9,_=15,E=8,M=29,z=256,N=z+1+M,R=30,$=19,q=2*N+1,W=15,Z=3,te=258,ne=te+Z+1,_e=32,pe=42,we=69,ve=73,Te=91,Se=103,Ie=113,Le=666,Ee=1,Be=2,be=3,ye=4,P=3;function V(k,K){return k.msg=a[K],K}function fe(k){return(k<<1)-(k>4?9:0)}function de(k){for(var K=k.length;--K>=0;)k[K]=0}function ie(k){var K=k.state,H=K.pending;H>k.avail_out&&(H=k.avail_out),H!==0&&(e.arraySet(k.output,K.pending_buf,K.pending_out,H,k.next_out),k.next_out+=H,K.pending_out+=H,k.total_out+=H,k.avail_out-=H,K.pending-=H,K.pending===0&&(K.pending_out=0))}function oe(k,K){t._tr_flush_block(k,k.block_start>=0?k.block_start:-1,k.strstart-k.block_start,K),k.block_start=k.strstart,ie(k.strm)}function se(k,K){k.pending_buf[k.pending++]=K}function ge(k,K){k.pending_buf[k.pending++]=K>>>8&255,k.pending_buf[k.pending++]=K&255}function Ce(k,K,H,I){var ee=k.avail_in;return ee>I&&(ee=I),ee===0?0:(k.avail_in-=ee,e.arraySet(K,k.input,k.next_in,ee,H),k.state.wrap===1?k.adler=r(k.adler,K,ee,H):k.state.wrap===2&&(k.adler=n(k.adler,K,ee,H)),k.next_in+=ee,k.total_in+=ee,ee)}function xe(k,K){var H=k.max_chain_length,I=k.strstart,ee,X,Xe=k.prev_length,We=k.nice_match,tt=k.strstart>k.w_size-ne?k.strstart-(k.w_size-ne):0,At=k.window,fn=k.w_mask,Jt=k.prev,zt=k.strstart+te,mr=At[I+Xe-1],Fr=At[I+Xe];k.prev_length>=k.good_match&&(H>>=2),We>k.lookahead&&(We=k.lookahead);do if(ee=K,!(At[ee+Xe]!==Fr||At[ee+Xe-1]!==mr||At[ee]!==At[I]||At[++ee]!==At[I+1])){I+=2,ee++;do;while(At[++I]===At[++ee]&&At[++I]===At[++ee]&&At[++I]===At[++ee]&&At[++I]===At[++ee]&&At[++I]===At[++ee]&&At[++I]===At[++ee]&&At[++I]===At[++ee]&&At[++I]===At[++ee]&&I<zt);if(X=te-(zt-I),I=zt-te,X>Xe){if(k.match_start=K,Xe=X,X>=We)break;mr=At[I+Xe-1],Fr=At[I+Xe]}}while((K=Jt[K&fn])>tt&&--H!==0);return Xe<=k.lookahead?Xe:k.lookahead}function Ve(k){var K=k.w_size,H,I,ee,X,Xe;do{if(X=k.window_size-k.lookahead-k.strstart,k.strstart>=K+(K-ne)){e.arraySet(k.window,k.window,K,K,0),k.match_start-=K,k.strstart-=K,k.block_start-=K,I=k.hash_size,H=I;do ee=k.head[--H],k.head[H]=ee>=K?ee-K:0;while(--I);I=K,H=I;do ee=k.prev[--H],k.prev[H]=ee>=K?ee-K:0;while(--I);X+=K}if(k.strm.avail_in===0)break;if(I=Ce(k.strm,k.window,k.strstart+k.lookahead,X),k.lookahead+=I,k.lookahead+k.insert>=Z)for(Xe=k.strstart-k.insert,k.ins_h=k.window[Xe],k.ins_h=(k.ins_h<<k.hash_shift^k.window[Xe+1])&k.hash_mask;k.insert&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[Xe+Z-1])&k.hash_mask,k.prev[Xe&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=Xe,Xe++,k.insert--,!(k.lookahead+k.insert<Z)););}while(k.lookahead<ne&&k.strm.avail_in!==0)}function Ue(k,K){var H=65535;for(H>k.pending_buf_size-5&&(H=k.pending_buf_size-5);;){if(k.lookahead<=1){if(Ve(k),k.lookahead===0&&K===i)return Ee;if(k.lookahead===0)break}k.strstart+=k.lookahead,k.lookahead=0;var I=k.block_start+H;if((k.strstart===0||k.strstart>=I)&&(k.lookahead=k.strstart-I,k.strstart=I,oe(k,!1),k.strm.avail_out===0)||k.strstart-k.block_start>=k.w_size-ne&&(oe(k,!1),k.strm.avail_out===0))return Ee}return k.insert=0,K===s?(oe(k,!0),k.strm.avail_out===0?be:ye):(k.strstart>k.block_start&&(oe(k,!1),k.strm.avail_out===0),Ee)}function Ne(k,K){for(var H,I;;){if(k.lookahead<ne){if(Ve(k),k.lookahead<ne&&K===i)return Ee;if(k.lookahead===0)break}if(H=0,k.lookahead>=Z&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+Z-1])&k.hash_mask,H=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),H!==0&&k.strstart-H<=k.w_size-ne&&(k.match_length=xe(k,H)),k.match_length>=Z)if(I=t._tr_tally(k,k.strstart-k.match_start,k.match_length-Z),k.lookahead-=k.match_length,k.match_length<=k.max_lazy_match&&k.lookahead>=Z){k.match_length--;do k.strstart++,k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+Z-1])&k.hash_mask,H=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart;while(--k.match_length!==0);k.strstart++}else k.strstart+=k.match_length,k.match_length=0,k.ins_h=k.window[k.strstart],k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+1])&k.hash_mask;else I=t._tr_tally(k,0,k.window[k.strstart]),k.lookahead--,k.strstart++;if(I&&(oe(k,!1),k.strm.avail_out===0))return Ee}return k.insert=k.strstart<Z-1?k.strstart:Z-1,K===s?(oe(k,!0),k.strm.avail_out===0?be:ye):k.last_lit&&(oe(k,!1),k.strm.avail_out===0)?Ee:Be}function qe(k,K){for(var H,I,ee;;){if(k.lookahead<ne){if(Ve(k),k.lookahead<ne&&K===i)return Ee;if(k.lookahead===0)break}if(H=0,k.lookahead>=Z&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+Z-1])&k.hash_mask,H=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),k.prev_length=k.match_length,k.prev_match=k.match_start,k.match_length=Z-1,H!==0&&k.prev_length<k.max_lazy_match&&k.strstart-H<=k.w_size-ne&&(k.match_length=xe(k,H),k.match_length<=5&&(k.strategy===x||k.match_length===Z&&k.strstart-k.match_start>4096)&&(k.match_length=Z-1)),k.prev_length>=Z&&k.match_length<=k.prev_length){ee=k.strstart+k.lookahead-Z,I=t._tr_tally(k,k.strstart-1-k.prev_match,k.prev_length-Z),k.lookahead-=k.prev_length-1,k.prev_length-=2;do++k.strstart<=ee&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+Z-1])&k.hash_mask,H=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart);while(--k.prev_length!==0);if(k.match_available=0,k.match_length=Z-1,k.strstart++,I&&(oe(k,!1),k.strm.avail_out===0))return Ee}else if(k.match_available){if(I=t._tr_tally(k,0,k.window[k.strstart-1]),I&&oe(k,!1),k.strstart++,k.lookahead--,k.strm.avail_out===0)return Ee}else k.match_available=1,k.strstart++,k.lookahead--}return k.match_available&&(I=t._tr_tally(k,0,k.window[k.strstart-1]),k.match_available=0),k.insert=k.strstart<Z-1?k.strstart:Z-1,K===s?(oe(k,!0),k.strm.avail_out===0?be:ye):k.last_lit&&(oe(k,!1),k.strm.avail_out===0)?Ee:Be}function it(k,K){for(var H,I,ee,X,Xe=k.window;;){if(k.lookahead<=te){if(Ve(k),k.lookahead<=te&&K===i)return Ee;if(k.lookahead===0)break}if(k.match_length=0,k.lookahead>=Z&&k.strstart>0&&(ee=k.strstart-1,I=Xe[ee],I===Xe[++ee]&&I===Xe[++ee]&&I===Xe[++ee])){X=k.strstart+te;do;while(I===Xe[++ee]&&I===Xe[++ee]&&I===Xe[++ee]&&I===Xe[++ee]&&I===Xe[++ee]&&I===Xe[++ee]&&I===Xe[++ee]&&I===Xe[++ee]&&ee<X);k.match_length=te-(X-ee),k.match_length>k.lookahead&&(k.match_length=k.lookahead)}if(k.match_length>=Z?(H=t._tr_tally(k,1,k.match_length-Z),k.lookahead-=k.match_length,k.strstart+=k.match_length,k.match_length=0):(H=t._tr_tally(k,0,k.window[k.strstart]),k.lookahead--,k.strstart++),H&&(oe(k,!1),k.strm.avail_out===0))return Ee}return k.insert=0,K===s?(oe(k,!0),k.strm.avail_out===0?be:ye):k.last_lit&&(oe(k,!1),k.strm.avail_out===0)?Ee:Be}function ct(k,K){for(var H;;){if(k.lookahead===0&&(Ve(k),k.lookahead===0)){if(K===i)return Ee;break}if(k.match_length=0,H=t._tr_tally(k,0,k.window[k.strstart]),k.lookahead--,k.strstart++,H&&(oe(k,!1),k.strm.avail_out===0))return Ee}return k.insert=0,K===s?(oe(k,!0),k.strm.avail_out===0?be:ye):k.last_lit&&(oe(k,!1),k.strm.avail_out===0)?Ee:Be}function ot(k,K,H,I,ee){this.good_length=k,this.max_lazy=K,this.nice_length=H,this.max_chain=I,this.func=ee}var wt;wt=[new ot(0,0,0,0,Ue),new ot(4,4,8,4,Ne),new ot(4,5,16,8,Ne),new ot(4,6,32,32,Ne),new ot(4,4,16,16,qe),new ot(8,16,32,32,qe),new ot(8,16,128,128,qe),new ot(8,32,128,256,qe),new ot(32,128,258,1024,qe),new ot(32,258,258,4096,qe)];function Me(k){k.window_size=2*k.w_size,de(k.head),k.max_lazy_match=wt[k.level].max_lazy,k.good_match=wt[k.level].good_length,k.nice_match=wt[k.level].nice_length,k.max_chain_length=wt[k.level].max_chain,k.strstart=0,k.block_start=0,k.lookahead=0,k.insert=0,k.match_length=k.prev_length=Z-1,k.match_available=0,k.ins_h=0}function D(){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 e.Buf16(q*2),this.dyn_dtree=new e.Buf16((2*R+1)*2),this.bl_tree=new e.Buf16((2*$+1)*2),de(this.dyn_ltree),de(this.dyn_dtree),de(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new e.Buf16(W+1),this.heap=new e.Buf16(2*N+1),de(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new e.Buf16(2*N+1),de(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 ue(k){var K;return!k||!k.state?V(k,d):(k.total_in=k.total_out=0,k.data_type=S,K=k.state,K.pending=0,K.pending_out=0,K.wrap<0&&(K.wrap=-K.wrap),K.status=K.wrap?pe:Ie,k.adler=K.wrap===2?0:1,K.last_flush=i,t._tr_init(K),c)}function ke(k){var K=ue(k);return K===c&&Me(k.state),K}function ze(k,K){return!k||!k.state||k.state.wrap!==2?d:(k.state.gzhead=K,c)}function re(k,K,H,I,ee,X){if(!k)return d;var Xe=1;if(K===p&&(K=6),I<0?(Xe=0,I=-I):I>15&&(Xe=2,I-=16),ee<1||ee>A||H!==C||I<8||I>15||K<0||K>9||X<0||X>b)return V(k,d);I===8&&(I=9);var We=new D;return k.state=We,We.strm=k,We.wrap=Xe,We.gzhead=null,We.w_bits=I,We.w_size=1<<We.w_bits,We.w_mask=We.w_size-1,We.hash_bits=ee+7,We.hash_size=1<<We.hash_bits,We.hash_mask=We.hash_size-1,We.hash_shift=~~((We.hash_bits+Z-1)/Z),We.window=new e.Buf8(We.w_size*2),We.head=new e.Buf16(We.hash_size),We.prev=new e.Buf16(We.w_size),We.lit_bufsize=1<<ee+6,We.pending_buf_size=We.lit_bufsize*4,We.pending_buf=new e.Buf8(We.pending_buf_size),We.d_buf=1*We.lit_bufsize,We.l_buf=3*We.lit_bufsize,We.level=K,We.strategy=X,We.method=H,ke(k)}function me(k,K){return re(k,K,C,_,E,v)}function O(k,K){var H,I,ee,X;if(!k||!k.state||K>u||K<0)return k?V(k,d):d;if(I=k.state,!k.output||!k.input&&k.avail_in!==0||I.status===Le&&K!==s)return V(k,k.avail_out===0?y:d);if(I.strm=k,H=I.last_flush,I.last_flush=K,I.status===pe)if(I.wrap===2)k.adler=0,se(I,31),se(I,139),se(I,8),I.gzhead?(se(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)),se(I,I.gzhead.time&255),se(I,I.gzhead.time>>8&255),se(I,I.gzhead.time>>16&255),se(I,I.gzhead.time>>24&255),se(I,I.level===9?2:I.strategy>=g||I.level<2?4:0),se(I,I.gzhead.os&255),I.gzhead.extra&&I.gzhead.extra.length&&(se(I,I.gzhead.extra.length&255),se(I,I.gzhead.extra.length>>8&255)),I.gzhead.hcrc&&(k.adler=n(k.adler,I.pending_buf,I.pending,0)),I.gzindex=0,I.status=we):(se(I,0),se(I,0),se(I,0),se(I,0),se(I,0),se(I,I.level===9?2:I.strategy>=g||I.level<2?4:0),se(I,P),I.status=Ie);else{var Xe=C+(I.w_bits-8<<4)<<8,We=-1;I.strategy>=g||I.level<2?We=0:I.level<6?We=1:I.level===6?We=2:We=3,Xe|=We<<6,I.strstart!==0&&(Xe|=_e),Xe+=31-Xe%31,I.status=Ie,ge(I,Xe),I.strstart!==0&&(ge(I,k.adler>>>16),ge(I,k.adler&65535)),k.adler=1}if(I.status===we)if(I.gzhead.extra){for(ee=I.pending;I.gzindex<(I.gzhead.extra.length&65535)&&!(I.pending===I.pending_buf_size&&(I.gzhead.hcrc&&I.pending>ee&&(k.adler=n(k.adler,I.pending_buf,I.pending-ee,ee)),ie(k),ee=I.pending,I.pending===I.pending_buf_size));)se(I,I.gzhead.extra[I.gzindex]&255),I.gzindex++;I.gzhead.hcrc&&I.pending>ee&&(k.adler=n(k.adler,I.pending_buf,I.pending-ee,ee)),I.gzindex===I.gzhead.extra.length&&(I.gzindex=0,I.status=ve)}else I.status=ve;if(I.status===ve)if(I.gzhead.name){ee=I.pending;do{if(I.pending===I.pending_buf_size&&(I.gzhead.hcrc&&I.pending>ee&&(k.adler=n(k.adler,I.pending_buf,I.pending-ee,ee)),ie(k),ee=I.pending,I.pending===I.pending_buf_size)){X=1;break}I.gzindex<I.gzhead.name.length?X=I.gzhead.name.charCodeAt(I.gzindex++)&255:X=0,se(I,X)}while(X!==0);I.gzhead.hcrc&&I.pending>ee&&(k.adler=n(k.adler,I.pending_buf,I.pending-ee,ee)),X===0&&(I.gzindex=0,I.status=Te)}else I.status=Te;if(I.status===Te)if(I.gzhead.comment){ee=I.pending;do{if(I.pending===I.pending_buf_size&&(I.gzhead.hcrc&&I.pending>ee&&(k.adler=n(k.adler,I.pending_buf,I.pending-ee,ee)),ie(k),ee=I.pending,I.pending===I.pending_buf_size)){X=1;break}I.gzindex<I.gzhead.comment.length?X=I.gzhead.comment.charCodeAt(I.gzindex++)&255:X=0,se(I,X)}while(X!==0);I.gzhead.hcrc&&I.pending>ee&&(k.adler=n(k.adler,I.pending_buf,I.pending-ee,ee)),X===0&&(I.status=Se)}else I.status=Se;if(I.status===Se&&(I.gzhead.hcrc?(I.pending+2>I.pending_buf_size&&ie(k),I.pending+2<=I.pending_buf_size&&(se(I,k.adler&255),se(I,k.adler>>8&255),k.adler=0,I.status=Ie)):I.status=Ie),I.pending!==0){if(ie(k),k.avail_out===0)return I.last_flush=-1,c}else if(k.avail_in===0&&fe(K)<=fe(H)&&K!==s)return V(k,y);if(I.status===Le&&k.avail_in!==0)return V(k,y);if(k.avail_in!==0||I.lookahead!==0||K!==i&&I.status!==Le){var tt=I.strategy===g?ct(I,K):I.strategy===m?it(I,K):wt[I.level].func(I,K);if((tt===be||tt===ye)&&(I.status=Le),tt===Ee||tt===be)return k.avail_out===0&&(I.last_flush=-1),c;if(tt===Be&&(K===o?t._tr_align(I):K!==u&&(t._tr_stored_block(I,0,0,!1),K===l&&(de(I.head),I.lookahead===0&&(I.strstart=0,I.block_start=0,I.insert=0))),ie(k),k.avail_out===0))return I.last_flush=-1,c}return K!==s?c:I.wrap<=0?f:(I.wrap===2?(se(I,k.adler&255),se(I,k.adler>>8&255),se(I,k.adler>>16&255),se(I,k.adler>>24&255),se(I,k.total_in&255),se(I,k.total_in>>8&255),se(I,k.total_in>>16&255),se(I,k.total_in>>24&255)):(ge(I,k.adler>>>16),ge(I,k.adler&65535)),ie(k),I.wrap>0&&(I.wrap=-I.wrap),I.pending!==0?c:f)}function Fe(k){var K;return!k||!k.state?d:(K=k.state.status,K!==pe&&K!==we&&K!==ve&&K!==Te&&K!==Se&&K!==Ie&&K!==Le?V(k,d):(k.state=null,K===Ie?V(k,h):c))}function gt(k,K){var H=K.length,I,ee,X,Xe,We,tt,At,fn;if(!k||!k.state||(I=k.state,Xe=I.wrap,Xe===2||Xe===1&&I.status!==pe||I.lookahead))return d;for(Xe===1&&(k.adler=r(k.adler,K,H,0)),I.wrap=0,H>=I.w_size&&(Xe===0&&(de(I.head),I.strstart=0,I.block_start=0,I.insert=0),fn=new e.Buf8(I.w_size),e.arraySet(fn,K,H-I.w_size,I.w_size,0),K=fn,H=I.w_size),We=k.avail_in,tt=k.next_in,At=k.input,k.avail_in=H,k.next_in=0,k.input=K,Ve(I);I.lookahead>=Z;){ee=I.strstart,X=I.lookahead-(Z-1);do I.ins_h=(I.ins_h<<I.hash_shift^I.window[ee+Z-1])&I.hash_mask,I.prev[ee&I.w_mask]=I.head[I.ins_h],I.head[I.ins_h]=ee,ee++;while(--X);I.strstart=ee,I.lookahead=Z-1,Ve(I)}return I.strstart+=I.lookahead,I.block_start=I.strstart,I.insert=I.lookahead,I.lookahead=0,I.match_length=I.prev_length=Z-1,I.match_available=0,k.next_in=tt,k.input=At,k.avail_in=We,I.wrap=Xe,c}return Wn.deflateInit=me,Wn.deflateInit2=re,Wn.deflateReset=ke,Wn.deflateResetKeep=ue,Wn.deflateSetHeader=ze,Wn.deflate=O,Wn.deflateEnd=Fe,Wn.deflateSetDictionary=gt,Wn.deflateInfo="pako deflate (from Nodeca project)",Wn}var Ui={},fm;function dm(){if(fm)return Ui;fm=1;var e=vi(),t=!0,r=!0;try{String.fromCharCode.apply(null,[0])}catch{t=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{r=!1}for(var n=new e.Buf8(256),a=0;a<256;a++)n[a]=a>=252?6:a>=248?5:a>=240?4:a>=224?3:a>=192?2:1;n[254]=n[254]=1,Ui.string2buf=function(o){var l,s,u,c,f,d=o.length,h=0;for(c=0;c<d;c++)s=o.charCodeAt(c),(s&64512)===55296&&c+1<d&&(u=o.charCodeAt(c+1),(u&64512)===56320&&(s=65536+(s-55296<<10)+(u-56320),c++)),h+=s<128?1:s<2048?2:s<65536?3:4;for(l=new e.Buf8(h),f=0,c=0;f<h;c++)s=o.charCodeAt(c),(s&64512)===55296&&c+1<d&&(u=o.charCodeAt(c+1),(u&64512)===56320&&(s=65536+(s-55296<<10)+(u-56320),c++)),s<128?l[f++]=s:s<2048?(l[f++]=192|s>>>6,l[f++]=128|s&63):s<65536?(l[f++]=224|s>>>12,l[f++]=128|s>>>6&63,l[f++]=128|s&63):(l[f++]=240|s>>>18,l[f++]=128|s>>>12&63,l[f++]=128|s>>>6&63,l[f++]=128|s&63);return l};function i(o,l){if(l<65534&&(o.subarray&&r||!o.subarray&&t))return String.fromCharCode.apply(null,e.shrinkBuf(o,l));for(var s="",u=0;u<l;u++)s+=String.fromCharCode(o[u]);return s}return Ui.buf2binstring=function(o){return i(o,o.length)},Ui.binstring2buf=function(o){for(var l=new e.Buf8(o.length),s=0,u=l.length;s<u;s++)l[s]=o.charCodeAt(s);return l},Ui.buf2string=function(o,l){var s,u,c,f,d=l||o.length,h=new Array(d*2);for(u=0,s=0;s<d;){if(c=o[s++],c<128){h[u++]=c;continue}if(f=n[c],f>4){h[u++]=65533,s+=f-1;continue}for(c&=f===2?31:f===3?15:7;f>1&&s<d;)c=c<<6|o[s++]&63,f--;if(f>1){h[u++]=65533;continue}c<65536?h[u++]=c:(c-=65536,h[u++]=55296|c>>10&1023,h[u++]=56320|c&1023)}return i(h,u)},Ui.utf8border=function(o,l){var s;for(l=l||o.length,l>o.length&&(l=o.length),s=l-1;s>=0&&(o[s]&192)===128;)s--;return s<0||s===0?l:s+n[o[s]]>l?s:l},Ui}var gf,hm;function pm(){if(hm)return gf;hm=1;function e(){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}return gf=e,gf}var vm;function _S(){if(vm)return Ao;vm=1;var e=xS(),t=vi(),r=dm(),n=mf(),a=pm(),i=Object.prototype.toString,o=0,l=4,s=0,u=1,c=2,f=-1,d=0,h=8;function y(m){if(!(this instanceof y))return new y(m);this.options=t.assign({level:f,method:h,chunkSize:16384,windowBits:15,memLevel:8,strategy:d,to:""},m||{});var b=this.options;b.raw&&b.windowBits>0?b.windowBits=-b.windowBits:b.gzip&&b.windowBits>0&&b.windowBits<16&&(b.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var v=e.deflateInit2(this.strm,b.level,b.method,b.windowBits,b.memLevel,b.strategy);if(v!==s)throw new Error(n[v]);if(b.header&&e.deflateSetHeader(this.strm,b.header),b.dictionary){var S;if(typeof b.dictionary=="string"?S=r.string2buf(b.dictionary):i.call(b.dictionary)==="[object ArrayBuffer]"?S=new Uint8Array(b.dictionary):S=b.dictionary,v=e.deflateSetDictionary(this.strm,S),v!==s)throw new Error(n[v]);this._dict_set=!0}}y.prototype.push=function(m,b){var v=this.strm,S=this.options.chunkSize,C,A;if(this.ended)return!1;A=b===~~b?b:b===!0?l:o,typeof m=="string"?v.input=r.string2buf(m):i.call(m)==="[object ArrayBuffer]"?v.input=new Uint8Array(m):v.input=m,v.next_in=0,v.avail_in=v.input.length;do{if(v.avail_out===0&&(v.output=new t.Buf8(S),v.next_out=0,v.avail_out=S),C=e.deflate(v,A),C!==u&&C!==s)return this.onEnd(C),this.ended=!0,!1;(v.avail_out===0||v.avail_in===0&&(A===l||A===c))&&(this.options.to==="string"?this.onData(r.buf2binstring(t.shrinkBuf(v.output,v.next_out))):this.onData(t.shrinkBuf(v.output,v.next_out)))}while((v.avail_in>0||v.avail_out===0)&&C!==u);return A===l?(C=e.deflateEnd(this.strm),this.onEnd(C),this.ended=!0,C===s):(A===c&&(this.onEnd(s),v.avail_out=0),!0)},y.prototype.onData=function(m){this.chunks.push(m)},y.prototype.onEnd=function(m){m===s&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=t.flattenChunks(this.chunks)),this.chunks=[],this.err=m,this.msg=this.strm.msg};function p(m,b){var v=new y(b);if(v.push(m,!0),v.err)throw v.msg||n[v.err];return v.result}function x(m,b){return b=b||{},b.raw=!0,p(m,b)}function g(m,b){return b=b||{},b.gzip=!0,p(m,b)}return Ao.Deflate=y,Ao.deflate=p,Ao.deflateRaw=x,Ao.gzip=g,Ao}var Eo={},On={},bf,mm;function wS(){if(mm)return bf;mm=1;var e=30,t=12;return bf=function(n,a){var i,o,l,s,u,c,f,d,h,y,p,x,g,m,b,v,S,C,A,_,E,M,z,N,R;i=n.state,o=n.next_in,N=n.input,l=o+(n.avail_in-5),s=n.next_out,R=n.output,u=s-(a-n.avail_out),c=s+(n.avail_out-257),f=i.dmax,d=i.wsize,h=i.whave,y=i.wnext,p=i.window,x=i.hold,g=i.bits,m=i.lencode,b=i.distcode,v=(1<<i.lenbits)-1,S=(1<<i.distbits)-1;e:do{g<15&&(x+=N[o++]<<g,g+=8,x+=N[o++]<<g,g+=8),C=m[x&v];t:for(;;){if(A=C>>>24,x>>>=A,g-=A,A=C>>>16&255,A===0)R[s++]=C&65535;else if(A&16){_=C&65535,A&=15,A&&(g<A&&(x+=N[o++]<<g,g+=8),_+=x&(1<<A)-1,x>>>=A,g-=A),g<15&&(x+=N[o++]<<g,g+=8,x+=N[o++]<<g,g+=8),C=b[x&S];r:for(;;){if(A=C>>>24,x>>>=A,g-=A,A=C>>>16&255,A&16){if(E=C&65535,A&=15,g<A&&(x+=N[o++]<<g,g+=8,g<A&&(x+=N[o++]<<g,g+=8)),E+=x&(1<<A)-1,E>f){n.msg="invalid distance too far back",i.mode=e;break e}if(x>>>=A,g-=A,A=s-u,E>A){if(A=E-A,A>h&&i.sane){n.msg="invalid distance too far back",i.mode=e;break e}if(M=0,z=p,y===0){if(M+=d-A,A<_){_-=A;do R[s++]=p[M++];while(--A);M=s-E,z=R}}else if(y<A){if(M+=d+y-A,A-=y,A<_){_-=A;do R[s++]=p[M++];while(--A);if(M=0,y<_){A=y,_-=A;do R[s++]=p[M++];while(--A);M=s-E,z=R}}}else if(M+=y-A,A<_){_-=A;do R[s++]=p[M++];while(--A);M=s-E,z=R}for(;_>2;)R[s++]=z[M++],R[s++]=z[M++],R[s++]=z[M++],_-=3;_&&(R[s++]=z[M++],_>1&&(R[s++]=z[M++]))}else{M=s-E;do R[s++]=R[M++],R[s++]=R[M++],R[s++]=R[M++],_-=3;while(_>2);_&&(R[s++]=R[M++],_>1&&(R[s++]=R[M++]))}}else if(A&64){n.msg="invalid distance code",i.mode=e;break e}else{C=b[(C&65535)+(x&(1<<A)-1)];continue r}break}}else if(A&64)if(A&32){i.mode=t;break e}else{n.msg="invalid literal/length code",i.mode=e;break e}else{C=m[(C&65535)+(x&(1<<A)-1)];continue t}break}}while(o<l&&s<c);_=g>>3,o-=_,g-=_<<3,x&=(1<<g)-1,n.next_in=o,n.next_out=s,n.avail_in=o<l?5+(l-o):5-(o-l),n.avail_out=s<c?257+(c-s):257-(s-c),i.hold=x,i.bits=g},bf}var yf,gm;function kS(){if(gm)return yf;gm=1;var e=vi(),t=15,r=852,n=592,a=0,i=1,o=2,l=[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],s=[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],u=[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],c=[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];return yf=function(d,h,y,p,x,g,m,b){var v=b.bits,S=0,C=0,A=0,_=0,E=0,M=0,z=0,N=0,R=0,$=0,q,W,Z,te,ne,_e=null,pe=0,we,ve=new e.Buf16(t+1),Te=new e.Buf16(t+1),Se=null,Ie=0,Le,Ee,Be;for(S=0;S<=t;S++)ve[S]=0;for(C=0;C<p;C++)ve[h[y+C]]++;for(E=v,_=t;_>=1&&ve[_]===0;_--);if(E>_&&(E=_),_===0)return x[g++]=1<<24|64<<16|0,x[g++]=1<<24|64<<16|0,b.bits=1,0;for(A=1;A<_&&ve[A]===0;A++);for(E<A&&(E=A),N=1,S=1;S<=t;S++)if(N<<=1,N-=ve[S],N<0)return-1;if(N>0&&(d===a||_!==1))return-1;for(Te[1]=0,S=1;S<t;S++)Te[S+1]=Te[S]+ve[S];for(C=0;C<p;C++)h[y+C]!==0&&(m[Te[h[y+C]]++]=C);if(d===a?(_e=Se=m,we=19):d===i?(_e=l,pe-=257,Se=s,Ie-=257,we=256):(_e=u,Se=c,we=-1),$=0,C=0,S=A,ne=g,M=E,z=0,Z=-1,R=1<<E,te=R-1,d===i&&R>r||d===o&&R>n)return 1;for(;;){Le=S-z,m[C]<we?(Ee=0,Be=m[C]):m[C]>we?(Ee=Se[Ie+m[C]],Be=_e[pe+m[C]]):(Ee=96,Be=0),q=1<<S-z,W=1<<M,A=W;do W-=q,x[ne+($>>z)+W]=Le<<24|Ee<<16|Be|0;while(W!==0);for(q=1<<S-1;$&q;)q>>=1;if(q!==0?($&=q-1,$+=q):$=0,C++,--ve[S]===0){if(S===_)break;S=h[y+m[C]]}if(S>E&&($&te)!==Z){for(z===0&&(z=E),ne+=A,M=S-z,N=1<<M;M+z<_&&(N-=ve[M+z],!(N<=0));)M++,N<<=1;if(R+=1<<M,d===i&&R>r||d===o&&R>n)return 1;Z=$&te,x[Z]=E<<24|M<<16|ne-g|0}}return $!==0&&(x[ne+$]=S-z<<24|64<<16|0),b.bits=E,0},yf}var bm;function SS(){if(bm)return On;bm=1;var e=vi(),t=om(),r=sm(),n=wS(),a=kS(),i=0,o=1,l=2,s=4,u=5,c=6,f=0,d=1,h=2,y=-2,p=-3,x=-4,g=-5,m=8,b=1,v=2,S=3,C=4,A=5,_=6,E=7,M=8,z=9,N=10,R=11,$=12,q=13,W=14,Z=15,te=16,ne=17,_e=18,pe=19,we=20,ve=21,Te=22,Se=23,Ie=24,Le=25,Ee=26,Be=27,be=28,ye=29,P=30,V=31,fe=32,de=852,ie=592,oe=15,se=oe;function ge(re){return(re>>>24&255)+(re>>>8&65280)+((re&65280)<<8)+((re&255)<<24)}function Ce(){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 e.Buf16(320),this.work=new e.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function xe(re){var me;return!re||!re.state?y:(me=re.state,re.total_in=re.total_out=me.total=0,re.msg="",me.wrap&&(re.adler=me.wrap&1),me.mode=b,me.last=0,me.havedict=0,me.dmax=32768,me.head=null,me.hold=0,me.bits=0,me.lencode=me.lendyn=new e.Buf32(de),me.distcode=me.distdyn=new e.Buf32(ie),me.sane=1,me.back=-1,f)}function Ve(re){var me;return!re||!re.state?y:(me=re.state,me.wsize=0,me.whave=0,me.wnext=0,xe(re))}function Ue(re,me){var O,Fe;return!re||!re.state||(Fe=re.state,me<0?(O=0,me=-me):(O=(me>>4)+1,me<48&&(me&=15)),me&&(me<8||me>15))?y:(Fe.window!==null&&Fe.wbits!==me&&(Fe.window=null),Fe.wrap=O,Fe.wbits=me,Ve(re))}function Ne(re,me){var O,Fe;return re?(Fe=new Ce,re.state=Fe,Fe.window=null,O=Ue(re,me),O!==f&&(re.state=null),O):y}function qe(re){return Ne(re,se)}var it=!0,ct,ot;function wt(re){if(it){var me;for(ct=new e.Buf32(512),ot=new e.Buf32(32),me=0;me<144;)re.lens[me++]=8;for(;me<256;)re.lens[me++]=9;for(;me<280;)re.lens[me++]=7;for(;me<288;)re.lens[me++]=8;for(a(o,re.lens,0,288,ct,0,re.work,{bits:9}),me=0;me<32;)re.lens[me++]=5;a(l,re.lens,0,32,ot,0,re.work,{bits:5}),it=!1}re.lencode=ct,re.lenbits=9,re.distcode=ot,re.distbits=5}function Me(re,me,O,Fe){var gt,k=re.state;return k.window===null&&(k.wsize=1<<k.wbits,k.wnext=0,k.whave=0,k.window=new e.Buf8(k.wsize)),Fe>=k.wsize?(e.arraySet(k.window,me,O-k.wsize,k.wsize,0),k.wnext=0,k.whave=k.wsize):(gt=k.wsize-k.wnext,gt>Fe&&(gt=Fe),e.arraySet(k.window,me,O-Fe,gt,k.wnext),Fe-=gt,Fe?(e.arraySet(k.window,me,O-Fe,Fe,0),k.wnext=Fe,k.whave=k.wsize):(k.wnext+=gt,k.wnext===k.wsize&&(k.wnext=0),k.whave<k.wsize&&(k.whave+=gt))),0}function D(re,me){var O,Fe,gt,k,K,H,I,ee,X,Xe,We,tt,At,fn,Jt=0,zt,mr,Fr,Ur,el,ra,hr,dn,Ar=new e.Buf8(4),Un,Hn,Ei=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!re||!re.state||!re.output||!re.input&&re.avail_in!==0)return y;O=re.state,O.mode===$&&(O.mode=q),K=re.next_out,gt=re.output,I=re.avail_out,k=re.next_in,Fe=re.input,H=re.avail_in,ee=O.hold,X=O.bits,Xe=H,We=I,dn=f;e:for(;;)switch(O.mode){case b:if(O.wrap===0){O.mode=q;break}for(;X<16;){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}if(O.wrap&2&&ee===35615){O.check=0,Ar[0]=ee&255,Ar[1]=ee>>>8&255,O.check=r(O.check,Ar,2,0),ee=0,X=0,O.mode=v;break}if(O.flags=0,O.head&&(O.head.done=!1),!(O.wrap&1)||(((ee&255)<<8)+(ee>>8))%31){re.msg="incorrect header check",O.mode=P;break}if((ee&15)!==m){re.msg="unknown compression method",O.mode=P;break}if(ee>>>=4,X-=4,hr=(ee&15)+8,O.wbits===0)O.wbits=hr;else if(hr>O.wbits){re.msg="invalid window size",O.mode=P;break}O.dmax=1<<hr,re.adler=O.check=1,O.mode=ee&512?N:$,ee=0,X=0;break;case v:for(;X<16;){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}if(O.flags=ee,(O.flags&255)!==m){re.msg="unknown compression method",O.mode=P;break}if(O.flags&57344){re.msg="unknown header flags set",O.mode=P;break}O.head&&(O.head.text=ee>>8&1),O.flags&512&&(Ar[0]=ee&255,Ar[1]=ee>>>8&255,O.check=r(O.check,Ar,2,0)),ee=0,X=0,O.mode=S;case S:for(;X<32;){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}O.head&&(O.head.time=ee),O.flags&512&&(Ar[0]=ee&255,Ar[1]=ee>>>8&255,Ar[2]=ee>>>16&255,Ar[3]=ee>>>24&255,O.check=r(O.check,Ar,4,0)),ee=0,X=0,O.mode=C;case C:for(;X<16;){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}O.head&&(O.head.xflags=ee&255,O.head.os=ee>>8),O.flags&512&&(Ar[0]=ee&255,Ar[1]=ee>>>8&255,O.check=r(O.check,Ar,2,0)),ee=0,X=0,O.mode=A;case A:if(O.flags&1024){for(;X<16;){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}O.length=ee,O.head&&(O.head.extra_len=ee),O.flags&512&&(Ar[0]=ee&255,Ar[1]=ee>>>8&255,O.check=r(O.check,Ar,2,0)),ee=0,X=0}else O.head&&(O.head.extra=null);O.mode=_;case _:if(O.flags&1024&&(tt=O.length,tt>H&&(tt=H),tt&&(O.head&&(hr=O.head.extra_len-O.length,O.head.extra||(O.head.extra=new Array(O.head.extra_len)),e.arraySet(O.head.extra,Fe,k,tt,hr)),O.flags&512&&(O.check=r(O.check,Fe,tt,k)),H-=tt,k+=tt,O.length-=tt),O.length))break e;O.length=0,O.mode=E;case E:if(O.flags&2048){if(H===0)break e;tt=0;do hr=Fe[k+tt++],O.head&&hr&&O.length<65536&&(O.head.name+=String.fromCharCode(hr));while(hr&&tt<H);if(O.flags&512&&(O.check=r(O.check,Fe,tt,k)),H-=tt,k+=tt,hr)break e}else O.head&&(O.head.name=null);O.length=0,O.mode=M;case M:if(O.flags&4096){if(H===0)break e;tt=0;do hr=Fe[k+tt++],O.head&&hr&&O.length<65536&&(O.head.comment+=String.fromCharCode(hr));while(hr&&tt<H);if(O.flags&512&&(O.check=r(O.check,Fe,tt,k)),H-=tt,k+=tt,hr)break e}else O.head&&(O.head.comment=null);O.mode=z;case z:if(O.flags&512){for(;X<16;){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}if(ee!==(O.check&65535)){re.msg="header crc mismatch",O.mode=P;break}ee=0,X=0}O.head&&(O.head.hcrc=O.flags>>9&1,O.head.done=!0),re.adler=O.check=0,O.mode=$;break;case N:for(;X<32;){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}re.adler=O.check=ge(ee),ee=0,X=0,O.mode=R;case R:if(O.havedict===0)return re.next_out=K,re.avail_out=I,re.next_in=k,re.avail_in=H,O.hold=ee,O.bits=X,h;re.adler=O.check=1,O.mode=$;case $:if(me===u||me===c)break e;case q:if(O.last){ee>>>=X&7,X-=X&7,O.mode=Be;break}for(;X<3;){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}switch(O.last=ee&1,ee>>>=1,X-=1,ee&3){case 0:O.mode=W;break;case 1:if(wt(O),O.mode=we,me===c){ee>>>=2,X-=2;break e}break;case 2:O.mode=ne;break;case 3:re.msg="invalid block type",O.mode=P}ee>>>=2,X-=2;break;case W:for(ee>>>=X&7,X-=X&7;X<32;){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}if((ee&65535)!==(ee>>>16^65535)){re.msg="invalid stored block lengths",O.mode=P;break}if(O.length=ee&65535,ee=0,X=0,O.mode=Z,me===c)break e;case Z:O.mode=te;case te:if(tt=O.length,tt){if(tt>H&&(tt=H),tt>I&&(tt=I),tt===0)break e;e.arraySet(gt,Fe,k,tt,K),H-=tt,k+=tt,I-=tt,K+=tt,O.length-=tt;break}O.mode=$;break;case ne:for(;X<14;){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}if(O.nlen=(ee&31)+257,ee>>>=5,X-=5,O.ndist=(ee&31)+1,ee>>>=5,X-=5,O.ncode=(ee&15)+4,ee>>>=4,X-=4,O.nlen>286||O.ndist>30){re.msg="too many length or distance symbols",O.mode=P;break}O.have=0,O.mode=_e;case _e:for(;O.have<O.ncode;){for(;X<3;){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}O.lens[Ei[O.have++]]=ee&7,ee>>>=3,X-=3}for(;O.have<19;)O.lens[Ei[O.have++]]=0;if(O.lencode=O.lendyn,O.lenbits=7,Un={bits:O.lenbits},dn=a(i,O.lens,0,19,O.lencode,0,O.work,Un),O.lenbits=Un.bits,dn){re.msg="invalid code lengths set",O.mode=P;break}O.have=0,O.mode=pe;case pe:for(;O.have<O.nlen+O.ndist;){for(;Jt=O.lencode[ee&(1<<O.lenbits)-1],zt=Jt>>>24,mr=Jt>>>16&255,Fr=Jt&65535,!(zt<=X);){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}if(Fr<16)ee>>>=zt,X-=zt,O.lens[O.have++]=Fr;else{if(Fr===16){for(Hn=zt+2;X<Hn;){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}if(ee>>>=zt,X-=zt,O.have===0){re.msg="invalid bit length repeat",O.mode=P;break}hr=O.lens[O.have-1],tt=3+(ee&3),ee>>>=2,X-=2}else if(Fr===17){for(Hn=zt+3;X<Hn;){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}ee>>>=zt,X-=zt,hr=0,tt=3+(ee&7),ee>>>=3,X-=3}else{for(Hn=zt+7;X<Hn;){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}ee>>>=zt,X-=zt,hr=0,tt=11+(ee&127),ee>>>=7,X-=7}if(O.have+tt>O.nlen+O.ndist){re.msg="invalid bit length repeat",O.mode=P;break}for(;tt--;)O.lens[O.have++]=hr}}if(O.mode===P)break;if(O.lens[256]===0){re.msg="invalid code -- missing end-of-block",O.mode=P;break}if(O.lenbits=9,Un={bits:O.lenbits},dn=a(o,O.lens,0,O.nlen,O.lencode,0,O.work,Un),O.lenbits=Un.bits,dn){re.msg="invalid literal/lengths set",O.mode=P;break}if(O.distbits=6,O.distcode=O.distdyn,Un={bits:O.distbits},dn=a(l,O.lens,O.nlen,O.ndist,O.distcode,0,O.work,Un),O.distbits=Un.bits,dn){re.msg="invalid distances set",O.mode=P;break}if(O.mode=we,me===c)break e;case we:O.mode=ve;case ve:if(H>=6&&I>=258){re.next_out=K,re.avail_out=I,re.next_in=k,re.avail_in=H,O.hold=ee,O.bits=X,n(re,We),K=re.next_out,gt=re.output,I=re.avail_out,k=re.next_in,Fe=re.input,H=re.avail_in,ee=O.hold,X=O.bits,O.mode===$&&(O.back=-1);break}for(O.back=0;Jt=O.lencode[ee&(1<<O.lenbits)-1],zt=Jt>>>24,mr=Jt>>>16&255,Fr=Jt&65535,!(zt<=X);){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}if(mr&&!(mr&240)){for(Ur=zt,el=mr,ra=Fr;Jt=O.lencode[ra+((ee&(1<<Ur+el)-1)>>Ur)],zt=Jt>>>24,mr=Jt>>>16&255,Fr=Jt&65535,!(Ur+zt<=X);){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}ee>>>=Ur,X-=Ur,O.back+=Ur}if(ee>>>=zt,X-=zt,O.back+=zt,O.length=Fr,mr===0){O.mode=Ee;break}if(mr&32){O.back=-1,O.mode=$;break}if(mr&64){re.msg="invalid literal/length code",O.mode=P;break}O.extra=mr&15,O.mode=Te;case Te:if(O.extra){for(Hn=O.extra;X<Hn;){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}O.length+=ee&(1<<O.extra)-1,ee>>>=O.extra,X-=O.extra,O.back+=O.extra}O.was=O.length,O.mode=Se;case Se:for(;Jt=O.distcode[ee&(1<<O.distbits)-1],zt=Jt>>>24,mr=Jt>>>16&255,Fr=Jt&65535,!(zt<=X);){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}if(!(mr&240)){for(Ur=zt,el=mr,ra=Fr;Jt=O.distcode[ra+((ee&(1<<Ur+el)-1)>>Ur)],zt=Jt>>>24,mr=Jt>>>16&255,Fr=Jt&65535,!(Ur+zt<=X);){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}ee>>>=Ur,X-=Ur,O.back+=Ur}if(ee>>>=zt,X-=zt,O.back+=zt,mr&64){re.msg="invalid distance code",O.mode=P;break}O.offset=Fr,O.extra=mr&15,O.mode=Ie;case Ie:if(O.extra){for(Hn=O.extra;X<Hn;){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}O.offset+=ee&(1<<O.extra)-1,ee>>>=O.extra,X-=O.extra,O.back+=O.extra}if(O.offset>O.dmax){re.msg="invalid distance too far back",O.mode=P;break}O.mode=Le;case Le:if(I===0)break e;if(tt=We-I,O.offset>tt){if(tt=O.offset-tt,tt>O.whave&&O.sane){re.msg="invalid distance too far back",O.mode=P;break}tt>O.wnext?(tt-=O.wnext,At=O.wsize-tt):At=O.wnext-tt,tt>O.length&&(tt=O.length),fn=O.window}else fn=gt,At=K-O.offset,tt=O.length;tt>I&&(tt=I),I-=tt,O.length-=tt;do gt[K++]=fn[At++];while(--tt);O.length===0&&(O.mode=ve);break;case Ee:if(I===0)break e;gt[K++]=O.length,I--,O.mode=ve;break;case Be:if(O.wrap){for(;X<32;){if(H===0)break e;H--,ee|=Fe[k++]<<X,X+=8}if(We-=I,re.total_out+=We,O.total+=We,We&&(re.adler=O.check=O.flags?r(O.check,gt,We,K-We):t(O.check,gt,We,K-We)),We=I,(O.flags?ee:ge(ee))!==O.check){re.msg="incorrect data check",O.mode=P;break}ee=0,X=0}O.mode=be;case be:if(O.wrap&&O.flags){for(;X<32;){if(H===0)break e;H--,ee+=Fe[k++]<<X,X+=8}if(ee!==(O.total&4294967295)){re.msg="incorrect length check",O.mode=P;break}ee=0,X=0}O.mode=ye;case ye:dn=d;break e;case P:dn=p;break e;case V:return x;case fe:default:return y}return re.next_out=K,re.avail_out=I,re.next_in=k,re.avail_in=H,O.hold=ee,O.bits=X,(O.wsize||We!==re.avail_out&&O.mode<P&&(O.mode<Be||me!==s))&&Me(re,re.output,re.next_out,We-re.avail_out),Xe-=re.avail_in,We-=re.avail_out,re.total_in+=Xe,re.total_out+=We,O.total+=We,O.wrap&&We&&(re.adler=O.check=O.flags?r(O.check,gt,We,re.next_out-We):t(O.check,gt,We,re.next_out-We)),re.data_type=O.bits+(O.last?64:0)+(O.mode===$?128:0)+(O.mode===we||O.mode===Z?256:0),(Xe===0&&We===0||me===s)&&dn===f&&(dn=g),dn}function ue(re){if(!re||!re.state)return y;var me=re.state;return me.window&&(me.window=null),re.state=null,f}function ke(re,me){var O;return!re||!re.state||(O=re.state,!(O.wrap&2))?y:(O.head=me,me.done=!1,f)}function ze(re,me){var O=me.length,Fe,gt,k;return!re||!re.state||(Fe=re.state,Fe.wrap!==0&&Fe.mode!==R)?y:Fe.mode===R&&(gt=1,gt=t(gt,me,O,0),gt!==Fe.check)?p:(k=Me(re,me,O,O),k?(Fe.mode=V,x):(Fe.havedict=1,f))}return On.inflateReset=Ve,On.inflateReset2=Ue,On.inflateResetKeep=xe,On.inflateInit=qe,On.inflateInit2=Ne,On.inflate=D,On.inflateEnd=ue,On.inflateGetHeader=ke,On.inflateSetDictionary=ze,On.inflateInfo="pako inflate (from Nodeca project)",On}var xf,ym;function xm(){return ym||(ym=1,xf={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}),xf}var _f,_m;function CS(){if(_m)return _f;_m=1;function e(){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}return _f=e,_f}var wm;function AS(){if(wm)return Eo;wm=1;var e=SS(),t=vi(),r=dm(),n=xm(),a=mf(),i=pm(),o=CS(),l=Object.prototype.toString;function s(f){if(!(this instanceof s))return new s(f);this.options=t.assign({chunkSize:16384,windowBits:0,to:""},f||{});var d=this.options;d.raw&&d.windowBits>=0&&d.windowBits<16&&(d.windowBits=-d.windowBits,d.windowBits===0&&(d.windowBits=-15)),d.windowBits>=0&&d.windowBits<16&&!(f&&f.windowBits)&&(d.windowBits+=32),d.windowBits>15&&d.windowBits<48&&(d.windowBits&15||(d.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new i,this.strm.avail_out=0;var h=e.inflateInit2(this.strm,d.windowBits);if(h!==n.Z_OK)throw new Error(a[h]);if(this.header=new o,e.inflateGetHeader(this.strm,this.header),d.dictionary&&(typeof d.dictionary=="string"?d.dictionary=r.string2buf(d.dictionary):l.call(d.dictionary)==="[object ArrayBuffer]"&&(d.dictionary=new Uint8Array(d.dictionary)),d.raw&&(h=e.inflateSetDictionary(this.strm,d.dictionary),h!==n.Z_OK)))throw new Error(a[h])}s.prototype.push=function(f,d){var h=this.strm,y=this.options.chunkSize,p=this.options.dictionary,x,g,m,b,v,S=!1;if(this.ended)return!1;g=d===~~d?d:d===!0?n.Z_FINISH:n.Z_NO_FLUSH,typeof f=="string"?h.input=r.binstring2buf(f):l.call(f)==="[object ArrayBuffer]"?h.input=new Uint8Array(f):h.input=f,h.next_in=0,h.avail_in=h.input.length;do{if(h.avail_out===0&&(h.output=new t.Buf8(y),h.next_out=0,h.avail_out=y),x=e.inflate(h,n.Z_NO_FLUSH),x===n.Z_NEED_DICT&&p&&(x=e.inflateSetDictionary(this.strm,p)),x===n.Z_BUF_ERROR&&S===!0&&(x=n.Z_OK,S=!1),x!==n.Z_STREAM_END&&x!==n.Z_OK)return this.onEnd(x),this.ended=!0,!1;h.next_out&&(h.avail_out===0||x===n.Z_STREAM_END||h.avail_in===0&&(g===n.Z_FINISH||g===n.Z_SYNC_FLUSH))&&(this.options.to==="string"?(m=r.utf8border(h.output,h.next_out),b=h.next_out-m,v=r.buf2string(h.output,m),h.next_out=b,h.avail_out=y-b,b&&t.arraySet(h.output,h.output,m,b,0),this.onData(v)):this.onData(t.shrinkBuf(h.output,h.next_out))),h.avail_in===0&&h.avail_out===0&&(S=!0)}while((h.avail_in>0||h.avail_out===0)&&x!==n.Z_STREAM_END);return x===n.Z_STREAM_END&&(g=n.Z_FINISH),g===n.Z_FINISH?(x=e.inflateEnd(this.strm),this.onEnd(x),this.ended=!0,x===n.Z_OK):(g===n.Z_SYNC_FLUSH&&(this.onEnd(n.Z_OK),h.avail_out=0),!0)},s.prototype.onData=function(f){this.chunks.push(f)},s.prototype.onEnd=function(f){f===n.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=t.flattenChunks(this.chunks)),this.chunks=[],this.err=f,this.msg=this.strm.msg};function u(f,d){var h=new s(d);if(h.push(f,!0),h.err)throw h.msg||a[h.err];return h.result}function c(f,d){return d=d||{},d.raw=!0,u(f,d)}return Eo.Inflate=s,Eo.inflate=u,Eo.inflateRaw=c,Eo.ungzip=u,Eo}var wf,km;function ES(){if(km)return wf;km=1;var e=vi().assign,t=_S(),r=AS(),n=xm(),a={};return e(a,t,r,n),wf=a,wf}(function(e){(function(){var t={};e.exports=t;var r;typeof bS=="function"?r=ES():r=self.pako;function n(){typeof process>"u"&&console.log.apply(console,arguments)}(function(a,i){(function(){var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},l=function(){function u(c){this.message="JPEG error: "+c}return u.prototype=Error(),u.prototype.name="JpegError",u.constructor=u}(),s=function(){function u(c,f){this.message=c,this.g=f}return u.prototype=Error(),u.prototype.name="DNLMarkerError",u.constructor=u}();(function(){function u(){this.M=null,this.B=-1}function c(p,x){for(var g=0,m=[],b,v,S=16;0<S&&!p[S-1];)S--;m.push({children:[],index:0});var C=m[0],A;for(b=0;b<S;b++){for(v=0;v<p[b];v++){for(C=m.pop(),C.children[C.index]=x[g];0<C.index;)C=m.pop();for(C.index++,m.push(C);m.length<=b;)m.push(A={children:[],index:0}),C.children[C.index]=A.children,C=A;g++}b+1<S&&(m.push(A={children:[],index:0}),C.children[C.index]=A.children,C=A)}return m[0].children}function f(p,x,g,m,b,v,S,C,A){function _(){if(0<pe)return pe--,_e>>pe&1;if(_e=p[x++],_e===255){var oe=p[x++];if(oe){if(oe===220&&Z){x+=2;var se=p[x++]<<8|p[x++];if(0<se&&se!==g.g)throw new s("Found DNL marker (0xFFDC) while parsing scan data",se)}throw new l("unexpected marker "+(_e<<8|oe).toString(16))}}return pe=7,_e>>>7}function E(oe){for(;;){if(oe=oe[_()],typeof oe=="number")return oe;if((typeof oe>"u"?"undefined":o(oe))!=="object")throw new l("invalid huffman sequence")}}function M(oe){for(var se=0;0<oe;)se=se<<1|_(),oe--;return se}function z(oe){if(oe===1)return _()===1?1:-1;var se=M(oe);return se>=1<<oe-1?se:se+(-1<<oe)+1}function N(oe,se){var ge=E(oe.D);for(ge=ge===0?0:z(ge),oe.a[se]=oe.m+=ge,ge=1;64>ge;){var Ce=E(oe.o),xe=Ce&15;if(Ce>>=4,xe===0){if(15>Ce)break;ge+=16}else ge+=Ce,oe.a[se+y[ge]]=z(xe),ge++}}function R(oe,se){var ge=E(oe.D);ge=ge===0?0:z(ge)<<A,oe.a[se]=oe.m+=ge}function $(oe,se){oe.a[se]|=_()<<A}function q(oe,se){if(0<we)we--;else for(var ge=v;ge<=S;){var Ce=E(oe.o),xe=Ce&15;if(Ce>>=4,xe===0){if(15>Ce){we=M(Ce)+(1<<Ce)-1;break}ge+=16}else ge+=Ce,oe.a[se+y[ge]]=z(xe)*(1<<A),ge++}}function W(oe,se){for(var ge=v,Ce=0,xe;ge<=S;){xe=se+y[ge];var Ve=0>oe.a[xe]?-1:1;switch(ve){case 0:if(Ce=E(oe.o),xe=Ce&15,Ce>>=4,xe===0)15>Ce?(we=M(Ce)+(1<<Ce),ve=4):(Ce=16,ve=1);else{if(xe!==1)throw new l("invalid ACn encoding");Te=z(xe),ve=Ce?2:3}continue;case 1:case 2:oe.a[xe]?oe.a[xe]+=Ve*(_()<<A):(Ce--,Ce===0&&(ve=ve===2?3:0));break;case 3:oe.a[xe]?oe.a[xe]+=Ve*(_()<<A):(oe.a[xe]=Te<<A,ve=0);break;case 4:oe.a[xe]&&(oe.a[xe]+=Ve*(_()<<A))}ge++}ve===4&&(we--,we===0&&(ve=0))}for(var Z=9<arguments.length&&arguments[9]!==void 0?arguments[9]:!1,te=g.P,ne=x,_e=0,pe=0,we=0,ve=0,Te,Se=m.length,Ie,Le,Ee,Be,be=g.S?v===0?C===0?R:$:C===0?q:W:N,ye=0,P=Se===1?m[0].c*m[0].l:te*g.O,V,fe;ye<P;){var de=b?Math.min(P-ye,b):P;for(Ie=0;Ie<Se;Ie++)m[Ie].m=0;if(we=0,Se===1){var ie=m[0];for(Be=0;Be<de;Be++)be(ie,64*((ie.c+1)*(ye/ie.c|0)+ye%ie.c)),ye++}else for(Be=0;Be<de;Be++){for(Ie=0;Ie<Se;Ie++)for(ie=m[Ie],V=ie.h,fe=ie.j,Le=0;Le<fe;Le++)for(Ee=0;Ee<V;Ee++)be(ie,64*((ie.c+1)*((ye/te|0)*ie.j+Le)+(ye%te*ie.h+Ee)));ye++}if(pe=0,(ie=h(p,x))&&ie.f&&((0,_util.warn)("decodeScan - unexpected MCU data, current marker is: "+ie.f),x=ie.offset),ie=ie&&ie.F,!ie||65280>=ie)throw new l("marker was not found");if(65488<=ie&&65495>=ie)x+=2;else break}return(ie=h(p,x))&&ie.f&&((0,_util.warn)("decodeScan - unexpected Scan data, current marker is: "+ie.f),x=ie.offset),x-ne}function d(p,x){for(var g=x.c,m=x.l,b=new Int16Array(64),v=0;v<m;v++)for(var S=0;S<g;S++){var C=64*((x.c+1)*v+S),A=b,_=x.G,E=x.a;if(!_)throw new l("missing required Quantization Table.");for(var M=0;64>M;M+=8){var z=E[C+M],N=E[C+M+1],R=E[C+M+2],$=E[C+M+3],q=E[C+M+4],W=E[C+M+5],Z=E[C+M+6],te=E[C+M+7];if(z*=_[M],!(N|R|$|q|W|Z|te))z=5793*z+512>>10,A[M]=z,A[M+1]=z,A[M+2]=z,A[M+3]=z,A[M+4]=z,A[M+5]=z,A[M+6]=z,A[M+7]=z;else{N*=_[M+1],R*=_[M+2],$*=_[M+3],q*=_[M+4],W*=_[M+5],Z*=_[M+6],te*=_[M+7];var ne=5793*z+128>>8,_e=5793*q+128>>8,pe=R,we=Z;q=2896*(N-te)+128>>8,te=2896*(N+te)+128>>8,$<<=4,W<<=4,ne=ne+_e+1>>1,_e=ne-_e,z=3784*pe+1567*we+128>>8,pe=1567*pe-3784*we+128>>8,we=z,q=q+W+1>>1,W=q-W,te=te+$+1>>1,$=te-$,ne=ne+we+1>>1,we=ne-we,_e=_e+pe+1>>1,pe=_e-pe,z=2276*q+3406*te+2048>>12,q=3406*q-2276*te+2048>>12,te=z,z=799*$+4017*W+2048>>12,$=4017*$-799*W+2048>>12,W=z,A[M]=ne+te,A[M+7]=ne-te,A[M+1]=_e+W,A[M+6]=_e-W,A[M+2]=pe+$,A[M+5]=pe-$,A[M+3]=we+q,A[M+4]=we-q}}for(_=0;8>_;++_)z=A[_],N=A[_+8],R=A[_+16],$=A[_+24],q=A[_+32],W=A[_+40],Z=A[_+48],te=A[_+56],N|R|$|q|W|Z|te?(ne=5793*z+2048>>12,_e=5793*q+2048>>12,pe=R,we=Z,q=2896*(N-te)+2048>>12,te=2896*(N+te)+2048>>12,ne=(ne+_e+1>>1)+4112,_e=ne-_e,z=3784*pe+1567*we+2048>>12,pe=1567*pe-3784*we+2048>>12,we=z,q=q+W+1>>1,W=q-W,te=te+$+1>>1,$=te-$,ne=ne+we+1>>1,we=ne-we,_e=_e+pe+1>>1,pe=_e-pe,z=2276*q+3406*te+2048>>12,q=3406*q-2276*te+2048>>12,te=z,z=799*$+4017*W+2048>>12,$=4017*$-799*W+2048>>12,W=z,z=ne+te,te=ne-te,N=_e+W,Z=_e-W,R=pe+$,W=pe-$,$=we+q,q=we-q,z=16>z?0:4080<=z?255:z>>4,N=16>N?0:4080<=N?255:N>>4,R=16>R?0:4080<=R?255:R>>4,$=16>$?0:4080<=$?255:$>>4,q=16>q?0:4080<=q?255:q>>4,W=16>W?0:4080<=W?255:W>>4,Z=16>Z?0:4080<=Z?255:Z>>4,te=16>te?0:4080<=te?255:te>>4,E[C+_]=z,E[C+_+8]=N,E[C+_+16]=R,E[C+_+24]=$,E[C+_+32]=q,E[C+_+40]=W,E[C+_+48]=Z,E[C+_+56]=te):(z=5793*z+8192>>14,z=-2040>z?0:2024<=z?255:z+2056>>4,E[C+_]=z,E[C+_+8]=z,E[C+_+16]=z,E[C+_+24]=z,E[C+_+32]=z,E[C+_+40]=z,E[C+_+48]=z,E[C+_+56]=z)}return x.a}function h(p,x){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:x,m=p.length-1;if(g=g<x?g:x,x>=m)return null;var b=p[x]<<8|p[x+1];if(65472<=b&&65534>=b)return{f:null,F:b,offset:x};for(var v=p[g]<<8|p[g+1];!(65472<=v&&65534>=v);){if(++g>=m)return null;v=p[g]<<8|p[g+1]}return{f:b.toString(16),F:v,offset:g}}var y=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]);u.prototype={parse:function(p){function x(){var pe=p[S]<<8|p[S+1];return S+=2,pe}function g(){var pe=x();pe=S+pe-2;var we=h(p,pe,S);return we&&we.f&&((0,_util.warn)("readDataBlock - incorrect length, current marker is: "+we.f),pe=we.offset),pe=p.subarray(S,pe),S+=pe.length,pe}function m(pe){for(var we=Math.ceil(pe.v/8/pe.s),ve=Math.ceil(pe.g/8/pe.u),Te=0;Te<pe.b.length;Te++){ne=pe.b[Te];var Se=Math.ceil(Math.ceil(pe.v/8)*ne.h/pe.s),Ie=Math.ceil(Math.ceil(pe.g/8)*ne.j/pe.u);ne.a=new Int16Array(64*ve*ne.j*(we*ne.h+1)),ne.c=Se,ne.l=Ie}pe.P=we,pe.O=ve}var b=(1<arguments.length&&arguments[1]!==void 0?arguments[1]:{}).N,v=b===void 0?null:b,S=0,C=null,A=0;b=[];var _=[],E=[],M=x();if(M!==65496)throw new l("SOI not found");for(M=x();M!==65497;){switch(M){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var z=g();M===65518&&z[0]===65&&z[1]===100&&z[2]===111&&z[3]===98&&z[4]===101&&(C={version:z[5]<<8|z[6],Y:z[7]<<8|z[8],Z:z[9]<<8|z[10],W:z[11]});break;case 65499:M=x()+S-2;for(var N;S<M;){var R=p[S++],$=new Uint16Array(64);if(R>>4)if(R>>4===1)for(z=0;64>z;z++)N=y[z],$[N]=x();else throw new l("DQT - invalid table spec");else for(z=0;64>z;z++)N=y[z],$[N]=p[S++];b[R&15]=$}break;case 65472:case 65473:case 65474:if(q)throw new l("Only single frame JPEGs supported");x();var q={};for(q.X=M===65473,q.S=M===65474,q.precision=p[S++],M=x(),q.g=v||M,q.v=x(),q.b=[],q.C={},z=p[S++],M=$=R=0;M<z;M++){N=p[S];var W=p[S+1]>>4,Z=p[S+1]&15;R<W&&(R=W),$<Z&&($=Z),W=q.b.push({h:W,j:Z,T:p[S+2],G:null}),q.C[N]=W-1,S+=3}q.s=R,q.u=$,m(q);break;case 65476:for(N=x(),M=2;M<N;){for(R=p[S++],$=new Uint8Array(16),z=W=0;16>z;z++,S++)W+=$[z]=p[S];for(Z=new Uint8Array(W),z=0;z<W;z++,S++)Z[z]=p[S];M+=17+W,(R>>4?_:E)[R&15]=c($,Z)}break;case 65501:x();var te=x();break;case 65498:for(z=++A===1&&!v,x(),R=p[S++],N=[],M=0;M<R;M++){$=q.C[p[S++]];var ne=q.b[$];$=p[S++],ne.D=E[$>>4],ne.o=_[$&15],N.push(ne)}M=p[S++],R=p[S++],$=p[S++];try{var _e=f(p,S,q,N,te,M,R,$>>4,$&15,z);S+=_e}catch(pe){if(pe instanceof s)return(0,_util.warn)('Attempting to re-parse JPEG image using "scanLines" parameter found in DNL marker (0xFFDC) segment.'),this.parse(p,{N:pe.g});throw pe}break;case 65500:S+=4;break;case 65535:p[S]!==255&&S--;break;default:if(p[S-3]===255&&192<=p[S-2]&&254>=p[S-2])S-=3;else if((z=h(p,S-2))&&z.f)(0,_util.warn)("JpegImage.parse - unexpected data, current marker is: "+z.f),S=z.offset;else throw new l("unknown marker "+M.toString(16))}M=x()}for(this.width=q.v,this.height=q.g,this.A=C,this.b=[],M=0;M<q.b.length;M++)ne=q.b[M],(te=b[ne.T])&&(ne.G=te),this.b.push({R:d(q,ne),U:ne.h/q.s,V:ne.j/q.u,c:ne.c,l:ne.l});this.i=this.b.length},L:function(p,x){var g=this.width/p,m=this.height/x,b,v,S=this.b.length,C=p*x*S,A=new Uint8ClampedArray(C),_=new Uint32Array(p);for(v=0;v<S;v++){var E=this.b[v],M=E.U*g,z=E.V*m,N=v,R=E.R,$=E.c+1<<3;for(b=0;b<p;b++)E=0|b*M,_[b]=(E&4294967288)<<3|E&7;for(M=0;M<x;M++)for(E=0|M*z,E=$*(E&4294967288)|(E&7)<<3,b=0;b<p;b++)A[N]=R[E+_[b]],N+=S}if(m=this.M)for(v=0;v<C;)for(g=E=0;E<S;E++,v++,g+=2)A[v]=(A[v]*m[g]>>8)+m[g+1];return A},w:function(){return this.A?!!this.A.W:this.i===3?this.B!==0:this.B===1},I:function(p){for(var x,g,m,b=0,v=p.length;b<v;b+=3)x=p[b],g=p[b+1],m=p[b+2],p[b]=x-179.456+1.402*m,p[b+1]=x+135.459-.344*g-.714*m,p[b+2]=x-226.816+1.772*g;return p},K:function(p){for(var x,g,m,b,v=0,S=0,C=p.length;S<C;S+=4)x=p[S],g=p[S+1],m=p[S+2],b=p[S+3],p[v++]=-122.67195406894+g*(-660635669420364e-19*g+.000437130475926232*m-54080610064599e-18*x+.00048449797120281*b-.154362151871126)+m*(-.000957964378445773*m+.000817076911346625*x-.00477271405408747*b+1.53380253221734)+x*(.000961250184130688*x-.00266257332283933*b+.48357088451265)+b*(-.000336197177618394*b+.484791561490776),p[v++]=107.268039397724+g*(219927104525741e-19*g-.000640992018297945*m+.000659397001245577*x+.000426105652938837*b-.176491792462875)+m*(-.000778269941513683*m+.00130872261408275*x+.000770482631801132*b-.151051492775562)+x*(.00126935368114843*x-.00265090189010898*b+.25802910206845)+b*(-.000318913117588328*b-.213742400323665),p[v++]=-20.810012546947+g*(-.000570115196973677*g-263409051004589e-19*m+.0020741088115012*x-.00288260236853442*b+.814272968359295)+m*(-153496057440975e-19*m-.000132689043961446*x+.000560833691242812*b-.195152027534049)+x*(.00174418132927582*x-.00255243321439347*b+.116935020465145)+b*(-.000343531996510555*b+.24165260232407);return p.subarray(0,v)},J:function(p){for(var x,g,m,b=0,v=p.length;b<v;b+=4)x=p[b],g=p[b+1],m=p[b+2],p[b]=434.456-x-1.402*m,p[b+1]=119.541-x+.344*g+.714*m,p[b+2]=481.816-x-1.772*g;return p},H:function(p){for(var x,g,m,b,v=0,S=1/255,C=0,A=p.length;C<A;C+=4)x=p[C]*S,g=p[C+1]*S,m=p[C+2]*S,b=p[C+3]*S,p[v++]=255+x*(-4.387332384609988*x+54.48615194189176*g+18.82290502165302*m+212.25662451639585*b-285.2331026137004)+g*(1.7149763477362134*g-5.6096736904047315*m-17.873870861415444*b-5.497006427196366)+m*(-2.5217340131683033*m-21.248923337353073*b+17.5119270841813)-b*(21.86122147463605*b+189.48180835922747),p[v++]=255+x*(8.841041422036149*x+60.118027045597366*g+6.871425592049007*m+31.159100130055922*b-79.2970844816548)+g*(-15.310361306967817*g+17.575251261109482*m+131.35250912493976*b-190.9453302588951)+m*(4.444339102852739*m+9.8632861493405*b-24.86741582555878)-b*(20.737325471181034*b+187.80453709719578),p[v++]=255+x*(.8842522430003296*x+8.078677503112928*g+30.89978309703729*m-.23883238689178934*b-14.183576799673286)+g*(10.49593273432072*g+63.02378494754052*m+50.606957656360734*b-112.23884253719248)+m*(.03296041114873217*m+115.60384449646641*b-193.58209356861505)-b*(22.33816807309886*b+180.12613974708367);return p.subarray(0,v)},getData:function(p,x,g){if(4<this.i)throw new l("Unsupported color mode");if(p=this.L(p,x),this.i===1&&g){g=p.length,x=new Uint8ClampedArray(3*g);for(var m=0,b=0;b<g;b++){var v=p[b];x[m++]=v,x[m++]=v,x[m++]=v}return x}if(this.i===3&&this.w())return this.I(p);if(this.i===4){if(this.w())return g?this.K(p):this.J(p);if(g)return this.H(p)}return p}},a.JpegDecoder=u})()})(),a.encodeImage=function(o,l,s,u){var c={t256:[l],t257:[s],t258:[8,8,8,8],t259:[1],t262:[2],t273:[1e3],t277:[4],t278:[s],t279:[l*s*4],t282:[1],t283:[1],t284:[1],t286:[0],t287:[0],t296:[1],t305:["Photopea (UTIF.js)"],t338:[1]};if(u)for(var f in u)c[f]=u[f];for(var d=new Uint8Array(a.encode([c])),h=new Uint8Array(o),y=new Uint8Array(1e3+l*s*4),f=0;f<d.length;f++)y[f]=d[f];for(var f=0;f<h.length;f++)y[1e3+f]=h[f];return y.buffer},a.encode=function(o){var l=new Uint8Array(2e4),s=4,u=a._binBE;l[0]=77,l[1]=77,l[3]=42;var c=8;u.writeUint(l,s,c),s+=4;for(var f=0;f<o.length;f++){var d=a._writeIFD(u,l,c,o[f]);c=d[1],f<o.length-1&&u.writeUint(l,d[0],c)}return l.slice(0,c).buffer},a.decode=function(o){a.decode._decodeG3.allow2D=null;var l=new Uint8Array(o),s=0,u=a._binBE.readASCII(l,s,2);s+=2;var c=u=="II"?a._binLE:a._binBE;c.readUshort(l,s),s+=2;var f=c.readUint(l,s);s+=4;for(var d=[];;){var h=a._readIFD(c,l,f,d,0,!1);if(f=c.readUint(l,h),f==0)break}return d},a.decodeImage=function(o,l,s){var u=new Uint8Array(o),c=a._binBE.readASCII(u,0,2);if(l.t256!=null){l.isLE=c=="II",l.width=l.t256[0],l.height=l.t257[0];var f=l.t259?l.t259[0]:1,d=l.t266?l.t266[0]:1;l.t284&&l.t284[0]==2&&n("PlanarConfiguration 2 should not be used!");var h;l.t258?h=Math.min(32,l.t258[0])*l.t258.length:h=l.t277?l.t277[0]:1,f==1&&l.t279!=null&&l.t278&&l.t262[0]==32803&&(h=Math.round(l.t279[0]*8/(l.width*l.t278[0])));var y=Math.ceil(l.width*h/8)*8,p=l.t273;p==null&&(p=l.t324);var x=l.t279;f==1&&p.length==1&&(x=[l.height*(y>>>3)]),x==null&&(x=l.t325);var g=new Uint8Array(l.height*(y>>>3)),m=0;if(l.t322!=null){for(var b=l.t322[0],v=l.t323[0],S=Math.floor((l.width+b-1)/b),C=Math.floor((l.height+v-1)/v),A=new Uint8Array(Math.ceil(b*v*h/8)|0),_=0;_<C;_++)for(var E=0;E<S;E++){for(var M=_*S+E,z=0;z<A.length;z++)A[z]=0;a.decode._decompress(l,s,u,p[M],x[M],f,A,0,d),f==6?g=A:a._copyTile(A,Math.ceil(b*h/8)|0,v,g,Math.ceil(l.width*h/8)|0,l.height,Math.ceil(E*b*h/8)|0,_*v)}m=g.length*8}else{var N=l.t278?l.t278[0]:l.height;N=Math.min(N,l.height);for(var M=0;M<p.length;M++)a.decode._decompress(l,s,u,p[M],x[M],f,g,Math.ceil(m/8)|0,d),m+=y*N;m=Math.min(m,g.length*8)}l.data=new Uint8Array(g.buffer,0,Math.ceil(m/8)|0)}},a.decode._decompress=function(o,l,s,u,c,f,d,h,y){if(f==1||c==d.length&&f!=32767)for(var p=0;p<c;p++)d[h+p]=s[u+p];else if(f==3)a.decode._decodeG3(s,u,c,d,h,o.width,y);else if(f==4)a.decode._decodeG4(s,u,c,d,h,o.width,y);else if(f==5)a.decode._decodeLZW(s,u,d,h);else if(f==6)a.decode._decodeOldJPEG(o,s,u,c,d,h);else if(f==7)a.decode._decodeNewJPEG(o,s,u,c,d,h);else if(f==8)for(var x=new Uint8Array(s.buffer,u,c),g=i.inflate(x),m=0;m<g.length;m++)d[h+m]=g[m];else f==32767?a.decode._decodeARW(o,s,u,c,d,h):f==32773?a.decode._decodePackBits(s,u,c,d,h):f==32809?a.decode._decodeThunder(s,u,c,d,h):f==34713?a.decode._decodeNikon(o,l,s,u,c,d,h):n("Unknown compression",f);var b=o.t258?Math.min(32,o.t258[0]):1,v=o.t277?o.t277[0]:1,S=b*v>>>3,C=o.t278?o.t278[0]:o.height,A=Math.ceil(b*v*o.width/8);if(b==16&&!o.isLE&&o.t33422==null)for(var _=0;_<C;_++)for(var E=h+_*A,M=1;M<A;M+=2){var z=d[E+M];d[E+M]=d[E+M-1],d[E+M-1]=z}if(o.t317&&o.t317[0]==2)for(var _=0;_<C;_++){var N=h+_*A;if(b==16)for(var p=S;p<A;p+=2){var R=(d[N+p+1]<<8|d[N+p])+(d[N+p-S+1]<<8|d[N+p-S]);d[N+p]=R&255,d[N+p+1]=R>>>8&255}else if(v==3)for(var p=3;p<A;p+=3)d[N+p]=d[N+p]+d[N+p-3]&255,d[N+p+1]=d[N+p+1]+d[N+p-2]&255,d[N+p+2]=d[N+p+2]+d[N+p-1]&255;else for(var p=S;p<A;p++)d[N+p]=d[N+p]+d[N+p-S]&255}},a.decode._ljpeg_diff=function(o,l,s){var u=a.decode._getbithuff,c,f;return c=u(o,l,s[0],s),f=u(o,l,c,0),f&1<<c-1||(f-=(1<<c)-1),f},a.decode._decodeARW=function(o,l,s,u,c,f){var d=o.t256[0],h=o.t257[0],y=o.t258[0],p=o.isLE?a._binLE:a._binBE,x=d*h==u||d*h*1.5==u;if(!x){h+=8;var g=[s,0,0,0],m=new Uint16Array(32770),b=[3857,3856,3599,3342,3085,2828,2571,2314,2057,1800,1543,1286,1029,772,771,768,514,513],ve,v,S,q,$,C=0,A=a.decode._ljpeg_diff;for(m[0]=15,S=ve=0;ve<18;ve++)for(var _=32768>>>(b[ve]>>>8),v=0;v<_;v++)m[++S]=b[ve];for(q=d;q--;)for($=0;$<h+1;$+=2)if($==h&&($=1),C+=A(l,g,m),$<h){var E=C&4095;a.decode._putsF(c,($*d+q)*y,E<<16-y)}return}if(d*h*1.5==u){for(var ve=0;ve<u;ve+=3){var M=l[s+ve+0],z=l[s+ve+1],N=l[s+ve+2];c[f+ve]=z<<4|M>>>4,c[f+ve+1]=M<<4|N>>>4,c[f+ve+2]=N<<4|z>>>4}return}var R=new Uint16Array(16),$,q,W,Z,te,ne,_e,pe,we,ve,Te,Se=new Uint8Array(d+1);for($=0;$<h;$++){for(var Ie=0;Ie<d;Ie++)Se[Ie]=l[s++];for(Te=0,q=0;q<d-30;Te+=16){for(Z=2047&(W=p.readUint(Se,Te)),te=2047&W>>>11,ne=15&W>>>22,_e=15&W>>>26,pe=0;pe<4&&128<<pe<=Z-te;pe++);for(we=30,ve=0;ve<16;ve++)ve==ne?R[ve]=Z:ve==_e?R[ve]=te:(R[ve]=((p.readUshort(Se,Te+(we>>3))>>>(we&7)&127)<<pe)+te,R[ve]>2047&&(R[ve]=2047),we+=7);for(ve=0;ve<16;ve++,q+=2){var E=R[ve]<<1;a.decode._putsF(c,($*d+q)*y,E<<16-y)}q-=q&1?1:31}}},a.decode._decodeNikon=function(o,l,s,u,c,f,d){var h=[[0,0,1,5,1,1,1,1,1,1,2,0,0,0,0,0,0,5,4,3,6,2,7,1,0,8,9,11,10,12],[0,0,1,5,1,1,1,1,1,1,2,0,0,0,0,0,0,57,90,56,39,22,5,4,3,2,1,0,11,12,12],[0,0,1,4,2,3,1,2,0,0,0,0,0,0,0,0,0,5,4,6,3,7,2,8,1,9,0,10,11,12],[0,0,1,4,3,1,1,1,1,1,2,0,0,0,0,0,0,5,6,4,7,8,3,9,2,1,0,10,11,12,13,14],[0,0,1,5,1,1,1,1,1,1,1,2,0,0,0,0,0,8,92,75,58,41,7,6,5,4,3,2,1,0,13,14],[0,0,1,4,2,2,3,1,2,0,0,0,0,0,0,0,0,7,6,8,5,9,4,10,3,11,12,2,0,1,13,14]],y=o.t256[0],p=o.t257[0],x=o.t258[0],g=0,m=0,b=a.decode._make_decoder,v=a.decode._getbithuff,S=l[0].exifIFD.makerNote,C=S.t150?S.t150:S.t140,A=0,_=C[A++],E=C[A++];(_==73||E==88)&&(A+=2110),_==70&&(g=2),x==14&&(g+=3);for(var M=[[0,0],[0,0]],z=o.isLE?a._binLE:a._binBE,W=0;W<2;W++)for(var N=0;N<2;N++)M[W][N]=z.readShort(C,A),A+=2;var R=1<<x&32767,$=0,q=z.readShort(C,A);A+=2,q>1&&($=Math.floor(R/(q-1))),_==68&&E==32&&$>0&&(m=z.readShort(C,562));var W,Z,te,ne,_e,pe,we=[0,0],ve=b(h[g]),Te=[u,0,0,0];for(Z=0;Z<p;Z++)for(m&&Z==m&&(ve=b(h[g+1])),te=0;te<y;te++){W=v(s,Te,ve[0],ve),ne=W&15,_e=W>>>4,pe=(v(s,Te,ne-_e,0)<<1)+1<<_e>>>1,pe&1<<ne-1||(pe-=(1<<ne)-(_e==0?1:0)),te<2?we[te]=M[Z&1][te]+=pe:we[te&1]+=pe;var Se=Math.min(Math.max(we[te&1],0),(1<<x)-1),Ie=(Z*y+te)*x;a.decode._putsF(f,Ie,Se<<16-x)}},a.decode._putsF=function(o,l,s){s=s<<8-(l&7);var u=l>>>3;o[u]|=s>>>16,o[u+1]|=s>>>8,o[u+2]|=s},a.decode._getbithuff=function(o,l,s,u){var c=0;a.decode._get_byte;var f,d=l[0],h=l[1],y=l[2],p=l[3];if(s==0||y<0)return 0;for(;!p&&y<s&&(f=o[d++])!=-1&&!(p=c);)h=(h<<8)+f,y+=8;if(f=h<<32-y>>>32-s,u?(y-=u[f+1]>>>8,f=u[f+1]&255):y-=s,y<0)throw"e";return l[0]=d,l[1]=h,l[2]=y,l[3]=p,f},a.decode._make_decoder=function(o){var l,s,u,c,f,d=[];for(l=16;l!=0&&!o[l];l--);var h=17;for(d[0]=l,u=s=1;s<=l;s++)for(c=0;c<o[s];c++,++h)for(f=0;f<1<<l-s;f++)u<=1<<l&&(d[u++]=s<<8|o[h]);return d},a.decode._decodeNewJPEG=function(o,l,s,u,c,f){var d=o.t347,h=d?d.length:0,y=new Uint8Array(h+u);if(d){for(var p=216,x=217,g=0,m=0;m<h-1&&!(d[m]==255&&d[m+1]==x);m++)y[g++]=d[m];var b=l[s],v=l[s+1];(b!=255||v!=p)&&(y[g++]=b,y[g++]=v);for(var m=2;m<u;m++)y[g++]=l[s+m]}else for(var m=0;m<u;m++)y[m]=l[s+m];if(o.t262[0]==32803||o.t262[0]==34892){var S=o.t258[0],C=a.LosslessJpegDecode(y),A=C.length;if(S==16)if(o.isLE)for(var m=0;m<A;m++)c[f+(m<<1)]=C[m]&255,c[f+(m<<1)+1]=C[m]>>>8;else for(var m=0;m<A;m++)c[f+(m<<1)]=C[m]>>>8,c[f+(m<<1)+1]=C[m]&255;else if(S==14||S==12)for(var _=16-S,m=0;m<A;m++)a.decode._putsF(c,m*S,C[m]<<_);else throw new Error("unsupported bit depth "+S)}else{var E=new a.JpegDecoder;E.parse(y);for(var M=E.getData(E.width,E.height),m=0;m<M.length;m++)c[f+m]=M[m]}o.t262[0]==6&&(o.t262[0]=2)},a.decode._decodeOldJPEGInit=function(o,l,s,u){var c=216,f=219,d=196,h=221,y=192,p=218,x=0,g=0,m,b,v=!1,S,C,A,_=o.t513,E=_?_[0]:0,M=o.t514,z=M?M[0]:0,N=o.t324||o.t273||_,R=o.t530,$=0,q=0,W=o.t277?o.t277[0]:1,Z=o.t515;if(N&&(g=N[0],v=N.length>1),!v){if(l[s]==255&&l[s+1]==c)return{jpegOffset:s};if(_!=null&&(l[s+E]==255&&l[s+E+1]==c?x=s+E:n("JPEGInterchangeFormat does not point to SOI"),M==null?n("JPEGInterchangeFormatLength field is missing"):(E>=g||E+z<=g)&&n("JPEGInterchangeFormatLength field value is invalid"),x!=null))return{jpegOffset:x}}if(R!=null&&($=R[0],q=R[1]),_!=null&&M!=null)if(z>=2&&E+z<=g){for(l[s+E+z-2]==255&&l[s+E+z-1]==c?m=new Uint8Array(z-2):m=new Uint8Array(z),S=0;S<m.length;S++)m[S]=l[s+E+S];n("Incorrect JPEG interchange format: using JPEGInterchangeFormat offset to derive tables")}else n("JPEGInterchangeFormat+JPEGInterchangeFormatLength > offset to first strip or tile");if(m==null){var te=0,ne=[];ne[te++]=255,ne[te++]=c;var _e=o.t519;if(_e==null)throw new Error("JPEGQTables tag is missing");for(S=0;S<_e.length;S++)for(ne[te++]=255,ne[te++]=f,ne[te++]=0,ne[te++]=67,ne[te++]=S,C=0;C<64;C++)ne[te++]=l[s+_e[S]+C];for(A=0;A<2;A++){var pe=o[A==0?"t520":"t521"];if(pe==null)throw new Error((A==0?"JPEGDCTables":"JPEGACTables")+" tag is missing");for(S=0;S<pe.length;S++){ne[te++]=255,ne[te++]=d;var we=19;for(C=0;C<16;C++)we+=l[s+pe[S]+C];for(ne[te++]=we>>>8,ne[te++]=we&255,ne[te++]=S|A<<4,C=0;C<16;C++)ne[te++]=l[s+pe[S]+C];for(C=0;C<we;C++)ne[te++]=l[s+pe[S]+16+C]}}if(ne[te++]=255,ne[te++]=y,ne[te++]=0,ne[te++]=8+3*W,ne[te++]=8,ne[te++]=o.height>>>8&255,ne[te++]=o.height&255,ne[te++]=o.width>>>8&255,ne[te++]=o.width&255,ne[te++]=W,W==1)ne[te++]=1,ne[te++]=17,ne[te++]=0;else for(S=0;S<3;S++)ne[te++]=S+1,ne[te++]=S!=0?17:($&15)<<4|q&15,ne[te++]=S;Z!=null&&Z[0]!=0&&(ne[te++]=255,ne[te++]=h,ne[te++]=0,ne[te++]=4,ne[te++]=Z[0]>>>8&255,ne[te++]=Z[0]&255),m=new Uint8Array(ne)}var ve=-1;for(S=0;S<m.length-1;){if(m[S]==255&&m[S+1]==y){ve=S;break}S++}if(ve==-1){var Te=new Uint8Array(m.length+10+3*W);Te.set(m);var Se=m.length;if(ve=m.length,m=Te,m[Se++]=255,m[Se++]=y,m[Se++]=0,m[Se++]=8+3*W,m[Se++]=8,m[Se++]=o.height>>>8&255,m[Se++]=o.height&255,m[Se++]=o.width>>>8&255,m[Se++]=o.width&255,m[Se++]=W,W==1)m[Se++]=1,m[Se++]=17,m[Se++]=0;else for(S=0;S<3;S++)m[Se++]=S+1,m[Se++]=S!=0?17:($&15)<<4|q&15,m[Se++]=S}if(l[g]==255&&l[g+1]==p){var Ie=l[g+2]<<8|l[g+3];for(b=new Uint8Array(Ie+2),b[0]=l[g],b[1]=l[g+1],b[2]=l[g+2],b[3]=l[g+3],S=0;S<Ie-2;S++)b[S+4]=l[g+S+4]}else{b=new Uint8Array(8+2*W);var Le=0;if(b[Le++]=255,b[Le++]=p,b[Le++]=0,b[Le++]=6+2*W,b[Le++]=W,W==1)b[Le++]=1,b[Le++]=0;else for(S=0;S<3;S++)b[Le++]=S+1,b[Le++]=S<<4|S;b[Le++]=0,b[Le++]=63,b[Le++]=0}return{jpegOffset:s,tables:m,sosMarker:b,sofPosition:ve}},a.decode._decodeOldJPEG=function(o,l,s,u,c,f){var d,h,y,p,x,g=a.decode._decodeOldJPEGInit(o,l,s,u);if(g.jpegOffset!=null)for(h=s+u-g.jpegOffset,p=new Uint8Array(h),d=0;d<h;d++)p[d]=l[g.jpegOffset+d];else{for(y=g.tables.length,p=new Uint8Array(y+g.sosMarker.length+u+2),p.set(g.tables),x=y,p[g.sofPosition+5]=o.height>>>8&255,p[g.sofPosition+6]=o.height&255,p[g.sofPosition+7]=o.width>>>8&255,p[g.sofPosition+8]=o.width&255,(l[s]!=255||l[s+1]!=SOS)&&(p.set(g.sosMarker,x),x+=sosMarker.length),d=0;d<u;d++)p[x++]=l[s+d];p[x++]=255,p[x++]=EOI}var m=new a.JpegDecoder;m.parse(p);for(var b=m.getData(m.width,m.height),d=0;d<b.length;d++)c[f+d]=b[d];o.t262&&o.t262[0]==6&&(o.t262[0]=2)},a.decode._decodePackBits=function(o,l,s,u,c){for(var f=new Int8Array(o.buffer),d=new Int8Array(u.buffer),h=l+s;l<h;){var y=f[l];if(l++,y>=0&&y<128)for(var p=0;p<y+1;p++)d[c]=f[l],c++,l++;if(y>=-127&&y<0){for(var p=0;p<-y+1;p++)d[c]=f[l],c++;l++}}},a.decode._decodeThunder=function(o,l,s,u,c){for(var f=[0,1,0,-1],d=[0,1,2,3,0,-3,-2,-1],h=l+s,y=c*2,p=0;l<h;){var x=o[l],g=x>>>6,m=x&63;if(l++,g==3&&(p=m&15,u[y>>>1]|=p<<4*(1-y&1),y++),g==0)for(var b=0;b<m;b++)u[y>>>1]|=p<<4*(1-y&1),y++;if(g==2)for(var b=0;b<2;b++){var v=m>>>3*(1-b)&7;v!=4&&(p+=d[v],u[y>>>1]|=p<<4*(1-y&1),y++)}if(g==1)for(var b=0;b<3;b++){var v=m>>>2*(2-b)&3;v!=2&&(p+=f[v],u[y>>>1]|=p<<4*(1-y&1),y++)}}},a.decode._dmap={1:0,"011":1,"000011":2,"0000011":3,"010":-1,"000010":-2,"0000010":-3},a.decode._lens=function(){var o=function(y,p,x,g){for(var m=0;m<p.length;m++)y[p[m]]=x+m*g},l="00110101,000111,0111,1000,1011,1100,1110,1111,10011,10100,00111,01000,001000,000011,110100,110101,101010,101011,0100111,0001100,0001000,0010111,0000011,0000100,0101000,0101011,0010011,0100100,0011000,00000010,00000011,00011010,00011011,00010010,00010011,00010100,00010101,00010110,00010111,00101000,00101001,00101010,00101011,00101100,00101101,00000100,00000101,00001010,00001011,01010010,01010011,01010100,01010101,00100100,00100101,01011000,01011001,01011010,01011011,01001010,01001011,00110010,00110011,00110100",s="0000110111,010,11,10,011,0011,0010,00011,000101,000100,0000100,0000101,0000111,00000100,00000111,000011000,0000010111,0000011000,0000001000,00001100111,00001101000,00001101100,00000110111,00000101000,00000010111,00000011000,000011001010,000011001011,000011001100,000011001101,000001101000,000001101001,000001101010,000001101011,000011010010,000011010011,000011010100,000011010101,000011010110,000011010111,000001101100,000001101101,000011011010,000011011011,000001010100,000001010101,000001010110,000001010111,000001100100,000001100101,000001010010,000001010011,000000100100,000000110111,000000111000,000000100111,000000101000,000001011000,000001011001,000000101011,000000101100,000001011010,000001100110,000001100111",u="11011,10010,010111,0110111,00110110,00110111,01100100,01100101,01101000,01100111,011001100,011001101,011010010,011010011,011010100,011010101,011010110,011010111,011011000,011011001,011011010,011011011,010011000,010011001,010011010,011000,010011011",c="0000001111,000011001000,000011001001,000001011011,000000110011,000000110100,000000110101,0000001101100,0000001101101,0000001001010,0000001001011,0000001001100,0000001001101,0000001110010,0000001110011,0000001110100,0000001110101,0000001110110,0000001110111,0000001010010,0000001010011,0000001010100,0000001010101,0000001011010,0000001011011,0000001100100,0000001100101",f="00000001000,00000001100,00000001101,000000010010,000000010011,000000010100,000000010101,000000010110,000000010111,000000011100,000000011101,000000011110,000000011111";l=l.split(","),s=s.split(","),u=u.split(","),c=c.split(","),f=f.split(",");var d={},h={};return o(d,l,0,1),o(d,u,64,64),o(d,f,1792,64),o(h,s,0,1),o(h,c,64,64),o(h,f,1792,64),[d,h]}(),a.decode._decodeG4=function(o,l,s,u,c,f,d){for(var h=a.decode,y=l<<3,p=0,x="",g=[],m=[],b=0;b<f;b++)m.push(0);m=h._makeDiff(m);for(var v=0,S=0,C=0,A=0,_=0,E=0,M="",z=0,N=Math.ceil(f/8)*8;y>>>3<l+s;){C=h._findDiff(m,v+(v==0?0:1),1-_),A=h._findDiff(m,C,_);var R=0;if(d==1&&(R=o[y>>>3]>>>7-(y&7)&1),d==2&&(R=o[y>>>3]>>>(y&7)&1),y++,x+=R,M=="H"){if(h._lens[_][x]!=null){var $=h._lens[_][x];x="",p+=$,$<64&&(h._addNtimes(g,p,_),v+=p,_=1-_,p=0,z--,z==0&&(M=""))}}else x=="0001"&&(x="",h._addNtimes(g,A-v,_),v=A),x=="001"&&(x="",M="H",z=2),h._dmap[x]!=null&&(S=C+h._dmap[x],h._addNtimes(g,S-v,_),v=S,x="",_=1-_);g.length==f&&M==""&&(h._writeBits(g,u,c*8+E*N),_=0,E++,v=0,m=h._makeDiff(g),g=[])}},a.decode._findDiff=function(o,l,s){for(var u=0;u<o.length;u+=2)if(o[u]>=l&&o[u+1]==s)return o[u]},a.decode._makeDiff=function(o){var l=[];o[0]==1&&l.push(0,1);for(var s=1;s<o.length;s++)o[s-1]!=o[s]&&l.push(s,o[s]);return l.push(o.length,0,o.length,1),l},a.decode._decodeG3=function(o,l,s,u,c,f,d){for(var h=a.decode,y=l<<3,p=0,x="",g=[],m=[],b=0;b<f;b++)g.push(0);for(var v=0,S=0,C=0,A=0,_=0,E=-1,M="",z=0,N=!1,R=Math.ceil(f/8)*8;y>>>3<l+s;){C=h._findDiff(m,v+(v==0?0:1),1-_),A=h._findDiff(m,C,_);var $=0;if(d==1&&($=o[y>>>3]>>>7-(y&7)&1),d==2&&($=o[y>>>3]>>>(y&7)&1),y++,x+=$,N){if(h._lens[_][x]!=null){var q=h._lens[_][x];x="",p+=q,q<64&&(h._addNtimes(g,p,_),_=1-_,p=0)}}else if(M=="H"){if(h._lens[_][x]!=null){var q=h._lens[_][x];x="",p+=q,q<64&&(h._addNtimes(g,p,_),v+=p,_=1-_,p=0,z--,z==0&&(M=""))}}else x=="0001"&&(x="",h._addNtimes(g,A-v,_),v=A),x=="001"&&(x="",M="H",z=2),h._dmap[x]!=null&&(S=C+h._dmap[x],h._addNtimes(g,S-v,_),v=S,x="",_=1-_);x.endsWith("000000000001")&&(E>=0&&h._writeBits(g,u,c*8+E*R),d==1&&(N=(o[y>>>3]>>>7-(y&7)&1)==1),d==2&&(N=(o[y>>>3]>>>(y&7)&1)==1),y++,h._decodeG3.allow2D==null&&(h._decodeG3.allow2D=N),h._decodeG3.allow2D||(N=!0,y--),x="",_=0,E++,v=0,m=h._makeDiff(g),g=[])}g.length==f&&h._writeBits(g,u,c*8+E*R)},a.decode._addNtimes=function(o,l,s){for(var u=0;u<l;u++)o.push(s)},a.decode._writeBits=function(o,l,s){for(var u=0;u<o.length;u++)l[s+u>>>3]|=o[u]<<7-(s+u&7)},a.decode._decodeLZW=function(o,l,s,u){if(a.decode._lzwTab==null){for(var c=new Uint32Array(65535),f=new Uint16Array(65535),x=new Uint8Array(2e6),d=0;d<256;d++)x[d<<2]=d,c[d]=d<<2,f[d]=1;a.decode._lzwTab=[c,f,x]}for(var h=a.decode._copyData,y=a.decode._lzwTab[0],p=a.decode._lzwTab[1],x=a.decode._lzwTab[2],g=258,m=1032,b=9,v=l<<3,S=256,C=257,A=0,_=0,E=0;A=o[v>>>3]<<16|o[v+8>>>3]<<8|o[v+16>>>3],_=A>>24-(v&7)-b&(1<<b)-1,v+=b,_!=C;){if(_==S){if(b=9,g=258,m=1032,A=o[v>>>3]<<16|o[v+8>>>3]<<8|o[v+16>>>3],_=A>>24-(v&7)-b&(1<<b)-1,v+=b,_==C)break;s[u]=_,u++}else if(_<g){var M=y[_],z=p[_];if(h(x,M,s,u,z),u+=z,E>=g)y[g]=m,x[y[g]]=M[0],p[g]=1,m=m+1+3&-4,g++;else{y[g]=m;var N=y[E],R=p[E];h(x,N,x,m,R),x[m+R]=x[M],R++,p[g]=R,g++,m=m+R+3&-4}g+1==1<<b&&b++}else{if(E>=g)y[g]=m,p[g]=0,g++;else{y[g]=m;var N=y[E],R=p[E];h(x,N,x,m,R),x[m+R]=x[m],R++,p[g]=R,g++,h(x,m,s,u,R),u+=R,m=m+R+3&-4}g+1==1<<b&&b++}E=_}},a.decode._copyData=function(o,l,s,u,c){for(var f=0;f<c;f+=4)s[u+f]=o[l+f],s[u+f+1]=o[l+f+1],s[u+f+2]=o[l+f+2],s[u+f+3]=o[l+f+3]},a.tags={},a.ttypes={256:3,257:3,258:3,259:3,262:3,273:4,274:3,277:3,278:4,279:4,282:5,283:5,284:3,286:5,287:5,296:3,305:2,306:2,338:3,513:4,514:4,34665:4},a._readIFD=function(o,l,s,u,c,f){var d=o.readUshort(l,s);s+=2;var h={};u.push(h),f&&n(" ".repeat(c),u.length-1,">>>----------------");for(var y=0;y<d;y++){var p=o.readUshort(l,s);s+=2;var x=o.readUshort(l,s);s+=2;var g=o.readUint(l,s);s+=4;var m=o.readUint(l,s);s+=4;var b=[];if((x==1||x==7)&&(b=new Uint8Array(l.buffer,g<5?s-4:m,g)),x==2){var v=g<5?s-4:m,S=l[v];S<128?b.push(o.readASCII(l,v,g-1)):b=new Uint8Array(l.buffer,v,g-1)}if(x==3)for(var C=0;C<g;C++)b.push(o.readUshort(l,(g<3?s-4:m)+2*C));if(x==4)for(var C=0;C<g;C++)b.push(o.readUint(l,(g<2?s-4:m)+4*C));if(x==5)for(var C=0;C<g;C++)b.push(o.readUint(l,m+C*8)/o.readUint(l,m+C*8+4));if(x==8)for(var C=0;C<g;C++)b.push(o.readShort(l,(g<3?s-4:m)+2*C));if(x==9)for(var C=0;C<g;C++)b.push(o.readInt(l,(g<2?s-4:m)+4*C));if(x==10)for(var C=0;C<g;C++)b.push(o.readInt(l,m+C*8)/o.readInt(l,m+C*8+4));if(x==11)for(var C=0;C<g;C++)b.push(o.readFloat(l,m+C*4));if(x==12)for(var C=0;C<g;C++)b.push(o.readDouble(l,m+C*8));if(h["t"+p]=b,g!=0&&b.length==0&&n("unknown TIFF tag type: ",x,"num:",g),f&&n(" ".repeat(c),p,x,a.tags[p],b),!(p==330&&h.t272&&h.t272[0]=="DSLR-A100")){if(p==330||p==34665||p==50740&&o.readUshort(l,o.readUint(b,0))<300){for(var A=p==50740?[o.readUint(b,0)]:b,_=[],C=0;C<A.length;C++)a._readIFD(o,l,A[C],_,c+1,f);p==330&&(h.subIFD=_),p==34665&&(h.exifIFD=_[0]),p==50740&&(h.dngPrvt=_[0])}}if(p==37500){var E=b;if(o.readASCII(E,0,5)=="Nikon")h.makerNote=a.decode(E.slice(10).buffer)[0];else if(o.readUshort(l,m)<300){var M=[];a._readIFD(o,l,m,M,c+1,f),h.makerNote=M[0]}}}return f&&n(" ".repeat(c),"<<<---------------"),s},a._writeIFD=function(o,l,s,u){var c=Object.keys(u);o.writeUshort(l,s,c.length),s+=2;for(var f=s+c.length*12+4,d=0;d<c.length;d++){var h=c[d],y=parseInt(h.slice(1)),p=a.ttypes[y];if(p==null)throw new Error("unknown type of tag: "+y);var x=u[h];p==2&&(x=x[0]+"\0");var g=x.length;o.writeUshort(l,s,y),s+=2,o.writeUshort(l,s,p),s+=2,o.writeUint(l,s,g),s+=4;var m=[-1,1,1,2,4,8,0,0,0,0,0,0,8][p]*g,b=s;if(m>4&&(o.writeUint(l,s,f),b=f),p==2&&o.writeASCII(l,b,x),p==3)for(var v=0;v<g;v++)o.writeUshort(l,b+2*v,x[v]);if(p==4)for(var v=0;v<g;v++)o.writeUint(l,b+4*v,x[v]);if(p==5)for(var v=0;v<g;v++)o.writeUint(l,b+8*v,Math.round(x[v]*1e4)),o.writeUint(l,b+8*v+4,1e4);if(p==12)for(var v=0;v<g;v++)o.writeDouble(l,b+8*v,x[v]);m>4&&(m+=m&1,f+=m),s+=4}return[s,f]},a.toRGBA8=function(o){var l=o.width,s=o.height,u=l*s,c=u*4,f=o.data,d=new Uint8Array(u*4),h=o.t262?o.t262[0]:2,y=o.t258?Math.min(32,o.t258[0]):1;if(h==0)for(var p=Math.ceil(y*l/8),x=0;x<s;x++){var g=x*p,m=x*l;if(y==1)for(var b=0;b<l;b++){var v=m+b<<2,S=f[g+(b>>3)]>>7-(b&7)&1;d[v]=d[v+1]=d[v+2]=(1-S)*255,d[v+3]=255}if(y==4)for(var b=0;b<l;b++){var v=m+b<<2,S=f[g+(b>>1)]>>4-4*(b&1)&15;d[v]=d[v+1]=d[v+2]=(15-S)*17,d[v+3]=255}if(y==8)for(var b=0;b<l;b++){var v=m+b<<2,S=f[g+b];d[v]=d[v+1]=d[v+2]=255-S,d[v+3]=255}}else if(h==1)for(var p=Math.ceil(y*l/8),x=0;x<s;x++){var g=x*p,m=x*l;if(y==1)for(var b=0;b<l;b++){var v=m+b<<2,S=f[g+(b>>3)]>>7-(b&7)&1;d[v]=d[v+1]=d[v+2]=S*255,d[v+3]=255}if(y==2)for(var b=0;b<l;b++){var v=m+b<<2,S=f[g+(b>>2)]>>6-2*(b&3)&3;d[v]=d[v+1]=d[v+2]=S*85,d[v+3]=255}if(y==8)for(var b=0;b<l;b++){var v=m+b<<2,S=f[g+b];d[v]=d[v+1]=d[v+2]=S,d[v+3]=255}if(y==16)for(var b=0;b<l;b++){var v=m+b<<2,S=f[g+(2*b+1)];d[v]=d[v+1]=d[v+2]=Math.min(255,S),d[v+3]=255}}else if(h==2){var C=o.t258?o.t258.length:3;if(y==8){if(C==4)for(var b=0;b<c;b++)d[b]=f[b];if(C==3)for(var b=0;b<u;b++){var v=b<<2,A=b*3;d[v]=f[A],d[v+1]=f[A+1],d[v+2]=f[A+2],d[v+3]=255}}else{if(C==4)for(var b=0;b<u;b++){var v=b<<2,A=b*8+1;d[v]=f[A],d[v+1]=f[A+2],d[v+2]=f[A+4],d[v+3]=f[A+6]}if(C==3)for(var b=0;b<u;b++){var v=b<<2,A=b*6+1;d[v]=f[A],d[v+1]=f[A+2],d[v+2]=f[A+4],d[v+3]=255}}}else if(h==3)for(var _=o.t320,b=0;b<u;b++){var v=b<<2,E=f[b];d[v]=_[E]>>8,d[v+1]=_[256+E]>>8,d[v+2]=_[512+E]>>8,d[v+3]=255}else if(h==5)for(var C=o.t258?o.t258.length:4,M=C>4?1:0,b=0;b<u;b++){var v=b<<2,z=b*C,N=255-f[z],R=255-f[z+1],$=255-f[z+2],q=(255-f[z+3])*(1/255);d[v]=~~(N*q+.5),d[v+1]=~~(R*q+.5),d[v+2]=~~($*q+.5),d[v+3]=255*(1-M)+f[z+4]*M}else n("Unknown Photometric interpretation: "+h);return d},a.replaceIMG=function(o){o==null&&(o=document.getElementsByTagName("img"));for(var l=["tif","tiff","dng","cr2","nef"],s=0;s<o.length;s++){var u=o[s],c=u.getAttribute("src");if(c!=null){var f=c.split(".").pop().toLowerCase();if(l.indexOf(f)!=-1){var d=new XMLHttpRequest;a._xhrs.push(d),a._imgs.push(u),d.open("GET",c),d.responseType="arraybuffer",d.onload=a._imgLoaded,d.send()}}}},a._xhrs=[],a._imgs=[],a._imgLoaded=function(o){var l=o.target.response,s=a.decode(l),u=s,c=0,f=u[0];s[0].subIFD&&(u=u.concat(s[0].subIFD));for(var d=0;d<u.length;d++){var m=u[d];if(!(m.t258==null||m.t258.length<3)){var h=m.t256*m.t257;h>c&&(c=h,f=m)}}a.decodeImage(l,f,s);var y=a.toRGBA8(f),p=f.width,x=f.height,g=a._xhrs.indexOf(o.target),m=a._imgs[g];a._xhrs.splice(g,1),a._imgs.splice(g,1);var b=document.createElement("canvas");b.width=p,b.height=x;for(var v=b.getContext("2d"),S=v.createImageData(p,x),d=0;d<y.length;d++)S.data[d]=y[d];v.putImageData(S,0,0),m.setAttribute("src",b.toDataURL())},a._binBE={nextZero:function(o,l){for(;o[l]!=0;)l++;return l},readUshort:function(o,l){return o[l]<<8|o[l+1]},readShort:function(o,l){var s=a._binBE.ui8;return s[0]=o[l+1],s[1]=o[l+0],a._binBE.i16[0]},readInt:function(o,l){var s=a._binBE.ui8;return s[0]=o[l+3],s[1]=o[l+2],s[2]=o[l+1],s[3]=o[l+0],a._binBE.i32[0]},readUint:function(o,l){var s=a._binBE.ui8;return s[0]=o[l+3],s[1]=o[l+2],s[2]=o[l+1],s[3]=o[l+0],a._binBE.ui32[0]},readASCII:function(o,l,s){for(var u="",c=0;c<s;c++)u+=String.fromCharCode(o[l+c]);return u},readFloat:function(o,l){for(var s=a._binBE.ui8,u=0;u<4;u++)s[u]=o[l+3-u];return a._binBE.fl32[0]},readDouble:function(o,l){for(var s=a._binBE.ui8,u=0;u<8;u++)s[u]=o[l+7-u];return a._binBE.fl64[0]},writeUshort:function(o,l,s){o[l]=s>>8&255,o[l+1]=s&255},writeUint:function(o,l,s){o[l]=s>>24&255,o[l+1]=s>>16&255,o[l+2]=s>>8&255,o[l+3]=s>>0&255},writeASCII:function(o,l,s){for(var u=0;u<s.length;u++)o[l+u]=s.charCodeAt(u)},writeDouble:function(o,l,s){a._binBE.fl64[0]=s;for(var u=0;u<8;u++)o[l+u]=a._binBE.ui8[7-u]}},a._binBE.ui8=new Uint8Array(8),a._binBE.i16=new Int16Array(a._binBE.ui8.buffer),a._binBE.i32=new Int32Array(a._binBE.ui8.buffer),a._binBE.ui32=new Uint32Array(a._binBE.ui8.buffer),a._binBE.fl32=new Float32Array(a._binBE.ui8.buffer),a._binBE.fl64=new Float64Array(a._binBE.ui8.buffer),a._binLE={nextZero:a._binBE.nextZero,readUshort:function(o,l){return o[l+1]<<8|o[l]},readShort:function(o,l){var s=a._binBE.ui8;return s[0]=o[l+0],s[1]=o[l+1],a._binBE.i16[0]},readInt:function(o,l){var s=a._binBE.ui8;return s[0]=o[l+0],s[1]=o[l+1],s[2]=o[l+2],s[3]=o[l+3],a._binBE.i32[0]},readUint:function(o,l){var s=a._binBE.ui8;return s[0]=o[l+0],s[1]=o[l+1],s[2]=o[l+2],s[3]=o[l+3],a._binBE.ui32[0]},readASCII:a._binBE.readASCII,readFloat:function(o,l){for(var s=a._binBE.ui8,u=0;u<4;u++)s[u]=o[l+u];return a._binBE.fl32[0]},readDouble:function(o,l){for(var s=a._binBE.ui8,u=0;u<8;u++)s[u]=o[l+u];return a._binBE.fl64[0]}},a._copyTile=function(o,l,s,u,c,f,d,h){for(var y=Math.min(l,c-d),p=Math.min(s,f-h),x=0;x<p;x++)for(var g=(h+x)*c+d,m=x*l,b=0;b<y;b++)u[g+b]=o[m+b]},a.LosslessJpegDecode=function(){function o(c){this.w=c,this.N=0,this._=0,this.G=0}o.prototype={t:function(c){this.N=Math.max(0,Math.min(this.w.length,c))},i:function(){return this.w[this.N++]},l:function(){var c=this.N;return this.N+=2,this.w[c]<<8|this.w[c+1]},J:function(){return this._==0&&(this.G=this.w[this.N],this.N+=1+(this.G+1>>>8),this._=8),this.G>>>--this._&1},Z:function(c){var f=this._,d=this.G,h=Math.min(f,c);c-=h,f-=h;for(var y=d>>>f&(1<<h)-1;c>0;)d=this.w[this.N],this.N+=1+(d+1>>>8),h=Math.min(8,c),c-=h,f=8-h,y<<=h,y|=d>>>f&(1<<h)-1;return this._=f,this.G=d,y}};var l={};l.X=function(){return[0,0,-1]},l.s=function(c,f,d){c[l.Y(c,0,d)+2]=f},l.Y=function(c,f,d){if(c[f+2]!=-1)return 0;if(d==0)return f;for(var h=0;h<2;h++){c[f+h]==0&&(c[f+h]=c.length,c.push(0),c.push(0),c.push(-1));var y=l.Y(c,c[f+h],d-1);if(y!=0)return y}return 0},l.B=function(c,f){for(var d=0,h=0,y=0,p=f._,x=f.G,g=f.N;;)if(p==0&&(x=f.w[g],g+=1+(x+1>>>8),p=8),y=x>>>--p&1,d=c[d+y],h=c[d+2],h!=-1)return f._=p,f.G=x,f.N=g,h;return-1};function s(c){this.z=new o(c),this.D(this.z)}s.prototype={$:function(c,f){this.Q=c.i(),this.F=c.l(),this.o=c.l();var d=this.O=c.i();this.L=[];for(var h=0;h<d;h++){var y=c.i();c.i(),c.i(),this.L[y]=h}c.t(c.N+f-(6+d*3))},e:function(){var c=0,f=this.z.i();this.H==null&&(this.H={});for(var d=this.H[f]=l.X(),h=[],y=0;y<16;y++)h[y]=this.z.i(),c+=h[y];for(var y=0;y<16;y++)for(var p=0;p<h[y];p++)l.s(d,this.z.i(),y+1);return c+17},W:function(c){for(;c>0;)c-=this.e()},p:function(c,f){var d=c.i();this.U||(this.U=[]);for(var h=0;h<d;h++){var y=c.i(),p=c.i();this.U[this.L[y]]=this.H[p>>>4]}this.g=c.i(),c.t(c.N+f-(2+d*2))},D:function(c){var f=!1,d=c.l();if(d===s.q)do{var d=c.l(),h=c.l()-2;switch(d){case s.m:this.$(c,h);break;case s.K:this.W(h);break;case s.V:this.p(c,h),f=!0;break;default:c.t(c.N+h);break}}while(!f)},I:function(c,f){var d=l.B(f,c);if(d==16)return-32768;var h=c.Z(d);return h&1<<d-1||(h-=(1<<d)-1),h},B:function(c,f){for(var d=this.z,h=this.O,y=this.F,p=this.I,x=this.g,g=this.o*h,m=this.U,b=0;b<h;b++)c[b]=p(d,m[b])+(1<<this.Q-1);for(var v=h;v<g;v+=h)for(var b=0;b<h;b++)c[v+b]=p(d,m[b])+c[v+b-h];for(var S=f,C=1;C<y;C++){for(var b=0;b<h;b++)c[S+b]=p(d,m[b])+c[S+b-f];for(var v=h;v<g;v+=h)for(var b=0;b<h;b++){var A=S+v+b,_=c[A-h];x==6&&(_=c[A-f]+(_-c[A-h-f]>>>1)),c[A]=_+p(d,m[b])}S+=f}}},s.m=65475,s.K=65476,s.q=65496,s.V=65498;function u(c){var f=new s(c),d=f.Q>8?Uint16Array:Uint8Array,h=new d(f.o*f.F*f.O),y=f.o*f.O;return f.B(h,y),h}return u}()})(t,r)})()})(rm);var Sm=rm.exports;const TS=ln({__proto__:null,default:tm(Sm)},[Sm]);/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const MS=4,Cm=0,Am=1,DS=2;function To(e){let t=e.length;for(;--t>=0;)e[t]=0}const IS=0,Em=1,zS=2,FS=3,OS=258,kf=29,Ol=256,Pl=Ol+1+kf,Mo=30,Sf=19,Tm=2*Pl+1,Hi=15,Cf=16,PS=7,Af=256,Mm=16,Dm=17,Im=18,Ef=new Uint8Array([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]),M0=new Uint8Array([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]),RS=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),zm=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),LS=512,Ga=new Array((Pl+2)*2);To(Ga);const Rl=new Array(Mo*2);To(Rl);const Ll=new Array(LS);To(Ll);const Bl=new Array(OS-FS+1);To(Bl);const Tf=new Array(kf);To(Tf);const D0=new Array(Mo);To(D0);function Mf(e,t,r,n,a){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=a,this.has_stree=e&&e.length}let Fm,Om,Pm;function Df(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}const Rm=e=>e<256?Ll[e]:Ll[256+(e>>>7)],Nl=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},cn=(e,t,r)=>{e.bi_valid>Cf-r?(e.bi_buf|=t<<e.bi_valid&65535,Nl(e,e.bi_buf),e.bi_buf=t>>Cf-e.bi_valid,e.bi_valid+=r-Cf):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)},xa=(e,t,r)=>{cn(e,r[t*2],r[t*2+1])},Lm=(e,t)=>{let r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1},BS=e=>{e.bi_valid===16?(Nl(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},NS=(e,t)=>{const r=t.dyn_tree,n=t.max_code,a=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,l=t.stat_desc.extra_base,s=t.stat_desc.max_length;let u,c,f,d,h,y,p=0;for(d=0;d<=Hi;d++)e.bl_count[d]=0;for(r[e.heap[e.heap_max]*2+1]=0,u=e.heap_max+1;u<Tm;u++)c=e.heap[u],d=r[r[c*2+1]*2+1]+1,d>s&&(d=s,p++),r[c*2+1]=d,!(c>n)&&(e.bl_count[d]++,h=0,c>=l&&(h=o[c-l]),y=r[c*2],e.opt_len+=y*(d+h),i&&(e.static_len+=y*(a[c*2+1]+h)));if(p!==0){do{for(d=s-1;e.bl_count[d]===0;)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[s]--,p-=2}while(p>0);for(d=s;d!==0;d--)for(c=e.bl_count[d];c!==0;)f=e.heap[--u],!(f>n)&&(r[f*2+1]!==d&&(e.opt_len+=(d-r[f*2+1])*r[f*2],r[f*2+1]=d),c--)}},Bm=(e,t,r)=>{const n=new Array(Hi+1);let a=0,i,o;for(i=1;i<=Hi;i++)a=a+r[i-1]<<1,n[i]=a;for(o=0;o<=t;o++){let l=e[o*2+1];l!==0&&(e[o*2]=Lm(n[l]++,l))}},$S=()=>{let e,t,r,n,a;const i=new Array(Hi+1);for(r=0,n=0;n<kf-1;n++)for(Tf[n]=r,e=0;e<1<<Ef[n];e++)Bl[r++]=n;for(Bl[r-1]=n,a=0,n=0;n<16;n++)for(D0[n]=a,e=0;e<1<<M0[n];e++)Ll[a++]=n;for(a>>=7;n<Mo;n++)for(D0[n]=a<<7,e=0;e<1<<M0[n]-7;e++)Ll[256+a++]=n;for(t=0;t<=Hi;t++)i[t]=0;for(e=0;e<=143;)Ga[e*2+1]=8,e++,i[8]++;for(;e<=255;)Ga[e*2+1]=9,e++,i[9]++;for(;e<=279;)Ga[e*2+1]=7,e++,i[7]++;for(;e<=287;)Ga[e*2+1]=8,e++,i[8]++;for(Bm(Ga,Pl+1,i),e=0;e<Mo;e++)Rl[e*2+1]=5,Rl[e*2]=Lm(e,5);Fm=new Mf(Ga,Ef,Ol+1,Pl,Hi),Om=new Mf(Rl,M0,0,Mo,Hi),Pm=new Mf(new Array(0),RS,0,Sf,PS)},Nm=e=>{let t;for(t=0;t<Pl;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Mo;t++)e.dyn_dtree[t*2]=0;for(t=0;t<Sf;t++)e.bl_tree[t*2]=0;e.dyn_ltree[Af*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},$m=e=>{e.bi_valid>8?Nl(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Um=(e,t,r,n)=>{const a=t*2,i=r*2;return e[a]<e[i]||e[a]===e[i]&&n[t]<=n[r]},If=(e,t,r)=>{const n=e.heap[r];let a=r<<1;for(;a<=e.heap_len&&(a<e.heap_len&&Um(t,e.heap[a+1],e.heap[a],e.depth)&&a++,!Um(t,n,e.heap[a],e.depth));)e.heap[r]=e.heap[a],r=a,a<<=1;e.heap[r]=n},Hm=(e,t,r)=>{let n,a,i=0,o,l;if(e.sym_next!==0)do n=e.pending_buf[e.sym_buf+i++]&255,n+=(e.pending_buf[e.sym_buf+i++]&255)<<8,a=e.pending_buf[e.sym_buf+i++],n===0?xa(e,a,t):(o=Bl[a],xa(e,o+Ol+1,t),l=Ef[o],l!==0&&(a-=Tf[o],cn(e,a,l)),n--,o=Rm(n),xa(e,o,r),l=M0[o],l!==0&&(n-=D0[o],cn(e,n,l)));while(i<e.sym_next);xa(e,Af,t)},zf=(e,t)=>{const r=t.dyn_tree,n=t.stat_desc.static_tree,a=t.stat_desc.has_stree,i=t.stat_desc.elems;let o,l,s=-1,u;for(e.heap_len=0,e.heap_max=Tm,o=0;o<i;o++)r[o*2]!==0?(e.heap[++e.heap_len]=s=o,e.depth[o]=0):r[o*2+1]=0;for(;e.heap_len<2;)u=e.heap[++e.heap_len]=s<2?++s:0,r[u*2]=1,e.depth[u]=0,e.opt_len--,a&&(e.static_len-=n[u*2+1]);for(t.max_code=s,o=e.heap_len>>1;o>=1;o--)If(e,r,o);u=i;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],If(e,r,1),l=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=l,r[u*2]=r[o*2]+r[l*2],e.depth[u]=(e.depth[o]>=e.depth[l]?e.depth[o]:e.depth[l])+1,r[o*2+1]=r[l*2+1]=u,e.heap[1]=u++,If(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],NS(e,t),Bm(r,s,e.bl_count)},jm=(e,t,r)=>{let n,a=-1,i,o=t[0*2+1],l=0,s=7,u=4;for(o===0&&(s=138,u=3),t[(r+1)*2+1]=65535,n=0;n<=r;n++)i=o,o=t[(n+1)*2+1],!(++l<s&&i===o)&&(l<u?e.bl_tree[i*2]+=l:i!==0?(i!==a&&e.bl_tree[i*2]++,e.bl_tree[Mm*2]++):l<=10?e.bl_tree[Dm*2]++:e.bl_tree[Im*2]++,l=0,a=i,o===0?(s=138,u=3):i===o?(s=6,u=3):(s=7,u=4))},Gm=(e,t,r)=>{let n,a=-1,i,o=t[0*2+1],l=0,s=7,u=4;for(o===0&&(s=138,u=3),n=0;n<=r;n++)if(i=o,o=t[(n+1)*2+1],!(++l<s&&i===o)){if(l<u)do xa(e,i,e.bl_tree);while(--l!==0);else i!==0?(i!==a&&(xa(e,i,e.bl_tree),l--),xa(e,Mm,e.bl_tree),cn(e,l-3,2)):l<=10?(xa(e,Dm,e.bl_tree),cn(e,l-3,3)):(xa(e,Im,e.bl_tree),cn(e,l-11,7));l=0,a=i,o===0?(s=138,u=3):i===o?(s=6,u=3):(s=7,u=4)}},US=e=>{let t;for(jm(e,e.dyn_ltree,e.l_desc.max_code),jm(e,e.dyn_dtree,e.d_desc.max_code),zf(e,e.bl_desc),t=Sf-1;t>=3&&e.bl_tree[zm[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},HS=(e,t,r,n)=>{let a;for(cn(e,t-257,5),cn(e,r-1,5),cn(e,n-4,4),a=0;a<n;a++)cn(e,e.bl_tree[zm[a]*2+1],3);Gm(e,e.dyn_ltree,t-1),Gm(e,e.dyn_dtree,r-1)},jS=e=>{let t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return Cm;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return Am;for(r=32;r<Ol;r++)if(e.dyn_ltree[r*2]!==0)return Am;return Cm};let Vm=!1;const GS=e=>{Vm||($S(),Vm=!0),e.l_desc=new Df(e.dyn_ltree,Fm),e.d_desc=new Df(e.dyn_dtree,Om),e.bl_desc=new Df(e.bl_tree,Pm),e.bi_buf=0,e.bi_valid=0,Nm(e)},qm=(e,t,r,n)=>{cn(e,(IS<<1)+(n?1:0),3),$m(e),Nl(e,r),Nl(e,~r),r&&e.pending_buf.set(e.window.subarray(t,t+r),e.pending),e.pending+=r},VS=e=>{cn(e,Em<<1,3),xa(e,Af,Ga),BS(e)},qS=(e,t,r,n)=>{let a,i,o=0;e.level>0?(e.strm.data_type===DS&&(e.strm.data_type=jS(e)),zf(e,e.l_desc),zf(e,e.d_desc),o=US(e),a=e.opt_len+3+7>>>3,i=e.static_len+3+7>>>3,i<=a&&(a=i)):a=i=r+5,r+4<=a&&t!==-1?qm(e,t,r,n):e.strategy===MS||i===a?(cn(e,(Em<<1)+(n?1:0),3),Hm(e,Ga,Rl)):(cn(e,(zS<<1)+(n?1:0),3),HS(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),Hm(e,e.dyn_ltree,e.dyn_dtree)),Nm(e),n&&$m(e)},WS=(e,t,r)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=r,t===0?e.dyn_ltree[r*2]++:(e.matches++,t--,e.dyn_ltree[(Bl[r]+Ol+1)*2]++,e.dyn_dtree[Rm(t)*2]++),e.sym_next===e.sym_end);var KS=GS,XS=qm,YS=qS,ZS=WS,JS=VS,QS={_tr_init:KS,_tr_stored_block:XS,_tr_flush_block:YS,_tr_tally:ZS,_tr_align:JS},$l=(e,t,r,n)=>{let a=e&65535|0,i=e>>>16&65535|0,o=0;for(;r!==0;){o=r>2e3?2e3:r,r-=o;do a=a+t[n++]|0,i=i+a|0;while(--o);a%=65521,i%=65521}return a|i<<16|0};const eC=()=>{let e,t=[];for(var r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e}return t},tC=new Uint32Array(eC());var Mr=(e,t,r,n)=>{const a=tC,i=n+r;e^=-1;for(let o=n;o<i;o++)e=e>>>8^a[(e^t[o])&255];return e^-1},ji={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"},I0={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_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:rC,_tr_stored_block:Ff,_tr_flush_block:nC,_tr_tally:mi,_tr_align:aC}=QS,{Z_NO_FLUSH:gi,Z_PARTIAL_FLUSH:iC,Z_FULL_FLUSH:oC,Z_FINISH:Pn,Z_BLOCK:Wm,Z_OK:Nr,Z_STREAM_END:Km,Z_STREAM_ERROR:_a,Z_DATA_ERROR:lC,Z_BUF_ERROR:Of,Z_DEFAULT_COMPRESSION:sC,Z_FILTERED:uC,Z_HUFFMAN_ONLY:z0,Z_RLE:cC,Z_FIXED:fC,Z_DEFAULT_STRATEGY:dC,Z_UNKNOWN:hC,Z_DEFLATED:F0}=I0,pC=9,vC=15,mC=8,Pf=256+1+29,gC=30,bC=19,yC=2*Pf+1,xC=15,Ft=3,bi=258,wa=bi+Ft+1,_C=32,Do=42,Rf=57,Lf=69,Bf=73,Nf=91,$f=103,Gi=113,Ul=666,nn=1,Io=2,Vi=3,zo=4,wC=3,qi=(e,t)=>(e.msg=ji[t],t),Xm=e=>e*2-(e>4?9:0),yi=e=>{let t=e.length;for(;--t>=0;)e[t]=0},kC=e=>{let t,r,n,a=e.w_size;t=e.hash_size,n=t;do r=e.head[--n],e.head[n]=r>=a?r-a:0;while(--t);t=a,n=t;do r=e.prev[--n],e.prev[n]=r>=a?r-a:0;while(--t)};let xi=(e,t,r)=>(t<<e.hash_shift^r)&e.hash_mask;const yn=e=>{const t=e.state;let r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+r),e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,t.pending===0&&(t.pending_out=0))},xn=(e,t)=>{nC(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,yn(e.strm)},jt=(e,t)=>{e.pending_buf[e.pending++]=t},Hl=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},Uf=(e,t,r,n)=>{let a=e.avail_in;return a>n&&(a=n),a===0?0:(e.avail_in-=a,t.set(e.input.subarray(e.next_in,e.next_in+a),r),e.state.wrap===1?e.adler=$l(e.adler,t,a,r):e.state.wrap===2&&(e.adler=Mr(e.adler,t,a,r)),e.next_in+=a,e.total_in+=a,a)},Ym=(e,t)=>{let r=e.max_chain_length,n=e.strstart,a,i,o=e.prev_length,l=e.nice_match;const s=e.strstart>e.w_size-wa?e.strstart-(e.w_size-wa):0,u=e.window,c=e.w_mask,f=e.prev,d=e.strstart+bi;let h=u[n+o-1],y=u[n+o];e.prev_length>=e.good_match&&(r>>=2),l>e.lookahead&&(l=e.lookahead);do if(a=t,!(u[a+o]!==y||u[a+o-1]!==h||u[a]!==u[n]||u[++a]!==u[n+1])){n+=2,a++;do;while(u[++n]===u[++a]&&u[++n]===u[++a]&&u[++n]===u[++a]&&u[++n]===u[++a]&&u[++n]===u[++a]&&u[++n]===u[++a]&&u[++n]===u[++a]&&u[++n]===u[++a]&&n<d);if(i=bi-(d-n),n=d-bi,i>o){if(e.match_start=t,o=i,i>=l)break;h=u[n+o-1],y=u[n+o]}}while((t=f[t&c])>s&&--r!==0);return o<=e.lookahead?o:e.lookahead},Fo=e=>{const t=e.w_size;let r,n,a;do{if(n=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-wa)&&(e.window.set(e.window.subarray(t,t+t-n),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),kC(e),n+=t),e.strm.avail_in===0)break;if(r=Uf(e.strm,e.window,e.strstart+e.lookahead,n),e.lookahead+=r,e.lookahead+e.insert>=Ft)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=xi(e,e.ins_h,e.window[a+1]);e.insert&&(e.ins_h=xi(e,e.ins_h,e.window[a+Ft-1]),e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<Ft)););}while(e.lookahead<wa&&e.strm.avail_in!==0)},Zm=(e,t)=>{let r=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,n,a,i,o=0,l=e.strm.avail_in;do{if(n=65535,i=e.bi_valid+42>>3,e.strm.avail_out<i||(i=e.strm.avail_out-i,a=e.strstart-e.block_start,n>a+e.strm.avail_in&&(n=a+e.strm.avail_in),n>i&&(n=i),n<r&&(n===0&&t!==Pn||t===gi||n!==a+e.strm.avail_in)))break;o=t===Pn&&n===a+e.strm.avail_in?1:0,Ff(e,0,0,o),e.pending_buf[e.pending-4]=n,e.pending_buf[e.pending-3]=n>>8,e.pending_buf[e.pending-2]=~n,e.pending_buf[e.pending-1]=~n>>8,yn(e.strm),a&&(a>n&&(a=n),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+a),e.strm.next_out),e.strm.next_out+=a,e.strm.avail_out-=a,e.strm.total_out+=a,e.block_start+=a,n-=a),n&&(Uf(e.strm,e.strm.output,e.strm.next_out,n),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n)}while(o===0);return l-=e.strm.avail_in,l&&(l>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=l&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-l,e.strm.next_in),e.strstart),e.strstart+=l,e.insert+=l>e.w_size-e.insert?e.w_size-e.insert:l),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),o?zo:t!==gi&&t!==Pn&&e.strm.avail_in===0&&e.strstart===e.block_start?Io:(i=e.window_size-e.strstart,e.strm.avail_in>i&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,i+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),i>e.strm.avail_in&&(i=e.strm.avail_in),i&&(Uf(e.strm,e.window,e.strstart,i),e.strstart+=i,e.insert+=i>e.w_size-e.insert?e.w_size-e.insert:i),e.high_water<e.strstart&&(e.high_water=e.strstart),i=e.bi_valid+42>>3,i=e.pending_buf_size-i>65535?65535:e.pending_buf_size-i,r=i>e.w_size?e.w_size:i,a=e.strstart-e.block_start,(a>=r||(a||t===Pn)&&t!==gi&&e.strm.avail_in===0&&a<=i)&&(n=a>i?i:a,o=t===Pn&&e.strm.avail_in===0&&n===a?1:0,Ff(e,e.block_start,n,o),e.block_start+=n,yn(e.strm)),o?Vi:nn)},Hf=(e,t)=>{let r,n;for(;;){if(e.lookahead<wa){if(Fo(e),e.lookahead<wa&&t===gi)return nn;if(e.lookahead===0)break}if(r=0,e.lookahead>=Ft&&(e.ins_h=xi(e,e.ins_h,e.window[e.strstart+Ft-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),r!==0&&e.strstart-r<=e.w_size-wa&&(e.match_length=Ym(e,r)),e.match_length>=Ft)if(n=mi(e,e.strstart-e.match_start,e.match_length-Ft),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=Ft){e.match_length--;do e.strstart++,e.ins_h=xi(e,e.ins_h,e.window[e.strstart+Ft-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=xi(e,e.ins_h,e.window[e.strstart+1]);else n=mi(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(xn(e,!1),e.strm.avail_out===0))return nn}return e.insert=e.strstart<Ft-1?e.strstart:Ft-1,t===Pn?(xn(e,!0),e.strm.avail_out===0?Vi:zo):e.sym_next&&(xn(e,!1),e.strm.avail_out===0)?nn:Io},Oo=(e,t)=>{let r,n,a;for(;;){if(e.lookahead<wa){if(Fo(e),e.lookahead<wa&&t===gi)return nn;if(e.lookahead===0)break}if(r=0,e.lookahead>=Ft&&(e.ins_h=xi(e,e.ins_h,e.window[e.strstart+Ft-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=Ft-1,r!==0&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-wa&&(e.match_length=Ym(e,r),e.match_length<=5&&(e.strategy===uC||e.match_length===Ft&&e.strstart-e.match_start>4096)&&(e.match_length=Ft-1)),e.prev_length>=Ft&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-Ft,n=mi(e,e.strstart-1-e.prev_match,e.prev_length-Ft),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=a&&(e.ins_h=xi(e,e.ins_h,e.window[e.strstart+Ft-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=Ft-1,e.strstart++,n&&(xn(e,!1),e.strm.avail_out===0))return nn}else if(e.match_available){if(n=mi(e,0,e.window[e.strstart-1]),n&&xn(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return nn}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=mi(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<Ft-1?e.strstart:Ft-1,t===Pn?(xn(e,!0),e.strm.avail_out===0?Vi:zo):e.sym_next&&(xn(e,!1),e.strm.avail_out===0)?nn:Io},SC=(e,t)=>{let r,n,a,i;const o=e.window;for(;;){if(e.lookahead<=bi){if(Fo(e),e.lookahead<=bi&&t===gi)return nn;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=Ft&&e.strstart>0&&(a=e.strstart-1,n=o[a],n===o[++a]&&n===o[++a]&&n===o[++a])){i=e.strstart+bi;do;while(n===o[++a]&&n===o[++a]&&n===o[++a]&&n===o[++a]&&n===o[++a]&&n===o[++a]&&n===o[++a]&&n===o[++a]&&a<i);e.match_length=bi-(i-a),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=Ft?(r=mi(e,1,e.match_length-Ft),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=mi(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(xn(e,!1),e.strm.avail_out===0))return nn}return e.insert=0,t===Pn?(xn(e,!0),e.strm.avail_out===0?Vi:zo):e.sym_next&&(xn(e,!1),e.strm.avail_out===0)?nn:Io},CC=(e,t)=>{let r;for(;;){if(e.lookahead===0&&(Fo(e),e.lookahead===0)){if(t===gi)return nn;break}if(e.match_length=0,r=mi(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(xn(e,!1),e.strm.avail_out===0))return nn}return e.insert=0,t===Pn?(xn(e,!0),e.strm.avail_out===0?Vi:zo):e.sym_next&&(xn(e,!1),e.strm.avail_out===0)?nn:Io};function ka(e,t,r,n,a){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=a}const jl=[new ka(0,0,0,0,Zm),new ka(4,4,8,4,Hf),new ka(4,5,16,8,Hf),new ka(4,6,32,32,Hf),new ka(4,4,16,16,Oo),new ka(8,16,32,32,Oo),new ka(8,16,128,128,Oo),new ka(8,32,128,256,Oo),new ka(32,128,258,1024,Oo),new ka(32,258,258,4096,Oo)],AC=e=>{e.window_size=2*e.w_size,yi(e.head),e.max_lazy_match=jl[e.level].max_lazy,e.good_match=jl[e.level].good_length,e.nice_match=jl[e.level].nice_length,e.max_chain_length=jl[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=Ft-1,e.match_available=0,e.ins_h=0};function EC(){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=F0,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 Uint16Array(yC*2),this.dyn_dtree=new Uint16Array((2*gC+1)*2),this.bl_tree=new Uint16Array((2*bC+1)*2),yi(this.dyn_ltree),yi(this.dyn_dtree),yi(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(xC+1),this.heap=new Uint16Array(2*Pf+1),yi(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Pf+1),yi(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Gl=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==Do&&t.status!==Rf&&t.status!==Lf&&t.status!==Bf&&t.status!==Nf&&t.status!==$f&&t.status!==Gi&&t.status!==Ul?1:0},Jm=e=>{if(Gl(e))return qi(e,_a);e.total_in=e.total_out=0,e.data_type=hC;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?Rf:t.wrap?Do:Gi,e.adler=t.wrap===2?0:1,t.last_flush=-2,rC(t),Nr},Qm=e=>{const t=Jm(e);return t===Nr&&AC(e.state),t},TC=(e,t)=>Gl(e)||e.state.wrap!==2?_a:(e.state.gzhead=t,Nr),e2=(e,t,r,n,a,i)=>{if(!e)return _a;let o=1;if(t===sC&&(t=6),n<0?(o=0,n=-n):n>15&&(o=2,n-=16),a<1||a>pC||r!==F0||n<8||n>15||t<0||t>9||i<0||i>fC||n===8&&o!==1)return qi(e,_a);n===8&&(n=9);const l=new EC;return e.state=l,l.strm=e,l.status=Do,l.wrap=o,l.gzhead=null,l.w_bits=n,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=a+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+Ft-1)/Ft),l.window=new Uint8Array(l.w_size*2),l.head=new Uint16Array(l.hash_size),l.prev=new Uint16Array(l.w_size),l.lit_bufsize=1<<a+6,l.pending_buf_size=l.lit_bufsize*4,l.pending_buf=new Uint8Array(l.pending_buf_size),l.sym_buf=l.lit_bufsize,l.sym_end=(l.lit_bufsize-1)*3,l.level=t,l.strategy=i,l.method=r,Qm(e)},MC=(e,t)=>e2(e,t,F0,vC,mC,dC),DC=(e,t)=>{if(Gl(e)||t>Wm||t<0)return e?qi(e,_a):_a;const r=e.state;if(!e.output||e.avail_in!==0&&!e.input||r.status===Ul&&t!==Pn)return qi(e,e.avail_out===0?Of:_a);const n=r.last_flush;if(r.last_flush=t,r.pending!==0){if(yn(e),e.avail_out===0)return r.last_flush=-1,Nr}else if(e.avail_in===0&&Xm(t)<=Xm(n)&&t!==Pn)return qi(e,Of);if(r.status===Ul&&e.avail_in!==0)return qi(e,Of);if(r.status===Do&&r.wrap===0&&(r.status=Gi),r.status===Do){let a=F0+(r.w_bits-8<<4)<<8,i=-1;if(r.strategy>=z0||r.level<2?i=0:r.level<6?i=1:r.level===6?i=2:i=3,a|=i<<6,r.strstart!==0&&(a|=_C),a+=31-a%31,Hl(r,a),r.strstart!==0&&(Hl(r,e.adler>>>16),Hl(r,e.adler&65535)),e.adler=1,r.status=Gi,yn(e),r.pending!==0)return r.last_flush=-1,Nr}if(r.status===Rf){if(e.adler=0,jt(r,31),jt(r,139),jt(r,8),r.gzhead)jt(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),jt(r,r.gzhead.time&255),jt(r,r.gzhead.time>>8&255),jt(r,r.gzhead.time>>16&255),jt(r,r.gzhead.time>>24&255),jt(r,r.level===9?2:r.strategy>=z0||r.level<2?4:0),jt(r,r.gzhead.os&255),r.gzhead.extra&&r.gzhead.extra.length&&(jt(r,r.gzhead.extra.length&255),jt(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=Mr(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=Lf;else if(jt(r,0),jt(r,0),jt(r,0),jt(r,0),jt(r,0),jt(r,r.level===9?2:r.strategy>=z0||r.level<2?4:0),jt(r,wC),r.status=Gi,yn(e),r.pending!==0)return r.last_flush=-1,Nr}if(r.status===Lf){if(r.gzhead.extra){let a=r.pending,i=(r.gzhead.extra.length&65535)-r.gzindex;for(;r.pending+i>r.pending_buf_size;){let l=r.pending_buf_size-r.pending;if(r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+l),r.pending),r.pending=r.pending_buf_size,r.gzhead.hcrc&&r.pending>a&&(e.adler=Mr(e.adler,r.pending_buf,r.pending-a,a)),r.gzindex+=l,yn(e),r.pending!==0)return r.last_flush=-1,Nr;a=0,i-=l}let o=new Uint8Array(r.gzhead.extra);r.pending_buf.set(o.subarray(r.gzindex,r.gzindex+i),r.pending),r.pending+=i,r.gzhead.hcrc&&r.pending>a&&(e.adler=Mr(e.adler,r.pending_buf,r.pending-a,a)),r.gzindex=0}r.status=Bf}if(r.status===Bf){if(r.gzhead.name){let a=r.pending,i;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>a&&(e.adler=Mr(e.adler,r.pending_buf,r.pending-a,a)),yn(e),r.pending!==0)return r.last_flush=-1,Nr;a=0}r.gzindex<r.gzhead.name.length?i=r.gzhead.name.charCodeAt(r.gzindex++)&255:i=0,jt(r,i)}while(i!==0);r.gzhead.hcrc&&r.pending>a&&(e.adler=Mr(e.adler,r.pending_buf,r.pending-a,a)),r.gzindex=0}r.status=Nf}if(r.status===Nf){if(r.gzhead.comment){let a=r.pending,i;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>a&&(e.adler=Mr(e.adler,r.pending_buf,r.pending-a,a)),yn(e),r.pending!==0)return r.last_flush=-1,Nr;a=0}r.gzindex<r.gzhead.comment.length?i=r.gzhead.comment.charCodeAt(r.gzindex++)&255:i=0,jt(r,i)}while(i!==0);r.gzhead.hcrc&&r.pending>a&&(e.adler=Mr(e.adler,r.pending_buf,r.pending-a,a))}r.status=$f}if(r.status===$f){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size&&(yn(e),r.pending!==0))return r.last_flush=-1,Nr;jt(r,e.adler&255),jt(r,e.adler>>8&255),e.adler=0}if(r.status=Gi,yn(e),r.pending!==0)return r.last_flush=-1,Nr}if(e.avail_in!==0||r.lookahead!==0||t!==gi&&r.status!==Ul){let a=r.level===0?Zm(r,t):r.strategy===z0?CC(r,t):r.strategy===cC?SC(r,t):jl[r.level].func(r,t);if((a===Vi||a===zo)&&(r.status=Ul),a===nn||a===Vi)return e.avail_out===0&&(r.last_flush=-1),Nr;if(a===Io&&(t===iC?aC(r):t!==Wm&&(Ff(r,0,0,!1),t===oC&&(yi(r.head),r.lookahead===0&&(r.strstart=0,r.block_start=0,r.insert=0))),yn(e),e.avail_out===0))return r.last_flush=-1,Nr}return t!==Pn?Nr:r.wrap<=0?Km:(r.wrap===2?(jt(r,e.adler&255),jt(r,e.adler>>8&255),jt(r,e.adler>>16&255),jt(r,e.adler>>24&255),jt(r,e.total_in&255),jt(r,e.total_in>>8&255),jt(r,e.total_in>>16&255),jt(r,e.total_in>>24&255)):(Hl(r,e.adler>>>16),Hl(r,e.adler&65535)),yn(e),r.wrap>0&&(r.wrap=-r.wrap),r.pending!==0?Nr:Km)},IC=e=>{if(Gl(e))return _a;const t=e.state.status;return e.state=null,t===Gi?qi(e,lC):Nr},zC=(e,t)=>{let r=t.length;if(Gl(e))return _a;const n=e.state,a=n.wrap;if(a===2||a===1&&n.status!==Do||n.lookahead)return _a;if(a===1&&(e.adler=$l(e.adler,t,r,0)),n.wrap=0,r>=n.w_size){a===0&&(yi(n.head),n.strstart=0,n.block_start=0,n.insert=0);let s=new Uint8Array(n.w_size);s.set(t.subarray(r-n.w_size,r),0),t=s,r=n.w_size}const i=e.avail_in,o=e.next_in,l=e.input;for(e.avail_in=r,e.next_in=0,e.input=t,Fo(n);n.lookahead>=Ft;){let s=n.strstart,u=n.lookahead-(Ft-1);do n.ins_h=xi(n,n.ins_h,n.window[s+Ft-1]),n.prev[s&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=s,s++;while(--u);n.strstart=s,n.lookahead=Ft-1,Fo(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=Ft-1,n.match_available=0,e.next_in=o,e.input=l,e.avail_in=i,n.wrap=a,Nr};var FC=MC,OC=e2,PC=Qm,RC=Jm,LC=TC,BC=DC,NC=IC,$C=zC,UC="pako deflate (from Nodeca project)",Vl={deflateInit:FC,deflateInit2:OC,deflateReset:PC,deflateResetKeep:RC,deflateSetHeader:LC,deflate:BC,deflateEnd:NC,deflateSetDictionary:$C,deflateInfo:UC};const HC=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var jC=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const r=t.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(const n in r)HC(r,n)&&(e[n]=r[n])}}return e},GC=e=>{let t=0;for(let n=0,a=e.length;n<a;n++)t+=e[n].length;const r=new Uint8Array(t);for(let n=0,a=0,i=e.length;n<i;n++){let o=e[n];r.set(o,a),a+=o.length}return r},O0={assign:jC,flattenChunks:GC};let t2=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{t2=!1}const ql=new Uint8Array(256);for(let e=0;e<256;e++)ql[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;ql[254]=ql[254]=1;var VC=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,r,n,a,i,o=e.length,l=0;for(a=0;a<o;a++)r=e.charCodeAt(a),(r&64512)===55296&&a+1<o&&(n=e.charCodeAt(a+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),a++)),l+=r<128?1:r<2048?2:r<65536?3:4;for(t=new Uint8Array(l),i=0,a=0;i<l;a++)r=e.charCodeAt(a),(r&64512)===55296&&a+1<o&&(n=e.charCodeAt(a+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),a++)),r<128?t[i++]=r:r<2048?(t[i++]=192|r>>>6,t[i++]=128|r&63):r<65536?(t[i++]=224|r>>>12,t[i++]=128|r>>>6&63,t[i++]=128|r&63):(t[i++]=240|r>>>18,t[i++]=128|r>>>12&63,t[i++]=128|r>>>6&63,t[i++]=128|r&63);return t};const qC=(e,t)=>{if(t<65534&&e.subarray&&t2)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let r="";for(let n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r};var WC=(e,t)=>{const r=t||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let n,a;const i=new Array(r*2);for(a=0,n=0;n<r;){let o=e[n++];if(o<128){i[a++]=o;continue}let l=ql[o];if(l>4){i[a++]=65533,n+=l-1;continue}for(o&=l===2?31:l===3?15:7;l>1&&n<r;)o=o<<6|e[n++]&63,l--;if(l>1){i[a++]=65533;continue}o<65536?i[a++]=o:(o-=65536,i[a++]=55296|o>>10&1023,i[a++]=56320|o&1023)}return qC(i,a)},KC=(e,t)=>{t=t||e.length,t>e.length&&(t=e.length);let r=t-1;for(;r>=0&&(e[r]&192)===128;)r--;return r<0||r===0?t:r+ql[e[r]]>t?r:t},Wl={string2buf:VC,buf2string:WC,utf8border:KC};function XC(){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}var r2=XC;const n2=Object.prototype.toString,{Z_NO_FLUSH:YC,Z_SYNC_FLUSH:ZC,Z_FULL_FLUSH:JC,Z_FINISH:QC,Z_OK:P0,Z_STREAM_END:eA,Z_DEFAULT_COMPRESSION:tA,Z_DEFAULT_STRATEGY:rA,Z_DEFLATED:nA}=I0;function R0(e){this.options=O0.assign({level:tA,method:nA,chunkSize:16384,windowBits:15,memLevel:8,strategy:rA},e||{});let 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 r2,this.strm.avail_out=0;let r=Vl.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==P0)throw new Error(ji[r]);if(t.header&&Vl.deflateSetHeader(this.strm,t.header),t.dictionary){let n;if(typeof t.dictionary=="string"?n=Wl.string2buf(t.dictionary):n2.call(t.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(t.dictionary):n=t.dictionary,r=Vl.deflateSetDictionary(this.strm,n),r!==P0)throw new Error(ji[r]);this._dict_set=!0}}R0.prototype.push=function(e,t){const r=this.strm,n=this.options.chunkSize;let a,i;if(this.ended)return!1;for(t===~~t?i=t:i=t===!0?QC:YC,typeof e=="string"?r.input=Wl.string2buf(e):n2.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){if(r.avail_out===0&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),(i===ZC||i===JC)&&r.avail_out<=6){this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;continue}if(a=Vl.deflate(r,i),a===eA)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=Vl.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===P0;if(r.avail_out===0){this.onData(r.output);continue}if(i>0&&r.next_out>0){this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;continue}if(r.avail_in===0)break}return!0},R0.prototype.onData=function(e){this.chunks.push(e)},R0.prototype.onEnd=function(e){e===P0&&(this.result=O0.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function aA(e,t){const r=new R0(t);if(r.push(e,!0),r.err)throw r.msg||ji[r.err];return r.result}var iA=aA,oA={deflate:iA};const L0=16209,lA=16191;var sA=function(t,r){let n,a,i,o,l,s,u,c,f,d,h,y,p,x,g,m,b,v,S,C,A,_,E,M;const z=t.state;n=t.next_in,E=t.input,a=n+(t.avail_in-5),i=t.next_out,M=t.output,o=i-(r-t.avail_out),l=i+(t.avail_out-257),s=z.dmax,u=z.wsize,c=z.whave,f=z.wnext,d=z.window,h=z.hold,y=z.bits,p=z.lencode,x=z.distcode,g=(1<<z.lenbits)-1,m=(1<<z.distbits)-1;e:do{y<15&&(h+=E[n++]<<y,y+=8,h+=E[n++]<<y,y+=8),b=p[h&g];t:for(;;){if(v=b>>>24,h>>>=v,y-=v,v=b>>>16&255,v===0)M[i++]=b&65535;else if(v&16){S=b&65535,v&=15,v&&(y<v&&(h+=E[n++]<<y,y+=8),S+=h&(1<<v)-1,h>>>=v,y-=v),y<15&&(h+=E[n++]<<y,y+=8,h+=E[n++]<<y,y+=8),b=x[h&m];r:for(;;){if(v=b>>>24,h>>>=v,y-=v,v=b>>>16&255,v&16){if(C=b&65535,v&=15,y<v&&(h+=E[n++]<<y,y+=8,y<v&&(h+=E[n++]<<y,y+=8)),C+=h&(1<<v)-1,C>s){t.msg="invalid distance too far back",z.mode=L0;break e}if(h>>>=v,y-=v,v=i-o,C>v){if(v=C-v,v>c&&z.sane){t.msg="invalid distance too far back",z.mode=L0;break e}if(A=0,_=d,f===0){if(A+=u-v,v<S){S-=v;do M[i++]=d[A++];while(--v);A=i-C,_=M}}else if(f<v){if(A+=u+f-v,v-=f,v<S){S-=v;do M[i++]=d[A++];while(--v);if(A=0,f<S){v=f,S-=v;do M[i++]=d[A++];while(--v);A=i-C,_=M}}}else if(A+=f-v,v<S){S-=v;do M[i++]=d[A++];while(--v);A=i-C,_=M}for(;S>2;)M[i++]=_[A++],M[i++]=_[A++],M[i++]=_[A++],S-=3;S&&(M[i++]=_[A++],S>1&&(M[i++]=_[A++]))}else{A=i-C;do M[i++]=M[A++],M[i++]=M[A++],M[i++]=M[A++],S-=3;while(S>2);S&&(M[i++]=M[A++],S>1&&(M[i++]=M[A++]))}}else if(v&64){t.msg="invalid distance code",z.mode=L0;break e}else{b=x[(b&65535)+(h&(1<<v)-1)];continue r}break}}else if(v&64)if(v&32){z.mode=lA;break e}else{t.msg="invalid literal/length code",z.mode=L0;break e}else{b=p[(b&65535)+(h&(1<<v)-1)];continue t}break}}while(n<a&&i<l);S=y>>3,n-=S,y-=S<<3,h&=(1<<y)-1,t.next_in=n,t.next_out=i,t.avail_in=n<a?5+(a-n):5-(n-a),t.avail_out=i<l?257+(l-i):257-(i-l),z.hold=h,z.bits=y};const Po=15,a2=852,i2=592,o2=0,jf=1,l2=2,uA=new Uint16Array([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]),cA=new Uint8Array([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]),fA=new Uint16Array([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]),dA=new Uint8Array([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]);var Kl=(e,t,r,n,a,i,o,l)=>{const s=l.bits;let u=0,c=0,f=0,d=0,h=0,y=0,p=0,x=0,g=0,m=0,b,v,S,C,A,_=null,E;const M=new Uint16Array(Po+1),z=new Uint16Array(Po+1);let N=null,R,$,q;for(u=0;u<=Po;u++)M[u]=0;for(c=0;c<n;c++)M[t[r+c]]++;for(h=s,d=Po;d>=1&&M[d]===0;d--);if(h>d&&(h=d),d===0)return a[i++]=1<<24|64<<16|0,a[i++]=1<<24|64<<16|0,l.bits=1,0;for(f=1;f<d&&M[f]===0;f++);for(h<f&&(h=f),x=1,u=1;u<=Po;u++)if(x<<=1,x-=M[u],x<0)return-1;if(x>0&&(e===o2||d!==1))return-1;for(z[1]=0,u=1;u<Po;u++)z[u+1]=z[u]+M[u];for(c=0;c<n;c++)t[r+c]!==0&&(o[z[t[r+c]]++]=c);if(e===o2?(_=N=o,E=20):e===jf?(_=uA,N=cA,E=257):(_=fA,N=dA,E=0),m=0,c=0,u=f,A=i,y=h,p=0,S=-1,g=1<<h,C=g-1,e===jf&&g>a2||e===l2&&g>i2)return 1;for(;;){R=u-p,o[c]+1<E?($=0,q=o[c]):o[c]>=E?($=N[o[c]-E],q=_[o[c]-E]):($=96,q=0),b=1<<u-p,v=1<<y,f=v;do v-=b,a[A+(m>>p)+v]=R<<24|$<<16|q|0;while(v!==0);for(b=1<<u-1;m&b;)b>>=1;if(b!==0?(m&=b-1,m+=b):m=0,c++,--M[u]===0){if(u===d)break;u=t[r+o[c]]}if(u>h&&(m&C)!==S){for(p===0&&(p=h),A+=f,y=u-p,x=1<<y;y+p<d&&(x-=M[y+p],!(x<=0));)y++,x<<=1;if(g+=1<<y,e===jf&&g>a2||e===l2&&g>i2)return 1;S=m&C,a[S]=h<<24|y<<16|A-i|0}}return m!==0&&(a[A+m]=u-p<<24|64<<16|0),l.bits=h,0};const hA=0,s2=1,u2=2,{Z_FINISH:c2,Z_BLOCK:pA,Z_TREES:B0,Z_OK:Wi,Z_STREAM_END:vA,Z_NEED_DICT:mA,Z_STREAM_ERROR:Rn,Z_DATA_ERROR:f2,Z_MEM_ERROR:d2,Z_BUF_ERROR:gA,Z_DEFLATED:h2}=I0,N0=16180,p2=16181,v2=16182,m2=16183,g2=16184,b2=16185,y2=16186,x2=16187,_2=16188,w2=16189,$0=16190,Va=16191,Gf=16192,k2=16193,Vf=16194,S2=16195,C2=16196,A2=16197,E2=16198,U0=16199,H0=16200,T2=16201,M2=16202,D2=16203,I2=16204,z2=16205,qf=16206,F2=16207,O2=16208,sr=16209,P2=16210,R2=16211,bA=852,yA=592,xA=15,L2=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function _A(){this.strm=null,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 Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Ki=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<N0||t.mode>R2?1:0},B2=e=>{if(Ki(e))return Rn;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=N0,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(bA),t.distcode=t.distdyn=new Int32Array(yA),t.sane=1,t.back=-1,Wi},N2=e=>{if(Ki(e))return Rn;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,B2(e)},$2=(e,t)=>{let r;if(Ki(e))return Rn;const n=e.state;return t<0?(r=0,t=-t):(r=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?Rn:(n.window!==null&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,N2(e))},U2=(e,t)=>{if(!e)return Rn;const r=new _A;e.state=r,r.strm=e,r.window=null,r.mode=N0;const n=$2(e,t);return n!==Wi&&(e.state=null),n},wA=e=>U2(e,xA);let H2=!0,Wf,Kf;const kA=e=>{if(H2){Wf=new Int32Array(512),Kf=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Kl(s2,e.lens,0,288,Wf,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Kl(u2,e.lens,0,32,Kf,0,e.work,{bits:5}),H2=!1}e.lencode=Wf,e.lenbits=9,e.distcode=Kf,e.distbits=5},j2=(e,t,r,n)=>{let a;const i=e.state;return i.window===null&&(i.wsize=1<<i.wbits,i.wnext=0,i.whave=0,i.window=new Uint8Array(i.wsize)),n>=i.wsize?(i.window.set(t.subarray(r-i.wsize,r),0),i.wnext=0,i.whave=i.wsize):(a=i.wsize-i.wnext,a>n&&(a=n),i.window.set(t.subarray(r-n,r-n+a),i.wnext),n-=a,n?(i.window.set(t.subarray(r-n,r),0),i.wnext=n,i.whave=i.wsize):(i.wnext+=a,i.wnext===i.wsize&&(i.wnext=0),i.whave<i.wsize&&(i.whave+=a))),0},SA=(e,t)=>{let r,n,a,i,o,l,s,u,c,f,d,h,y,p,x=0,g,m,b,v,S,C,A,_;const E=new Uint8Array(4);let M,z;const N=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Ki(e)||!e.output||!e.input&&e.avail_in!==0)return Rn;r=e.state,r.mode===Va&&(r.mode=Gf),o=e.next_out,a=e.output,s=e.avail_out,i=e.next_in,n=e.input,l=e.avail_in,u=r.hold,c=r.bits,f=l,d=s,_=Wi;e:for(;;)switch(r.mode){case N0:if(r.wrap===0){r.mode=Gf;break}for(;c<16;){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}if(r.wrap&2&&u===35615){r.wbits===0&&(r.wbits=15),r.check=0,E[0]=u&255,E[1]=u>>>8&255,r.check=Mr(r.check,E,2,0),u=0,c=0,r.mode=p2;break}if(r.head&&(r.head.done=!1),!(r.wrap&1)||(((u&255)<<8)+(u>>8))%31){e.msg="incorrect header check",r.mode=sr;break}if((u&15)!==h2){e.msg="unknown compression method",r.mode=sr;break}if(u>>>=4,c-=4,A=(u&15)+8,r.wbits===0&&(r.wbits=A),A>15||A>r.wbits){e.msg="invalid window size",r.mode=sr;break}r.dmax=1<<r.wbits,r.flags=0,e.adler=r.check=1,r.mode=u&512?w2:Va,u=0,c=0;break;case p2:for(;c<16;){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}if(r.flags=u,(r.flags&255)!==h2){e.msg="unknown compression method",r.mode=sr;break}if(r.flags&57344){e.msg="unknown header flags set",r.mode=sr;break}r.head&&(r.head.text=u>>8&1),r.flags&512&&r.wrap&4&&(E[0]=u&255,E[1]=u>>>8&255,r.check=Mr(r.check,E,2,0)),u=0,c=0,r.mode=v2;case v2:for(;c<32;){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}r.head&&(r.head.time=u),r.flags&512&&r.wrap&4&&(E[0]=u&255,E[1]=u>>>8&255,E[2]=u>>>16&255,E[3]=u>>>24&255,r.check=Mr(r.check,E,4,0)),u=0,c=0,r.mode=m2;case m2:for(;c<16;){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}r.head&&(r.head.xflags=u&255,r.head.os=u>>8),r.flags&512&&r.wrap&4&&(E[0]=u&255,E[1]=u>>>8&255,r.check=Mr(r.check,E,2,0)),u=0,c=0,r.mode=g2;case g2:if(r.flags&1024){for(;c<16;){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}r.length=u,r.head&&(r.head.extra_len=u),r.flags&512&&r.wrap&4&&(E[0]=u&255,E[1]=u>>>8&255,r.check=Mr(r.check,E,2,0)),u=0,c=0}else r.head&&(r.head.extra=null);r.mode=b2;case b2:if(r.flags&1024&&(h=r.length,h>l&&(h=l),h&&(r.head&&(A=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(n.subarray(i,i+h),A)),r.flags&512&&r.wrap&4&&(r.check=Mr(r.check,n,h,i)),l-=h,i+=h,r.length-=h),r.length))break e;r.length=0,r.mode=y2;case y2:if(r.flags&2048){if(l===0)break e;h=0;do A=n[i+h++],r.head&&A&&r.length<65536&&(r.head.name+=String.fromCharCode(A));while(A&&h<l);if(r.flags&512&&r.wrap&4&&(r.check=Mr(r.check,n,h,i)),l-=h,i+=h,A)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=x2;case x2:if(r.flags&4096){if(l===0)break e;h=0;do A=n[i+h++],r.head&&A&&r.length<65536&&(r.head.comment+=String.fromCharCode(A));while(A&&h<l);if(r.flags&512&&r.wrap&4&&(r.check=Mr(r.check,n,h,i)),l-=h,i+=h,A)break e}else r.head&&(r.head.comment=null);r.mode=_2;case _2:if(r.flags&512){for(;c<16;){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}if(r.wrap&4&&u!==(r.check&65535)){e.msg="header crc mismatch",r.mode=sr;break}u=0,c=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=Va;break;case w2:for(;c<32;){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}e.adler=r.check=L2(u),u=0,c=0,r.mode=$0;case $0:if(r.havedict===0)return e.next_out=o,e.avail_out=s,e.next_in=i,e.avail_in=l,r.hold=u,r.bits=c,mA;e.adler=r.check=1,r.mode=Va;case Va:if(t===pA||t===B0)break e;case Gf:if(r.last){u>>>=c&7,c-=c&7,r.mode=qf;break}for(;c<3;){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}switch(r.last=u&1,u>>>=1,c-=1,u&3){case 0:r.mode=k2;break;case 1:if(kA(r),r.mode=U0,t===B0){u>>>=2,c-=2;break e}break;case 2:r.mode=C2;break;case 3:e.msg="invalid block type",r.mode=sr}u>>>=2,c-=2;break;case k2:for(u>>>=c&7,c-=c&7;c<32;){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}if((u&65535)!==(u>>>16^65535)){e.msg="invalid stored block lengths",r.mode=sr;break}if(r.length=u&65535,u=0,c=0,r.mode=Vf,t===B0)break e;case Vf:r.mode=S2;case S2:if(h=r.length,h){if(h>l&&(h=l),h>s&&(h=s),h===0)break e;a.set(n.subarray(i,i+h),o),l-=h,i+=h,s-=h,o+=h,r.length-=h;break}r.mode=Va;break;case C2:for(;c<14;){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}if(r.nlen=(u&31)+257,u>>>=5,c-=5,r.ndist=(u&31)+1,u>>>=5,c-=5,r.ncode=(u&15)+4,u>>>=4,c-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=sr;break}r.have=0,r.mode=A2;case A2:for(;r.have<r.ncode;){for(;c<3;){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}r.lens[N[r.have++]]=u&7,u>>>=3,c-=3}for(;r.have<19;)r.lens[N[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,M={bits:r.lenbits},_=Kl(hA,r.lens,0,19,r.lencode,0,r.work,M),r.lenbits=M.bits,_){e.msg="invalid code lengths set",r.mode=sr;break}r.have=0,r.mode=E2;case E2:for(;r.have<r.nlen+r.ndist;){for(;x=r.lencode[u&(1<<r.lenbits)-1],g=x>>>24,m=x>>>16&255,b=x&65535,!(g<=c);){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}if(b<16)u>>>=g,c-=g,r.lens[r.have++]=b;else{if(b===16){for(z=g+2;c<z;){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}if(u>>>=g,c-=g,r.have===0){e.msg="invalid bit length repeat",r.mode=sr;break}A=r.lens[r.have-1],h=3+(u&3),u>>>=2,c-=2}else if(b===17){for(z=g+3;c<z;){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}u>>>=g,c-=g,A=0,h=3+(u&7),u>>>=3,c-=3}else{for(z=g+7;c<z;){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}u>>>=g,c-=g,A=0,h=11+(u&127),u>>>=7,c-=7}if(r.have+h>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=sr;break}for(;h--;)r.lens[r.have++]=A}}if(r.mode===sr)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=sr;break}if(r.lenbits=9,M={bits:r.lenbits},_=Kl(s2,r.lens,0,r.nlen,r.lencode,0,r.work,M),r.lenbits=M.bits,_){e.msg="invalid literal/lengths set",r.mode=sr;break}if(r.distbits=6,r.distcode=r.distdyn,M={bits:r.distbits},_=Kl(u2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,M),r.distbits=M.bits,_){e.msg="invalid distances set",r.mode=sr;break}if(r.mode=U0,t===B0)break e;case U0:r.mode=H0;case H0:if(l>=6&&s>=258){e.next_out=o,e.avail_out=s,e.next_in=i,e.avail_in=l,r.hold=u,r.bits=c,sA(e,d),o=e.next_out,a=e.output,s=e.avail_out,i=e.next_in,n=e.input,l=e.avail_in,u=r.hold,c=r.bits,r.mode===Va&&(r.back=-1);break}for(r.back=0;x=r.lencode[u&(1<<r.lenbits)-1],g=x>>>24,m=x>>>16&255,b=x&65535,!(g<=c);){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}if(m&&!(m&240)){for(v=g,S=m,C=b;x=r.lencode[C+((u&(1<<v+S)-1)>>v)],g=x>>>24,m=x>>>16&255,b=x&65535,!(v+g<=c);){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}u>>>=v,c-=v,r.back+=v}if(u>>>=g,c-=g,r.back+=g,r.length=b,m===0){r.mode=z2;break}if(m&32){r.back=-1,r.mode=Va;break}if(m&64){e.msg="invalid literal/length code",r.mode=sr;break}r.extra=m&15,r.mode=T2;case T2:if(r.extra){for(z=r.extra;c<z;){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}r.length+=u&(1<<r.extra)-1,u>>>=r.extra,c-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=M2;case M2:for(;x=r.distcode[u&(1<<r.distbits)-1],g=x>>>24,m=x>>>16&255,b=x&65535,!(g<=c);){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}if(!(m&240)){for(v=g,S=m,C=b;x=r.distcode[C+((u&(1<<v+S)-1)>>v)],g=x>>>24,m=x>>>16&255,b=x&65535,!(v+g<=c);){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}u>>>=v,c-=v,r.back+=v}if(u>>>=g,c-=g,r.back+=g,m&64){e.msg="invalid distance code",r.mode=sr;break}r.offset=b,r.extra=m&15,r.mode=D2;case D2:if(r.extra){for(z=r.extra;c<z;){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}r.offset+=u&(1<<r.extra)-1,u>>>=r.extra,c-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=sr;break}r.mode=I2;case I2:if(s===0)break e;if(h=d-s,r.offset>h){if(h=r.offset-h,h>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=sr;break}h>r.wnext?(h-=r.wnext,y=r.wsize-h):y=r.wnext-h,h>r.length&&(h=r.length),p=r.window}else p=a,y=o-r.offset,h=r.length;h>s&&(h=s),s-=h,r.length-=h;do a[o++]=p[y++];while(--h);r.length===0&&(r.mode=H0);break;case z2:if(s===0)break e;a[o++]=r.length,s--,r.mode=H0;break;case qf:if(r.wrap){for(;c<32;){if(l===0)break e;l--,u|=n[i++]<<c,c+=8}if(d-=s,e.total_out+=d,r.total+=d,r.wrap&4&&d&&(e.adler=r.check=r.flags?Mr(r.check,a,d,o-d):$l(r.check,a,d,o-d)),d=s,r.wrap&4&&(r.flags?u:L2(u))!==r.check){e.msg="incorrect data check",r.mode=sr;break}u=0,c=0}r.mode=F2;case F2:if(r.wrap&&r.flags){for(;c<32;){if(l===0)break e;l--,u+=n[i++]<<c,c+=8}if(r.wrap&4&&u!==(r.total&4294967295)){e.msg="incorrect length check",r.mode=sr;break}u=0,c=0}r.mode=O2;case O2:_=vA;break e;case sr:_=f2;break e;case P2:return d2;case R2:default:return Rn}return e.next_out=o,e.avail_out=s,e.next_in=i,e.avail_in=l,r.hold=u,r.bits=c,(r.wsize||d!==e.avail_out&&r.mode<sr&&(r.mode<qf||t!==c2))&&j2(e,e.output,e.next_out,d-e.avail_out),f-=e.avail_in,d-=e.avail_out,e.total_in+=f,e.total_out+=d,r.total+=d,r.wrap&4&&d&&(e.adler=r.check=r.flags?Mr(r.check,a,d,e.next_out-d):$l(r.check,a,d,e.next_out-d)),e.data_type=r.bits+(r.last?64:0)+(r.mode===Va?128:0)+(r.mode===U0||r.mode===Vf?256:0),(f===0&&d===0||t===c2)&&_===Wi&&(_=gA),_},CA=e=>{if(Ki(e))return Rn;let t=e.state;return t.window&&(t.window=null),e.state=null,Wi},AA=(e,t)=>{if(Ki(e))return Rn;const r=e.state;return r.wrap&2?(r.head=t,t.done=!1,Wi):Rn},EA=(e,t)=>{const r=t.length;let n,a,i;return Ki(e)||(n=e.state,n.wrap!==0&&n.mode!==$0)?Rn:n.mode===$0&&(a=1,a=$l(a,t,r,0),a!==n.check)?f2:(i=j2(e,t,r,r),i?(n.mode=P2,d2):(n.havedict=1,Wi))};var TA=N2,MA=$2,DA=B2,IA=wA,zA=U2,FA=SA,OA=CA,PA=AA,RA=EA,LA="pako inflate (from Nodeca project)",qa={inflateReset:TA,inflateReset2:MA,inflateResetKeep:DA,inflateInit:IA,inflateInit2:zA,inflate:FA,inflateEnd:OA,inflateGetHeader:PA,inflateSetDictionary:RA,inflateInfo:LA};function BA(){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}var NA=BA;const G2=Object.prototype.toString,{Z_NO_FLUSH:$A,Z_FINISH:UA,Z_OK:Xl,Z_STREAM_END:Xf,Z_NEED_DICT:Yf,Z_STREAM_ERROR:HA,Z_DATA_ERROR:V2,Z_MEM_ERROR:jA}=I0;function j0(e){this.options=O0.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});const 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&&!(e&&e.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 r2,this.strm.avail_out=0;let r=qa.inflateInit2(this.strm,t.windowBits);if(r!==Xl)throw new Error(ji[r]);if(this.header=new NA,qa.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Wl.string2buf(t.dictionary):G2.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=qa.inflateSetDictionary(this.strm,t.dictionary),r!==Xl)))throw new Error(ji[r])}j0.prototype.push=function(e,t){const r=this.strm,n=this.options.chunkSize,a=this.options.dictionary;let i,o,l;if(this.ended)return!1;for(t===~~t?o=t:o=t===!0?UA:$A,G2.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){for(r.avail_out===0&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),i=qa.inflate(r,o),i===Yf&&a&&(i=qa.inflateSetDictionary(r,a),i===Xl?i=qa.inflate(r,o):i===V2&&(i=Yf));r.avail_in>0&&i===Xf&&r.state.wrap>0&&e[r.next_in]!==0;)qa.inflateReset(r),i=qa.inflate(r,o);switch(i){case HA:case V2:case Yf:case jA:return this.onEnd(i),this.ended=!0,!1}if(l=r.avail_out,r.next_out&&(r.avail_out===0||i===Xf))if(this.options.to==="string"){let s=Wl.utf8border(r.output,r.next_out),u=r.next_out-s,c=Wl.buf2string(r.output,s);r.next_out=u,r.avail_out=n-u,u&&r.output.set(r.output.subarray(s,s+u),0),this.onData(c)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(!(i===Xl&&l===0)){if(i===Xf)return i=qa.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,!0;if(r.avail_in===0)break}}return!0},j0.prototype.onData=function(e){this.chunks.push(e)},j0.prototype.onEnd=function(e){e===Xl&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=O0.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function GA(e,t){const r=new j0(t);if(r.push(e),r.err)throw r.msg||ji[r.err];return r.result}var VA=GA,qA={inflate:VA};const{deflate:WA}=oA,{inflate:KA}=qA;var XA=WA,YA=KA,Yl=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),G0=4017,V0=799,q0=3406,W0=2276,K0=1567,X0=3784,Ro=5793,Y0=2896,ZA=100,q2=64*1024*1024,Zf=0;function Lo(e){var t=Zf+e;if(t>q2){var r=Math.ceil((t-q2)/1024/1024);throw new Error("Max memory limit exceeded by at least ".concat(r,"MB"))}Zf=t}function JA(e,t){for(var r=16;r>0&&!e[r-1];)r--;for(var n=[{children:[],index:0}],a=0,i=n[0],o=0;o<r;o++){for(var l=0;l<e[o];l++){for(i=n.pop(),i.children[i.index]=t[a];i.index>0;){if(n.length===0)throw new Error("Could not recreate Huffman Table");i=n.pop()}for(i.index++,n.push(i);n.length<=o;){var s={children:[],index:0};n.push(s),i.children[i.index]=s.children,i=s}a++}if(o+1<r){var s={children:[],index:0};n.push(s),i.children[i.index]=s.children,i=s}}return n[0].children}function QA(e,t,r,n,a,i,o,l,s){var u=r.mcusPerLine,c=r.progressive,f=t,d=0,h=0;function y(){if(h>0)return h--,d>>h&1;if(d=e[t++],d==255){var Te=e[t++];if(Te)throw new Error("unexpected marker: ".concat((d<<8|Te).toString(16)))}return h=7,d>>>7}function p(Te){for(var Se=Te;;){if(Se=Se[y()],typeof Se=="number")return Se;if(Se===void 0)throw new Error("invalid huffman sequence")}}function x(Te){for(var Se=0;Te>0;)Se=Se<<1|y(),Te--;return Se}function g(Te){var Se=x(Te);return Se>=1<<Te-1?Se:Se+(-1<<Te)+1}function m(Te,Se){var Ie=p(Te.huffmanTableDC),Le=Ie===0?0:g(Ie);Se[0]=Te.pred+=Le;for(var Ee=1;Ee<64;){var Be=p(Te.huffmanTableAC),be=Be&15,ye=Be>>4;if(be===0){if(ye<15)break;Ee+=16;continue}Ee+=ye;var P=Yl[Ee];Se[P]=g(be),Ee++}}function b(Te,Se){var Ie=p(Te.huffmanTableDC),Le=Ie===0?0:g(Ie)<<s;Se[0]=Te.pred+=Le}function v(Te,Se){Se[0]|=y()<<s}var S=0;function C(Te,Se){if(S>0){S--;return}for(var Ie=i,Le=o;Ie<=Le;){var Ee=p(Te.huffmanTableAC),Be=Ee&15,be=Ee>>4;if(Be===0){if(be<15){S=x(be)+(1<<be)-1;break}Ie+=16;continue}Ie+=be;var ye=Yl[Ie];Se[ye]=g(Be)*(1<<s),Ie++}}var A=0,_=0;function E(Te,Se){for(var Ie=i,Le=o,Ee=0;Ie<=Le;){var Be=Yl[Ie],be=Se[Be]<0?-1:1;switch(A){case 0:var ye=p(Te.huffmanTableAC),P=ye&15;if(Ee=ye>>4,P===0)Ee<15?(S=x(Ee)+(1<<Ee),A=4):(Ee=16,A=1);else{if(P!==1)throw new Error("invalid ACn encoding");_=g(P),A=Ee?2:3}continue;case 1:case 2:Se[Be]?Se[Be]+=(y()<<s)*be:(Ee--,Ee===0&&(A=A==2?3:0));break;case 3:Se[Be]?Se[Be]+=(y()<<s)*be:(Se[Be]=_<<s,A=0);break;case 4:Se[Be]&&(Se[Be]+=(y()<<s)*be);break}Ie++}A===4&&(S--,S===0&&(A=0))}function M(Te,Se,Ie,Le,Ee){var Be=Ie/u|0,be=Ie%u,ye=Be*Te.v+Le,P=be*Te.h+Ee;Te.blocks[ye]!==void 0&&Se(Te,Te.blocks[ye][P])}function z(Te,Se,Ie){var Le=Ie/Te.blocksPerLine|0,Ee=Ie%Te.blocksPerLine;Te.blocks[Le]!==void 0&&Se(Te,Te.blocks[Le][Ee])}var N=n.length,R,$;c?i===0?$=l===0?b:v:$=l===0?C:E:$=m;var q=0,W;N==1?W=n[0].blocksPerLine*n[0].blocksPerColumn:W=u*r.mcusPerColumn,a||(a=W);for(var Z,te,ne;q<W;){for(var _e=0;_e<N;_e++)n[_e].pred=0;if(S=0,N==1){R=n[0];for(var pe=0;pe<a;pe++)z(R,$,q),q++}else for(var pe=0;pe<a;pe++){for(var _e=0;_e<N;_e++){R=n[_e],Z=R.h,te=R.v;for(var we=0;we<te;we++)for(var ve=0;ve<Z;ve++)M(R,$,q,we,ve)}if(q++,q===W)break}if(q===W)do{if(e[t]===255&&e[t+1]!==0)break;t+=1}while(t<e.length-2);if(h=0,ne=e[t]<<8|e[t+1],ne<65280)throw new Error("marker was not found");if(ne>=65488&&ne<=65495)t+=2;else break}return t-f}function eE(e){var t=[],r=e.blocksPerLine,n=e.blocksPerColumn,a=r<<3,i=new Int32Array(64),o=new Uint8Array(64);function l(x,g,m){for(var b=e.quantizationTable,v=m,S=0;S<64;S++)v[S]=x[S]*b[S];for(var S=0;S<8;++S){var C=8*S;if(v[1+C]==0&&v[2+C]==0&&v[3+C]==0&&v[4+C]==0&&v[5+C]==0&&v[6+C]==0&&v[7+C]==0){var A=Ro*v[0+C]+512>>10;v[0+C]=A,v[1+C]=A,v[2+C]=A,v[3+C]=A,v[4+C]=A,v[5+C]=A,v[6+C]=A,v[7+C]=A;continue}var _=Ro*v[0+C]+128>>8,E=Ro*v[4+C]+128>>8,M=v[2+C],z=v[6+C],N=Y0*(v[1+C]-v[7+C])+128>>8,R=Y0*(v[1+C]+v[7+C])+128>>8,$=v[3+C]<<4,q=v[5+C]<<4,W=_-E+1>>1;_=_+E+1>>1,E=W,W=M*X0+z*K0+128>>8,M=M*K0-z*X0+128>>8,z=W,W=N-q+1>>1,N=N+q+1>>1,q=W,W=R+$+1>>1,$=R-$+1>>1,R=W,W=_-z+1>>1,_=_+z+1>>1,z=W,W=E-M+1>>1,E=E+M+1>>1,M=W,W=N*W0+R*q0+2048>>12,N=N*q0-R*W0+2048>>12,R=W,W=$*V0+q*G0+2048>>12,$=$*G0-q*V0+2048>>12,q=W,v[0+C]=_+R,v[7+C]=_-R,v[1+C]=E+q,v[6+C]=E-q,v[2+C]=M+$,v[5+C]=M-$,v[3+C]=z+N,v[4+C]=z-N}for(var S=0;S<8;++S){var Z=S;if(v[1*8+Z]==0&&v[2*8+Z]==0&&v[3*8+Z]==0&&v[4*8+Z]==0&&v[5*8+Z]==0&&v[6*8+Z]==0&&v[7*8+Z]==0){var te=Ro*m[S+0]+8192>>14;v[0*8+Z]=te,v[1*8+Z]=te,v[2*8+Z]=te,v[3*8+Z]=te,v[4*8+Z]=te,v[5*8+Z]=te,v[6*8+Z]=te,v[7*8+Z]=te;continue}var _=Ro*v[0*8+Z]+2048>>12,E=Ro*v[4*8+Z]+2048>>12,M=v[2*8+Z],z=v[6*8+Z],N=Y0*(v[1*8+Z]-v[7*8+Z])+2048>>12,R=Y0*(v[1*8+Z]+v[7*8+Z])+2048>>12,$=v[3*8+Z],q=v[5*8+Z],W=_-E+1>>1;_=_+E+1>>1,E=W,W=M*X0+z*K0+2048>>12,M=M*K0-z*X0+2048>>12,z=W,W=N-q+1>>1,N=N+q+1>>1,q=W,W=R+$+1>>1,$=R-$+1>>1,R=W,W=_-z+1>>1,_=_+z+1>>1,z=W,W=E-M+1>>1,E=E+M+1>>1,M=W,W=N*W0+R*q0+2048>>12,N=N*q0-R*W0+2048>>12,R=W,W=$*V0+q*G0+2048>>12,$=$*G0-q*V0+2048>>12,q=W,v[0*8+Z]=_+R,v[7*8+Z]=_-R,v[1*8+Z]=E+q,v[6*8+Z]=E-q,v[2*8+Z]=M+$,v[5*8+Z]=M-$,v[3*8+Z]=z+N,v[4*8+Z]=z-N}for(var S=0;S<64;++S){var ne=128+(v[S]+8>>4);g[S]=ne<0?0:ne>255?255:ne}}Lo(a*n*8);for(var s=0;s<n;s++){for(var u=s<<3,c=0;c<8;c++)t.push(new Uint8Array(a));for(var f=0;f<r;f++){l(e.blocks[s][f],o,i);for(var d=0,h=f<<3,y=0;y<8;y++)for(var p=t[u+y],c=0;c<8;c++)p[h+c]=o[d++]}}return t}function Wa(e){return e<0?0:e>255?255:e}function tE(e){var t={width:0,height:0,comments:[],adobe:void 0,components:[],exifBuffer:void 0,jfif:void 0},r=ZA*1e3*1e3,n=0;function a(){var de=e[n]<<8|e[n+1];return n+=2,de}function i(){var de=a(),ie=e.subarray(n,n+de-2);return n+=ie.length,ie}function o(de){var ie=0,oe=0;for(var se in de.components)if(de.components.hasOwnProperty(se)){var ge=de.components[se];ie<ge.h&&(ie=ge.h),oe<ge.v&&(oe=ge.v)}var Ce=Math.ceil(de.samplesPerLine/8/ie),xe=Math.ceil(de.scanLines/8/oe);for(var se in de.components)if(de.components.hasOwnProperty(se)){var ge=de.components[se],Ve=Math.ceil(Math.ceil(de.samplesPerLine/8)*ge.h/ie),Ue=Math.ceil(Math.ceil(de.scanLines/8)*ge.v/oe),Ne=Ce*ge.h,qe=xe*ge.v,it=qe*Ne,ct=[];Lo(it*256);for(var ot=0;ot<qe;ot++){for(var wt=[],Me=0;Me<Ne;Me++)wt.push(new Int32Array(64));ct.push(wt)}ge.blocksPerLine=Ve,ge.blocksPerColumn=Ue,ge.blocks=ct}de.maxH=ie,de.maxV=oe,de.mcusPerLine=Ce,de.mcusPerColumn=xe}var l=null,s=null,u=void 0,c=0,f=[],d=[],h=[],y=[],p=a(),x=-1;if(p!=65496)throw new Error("SOI not found");for(p=a();p!=65497;){switch(p){case 65280:break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:{var g=i();if(p===65534){for(var m="",b=0;b<g.byteLength;b++)m+=String.fromCharCode(g[b]);t.comments.push(m)}p===65504&&g[0]===74&&g[1]===70&&g[2]===73&&g[3]===70&&g[4]===0&&(l={version:{major:g[5],minor:g[6]},densityUnits:g[7],xDensity:g[8]<<8|g[9],yDensity:g[10]<<8|g[11],thumbWidth:g[12],thumbHeight:g[13],thumbData:g.subarray(14,14+3*g[12]*g[13])}),p===65505&&g[0]===69&&g[1]===120&&g[2]===105&&g[3]===102&&g[4]===0&&(t.exifBuffer=g.subarray(5,g.length)),p===65518&&g[0]===65&&g[1]===100&&g[2]===111&&g[3]===98&&g[4]===101&&g[5]===0&&(s={version:g[6],flags0:g[7]<<8|g[8],flags1:g[9]<<8|g[10],transformCode:g[11]});break}case 65499:{for(var v=a(),S=v+n-2;n<S;){var C=e[n++];Lo(64*4);var A=new Int32Array(64);if(C>>4)if(C>>4===1)for(var _=0;_<64;_++){var E=Yl[_];A[E]=a()}else throw new Error("DQT: invalid table spec");else for(var _=0;_<64;_++){var E=Yl[_];A[E]=e[n++]}f[C&15]=A}break}case 65472:case 65473:case 65474:{a(),u={extended:p===65473,progressive:p===65474,precision:e[n++],scanLines:a(),samplesPerLine:a(),components:{},componentsOrder:[],maxH:0,maxV:0,mcusPerLine:0,mcusPerColumn:0};var M=u.scanLines*u.samplesPerLine;if(M>r){var z=Math.ceil((M-r)/1e6);throw new Error("maxResolutionInMP limit exceeded by ".concat(z,"MP"))}for(var N=e[n++],R=0;R<N;R++){var $=e[n],q=e[n+1]>>4,W=e[n+1]&15,Z=e[n+2];u.componentsOrder.push($),u.components[$]={h:q,v:W,quantizationIdx:Z,blocksPerColumn:0,blocksPerLine:0,blocks:[],pred:0},n+=3}o(u),d.push(u);break}case 65476:{for(var te=a(),R=2;R<te;){for(var ne=e[n++],_e=new Uint8Array(16),pe=0,_=0;_<16;_++,n++)pe+=_e[_]=e[n];Lo(16+pe);for(var we=new Uint8Array(pe),_=0;_<pe;_++,n++)we[_]=e[n];R+=17+pe;var ve=ne&15,Te=ne>>4?h:y;Te[ve]=JA(_e,we)}break}case 65501:a(),c=a();break;case 65500:a(),a();break;case 65498:{a();for(var Se=e[n++],Ie=[],R=0;R<Se;R++){var Le=u.components[e[n++]],Ee=e[n++];Le.huffmanTableDC=y[Ee>>4],Le.huffmanTableAC=h[Ee&15],Ie.push(Le)}var Be=e[n++],be=e[n++],ye=e[n++],P=QA(e,n,u,Ie,c,Be,be,ye>>4,ye&15);n+=P;break}case 65535:e[n]!==255&&n--;break;default:{if(e[n-3]==255&&e[n-2]>=192&&e[n-2]<=254){n-=3;break}else if(p===224||p==225){if(x!==-1)throw new Error("first unknown JPEG marker at offset ".concat(x.toString(16),", second unknown JPEG marker ").concat(p.toString(16)," at offset ").concat((n-1).toString(16)));x=n-1;var V=a();if(e[n+V-2]===255){n+=V-2;break}}throw new Error("unknown JPEG marker "+p.toString(16))}}p=a()}if(d.length!=1)throw new Error("only single frame JPEGs supported");for(var R=0;R<d.length;R++){var fe=d[R].components;for(var _ in fe)fe[_].quantizationTable=f[fe[_].quantizationIdx],delete fe[_].quantizationIdx}t.width=u.samplesPerLine,t.height=u.scanLines,t.jfif=l,t.adobe=s,t.components=[];for(var R=0;R<u.componentsOrder.length;R++){var Le=u.components[u.componentsOrder[R]];t.components.push({lines:eE(Le),scaleX:Le.h/u.maxH,scaleY:Le.v/u.maxV})}return t}function rE(e){var t=0,r=!1,n=e.width,a=e.height,i=n*a*e.components.length;Lo(i);var o=new Uint8Array(i);switch(e.components.length){case 1:{for(var l=e.components[0],s=0;s<a;s++)for(var u=l.lines[0|s*l.scaleY],c=0;c<n;c++){var f=u[0|c*l.scaleX];o[t++]=f}break}case 2:{for(var l=e.components[0],d=e.components[1],s=0;s<a;s++)for(var u=l.lines[0|s*l.scaleY],h=d.lines[0|s*d.scaleY],c=0;c<n;c++){var y=u[0|c*l.scaleX];o[t++]=y;var p=h[0|c*d.scaleX];o[t++]=p}break}case 3:{r=!0,e.adobe&&e.adobe.transformCode&&(r=!0);for(var l=e.components[0],d=e.components[1],x=e.components[2],s=0;s<a;s++)for(var u=l.lines[0|s*l.scaleY],h=d.lines[0|s*d.scaleY],g=x.lines[0|s*x.scaleY],c=0;c<n;c++){var f=void 0,m=void 0,b=void 0,v=void 0,S=void 0,C=void 0;r?(f=u[0|c*l.scaleX],m=h[0|c*d.scaleX],b=g[0|c*x.scaleX],v=Wa(f+1.402*(b-128)),S=Wa(f-.3441363*(m-128)-.71413636*(b-128)),C=Wa(f+1.772*(m-128))):(v=u[0|c*l.scaleX],S=h[0|c*d.scaleX],C=g[0|c*x.scaleX]),o[t++]=v,o[t++]=S,o[t++]=C}break}case 4:{if(!e.adobe)throw new Error("Unsupported color mode (4 components)");r=!1,e.adobe&&e.adobe.transformCode&&(r=!0);for(var l=e.components[0],d=e.components[1],x=e.components[2],A=e.components[3],s=0;s<a;s++)for(var u=l.lines[0|s*l.scaleY],h=d.lines[0|s*d.scaleY],g=x.lines[0|s*x.scaleY],_=A.lines[0|s*A.scaleY],c=0;c<n;c++){var f=void 0,m=void 0,b=void 0,E=void 0,M=void 0,z=void 0,N=void 0;r?(f=u[0|c*l.scaleX],m=h[0|c*d.scaleX],b=g[0|c*x.scaleX],E=_[0|c*A.scaleX],M=255-Wa(f+1.402*(b-128)),z=255-Wa(f-.3441363*(m-128)-.71413636*(b-128)),N=255-Wa(f+1.772*(m-128))):(M=u[0|c*l.scaleX],z=h[0|c*d.scaleX],N=g[0|c*x.scaleX],E=_[0|c*A.scaleX]),o[t++]=255-M,o[t++]=255-z,o[t++]=255-N,o[t++]=255-E}break}default:throw new Error("Unsupported color mode")}return o}function nE(e,t){if(Zf=0,e.length===0)throw new Error("Empty jpeg buffer");var r=tE(e);Lo(r.width*r.height*4);var n=rE(r),a=t(r.width,r.height),i=a.width,o=a.height,l=a.data,s=0,u=0;switch(r.components.length){case 1:for(var c=0;c<o;c++)for(var f=0;f<i;f++){var d=n[s++];l[u++]=d,l[u++]=d,l[u++]=d,l[u++]=255}break;case 3:for(var c=0;c<o;c++)for(var f=0;f<i;f++){var h=n[s++],y=n[s++],p=n[s++];l[u++]=h,l[u++]=y,l[u++]=p,l[u++]=255}break;case 4:for(var c=0;c<o;c++)for(var f=0;f<i;f++){var x=n[s++],g=n[s++],d=n[s++],m=n[s++],h=255-Wa(x*(1-m/255)+m),y=255-Wa(g*(1-m/255)+m),p=255-Wa(d*(1-m/255)+m);l[u++]=h,l[u++]=y,l[u++]=p,l[u++]=255}break;default:throw new Error("Unsupported color mode")}return a}var aE=!1,Z0={},Bo={pass:"pass through",norm:"normal",diss:"dissolve",dark:"darken","mul ":"multiply",idiv:"color burn",lbrn:"linear burn",dkCl:"darker color",lite:"lighten",scrn:"screen","div ":"color dodge",lddg:"linear dodge",lgCl:"lighter color",over:"overlay",sLit:"soft light",hLit:"hard light",vLit:"vivid light",lLit:"linear light",pLit:"pin light",hMix:"hard mix",diff:"difference",smud:"exclusion",fsub:"subtract",fdiv:"divide","hue ":"hue","sat ":"saturation",colr:"color","lum ":"luminosity"};Object.keys(Bo).forEach(function(e){return Z0[Bo[e]]=e});var W2=["none","red","orange","yellow","green","blue","violet","gray"],K2=["LMsk","Lr16","Lr32","Layr","Mt16","Mt32","Mtrn","Alph","FMsk","lnk2","FEid","FXid","PxSD","cinf"];function iE(e){var t={};return Object.keys(e).forEach(function(r){return t[e[r]]=r}),t}function vt(e,t,r){var n=iE(r),a=function(o){var l=o.split(".")[1];if(l&&!n[l])throw new Error("Unrecognized value for enum: '".concat(o,"'"));return n[l]||t},i=function(o){if(o&&!r[o])throw new Error("Invalid value for enum: '".concat(o,"'"));return"".concat(e,".").concat(r[o]||r[t])};return{decode:a,encode:i}}var X2;(function(e){e[e.RGB=0]="RGB",e[e.HSB=1]="HSB",e[e.CMYK=2]="CMYK",e[e.Lab=7]="Lab",e[e.Grayscale=8]="Grayscale"})(X2||(X2={}));var Y2;(function(e){e[e.PositionRelativeToLayer=1]="PositionRelativeToLayer",e[e.LayerMaskDisabled=2]="LayerMaskDisabled",e[e.InvertLayerMaskWhenBlending=4]="InvertLayerMaskWhenBlending",e[e.LayerMaskFromRenderingOtherData=8]="LayerMaskFromRenderingOtherData",e[e.MaskHasParametersAppliedToIt=16]="MaskHasParametersAppliedToIt"})(Y2||(Y2={}));var Z2;(function(e){e[e.UserMaskDensity=1]="UserMaskDensity",e[e.UserMaskFeather=2]="UserMaskFeather",e[e.VectorMaskDensity=4]="VectorMaskDensity",e[e.VectorMaskFeather=8]="VectorMaskFeather"})(Z2||(Z2={}));function J2(e,t){switch(e){case 0:return 0;case 1:return 1;case 2:return 2;case 3:return t?3:e+1;case-1:return t?4:3;default:return e+1}}function Jf(e,t,r){return e<t?t:e>r?r:e}function Q2(e){for(var t=e.width*e.height*4,r=3;r<t;r+=4)if(e.data[r]!==255)return!0;return!1}function oE(e){for(var t=e.data,r=t instanceof Float32Array?1:t instanceof Uint16Array?65535:255,n=0,a=t.length|0;n<a;n=n+4|0)t[n+0]=0,t[n+1]=0,t[n+2]=0,t[n+3]=r}function J0(e){var t=No(e.width,e.height),r;if(e.data instanceof Uint8ClampedArray)r=e;else{r=$o(e.width,e.height);var n=e.data,a=r.data;if(n instanceof Float32Array)for(var i=0,o=n.length;i<o;i+=4)a[i+0]=Math.round(Math.pow(n[i+0],1/2.2)*255),a[i+1]=Math.round(Math.pow(n[i+1],1/2.2)*255),a[i+2]=Math.round(Math.pow(n[i+2],1/2.2)*255),a[i+3]=Math.round(n[i+3]*255);else for(var l=n instanceof Uint16Array?8:0,i=0,o=n.length;i<o;i++)a[i]=n[i]>>>l}return t.getContext("2d").putImageData(r,0,0),t}function lE(e,t,r,n){if(!(e instanceof Uint8Array||e instanceof Uint8ClampedArray))throw new Error("Invalid bit depth");for(var a=0,i=0,o=0;a<n;a++)for(var l=0;l<r;)for(var s=e[o++],u=0;u<8&&l<r;u++,l++,i+=4){var c=s&128?0:255;s=s<<1,t[i+0]=c,t[i+1]=c,t[i+2]=c,t[i+3]=255}}function Qf(e,t,r,n){var a=t.data,i=t.width,o=t.height;if(!(!i||!o)){for(var l=4*i|0,s=0,u=r.length*(n?4:2)*o|0,c=0,f=r;c<f.length;c++)for(var d=f[c],h=0,y=d|0;h<o;h++){var p=h*l|0,x=p+l|0,g=x+d-4|0,m=g-4|0,b=u;for(y=p+d|0;y<x;y=y+4|0)if(y<m){var v=a[y];y=y+4|0;var S=a[y];y=y+4|0;var C=a[y];if(v===S&&v===C){for(var A=3;A<128&&y<g&&a[y+4|0]===v;)A=A+1|0,y=y+4|0;e[u++]=1-A,e[u++]=v}else{var _=u,E=!0,A=1;for(e[u++]=0,e[u++]=v;y<g&&A<128;)if(y=y+4|0,v=S,S=C,C=a[y],v===S&&v===C){y=y-12|0,E=!1;break}else A++,e[u++]=v;E&&(A<127?(e[u++]=S,e[u++]=C,A+=2):A<128?(e[u++]=S,A++,y=y-4|0):y=y-8|0),e[_]=A-1}}else y===g?(e[u++]=0,e[u++]=a[y]):(e[u++]=1,e[u++]=a[y],y=y+4|0,e[u++]=a[y]);var M=u-b;n&&(e[s++]=M>>24&255,e[s++]=M>>16&255),e[s++]=M>>8&255,e[s++]=M&255}return e.slice(0,u)}}function e4(e,t){for(var r=e.data,n=e.width,a=e.height,i=n*a,o=new Uint8Array(i),l=[],s=0,u=0,c=t;u<c.length;u++){for(var f=c[u],d=0,h=f;d<i;d++,h+=4)o[d]=r[h];var y=XA(o);l.push(y),s+=y.byteLength}if(l.length>0){for(var y=new Uint8Array(s),f=0,p=0,x=l;p<x.length;p++){var g=x[p];y.set(g,f),f+=g.byteLength}return y}else return l[0]}function sE(e){var t=No(100,100);try{var r=t.getContext("2d"),n=nE(e,function(a,i){return r.createImageData(a,i)});t.width=n.width,t.height=n.height,r.putImageData(n,0,0)}catch(a){console.error("JPEG decompression error",a.message)}return t}var No=function(){throw new Error("Canvas not initialized, use initializeCanvas method to set up createCanvas method")},ed=void 0,$o=function(e,t){return ed||(ed=No(1,1)),ed.getContext("2d").createImageData(e,t)};typeof document<"u"&&(No=function(e,t){var r=document.createElement("canvas");return r.width=e,r.height=t,r});function uE(e,t){No=e,$o=t||$o}for(var t4=pE,r4=gE,Sa=[],Ln=[],cE=typeof Uint8Array<"u"?Uint8Array:Array,td="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Uo=0,fE=td.length;Uo<fE;++Uo)Sa[Uo]=td[Uo],Ln[td.charCodeAt(Uo)]=Uo;Ln[45]=62,Ln[95]=63;function dE(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function hE(e,t,r){return(t+r)*3/4-r}function pE(e){var t,r=dE(e),n=r[0],a=r[1],i=new cE(hE(e,n,a)),o=0,l=a>0?n-4:n,s;for(s=0;s<l;s+=4)t=Ln[e.charCodeAt(s)]<<18|Ln[e.charCodeAt(s+1)]<<12|Ln[e.charCodeAt(s+2)]<<6|Ln[e.charCodeAt(s+3)],i[o++]=t>>16&255,i[o++]=t>>8&255,i[o++]=t&255;return a===2&&(t=Ln[e.charCodeAt(s)]<<2|Ln[e.charCodeAt(s+1)]>>4,i[o++]=t&255),a===1&&(t=Ln[e.charCodeAt(s)]<<10|Ln[e.charCodeAt(s+1)]<<4|Ln[e.charCodeAt(s+2)]>>2,i[o++]=t>>8&255,i[o++]=t&255),i}function vE(e){return Sa[e>>18&63]+Sa[e>>12&63]+Sa[e>>6&63]+Sa[e&63]}function mE(e,t,r){for(var n,a=[],i=t;i<r;i+=3)n=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(e[i+2]&255),a.push(vE(n));return a.join("")}function gE(e){for(var t,r=e.length,n=r%3,a=[],i=16383,o=0,l=r-n;o<l;o+=i)a.push(mE(e,o,o+i>l?l:o+i));return n===1?(t=e[r-1],a.push(Sa[t>>2]+Sa[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],a.push(Sa[t>>10]+Sa[t>>4&63]+Sa[t<<2&63]+"=")),a.join("")}function rd(e){return e&4294967168?e&4294965248?e&4294901760?4:3:2:1}function bE(e){for(var t=0,r=0;r<e.length;r++){var n=e.charCodeAt(r);if(n>=55296&&n<=56319){if(r+1<e.length){var a=e.charCodeAt(r+1);(a&64512)===56320&&(r++,t+=rd(((n&1023)<<10)+(a&1023)+65536))}}else t+=rd(n)}return t}function n4(e,t,r){var n=rd(r);switch(n){case 1:e[t]=r;break;case 2:e[t]=r>>6&31|192,e[t+1]=r&63|128;break;case 3:e[t]=r>>12&15|224,e[t+1]=r>>6&63|128,e[t+2]=r&63|128;break;default:e[t]=r>>18&7|240,e[t+1]=r>>12&63|128,e[t+2]=r>>6&63|128,e[t+3]=r&63|128;break}return n}function yE(e,t,r){for(var n=0;n<r.length;n++){var a=r.charCodeAt(n);if(a>=55296&&a<=56319){if(n+1<r.length){var i=r.charCodeAt(n+1);if((i&64512)===56320){n++;var o=((a&1023)<<10)+(i&1023)+65536;t+=n4(e,t,o)}}}else t+=n4(e,t,a)}return t}function a4(e){if(e.length>1e3&&typeof TextEncoder<"u")return new TextEncoder().encode(e);var t=new Uint8Array(bE(e));return yE(t,0,e),t}function Ho(e,t){if(t>=e.length)throw Error("Invalid byte index");var r=e[t];if((r&192)===128)return r&63;throw Error("Invalid continuation byte")}function i4(e){if(e.byteLength>1e3&&typeof TextDecoder<"u")return new TextDecoder().decode(e);for(var t=[],r=0;r<e.length;){var n=e[r++],a=void 0;if(!(n&128))a=n;else if((n&224)===192){var i=Ho(e,r++);if(a=(n&31)<<6|i,a<128)throw Error("Invalid continuation byte")}else if((n&240)===224){var i=Ho(e,r++),o=Ho(e,r++);if(a=(n&15)<<12|i<<6|o,a<2048)throw Error("Invalid continuation byte");if(a>=55296&&a<=57343)throw Error("Lone surrogate U+".concat(a.toString(16).toUpperCase()," is not a scalar value"))}else if((n&248)===240){var i=Ho(e,r++),o=Ho(e,r++),l=Ho(e,r++);if(a=(n&15)<<18|i<<12|o<<6|l,a<65536||a>1114111)throw Error("Invalid continuation byte")}else throw Error("Invalid UTF-8 detected");a>65535&&(a-=65536,t.push(String.fromCharCode(a>>>10&1023|55296)),a=56320|a&1023),t.push(String.fromCharCode(a))}return t.join("")}var Ka=function(){return Ka=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},Ka.apply(this,arguments)},xE=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};function _E(e){var t={};return Object.keys(e).forEach(function(r){return t[e[r]]=r}),t}var Zl={"#Ang":"Angle","#Rsl":"Density","#Rlt":"Distance","#Nne":"None","#Prc":"Percent","#Pxl":"Pixels","#Mlm":"Millimeters","#Pnt":"Points",RrPi:"Picas",RrIn:"Inches",RrCm:"Centimeters"},Q0=_E(Zl);function et(e,t){return{name:e,classID:t}}for(var It=et("","null"),o4={strokeStyleContent:et("","solidColorLayer"),printProofSetup:et("Proof Setup","proofSetup"),Grad:et("Gradient","Grdn"),Trnf:et("Transform","Trnf"),patternFill:et("","patternFill"),ebbl:et("","ebbl"),SoFi:et("","SoFi"),GrFl:et("","GrFl"),sdwC:et("","RGBC"),hglC:et("","RGBC"),"Clr ":et("","RGBC"),tintColor:et("","RGBC"),Ofst:et("","Pnt "),ChFX:et("","ChFX"),MpgS:et("","ShpC"),DrSh:et("","DrSh"),IrSh:et("","IrSh"),OrGl:et("","OrGl"),IrGl:et("","IrGl"),TrnS:et("","ShpC"),Ptrn:et("","Ptrn"),FrFX:et("","FrFX"),phase:et("","Pnt "),frameStep:It,duration:It,workInTime:It,workOutTime:It,audioClipGroupList:It,bounds:et("","Rctn"),customEnvelopeWarp:et("","customEnvelopeWarp"),warp:et("","warp"),"Sz ":et("","Pnt "),origin:et("","Pnt "),autoExpandOffset:et("","Pnt "),keyOriginShapeBBox:et("","unitRect"),Vrsn:It,psVersion:It,docDefaultNewArtboardBackgroundColor:et("","RGBC"),artboardRect:et("","classFloatRect"),keyOriginRRectRadii:et("","radii"),keyOriginBoxCorners:It,rectangleCornerA:et("","Pnt "),rectangleCornerB:et("","Pnt "),rectangleCornerC:et("","Pnt "),rectangleCornerD:et("","Pnt "),compInfo:It,quiltWarp:et("","quiltWarp"),generatorSettings:It,crema:It,FrIn:It,blendOptions:It,FXRf:It,Lefx:It,time:It,animKey:It,timeScope:It,inTime:It,outTime:It,sheetStyle:It,translation:It,Skew:It,boundingBox:et("","boundingBox"),"Lnk ":et("","ExternalFileLink"),frameReader:et("","FrameReader"),effectParams:et("","motionTrackEffectParams"),Impr:et("None","none"),Anch:et("","Pnt "),"Fwd ":et("","Pnt "),"Bwd ":et("","Pnt "),FlrC:et("","Pnt "),meshBoundaryPath:et("","pathClass"),filterFX:et("","filterFXStyle"),Fltr:et("","rigidTransform"),FrgC:et("","RGBC"),BckC:et("","RGBC"),sdwM:et("Parameters","adaptCorrectTones"),hglM:et("Parameters","adaptCorrectTones"),customShape:et("","customShape"),origFXRefPoint:It,FXRefPoint:It,ClMg:et("","ClMg")},l4={"Crv ":et("","CrPt"),Clrs:et("","Clrt"),Trns:et("","TrnS"),keyDescriptorList:It,solidFillMulti:et("","SoFi"),gradientFillMulti:et("","GrFl"),dropShadowMulti:et("","DrSh"),innerShadowMulti:et("","IrSh"),frameFXMulti:et("","FrFX"),FrIn:It,FSts:It,LaSt:It,sheetTimelineOptions:It,trackList:et("","animationTrack"),globalTrackList:et("","animationTrack"),keyList:It,audioClipGroupList:It,audioClipList:It,countObjectList:et("","countObject"),countGroupList:et("","countGroup"),slices:et("","slice"),"Pts ":et("","Pthp"),SbpL:et("","SbpL"),pathComponents:et("","PaCm"),filterFXList:et("","filterFX"),puppetShapeList:et("","puppetShape"),channelDenoise:et("","channelDenoiseParams"),ShrP:et("","Pnt "),layerSettings:It,list:It,Adjs:et("","CrvA")},s4={TEXT:["Txt ","printerName","Nm ","Idnt","blackAndWhitePresetFileName","LUT3DFileName","presetFileName","curvesPresetFileName","mixerPresetFileName","placed","description","reason","artboardPresetName","json","clipID","relPath","fullPath","mediaDescriptor","Msge","altTag","url","cellText","preset","KnNm","FPth","comment","originalPath"],tdta:["EngineData","LUT3DFileData","indexArray","originalVertexArray","deformedVertexArray","LqMe"],long:["TextIndex","RndS","Mdpn","Smth","Lctn","strokeStyleVersion","LaID","Vrsn","Cnt ","Brgh","Cntr","means","vibrance","Strt","bwPresetKind","comp","compID","originalCompID","curvesPresetKind","mixerPresetKind","uOrder","vOrder","PgNm","totalPages","Crop","numerator","denominator","frameCount","Annt","keyOriginType","unitValueQuadVersion","keyOriginIndex","major","minor","fix","docDefaultNewArtboardBackgroundType","artboardBackgroundType","numModifyingFX","deformNumRows","deformNumCols","FrID","FrDl","FsID","LCnt","AFrm","AFSt","numBefore","numAfter","Spcn","minOpacity","maxOpacity","BlnM","sheetID","gblA","globalAltitude","descVersion","frameReaderType","LyrI","zoomOrigin","fontSize","Rds ","sliceID","topOutset","leftOutset","bottomOutset","rightOutset","filterID","meshQuality","meshExpansion","meshRigidity","VrsM","VrsN","NmbG","WLMn","WLMx","AmMn","AmMx","SclH","SclV","Lvl ","TlNm","TlOf","FlRs","Thsh","ShrS","ShrE","FlRs","Vrnc","Strg","ExtS","ExtD","HrzS","VrtS","NmbR","EdgF","Ang1","Ang2","Ang3","Ang4","lastAppliedComp","capturedInfo"],enum:["textGridding","Ornt","warpStyle","warpRotate","Inte","Bltn","ClrS","BlrQ","bvlT","bvlS","bvlD","Md ","glwS","GrdF","GlwT","RplS","BlrM","SmBM","strokeStyleLineCapType","strokeStyleLineJoinType","strokeStyleLineAlignment","strokeStyleBlendMode","PntT","Styl","lookupType","LUTFormat","dataOrder","tableOrder","enableCompCore","enableCompCoreGPU","compCoreSupport","compCoreGPUSupport","Engn","enableCompCoreThreads","gs99","FrDs","trackID","animInterpStyle","horzAlign","vertAlign","bgColorType","shapeOperation","UndA","Wvtp","Drct","WndM","Edg ","FlCl","IntE","IntC","Cnvr","Fl ","Dstr","MztT","Lns ","ExtT","DspM","ExtR","ZZTy","SphM","SmBQ","placedLayerOCIOConversion","gradientsInterpolationMethod"],bool:["PstS","printSixteenBit","masterFXSwitch","enab","uglg","antialiasGloss","useShape","useTexture","uglg","antialiasGloss","useShape","Vsbl","useTexture","Algn","Rvrs","Dthr","Invr","VctC","ShTr","layerConceals","strokeEnabled","fillEnabled","strokeStyleScaleLock","strokeStyleStrokeAdjust","hardProof","MpBl","paperWhite","useLegacy","Auto","Lab ","useTint","keyShapeInvalidated","autoExpandEnabled","autoNestEnabled","autoPositionEnabled","shrinkwrapOnSaveEnabled","present","showInDialog","overprint","sheetDisclosed","lightsDisclosed","meshesDisclosed","materialsDisclosed","hasMotion","muted","Effc","selected","autoScope","fillCanvas","cellTextIsHTML","Smoo","Clsp","validAtPosition","rigidType","hasoptions","filterMaskEnable","filterMaskLinked","filterMaskExtendWithWhite","removeJPEGArtifact","Mnch","ExtF","ExtM","moreAccurate","GpuY","LIWy","Cnty"],doub:["warpValue","warpPerspective","warpPerspectiveOther","Intr","Wdth","Hght","strokeStyleMiterLimit","strokeStyleResolution","layerTime","keyOriginResolution","xx","xy","yx","yy","tx","ty","FrGA","frameRate","audioLevel","rotation","X ","Y ","redFloat","greenFloat","blueFloat","imageResolution","PuX0","PuX1","PuX2","PuX3","PuY0","PuY1","PuY2","PuY3"],UntF:["sdwO","hglO","lagl","Lald","srgR","blur","Sftn","Opct","Dstn","Angl","Ckmt","Nose","Inpr","ShdN","strokeStyleLineWidth","strokeStyleLineDashOffset","strokeStyleOpacity","H ","Top ","Left","Btom","Rght","Rslt","topRight","topLeft","bottomLeft","bottomRight","ClNs","Shrp"],VlLs:["Crv ","Clrs","Mnm ","Mxm ","Trns","pathList","strokeStyleLineDashSet","FrLs","slices","LaSt","Trnf","nonAffineTransform","keyDescriptorList","guideIndeces","gradientFillMulti","solidFillMulti","frameFXMulti","innerShadowMulti","dropShadowMulti","FrIn","FSts","FsFr","sheetTimelineOptions","audioClipList","trackList","globalTrackList","keyList","audioClipList","warpValues","selectedPin","Pts ","SbpL","pathComponents","pinOffsets","posFinalPins","pinVertexIndices","PinP","PnRt","PnOv","PnDp","filterFXList","puppetShapeList","ShrP","channelDenoise","Mtrx","layerSettings","list","compList","Adjs"],ObAr:["meshPoints","quiltSliceX","quiltSliceY"],"obj ":["null","Chnl"],"Pth ":["DspF"]},wE=["Rd ","Grn ","Bl ","Yllw","Ylw ","Cyn ","Mgnt","Blck","Gry ","Lmnc","A ","B "],u4={"Mnm ":"long","Mxm ":"long",FrLs:"long",strokeStyleLineDashSet:"UntF",Trnf:"doub",nonAffineTransform:"doub",keyDescriptorList:"Objc",gradientFillMulti:"Objc",solidFillMulti:"Objc",frameFXMulti:"Objc",innerShadowMulti:"Objc",dropShadowMulti:"Objc",LaSt:"Objc",FrIn:"Objc",FSts:"Objc",FsFr:"long",blendOptions:"Objc",sheetTimelineOptions:"Objc",keyList:"Objc",warpValues:"doub",selectedPin:"long","Pts ":"Objc",SbpL:"Objc",pathComponents:"Objc",pinOffsets:"doub",posFinalPins:"doub",pinVertexIndices:"long",PinP:"doub",PnRt:"long",PnOv:"bool",PnDp:"doub",filterFXList:"Objc",puppetShapeList:"Objc",ShrP:"Objc",channelDenoise:"Objc",Mtrx:"long",compList:"long",Chnl:"enum"},eu={},nd=0,c4=Object.keys(s4);nd<c4.length;nd++)for(var f4=c4[nd],ad=0,d4=s4[f4];ad<d4.length;ad++){var jo=d4[ad];eu[jo]=f4}for(var id=0,h4=Object.keys(o4);id<h4.length;id++){var jo=h4[id];eu[jo]||(eu[jo]="Objc")}for(var od=0,p4=Object.keys(l4);od<p4.length;od++){var jo=p4[od];u4[jo]="Objc"}function kE(e,t,r,n){return e==="presetKind"?typeof t=="string"?"enum":"long":e==="null"&&r==="slices"?"TEXT":e==="groupID"?r==="slices"?"long":"TEXT":e==="Sz "?"Wdth"in t?"Objc":"units"in t?"UntF":"doub":e==="Type"?typeof t=="string"?"enum":"long":e==="AntA"?typeof t=="string"?"enum":"bool":(e==="Hrzn"||e==="Vrtc")&&(n.Type==="keyType.Pstn"||n._classID==="Ofst")?"long":e==="Hrzn"||e==="Vrtc"||e==="Top "||e==="Left"||e==="Btom"||e==="Rght"?r==="slices"?"long":typeof t=="number"?"doub":"UntF":e==="Vrsn"?typeof t=="number"?"long":"Objc":e==="Rd "||e==="Grn "||e==="Bl "?r==="artd"?"long":"doub":e==="Trnf"?Array.isArray(t)?"VlLs":"Objc":eu[e]}function Xa(e){var t=st(e);return fu(e,t||4)}function Ya(e,t){if(t.length===4&&t!=="warp"&&t!=="time"&&t!=="hold"&&t!=="list")ht(e,0),pt(e,t);else{ht(e,t.length);for(var r=0;r<t.length;r++)Ge(e,t.charCodeAt(r))}}function v4(e,t){for(var r=Xi(e),n=t?{_name:r.name,_classID:r.classID}:{},a=De(e),i=0;i<a;i++){var o=Xa(e),l=Wt(e),s=g4(e,l,t);n[o]=s}return n}function m4(e,t,r,n,a){Ji(e,t),Ya(e,r);var i=Object.keys(n),o=i.length;"_name"in n&&o--,"_classID"in n&&o--,Je(e,o);for(var l=0,s=i;l<s.length;l++){var u=s[l];if(!(u==="_name"||u==="_classID")){var c=kE(u,n[u],a,n),f=o4[u];u==="bounds"&&a==="text"?f=et("","bounds"):u==="origin"?c=a==="slices"?"enum":"Objc":(u==="Cyn "||u==="Mgnt"||u==="Ylw "||u==="Blck")&&n._classID==="CMYC"?c="doub":/^PN[a-z][a-z]$/.test(u)?c="TEXT":/^PT[a-z][a-z]$/.test(u)?c="long":/^PF[a-z][a-z]$/.test(u)||(u==="Rds "||u==="Thsh")&&typeof n[u]=="number"&&n._classID==="SmrB"?c="doub":u==="ClSz"||u==="Rds "||u==="Amnt"?c=typeof n[u]=="number"?"long":"UntF":(u==="sdwM"||u==="hglM")&&typeof n[u]=="string"||u==="blur"&&typeof n[u]=="string"?c="enum":u==="Hght"&&typeof n[u]=="number"&&n._classID==="Embs"||u==="Angl"&&typeof n[u]=="number"&&(n._classID==="Embs"||n._classID==="smartSharpen"||n._classID==="Twrl"||n._classID==="MtnB")?c="long":u==="Angl"&&typeof n[u]=="number"?c="doub":u==="bounds"&&a==="slices"?(c="Objc",f=et("","Rct1")):u==="Scl "?typeof n[u]=="object"&&"Hrzn"in n[u]?(c="Objc",f=It):typeof n[u]=="number"?c="long":c="UntF":u==="audioClipGroupList"&&i.length===1?c="VlLs":(u==="Strt"||u==="Brgh")&&"H "in n?c="doub":u==="Wdth"&&typeof n[u]=="object"?c="UntF":u==="Ofst"&&typeof n[u]=="number"?c="long":u==="Strt"&&typeof n[u]=="object"?(c="Objc",f=It):wE.indexOf(u)!==-1?c=r==="RGBC"&&a!=="artd"?"doub":"long":u==="profile"?c=r==="printOutput"?"TEXT":"tdta":u==="strokeStyleContent"?n[u]["Clr "]?f=et("","solidColorLayer"):n[u].Grad?f=et("","gradientLayer"):n[u].Ptrn&&(f=et("","patternLayer")):u==="bounds"&&a==="quiltWarp"&&(f=et("","classFloatRect")),f&&f.classID==="RGBC"&&"H "in n[u]&&(f={classID:"HSBC",name:""}),Ya(e,u),pt(e,c||"long"),b4(e,c||"long",n[u],u,f,a)}}}function g4(e,t,r){switch(t){case"obj ":return CE(e);case"Objc":case"GlbO":return v4(e,r);case"VlLs":{for(var n=st(e),a=[],i=0;i<n;i++){var o=Wt(e);a.push(g4(e,o,r))}return a}case"doub":return Nn(e);case"UntF":{var l=Wt(e),s=Nn(e);if(!Zl[l])throw new Error("Invalid units: ".concat(l));return{units:Zl[l],value:s}}case"UnFl":{var l=Wt(e),s=Yn(e);if(!Zl[l])throw new Error("Invalid units: ".concat(l));return{units:Zl[l],value:s}}case"TEXT":return _r(e);case"enum":{var u=Xa(e),s=Xa(e);return"".concat(u,".").concat(s)}case"long":return st(e);case"comp":{var c=De(e),f=De(e);return{low:c,high:f}}case"bool":return!!Ze(e);case"type":case"GlbC":return Xi(e);case"alis":{var d=st(e);return fu(e,d)}case"tdta":{var h=st(e);return dr(e,h)}case"ObAr":{st(e),_r(e),Xa(e);for(var y=st(e),a=[],i=0;i<y;i++){var p=Xa(e);Wt(e),Wt(e);for(var x=st(e),g=[],m=0;m<x;m++)g.push(Nn(e));a.push({type:p,values:g})}return a}case"Pth ":{st(e);var b=Wt(e);Pg(e);var v=Pg(e),S=RE(e,v);return{sig:b,path:S}}default:throw new Error("Invalid TySh descriptor OSType: ".concat(t," at ").concat(e.offset.toString(16)))}}var SE={meshPoints:"rationalPoint",quiltSliceX:"UntF",quiltSliceY:"UntF"};function b4(e,t,r,n,a,i){switch(t){case"obj ":AE(e,n,r);break;case"Objc":case"GlbO":{if(typeof r!="object")throw new Error("Invalid struct value: ".concat(JSON.stringify(r),", key: ").concat(n));if(!a)throw new Error("Missing ext type for: '".concat(n,"' (").concat(JSON.stringify(r),")"));var o=r._name||a.name,l=r._classID||a.classID;m4(e,o,l,r,i);break}case"VlLs":if(!Array.isArray(r))throw new Error("Invalid list value: ".concat(JSON.stringify(r),", key: ").concat(n));ht(e,r.length);for(var s=0;s<r.length;s++){var u=u4[n];pt(e,u||"long"),b4(e,u||"long",r[s],"".concat(n,"[]"),l4[n],i)}break;case"doub":if(typeof r!="number")throw new Error("Invalid number value: ".concat(JSON.stringify(r),", key: ").concat(n));$n(e,r);break;case"UntF":if(!Q0[r.units])throw new Error("Invalid units: ".concat(r.units," in ").concat(n));pt(e,Q0[r.units]),$n(e,r.value);break;case"UnFl":if(!Q0[r.units])throw new Error("Invalid units: ".concat(r.units," in ").concat(n));pt(e,Q0[r.units]),Qn(e,r.value);break;case"TEXT":Ji(e,r);break;case"enum":{if(typeof r!="string")throw new Error("Invalid enum value: ".concat(JSON.stringify(r),", key: ").concat(n));var c=r.split("."),f=c[0],d=c[1];Ya(e,f),Ya(e,d);break}case"long":if(typeof r!="number")throw new Error("Invalid integer value: ".concat(JSON.stringify(r),", key: ").concat(n));ht(e,r);break;case"bool":if(typeof r!="boolean")throw new Error("Invalid boolean value: ".concat(JSON.stringify(r),", key: ").concat(n));Ge(e,r?1:0);break;case"tdta":ht(e,r.byteLength),ta(e,r);break;case"ObAr":{ht(e,16),Ji(e,"");var h=SE[n];if(!h)throw new Error("Not implemented ObArType for: ".concat(n));Ya(e,h),ht(e,r.length);for(var s=0;s<r.length;s++){Ya(e,r[s].type),pt(e,"UnFl"),pt(e,"#Pxl"),ht(e,r[s].values.length);for(var y=0;y<r[s].values.length;y++)$n(e,r[s].values[y])}break}case"Pth ":{var p=12+r.path.length*2;ht(e,p),pt(e,r.sig),w3(e,p),w3(e,r.path.length),ST(e,r.path);break}default:throw new Error("Not implemented descriptor OSType: ".concat(t))}}function CE(e){for(var t=st(e),r=[],n=0;n<t;n++){var a=Wt(e);switch(a){case"prop":{Xi(e);var i=Xa(e);r.push(i);break}case"Clss":r.push(Xi(e));break;case"Enmr":{Xi(e);var o=Xa(e),l=Xa(e);r.push("".concat(o,".").concat(l));break}case"rele":{Xi(e),r.push(De(e));break}case"Idnt":r.push(st(e));break;case"indx":r.push(st(e));break;case"name":{Xi(e),r.push(_r(e));break}default:throw new Error("Invalid descriptor reference type: ".concat(a))}}return r}function AE(e,t,r){ht(e,r.length);for(var n=0;n<r.length;n++){var a=r[n],i="unknown";switch(typeof a=="string"&&(/^[a-z ]+\.[a-z ]+$/i.test(a)?i="Enmr":i="name"),pt(e,i),i){case"Enmr":{var o=a.split("."),l=o[0],s=o[1];y4(e,"\0",l),Ya(e,l),Ya(e,s);break}case"name":{y4(e,"\0","Lyr "),En(e,a+"\0");break}default:throw new Error("Invalid descriptor reference type: ".concat(i))}}return r}function Xi(e){var t=_r(e),r=Xa(e);return{name:t,classID:r}}function y4(e,t,r){En(e,t),Ya(e,r)}function Tt(e,t){t===void 0&&(t=!1);var r=De(e);if(r!==16)throw new Error("Invalid descriptor version: ".concat(r));var n=v4(e,t);return n}function Dt(e,t,r,n,a){a===void 0&&(a=""),Je(e,16),m4(e,t,r,n,a)}function Jl(e){return{x:e.Hrzn,y:e.Vrtc}}function Ql(e){return{Hrzn:e.x,Vrtc:e.y}}function x4(e){return{top:Nt(e["Top "]),left:Nt(e.Left),right:Nt(e.Rght),bottom:Nt(e.Btom)}}function _4(e){var t;return t={Left:Zt(e.left,"bounds.left")},t["Top "]=Zt(e.top,"bounds.top"),t.Rght=Zt(e.right,"bounds.right"),t.Btom=Zt(e.bottom,"bounds.bottom"),t}function w4(e){var t={enabled:!!e.enab,position:au.decode(e.Styl),fillType:j4.decode(e.PntT),blendMode:on.decode(e["Md "]),opacity:dt(e.Opct),size:Nt(e["Sz "])};return e.present!==void 0&&(t.present=e.present),e.showInDialog!==void 0&&(t.showInDialog=e.showInDialog),e.overprint!==void 0&&(t.overprint=e.overprint),e["Clr "]&&(t.color=Kn(e["Clr "])),e.Grad&&(t.gradient=D4(e)),e.Ptrn&&(t.pattern=I4(e)),t}function k4(e){var t={};return t.enab=!!e.enabled,e.present!==void 0&&(t.present=!!e.present),e.showInDialog!==void 0&&(t.showInDialog=!!e.showInDialog),t.Styl=au.encode(e.position),t.PntT=j4.encode(e.fillType),t["Md "]=on.encode(e.blendMode),t.Opct=Dr(e.opacity),t["Sz "]=Zt(e.size,"size"),e.color&&(t["Clr "]=Xn(e.color)),e.gradient&&(t=Ka(Ka({},t),z4(e.gradient))),e.pattern&&(t=Ka(Ka({},t),F4(e.pattern))),e.overprint!==void 0&&(t.overprint=!!e.overprint),t}function es(e,t,r){for(var n,a,i,o=r?{"Scl ":Bn((n=e.scale)!==null&&n!==void 0?n:1),masterFXSwitch:!e.disabled}:{masterFXSwitch:!e.disabled,"Scl ":Bn((a=e.scale)!==null&&a!==void 0?a:1)},l=["dropShadow","innerShadow","solidFill","gradientOverlay","stroke"],s=0,u=l;s<u.length;s++){var c=u[s];if(e[c]&&!Array.isArray(e[c]))throw new Error("".concat(c," should be an array"))}var f=function(b){return!!b&&b.length>1&&r},d=function(b){return!!b&&b.length>=1&&(!r||b.length===1)};if(d(e.dropShadow)&&(o.DrSh=wn(e.dropShadow[0],"dropShadow",t)),f(e.dropShadow)&&(o.dropShadowMulti=e.dropShadow.map(function(b){return wn(b,"dropShadow",t)})),d(e.innerShadow)&&(o.IrSh=wn(e.innerShadow[0],"innerShadow",t)),f(e.innerShadow)&&(o.innerShadowMulti=e.innerShadow.map(function(b){return wn(b,"innerShadow",t)})),e.outerGlow&&(o.OrGl=wn(e.outerGlow,"outerGlow",t)),f(e.solidFill)&&(o.solidFillMulti=e.solidFill.map(function(b){return wn(b,"solidFill",t)})),f(e.gradientOverlay)&&(o.gradientFillMulti=e.gradientOverlay.map(function(b){return wn(b,"gradientOverlay",t)})),f(e.stroke)&&(o.frameFXMulti=e.stroke.map(function(b){return k4(b)})),e.innerGlow&&(o.IrGl=wn(e.innerGlow,"innerGlow",t)),e.bevel&&(o.ebbl=wn(e.bevel,"bevel",t)),d(e.solidFill)&&(o.SoFi=wn(e.solidFill[0],"solidFill",t)),e.patternOverlay&&(o.patternFill=wn(e.patternOverlay,"patternOverlay",t)),d(e.gradientOverlay)&&(o.GrFl=wn(e.gradientOverlay[0],"gradientOverlay",t)),e.satin&&(o.ChFX=wn(e.satin,"satin",t)),d(e.stroke)&&(o.FrFX=k4((i=e.stroke)===null||i===void 0?void 0:i[0])),r){o.numModifyingFX=0;for(var h=0,y=Object.keys(e);h<y.length;h++){var c=y[h],p=e[c];if(Array.isArray(p))for(var x=0,g=p;x<g.length;x++){var m=g[x];m.enabled&&o.numModifyingFX++}else p.enabled&&o.numModifyingFX++}}return o}function ts(e,t){var r={},n=e.masterFXSwitch,a=e.DrSh,i=e.dropShadowMulti,o=e.IrSh,l=e.innerShadowMulti,s=e.OrGl,u=e.IrGl,c=e.ebbl,f=e.SoFi,d=e.solidFillMulti,h=e.patternFill,y=e.GrFl,p=e.gradientFillMulti,x=e.ChFX,g=e.FrFX,m=e.frameFXMulti;e.numModifyingFX;var b=xE(e,["masterFXSwitch","DrSh","dropShadowMulti","IrSh","innerShadowMulti","OrGl","IrGl","ebbl","SoFi","solidFillMulti","patternFill","GrFl","gradientFillMulti","ChFX","FrFX","frameFXMulti","numModifyingFX"]);return n||(r.disabled=!0),e["Scl "]&&(r.scale=dt(e["Scl "])),a&&(r.dropShadow=[_n(a,t)]),i&&(r.dropShadow=i.map(function(v){return _n(v,t)})),o&&(r.innerShadow=[_n(o,t)]),l&&(r.innerShadow=l.map(function(v){return _n(v,t)})),s&&(r.outerGlow=_n(s,t)),u&&(r.innerGlow=_n(u,t)),c&&(r.bevel=_n(c,t)),f&&(r.solidFill=[_n(f,t)]),d&&(r.solidFill=d.map(function(v){return _n(v,t)})),h&&(r.patternOverlay=_n(h,t)),y&&(r.gradientOverlay=[_n(y,t)]),p&&(r.gradientOverlay=p.map(function(v){return _n(v,t)})),x&&(r.satin=_n(x,t)),g&&(r.stroke=[w4(g)]),m&&(r.stroke=m.map(function(v){return w4(v)})),t&&Object.keys(b).length>1&&console.log("Unhandled effect keys:",b),r}function S4(e,t){for(var r=[],n=0;n<e.length;n++){var a=e[n],i=a.time,o=i.denominator,l=i.numerator,s=a.selected,u=a.animKey,c={numerator:l,denominator:o},f=U4.decode(a.animInterpStyle);switch(u.Type){case"keyType.Opct":r.push({interpolation:f,time:c,selected:s,type:"opacity",value:dt(u.Opct)});break;case"keyType.Pstn":r.push({interpolation:f,time:c,selected:s,type:"position",x:u.Hrzn,y:u.Vrtc});break;case"keyType.Trnf":r.push({interpolation:f,time:c,selected:s,type:"transform",scale:Jl(u["Scl "]),skew:Jl(u.Skew),rotation:u.rotation,translation:Jl(u.translation)});break;case"keyType.sheetStyle":{var d={interpolation:f,time:c,selected:s,type:"style"};u.sheetStyle.Lefx&&(d.style=ts(u.sheetStyle.Lefx,t)),r.push(d);break}case"keyType.globalLighting":{r.push({interpolation:f,time:c,selected:s,type:"globalLighting",globalAngle:u.gblA,globalAltitude:u.globalAltitude});break}default:throw new Error("Unsupported keyType value")}}return r}function C4(e){for(var t=[],r=0;r<e.length;r++){var n=e[r],a=n.time,i=n.selected,o=i===void 0?!1:i,l=n.interpolation,s=U4.encode(l),u=void 0;switch(n.type){case"opacity":u={Type:"keyType.Opct",Opct:Dr(n.value)};break;case"position":u={Type:"keyType.Pstn",Hrzn:n.x,Vrtc:n.y};break;case"transform":u={Type:"keyType.Trnf","Scl ":Ql(n.scale),Skew:Ql(n.skew),rotation:n.rotation,translation:Ql(n.translation)};break;case"style":u={Type:"keyType.sheetStyle",sheetStyle:{Vrsn:1,blendOptions:{}}},n.style&&(u.sheetStyle={Vrsn:1,Lefx:es(n.style,!1,!1),blendOptions:{}});break;case"globalLighting":{u={Type:"keyType.globalLighting",gblA:n.globalAngle,globalAltitude:n.globalAltitude};break}default:throw new Error("Unsupported keyType value")}t.push({Vrsn:1,animInterpStyle:s,time:a,animKey:u,selected:o})}return t}function A4(e,t){for(var r=[],n=0;n<e.length;n++){var a=e[n],i={type:H4.decode(a.trackID),enabled:a.enab,keys:S4(a.keyList,t)};a.effectParams&&(i.effectParams={fillCanvas:a.effectParams.fillCanvas,zoomOrigin:a.effectParams.zoomOrigin,keys:S4(a.effectParams.keyList,t)}),r.push(i)}return r}function E4(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];t.push(Ka(Ka({trackID:H4.encode(n.type),Vrsn:1,enab:!!n.enabled,Effc:!!n.effectParams},n.effectParams?{effectParams:{keyList:C4(n.keys),fillCanvas:n.effectParams.fillCanvas,zoomOrigin:n.effectParams.zoomOrigin}}:{}),{keyList:C4(n.keys)}))}return t}function _n(e,t){for(var r={},n=0,a=Object.keys(e);n<a.length;n++){var i=a[n],o=e[i];switch(i){case"enab":r.enabled=!!o;break;case"uglg":r.useGlobalLight=!!o;break;case"AntA":r.antialiased=!!o;break;case"Algn":r.align=!!o;break;case"Dthr":r.dither=!!o;break;case"Invr":r.invert=!!o;break;case"Rvrs":r.reverse=!!o;break;case"Clr ":r.color=Kn(o);break;case"hglC":r.highlightColor=Kn(o);break;case"sdwC":r.shadowColor=Kn(o);break;case"Styl":r.position=au.decode(o);break;case"Md ":r.blendMode=on.decode(o);break;case"hglM":r.highlightBlendMode=on.decode(o);break;case"sdwM":r.shadowBlendMode=on.decode(o);break;case"bvlS":r.style=R4.decode(o);break;case"bvlD":r.direction=B4.decode(o);break;case"bvlT":r.technique=L4.decode(o);break;case"GlwT":r.technique=N4.decode(o);break;case"glwS":r.source=$4.decode(o);break;case"Type":r.type=ru.decode(o);break;case"gs99":r.interpolationMethod=Go.decode(o);break;case"Opct":r.opacity=dt(o);break;case"hglO":r.highlightOpacity=dt(o);break;case"sdwO":r.shadowOpacity=dt(o);break;case"lagl":r.angle=_i(o);break;case"Angl":r.angle=_i(o);break;case"Lald":r.altitude=_i(o);break;case"Sftn":r.soften=Nt(o);break;case"srgR":r.strength=dt(o);break;case"blur":r.size=Nt(o);break;case"Nose":r.noise=dt(o);break;case"Inpr":r.range=dt(o);break;case"Ckmt":r.choke=Nt(o);break;case"ShdN":r.jitter=dt(o);break;case"Dstn":r.distance=Nt(o);break;case"Scl ":r.scale=dt(o);break;case"Ptrn":r.pattern={name:o["Nm "],id:o.Idnt};break;case"phase":r.phase={x:o.Hrzn,y:o.Vrtc};break;case"Ofst":r.offset={x:dt(o.Hrzn),y:dt(o.Vrtc)};break;case"MpgS":case"TrnS":r.contour={name:o["Nm "],curve:o["Crv "].map(function(l){return{x:l.Hrzn,y:l.Vrtc}})};break;case"Grad":r.gradient=T4(o);break;case"useTexture":case"useShape":case"layerConceals":case"present":case"showInDialog":case"antialiasGloss":r[i]=o;break;case"_name":case"_classID":break;default:t&&console.log("Invalid effect key: '".concat(i,"', value:"),o)}}return r}function wn(e,t,r){var n={enab:!1};t==="dropShadow"&&(n.TrnS={"Nm ":"","Crv ":[]});for(var a=0,i=Object.keys(e);a<i.length;a++){var o=i[a],l=o,s=e[l];switch(l){case"enabled":n.enab=!!s;break;case"useGlobalLight":n.uglg=!!s;break;case"antialiased":n.AntA=!!s;break;case"align":n.Algn=!!s;break;case"dither":n.Dthr=!!s;break;case"invert":n.Invr=!!s;break;case"reverse":n.Rvrs=!!s;break;case"color":n["Clr "]=Xn(s);break;case"highlightColor":n.hglC=Xn(s);break;case"shadowColor":n.sdwC=Xn(s);break;case"position":n.Styl=au.encode(s);break;case"blendMode":n["Md "]=on.encode(s);break;case"highlightBlendMode":n.hglM=on.encode(s);break;case"shadowBlendMode":n.sdwM=on.encode(s);break;case"style":n.bvlS=R4.encode(s);break;case"direction":n.bvlD=B4.encode(s);break;case"technique":t==="bevel"?n.bvlT=L4.encode(s):n.GlwT=N4.encode(s);break;case"source":n.glwS=$4.encode(s);break;case"type":n.Type=ru.encode(s);break;case"interpolationMethod":n.gs99=Go.encode(s);break;case"opacity":n.Opct=Dr(s);break;case"highlightOpacity":n.hglO=Dr(s);break;case"shadowOpacity":n.sdwO=Dr(s);break;case"angle":t==="gradientOverlay"||t==="patternFill"?n.Angl=as(s):n.lagl=as(s);break;case"altitude":n.Lald=as(s);break;case"soften":n.Sftn=Zt(s,l);break;case"strength":n.srgR=Dr(s);break;case"size":n.blur=Zt(s,l);break;case"noise":n.Nose=Dr(s);break;case"range":n.Inpr=Dr(s);break;case"choke":n.Ckmt=Zt(s,l);break;case"jitter":n.ShdN=Dr(s);break;case"distance":n.Dstn=Zt(s,l);break;case"scale":n["Scl "]=Dr(s);break;case"pattern":n.Ptrn={"Nm ":s.name,Idnt:s.id};break;case"phase":n.phase={Hrzn:s.x,Vrtc:s.y};break;case"offset":n.Ofst={Hrzn:Dr(s.x),Vrtc:Dr(s.y)};break;case"contour":{n[t==="satin"?"MpgS":"TrnS"]={"Nm ":s.name,"Crv ":s.curve.map(function(u){return{Hrzn:u.x,Vrtc:u.y}})};break}case"gradient":n.Grad=M4(s);break;case"useTexture":case"useShape":case"layerConceals":case"present":case"showInDialog":case"antialiasGloss":n[l]=s;break;default:r&&console.log("Invalid effect key: '".concat(l,"', value:"),s)}}return n}function T4(e){if(e.GrdF==="GrdF.CstS"){var t=e.Intr||4096;return{type:"solid",name:e["Nm "],smoothness:e.Intr/4096,colorStops:e.Clrs.map(function(r){return{color:Kn(r["Clr "]),location:r.Lctn/t,midpoint:r.Mdpn/100}}),opacityStops:e.Trns.map(function(r){return{opacity:dt(r.Opct),location:r.Lctn/t,midpoint:r.Mdpn/100}})}}else return{type:"noise",name:e["Nm "],roughness:e.Smth/4096,colorModel:nu.decode(e.ClrS),randomSeed:e.RndS,restrictColors:!!e.VctC,addTransparency:!!e.ShTr,min:e["Mnm "].map(function(r){return r/100}),max:e["Mxm "].map(function(r){return r/100})}}function M4(e){var t,r;if(e.type==="solid"){var n=Math.round(((t=e.smoothness)!==null&&t!==void 0?t:1)*4096);return{"Nm ":e.name||"",GrdF:"GrdF.CstS",Intr:n,Clrs:e.colorStops.map(function(a){var i;return{"Clr ":Xn(a.color),Type:"Clry.UsrS",Lctn:Math.round(a.location*n),Mdpn:Math.round(((i=a.midpoint)!==null&&i!==void 0?i:.5)*100)}}),Trns:e.opacityStops.map(function(a){var i;return{Opct:Dr(a.opacity),Lctn:Math.round(a.location*n),Mdpn:Math.round(((i=a.midpoint)!==null&&i!==void 0?i:.5)*100)}})}}else return{GrdF:"GrdF.ClNs","Nm ":e.name||"",ShTr:!!e.addTransparency,VctC:!!e.restrictColors,ClrS:nu.encode(e.colorModel),RndS:e.randomSeed||0,Smth:Math.round(((r=e.roughness)!==null&&r!==void 0?r:1)*4096),"Mnm ":(e.min||[0,0,0,0]).map(function(a){return a*100}),"Mxm ":(e.max||[1,1,1,1]).map(function(a){return a*100})}}function D4(e){var t=T4(e.Grad);return t.style=ru.decode(e.Type),e.Dthr!==void 0&&(t.dither=e.Dthr),e.gradientsInterpolationMethod!==void 0&&(t.interpolationMethod=Go.decode(e.gradientsInterpolationMethod)),e.Rvrs!==void 0&&(t.reverse=e.Rvrs),e.Angl!==void 0&&(t.angle=_i(e.Angl)),e["Scl "]!==void 0&&(t.scale=dt(e["Scl "])),e.Algn!==void 0&&(t.align=e.Algn),e.Ofst!==void 0&&(t.offset={x:dt(e.Ofst.Hrzn),y:dt(e.Ofst.Vrtc)}),t}function I4(e){var t={name:e.Ptrn["Nm "],id:e.Ptrn.Idnt};return e.Lnkd!==void 0&&(t.linked=e.Lnkd),e.phase!==void 0&&(t.phase={x:e.phase.Hrzn,y:e.phase.Vrtc}),t}function rs(e){if("Grad"in e)return D4(e);if("Ptrn"in e)return Ka({type:"pattern"},I4(e));if("Clr "in e)return{type:"color",color:Kn(e["Clr "])};throw new Error("Invalid vector content")}function z4(e){var t={};return e.dither!==void 0&&(t.Dthr=e.dither),e.interpolationMethod!==void 0&&(t.gradientsInterpolationMethod=Go.encode(e.interpolationMethod)),e.reverse!==void 0&&(t.Rvrs=e.reverse),e.angle!==void 0&&(t.Angl=as(e.angle)),t.Type=ru.encode(e.style),e.align!==void 0&&(t.Algn=e.align),e.scale!==void 0&&(t["Scl "]=Dr(e.scale)),e.offset&&(t.Ofst={Hrzn:Dr(e.offset.x),Vrtc:Dr(e.offset.y)}),t.Grad=M4(e),t}function F4(e){var t={Ptrn:{"Nm ":e.name||"",Idnt:e.id||""}};return e.linked!==void 0&&(t.Lnkd=!!e.linked),e.phase!==void 0&&(t.phase={Hrzn:e.phase.x,Vrtc:e.phase.y}),t}function ns(e){return e.type==="color"?{key:"SoCo",descriptor:{"Clr ":Xn(e.color)}}:e.type==="pattern"?{key:"PtFl",descriptor:F4(e)}:{key:"GdFl",descriptor:z4(e)}}function Kn(e){if("H "in e)return{h:EE(e["H "]),s:e.Strt,b:e.Brgh};if("Rd "in e)return{r:e["Rd "],g:e["Grn "],b:e["Bl "]};if("Cyn "in e)return{c:e["Cyn "],m:e.Mgnt,y:e["Ylw "],k:e.Blck};if("Gry "in e)return{k:e["Gry "]};if("Lmnc"in e)return{l:e.Lmnc,a:e["A "],b:e["B "]};if("redFloat"in e)return{fr:e.redFloat,fg:e.greenFloat,fb:e.blueFloat};throw new Error("Unsupported color descriptor")}function Xn(e){if(e){if("r"in e)return{_name:"",_classID:"RGBC","Rd ":e.r||0,"Grn ":e.g||0,"Bl ":e.b||0};if("fr"in e)return{_name:"",_classID:"RGBC",redFloat:e.fr,greenFloat:e.fg,blueFloat:e.fb};if("h"in e)return{_name:"",_classID:"HSBC","H ":as(e.h*360),Strt:e.s||0,Brgh:e.b||0};if("c"in e)return{_name:"",_classID:"CMYC","Cyn ":e.c||0,Mgnt:e.m||0,"Ylw ":e.y||0,Blck:e.k||0};if("l"in e)return{_name:"",_classID:"LABC",Lmnc:e.l||0,"A ":e.a||0,"B ":e.b||0};if("k"in e)return{_name:"",_classID:"GRYC","Gry ":e.k};throw new Error("Invalid color value")}else return{_name:"",_classID:"RGBC","Rd ":0,"Grn ":0,"Bl ":0}}function _i(e){if(e===void 0)return 0;if(e.units!=="Angle")throw new Error("Invalid units: ".concat(e.units));return e.value}function dt(e){if(e===void 0)return 1;if(e.units!=="Percent")throw new Error("Invalid units: ".concat(e.units));return e.value/100}function EE(e){if(e===void 0)return 1;if(e.units==="Percent")return e.value/100;if(e.units==="Angle")return e.value/360;throw new Error("Invalid units: ".concat(e.units))}function Nt(e){var t=e.units,r=e.value;if(t!=="Pixels"&&t!=="Millimeters"&&t!=="Points"&&t!=="None"&&t!=="Picas"&&t!=="Inches"&&t!=="Centimeters"&&t!=="Density")throw new Error("Invalid units: ".concat(JSON.stringify({units:t,value:r})));return{value:r,units:t}}function wi(e,t){return t===void 0&&(t="Pixels"),typeof e=="number"?{value:e,units:t}:Nt(e)}function tu(e,t){var r=e.units,n=e.value;if(r!==t)throw new Error("Invalid units: ".concat(JSON.stringify({units:r,value:n})));return n}function as(e){return{units:"Angle",value:e||0}}function Dr(e){return{units:"Percent",value:Math.round((e||0)*100)}}function Bn(e){return{units:"Percent",value:(e||0)*100}}function Zt(e,t){if(e==null)return{units:"Pixels",value:0};if(typeof e!="object")throw new Error("Invalid value: ".concat(JSON.stringify(e)," (key: ").concat(t,") (should have value and units)"));var r=e.units,n=e.value;if(typeof n!="number")throw new Error("Invalid value in ".concat(JSON.stringify(e)," (key: ").concat(t,")"));if(r!=="Pixels"&&r!=="Millimeters"&&r!=="Points"&&r!=="None"&&r!=="Picas"&&r!=="Inches"&&r!=="Centimeters"&&r!=="Density")throw new Error("Invalid units in ".concat(JSON.stringify(e)," (key: ").concat(t,")"));return{units:r,value:n}}function an(e){var t=e.numerator,r=e.denominator;return{numerator:t,denominator:r}}var O4=vt("textGridding","none",{none:"None",round:"Rnd "}),is=vt("Ornt","horizontal",{horizontal:"Hrzn",vertical:"Vrtc"}),P4=vt("Annt","sharp",{none:"Anno",sharp:"antiAliasSharp",crisp:"AnCr",strong:"AnSt",smooth:"AnSm",platform:"antiAliasPlatformGray",platformLCD:"antiAliasPlatformLCD"}),ld=vt("warpStyle","none",{none:"warpNone",arc:"warpArc",arcLower:"warpArcLower",arcUpper:"warpArcUpper",arch:"warpArch",bulge:"warpBulge",shellLower:"warpShellLower",shellUpper:"warpShellUpper",flag:"warpFlag",wave:"warpWave",fish:"warpFish",rise:"warpRise",fisheye:"warpFisheye",inflate:"warpInflate",squeeze:"warpSqueeze",twist:"warpTwist",cylinder:"warpCylinder",custom:"warpCustom"}),on=vt("BlnM","normal",{normal:"Nrml",dissolve:"Dslv",darken:"Drkn",multiply:"Mltp","color burn":"CBrn","linear burn":"linearBurn","darker color":"darkerColor",lighten:"Lghn",screen:"Scrn","color dodge":"CDdg","linear dodge":"linearDodge","lighter color":"lighterColor",overlay:"Ovrl","soft light":"SftL","hard light":"HrdL","vivid light":"vividLight","linear light":"linearLight","pin light":"pinLight","hard mix":"hardMix",difference:"Dfrn",exclusion:"Xclu",subtract:"blendSubtraction",divide:"blendDivide",hue:"H ",saturation:"Strt",color:"Clr ",luminosity:"Lmns","linear height":"linearHeight",height:"Hght",subtraction:"Sbtr"}),R4=vt("BESl","inner bevel",{"inner bevel":"InrB","outer bevel":"OtrB",emboss:"Embs","pillow emboss":"PlEb","stroke emboss":"strokeEmboss"}),L4=vt("bvlT","smooth",{smooth:"SfBL","chisel hard":"PrBL","chisel soft":"Slmt"}),B4=vt("BESs","up",{up:"In ",down:"Out "}),N4=vt("BETE","softer",{softer:"SfBL",precise:"PrBL"}),$4=vt("IGSr","edge",{edge:"SrcE",center:"SrcC"}),ru=vt("GrdT","linear",{linear:"Lnr ",radial:"Rdl ",angle:"Angl",reflected:"Rflc",diamond:"Dmnd"}),U4=vt("animInterpStyle","linear",{linear:"Lnr ",hold:"hold"}),H4=vt("stdTrackID","opacity",{opacity:"opacityTrack",style:"styleTrack",sheetTransform:"sheetTransformTrack",sheetPosition:"sheetPositionTrack",globalLighting:"globalLightingTrack"}),Go=vt("gradientInterpolationMethodType","perceptual",{perceptual:"Perc",linear:"Lnr ",classic:"Gcls",smooth:"Smoo"}),nu=vt("ClrS","rgb",{rgb:"RGBC",hsb:"HSBl",lab:"LbCl",hsl:"HSLC"}),au=vt("FStl","outside",{outside:"OutF",center:"CtrF",inside:"InsF"}),j4=vt("FrFl","color",{color:"SClr",gradient:"GrFl",pattern:"Ptrn"}),G4=vt("ESliceType","image",{image:"Img ",noImage:"noImage"}),V4=vt("ESliceHorzAlign","default",{default:"default"}),q4=vt("ESliceVertAlign","default",{default:"default"}),W4=vt("ESliceOrigin","userGenerated",{userGenerated:"userGenerated",autoGenerated:"autoGenerated",layer:"layer"}),K4=vt("ESliceBGColorType","none",{none:"None",matte:"matte",color:"Clr "}),X4=vt("strokeStyleLineCapType","butt",{butt:"strokeStyleButtCap",round:"strokeStyleRoundCap",square:"strokeStyleSquareCap"}),Y4=vt("strokeStyleLineJoinType","miter",{miter:"strokeStyleMiterJoin",round:"strokeStyleRoundJoin",bevel:"strokeStyleBevelJoin"}),Z4=vt("strokeStyleLineAlignment","inside",{inside:"strokeStyleAlignInside",center:"strokeStyleAlignCenter",outside:"strokeStyleAlignOutside"}),J4=vt("BlrM","ispinmage",{spin:"Spn ",zoom:"Zm "}),Q4=vt("BlrQ","good",{draft:"Drft",good:"Gd ",best:"Bst "}),eg=vt("SmBM","normal",{normal:"SBMN","edge only":"SBME","overlay edge":"SBMO"}),tg=vt("SmBQ","medium",{low:"SBQL",medium:"SBQM",high:"SBQH"}),rg=vt("DspM","stretch to fit",{"stretch to fit":"StrF",tile:"Tile"}),Vo=vt("UndA","repeat edge pixels",{"wrap around":"WrpA","repeat edge pixels":"RptE"}),ng=vt("Cnvr","rectangular to polar",{"rectangular to polar":"RctP","polar to rectangular":"PlrR"}),ag=vt("RplS","medium",{small:"Sml ",medium:"Mdm ",large:"Lrg "}),ig=vt("SphM","normal",{normal:"Nrml","horizontal only":"HrzO","vertical only":"VrtO"}),og=vt("Wvtp","sine",{sine:"WvSn",triangle:"WvTr",square:"WvSq"}),lg=vt("ZZTy","pond ripples",{"around center":"ArnC","out from center":"OtFr","pond ripples":"PndR"}),sg=vt("Dstr","uniform",{uniform:"Unfr",gaussian:"Gsn "}),os=vt("Chnl","composite",{red:"Rd ",green:"Grn ",blue:"Bl ",composite:"Cmps"}),ug=vt("MztT","fine dots",{"fine dots":"FnDt","medium dots":"MdmD","grainy dots":"GrnD","coarse dots":"CrsD","short lines":"ShrL","medium lines":"MdmL","long lines":"LngL","short strokes":"ShSt","medium strokes":"MdmS","long strokes":"LngS"}),cg=vt("Lns ","50-300mm zoom",{"50-300mm zoom":"Zm ","32mm prime":"Nkn ","105mm prime":"Nkn1","movie prime":"PnVs"}),fg=vt("blurType","gaussian blur",{"gaussian blur":"GsnB","lens blur":"lensBlur","motion blur":"MtnB"}),dg=vt("DfsM","normal",{normal:"Nrml","darken only":"DrkO","lighten only":"LghO",anisotropic:"anisotropic"}),hg=vt("ExtT","blocks",{blocks:"Blks",pyramids:"Pyrm"}),pg=vt("ExtR","random",{random:"Rndm","level-based":"LvlB"}),vg=vt("FlCl","background color",{"background color":"FlBc","foreground color":"FlFr","inverse image":"FlIn","unaltered image":"FlSm"}),mg=vt("CntE","upper",{lower:"Lwr ",upper:"Upr "}),gg=vt("WndM","wind",{wind:"Wnd ",blast:"Blst",stagger:"Stgr"}),bg=vt("Drct","from the right",{left:"Left",right:"Rght"}),yg=vt("IntE","odd lines",{"odd lines":"ElmO","even lines":"ElmE"}),xg=vt("IntC","interpolation",{duplication:"CrtD",interpolation:"CrtI"}),_g=vt("FlMd","wrap around",{"set to transparent":"Bckg","repeat edge pixels":"Rpt ","wrap around":"Wrp "});vt("prjM","fisheye",{fisheye:"fisP",perspective:"perP",auto:"auto","full spherical":"fusP"});var wg=vt("presetKindType","presetKindCustom",{custom:"presetKindCustom",default:"presetKindDefault"}),qo=function(){return qo=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},qo.apply(this,arguments)},kg=[],Sg={};function Ot(e,t,r,n){var a={key:e,has:t,read:r,write:n};kg.push(a),Sg[a.key]=a}var iu=[void 0,"PPI","PPCM"],ou=[void 0,"Inches","Centimeters","Points","Picas","Columns"],Cg="0123456789abcdef";function Ag(e){return e<=57?e-48:e-87}function TE(e,t){return Ag(e.charCodeAt(t))<<4|Ag(e.charCodeAt(t+1))}function sd(e,t){var r=dr(e,t);return i4(r)}function ud(e,t){var r=a4(t);ta(e,r)}function ME(e){for(var t=Ze(e),r=dr(e,t),n=!1,a=0;a<r.byteLength;a++)if(r[a]&128){n=!0;break}if(n){var i=new TextDecoder("gbk");return i.decode(r)}else return i4(r)}function DE(e,t){for(var r="",n=0,a=t.codePointAt(n++);a!==void 0;a=t.codePointAt(n++))r+=a>127?"?":String.fromCodePoint(a);var i=a4(r);Ge(e,i.byteLength),ta(e,i)}Ot(1061,function(e){return e.captionDigest!==void 0},function(e,t){for(var r="",n=0;n<16;n++){var a=Ze(e);r+=Cg[a>>4],r+=Cg[a&15]}t.captionDigest=r},function(e,t){for(var r=0;r<16;r++)Ge(e,TE(t.captionDigest,r*2))}),Ot(1060,function(e){return e.xmpMetadata!==void 0},function(e,t,r){t.xmpMetadata=sd(e,r())},function(e,t){ud(e,t.xmpMetadata)});var lu=vt("Inte","perceptual",{perceptual:"Img ",saturation:"Grp ","relative colorimetric":"Clrm","absolute colorimetric":"AClr"});Ot(1082,function(e){return e.printInformation!==void 0},function(e,t){var r,n,a=Tt(e);t.printInformation={printerName:a.printerName||"",renderingIntent:lu.decode((r=a.Inte)!==null&&r!==void 0?r:"Inte.Img ")};var i=t.printInformation;a.PstS!==void 0&&(i.printerManagesColors=a.PstS),a["Nm "]!==void 0&&(i.printerProfile=a["Nm "]),a.MpBl!==void 0&&(i.blackPointCompensation=a.MpBl),a.printSixteenBit!==void 0&&(i.printSixteenBit=a.printSixteenBit),a.hardProof!==void 0&&(i.hardProof=a.hardProof),a.printProofSetup&&("Bltn"in a.printProofSetup?i.proofSetup={builtin:a.printProofSetup.Bltn.split(".")[1]}:i.proofSetup={profile:a.printProofSetup.profile,renderingIntent:lu.decode((n=a.printProofSetup.Inte)!==null&&n!==void 0?n:"Inte.Img "),blackPointCompensation:!!a.printProofSetup.MpBl,paperWhite:!!a.printProofSetup.paperWhite})},function(e,t){var r,n,a=t.printInformation,i={};a.printerManagesColors?i.PstS=!0:(a.hardProof!==void 0&&(i.hardProof=!!a.hardProof),i.ClrS="ClrS.RGBC",i["Nm "]=(r=a.printerProfile)!==null&&r!==void 0?r:"CIE RGB"),i.Inte=lu.encode(a.renderingIntent),a.printerManagesColors||(i.MpBl=!!a.blackPointCompensation),i.printSixteenBit=!!a.printSixteenBit,i.printerName=a.printerName||"",a.proofSetup&&"profile"in a.proofSetup?i.printProofSetup={profile:a.proofSetup.profile||"",Inte:lu.encode(a.proofSetup.renderingIntent),MpBl:!!a.proofSetup.blackPointCompensation,paperWhite:!!a.proofSetup.paperWhite}:i.printProofSetup={Bltn:!((n=a.proofSetup)===null||n===void 0)&&n.builtin?"builtinProof.".concat(a.proofSetup.builtin):"builtinProof.proofCMYK"},Dt(e,"","printOutput",i)}),Ot(1005,function(e){return e.resolutionInfo!==void 0},function(e,t){var r=kn(e),n=Ke(e),a=Ke(e),i=kn(e),o=Ke(e),l=Ke(e);t.resolutionInfo={horizontalResolution:r,horizontalResolutionUnit:iu[n]||"PPI",widthUnit:ou[a]||"Inches",verticalResolution:i,verticalResolutionUnit:iu[o]||"PPI",heightUnit:ou[l]||"Inches"}},function(e,t){var r=t.resolutionInfo;An(e,r.horizontalResolution||0),Oe(e,Math.max(1,iu.indexOf(r.horizontalResolutionUnit))),Oe(e,Math.max(1,ou.indexOf(r.widthUnit))),An(e,r.verticalResolution||0),Oe(e,Math.max(1,iu.indexOf(r.verticalResolutionUnit))),Oe(e,Math.max(1,ou.indexOf(r.heightUnit)))});var Eg=["centered","size to fit","user defined"];Ot(1062,function(e){return e.printScale!==void 0},function(e,t){t.printScale={style:Eg[Et(e)],x:Yn(e),y:Yn(e),scale:Yn(e)}},function(e,t){var r=t.printScale,n=r.style,a=r.x,i=r.y,o=r.scale;Pt(e,Math.max(0,Eg.indexOf(n))),Qn(e,a||0),Qn(e,i||0),Qn(e,o||0)}),Ot(1006,function(e){return e.alphaChannelNames!==void 0},function(e,t,r){if(t.alphaChannelNames)nt(e,r());else for(t.alphaChannelNames=[];r()>0;){var n=ME(e);t.alphaChannelNames.push(n)}},function(e,t){for(var r=0,n=t.alphaChannelNames;r<n.length;r++){var a=n[r];DE(e,a)}}),Ot(1045,function(e){return e.alphaChannelNames!==void 0},function(e,t,r){for(t.alphaChannelNames=[];r()>0;)t.alphaChannelNames.push(_r(e))},function(e,t){for(var r=0,n=t.alphaChannelNames;r<n.length;r++){var a=n[r];Ji(e,a)}}),Ot(1053,function(e){return e.alphaIdentifiers!==void 0},function(e,t,r){for(t.alphaIdentifiers=[];r()>=4;)t.alphaIdentifiers.push(De(e))},function(e,t){for(var r=0,n=t.alphaIdentifiers;r<n.length;r++){var a=n[r];Je(e,a)}}),Ot(1010,function(e){return e.backgroundColor!==void 0},function(e,t){return t.backgroundColor=Ir(e)},function(e,t){return zr(e,t.backgroundColor)}),Ot(1037,function(e){return e.globalAngle!==void 0},function(e,t){return t.globalAngle=st(e)},function(e,t){return ht(e,t.globalAngle)}),Ot(1049,function(e){return e.globalAltitude!==void 0},function(e,t){return t.globalAltitude=De(e)},function(e,t){return Je(e,t.globalAltitude)}),Ot(1011,function(e){return e.printFlags!==void 0},function(e,t){t.printFlags={labels:!!Ze(e),cropMarks:!!Ze(e),colorBars:!!Ze(e),registrationMarks:!!Ze(e),negative:!!Ze(e),flip:!!Ze(e),interpolate:!!Ze(e),caption:!!Ze(e),printFlags:!!Ze(e)}},function(e,t){var r=t.printFlags;Ge(e,r.labels?1:0),Ge(e,r.cropMarks?1:0),Ge(e,r.colorBars?1:0),Ge(e,r.registrationMarks?1:0),Ge(e,r.negative?1:0),Ge(e,r.flip?1:0),Ge(e,r.interpolate?1:0),Ge(e,r.caption?1:0),Ge(e,r.printFlags?1:0)}),Ot(1034,function(e){return e.copyrighted!==void 0},function(e,t){t.copyrighted=!!Ze(e)},function(e,t){Ge(e,t.copyrighted?1:0)}),Ot(1035,function(e){return e.url!==void 0},function(e,t,r){t.url=fu(e,r())},function(e,t){wT(e,t.url)}),Ot(1080,function(e){return e.countInformation!==void 0},function(e,t){var r=Tt(e);t.countInformation=r.countGroupList.map(function(n){return{color:{r:n["Rd "],g:n["Grn "],b:n["Bl "]},name:n["Nm "],size:n["Rds "],fontSize:n.fontSize,visible:n.Vsbl,points:n.countObjectList.map(function(a){return{x:a["X "],y:a["Y "]}})}})},function(e,t){var r={Vrsn:1,countGroupList:t.countInformation.map(function(n){return{"Rd ":n.color.r,"Grn ":n.color.g,"Bl ":n.color.b,"Nm ":n.name,"Rds ":n.size,fontSize:n.fontSize,Vsbl:n.visible,countObjectList:n.points.map(function(a){return{"X ":a.x,"Y ":a.y}})}})};Dt(e,"","Cnt ",r)}),Ot(1024,function(e){return e.layerState!==void 0},function(e,t){return t.layerState=Ke(e)},function(e,t){return Oe(e,t.layerState)}),Ot(1026,function(e){return e.layersGroup!==void 0},function(e,t,r){for(t.layersGroup=[];r()>0;)t.layersGroup.push(Ke(e))},function(e,t){for(var r=0,n=t.layersGroup;r<n.length;r++){var a=n[r];Oe(e,a)}}),Ot(1072,function(e){return e.layerGroupsEnabledId!==void 0},function(e,t,r){for(t.layerGroupsEnabledId=[];r()>0;)t.layerGroupsEnabledId.push(Ze(e))},function(e,t){for(var r=0,n=t.layerGroupsEnabledId;r<n.length;r++){var a=n[r];Ge(e,a)}}),Ot(1069,function(e){return e.layerSelectionIds!==void 0},function(e,t){var r=Ke(e);for(t.layerSelectionIds=[];r--;)t.layerSelectionIds.push(De(e))},function(e,t){Oe(e,t.layerSelectionIds.length);for(var r=0,n=t.layerSelectionIds;r<n.length;r++){var a=n[r];Je(e,a)}}),Ot(1032,function(e){return e.gridAndGuidesInformation!==void 0},function(e,t){var r=De(e),n=De(e),a=De(e),i=De(e);if(r!==1)throw new Error("Invalid 1032 resource version: ".concat(r));t.gridAndGuidesInformation={grid:{horizontal:n,vertical:a},guides:[]};for(var o=0;o<i;o++)t.gridAndGuidesInformation.guides.push({location:De(e)/32,direction:Ze(e)?"horizontal":"vertical"})},function(e,t){var r=t.gridAndGuidesInformation,n=r.grid||{horizontal:18*32,vertical:18*32},a=r.guides||[];Je(e,1),Je(e,n.horizontal),Je(e,n.vertical),Je(e,a.length);for(var i=0,o=a;i<o.length;i++){var l=o[i];Je(e,l.location*32),Ge(e,l.direction==="horizontal"?1:0)}}),Ot(1065,function(e){return e.layerComps!==void 0},function(e,t){var r=Tt(e,!0);t.layerComps={list:[]};for(var n=0,a=r.list;n<a.length;n++){var i=a[n];t.layerComps.list.push({id:i.compID,name:i["Nm "],capturedInfo:i.capturedInfo}),"comment"in i&&(t.layerComps.list[t.layerComps.list.length-1].comment=i.comment)}"lastAppliedComp"in r&&(t.layerComps.lastApplied=r.lastAppliedComp)},function(e,t){for(var r=t.layerComps,n={list:[]},a=0,i=r.list;a<i.length;a++){var o=i[a],l={};l._classID="Comp",l["Nm "]=o.name,"comment"in o&&(l.comment=o.comment),l.compID=o.id,l.capturedInfo=o.capturedInfo,n.list.push(l)}"lastApplied"in r&&(n.lastAppliedComp=r.lastApplied),Dt(e,"","CompList",n)});var Tg=["normal",void 0,void 0,void 0,void 0,void 0,void 0,"multiply","screen",void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,"difference"];Ot(1078,function(e){return e.onionSkins!==void 0},function(e,t){var r=Tt(e);t.onionSkins={enabled:r.enab,framesBefore:r.numBefore,framesAfter:r.numAfter,frameSpacing:r.Spcn,minOpacity:r.minOpacity/100,maxOpacity:r.maxOpacity/100,blendMode:Tg[r.BlnM]||"normal"}},function(e,t){var r=t.onionSkins,n={Vrsn:1,enab:r.enabled,numBefore:r.framesBefore,numAfter:r.framesAfter,Spcn:r.frameSpacing,minOpacity:r.minOpacity*100|0,maxOpacity:r.maxOpacity*100|0,BlnM:Math.max(0,Tg.indexOf(r.blendMode))};Dt(e,"","null",n)}),Ot(1075,function(e){return e.timelineInformation!==void 0},function(e,t){var r,n,a=Tt(e);t.timelineInformation={enabled:a.enab,frameStep:an(a.frameStep),frameRate:a.frameRate,time:an(a.time),duration:an(a.duration),workInTime:an(a.workInTime),workOutTime:an(a.workOutTime),repeats:a.LCnt,hasMotion:a.hasMotion,globalTracks:A4(a.globalTrackList,!!e.logMissingFeatures)},!((n=(r=a.audioClipGroupList)===null||r===void 0?void 0:r.audioClipGroupList)===null||n===void 0)&&n.length&&(t.timelineInformation.audioClipGroups=a.audioClipGroupList.audioClipGroupList.map(function(i){return{id:i.groupID,muted:i.muted,audioClips:i.audioClipList.map(function(o){var l=o.clipID,s=o.timeScope,u=o.muted,c=o.audioLevel,f=o.frameReader;return{id:l,start:an(s.Strt),duration:an(s.duration),inTime:an(s.inTime),outTime:an(s.outTime),muted:u,audioLevel:c,frameReader:{type:f.frameReaderType,mediaDescriptor:f.mediaDescriptor,link:{name:f["Lnk "]["Nm "],fullPath:f["Lnk "].fullPath,relativePath:f["Lnk "].relPath}}}})}}))},function(e,t){var r,n=t.timelineInformation,a={Vrsn:1,enab:n.enabled,frameStep:n.frameStep,frameRate:n.frameRate,time:n.time,duration:n.duration,workInTime:n.workInTime,workOutTime:n.workOutTime,LCnt:n.repeats,globalTrackList:E4(n.globalTracks),audioClipGroupList:{audioClipGroupList:(r=n.audioClipGroups)===null||r===void 0?void 0:r.map(function(i){return{groupID:i.id,muted:i.muted,audioClipList:i.audioClips.map(function(o){return{clipID:o.id,timeScope:{Vrsn:1,Strt:o.start,duration:o.duration,inTime:o.inTime,outTime:o.outTime},frameReader:{frameReaderType:o.frameReader.type,descVersion:1,"Lnk ":{descVersion:1,"Nm ":o.frameReader.link.name,fullPath:o.frameReader.link.fullPath,relPath:o.frameReader.link.relativePath},mediaDescriptor:o.frameReader.mediaDescriptor},muted:o.muted,audioLevel:o.audioLevel}})}})},hasMotion:n.hasMotion};Dt(e,"","null",a,"anim")}),Ot(1076,function(e){return e.sheetDisclosure!==void 0},function(e,t){var r=Tt(e);t.sheetDisclosure={},r.sheetTimelineOptions&&(t.sheetDisclosure.sheetTimelineOptions=r.sheetTimelineOptions.map(function(n){return{sheetID:n.sheetID,sheetDisclosed:n.sheetDisclosed,lightsDisclosed:n.lightsDisclosed,meshesDisclosed:n.meshesDisclosed,materialsDisclosed:n.materialsDisclosed}}))},function(e,t){var r=t.sheetDisclosure,n={Vrsn:1};r.sheetTimelineOptions&&(n.sheetTimelineOptions=r.sheetTimelineOptions.map(function(a){return{Vrsn:2,sheetID:a.sheetID,sheetDisclosed:a.sheetDisclosed,lightsDisclosed:a.lightsDisclosed,meshesDisclosed:a.meshesDisclosed,materialsDisclosed:a.materialsDisclosed}})),Dt(e,"","null",n)}),Ot(1054,function(e){return e.urlsList!==void 0},function(e,t){var r=De(e);t.urlsList=[];for(var n=0;n<r;n++){var a=Wt(e);if(a!=="slic"&&e.throwForMissingFeatures)throw new Error("Unknown long");var i=De(e),o=_r(e);t.urlsList.push({id:i,url:o,ref:"slice"})}},function(e,t){var r=t.urlsList;Je(e,r.length);for(var n=0;n<r.length;n++)pt(e,"slic"),Je(e,r[n].id),En(e,r[n].url)});function Mg(e){return{"Top ":e.top,Left:e.left,Btom:e.bottom,Rght:e.right}}function Dg(e){return{top:e["Top "],left:e.Left,bottom:e.Btom,right:e.Rght}}function su(e,t){return e[Math.max(0,Math.min(e.length-1,t))]}var Ig=["autoGenerated","layer","userGenerated"],zg=["noImage","image"],uu=["default"];Ot(1050,function(e){return e.slices?e.slices.length:0},function(e,t){var r=De(e);if(r===6){t.slices||(t.slices=[]);var n=st(e),a=st(e),i=st(e),o=st(e),l=_r(e),s=De(e);t.slices.push({bounds:{top:n,left:a,bottom:i,right:o},groupName:l,slices:[]});for(var u=t.slices[t.slices.length-1].slices,c=0;c<s;c++){var f=De(e),d=De(e),h=su(Ig,De(e)),y=h=="layer"?De(e):0,p=_r(e),x=su(zg,De(e)),g=st(e),m=st(e),b=st(e),v=st(e),S=_r(e),C=_r(e),A=_r(e),_=_r(e),E=!!Ze(e),M=_r(e),z=su(uu,De(e)),N=su(uu,De(e)),R=Ze(e),$=Ze(e),q=Ze(e),W=Ze(e),Z=R+$+q+W===0?"none":R===0?"matte":"color";u.push({id:f,groupId:d,origin:h,associatedLayerId:y,name:p,target:C,message:A,altTag:_,cellTextIsHTML:E,cellText:M,horizontalAlignment:z,verticalAlignment:N,type:x,url:S,bounds:{top:m,left:g,bottom:v,right:b},backgroundColorType:Z,backgroundColor:{r:$,g:q,b:W,a:R}})}var te=Tt(e);te.slices.forEach(function(ne){var _e=u.find(function(pe){return ne.sliceID==pe.id});_e&&(_e.topOutset=ne.topOutset,_e.leftOutset=ne.leftOutset,_e.bottomOutset=ne.bottomOutset,_e.rightOutset=ne.rightOutset)})}else if(r===7||r===8){var te=Tt(e);t.slices||(t.slices=[]),t.slices.push({groupName:te.baseName,bounds:Dg(te.bounds),slices:te.slices.map(function(_e){return qo(qo({},_e["Nm "]?{name:_e["Nm "]}:{}),{id:_e.sliceID,groupId:_e.groupID,associatedLayerId:0,origin:W4.decode(_e.origin),type:G4.decode(_e.Type),bounds:Dg(_e.bounds),url:_e.url,target:_e.null,message:_e.Msge,altTag:_e.altTag,cellTextIsHTML:_e.cellTextIsHTML,cellText:_e.cellText,horizontalAlignment:V4.decode(_e.horzAlign),verticalAlignment:q4.decode(_e.vertAlign),backgroundColorType:K4.decode(_e.bgColorType),backgroundColor:_e.bgColor?{r:_e.bgColor["Rd "],g:_e.bgColor["Grn "],b:_e.bgColor["Bl "],a:_e.bgColor.alpha}:{r:0,g:0,b:0,a:0},topOutset:_e.topOutset||0,leftOutset:_e.leftOutset||0,bottomOutset:_e.bottomOutset||0,rightOutset:_e.rightOutset||0})})})}else throw new Error("Invalid slices version (".concat(r,")"))},function(e,t,r){var n=t.slices[r],a=n.bounds,i=n.groupName,o=n.slices;Je(e,6),ht(e,a.top),ht(e,a.left),ht(e,a.bottom),ht(e,a.right),En(e,i),Je(e,o.length);for(var l=0;l<o.length;l++){var s=o[l],u=s.backgroundColor,c=u.a,f=u.r,d=u.g,h=u.b;s.backgroundColorType==="none"?c=f=d=h=0:s.backgroundColorType==="matte"&&(c=0,f=d=h=255),Je(e,s.id),Je(e,s.groupId),Je(e,Ig.indexOf(s.origin)),s.origin==="layer"&&Je(e,s.associatedLayerId),En(e,s.name||""),Je(e,zg.indexOf(s.type)),ht(e,s.bounds.left),ht(e,s.bounds.top),ht(e,s.bounds.right),ht(e,s.bounds.bottom),En(e,s.url),En(e,s.target),En(e,s.message),En(e,s.altTag),Ge(e,s.cellTextIsHTML?1:0),En(e,s.cellText),Je(e,uu.indexOf(s.horizontalAlignment)),Je(e,uu.indexOf(s.verticalAlignment)),Ge(e,c),Ge(e,f),Ge(e,d),Ge(e,h)}var y={bounds:Mg(a),slices:[]};o.forEach(function(p){var x=qo(qo({sliceID:p.id,groupID:p.groupId,origin:W4.encode(p.origin),Type:G4.encode(p.type),bounds:Mg(p.bounds)},p.name?{"Nm ":p.name}:{}),{url:p.url,null:p.target,Msge:p.message,altTag:p.altTag,cellTextIsHTML:p.cellTextIsHTML,cellText:p.cellText,horzAlign:V4.encode(p.horizontalAlignment),vertAlign:q4.encode(p.verticalAlignment),bgColorType:K4.encode(p.backgroundColorType)});if(p.backgroundColorType==="color"){var g=p.backgroundColor,m=g.r,b=g.g,v=g.b,S=g.a;x.bgColor={"Rd ":m,"Grn ":b,"Bl ":v,alpha:S}}x.topOutset=p.topOutset||0,x.leftOutset=p.leftOutset||0,x.bottomOutset=p.bottomOutset||0,x.rightOutset=p.rightOutset||0,y.slices.push(x)}),Dt(e,"","null",y,"slices")}),Ot(1064,function(e){return e.pixelAspectRatio!==void 0},function(e,t){if(De(e)>2)throw new Error("Invalid pixelAspectRatio version");t.pixelAspectRatio={aspect:Nn(e)}},function(e,t){Je(e,2),$n(e,t.pixelAspectRatio.aspect)}),Ot(1041,function(e){return e.iccUntaggedProfile!==void 0},function(e,t){t.iccUntaggedProfile=!!Ze(e)},function(e,t){Ge(e,t.iccUntaggedProfile?1:0)}),Ot(1044,function(e){return e.idsSeedNumber!==void 0},function(e,t){return t.idsSeedNumber=De(e)},function(e,t){return Je(e,t.idsSeedNumber)}),Ot(1036,function(e){return e.thumbnail!==void 0||e.thumbnailRaw!==void 0},function(e,t,r){var n=De(e),a=De(e),i=De(e);De(e),De(e),De(e);var o=Ke(e),l=Ke(e);if(n!==1||o!==24||l!==1){e.logMissingFeatures&&e.log("Invalid thumbnail data (format: ".concat(n,", bitsPerPixel: ").concat(o,", planes: ").concat(l,")")),nt(e,r());return}var s=r(),u=dr(e,s);e.useRawThumbnail?t.thumbnailRaw={width:a,height:i,data:u}:u.byteLength&&(t.thumbnail=sE(u))},function(e,t){var r,n=0,a=0,i=new Uint8Array(0);if(t.thumbnailRaw)n=t.thumbnailRaw.width,a=t.thumbnailRaw.height,i=t.thumbnailRaw.data;else try{var o=(r=t.thumbnail.toDataURL("image/jpeg",1))===null||r===void 0?void 0:r.substring(23);o&&(i=t4(o),n=t.thumbnail.width,a=t.thumbnail.height)}catch{}var l=24,s=Math.floor((n*l+31)/32)*4,u=1,c=s*a*u,f=i.length;Je(e,1),Je(e,n),Je(e,a),Je(e,s),Je(e,c),Je(e,f),Oe(e,l),Oe(e,u),ta(e,i)}),Ot(1057,function(e){return e.versionInfo!==void 0},function(e,t,r){var n=De(e);if(n!==1)throw new Error("Invalid versionInfo version");t.versionInfo={hasRealMergedData:!!Ze(e),writerName:_r(e),readerName:_r(e),fileVersion:De(e)},nt(e,r())},function(e,t){var r=t.versionInfo;Je(e,1),Ge(e,r.hasRealMergedData?1:0),En(e,r.writerName),En(e,r.readerName),Je(e,r.fileVersion)}),Ot(7e3,function(e){return e.imageReadyVariables!==void 0},function(e,t,r){t.imageReadyVariables=sd(e,r())},function(e,t){ud(e,t.imageReadyVariables)}),Ot(7001,function(e){return e.imageReadyDataSets!==void 0},function(e,t,r){t.imageReadyDataSets=sd(e,r())},function(e,t){ud(e,t.imageReadyDataSets)}),Ot(1088,function(e){return e.pathSelectionState!==void 0},function(e,t,r){var n=Tt(e);t.pathSelectionState=n.null},function(e,t){var r={null:t.pathSelectionState};Dt(e,"","null",r)});var Fg=vt("FrmD","",{auto:"Auto",none:"None",dispose:"Disp"});Ot(4e3,function(e){return e.animations!==void 0},function(e,t,r){var n=Wt(e);if(n==="mani")Ca(e,"IRFR"),Sn(e,1,function(i){for(var o=function(){Ca(e,"8BIM");var l=Wt(e);Sn(e,1,function(s){if(l==="AnDs"){var u=Tt(e);t.animations={frames:u.FrIn.map(function(f){return{id:f.FrID,delay:(f.FrDl||0)/100,dispose:f.FrDs?Fg.decode(f.FrDs):"auto"}}),animations:u.FSts.map(function(f){return{id:f.FsID,frames:f.FsFr,repeats:f.LCnt,activeFrame:f.AFrm||0}})}}else if(l==="Roll"){var c=dr(e,s());e.logDevFeatures&&e.log("#4000 Roll",c)}else e.logMissingFeatures&&e.log("Unhandled subsection in #4000",l)})};i()>0;)o()});else if(n==="mopt"){var a=dr(e,r());e.logDevFeatures&&e.log("#4000 mopt",a)}else e.logMissingFeatures&&e.log("Unhandled key in #4000:",n)},function(e,t){t.animations&&(pt(e,"mani"),pt(e,"IRFR"),$r(e,1,function(){pt(e,"8BIM"),pt(e,"AnDs"),$r(e,1,function(){for(var r={FrIn:[],FSts:[]},n=0;n<t.animations.frames.length;n++){var a=t.animations.frames[n],i={FrID:a.id};a.delay&&(i.FrDl=a.delay*100|0),i.FrDs=Fg.encode(a.dispose),r.FrIn.push(i)}for(var n=0;n<t.animations.animations.length;n++){var o=t.animations.animations[n],l={FsID:o.id,AFrm:o.activeFrame|0,FsFr:o.frames,LCnt:o.repeats|0};r.FSts.push(l)}Dt(e,"","null",r)})}))});var IE=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},Og=[0,1,3,2],zE=["bitmap","grayscale","indexed","RGB","CMYK","multichannel","duotone","lab"];function cu(e){for(var t=e.width*e.height*4,r=0;r<t;r+=4){var n=e.data[r];e.data[r+1]=n,e.data[r+2]=n}}function Wo(e,t,r){var n=new DataView(e,t,r);return{view:n,offset:0,strict:!1,debug:!1,large:!1,globalAlpha:!1,log:console.log}}function cd(e,t){if(e.strict)throw new Error(t);e.debug&&e.log(t)}function Ze(e){return e.offset+=1,e.view.getUint8(e.offset-1)}function FE(e){return e.view.getUint8(e.offset)}function Et(e){return e.offset+=2,e.view.getInt16(e.offset-2,!1)}function Ke(e){return e.offset+=2,e.view.getUint16(e.offset-2,!1)}function OE(e){return e.offset+=2,e.view.getUint16(e.offset-2,!0)}function st(e){return e.offset+=4,e.view.getInt32(e.offset-4,!1)}function Pg(e){return e.offset+=4,e.view.getInt32(e.offset-4,!0)}function De(e){return e.offset+=4,e.view.getUint32(e.offset-4,!1)}function Yn(e){return e.offset+=4,e.view.getFloat32(e.offset-4,!1)}function Nn(e){return e.offset+=8,e.view.getFloat64(e.offset-8,!1)}function kn(e){return st(e)/65536}function Zn(e){return st(e)/(1<<24)}function dr(e,t){var r=e.view.byteOffset+e.offset;if(e.offset+=t,r+t>e.view.buffer.byteLength){if(cd(e,"Reading bytes exceeding buffer length"),t>100*1024*1024)throw new Error("Reading past end of file");var n=new Uint8Array(t),a=Math.min(t,e.view.byteLength-r);return a>0&&n.set(new Uint8Array(e.view.buffer,r,a)),n}else return new Uint8Array(e.view.buffer,r,t)}function Wt(e){return Rg(e,4)}function PE(e,t){var r=String.fromCharCode(e.view.getUint8(t))+String.fromCharCode(e.view.getUint8(t+1))+String.fromCharCode(e.view.getUint8(t+2))+String.fromCharCode(e.view.getUint8(t+3));return r=="8BIM"||r=="8B64"}function Jn(e,t){for(var r=Ze(e),n=r?Rg(e,r):"";++r%t;)e.offset++;return n}function _r(e){var t=De(e);return fd(e,t)}function fd(e,t){for(var r="";t--;){var n=Ke(e);(n||t>0)&&(r+=String.fromCharCode(n))}return r}function RE(e,t){for(var r="";t--;){var n=OE(e);(n||t>0)&&(r+=String.fromCharCode(n))}return r}function fu(e,t){for(var r="";t--;)r+=String.fromCharCode(Ze(e));return r}function nt(e,t){e.offset+=t}function Ca(e,t,r){var n=e.offset,a=Wt(e);if(a!==t&&a!==r)throw new Error("Invalid signature: '".concat(a,"' at 0x").concat(n.toString(16)))}function Rg(e,t){for(var r=dr(e,t),n="",a=0;a<r.length;a++)n+=String.fromCharCode(r[a]);return n}function LE(e){return e==="8BIM"||e==="MeSa"||e==="AgHg"||e==="PHUT"||e==="DCSR"}function BE(e,t){var r;t===void 0&&(t={}),Ca(e,"8BPS");var n=Ke(e);if(n!==1&&n!==2)throw new Error("Invalid PSD file version: ".concat(n));nt(e,6);var a=Ke(e),i=De(e),o=De(e),l=Ke(e),s=Ke(e),u=n===1?3e4:3e5;if(o>u||i>u)throw new Error("Invalid size: ".concat(o,"x").concat(i));if(a>16)throw new Error("Invalid channel count: ".concat(a));if(![1,8,16,32].includes(l))throw new Error("Invalid bitsPerChannel: ".concat(l));if(Og.indexOf(s)===-1)throw new Error("Color mode not supported: ".concat((r=zE[s])!==null&&r!==void 0?r:s));var c={width:o,height:i,channels:a,bitsPerChannel:l,colorMode:s};Object.assign(e,t),e.large=n===2,e.globalAlpha=!1,Sn(e,1,function(p){if(p()){if(s===2){if(p()!=768)throw new Error("Invalid color palette size");c.palette=[];for(var x=0;x<256;x++)c.palette.push({r:Ze(e),g:0,b:0});for(var x=0;x<256;x++)c.palette[x].g=Ze(e);for(var x=0;x<256;x++)c.palette[x].b=Ze(e)}nt(e,p())}});var f={};Sn(e,1,function(p){for(var x=function(){$g(e,LE);var g=Ke(e);Jn(e,2),Sn(e,2,function(m){var b=Sg[g],v=g===1036&&!!e.skipThumbnail;if(b&&!v)try{b.read(e,f,m)}catch(S){if(e.throwForMissingFeatures)throw S;nt(e,m())}else nt(e,m())})};p()>0;)x()}),f.layersGroup,f.layerGroupsEnabledId;var d=IE(f,["layersGroup","layerGroupsEnabledId"]);Object.keys(d)&&(c.imageResources=d),Sn(e,1,function(p){if(Sn(e,2,function(g){dd(e,c,f),nt(e,g())},void 0,e.large),p()>0){var x=jE(e);x&&(c.globalLayerMaskInfo=x)}else nt(e,p());for(;p()>0;){for(;p()&&FE(e)===0;)nt(e,1);p()>=12?Ug(e,c,c,f):nt(e,p())}},void 0,e.large);var h=c.children&&c.children.length,y=e.skipCompositeImageData&&(e.skipLayerImageData||h);return y||qE(e,c),c}function dd(e,t,r){var n,a,i=r.layersGroup,o=i===void 0?[]:i,l=r.layerGroupsEnabledId,s=l===void 0?[]:l,u=Et(e);u<0&&(e.globalAlpha=!0,u=-u);for(var c=[],f=[],d=0;d<u;d++){var h=NE(e,t,r),y=h.layer,p=h.channels;o[d]!==void 0&&(y.linkGroup=o[d]),s[d]!==void 0&&(y.linkGroupEnabled=!!s[d]),c.push(y),f.push(p)}for(var d=0;d<u;d++)HE(e,t,c[d],f[d]);t.children||(t.children=[]);for(var x=[t],d=c.length-1;d>=0;d--){var g=c[d],m=g.sectionDivider?g.sectionDivider.type:0;m===1||m===2?(g.opened=m===1,g.children=[],!((n=g.sectionDivider)===null||n===void 0)&&n.key&&(g.blendMode=(a=Bo[g.sectionDivider.key])!==null&&a!==void 0?a:g.blendMode),x[x.length-1].children.unshift(g),x.push(g)):m===3?x.pop():x[x.length-1].children.unshift(g)}}function NE(e,t,r){var n={};n.top=st(e),n.left=st(e),n.bottom=st(e),n.right=st(e);for(var a=Ke(e),i=[],o=0;o<a;o++){var l=Et(e),s=De(e);if(e.large){if(s!==0)throw new Error("Sizes larger than 4GB are not supported");s=De(e)}i.push({id:l,length:s})}Ca(e,"8BIM");var u=Wt(e);if(!Bo[u])throw new Error("Invalid blend mode: '".concat(u,"'"));n.blendMode=Bo[u],n.opacity=Ze(e)/255,n.clipping=Ze(e)===1;var c=Ze(e);return n.transparencyProtected=(c&1)!==0,n.hidden=(c&2)!==0,c&32&&(n.effectsOpen=!0),nt(e,1),Sn(e,1,function(f){$E(e,n);var d=UE(e);for(d&&(n.blendingRanges=d),n.name=Jn(e,1);f()>4&&!PE(e,e.offset);)e.offset++;for(;f()>=12;)Ug(e,n,t,r);nt(e,f())}),{layer:n,channels:i}}function $E(e,t){return Sn(e,1,function(r){if(r()){var n={};t.mask=n,n.top=st(e),n.left=st(e),n.bottom=st(e),n.right=st(e),n.defaultColor=Ze(e);var a=Ze(e);if(n.positionRelativeToLayer=(a&1)!==0,n.disabled=(a&2)!==0,n.fromVectorData=(a&8)!==0,r()>=18){var i={};t.realMask=i;var o=Ze(e);i.positionRelativeToLayer=(o&1)!==0,i.disabled=(o&2)!==0,i.fromVectorData=(o&8)!==0,i.defaultColor=Ze(e),i.top=st(e),i.left=st(e),i.bottom=st(e),i.right=st(e)}if(a&16){var l=Ze(e);l&1&&(n.userMaskDensity=Ze(e)/255),l&2&&(n.userMaskFeather=Nn(e)),l&4&&(n.vectorMaskDensity=Ze(e)/255),l&8&&(n.vectorMaskFeather=Nn(e))}nt(e,r())}})}function du(e){return[Ze(e),Ze(e),Ze(e),Ze(e)]}function UE(e){return Sn(e,1,function(t){for(var r=du(e),n=du(e),a=[];t()>0;){var i=du(e),o=du(e);a.push({sourceRange:i,destRange:o})}return{compositeGrayBlendSource:r,compositeGraphBlendDestinationRange:n,ranges:a}})}function HE(e,t,r,n){if(!e.skipLayerImageData){var a=t.colorMode,i=a===void 0?3:a,o=t.bitsPerChannel,l=o===void 0?8:o;r.rawData={colorMode:i,bitsPerChannel:l,channels:[],large:e.large};for(var s=0,u=n;s<u.length;s++){var c=u[s],f=e.offset,d=0,h=void 0;if(c.length===1)throw new Error("Invalid channel length");if(c.length){if(d=Ke(e),d>3&&(e.offset-=1,d=Ke(e)),d>3&&(e.offset-=3,d=Ke(e)),d>3)throw new Error("Invalid compression: ".concat(d));c.length>2&&(h=dr(e,c.length-2))}e.offset=f+c.length,r.rawData.channels.push({id:c.id,compression:d,data:h})}e.useRawData||Bg(r,!!e.useImageData,!!e.throwForMissingFeatures)}}function Lg(e,t){for(var r=e.data,n=r instanceof Float32Array?1:r instanceof Uint16Array?65535:255,a=(t?4:3)|0,i=r.length|0,o=(t?5:4)|0,l=a;l<i;l=l+o|0)r[l]=n}function Bg(e,t,r){if(e.rawData){var n=e.rawData,a=n.colorMode,i=n.bitsPerChannel,o=n.channels,l=n.large,s=(e.right||0)-(e.left||0),u=(e.bottom||0)-(e.top||0),c=a===4,f,d=!1;if(s&&u)if(c){if(i!==8)throw new Error("bitsPerChannel Not supproted");f={width:s,height:u,data:new Uint8ClampedArray(s*u*5)}}else f=hd(s,u,i);for(var h=0,y=o;h<y.length;h++){var p=y[h],x=p.id,g=p.compression,m=p.data;if(m){var b=Wo(m.buffer,m.byteOffset,m.byteLength);if(x===-2||x===-3){var v=x===-2?e.mask:e.realMask;if(!v)throw new Error("Missing layer ".concat(x===-2?"mask":"real mask"," data"));var S=(v.right||0)-(v.left||0),C=(v.bottom||0)-(v.top||0);if(S<0||C<0||S>3e4||C>3e4)throw new Error("Invalid mask size");if(S&&C){var A=hd(S,C,i);Ng(b,m.byteLength,A,g,S,C,i,0,l,4),cu(A),Lg(A,!1),t?v.imageData=A:v.canvas=J0(A)}}else{var _=J2(x,c),E=f;if(_<0&&(E=void 0,r))throw new Error("Channel not supported: ".concat(x));Ng(b,m.byteLength,E,g,s,u,i,_,l,c?5:4),E&&a===1&&cu(E)}x===-1&&(d=!0)}}if(f){if(d||Lg(f,c),c){var M=f;f=$o(M.width,M.height),Hg(M,f,!1)}t?e.imageData=f:e.canvas=J0(f)}delete e.rawData}}function Ng(e,t,r,n,a,i,o,l,s,u){if(t)if(n===0){t!==a*i*Math.floor(o/8)&&e.log("Invalid length (".concat(t,", ").concat(a*i*Math.floor(o/8),")"));var c=dr(e,t);Gg(c,r,o,u,l)}else if(n===1)ki(e,r,a,i,o,u,[l],s);else if(n===2){var c=dr(e,t);Vg(c,r,a,i,o,u,l,!1)}else if(n===3){var c=dr(e,t);Vg(c,r,a,i,o,u,l,!0)}else throw new Error("Invalid Compression type: ".concat(n))}function jE(e){return Sn(e,1,function(t){if(t()){var r=Ke(e),n=Ke(e),a=Ke(e),i=Ke(e),o=Ke(e),l=Ke(e)/255,s=Ze(e);return nt(e,t()),{overlayColorSpace:r,colorSpace1:n,colorSpace2:a,colorSpace3:i,colorSpace4:o,opacity:l,kind:s}}})}var GE=[0,1,-1,2,-2,3,-3,4,-4];function $g(e,t){for(var r=e.offset,n="",a=0,i=GE;a<i.length;a++){var o=i[a];try{e.offset=r+o,n=Wt(e)}catch{}if(t(n))break}if(!t(n))throw new Error("Invalid signature: '".concat(n,"' at 0x").concat(r.toString(16)));return n}function VE(e){return e==="8BIM"||e==="8B64"}function Ug(e,t,r,n){var a=$g(e,VE),i=Wt(e),o=a==="8B64"||e.large&&K2.indexOf(i)!==-1;Sn(e,2,function(l){var s=vu[i];if(s)try{s.read(e,t,l,r,n)}catch(u){if(e.throwForMissingFeatures)throw u}else e.logMissingFeatures&&e.log("Unhandled additional info: ".concat(i)),nt(e,l());l()&&(e.logMissingFeatures&&e.log("Unread ".concat(l()," bytes left for additional info: ").concat(i)),nt(e,l()))},!1,o)}function hd(e,t,r,n){if(n===void 0&&(n=4),r===1||r===8)return n===4?$o(e,t):{width:e,height:t,data:new Uint8ClampedArray(e*t*n)};if(r===16)return{width:e,height:t,data:new Uint16Array(e*t*n)};if(r===32)return{width:e,height:t,data:new Float32Array(e*t*n)};throw new Error("Invalid bitDepth (".concat(r,")"))}function qE(e,t){var r,n=Ke(e),a=(r=t.bitsPerChannel)!==null&&r!==void 0?r:8;if(Og.indexOf(t.colorMode)===-1)throw new Error("Color mode not supported: ".concat(t.colorMode));if(n!==0&&n!==1)throw new Error("Compression type not supported: ".concat(n));var i=hd(t.width,t.height,a);switch(oE(i),t.colorMode){case 0:{if(a!==1)throw new Error("Invalid bitsPerChannel for bitmap color mode");var o=void 0;if(n===0)o=dr(e,Math.ceil(t.width/8)*t.height);else if(n===1)o=new Uint8Array(t.width*t.height),ki(e,{data:o,width:t.width,height:t.height},t.width,t.height,8,1,[0],e.large);else throw new Error("Bitmap compression not supported: ".concat(n));lE(o,i.data,t.width,t.height);break}case 3:case 1:{var l=t.colorMode===1?[0]:[0,1,2];if(t.channels&&t.channels>3)for(var s=3;s<t.channels;s++)l.push(s);else e.globalAlpha&&l.push(3);if(n===0)for(var s=0;s<l.length;s++){var u=dr(e,t.width*t.height*Math.floor(a/8));Gg(u,i,a,4,l[s])}else n===1&&(e.offset,ki(e,i,t.width,t.height,a,4,l,e.large));t.colorMode===1&&cu(i);break}case 2:{if(a!==8)throw new Error("bitsPerChannel Not supproted");if(t.channels!==1)throw new Error("Invalid channel count");if(!t.palette)throw new Error("Missing color palette");if(n===0)throw new Error("Not implemented");if(n===1){var c={width:i.width,height:i.height,data:new Uint8Array(i.width*i.height)};ki(e,c,t.width,t.height,a,1,[0],e.large),WE(c,i,t.palette)}else throw new Error("Not implemented");break}case 4:{if(a!==8)throw new Error("bitsPerChannel Not supproted");if(t.channels!==4)throw new Error("Invalid channel count");var l=[0,1,2,3];if(e.globalAlpha&&l.push(4),n===0)throw new Error("Not implemented");if(n===1){var f={width:i.width,height:i.height,data:new Uint8Array(i.width*i.height*5)};e.offset,ki(e,f,t.width,t.height,a,5,l,e.large),Hg(f,i,!0)}else throw new Error("Not implemented");break}default:throw new Error("Color mode not supported: ".concat(t.colorMode))}if(e.globalAlpha){if(t.bitsPerChannel!==8)throw new Error("bitsPerChannel Not supproted");for(var d=i.data,h=i.width*i.height*4,s=0;s<h;s+=4){var y=d[s+3];if(y!=0&&y!=255){var p=y/255,x=1/p,g=255*(1-x);d[s+0]=d[s+0]*x+g,d[s+1]=d[s+1]*x+g,d[s+2]=d[s+2]*x+g}}}e.useImageData?t.imageData=i:t.canvas=J0(i)}function Hg(e,t,r){for(var n=t.width*t.height*4,a=e.data,i=t.data,o=0,l=0;l<n;o+=5,l+=4){var s=a[o],u=a[o+1],c=a[o+2],f=a[o+3];i[l]=(s*f|0)/255|0,i[l+1]=(u*f|0)/255|0,i[l+2]=(c*f|0)/255|0,i[l+3]=r?255-a[o+4]:a[o+4]}}function WE(e,t,r){for(var n=e.width*e.height,a=e.data,i=t.data,o=0,l=0;o<n;o++,l+=4){var s=r[a[o]];i[l+0]=s.r,i[l+1]=s.g,i[l+2]=s.b,i[l+3]=255}}function KE(e,t){if(e.byteLength/e.length!==t.byteLength/t.length)throw new Error("Invalid array types")}function jg(e,t){if(t===8)return e;if(t===16){for(var r=0;r<e.byteLength;r+=2){var n=e[r];e[r]=e[r+1],e[r+1]=n}if(e.byteOffset%2){var a=new Uint16Array(e.byteLength/2);return new Uint8Array(a.buffer,a.byteOffset,a.byteLength).set(e),a}else return new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2)}else if(t===32)if(e.byteOffset%4){var a=new Float32Array(e.byteLength/4);return new Uint8Array(a.buffer,a.byteOffset,a.byteLength).set(e),a}else return new Float32Array(e.buffer,e.byteOffset,e.byteLength/4);else throw new Error("Invalid bitDepth (".concat(t,")"))}function pd(e,t,r,n){KE(e.data,t);for(var a=e.width*e.height,i=e.data,o=0,l=r|0;o<a;o++,l=l+n|0)i[l]=t[o]}function Gg(e,t,r,n,a){if(r==32)for(var i=0;i<e.byteLength;i+=4){var o=e[i+0],l=e[i+1],s=e[i+2],u=e[i+3];e[i+0]=u,e[i+1]=s,e[i+2]=l,e[i+3]=o}var c=jg(e,r);t&&a<n&&pd(t,c,a,n)}function vd(e,t,r,n){for(var a=0;a<r;a++)for(var i=a*t,o=1,l=i+1;o<t;o++,l++)e[l]=(e[l-1]+e[l])%n}function Vg(e,t,r,n,a,i,o,l){var s=YA(e);if(t&&o<i){var u=jg(s,a);if(a===8)l&&vd(s,r,n,256),pd(t,s,o,i);else if(a===16)l&&vd(u,r,n,65536),pd(t,u,o,i);else if(a===32){l&&vd(s,r*4,n,256);for(var c=o,f=new Uint32Array(t.data.buffer,t.data.byteOffset,t.data.length),d=0;d<n;d++)for(var h=r*4*d,y=0;y<r;y++,h++,c+=i){var p=h+r,x=p+r,g=x+r;f[c]=(s[h]<<24|s[p]<<16|s[x]<<8|s[g])>>>0}}else throw new Error("Invalid bitDepth")}}function ki(e,t,r,n,a,i,o,l){var s=t&&t.data,u;if(l){u=new Uint32Array(o.length*n);for(var c=0,f=0;c<o.length;c++)for(var d=0;d<n;d++,f++)u[f]=De(e)}else{u=new Uint16Array(o.length*n);for(var c=0,f=0;c<o.length;c++)for(var d=0;d<n;d++,f++)u[f]=Ke(e)}for(var h=i-1|0,y=0,f=0;y<o.length;y++){var p=o[y]|0,x=y>h||p>h;if(!s||x)for(var d=0;d<n;d++,f++)nt(e,u[f]);else for(var d=0,g=p|0;d<n;d++,f++)for(var m=u[f],b=dr(e,m),v=0,S=0;v<m;v++){var C=b[v];if(C>128){var A=b[++v];C=256-C|0;for(var _=0;_<=C&&S<r;_=_+1|0,S=S+1|0)s[g]=A,g=g+i|0}else if(C<128)for(var _=0;_<=C&&S<r;_=_+1|0,S=S+1|0)s[g]=b[++v],g=g+i|0}}}function Sn(e,t,r,n,a){n===void 0&&(n=!0),a===void 0&&(a=!1);var i=De(e);if(a){if(i!==0)throw new Error("Sizes larger than 4GB are not supported");i=De(e)}if(!(i<=0&&n)){var o=e.offset+i;if(o>e.view.byteLength)throw new Error("Section exceeds file size");var l=r(function(){return o-e.offset});for(e.offset!==o&&(e.offset>o?cd(e,"Exceeded section limits"):cd(e,"Unread section data"));i%t;)i++,o++;return e.offset=o,l}}function Ir(e){var t=Ke(e);switch(t){case 0:{var r=Ke(e)/257,n=Ke(e)/257,a=Ke(e)/257;return nt(e,2),{r,g:n,b:a}}case 1:{var i=Ke(e)/65535,o=Ke(e)/65535,a=Ke(e)/65535;return nt(e,2),{h:i,s:o,b:a}}case 2:{var l=Ke(e)/257,s=Ke(e)/257,u=Ke(e)/257,c=Ke(e)/257;return{c:l,m:s,y:u,k:c}}case 7:{var f=Et(e)/1e4,d=Et(e),h=Et(e),y=d<0?d/12800:d/12700,a=h<0?h/12800:h/12700;return nt(e,2),{l:f,a:y,b:a}}case 8:{var c=Ke(e)*255/1e4;return nt(e,6),{k:c}}default:throw new Error("Invalid color space")}}function XE(e){for(var t=De(e);t%4;)t++;var r=e.offset+t,n=De(e);if(n!==1)throw new Error("Invalid pattern version: ".concat(n));var a=De(e),i=Et(e),o=Et(e);if(a!==3&&a!==1&&a!==2)throw new Error("Unsupported pattern color mode: ".concat(a));var l=_r(e),s=Jn(e,1),u=[];if(a===2){for(var c=0;c<256;c++)u.push({r:Ze(e),g:Ze(e),b:Ze(e)});nt(e,4)}var f=De(e);if(f!==3)throw new Error("Invalid pattern VMAL version: ".concat(f));De(e);for(var d=De(e),h=De(e),y=De(e),p=De(e),x=De(e),g=p-h,m=y-d,b=new Uint8Array(g*m*4),c=3;c<b.byteLength;c+=4)b[c]=255;for(var c=0,v=0;c<x+2;c++){var S=De(e);if(S){var C=De(e),A=De(e),_=De(e),E=De(e),M=De(e),z=De(e),N=Ke(e),R=Ze(e),$=C-23,q=dr(e,$);if(A!==8||N!==8)throw new Error("16bit pixel depth not supported for patterns");var W=z-E,Z=M-_,te=E-h,ne=_-d;if(R===0){if(a===3&&v<3)for(var _e=0;_e<Z;_e++)for(var pe=0;pe<W;pe++){var we=pe+_e*W,ve=(te+pe+(_e+ne)*g)*4;b[ve+v]=q[we]}if(a===1&&v<1)for(var Te=0;Te<Z;Te++)for(var Se=0;Se<W;Se++){var we=Se+Te*W,ve=(te+Se+(Te+ne)*g)*4,Ie=q[we];b[ve+0]=Ie,b[ve+1]=Ie,b[ve+2]=Ie}if(a===2)throw new Error("Indexed pattern color mode not implemented")}else if(R===1){var Le={data:b,width:g,height:m},Ee={data:new Uint8Array(W*Z),width:W,height:Z},Be=Wo(q.buffer,q.byteOffset,q.byteLength);if(a===3&&v<3&&(ki(Be,Ee,W,Z,8,1,[0],!1),qg(Ee,Le,te,ne,v)),a===1&&v<1&&(ki(Be,Ee,W,Z,8,1,[0],!1),qg(Ee,Le,te,ne,0),cu(Le)),a===2)throw new Error("Indexed pattern color mode not implemented")}else throw new Error("Invalid pattern compression mode");v++}}return e.offset=r,{id:s,name:l,x:i,y:o,bounds:{x:h,y:d,w:g,h:m},data:b}}function qg(e,t,r,n,a){for(var i=e.width,o=e.height,l=t.width,s=0;s<o;s++)for(var u=0;u<i;u++){var c=u+s*i,f=(r+u+(s+n)*l)*4,d=e.data[c];t.data[f+a]=d}}var Wg=[void 0,"outer bevel","inner bevel","emboss","pillow emboss","stroke emboss"];function Ko(e){return Ca(e,"8BIM"),Bo[Wt(e)]||"normal"}function Xo(e,t){pt(e,"8BIM"),pt(e,Z0[t]||"norm")}function Yo(e){return Ze(e)/255}function Zo(e,t){Ge(e,Math.round(t*255)|0)}function YE(e){var t=Ke(e);if(t!==0)throw new Error("Invalid effects layer version: ".concat(t));for(var r=Ke(e),n={},a=0;a<r;a++){Ca(e,"8BIM");var i=Wt(e);switch(i){case"cmnS":{var o=De(e),l=De(e),s=!!Ze(e);if(nt(e,2),o!==7||l!==0||!s)throw new Error("Invalid effects common state");break}case"dsdw":case"isdw":{var u=De(e),c=De(e);if(u!==41&&u!==51)throw new Error("Invalid shadow size: ".concat(u));if(c!==0&&c!==2)throw new Error("Invalid shadow version: ".concat(c));var o=kn(e);kn(e);var f=kn(e),d=kn(e),h=Ir(e),y=Ko(e),p=!!Ze(e),x=!!Ze(e),g=Yo(e);u>=51&&Ir(e);var m={size:{units:"Pixels",value:o},distance:{units:"Pixels",value:d},angle:f,color:h,blendMode:y,enabled:p,useGlobalLight:x,opacity:g};i==="dsdw"?n.dropShadow=[m]:n.innerShadow=[m];break}case"oglw":{var u=De(e),b=De(e);if(u!==32&&u!==42)throw new Error("Invalid outer glow size: ".concat(u));if(b!==0&&b!==2)throw new Error("Invalid outer glow version: ".concat(b));var o=kn(e);kn(e);var h=Ir(e),y=Ko(e),p=!!Ze(e),g=Yo(e);u>=42&&Ir(e),n.outerGlow={size:{units:"Pixels",value:o},color:h,blendMode:y,enabled:p,opacity:g};break}case"iglw":{var u=De(e),v=De(e);if(u!==32&&u!==43)throw new Error("Invalid inner glow size: ".concat(u));if(v!==0&&v!==2)throw new Error("Invalid inner glow version: ".concat(v));var o=kn(e);kn(e);var h=Ir(e),y=Ko(e),p=!!Ze(e),g=Yo(e);u>=43&&(Ze(e),Ir(e)),n.innerGlow={size:{units:"Pixels",value:o},color:h,blendMode:y,enabled:p,opacity:g};break}case"bevl":{var u=De(e),S=De(e);if(u!==58&&u!==78)throw new Error("Invalid bevel size: ".concat(u));if(S!==0&&S!==2)throw new Error("Invalid bevel version: ".concat(S));var f=kn(e),C=kn(e),o=kn(e),A=Ko(e),_=Ko(e),E=Ir(e),M=Ir(e),z=Wg[Ze(e)]||"inner bevel",N=Yo(e),R=Yo(e),p=!!Ze(e),x=!!Ze(e),$=Ze(e)?"down":"up";u>=78&&(Ir(e),Ir(e)),n.bevel={size:{units:"Pixels",value:o},angle:f,strength:C,highlightBlendMode:A,shadowBlendMode:_,highlightColor:E,shadowColor:M,style:z,highlightOpacity:N,shadowOpacity:R,enabled:p,useGlobalLight:x,direction:$};break}case"sofi":{var o=De(e),q=De(e);if(o!==34)throw new Error("Invalid effects solid fill info size: ".concat(o));if(q!==2)throw new Error("Invalid effects solid fill info version: ".concat(q));var y=Ko(e),h=Ir(e),g=Yo(e),p=!!Ze(e);Ir(e),n.solidFill=[{blendMode:y,color:h,opacity:g,enabled:p}];break}default:throw new Error("Invalid effect type: '".concat(i,"'"))}}return n}function Kg(e,t){var r;Je(e,51),Je(e,2),An(e,t.size&&t.size.value||0),An(e,0),An(e,t.angle||0),An(e,t.distance&&t.distance.value||0),zr(e,t.color),Xo(e,t.blendMode),Ge(e,t.enabled?1:0),Ge(e,t.useGlobalLight?1:0),Zo(e,(r=t.opacity)!==null&&r!==void 0?r:1),zr(e,t.color)}function ZE(e,t){var r,n,a,i,o,l,s=(r=t.dropShadow)===null||r===void 0?void 0:r[0],u=(n=t.innerShadow)===null||n===void 0?void 0:n[0],c=t.outerGlow,f=t.innerGlow,d=t.bevel,h=(a=t.solidFill)===null||a===void 0?void 0:a[0],y=1;if(s&&y++,u&&y++,c&&y++,f&&y++,d&&y++,h&&y++,Oe(e,0),Oe(e,y),pt(e,"8BIM"),pt(e,"cmnS"),Je(e,7),Je(e,0),Ge(e,1),Rt(e,2),s&&(pt(e,"8BIM"),pt(e,"dsdw"),Kg(e,s)),u&&(pt(e,"8BIM"),pt(e,"isdw"),Kg(e,u)),c&&(pt(e,"8BIM"),pt(e,"oglw"),Je(e,42),Je(e,2),An(e,((i=c.size)===null||i===void 0?void 0:i.value)||0),An(e,0),zr(e,c.color),Xo(e,c.blendMode),Ge(e,c.enabled?1:0),Zo(e,c.opacity||0),zr(e,c.color)),f&&(pt(e,"8BIM"),pt(e,"iglw"),Je(e,43),Je(e,2),An(e,((o=f.size)===null||o===void 0?void 0:o.value)||0),An(e,0),zr(e,f.color),Xo(e,f.blendMode),Ge(e,f.enabled?1:0),Zo(e,f.opacity||0),Ge(e,0),zr(e,f.color)),d){pt(e,"8BIM"),pt(e,"bevl"),Je(e,78),Je(e,2),An(e,d.angle||0),An(e,d.strength||0),An(e,((l=d.size)===null||l===void 0?void 0:l.value)||0),Xo(e,d.highlightBlendMode),Xo(e,d.shadowBlendMode),zr(e,d.highlightColor),zr(e,d.shadowColor);var p=Wg.indexOf(d.style);Ge(e,p<=0?1:p),Zo(e,d.highlightOpacity||0),Zo(e,d.shadowOpacity||0),Ge(e,d.enabled?1:0),Ge(e,d.useGlobalLight?1:0),Ge(e,d.direction==="down"?1:0),zr(e,d.highlightColor),zr(e,d.shadowColor)}h&&(pt(e,"8BIM"),pt(e,"sofi"),Je(e,34),Je(e,2),Xo(e,h.blendMode),zr(e,h.color),Zo(e,h.opacity||0),Ge(e,h.enabled?1:0),zr(e,h.color))}function Xg(e){return e===32||e===10||e===13||e===9}function Yg(e){return e>=48&&e<=57||e===46||e===45}function Zg(e){var t=0;function r(){for(;t<e.length&&Xg(e[t]);)t++}function n(){var m=e[t];return t++,m===92&&(m=e[t],t++),m}function a(){var m="";if(e[t]===41)return t++,m;if(e[t]!==254||e[t+1]!==255)throw new Error("Invalid utf-16 BOM");for(t+=2;t<e.length&&e[t]!==41;){var b=n(),v=n(),S=b<<8|v;m+=String.fromCharCode(S)}return t++,m}var i=null,o=[];function l(m){o.length?(s(m),o.push(m)):(o.push(m),i=m)}function s(m){if(!o.length)throw new Error("Invalid data");var b=o[o.length-1];if(typeof b=="string")o[o.length-2][b]=m,c();else if(Array.isArray(b))b.push(m);else throw new Error("Invalid data")}function u(m){o.length||l({});var b=o[o.length-1];if(b&&typeof b=="string")s(m==="nil"?null:"/".concat(m));else if(b&&typeof b=="object")o.push(m);else throw new Error("Invalid data")}function c(){if(!o.length)throw new Error("Invalid data");o.pop()}r();for(var f=e.length;f>0&&e[f-1]===0;)f--;for(;t<f;){var d=t,h=e[d];if(h===60&&e[d+1]===60)t+=2,l({});else if(h===62&&e[d+1]===62)t+=2,c();else if(h===47){t+=1;for(var y=t;t<e.length&&!Xg(e[t]);)t++;for(var p="",x=y;x<t;x++)p+=String.fromCharCode(e[x]);u(p)}else if(h===40)t+=1,s(a());else if(h===91)t+=1,l([]);else if(h===93)t+=1,c();else if(h===110&&e[d+1]===117&&e[d+2]===108&&e[d+3]===108)t+=4,s(null);else if(h===116&&e[d+1]===114&&e[d+2]===117&&e[d+3]===101)t+=4,s(!0);else if(h===102&&e[d+1]===97&&e[d+2]===108&&e[d+3]===115&&e[d+4]===101)t+=5,s(!1);else if(Yg(h)){for(var g="";t<e.length&&Yg(e[t]);)g+=String.fromCharCode(e[t]),t++;s(parseFloat(g))}else t+=1,console.log("Invalid token '".concat(String.fromCharCode(h),"' (").concat(h,") at ").concat(t));r()}return i}var JE=["Axis","XY","Zone","WordSpacing","FirstLineIndent","GlyphSpacing","StartIndent","EndIndent","SpaceBefore","SpaceAfter","LetterSpacing","Values","GridSize","GridLeading","PointBase","BoxBounds","TransformPoint0","TransformPoint1","TransformPoint2","FontSize","Leading","HorizontalScale","VerticalScale","BaselineShift","Tsume","OutlineWidth","AutoLeading"],QE=["RunLengthArray"];function eT(e,t){t===void 0&&(t=!1);var r=new Uint8Array(1024),n=0,a=0;function i(m){if(n>=r.length){var b=new Uint8Array(r.length*2);b.set(r),r=b}r[n]=m,n++}function o(m){for(var b=0;b<m.length;b++)i(m.charCodeAt(b))}function l(){if(t)o(" ");else for(var m=0;m<a;m++)o(" ")}function s(m,b){l(),o("/".concat(m)),y(b,m,!0),t||o(`
|
|
282
282
|
`)}function u(m){return m.toString()}function c(m){return m.toFixed(5).replace(/(\d)0+$/g,"$1").replace(/^0+\.([1-9])/g,".$1").replace(/^-0+\.0(\d)/g,"-.0$1")}function f(m,b){var v=b&&JE.indexOf(b)!==-1||(m|0)!==m;return v?c(m):u(m)}function d(m){var b=Object.keys(m);return b.indexOf("98")!==-1&&b.unshift.apply(b,b.splice(b.indexOf("99"),1)),b.indexOf("99")!==-1&&b.unshift.apply(b,b.splice(b.indexOf("99"),1)),b}function h(m){(m===40||m===41||m===92)&&i(92),i(m)}function y(m,b,v){v===void 0&&(v=!1);function S(){v?o(" "):l()}if(m===null)S(),o(t?"/nil":"null");else if(typeof m=="number")S(),o(f(m,b));else if(typeof m=="boolean")S(),o(m?"true":"false");else if(typeof m=="string")if(S(),(b==="99"||b==="98")&&m.charAt(0)==="/")o(m);else{o("("),i(254),i(255);for(var C=0;C<m.length;C++){var A=m.charCodeAt(C);h(A>>8&255),h(A&255)}o(")")}else if(Array.isArray(m))if(S(),m.every(function(Z){return typeof Z=="number"})){o("[");for(var _=QE.indexOf(b)!==-1,E=0,M=m;E<M.length;E++){var z=M[E];o(" "),o(_?f(z):c(z))}o(" ]")}else{o("["),t||o(`
|
|
283
283
|
`);for(var N=0,R=m;N<R.length;N++){var z=R[N];y(z,b),t||o(`
|
|
284
284
|
`)}l(),o("]")}else if(typeof m=="object"){v&&!t&&o(`
|
|
@@ -286,21 +286,21 @@ l0,-`+(r+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
|
|
|
286
286
|
`),a++;for(var $=0,q=d(m);$<q.length;$++){var W=q[$];s(W,m[W])}a--,l(),o(">>")}}if(t){if(typeof e=="object")for(var p=0,x=d(e);p<x.length;p++){var g=x[p];s(g,e[g])}}else o(`
|
|
287
287
|
|
|
288
288
|
`),y(e);return r.slice(0,n)}var wr=function(){return wr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},wr.apply(this,arguments)},Jg={name:"MyriadPro-Regular",script:0,type:0,synthetic:0},hu={justification:"left",firstLineIndent:0,startIndent:0,endIndent:0,spaceBefore:0,spaceAfter:0,autoHyphenate:!0,hyphenatedWordSize:6,preHyphen:2,postHyphen:2,consecutiveHyphens:8,zone:36,wordSpacing:[.8,1,1.33],letterSpacing:[0,0,0],glyphSpacing:[1,1,1],autoLeading:1.2,leadingType:0,hanging:!1,burasagari:!1,kinsokuOrder:0,everyLineComposer:!1},tT={font:Jg,fontSize:12,fauxBold:!1,fauxItalic:!1,autoLeading:!0,leading:0,horizontalScale:1,verticalScale:1,tracking:0,autoKerning:!0,kerning:0,baselineShift:0,fontCaps:0,fontBaseline:0,underline:!1,strikethrough:!1,ligatures:!0,dLigatures:!1,baselineDirection:2,tsume:0,styleRunAlignment:2,language:0,noBreak:!1,fillColor:{r:0,g:0,b:0},strokeColor:{r:0,g:0,b:0},fillFlag:!0,strokeFlag:!1,fillFirst:!0,yUnderline:1,outlineWidth:1,characterDirection:0,hindiNumbers:!1,kashida:1,diacriticPos:2},rT={isOn:!1,show:!1,size:18,leading:22,color:{r:0,g:0,b:255},leadingFillColor:{r:0,g:0,b:255},alignLineHeightToGridFlags:!1},md=["justification","firstLineIndent","startIndent","endIndent","spaceBefore","spaceAfter","autoHyphenate","hyphenatedWordSize","preHyphen","postHyphen","consecutiveHyphens","zone","wordSpacing","letterSpacing","glyphSpacing","autoLeading","leadingType","hanging","burasagari","kinsokuOrder","everyLineComposer"],gd=["font","fontSize","fauxBold","fauxItalic","autoLeading","leading","horizontalScale","verticalScale","tracking","autoKerning","kerning","baselineShift","fontCaps","fontBaseline","underline","strikethrough","ligatures","dLigatures","baselineDirection","tsume","styleRunAlignment","language","noBreak","fillColor","strokeColor","fillFlag","strokeFlag","fillFirst","yUnderline","outlineWidth","characterDirection","hindiNumbers","kashida","diacriticPos"],Qg=["none","crisp","strong","smooth","sharp"],e3=["left","right","center","justify-left","justify-right","justify-center","justify-all"];function t3(e){return e.substring(0,1).toUpperCase()+e.substring(1)}function nT(e){var t=e.Values;switch(e.Type){case 0:return{k:t[1]*255};case 1:return t[0]===1?{r:t[1]*255,g:t[2]*255,b:t[3]*255}:{r:t[1]*255,g:t[2]*255,b:t[3]*255,a:t[0]*255};case 2:return{c:t[1]*255,m:t[2]*255,y:t[3]*255,k:t[4]*255};default:throw new Error("Unknown color type in text layer")}}function bd(e){if(e){if("r"in e)return{Type:1,Values:["a"in e?e.a/255:1,e.r/255,e.g/255,e.b/255]};if("c"in e)return{Type:2,Values:[1,e.c/255,e.m/255,e.y/255,e.k/255]};if("k"in e)return{Type:0,Values:[1,e.k/255]};throw new Error("Invalid color type in text layer")}else return{Type:1,Values:[0,0,0,0]}}function r3(e,t){if(!e||!t||e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function n3(e,t){if(!e||!t)return!1;for(var r=0,n=Object.keys(e);r<n.length;r++){var a=n[r];if(e[a]!==t[a])return!1}for(var i=0,o=Object.keys(t);i<o.length;i++){var a=o[i];if(e[a]!==t[a])return!1}return!0}function aT(e,t){for(var r=0;r<e.length;r++)if(e[r].name===t.name)return r;return e.push(t),e.length-1}function a3(e,t,r){for(var n={},a=0,i=t;a<i.length;a++){var o=i[a],l=t3(o);e[l]!==void 0&&(o==="justification"?n[o]=e3[e[l]]:o==="font"?n[o]=r[e[l]]:o==="fillColor"||o==="strokeColor"?n[o]=nT(e[l]):n[o]=e[l])}return n}function i3(e,t,r){for(var n,a={},i=0,o=t;i<o.length;i++){var l=o[i],s=t3(l);e[l]!==void 0&&(l==="justification"?a[s]=e3.indexOf((n=e[l])!==null&&n!==void 0?n:"left"):l==="font"?a[s]=aT(r,e[l]):l==="fillColor"||l==="strokeColor"?a[s]=bd(e[l]):a[s]=e[l])}return a}function iT(e,t){return a3(e,md,t)}function oT(e,t){return a3(e,gd,t)}function pu(e,t){return i3(e,md,t)}function yd(e,t){return i3(e,gd,t)}function o3(e,t,r){if(t.length){for(var n=function(l){var s=t[0].style[l];if(s!==void 0){var u=!1;Array.isArray(s)?u=t.every(function(p){return r3(p.style[l],s)}):typeof s=="object"?u=t.every(function(p){return n3(p.style[l],s)}):u=t.every(function(p){return p.style[l]===s}),u&&(e[l]=s)}var c=e[l];if(c!==void 0)for(var f=0,d=t;f<d.length;f++){var h=d[f],y=!1;Array.isArray(s)?y=r3(h.style[l],s):typeof s=="object"?y=n3(h.style[l],s):y=h.style[l]===s,y&&delete h.style[l]}},a=0,i=r;a<i.length;a++){var o=i[a];n(o)}t.every(function(l){return Object.keys(l.style).length===0})&&(t.length=0)}}function lT(e){for(var t,r,n,a,i,o,l=e.EngineDict,s=e.ResourceDict,u=s.FontSet.map(function(C){return{name:C.Name,script:C.Script,type:C.FontType,synthetic:C.Synthetic}}),c=l.Editor.Text.replace(/\r/g,`
|
|
289
|
-
`),f=0;/\n$/.test(c);)c=c.substring(0,c.length-1),f++;var d={text:c,antiAlias:(t=Qg[l.AntiAlias])!==null&&t!==void 0?t:"smooth",useFractionalGlyphWidths:!!l.UseFractionalGlyphWidths,superscriptSize:s.SuperscriptSize,superscriptPosition:s.SuperscriptPosition,subscriptSize:s.SubscriptSize,subscriptPosition:s.SubscriptPosition,smallCapSize:s.SmallCapSize},h=(o=(i=(a=(n=(r=l.Rendered)===null||r===void 0?void 0:r.Shapes)===null||n===void 0?void 0:n.Children)===null||a===void 0?void 0:a[0])===null||i===void 0?void 0:i.Cookie)===null||o===void 0?void 0:o.Photoshop;h&&(d.shapeType=h.ShapeType===1?"box":"point",h.PointBase&&(d.pointBase=h.PointBase),h.BoxBounds&&(d.boxBounds=h.BoxBounds));var y=l.ParagraphRun;d.paragraphStyle={},d.paragraphStyleRuns=[];for(var p=0;p<y.RunArray.length;p++){var x=y.RunArray[p],g=y.RunLengthArray[p],m=iT(x.ParagraphSheet.Properties,u);d.paragraphStyleRuns.push({length:g,style:m})}for(var b=f;d.paragraphStyleRuns.length&&b>0;b--)--d.paragraphStyleRuns[d.paragraphStyleRuns.length-1].length===0&&d.paragraphStyleRuns.pop();o3(d.paragraphStyle,d.paragraphStyleRuns,md),d.paragraphStyleRuns.length||delete d.paragraphStyleRuns;var v=l.StyleRun;d.style={},d.styleRuns=[];for(var p=0;p<v.RunArray.length;p++){var S=v.RunLengthArray[p],m=oT(v.RunArray[p].StyleSheet.StyleSheetData,u);m.font||(m.font=u[0]),d.styleRuns.push({length:S,style:m})}for(var b=f;d.styleRuns.length&&b>0;b--)--d.styleRuns[d.styleRuns.length-1].length===0&&d.styleRuns.pop();return o3(d.style,d.styleRuns,gd),d.styleRuns.length||delete d.styleRuns,d}function sT(e){var t,r,n,a,i,o,l,s,u,c,f,d,h="".concat((e.text||"").replace(/\r?\n/g,"\r"),"\r"),y=[{name:"AdobeInvisFont",script:0,type:0,synthetic:0}],p=((t=e.style)===null||t===void 0?void 0:t.font)||((n=(r=e.styleRuns)===null||r===void 0?void 0:r.find(function(Se){return Se.style.font}))===null||n===void 0?void 0:n.style.font)||Jg,x=[],g=[],m=e.paragraphStyleRuns;if(m&&m.length){for(var b=h.length,v=0,S=m;v<S.length;v++){var C=S[v],A=Math.min(C.length,b);b-=A,A&&(b===1&&C===m[m.length-1]&&(A++,b--),g.push(A),x.push({ParagraphSheet:{DefaultStyleSheet:0,Properties:pu(wr(wr(wr({},hu),e.paragraphStyle),C.style),y)},Adjustments:{Axis:[1,0,1],XY:[0,0]}}))}b&&(g.push(b),x.push({ParagraphSheet:{DefaultStyleSheet:0,Properties:pu(wr(wr({},hu),e.paragraphStyle),y)},Adjustments:{Axis:[1,0,1],XY:[0,0]}}))}else for(var _=0,E=0;_<h.length;_++)h.charCodeAt(_)===13&&(g.push(_-E+1),x.push({ParagraphSheet:{DefaultStyleSheet:0,Properties:pu(wr(wr({},hu),e.paragraphStyle),y)},Adjustments:{Axis:[1,0,1],XY:[0,0]}}),E=_+1);for(var M=yd(wr(wr({},tT),{font:p}),y),z=e.styleRuns||[{length:h.length,style:e.style||{}}],N=[],R=[],$=h.length,q=0,W=z;q<W.length;q++){var Z=W[q],A=Math.min(Z.length,$);$-=A,A&&($===1&&Z===z[z.length-1]&&(A++,$--),R.push(A),N.push({StyleSheet:{StyleSheetData:yd(wr(wr({kerning:0,autoKerning:!0,fillColor:{r:0,g:0,b:0}},e.style),Z.style),y)}}))}$&&z.length&&(R.push($),N.push({StyleSheet:{StyleSheetData:yd(wr({kerning:0,autoKerning:!0,fillColor:{r:0,g:0,b:0}},e.style),y)}}));var te=wr(wr({},rT),e.gridInfo),ne=e.orientation==="vertical"?2:0,_e=e.orientation==="vertical"?1:0,pe=e.shapeType==="box"?1:0,we={ShapeType:pe};pe===0?we.PointBase=e.pointBase||[0,0]:we.BoxBounds=e.boxBounds||[0,0,0,0],we.Base={ShapeType:pe,TransformPoint0:[1,0],TransformPoint1:[0,1],TransformPoint2:[0,0]};var ve={KinsokuSet:[{Name:"PhotoshopKinsokuHard",NoStart:"、。,.・:;?!ー―’”)〕]}〉》」』】ヽヾゝゞ々ぁぃぅぇぉっゃゅょゎァィゥェォッャュョヮヵヶ゛゜?!)]},.:;℃℉¢%‰",NoEnd:"‘“(〔[{〈《「『【([{¥$£@§〒#",Keep:"―‥",Hanging:"、。.,"},{Name:"PhotoshopKinsokuSoft",NoStart:"、。,.・:;?!’”)〕]}〉》」』】ヽヾゝゞ々",NoEnd:"‘“(〔[{〈《「『【",Keep:"―‥",Hanging:"、。.,"}],MojiKumiSet:[{InternalName:"Photoshop6MojiKumiSet1"},{InternalName:"Photoshop6MojiKumiSet2"},{InternalName:"Photoshop6MojiKumiSet3"},{InternalName:"Photoshop6MojiKumiSet4"}],TheNormalStyleSheet:0,TheNormalParagraphSheet:0,ParagraphSheetSet:[{Name:"Normal RGB",DefaultStyleSheet:0,Properties:pu(wr(wr({},hu),e.paragraphStyle),y)}],StyleSheetSet:[{Name:"Normal RGB",StyleSheetData:M}],FontSet:y.map(function(Se){return{Name:Se.name,Script:Se.script||0,FontType:Se.type||0,Synthetic:Se.synthetic||0}}),SuperscriptSize:(a=e.superscriptSize)!==null&&a!==void 0?a:.583,SuperscriptPosition:(i=e.superscriptPosition)!==null&&i!==void 0?i:.333,SubscriptSize:(o=e.subscriptSize)!==null&&o!==void 0?o:.583,SubscriptPosition:(l=e.subscriptPosition)!==null&&l!==void 0?l:.333,SmallCapSize:(s=e.smallCapSize)!==null&&s!==void 0?s:.7},Te={EngineDict:{Editor:{Text:h},ParagraphRun:{DefaultRunData:{ParagraphSheet:{DefaultStyleSheet:0,Properties:{}},Adjustments:{Axis:[1,0,1],XY:[0,0]}},RunArray:x,RunLengthArray:g,IsJoinable:1},StyleRun:{DefaultRunData:{StyleSheet:{StyleSheetData:{}}},RunArray:N,RunLengthArray:R,IsJoinable:2},GridInfo:{GridIsOn:!!te.isOn,ShowGrid:!!te.show,GridSize:(u=te.size)!==null&&u!==void 0?u:18,GridLeading:(c=te.leading)!==null&&c!==void 0?c:22,GridColor:bd(te.color),GridLeadingFillColor:bd(te.color),AlignLineHeightToGridFlags:!!te.alignLineHeightToGridFlags},AntiAlias:Qg.indexOf((f=e.antiAlias)!==null&&f!==void 0?f:"sharp"),UseFractionalGlyphWidths:(d=e.useFractionalGlyphWidths)!==null&&d!==void 0?d:!0,Rendered:{Version:1,Shapes:{WritingDirection:ne,Children:[{ShapeType:pe,Procession:_e,Lines:{WritingDirection:ne,Children:[]},Cookie:{Photoshop:we}}]}}},ResourceDict:wr({},ve),DocumentResources:wr({},ve)};return Te}var xd={0:{uproot:!0,children:{0:{name:"Type"},1:{name:"Values"}}}},_d={0:{name:"Font"},1:{name:"FontSize"},2:{name:"FauxBold"},3:{name:"FauxItalic"},4:{name:"AutoLeading"},5:{name:"Leading"},6:{name:"HorizontalScale"},7:{name:"VerticalScale"},8:{name:"Tracking"},9:{name:"BaselineShift"},11:{name:"Kerning?"},12:{name:"FontCaps"},13:{name:"FontBaseline"},15:{name:"Strikethrough?"},16:{name:"Underline?"},18:{name:"Ligatures"},19:{name:"DLigatures"},23:{name:"Fractions"},24:{name:"Ordinals"},28:{name:"StylisticAlternates"},30:{name:"OldStyle?"},35:{name:"BaselineDirection"},38:{name:"Language"},52:{name:"NoBreak"},53:{name:"FillColor",children:xd},54:{name:"StrokeColor",children:xd},55:{children:{99:{uproot:!0}}},79:{children:xd}},wd={0:{name:"Justification"},1:{name:"FirstLineIndent"},2:{name:"StartIndent"},3:{name:"EndIndent"},4:{name:"SpaceBefore"},5:{name:"SpaceAfter"},7:{name:"AutoLeading"},9:{name:"AutoHyphenate"},10:{name:"HyphenatedWordSize"},11:{name:"PreHyphen"},12:{name:"PostHyphen"},13:{name:"ConsecutiveHyphens?"},14:{name:"Zone"},15:{name:"HypenateCapitalizedWords"},17:{name:"WordSpacing"},18:{name:"LetterSpacing"},19:{name:"GlyphSpacing"},32:{name:"StyleSheet",children:_d}},l3={name:"StyleSheetData",children:_d},uT={0:{name:"ResourceDict",children:{1:{name:"FontSet",children:{0:{uproot:!0,children:{0:{uproot:!0,children:{0:{uproot:!0,children:{0:{name:"Name"},2:{name:"FontType"}}}}}}}}},2:{name:"2",children:{}},3:{name:"MojiKumiSet",children:{0:{uproot:!0,children:{0:{uproot:!0,children:{0:{name:"InternalName"}}}}}}},4:{name:"KinsokuSet",children:{0:{uproot:!0,children:{0:{uproot:!0,children:{0:{name:"Name"},5:{uproot:!0,children:{0:{name:"NoStart"},1:{name:"NoEnd"},2:{name:"Keep"},3:{name:"Hanging"},4:{name:"Name"}}}}}}}}},5:{name:"StyleSheetSet",children:{0:{uproot:!0,children:{0:{uproot:!0,children:{0:{name:"Name"},6:l3}}}}}},6:{name:"ParagraphSheetSet",children:{0:{uproot:!0,children:{0:{uproot:!0,children:{0:{name:"Name"},5:{name:"Properties",children:wd},6:{name:"DefaultStyleSheet"}}}}}}},8:{name:"TextFrameSet",children:{0:{uproot:!0,children:{0:{name:"path",children:{0:{name:"name"},1:{name:"bezierCurve",children:{0:{name:"controlPoints"}}},2:{name:"data",children:{0:{name:"type"},1:{name:"orientation"},2:{name:"frameMatrix"},4:{name:"4"},6:{name:"textRange"},7:{name:"rowGutter"},8:{name:"columnGutter"},9:{name:"9"},10:{name:"baselineAlignment",children:{0:{name:"flag"},1:{name:"min"}}},11:{name:"pathData",children:{1:{name:"1"},0:{name:"reversed"},2:{name:"2"},3:{name:"3"},4:{name:"spacing"},5:{name:"5"},6:{name:"6"},7:{name:"7"},18:{name:"18"}}},12:{name:"12"},13:{name:"13"}}},3:{name:"3"},97:{name:"uuid"}}}}}}},9:{name:"Predefined",children:{0:{children:{0:{uproot:!0}}},1:{children:{0:{uproot:!0}}}}}}},1:{name:"EngineDict",children:{0:{name:"0",children:{3:{name:"SuperscriptSize"},4:{name:"SuperscriptPosition"},5:{name:"SubscriptSize"},6:{name:"SubscriptPosition"},7:{name:"SmallCapSize"},8:{name:"UseFractionalGlyphWidths"},15:{children:{0:{uproot:!0}}}}},1:{name:"Editors?",children:{0:{name:"Editor",children:{0:{name:"Text"},5:{name:"ParagraphRun",children:{0:{name:"RunArray",children:{0:{name:"ParagraphSheet",children:{0:{uproot:!0,children:{0:{name:"0"},5:{name:"5",children:wd},6:{name:"6"}}}}},1:{name:"RunLength"}}}}},6:{name:"StyleRun",children:{0:{name:"RunArray",children:{0:{name:"StyleSheet",children:{0:{uproot:!0,children:{6:l3}}}},1:{name:"RunLength"}}}}}}},1:{name:"FontVectorData ???"}}},2:{name:"StyleSheet",children:_d},3:{name:"ParagraphSheet",children:wd}}}};function ls(e,t){var r,n;if(e===null)return e;if(Array.isArray(e))return e.map(function(s){return ls(s,t)});if(typeof e!="object")return e;for(var a={},i=0,o=Object.keys(e);i<o.length;i++){var l=o[i];if(t[l])if(t[l].uproot){l!=="99"&&(a=ls(e[l],(r=t[l].children)!==null&&r!==void 0?r:{})),e[99]&&(a._type=e[99]);break}else a[t[l].name||l]=ls(e[l],(n=t[l].children)!==null&&n!==void 0?n:{});else l==="99"?a._type=e[l]:a[l]=ls(e[l],{})}return a}function cT(e){return ls(e,uT)}var G=function(){return G=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},G.apply(this,arguments)},Cn="abcdefghijklmnopqrstuvwxyz",s3=[],vu={};function ft(e,t,r,n){var a={key:e,has:t,read:r,write:n};s3.push(a),vu[a.key]=a}function Jo(e,t){vu[e]=vu[t]}function Gt(e){return function(t){return t[e]!==void 0}}function kd(e){if(De(e))throw new Error("Resource size above 4 GB limit at ".concat(e.offset.toString(16)));return De(e)}function Sd(e,t){Je(e,0),Je(e,t)}ft("TySh",Gt("text"),function(e,t,r){if(Et(e)!==1)throw new Error("Invalid TySh version");for(var n=[],a=0;a<6;a++)n.push(Nn(e));if(Et(e)!==50)throw new Error("Invalid TySh text version");var i=Tt(e);if(Et(e)!==1)throw new Error("Invalid TySh warp version");var o=Tt(e);if(t.text={transform:n,left:Yn(e),top:Yn(e),right:Yn(e),bottom:Yn(e),text:i["Txt "].replace(/\r/g,`
|
|
290
|
-
`),index:i.TextIndex||0,gridding:O4.decode(i.textGridding),antiAlias:P4.decode(i.AntA),orientation:is.decode(i.Ornt),warp:{style:ld.decode(o.warpStyle),value:o.warpValue||0,perspective:o.warpPerspective||0,perspectiveOther:o.warpPerspectiveOther||0,rotate:is.decode(o.warpRotate)}},i.bounds&&(t.text.bounds=x4(i.bounds)),i.boundingBox&&(t.text.boundingBox=x4(i.boundingBox)),i.EngineData){var l=Zg(i.EngineData),s=lT(l);t.text=G(G({},t.text),s)}nt(e,r())},function(e,t){var r=t.text,n=r.warp||{},a=r.transform||[1,0,0,1,0,0],i=G(G(G({"Txt ":(r.text||"").replace(/\r?\n/g,"\r"),textGridding:O4.encode(r.gridding),Ornt:is.encode(r.orientation),AntA:P4.encode(r.antiAlias)},r.bounds?{bounds:_4(r.bounds)}:{}),r.boundingBox?{boundingBox:_4(r.boundingBox)}:{}),{TextIndex:r.index||0,EngineData:eT(sT(r))});Pt(e,1);for(var o=0;o<6;o++)$n(e,a[o]);Pt(e,50),Dt(e,"","TxLr",i,"text"),Pt(e,1),Dt(e,"","warp",mu(n)),Qn(e,r.left),Qn(e,r.top),Qn(e,r.right),Qn(e,r.bottom)}),ft("SoCo",function(e){return e.vectorFill!==void 0&&e.vectorStroke===void 0&&e.vectorFill.type==="color"},function(e,t){var r=Tt(e);t.vectorFill=rs(r)},function(e,t){var r=ns(t.vectorFill).descriptor;Dt(e,"","null",r)}),ft("GdFl",function(e){return e.vectorFill!==void 0&&e.vectorStroke===void 0&&(e.vectorFill.type==="solid"||e.vectorFill.type==="noise")},function(e,t,r){var n=Tt(e);t.vectorFill=rs(n),nt(e,r())},function(e,t){var r=ns(t.vectorFill).descriptor;Dt(e,"","null",r)}),ft("PtFl",function(e){return e.vectorFill!==void 0&&e.vectorStroke===void 0&&e.vectorFill.type==="pattern"},function(e,t){var r=Tt(e);t.vectorFill=rs(r)},function(e,t){var r=ns(t.vectorFill).descriptor;Dt(e,"","null",r)}),ft("vscg",function(e){return e.vectorFill!==void 0&&e.vectorStroke!==void 0},function(e,t,r){Wt(e);var n=Tt(e);t.vectorFill=rs(n),nt(e,r())},function(e,t){var r=ns(t.vectorFill),n=r.descriptor,a=r.key;pt(e,a),Dt(e,"","null",n)});function fT(e,t,r){var n=Zn(e)*r,a=Zn(e)*t,i=Zn(e)*r,o=Zn(e)*t,l=Zn(e)*r,s=Zn(e)*t;return[a,n,o,i,s,l]}function dT(e,t,r,n){ea(e,t[1]/n),ea(e,t[0]/r),ea(e,t[3]/n),ea(e,t[2]/r),ea(e,t[5]/n),ea(e,t[4]/r)}var u3=["exclude","combine","subtract","intersect"];function c3(e,t,r,n,a){for(var i=e.offset+a,o=t.paths,l=void 0;i-e.offset>=26;){var s=We(e);switch(s){case 0:case 3:{We(e);var u=Et(e),c=We(e);nt(e,18),l={open:s===3,knots:[],fillRule:c===2?"non-zero":"even-odd"},u!==-1&&(l.operation=u3[u]),o.push(l);break}case 1:case 2:case 4:case 5:l.knots.push({linked:s===1||s===4,points:fT(e,r,n)});break;case 6:nt(e,24);break;case 7:{var f=Zn(e),d=Zn(e),h=Zn(e),y=Zn(e),p=Zn(e);nt(e,4),t.clipboard={top:f,left:d,bottom:h,right:y,resolution:p};break}case 8:t.fillStartsWithAllPixels=!!We(e),nt(e,22);break;default:throw new Error("Invalid vmsk section")}}return o}ft("vmsk",Gt("vectorMask"),function(e,t,r,n){var a=n.width,i=n.height;if(De(e)!==3)throw new Error("Invalid vmsk version");t.vectorMask={paths:[]};var o=t.vectorMask,l=De(e);o.invert=(l&1)!==0,o.notLink=(l&2)!==0,o.disable=(l&4)!==0,c3(e,o,a,i,r()),nt(e,r())},function(e,t,r){var n=r.width,a=r.height,i=t.vectorMask,o=(i.invert?1:0)|(i.notLink?2:0)|(i.disable?4:0);Je(e,3),Je(e,o),Oe(e,6),Rt(e,24);var l=i.clipboard;l&&(Oe(e,7),ea(e,l.top),ea(e,l.left),ea(e,l.bottom),ea(e,l.right),ea(e,l.resolution),Rt(e,4)),Oe(e,8),Oe(e,i.fillStartsWithAllPixels?1:0),Rt(e,22);for(var s=0,u=i.paths;s<u.length;s++){var c=u[s];Oe(e,c.open?3:0),Oe(e,c.knots.length),Oe(e,c.operation?u3.indexOf(c.operation):-1),Oe(e,c.fillRule==="non-zero"?2:1),Rt(e,18);for(var f=c.open?4:1,d=c.open?5:2,h=0,y=c.knots;h<y.length;h++){var p=y[h],x=p.linked,g=p.points;Oe(e,x?f:d),dT(e,g,n,a)}}}),Jo("vsms","vmsk"),ft("vowv",Gt("vowv"),function(e,t){t.vowv=De(e)},function(e,t){Je(e,t.vowv)}),ft("vogk",Gt("vectorOrigination"),function(e,t,r){if(st(e)!==1)throw new Error("Invalid vogk version");var n=Tt(e);t.vectorOrigination={keyDescriptorList:[]};for(var a=0,i=n.keyDescriptorList;a<i.length;a++){var o=i[a],l={};o.keyShapeInvalidated!=null&&(l.keyShapeInvalidated=o.keyShapeInvalidated),o.keyOriginType!=null&&(l.keyOriginType=o.keyOriginType),o.keyOriginResolution!=null&&(l.keyOriginResolution=o.keyOriginResolution),o.keyOriginShapeBBox&&(l.keyOriginShapeBoundingBox={top:wi(o.keyOriginShapeBBox["Top "]),left:wi(o.keyOriginShapeBBox.Left),bottom:wi(o.keyOriginShapeBBox.Btom),right:wi(o.keyOriginShapeBBox.Rght)});var s=o.keyOriginRRectRadii;s&&(l.keyOriginRRectRadii={topRight:Nt(s.topRight),topLeft:Nt(s.topLeft),bottomLeft:Nt(s.bottomLeft),bottomRight:Nt(s.bottomRight)});var u=o.keyOriginBoxCorners;u&&(l.keyOriginBoxCorners=[{x:u.rectangleCornerA.Hrzn,y:u.rectangleCornerA.Vrtc},{x:u.rectangleCornerB.Hrzn,y:u.rectangleCornerB.Vrtc},{x:u.rectangleCornerC.Hrzn,y:u.rectangleCornerC.Vrtc},{x:u.rectangleCornerD.Hrzn,y:u.rectangleCornerD.Vrtc}]);var c=o.Trnf;c&&(l.transform=[c.xx,c.xy,c.yx,c.yy,c.tx,c.ty]),t.vectorOrigination.keyDescriptorList.push(l)}nt(e,r())},function(e,t){for(var r=t.vectorOrigination,n={keyDescriptorList:[]},a=0;a<r.keyDescriptorList.length;a++){var i=r.keyDescriptorList[a];n.keyDescriptorList.push({});var o=n.keyDescriptorList[n.keyDescriptorList.length-1];i.keyOriginType!=null&&(o.keyOriginType=i.keyOriginType),i.keyOriginResolution!=null&&(o.keyOriginResolution=i.keyOriginResolution);var l=i.keyOriginRRectRadii;l&&(o.keyOriginRRectRadii={unitValueQuadVersion:1,topRight:Zt(l.topRight,"topRight"),topLeft:Zt(l.topLeft,"topLeft"),bottomLeft:Zt(l.bottomLeft,"bottomLeft"),bottomRight:Zt(l.bottomRight,"bottomRight")});var s=i.keyOriginShapeBoundingBox;s&&(o.keyOriginShapeBBox={unitValueQuadVersion:1,"Top ":Zt(s.top,"top"),Left:Zt(s.left,"left"),Btom:Zt(s.bottom,"bottom"),Rght:Zt(s.right,"right")});var u=i.keyOriginBoxCorners;u&&u.length===4&&(o.keyOriginBoxCorners={rectangleCornerA:{Hrzn:u[0].x,Vrtc:u[0].y},rectangleCornerB:{Hrzn:u[1].x,Vrtc:u[1].y},rectangleCornerC:{Hrzn:u[2].x,Vrtc:u[2].y},rectangleCornerD:{Hrzn:u[3].x,Vrtc:u[3].y}});var c=i.transform;c&&c.length===6&&(o.Trnf={xx:c[0],xy:c[1],yx:c[2],yy:c[3],tx:c[4],ty:c[5]}),i.keyShapeInvalidated!=null&&(o.keyShapeInvalidated=i.keyShapeInvalidated),o.keyOriginIndex=a}ht(e,1),Dt(e,"","null",n)}),ft("lmfx",function(e){return e.effects!==void 0&&x3(e.effects)},function(e,t,r){var n=De(e);if(n!==0)throw new Error("Invalid lmfx version");var a=Tt(e);t.effects=ts(a,!!e.logMissingFeatures),nt(e,r())},function(e,t,r,n){var a=es(t.effects,!!n.logMissingFeatures,!0);Je(e,0),Dt(e,"","null",a)}),ft("lrFX",Gt("effects"),function(e,t,r){t.effects||(t.effects=YE(e)),nt(e,r())},function(e,t){ZE(e,t.effects)}),ft("luni",Gt("name"),function(e,t,r){if(r()>4){var n=De(e);r()>=n*2?t.name=fd(e,n):e.logDevFeatures&&e.log("name in luni section is too long")}else e.logDevFeatures&&e.log("empty luni section");nt(e,r())},function(e,t){En(e,t.name)}),ft("lnsr",Gt("nameSource"),function(e,t){return t.nameSource=Wt(e)},function(e,t){return pt(e,t.nameSource)}),ft("lyid",Gt("id"),function(e,t){t.id=De(e)},function(e,t,r,n){for(var a=t.id;n.layerIds.has(a);)a+=100;Je(e,a),n.layerIds.add(a),n.layerToId.set(t,a)}),ft("lsct",Gt("sectionDivider"),function(e,t,r){t.sectionDivider={type:De(e)},r()&&(Ca(e,"8BIM"),t.sectionDivider.key=Wt(e)),r()&&(t.sectionDivider.subType=De(e))},function(e,t){Je(e,t.sectionDivider.type),t.sectionDivider.key&&(pt(e,"8BIM"),pt(e,t.sectionDivider.key),t.sectionDivider.subType!==void 0&&Je(e,t.sectionDivider.subType))}),Jo("lsdk","lsct"),ft("clbl",Gt("blendClippendElements"),function(e,t){t.blendClippendElements=!!Ze(e),nt(e,3)},function(e,t){Ge(e,t.blendClippendElements?1:0),Rt(e,3)}),ft("infx",Gt("blendInteriorElements"),function(e,t){t.blendInteriorElements=!!Ze(e),nt(e,3)},function(e,t){Ge(e,t.blendInteriorElements?1:0),Rt(e,3)}),ft("knko",Gt("knockout"),function(e,t){t.knockout=!!Ze(e),nt(e,3)},function(e,t){Ge(e,t.knockout?1:0),Rt(e,3)}),ft("lmgm",Gt("layerMaskAsGlobalMask"),function(e,t){t.layerMaskAsGlobalMask=!!Ze(e),nt(e,3)},function(e,t){Ge(e,t.layerMaskAsGlobalMask?1:0),Rt(e,3)}),ft("lspf",Gt("protected"),function(e,t){var r=De(e);t.protected={transparency:(r&1)!==0,composite:(r&2)!==0,position:(r&4)!==0},r&8&&(t.protected.artboards=!0)},function(e,t){var r=(t.protected.transparency?1:0)|(t.protected.composite?2:0)|(t.protected.position?4:0)|(t.protected.artboards?8:0);Je(e,r)}),ft("lclr",Gt("layerColor"),function(e,t){var r=We(e);nt(e,6),t.layerColor=W2[r]},function(e,t){var r=W2.indexOf(t.layerColor);Oe(e,r===-1?0:r),Rt(e,6)}),ft("shmd",function(e){return e.timestamp!==void 0||e.animationFrames!==void 0||e.animationFrameFlags!==void 0||e.timeline!==void 0||e.comps!==void 0},function(e,t,r){for(var n=De(e),a=function(o){Ca(e,"8BIM");var l=Wt(e);Ze(e),nt(e,3),Sn(e,1,function(s){if(l==="cust"){var u=Tt(e);u.layerTime!==void 0&&(t.timestamp=u.layerTime)}else if(l==="mlst"){var u=Tt(e);t.animationFrames=[];for(var c=0;c<u.LaSt.length;c++){var f=u.LaSt[c],d={frames:f.FrLs};f.enab!==void 0&&(d.enable=f.enab),f.Ofst&&(d.offset=Jl(f.Ofst)),f.FXRf&&(d.referencePoint=Jl(f.FXRf)),f.Lefx&&(d.effects=ts(f.Lefx,!!e.logMissingFeatures)),f.blendOptions&&f.blendOptions.Opct&&(d.opacity=dt(f.blendOptions.Opct)),t.animationFrames.push(d)}}else if(l==="mdyn"){We(e);var h=Ze(e),y=Ze(e);t.animationFrameFlags={propagateFrameOne:!h,unifyLayerPosition:(y&1)!==0,unifyLayerStyle:(y&2)!==0,unifyLayerVisibility:(y&4)!==0}}else if(l==="tmln"){var u=Tt(e),p=u.timeScope,x={start:an(p.Strt),duration:an(p.duration),inTime:an(p.inTime),outTime:an(p.outTime),autoScope:u.autoScope,audioLevel:u.audioLevel};u.trackList&&(x.tracks=A4(u.trackList,!!e.logMissingFeatures)),t.timeline=x}else if(l==="cmls"){var u=Tt(e);t.comps={settings:[]},u.origFXRefPoint&&(t.comps.originalEffectsReferencePoint={x:u.origFXRefPoint.Hrzn,y:u.origFXRefPoint.Vrtc});for(var g=0,m=u.layerSettings;g<m.length;g++){var b=m[g];t.comps.settings.push({compList:b.compList});var v=t.comps.settings[t.comps.settings.length-1];"enab"in b&&(v.enabled=b.enab),b.Ofst&&(v.offset={x:b.Ofst.Hrzn,y:b.Ofst.Vrtc}),b.FXRefPoint&&(v.effectsReferencePoint={x:b.FXRefPoint.Hrzn,y:b.FXRefPoint.Vrtc})}}else if(l==="extn"){var u=Tt(e);e.logMissingFeatures&&e.log('Unhandled "shmd" section key',l)}else e.logMissingFeatures&&e.log('Unhandled "shmd" section key',l);nt(e,s())})},i=0;i<n;i++)a();nt(e,r())},function(e,t,r,n){var a=t.animationFrames,i=t.animationFrameFlags,o=t.timestamp,l=t.timeline,s=t.comps,u=0;a&&u++,i&&u++,l&&u++,o!==void 0&&u++,s&&u++,Je(e,u),a&&(pt(e,"8BIM"),pt(e,"mlst"),Ge(e,0),Rt(e,3),$r(e,2,function(){for(var c,f={LaID:(c=t.id)!==null&&c!==void 0?c:0,LaSt:[]},d=0;d<a.length;d++){var h=a[d],y={};h.enable!==void 0&&(y.enab=h.enable),y.FrLs=h.frames,h.offset&&(y.Ofst=Ql(h.offset)),h.referencePoint&&(y.FXRf=Ql(h.referencePoint)),h.effects&&(y.Lefx=es(h.effects,!1,!1)),h.opacity!==void 0&&(y.blendOptions={Opct:Dr(h.opacity)}),f.LaSt.push(y)}Dt(e,"","null",f)},!0)),i&&(pt(e,"8BIM"),pt(e,"mdyn"),Ge(e,0),Rt(e,3),$r(e,2,function(){Oe(e,0),Ge(e,i.propagateFrameOne?0:15),Ge(e,(i.unifyLayerPosition?1:0)|(i.unifyLayerStyle?2:0)|(i.unifyLayerVisibility?4:0))})),l&&(pt(e,"8BIM"),pt(e,"tmln"),Ge(e,0),Rt(e,3),$r(e,2,function(){var c={Vrsn:1,timeScope:{Vrsn:1,Strt:l.start,duration:l.duration,inTime:l.inTime,outTime:l.outTime},autoScope:l.autoScope,audioLevel:l.audioLevel};l.tracks&&(c.trackList=E4(l.tracks));var f=n.layerToId.get(t)||t.id;if(!f)throw new Error("You need to provide layer.id value whan writing document with animations");c.LyrI=f,Dt(e,"","null",c,"anim")},!0)),o!==void 0&&(pt(e,"8BIM"),pt(e,"cust"),Ge(e,0),Rt(e,3),$r(e,2,function(){var c={layerTime:o};Dt(e,"","metadata",c)},!0)),s&&(pt(e,"8BIM"),pt(e,"cmls"),Ge(e,0),Rt(e,3),$r(e,2,function(){var c=n.layerToId.get(t)||t.id;if(!c)throw new Error("You need to provide layer.id value whan writing document with layer comps");var f={};s.originalEffectsReferencePoint&&(f.origFXRefPoint={Hrzn:s.originalEffectsReferencePoint.x,Vrtc:s.originalEffectsReferencePoint.y}),f.LyrI=c,f.layerSettings=[];for(var d=0,h=s.settings;d<h.length;d++){var y=h[d],p={};y.enabled!==void 0&&(p.enab=y.enabled),y.offset&&(p.Ofst={Hrzn:y.offset.x,Vrtc:y.offset.y}),y.effectsReferencePoint&&(p.FXRefPoint={Hrzn:y.effectsReferencePoint.x,Vrtc:y.effectsReferencePoint.y}),p.compList=y.compList,f.layerSettings.push(p)}Dt(e,"","null",f)},!0))}),ft("PxSc",function(){return!1},function(e,t){var r=Tt(e,!0);r.pixelSourceType===1986285651?t.pixelSource={type:"vdPS",origin:{x:r.origin.Hrzn,y:r.origin.Vrtc},interpretation:{interpretAlpha:r.interpretation.interpretAlpha.split(".")[1],profile:r.interpretation.profile},frameReader:{type:"QTFR",link:{name:r.frameReader["Lnk "]["Nm "],fullPath:r.frameReader["Lnk "].fullPath,originalPath:r.frameReader["Lnk "].originalPath,relativePath:r.frameReader["Lnk "].relPath,alias:r.frameReader["Lnk "].alis},mediaDescriptor:r.frameReader.mediaDescriptor},showAlteredVideo:r.showAlteredVideo}:e.log("Unknown pixelSourceType")},function(e,t){var r=t.pixelSource,n={_name:"",_classID:"PixelSource",pixelSourceType:1986285651,descVersion:1,origin:{Hrzn:r.origin.x,Vrtc:r.origin.y},interpretation:{_name:"",_classID:"footageInterpretation",Vrsn:1,interpretAlpha:"alphaInterpretation.".concat(r.interpretation.interpretAlpha),profile:r.interpretation.profile},frameReader:{_name:"",_classID:"FrameReader",frameReaderType:1364477522,descVersion:1,"Lnk ":{_name:"",_classID:"ExternalFileLink",descVersion:2,"Nm ":r.frameReader.link.name,fullPath:r.frameReader.link.fullPath,originalPath:r.frameReader.link.originalPath,alis:r.frameReader.link.alias,relPath:r.frameReader.link.relativePath},mediaDescriptor:r.frameReader.mediaDescriptor},showAlteredVideo:r.showAlteredVideo};Dt(e,"","PixelSource",n)}),ft("vstk",Gt("vectorStroke"),function(e,t,r){var n=Tt(e);t.vectorStroke={strokeEnabled:n.strokeEnabled,fillEnabled:n.fillEnabled,lineWidth:Nt(n.strokeStyleLineWidth),lineDashOffset:Nt(n.strokeStyleLineDashOffset),miterLimit:n.strokeStyleMiterLimit,lineCapType:X4.decode(n.strokeStyleLineCapType),lineJoinType:Y4.decode(n.strokeStyleLineJoinType),lineAlignment:Z4.decode(n.strokeStyleLineAlignment),scaleLock:n.strokeStyleScaleLock,strokeAdjust:n.strokeStyleStrokeAdjust,lineDashSet:n.strokeStyleLineDashSet.map(Nt),blendMode:on.decode(n.strokeStyleBlendMode),opacity:dt(n.strokeStyleOpacity),content:rs(n.strokeStyleContent),resolution:n.strokeStyleResolution},nt(e,r())},function(e,t){var r,n,a,i=t.vectorStroke,o={strokeStyleVersion:2,strokeEnabled:!!i.strokeEnabled,fillEnabled:!!i.fillEnabled,strokeStyleLineWidth:i.lineWidth||{value:3,units:"Points"},strokeStyleLineDashOffset:i.lineDashOffset||{value:0,units:"Points"},strokeStyleMiterLimit:(r=i.miterLimit)!==null&&r!==void 0?r:100,strokeStyleLineCapType:X4.encode(i.lineCapType),strokeStyleLineJoinType:Y4.encode(i.lineJoinType),strokeStyleLineAlignment:Z4.encode(i.lineAlignment),strokeStyleScaleLock:!!i.scaleLock,strokeStyleStrokeAdjust:!!i.strokeAdjust,strokeStyleLineDashSet:i.lineDashSet||[],strokeStyleBlendMode:on.encode(i.blendMode),strokeStyleOpacity:Dr((n=i.opacity)!==null&&n!==void 0?n:1),strokeStyleContent:ns(i.content||{type:"color",color:{r:0,g:0,b:0}}).descriptor,strokeStyleResolution:(a=i.resolution)!==null&&a!==void 0?a:72};Dt(e,"","strokeStyle",o)}),ft("artb",Gt("artboard"),function(e,t,r){var n=Tt(e),a=n.artboardRect;t.artboard={rect:{top:a["Top "],left:a.Left,bottom:a.Btom,right:a.Rght},guideIndices:n.guideIndeces,presetName:n.artboardPresetName,color:Kn(n["Clr "]),backgroundType:n.artboardBackgroundType},nt(e,r())},function(e,t){var r,n=t.artboard,a=n.rect,i={artboardRect:{"Top ":a.top,Left:a.left,Btom:a.bottom,Rght:a.right},guideIndeces:n.guideIndices||[],artboardPresetName:n.presetName||"","Clr ":Xn(n.color),artboardBackgroundType:(r=n.backgroundType)!==null&&r!==void 0?r:1};Dt(e,"","artboard",i)}),ft("sn2P",Gt("usingAlignedRendering"),function(e,t){return t.usingAlignedRendering=!!De(e)},function(e,t){return Je(e,t.usingAlignedRendering?1:0)});var Qo=["unknown","vector","raster","image stack"];function f3(e){var t,r,n,a,i,o,l=G(G({style:ld.decode(e.warpStyle)},e.warpValues?{values:e.warpValues}:{value:e.warpValue||0}),{perspective:e.warpPerspective||0,perspectiveOther:e.warpPerspectiveOther||0,rotate:is.decode(e.warpRotate),bounds:e.bounds&&{top:wi(e.bounds["Top "]),left:wi(e.bounds.Left),bottom:wi(e.bounds.Btom),right:wi(e.bounds.Rght)},uOrder:e.uOrder,vOrder:e.vOrder});(e.deformNumRows!=null||e.deformNumCols!=null)&&(l.deformNumRows=e.deformNumRows,l.deformNumCols=e.deformNumCols);var s=e.customEnvelopeWarp;if(s){l.customEnvelopeWarp={meshPoints:[]};for(var u=((t=s.meshPoints.find(function(d){return d.type==="Hrzn"}))===null||t===void 0?void 0:t.values)||[],c=((r=s.meshPoints.find(function(d){return d.type==="Vrtc"}))===null||r===void 0?void 0:r.values)||[],f=0;f<u.length;f++)l.customEnvelopeWarp.meshPoints.push({x:u[f],y:c[f]});(s.quiltSliceX||s.quiltSliceY)&&(l.customEnvelopeWarp.quiltSliceX=((a=(n=s.quiltSliceX)===null||n===void 0?void 0:n[0])===null||a===void 0?void 0:a.values)||[],l.customEnvelopeWarp.quiltSliceY=((o=(i=s.quiltSliceY)===null||i===void 0?void 0:i[0])===null||o===void 0?void 0:o.values)||[])}return l}function Cd(e){var t,r;return e.deformNumCols!=null||e.deformNumRows!=null||((t=e.customEnvelopeWarp)===null||t===void 0?void 0:t.quiltSliceX)||((r=e.customEnvelopeWarp)===null||r===void 0?void 0:r.quiltSliceY)}function mu(e){var t=e.bounds,r=G(G({warpStyle:ld.encode(e.style)},e.values?{warpValues:e.values}:{warpValue:e.value||0}),{warpPerspective:e.perspective||0,warpPerspectiveOther:e.perspectiveOther||0,warpRotate:is.encode(e.rotate),bounds:{"Top ":Zt(t&&t.top||{units:"Pixels",value:0},"bounds.top"),Left:Zt(t&&t.left||{units:"Pixels",value:0},"bounds.left"),Btom:Zt(t&&t.bottom||{units:"Pixels",value:0},"bounds.bottom"),Rght:Zt(t&&t.right||{units:"Pixels",value:0},"bounds.right")},uOrder:e.uOrder||0,vOrder:e.vOrder||0}),n=Cd(e);if(n){var a=r;a.deformNumRows=e.deformNumRows||0,a.deformNumCols=e.deformNumCols||0}var i=e.customEnvelopeWarp;if(i){var o=i.meshPoints||[];if(n){var a=r;a.customEnvelopeWarp={_name:"",_classID:"customEnvelopeWarp",quiltSliceX:[{type:"quiltSliceX",values:i.quiltSliceX||[]}],quiltSliceY:[{type:"quiltSliceY",values:i.quiltSliceY||[]}],meshPoints:[{type:"Hrzn",values:o.map(function(s){return s.x})},{type:"Vrtc",values:o.map(function(s){return s.y})}]}}else r.customEnvelopeWarp={_name:"",_classID:"customEnvelopeWarp",meshPoints:[{type:"Hrzn",values:o.map(function(l){return l.x})},{type:"Vrtc",values:o.map(function(l){return l.y})}]}}return r}ft("PlLd",Gt("placedLayer"),function(e,t,r){if(Wt(e)!=="plcL")throw new Error("Invalid PlLd signature");if(st(e)!==3)throw new Error("Invalid PlLd version");var n=Jn(e,1),a=st(e),i=st(e);st(e);var o=st(e);if(!Qo[o])throw new Error("Invalid PlLd type");for(var l=[],s=0;s<8;s++)l.push(Nn(e));var u=st(e);if(u!==0)throw new Error("Invalid Warp version ".concat(u));var c=Tt(e);t.placedLayer=t.placedLayer||{id:n,type:Qo[o],pageNumber:a,totalPages:i,transform:l,warp:f3(c)},nt(e,r())},function(e,t){var r=t.placedLayer;if(pt(e,"plcL"),ht(e,3),!r.id||typeof r.id!="string"||!/^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$/.test(r.id))throw new Error("Placed layer ID must be in a GUID format (example: 20953ddb-9391-11ec-b4f1-c15674f50bc4)");if(Ai(e,r.id,1),ht(e,1),ht(e,1),ht(e,16),Qo.indexOf(r.type)===-1)throw new Error("Invalid placedLayer type");ht(e,Qo.indexOf(r.type));for(var n=0;n<8;n++)$n(e,r.transform[n]);ht(e,0);var a=h3(r),i=Cd(a),o=i?"quiltWarp":"warp";Dt(e,"",o,mu(a),o)});function hT(e){return new Float32Array(e.buffer.slice(e.byteOffset),0,e.byteLength/4)}function pT(e){return new Uint32Array(e.buffer.slice(e.byteOffset),0,e.byteLength/4)}function Ad(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function gu(e){for(var t=[],r=0;r<e.length;r+=2)t.push({x:e[r],y:e[r+1]});return t}function ss(e){for(var t=[],r=0;r<e.length;r++)t.push(e[r].x,e[r].y);return t}function d3(e){return gu(hT(e))}function us(e){return{x:Nt(e.Hrzn),y:Nt(e.Vrtc)}}function cs(e){return{_name:"",_classID:"Pnt ",Hrzn:Zt(e.x,"x"),Vrtc:Zt(e.y,"y")}}function vT(e,t){var r={name:e["Nm "],opacity:dt(e.blendOptions.Opct),blendMode:on.decode(e.blendOptions["Md "]),enabled:e.enab,hasOptions:e.hasoptions,foregroundColor:Kn(e.FrgC),backgroundColor:Kn(e.BckC)};if("Fltr"in e)switch(e.Fltr._classID){case"boxblur":return G(G({},r),{type:"box blur",filter:{radius:Nt(e.Fltr["Rds "])}});case"GsnB":return G(G({},r),{type:"gaussian blur",filter:{radius:Nt(e.Fltr["Rds "])}});case"MtnB":return G(G({},r),{type:"motion blur",filter:{angle:e.Fltr.Angl,distance:Nt(e.Fltr.Dstn)}});case"RdlB":return G(G({},r),{type:"radial blur",filter:{amount:e.Fltr.Amnt,method:J4.decode(e.Fltr.BlrM),quality:Q4.decode(e.Fltr.BlrQ)}});case"shapeBlur":return G(G({},r),{type:"shape blur",filter:{radius:Nt(e.Fltr["Rds "]),customShape:{name:e.Fltr.customShape["Nm "],id:e.Fltr.customShape.Idnt}}});case"SmrB":return G(G({},r),{type:"smart blur",filter:{radius:e.Fltr["Rds "],threshold:e.Fltr.Thsh,quality:tg.decode(e.Fltr.SmBQ),mode:eg.decode(e.Fltr.SmBM)}});case"surfaceBlur":return G(G({},r),{type:"surface blur",filter:{radius:Nt(e.Fltr["Rds "]),threshold:e.Fltr.Thsh}});case"Dspl":return G(G({},r),{type:"displace",filter:{horizontalScale:e.Fltr.HrzS,verticalScale:e.Fltr.VrtS,displacementMap:rg.decode(e.Fltr.DspM),undefinedAreas:Vo.decode(e.Fltr.UndA),displacementFile:{signature:e.Fltr.DspF.sig,path:e.Fltr.DspF.path}}});case"Pnch":return G(G({},r),{type:"pinch",filter:{amount:e.Fltr.Amnt}});case"Plr ":return G(G({},r),{type:"polar coordinates",filter:{conversion:ng.decode(e.Fltr.Cnvr)}});case"Rple":return G(G({},r),{type:"ripple",filter:{amount:e.Fltr.Amnt,size:ag.decode(e.Fltr.RplS)}});case"Shr ":return G(G({},r),{type:"shear",filter:{shearPoints:e.Fltr.ShrP.map(function(l){return{x:l.Hrzn,y:l.Vrtc}}),shearStart:e.Fltr.ShrS,shearEnd:e.Fltr.ShrE,undefinedAreas:Vo.decode(e.Fltr.UndA)}});case"Sphr":return G(G({},r),{type:"spherize",filter:{amount:e.Fltr.Amnt,mode:ig.decode(e.Fltr.SphM)}});case"Twrl":return G(G({},r),{type:"twirl",filter:{angle:e.Fltr.Angl}});case"Wave":return G(G({},r),{type:"wave",filter:{numberOfGenerators:e.Fltr.NmbG,type:og.decode(e.Fltr.Wvtp),wavelength:{min:e.Fltr.WLMn,max:e.Fltr.WLMx},amplitude:{min:e.Fltr.AmMn,max:e.Fltr.AmMx},scale:{x:e.Fltr.SclH,y:e.Fltr.SclV},randomSeed:e.Fltr.RndS,undefinedAreas:Vo.decode(e.Fltr.UndA)}});case"ZgZg":return G(G({},r),{type:"zigzag",filter:{amount:e.Fltr.Amnt,ridges:e.Fltr.NmbR,style:lg.decode(e.Fltr.ZZTy)}});case"AdNs":return G(G({},r),{type:"add noise",filter:{amount:dt(e.Fltr.Nose),distribution:sg.decode(e.Fltr.Dstr),monochromatic:e.Fltr.Mnch,randomSeed:e.Fltr.FlRs}});case"DstS":return G(G({},r),{type:"dust and scratches",filter:{radius:e.Fltr["Rds "],threshold:e.Fltr.Thsh}});case"Mdn ":return G(G({},r),{type:"median",filter:{radius:Nt(e.Fltr["Rds "])}});case"denoise":return G(G({},r),{type:"reduce noise",filter:{preset:e.Fltr.preset,removeJpegArtifact:e.Fltr.removeJPEGArtifact,reduceColorNoise:dt(e.Fltr.ClNs),sharpenDetails:dt(e.Fltr.Shrp),channelDenoise:e.Fltr.channelDenoise.map(function(l){return G({channels:l.Chnl.map(os.decode),amount:l.Amnt},l.EdgF?{preserveDetails:l.EdgF}:{})})}});case"ClrH":return G(G({},r),{type:"color halftone",filter:{radius:e.Fltr["Rds "],angle1:e.Fltr.Ang1,angle2:e.Fltr.Ang2,angle3:e.Fltr.Ang3,angle4:e.Fltr.Ang4}});case"Crst":return G(G({},r),{type:"crystallize",filter:{cellSize:e.Fltr.ClSz,randomSeed:e.Fltr.FlRs}});case"Mztn":return G(G({},r),{type:"mezzotint",filter:{type:ug.decode(e.Fltr.MztT),randomSeed:e.Fltr.FlRs}});case"Msc ":return G(G({},r),{type:"mosaic",filter:{cellSize:Nt(e.Fltr.ClSz)}});case"Pntl":return G(G({},r),{type:"pointillize",filter:{cellSize:e.Fltr.ClSz,randomSeed:e.Fltr.FlRs}});case"Clds":return G(G({},r),{type:"clouds",filter:{randomSeed:e.Fltr.FlRs}});case"DfrC":return G(G({},r),{type:"difference clouds",filter:{randomSeed:e.Fltr.FlRs}});case"Fbrs":return G(G({},r),{type:"fibers",filter:{variance:e.Fltr.Vrnc,strength:e.Fltr.Strg,randomSeed:e.Fltr.RndS}});case"LnsF":return G(G({},r),{type:"lens flare",filter:{brightness:e.Fltr.Brgh,position:{x:e.Fltr.FlrC.Hrzn,y:e.Fltr.FlrC.Vrtc},lensType:cg.decode(e.Fltr["Lns "])}});case"smartSharpen":return G(G({},r),{type:"smart sharpen",filter:{amount:dt(e.Fltr.Amnt),radius:Nt(e.Fltr["Rds "]),threshold:e.Fltr.Thsh,angle:e.Fltr.Angl,moreAccurate:e.Fltr.moreAccurate,blur:fg.decode(e.Fltr.blur),preset:e.Fltr.preset,shadow:{fadeAmount:dt(e.Fltr.sdwM.Amnt),tonalWidth:dt(e.Fltr.sdwM.Wdth),radius:e.Fltr.sdwM["Rds "]},highlight:{fadeAmount:dt(e.Fltr.hglM.Amnt),tonalWidth:dt(e.Fltr.hglM.Wdth),radius:e.Fltr.hglM["Rds "]}}});case"UnsM":return G(G({},r),{type:"unsharp mask",filter:{amount:dt(e.Fltr.Amnt),radius:Nt(e.Fltr["Rds "]),threshold:e.Fltr.Thsh}});case"Dfs ":return G(G({},r),{type:"diffuse",filter:{mode:dg.decode(e.Fltr["Md "]),randomSeed:e.Fltr.FlRs}});case"Embs":return G(G({},r),{type:"emboss",filter:{angle:e.Fltr.Angl,height:e.Fltr.Hght,amount:e.Fltr.Amnt}});case"Extr":return G(G({},r),{type:"extrude",filter:{type:hg.decode(e.Fltr.ExtT),size:e.Fltr.ExtS,depth:e.Fltr.ExtD,depthMode:pg.decode(e.Fltr.ExtR),randomSeed:e.Fltr.FlRs,solidFrontFaces:e.Fltr.ExtF,maskIncompleteBlocks:e.Fltr.ExtM}});case"Tls ":return G(G({},r),{type:"tiles",filter:{numberOfTiles:e.Fltr.TlNm,maximumOffset:e.Fltr.TlOf,fillEmptyAreaWith:vg.decode(e.Fltr.FlCl),randomSeed:e.Fltr.FlRs}});case"TrcC":return G(G({},r),{type:"trace contour",filter:{level:e.Fltr["Lvl "],edge:mg.decode(e.Fltr["Edg "])}});case"Wnd ":return G(G({},r),{type:"wind",filter:{method:gg.decode(e.Fltr.WndM),direction:bg.decode(e.Fltr.Drct)}});case"Dntr":return G(G({},r),{type:"de-interlace",filter:{eliminate:yg.decode(e.Fltr.IntE),newFieldsBy:xg.decode(e.Fltr.IntC)}});case"Cstm":return G(G({},r),{type:"custom",filter:{scale:e.Fltr["Scl "],offset:e.Fltr.Ofst,matrix:e.Fltr.Mtrx}});case"HghP":return G(G({},r),{type:"high pass",filter:{radius:Nt(e.Fltr["Rds "])}});case"Mxm ":return G(G({},r),{type:"maximum",filter:{radius:Nt(e.Fltr["Rds "])}});case"Mnm ":return G(G({},r),{type:"minimum",filter:{radius:Nt(e.Fltr["Rds "])}});case"Ofst":return G(G({},r),{type:"offset",filter:{horizontal:e.Fltr.Hrzn,vertical:e.Fltr.Vrtc,undefinedAreas:_g.decode(e.Fltr["Fl "])}});case"rigidTransform":return G(G({},r),{type:"puppet",filter:{rigidType:e.Fltr.rigidType,bounds:[{x:e.Fltr.PuX0,y:e.Fltr.PuY0},{x:e.Fltr.PuX1,y:e.Fltr.PuY1},{x:e.Fltr.PuX2,y:e.Fltr.PuY2},{x:e.Fltr.PuX3,y:e.Fltr.PuY3}],puppetShapeList:e.Fltr.puppetShapeList.map(function(l){return{rigidType:l.rigidType,originalVertexArray:d3(l.originalVertexArray),deformedVertexArray:d3(l.deformedVertexArray),indexArray:Array.from(pT(l.indexArray)),pinOffsets:gu(l.pinOffsets),posFinalPins:gu(l.posFinalPins),pinVertexIndices:l.pinVertexIndices,selectedPin:l.selectedPin,pinPosition:gu(l.PinP),pinRotation:l.PnRt,pinOverlay:l.PnOv,pinDepth:l.PnDp,meshQuality:l.meshQuality,meshExpansion:l.meshExpansion,meshRigidity:l.meshRigidity,imageResolution:l.imageResolution,meshBoundaryPath:{pathComponents:l.meshBoundaryPath.pathComponents.map(function(s){return{shapeOperation:s.shapeOperation.split(".")[1],paths:s.SbpL.map(function(u){return{closed:u.Clsp,points:u["Pts "].map(function(c){return{anchor:us(c.Anch),forward:us(c["Fwd "]),backward:us(c["Bwd "]),smooth:c.Smoo}})}})}})}}})}});case"PbPl":{for(var n=[],a=e.Fltr,i=0;i<Cn.length&&a["PN".concat(Cn[i],"a")];i++)for(var o=0;o<Cn.length&&a["PN".concat(Cn[i]).concat(Cn[o])];o++)n.push({name:a["PN".concat(Cn[i]).concat(Cn[o])],value:a["PF".concat(Cn[i]).concat(Cn[o])]});return G(G({},r),{type:"oil paint plugin",filter:{name:e.Fltr.KnNm,gpu:e.Fltr.GpuY,lighting:e.Fltr.LIWy,parameters:n}})}case"HsbP":return G(G({},r),{type:"hsb/hsl",filter:{inputMode:nu.decode(e.Fltr.Inpt),rowOrder:nu.decode(e.Fltr.Otpt)}});case"oilPaint":return G(G({},r),{type:"oil paint",filter:{lightingOn:e.Fltr.lightingOn,stylization:e.Fltr.stylization,cleanliness:e.Fltr.cleanliness,brushScale:e.Fltr.brushScale,microBrush:e.Fltr.microBrush,lightDirection:e.Fltr.LghD,specularity:e.Fltr.specularity}});case"LqFy":return G(G({},r),{type:"liquify",filter:{liquifyMesh:e.Fltr.LqMe}});case"perspectiveWarpTransform":return G(G({},r),{type:"perspective warp",filter:{vertices:e.Fltr.vertices.map(us),warpedVertices:e.Fltr.warpedVertices.map(us),quads:e.Fltr.quads.map(function(l){return l.indices})}});case"Crvs":return G(G({},r),{type:"curves",filter:G({presetKind:wg.decode(e.Fltr.presetKind)},e.Fltr.Adjs?{adjustments:e.Fltr.Adjs.map(function(l){var s=l.Chnl.map(os.decode);if(l["Crv "])return{channels:s,curve:l["Crv "].map(function(u){var c={x:u.Hrzn,y:u.Vrtc};return u.Cnty&&(c.curved=!0),c})};if(l.Mpng)return{channels:s,values:l.Mpng};throw new Error("Unknown curve adjustment")})}:{})});case"BrgC":return G(G({},r),{type:"brightness/contrast",filter:{brightness:e.Fltr.Brgh,contrast:e.Fltr.Cntr,useLegacy:!!e.Fltr.useLegacy}});default:if(t.throwForMissingFeatures)throw new Error("Unknown filter classId: ".concat(e.Fltr._classID));return}else switch(e.filterID){case 1098281575:return G(G({},r),{type:"average"});case 1114403360:return G(G({},r),{type:"blur"});case 1114403405:return G(G({},r),{type:"blur more"});case 1148416099:return G(G({},r),{type:"despeckle"});case 1180922912:return G(G({},r),{type:"facet"});case 1181902701:return G(G({},r),{type:"fragment"});case 1399353968:return G(G({},r),{type:"sharpen"});case 1399353925:return G(G({},r),{type:"sharpen edges"});case 1399353933:return G(G({},r),{type:"sharpen more"});case 1181639749:return G(G({},r),{type:"find edges"});case 1399616122:return G(G({},r),{type:"solarize"});case 1314149187:return G(G({},r),{type:"ntsc colors"});case 1231976050:return G(G({},r),{type:"invert"});default:if(t.throwForMissingFeatures)throw new Error("Unknown filterID: ".concat(e.filterID))}}function mT(e,t){return{enabled:e.enab,validAtPosition:e.validAtPosition,maskEnabled:e.filterMaskEnable,maskLinked:e.filterMaskLinked,maskExtendWithWhite:e.filterMaskExtendWithWhite,list:e.filterFXList.map(function(r){return vT(r,t)}).filter(function(r){return!!r})}}function Aa(e){return Zt(e.radius,"radius")}function gT(e){var t={_name:"",_classID:"filterFX","Nm ":e.name,blendOptions:{_name:"",_classID:"blendOptions",Opct:Bn(e.opacity),"Md ":on.encode(e.blendMode)},enab:e.enabled,hasoptions:e.hasOptions,FrgC:Xn(e.foregroundColor),BckC:Xn(e.backgroundColor)};switch(e.type){case"average":return G(G({},t),{filterID:1098281575});case"blur":return G(G({},t),{filterID:1114403360});case"blur more":return G(G({},t),{filterID:1114403405});case"box blur":return G(G({},t),{Fltr:{_name:"Box Blur",_classID:"boxblur","Rds ":Aa(e.filter)},filterID:697});case"gaussian blur":return G(G({},t),{Fltr:{_name:"Gaussian Blur",_classID:"GsnB","Rds ":Aa(e.filter)},filterID:1198747202});case"motion blur":return G(G({},t),{Fltr:{_name:"Motion Blur",_classID:"MtnB",Angl:e.filter.angle,Dstn:Zt(e.filter.distance,"distance")},filterID:1299476034});case"radial blur":return G(G({},t),{Fltr:{_name:"Radial Blur",_classID:"RdlB",Amnt:e.filter.amount,BlrM:J4.encode(e.filter.method),BlrQ:Q4.encode(e.filter.quality)},filterID:1382313026});case"shape blur":return G(G({},t),{Fltr:{_name:"Shape Blur",_classID:"shapeBlur","Rds ":Aa(e.filter),customShape:{_name:"",_classID:"customShape","Nm ":e.filter.customShape.name,Idnt:e.filter.customShape.id}},filterID:702});case"smart blur":return G(G({},t),{Fltr:{_name:"Smart Blur",_classID:"SmrB","Rds ":e.filter.radius,Thsh:e.filter.threshold,SmBQ:tg.encode(e.filter.quality),SmBM:eg.encode(e.filter.mode)},filterID:1399681602});case"surface blur":return G(G({},t),{Fltr:{_name:"Surface Blur",_classID:"surfaceBlur","Rds ":Aa(e.filter),Thsh:e.filter.threshold},filterID:701});case"displace":return G(G({},t),{Fltr:{_name:"Displace",_classID:"Dspl",HrzS:e.filter.horizontalScale,VrtS:e.filter.verticalScale,DspM:rg.encode(e.filter.displacementMap),UndA:Vo.encode(e.filter.undefinedAreas),DspF:{sig:e.filter.displacementFile.signature,path:e.filter.displacementFile.path}},filterID:1148416108});case"pinch":return G(G({},t),{Fltr:{_name:"Pinch",_classID:"Pnch",Amnt:e.filter.amount},filterID:1349411688});case"polar coordinates":return G(G({},t),{Fltr:{_name:"Polar Coordinates",_classID:"Plr ",Cnvr:ng.encode(e.filter.conversion)},filterID:1349284384});case"ripple":return G(G({},t),{Fltr:{_name:"Ripple",_classID:"Rple",Amnt:e.filter.amount,RplS:ag.encode(e.filter.size)},filterID:1383099493});case"shear":return G(G({},t),{Fltr:{_name:"Shear",_classID:"Shr ",ShrP:e.filter.shearPoints.map(function(s){return{_name:"",_classID:"Pnt ",Hrzn:s.x,Vrtc:s.y}}),UndA:Vo.encode(e.filter.undefinedAreas),ShrS:e.filter.shearStart,ShrE:e.filter.shearEnd},filterID:1399353888});case"spherize":return G(G({},t),{Fltr:{_name:"Spherize",_classID:"Sphr",Amnt:e.filter.amount,SphM:ig.encode(e.filter.mode)},filterID:1399875698});case"twirl":return G(G({},t),{Fltr:{_name:"Twirl",_classID:"Twrl",Angl:e.filter.angle},filterID:1417114220});case"wave":return G(G({},t),{Fltr:{_name:"Wave",_classID:"Wave",Wvtp:og.encode(e.filter.type),NmbG:e.filter.numberOfGenerators,WLMn:e.filter.wavelength.min,WLMx:e.filter.wavelength.max,AmMn:e.filter.amplitude.min,AmMx:e.filter.amplitude.max,SclH:e.filter.scale.x,SclV:e.filter.scale.y,UndA:Vo.encode(e.filter.undefinedAreas),RndS:e.filter.randomSeed},filterID:1466005093});case"zigzag":return G(G({},t),{Fltr:{_name:"ZigZag",_classID:"ZgZg",Amnt:e.filter.amount,NmbR:e.filter.ridges,ZZTy:lg.encode(e.filter.style)},filterID:1516722791});case"add noise":return G(G({},t),{Fltr:{_name:"Add Noise",_classID:"AdNs",Dstr:sg.encode(e.filter.distribution),Nose:Bn(e.filter.amount),Mnch:e.filter.monochromatic,FlRs:e.filter.randomSeed},filterID:1097092723});case"despeckle":return G(G({},t),{filterID:1148416099});case"dust and scratches":return G(G({},t),{Fltr:{_name:"Dust & Scratches",_classID:"DstS","Rds ":e.filter.radius,Thsh:e.filter.threshold},filterID:1148417107});case"median":return G(G({},t),{Fltr:{_name:"Median",_classID:"Mdn ","Rds ":Aa(e.filter)},filterID:1298427424});case"reduce noise":return G(G({},t),{Fltr:{_name:"Reduce Noise",_classID:"denoise",ClNs:Bn(e.filter.reduceColorNoise),Shrp:Bn(e.filter.sharpenDetails),removeJPEGArtifact:e.filter.removeJpegArtifact,channelDenoise:e.filter.channelDenoise.map(function(s){return G({_name:"",_classID:"channelDenoiseParams",Chnl:s.channels.map(function(u){return os.encode(u)}),Amnt:s.amount},s.preserveDetails?{EdgF:s.preserveDetails}:{})}),preset:e.filter.preset},filterID:633});case"color halftone":return G(G({},t),{Fltr:{_name:"Color Halftone",_classID:"ClrH","Rds ":e.filter.radius,Ang1:e.filter.angle1,Ang2:e.filter.angle2,Ang3:e.filter.angle3,Ang4:e.filter.angle4},filterID:1131180616});case"crystallize":return G(G({},t),{Fltr:{_name:"Crystallize",_classID:"Crst",ClSz:e.filter.cellSize,FlRs:e.filter.randomSeed},filterID:1131574132});case"facet":return G(G({},t),{filterID:1180922912});case"fragment":return G(G({},t),{filterID:1181902701});case"mezzotint":return G(G({},t),{Fltr:{_name:"Mezzotint",_classID:"Mztn",MztT:ug.encode(e.filter.type),FlRs:e.filter.randomSeed},filterID:1299870830});case"mosaic":return G(G({},t),{Fltr:{_name:"Mosaic",_classID:"Msc ",ClSz:Zt(e.filter.cellSize,"cellSize")},filterID:1299407648});case"pointillize":return G(G({},t),{Fltr:{_name:"Pointillize",_classID:"Pntl",ClSz:e.filter.cellSize,FlRs:e.filter.randomSeed},filterID:1349416044});case"clouds":return G(G({},t),{Fltr:{_name:"Clouds",_classID:"Clds",FlRs:e.filter.randomSeed},filterID:1131177075});case"difference clouds":return G(G({},t),{Fltr:{_name:"Difference Clouds",_classID:"DfrC",FlRs:e.filter.randomSeed},filterID:1147564611});case"fibers":return G(G({},t),{Fltr:{_name:"Fibers",_classID:"Fbrs",Vrnc:e.filter.variance,Strg:e.filter.strength,RndS:e.filter.randomSeed},filterID:1180856947});case"lens flare":return G(G({},t),{Fltr:{_name:"Lens Flare",_classID:"LnsF",Brgh:e.filter.brightness,FlrC:{_name:"",_classID:"Pnt ",Hrzn:e.filter.position.x,Vrtc:e.filter.position.y},"Lns ":cg.encode(e.filter.lensType)},filterID:1282306886});case"sharpen":return G(G({},t),{filterID:1399353968});case"sharpen edges":return G(G({},t),{filterID:1399353925});case"sharpen more":return G(G({},t),{filterID:1399353933});case"smart sharpen":return G(G({},t),{Fltr:{_name:"Smart Sharpen",_classID:"smartSharpen",Amnt:Bn(e.filter.amount),"Rds ":Aa(e.filter),Thsh:e.filter.threshold,Angl:e.filter.angle,moreAccurate:e.filter.moreAccurate,blur:fg.encode(e.filter.blur),preset:e.filter.preset,sdwM:{_name:"Parameters",_classID:"adaptCorrectTones",Amnt:Bn(e.filter.shadow.fadeAmount),Wdth:Bn(e.filter.shadow.tonalWidth),"Rds ":e.filter.shadow.radius},hglM:{_name:"Parameters",_classID:"adaptCorrectTones",Amnt:Bn(e.filter.highlight.fadeAmount),Wdth:Bn(e.filter.highlight.tonalWidth),"Rds ":e.filter.highlight.radius}},filterID:698});case"unsharp mask":return G(G({},t),{Fltr:{_name:"Unsharp Mask",_classID:"UnsM",Amnt:Bn(e.filter.amount),"Rds ":Aa(e.filter),Thsh:e.filter.threshold},filterID:1433301837});case"diffuse":return G(G({},t),{Fltr:{_name:"Diffuse",_classID:"Dfs ","Md ":dg.encode(e.filter.mode),FlRs:e.filter.randomSeed},filterID:1147564832});case"emboss":return G(G({},t),{Fltr:{_name:"Emboss",_classID:"Embs",Angl:e.filter.angle,Hght:e.filter.height,Amnt:e.filter.amount},filterID:1164796531});case"extrude":return G(G({},t),{Fltr:{_name:"Extrude",_classID:"Extr",ExtS:e.filter.size,ExtD:e.filter.depth,ExtF:e.filter.solidFrontFaces,ExtM:e.filter.maskIncompleteBlocks,ExtT:hg.encode(e.filter.type),ExtR:pg.encode(e.filter.depthMode),FlRs:e.filter.randomSeed},filterID:1165522034});case"find edges":return G(G({},t),{filterID:1181639749});case"solarize":return G(G({},t),{filterID:1399616122});case"tiles":return G(G({},t),{Fltr:{_name:"Tiles",_classID:"Tls ",TlNm:e.filter.numberOfTiles,TlOf:e.filter.maximumOffset,FlCl:vg.encode(e.filter.fillEmptyAreaWith),FlRs:e.filter.randomSeed},filterID:1416393504});case"trace contour":return G(G({},t),{Fltr:{_name:"Trace Contour",_classID:"TrcC","Lvl ":e.filter.level,"Edg ":mg.encode(e.filter.edge)},filterID:1416782659});case"wind":return G(G({},t),{Fltr:{_name:"Wind",_classID:"Wnd ",WndM:gg.encode(e.filter.method),Drct:bg.encode(e.filter.direction)},filterID:1466852384});case"de-interlace":return G(G({},t),{Fltr:{_name:"De-Interlace",_classID:"Dntr",IntE:yg.encode(e.filter.eliminate),IntC:xg.encode(e.filter.newFieldsBy)},filterID:1148089458});case"ntsc colors":return G(G({},t),{filterID:1314149187});case"invert":return G(G({},t),{filterID:1231976050});case"custom":return G(G({},t),{Fltr:{_name:"Custom",_classID:"Cstm","Scl ":e.filter.scale,Ofst:e.filter.offset,Mtrx:e.filter.matrix},filterID:1131639917});case"high pass":return G(G({},t),{Fltr:{_name:"High Pass",_classID:"HghP","Rds ":Aa(e.filter)},filterID:1214736464});case"maximum":return G(G({},t),{Fltr:{_name:"Maximum",_classID:"Mxm ","Rds ":Aa(e.filter)},filterID:1299737888});case"minimum":return G(G({},t),{Fltr:{_name:"Minimum",_classID:"Mnm ","Rds ":Aa(e.filter)},filterID:1299082528});case"offset":return G(G({},t),{Fltr:{_name:"Offset",_classID:"Ofst",Hrzn:e.filter.horizontal,Vrtc:e.filter.vertical,"Fl ":_g.encode(e.filter.undefinedAreas)},filterID:1332114292});case"puppet":return G(G({},t),{Fltr:{_name:"Rigid Transform",_classID:"rigidTransform",null:["Ordn.Trgt"],rigidType:e.filter.rigidType,puppetShapeList:e.filter.puppetShapeList.map(function(s){return{_name:"",_classID:"puppetShape",rigidType:s.rigidType,VrsM:1,VrsN:0,originalVertexArray:Ad(new Float32Array(ss(s.originalVertexArray))),deformedVertexArray:Ad(new Float32Array(ss(s.deformedVertexArray))),indexArray:Ad(new Uint32Array(s.indexArray)),pinOffsets:ss(s.pinOffsets),posFinalPins:ss(s.posFinalPins),pinVertexIndices:s.pinVertexIndices,PinP:ss(s.pinPosition),PnRt:s.pinRotation,PnOv:s.pinOverlay,PnDp:s.pinDepth,meshQuality:s.meshQuality,meshExpansion:s.meshExpansion,meshRigidity:s.meshRigidity,imageResolution:s.imageResolution,meshBoundaryPath:{_name:"",_classID:"pathClass",pathComponents:s.meshBoundaryPath.pathComponents.map(function(u){return{_name:"",_classID:"PaCm",shapeOperation:"shapeOperation.".concat(u.shapeOperation),SbpL:u.paths.map(function(c){return{_name:"",_classID:"Sbpl",Clsp:c.closed,"Pts ":c.points.map(function(f){return{_name:"",_classID:"Pthp",Anch:cs(f.anchor),"Fwd ":cs(f.forward),"Bwd ":cs(f.backward),Smoo:f.smooth}})}})}})},selectedPin:s.selectedPin}}),PuX0:e.filter.bounds[0].x,PuX1:e.filter.bounds[1].x,PuX2:e.filter.bounds[2].x,PuX3:e.filter.bounds[3].x,PuY0:e.filter.bounds[0].y,PuY1:e.filter.bounds[1].y,PuY2:e.filter.bounds[2].y,PuY3:e.filter.bounds[3].y},filterID:991});case"oil paint plugin":{for(var r={},n=0;n<e.filter.parameters.length;n++){var a=e.filter.parameters[n],i=a.name,o=a.value,l="".concat(Cn[Math.floor(n/Cn.length)]).concat(Cn[n%Cn.length]);r["PN".concat(l)]=i,r["PT".concat(l)]=0,r["PF".concat(l)]=o}return G(G({},t),{Fltr:G({_name:"Oil Paint Plugin",_classID:"PbPl",KnNm:e.filter.name,GpuY:e.filter.gpu,LIWy:e.filter.lighting,FPth:"1"},r),filterID:1348620396})}case"oil paint":return G(G({},t),{Fltr:{_name:"Oil Paint",_classID:"oilPaint",lightingOn:e.filter.lightingOn,stylization:e.filter.stylization,cleanliness:e.filter.cleanliness,brushScale:e.filter.brushScale,microBrush:e.filter.microBrush,LghD:e.filter.lightDirection,specularity:e.filter.specularity},filterID:1122});case"liquify":return G(G({},t),{Fltr:{_name:"Liquify",_classID:"LqFy",LqMe:e.filter.liquifyMesh},filterID:1282492025});case"perspective warp":return G(G({},t),{Fltr:{_name:"Perspective Warp",_classID:"perspectiveWarpTransform",vertices:e.filter.vertices.map(cs),warpedVertices:e.filter.warpedVertices.map(cs),quads:e.filter.quads.map(function(s){return{indices:s}})},filterID:442});case"curves":return G(G({},t),{Fltr:G({_name:"Curves",_classID:"Crvs",presetKind:wg.encode(e.filter.presetKind)},e.filter.adjustments?{Adjs:e.filter.adjustments.map(function(s){return"curve"in s?{_name:"",_classID:"CrvA",Chnl:s.channels.map(os.encode),"Crv ":s.curve.map(function(u){return G({_name:"",_classID:"Pnt ",Hrzn:u.x,Vrtc:u.y},u.curved?{Cnty:!0}:{})})}:{_name:"",_classID:"CrvA",Chnl:s.channels.map(os.encode),Mpng:s.values}})}:{}),filterID:1131574899});case"brightness/contrast":return G(G({},t),{Fltr:{_name:"Brightness/Contrast",_classID:"BrgC",Brgh:e.filter.brightness,Cntr:e.filter.contrast,useLegacy:!!e.filter.useLegacy},filterID:1114793795});default:throw new Error("Unknow filter type: ".concat(e.type))}}function h3(e){if(e.warp)return e.warp;if(!e.width||!e.height)throw new Error("You must provide width and height of the linked image in placedLayer");var t=e.width,r=e.height,n=0,a=t/3,i=t*2/3,o=t,l=0,s=r/3,u=r*2/3,c=r;return{style:"custom",value:0,perspective:0,perspectiveOther:0,rotate:"horizontal",bounds:{top:{value:0,units:"Pixels"},left:{value:0,units:"Pixels"},bottom:{value:r,units:"Pixels"},right:{value:t,units:"Pixels"}},uOrder:4,vOrder:4,customEnvelopeWarp:{meshPoints:[{x:n,y:l},{x:a,y:l},{x:i,y:l},{x:o,y:l},{x:n,y:s},{x:a,y:s},{x:i,y:s},{x:o,y:s},{x:n,y:u},{x:a,y:u},{x:i,y:u},{x:o,y:u},{x:n,y:c},{x:a,y:c},{x:i,y:c},{x:o,y:c}]}}}ft("SoLd",Gt("placedLayer"),function(e,t,r){if(Wt(e)!=="soLD")throw new Error("Invalid SoLd type");var n=st(e);if(n!==4&&n!==5)throw new Error("Invalid SoLd version");var a=Tt(e,!0);t.placedLayer={id:a.Idnt,placed:a.placed,type:Qo[a.Type],pageNumber:a.PgNm,totalPages:a.totalPages,frameStep:an(a.frameStep),duration:an(a.duration),frameCount:a.frameCount,transform:a.Trnf,width:a["Sz "].Wdth,height:a["Sz "].Hght,resolution:Nt(a.Rslt),warp:f3(a.quiltWarp||a.warp)},a.nonAffineTransform&&a.nonAffineTransform.some(function(i,o){return i!==a.Trnf[o]})&&(t.placedLayer.nonAffineTransform=a.nonAffineTransform),a.Crop&&(t.placedLayer.crop=a.Crop),a.comp&&(t.placedLayer.comp=a.comp),a.compInfo&&(t.placedLayer.compInfo={compID:a.compInfo.compID,originalCompID:a.compInfo.originalCompID}),a.filterFX&&(t.placedLayer.filter=mT(a.filterFX,e)),nt(e,r())},function(e,t){var r,n;pt(e,"soLD"),ht(e,4);var a=t.placedLayer;if(!a.id||typeof a.id!="string"||!/^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$/.test(a.id))throw new Error("Placed layer ID must be in a GUID format (example: 20953ddb-9391-11ec-b4f1-c15674f50bc4)");var i=G(G({Idnt:a.id,placed:(r=a.placed)!==null&&r!==void 0?r:a.id,PgNm:a.pageNumber||1,totalPages:a.totalPages||1},a.crop?{Crop:a.crop}:{}),{frameStep:a.frameStep||{numerator:0,denominator:600},duration:a.duration||{numerator:0,denominator:600},frameCount:a.frameCount||0,Annt:16,Type:Qo.indexOf(a.type),Trnf:a.transform,nonAffineTransform:(n=a.nonAffineTransform)!==null&&n!==void 0?n:a.transform,warp:mu(h3(a)),"Sz ":{_name:"",_classID:"Pnt ",Wdth:a.width||0,Hght:a.height||0},Rslt:a.resolution?Zt(a.resolution,"resolution"):{units:"Density",value:72}});if(a.filter&&(i.filterFX={_name:"",_classID:"filterFXStyle",enab:a.filter.enabled,validAtPosition:a.filter.validAtPosition,filterMaskEnable:a.filter.maskEnabled,filterMaskLinked:a.filter.maskLinked,filterMaskExtendWithWhite:a.filter.maskExtendWithWhite,filterFXList:a.filter.list.map(function(l){return gT(l)})}),a.warp&&Cd(a.warp)){var o=mu(a.warp);i.quiltWarp=o,i.warp={warpStyle:"warpStyle.warpNone",warpValue:o.warpValue,warpPerspective:o.warpPerspective,warpPerspectiveOther:o.warpPerspectiveOther,warpRotate:o.warpRotate,bounds:o.bounds,uOrder:o.uOrder,vOrder:o.vOrder}}else delete i.quiltWarp;a.comp&&(i.comp=a.comp),a.compInfo&&(i.compInfo=a.compInfo),Dt(e,"","null",i,i.quiltWarp?"quiltWarp":"warp")}),Jo("SoLE","SoLd"),ft("fxrp",Gt("referencePoint"),function(e,t){t.referencePoint={x:Nn(e),y:Nn(e)}},function(e,t){$n(e,t.referencePoint.x),$n(e,t.referencePoint.y)}),ft("Lr16",function(){return!1},function(e,t,r,n,a){dd(e,n,a)},function(e,t){}),ft("Lr32",function(){return!1},function(e,t,r,n,a){dd(e,n,a)},function(e,t){}),ft("LMsk",Gt("userMask"),function(e,t){t.userMask={colorSpace:Ir(e),opacity:We(e)/255};var r=Ze(e);if(r!==128)throw new Error("Invalid flag value");nt(e,1)},function(e,t){var r=t.userMask;zr(e,r.colorSpace),Oe(e,Jf(r.opacity,0,1)*255),Ge(e,128),Rt(e,1)}),ft("Patt",function(e){return!e},function(e,t,r){r()&&nt(e,r())},function(e,t){});function p3(e){var t=st(e),r=st(e),n=st(e),a=st(e);return{top:t,left:r,bottom:n,right:a}}function v3(e,t){ht(e,t.top),ht(e,t.left),ht(e,t.bottom),ht(e,t.right)}ft("Anno",function(e){return e.annotations!==void 0},function(e,t,r){var n=We(e),a=We(e);if(n!==2||a!==1)throw new Error("Invalid Anno version");for(var i=De(e),o=[],l=0;l<i;l++){De(e);var s=Wt(e),u=!!Ze(e);Ze(e),We(e);var c=p3(e),f=p3(e),d=Ir(e),h=Jn(e,2),y=Jn(e,2),p=Jn(e,2);De(e),Wt(e);var x=De(e),g=void 0;if(s==="txtA")x>=2&&We(e)===65279?g=fd(e,(x-2)/2):(e.offset-=2,g=fu(e,x)),g=g.replace(/\r/g,`
|
|
291
|
-
`);else if(s==="sndA")g=dr(e,x);else throw new Error("Unknown annotation type");o.push({type:s==="txtA"?"text":"sound",open:u,iconLocation:c,popupLocation:f,color:d,author:h,name:y,date:p,data:g})}t.annotations=o,nt(e,r())},function(e,t){var r=t.annotations;Oe(e,2),Oe(e,1),Je(e,r.length);for(var n=0,a=r;n<a.length;n++){var i=a[n],o=i.type==="sound";if(o&&!(i.data instanceof Uint8Array))throw new Error("Sound annotation data should be Uint8Array");if(!o&&typeof i.data!="string")throw new Error("Text annotation data should be string");var l=e.offset;Je(e,0),pt(e,o?"sndA":"txtA"),Ge(e,i.open?1:0),Ge(e,28),Oe(e,1),v3(e,i.iconLocation),v3(e,i.popupLocation),zr(e,i.color),Ai(e,i.author||"",2),Ai(e,i.name||"",2),Ai(e,i.date||"",2);var s=e.offset;Je(e,0),pt(e,o?"sndM":"txtC"),Je(e,0);var u=e.offset;if(o)ta(e,i.data);else{Oe(e,65279);for(var c=i.data.replace(/\n/g,"\r"),f=0;f<c.length;f++)Oe(e,c.charCodeAt(f))}e.view.setUint32(l,e.offset-l,!1),e.view.setUint32(s,e.offset-s,!1),e.view.setUint32(u-4,e.offset-u,!1)}});function m3(e){ft(e,function(t){var r=t;return!(!r.linkedFiles||!r.linkedFiles.length||e==="lnkE"&&!r.linkedFiles.some(function(n){return n.linkedFile}))},function(t,r,n,a){var i=r;for(i.linkedFiles=i.linkedFiles||[];n()>8;){var o=kd(t),l=t.offset,s=Wt(t),u=st(t),c=Jn(t,1),f=_r(t),d=Wt(t).trim(),h=Wt(t).trim(),y=kd(t),p=Ze(t),x=p?Tt(t):void 0,g=s==="liFE"?Tt(t):void 0,m={id:c,name:f};if(d&&(m.type=d),h&&(m.creator=h),x&&(m.descriptor={compInfo:{compID:x.compInfo.compID,originalCompID:x.compInfo.originalCompID}}),s==="liFE"&&u>3){var b=st(t),v=Ze(t),S=Ze(t),C=Ze(t),A=Ze(t),_=Nn(t),E=Math.floor(_),M=(_-E)*1e3;m.time=new Date(Date.UTC(b,v,S,C,A,E,M)).toISOString()}var z=s==="liFE"?kd(t):0;for(s==="liFA"&&nt(t,8),s==="liFD"&&(m.data=dr(t,y)),u>=5&&(m.childDocumentID=_r(t)),u>=6&&(m.assetModTime=Nn(t)),u>=7&&(m.assetLockedState=Ze(t)),s==="liFE"&&u===2&&(m.data=dr(t,z)),t.skipLinkedFilesData&&(m.data=void 0),e==="lnkE"&&(m.linkedFile={fileSize:z,name:(g==null?void 0:g["Nm "])||"",fullPath:(g==null?void 0:g.fullPath)||"",originalPath:(g==null?void 0:g.originalPath)||"",relativePath:(g==null?void 0:g.relPath)||""}),i.linkedFiles.push(m);o%4;)o++;t.offset=l+o}nt(t,n())},function(t,r){for(var n,a,i,o,l,s,u,c,f,d=r,h=0,y=d.linkedFiles;h<y.length;h++){var p=y[h];if(e==="lnkE"==!!p.linkedFile){var x=2;p.assetLockedState!=null?x=7:p.assetModTime!=null?x=6:p.childDocumentID!=null?x=5:e==="lnkE"&&(x=3),Sd(t,0);var g=t.offset;if(pt(t,e==="lnkE"?"liFE":p.data?"liFD":"liFA"),ht(t,x),!p.id||typeof p.id!="string"||!/^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$/.test(p.id))throw new Error("Linked file ID must be in a GUID format (example: 20953ddb-9391-11ec-b4f1-c15674f50bc4)");if(Ai(t,p.id,1),Ji(t,p.name||""),pt(t,p.type?"".concat(p.type," ").substring(0,4):" "),pt(t,p.creator?"".concat(p.creator," ").substring(0,4):"\0\0\0\0"),Sd(t,p.data?p.data.byteLength:0),p.descriptor&&p.descriptor.compInfo){var m={compInfo:{compID:p.descriptor.compInfo.compID,originalCompID:p.descriptor.compInfo.originalCompID}};Ge(t,1),Dt(t,"","null",m)}else Ge(t,0);if(e==="lnkE"){var m={descVersion:2,"Nm ":(a=(n=p.linkedFile)===null||n===void 0?void 0:n.name)!==null&&a!==void 0?a:"",fullPath:(o=(i=p.linkedFile)===null||i===void 0?void 0:i.fullPath)!==null&&o!==void 0?o:"",originalPath:(s=(l=p.linkedFile)===null||l===void 0?void 0:l.originalPath)!==null&&s!==void 0?s:"",relPath:(c=(u=p.linkedFile)===null||u===void 0?void 0:u.relativePath)!==null&&c!==void 0?c:""};Dt(t,"","ExternalFileLink",m);var b=p.time?new Date(p.time):new Date;ht(t,b.getUTCFullYear()),Ge(t,b.getUTCMonth()),Ge(t,b.getUTCDate()),Ge(t,b.getUTCHours()),Ge(t,b.getUTCMinutes()),$n(t,b.getUTCSeconds()+b.getUTCMilliseconds()/1e3)}p.data?ta(t,p.data):Sd(t,((f=p.linkedFile)===null||f===void 0?void 0:f.fileSize)||0),x>=5&&Ji(t,p.childDocumentID||""),x>=6&&$n(t,p.assetModTime||0),x>=7&&Ge(t,p.assetLockedState||0);var v=t.offset-g;for(t.view.setUint32(g-4,v,!1);v%4;)v++,Ge(t,0)}}})}m3("lnk2"),m3("lnkE"),Jo("lnkD","lnk2"),Jo("lnk3","lnk2"),ft("pths",Gt("pathList"),function(e,t){Tt(e,!0),t.pathList=[]},function(e,t){var r={pathList:[]};Dt(e,"","pathsDataClass",r)}),ft("lyvr",Gt("version"),function(e,t){return t.version=De(e)},function(e,t){return Je(e,t.version)}),ft("lfxs",function(){return!1},function(e,t,r){var n=De(e);if(n!==0)throw new Error("Invalid lfxs version");var a=Tt(e);t.effects=ts(a,!!e.logMissingFeatures),nt(e,r())},function(e,t,r,n){var a=es(t.effects,!!n.logMissingFeatures,!0);Je(e,0),Dt(e,"","null",a)});function Wr(e){return function(t){return!!t.adjustment&&t.adjustment.type===e}}ft("brit",Wr("brightness/contrast"),function(e,t,r){t.adjustment||(t.adjustment={type:"brightness/contrast",brightness:Et(e),contrast:Et(e),meanValue:Et(e),labColorOnly:!!Ze(e),useLegacy:!0}),nt(e,r())},function(e,t){var r,n=t.adjustment;Pt(e,n.brightness||0),Pt(e,n.contrast||0),Pt(e,(r=n.meanValue)!==null&&r!==void 0?r:127),Ge(e,n.labColorOnly?1:0),Rt(e,1)});function bu(e){var t=Et(e),r=Et(e),n=Et(e),a=Et(e),i=Et(e)/100;return{shadowInput:t,highlightInput:r,shadowOutput:n,highlightOutput:a,midtoneInput:i}}function fs(e,t){Pt(e,t.shadowInput),Pt(e,t.highlightInput),Pt(e,t.shadowOutput),Pt(e,t.highlightOutput),Pt(e,Math.round(t.midtoneInput*100))}ft("levl",Wr("levels"),function(e,t,r){if(We(e)!==2)throw new Error("Invalid levl version");t.adjustment=G(G({},t.adjustment),{type:"levels",rgb:bu(e),red:bu(e),green:bu(e),blue:bu(e)}),nt(e,r())},function(e,t){var r=t.adjustment,n={shadowInput:0,highlightInput:255,shadowOutput:0,highlightOutput:255,midtoneInput:1};Oe(e,2),fs(e,r.rgb||n),fs(e,r.red||n),fs(e,r.blue||n),fs(e,r.green||n);for(var a=0;a<59;a++)fs(e,n)});function yu(e){for(var t=We(e),r=[],n=0;n<t;n++){var a=Et(e),i=Et(e);r.push({input:i,output:a})}return r}function Si(e,t){Oe(e,t.length);for(var r=0,n=t;r<n.length;r++){var a=n[r];Oe(e,a.output),Oe(e,a.input)}}ft("curv",Wr("curves"),function(e,t,r){if(Ze(e),We(e)!==1)throw new Error("Invalid curv version");We(e);var n=We(e),a={type:"curves"};n&1&&(a.rgb=yu(e)),n&2&&(a.red=yu(e)),n&4&&(a.green=yu(e)),n&8&&(a.blue=yu(e)),t.adjustment=G(G({},t.adjustment),a),nt(e,r())},function(e,t){var r=t.adjustment,n=r.rgb,a=r.red,i=r.green,o=r.blue,l=0,s=0;n&&n.length&&(l|=1,s++),a&&a.length&&(l|=2,s++),i&&i.length&&(l|=4,s++),o&&o.length&&(l|=8,s++),Ge(e,0),Oe(e,1),Oe(e,0),Oe(e,l),n&&n.length&&Si(e,n),a&&a.length&&Si(e,a),i&&i.length&&Si(e,i),o&&o.length&&Si(e,o),pt(e,"Crv "),Oe(e,4),Oe(e,0),Oe(e,s),n&&n.length&&(Oe(e,0),Si(e,n)),a&&a.length&&(Oe(e,1),Si(e,a)),i&&i.length&&(Oe(e,2),Si(e,i)),o&&o.length&&(Oe(e,3),Si(e,o))}),ft("expA",Wr("exposure"),function(e,t,r){if(We(e)!==1)throw new Error("Invalid expA version");t.adjustment=G(G({},t.adjustment),{type:"exposure",exposure:Yn(e),offset:Yn(e),gamma:Yn(e)}),nt(e,r())},function(e,t){var r=t.adjustment;Oe(e,1),Qn(e,r.exposure),Qn(e,r.offset),Qn(e,r.gamma),Rt(e,2)}),ft("vibA",Wr("vibrance"),function(e,t,r){var n=Tt(e);t.adjustment={type:"vibrance"},n.vibrance!==void 0&&(t.adjustment.vibrance=n.vibrance),n.Strt!==void 0&&(t.adjustment.saturation=n.Strt),nt(e,r())},function(e,t){var r=t.adjustment,n={};r.vibrance!==void 0&&(n.vibrance=r.vibrance),r.saturation!==void 0&&(n.Strt=r.saturation),Dt(e,"","null",n)});function Yi(e){return{a:Et(e),b:Et(e),c:Et(e),d:Et(e),hue:Et(e),saturation:Et(e),lightness:Et(e)}}function Zi(e,t){var r=t||{};Pt(e,r.a||0),Pt(e,r.b||0),Pt(e,r.c||0),Pt(e,r.d||0),Pt(e,r.hue||0),Pt(e,r.saturation||0),Pt(e,r.lightness||0)}ft("hue2",Wr("hue/saturation"),function(e,t,r){if(We(e)!==2)throw new Error("Invalid hue2 version");t.adjustment=G(G({},t.adjustment),{type:"hue/saturation",master:Yi(e),reds:Yi(e),yellows:Yi(e),greens:Yi(e),cyans:Yi(e),blues:Yi(e),magentas:Yi(e)}),nt(e,r())},function(e,t){var r=t.adjustment;Oe(e,2),Zi(e,r.master),Zi(e,r.reds),Zi(e,r.yellows),Zi(e,r.greens),Zi(e,r.cyans),Zi(e,r.blues),Zi(e,r.magentas)});function Ed(e){return{cyanRed:Et(e),magentaGreen:Et(e),yellowBlue:Et(e)}}function Td(e,t){Pt(e,t.cyanRed||0),Pt(e,t.magentaGreen||0),Pt(e,t.yellowBlue||0)}ft("blnc",Wr("color balance"),function(e,t,r){t.adjustment={type:"color balance",shadows:Ed(e),midtones:Ed(e),highlights:Ed(e),preserveLuminosity:!!Ze(e)},nt(e,r())},function(e,t){var r=t.adjustment;Td(e,r.shadows||{}),Td(e,r.midtones||{}),Td(e,r.highlights||{}),Ge(e,r.preserveLuminosity?1:0),Rt(e,1)}),ft("blwh",Wr("black & white"),function(e,t,r){var n=Tt(e);t.adjustment={type:"black & white",reds:n["Rd "],yellows:n.Yllw,greens:n["Grn "],cyans:n["Cyn "],blues:n["Bl "],magentas:n.Mgnt,useTint:!!n.useTint,presetKind:n.bwPresetKind,presetFileName:n.blackAndWhitePresetFileName},n.tintColor!==void 0&&(t.adjustment.tintColor=Kn(n.tintColor)),nt(e,r())},function(e,t){var r=t.adjustment,n={"Rd ":r.reds||0,Yllw:r.yellows||0,"Grn ":r.greens||0,"Cyn ":r.cyans||0,"Bl ":r.blues||0,Mgnt:r.magentas||0,useTint:!!r.useTint,tintColor:Xn(r.tintColor),bwPresetKind:r.presetKind||0,blackAndWhitePresetFileName:r.presetFileName||""};Dt(e,"","null",n)}),ft("phfl",Wr("photo filter"),function(e,t,r){var n=We(e);if(n!==2&&n!==3)throw new Error("Invalid phfl version");var a;n===2?a=Ir(e):a={l:st(e)/100,a:st(e)/100,b:st(e)/100},t.adjustment={type:"photo filter",color:a,density:De(e)/100,preserveLuminosity:!!Ze(e)},nt(e,r())},function(e,t){var r=t.adjustment;Oe(e,2),zr(e,r.color||{l:0,a:0,b:0}),Je(e,(r.density||0)*100),Ge(e,r.preserveLuminosity?1:0),Rt(e,3)});function xu(e){var t=Et(e),r=Et(e),n=Et(e);nt(e,2);var a=Et(e);return{red:t,green:r,blue:n,constant:a}}function ds(e,t){var r=t||{};Pt(e,r.red),Pt(e,r.green),Pt(e,r.blue),Rt(e,2),Pt(e,r.constant)}ft("mixr",Wr("channel mixer"),function(e,t,r){if(We(e)!==1)throw new Error("Invalid mixr version");var n=t.adjustment=G(G({},t.adjustment),{type:"channel mixer",monochrome:!!We(e)});n.monochrome||(n.red=xu(e),n.green=xu(e),n.blue=xu(e)),n.gray=xu(e),nt(e,r())},function(e,t){var r=t.adjustment;Oe(e,1),Oe(e,r.monochrome?1:0),r.monochrome?(ds(e,r.gray),Rt(e,3*5*2)):(ds(e,r.red),ds(e,r.green),ds(e,r.blue),ds(e,r.gray))});var g3=vt("colorLookupType","3DLUT",{"3dlut":"3DLUT",abstractProfile:"abstractProfile",deviceLinkProfile:"deviceLinkProfile"}),b3=vt("LUTFormatType","look",{look:"LUTFormatLOOK",cube:"LUTFormatCUBE","3dl":"LUTFormat3DL"}),_u=vt("colorLookupOrder","rgb",{rgb:"rgbOrder",bgr:"bgrOrder"});ft("clrL",Wr("color lookup"),function(e,t,r){if(We(e)!==1)throw new Error("Invalid clrL version");var n=Tt(e);t.adjustment={type:"color lookup"};var a=t.adjustment;n.lookupType!==void 0&&(a.lookupType=g3.decode(n.lookupType)),n["Nm "]!==void 0&&(a.name=n["Nm "]),n.Dthr!==void 0&&(a.dither=n.Dthr),n.profile!==void 0&&(a.profile=n.profile),n.LUTFormat!==void 0&&(a.lutFormat=b3.decode(n.LUTFormat)),n.dataOrder!==void 0&&(a.dataOrder=_u.decode(n.dataOrder)),n.tableOrder!==void 0&&(a.tableOrder=_u.decode(n.tableOrder)),n.LUT3DFileData!==void 0&&(a.lut3DFileData=n.LUT3DFileData),n.LUT3DFileName!==void 0&&(a.lut3DFileName=n.LUT3DFileName),nt(e,r())},function(e,t){var r=t.adjustment,n={};r.lookupType!==void 0&&(n.lookupType=g3.encode(r.lookupType)),r.name!==void 0&&(n["Nm "]=r.name),r.dither!==void 0&&(n.Dthr=r.dither),r.profile!==void 0&&(n.profile=r.profile),r.lutFormat!==void 0&&(n.LUTFormat=b3.encode(r.lutFormat)),r.dataOrder!==void 0&&(n.dataOrder=_u.encode(r.dataOrder)),r.tableOrder!==void 0&&(n.tableOrder=_u.encode(r.tableOrder)),r.lut3DFileData!==void 0&&(n.LUT3DFileData=r.lut3DFileData),r.lut3DFileName!==void 0&&(n.LUT3DFileName=r.lut3DFileName),Oe(e,1),Dt(e,"","null",n)}),ft("nvrt",Wr("invert"),function(e,t,r){t.adjustment={type:"invert"},nt(e,r())},function(){}),ft("post",Wr("posterize"),function(e,t,r){t.adjustment={type:"posterize",levels:We(e)},nt(e,r())},function(e,t){var r,n=t.adjustment;Oe(e,(r=n.levels)!==null&&r!==void 0?r:4),Rt(e,2)}),ft("thrs",Wr("threshold"),function(e,t,r){t.adjustment={type:"threshold",level:We(e)},nt(e,r())},function(e,t){var r,n=t.adjustment;Oe(e,(r=n.level)!==null&&r!==void 0?r:128),Rt(e,2)});var y3=["","","","rgb","hsb","","lab"];ft("grdm",Wr("gradient map"),function(e,t,r){var n=We(e);if(n!==1&&n!==3)throw new Error("Invalid grdm version");var a={type:"gradient map",gradientType:"solid"};a.reverse=!!Ze(e),a.dither=!!Ze(e);var i=!!Ze(e);if(e.offset--,i){var o=Wt(e);a.method=Go.decode(o)}a.name=_r(e),a.colorStops=[],a.opacityStops=[];for(var l=We(e),s=0;s<l;s++)a.colorStops.push({location:De(e),midpoint:De(e)/100,color:Ir(e)}),nt(e,2);for(var u=We(e),s=0;s<u;s++)a.opacityStops.push({location:De(e),midpoint:De(e)/100,opacity:We(e)/255});var c=We(e);if(c!==2)throw new Error("Invalid grdm expansion count");var f=We(e);a.smoothness=f/4096;var d=We(e);if(d!==32)throw new Error("Invalid grdm length");a.gradientType=We(e)?"noise":"solid",a.randomSeed=De(e),a.addTransparency=!!We(e),a.restrictColors=!!We(e),a.roughness=De(e)/4096,a.colorModel=y3[We(e)]||"rgb",a.min=[We(e)/32768,We(e)/32768,We(e)/32768,We(e)/32768],a.max=[We(e)/32768,We(e)/32768,We(e)/32768,We(e)/32768],nt(e,r());for(var h=0,y=a.colorStops;h<y.length;h++){var p=y[h];p.location/=f}for(var x=0,g=a.opacityStops;x<g.length;x++){var p=g[x];p.location/=f}t.adjustment=a},function(e,t){var r,n,a,i=t.adjustment;Oe(e,i.method!==void 0?3:1),Ge(e,i.reverse?1:0),Ge(e,i.dither?1:0),i.method!==void 0&&pt(e,Go.encode(i.method)),Ji(e,i.name||""),Oe(e,i.colorStops&&i.colorStops.length||0);for(var o=Math.round(((r=i.smoothness)!==null&&r!==void 0?r:1)*4096),l=0,s=i.colorStops||[];l<s.length;l++){var u=s[l];Je(e,Math.round(u.location*o)),Je(e,Math.round(u.midpoint*100)),zr(e,u.color),Rt(e,2)}Oe(e,i.opacityStops&&i.opacityStops.length||0);for(var c=0,f=i.opacityStops||[];c<f.length;c++){var u=f[c];Je(e,Math.round(u.location*o)),Je(e,Math.round(u.midpoint*100)),Oe(e,Math.round(u.opacity*255))}Oe(e,2),Oe(e,o),Oe(e,32),Oe(e,i.gradientType==="noise"?1:0),Je(e,i.randomSeed||0),Oe(e,i.addTransparency?1:0),Oe(e,i.restrictColors?1:0),Je(e,Math.round(((n=i.roughness)!==null&&n!==void 0?n:1)*4096));var d=y3.indexOf((a=i.colorModel)!==null&&a!==void 0?a:"rgb");Oe(e,d===-1?3:d);for(var h=0;h<4;h++)Oe(e,Math.round((i.min&&i.min[h]||0)*32768));for(var h=0;h<4;h++)Oe(e,Math.round((i.max&&i.max[h]||0)*32768));Rt(e,4)});function Za(e){return{c:Et(e),m:Et(e),y:Et(e),k:Et(e)}}function Ja(e,t){var r=t||{};Pt(e,r.c),Pt(e,r.m),Pt(e,r.y),Pt(e,r.k)}ft("selc",Wr("selective color"),function(e,t){if(We(e)!==1)throw new Error("Invalid selc version");var r=We(e)?"absolute":"relative";nt(e,8),t.adjustment={type:"selective color",mode:r,reds:Za(e),yellows:Za(e),greens:Za(e),cyans:Za(e),blues:Za(e),magentas:Za(e),whites:Za(e),neutrals:Za(e),blacks:Za(e)}},function(e,t){var r=t.adjustment;Oe(e,1),Oe(e,r.mode==="absolute"?1:0),Rt(e,8),Ja(e,r.reds),Ja(e,r.yellows),Ja(e,r.greens),Ja(e,r.cyans),Ja(e,r.blues),Ja(e,r.magentas),Ja(e,r.whites),Ja(e,r.neutrals),Ja(e,r.blacks)}),ft("CgEd",function(e){var t=e.adjustment;return t?t.type==="brightness/contrast"&&!t.useLegacy||(t.type==="levels"||t.type==="curves"||t.type==="exposure"||t.type==="channel mixer"||t.type==="hue/saturation")&&t.presetFileName!==void 0:!1},function(e,t,r){var n=Tt(e);if(n.Vrsn!==1)throw new Error("Invalid CgEd version");"presetFileName"in n?t.adjustment=G(G({},t.adjustment),{presetKind:n.presetKind,presetFileName:n.presetFileName}):"curvesPresetFileName"in n?t.adjustment=G(G({},t.adjustment),{presetKind:n.curvesPresetKind,presetFileName:n.curvesPresetFileName}):"mixerPresetFileName"in n?t.adjustment=G(G({},t.adjustment),{presetKind:n.mixerPresetKind,presetFileName:n.mixerPresetFileName}):t.adjustment={type:"brightness/contrast",brightness:n.Brgh,contrast:n.Cntr,meanValue:n.means,useLegacy:!!n.useLegacy,labColorOnly:!!n["Lab "],auto:!!n.Auto},nt(e,r())},function(e,t){var r,n,a,i,o=t.adjustment;if(o.type==="levels"||o.type==="exposure"||o.type==="hue/saturation"){var l={Vrsn:1,presetKind:(r=o.presetKind)!==null&&r!==void 0?r:1,presetFileName:o.presetFileName||""};Dt(e,"","null",l)}else if(o.type==="curves"){var l={Vrsn:1,curvesPresetKind:(n=o.presetKind)!==null&&n!==void 0?n:1,curvesPresetFileName:o.presetFileName||""};Dt(e,"","null",l)}else if(o.type==="channel mixer"){var l={Vrsn:1,mixerPresetKind:(a=o.presetKind)!==null&&a!==void 0?a:1,mixerPresetFileName:o.presetFileName||""};Dt(e,"","null",l)}else if(o.type==="brightness/contrast"){var l={Vrsn:1,Brgh:o.brightness||0,Cntr:o.contrast||0,means:(i=o.meanValue)!==null&&i!==void 0?i:127,"Lab ":!!o.labColorOnly,useLegacy:!!o.useLegacy,Auto:!!o.auto};Dt(e,"","null",l)}else throw new Error("Unhandled CgEd case")});function bT(e){var t=[];function r(n){var a;if(n.children)for(var i=0,o=n.children;i<o.length;i++){var l=o[i];((a=l.text)===null||a===void 0?void 0:a.index)!==void 0&&(t[l.text.index]=l),r(l)}}return r(e),t}ft("Txt2",Gt("engineData"),function(e,t,r,n){var a=dr(e,r());t.engineData=r4(a);var i=bT(n),o=Zg(a),l=cT(o),s=l.ResourceDict.TextFrameSet;if(s)for(var u=0;u<s.length;u++){var c=i[u];s[u].path&&(c!=null&&c.text)&&(c.text.textPath=s[u].path)}},function(e,t){var r=t4(t.engineData);ta(e,r)}),ft("FEid",Gt("filterEffectsMasks"),function(e,t,r){var n=st(e);if(n<1||n>3)throw new Error("Invalid filterEffects version ".concat(n));for(t.filterEffectsMasks=[];r()>8;){if(De(e))throw new Error("filterEffects: 64 bit length is not supported");var a=De(e),i=e.offset+a,o=Jn(e,1),l=st(e);if(l!==1)throw new Error("Invalid filterEffect version ".concat(l));if(De(e))throw new Error("filterEffect: 64 bit length is not supported");De(e);for(var s=st(e),u=st(e),c=st(e),f=st(e),d=st(e),h=st(e),y=[],p=0;p<h+2;p++){var x=st(e);if(x){if(De(e))throw new Error("filterEffect: 64 bit length is not supported");var g=De(e);if(!g)throw new Error("filterEffect: Empty channel");var m=We(e),b=dr(e,g-2);y.push({compressionMode:m,data:b})}else y.push(void 0)}if(t.filterEffectsMasks.push({id:o,top:s,left:u,bottom:c,right:f,depth:d,channels:y}),e.offset<i&&Ze(e)){var v=st(e),S=st(e),C=st(e),A=st(e);if(De(e))throw new Error("filterEffect: 64 bit length is not supported");var _=De(e),m=We(e),b=dr(e,_-2);t.filterEffectsMasks[t.filterEffectsMasks.length-1].extra={top:v,left:S,bottom:C,right:A,compressionMode:m,data:b}}e.offset=i;for(var E=a;E%4;)e.offset++,E++}},function(e,t){var r;ht(e,3);for(var n=0,a=t.filterEffectsMasks;n<a.length;n++){var i=a[n];Je(e,0),Je(e,0);var o=e.offset;Ai(e,i.id,1),ht(e,1),Je(e,0),Je(e,0);var l=e.offset;ht(e,i.top),ht(e,i.left),ht(e,i.bottom),ht(e,i.right),ht(e,i.depth);var s=Math.max(0,i.channels.length-2);ht(e,s);for(var u=0;u<s+2;u++){var c=i.channels[u];ht(e,c?1:0),c&&(Je(e,0),Je(e,c.data.length+2),Oe(e,c.compressionMode),ta(e,c.data))}e.view.setUint32(l-4,e.offset-l,!1);var f=(r=t.filterEffectsMasks[t.filterEffectsMasks.length-1])===null||r===void 0?void 0:r.extra;f&&(Ge(e,1),ht(e,f.top),ht(e,f.left),ht(e,f.bottom),ht(e,f.right),Je(e,0),Je(e,f.data.byteLength+2),Oe(e,f.compressionMode),ta(e,f.data));var d=e.offset-o;for(e.view.setUint32(o-4,d,!1);d%4;)Rt(e,1),d++}}),Jo("FXid","FEid"),ft("FMsk",Gt("filterMask"),function(e,t){t.filterMask={colorSpace:Ir(e),opacity:We(e)/255}},function(e,t){var r;zr(e,t.filterMask.colorSpace),Oe(e,Jf((r=t.filterMask.opacity)!==null&&r!==void 0?r:1,0,1)*255)}),ft("artd",function(e){return e.artboards!==void 0},function(e,t,r){var n=Tt(e);t.artboards={count:n["Cnt "],autoExpandOffset:{horizontal:n.autoExpandOffset.Hrzn,vertical:n.autoExpandOffset.Vrtc},origin:{horizontal:n.origin.Hrzn,vertical:n.origin.Vrtc},autoExpandEnabled:n.autoExpandEnabled,autoNestEnabled:n.autoNestEnabled,autoPositionEnabled:n.autoPositionEnabled,shrinkwrapOnSaveEnabled:!!n.shrinkwrapOnSaveEnabled,docDefaultNewArtboardBackgroundColor:Kn(n.docDefaultNewArtboardBackgroundColor),docDefaultNewArtboardBackgroundType:n.docDefaultNewArtboardBackgroundType},nt(e,r())},function(e,t){var r,n,a,i,o,l=t.artboards,s={"Cnt ":l.count,autoExpandOffset:l.autoExpandOffset?{Hrzn:l.autoExpandOffset.horizontal,Vrtc:l.autoExpandOffset.vertical}:{Hrzn:0,Vrtc:0},origin:l.origin?{Hrzn:l.origin.horizontal,Vrtc:l.origin.vertical}:{Hrzn:0,Vrtc:0},autoExpandEnabled:(r=l.autoExpandEnabled)!==null&&r!==void 0?r:!0,autoNestEnabled:(n=l.autoNestEnabled)!==null&&n!==void 0?n:!0,autoPositionEnabled:(a=l.autoPositionEnabled)!==null&&a!==void 0?a:!0,shrinkwrapOnSaveEnabled:(i=l.shrinkwrapOnSaveEnabled)!==null&&i!==void 0?i:!0,docDefaultNewArtboardBackgroundColor:Xn(l.docDefaultNewArtboardBackgroundColor),docDefaultNewArtboardBackgroundType:(o=l.docDefaultNewArtboardBackgroundType)!==null&&o!==void 0?o:1};Dt(e,"","null",s,"artd")});function x3(e){return Object.keys(e).map(function(t){return e[t]}).some(function(t){return Array.isArray(t)&&t.length>1})}ft("lfx2",function(e){return e.effects!==void 0&&!x3(e.effects)},function(e,t,r){var n=De(e);if(n!==0)throw new Error("Invalid lfx2 version");var a=Tt(e);t.effects=ts(a,!!e.logMissingFeatures),nt(e,r())},function(e,t,r,n){var a=es(t.effects,!!n.logMissingFeatures,!0);Je(e,0),Dt(e,"","null",a)}),ft("cinf",Gt("compositorUsed"),function(e,t,r){var n=Tt(e);function a(i){return i.split(".")[1]}t.compositorUsed={description:n.description,reason:n.reason,engine:a(n.Engn)},n.Vrsn&&(t.compositorUsed.version=n.Vrsn),n.psVersion&&(t.compositorUsed.photoshopVersion=n.psVersion),n.enableCompCore&&(t.compositorUsed.enableCompCore=a(n.enableCompCore)),n.enableCompCoreGPU&&(t.compositorUsed.enableCompCoreGPU=a(n.enableCompCoreGPU)),n.enableCompCoreThreads&&(t.compositorUsed.enableCompCoreThreads=a(n.enableCompCoreThreads)),n.compCoreSupport&&(t.compositorUsed.compCoreSupport=a(n.compCoreSupport)),n.compCoreGPUSupport&&(t.compositorUsed.compCoreGPUSupport=a(n.compCoreGPUSupport)),nt(e,r())},function(e,t){var r=t.compositorUsed,n={Vrsn:r.version||{major:1,minor:0,fix:0}};r.photoshopVersion&&(n.psVersion=r.photoshopVersion),n.description=r.description,n.reason=r.reason,n.Engn="Engn.".concat(r.engine),r.enableCompCore&&(n.enableCompCore="enable.".concat(r.enableCompCore)),r.enableCompCoreGPU&&(n.enableCompCoreGPU="enable.".concat(r.enableCompCoreGPU)),r.enableCompCoreThreads&&(n.enableCompCoreThreads="enable.".concat(r.enableCompCoreThreads)),r.compCoreSupport&&(n.compCoreSupport="reason.".concat(r.compCoreSupport)),r.compCoreGPUSupport&&(n.compCoreGPUSupport="reason.".concat(r.compCoreGPUSupport)),Dt(e,"","null",n)}),ft("extn",function(e){return e._extn!==void 0},function(e,t){Tt(e)},function(e,t){}),ft("iOpa",Gt("fillOpacity"),function(e,t){t.fillOpacity=Ze(e)/255,nt(e,3)},function(e,t){Ge(e,t.fillOpacity*255),Rt(e,3)}),ft("brst",Gt("channelBlendingRestrictions"),function(e,t,r){for(t.channelBlendingRestrictions=[];r()>4;)t.channelBlendingRestrictions.push(st(e))},function(e,t){for(var r=0,n=t.channelBlendingRestrictions;r<n.length;r++){var a=n[r];ht(e,a)}}),ft("tsly",Gt("transparencyShapesLayer"),function(e,t){t.transparencyShapesLayer=!!Ze(e),nt(e,3)},function(e,t){Ge(e,t.transparencyShapesLayer?1:0),Rt(e,3)});var Ci=function(){return Ci=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},Ci.apply(this,arguments)};function _3(e){e===void 0&&(e=4096);var t=new ArrayBuffer(e),r=new DataView(t),n=0;return{buffer:t,view:r,offset:n,tempBuffer:void 0}}function yT(e){return e.buffer.slice(0,e.offset)}function xT(e){return new Uint8Array(e.buffer,0,e.offset)}function Ge(e,t){var r=Qa(e,1);e.view.setUint8(r,t)}function Pt(e,t){var r=Qa(e,2);e.view.setInt16(r,t,!1)}function Oe(e,t){var r=Qa(e,2);e.view.setUint16(r,t,!1)}function _T(e,t){var r=Qa(e,2);e.view.setUint16(r,t,!0)}function ht(e,t){var r=Qa(e,4);e.view.setInt32(r,t,!1)}function w3(e,t){var r=Qa(e,4);e.view.setInt32(r,t,!0)}function Je(e,t){var r=Qa(e,4);e.view.setUint32(r,t,!1)}function Qn(e,t){var r=Qa(e,4);e.view.setFloat32(r,t,!1)}function $n(e,t){var r=Qa(e,8);e.view.setFloat64(r,t,!1)}function An(e,t){ht(e,t*65536)}function ea(e,t){ht(e,t*(1<<24))}function ta(e,t){if(t){T3(e,e.offset+t.length);var r=new Uint8Array(e.buffer);r.set(t,e.offset),e.offset+=t.length}}function Rt(e,t){for(var r=0;r<t;r++)Ge(e,0)}function pt(e,t){if(t.length!==4)throw new Error("Invalid signature: '".concat(t,"'"));for(var r=0;r<4;r++)Ge(e,t.charCodeAt(r))}function wT(e,t){for(var r=0;r<t.length;r++)Ge(e,t.charCodeAt(r))}function Ai(e,t,r){var n=t.length;if(n>255)throw new Error("String too long");Ge(e,n);for(var a=0;a<n;a++){var i=t.charCodeAt(a);Ge(e,i<128?i:63)}for(;++n%r;)Ge(e,0)}function kT(e,t){for(var r=0;r<t.length;r++)Oe(e,t.charCodeAt(r))}function ST(e,t){for(var r=0;r<t.length;r++)_T(e,t.charCodeAt(r))}function En(e,t){Je(e,t.length),kT(e,t)}function Ji(e,t){Je(e,t.length+1);for(var r=0;r<t.length;r++)Oe(e,t.charCodeAt(r));Oe(e,0)}function k3(e){e===void 0&&(e=[]);for(var t=0,r=0,n=e;r<n.length;r++){var a=n[r];if(a.canvas||a.imageData){var i=Md(a),o=i.width,l=i.height;t=Math.max(t,2*l+2*o*l)}a.children&&(t=Math.max(t,k3(a.children)))}return t}function $r(e,t,r,n,a){n===void 0&&(n=!1),a===void 0&&(a=!1),a&&Je(e,0);var i=e.offset;Je(e,0),r();for(var o=e.offset-i-4,l=o;l%t;)Ge(e,0),l++;n&&(o=l),e.view.setUint32(i,o,!1)}function S3(e){var t;(t=e.children)===null||t===void 0||t.forEach(S3);var r=e.imageData;if(r&&(r.data instanceof Uint32Array||r.data instanceof Uint16Array))throw new Error("imageData has incorrect bitDepth");if("mask"in e&&e.mask){var n=e.mask.imageData;if(n&&(n.data instanceof Uint32Array||n.data instanceof Uint16Array))throw new Error("mask imageData has incorrect bitDepth")}}function C3(e,t,r){var n;if(r===void 0&&(r={}),!(+t.width>0&&+t.height>0))throw new Error("Invalid document size");if((t.width>3e4||t.height>3e4)&&!r.psb)throw new Error("Document size is too large (max is 30000x30000, use PSB format instead)");var a=(n=t.bitsPerChannel)!==null&&n!==void 0?n:8;if(a!==8)throw new Error("bitsPerChannel other than 8 are not supported for writing");S3(t);var i=Ci({},t.imageResources),o=Ci(Ci({},r),{layerIds:new Set,layerToId:new Map});o.generateThumbnail&&(i.thumbnail=DT(t));var l=t.imageData;if(!l&&t.canvas&&(l=t.canvas.getContext("2d").getImageData(0,0,t.canvas.width,t.canvas.height)),l&&(t.width!==l.width||t.height!==l.height))throw new Error("Document canvas must have the same size as document");var s=!!l&&Q2(l),u=Math.max(k3(t.children),4*2*t.width*t.height+2*t.height);e.tempBuffer=new Uint8Array(u),pt(e,"8BPS"),Oe(e,r.psb?2:1),Rt(e,6),Oe(e,s?4:3),Je(e,t.height),Je(e,t.width),Oe(e,a),Oe(e,3),$r(e,1,function(){var S,C,A;if(t.palette){for(var _=0;_<256;_++)Ge(e,((S=t.palette[_])===null||S===void 0?void 0:S.r)||0);for(var _=0;_<256;_++)Ge(e,((C=t.palette[_])===null||C===void 0?void 0:C.g)||0);for(var _=0;_<256;_++)Ge(e,((A=t.palette[_])===null||A===void 0?void 0:A.b)||0)}});var c=[];E3(c,t.children),c.length||c.push({}),i.layersGroup=c.map(function(S){return S.linkGroup||0}),i.layerGroupsEnabledId=c.map(function(S){return S.linkGroupEnabled==!1?0:1}),$r(e,1,function(){for(var S=function(E){for(var M=E.has(i),z=M===!1?0:M===!0?1:M,N=function($){pt(e,"8BIM"),Oe(e,E.key),Ai(e,"",2),$r(e,2,function(){return E.write(e,i,$)})},R=0;R<z;R++)N(R)},C=0,A=kg;C<A.length;C++){var _=A[C];S(_)}}),$r(e,2,function(){CT(e,c,t,s,o),TT(e,t.globalLayerMaskInfo),A3(e,t,t,o)},void 0,!!o.psb);var f=s?[0,1,2,3]:[0,1,2],d=l?l.width:t.width,h=l?l.height:t.height,y={data:new Uint8Array(d*h*4),width:d,height:h};Oe(e,1);{if(l&&y.data.set(new Uint8Array(l.data.buffer,l.data.byteOffset,l.data.byteLength)),s)for(var p=y.width*y.height*4,x=y.data,g=0;g<p;g+=4){var m=x[g+3];if(m!=0&&m!=255){var b=m/255,v=255*(1-b);x[g+0]=x[g+0]*b+v,x[g+1]=x[g+1]*b+v,x[g+2]=x[g+2]*b+v}}ta(e,Qf(e.tempBuffer,y,f,!!r.psb))}}function CT(e,t,r,n,a){$r(e,4,function(){var i;Pt(e,n?-t.length:t.length);for(var o=t.map(function(x,g){return IT(e.tempBuffer,x,g===0,a)}),l=function(x){var g=x.layer,m=x.top,b=x.left,v=x.bottom,S=x.right,C=x.channels;ht(e,m),ht(e,b),ht(e,v),ht(e,S),Oe(e,C.length);for(var A=0,_=C;A<_.length;A++){var E=_[A];Pt(e,E.channelId),a.psb&&Je(e,0),Je(e,E.length)}pt(e,"8BIM"),pt(e,Z0[g.blendMode]||"norm"),Ge(e,Math.round(Jf((i=g.opacity)!==null&&i!==void 0?i:1,0,1)*255)),Ge(e,g.clipping?1:0);var M=8;g.transparencyProtected&&(M|=1),g.hidden&&(M|=2),(g.vectorMask||g.sectionDivider&&g.sectionDivider.type!==0||g.adjustment)&&(M|=16),g.effectsOpen&&(M|=32),Ge(e,M),Ge(e,0),$r(e,1,function(){AT(e,g,x),ET(e,g),Ai(e,(g.name||"").substring(0,255),4),A3(e,g,r,a)})},s=0,u=o;s<u.length;s++){var c=u[s];l(c)}for(var f=0,d=o;f<d.length;f++)for(var c=d[f],h=0,y=c.channels;h<y.length;h++){var p=y[h];Oe(e,p.compression),p.buffer&&ta(e,p.buffer)}},!0,a.psb)}function AT(e,t,r){var n=t.mask,a=t.realMask;$r(e,1,function(){if(!(!n&&!a)){var i=0,o=0,l=0;n&&(n.userMaskDensity!==void 0&&(i|=1),n.userMaskFeather!==void 0&&(i|=2),n.vectorMaskDensity!==void 0&&(i|=4),n.vectorMaskFeather!==void 0&&(i|=8),n.disabled&&(o|=2),n.positionRelativeToLayer&&(o|=1),n.fromVectorData&&(o|=8),i&&(o|=16));var s=r.mask||{};if(ht(e,s.top||0),ht(e,s.left||0),ht(e,s.bottom||0),ht(e,s.right||0),Ge(e,n&&n.defaultColor||0),Ge(e,o),a){a.disabled&&(l|=2),a.positionRelativeToLayer&&(l|=1),a.fromVectorData&&(l|=8);var u=r.realMask||{};Ge(e,l),Ge(e,a.defaultColor||0),ht(e,u.top||0),ht(e,u.left||0),ht(e,u.bottom||0),ht(e,u.right||0)}i&&n&&(Ge(e,i),n.userMaskDensity!==void 0&&Ge(e,Math.round(n.userMaskDensity*255)),n.userMaskFeather!==void 0&&$n(e,n.userMaskFeather),n.vectorMaskDensity!==void 0&&Ge(e,Math.round(n.vectorMaskDensity*255)),n.vectorMaskFeather!==void 0&&$n(e,n.vectorMaskFeather)),Rt(e,2)}})}function wu(e,t){Ge(e,t[0]),Ge(e,t[1]),Ge(e,t[2]),Ge(e,t[3])}function ET(e,t){$r(e,1,function(){var r=t.blendingRanges;if(r){wu(e,r.compositeGrayBlendSource),wu(e,r.compositeGraphBlendDestinationRange);for(var n=0,a=r.ranges;n<a.length;n++){var i=a[n];wu(e,i.sourceRange),wu(e,i.destRange)}}})}function TT(e,t){$r(e,1,function(){t&&(Oe(e,t.overlayColorSpace),Oe(e,t.colorSpace1),Oe(e,t.colorSpace2),Oe(e,t.colorSpace3),Oe(e,t.colorSpace4),Oe(e,t.opacity*255),Ge(e,t.kind),Rt(e,3))})}function A3(e,t,r,n){for(var a=function(s){var u=s.key;if(u==="Txt2"&&n.invalidateTextLayers)return"continue";if(u==="vmsk"&&n.psb&&(u="vsms"),s.has(t)){var c=n.psb&&K2.indexOf(u)!==-1,f=u!=="Txt2"&&u!=="cinf"&&u!=="extn"&&u!=="CAI "&&u!=="OCIO",d=u==="Txt2"||u==="luni"||u==="vmsk"||u==="artb"||u==="artd"||u==="vogk"||u==="SoLd"||u==="lnk2"||u==="vscg"||u==="vsms"||u==="GdFl"||u==="lmfx"||u==="lrFX"||u==="cinf"||u==="PlLd"||u==="Anno"||u==="CAI "||u==="OCIO"||u==="GenI"||u==="FEid"||u==="curv"||u==="CgEd"||u==="vibA"||u==="blwh"||u==="grdm";pt(e,c?"8B64":"8BIM"),pt(e,u),$r(e,d?4:2,function(){s.write(e,t,r,n)},f,c)}},i=0,o=s3;i<o.length;i++){var l=o[i];a(l)}}function E3(e,t){if(t)for(var r=0,n=t;r<n.length;r++){var a=n[r];if(a.children&&a.canvas)throw new Error("Invalid layer, cannot have both 'canvas' and 'children' properties");if(a.children&&a.imageData)throw new Error("Invalid layer, cannot have both 'imageData' and 'children' properties");a.children?(e.push({name:"</Layer group>",sectionDivider:{type:3}}),E3(e,a.children),e.push(Ci(Ci({},a),{blendMode:a.blendMode==="pass through"?"normal":a.blendMode,sectionDivider:{type:a.opened===!1?2:1,key:Z0[a.blendMode]||"pass",subType:0}}))):e.push(Ci({},a))}}function MT(e,t){var r=e.buffer.byteLength;do r*=2;while(t>r);var n=new ArrayBuffer(r),a=new Uint8Array(n),i=new Uint8Array(e.buffer);a.set(i),e.buffer=n,e.view=new DataView(e.buffer)}function T3(e,t){t>e.buffer.byteLength&&MT(e,t)}function Qa(e,t){var r=e.offset;return T3(e,e.offset+=t),r}function DT(e){var t=No(10,10),r=1;e.width>e.height?(t.width=160,t.height=Math.floor(e.height*(t.width/e.width)),r=t.width/e.width):(t.height=160,t.width=Math.floor(e.width*(t.height/e.height)),r=t.height/e.height);var n=t.getContext("2d");return n.scale(r,r),e.imageData?n.drawImage(J0(e.imageData),0,0):e.canvas&&n.drawImage(e.canvas,0,0),t}function M3(e,t,r,n,a,i){var o=n.top|0,l=n.left|0,s=n.right|0,u=n.bottom|0,c=Md(n),f=c.width,d=c.height,h=n.imageData;if(!h&&n.canvas&&f&&d&&(h=n.canvas.getContext("2d").getImageData(0,0,f,d)),h&&(h.width!==f||h.height!==d))throw new Error("Invalid imageData dimentions");s=l+f,u=o+d;var y,p;h?a.compress?(y=e4(h,[0]),p=2):(y=Qf(e,h,[0],!!a.psb),p=1):(y=new Uint8Array(0),p=1),t.channels.push({channelId:i?-3:-2,compression:p,buffer:y,length:2+y.length}),t[i?"realMask":"mask"]={top:o,left:l,right:s,bottom:u}}function IT(e,t,r,n){var a=FT(e,t,r,n);return t.mask&&M3(e,a,t,t.mask,n,!1),t.realMask&&M3(e,a,t,t.realMask,n,!0),a}function Md(e){var t,r,n,a,i=e.canvas,o=e.imageData,l=(r=(t=o==null?void 0:o.width)!==null&&t!==void 0?t:i==null?void 0:i.width)!==null&&r!==void 0?r:0,s=(a=(n=o==null?void 0:o.height)!==null&&n!==void 0?n:i==null?void 0:i.height)!==null&&a!==void 0?a:0;return{width:l,height:s}}function zT(e,t,r,n,a){if(e.data instanceof Uint32Array||e.data instanceof Uint16Array)throw new Error("imageData has incorrect bit depth");for(var i=$o(n,a),o=e.data,l=i.data,s=0;s<a;s++)for(var u=0;u<n;u++){var c=(u+t+(s+r)*e.width)*4,f=(u+s*n)*4;l[f]=o[c],l[f+1]=o[c+1],l[f+2]=o[c+2],l[f+3]=o[c+3]}return i}function FT(e,t,r,n){var a=t.top|0,i=t.left|0,o=t.right|0,l=t.bottom|0,s=[{channelId:-1,compression:0,buffer:void 0,length:2},{channelId:0,compression:0,buffer:void 0,length:2},{channelId:1,compression:0,buffer:void 0,length:2},{channelId:2,compression:0,buffer:void 0,length:2}],u=Md(t),c=u.width,f=u.height;if(!(t.canvas||t.imageData)||!c||!f)return o=i,l=a,{layer:t,top:a,left:i,right:o,bottom:l,channels:s};o=i+c,l=a+f;var d=t.imageData||t.canvas.getContext("2d").getImageData(0,0,c,f);if(n.trimImageData){var h=OT(d);if(h.left!==0||h.top!==0||h.right!==d.width||h.bottom!==d.height){if(i+=h.left,a+=h.top,o-=d.width-h.right,l-=d.height-h.bottom,c=o-i,f=l-a,!c||!f)return{layer:t,top:a,left:i,right:o,bottom:l,channels:s};d=zT(d,h.left,h.top,c,f)}}var y=[0,1,2];return(!r||n.noBackground||t.mask||Q2(d)||aE)&&y.unshift(-1),s=y.map(function(p){var x=J2(p,!1),g,m;return n.compress?(g=e4(d,[x]),m=2):(g=Qf(e,d,[x],!!n.psb),m=1),{channelId:p,compression:m,buffer:g,length:2+g.length}}),{layer:t,top:a,left:i,right:o,bottom:l,channels:s}}function D3(e,t,r,n){for(var a=e.data,i=e.width,o=(t*i+r)*4+3|0,l=o+(n-r)*4|0,s=o;s<l;s=s+4|0)if(a[s]!==0)return!1;return!0}function I3(e,t,r,n){for(var a=e.data,i=e.width,o=i*4|0,l=r*o+t*4+3|0,s=r,u=l;s<n;s++,u=u+o|0)if(a[u]!==0)return!1;return!0}function OT(e){for(var t=0,r=0,n=e.width,a=e.height;t<a&&D3(e,t,r,n);)t++;for(;a>t&&D3(e,a-1,r,n);)a--;for(;r<n&&I3(e,r,t,a);)r++;for(;n>r&&I3(e,n-1,t,a);)n--;return{top:t,left:r,right:n,bottom:a}}function zr(e,t){t?"r"in t?(Oe(e,0),Oe(e,Math.round(t.r*257)),Oe(e,Math.round(t.g*257)),Oe(e,Math.round(t.b*257)),Oe(e,0)):"fr"in t?(Oe(e,0),Oe(e,Math.round(t.fr*255*257)),Oe(e,Math.round(t.fg*255*257)),Oe(e,Math.round(t.fb*255*257)),Oe(e,0)):"l"in t?(Oe(e,7),Pt(e,Math.round(t.l*1e4)),Pt(e,Math.round(t.a<0?t.a*12800:t.a*12700)),Pt(e,Math.round(t.b<0?t.b*12800:t.b*12700)),Oe(e,0)):"h"in t?(Oe(e,1),Oe(e,Math.round(t.h*65535)),Oe(e,Math.round(t.s*65535)),Oe(e,Math.round(t.b*65535)),Oe(e,0)):"c"in t?(Oe(e,2),Oe(e,Math.round(t.c*257)),Oe(e,Math.round(t.m*257)),Oe(e,Math.round(t.y*257)),Oe(e,Math.round(t.k*257))):(Oe(e,8),Oe(e,Math.round(t.k*1e4/255)),Rt(e,6)):(Oe(e,0),Rt(e,8))}var ku=function(){return ku=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},ku.apply(this,arguments)},PT=["off","fade","pen pressure","pen tilt","stylus wheel","initial direction","direction","initial rotation","rotation"],z3=["round point","round blunt","round curve","round angle","round fan","flat point","flat blunt","flat curve","flat angle","flat fan"],RT=["erodible point","erodible flat","erodible round","erodible square","erodible triangle","custom"],LT={_:"brush",MixB:"mixer brush",SmTl:"smudge brush"};function Kr(e){return{control:PT[e.bVTy],steps:e.fStp,jitter:dt(e.jitter),minimum:dt(e["Mnm "])}}function F3(e){switch(e._classID){case"computedBrush":return{type:"computed",size:tu(e.Dmtr,"Pixels"),angle:_i(e.Angl),roundness:dt(e.Rndn),spacingOn:e.Intr,spacing:dt(e.Spcn),flipX:e.flipX,flipY:e.flipY,hardness:dt(e.Hrdn)};case"sampledBrush":return{type:"sampled",size:tu(e.Dmtr,"Pixels"),angle:_i(e.Angl),roundness:dt(e.Rndn),spacingOn:e.Intr,spacing:dt(e.Spcn),flipX:e.flipX,flipY:e.flipY,name:e["Nm "],sampledData:e.sampledData};case"dBrush":return{type:"dynamic",shape:z3[e["Shp "]],angle:_i(e.Angl),size:tu(e.Dmtr,"Pixels"),density:dt(e.Dnst),length:dt(e.Lngt),clumping:dt(e.clumping),thickness:dt(e.thickness),stiffness:dt(e.stiffness),physics:e.physics,spacing:dt(e.Spcn),spacingOn:e.Intr,flipX:e.flipX,flipY:e.flipY};case"dTips":return ku(ku({type:"tips",angle:_i(e.Angl),size:tu(e.Dmtr,"Pixels"),shape:z3[e["Shp "]],physics:e.physics,spacing:dt(e.Spcn),spacingOn:e.Intr,flipX:e.flipX,flipY:e.flipY,tipsType:RT[e.dtipsType],tipsLengthRatio:dt(e.dtipsLengthRatio),tipsHardness:dt(e.dtipsHardness)},e.dtipsGridSize&&e.dtipsErodibleTipHeightMap?{tipsGridSize:e.dtipsGridSize,tipsErodibleTipHeightMap:BT(e.dtipsErodibleTipHeightMap)}:{}),{tipsAirbrushCutoffAngle:e.dtipsAirbrushCutoffAngle,tipsAirbrushGranularity:dt(e.dtipsAirbrushGranularity),tipsAirbrushStreakiness:dt(e.dtipsAirbrushStreakiness),tipsAirbrushSplatSize:dt(e.dtipsAirbrushSplatSize),tipsAirbrushSplatCount:e.dtipsAirbrushSplatCount});default:throw console.log(require("util").inspect(e,!1,99,!0)),new Error("Unknown brush classId: ".concat(e._classID))}}function BT(e){for(var t=[],r=0;r<e.byteLength;r++)t.push(e[r]);return t}function NT(e,t){var r,n,a,i;t===void 0&&(t={});var o=Wo(e.buffer,e.byteOffset,e.byteLength),l=Et(o),s=[],u=[],c=[];if(l===1||l===2)throw new Error("Unsupported ABR version (".concat(l,")"));if(l===6||l===7||l===9||l===10){var f=Et(o);if(f!==1&&f!==2)throw new Error("Unsupported ABR minor version");for(;o.offset<o.view.byteLength;){Ca(o,"8BIM");var d=Wt(o),h=De(o),y=o.offset+h;switch(d){case"samp":{for(;o.offset<y;){for(var p=De(o);p&3;)p++;var x=o.offset+p,g=Jn(o,1);nt(o,f===1?10:264);var m=st(o),b=st(o),v=st(o)-m,S=st(o)-b;if(S<=0||v<=0)throw new Error("Invalid bounds");var C=Et(o),A=Ze(o),_=new Uint8Array(S*v);if(C===8)if(A===0)_.set(dr(o,_.byteLength));else if(A===1)ki(o,{width:S,height:v,data:_},S,v,C,1,[0],!1);else throw new Error("Invalid compression");else if(C===16)if(A===0)for(var E=0;E<_.byteLength;E++)_[E]=We(o)>>8;else throw A===1?new Error("not implemented (16bit RLE)"):new Error("Invalid compression");else throw new Error("Invalid depth");s.push({id:g,bounds:{x:b,y:m,w:S,h:v},alpha:_}),o.offset=x}break}case"desc":{for(var M=Tt(o,!0),z=0,N=M.Brsh;z<N.length;z++){var R=N[z],$={name:R["Nm "],shape:F3(R.Brsh),spacing:dt(R.Spcn),wetEdges:R.Wtdg,noise:R.Nose,useBrushSize:R.useBrushSize};R.interpretation!=null&&($.interpretation=R.interpretation),R.protectTexture!=null&&($.protectTexture=R.protectTexture),R.useTipDynamics&&($.shapeDynamics={tiltScale:dt(R.tiltScale),sizeDynamics:Kr(R.szVr),angleDynamics:Kr(R.angleDynamics),roundnessDynamics:Kr(R.roundnessDynamics),flipX:R.flipX,flipY:R.flipY,brushProjection:R.brushProjection,minimumDiameter:dt(R.minimumDiameter),minimumRoundness:dt(R.minimumRoundness)}),R.useScatter&&($.scatter={count:R["Cnt "],bothAxes:R.bothAxes,countDynamics:Kr(R.countDynamics),scatterDynamics:Kr(R.scatterDynamics)}),R.useTexture&&R.Txtr&&($.texture={id:R.Txtr.Idnt,name:R.Txtr["Nm "],blendMode:on.decode(R.textureBlendMode),depth:dt(R.textureDepth),depthMinimum:dt(R.minimumDepth),depthDynamics:Kr(R.textureDepthDynamics),scale:dt(R.textureScale),invert:R.InvT,brightness:R.textureBrightness,contrast:R.textureContrast,textureEachTip:!!R.TxtC});var q=R.dualBrush;q&&q.useDualBrush&&($.dualBrush={flip:q.Flip,shape:F3(q.Brsh),blendMode:on.decode(q.BlnM),useScatter:q.useScatter,spacing:dt(q.Spcn),count:q["Cnt "],bothAxes:q.bothAxes,countDynamics:Kr(q.countDynamics),scatterDynamics:Kr(q.scatterDynamics)}),R.useColorDynamics&&($.colorDynamics={foregroundBackground:Kr(R.clVr),hue:dt(R["H "]),saturation:dt(R.Strt),brightness:dt(R.Brgh),purity:dt(R.purity),perTip:R.colorDynamicsPerTip}),R.usePaintDynamics&&($.transfer={flowDynamics:Kr(R.prVr),opacityDynamics:Kr(R.opVr),wetnessDynamics:Kr(R.wtVr),mixDynamics:Kr(R.mxVr)}),R.useBrushPose&&($.brushPose={overrideAngle:R.overridePoseAngle,overrideTiltX:R.overridePoseTiltX,overrideTiltY:R.overridePoseTiltY,overridePressure:R.overridePosePressure,pressure:dt(R.brushPosePressure),tiltX:R.brushPoseTiltX,tiltY:R.brushPoseTiltY,angle:R.brushPoseAngle});var W=R.toolOptions;W&&($.toolOptions={type:LT[W._classID]||"brush",brushPreset:W.brushPreset,flow:(r=W.flow)!==null&&r!==void 0?r:100,smooth:(n=W.Smoo)!==null&&n!==void 0?n:0,mode:on.decode(W["Md "]||"BlnM.Nrml"),opacity:(a=W.Opct)!==null&&a!==void 0?a:100,smoothing:!!W.smoothing,smoothingValue:W.smoothingValue||0,smoothingRadiusMode:!!W.smoothingRadiusMode,smoothingCatchup:!!W.smoothingCatchup,smoothingCatchupAtEnd:!!W.smoothingCatchupAtEnd,smoothingZoomCompensation:!!W.smoothingZoomCompensation,pressureSmoothing:!!W.pressureSmoothing,usePressureOverridesSize:!!W.usePressureOverridesSize,usePressureOverridesOpacity:!!W.usePressureOverridesOpacity,useLegacy:!!W.useLegacy},W.prVr&&($.toolOptions.flowDynamics=Kr(W.prVr)),W.opVr&&($.toolOptions.opacityDynamics=Kr(W.opVr)),W.szVr&&($.toolOptions.sizeDynamics=Kr(W.szVr)),"wetness"in W&&($.toolOptions.wetness=W.wetness),"dryness"in W&&($.toolOptions.dryness=W.dryness),"mix"in W&&($.toolOptions.mix=W.mix),"autoFill"in W&&($.toolOptions.autoFill=W.autoFill),"autoClean"in W&&($.toolOptions.autoClean=W.autoClean),"loadSolidColorOnly"in W&&($.toolOptions.loadSolidColorOnly=W.loadSolidColorOnly),"sampleAllLayers"in W&&($.toolOptions.sampleAllLayers=W.sampleAllLayers),"SmdF"in W&&($.toolOptions.smudgeFingerPainting=W.SmdF),"SmdS"in W&&($.toolOptions.smudgeSampleAllLayers=W.SmdS),"Prs "in W&&($.toolOptions.strength=W["Prs "]),"SmdF"in W&&($.toolOptions.smudgeFingerPainting=W.SmdF),"SmdS"in W&&($.toolOptions.smudgeSampleAllLayers=W.SmdS)),u.push($)}break}case"patt":{for(;o.offset<y;)c.push(XE(o));o.offset=y;break}case"phry":{var M=Tt(o);t.logMissingFeatures&&!((i=M.hierarchy)===null||i===void 0)&&i.length;break}default:throw new Error("Invalid brush type: ".concat(d))}for(;h%4;)o.offset++,h++}}else throw new Error("Unsupported ABR version (".concat(l,")"));return{samples:s,patterns:c,brushes:u}}var Dd=function(){return Dd=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},Dd.apply(this,arguments)};function $T(e){var t=Wo(e.buffer,e.byteOffset,e.byteLength),r={shapes:[]};if(Ca(t,"cush"),De(t)!==2)throw new Error("Invalid version");for(var n=De(t),a=0;a<n;a++){for(var i=_r(t);t.offset%4;)t.offset++;if(De(t)!==1)throw new Error("Invalid shape version");var o=De(t),l=t.offset+o,s=Jn(t,1),u=De(t),c=De(t),f=De(t),d=De(t),h=d-c,y=f-u,p={paths:[]};c3(t,p,h,y,l-t.offset),r.shapes.push(Dd({name:i,id:s,width:h,height:y},p)),t.offset=l}return r}var Id;(function(e){e[e.Bitmap=0]="Bitmap",e[e.Grayscale=1]="Grayscale",e[e.Indexed=2]="Indexed",e[e.RGB=3]="RGB",e[e.CMYK=4]="CMYK",e[e.Multichannel=7]="Multichannel",e[e.Duotone=8]="Duotone",e[e.Lab=9]="Lab"})(Id||(Id={}));var zd;(function(e){e[e.Other=0]="Other",e[e.OpenFolder=1]="OpenFolder",e[e.ClosedFolder=2]="ClosedFolder",e[e.BoundingSectionDivider=3]="BoundingSectionDivider"})(zd||(zd={}));var Fd;(function(e){e[e.None=0]="None",e[e.Visibility=1]="Visibility",e[e.Position=2]="Position",e[e.Appearance=4]="Appearance"})(Fd||(Fd={}));var Od;(function(e){e[e.Color0=0]="Color0",e[e.Color1=1]="Color1",e[e.Color2=2]="Color2",e[e.Color3=3]="Color3",e[e.Transparency=-1]="Transparency",e[e.UserMask=-2]="UserMask",e[e.RealUserMask=-3]="RealUserMask"})(Od||(Od={}));var Pd;(function(e){e[e.RawData=0]="RawData",e[e.RleCompressed=1]="RleCompressed",e[e.ZipWithoutPrediction=2]="ZipWithoutPrediction",e[e.ZipWithPrediction=3]="ZipWithPrediction"})(Pd||(Pd={}));var UT=r4;function HT(e,t){var r="buffer"in e?Wo(e.buffer,e.byteOffset,e.byteLength):Wo(e);return BE(r,t)}function jT(e,t){var r=_3();return C3(r,e,t),yT(r)}function O3(e,t){var r=_3();return C3(r,e,t),xT(r)}function GT(e,t){if(typeof Buffer>"u")throw new Error("Buffer not supported on this platform");return Buffer.from(O3(e,t))}function VT(e,t){Bg(e,t)}const qT=Object.freeze(Object.defineProperty({__proto__:null,get ChannelID(){return Od},get ColorMode(){return Id},get Compression(){return Pd},get LayerCompCapturedInfo(){return Fd},get SectionDividerType(){return zd},byteArrayToBase64:UT,decodeLayerPixels:VT,initializeCanvas:uE,readAbr:NT,readCsh:$T,readPsd:HT,writePsd:jT,writePsdBuffer:GT,writePsdUint8Array:O3},Symbol.toStringTag,{value:"Module"}));var P3={exports:{}};/* @license
|
|
289
|
+
`),f=0;/\n$/.test(c);)c=c.substring(0,c.length-1),f++;var d={text:c,antiAlias:(t=Qg[l.AntiAlias])!==null&&t!==void 0?t:"smooth",useFractionalGlyphWidths:!!l.UseFractionalGlyphWidths,superscriptSize:s.SuperscriptSize,superscriptPosition:s.SuperscriptPosition,subscriptSize:s.SubscriptSize,subscriptPosition:s.SubscriptPosition,smallCapSize:s.SmallCapSize},h=(o=(i=(a=(n=(r=l.Rendered)===null||r===void 0?void 0:r.Shapes)===null||n===void 0?void 0:n.Children)===null||a===void 0?void 0:a[0])===null||i===void 0?void 0:i.Cookie)===null||o===void 0?void 0:o.Photoshop;h&&(d.shapeType=h.ShapeType===1?"box":"point",h.PointBase&&(d.pointBase=h.PointBase),h.BoxBounds&&(d.boxBounds=h.BoxBounds));var y=l.ParagraphRun;d.paragraphStyle={},d.paragraphStyleRuns=[];for(var p=0;p<y.RunArray.length;p++){var x=y.RunArray[p],g=y.RunLengthArray[p],m=iT(x.ParagraphSheet.Properties,u);d.paragraphStyleRuns.push({length:g,style:m})}for(var b=f;d.paragraphStyleRuns.length&&b>0;b--)--d.paragraphStyleRuns[d.paragraphStyleRuns.length-1].length===0&&d.paragraphStyleRuns.pop();o3(d.paragraphStyle,d.paragraphStyleRuns,md),d.paragraphStyleRuns.length||delete d.paragraphStyleRuns;var v=l.StyleRun;d.style={},d.styleRuns=[];for(var p=0;p<v.RunArray.length;p++){var S=v.RunLengthArray[p],m=oT(v.RunArray[p].StyleSheet.StyleSheetData,u);m.font||(m.font=u[0]),d.styleRuns.push({length:S,style:m})}for(var b=f;d.styleRuns.length&&b>0;b--)--d.styleRuns[d.styleRuns.length-1].length===0&&d.styleRuns.pop();return o3(d.style,d.styleRuns,gd),d.styleRuns.length||delete d.styleRuns,d}function sT(e){var t,r,n,a,i,o,l,s,u,c,f,d,h="".concat((e.text||"").replace(/\r?\n/g,"\r"),"\r"),y=[{name:"AdobeInvisFont",script:0,type:0,synthetic:0}],p=((t=e.style)===null||t===void 0?void 0:t.font)||((n=(r=e.styleRuns)===null||r===void 0?void 0:r.find(function(Se){return Se.style.font}))===null||n===void 0?void 0:n.style.font)||Jg,x=[],g=[],m=e.paragraphStyleRuns;if(m&&m.length){for(var b=h.length,v=0,S=m;v<S.length;v++){var C=S[v],A=Math.min(C.length,b);b-=A,A&&(b===1&&C===m[m.length-1]&&(A++,b--),g.push(A),x.push({ParagraphSheet:{DefaultStyleSheet:0,Properties:pu(wr(wr(wr({},hu),e.paragraphStyle),C.style),y)},Adjustments:{Axis:[1,0,1],XY:[0,0]}}))}b&&(g.push(b),x.push({ParagraphSheet:{DefaultStyleSheet:0,Properties:pu(wr(wr({},hu),e.paragraphStyle),y)},Adjustments:{Axis:[1,0,1],XY:[0,0]}}))}else for(var _=0,E=0;_<h.length;_++)h.charCodeAt(_)===13&&(g.push(_-E+1),x.push({ParagraphSheet:{DefaultStyleSheet:0,Properties:pu(wr(wr({},hu),e.paragraphStyle),y)},Adjustments:{Axis:[1,0,1],XY:[0,0]}}),E=_+1);for(var M=yd(wr(wr({},tT),{font:p}),y),z=e.styleRuns||[{length:h.length,style:e.style||{}}],N=[],R=[],$=h.length,q=0,W=z;q<W.length;q++){var Z=W[q],A=Math.min(Z.length,$);$-=A,A&&($===1&&Z===z[z.length-1]&&(A++,$--),R.push(A),N.push({StyleSheet:{StyleSheetData:yd(wr(wr({kerning:0,autoKerning:!0,fillColor:{r:0,g:0,b:0}},e.style),Z.style),y)}}))}$&&z.length&&(R.push($),N.push({StyleSheet:{StyleSheetData:yd(wr({kerning:0,autoKerning:!0,fillColor:{r:0,g:0,b:0}},e.style),y)}}));var te=wr(wr({},rT),e.gridInfo),ne=e.orientation==="vertical"?2:0,_e=e.orientation==="vertical"?1:0,pe=e.shapeType==="box"?1:0,we={ShapeType:pe};pe===0?we.PointBase=e.pointBase||[0,0]:we.BoxBounds=e.boxBounds||[0,0,0,0],we.Base={ShapeType:pe,TransformPoint0:[1,0],TransformPoint1:[0,1],TransformPoint2:[0,0]};var ve={KinsokuSet:[{Name:"PhotoshopKinsokuHard",NoStart:"、。,.・:;?!ー―’”)〕]}〉》」』】ヽヾゝゞ々ぁぃぅぇぉっゃゅょゎァィゥェォッャュョヮヵヶ゛゜?!)]},.:;℃℉¢%‰",NoEnd:"‘“(〔[{〈《「『【([{¥$£@§〒#",Keep:"―‥",Hanging:"、。.,"},{Name:"PhotoshopKinsokuSoft",NoStart:"、。,.・:;?!’”)〕]}〉》」』】ヽヾゝゞ々",NoEnd:"‘“(〔[{〈《「『【",Keep:"―‥",Hanging:"、。.,"}],MojiKumiSet:[{InternalName:"Photoshop6MojiKumiSet1"},{InternalName:"Photoshop6MojiKumiSet2"},{InternalName:"Photoshop6MojiKumiSet3"},{InternalName:"Photoshop6MojiKumiSet4"}],TheNormalStyleSheet:0,TheNormalParagraphSheet:0,ParagraphSheetSet:[{Name:"Normal RGB",DefaultStyleSheet:0,Properties:pu(wr(wr({},hu),e.paragraphStyle),y)}],StyleSheetSet:[{Name:"Normal RGB",StyleSheetData:M}],FontSet:y.map(function(Se){return{Name:Se.name,Script:Se.script||0,FontType:Se.type||0,Synthetic:Se.synthetic||0}}),SuperscriptSize:(a=e.superscriptSize)!==null&&a!==void 0?a:.583,SuperscriptPosition:(i=e.superscriptPosition)!==null&&i!==void 0?i:.333,SubscriptSize:(o=e.subscriptSize)!==null&&o!==void 0?o:.583,SubscriptPosition:(l=e.subscriptPosition)!==null&&l!==void 0?l:.333,SmallCapSize:(s=e.smallCapSize)!==null&&s!==void 0?s:.7},Te={EngineDict:{Editor:{Text:h},ParagraphRun:{DefaultRunData:{ParagraphSheet:{DefaultStyleSheet:0,Properties:{}},Adjustments:{Axis:[1,0,1],XY:[0,0]}},RunArray:x,RunLengthArray:g,IsJoinable:1},StyleRun:{DefaultRunData:{StyleSheet:{StyleSheetData:{}}},RunArray:N,RunLengthArray:R,IsJoinable:2},GridInfo:{GridIsOn:!!te.isOn,ShowGrid:!!te.show,GridSize:(u=te.size)!==null&&u!==void 0?u:18,GridLeading:(c=te.leading)!==null&&c!==void 0?c:22,GridColor:bd(te.color),GridLeadingFillColor:bd(te.color),AlignLineHeightToGridFlags:!!te.alignLineHeightToGridFlags},AntiAlias:Qg.indexOf((f=e.antiAlias)!==null&&f!==void 0?f:"sharp"),UseFractionalGlyphWidths:(d=e.useFractionalGlyphWidths)!==null&&d!==void 0?d:!0,Rendered:{Version:1,Shapes:{WritingDirection:ne,Children:[{ShapeType:pe,Procession:_e,Lines:{WritingDirection:ne,Children:[]},Cookie:{Photoshop:we}}]}}},ResourceDict:wr({},ve),DocumentResources:wr({},ve)};return Te}var xd={0:{uproot:!0,children:{0:{name:"Type"},1:{name:"Values"}}}},_d={0:{name:"Font"},1:{name:"FontSize"},2:{name:"FauxBold"},3:{name:"FauxItalic"},4:{name:"AutoLeading"},5:{name:"Leading"},6:{name:"HorizontalScale"},7:{name:"VerticalScale"},8:{name:"Tracking"},9:{name:"BaselineShift"},11:{name:"Kerning?"},12:{name:"FontCaps"},13:{name:"FontBaseline"},15:{name:"Strikethrough?"},16:{name:"Underline?"},18:{name:"Ligatures"},19:{name:"DLigatures"},23:{name:"Fractions"},24:{name:"Ordinals"},28:{name:"StylisticAlternates"},30:{name:"OldStyle?"},35:{name:"BaselineDirection"},38:{name:"Language"},52:{name:"NoBreak"},53:{name:"FillColor",children:xd},54:{name:"StrokeColor",children:xd},55:{children:{99:{uproot:!0}}},79:{children:xd}},wd={0:{name:"Justification"},1:{name:"FirstLineIndent"},2:{name:"StartIndent"},3:{name:"EndIndent"},4:{name:"SpaceBefore"},5:{name:"SpaceAfter"},7:{name:"AutoLeading"},9:{name:"AutoHyphenate"},10:{name:"HyphenatedWordSize"},11:{name:"PreHyphen"},12:{name:"PostHyphen"},13:{name:"ConsecutiveHyphens?"},14:{name:"Zone"},15:{name:"HypenateCapitalizedWords"},17:{name:"WordSpacing"},18:{name:"LetterSpacing"},19:{name:"GlyphSpacing"},32:{name:"StyleSheet",children:_d}},l3={name:"StyleSheetData",children:_d},uT={0:{name:"ResourceDict",children:{1:{name:"FontSet",children:{0:{uproot:!0,children:{0:{uproot:!0,children:{0:{uproot:!0,children:{0:{name:"Name"},2:{name:"FontType"}}}}}}}}},2:{name:"2",children:{}},3:{name:"MojiKumiSet",children:{0:{uproot:!0,children:{0:{uproot:!0,children:{0:{name:"InternalName"}}}}}}},4:{name:"KinsokuSet",children:{0:{uproot:!0,children:{0:{uproot:!0,children:{0:{name:"Name"},5:{uproot:!0,children:{0:{name:"NoStart"},1:{name:"NoEnd"},2:{name:"Keep"},3:{name:"Hanging"},4:{name:"Name"}}}}}}}}},5:{name:"StyleSheetSet",children:{0:{uproot:!0,children:{0:{uproot:!0,children:{0:{name:"Name"},6:l3}}}}}},6:{name:"ParagraphSheetSet",children:{0:{uproot:!0,children:{0:{uproot:!0,children:{0:{name:"Name"},5:{name:"Properties",children:wd},6:{name:"DefaultStyleSheet"}}}}}}},8:{name:"TextFrameSet",children:{0:{uproot:!0,children:{0:{name:"path",children:{0:{name:"name"},1:{name:"bezierCurve",children:{0:{name:"controlPoints"}}},2:{name:"data",children:{0:{name:"type"},1:{name:"orientation"},2:{name:"frameMatrix"},4:{name:"4"},6:{name:"textRange"},7:{name:"rowGutter"},8:{name:"columnGutter"},9:{name:"9"},10:{name:"baselineAlignment",children:{0:{name:"flag"},1:{name:"min"}}},11:{name:"pathData",children:{1:{name:"1"},0:{name:"reversed"},2:{name:"2"},3:{name:"3"},4:{name:"spacing"},5:{name:"5"},6:{name:"6"},7:{name:"7"},18:{name:"18"}}},12:{name:"12"},13:{name:"13"}}},3:{name:"3"},97:{name:"uuid"}}}}}}},9:{name:"Predefined",children:{0:{children:{0:{uproot:!0}}},1:{children:{0:{uproot:!0}}}}}}},1:{name:"EngineDict",children:{0:{name:"0",children:{3:{name:"SuperscriptSize"},4:{name:"SuperscriptPosition"},5:{name:"SubscriptSize"},6:{name:"SubscriptPosition"},7:{name:"SmallCapSize"},8:{name:"UseFractionalGlyphWidths"},15:{children:{0:{uproot:!0}}}}},1:{name:"Editors?",children:{0:{name:"Editor",children:{0:{name:"Text"},5:{name:"ParagraphRun",children:{0:{name:"RunArray",children:{0:{name:"ParagraphSheet",children:{0:{uproot:!0,children:{0:{name:"0"},5:{name:"5",children:wd},6:{name:"6"}}}}},1:{name:"RunLength"}}}}},6:{name:"StyleRun",children:{0:{name:"RunArray",children:{0:{name:"StyleSheet",children:{0:{uproot:!0,children:{6:l3}}}},1:{name:"RunLength"}}}}}}},1:{name:"FontVectorData ???"}}},2:{name:"StyleSheet",children:_d},3:{name:"ParagraphSheet",children:wd}}}};function ls(e,t){var r,n;if(e===null)return e;if(Array.isArray(e))return e.map(function(s){return ls(s,t)});if(typeof e!="object")return e;for(var a={},i=0,o=Object.keys(e);i<o.length;i++){var l=o[i];if(t[l])if(t[l].uproot){l!=="99"&&(a=ls(e[l],(r=t[l].children)!==null&&r!==void 0?r:{})),e[99]&&(a._type=e[99]);break}else a[t[l].name||l]=ls(e[l],(n=t[l].children)!==null&&n!==void 0?n:{});else l==="99"?a._type=e[l]:a[l]=ls(e[l],{})}return a}function cT(e){return ls(e,uT)}var j=function(){return j=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},j.apply(this,arguments)},Cn="abcdefghijklmnopqrstuvwxyz",s3=[],vu={};function ft(e,t,r,n){var a={key:e,has:t,read:r,write:n};s3.push(a),vu[a.key]=a}function Jo(e,t){vu[e]=vu[t]}function Gt(e){return function(t){return t[e]!==void 0}}function kd(e){if(De(e))throw new Error("Resource size above 4 GB limit at ".concat(e.offset.toString(16)));return De(e)}function Sd(e,t){Je(e,0),Je(e,t)}ft("TySh",Gt("text"),function(e,t,r){if(Et(e)!==1)throw new Error("Invalid TySh version");for(var n=[],a=0;a<6;a++)n.push(Nn(e));if(Et(e)!==50)throw new Error("Invalid TySh text version");var i=Tt(e);if(Et(e)!==1)throw new Error("Invalid TySh warp version");var o=Tt(e);if(t.text={transform:n,left:Yn(e),top:Yn(e),right:Yn(e),bottom:Yn(e),text:i["Txt "].replace(/\r/g,`
|
|
290
|
+
`),index:i.TextIndex||0,gridding:O4.decode(i.textGridding),antiAlias:P4.decode(i.AntA),orientation:is.decode(i.Ornt),warp:{style:ld.decode(o.warpStyle),value:o.warpValue||0,perspective:o.warpPerspective||0,perspectiveOther:o.warpPerspectiveOther||0,rotate:is.decode(o.warpRotate)}},i.bounds&&(t.text.bounds=x4(i.bounds)),i.boundingBox&&(t.text.boundingBox=x4(i.boundingBox)),i.EngineData){var l=Zg(i.EngineData),s=lT(l);t.text=j(j({},t.text),s)}nt(e,r())},function(e,t){var r=t.text,n=r.warp||{},a=r.transform||[1,0,0,1,0,0],i=j(j(j({"Txt ":(r.text||"").replace(/\r?\n/g,"\r"),textGridding:O4.encode(r.gridding),Ornt:is.encode(r.orientation),AntA:P4.encode(r.antiAlias)},r.bounds?{bounds:_4(r.bounds)}:{}),r.boundingBox?{boundingBox:_4(r.boundingBox)}:{}),{TextIndex:r.index||0,EngineData:eT(sT(r))});Pt(e,1);for(var o=0;o<6;o++)$n(e,a[o]);Pt(e,50),Dt(e,"","TxLr",i,"text"),Pt(e,1),Dt(e,"","warp",mu(n)),Qn(e,r.left),Qn(e,r.top),Qn(e,r.right),Qn(e,r.bottom)}),ft("SoCo",function(e){return e.vectorFill!==void 0&&e.vectorStroke===void 0&&e.vectorFill.type==="color"},function(e,t){var r=Tt(e);t.vectorFill=rs(r)},function(e,t){var r=ns(t.vectorFill).descriptor;Dt(e,"","null",r)}),ft("GdFl",function(e){return e.vectorFill!==void 0&&e.vectorStroke===void 0&&(e.vectorFill.type==="solid"||e.vectorFill.type==="noise")},function(e,t,r){var n=Tt(e);t.vectorFill=rs(n),nt(e,r())},function(e,t){var r=ns(t.vectorFill).descriptor;Dt(e,"","null",r)}),ft("PtFl",function(e){return e.vectorFill!==void 0&&e.vectorStroke===void 0&&e.vectorFill.type==="pattern"},function(e,t){var r=Tt(e);t.vectorFill=rs(r)},function(e,t){var r=ns(t.vectorFill).descriptor;Dt(e,"","null",r)}),ft("vscg",function(e){return e.vectorFill!==void 0&&e.vectorStroke!==void 0},function(e,t,r){Wt(e);var n=Tt(e);t.vectorFill=rs(n),nt(e,r())},function(e,t){var r=ns(t.vectorFill),n=r.descriptor,a=r.key;pt(e,a),Dt(e,"","null",n)});function fT(e,t,r){var n=Zn(e)*r,a=Zn(e)*t,i=Zn(e)*r,o=Zn(e)*t,l=Zn(e)*r,s=Zn(e)*t;return[a,n,o,i,s,l]}function dT(e,t,r,n){ea(e,t[1]/n),ea(e,t[0]/r),ea(e,t[3]/n),ea(e,t[2]/r),ea(e,t[5]/n),ea(e,t[4]/r)}var u3=["exclude","combine","subtract","intersect"];function c3(e,t,r,n,a){for(var i=e.offset+a,o=t.paths,l=void 0;i-e.offset>=26;){var s=Ke(e);switch(s){case 0:case 3:{Ke(e);var u=Et(e),c=Ke(e);nt(e,18),l={open:s===3,knots:[],fillRule:c===2?"non-zero":"even-odd"},u!==-1&&(l.operation=u3[u]),o.push(l);break}case 1:case 2:case 4:case 5:l.knots.push({linked:s===1||s===4,points:fT(e,r,n)});break;case 6:nt(e,24);break;case 7:{var f=Zn(e),d=Zn(e),h=Zn(e),y=Zn(e),p=Zn(e);nt(e,4),t.clipboard={top:f,left:d,bottom:h,right:y,resolution:p};break}case 8:t.fillStartsWithAllPixels=!!Ke(e),nt(e,22);break;default:throw new Error("Invalid vmsk section")}}return o}ft("vmsk",Gt("vectorMask"),function(e,t,r,n){var a=n.width,i=n.height;if(De(e)!==3)throw new Error("Invalid vmsk version");t.vectorMask={paths:[]};var o=t.vectorMask,l=De(e);o.invert=(l&1)!==0,o.notLink=(l&2)!==0,o.disable=(l&4)!==0,c3(e,o,a,i,r()),nt(e,r())},function(e,t,r){var n=r.width,a=r.height,i=t.vectorMask,o=(i.invert?1:0)|(i.notLink?2:0)|(i.disable?4:0);Je(e,3),Je(e,o),Oe(e,6),Rt(e,24);var l=i.clipboard;l&&(Oe(e,7),ea(e,l.top),ea(e,l.left),ea(e,l.bottom),ea(e,l.right),ea(e,l.resolution),Rt(e,4)),Oe(e,8),Oe(e,i.fillStartsWithAllPixels?1:0),Rt(e,22);for(var s=0,u=i.paths;s<u.length;s++){var c=u[s];Oe(e,c.open?3:0),Oe(e,c.knots.length),Oe(e,c.operation?u3.indexOf(c.operation):-1),Oe(e,c.fillRule==="non-zero"?2:1),Rt(e,18);for(var f=c.open?4:1,d=c.open?5:2,h=0,y=c.knots;h<y.length;h++){var p=y[h],x=p.linked,g=p.points;Oe(e,x?f:d),dT(e,g,n,a)}}}),Jo("vsms","vmsk"),ft("vowv",Gt("vowv"),function(e,t){t.vowv=De(e)},function(e,t){Je(e,t.vowv)}),ft("vogk",Gt("vectorOrigination"),function(e,t,r){if(st(e)!==1)throw new Error("Invalid vogk version");var n=Tt(e);t.vectorOrigination={keyDescriptorList:[]};for(var a=0,i=n.keyDescriptorList;a<i.length;a++){var o=i[a],l={};o.keyShapeInvalidated!=null&&(l.keyShapeInvalidated=o.keyShapeInvalidated),o.keyOriginType!=null&&(l.keyOriginType=o.keyOriginType),o.keyOriginResolution!=null&&(l.keyOriginResolution=o.keyOriginResolution),o.keyOriginShapeBBox&&(l.keyOriginShapeBoundingBox={top:wi(o.keyOriginShapeBBox["Top "]),left:wi(o.keyOriginShapeBBox.Left),bottom:wi(o.keyOriginShapeBBox.Btom),right:wi(o.keyOriginShapeBBox.Rght)});var s=o.keyOriginRRectRadii;s&&(l.keyOriginRRectRadii={topRight:Nt(s.topRight),topLeft:Nt(s.topLeft),bottomLeft:Nt(s.bottomLeft),bottomRight:Nt(s.bottomRight)});var u=o.keyOriginBoxCorners;u&&(l.keyOriginBoxCorners=[{x:u.rectangleCornerA.Hrzn,y:u.rectangleCornerA.Vrtc},{x:u.rectangleCornerB.Hrzn,y:u.rectangleCornerB.Vrtc},{x:u.rectangleCornerC.Hrzn,y:u.rectangleCornerC.Vrtc},{x:u.rectangleCornerD.Hrzn,y:u.rectangleCornerD.Vrtc}]);var c=o.Trnf;c&&(l.transform=[c.xx,c.xy,c.yx,c.yy,c.tx,c.ty]),t.vectorOrigination.keyDescriptorList.push(l)}nt(e,r())},function(e,t){for(var r=t.vectorOrigination,n={keyDescriptorList:[]},a=0;a<r.keyDescriptorList.length;a++){var i=r.keyDescriptorList[a];n.keyDescriptorList.push({});var o=n.keyDescriptorList[n.keyDescriptorList.length-1];i.keyOriginType!=null&&(o.keyOriginType=i.keyOriginType),i.keyOriginResolution!=null&&(o.keyOriginResolution=i.keyOriginResolution);var l=i.keyOriginRRectRadii;l&&(o.keyOriginRRectRadii={unitValueQuadVersion:1,topRight:Zt(l.topRight,"topRight"),topLeft:Zt(l.topLeft,"topLeft"),bottomLeft:Zt(l.bottomLeft,"bottomLeft"),bottomRight:Zt(l.bottomRight,"bottomRight")});var s=i.keyOriginShapeBoundingBox;s&&(o.keyOriginShapeBBox={unitValueQuadVersion:1,"Top ":Zt(s.top,"top"),Left:Zt(s.left,"left"),Btom:Zt(s.bottom,"bottom"),Rght:Zt(s.right,"right")});var u=i.keyOriginBoxCorners;u&&u.length===4&&(o.keyOriginBoxCorners={rectangleCornerA:{Hrzn:u[0].x,Vrtc:u[0].y},rectangleCornerB:{Hrzn:u[1].x,Vrtc:u[1].y},rectangleCornerC:{Hrzn:u[2].x,Vrtc:u[2].y},rectangleCornerD:{Hrzn:u[3].x,Vrtc:u[3].y}});var c=i.transform;c&&c.length===6&&(o.Trnf={xx:c[0],xy:c[1],yx:c[2],yy:c[3],tx:c[4],ty:c[5]}),i.keyShapeInvalidated!=null&&(o.keyShapeInvalidated=i.keyShapeInvalidated),o.keyOriginIndex=a}ht(e,1),Dt(e,"","null",n)}),ft("lmfx",function(e){return e.effects!==void 0&&x3(e.effects)},function(e,t,r){var n=De(e);if(n!==0)throw new Error("Invalid lmfx version");var a=Tt(e);t.effects=ts(a,!!e.logMissingFeatures),nt(e,r())},function(e,t,r,n){var a=es(t.effects,!!n.logMissingFeatures,!0);Je(e,0),Dt(e,"","null",a)}),ft("lrFX",Gt("effects"),function(e,t,r){t.effects||(t.effects=YE(e)),nt(e,r())},function(e,t){ZE(e,t.effects)}),ft("luni",Gt("name"),function(e,t,r){if(r()>4){var n=De(e);r()>=n*2?t.name=fd(e,n):e.logDevFeatures&&e.log("name in luni section is too long")}else e.logDevFeatures&&e.log("empty luni section");nt(e,r())},function(e,t){En(e,t.name)}),ft("lnsr",Gt("nameSource"),function(e,t){return t.nameSource=Wt(e)},function(e,t){return pt(e,t.nameSource)}),ft("lyid",Gt("id"),function(e,t){t.id=De(e)},function(e,t,r,n){for(var a=t.id;n.layerIds.has(a);)a+=100;Je(e,a),n.layerIds.add(a),n.layerToId.set(t,a)}),ft("lsct",Gt("sectionDivider"),function(e,t,r){t.sectionDivider={type:De(e)},r()&&(Ca(e,"8BIM"),t.sectionDivider.key=Wt(e)),r()&&(t.sectionDivider.subType=De(e))},function(e,t){Je(e,t.sectionDivider.type),t.sectionDivider.key&&(pt(e,"8BIM"),pt(e,t.sectionDivider.key),t.sectionDivider.subType!==void 0&&Je(e,t.sectionDivider.subType))}),Jo("lsdk","lsct"),ft("clbl",Gt("blendClippendElements"),function(e,t){t.blendClippendElements=!!Ze(e),nt(e,3)},function(e,t){Ge(e,t.blendClippendElements?1:0),Rt(e,3)}),ft("infx",Gt("blendInteriorElements"),function(e,t){t.blendInteriorElements=!!Ze(e),nt(e,3)},function(e,t){Ge(e,t.blendInteriorElements?1:0),Rt(e,3)}),ft("knko",Gt("knockout"),function(e,t){t.knockout=!!Ze(e),nt(e,3)},function(e,t){Ge(e,t.knockout?1:0),Rt(e,3)}),ft("lmgm",Gt("layerMaskAsGlobalMask"),function(e,t){t.layerMaskAsGlobalMask=!!Ze(e),nt(e,3)},function(e,t){Ge(e,t.layerMaskAsGlobalMask?1:0),Rt(e,3)}),ft("lspf",Gt("protected"),function(e,t){var r=De(e);t.protected={transparency:(r&1)!==0,composite:(r&2)!==0,position:(r&4)!==0},r&8&&(t.protected.artboards=!0)},function(e,t){var r=(t.protected.transparency?1:0)|(t.protected.composite?2:0)|(t.protected.position?4:0)|(t.protected.artboards?8:0);Je(e,r)}),ft("lclr",Gt("layerColor"),function(e,t){var r=Ke(e);nt(e,6),t.layerColor=W2[r]},function(e,t){var r=W2.indexOf(t.layerColor);Oe(e,r===-1?0:r),Rt(e,6)}),ft("shmd",function(e){return e.timestamp!==void 0||e.animationFrames!==void 0||e.animationFrameFlags!==void 0||e.timeline!==void 0||e.comps!==void 0},function(e,t,r){for(var n=De(e),a=function(o){Ca(e,"8BIM");var l=Wt(e);Ze(e),nt(e,3),Sn(e,1,function(s){if(l==="cust"){var u=Tt(e);u.layerTime!==void 0&&(t.timestamp=u.layerTime)}else if(l==="mlst"){var u=Tt(e);t.animationFrames=[];for(var c=0;c<u.LaSt.length;c++){var f=u.LaSt[c],d={frames:f.FrLs};f.enab!==void 0&&(d.enable=f.enab),f.Ofst&&(d.offset=Jl(f.Ofst)),f.FXRf&&(d.referencePoint=Jl(f.FXRf)),f.Lefx&&(d.effects=ts(f.Lefx,!!e.logMissingFeatures)),f.blendOptions&&f.blendOptions.Opct&&(d.opacity=dt(f.blendOptions.Opct)),t.animationFrames.push(d)}}else if(l==="mdyn"){Ke(e);var h=Ze(e),y=Ze(e);t.animationFrameFlags={propagateFrameOne:!h,unifyLayerPosition:(y&1)!==0,unifyLayerStyle:(y&2)!==0,unifyLayerVisibility:(y&4)!==0}}else if(l==="tmln"){var u=Tt(e),p=u.timeScope,x={start:an(p.Strt),duration:an(p.duration),inTime:an(p.inTime),outTime:an(p.outTime),autoScope:u.autoScope,audioLevel:u.audioLevel};u.trackList&&(x.tracks=A4(u.trackList,!!e.logMissingFeatures)),t.timeline=x}else if(l==="cmls"){var u=Tt(e);t.comps={settings:[]},u.origFXRefPoint&&(t.comps.originalEffectsReferencePoint={x:u.origFXRefPoint.Hrzn,y:u.origFXRefPoint.Vrtc});for(var g=0,m=u.layerSettings;g<m.length;g++){var b=m[g];t.comps.settings.push({compList:b.compList});var v=t.comps.settings[t.comps.settings.length-1];"enab"in b&&(v.enabled=b.enab),b.Ofst&&(v.offset={x:b.Ofst.Hrzn,y:b.Ofst.Vrtc}),b.FXRefPoint&&(v.effectsReferencePoint={x:b.FXRefPoint.Hrzn,y:b.FXRefPoint.Vrtc})}}else if(l==="extn"){var u=Tt(e);e.logMissingFeatures&&e.log('Unhandled "shmd" section key',l)}else e.logMissingFeatures&&e.log('Unhandled "shmd" section key',l);nt(e,s())})},i=0;i<n;i++)a();nt(e,r())},function(e,t,r,n){var a=t.animationFrames,i=t.animationFrameFlags,o=t.timestamp,l=t.timeline,s=t.comps,u=0;a&&u++,i&&u++,l&&u++,o!==void 0&&u++,s&&u++,Je(e,u),a&&(pt(e,"8BIM"),pt(e,"mlst"),Ge(e,0),Rt(e,3),$r(e,2,function(){for(var c,f={LaID:(c=t.id)!==null&&c!==void 0?c:0,LaSt:[]},d=0;d<a.length;d++){var h=a[d],y={};h.enable!==void 0&&(y.enab=h.enable),y.FrLs=h.frames,h.offset&&(y.Ofst=Ql(h.offset)),h.referencePoint&&(y.FXRf=Ql(h.referencePoint)),h.effects&&(y.Lefx=es(h.effects,!1,!1)),h.opacity!==void 0&&(y.blendOptions={Opct:Dr(h.opacity)}),f.LaSt.push(y)}Dt(e,"","null",f)},!0)),i&&(pt(e,"8BIM"),pt(e,"mdyn"),Ge(e,0),Rt(e,3),$r(e,2,function(){Oe(e,0),Ge(e,i.propagateFrameOne?0:15),Ge(e,(i.unifyLayerPosition?1:0)|(i.unifyLayerStyle?2:0)|(i.unifyLayerVisibility?4:0))})),l&&(pt(e,"8BIM"),pt(e,"tmln"),Ge(e,0),Rt(e,3),$r(e,2,function(){var c={Vrsn:1,timeScope:{Vrsn:1,Strt:l.start,duration:l.duration,inTime:l.inTime,outTime:l.outTime},autoScope:l.autoScope,audioLevel:l.audioLevel};l.tracks&&(c.trackList=E4(l.tracks));var f=n.layerToId.get(t)||t.id;if(!f)throw new Error("You need to provide layer.id value whan writing document with animations");c.LyrI=f,Dt(e,"","null",c,"anim")},!0)),o!==void 0&&(pt(e,"8BIM"),pt(e,"cust"),Ge(e,0),Rt(e,3),$r(e,2,function(){var c={layerTime:o};Dt(e,"","metadata",c)},!0)),s&&(pt(e,"8BIM"),pt(e,"cmls"),Ge(e,0),Rt(e,3),$r(e,2,function(){var c=n.layerToId.get(t)||t.id;if(!c)throw new Error("You need to provide layer.id value whan writing document with layer comps");var f={};s.originalEffectsReferencePoint&&(f.origFXRefPoint={Hrzn:s.originalEffectsReferencePoint.x,Vrtc:s.originalEffectsReferencePoint.y}),f.LyrI=c,f.layerSettings=[];for(var d=0,h=s.settings;d<h.length;d++){var y=h[d],p={};y.enabled!==void 0&&(p.enab=y.enabled),y.offset&&(p.Ofst={Hrzn:y.offset.x,Vrtc:y.offset.y}),y.effectsReferencePoint&&(p.FXRefPoint={Hrzn:y.effectsReferencePoint.x,Vrtc:y.effectsReferencePoint.y}),p.compList=y.compList,f.layerSettings.push(p)}Dt(e,"","null",f)},!0))}),ft("PxSc",function(){return!1},function(e,t){var r=Tt(e,!0);r.pixelSourceType===1986285651?t.pixelSource={type:"vdPS",origin:{x:r.origin.Hrzn,y:r.origin.Vrtc},interpretation:{interpretAlpha:r.interpretation.interpretAlpha.split(".")[1],profile:r.interpretation.profile},frameReader:{type:"QTFR",link:{name:r.frameReader["Lnk "]["Nm "],fullPath:r.frameReader["Lnk "].fullPath,originalPath:r.frameReader["Lnk "].originalPath,relativePath:r.frameReader["Lnk "].relPath,alias:r.frameReader["Lnk "].alis},mediaDescriptor:r.frameReader.mediaDescriptor},showAlteredVideo:r.showAlteredVideo}:e.log("Unknown pixelSourceType")},function(e,t){var r=t.pixelSource,n={_name:"",_classID:"PixelSource",pixelSourceType:1986285651,descVersion:1,origin:{Hrzn:r.origin.x,Vrtc:r.origin.y},interpretation:{_name:"",_classID:"footageInterpretation",Vrsn:1,interpretAlpha:"alphaInterpretation.".concat(r.interpretation.interpretAlpha),profile:r.interpretation.profile},frameReader:{_name:"",_classID:"FrameReader",frameReaderType:1364477522,descVersion:1,"Lnk ":{_name:"",_classID:"ExternalFileLink",descVersion:2,"Nm ":r.frameReader.link.name,fullPath:r.frameReader.link.fullPath,originalPath:r.frameReader.link.originalPath,alis:r.frameReader.link.alias,relPath:r.frameReader.link.relativePath},mediaDescriptor:r.frameReader.mediaDescriptor},showAlteredVideo:r.showAlteredVideo};Dt(e,"","PixelSource",n)}),ft("vstk",Gt("vectorStroke"),function(e,t,r){var n=Tt(e);t.vectorStroke={strokeEnabled:n.strokeEnabled,fillEnabled:n.fillEnabled,lineWidth:Nt(n.strokeStyleLineWidth),lineDashOffset:Nt(n.strokeStyleLineDashOffset),miterLimit:n.strokeStyleMiterLimit,lineCapType:X4.decode(n.strokeStyleLineCapType),lineJoinType:Y4.decode(n.strokeStyleLineJoinType),lineAlignment:Z4.decode(n.strokeStyleLineAlignment),scaleLock:n.strokeStyleScaleLock,strokeAdjust:n.strokeStyleStrokeAdjust,lineDashSet:n.strokeStyleLineDashSet.map(Nt),blendMode:on.decode(n.strokeStyleBlendMode),opacity:dt(n.strokeStyleOpacity),content:rs(n.strokeStyleContent),resolution:n.strokeStyleResolution},nt(e,r())},function(e,t){var r,n,a,i=t.vectorStroke,o={strokeStyleVersion:2,strokeEnabled:!!i.strokeEnabled,fillEnabled:!!i.fillEnabled,strokeStyleLineWidth:i.lineWidth||{value:3,units:"Points"},strokeStyleLineDashOffset:i.lineDashOffset||{value:0,units:"Points"},strokeStyleMiterLimit:(r=i.miterLimit)!==null&&r!==void 0?r:100,strokeStyleLineCapType:X4.encode(i.lineCapType),strokeStyleLineJoinType:Y4.encode(i.lineJoinType),strokeStyleLineAlignment:Z4.encode(i.lineAlignment),strokeStyleScaleLock:!!i.scaleLock,strokeStyleStrokeAdjust:!!i.strokeAdjust,strokeStyleLineDashSet:i.lineDashSet||[],strokeStyleBlendMode:on.encode(i.blendMode),strokeStyleOpacity:Dr((n=i.opacity)!==null&&n!==void 0?n:1),strokeStyleContent:ns(i.content||{type:"color",color:{r:0,g:0,b:0}}).descriptor,strokeStyleResolution:(a=i.resolution)!==null&&a!==void 0?a:72};Dt(e,"","strokeStyle",o)}),ft("artb",Gt("artboard"),function(e,t,r){var n=Tt(e),a=n.artboardRect;t.artboard={rect:{top:a["Top "],left:a.Left,bottom:a.Btom,right:a.Rght},guideIndices:n.guideIndeces,presetName:n.artboardPresetName,color:Kn(n["Clr "]),backgroundType:n.artboardBackgroundType},nt(e,r())},function(e,t){var r,n=t.artboard,a=n.rect,i={artboardRect:{"Top ":a.top,Left:a.left,Btom:a.bottom,Rght:a.right},guideIndeces:n.guideIndices||[],artboardPresetName:n.presetName||"","Clr ":Xn(n.color),artboardBackgroundType:(r=n.backgroundType)!==null&&r!==void 0?r:1};Dt(e,"","artboard",i)}),ft("sn2P",Gt("usingAlignedRendering"),function(e,t){return t.usingAlignedRendering=!!De(e)},function(e,t){return Je(e,t.usingAlignedRendering?1:0)});var Qo=["unknown","vector","raster","image stack"];function f3(e){var t,r,n,a,i,o,l=j(j({style:ld.decode(e.warpStyle)},e.warpValues?{values:e.warpValues}:{value:e.warpValue||0}),{perspective:e.warpPerspective||0,perspectiveOther:e.warpPerspectiveOther||0,rotate:is.decode(e.warpRotate),bounds:e.bounds&&{top:wi(e.bounds["Top "]),left:wi(e.bounds.Left),bottom:wi(e.bounds.Btom),right:wi(e.bounds.Rght)},uOrder:e.uOrder,vOrder:e.vOrder});(e.deformNumRows!=null||e.deformNumCols!=null)&&(l.deformNumRows=e.deformNumRows,l.deformNumCols=e.deformNumCols);var s=e.customEnvelopeWarp;if(s){l.customEnvelopeWarp={meshPoints:[]};for(var u=((t=s.meshPoints.find(function(d){return d.type==="Hrzn"}))===null||t===void 0?void 0:t.values)||[],c=((r=s.meshPoints.find(function(d){return d.type==="Vrtc"}))===null||r===void 0?void 0:r.values)||[],f=0;f<u.length;f++)l.customEnvelopeWarp.meshPoints.push({x:u[f],y:c[f]});(s.quiltSliceX||s.quiltSliceY)&&(l.customEnvelopeWarp.quiltSliceX=((a=(n=s.quiltSliceX)===null||n===void 0?void 0:n[0])===null||a===void 0?void 0:a.values)||[],l.customEnvelopeWarp.quiltSliceY=((o=(i=s.quiltSliceY)===null||i===void 0?void 0:i[0])===null||o===void 0?void 0:o.values)||[])}return l}function Cd(e){var t,r;return e.deformNumCols!=null||e.deformNumRows!=null||((t=e.customEnvelopeWarp)===null||t===void 0?void 0:t.quiltSliceX)||((r=e.customEnvelopeWarp)===null||r===void 0?void 0:r.quiltSliceY)}function mu(e){var t=e.bounds,r=j(j({warpStyle:ld.encode(e.style)},e.values?{warpValues:e.values}:{warpValue:e.value||0}),{warpPerspective:e.perspective||0,warpPerspectiveOther:e.perspectiveOther||0,warpRotate:is.encode(e.rotate),bounds:{"Top ":Zt(t&&t.top||{units:"Pixels",value:0},"bounds.top"),Left:Zt(t&&t.left||{units:"Pixels",value:0},"bounds.left"),Btom:Zt(t&&t.bottom||{units:"Pixels",value:0},"bounds.bottom"),Rght:Zt(t&&t.right||{units:"Pixels",value:0},"bounds.right")},uOrder:e.uOrder||0,vOrder:e.vOrder||0}),n=Cd(e);if(n){var a=r;a.deformNumRows=e.deformNumRows||0,a.deformNumCols=e.deformNumCols||0}var i=e.customEnvelopeWarp;if(i){var o=i.meshPoints||[];if(n){var a=r;a.customEnvelopeWarp={_name:"",_classID:"customEnvelopeWarp",quiltSliceX:[{type:"quiltSliceX",values:i.quiltSliceX||[]}],quiltSliceY:[{type:"quiltSliceY",values:i.quiltSliceY||[]}],meshPoints:[{type:"Hrzn",values:o.map(function(s){return s.x})},{type:"Vrtc",values:o.map(function(s){return s.y})}]}}else r.customEnvelopeWarp={_name:"",_classID:"customEnvelopeWarp",meshPoints:[{type:"Hrzn",values:o.map(function(l){return l.x})},{type:"Vrtc",values:o.map(function(l){return l.y})}]}}return r}ft("PlLd",Gt("placedLayer"),function(e,t,r){if(Wt(e)!=="plcL")throw new Error("Invalid PlLd signature");if(st(e)!==3)throw new Error("Invalid PlLd version");var n=Jn(e,1),a=st(e),i=st(e);st(e);var o=st(e);if(!Qo[o])throw new Error("Invalid PlLd type");for(var l=[],s=0;s<8;s++)l.push(Nn(e));var u=st(e);if(u!==0)throw new Error("Invalid Warp version ".concat(u));var c=Tt(e);t.placedLayer=t.placedLayer||{id:n,type:Qo[o],pageNumber:a,totalPages:i,transform:l,warp:f3(c)},nt(e,r())},function(e,t){var r=t.placedLayer;if(pt(e,"plcL"),ht(e,3),!r.id||typeof r.id!="string"||!/^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$/.test(r.id))throw new Error("Placed layer ID must be in a GUID format (example: 20953ddb-9391-11ec-b4f1-c15674f50bc4)");if(Ai(e,r.id,1),ht(e,1),ht(e,1),ht(e,16),Qo.indexOf(r.type)===-1)throw new Error("Invalid placedLayer type");ht(e,Qo.indexOf(r.type));for(var n=0;n<8;n++)$n(e,r.transform[n]);ht(e,0);var a=h3(r),i=Cd(a),o=i?"quiltWarp":"warp";Dt(e,"",o,mu(a),o)});function hT(e){return new Float32Array(e.buffer.slice(e.byteOffset),0,e.byteLength/4)}function pT(e){return new Uint32Array(e.buffer.slice(e.byteOffset),0,e.byteLength/4)}function Ad(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function gu(e){for(var t=[],r=0;r<e.length;r+=2)t.push({x:e[r],y:e[r+1]});return t}function ss(e){for(var t=[],r=0;r<e.length;r++)t.push(e[r].x,e[r].y);return t}function d3(e){return gu(hT(e))}function us(e){return{x:Nt(e.Hrzn),y:Nt(e.Vrtc)}}function cs(e){return{_name:"",_classID:"Pnt ",Hrzn:Zt(e.x,"x"),Vrtc:Zt(e.y,"y")}}function vT(e,t){var r={name:e["Nm "],opacity:dt(e.blendOptions.Opct),blendMode:on.decode(e.blendOptions["Md "]),enabled:e.enab,hasOptions:e.hasoptions,foregroundColor:Kn(e.FrgC),backgroundColor:Kn(e.BckC)};if("Fltr"in e)switch(e.Fltr._classID){case"boxblur":return j(j({},r),{type:"box blur",filter:{radius:Nt(e.Fltr["Rds "])}});case"GsnB":return j(j({},r),{type:"gaussian blur",filter:{radius:Nt(e.Fltr["Rds "])}});case"MtnB":return j(j({},r),{type:"motion blur",filter:{angle:e.Fltr.Angl,distance:Nt(e.Fltr.Dstn)}});case"RdlB":return j(j({},r),{type:"radial blur",filter:{amount:e.Fltr.Amnt,method:J4.decode(e.Fltr.BlrM),quality:Q4.decode(e.Fltr.BlrQ)}});case"shapeBlur":return j(j({},r),{type:"shape blur",filter:{radius:Nt(e.Fltr["Rds "]),customShape:{name:e.Fltr.customShape["Nm "],id:e.Fltr.customShape.Idnt}}});case"SmrB":return j(j({},r),{type:"smart blur",filter:{radius:e.Fltr["Rds "],threshold:e.Fltr.Thsh,quality:tg.decode(e.Fltr.SmBQ),mode:eg.decode(e.Fltr.SmBM)}});case"surfaceBlur":return j(j({},r),{type:"surface blur",filter:{radius:Nt(e.Fltr["Rds "]),threshold:e.Fltr.Thsh}});case"Dspl":return j(j({},r),{type:"displace",filter:{horizontalScale:e.Fltr.HrzS,verticalScale:e.Fltr.VrtS,displacementMap:rg.decode(e.Fltr.DspM),undefinedAreas:Vo.decode(e.Fltr.UndA),displacementFile:{signature:e.Fltr.DspF.sig,path:e.Fltr.DspF.path}}});case"Pnch":return j(j({},r),{type:"pinch",filter:{amount:e.Fltr.Amnt}});case"Plr ":return j(j({},r),{type:"polar coordinates",filter:{conversion:ng.decode(e.Fltr.Cnvr)}});case"Rple":return j(j({},r),{type:"ripple",filter:{amount:e.Fltr.Amnt,size:ag.decode(e.Fltr.RplS)}});case"Shr ":return j(j({},r),{type:"shear",filter:{shearPoints:e.Fltr.ShrP.map(function(l){return{x:l.Hrzn,y:l.Vrtc}}),shearStart:e.Fltr.ShrS,shearEnd:e.Fltr.ShrE,undefinedAreas:Vo.decode(e.Fltr.UndA)}});case"Sphr":return j(j({},r),{type:"spherize",filter:{amount:e.Fltr.Amnt,mode:ig.decode(e.Fltr.SphM)}});case"Twrl":return j(j({},r),{type:"twirl",filter:{angle:e.Fltr.Angl}});case"Wave":return j(j({},r),{type:"wave",filter:{numberOfGenerators:e.Fltr.NmbG,type:og.decode(e.Fltr.Wvtp),wavelength:{min:e.Fltr.WLMn,max:e.Fltr.WLMx},amplitude:{min:e.Fltr.AmMn,max:e.Fltr.AmMx},scale:{x:e.Fltr.SclH,y:e.Fltr.SclV},randomSeed:e.Fltr.RndS,undefinedAreas:Vo.decode(e.Fltr.UndA)}});case"ZgZg":return j(j({},r),{type:"zigzag",filter:{amount:e.Fltr.Amnt,ridges:e.Fltr.NmbR,style:lg.decode(e.Fltr.ZZTy)}});case"AdNs":return j(j({},r),{type:"add noise",filter:{amount:dt(e.Fltr.Nose),distribution:sg.decode(e.Fltr.Dstr),monochromatic:e.Fltr.Mnch,randomSeed:e.Fltr.FlRs}});case"DstS":return j(j({},r),{type:"dust and scratches",filter:{radius:e.Fltr["Rds "],threshold:e.Fltr.Thsh}});case"Mdn ":return j(j({},r),{type:"median",filter:{radius:Nt(e.Fltr["Rds "])}});case"denoise":return j(j({},r),{type:"reduce noise",filter:{preset:e.Fltr.preset,removeJpegArtifact:e.Fltr.removeJPEGArtifact,reduceColorNoise:dt(e.Fltr.ClNs),sharpenDetails:dt(e.Fltr.Shrp),channelDenoise:e.Fltr.channelDenoise.map(function(l){return j({channels:l.Chnl.map(os.decode),amount:l.Amnt},l.EdgF?{preserveDetails:l.EdgF}:{})})}});case"ClrH":return j(j({},r),{type:"color halftone",filter:{radius:e.Fltr["Rds "],angle1:e.Fltr.Ang1,angle2:e.Fltr.Ang2,angle3:e.Fltr.Ang3,angle4:e.Fltr.Ang4}});case"Crst":return j(j({},r),{type:"crystallize",filter:{cellSize:e.Fltr.ClSz,randomSeed:e.Fltr.FlRs}});case"Mztn":return j(j({},r),{type:"mezzotint",filter:{type:ug.decode(e.Fltr.MztT),randomSeed:e.Fltr.FlRs}});case"Msc ":return j(j({},r),{type:"mosaic",filter:{cellSize:Nt(e.Fltr.ClSz)}});case"Pntl":return j(j({},r),{type:"pointillize",filter:{cellSize:e.Fltr.ClSz,randomSeed:e.Fltr.FlRs}});case"Clds":return j(j({},r),{type:"clouds",filter:{randomSeed:e.Fltr.FlRs}});case"DfrC":return j(j({},r),{type:"difference clouds",filter:{randomSeed:e.Fltr.FlRs}});case"Fbrs":return j(j({},r),{type:"fibers",filter:{variance:e.Fltr.Vrnc,strength:e.Fltr.Strg,randomSeed:e.Fltr.RndS}});case"LnsF":return j(j({},r),{type:"lens flare",filter:{brightness:e.Fltr.Brgh,position:{x:e.Fltr.FlrC.Hrzn,y:e.Fltr.FlrC.Vrtc},lensType:cg.decode(e.Fltr["Lns "])}});case"smartSharpen":return j(j({},r),{type:"smart sharpen",filter:{amount:dt(e.Fltr.Amnt),radius:Nt(e.Fltr["Rds "]),threshold:e.Fltr.Thsh,angle:e.Fltr.Angl,moreAccurate:e.Fltr.moreAccurate,blur:fg.decode(e.Fltr.blur),preset:e.Fltr.preset,shadow:{fadeAmount:dt(e.Fltr.sdwM.Amnt),tonalWidth:dt(e.Fltr.sdwM.Wdth),radius:e.Fltr.sdwM["Rds "]},highlight:{fadeAmount:dt(e.Fltr.hglM.Amnt),tonalWidth:dt(e.Fltr.hglM.Wdth),radius:e.Fltr.hglM["Rds "]}}});case"UnsM":return j(j({},r),{type:"unsharp mask",filter:{amount:dt(e.Fltr.Amnt),radius:Nt(e.Fltr["Rds "]),threshold:e.Fltr.Thsh}});case"Dfs ":return j(j({},r),{type:"diffuse",filter:{mode:dg.decode(e.Fltr["Md "]),randomSeed:e.Fltr.FlRs}});case"Embs":return j(j({},r),{type:"emboss",filter:{angle:e.Fltr.Angl,height:e.Fltr.Hght,amount:e.Fltr.Amnt}});case"Extr":return j(j({},r),{type:"extrude",filter:{type:hg.decode(e.Fltr.ExtT),size:e.Fltr.ExtS,depth:e.Fltr.ExtD,depthMode:pg.decode(e.Fltr.ExtR),randomSeed:e.Fltr.FlRs,solidFrontFaces:e.Fltr.ExtF,maskIncompleteBlocks:e.Fltr.ExtM}});case"Tls ":return j(j({},r),{type:"tiles",filter:{numberOfTiles:e.Fltr.TlNm,maximumOffset:e.Fltr.TlOf,fillEmptyAreaWith:vg.decode(e.Fltr.FlCl),randomSeed:e.Fltr.FlRs}});case"TrcC":return j(j({},r),{type:"trace contour",filter:{level:e.Fltr["Lvl "],edge:mg.decode(e.Fltr["Edg "])}});case"Wnd ":return j(j({},r),{type:"wind",filter:{method:gg.decode(e.Fltr.WndM),direction:bg.decode(e.Fltr.Drct)}});case"Dntr":return j(j({},r),{type:"de-interlace",filter:{eliminate:yg.decode(e.Fltr.IntE),newFieldsBy:xg.decode(e.Fltr.IntC)}});case"Cstm":return j(j({},r),{type:"custom",filter:{scale:e.Fltr["Scl "],offset:e.Fltr.Ofst,matrix:e.Fltr.Mtrx}});case"HghP":return j(j({},r),{type:"high pass",filter:{radius:Nt(e.Fltr["Rds "])}});case"Mxm ":return j(j({},r),{type:"maximum",filter:{radius:Nt(e.Fltr["Rds "])}});case"Mnm ":return j(j({},r),{type:"minimum",filter:{radius:Nt(e.Fltr["Rds "])}});case"Ofst":return j(j({},r),{type:"offset",filter:{horizontal:e.Fltr.Hrzn,vertical:e.Fltr.Vrtc,undefinedAreas:_g.decode(e.Fltr["Fl "])}});case"rigidTransform":return j(j({},r),{type:"puppet",filter:{rigidType:e.Fltr.rigidType,bounds:[{x:e.Fltr.PuX0,y:e.Fltr.PuY0},{x:e.Fltr.PuX1,y:e.Fltr.PuY1},{x:e.Fltr.PuX2,y:e.Fltr.PuY2},{x:e.Fltr.PuX3,y:e.Fltr.PuY3}],puppetShapeList:e.Fltr.puppetShapeList.map(function(l){return{rigidType:l.rigidType,originalVertexArray:d3(l.originalVertexArray),deformedVertexArray:d3(l.deformedVertexArray),indexArray:Array.from(pT(l.indexArray)),pinOffsets:gu(l.pinOffsets),posFinalPins:gu(l.posFinalPins),pinVertexIndices:l.pinVertexIndices,selectedPin:l.selectedPin,pinPosition:gu(l.PinP),pinRotation:l.PnRt,pinOverlay:l.PnOv,pinDepth:l.PnDp,meshQuality:l.meshQuality,meshExpansion:l.meshExpansion,meshRigidity:l.meshRigidity,imageResolution:l.imageResolution,meshBoundaryPath:{pathComponents:l.meshBoundaryPath.pathComponents.map(function(s){return{shapeOperation:s.shapeOperation.split(".")[1],paths:s.SbpL.map(function(u){return{closed:u.Clsp,points:u["Pts "].map(function(c){return{anchor:us(c.Anch),forward:us(c["Fwd "]),backward:us(c["Bwd "]),smooth:c.Smoo}})}})}})}}})}});case"PbPl":{for(var n=[],a=e.Fltr,i=0;i<Cn.length&&a["PN".concat(Cn[i],"a")];i++)for(var o=0;o<Cn.length&&a["PN".concat(Cn[i]).concat(Cn[o])];o++)n.push({name:a["PN".concat(Cn[i]).concat(Cn[o])],value:a["PF".concat(Cn[i]).concat(Cn[o])]});return j(j({},r),{type:"oil paint plugin",filter:{name:e.Fltr.KnNm,gpu:e.Fltr.GpuY,lighting:e.Fltr.LIWy,parameters:n}})}case"HsbP":return j(j({},r),{type:"hsb/hsl",filter:{inputMode:nu.decode(e.Fltr.Inpt),rowOrder:nu.decode(e.Fltr.Otpt)}});case"oilPaint":return j(j({},r),{type:"oil paint",filter:{lightingOn:e.Fltr.lightingOn,stylization:e.Fltr.stylization,cleanliness:e.Fltr.cleanliness,brushScale:e.Fltr.brushScale,microBrush:e.Fltr.microBrush,lightDirection:e.Fltr.LghD,specularity:e.Fltr.specularity}});case"LqFy":return j(j({},r),{type:"liquify",filter:{liquifyMesh:e.Fltr.LqMe}});case"perspectiveWarpTransform":return j(j({},r),{type:"perspective warp",filter:{vertices:e.Fltr.vertices.map(us),warpedVertices:e.Fltr.warpedVertices.map(us),quads:e.Fltr.quads.map(function(l){return l.indices})}});case"Crvs":return j(j({},r),{type:"curves",filter:j({presetKind:wg.decode(e.Fltr.presetKind)},e.Fltr.Adjs?{adjustments:e.Fltr.Adjs.map(function(l){var s=l.Chnl.map(os.decode);if(l["Crv "])return{channels:s,curve:l["Crv "].map(function(u){var c={x:u.Hrzn,y:u.Vrtc};return u.Cnty&&(c.curved=!0),c})};if(l.Mpng)return{channels:s,values:l.Mpng};throw new Error("Unknown curve adjustment")})}:{})});case"BrgC":return j(j({},r),{type:"brightness/contrast",filter:{brightness:e.Fltr.Brgh,contrast:e.Fltr.Cntr,useLegacy:!!e.Fltr.useLegacy}});default:if(t.throwForMissingFeatures)throw new Error("Unknown filter classId: ".concat(e.Fltr._classID));return}else switch(e.filterID){case 1098281575:return j(j({},r),{type:"average"});case 1114403360:return j(j({},r),{type:"blur"});case 1114403405:return j(j({},r),{type:"blur more"});case 1148416099:return j(j({},r),{type:"despeckle"});case 1180922912:return j(j({},r),{type:"facet"});case 1181902701:return j(j({},r),{type:"fragment"});case 1399353968:return j(j({},r),{type:"sharpen"});case 1399353925:return j(j({},r),{type:"sharpen edges"});case 1399353933:return j(j({},r),{type:"sharpen more"});case 1181639749:return j(j({},r),{type:"find edges"});case 1399616122:return j(j({},r),{type:"solarize"});case 1314149187:return j(j({},r),{type:"ntsc colors"});case 1231976050:return j(j({},r),{type:"invert"});default:if(t.throwForMissingFeatures)throw new Error("Unknown filterID: ".concat(e.filterID))}}function mT(e,t){return{enabled:e.enab,validAtPosition:e.validAtPosition,maskEnabled:e.filterMaskEnable,maskLinked:e.filterMaskLinked,maskExtendWithWhite:e.filterMaskExtendWithWhite,list:e.filterFXList.map(function(r){return vT(r,t)}).filter(function(r){return!!r})}}function Aa(e){return Zt(e.radius,"radius")}function gT(e){var t={_name:"",_classID:"filterFX","Nm ":e.name,blendOptions:{_name:"",_classID:"blendOptions",Opct:Bn(e.opacity),"Md ":on.encode(e.blendMode)},enab:e.enabled,hasoptions:e.hasOptions,FrgC:Xn(e.foregroundColor),BckC:Xn(e.backgroundColor)};switch(e.type){case"average":return j(j({},t),{filterID:1098281575});case"blur":return j(j({},t),{filterID:1114403360});case"blur more":return j(j({},t),{filterID:1114403405});case"box blur":return j(j({},t),{Fltr:{_name:"Box Blur",_classID:"boxblur","Rds ":Aa(e.filter)},filterID:697});case"gaussian blur":return j(j({},t),{Fltr:{_name:"Gaussian Blur",_classID:"GsnB","Rds ":Aa(e.filter)},filterID:1198747202});case"motion blur":return j(j({},t),{Fltr:{_name:"Motion Blur",_classID:"MtnB",Angl:e.filter.angle,Dstn:Zt(e.filter.distance,"distance")},filterID:1299476034});case"radial blur":return j(j({},t),{Fltr:{_name:"Radial Blur",_classID:"RdlB",Amnt:e.filter.amount,BlrM:J4.encode(e.filter.method),BlrQ:Q4.encode(e.filter.quality)},filterID:1382313026});case"shape blur":return j(j({},t),{Fltr:{_name:"Shape Blur",_classID:"shapeBlur","Rds ":Aa(e.filter),customShape:{_name:"",_classID:"customShape","Nm ":e.filter.customShape.name,Idnt:e.filter.customShape.id}},filterID:702});case"smart blur":return j(j({},t),{Fltr:{_name:"Smart Blur",_classID:"SmrB","Rds ":e.filter.radius,Thsh:e.filter.threshold,SmBQ:tg.encode(e.filter.quality),SmBM:eg.encode(e.filter.mode)},filterID:1399681602});case"surface blur":return j(j({},t),{Fltr:{_name:"Surface Blur",_classID:"surfaceBlur","Rds ":Aa(e.filter),Thsh:e.filter.threshold},filterID:701});case"displace":return j(j({},t),{Fltr:{_name:"Displace",_classID:"Dspl",HrzS:e.filter.horizontalScale,VrtS:e.filter.verticalScale,DspM:rg.encode(e.filter.displacementMap),UndA:Vo.encode(e.filter.undefinedAreas),DspF:{sig:e.filter.displacementFile.signature,path:e.filter.displacementFile.path}},filterID:1148416108});case"pinch":return j(j({},t),{Fltr:{_name:"Pinch",_classID:"Pnch",Amnt:e.filter.amount},filterID:1349411688});case"polar coordinates":return j(j({},t),{Fltr:{_name:"Polar Coordinates",_classID:"Plr ",Cnvr:ng.encode(e.filter.conversion)},filterID:1349284384});case"ripple":return j(j({},t),{Fltr:{_name:"Ripple",_classID:"Rple",Amnt:e.filter.amount,RplS:ag.encode(e.filter.size)},filterID:1383099493});case"shear":return j(j({},t),{Fltr:{_name:"Shear",_classID:"Shr ",ShrP:e.filter.shearPoints.map(function(s){return{_name:"",_classID:"Pnt ",Hrzn:s.x,Vrtc:s.y}}),UndA:Vo.encode(e.filter.undefinedAreas),ShrS:e.filter.shearStart,ShrE:e.filter.shearEnd},filterID:1399353888});case"spherize":return j(j({},t),{Fltr:{_name:"Spherize",_classID:"Sphr",Amnt:e.filter.amount,SphM:ig.encode(e.filter.mode)},filterID:1399875698});case"twirl":return j(j({},t),{Fltr:{_name:"Twirl",_classID:"Twrl",Angl:e.filter.angle},filterID:1417114220});case"wave":return j(j({},t),{Fltr:{_name:"Wave",_classID:"Wave",Wvtp:og.encode(e.filter.type),NmbG:e.filter.numberOfGenerators,WLMn:e.filter.wavelength.min,WLMx:e.filter.wavelength.max,AmMn:e.filter.amplitude.min,AmMx:e.filter.amplitude.max,SclH:e.filter.scale.x,SclV:e.filter.scale.y,UndA:Vo.encode(e.filter.undefinedAreas),RndS:e.filter.randomSeed},filterID:1466005093});case"zigzag":return j(j({},t),{Fltr:{_name:"ZigZag",_classID:"ZgZg",Amnt:e.filter.amount,NmbR:e.filter.ridges,ZZTy:lg.encode(e.filter.style)},filterID:1516722791});case"add noise":return j(j({},t),{Fltr:{_name:"Add Noise",_classID:"AdNs",Dstr:sg.encode(e.filter.distribution),Nose:Bn(e.filter.amount),Mnch:e.filter.monochromatic,FlRs:e.filter.randomSeed},filterID:1097092723});case"despeckle":return j(j({},t),{filterID:1148416099});case"dust and scratches":return j(j({},t),{Fltr:{_name:"Dust & Scratches",_classID:"DstS","Rds ":e.filter.radius,Thsh:e.filter.threshold},filterID:1148417107});case"median":return j(j({},t),{Fltr:{_name:"Median",_classID:"Mdn ","Rds ":Aa(e.filter)},filterID:1298427424});case"reduce noise":return j(j({},t),{Fltr:{_name:"Reduce Noise",_classID:"denoise",ClNs:Bn(e.filter.reduceColorNoise),Shrp:Bn(e.filter.sharpenDetails),removeJPEGArtifact:e.filter.removeJpegArtifact,channelDenoise:e.filter.channelDenoise.map(function(s){return j({_name:"",_classID:"channelDenoiseParams",Chnl:s.channels.map(function(u){return os.encode(u)}),Amnt:s.amount},s.preserveDetails?{EdgF:s.preserveDetails}:{})}),preset:e.filter.preset},filterID:633});case"color halftone":return j(j({},t),{Fltr:{_name:"Color Halftone",_classID:"ClrH","Rds ":e.filter.radius,Ang1:e.filter.angle1,Ang2:e.filter.angle2,Ang3:e.filter.angle3,Ang4:e.filter.angle4},filterID:1131180616});case"crystallize":return j(j({},t),{Fltr:{_name:"Crystallize",_classID:"Crst",ClSz:e.filter.cellSize,FlRs:e.filter.randomSeed},filterID:1131574132});case"facet":return j(j({},t),{filterID:1180922912});case"fragment":return j(j({},t),{filterID:1181902701});case"mezzotint":return j(j({},t),{Fltr:{_name:"Mezzotint",_classID:"Mztn",MztT:ug.encode(e.filter.type),FlRs:e.filter.randomSeed},filterID:1299870830});case"mosaic":return j(j({},t),{Fltr:{_name:"Mosaic",_classID:"Msc ",ClSz:Zt(e.filter.cellSize,"cellSize")},filterID:1299407648});case"pointillize":return j(j({},t),{Fltr:{_name:"Pointillize",_classID:"Pntl",ClSz:e.filter.cellSize,FlRs:e.filter.randomSeed},filterID:1349416044});case"clouds":return j(j({},t),{Fltr:{_name:"Clouds",_classID:"Clds",FlRs:e.filter.randomSeed},filterID:1131177075});case"difference clouds":return j(j({},t),{Fltr:{_name:"Difference Clouds",_classID:"DfrC",FlRs:e.filter.randomSeed},filterID:1147564611});case"fibers":return j(j({},t),{Fltr:{_name:"Fibers",_classID:"Fbrs",Vrnc:e.filter.variance,Strg:e.filter.strength,RndS:e.filter.randomSeed},filterID:1180856947});case"lens flare":return j(j({},t),{Fltr:{_name:"Lens Flare",_classID:"LnsF",Brgh:e.filter.brightness,FlrC:{_name:"",_classID:"Pnt ",Hrzn:e.filter.position.x,Vrtc:e.filter.position.y},"Lns ":cg.encode(e.filter.lensType)},filterID:1282306886});case"sharpen":return j(j({},t),{filterID:1399353968});case"sharpen edges":return j(j({},t),{filterID:1399353925});case"sharpen more":return j(j({},t),{filterID:1399353933});case"smart sharpen":return j(j({},t),{Fltr:{_name:"Smart Sharpen",_classID:"smartSharpen",Amnt:Bn(e.filter.amount),"Rds ":Aa(e.filter),Thsh:e.filter.threshold,Angl:e.filter.angle,moreAccurate:e.filter.moreAccurate,blur:fg.encode(e.filter.blur),preset:e.filter.preset,sdwM:{_name:"Parameters",_classID:"adaptCorrectTones",Amnt:Bn(e.filter.shadow.fadeAmount),Wdth:Bn(e.filter.shadow.tonalWidth),"Rds ":e.filter.shadow.radius},hglM:{_name:"Parameters",_classID:"adaptCorrectTones",Amnt:Bn(e.filter.highlight.fadeAmount),Wdth:Bn(e.filter.highlight.tonalWidth),"Rds ":e.filter.highlight.radius}},filterID:698});case"unsharp mask":return j(j({},t),{Fltr:{_name:"Unsharp Mask",_classID:"UnsM",Amnt:Bn(e.filter.amount),"Rds ":Aa(e.filter),Thsh:e.filter.threshold},filterID:1433301837});case"diffuse":return j(j({},t),{Fltr:{_name:"Diffuse",_classID:"Dfs ","Md ":dg.encode(e.filter.mode),FlRs:e.filter.randomSeed},filterID:1147564832});case"emboss":return j(j({},t),{Fltr:{_name:"Emboss",_classID:"Embs",Angl:e.filter.angle,Hght:e.filter.height,Amnt:e.filter.amount},filterID:1164796531});case"extrude":return j(j({},t),{Fltr:{_name:"Extrude",_classID:"Extr",ExtS:e.filter.size,ExtD:e.filter.depth,ExtF:e.filter.solidFrontFaces,ExtM:e.filter.maskIncompleteBlocks,ExtT:hg.encode(e.filter.type),ExtR:pg.encode(e.filter.depthMode),FlRs:e.filter.randomSeed},filterID:1165522034});case"find edges":return j(j({},t),{filterID:1181639749});case"solarize":return j(j({},t),{filterID:1399616122});case"tiles":return j(j({},t),{Fltr:{_name:"Tiles",_classID:"Tls ",TlNm:e.filter.numberOfTiles,TlOf:e.filter.maximumOffset,FlCl:vg.encode(e.filter.fillEmptyAreaWith),FlRs:e.filter.randomSeed},filterID:1416393504});case"trace contour":return j(j({},t),{Fltr:{_name:"Trace Contour",_classID:"TrcC","Lvl ":e.filter.level,"Edg ":mg.encode(e.filter.edge)},filterID:1416782659});case"wind":return j(j({},t),{Fltr:{_name:"Wind",_classID:"Wnd ",WndM:gg.encode(e.filter.method),Drct:bg.encode(e.filter.direction)},filterID:1466852384});case"de-interlace":return j(j({},t),{Fltr:{_name:"De-Interlace",_classID:"Dntr",IntE:yg.encode(e.filter.eliminate),IntC:xg.encode(e.filter.newFieldsBy)},filterID:1148089458});case"ntsc colors":return j(j({},t),{filterID:1314149187});case"invert":return j(j({},t),{filterID:1231976050});case"custom":return j(j({},t),{Fltr:{_name:"Custom",_classID:"Cstm","Scl ":e.filter.scale,Ofst:e.filter.offset,Mtrx:e.filter.matrix},filterID:1131639917});case"high pass":return j(j({},t),{Fltr:{_name:"High Pass",_classID:"HghP","Rds ":Aa(e.filter)},filterID:1214736464});case"maximum":return j(j({},t),{Fltr:{_name:"Maximum",_classID:"Mxm ","Rds ":Aa(e.filter)},filterID:1299737888});case"minimum":return j(j({},t),{Fltr:{_name:"Minimum",_classID:"Mnm ","Rds ":Aa(e.filter)},filterID:1299082528});case"offset":return j(j({},t),{Fltr:{_name:"Offset",_classID:"Ofst",Hrzn:e.filter.horizontal,Vrtc:e.filter.vertical,"Fl ":_g.encode(e.filter.undefinedAreas)},filterID:1332114292});case"puppet":return j(j({},t),{Fltr:{_name:"Rigid Transform",_classID:"rigidTransform",null:["Ordn.Trgt"],rigidType:e.filter.rigidType,puppetShapeList:e.filter.puppetShapeList.map(function(s){return{_name:"",_classID:"puppetShape",rigidType:s.rigidType,VrsM:1,VrsN:0,originalVertexArray:Ad(new Float32Array(ss(s.originalVertexArray))),deformedVertexArray:Ad(new Float32Array(ss(s.deformedVertexArray))),indexArray:Ad(new Uint32Array(s.indexArray)),pinOffsets:ss(s.pinOffsets),posFinalPins:ss(s.posFinalPins),pinVertexIndices:s.pinVertexIndices,PinP:ss(s.pinPosition),PnRt:s.pinRotation,PnOv:s.pinOverlay,PnDp:s.pinDepth,meshQuality:s.meshQuality,meshExpansion:s.meshExpansion,meshRigidity:s.meshRigidity,imageResolution:s.imageResolution,meshBoundaryPath:{_name:"",_classID:"pathClass",pathComponents:s.meshBoundaryPath.pathComponents.map(function(u){return{_name:"",_classID:"PaCm",shapeOperation:"shapeOperation.".concat(u.shapeOperation),SbpL:u.paths.map(function(c){return{_name:"",_classID:"Sbpl",Clsp:c.closed,"Pts ":c.points.map(function(f){return{_name:"",_classID:"Pthp",Anch:cs(f.anchor),"Fwd ":cs(f.forward),"Bwd ":cs(f.backward),Smoo:f.smooth}})}})}})},selectedPin:s.selectedPin}}),PuX0:e.filter.bounds[0].x,PuX1:e.filter.bounds[1].x,PuX2:e.filter.bounds[2].x,PuX3:e.filter.bounds[3].x,PuY0:e.filter.bounds[0].y,PuY1:e.filter.bounds[1].y,PuY2:e.filter.bounds[2].y,PuY3:e.filter.bounds[3].y},filterID:991});case"oil paint plugin":{for(var r={},n=0;n<e.filter.parameters.length;n++){var a=e.filter.parameters[n],i=a.name,o=a.value,l="".concat(Cn[Math.floor(n/Cn.length)]).concat(Cn[n%Cn.length]);r["PN".concat(l)]=i,r["PT".concat(l)]=0,r["PF".concat(l)]=o}return j(j({},t),{Fltr:j({_name:"Oil Paint Plugin",_classID:"PbPl",KnNm:e.filter.name,GpuY:e.filter.gpu,LIWy:e.filter.lighting,FPth:"1"},r),filterID:1348620396})}case"oil paint":return j(j({},t),{Fltr:{_name:"Oil Paint",_classID:"oilPaint",lightingOn:e.filter.lightingOn,stylization:e.filter.stylization,cleanliness:e.filter.cleanliness,brushScale:e.filter.brushScale,microBrush:e.filter.microBrush,LghD:e.filter.lightDirection,specularity:e.filter.specularity},filterID:1122});case"liquify":return j(j({},t),{Fltr:{_name:"Liquify",_classID:"LqFy",LqMe:e.filter.liquifyMesh},filterID:1282492025});case"perspective warp":return j(j({},t),{Fltr:{_name:"Perspective Warp",_classID:"perspectiveWarpTransform",vertices:e.filter.vertices.map(cs),warpedVertices:e.filter.warpedVertices.map(cs),quads:e.filter.quads.map(function(s){return{indices:s}})},filterID:442});case"curves":return j(j({},t),{Fltr:j({_name:"Curves",_classID:"Crvs",presetKind:wg.encode(e.filter.presetKind)},e.filter.adjustments?{Adjs:e.filter.adjustments.map(function(s){return"curve"in s?{_name:"",_classID:"CrvA",Chnl:s.channels.map(os.encode),"Crv ":s.curve.map(function(u){return j({_name:"",_classID:"Pnt ",Hrzn:u.x,Vrtc:u.y},u.curved?{Cnty:!0}:{})})}:{_name:"",_classID:"CrvA",Chnl:s.channels.map(os.encode),Mpng:s.values}})}:{}),filterID:1131574899});case"brightness/contrast":return j(j({},t),{Fltr:{_name:"Brightness/Contrast",_classID:"BrgC",Brgh:e.filter.brightness,Cntr:e.filter.contrast,useLegacy:!!e.filter.useLegacy},filterID:1114793795});default:throw new Error("Unknow filter type: ".concat(e.type))}}function h3(e){if(e.warp)return e.warp;if(!e.width||!e.height)throw new Error("You must provide width and height of the linked image in placedLayer");var t=e.width,r=e.height,n=0,a=t/3,i=t*2/3,o=t,l=0,s=r/3,u=r*2/3,c=r;return{style:"custom",value:0,perspective:0,perspectiveOther:0,rotate:"horizontal",bounds:{top:{value:0,units:"Pixels"},left:{value:0,units:"Pixels"},bottom:{value:r,units:"Pixels"},right:{value:t,units:"Pixels"}},uOrder:4,vOrder:4,customEnvelopeWarp:{meshPoints:[{x:n,y:l},{x:a,y:l},{x:i,y:l},{x:o,y:l},{x:n,y:s},{x:a,y:s},{x:i,y:s},{x:o,y:s},{x:n,y:u},{x:a,y:u},{x:i,y:u},{x:o,y:u},{x:n,y:c},{x:a,y:c},{x:i,y:c},{x:o,y:c}]}}}ft("SoLd",Gt("placedLayer"),function(e,t,r){if(Wt(e)!=="soLD")throw new Error("Invalid SoLd type");var n=st(e);if(n!==4&&n!==5)throw new Error("Invalid SoLd version");var a=Tt(e,!0);t.placedLayer={id:a.Idnt,placed:a.placed,type:Qo[a.Type],pageNumber:a.PgNm,totalPages:a.totalPages,frameStep:an(a.frameStep),duration:an(a.duration),frameCount:a.frameCount,transform:a.Trnf,width:a["Sz "].Wdth,height:a["Sz "].Hght,resolution:Nt(a.Rslt),warp:f3(a.quiltWarp||a.warp)},a.nonAffineTransform&&a.nonAffineTransform.some(function(i,o){return i!==a.Trnf[o]})&&(t.placedLayer.nonAffineTransform=a.nonAffineTransform),a.Crop&&(t.placedLayer.crop=a.Crop),a.comp&&(t.placedLayer.comp=a.comp),a.compInfo&&(t.placedLayer.compInfo={compID:a.compInfo.compID,originalCompID:a.compInfo.originalCompID}),a.filterFX&&(t.placedLayer.filter=mT(a.filterFX,e)),nt(e,r())},function(e,t){var r,n;pt(e,"soLD"),ht(e,4);var a=t.placedLayer;if(!a.id||typeof a.id!="string"||!/^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$/.test(a.id))throw new Error("Placed layer ID must be in a GUID format (example: 20953ddb-9391-11ec-b4f1-c15674f50bc4)");var i=j(j({Idnt:a.id,placed:(r=a.placed)!==null&&r!==void 0?r:a.id,PgNm:a.pageNumber||1,totalPages:a.totalPages||1},a.crop?{Crop:a.crop}:{}),{frameStep:a.frameStep||{numerator:0,denominator:600},duration:a.duration||{numerator:0,denominator:600},frameCount:a.frameCount||0,Annt:16,Type:Qo.indexOf(a.type),Trnf:a.transform,nonAffineTransform:(n=a.nonAffineTransform)!==null&&n!==void 0?n:a.transform,warp:mu(h3(a)),"Sz ":{_name:"",_classID:"Pnt ",Wdth:a.width||0,Hght:a.height||0},Rslt:a.resolution?Zt(a.resolution,"resolution"):{units:"Density",value:72}});if(a.filter&&(i.filterFX={_name:"",_classID:"filterFXStyle",enab:a.filter.enabled,validAtPosition:a.filter.validAtPosition,filterMaskEnable:a.filter.maskEnabled,filterMaskLinked:a.filter.maskLinked,filterMaskExtendWithWhite:a.filter.maskExtendWithWhite,filterFXList:a.filter.list.map(function(l){return gT(l)})}),a.warp&&Cd(a.warp)){var o=mu(a.warp);i.quiltWarp=o,i.warp={warpStyle:"warpStyle.warpNone",warpValue:o.warpValue,warpPerspective:o.warpPerspective,warpPerspectiveOther:o.warpPerspectiveOther,warpRotate:o.warpRotate,bounds:o.bounds,uOrder:o.uOrder,vOrder:o.vOrder}}else delete i.quiltWarp;a.comp&&(i.comp=a.comp),a.compInfo&&(i.compInfo=a.compInfo),Dt(e,"","null",i,i.quiltWarp?"quiltWarp":"warp")}),Jo("SoLE","SoLd"),ft("fxrp",Gt("referencePoint"),function(e,t){t.referencePoint={x:Nn(e),y:Nn(e)}},function(e,t){$n(e,t.referencePoint.x),$n(e,t.referencePoint.y)}),ft("Lr16",function(){return!1},function(e,t,r,n,a){dd(e,n,a)},function(e,t){}),ft("Lr32",function(){return!1},function(e,t,r,n,a){dd(e,n,a)},function(e,t){}),ft("LMsk",Gt("userMask"),function(e,t){t.userMask={colorSpace:Ir(e),opacity:Ke(e)/255};var r=Ze(e);if(r!==128)throw new Error("Invalid flag value");nt(e,1)},function(e,t){var r=t.userMask;zr(e,r.colorSpace),Oe(e,Jf(r.opacity,0,1)*255),Ge(e,128),Rt(e,1)}),ft("Patt",function(e){return!e},function(e,t,r){r()&&nt(e,r())},function(e,t){});function p3(e){var t=st(e),r=st(e),n=st(e),a=st(e);return{top:t,left:r,bottom:n,right:a}}function v3(e,t){ht(e,t.top),ht(e,t.left),ht(e,t.bottom),ht(e,t.right)}ft("Anno",function(e){return e.annotations!==void 0},function(e,t,r){var n=Ke(e),a=Ke(e);if(n!==2||a!==1)throw new Error("Invalid Anno version");for(var i=De(e),o=[],l=0;l<i;l++){De(e);var s=Wt(e),u=!!Ze(e);Ze(e),Ke(e);var c=p3(e),f=p3(e),d=Ir(e),h=Jn(e,2),y=Jn(e,2),p=Jn(e,2);De(e),Wt(e);var x=De(e),g=void 0;if(s==="txtA")x>=2&&Ke(e)===65279?g=fd(e,(x-2)/2):(e.offset-=2,g=fu(e,x)),g=g.replace(/\r/g,`
|
|
291
|
+
`);else if(s==="sndA")g=dr(e,x);else throw new Error("Unknown annotation type");o.push({type:s==="txtA"?"text":"sound",open:u,iconLocation:c,popupLocation:f,color:d,author:h,name:y,date:p,data:g})}t.annotations=o,nt(e,r())},function(e,t){var r=t.annotations;Oe(e,2),Oe(e,1),Je(e,r.length);for(var n=0,a=r;n<a.length;n++){var i=a[n],o=i.type==="sound";if(o&&!(i.data instanceof Uint8Array))throw new Error("Sound annotation data should be Uint8Array");if(!o&&typeof i.data!="string")throw new Error("Text annotation data should be string");var l=e.offset;Je(e,0),pt(e,o?"sndA":"txtA"),Ge(e,i.open?1:0),Ge(e,28),Oe(e,1),v3(e,i.iconLocation),v3(e,i.popupLocation),zr(e,i.color),Ai(e,i.author||"",2),Ai(e,i.name||"",2),Ai(e,i.date||"",2);var s=e.offset;Je(e,0),pt(e,o?"sndM":"txtC"),Je(e,0);var u=e.offset;if(o)ta(e,i.data);else{Oe(e,65279);for(var c=i.data.replace(/\n/g,"\r"),f=0;f<c.length;f++)Oe(e,c.charCodeAt(f))}e.view.setUint32(l,e.offset-l,!1),e.view.setUint32(s,e.offset-s,!1),e.view.setUint32(u-4,e.offset-u,!1)}});function m3(e){ft(e,function(t){var r=t;return!(!r.linkedFiles||!r.linkedFiles.length||e==="lnkE"&&!r.linkedFiles.some(function(n){return n.linkedFile}))},function(t,r,n,a){var i=r;for(i.linkedFiles=i.linkedFiles||[];n()>8;){var o=kd(t),l=t.offset,s=Wt(t),u=st(t),c=Jn(t,1),f=_r(t),d=Wt(t).trim(),h=Wt(t).trim(),y=kd(t),p=Ze(t),x=p?Tt(t):void 0,g=s==="liFE"?Tt(t):void 0,m={id:c,name:f};if(d&&(m.type=d),h&&(m.creator=h),x&&(m.descriptor={compInfo:{compID:x.compInfo.compID,originalCompID:x.compInfo.originalCompID}}),s==="liFE"&&u>3){var b=st(t),v=Ze(t),S=Ze(t),C=Ze(t),A=Ze(t),_=Nn(t),E=Math.floor(_),M=(_-E)*1e3;m.time=new Date(Date.UTC(b,v,S,C,A,E,M)).toISOString()}var z=s==="liFE"?kd(t):0;for(s==="liFA"&&nt(t,8),s==="liFD"&&(m.data=dr(t,y)),u>=5&&(m.childDocumentID=_r(t)),u>=6&&(m.assetModTime=Nn(t)),u>=7&&(m.assetLockedState=Ze(t)),s==="liFE"&&u===2&&(m.data=dr(t,z)),t.skipLinkedFilesData&&(m.data=void 0),e==="lnkE"&&(m.linkedFile={fileSize:z,name:(g==null?void 0:g["Nm "])||"",fullPath:(g==null?void 0:g.fullPath)||"",originalPath:(g==null?void 0:g.originalPath)||"",relativePath:(g==null?void 0:g.relPath)||""}),i.linkedFiles.push(m);o%4;)o++;t.offset=l+o}nt(t,n())},function(t,r){for(var n,a,i,o,l,s,u,c,f,d=r,h=0,y=d.linkedFiles;h<y.length;h++){var p=y[h];if(e==="lnkE"==!!p.linkedFile){var x=2;p.assetLockedState!=null?x=7:p.assetModTime!=null?x=6:p.childDocumentID!=null?x=5:e==="lnkE"&&(x=3),Sd(t,0);var g=t.offset;if(pt(t,e==="lnkE"?"liFE":p.data?"liFD":"liFA"),ht(t,x),!p.id||typeof p.id!="string"||!/^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$/.test(p.id))throw new Error("Linked file ID must be in a GUID format (example: 20953ddb-9391-11ec-b4f1-c15674f50bc4)");if(Ai(t,p.id,1),Ji(t,p.name||""),pt(t,p.type?"".concat(p.type," ").substring(0,4):" "),pt(t,p.creator?"".concat(p.creator," ").substring(0,4):"\0\0\0\0"),Sd(t,p.data?p.data.byteLength:0),p.descriptor&&p.descriptor.compInfo){var m={compInfo:{compID:p.descriptor.compInfo.compID,originalCompID:p.descriptor.compInfo.originalCompID}};Ge(t,1),Dt(t,"","null",m)}else Ge(t,0);if(e==="lnkE"){var m={descVersion:2,"Nm ":(a=(n=p.linkedFile)===null||n===void 0?void 0:n.name)!==null&&a!==void 0?a:"",fullPath:(o=(i=p.linkedFile)===null||i===void 0?void 0:i.fullPath)!==null&&o!==void 0?o:"",originalPath:(s=(l=p.linkedFile)===null||l===void 0?void 0:l.originalPath)!==null&&s!==void 0?s:"",relPath:(c=(u=p.linkedFile)===null||u===void 0?void 0:u.relativePath)!==null&&c!==void 0?c:""};Dt(t,"","ExternalFileLink",m);var b=p.time?new Date(p.time):new Date;ht(t,b.getUTCFullYear()),Ge(t,b.getUTCMonth()),Ge(t,b.getUTCDate()),Ge(t,b.getUTCHours()),Ge(t,b.getUTCMinutes()),$n(t,b.getUTCSeconds()+b.getUTCMilliseconds()/1e3)}p.data?ta(t,p.data):Sd(t,((f=p.linkedFile)===null||f===void 0?void 0:f.fileSize)||0),x>=5&&Ji(t,p.childDocumentID||""),x>=6&&$n(t,p.assetModTime||0),x>=7&&Ge(t,p.assetLockedState||0);var v=t.offset-g;for(t.view.setUint32(g-4,v,!1);v%4;)v++,Ge(t,0)}}})}m3("lnk2"),m3("lnkE"),Jo("lnkD","lnk2"),Jo("lnk3","lnk2"),ft("pths",Gt("pathList"),function(e,t){Tt(e,!0),t.pathList=[]},function(e,t){var r={pathList:[]};Dt(e,"","pathsDataClass",r)}),ft("lyvr",Gt("version"),function(e,t){return t.version=De(e)},function(e,t){return Je(e,t.version)}),ft("lfxs",function(){return!1},function(e,t,r){var n=De(e);if(n!==0)throw new Error("Invalid lfxs version");var a=Tt(e);t.effects=ts(a,!!e.logMissingFeatures),nt(e,r())},function(e,t,r,n){var a=es(t.effects,!!n.logMissingFeatures,!0);Je(e,0),Dt(e,"","null",a)});function Wr(e){return function(t){return!!t.adjustment&&t.adjustment.type===e}}ft("brit",Wr("brightness/contrast"),function(e,t,r){t.adjustment||(t.adjustment={type:"brightness/contrast",brightness:Et(e),contrast:Et(e),meanValue:Et(e),labColorOnly:!!Ze(e),useLegacy:!0}),nt(e,r())},function(e,t){var r,n=t.adjustment;Pt(e,n.brightness||0),Pt(e,n.contrast||0),Pt(e,(r=n.meanValue)!==null&&r!==void 0?r:127),Ge(e,n.labColorOnly?1:0),Rt(e,1)});function bu(e){var t=Et(e),r=Et(e),n=Et(e),a=Et(e),i=Et(e)/100;return{shadowInput:t,highlightInput:r,shadowOutput:n,highlightOutput:a,midtoneInput:i}}function fs(e,t){Pt(e,t.shadowInput),Pt(e,t.highlightInput),Pt(e,t.shadowOutput),Pt(e,t.highlightOutput),Pt(e,Math.round(t.midtoneInput*100))}ft("levl",Wr("levels"),function(e,t,r){if(Ke(e)!==2)throw new Error("Invalid levl version");t.adjustment=j(j({},t.adjustment),{type:"levels",rgb:bu(e),red:bu(e),green:bu(e),blue:bu(e)}),nt(e,r())},function(e,t){var r=t.adjustment,n={shadowInput:0,highlightInput:255,shadowOutput:0,highlightOutput:255,midtoneInput:1};Oe(e,2),fs(e,r.rgb||n),fs(e,r.red||n),fs(e,r.blue||n),fs(e,r.green||n);for(var a=0;a<59;a++)fs(e,n)});function yu(e){for(var t=Ke(e),r=[],n=0;n<t;n++){var a=Et(e),i=Et(e);r.push({input:i,output:a})}return r}function Si(e,t){Oe(e,t.length);for(var r=0,n=t;r<n.length;r++){var a=n[r];Oe(e,a.output),Oe(e,a.input)}}ft("curv",Wr("curves"),function(e,t,r){if(Ze(e),Ke(e)!==1)throw new Error("Invalid curv version");Ke(e);var n=Ke(e),a={type:"curves"};n&1&&(a.rgb=yu(e)),n&2&&(a.red=yu(e)),n&4&&(a.green=yu(e)),n&8&&(a.blue=yu(e)),t.adjustment=j(j({},t.adjustment),a),nt(e,r())},function(e,t){var r=t.adjustment,n=r.rgb,a=r.red,i=r.green,o=r.blue,l=0,s=0;n&&n.length&&(l|=1,s++),a&&a.length&&(l|=2,s++),i&&i.length&&(l|=4,s++),o&&o.length&&(l|=8,s++),Ge(e,0),Oe(e,1),Oe(e,0),Oe(e,l),n&&n.length&&Si(e,n),a&&a.length&&Si(e,a),i&&i.length&&Si(e,i),o&&o.length&&Si(e,o),pt(e,"Crv "),Oe(e,4),Oe(e,0),Oe(e,s),n&&n.length&&(Oe(e,0),Si(e,n)),a&&a.length&&(Oe(e,1),Si(e,a)),i&&i.length&&(Oe(e,2),Si(e,i)),o&&o.length&&(Oe(e,3),Si(e,o))}),ft("expA",Wr("exposure"),function(e,t,r){if(Ke(e)!==1)throw new Error("Invalid expA version");t.adjustment=j(j({},t.adjustment),{type:"exposure",exposure:Yn(e),offset:Yn(e),gamma:Yn(e)}),nt(e,r())},function(e,t){var r=t.adjustment;Oe(e,1),Qn(e,r.exposure),Qn(e,r.offset),Qn(e,r.gamma),Rt(e,2)}),ft("vibA",Wr("vibrance"),function(e,t,r){var n=Tt(e);t.adjustment={type:"vibrance"},n.vibrance!==void 0&&(t.adjustment.vibrance=n.vibrance),n.Strt!==void 0&&(t.adjustment.saturation=n.Strt),nt(e,r())},function(e,t){var r=t.adjustment,n={};r.vibrance!==void 0&&(n.vibrance=r.vibrance),r.saturation!==void 0&&(n.Strt=r.saturation),Dt(e,"","null",n)});function Yi(e){return{a:Et(e),b:Et(e),c:Et(e),d:Et(e),hue:Et(e),saturation:Et(e),lightness:Et(e)}}function Zi(e,t){var r=t||{};Pt(e,r.a||0),Pt(e,r.b||0),Pt(e,r.c||0),Pt(e,r.d||0),Pt(e,r.hue||0),Pt(e,r.saturation||0),Pt(e,r.lightness||0)}ft("hue2",Wr("hue/saturation"),function(e,t,r){if(Ke(e)!==2)throw new Error("Invalid hue2 version");t.adjustment=j(j({},t.adjustment),{type:"hue/saturation",master:Yi(e),reds:Yi(e),yellows:Yi(e),greens:Yi(e),cyans:Yi(e),blues:Yi(e),magentas:Yi(e)}),nt(e,r())},function(e,t){var r=t.adjustment;Oe(e,2),Zi(e,r.master),Zi(e,r.reds),Zi(e,r.yellows),Zi(e,r.greens),Zi(e,r.cyans),Zi(e,r.blues),Zi(e,r.magentas)});function Ed(e){return{cyanRed:Et(e),magentaGreen:Et(e),yellowBlue:Et(e)}}function Td(e,t){Pt(e,t.cyanRed||0),Pt(e,t.magentaGreen||0),Pt(e,t.yellowBlue||0)}ft("blnc",Wr("color balance"),function(e,t,r){t.adjustment={type:"color balance",shadows:Ed(e),midtones:Ed(e),highlights:Ed(e),preserveLuminosity:!!Ze(e)},nt(e,r())},function(e,t){var r=t.adjustment;Td(e,r.shadows||{}),Td(e,r.midtones||{}),Td(e,r.highlights||{}),Ge(e,r.preserveLuminosity?1:0),Rt(e,1)}),ft("blwh",Wr("black & white"),function(e,t,r){var n=Tt(e);t.adjustment={type:"black & white",reds:n["Rd "],yellows:n.Yllw,greens:n["Grn "],cyans:n["Cyn "],blues:n["Bl "],magentas:n.Mgnt,useTint:!!n.useTint,presetKind:n.bwPresetKind,presetFileName:n.blackAndWhitePresetFileName},n.tintColor!==void 0&&(t.adjustment.tintColor=Kn(n.tintColor)),nt(e,r())},function(e,t){var r=t.adjustment,n={"Rd ":r.reds||0,Yllw:r.yellows||0,"Grn ":r.greens||0,"Cyn ":r.cyans||0,"Bl ":r.blues||0,Mgnt:r.magentas||0,useTint:!!r.useTint,tintColor:Xn(r.tintColor),bwPresetKind:r.presetKind||0,blackAndWhitePresetFileName:r.presetFileName||""};Dt(e,"","null",n)}),ft("phfl",Wr("photo filter"),function(e,t,r){var n=Ke(e);if(n!==2&&n!==3)throw new Error("Invalid phfl version");var a;n===2?a=Ir(e):a={l:st(e)/100,a:st(e)/100,b:st(e)/100},t.adjustment={type:"photo filter",color:a,density:De(e)/100,preserveLuminosity:!!Ze(e)},nt(e,r())},function(e,t){var r=t.adjustment;Oe(e,2),zr(e,r.color||{l:0,a:0,b:0}),Je(e,(r.density||0)*100),Ge(e,r.preserveLuminosity?1:0),Rt(e,3)});function xu(e){var t=Et(e),r=Et(e),n=Et(e);nt(e,2);var a=Et(e);return{red:t,green:r,blue:n,constant:a}}function ds(e,t){var r=t||{};Pt(e,r.red),Pt(e,r.green),Pt(e,r.blue),Rt(e,2),Pt(e,r.constant)}ft("mixr",Wr("channel mixer"),function(e,t,r){if(Ke(e)!==1)throw new Error("Invalid mixr version");var n=t.adjustment=j(j({},t.adjustment),{type:"channel mixer",monochrome:!!Ke(e)});n.monochrome||(n.red=xu(e),n.green=xu(e),n.blue=xu(e)),n.gray=xu(e),nt(e,r())},function(e,t){var r=t.adjustment;Oe(e,1),Oe(e,r.monochrome?1:0),r.monochrome?(ds(e,r.gray),Rt(e,3*5*2)):(ds(e,r.red),ds(e,r.green),ds(e,r.blue),ds(e,r.gray))});var g3=vt("colorLookupType","3DLUT",{"3dlut":"3DLUT",abstractProfile:"abstractProfile",deviceLinkProfile:"deviceLinkProfile"}),b3=vt("LUTFormatType","look",{look:"LUTFormatLOOK",cube:"LUTFormatCUBE","3dl":"LUTFormat3DL"}),_u=vt("colorLookupOrder","rgb",{rgb:"rgbOrder",bgr:"bgrOrder"});ft("clrL",Wr("color lookup"),function(e,t,r){if(Ke(e)!==1)throw new Error("Invalid clrL version");var n=Tt(e);t.adjustment={type:"color lookup"};var a=t.adjustment;n.lookupType!==void 0&&(a.lookupType=g3.decode(n.lookupType)),n["Nm "]!==void 0&&(a.name=n["Nm "]),n.Dthr!==void 0&&(a.dither=n.Dthr),n.profile!==void 0&&(a.profile=n.profile),n.LUTFormat!==void 0&&(a.lutFormat=b3.decode(n.LUTFormat)),n.dataOrder!==void 0&&(a.dataOrder=_u.decode(n.dataOrder)),n.tableOrder!==void 0&&(a.tableOrder=_u.decode(n.tableOrder)),n.LUT3DFileData!==void 0&&(a.lut3DFileData=n.LUT3DFileData),n.LUT3DFileName!==void 0&&(a.lut3DFileName=n.LUT3DFileName),nt(e,r())},function(e,t){var r=t.adjustment,n={};r.lookupType!==void 0&&(n.lookupType=g3.encode(r.lookupType)),r.name!==void 0&&(n["Nm "]=r.name),r.dither!==void 0&&(n.Dthr=r.dither),r.profile!==void 0&&(n.profile=r.profile),r.lutFormat!==void 0&&(n.LUTFormat=b3.encode(r.lutFormat)),r.dataOrder!==void 0&&(n.dataOrder=_u.encode(r.dataOrder)),r.tableOrder!==void 0&&(n.tableOrder=_u.encode(r.tableOrder)),r.lut3DFileData!==void 0&&(n.LUT3DFileData=r.lut3DFileData),r.lut3DFileName!==void 0&&(n.LUT3DFileName=r.lut3DFileName),Oe(e,1),Dt(e,"","null",n)}),ft("nvrt",Wr("invert"),function(e,t,r){t.adjustment={type:"invert"},nt(e,r())},function(){}),ft("post",Wr("posterize"),function(e,t,r){t.adjustment={type:"posterize",levels:Ke(e)},nt(e,r())},function(e,t){var r,n=t.adjustment;Oe(e,(r=n.levels)!==null&&r!==void 0?r:4),Rt(e,2)}),ft("thrs",Wr("threshold"),function(e,t,r){t.adjustment={type:"threshold",level:Ke(e)},nt(e,r())},function(e,t){var r,n=t.adjustment;Oe(e,(r=n.level)!==null&&r!==void 0?r:128),Rt(e,2)});var y3=["","","","rgb","hsb","","lab"];ft("grdm",Wr("gradient map"),function(e,t,r){var n=Ke(e);if(n!==1&&n!==3)throw new Error("Invalid grdm version");var a={type:"gradient map",gradientType:"solid"};a.reverse=!!Ze(e),a.dither=!!Ze(e);var i=!!Ze(e);if(e.offset--,i){var o=Wt(e);a.method=Go.decode(o)}a.name=_r(e),a.colorStops=[],a.opacityStops=[];for(var l=Ke(e),s=0;s<l;s++)a.colorStops.push({location:De(e),midpoint:De(e)/100,color:Ir(e)}),nt(e,2);for(var u=Ke(e),s=0;s<u;s++)a.opacityStops.push({location:De(e),midpoint:De(e)/100,opacity:Ke(e)/255});var c=Ke(e);if(c!==2)throw new Error("Invalid grdm expansion count");var f=Ke(e);a.smoothness=f/4096;var d=Ke(e);if(d!==32)throw new Error("Invalid grdm length");a.gradientType=Ke(e)?"noise":"solid",a.randomSeed=De(e),a.addTransparency=!!Ke(e),a.restrictColors=!!Ke(e),a.roughness=De(e)/4096,a.colorModel=y3[Ke(e)]||"rgb",a.min=[Ke(e)/32768,Ke(e)/32768,Ke(e)/32768,Ke(e)/32768],a.max=[Ke(e)/32768,Ke(e)/32768,Ke(e)/32768,Ke(e)/32768],nt(e,r());for(var h=0,y=a.colorStops;h<y.length;h++){var p=y[h];p.location/=f}for(var x=0,g=a.opacityStops;x<g.length;x++){var p=g[x];p.location/=f}t.adjustment=a},function(e,t){var r,n,a,i=t.adjustment;Oe(e,i.method!==void 0?3:1),Ge(e,i.reverse?1:0),Ge(e,i.dither?1:0),i.method!==void 0&&pt(e,Go.encode(i.method)),Ji(e,i.name||""),Oe(e,i.colorStops&&i.colorStops.length||0);for(var o=Math.round(((r=i.smoothness)!==null&&r!==void 0?r:1)*4096),l=0,s=i.colorStops||[];l<s.length;l++){var u=s[l];Je(e,Math.round(u.location*o)),Je(e,Math.round(u.midpoint*100)),zr(e,u.color),Rt(e,2)}Oe(e,i.opacityStops&&i.opacityStops.length||0);for(var c=0,f=i.opacityStops||[];c<f.length;c++){var u=f[c];Je(e,Math.round(u.location*o)),Je(e,Math.round(u.midpoint*100)),Oe(e,Math.round(u.opacity*255))}Oe(e,2),Oe(e,o),Oe(e,32),Oe(e,i.gradientType==="noise"?1:0),Je(e,i.randomSeed||0),Oe(e,i.addTransparency?1:0),Oe(e,i.restrictColors?1:0),Je(e,Math.round(((n=i.roughness)!==null&&n!==void 0?n:1)*4096));var d=y3.indexOf((a=i.colorModel)!==null&&a!==void 0?a:"rgb");Oe(e,d===-1?3:d);for(var h=0;h<4;h++)Oe(e,Math.round((i.min&&i.min[h]||0)*32768));for(var h=0;h<4;h++)Oe(e,Math.round((i.max&&i.max[h]||0)*32768));Rt(e,4)});function Za(e){return{c:Et(e),m:Et(e),y:Et(e),k:Et(e)}}function Ja(e,t){var r=t||{};Pt(e,r.c),Pt(e,r.m),Pt(e,r.y),Pt(e,r.k)}ft("selc",Wr("selective color"),function(e,t){if(Ke(e)!==1)throw new Error("Invalid selc version");var r=Ke(e)?"absolute":"relative";nt(e,8),t.adjustment={type:"selective color",mode:r,reds:Za(e),yellows:Za(e),greens:Za(e),cyans:Za(e),blues:Za(e),magentas:Za(e),whites:Za(e),neutrals:Za(e),blacks:Za(e)}},function(e,t){var r=t.adjustment;Oe(e,1),Oe(e,r.mode==="absolute"?1:0),Rt(e,8),Ja(e,r.reds),Ja(e,r.yellows),Ja(e,r.greens),Ja(e,r.cyans),Ja(e,r.blues),Ja(e,r.magentas),Ja(e,r.whites),Ja(e,r.neutrals),Ja(e,r.blacks)}),ft("CgEd",function(e){var t=e.adjustment;return t?t.type==="brightness/contrast"&&!t.useLegacy||(t.type==="levels"||t.type==="curves"||t.type==="exposure"||t.type==="channel mixer"||t.type==="hue/saturation")&&t.presetFileName!==void 0:!1},function(e,t,r){var n=Tt(e);if(n.Vrsn!==1)throw new Error("Invalid CgEd version");"presetFileName"in n?t.adjustment=j(j({},t.adjustment),{presetKind:n.presetKind,presetFileName:n.presetFileName}):"curvesPresetFileName"in n?t.adjustment=j(j({},t.adjustment),{presetKind:n.curvesPresetKind,presetFileName:n.curvesPresetFileName}):"mixerPresetFileName"in n?t.adjustment=j(j({},t.adjustment),{presetKind:n.mixerPresetKind,presetFileName:n.mixerPresetFileName}):t.adjustment={type:"brightness/contrast",brightness:n.Brgh,contrast:n.Cntr,meanValue:n.means,useLegacy:!!n.useLegacy,labColorOnly:!!n["Lab "],auto:!!n.Auto},nt(e,r())},function(e,t){var r,n,a,i,o=t.adjustment;if(o.type==="levels"||o.type==="exposure"||o.type==="hue/saturation"){var l={Vrsn:1,presetKind:(r=o.presetKind)!==null&&r!==void 0?r:1,presetFileName:o.presetFileName||""};Dt(e,"","null",l)}else if(o.type==="curves"){var l={Vrsn:1,curvesPresetKind:(n=o.presetKind)!==null&&n!==void 0?n:1,curvesPresetFileName:o.presetFileName||""};Dt(e,"","null",l)}else if(o.type==="channel mixer"){var l={Vrsn:1,mixerPresetKind:(a=o.presetKind)!==null&&a!==void 0?a:1,mixerPresetFileName:o.presetFileName||""};Dt(e,"","null",l)}else if(o.type==="brightness/contrast"){var l={Vrsn:1,Brgh:o.brightness||0,Cntr:o.contrast||0,means:(i=o.meanValue)!==null&&i!==void 0?i:127,"Lab ":!!o.labColorOnly,useLegacy:!!o.useLegacy,Auto:!!o.auto};Dt(e,"","null",l)}else throw new Error("Unhandled CgEd case")});function bT(e){var t=[];function r(n){var a;if(n.children)for(var i=0,o=n.children;i<o.length;i++){var l=o[i];((a=l.text)===null||a===void 0?void 0:a.index)!==void 0&&(t[l.text.index]=l),r(l)}}return r(e),t}ft("Txt2",Gt("engineData"),function(e,t,r,n){var a=dr(e,r());t.engineData=r4(a);var i=bT(n),o=Zg(a),l=cT(o),s=l.ResourceDict.TextFrameSet;if(s)for(var u=0;u<s.length;u++){var c=i[u];s[u].path&&(c!=null&&c.text)&&(c.text.textPath=s[u].path)}},function(e,t){var r=t4(t.engineData);ta(e,r)}),ft("FEid",Gt("filterEffectsMasks"),function(e,t,r){var n=st(e);if(n<1||n>3)throw new Error("Invalid filterEffects version ".concat(n));for(t.filterEffectsMasks=[];r()>8;){if(De(e))throw new Error("filterEffects: 64 bit length is not supported");var a=De(e),i=e.offset+a,o=Jn(e,1),l=st(e);if(l!==1)throw new Error("Invalid filterEffect version ".concat(l));if(De(e))throw new Error("filterEffect: 64 bit length is not supported");De(e);for(var s=st(e),u=st(e),c=st(e),f=st(e),d=st(e),h=st(e),y=[],p=0;p<h+2;p++){var x=st(e);if(x){if(De(e))throw new Error("filterEffect: 64 bit length is not supported");var g=De(e);if(!g)throw new Error("filterEffect: Empty channel");var m=Ke(e),b=dr(e,g-2);y.push({compressionMode:m,data:b})}else y.push(void 0)}if(t.filterEffectsMasks.push({id:o,top:s,left:u,bottom:c,right:f,depth:d,channels:y}),e.offset<i&&Ze(e)){var v=st(e),S=st(e),C=st(e),A=st(e);if(De(e))throw new Error("filterEffect: 64 bit length is not supported");var _=De(e),m=Ke(e),b=dr(e,_-2);t.filterEffectsMasks[t.filterEffectsMasks.length-1].extra={top:v,left:S,bottom:C,right:A,compressionMode:m,data:b}}e.offset=i;for(var E=a;E%4;)e.offset++,E++}},function(e,t){var r;ht(e,3);for(var n=0,a=t.filterEffectsMasks;n<a.length;n++){var i=a[n];Je(e,0),Je(e,0);var o=e.offset;Ai(e,i.id,1),ht(e,1),Je(e,0),Je(e,0);var l=e.offset;ht(e,i.top),ht(e,i.left),ht(e,i.bottom),ht(e,i.right),ht(e,i.depth);var s=Math.max(0,i.channels.length-2);ht(e,s);for(var u=0;u<s+2;u++){var c=i.channels[u];ht(e,c?1:0),c&&(Je(e,0),Je(e,c.data.length+2),Oe(e,c.compressionMode),ta(e,c.data))}e.view.setUint32(l-4,e.offset-l,!1);var f=(r=t.filterEffectsMasks[t.filterEffectsMasks.length-1])===null||r===void 0?void 0:r.extra;f&&(Ge(e,1),ht(e,f.top),ht(e,f.left),ht(e,f.bottom),ht(e,f.right),Je(e,0),Je(e,f.data.byteLength+2),Oe(e,f.compressionMode),ta(e,f.data));var d=e.offset-o;for(e.view.setUint32(o-4,d,!1);d%4;)Rt(e,1),d++}}),Jo("FXid","FEid"),ft("FMsk",Gt("filterMask"),function(e,t){t.filterMask={colorSpace:Ir(e),opacity:Ke(e)/255}},function(e,t){var r;zr(e,t.filterMask.colorSpace),Oe(e,Jf((r=t.filterMask.opacity)!==null&&r!==void 0?r:1,0,1)*255)}),ft("artd",function(e){return e.artboards!==void 0},function(e,t,r){var n=Tt(e);t.artboards={count:n["Cnt "],autoExpandOffset:{horizontal:n.autoExpandOffset.Hrzn,vertical:n.autoExpandOffset.Vrtc},origin:{horizontal:n.origin.Hrzn,vertical:n.origin.Vrtc},autoExpandEnabled:n.autoExpandEnabled,autoNestEnabled:n.autoNestEnabled,autoPositionEnabled:n.autoPositionEnabled,shrinkwrapOnSaveEnabled:!!n.shrinkwrapOnSaveEnabled,docDefaultNewArtboardBackgroundColor:Kn(n.docDefaultNewArtboardBackgroundColor),docDefaultNewArtboardBackgroundType:n.docDefaultNewArtboardBackgroundType},nt(e,r())},function(e,t){var r,n,a,i,o,l=t.artboards,s={"Cnt ":l.count,autoExpandOffset:l.autoExpandOffset?{Hrzn:l.autoExpandOffset.horizontal,Vrtc:l.autoExpandOffset.vertical}:{Hrzn:0,Vrtc:0},origin:l.origin?{Hrzn:l.origin.horizontal,Vrtc:l.origin.vertical}:{Hrzn:0,Vrtc:0},autoExpandEnabled:(r=l.autoExpandEnabled)!==null&&r!==void 0?r:!0,autoNestEnabled:(n=l.autoNestEnabled)!==null&&n!==void 0?n:!0,autoPositionEnabled:(a=l.autoPositionEnabled)!==null&&a!==void 0?a:!0,shrinkwrapOnSaveEnabled:(i=l.shrinkwrapOnSaveEnabled)!==null&&i!==void 0?i:!0,docDefaultNewArtboardBackgroundColor:Xn(l.docDefaultNewArtboardBackgroundColor),docDefaultNewArtboardBackgroundType:(o=l.docDefaultNewArtboardBackgroundType)!==null&&o!==void 0?o:1};Dt(e,"","null",s,"artd")});function x3(e){return Object.keys(e).map(function(t){return e[t]}).some(function(t){return Array.isArray(t)&&t.length>1})}ft("lfx2",function(e){return e.effects!==void 0&&!x3(e.effects)},function(e,t,r){var n=De(e);if(n!==0)throw new Error("Invalid lfx2 version");var a=Tt(e);t.effects=ts(a,!!e.logMissingFeatures),nt(e,r())},function(e,t,r,n){var a=es(t.effects,!!n.logMissingFeatures,!0);Je(e,0),Dt(e,"","null",a)}),ft("cinf",Gt("compositorUsed"),function(e,t,r){var n=Tt(e);function a(i){return i.split(".")[1]}t.compositorUsed={description:n.description,reason:n.reason,engine:a(n.Engn)},n.Vrsn&&(t.compositorUsed.version=n.Vrsn),n.psVersion&&(t.compositorUsed.photoshopVersion=n.psVersion),n.enableCompCore&&(t.compositorUsed.enableCompCore=a(n.enableCompCore)),n.enableCompCoreGPU&&(t.compositorUsed.enableCompCoreGPU=a(n.enableCompCoreGPU)),n.enableCompCoreThreads&&(t.compositorUsed.enableCompCoreThreads=a(n.enableCompCoreThreads)),n.compCoreSupport&&(t.compositorUsed.compCoreSupport=a(n.compCoreSupport)),n.compCoreGPUSupport&&(t.compositorUsed.compCoreGPUSupport=a(n.compCoreGPUSupport)),nt(e,r())},function(e,t){var r=t.compositorUsed,n={Vrsn:r.version||{major:1,minor:0,fix:0}};r.photoshopVersion&&(n.psVersion=r.photoshopVersion),n.description=r.description,n.reason=r.reason,n.Engn="Engn.".concat(r.engine),r.enableCompCore&&(n.enableCompCore="enable.".concat(r.enableCompCore)),r.enableCompCoreGPU&&(n.enableCompCoreGPU="enable.".concat(r.enableCompCoreGPU)),r.enableCompCoreThreads&&(n.enableCompCoreThreads="enable.".concat(r.enableCompCoreThreads)),r.compCoreSupport&&(n.compCoreSupport="reason.".concat(r.compCoreSupport)),r.compCoreGPUSupport&&(n.compCoreGPUSupport="reason.".concat(r.compCoreGPUSupport)),Dt(e,"","null",n)}),ft("extn",function(e){return e._extn!==void 0},function(e,t){Tt(e)},function(e,t){}),ft("iOpa",Gt("fillOpacity"),function(e,t){t.fillOpacity=Ze(e)/255,nt(e,3)},function(e,t){Ge(e,t.fillOpacity*255),Rt(e,3)}),ft("brst",Gt("channelBlendingRestrictions"),function(e,t,r){for(t.channelBlendingRestrictions=[];r()>4;)t.channelBlendingRestrictions.push(st(e))},function(e,t){for(var r=0,n=t.channelBlendingRestrictions;r<n.length;r++){var a=n[r];ht(e,a)}}),ft("tsly",Gt("transparencyShapesLayer"),function(e,t){t.transparencyShapesLayer=!!Ze(e),nt(e,3)},function(e,t){Ge(e,t.transparencyShapesLayer?1:0),Rt(e,3)});var Ci=function(){return Ci=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},Ci.apply(this,arguments)};function _3(e){e===void 0&&(e=4096);var t=new ArrayBuffer(e),r=new DataView(t),n=0;return{buffer:t,view:r,offset:n,tempBuffer:void 0}}function yT(e){return e.buffer.slice(0,e.offset)}function xT(e){return new Uint8Array(e.buffer,0,e.offset)}function Ge(e,t){var r=Qa(e,1);e.view.setUint8(r,t)}function Pt(e,t){var r=Qa(e,2);e.view.setInt16(r,t,!1)}function Oe(e,t){var r=Qa(e,2);e.view.setUint16(r,t,!1)}function _T(e,t){var r=Qa(e,2);e.view.setUint16(r,t,!0)}function ht(e,t){var r=Qa(e,4);e.view.setInt32(r,t,!1)}function w3(e,t){var r=Qa(e,4);e.view.setInt32(r,t,!0)}function Je(e,t){var r=Qa(e,4);e.view.setUint32(r,t,!1)}function Qn(e,t){var r=Qa(e,4);e.view.setFloat32(r,t,!1)}function $n(e,t){var r=Qa(e,8);e.view.setFloat64(r,t,!1)}function An(e,t){ht(e,t*65536)}function ea(e,t){ht(e,t*(1<<24))}function ta(e,t){if(t){T3(e,e.offset+t.length);var r=new Uint8Array(e.buffer);r.set(t,e.offset),e.offset+=t.length}}function Rt(e,t){for(var r=0;r<t;r++)Ge(e,0)}function pt(e,t){if(t.length!==4)throw new Error("Invalid signature: '".concat(t,"'"));for(var r=0;r<4;r++)Ge(e,t.charCodeAt(r))}function wT(e,t){for(var r=0;r<t.length;r++)Ge(e,t.charCodeAt(r))}function Ai(e,t,r){var n=t.length;if(n>255)throw new Error("String too long");Ge(e,n);for(var a=0;a<n;a++){var i=t.charCodeAt(a);Ge(e,i<128?i:63)}for(;++n%r;)Ge(e,0)}function kT(e,t){for(var r=0;r<t.length;r++)Oe(e,t.charCodeAt(r))}function ST(e,t){for(var r=0;r<t.length;r++)_T(e,t.charCodeAt(r))}function En(e,t){Je(e,t.length),kT(e,t)}function Ji(e,t){Je(e,t.length+1);for(var r=0;r<t.length;r++)Oe(e,t.charCodeAt(r));Oe(e,0)}function k3(e){e===void 0&&(e=[]);for(var t=0,r=0,n=e;r<n.length;r++){var a=n[r];if(a.canvas||a.imageData){var i=Md(a),o=i.width,l=i.height;t=Math.max(t,2*l+2*o*l)}a.children&&(t=Math.max(t,k3(a.children)))}return t}function $r(e,t,r,n,a){n===void 0&&(n=!1),a===void 0&&(a=!1),a&&Je(e,0);var i=e.offset;Je(e,0),r();for(var o=e.offset-i-4,l=o;l%t;)Ge(e,0),l++;n&&(o=l),e.view.setUint32(i,o,!1)}function S3(e){var t;(t=e.children)===null||t===void 0||t.forEach(S3);var r=e.imageData;if(r&&(r.data instanceof Uint32Array||r.data instanceof Uint16Array))throw new Error("imageData has incorrect bitDepth");if("mask"in e&&e.mask){var n=e.mask.imageData;if(n&&(n.data instanceof Uint32Array||n.data instanceof Uint16Array))throw new Error("mask imageData has incorrect bitDepth")}}function C3(e,t,r){var n;if(r===void 0&&(r={}),!(+t.width>0&&+t.height>0))throw new Error("Invalid document size");if((t.width>3e4||t.height>3e4)&&!r.psb)throw new Error("Document size is too large (max is 30000x30000, use PSB format instead)");var a=(n=t.bitsPerChannel)!==null&&n!==void 0?n:8;if(a!==8)throw new Error("bitsPerChannel other than 8 are not supported for writing");S3(t);var i=Ci({},t.imageResources),o=Ci(Ci({},r),{layerIds:new Set,layerToId:new Map});o.generateThumbnail&&(i.thumbnail=DT(t));var l=t.imageData;if(!l&&t.canvas&&(l=t.canvas.getContext("2d").getImageData(0,0,t.canvas.width,t.canvas.height)),l&&(t.width!==l.width||t.height!==l.height))throw new Error("Document canvas must have the same size as document");var s=!!l&&Q2(l),u=Math.max(k3(t.children),4*2*t.width*t.height+2*t.height);e.tempBuffer=new Uint8Array(u),pt(e,"8BPS"),Oe(e,r.psb?2:1),Rt(e,6),Oe(e,s?4:3),Je(e,t.height),Je(e,t.width),Oe(e,a),Oe(e,3),$r(e,1,function(){var S,C,A;if(t.palette){for(var _=0;_<256;_++)Ge(e,((S=t.palette[_])===null||S===void 0?void 0:S.r)||0);for(var _=0;_<256;_++)Ge(e,((C=t.palette[_])===null||C===void 0?void 0:C.g)||0);for(var _=0;_<256;_++)Ge(e,((A=t.palette[_])===null||A===void 0?void 0:A.b)||0)}});var c=[];E3(c,t.children),c.length||c.push({}),i.layersGroup=c.map(function(S){return S.linkGroup||0}),i.layerGroupsEnabledId=c.map(function(S){return S.linkGroupEnabled==!1?0:1}),$r(e,1,function(){for(var S=function(E){for(var M=E.has(i),z=M===!1?0:M===!0?1:M,N=function($){pt(e,"8BIM"),Oe(e,E.key),Ai(e,"",2),$r(e,2,function(){return E.write(e,i,$)})},R=0;R<z;R++)N(R)},C=0,A=kg;C<A.length;C++){var _=A[C];S(_)}}),$r(e,2,function(){CT(e,c,t,s,o),TT(e,t.globalLayerMaskInfo),A3(e,t,t,o)},void 0,!!o.psb);var f=s?[0,1,2,3]:[0,1,2],d=l?l.width:t.width,h=l?l.height:t.height,y={data:new Uint8Array(d*h*4),width:d,height:h};Oe(e,1);{if(l&&y.data.set(new Uint8Array(l.data.buffer,l.data.byteOffset,l.data.byteLength)),s)for(var p=y.width*y.height*4,x=y.data,g=0;g<p;g+=4){var m=x[g+3];if(m!=0&&m!=255){var b=m/255,v=255*(1-b);x[g+0]=x[g+0]*b+v,x[g+1]=x[g+1]*b+v,x[g+2]=x[g+2]*b+v}}ta(e,Qf(e.tempBuffer,y,f,!!r.psb))}}function CT(e,t,r,n,a){$r(e,4,function(){var i;Pt(e,n?-t.length:t.length);for(var o=t.map(function(x,g){return IT(e.tempBuffer,x,g===0,a)}),l=function(x){var g=x.layer,m=x.top,b=x.left,v=x.bottom,S=x.right,C=x.channels;ht(e,m),ht(e,b),ht(e,v),ht(e,S),Oe(e,C.length);for(var A=0,_=C;A<_.length;A++){var E=_[A];Pt(e,E.channelId),a.psb&&Je(e,0),Je(e,E.length)}pt(e,"8BIM"),pt(e,Z0[g.blendMode]||"norm"),Ge(e,Math.round(Jf((i=g.opacity)!==null&&i!==void 0?i:1,0,1)*255)),Ge(e,g.clipping?1:0);var M=8;g.transparencyProtected&&(M|=1),g.hidden&&(M|=2),(g.vectorMask||g.sectionDivider&&g.sectionDivider.type!==0||g.adjustment)&&(M|=16),g.effectsOpen&&(M|=32),Ge(e,M),Ge(e,0),$r(e,1,function(){AT(e,g,x),ET(e,g),Ai(e,(g.name||"").substring(0,255),4),A3(e,g,r,a)})},s=0,u=o;s<u.length;s++){var c=u[s];l(c)}for(var f=0,d=o;f<d.length;f++)for(var c=d[f],h=0,y=c.channels;h<y.length;h++){var p=y[h];Oe(e,p.compression),p.buffer&&ta(e,p.buffer)}},!0,a.psb)}function AT(e,t,r){var n=t.mask,a=t.realMask;$r(e,1,function(){if(!(!n&&!a)){var i=0,o=0,l=0;n&&(n.userMaskDensity!==void 0&&(i|=1),n.userMaskFeather!==void 0&&(i|=2),n.vectorMaskDensity!==void 0&&(i|=4),n.vectorMaskFeather!==void 0&&(i|=8),n.disabled&&(o|=2),n.positionRelativeToLayer&&(o|=1),n.fromVectorData&&(o|=8),i&&(o|=16));var s=r.mask||{};if(ht(e,s.top||0),ht(e,s.left||0),ht(e,s.bottom||0),ht(e,s.right||0),Ge(e,n&&n.defaultColor||0),Ge(e,o),a){a.disabled&&(l|=2),a.positionRelativeToLayer&&(l|=1),a.fromVectorData&&(l|=8);var u=r.realMask||{};Ge(e,l),Ge(e,a.defaultColor||0),ht(e,u.top||0),ht(e,u.left||0),ht(e,u.bottom||0),ht(e,u.right||0)}i&&n&&(Ge(e,i),n.userMaskDensity!==void 0&&Ge(e,Math.round(n.userMaskDensity*255)),n.userMaskFeather!==void 0&&$n(e,n.userMaskFeather),n.vectorMaskDensity!==void 0&&Ge(e,Math.round(n.vectorMaskDensity*255)),n.vectorMaskFeather!==void 0&&$n(e,n.vectorMaskFeather)),Rt(e,2)}})}function wu(e,t){Ge(e,t[0]),Ge(e,t[1]),Ge(e,t[2]),Ge(e,t[3])}function ET(e,t){$r(e,1,function(){var r=t.blendingRanges;if(r){wu(e,r.compositeGrayBlendSource),wu(e,r.compositeGraphBlendDestinationRange);for(var n=0,a=r.ranges;n<a.length;n++){var i=a[n];wu(e,i.sourceRange),wu(e,i.destRange)}}})}function TT(e,t){$r(e,1,function(){t&&(Oe(e,t.overlayColorSpace),Oe(e,t.colorSpace1),Oe(e,t.colorSpace2),Oe(e,t.colorSpace3),Oe(e,t.colorSpace4),Oe(e,t.opacity*255),Ge(e,t.kind),Rt(e,3))})}function A3(e,t,r,n){for(var a=function(s){var u=s.key;if(u==="Txt2"&&n.invalidateTextLayers)return"continue";if(u==="vmsk"&&n.psb&&(u="vsms"),s.has(t)){var c=n.psb&&K2.indexOf(u)!==-1,f=u!=="Txt2"&&u!=="cinf"&&u!=="extn"&&u!=="CAI "&&u!=="OCIO",d=u==="Txt2"||u==="luni"||u==="vmsk"||u==="artb"||u==="artd"||u==="vogk"||u==="SoLd"||u==="lnk2"||u==="vscg"||u==="vsms"||u==="GdFl"||u==="lmfx"||u==="lrFX"||u==="cinf"||u==="PlLd"||u==="Anno"||u==="CAI "||u==="OCIO"||u==="GenI"||u==="FEid"||u==="curv"||u==="CgEd"||u==="vibA"||u==="blwh"||u==="grdm";pt(e,c?"8B64":"8BIM"),pt(e,u),$r(e,d?4:2,function(){s.write(e,t,r,n)},f,c)}},i=0,o=s3;i<o.length;i++){var l=o[i];a(l)}}function E3(e,t){if(t)for(var r=0,n=t;r<n.length;r++){var a=n[r];if(a.children&&a.canvas)throw new Error("Invalid layer, cannot have both 'canvas' and 'children' properties");if(a.children&&a.imageData)throw new Error("Invalid layer, cannot have both 'imageData' and 'children' properties");a.children?(e.push({name:"</Layer group>",sectionDivider:{type:3}}),E3(e,a.children),e.push(Ci(Ci({},a),{blendMode:a.blendMode==="pass through"?"normal":a.blendMode,sectionDivider:{type:a.opened===!1?2:1,key:Z0[a.blendMode]||"pass",subType:0}}))):e.push(Ci({},a))}}function MT(e,t){var r=e.buffer.byteLength;do r*=2;while(t>r);var n=new ArrayBuffer(r),a=new Uint8Array(n),i=new Uint8Array(e.buffer);a.set(i),e.buffer=n,e.view=new DataView(e.buffer)}function T3(e,t){t>e.buffer.byteLength&&MT(e,t)}function Qa(e,t){var r=e.offset;return T3(e,e.offset+=t),r}function DT(e){var t=No(10,10),r=1;e.width>e.height?(t.width=160,t.height=Math.floor(e.height*(t.width/e.width)),r=t.width/e.width):(t.height=160,t.width=Math.floor(e.width*(t.height/e.height)),r=t.height/e.height);var n=t.getContext("2d");return n.scale(r,r),e.imageData?n.drawImage(J0(e.imageData),0,0):e.canvas&&n.drawImage(e.canvas,0,0),t}function M3(e,t,r,n,a,i){var o=n.top|0,l=n.left|0,s=n.right|0,u=n.bottom|0,c=Md(n),f=c.width,d=c.height,h=n.imageData;if(!h&&n.canvas&&f&&d&&(h=n.canvas.getContext("2d").getImageData(0,0,f,d)),h&&(h.width!==f||h.height!==d))throw new Error("Invalid imageData dimentions");s=l+f,u=o+d;var y,p;h?a.compress?(y=e4(h,[0]),p=2):(y=Qf(e,h,[0],!!a.psb),p=1):(y=new Uint8Array(0),p=1),t.channels.push({channelId:i?-3:-2,compression:p,buffer:y,length:2+y.length}),t[i?"realMask":"mask"]={top:o,left:l,right:s,bottom:u}}function IT(e,t,r,n){var a=FT(e,t,r,n);return t.mask&&M3(e,a,t,t.mask,n,!1),t.realMask&&M3(e,a,t,t.realMask,n,!0),a}function Md(e){var t,r,n,a,i=e.canvas,o=e.imageData,l=(r=(t=o==null?void 0:o.width)!==null&&t!==void 0?t:i==null?void 0:i.width)!==null&&r!==void 0?r:0,s=(a=(n=o==null?void 0:o.height)!==null&&n!==void 0?n:i==null?void 0:i.height)!==null&&a!==void 0?a:0;return{width:l,height:s}}function zT(e,t,r,n,a){if(e.data instanceof Uint32Array||e.data instanceof Uint16Array)throw new Error("imageData has incorrect bit depth");for(var i=$o(n,a),o=e.data,l=i.data,s=0;s<a;s++)for(var u=0;u<n;u++){var c=(u+t+(s+r)*e.width)*4,f=(u+s*n)*4;l[f]=o[c],l[f+1]=o[c+1],l[f+2]=o[c+2],l[f+3]=o[c+3]}return i}function FT(e,t,r,n){var a=t.top|0,i=t.left|0,o=t.right|0,l=t.bottom|0,s=[{channelId:-1,compression:0,buffer:void 0,length:2},{channelId:0,compression:0,buffer:void 0,length:2},{channelId:1,compression:0,buffer:void 0,length:2},{channelId:2,compression:0,buffer:void 0,length:2}],u=Md(t),c=u.width,f=u.height;if(!(t.canvas||t.imageData)||!c||!f)return o=i,l=a,{layer:t,top:a,left:i,right:o,bottom:l,channels:s};o=i+c,l=a+f;var d=t.imageData||t.canvas.getContext("2d").getImageData(0,0,c,f);if(n.trimImageData){var h=OT(d);if(h.left!==0||h.top!==0||h.right!==d.width||h.bottom!==d.height){if(i+=h.left,a+=h.top,o-=d.width-h.right,l-=d.height-h.bottom,c=o-i,f=l-a,!c||!f)return{layer:t,top:a,left:i,right:o,bottom:l,channels:s};d=zT(d,h.left,h.top,c,f)}}var y=[0,1,2];return(!r||n.noBackground||t.mask||Q2(d)||aE)&&y.unshift(-1),s=y.map(function(p){var x=J2(p,!1),g,m;return n.compress?(g=e4(d,[x]),m=2):(g=Qf(e,d,[x],!!n.psb),m=1),{channelId:p,compression:m,buffer:g,length:2+g.length}}),{layer:t,top:a,left:i,right:o,bottom:l,channels:s}}function D3(e,t,r,n){for(var a=e.data,i=e.width,o=(t*i+r)*4+3|0,l=o+(n-r)*4|0,s=o;s<l;s=s+4|0)if(a[s]!==0)return!1;return!0}function I3(e,t,r,n){for(var a=e.data,i=e.width,o=i*4|0,l=r*o+t*4+3|0,s=r,u=l;s<n;s++,u=u+o|0)if(a[u]!==0)return!1;return!0}function OT(e){for(var t=0,r=0,n=e.width,a=e.height;t<a&&D3(e,t,r,n);)t++;for(;a>t&&D3(e,a-1,r,n);)a--;for(;r<n&&I3(e,r,t,a);)r++;for(;n>r&&I3(e,n-1,t,a);)n--;return{top:t,left:r,right:n,bottom:a}}function zr(e,t){t?"r"in t?(Oe(e,0),Oe(e,Math.round(t.r*257)),Oe(e,Math.round(t.g*257)),Oe(e,Math.round(t.b*257)),Oe(e,0)):"fr"in t?(Oe(e,0),Oe(e,Math.round(t.fr*255*257)),Oe(e,Math.round(t.fg*255*257)),Oe(e,Math.round(t.fb*255*257)),Oe(e,0)):"l"in t?(Oe(e,7),Pt(e,Math.round(t.l*1e4)),Pt(e,Math.round(t.a<0?t.a*12800:t.a*12700)),Pt(e,Math.round(t.b<0?t.b*12800:t.b*12700)),Oe(e,0)):"h"in t?(Oe(e,1),Oe(e,Math.round(t.h*65535)),Oe(e,Math.round(t.s*65535)),Oe(e,Math.round(t.b*65535)),Oe(e,0)):"c"in t?(Oe(e,2),Oe(e,Math.round(t.c*257)),Oe(e,Math.round(t.m*257)),Oe(e,Math.round(t.y*257)),Oe(e,Math.round(t.k*257))):(Oe(e,8),Oe(e,Math.round(t.k*1e4/255)),Rt(e,6)):(Oe(e,0),Rt(e,8))}var ku=function(){return ku=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},ku.apply(this,arguments)},PT=["off","fade","pen pressure","pen tilt","stylus wheel","initial direction","direction","initial rotation","rotation"],z3=["round point","round blunt","round curve","round angle","round fan","flat point","flat blunt","flat curve","flat angle","flat fan"],RT=["erodible point","erodible flat","erodible round","erodible square","erodible triangle","custom"],LT={_:"brush",MixB:"mixer brush",SmTl:"smudge brush"};function Kr(e){return{control:PT[e.bVTy],steps:e.fStp,jitter:dt(e.jitter),minimum:dt(e["Mnm "])}}function F3(e){switch(e._classID){case"computedBrush":return{type:"computed",size:tu(e.Dmtr,"Pixels"),angle:_i(e.Angl),roundness:dt(e.Rndn),spacingOn:e.Intr,spacing:dt(e.Spcn),flipX:e.flipX,flipY:e.flipY,hardness:dt(e.Hrdn)};case"sampledBrush":return{type:"sampled",size:tu(e.Dmtr,"Pixels"),angle:_i(e.Angl),roundness:dt(e.Rndn),spacingOn:e.Intr,spacing:dt(e.Spcn),flipX:e.flipX,flipY:e.flipY,name:e["Nm "],sampledData:e.sampledData};case"dBrush":return{type:"dynamic",shape:z3[e["Shp "]],angle:_i(e.Angl),size:tu(e.Dmtr,"Pixels"),density:dt(e.Dnst),length:dt(e.Lngt),clumping:dt(e.clumping),thickness:dt(e.thickness),stiffness:dt(e.stiffness),physics:e.physics,spacing:dt(e.Spcn),spacingOn:e.Intr,flipX:e.flipX,flipY:e.flipY};case"dTips":return ku(ku({type:"tips",angle:_i(e.Angl),size:tu(e.Dmtr,"Pixels"),shape:z3[e["Shp "]],physics:e.physics,spacing:dt(e.Spcn),spacingOn:e.Intr,flipX:e.flipX,flipY:e.flipY,tipsType:RT[e.dtipsType],tipsLengthRatio:dt(e.dtipsLengthRatio),tipsHardness:dt(e.dtipsHardness)},e.dtipsGridSize&&e.dtipsErodibleTipHeightMap?{tipsGridSize:e.dtipsGridSize,tipsErodibleTipHeightMap:BT(e.dtipsErodibleTipHeightMap)}:{}),{tipsAirbrushCutoffAngle:e.dtipsAirbrushCutoffAngle,tipsAirbrushGranularity:dt(e.dtipsAirbrushGranularity),tipsAirbrushStreakiness:dt(e.dtipsAirbrushStreakiness),tipsAirbrushSplatSize:dt(e.dtipsAirbrushSplatSize),tipsAirbrushSplatCount:e.dtipsAirbrushSplatCount});default:throw console.log(require("util").inspect(e,!1,99,!0)),new Error("Unknown brush classId: ".concat(e._classID))}}function BT(e){for(var t=[],r=0;r<e.byteLength;r++)t.push(e[r]);return t}function NT(e,t){var r,n,a,i;t===void 0&&(t={});var o=Wo(e.buffer,e.byteOffset,e.byteLength),l=Et(o),s=[],u=[],c=[];if(l===1||l===2)throw new Error("Unsupported ABR version (".concat(l,")"));if(l===6||l===7||l===9||l===10){var f=Et(o);if(f!==1&&f!==2)throw new Error("Unsupported ABR minor version");for(;o.offset<o.view.byteLength;){Ca(o,"8BIM");var d=Wt(o),h=De(o),y=o.offset+h;switch(d){case"samp":{for(;o.offset<y;){for(var p=De(o);p&3;)p++;var x=o.offset+p,g=Jn(o,1);nt(o,f===1?10:264);var m=st(o),b=st(o),v=st(o)-m,S=st(o)-b;if(S<=0||v<=0)throw new Error("Invalid bounds");var C=Et(o),A=Ze(o),_=new Uint8Array(S*v);if(C===8)if(A===0)_.set(dr(o,_.byteLength));else if(A===1)ki(o,{width:S,height:v,data:_},S,v,C,1,[0],!1);else throw new Error("Invalid compression");else if(C===16)if(A===0)for(var E=0;E<_.byteLength;E++)_[E]=Ke(o)>>8;else throw A===1?new Error("not implemented (16bit RLE)"):new Error("Invalid compression");else throw new Error("Invalid depth");s.push({id:g,bounds:{x:b,y:m,w:S,h:v},alpha:_}),o.offset=x}break}case"desc":{for(var M=Tt(o,!0),z=0,N=M.Brsh;z<N.length;z++){var R=N[z],$={name:R["Nm "],shape:F3(R.Brsh),spacing:dt(R.Spcn),wetEdges:R.Wtdg,noise:R.Nose,useBrushSize:R.useBrushSize};R.interpretation!=null&&($.interpretation=R.interpretation),R.protectTexture!=null&&($.protectTexture=R.protectTexture),R.useTipDynamics&&($.shapeDynamics={tiltScale:dt(R.tiltScale),sizeDynamics:Kr(R.szVr),angleDynamics:Kr(R.angleDynamics),roundnessDynamics:Kr(R.roundnessDynamics),flipX:R.flipX,flipY:R.flipY,brushProjection:R.brushProjection,minimumDiameter:dt(R.minimumDiameter),minimumRoundness:dt(R.minimumRoundness)}),R.useScatter&&($.scatter={count:R["Cnt "],bothAxes:R.bothAxes,countDynamics:Kr(R.countDynamics),scatterDynamics:Kr(R.scatterDynamics)}),R.useTexture&&R.Txtr&&($.texture={id:R.Txtr.Idnt,name:R.Txtr["Nm "],blendMode:on.decode(R.textureBlendMode),depth:dt(R.textureDepth),depthMinimum:dt(R.minimumDepth),depthDynamics:Kr(R.textureDepthDynamics),scale:dt(R.textureScale),invert:R.InvT,brightness:R.textureBrightness,contrast:R.textureContrast,textureEachTip:!!R.TxtC});var q=R.dualBrush;q&&q.useDualBrush&&($.dualBrush={flip:q.Flip,shape:F3(q.Brsh),blendMode:on.decode(q.BlnM),useScatter:q.useScatter,spacing:dt(q.Spcn),count:q["Cnt "],bothAxes:q.bothAxes,countDynamics:Kr(q.countDynamics),scatterDynamics:Kr(q.scatterDynamics)}),R.useColorDynamics&&($.colorDynamics={foregroundBackground:Kr(R.clVr),hue:dt(R["H "]),saturation:dt(R.Strt),brightness:dt(R.Brgh),purity:dt(R.purity),perTip:R.colorDynamicsPerTip}),R.usePaintDynamics&&($.transfer={flowDynamics:Kr(R.prVr),opacityDynamics:Kr(R.opVr),wetnessDynamics:Kr(R.wtVr),mixDynamics:Kr(R.mxVr)}),R.useBrushPose&&($.brushPose={overrideAngle:R.overridePoseAngle,overrideTiltX:R.overridePoseTiltX,overrideTiltY:R.overridePoseTiltY,overridePressure:R.overridePosePressure,pressure:dt(R.brushPosePressure),tiltX:R.brushPoseTiltX,tiltY:R.brushPoseTiltY,angle:R.brushPoseAngle});var W=R.toolOptions;W&&($.toolOptions={type:LT[W._classID]||"brush",brushPreset:W.brushPreset,flow:(r=W.flow)!==null&&r!==void 0?r:100,smooth:(n=W.Smoo)!==null&&n!==void 0?n:0,mode:on.decode(W["Md "]||"BlnM.Nrml"),opacity:(a=W.Opct)!==null&&a!==void 0?a:100,smoothing:!!W.smoothing,smoothingValue:W.smoothingValue||0,smoothingRadiusMode:!!W.smoothingRadiusMode,smoothingCatchup:!!W.smoothingCatchup,smoothingCatchupAtEnd:!!W.smoothingCatchupAtEnd,smoothingZoomCompensation:!!W.smoothingZoomCompensation,pressureSmoothing:!!W.pressureSmoothing,usePressureOverridesSize:!!W.usePressureOverridesSize,usePressureOverridesOpacity:!!W.usePressureOverridesOpacity,useLegacy:!!W.useLegacy},W.prVr&&($.toolOptions.flowDynamics=Kr(W.prVr)),W.opVr&&($.toolOptions.opacityDynamics=Kr(W.opVr)),W.szVr&&($.toolOptions.sizeDynamics=Kr(W.szVr)),"wetness"in W&&($.toolOptions.wetness=W.wetness),"dryness"in W&&($.toolOptions.dryness=W.dryness),"mix"in W&&($.toolOptions.mix=W.mix),"autoFill"in W&&($.toolOptions.autoFill=W.autoFill),"autoClean"in W&&($.toolOptions.autoClean=W.autoClean),"loadSolidColorOnly"in W&&($.toolOptions.loadSolidColorOnly=W.loadSolidColorOnly),"sampleAllLayers"in W&&($.toolOptions.sampleAllLayers=W.sampleAllLayers),"SmdF"in W&&($.toolOptions.smudgeFingerPainting=W.SmdF),"SmdS"in W&&($.toolOptions.smudgeSampleAllLayers=W.SmdS),"Prs "in W&&($.toolOptions.strength=W["Prs "]),"SmdF"in W&&($.toolOptions.smudgeFingerPainting=W.SmdF),"SmdS"in W&&($.toolOptions.smudgeSampleAllLayers=W.SmdS)),u.push($)}break}case"patt":{for(;o.offset<y;)c.push(XE(o));o.offset=y;break}case"phry":{var M=Tt(o);t.logMissingFeatures&&!((i=M.hierarchy)===null||i===void 0)&&i.length;break}default:throw new Error("Invalid brush type: ".concat(d))}for(;h%4;)o.offset++,h++}}else throw new Error("Unsupported ABR version (".concat(l,")"));return{samples:s,patterns:c,brushes:u}}var Dd=function(){return Dd=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},Dd.apply(this,arguments)};function $T(e){var t=Wo(e.buffer,e.byteOffset,e.byteLength),r={shapes:[]};if(Ca(t,"cush"),De(t)!==2)throw new Error("Invalid version");for(var n=De(t),a=0;a<n;a++){for(var i=_r(t);t.offset%4;)t.offset++;if(De(t)!==1)throw new Error("Invalid shape version");var o=De(t),l=t.offset+o,s=Jn(t,1),u=De(t),c=De(t),f=De(t),d=De(t),h=d-c,y=f-u,p={paths:[]};c3(t,p,h,y,l-t.offset),r.shapes.push(Dd({name:i,id:s,width:h,height:y},p)),t.offset=l}return r}var Id;(function(e){e[e.Bitmap=0]="Bitmap",e[e.Grayscale=1]="Grayscale",e[e.Indexed=2]="Indexed",e[e.RGB=3]="RGB",e[e.CMYK=4]="CMYK",e[e.Multichannel=7]="Multichannel",e[e.Duotone=8]="Duotone",e[e.Lab=9]="Lab"})(Id||(Id={}));var zd;(function(e){e[e.Other=0]="Other",e[e.OpenFolder=1]="OpenFolder",e[e.ClosedFolder=2]="ClosedFolder",e[e.BoundingSectionDivider=3]="BoundingSectionDivider"})(zd||(zd={}));var Fd;(function(e){e[e.None=0]="None",e[e.Visibility=1]="Visibility",e[e.Position=2]="Position",e[e.Appearance=4]="Appearance"})(Fd||(Fd={}));var Od;(function(e){e[e.Color0=0]="Color0",e[e.Color1=1]="Color1",e[e.Color2=2]="Color2",e[e.Color3=3]="Color3",e[e.Transparency=-1]="Transparency",e[e.UserMask=-2]="UserMask",e[e.RealUserMask=-3]="RealUserMask"})(Od||(Od={}));var Pd;(function(e){e[e.RawData=0]="RawData",e[e.RleCompressed=1]="RleCompressed",e[e.ZipWithoutPrediction=2]="ZipWithoutPrediction",e[e.ZipWithPrediction=3]="ZipWithPrediction"})(Pd||(Pd={}));var UT=r4;function HT(e,t){var r="buffer"in e?Wo(e.buffer,e.byteOffset,e.byteLength):Wo(e);return BE(r,t)}function jT(e,t){var r=_3();return C3(r,e,t),yT(r)}function O3(e,t){var r=_3();return C3(r,e,t),xT(r)}function GT(e,t){if(typeof Buffer>"u")throw new Error("Buffer not supported on this platform");return Buffer.from(O3(e,t))}function VT(e,t){Bg(e,t)}const qT=Object.freeze(Object.defineProperty({__proto__:null,get ChannelID(){return Od},get ColorMode(){return Id},get Compression(){return Pd},get LayerCompCapturedInfo(){return Fd},get SectionDividerType(){return zd},byteArrayToBase64:UT,decodeLayerPixels:VT,initializeCanvas:uE,readAbr:NT,readCsh:$T,readPsd:HT,writePsd:jT,writePsdBuffer:GT,writePsdUint8Array:O3},Symbol.toStringTag,{value:"Module"}));var P3={exports:{}};/* @license
|
|
292
292
|
Papa Parse
|
|
293
293
|
v5.5.3
|
|
294
294
|
https://github.com/mholt/PapaParse
|
|
295
295
|
License: MIT
|
|
296
|
-
*/(function(e,t){((r,n)=>{e.exports=n()})(gS,function r(){var n=typeof self<"u"?self:typeof window<"u"?window:n!==void 0?n:{},a,i=!n.document&&!!n.postMessage,o=n.IS_PAPA_WORKER||!1,l={},s=0,u={};function c(_){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(E){var M=S(E);M.chunkSize=parseInt(M.chunkSize),E.step||E.chunk||(M.chunkSize=null),this._handle=new p(M),(this._handle.streamer=this)._config=M}).call(this,_),this.parseChunk=function(E,M){var z=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<z){let R=this._config.newline;R||(N=this._config.quoteChar||'"',R=this._handle.guessLineEndings(E,N)),E=[...E.split(R).slice(z)].join(R)}this.isFirstChunk&&A(this._config.beforeFirstChunk)&&(N=this._config.beforeFirstChunk(E))!==void 0&&(E=N),this.isFirstChunk=!1,this._halted=!1;var z=this._partialLine+E,N=(this._partialLine="",this._handle.parse(z,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(E=N.meta.cursor,z=(this._finished||(this._partialLine=z.substring(E-this._baseIndex),this._baseIndex=E),N&&N.data&&(this._rowCount+=N.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),o)n.postMessage({results:N,workerId:u.WORKER_ID,finished:z});else if(A(this._config.chunk)&&!M){if(this._config.chunk(N,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=N=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(N.data),this._completeResults.errors=this._completeResults.errors.concat(N.errors),this._completeResults.meta=N.meta),this._completed||!z||!A(this._config.complete)||N&&N.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),z||N&&N.meta.paused||this._nextChunk(),N}this._halted=!0},this._sendError=function(E){A(this._config.error)?this._config.error(E):o&&this._config.error&&n.postMessage({workerId:u.WORKER_ID,error:E,finished:!1})}}function f(_){var E;(_=_||{}).chunkSize||(_.chunkSize=u.RemoteChunkSize),c.call(this,_),this._nextChunk=i?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(M){this._input=M,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(E=new XMLHttpRequest,this._config.withCredentials&&(E.withCredentials=this._config.withCredentials),i||(E.onload=C(this._chunkLoaded,this),E.onerror=C(this._chunkError,this)),E.open(this._config.downloadRequestBody?"POST":"GET",this._input,!i),this._config.downloadRequestHeaders){var M,z=this._config.downloadRequestHeaders;for(M in z)E.setRequestHeader(M,z[M])}var N;this._config.chunkSize&&(N=this._start+this._config.chunkSize-1,E.setRequestHeader("Range","bytes="+this._start+"-"+N));try{E.send(this._config.downloadRequestBody)}catch(R){this._chunkError(R.message)}i&&E.status===0&&this._chunkError()}},this._chunkLoaded=function(){E.readyState===4&&(E.status<200||400<=E.status?this._chunkError():(this._start+=this._config.chunkSize||E.responseText.length,this._finished=!this._config.chunkSize||this._start>=(M=>(M=M.getResponseHeader("Content-Range"))!==null?parseInt(M.substring(M.lastIndexOf("/")+1)):-1)(E),this.parseChunk(E.responseText)))},this._chunkError=function(M){M=E.statusText||M,this._sendError(new Error(M))}}function d(_){(_=_||{}).chunkSize||(_.chunkSize=u.LocalChunkSize),c.call(this,_);var E,M,z=typeof FileReader<"u";this.stream=function(N){this._input=N,M=N.slice||N.webkitSlice||N.mozSlice,z?((E=new FileReader).onload=C(this._chunkLoaded,this),E.onerror=C(this._chunkError,this)):E=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var N=this._input,R=(this._config.chunkSize&&(R=Math.min(this._start+this._config.chunkSize,this._input.size),N=M.call(N,this._start,R)),E.readAsText(N,this._config.encoding));z||this._chunkLoaded({target:{result:R}})},this._chunkLoaded=function(N){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(N.target.result)},this._chunkError=function(){this._sendError(E.error)}}function h(_){var E;c.call(this,_=_||{}),this.stream=function(M){return E=M,this._nextChunk()},this._nextChunk=function(){var M,z;if(!this._finished)return M=this._config.chunkSize,E=M?(z=E.substring(0,M),E.substring(M)):(z=E,""),this._finished=!E,this.parseChunk(z)}}function y(_){c.call(this,_=_||{});var E=[],M=!0,z=!1;this.pause=function(){c.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){c.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(N){this._input=N,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){z&&E.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),E.length?this.parseChunk(E.shift()):M=!0},this._streamData=C(function(N){try{E.push(typeof N=="string"?N:N.toString(this._config.encoding)),M&&(M=!1,this._checkIsFinished(),this.parseChunk(E.shift()))}catch(R){this._streamError(R)}},this),this._streamError=C(function(N){this._streamCleanUp(),this._sendError(N)},this),this._streamEnd=C(function(){this._streamCleanUp(),z=!0,this._streamData("")},this),this._streamCleanUp=C(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function p(_){var E,M,z,N,R=Math.pow(2,53),$=-R,q=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,W=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,Z=this,te=0,ne=0,_e=!1,pe=!1,we=[],ve={data:[],errors:[],meta:{}};function Te(
|
|
296
|
+
*/(function(e,t){((r,n)=>{e.exports=n()})(gS,function r(){var n=typeof self<"u"?self:typeof window<"u"?window:n!==void 0?n:{},a,i=!n.document&&!!n.postMessage,o=n.IS_PAPA_WORKER||!1,l={},s=0,u={};function c(_){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(E){var M=S(E);M.chunkSize=parseInt(M.chunkSize),E.step||E.chunk||(M.chunkSize=null),this._handle=new p(M),(this._handle.streamer=this)._config=M}).call(this,_),this.parseChunk=function(E,M){var z=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<z){let R=this._config.newline;R||(N=this._config.quoteChar||'"',R=this._handle.guessLineEndings(E,N)),E=[...E.split(R).slice(z)].join(R)}this.isFirstChunk&&A(this._config.beforeFirstChunk)&&(N=this._config.beforeFirstChunk(E))!==void 0&&(E=N),this.isFirstChunk=!1,this._halted=!1;var z=this._partialLine+E,N=(this._partialLine="",this._handle.parse(z,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(E=N.meta.cursor,z=(this._finished||(this._partialLine=z.substring(E-this._baseIndex),this._baseIndex=E),N&&N.data&&(this._rowCount+=N.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),o)n.postMessage({results:N,workerId:u.WORKER_ID,finished:z});else if(A(this._config.chunk)&&!M){if(this._config.chunk(N,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=N=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(N.data),this._completeResults.errors=this._completeResults.errors.concat(N.errors),this._completeResults.meta=N.meta),this._completed||!z||!A(this._config.complete)||N&&N.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),z||N&&N.meta.paused||this._nextChunk(),N}this._halted=!0},this._sendError=function(E){A(this._config.error)?this._config.error(E):o&&this._config.error&&n.postMessage({workerId:u.WORKER_ID,error:E,finished:!1})}}function f(_){var E;(_=_||{}).chunkSize||(_.chunkSize=u.RemoteChunkSize),c.call(this,_),this._nextChunk=i?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(M){this._input=M,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(E=new XMLHttpRequest,this._config.withCredentials&&(E.withCredentials=this._config.withCredentials),i||(E.onload=C(this._chunkLoaded,this),E.onerror=C(this._chunkError,this)),E.open(this._config.downloadRequestBody?"POST":"GET",this._input,!i),this._config.downloadRequestHeaders){var M,z=this._config.downloadRequestHeaders;for(M in z)E.setRequestHeader(M,z[M])}var N;this._config.chunkSize&&(N=this._start+this._config.chunkSize-1,E.setRequestHeader("Range","bytes="+this._start+"-"+N));try{E.send(this._config.downloadRequestBody)}catch(R){this._chunkError(R.message)}i&&E.status===0&&this._chunkError()}},this._chunkLoaded=function(){E.readyState===4&&(E.status<200||400<=E.status?this._chunkError():(this._start+=this._config.chunkSize||E.responseText.length,this._finished=!this._config.chunkSize||this._start>=(M=>(M=M.getResponseHeader("Content-Range"))!==null?parseInt(M.substring(M.lastIndexOf("/")+1)):-1)(E),this.parseChunk(E.responseText)))},this._chunkError=function(M){M=E.statusText||M,this._sendError(new Error(M))}}function d(_){(_=_||{}).chunkSize||(_.chunkSize=u.LocalChunkSize),c.call(this,_);var E,M,z=typeof FileReader<"u";this.stream=function(N){this._input=N,M=N.slice||N.webkitSlice||N.mozSlice,z?((E=new FileReader).onload=C(this._chunkLoaded,this),E.onerror=C(this._chunkError,this)):E=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var N=this._input,R=(this._config.chunkSize&&(R=Math.min(this._start+this._config.chunkSize,this._input.size),N=M.call(N,this._start,R)),E.readAsText(N,this._config.encoding));z||this._chunkLoaded({target:{result:R}})},this._chunkLoaded=function(N){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(N.target.result)},this._chunkError=function(){this._sendError(E.error)}}function h(_){var E;c.call(this,_=_||{}),this.stream=function(M){return E=M,this._nextChunk()},this._nextChunk=function(){var M,z;if(!this._finished)return M=this._config.chunkSize,E=M?(z=E.substring(0,M),E.substring(M)):(z=E,""),this._finished=!E,this.parseChunk(z)}}function y(_){c.call(this,_=_||{});var E=[],M=!0,z=!1;this.pause=function(){c.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){c.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(N){this._input=N,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){z&&E.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),E.length?this.parseChunk(E.shift()):M=!0},this._streamData=C(function(N){try{E.push(typeof N=="string"?N:N.toString(this._config.encoding)),M&&(M=!1,this._checkIsFinished(),this.parseChunk(E.shift()))}catch(R){this._streamError(R)}},this),this._streamError=C(function(N){this._streamCleanUp(),this._sendError(N)},this),this._streamEnd=C(function(){this._streamCleanUp(),z=!0,this._streamData("")},this),this._streamCleanUp=C(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function p(_){var E,M,z,N,R=Math.pow(2,53),$=-R,q=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,W=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,Z=this,te=0,ne=0,_e=!1,pe=!1,we=[],ve={data:[],errors:[],meta:{}};function Te(Ee){return _.skipEmptyLines==="greedy"?Ee.join("").trim()==="":Ee.length===1&&Ee[0].length===0}function Se(){if(ve&&z&&(Le("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+u.DefaultDelimiter+"'"),z=!1),_.skipEmptyLines&&(ve.data=ve.data.filter(function(ye){return!Te(ye)})),Ie()){let ye=function(P,V){A(_.transformHeader)&&(P=_.transformHeader(P,V)),we.push(P)};if(ve)if(Array.isArray(ve.data[0])){for(var Ee=0;Ie()&&Ee<ve.data.length;Ee++)ve.data[Ee].forEach(ye);ve.data.splice(0,1)}else ve.data.forEach(ye)}function Be(ye,P){for(var V=_.header?{}:[],fe=0;fe<ye.length;fe++){var de=fe,ie=ye[fe],ie=((oe,se)=>(ge=>(_.dynamicTypingFunction&&_.dynamicTyping[ge]===void 0&&(_.dynamicTyping[ge]=_.dynamicTypingFunction(ge)),(_.dynamicTyping[ge]||_.dynamicTyping)===!0))(oe)?se==="true"||se==="TRUE"||se!=="false"&&se!=="FALSE"&&((ge=>{if(q.test(ge)&&(ge=parseFloat(ge),$<ge&&ge<R))return 1})(se)?parseFloat(se):W.test(se)?new Date(se):se===""?null:se):se)(de=_.header?fe>=we.length?"__parsed_extra":we[fe]:de,ie=_.transform?_.transform(ie,de):ie);de==="__parsed_extra"?(V[de]=V[de]||[],V[de].push(ie)):V[de]=ie}return _.header&&(fe>we.length?Le("FieldMismatch","TooManyFields","Too many fields: expected "+we.length+" fields but parsed "+fe,ne+P):fe<we.length&&Le("FieldMismatch","TooFewFields","Too few fields: expected "+we.length+" fields but parsed "+fe,ne+P)),V}var be;ve&&(_.header||_.dynamicTyping||_.transform)&&(be=1,!ve.data.length||Array.isArray(ve.data[0])?(ve.data=ve.data.map(Be),be=ve.data.length):ve.data=Be(ve.data,0),_.header&&ve.meta&&(ve.meta.fields=we),ne+=be)}function Ie(){return _.header&&we.length===0}function Le(Ee,Be,be,ye){Ee={type:Ee,code:Be,message:be},ye!==void 0&&(Ee.row=ye),ve.errors.push(Ee)}A(_.step)&&(N=_.step,_.step=function(Ee){ve=Ee,Ie()?Se():(Se(),ve.data.length!==0&&(te+=Ee.data.length,_.preview&&te>_.preview?M.abort():(ve.data=ve.data[0],N(ve,Z))))}),this.parse=function(Ee,Be,be){var ye=_.quoteChar||'"',ye=(_.newline||(_.newline=this.guessLineEndings(Ee,ye)),z=!1,_.delimiter?A(_.delimiter)&&(_.delimiter=_.delimiter(Ee),ve.meta.delimiter=_.delimiter):((ye=((P,V,fe,de,ie)=>{var oe,se,ge,Ce;ie=ie||[","," ","|",";",u.RECORD_SEP,u.UNIT_SEP];for(var xe=0;xe<ie.length;xe++){for(var Ve,Ue=ie[xe],Ne=0,qe=0,it=0,ct=(ge=void 0,new g({comments:de,delimiter:Ue,newline:V,preview:10}).parse(P)),ot=0;ot<ct.data.length;ot++)fe&&Te(ct.data[ot])?it++:(Ve=ct.data[ot].length,qe+=Ve,ge===void 0?ge=Ve:0<Ve&&(Ne+=Math.abs(Ve-ge),ge=Ve));0<ct.data.length&&(qe/=ct.data.length-it),(se===void 0||Ne<=se)&&(Ce===void 0||Ce<qe)&&1.99<qe&&(se=Ne,oe=Ue,Ce=qe)}return{successful:!!(_.delimiter=oe),bestDelimiter:oe}})(Ee,_.newline,_.skipEmptyLines,_.comments,_.delimitersToGuess)).successful?_.delimiter=ye.bestDelimiter:(z=!0,_.delimiter=u.DefaultDelimiter),ve.meta.delimiter=_.delimiter),S(_));return _.preview&&_.header&&ye.preview++,E=Ee,M=new g(ye),ve=M.parse(E,Be,be),Se(),_e?{meta:{paused:!0}}:ve||{meta:{paused:!1}}},this.paused=function(){return _e},this.pause=function(){_e=!0,M.abort(),E=A(_.chunk)?"":E.substring(M.getCharIndex())},this.resume=function(){Z.streamer._halted?(_e=!1,Z.streamer.parseChunk(E,!0)):setTimeout(Z.resume,3)},this.aborted=function(){return pe},this.abort=function(){pe=!0,M.abort(),ve.meta.aborted=!0,A(_.complete)&&_.complete(ve),E=""},this.guessLineEndings=function(P,ye){P=P.substring(0,1048576);var ye=new RegExp(x(ye)+"([^]*?)"+x(ye),"gm"),be=(P=P.replace(ye,"")).split("\r"),ye=P.split(`
|
|
297
297
|
`),P=1<ye.length&&ye[0].length<be[0].length;if(be.length===1||P)return`
|
|
298
298
|
`;for(var V=0,fe=0;fe<be.length;fe++)be[fe][0]===`
|
|
299
299
|
`&&V++;return V>=be.length/2?`\r
|
|
300
300
|
`:"\r"}}function x(_){return _.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function g(_){var E=(_=_||{}).delimiter,M=_.newline,z=_.comments,N=_.step,R=_.preview,$=_.fastMode,q=null,W=!1,Z=_.quoteChar==null?'"':_.quoteChar,te=Z;if(_.escapeChar!==void 0&&(te=_.escapeChar),(typeof E!="string"||-1<u.BAD_DELIMITERS.indexOf(E))&&(E=","),z===E)throw new Error("Comment character same as delimiter");z===!0?z="#":(typeof z!="string"||-1<u.BAD_DELIMITERS.indexOf(z))&&(z=!1),M!==`
|
|
301
301
|
`&&M!=="\r"&&M!==`\r
|
|
302
302
|
`&&(M=`
|
|
303
|
-
`);var ne=0,_e=!1;this.parse=function(pe,we,ve){if(typeof pe!="string")throw new Error("Input must be a string");var Te=pe.length,Se=E.length,Ie=M.length,Le=z.length,
|
|
304
|
-
`,$='"',q=$+$,W=!1,Z=null,te=!1,ne=((()=>{if(typeof E=="object"){if(typeof E.delimiter!="string"||u.BAD_DELIMITERS.filter(function(we){return E.delimiter.indexOf(we)!==-1}).length||(N=E.delimiter),typeof E.quotes!="boolean"&&typeof E.quotes!="function"&&!Array.isArray(E.quotes)||(M=E.quotes),typeof E.skipEmptyLines!="boolean"&&typeof E.skipEmptyLines!="string"||(W=E.skipEmptyLines),typeof E.newline=="string"&&(R=E.newline),typeof E.quoteChar=="string"&&($=E.quoteChar),typeof E.header=="boolean"&&(z=E.header),Array.isArray(E.columns)){if(E.columns.length===0)throw new Error("Option columns is empty");Z=E.columns}E.escapeChar!==void 0&&(q=E.escapeChar+$),E.escapeFormulae instanceof RegExp?te=E.escapeFormulae:typeof E.escapeFormulae=="boolean"&&E.escapeFormulae&&(te=/^[=+\-@\t\r].*$/)}})(),new RegExp(x($),"g"));if(typeof _=="string"&&(_=JSON.parse(_)),Array.isArray(_)){if(!_.length||Array.isArray(_[0]))return _e(null,_,W);if(typeof _[0]=="object")return _e(Z||Object.keys(_[0]),_,W)}else if(typeof _=="object")return typeof _.data=="string"&&(_.data=JSON.parse(_.data)),Array.isArray(_.data)&&(_.fields||(_.fields=_.meta&&_.meta.fields||Z),_.fields||(_.fields=Array.isArray(_.data[0])?_.fields:typeof _.data[0]=="object"?Object.keys(_.data[0]):[]),Array.isArray(_.data[0])||typeof _.data[0]=="object"||(_.data=[_.data])),_e(_.fields||[],_.data||[],W);throw new Error("Unable to serialize unrecognized input");function _e(we,ve,Te){var Se="",Ie=(typeof we=="string"&&(we=JSON.parse(we)),typeof ve=="string"&&(ve=JSON.parse(ve)),Array.isArray(we)&&0<we.length),Le=!Array.isArray(ve[0]);if(Ie&&z){for(var
|
|
303
|
+
`);var ne=0,_e=!1;this.parse=function(pe,we,ve){if(typeof pe!="string")throw new Error("Input must be a string");var Te=pe.length,Se=E.length,Ie=M.length,Le=z.length,Ee=A(N),Be=[],be=[],ye=[],P=ne=0;if(!pe)return Ne();if($||$!==!1&&pe.indexOf(Z)===-1){for(var V=pe.split(M),fe=0;fe<V.length;fe++){if(ye=V[fe],ne+=ye.length,fe!==V.length-1)ne+=M.length;else if(ve)return Ne();if(!z||ye.substring(0,Le)!==z){if(Ee){if(Be=[],Ce(ye.split(E)),qe(),_e)return Ne()}else Ce(ye.split(E));if(R&&R<=fe)return Be=Be.slice(0,R),Ne(!0)}}return Ne()}for(var de=pe.indexOf(E,ne),ie=pe.indexOf(M,ne),oe=new RegExp(x(te)+x(Z),"g"),se=pe.indexOf(Z,ne);;)if(pe[ne]===Z)for(se=ne,ne++;;){if((se=pe.indexOf(Z,se+1))===-1)return ve||be.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:Be.length,index:ne}),Ve();if(se===Te-1)return Ve(pe.substring(ne,se).replace(oe,Z));if(Z===te&&pe[se+1]===te)se++;else if(Z===te||se===0||pe[se-1]!==te){de!==-1&&de<se+1&&(de=pe.indexOf(E,se+1));var ge=xe((ie=ie!==-1&&ie<se+1?pe.indexOf(M,se+1):ie)===-1?de:Math.min(de,ie));if(pe.substr(se+1+ge,Se)===E){ye.push(pe.substring(ne,se).replace(oe,Z)),pe[ne=se+1+ge+Se]!==Z&&(se=pe.indexOf(Z,ne)),de=pe.indexOf(E,ne),ie=pe.indexOf(M,ne);break}if(ge=xe(ie),pe.substring(se+1+ge,se+1+ge+Ie)===M){if(ye.push(pe.substring(ne,se).replace(oe,Z)),Ue(se+1+ge+Ie),de=pe.indexOf(E,ne),se=pe.indexOf(Z,ne),Ee&&(qe(),_e))return Ne();if(R&&Be.length>=R)return Ne(!0);break}be.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:Be.length,index:ne}),se++}}else if(z&&ye.length===0&&pe.substring(ne,ne+Le)===z){if(ie===-1)return Ne();ne=ie+Ie,ie=pe.indexOf(M,ne),de=pe.indexOf(E,ne)}else if(de!==-1&&(de<ie||ie===-1))ye.push(pe.substring(ne,de)),ne=de+Se,de=pe.indexOf(E,ne);else{if(ie===-1)break;if(ye.push(pe.substring(ne,ie)),Ue(ie+Ie),Ee&&(qe(),_e))return Ne();if(R&&Be.length>=R)return Ne(!0)}return Ve();function Ce(it){Be.push(it),P=ne}function xe(it){var ct=0;return ct=it!==-1&&(it=pe.substring(se+1,it))&&it.trim()===""?it.length:ct}function Ve(it){return ve||(it===void 0&&(it=pe.substring(ne)),ye.push(it),ne=Te,Ce(ye),Ee&&qe()),Ne()}function Ue(it){ne=it,Ce(ye),ye=[],ie=pe.indexOf(M,ne)}function Ne(it){if(_.header&&!we&&Be.length&&!W){var ct=Be[0],ot=Object.create(null),wt=new Set(ct);let Me=!1;for(let D=0;D<ct.length;D++){let ue=ct[D];if(ot[ue=A(_.transformHeader)?_.transformHeader(ue,D):ue]){let ke,ze=ot[ue];for(;ke=ue+"_"+ze,ze++,wt.has(ke););wt.add(ke),ct[D]=ke,ot[ue]++,Me=!0,(q=q===null?{}:q)[ke]=ue}else ot[ue]=1,ct[D]=ue;wt.add(ue)}Me&&console.warn("Duplicate headers found and renamed."),W=!0}return{data:Be,errors:be,meta:{delimiter:E,linebreak:M,aborted:_e,truncated:!!it,cursor:P+(we||0),renamedHeaders:q}}}function qe(){N(Ne()),Be=[],be=[]}},this.abort=function(){_e=!0},this.getCharIndex=function(){return ne}}function m(_){var E=_.data,M=l[E.workerId],z=!1;if(E.error)M.userError(E.error,E.file);else if(E.results&&E.results.data){var N={abort:function(){z=!0,b(E.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:v,resume:v};if(A(M.userStep)){for(var R=0;R<E.results.data.length&&(M.userStep({data:E.results.data[R],errors:E.results.errors,meta:E.results.meta},N),!z);R++);delete E.results}else A(M.userChunk)&&(M.userChunk(E.results,N,E.file),delete E.results)}E.finished&&!z&&b(E.workerId,E.results)}function b(_,E){var M=l[_];A(M.userComplete)&&M.userComplete(E),M.terminate(),delete l[_]}function v(){throw new Error("Not implemented.")}function S(_){if(typeof _!="object"||_===null)return _;var E,M=Array.isArray(_)?[]:{};for(E in _)M[E]=S(_[E]);return M}function C(_,E){return function(){_.apply(E,arguments)}}function A(_){return typeof _=="function"}return u.parse=function(_,E){var M=(E=E||{}).dynamicTyping||!1;if(A(M)&&(E.dynamicTypingFunction=M,M={}),E.dynamicTyping=M,E.transform=!!A(E.transform)&&E.transform,!E.worker||!u.WORKERS_SUPPORTED)return M=null,u.NODE_STREAM_INPUT,typeof _=="string"?(_=(z=>z.charCodeAt(0)!==65279?z:z.slice(1))(_),M=new(E.download?f:h)(E)):_.readable===!0&&A(_.read)&&A(_.on)?M=new y(E):(n.File&&_ instanceof File||_ instanceof Object)&&(M=new d(E)),M.stream(_);(M=(()=>{var z;return!!u.WORKERS_SUPPORTED&&(z=(()=>{var N=n.URL||n.webkitURL||null,R=r.toString();return u.BLOB_URL||(u.BLOB_URL=N.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",R,")();"],{type:"text/javascript"})))})(),(z=new n.Worker(z)).onmessage=m,z.id=s++,l[z.id]=z)})()).userStep=E.step,M.userChunk=E.chunk,M.userComplete=E.complete,M.userError=E.error,E.step=A(E.step),E.chunk=A(E.chunk),E.complete=A(E.complete),E.error=A(E.error),delete E.worker,M.postMessage({input:_,config:E,workerId:M.id})},u.unparse=function(_,E){var M=!1,z=!0,N=",",R=`\r
|
|
304
|
+
`,$='"',q=$+$,W=!1,Z=null,te=!1,ne=((()=>{if(typeof E=="object"){if(typeof E.delimiter!="string"||u.BAD_DELIMITERS.filter(function(we){return E.delimiter.indexOf(we)!==-1}).length||(N=E.delimiter),typeof E.quotes!="boolean"&&typeof E.quotes!="function"&&!Array.isArray(E.quotes)||(M=E.quotes),typeof E.skipEmptyLines!="boolean"&&typeof E.skipEmptyLines!="string"||(W=E.skipEmptyLines),typeof E.newline=="string"&&(R=E.newline),typeof E.quoteChar=="string"&&($=E.quoteChar),typeof E.header=="boolean"&&(z=E.header),Array.isArray(E.columns)){if(E.columns.length===0)throw new Error("Option columns is empty");Z=E.columns}E.escapeChar!==void 0&&(q=E.escapeChar+$),E.escapeFormulae instanceof RegExp?te=E.escapeFormulae:typeof E.escapeFormulae=="boolean"&&E.escapeFormulae&&(te=/^[=+\-@\t\r].*$/)}})(),new RegExp(x($),"g"));if(typeof _=="string"&&(_=JSON.parse(_)),Array.isArray(_)){if(!_.length||Array.isArray(_[0]))return _e(null,_,W);if(typeof _[0]=="object")return _e(Z||Object.keys(_[0]),_,W)}else if(typeof _=="object")return typeof _.data=="string"&&(_.data=JSON.parse(_.data)),Array.isArray(_.data)&&(_.fields||(_.fields=_.meta&&_.meta.fields||Z),_.fields||(_.fields=Array.isArray(_.data[0])?_.fields:typeof _.data[0]=="object"?Object.keys(_.data[0]):[]),Array.isArray(_.data[0])||typeof _.data[0]=="object"||(_.data=[_.data])),_e(_.fields||[],_.data||[],W);throw new Error("Unable to serialize unrecognized input");function _e(we,ve,Te){var Se="",Ie=(typeof we=="string"&&(we=JSON.parse(we)),typeof ve=="string"&&(ve=JSON.parse(ve)),Array.isArray(we)&&0<we.length),Le=!Array.isArray(ve[0]);if(Ie&&z){for(var Ee=0;Ee<we.length;Ee++)0<Ee&&(Se+=N),Se+=pe(we[Ee],Ee);0<ve.length&&(Se+=R)}for(var Be=0;Be<ve.length;Be++){var be=(Ie?we:ve[Be]).length,ye=!1,P=Ie?Object.keys(ve[Be]).length===0:ve[Be].length===0;if(Te&&!Ie&&(ye=Te==="greedy"?ve[Be].join("").trim()==="":ve[Be].length===1&&ve[Be][0].length===0),Te==="greedy"&&Ie){for(var V=[],fe=0;fe<be;fe++){var de=Le?we[fe]:fe;V.push(ve[Be][de])}ye=V.join("").trim()===""}if(!ye){for(var ie=0;ie<be;ie++){0<ie&&!P&&(Se+=N);var oe=Ie&&Le?we[ie]:ie;Se+=pe(ve[Be][oe],ie)}Be<ve.length-1&&(!Te||0<be&&!P)&&(Se+=R)}}return Se}function pe(we,ve){var Te,Se;return we==null?"":we.constructor===Date?JSON.stringify(we).slice(1,25):(Se=!1,te&&typeof we=="string"&&te.test(we)&&(we="'"+we,Se=!0),Te=we.toString().replace(ne,q),(Se=Se||M===!0||typeof M=="function"&&M(we,ve)||Array.isArray(M)&&M[ve]||((Ie,Le)=>{for(var Ee=0;Ee<Le.length;Ee++)if(-1<Ie.indexOf(Le[Ee]))return!0;return!1})(Te,u.BAD_DELIMITERS)||-1<Te.indexOf(N)||Te.charAt(0)===" "||Te.charAt(Te.length-1)===" ")?$+Te+$:Te)}},u.RECORD_SEP="",u.UNIT_SEP="",u.BYTE_ORDER_MARK="\uFEFF",u.BAD_DELIMITERS=["\r",`
|
|
305
305
|
`,'"',u.BYTE_ORDER_MARK],u.WORKERS_SUPPORTED=!i&&!!n.Worker,u.NODE_STREAM_INPUT=1,u.LocalChunkSize=10485760,u.RemoteChunkSize=5242880,u.DefaultDelimiter=",",u.Parser=g,u.ParserHandle=p,u.NetworkStreamer=f,u.FileStreamer=d,u.StringStreamer=h,u.ReadableStreamStreamer=y,n.jQuery&&((a=n.jQuery).fn.parse=function(_){var E=_.config||{},M=[];return this.each(function(R){if(!(a(this).prop("tagName").toUpperCase()==="INPUT"&&a(this).attr("type").toLowerCase()==="file"&&n.FileReader)||!this.files||this.files.length===0)return!0;for(var $=0;$<this.files.length;$++)M.push({file:this.files[$],inputElem:this,instanceConfig:a.extend({},E)})}),z(),this;function z(){if(M.length===0)A(_.complete)&&_.complete();else{var R,$,q,W,Z=M[0];if(A(_.before)){var te=_.before(Z.file,Z.inputElem);if(typeof te=="object"){if(te.action==="abort")return R="AbortError",$=Z.file,q=Z.inputElem,W=te.reason,void(A(_.error)&&_.error({name:R},$,q,W));if(te.action==="skip")return void N();typeof te.config=="object"&&(Z.instanceConfig=a.extend(Z.instanceConfig,te.config))}else if(te==="skip")return void N()}var ne=Z.instanceConfig.complete;Z.instanceConfig.complete=function(_e){A(ne)&&ne(_e,Z.file,Z.inputElem),N()},u.parse(Z.file,Z.instanceConfig)}}function N(){M.splice(0,1),z()}}),o&&(n.onmessage=function(_){_=_.data,u.WORKER_ID===void 0&&_&&(u.WORKER_ID=_.workerId),typeof _.input=="string"?n.postMessage({workerId:u.WORKER_ID,results:u.parse(_.input,_.config),finished:!0}):(n.File&&_.input instanceof File||_.input instanceof Object)&&(_=u.parse(_.input,_.config))&&n.postMessage({workerId:u.WORKER_ID,results:_,finished:!0})}),(f.prototype=Object.create(c.prototype)).constructor=f,(d.prototype=Object.create(c.prototype)).constructor=d,(h.prototype=Object.create(h.prototype)).constructor=h,(y.prototype=Object.create(c.prototype)).constructor=y,u})})(P3);var R3=P3.exports;const WT=ln({__proto__:null,default:tm(R3)},[R3]);Tn.FilexElement=bw,Object.defineProperty(Tn,Symbol.toStringTag,{value:"Module"})});
|
|
306
306
|
//# sourceMappingURL=filex.umd.cjs.map
|