@brftech/filex-core 0.1.56
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/LICENSE +21 -0
- package/README.md +108 -0
- package/dist/ArchiveViewer-CJdaw5x3.js +99 -0
- package/dist/ArchiveViewer-CJdaw5x3.js.map +1 -0
- package/dist/CsvViewer-QYx_tePQ.js +132 -0
- package/dist/CsvViewer-QYx_tePQ.js.map +1 -0
- package/dist/DrawioViewer-GWt0TyB7.js +141 -0
- package/dist/DrawioViewer-GWt0TyB7.js.map +1 -0
- package/dist/EpubViewer-Je0ywklQ.js +146 -0
- package/dist/EpubViewer-Je0ywklQ.js.map +1 -0
- package/dist/IpynbViewer-TsB4gqP-.js +175 -0
- package/dist/IpynbViewer-TsB4gqP-.js.map +1 -0
- package/dist/MermaidViewer-CXfeDS-7.js +128 -0
- package/dist/MermaidViewer-CXfeDS-7.js.map +1 -0
- package/dist/PsdViewer-VtPpxKVe.js +113 -0
- package/dist/PsdViewer-VtPpxKVe.js.map +1 -0
- package/dist/TiffViewer-OINn9bbb.js +133 -0
- package/dist/TiffViewer-OINn9bbb.js.map +1 -0
- package/dist/UTIF-Cjsrlm0l.js +3104 -0
- package/dist/UTIF-Cjsrlm0l.js.map +1 -0
- package/dist/Viewer3D-xvvyiWHd.js +61 -0
- package/dist/Viewer3D-xvvyiWHd.js.map +1 -0
- package/dist/_commonjsHelpers-DaMA6jEr.js +9 -0
- package/dist/_commonjsHelpers-DaMA6jEr.js.map +1 -0
- package/dist/filex-core.js +26 -0
- package/dist/filex-core.js.map +1 -0
- package/dist/filex-core.umd.cjs +285 -0
- package/dist/filex-core.umd.cjs.map +1 -0
- package/dist/index-CmSYzt6L.js +5404 -0
- package/dist/index-CmSYzt6L.js.map +1 -0
- package/dist/index-UFULWo35.js +10736 -0
- package/dist/index-UFULWo35.js.map +1 -0
- package/dist/index.d.ts +1089 -0
- package/dist/katex-yuB6V-q6.js +11616 -0
- package/dist/katex-yuB6V-q6.js.map +1 -0
- package/dist/papaparse.min-VB1HBwYX.js +441 -0
- package/dist/papaparse.min-VB1HBwYX.js.map +1 -0
- package/dist/style.css +1 -0
- package/dist/useViewerFetch-czqbd2Lj.js +25 -0
- package/dist/useViewerFetch-czqbd2Lj.js.map +1 -0
- package/package.json +113 -0
- package/src/FileExplorer.vue +1872 -0
- package/src/components/Breadcrumb.vue +282 -0
- package/src/components/ContextMenu.vue +152 -0
- package/src/components/GridView.vue +166 -0
- package/src/components/ListView.vue +212 -0
- package/src/components/PendingOpsTray.vue +91 -0
- package/src/components/RecentlyOpened.vue +155 -0
- package/src/components/StarButton.vue +101 -0
- package/src/components/TagPicker.vue +184 -0
- package/src/components/Toolbar.vue +220 -0
- package/src/components/UploadProgress.vue +78 -0
- package/src/composables/useFileApi.ts +692 -0
- package/src/composables/useKeyboardShortcuts.ts +144 -0
- package/src/composables/useLocale.ts +60 -0
- package/src/composables/useMonacoLoader.ts +98 -0
- package/src/composables/usePendingOps.ts +200 -0
- package/src/composables/useSelection.ts +81 -0
- package/src/composables/useUploadChunked.ts +250 -0
- package/src/composables/useViewerFetch.ts +58 -0
- package/src/index.ts +80 -0
- package/src/locales/en.ts +122 -0
- package/src/locales/index.ts +12 -0
- package/src/locales/tr.ts +122 -0
- package/src/modals/ConvertModal.vue +254 -0
- package/src/modals/DeleteConfirmModal.vue +32 -0
- package/src/modals/Modal.vue +104 -0
- package/src/modals/NewFolderModal.vue +64 -0
- package/src/modals/PermissionsModal.vue +815 -0
- package/src/modals/PreviewModal.vue +1070 -0
- package/src/modals/RenameModal.vue +58 -0
- package/src/modals/ShareModal.vue +135 -0
- package/src/styles/base.css +1224 -0
- package/src/styles/variables.css +90 -0
- package/src/types/ExplorerConfig.ts +282 -0
- package/src/types/FileNode.ts +136 -0
- package/src/types/index.ts +27 -0
- package/src/types/peers.d.ts +45 -0
- package/src/viewers/ArchiveViewer.vue +186 -0
- package/src/viewers/CsvViewer.vue +319 -0
- package/src/viewers/DrawioViewer.vue +243 -0
- package/src/viewers/EpubViewer.vue +307 -0
- package/src/viewers/IpynbViewer.vue +365 -0
- package/src/viewers/MermaidViewer.vue +259 -0
- package/src/viewers/PdfViewer.vue +562 -0
- package/src/viewers/PsdViewer.vue +264 -0
- package/src/viewers/TiffViewer.vue +273 -0
- package/src/viewers/Viewer3D.vue +120 -0
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
(function(zt,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],l):(zt=typeof globalThis<"u"?globalThis:zt||self,l(zt.FilexCore={},zt.Vue))})(this,function(zt,l){"use strict";function Qs(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in e)){const i=Object.getOwnPropertyDescriptor(n,a);i&&Object.defineProperty(e,a,i.get?i:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function To(e){return!!e&&e.enabled&&e.state==="ok"}function ec(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 Kp(e){if(typeof e=="function"){const t=e();return t instanceof Promise?await t:t}return e}function Yp(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 tc(e){const t=ec(e),r=Yp(e.auth);async function n(te={}){const se={Accept:"application/json",...te};if(r.kind==="bearer"){const ie=await Kp(r.token);ie&&(se.Authorization=`Bearer ${ie}`)}else if(r.kind==="csrf")se["X-CSRF-TOKEN"]=r.csrf,se["X-Requested-With"]="XMLHttpRequest";else if(r.kind==="basic"){const ie=btoa(`${r.user}:${r.pass}`);se.Authorization=`Basic ${ie}`}return se}function a(te={}){const se={Accept:"application/json",...te};if(r.kind==="bearer"&&typeof r.token=="string")se.Authorization=`Bearer ${r.token}`;else if(r.kind==="csrf")se["X-CSRF-TOKEN"]=r.csrf,se["X-Requested-With"]="XMLHttpRequest";else if(r.kind==="basic"){const ie=btoa(`${r.user}:${r.pass}`);se.Authorization=`Basic ${ie}`}return se}function i(){return r.kind==="csrf"?"include":"same-origin"}function o(te){const se=(e.locale??"tr")!=="en",_e={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"]}[te];return _e?se?_e[0]:_e[1]:se?`Hata (${te})`:`Error (${te})`}async function s(te,se={}){const ie={...await n(),...se.headers??{}},_e=await fetch(te,{...se,headers:ie,credentials:i()});if(!_e.ok){const He=await _e.text().catch(()=>""),je=new Error(o(_e.status));throw je.status=_e.status,je.detail=He.slice(0,300),je}return _e.json()}function c(te=""){return t.manager.replace(/\/manager(\?.*)?$/,"/permissions")+te}async function u(te){return s(c()+"?path="+encodeURIComponent(te))}async function f(te){return s(c("/resolve")+"?email="+encodeURIComponent(te))}async function h(te){return s(c("/users")+"?q="+encodeURIComponent(te))}async function d(te){return s(c(),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(te)})}async function p(te,se){return s(c("/"+te),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({level:se})})}async function w(te){return s(c("/"+te),{method:"DELETE"})}async function m(te){return s(c("/invite"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(te)})}async function _(te){return s(c("/share-mail"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(te)})}function y(te){const se=new URLSearchParams;for(const[ie,_e]of Object.entries(te))_e!=null&&se.set(ie,String(_e));return se.toString()}function g(te,se={}){const ie=t.manager.includes("?")?"&":"?";return`${t.manager}${ie}${y({q:te,action:te,...se})}`}async function b(te){return s(g("index",{path:te}))}async function v(te,se){return s(g("search",{path:te,filter:se}))}async function E(te){return s(g("subfolders",{path:te}))}async function C(te,se){return s(g("newfolder"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:te,name:se})})}async function A(te,se,ie){return s(g("rename"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:te,item:se,name:ie})})}async function k(te,se,ie){return s(g("move"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:te,item:ie,items:se.map(_e=>({path:_e}))})})}async function B(te,se){return s(g("delete"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:te,items:se.map(ie=>({path:ie}))})})}async function T(te,se){if(!t.copy)throw new Error("copy endpoint not configured");return s(t.copy,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source:te,target:se})})}async function F(te,se,ie){if(!t.moveAsync)throw new Error("moveAsync endpoint not configured");return s(t.moveAsync,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source:te,target:se,sourceDir:ie})})}async function V(te,se){if(!t.deleteAsync)throw new Error("deleteAsync endpoint not configured");return s(t.deleteAsync,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source:te,sourceDir:se})})}async function L(te){if(!t.restore)throw new Error("restore endpoint not configured");return s(t.restore,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source:te})})}async function H(te){if(!t.trashList)throw new Error("trashList endpoint not configured");const se=t.trashList,ie=se.includes("?")?"&":"?",_e=te?`${se}${ie}storage=${encodeURIComponent(te)}`:se;return s(_e)}async function X(te){const se=t.trashRestore;if(!se)throw new Error("trashRestore endpoint not configured");let ie=0;for(const _e of te)try{await s(se,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({node_id:_e})}),ie++}catch{}return{restored:ie}}async function W(te,se,ie){const _e=new FormData;_e.append("path",te);for(const je of se)_e.append("file[]",je,je.name);const He=await n();return new Promise((je,Ve)=>{const ge=new XMLHttpRequest;ge.open("POST",g("upload"));for(const[Ce,ve]of Object.entries(He))Ce!=="Content-Type"&&ge.setRequestHeader(Ce,ve);ge.withCredentials=i()==="include",ge.upload.onprogress=Ce=>{ie&&Ce.lengthComputable&&ie(Math.round(Ce.loaded/Ce.total*100))},ge.onload=()=>{if(ge.status>=200&&ge.status<300)try{je(JSON.parse(ge.responseText))}catch(Ce){Ve(Ce)}else Ve(new Error(`${ge.status} ${ge.statusText}: ${ge.responseText.slice(0,200)}`))},ge.onerror=()=>Ve(new Error("Network error")),ge.send(_e)})}function Z(te){return g("download",{path:te})}function Q(te){return g("preview",{path:te})}async function K(te){const se=await n(),ie=await fetch(Q(te),{headers:se,credentials:i()});if(!ie.ok){const Ve=await ie.text().catch(()=>"");throw new Error(`${ie.status} ${ie.statusText}${Ve?" — "+Ve.slice(0,200):""}`)}const _e=await ie.blob(),He=_e.type||ie.headers.get("content-type")||"";return{url:URL.createObjectURL(_e),blob:_e,mime:He}}async function ue(te){const se=await n(),ie=await fetch(Q(te),{headers:se,credentials:i()});if(!ie.ok){const _e=await ie.text().catch(()=>"");throw new Error(`${ie.status} ${ie.statusText}${_e?" — "+_e.slice(0,200):""}`)}return ie.arrayBuffer()}async function ne(){return t.limits?s(t.limits):{max_upload_mb:1024}}async function fe(){return t.capabilities?s(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 re(te){if(!t.shareCreate)throw new Error("shareCreate endpoint not configured");return s(t.shareCreate,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(te)})}async function ye(te){if(!t.shareList)return{shares:[]};const se=t.shareList.includes("?")?"&":"?";return s(`${t.shareList}${se}path=${encodeURIComponent(te)}`)}async function he(te){if(!t.shareDelete)throw new Error("shareDelete endpoint not configured");const se=t.shareDelete.replace("{uuid}",encodeURIComponent(te));return s(se,{method:"DELETE"})}async function ke(te){if(!t.archiveList)throw new Error("archiveList endpoint not configured");return{entries:(await s(t.archiveList,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:te})})).entries.map(ie=>({name:ie.name,size:ie.size,isDir:ie.is_dir,lastModified:ie.mtime}))}}async function Ee(te,se){if(!t.archiveExtract)throw new Error("archiveExtract endpoint not configured");return s(t.archiveExtract,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:te,members:se})})}async function me(te,se){if(!t.archiveAdd)throw new Error("archiveAdd endpoint not configured");return s(t.archiveAdd,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:te,files:se})})}return{index:b,search:v,subfolders:E,newFolder:C,rename:A,move:k,copy:T,moveAsync:F,deleteAsync:V,deleteItems:B,restore:L,listTrash:H,restoreIds:X,uploadMultipart:W,downloadUrl:Z,previewUrl:Q,fetchBlob:K,fetchArrayBuffer:ue,limits:ne,capabilities:fe,createShare:re,listShares:ye,revokeShare:he,archiveList:ke,archiveExtract:Ee,archiveAdd:me,listPermissions:u,resolveEmail:f,searchUsers:h,addPermission:d,updatePermission:p,deletePermission:w,invitePermission:m,shareMail:_,endpoints:t,authHeaders:n,authHeadersSync:a,credentialsMode:i,jsonFetch:s}}function rc(e,t){const r=e.chunkSize??5242880,n=Math.max(1,Math.min(8,e.parallelChunks??4));async function a(i){var d,p;const o=i.chunkSize??r,s=i.parallelChunks??n,c={id:crypto.randomUUID(),file:i.file,path:i.path,totalBytes:i.file.size,uploadedBytes:0,percent:0,status:"initializing",cancel:()=>{}};let u=!1;const f=[];c.cancel=()=>{u=!0;for(const w of f)w.abort()};function h(){var w;c.percent=c.totalBytes>0?Math.min(100,Math.round(c.uploadedBytes/c.totalBytes*100)):0,(w=i.onProgress)==null||w.call(i,c)}try{if(!t.endpoints.uploadInit)throw new Error("uploadInit not configured");const w=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"})});c.uploadId=w.uploadId,c.status="uploading",h();const m=w.chunkBytes??o,_=new Map,y=[];let g=0;async function b(B){const F=(B.partNumber-1)*(w.chunkBytes??o),V=Math.min(F+(w.chunkBytes??o),i.file.size),L=i.file.slice(F,V),H=new AbortController;f.push(H),await new Promise((X,W)=>{const Z=new XMLHttpRequest;Z.open("PUT",B.presignedUrl),Z.upload.onprogress=Q=>{if(Q.lengthComputable){const K=_.get(B.partNumber)??0,ue=Q.loaded-K;_.set(B.partNumber,Q.loaded),c.uploadedBytes+=ue,h()}},Z.onload=()=>{if(Z.status>=200&&Z.status<300){const Q=(Z.getResponseHeader("ETag")||Z.getResponseHeader("etag")||"").trim();if(!Q){W(new Error("Missing ETag on S3 response"));return}const K=V-F,ue=_.get(B.partNumber)??0;ue<K&&(c.uploadedBytes+=K-ue,_.set(B.partNumber,K)),y.push({partNumber:B.partNumber,etag:Q}),X()}else W(new Error(`S3 PUT ${B.partNumber} → ${Z.status}: ${Z.responseText.slice(0,200)}`))},Z.onerror=()=>W(new Error(`S3 PUT ${B.partNumber} network error`)),Z.onabort=()=>W(new DOMException("Aborted","AbortError")),H.signal.addEventListener("abort",()=>Z.abort()),Z.send(L)})}const v=2;async function E(B,T=0){try{await b(B)}catch(F){if(u)throw F;const V=F instanceof Error?F:new Error(String(F));if(V.name==="AbortError"||T>=v)throw V;const L=_.get(B.partNumber)??0;L>0&&(c.uploadedBytes=Math.max(0,c.uploadedBytes-L),_.delete(B.partNumber),h());const H=500*(T+1)+Math.floor(Math.random()*250);return await new Promise(X=>setTimeout(X,H)),E(B,T+1)}}async function C(){for(;!u&&g<w.parts.length;){const B=w.parts[g++];await E(B)}}const A=[];for(let B=0;B<s;B++)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");c.status="finalizing",y.sort((B,T)=>B.partNumber-T.partNumber);const k=await t.jsonFetch(t.endpoints.uploadFinalize,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({uploadId:w.uploadId,parts:y})});return c.status="done",c.uploadedBytes=c.totalBytes,c.percent=100,h(),(d=i.onDone)==null||d.call(i,c,k),k}catch(w){const m=w instanceof Error?w:new Error(String(w));if(c.status=m.name==="AbortError"?"aborted":"error",c.error=m.message,h(),c.uploadId&&t.endpoints.uploadAbort&&c.status==="aborted")try{await t.jsonFetch(t.endpoints.uploadAbort,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({uploadId:c.uploadId})})}catch{}throw(p=i.onError)==null||p.call(i,c,m),m}}return{uploadFile:a}}function nc(e){const t=l.ref(new Set),r=l.ref(null);function n(d,p={}){if(p.shift&&r.value){const w=e(),m=w.findIndex(v=>v.path===r.value),_=w.findIndex(v=>v.path===d);if(m===-1||_===-1){t.value=new Set([d]),r.value=d;return}const[y,g]=m<_?[m,_]:[_,m],b=new Set;for(let v=y;v<=g;v++)b.add(w[v].path);t.value=b;return}if(p.ctrl){const w=new Set(t.value);w.has(d)?w.delete(d):w.add(d),t.value=w,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 s(d){const p=new Set(t.value);p.add(d),t.value=p}function c(d){const p=new Set(t.value);p.delete(d),t.value=p}const u=l.computed(()=>t.value.size),f=l.computed(()=>t.value.size===0),h=l.computed(()=>e().filter(p=>t.value.has(p.path)));return{selected:t,anchor:r,click:n,clear:a,selectAll:i,has:o,add:s,remove:c,size:u,isEmpty:f,nodes:h}}function ac(e,t){function r(n){var s;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":(s=t.hasSelection)!=null&&s.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}}l.onMounted(()=>window.addEventListener("keydown",r)),l.onBeforeUnmount(()=>window.removeEventListener("keydown",r))}const ic={"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…","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"},oc={"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…","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"},Mo={tr:ic,en:oc};function _r(e){const t=l.computed(()=>{const i=typeof e=="function"?e():e.value;return Mo[i]??Mo.tr});function r(i,o={}){const s=t.value[i]??i;return Object.entries(o).reduce((c,[u,f])=>c.replaceAll(`{${u}}`,String(f)),s)}function n(i){if(i==null||i<=0)return"—";const o=[[1024**4,"unit.tb"],[1024**3,"unit.gb"],[1024**2,"unit.mb"],[1024,"unit.kb"],[1,"unit.bytes"]];for(const[s,c]of o)if(i>=s){const u=i/s;return`${u>=100?Math.round(u):u.toFixed(u>=10?1:2)} ${r(c)}`}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 Jp=2e3,Qp=8e3;function lc(e){const t=(...s)=>{for(const c of s)if(typeof c=="number")return c;return 0},r=(...s)=>{for(const c of s)if(typeof c=="string"&&c!=="")return c;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 sc(e,t,r={}){const n=l.ref([]),a=new Set,i=new Map;let o=!1;const s=l.computed(()=>n.value.some(w=>w.status==="pending"||w.status==="running"));let c;function u(){c||t.endpoints.opsList&&(c=setInterval(()=>{h()},Jp),h())}function f(){c&&(clearInterval(c),c=void 0)}async function h(){var w;if(t.endpoints.opsList)try{const _=((await t.jsonFetch(t.endpoints.opsList)).ops||[]).map(lc);for(const k of _)(k.status==="done"||k.status==="error")&&!a.has(k.id)&&(a.add(k.id),i.set(k.id,Date.now()),o&&((w=r.onSettled)==null||w.call(r,k)));const y=new Set(n.value.map(k=>k.id)),g=_.filter(k=>k.status==="pending"||k.status==="running"?!0:o?y.has(k.id):!1),b=new Set(g.map(k=>k.id)),v=n.value.filter(k=>!b.has(k.id)),E=[...g,...v];o=!0;const C=Date.now(),A=E.filter(k=>{if(k.status==="pending"||k.status==="running")return!0;const B=i.get(k.id);return B!==void 0&&C-B<Qp});n.value=A,!s.value&&A.length===0&&f()}catch(m){console.warn("[usePendingOps] poll failed:",m)}}function d(w){const m=lc(w);n.value.some(y=>y.id===m.id)||(n.value=[m,...n.value]),u()}function p(w){n.value=n.value.filter(m=>m.id!==w),i.delete(w)}return l.onBeforeUnmount(()=>{f()}),{ops:n,hasActive:s,register:d,dismiss:p,poll:h,startPolling:u,stopPolling:f}}let Zi=null,Ki=null,Yi=null,Ji=null;function li(){Zi||(Zi=import("monaco-editor").then(e=>(Yi=e.default??e,Yi)).catch(()=>(Yi=null,null))),Ki||(Ki=import("highlight.js").then(e=>(Ji=e.default??e,Ji)).catch(()=>(Ji=null,null)))}async function Qi(){return Zi||li(),Zi}async function e0(){return Ki||li(),Ki}function Io(){return Yi}function cc(){return Ji}function em(){return li(),{ensureMonaco:Qi,ensureHighlight:e0,getMonaco:Io,getHighlight:cc}}const tm={class:"fe-toolbar"},rm={class:"fe-toolbar__primary"},nm=["title","aria-label"],am=["title"],im={class:"fe-btn__label"},om=["disabled","title","onClick"],lm={class:"fe-icon"},sm={class:"fe-btn__label"},cm=["title"],um={class:"fe-btn__label"},fm={class:"fe-toolbar__search-group"},dm={class:"fe-search"},hm=["placeholder","value"],pm=["title"],mm=["title"],vm={class:"fe-toolbar__view",role:"tablist","aria-label":"View"},gm=["aria-selected","title"],ym=["aria-selected","title"],bm=l.defineComponent({__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}=_r(()=>n.locale),o=l.ref(null),s=l.ref(n.searchQuery);l.watch(()=>n.searchQuery,w=>{s.value=w});let c;function u(w){const m=w.target.value;s.value=m,c&&clearTimeout(c),c=setTimeout(()=>a("update:searchQuery",m),200)}function f(){var w,m;(w=o.value)==null||w.focus(),(m=o.value)==null||m.select()}t({focusSearch:f});const h=l.computed(()=>n.selectionMode??"none"),d=l.computed(()=>n.actions.filter(w=>!w.divider&&!w.hidden));function p(w){a("action",w)}return(w,m)=>(l.openBlock(),l.createElementBlock("div",tm,[l.createElementVNode("div",rm,[e.canGoUp?(l.openBlock(),l.createElementBlock("button",{key:0,type:"button",class:"fe-btn fe-btn--icon-only",title:l.unref(i)("toolbar.go_up"),"aria-label":l.unref(i)("toolbar.go_up"),onClick:m[0]||(m[0]=_=>a("go-up"))},[...m[7]||(m[7]=[l.createElementVNode("span",{class:"fe-icon"},"↑",-1)])],8,nm)):l.createCommentVNode("",!0),h.value==="none"&&!e.trashActive&&!e.atVirtualRoot&&e.canWrite!==!1?(l.openBlock(),l.createElementBlock("button",{key:1,type:"button",class:"fe-btn fe-btn--primary",title:l.unref(i)("toolbar.new_folder"),onClick:m[1]||(m[1]=_=>a("new-folder"))},[m[8]||(m[8]=l.createElementVNode("span",{class:"fe-icon"},"📁",-1)),l.createElementVNode("span",im,l.toDisplayString(l.unref(i)("toolbar.new_folder")),1)],8,am)):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(d.value,_=>(l.openBlock(),l.createElementBlock("button",{key:_.key,type:"button",class:l.normalizeClass(["fe-btn",{"fe-btn--danger":_.danger,"is-disabled":_.disabled}]),disabled:_.disabled,title:_.label,onClick:y=>p(_.key)},[l.createElementVNode("span",lm,l.toDisplayString(_.icon),1),l.createElementVNode("span",sm,l.toDisplayString(_.label),1)],10,om))),128)),e.pasteEnabled&&h.value==="none"&&!e.trashActive&&!e.atVirtualRoot&&e.canWrite!==!1?(l.openBlock(),l.createElementBlock("button",{key:2,type:"button",class:"fe-btn",title:l.unref(i)("ctx.paste"),onClick:m[2]||(m[2]=_=>p("paste"))},[m[9]||(m[9]=l.createElementVNode("span",{class:"fe-icon"},"📋",-1)),l.createElementVNode("span",um,l.toDisplayString(l.unref(i)("ctx.paste")),1)],8,cm)):l.createCommentVNode("",!0)]),m[14]||(m[14]=l.createElementVNode("div",{class:"fe-toolbar__spacer"},null,-1)),l.createElementVNode("div",fm,[l.createElementVNode("div",dm,[l.createElementVNode("input",{ref_key:"searchEl",ref:o,type:"search",class:"fe-search__input",placeholder:l.unref(i)("toolbar.search.placeholder"),value:s.value,"aria-label":"Search",onInput:u},null,40,hm)]),!e.atVirtualRoot&&e.canWrite!==!1?(l.openBlock(),l.createElementBlock("button",{key:0,type:"button",class:"fe-btn fe-btn--icon-only",title:l.unref(i)("toolbar.upload"),onClick:m[3]||(m[3]=_=>a("upload"))},[...m[10]||(m[10]=[l.createElementVNode("span",{class:"fe-icon"},"⬆",-1)])],8,pm)):l.createCommentVNode("",!0),l.createElementVNode("button",{type:"button",class:"fe-btn fe-btn--icon-only",title:l.unref(i)("toolbar.refresh"),onClick:m[4]||(m[4]=_=>a("refresh"))},[...m[11]||(m[11]=[l.createElementVNode("span",{class:"fe-icon"},"↻",-1)])],8,mm)]),l.createElementVNode("div",vm,[l.createElementVNode("button",{type:"button",class:l.normalizeClass(["fe-btn fe-btn--icon-only",{"is-active":e.viewMode==="list"}]),role:"tab","aria-selected":e.viewMode==="list",title:l.unref(i)("toolbar.view.list"),onClick:m[5]||(m[5]=_=>a("update:viewMode","list"))},[...m[12]||(m[12]=[l.createElementVNode("span",{class:"fe-icon"},"☰",-1)])],10,gm),l.createElementVNode("button",{type:"button",class:l.normalizeClass(["fe-btn fe-btn--icon-only",{"is-active":e.viewMode==="grid"}]),role:"tab","aria-selected":e.viewMode==="grid",title:l.unref(i)("toolbar.view.grid"),onClick:m[6]||(m[6]=_=>a("update:viewMode","grid"))},[...m[13]||(m[13]=[l.createElementVNode("span",{class:"fe-icon"},"▦",-1)])],10,ym)])]))}}),wm=["onClick"],_m=l.defineComponent({__name:"TagPicker",props:{nodeId:{},apiBase:{},authHeaders:{type:Function},palette:{}},emits:["change","error"],setup(e,{emit:t}){const r=e,n=t,a=l.ref([]),i=l.ref(!1),o=l.ref(!1),s=l.ref(""),c=l.computed(()=>r.palette??["#ef4444","#f59e0b","#10b981","#3b82f6","#8b5cf6","#ec4899","#14b8a6","#f97316"]);function u(m){let _=0;for(let g=0;g<m.length;g++)_=_*31+m.charCodeAt(g)|0;const y=c.value;return y[Math.abs(_)%y.length]}async function f(m={}){return{...await(r.authHeaders??(()=>({})))(),...m}}async function h(){i.value=!0;try{const m=r.apiBase??"",_=await fetch(`${m}/api/files/manager/tags?node_id=${r.nodeId}`,{headers:await f(),credentials:"include"});if(_.ok){const y=await _.json();a.value=Array.isArray(y.tags)?y.tags:[]}}catch(m){n("error",m instanceof Error?m.message:String(m))}finally{i.value=!1}}async function d(m){const _=[...a.value];a.value=m;try{const y=r.apiBase??"",g=await fetch(`${y}/api/files/manager/tags`,{method:"POST",headers:await f({"Content-Type":"application/json"}),credentials:"include",body:JSON.stringify({node_id:r.nodeId,tags:m})});if(!g.ok)throw new Error(`tag save failed: ${g.status}`);n("change",m)}catch(y){a.value=_,n("error",y instanceof Error?y.message:String(y))}}function p(){const m=s.value.trim();if(!m||a.value.includes(m)){s.value="",o.value=!1;return}d([...a.value,m]),s.value="",o.value=!1}function w(m){d(a.value.filter(_=>_!==m))}return l.onMounted(h),l.watch(()=>r.nodeId,h),(m,_)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["filex-tag-picker",{"is-loading":i.value}])},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(a.value,y=>(l.openBlock(),l.createElementBlock("span",{key:y,class:"filex-tag",style:l.normalizeStyle({"--filex-tag-color":u(y)})},[l.createTextVNode(l.toDisplayString(y)+" ",1),l.createElementVNode("button",{class:"filex-tag-x",type:"button",onClick:g=>w(y),"aria-label":"Remove tag"},"×",8,wm)],4))),128)),o.value?(l.openBlock(),l.createElementBlock("form",{key:0,class:"filex-tag-add",onSubmit:l.withModifiers(p,["prevent"])},[l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":_[0]||(_[0]=y=>s.value=y),autofocus:"",placeholder:"tag name",onBlur:p,onKeydown:_[1]||(_[1]=l.withKeys(y=>{o.value=!1,s.value=""},["escape"]))},null,544),[[l.vModelText,s.value]])],32)):(l.openBlock(),l.createElementBlock("button",{key:1,class:"filex-tag-add-btn",type:"button",onClick:_[2]||(_[2]=y=>o.value=!0)},"+ Add tag"))],2))}}),xr=(e,t)=>{const r=e.__vccOpts||e;for(const[n,a]of t)r[n]=a;return r},uc=xr(_m,[["__scopeId","data-v-629745b7"]]),xm={class:"filex-recent"},km=["disabled"],Sm={key:0},Em=["onClick"],Cm={class:"filex-recent-name"},Dm={class:"filex-recent-meta"},Am={key:1,class:"filex-recent-empty"},Bm={key:2,class:"filex-recent-empty"},fc=xr(l.defineComponent({__name:"RecentlyOpened",props:{apiBase:{},authHeaders:{type:Function},limit:{},refreshKey:{}},emits:["open","error"],setup(e,{emit:t}){const r=e,n=t,a=l.ref([]),i=l.ref(!1);async function o(){i.value=!0;try{const c=await(r.authHeaders??(()=>({})))(),u=r.apiBase??"",f=r.limit??20,h=await fetch(`${u}/api/files/manager/recent?limit=${f}`,{headers:c,credentials:"include"});if(h.ok){const d=await h.json();a.value=Array.isArray(d.entries)?d.entries:Array.isArray(d)?d:[]}}catch(c){n("error",c instanceof Error?c.message:String(c))}finally{i.value=!1}}function s(c){if(!c)return"";const u=new Date(c).getTime();if(Number.isNaN(u))return"";const f=Date.now()-u;return f<6e4?"just now":f<36e5?`${Math.floor(f/6e4)}m ago`:f<864e5?`${Math.floor(f/36e5)}h ago`:`${Math.floor(f/864e5)}d ago`}return l.onMounted(o),l.watch(()=>r.refreshKey,o),(c,u)=>(l.openBlock(),l.createElementBlock("div",xm,[l.createElementVNode("header",null,[u[0]||(u[0]=l.createElementVNode("h3",null,"Recently opened",-1)),l.createElementVNode("button",{class:"filex-recent-refresh",type:"button",onClick:o,disabled:i.value}," ↻ ",8,km)]),a.value.length?(l.openBlock(),l.createElementBlock("ul",Sm,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(a.value,f=>(l.openBlock(),l.createElementBlock("li",{key:f.id},[l.createElementVNode("button",{type:"button",onClick:h=>n("open",f),class:"filex-recent-item"},[l.createElementVNode("span",Cm,l.toDisplayString(f.name),1),l.createElementVNode("span",Dm,l.toDisplayString(s(f.last_opened)),1)],8,Em)]))),128))])):i.value?(l.openBlock(),l.createElementBlock("p",Bm,"Loading…")):(l.openBlock(),l.createElementBlock("p",Am,"Nothing here yet."))]))}}),[["__scopeId","data-v-be8c9080"]]),Tm={class:"fe-breadcrumb","aria-label":"Breadcrumb"},Mm=["aria-current","onClick","onContextmenu","onDrop"],Im={key:0,class:"fe-breadcrumb__sep","aria-hidden":"true"},zm=["title","aria-label"],Fm=["placeholder","onKeydown"],Nm=l.defineComponent({__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=l.computed(()=>{if(!r.rootPath)return"";const g=r.rootPath,b=g.indexOf("://");return(b>=0?g.slice(b+3):g).replace(/^\/+|\/+$/g,"")}),a=l.computed(()=>{const g=n.value;if(!g)return r.rootLabel||r.adapter;const b=g.split("/");return b[b.length-1]||r.rootLabel||r.adapter}),{t:i}=_r(()=>r.locale),o=t,s=l.computed(()=>{const g=`${r.adapter}://`,b=r.dirname.startsWith(g)?r.dirname.slice(g.length):r.dirname,v=b.split("/").filter(Boolean),E=[];if(r.rootPath){const A=n.value,k=b.replace(/^\/+|\/+$/g,""),B=A&&(k===A||k.startsWith(A+"/"))?k.slice(A.length).replace(/^\/+/,""):"";E.push({label:a.value,adapterPath:r.rootPath});let T=A;for(const F of B.split("/").filter(Boolean))T=T?`${T}/${F}`:F,E.push({label:F===".trash"?i("node.trash"):F,adapterPath:`${g}${T}`});return E}r.multiStorageRoot?(E.push({label:"/",adapterPath:""}),r.adapter&&E.push({label:r.rootLabel||r.adapter,adapterPath:g})):E.push({label:r.rootLabel||r.adapter,adapterPath:g});let C="";for(const A of v){C=C?`${C}/${A}`:A;const k=A===".trash"?i("node.trash"):A;E.push({label:k,adapterPath:`${g}${C}`})}return E});function c(g){o("navigate",g.adapterPath)}function u(g,b){g.preventDefault(),g.stopPropagation(),o("crumb-context",{x:g.clientX,y:g.clientY,adapterPath:b.adapterPath,label:b.label})}function f(g){var b;(b=g.dataTransfer)!=null&&b.types.includes("application/x-brf-files")&&(g.preventDefault(),g.stopPropagation(),g.dataTransfer&&(g.dataTransfer.dropEffect="move"))}function h(g,b){var v;(v=g.dataTransfer)!=null&&v.types.includes("application/x-brf-files")&&(g.preventDefault(),g.stopPropagation(),o("crumb-drop",b.adapterPath,g))}const d=l.ref(!1),p=l.ref(""),w=l.ref(null);function m(){const g=`${r.adapter}://`,b=r.dirname.startsWith(g)?r.dirname.slice(g.length):r.dirname;if(r.rootPath){const v=n.value,E=b.replace(/^\/+|\/+$/g,""),C=v&&(E===v||E.startsWith(v+"/"))?E.slice(v.length).replace(/^\/+/,""):"";p.value=C?`/${C}`:"/",d.value=!0,l.nextTick(()=>{var A,k;(A=w.value)==null||A.focus(),(k=w.value)==null||k.select()});return}if(r.multiStorageRoot)if(!r.adapter)p.value="/";else{const v=b.replace(/^\/+|\/+$/g,"");p.value=v?`/${r.adapter}/${v}`:`/${r.adapter}`}else p.value=b;d.value=!0,l.nextTick(()=>{var v,E;(v=w.value)==null||v.focus(),(E=w.value)==null||E.select()})}function _(){const g=p.value.trim();if(d.value=!1,r.rootPath){const v=g.replace(/^\/+|\/+$/g,""),E=n.value,C=v?E?`${E}/${v}`:v:E;o("navigate",C?`${r.adapter}://${C}`:`${r.adapter}://`);return}if(r.multiStorageRoot){const v=g.replace(/^\/+|\/+$/g,"");if(!v){o("navigate","");return}const E=v.indexOf("/"),C=E===-1?v:v.slice(0,E),A=E===-1?"":v.slice(E+1);o("navigate",A?`${C}://${A}`:`${C}://`);return}const b=g.replace(/^\/+|\/+$/g,"");b&&o("navigate",`${r.adapter}://${b}`)}function y(){d.value=!1}return(g,b)=>(l.openBlock(),l.createElementBlock("nav",Tm,[d.value?l.withDirectives((l.openBlock(),l.createElementBlock("input",{key:1,ref_key:"pathInput",ref:w,"onUpdate:modelValue":b[0]||(b[0]=v=>p.value=v),type:"text",class:"fe-breadcrumb__input",placeholder:l.unref(i)("breadcrumb.path_placeholder"),spellcheck:"false",autocomplete:"off",onKeydown:[l.withKeys(l.withModifiers(_,["prevent"]),["enter"]),l.withKeys(l.withModifiers(y,["prevent"]),["escape"])],onBlur:y},null,40,Fm)),[[l.vModelText,p.value]]):(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(s.value,(v,E)=>(l.openBlock(),l.createElementBlock("button",{key:v.adapterPath,class:l.normalizeClass(["fe-breadcrumb__crumb",{"is-last":E===s.value.length-1}]),type:"button","aria-current":E===s.value.length-1?"page":void 0,onClick:C=>c(v),onContextmenu:C=>u(C,v),onDragover:f,onDrop:C=>h(C,v)},[l.createElementVNode("span",null,l.toDisplayString(v.label),1),E<s.value.length-1?(l.openBlock(),l.createElementBlock("span",Im,"›")):l.createCommentVNode("",!0)],42,Mm))),128)),l.createElementVNode("button",{type:"button",class:"fe-breadcrumb__edit",title:l.unref(i)("breadcrumb.go_to_path"),"aria-label":l.unref(i)("breadcrumb.go_to_path"),onClick:m},"✏",8,zm)],64))]))}}),Om=["aria-pressed","title"],Lm={viewBox:"0 0 24 24",width:"16",height:"16","aria-hidden":"true"},Pm=["fill"],Rm={key:0,class:"filex-star-label"},dc=xr(l.defineComponent({__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=l.ref(r.starred);l.watch(()=>r.starred,o=>{a.value=o});async function i(){const o=!a.value;a.value=o;try{const s={"Content-Type":"application/json",...await(r.authHeaders??(()=>({})))()},c=r.apiBase??"",u=await fetch(`${c}/api/files/manager/star`,{method:"POST",headers:s,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(s){a.value=!o,n("error",s instanceof Error?s.message:String(s))}}return(o,s)=>(l.openBlock(),l.createElementBlock("button",{type:"button",class:l.normalizeClass(["filex-star-btn",{"is-starred":a.value,"is-compact":e.compact}]),"aria-pressed":a.value,title:a.value?"Unstar":"Star",onClick:l.withModifiers(i,["stop"])},[(l.openBlock(),l.createElementBlock("svg",Lm,[l.createElementVNode("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,Pm)])),e.compact?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("span",Rm,l.toDisplayString(a.value?"Starred":"Star"),1))],10,Om))}}),[["__scopeId","data-v-bf2ee8db"]]),Vm={class:"fe-list__head",role:"row"},$m={class:"fe-list__col fe-list__col--name",role:"columnheader"},Um={class:"fe-list__col fe-list__col--size",role:"columnheader"},Hm={class:"fe-list__col fe-list__col--mod",role:"columnheader"},Gm={class:"fe-list__body",role:"rowgroup"},jm=["onClick","onDblclick","onContextmenu","onDragstart","onDragover","onDrop","onTouchstartPassive"],qm={class:"fe-list__col fe-list__col--name"},Wm={class:"fe-list__icon","aria-hidden":"true"},Xm={class:"fe-list__name-wrap"},Zm=["title"],Km=["title"],Ym={class:"fe-list__col fe-list__col--size"},Jm={class:"fe-list__col fe-list__col--mod"},Qm={key:0,class:"fe-list__empty"},e2=l.defineComponent({__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}=_r(()=>r.locale);function s(C){return r.selected.has(C.path)}function c(C,A){n("click-row",C,{ctrl:A.ctrlKey||A.metaKey,shift:A.shiftKey})}function u(C){n("dbl-row",C)}function f(C,A){A.preventDefault(),A.stopPropagation(),n("context-row",C,A)}function h(C,A){n("item-drag-start",C,A)}function d(C,A){var k;C.type==="dir"&&(k=A.dataTransfer)!=null&&k.types.includes("application/x-brf-files")&&(A.preventDefault(),A.stopPropagation(),A.dataTransfer&&(A.dataTransfer.dropEffect="move"))}function p(C,A){var k;C.type==="dir"&&(k=A.dataTransfer)!=null&&k.types.includes("application/x-brf-files")&&(A.preventDefault(),A.stopPropagation(),n("item-drop-into",C,A))}let w,m=null;function _(C,A){m=C,w&&clearTimeout(w),w=setTimeout(()=>{if(m){const k=A.touches[0];n("context-row",m,{clientX:k.clientX,clientY:k.clientY,preventDefault:()=>{}})}},500)}function y(){w&&clearTimeout(w),m=null}function g(C){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,""),k=A.lastIndexOf("/");return k===-1?"":A.slice(0,k)}const E=l.computed(()=>r.files);return(C,A)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["fe-list",{"is-loading":e.loading,"has-star-col":!!e.apiBase||e.apiBase===""}])},[l.createElementVNode("div",Vm,[A[1]||(A[1]=l.createElementVNode("div",{class:"fe-list__col fe-list__col--star",role:"columnheader","aria-label":"Star"},null,-1)),l.createElementVNode("div",$m,l.toDisplayString(l.unref(a)("col.name")),1),l.createElementVNode("div",Um,l.toDisplayString(l.unref(a)("col.size")),1),l.createElementVNode("div",Hm,l.toDisplayString(l.unref(a)("col.modified")),1)]),l.createElementVNode("div",Gm,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(E.value,k=>{var B,T;return l.openBlock(),l.createElementBlock("div",{key:k.path,class:l.normalizeClass(["fe-list__row",{"is-selected":s(k),"is-dir":k.type==="dir","is-trash":k.trashed,"is-clipped":(B=e.clipped)==null?void 0:B.has(k.path)}]),role:"row",tabindex:"0",draggable:"true",onClick:F=>c(k,F),onDblclick:F=>u(k),onContextmenu:F=>f(k,F),onDragstart:F=>h(k,F),onDragover:F=>d(k,F),onDrop:F=>p(k,F),onTouchstartPassive:F=>_(k,F),onTouchend:y,onTouchmove:y},[l.createElementVNode("div",{class:"fe-list__col fe-list__col--star",onClick:A[0]||(A[0]=l.withModifiers(()=>{},["stop"]))},[typeof k.id=="number"&&k.type==="file"?(l.openBlock(),l.createBlock(dc,{key:0,starred:!!((T=e.starredIds)!=null&&T.has(k.id)),"node-id":k.id,"api-base":e.apiBase,"auth-headers":e.authHeaders,compact:"",onChange:F=>n("star-change",k,F)},null,8,["starred","node-id","api-base","auth-headers","onChange"])):l.createCommentVNode("",!0)]),l.createElementVNode("div",qm,[l.createElementVNode("span",Wm,l.toDisplayString(g(k)),1),l.createElementVNode("div",Xm,[l.createElementVNode("span",{class:"fe-list__name",title:k.basename},l.toDisplayString(l.unref(o)(k)),9,Zm),e.showParentPath?(l.openBlock(),l.createElementBlock("span",{key:0,class:"fe-list__parent",title:v(k.path)},l.toDisplayString(v(k.path)||"—"),9,Km)):l.createCommentVNode("",!0)])]),l.createElementVNode("div",Ym,l.toDisplayString(k.type==="dir"?"—":l.unref(i)(k.size)),1),l.createElementVNode("div",Jm,l.toDisplayString(b(k.last_modified)),1)],42,jm)}),128)),!e.loading&&E.value.length===0?(l.openBlock(),l.createElementBlock("div",Qm,l.toDisplayString(l.unref(a)("empty.folder")),1)):l.createCommentVNode("",!0)])],2))}}),t2=["onClick","onDblclick","onContextmenu","onDragstart","onDragover","onDrop","onTouchstartPassive"],r2={class:"fe-grid__thumb"},n2=["src","alt"],a2={key:1,class:"fe-grid__icon"},i2=["title"],o2=["title"],l2={class:"fe-grid__meta"},s2={key:0,class:"fe-grid__empty"},c2=l.defineComponent({__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}=_r(()=>r.locale);function s(v){return r.selected.has(v.path)}function c(v,E){n("click-card",v,{ctrl:E.ctrlKey||E.metaKey,shift:E.shiftKey})}function u(v){n("dbl-card",v)}function f(v,E){E.preventDefault(),E.stopPropagation(),n("context-card",v,E)}function h(v,E){n("item-drag-start",v,E)}function d(v,E){var C;v.type==="dir"&&(C=E.dataTransfer)!=null&&C.types.includes("application/x-brf-files")&&(E.preventDefault(),E.stopPropagation(),E.dataTransfer&&(E.dataTransfer.dropEffect="move"))}function p(v,E){var C;v.type==="dir"&&(C=E.dataTransfer)!=null&&C.types.includes("application/x-brf-files")&&(E.preventDefault(),E.stopPropagation(),n("item-drop-into",v,E))}let w,m=null;function _(v,E){m=v,w&&clearTimeout(w),w=setTimeout(()=>{if(m){const C=E.touches[0];n("context-card",m,{clientX:C.clientX,clientY:C.clientY,preventDefault:()=>{}})}},500)}function y(){w&&clearTimeout(w),m=null}function g(v){const E=v.replace(/^[a-z][a-z0-9+.-]*:\/\//i,""),C=E.lastIndexOf("/");return C===-1?"":E.slice(0,C)}function b(v){if(v.mime_type==="inode/storage")return"💾";if(v.type==="dir")return"📁";const E=(v.extension||"").toLowerCase();return["jpg","jpeg","png","webp","gif","bmp","svg"].includes(E)?"🖼":["mp4","webm","mov","mkv"].includes(E)?"🎞":["mp3","wav","flac","ogg"].includes(E)?"🎵":E==="pdf"?"📕":["doc","docx","odt"].includes(E)?"📄":["xls","xlsx","csv"].includes(E)?"📊":["ppt","pptx"].includes(E)?"📽":["zip","tar","gz","7z"].includes(E)?"🗜":"📎"}return(v,E)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["fe-grid",{"is-loading":e.loading}])},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.files,C=>{var A;return l.openBlock(),l.createElementBlock("div",{key:C.path,class:l.normalizeClass(["fe-grid__card",{"is-selected":s(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:k=>c(C,k),onDblclick:k=>u(C),onContextmenu:k=>f(C,k),onDragstart:k=>h(C,k),onDragover:k=>d(C,k),onDrop:k=>p(C,k),onTouchstartPassive:k=>_(C,k),onTouchend:y,onTouchmove:y},[l.createElementVNode("div",r2,[C.thumb_url?(l.openBlock(),l.createElementBlock("img",{key:0,src:C.thumb_url,alt:C.basename,loading:"lazy",draggable:"false"},null,8,n2)):(l.openBlock(),l.createElementBlock("span",a2,l.toDisplayString(b(C)),1))]),l.createElementVNode("div",{class:"fe-grid__label",title:C.basename},l.toDisplayString(l.unref(o)(C)),9,i2),e.showParentPath?(l.openBlock(),l.createElementBlock("div",{key:0,class:"fe-grid__parent",title:g(C.path)},l.toDisplayString(g(C.path)||"—"),9,o2)):l.createCommentVNode("",!0),l.createElementVNode("div",l2,l.toDisplayString(C.type==="dir"?"—":l.unref(i)(C.size)),1)],42,t2)}),128)),!e.loading&&e.files.length===0?(l.openBlock(),l.createElementBlock("div",s2,l.toDisplayString(l.unref(a)("empty.folder")),1)):l.createCommentVNode("",!0)],2))}}),u2=["data-prefers-dark"],f2={key:0,class:"fe-ctx__sep"},d2=["disabled","onClick"],h2={key:0,class:"fe-ctx__icon","aria-hidden":"true"},p2={class:"fe-ctx__label"},m2=l.defineComponent({__name:"ContextMenu",props:{locale:{},actions:{},theme:{}},emits:["select"],setup(e,{expose:t,emit:r}){const n=e,a=r;_r(()=>n.locale);const i=l.ref(!1),o=l.ref(0),s=l.ref(0),c=l.ref([]),u=l.ref(null);async function f(v,E){i.value=!0,o.value=v.clientX,s.value=v.clientY,c.value=E,await l.nextTick(),h()}function h(){const v=u.value;if(!v||typeof window>"u")return;const E=v.getBoundingClientRect(),C=8,A=window.innerWidth,k=window.innerHeight;s.value+E.height>k-C&&(s.value=Math.max(C,k-E.height-C)),o.value+E.width>A-C&&(o.value=Math.max(C,A-E.width-C))}function d(){i.value=!1}function p(v){v.disabled||(a("select",v,c.value),d())}function w(v){v.key==="Escape"&&d()}const m=l.computed(()=>n.actions.filter(v=>!v.hidden)),_=l.ref(!1);let y;function g(v){_.value=!!(v&&"matches"in v&&v.matches)}l.onMounted(()=>{var v;typeof window>"u"||(y=window.matchMedia("(prefers-color-scheme: dark)"),g(y),(v=y.addEventListener)==null||v.call(y,"change",g))}),l.onBeforeUnmount(()=>{var v;(v=y==null?void 0:y.removeEventListener)==null||v.call(y,"change",g)});const b=l.computed(()=>`fe-ctx-backdrop--theme-${n.theme||"auto"}`);return t({show:f,hide:d}),(v,E)=>(l.openBlock(),l.createBlock(l.Teleport,{to:"body"},[l.createVNode(l.Transition,{name:"fe-ctx"},{default:l.withCtx(()=>[i.value?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(["fe-ctx-backdrop",b.value]),"data-prefers-dark":_.value?"1":"0",onClick:d,onContextmenu:l.withModifiers(d,["prevent"]),onKeydown:w},[l.createElementVNode("div",{ref_key:"menuEl",ref:u,class:"fe-ctx",role:"menu",style:l.normalizeStyle({top:s.value+"px",left:o.value+"px"}),onClick:E[0]||(E[0]=l.withModifiers(()=>{},["stop"]))},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(m.value,(C,A)=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:C.key||A},[C.divider?(l.openBlock(),l.createElementBlock("div",f2)):(l.openBlock(),l.createElementBlock("button",{key:1,type:"button",class:l.normalizeClass(["fe-ctx__item",{"is-danger":C.danger,"is-disabled":C.disabled}]),disabled:C.disabled,role:"menuitem",onClick:k=>p(C)},[C.icon?(l.openBlock(),l.createElementBlock("span",h2,l.toDisplayString(C.icon),1)):l.createCommentVNode("",!0),l.createElementVNode("span",p2,l.toDisplayString(C.label),1)],10,d2))],64))),128))],4)],42,u2)):l.createCommentVNode("",!0)]),_:1})]))}}),v2={key:0,class:"fe-upload"},g2={class:"fe-upload__header"},y2={class:"fe-upload__count"},b2={class:"fe-upload__list"},w2=["title"],_2=["aria-valuenow"],x2={class:"fe-upload__meta"},k2=["onClick"],S2=["onClick"],E2=l.defineComponent({__name:"UploadProgress",props:{jobs:{},locale:{}},emits:["cancel","dismiss"],setup(e,{emit:t}){const r=e,n=t,{t:a,formatSize:i}=_r(()=>r.locale),o=l.computed(()=>r.jobs);function s(c){switch(c.status){case"done":return a("upload.done");case"error":return`${a("upload.error")}: ${c.error??""}`;case"aborted":return a("upload.aborted");default:return a("upload.progress")}}return(c,u)=>(l.openBlock(),l.createBlock(l.Transition,{name:"fe-upload-slide"},{default:l.withCtx(()=>[o.value.length>0?(l.openBlock(),l.createElementBlock("div",v2,[l.createElementVNode("div",g2,[l.createElementVNode("strong",null,l.toDisplayString(l.unref(a)("upload.progress")),1),l.createElementVNode("span",y2,l.toDisplayString(o.value.length),1)]),l.createElementVNode("ul",b2,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(o.value,f=>(l.openBlock(),l.createElementBlock("li",{key:f.id,class:l.normalizeClass(["fe-upload__item",`is-${f.status}`])},[l.createElementVNode("div",{class:"fe-upload__name",title:f.file.name},l.toDisplayString(f.file.name),9,w2),l.createElementVNode("div",{class:"fe-upload__bar","aria-valuenow":f.percent,role:"progressbar"},[l.createElementVNode("div",{class:"fe-upload__bar-fill",style:l.normalizeStyle({width:f.percent+"%"})},null,4)],8,_2),l.createElementVNode("div",x2,[l.createElementVNode("span",null,l.toDisplayString(s(f)),1),l.createElementVNode("span",null,l.toDisplayString(l.unref(i)(f.uploadedBytes))+" / "+l.toDisplayString(l.unref(i)(f.totalBytes)),1),f.status==="uploading"||f.status==="initializing"?(l.openBlock(),l.createElementBlock("button",{key:0,type:"button",class:"fe-upload__cancel",onClick:h=>n("cancel",f)},l.toDisplayString(l.unref(a)("upload.cancel")),9,k2)):(l.openBlock(),l.createElementBlock("button",{key:1,type:"button",class:"fe-upload__cancel",onClick:h=>n("dismiss",f)},"×",8,S2))])],2))),128))])])):l.createCommentVNode("",!0)]),_:1}))}}),C2={class:"fe-ops__row"},D2=["title"],A2=["onClick"],B2={class:"fe-ops__bar"},T2={key:0,class:"fe-ops__error"},M2=l.defineComponent({__name:"PendingOpsTray",props:{ops:{},locale:{}},emits:["dismiss"],setup(e,{emit:t}){const r=e,n=t,{t:a}=_r(()=>r.locale),i=l.computed(()=>[...r.ops].sort((u,f)=>f.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 s(u){return u.status==="done"?"is-done":u.status==="error"?"is-error":""}function c(u){const f=u.op_type==="copy"?a("ops.copy"):u.op_type==="move"?a("ops.move"):a("ops.delete");return u.status==="pending"?`${f} (${a("ops.queued")})`:u.status==="running"?`${f} ${u.progress_done}/${u.progress_total}`:u.status==="done"?`${f} ${a("ops.done")} (${u.progress_total})`:u.status==="error"?`${f} ${a("ops.error")}`:f}return(u,f)=>i.value.length>0?(l.openBlock(),l.createBlock(l.TransitionGroup,{key:0,name:"fe-ops-slide",tag:"div",class:"fe-ops",role:"status","aria-live":"polite"},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i.value,h=>(l.openBlock(),l.createElementBlock("div",{key:h.id,class:l.normalizeClass(["fe-ops__item",s(h)])},[l.createElementVNode("div",C2,[l.createElementVNode("span",{class:"fe-ops__title",title:h.target_path||h.source_dir||""},l.toDisplayString(c(h)),9,D2),h.status==="done"||h.status==="error"?(l.openBlock(),l.createElementBlock("button",{key:0,type:"button",class:"fe-ops__dismiss","aria-label":"Dismiss",onClick:d=>n("dismiss",h.id)},"×",8,A2)):l.createCommentVNode("",!0)]),l.createElementVNode("div",B2,[l.createElementVNode("div",{class:"fe-ops__bar-fill",style:l.normalizeStyle({width:o(h)+"%"})},null,4)]),h.status==="error"&&h.error_message?(l.openBlock(),l.createElementBlock("div",T2,l.toDisplayString(h.error_message),1)):l.createCommentVNode("",!0)],2))),128))]),_:1})):l.createCommentVNode("",!0)}}),I2={key:0,class:"fe-modal__head"},z2={class:"fe-modal__title"},F2={class:"fe-modal__body"},N2={key:1,class:"fe-modal__actions"},si=l.defineComponent({__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=l.ref(null);l.watch(()=>r.open,s=>{s?(document.addEventListener("keydown",i),setTimeout(()=>{var u;const c=(u=a.value)==null?void 0:u.querySelector('input,select,textarea,button,[tabindex]:not([tabindex="-1"])');c==null||c.focus()},30)):document.removeEventListener("keydown",i)}),l.onBeforeUnmount(()=>document.removeEventListener("keydown",i));function i(s){s.key==="Escape"&&n("close")}function o(){r.closeOnBackdrop!==!1&&n("close")}return(s,c)=>(l.openBlock(),l.createBlock(l.Transition,{name:"fe-modal"},{default:l.withCtx(()=>[e.open?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(["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.createElementVNode("div",{ref_key:"cardEl",ref:a,class:l.normalizeClass(["fe-modal__card",[`fe-modal__card--${e.size||"md"}`,e.chromeless&&"fe-modal__card--chromeless"]]),role:"dialog","aria-modal":"true",onClick:c[1]||(c[1]=l.withModifiers(()=>{},["stop"]))},[e.title&&!e.chromeless?(l.openBlock(),l.createElementBlock("header",I2,[l.createElementVNode("h2",z2,l.toDisplayString(e.title),1),l.createElementVNode("button",{type:"button",class:"fe-modal__close","aria-label":"Close",onClick:c[0]||(c[0]=u=>n("close"))},"×")])):l.createCommentVNode("",!0),l.createElementVNode("div",F2,[l.renderSlot(s.$slots,"default")]),s.$slots.actions&&!e.chromeless?(l.openBlock(),l.createElementBlock("footer",N2,[l.renderSlot(s.$slots,"actions")])):l.createCommentVNode("",!0)],2)],2)):l.createCommentVNode("",!0)]),_:3}))}}),O2=["placeholder","onKeydown"],L2={key:0,class:"fe-form__error"},P2=l.defineComponent({__name:"NewFolderModal",props:{open:{type:Boolean},locale:{}},emits:["close","submit"],setup(e,{emit:t}){const r=e,n=t,{t:a}=_r(()=>r.locale),i=l.ref(""),o=l.ref(null);l.watch(()=>r.open,c=>{c&&(i.value="",o.value=null)});function s(){const c=i.value.trim();if(!c){o.value=a("modal.newfolder.placeholder");return}if(/[\\/]/.test(c)||c==="."||c===".."){o.value="Geçersiz karakter";return}n("submit",c)}return(c,u)=>(l.openBlock(),l.createBlock(si,{open:e.open,title:l.unref(a)("modal.newfolder.title"),size:"sm",onClose:u[2]||(u[2]=f=>n("close"))},{actions:l.withCtx(()=>[l.createElementVNode("button",{type:"button",class:"fe-btn",onClick:u[1]||(u[1]=f=>n("close"))},l.toDisplayString(l.unref(a)("modal.newfolder.cancel")),1),l.createElementVNode("button",{type:"button",class:"fe-btn fe-btn--primary",onClick:s},l.toDisplayString(l.unref(a)("modal.newfolder.create")),1)]),default:l.withCtx(()=>[l.createElementVNode("form",{onSubmit:l.withModifiers(s,["prevent"])},[l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":u[0]||(u[0]=f=>i.value=f),type:"text",class:"fe-input",placeholder:l.unref(a)("modal.newfolder.placeholder"),autocomplete:"off",onKeydown:l.withKeys(l.withModifiers(s,["prevent"]),["enter"])},null,40,O2),[[l.vModelText,i.value]]),o.value?(l.openBlock(),l.createElementBlock("p",L2,l.toDisplayString(o.value),1)):l.createCommentVNode("",!0)],32)]),_:1},8,["open","title"]))}}),R2=["onKeydown"],V2=l.defineComponent({__name:"RenameModal",props:{open:{type:Boolean},locale:{},currentName:{}},emits:["close","submit"],setup(e,{emit:t}){const r=e,n=t,{t:a}=_r(()=>r.locale),i=l.ref("");l.watch(()=>[r.open,r.currentName],([s,c])=>{s&&(i.value=c)});function o(){const s=i.value.trim();s&&(/[\\/]/.test(s)||s==="."||s===".."||n("submit",s))}return(s,c)=>(l.openBlock(),l.createBlock(si,{open:e.open,title:l.unref(a)("modal.rename.title"),size:"sm",onClose:c[2]||(c[2]=u=>n("close"))},{actions:l.withCtx(()=>[l.createElementVNode("button",{type:"button",class:"fe-btn",onClick:c[1]||(c[1]=u=>n("close"))},l.toDisplayString(l.unref(a)("modal.rename.cancel")),1),l.createElementVNode("button",{type:"button",class:"fe-btn fe-btn--primary",onClick:o},l.toDisplayString(l.unref(a)("modal.rename.save")),1)]),default:l.withCtx(()=>[l.createElementVNode("form",{onSubmit:l.withModifiers(o,["prevent"])},[l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":c[0]||(c[0]=u=>i.value=u),type:"text",class:"fe-input",autocomplete:"off",onKeydown:l.withKeys(l.withModifiers(o,["prevent"]),["enter"])},null,40,R2),[[l.vModelText,i.value]])],32)]),_:1},8,["open","title"]))}}),$2=l.defineComponent({__name:"DeleteConfirmModal",props:{open:{type:Boolean},locale:{},count:{}},emits:["close","confirm"],setup(e,{emit:t}){const r=e,n=t,{t:a}=_r(()=>r.locale);return(i,o)=>(l.openBlock(),l.createBlock(si,{open:e.open,title:l.unref(a)("modal.delete.title"),size:"sm",onClose:o[2]||(o[2]=s=>n("close"))},{actions:l.withCtx(()=>[l.createElementVNode("button",{type:"button",class:"fe-btn",onClick:o[0]||(o[0]=s=>n("close"))},l.toDisplayString(l.unref(a)("modal.delete.cancel")),1),l.createElementVNode("button",{type:"button",class:"fe-btn fe-btn--danger",onClick:o[1]||(o[1]=s=>n("confirm"))},l.toDisplayString(l.unref(a)("modal.delete.confirm")),1)]),default:l.withCtx(()=>[l.createElementVNode("p",null,l.toDisplayString(l.unref(a)("modal.delete.message",{count:e.count})),1)]),_:1},8,["open","title"]))}}),U2={class:"fe-form__row"},H2={class:"fe-form__row fe-form__row--stack"},G2={class:"fe-form__row fe-form__row--stack"},j2={key:1,class:"fe-share-result"},q2={class:"fe-share-result__row"},W2={class:"fe-share-result__copy"},X2=["value"],Z2={key:0,class:"fe-share-result__row"},K2={class:"fe-share-result__copy"},Y2=["value"],J2={class:"fe-share-result__row"},Q2={class:"fe-share-result__copy"},e4=["value"],t4=l.defineComponent({__name:"ShareModal",props:{open:{type:Boolean},locale:{},share:{}},emits:["close","submit","toast"],setup(e,{emit:t}){const r=e,n=t,{t:a}=_r(()=>r.locale),i=l.ref(!1),o=l.ref(""),s=l.ref("");l.watch(()=>r.open,d=>{d&&(i.value=!1,o.value="",s.value="")});function c(){n("submit",{password:i.value,expires_at:o.value?new Date(o.value).toISOString():null,max_downloads:s.value?Number(s.value):null})}async function u(d,p){try{await navigator.clipboard.writeText(d),n("toast",p)}catch{}}function f(d){return`'${d.replace(/'/g,"'\\''")}'`}const h=l.computed(()=>{const d=r.share;if(!d)return"";let p=d.url;return d.password_pin&&(p+=(p.includes("?")?"&":"?")+"pin="+encodeURIComponent(d.password_pin)),`curl -fSL ${d.filename?`-o ${f(d.filename)} `:"-OJ "}${f(p)}`});return(d,p)=>(l.openBlock(),l.createBlock(si,{open:e.open,title:l.unref(a)("modal.share.title"),size:"md",onClose:p[7]||(p[7]=w=>n("close"))},{actions:l.withCtx(()=>[l.createElementVNode("button",{type:"button",class:"fe-btn",onClick:p[6]||(p[6]=w=>n("close"))},l.toDisplayString(e.share?"Kapat":l.unref(a)("modal.share.cancel")),1),e.share?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("button",{key:0,type:"button",class:"fe-btn fe-btn--primary",onClick:c},l.toDisplayString(l.unref(a)("modal.share.create")),1))]),default:l.withCtx(()=>[e.share?(l.openBlock(),l.createElementBlock("div",j2,[l.createElementVNode("div",q2,[p[8]||(p[8]=l.createElementVNode("label",null,"Link",-1)),l.createElementVNode("div",W2,[l.createElementVNode("input",{value:e.share.url,readonly:"",class:"fe-input"},null,8,X2),l.createElementVNode("button",{type:"button",class:"fe-btn",onClick:p[3]||(p[3]=w=>u(e.share.url,l.unref(a)("modal.share.url_copied")))},l.toDisplayString(l.unref(a)("modal.share.copy")),1)])]),e.share.password_pin?(l.openBlock(),l.createElementBlock("div",Z2,[p[9]||(p[9]=l.createElementVNode("label",null,"PIN",-1)),l.createElementVNode("div",K2,[l.createElementVNode("input",{value:e.share.password_pin,readonly:"",class:"fe-input fe-input--mono"},null,8,Y2),l.createElementVNode("button",{type:"button",class:"fe-btn",onClick:p[4]||(p[4]=w=>u(e.share.password_pin,l.unref(a)("modal.share.pin_copied")))},l.toDisplayString(l.unref(a)("modal.share.copy")),1)])])):l.createCommentVNode("",!0),l.createElementVNode("div",J2,[p[10]||(p[10]=l.createElementVNode("label",null,"CLI",-1)),l.createElementVNode("div",Q2,[l.createElementVNode("input",{value:h.value,readonly:"",class:"fe-input fe-input--mono"},null,8,e4),l.createElementVNode("button",{type:"button",class:"fe-btn",onClick:p[5]||(p[5]=w=>u(h.value,l.unref(a)("modal.share.cli_copied")))},l.toDisplayString(l.unref(a)("modal.share.copy")),1)])])])):(l.openBlock(),l.createElementBlock("form",{key:0,class:"fe-form",onSubmit:l.withModifiers(c,["prevent"])},[l.createElementVNode("label",U2,[l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":p[0]||(p[0]=w=>i.value=w),type:"checkbox"},null,512),[[l.vModelCheckbox,i.value]]),l.createElementVNode("span",null,l.toDisplayString(l.unref(a)("modal.share.pin")),1)]),l.createElementVNode("label",H2,[l.createElementVNode("span",null,l.toDisplayString(l.unref(a)("modal.share.expires")),1),l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":p[1]||(p[1]=w=>o.value=w),type:"datetime-local",class:"fe-input"},null,512),[[l.vModelText,o.value]])]),l.createElementVNode("label",G2,[l.createElementVNode("span",null,l.toDisplayString(l.unref(a)("modal.share.max_downloads")),1),l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":p[2]||(p[2]=w=>s.value=w),type:"number",min:"1",class:"fe-input"},null,512),[[l.vModelText,s.value]])])],32))]),_:1},8,["open","title"]))}}),r4={key:0,class:"fe-preview"},n4=["src","alt"],a4=["src"],i4=["src"],o4=["data"],l4={class:"fe-preview__fallback"},s4=["href"],c4={key:0,class:"fe-preview__fallback"},u4={key:1,class:"fe-preview__fallback"},f4=["href"],d4={key:2,class:"fe-preview__md-split"},h4={class:"fe-preview__md-split-bar"},p4={key:0,class:"fe-preview__md-split-error"},m4=["disabled"],v4={class:"fe-preview__md-split-body"},g4=["onKeydown"],y4=["innerHTML"],b4={key:3,class:"fe-preview__fallback"},w4=["href"],_4=["innerHTML"],x4={key:5,class:"fe-preview__pre"},k4={key:0,class:"fe-preview__fallback"},S4=["href"],E4={key:1,class:"fe-preview__fallback"},C4={key:0,class:"fe-preview__fallback"},D4={key:1,class:"fe-preview__fallback"},A4=["href"],B4={key:2,class:"fe-preview__fallback"},T4=["href"],M4={key:3,class:"fe-preview__code-wrap"},I4={class:"fe-preview__code-toolbar"},z4={class:"fe-preview__code-lang"},F4={key:0,class:"fe-preview__code-status"},N4={key:1,class:"fe-preview__code-status fe-preview__code-status--ok"},O4=["title"],L4={key:3,class:"fe-preview__code-status"},P4=["disabled"],R4={key:0,class:"fe-preview__pre fe-preview__code hljs"},V4=["innerHTML"],$4=["data-lang"],U4={key:0,class:"fe-preview__fallback"},H4=["href"],G4={key:8,class:"fe-preview__fallback"},j4=["href"],q4=["href"],zo=1e6,hc="fe-onlyoffice-api-js",pc=l.defineComponent({__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}=_r(()=>r.locale);function i(Ae){return((Ae==null?void 0:Ae.extension)||"").toLowerCase()}const o=["jpg","jpeg","png","webp","gif","bmp","avif","svg","heic"],s=["mp4","webm","mov","mkv","m4v","ogv"],c=["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"},f=["txt","log"],h=["docx","doc","xlsx","xls","pptx","ppt","odt","ods","odp","rtf"],d={glb:()=>Promise.resolve().then(()=>wa),gltf:()=>Promise.resolve().then(()=>wa),obj:()=>Promise.resolve().then(()=>wa),stl:()=>Promise.resolve().then(()=>wa),fbx:()=>Promise.resolve().then(()=>wa),"3ds":()=>Promise.resolve().then(()=>wa),epub:()=>Promise.resolve().then(()=>f3),mmd:()=>Promise.resolve().then(()=>yc),mermaid:()=>Promise.resolve().then(()=>yc),drawio:()=>Promise.resolve().then(()=>bc),dio:()=>Promise.resolve().then(()=>bc),tif:()=>Promise.resolve().then(()=>wc),tiff:()=>Promise.resolve().then(()=>wc),psd:()=>Promise.resolve().then(()=>T3),ipynb:()=>Promise.resolve().then(()=>X3),csv:()=>Promise.resolve().then(()=>xc),tsv:()=>Promise.resolve().then(()=>xc),zip:()=>Promise.resolve().then(()=>vg)},p=l.computed(()=>{const Ae=i(r.file);if(!Ae)return"other";if(o.includes(Ae))return"image";if(s.includes(Ae))return"video";if(c.includes(Ae))return"audio";if(Ae==="pdf")return"pdf";const I=r.openMode!=="view";return Ae==="md"||Ae==="markdown"?"markdown":Ae in u?"code":Ae in d?"viewer":h.includes(Ae)?"office":f.includes(Ae)?I?"code":"text":"other"}),w=l.shallowRef(null),m=l.ref(null),_=l.ref(!1);async function y(Ae){w.value=null,m.value=null;const I=d[Ae];if(I)try{const J=await I();w.value=J.default??J}catch(J){m.value=J instanceof Error?J.message:"viewer load failed",Ae==="pdf"&&(_.value=!0)}}function g(){_.value=!0}const b=l.computed(()=>{var J;const Ae=i(r.file),I={url:B.value,ext:Ae,mime:(J=r.file)==null?void 0:J.mime_type,t:a,authHeaders:r.authHeaders,authCredentials:r.authCredentials};return r.file&&(I.filePath=F(r.file.path),(Ae==="zip"||Ae==="rar"||Ae==="7z"||Ae==="tar"||Ae==="gz"||Ae==="tgz")&&(I.filePath=r.file.path)),(Ae==="drawio"||Ae==="dio")&&(I.drawioUrl=r.drawioUrl??void 0,I.saveUrl=r.saveTextEndpoint??void 0,I.readOnly=r.openMode==="view"),Ae==="pdf"&&(I.pdfWorkerUrl=r.pdfWorkerUrl??void 0,I.pdfSaveUrl=r.pdfSaveUrl??void 0),I});function v(){C(r.openMode||"edit")}function E(){C("edit")}function C(Ae){if(!r.file)return;const I=i(r.file),J=r.viewerBaseUrl||"/files/edit",de=J.includes("?")?"&":"?",Se=`${J}${de}path=${encodeURIComponent(r.file.path)}&type=${encodeURIComponent(I)}&mode=${encodeURIComponent(Ae)}`;window.open(Se,"_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"]),k=l.computed(()=>!!r.file&&A.has(i(r.file))),B=l.computed(()=>r.file?r.previewUrl(r.file.path):""),T=l.computed(()=>r.file?r.downloadUrl(r.file.path):"");function F(Ae){const I=Ae.indexOf("://");return I===-1?Ae:Ae.slice(I+3)}const V=l.ref(!1),L=l.ref(null),H=l.ref(""),X=l.ref(!1),W=l.ref(!1),Z=l.ref(!1);let Q,K;function ue(){W.value=!0,Q&&clearTimeout(Q),Q=setTimeout(()=>{he(H.value)},250),K&&clearTimeout(K),K=setTimeout(()=>{ne()},1500)}async function ne(){if(!(!r.saveTextEndpoint||!r.file||Z.value)){Z.value=!0,L.value=null;try{const Ae={"Content-Type":"application/json",...await(r.authHeaders??(()=>({})))()},I=await fetch(r.saveTextEndpoint,{method:"POST",headers:Ae,credentials:r.authCredentials||"same-origin",body:JSON.stringify({path:F(r.file.path),content:H.value})});if(!I.ok)throw new Error(`save failed: ${I.status} ${await I.text()}`);W.value=!1}catch(Ae){L.value=Ae instanceof Error?Ae.message:String(Ae)}finally{Z.value=!1}}}async function fe(Ae){V.value=!0,L.value=null,H.value="",X.value=!1;try{const I={};r.authHeaders&&Object.assign(I,r.authHeaders());const J=await fetch(Ae,{credentials:r.authCredentials||"include",headers:I});if(!J.ok)throw new Error(`${J.status} ${J.statusText}`);if(Number(J.headers.get("content-length")||"0")>zo){X.value=!0;return}const Se=await J.text();Se.length>zo?(X.value=!0,H.value=Se.slice(0,zo)):H.value=Se}catch(I){L.value=I instanceof Error?I.message:String(I)}finally{V.value=!1}}const re=l.ref(""),ye=l.ref(null);async function he(Ae){try{const I=await import("markdown-it").catch(()=>null);if(!I){re.value="";return}const J=I.default??I,Se=new J({html:!0,linkify:!0,breaks:!0,typographer:!0}).render(Ae);re.value=ke(Se),await new Promise(P=>setTimeout(P,0)),await Ee()}catch(I){re.value="",L.value=I instanceof Error?I.message:String(I)}}function ke(Ae){return Ae.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 Ee(){var Se,P,j;if(!ye.value)return;const Ae=ye.value,I=Array.from(Ae.querySelectorAll("pre > code"));if(I.length===0)return;let J,de;for(const M of I){const pe=M.className||"",le=/\blanguage-mermaid\b/.test(pe)||/\blanguage-mmd\b/.test(pe),S=/\blanguage-math\b/.test(pe)||/\blanguage-latex\b/.test(pe)||/\blanguage-tex\b/.test(pe);if(le){if(J===void 0)try{const ae=await import("mermaid");J=ae.default??ae,(Se=J.initialize)==null||Se.call(J,{startOnLoad:!1,securityLevel:"strict"})}catch{J=null}if(!J)continue;try{const ae=`filex-md-mermaid-${Math.random().toString(36).slice(2)}`,{svg:ce}=await J.render(ae,M.textContent||""),N=document.createElement("div");N.className="fe-preview__md-mermaid",N.innerHTML=ce,(P=M.parentElement)==null||P.replaceWith(N)}catch{}}else if(S){if(de===void 0)try{const ae=await Promise.resolve().then(()=>e8);de=ae.default??ae}catch{de=null}if(!de)continue;try{const ae=de.renderToString(M.textContent||"",{displayMode:!0,throwOnError:!1}),ce=document.createElement("div");ce.className="fe-preview__md-math",ce.innerHTML=ae,(j=M.parentElement)==null||j.replaceWith(ce)}catch{}}}}const me=l.ref("");async function te(Ae,I){try{const J=await e0();if(!J){me.value="";return}const de=J.default??J;if(de.getLanguage(I)){const Se=de.highlight(Ae,{language:I,ignoreIllegals:!0});me.value=Se.value}else{const Se=de.highlightAuto(Ae);me.value=Se.value}}catch(J){me.value="",L.value=J instanceof Error?J.message:String(J)}}const se=l.ref(null);let ie=null,_e;const He=l.ref(!1),je=l.ref(!1),Ve=l.ref(!1),ge=l.ref(null);function Ce(){if(ie){try{ie.dispose()}catch{}ie=null}He.value=!1,Ve.value=!1,ge.value=null}function ve(Ae){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"}[Ae]??"plaintext"}async function Oe(Ae,I){var de;const J=await Qi();if(!J||!se.value)return!1;try{Ce();const Se=!!r.saveTextEndpoint&&r.openMode!=="view",P=r.theme==="dark"?!0:r.theme==="light"?!1:(de=window.matchMedia)==null?void 0:de.call(window,"(prefers-color-scheme: dark)").matches;return ie=J.editor.create(se.value,{value:Ae,language:ve(I),readOnly:!Se,theme:P?"vs-dark":"vs",automaticLayout:!0,minimap:{enabled:!1},fontSize:13}),Se&&(ie.addCommand(J.KeyMod.CtrlCmd|J.KeyCode.KeyS,()=>void tt()),ie.onDidChangeModelContent(()=>{_e&&clearTimeout(_e),_e=setTimeout(()=>{tt()},1500)})),He.value=!0,!0}catch(Se){return L.value=`Monaco mount fail: ${Se.message}`,!1}}async function tt(){if(!(!r.saveTextEndpoint||!r.file)&&r.openMode!=="view"&&!je.value){je.value=!0,Ve.value=!1,ge.value=null;try{const Ae=ie?ie.getValue():"",I={"Content-Type":"application/json"};r.authHeaders&&Object.assign(I,r.authHeaders());const J=await fetch(r.saveTextEndpoint,{method:"POST",headers:I,credentials:r.authCredentials||"same-origin",body:JSON.stringify({path:F(r.file.path),content:Ae})});if(!J.ok){const de=await J.text().catch(()=>"");throw new Error(`${J.status} ${J.statusText}${de?" — "+de.slice(0,150):""}`)}Ve.value=!0,setTimeout(()=>{Ve.value=!1},2500)}catch(Ae){ge.value=Ae.message}finally{je.value=!1}}}async function at(Ae,I,J){if(H.value="",re.value="",me.value="",L.value=null,ut.value=null,w.value=null,m.value=null,_.value=!1,gt(),Ce(),!(!Ae||!I)){if(J==="viewer"){await y(i(r.file));return}if(J==="markdown"||J==="code"||J==="text"){if(await fe(I),X.value)return;if(J==="markdown"){await he(H.value);return}const de=u[i(r.file)]||"";Io()?(await new Promise(j=>setTimeout(j,0)),await Oe(H.value,i(r.file))||await te(H.value,de)):(J==="code"&&await te(H.value,de),Qi().then(async P=>{P&&r.open&&(await new Promise(j=>setTimeout(j,0)),await Oe(H.value,i(r.file)))}))}else J==="office"&&(await new Promise(de=>setTimeout(de,0)),await vt())}}l.watch(()=>[r.open,B.value,p.value,r.openMode],([Ae,I,J])=>{at(Ae,I,J)}),l.onMounted(()=>{l.nextTick(()=>{r.open&&at(r.open,B.value,p.value)})});const st=l.computed(()=>u[i(r.file)]||"plaintext"),It=l.ref(null),ut=l.ref(null);let ft=null;async function vt(){if(ut.value=null,!(!r.file||p.value!=="office")){if(!r.onlyOfficeConfigEndpoint){ut.value="OnlyOffice yapılandırması yok";return}if(It.value)try{const Ae={"Content-Type":"application/json"};r.authHeaders&&Object.assign(Ae,r.authHeaders());const I=await fetch(r.onlyOfficeConfigEndpoint,{method:"POST",headers:Ae,credentials:r.authCredentials||"same-origin",body:JSON.stringify({path:r.file.path,mode:r.openMode||"edit"})});if(!I.ok)throw new Error(`Config fetch ${I.status}: ${(await I.text()).slice(0,200)}`);const{config:J,documentServerUrl:de}=await I.json();await Ct(de),gt();const Se="fe-onlyoffice-mount";It.value.id=Se,J.events={onError:j=>{ut.value=pt(j)}};const P=window;if(!P.DocsAPI||!P.DocsAPI.DocEditor)throw new Error("DocsAPI not available after script load");ft=new P.DocsAPI.DocEditor(Se,J)}catch(Ae){ut.value=Ae instanceof Error?Ae.message:String(Ae)}}}function gt(){var Ae;try{(Ae=ft==null?void 0:ft.destroyEditor)==null||Ae.call(ft)}catch{}ft=null}l.onBeforeUnmount(()=>{gt(),Ce()});function pt(Ae){if(typeof Ae=="string")return Ae;const I=Ae;if(I!=null&&I.data&&typeof I.data=="object"){const J=I.data;if(typeof J.errorDescription=="string")return J.errorDescription;if(typeof J.message=="string")return J.message;if(J.errorCode!==void 0)return`OnlyOffice error ${J.errorCode}`}if(typeof(I==null?void 0:I.data)=="string")return I.data;if(typeof(I==null?void 0:I.errorDescription)=="string")return I.errorDescription;if(typeof(I==null?void 0:I.message)=="string")return I.message;try{return JSON.stringify(Ae)}catch{return"OnlyOffice error"}}function Ct(Ae){return new Promise((I,J)=>{var P;if((P=window.DocsAPI)!=null&&P.DocEditor){I();return}const de=document.getElementById(hc);if(de){de.addEventListener("load",()=>I()),de.addEventListener("error",()=>J(new Error("OnlyOffice api.js load failed")));return}const Se=document.createElement("script");Se.id=hc,Se.src=`${Ae.replace(/\/$/,"")}/web-apps/apps/api/documents/api.js`,Se.async=!0,Se.onload=()=>I(),Se.onerror=()=>J(new Error("OnlyOffice api.js load failed")),document.head.appendChild(Se)})}return(Ae,I)=>{var J;return l.openBlock(),l.createBlock(si,{open:e.open,size:"xl",title:((J=e.file)==null?void 0:J.basename)||"",chromeless:e.chromeless,theme:e.theme,onClose:I[2]||(I[2]=de=>n("close"))},{actions:l.withCtx(()=>[e.file&&e.openMode==="view"&&k.value?(l.openBlock(),l.createElementBlock("button",{key:0,type:"button",class:"fe-btn fe-btn--primary",onClick:E},"✏ Düzenle")):l.createCommentVNode("",!0),e.file?(l.openBlock(),l.createElementBlock("button",{key:1,type:"button",class:"fe-btn",onClick:v},"↗ "+l.toDisplayString(l.unref(a)("viewer.open_in_new_tab")),1)):l.createCommentVNode("",!0),e.file?(l.openBlock(),l.createElementBlock("a",{key:2,href:T.value,class:"fe-btn"},l.toDisplayString(l.unref(a)("viewer.download")),9,q4)):l.createCommentVNode("",!0),l.createElementVNode("button",{type:"button",class:"fe-btn",onClick:I[1]||(I[1]=de=>n("close"))},"Kapat")]),default:l.withCtx(()=>[e.file?(l.openBlock(),l.createElementBlock("div",r4,[p.value==="image"?(l.openBlock(),l.createElementBlock("img",{key:0,src:B.value,alt:e.file.basename,class:"fe-preview__image"},null,8,n4)):p.value==="video"?(l.openBlock(),l.createElementBlock("video",{key:1,src:B.value,controls:"",preload:"metadata",class:"fe-preview__video"},null,8,a4)):p.value==="audio"?(l.openBlock(),l.createElementBlock("audio",{key:2,src:B.value,controls:"",class:"fe-preview__audio"},null,8,i4)):p.value==="pdf"?(l.openBlock(),l.createElementBlock("object",{key:3,data:B.value,type:"application/pdf",class:"fe-preview__iframe"},[l.createElementVNode("div",l4,[I[3]||(I[3]=l.createElementVNode("span",{class:"fe-preview__fallback-icon"},"📕",-1)),I[4]||(I[4]=l.createElementVNode("p",null,"Tarayıcı PDF'i inline açamadı.",-1)),l.createElementVNode("a",{href:T.value,class:"fe-btn fe-btn--primary",target:"_blank",rel:"noopener"},"PDF'i Yeni Sekmede Aç",8,s4)])],8,o4)):p.value==="markdown"?(l.openBlock(),l.createElementBlock(l.Fragment,{key:4},[V.value?(l.openBlock(),l.createElementBlock("div",c4,l.toDisplayString(l.unref(a)("viewer.loading")),1)):X.value?(l.openBlock(),l.createElementBlock("div",u4,[I[5]||(I[5]=l.createTextVNode(" Dosya çok büyük (>1 MB). ",-1)),l.createElementVNode("a",{href:T.value,class:"fe-btn"},l.toDisplayString(l.unref(a)("viewer.download")),9,f4)])):e.openMode==="edit"&&e.saveTextEndpoint?(l.openBlock(),l.createElementBlock("div",d4,[l.createElementVNode("div",h4,[I[6]||(I[6]=l.createElementVNode("span",{class:"fe-preview__md-split-label"},"MARKDOWN",-1)),L.value?(l.openBlock(),l.createElementBlock("span",p4,l.toDisplayString(L.value),1)):l.createCommentVNode("",!0),l.createElementVNode("button",{type:"button",class:"fe-btn fe-btn--primary",disabled:!W.value||Z.value,onClick:ne},l.toDisplayString(Z.value?"Kaydediliyor…":W.value?"Kaydet (Ctrl+S)":"Kaydedildi"),9,m4)]),l.createElementVNode("div",v4,[l.withDirectives(l.createElementVNode("textarea",{class:"fe-preview__md-split-input","onUpdate:modelValue":I[0]||(I[0]=de=>H.value=de),onInput:ue,onKeydown:[l.withKeys(l.withModifiers(ne,["ctrl","prevent"]),["s"]),l.withKeys(l.withModifiers(ne,["meta","prevent"]),["s"])],spellcheck:"false",placeholder:"# Markdown buraya…"},null,40,g4),[[l.vModelText,H.value]]),l.createElementVNode("div",{ref_key:"markdownEl",ref:ye,class:"fe-preview__md-split-output fe-preview__md",innerHTML:re.value},null,8,y4)])])):L.value?(l.openBlock(),l.createElementBlock("div",b4,[l.createElementVNode("p",null,l.toDisplayString(L.value),1),l.createElementVNode("a",{href:T.value,class:"fe-btn fe-btn--primary"},l.toDisplayString(l.unref(a)("viewer.download")),9,w4)])):re.value?(l.openBlock(),l.createElementBlock("div",{key:4,ref_key:"markdownEl",ref:ye,class:"fe-preview__md",innerHTML:re.value},null,8,_4)):(l.openBlock(),l.createElementBlock("pre",x4,l.toDisplayString(H.value),1))],64)):p.value==="viewer"?(l.openBlock(),l.createElementBlock(l.Fragment,{key:5},[m.value&&!_.value?(l.openBlock(),l.createElementBlock("div",k4,[I[7]||(I[7]=l.createElementVNode("span",{class:"fe-preview__fallback-icon"},"⚠️",-1)),l.createElementVNode("p",null,l.toDisplayString(m.value),1),l.createElementVNode("a",{href:T.value,class:"fe-btn fe-btn--primary"},l.toDisplayString(l.unref(a)("viewer.download")),9,S4)])):w.value?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(w.value),l.mergeProps({key:2},b.value,{class:"fe-preview__viewer",onFallback:g}),null,16)):(l.openBlock(),l.createElementBlock("div",E4,[I[8]||(I[8]=l.createElementVNode("span",{class:"fe-preview__fallback-icon"},"⏳",-1)),l.createElementVNode("p",null,l.toDisplayString(l.unref(a)("viewer.loading")),1)]))],64)):p.value==="code"||p.value==="text"?(l.openBlock(),l.createElementBlock(l.Fragment,{key:6},[V.value?(l.openBlock(),l.createElementBlock("div",C4,l.toDisplayString(l.unref(a)("viewer.loading")),1)):X.value?(l.openBlock(),l.createElementBlock("div",D4,[I[9]||(I[9]=l.createTextVNode(" Dosya çok büyük (>1 MB). ",-1)),l.createElementVNode("a",{href:T.value,class:"fe-btn"},l.toDisplayString(l.unref(a)("viewer.download")),9,A4)])):L.value?(l.openBlock(),l.createElementBlock("div",B4,[l.createElementVNode("p",null,l.toDisplayString(L.value),1),l.createElementVNode("a",{href:T.value,class:"fe-btn fe-btn--primary"},l.toDisplayString(l.unref(a)("viewer.download")),9,T4)])):(l.openBlock(),l.createElementBlock("div",M4,[l.createElementVNode("div",I4,[l.createElementVNode("span",z4,l.toDisplayString(st.value),1),!He.value&&me.value?(l.openBlock(),l.createElementBlock("span",F4,l.toDisplayString(e.saveTextEndpoint?"Editör yükleniyor…":"Salt okunur"),1)):l.createCommentVNode("",!0),Ve.value?(l.openBlock(),l.createElementBlock("span",N4,"✓ Kaydedildi")):l.createCommentVNode("",!0),ge.value?(l.openBlock(),l.createElementBlock("span",{key:2,class:"fe-preview__code-status fe-preview__code-status--err",title:ge.value},"✗ Hata",8,O4)):l.createCommentVNode("",!0),e.openMode==="view"?(l.openBlock(),l.createElementBlock("span",L4,"Salt okunur")):e.saveTextEndpoint&&He.value?(l.openBlock(),l.createElementBlock("button",{key:4,type:"button",class:"fe-btn fe-btn--primary",disabled:je.value,onClick:tt},l.toDisplayString(je.value?"Kaydediliyor…":"Kaydet (Ctrl+S)"),9,P4)):l.createCommentVNode("",!0)]),l.createElementVNode("div",{ref_key:"monacoEl",ref:se,class:l.normalizeClass(["fe-preview__code-editor",{"is-hidden":!He.value}])},null,2),!He.value&&me.value?(l.openBlock(),l.createElementBlock("pre",R4,[l.createElementVNode("code",{class:l.normalizeClass(`language-${st.value}`),innerHTML:me.value},null,10,V4)])):!He.value&&!me.value?(l.openBlock(),l.createElementBlock("pre",{key:1,class:"fe-preview__pre","data-lang":st.value},l.toDisplayString(H.value),9,$4)):l.createCommentVNode("",!0)]))],64)):p.value==="office"?(l.openBlock(),l.createElementBlock(l.Fragment,{key:7},[ut.value?(l.openBlock(),l.createElementBlock("div",U4,[I[10]||(I[10]=l.createElementVNode("span",{class:"fe-preview__fallback-icon"},"📄",-1)),l.createElementVNode("p",null,l.toDisplayString(ut.value),1),l.createElementVNode("a",{href:T.value,class:"fe-btn fe-btn--primary"},"İndir",8,H4)])):(l.openBlock(),l.createElementBlock("div",{key:1,ref_key:"officeEl",ref:It,class:"fe-preview__office"},null,512))],64)):(l.openBlock(),l.createElementBlock("div",G4,[I[11]||(I[11]=l.createElementVNode("span",{class:"fe-preview__fallback-icon"},"📎",-1)),I[12]||(I[12]=l.createElementVNode("p",null,"Bu dosya tipi için önizleme henüz yok.",-1)),l.createElementVNode("a",{href:T.value,class:"fe-btn fe-btn--primary"},"İndir",8,j4)]))])):l.createCommentVNode("",!0)]),_:1},8,["open","title","chromeless","theme"])}}}),W4={class:"filex-cv"},X4={class:"filex-cv__head"},Z4={key:0,class:"filex-cv__msg"},K4={key:1,class:"filex-cv__msg filex-cv__ok"},Y4={class:"filex-cv__src"},J4=["placeholder"],Q4={class:"filex-cv__list"},ev=["onClick"],tv={key:0,class:"filex-cv__empty"},rv={key:0,class:"filex-cv__err"},nv={class:"filex-cv__foot"},av=["disabled"],iv=["src"],ov=xr(l.defineComponent({__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=l.ref(null),i=l.ref("loading"),o=l.ref(null),s=l.ref([]),c=l.ref(""),u=l.ref(null),f=l.computed(()=>(r.fileName.split(".").pop()||"").toLowerCase()),h=l.computed(()=>{const E=s.value.filter(C=>C.from);return E.find(C=>(C.ext||"").toLowerCase()===f.value)||E.find(C=>(C.format||"").toLowerCase()===f.value)||null}),d=l.computed(()=>{const E=c.value.trim().toLowerCase(),C=new Set,A=[];for(const k of s.value){if(!k.to)continue;const B=(k.ext||k.format||"").toLowerCase();!B||C.has(B)||(C.add(B),A.push(k))}return A.sort((k,B)=>(k.ext||k.format).localeCompare(B.ext||B.format)),E?A.filter(k=>(k.ext||"").toLowerCase().includes(E)||(k.format||"").toLowerCase().includes(E)||(k.name||"").toLowerCase().includes(E)||(k.mime||"").toLowerCase().includes(E)):A}),p=l.computed(()=>`${r.convertUrl.replace(/\/$/,"")}/?embed=1`);let w=0;const m=new Map;function _(E,C={},A=[]){const k=++w;return new Promise((B,T)=>{var F,V;m.set(k,{resolve:B,reject:T}),(V=(F=a.value)==null?void 0:F.contentWindow)==null||V.postMessage({target:"convert-embed",id:k,cmd:E,...C},"*",A),setTimeout(()=>{m.has(k)&&(m.delete(k),T(new Error("convert timeout")))},18e4)})}function y(E){const C=E.data;if(!C||C.source!=="convert-embed")return;if(C.event==="ready"){g();return}const A=m.get(C.id);A&&(m.delete(C.id),C.ok?A.resolve(C):A.reject(new Error(C.error||"convert error")))}async function g(){try{const E=await _("listFormats");s.value=E.formats||[],i.value="ready",h.value||(o.value=v("convert.unsupportedInput","Bu dosya tipi için kaynak format bulunamadı."))}catch(E){o.value=E.message,i.value="error"}}async function b(){if(!(!u.value||!h.value)){i.value="converting",o.value=null;try{const E=await r.fetchBytes(),C=await _("convert",{name:r.fileName,bytes:E,fromIndex:h.value.index,toIndex:u.value.index},[E]),A=r.fileName.replace(/\.[^.]+$/,""),k=C.ext||u.value.ext||u.value.format,B=`${A}.${k}`,T=new File([C.bytes],B,{type:u.value.mime||"application/octet-stream"});await r.upload(T),i.value="done",n("done",B)}catch(E){o.value=E.message,i.value="error"}}}function v(E,C){return r.t?r.t(E,C):C}return l.onMounted(()=>window.addEventListener("message",y)),l.onBeforeUnmount(()=>window.removeEventListener("message",y)),(E,C)=>(l.openBlock(),l.createElementBlock("div",{class:"filex-cv__bg",onClick:C[3]||(C[3]=l.withModifiers(A=>n("close"),["self"]))},[l.createElementVNode("div",W4,[l.createElementVNode("header",X4,[l.createElementVNode("h3",null,l.toDisplayString(v("convert.title","Dönüştür"))+" — "+l.toDisplayString(e.fileName),1),l.createElementVNode("button",{class:"filex-cv__x",onClick:C[0]||(C[0]=A=>n("close"))},"✕")]),i.value==="loading"?(l.openBlock(),l.createElementBlock("div",Z4,l.toDisplayString(v("convert.loading","Dönüştürücü yükleniyor…")),1)):i.value==="done"?(l.openBlock(),l.createElementBlock("div",K4,[l.createElementVNode("p",null,"✓ "+l.toDisplayString(v("convert.done","Dönüştürüldü ve klasöre yüklendi.")),1),l.createElementVNode("button",{class:"filex-cv__convert",onClick:C[1]||(C[1]=A=>n("close"))},l.toDisplayString(v("convert.close","Kapat")),1)])):(l.openBlock(),l.createElementBlock(l.Fragment,{key:2},[l.createElementVNode("p",Y4,[l.createTextVNode(l.toDisplayString(v("convert.from","Kaynak"))+": ",1),l.createElementVNode("b",null,l.toDisplayString(f.value||"?"),1)]),l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":C[2]||(C[2]=A=>c.value=A),class:"filex-cv__search",placeholder:v("convert.searchFmt","Hedef format ara (pdf, mp4, png…)")},null,8,J4),[[l.vModelText,c.value]]),l.createElementVNode("div",Q4,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(d.value,A=>{var k;return l.openBlock(),l.createElementBlock("button",{key:A.index,class:l.normalizeClass(["filex-cv__fmt",{"is-sel":((k=u.value)==null?void 0:k.index)===A.index}]),onClick:B=>u.value=A},[l.createElementVNode("b",null,l.toDisplayString((A.ext||A.format).toUpperCase()),1),l.createElementVNode("small",null,l.toDisplayString(A.name),1)],10,ev)}),128)),d.value.length===0?(l.openBlock(),l.createElementBlock("div",tv,l.toDisplayString(v("convert.noFmt","Eşleşen format yok.")),1)):l.createCommentVNode("",!0)]),o.value?(l.openBlock(),l.createElementBlock("div",rv,l.toDisplayString(o.value),1)):l.createCommentVNode("",!0),l.createElementVNode("footer",nv,[l.createElementVNode("button",{class:"filex-cv__convert",disabled:!u.value||!h.value||i.value==="converting",onClick:b},l.toDisplayString(i.value==="converting"?v("convert.converting","Dönüştürülüyor…"):v("convert.convert","Dönüştür")),9,av)])],64)),l.createElementVNode("iframe",{ref_key:"iframeRef",ref:a,src:p.value,class:"filex-cv__frame",title:"converter"},null,8,iv)])]))}}),[["__scopeId","data-v-4363f1ac"]]),lv={class:"fx-perm-modal"},sv={class:"fx-perm-head"},cv={class:"fx-perm-title"},uv={class:"fx-perm-ico","aria-hidden":"true"},fv={class:"fx-perm-titletext"},dv=["title"],hv={class:"fx-perm-subdim"},pv={class:"fx-perm-tabs"},mv={class:"fx-perm-body"},vv={key:0,class:"fx-perm-warn"},gv={key:1,class:"fx-perm-warn"},yv={key:2,class:"fx-perm-muted"},bv={class:"fx-perm-addcard"},wv={class:"fx-perm-add"},_v={class:"fx-perm-emailwrap"},xv=["placeholder"],kv={key:0,class:"fx-perm-suggest"},Sv=["onMousedown"],Ev={class:"fx-perm-suggest-av"},Cv={class:"fx-perm-suggest-txt"},Dv={class:"fx-perm-suggest-name"},Av={class:"fx-perm-suggest-meta"},Bv=["title"],Tv=["value"],Mv=["disabled"],Iv={key:0,class:"fx-perm-invite"},zv={class:"fx-perm-muted"},Fv={class:"fx-perm-invite-actions"},Nv={class:"fx-perm-invite-row"},Ov={value:"user"},Lv={value:"viewer"},Pv=["disabled"],Rv=["disabled"],Vv={key:1,class:"fx-perm-notice"},$v={key:2,class:"fx-perm-reveal"},Uv={class:"fx-perm-section"},Hv={key:0,class:"fx-perm-empty"},Gv={class:"fx-perm-av"},jv=["title"],qv=["value","onChange"],Wv=["value"],Xv=["disabled","title","onClick"],Zv={class:"fx-perm-av fx-perm-av--dim"},Kv=["title"],Yv={class:"fx-perm-badge"},Jv=["title"],Qv={class:"fx-perm-addcard"},e5={class:"fx-perm-share-opts"},t5={class:"fx-perm-check"},r5={class:"fx-perm-expiry"},n5={class:"fx-perm-muted"},a5=["value"],i5=["disabled"],o5={key:0,class:"fx-perm-warn"},l5={key:1,class:"fx-perm-result"},s5={class:"fx-perm-linkrow"},c5=["href"],u5={key:0,class:"fx-perm-pin"},f5={class:"fx-perm-mailrow"},d5=["placeholder"],h5=["disabled"],p5={key:1,class:"fx-perm-notice"},m5={key:2,class:"fx-perm-hint"},v5={class:"fx-perm-section"},g5={key:0,class:"fx-perm-empty"},y5=["title"],b5=["onClick"],w5=["disabled","title","onClick"],_5={key:2,class:"fx-perm-addcard"},x5={class:"fx-perm-muted fx-perm-dropintro"},k5={class:"fx-perm-share-opts"},S5={class:"fx-perm-check"},E5={class:"fx-perm-expiry"},C5={class:"fx-perm-muted"},D5=["value"],A5=["disabled"],B5={key:0,class:"fx-perm-adv"},T5={class:"fx-perm-adv-row"},M5={class:"fx-perm-muted"},I5={class:"fx-perm-adv-row"},z5={class:"fx-perm-muted"},F5={class:"fx-perm-adv-row"},N5={class:"fx-perm-muted"},O5=["placeholder"],L5={class:"fx-perm-check"},P5={key:1,class:"fx-perm-warn"},R5={key:2,class:"fx-perm-result"},V5={class:"fx-perm-linkrow"},$5=["href"],U5={key:0,class:"fx-perm-pin"},H5={class:"fx-perm-mailrow"},G5=["placeholder"],j5=["disabled"],q5={key:1,class:"fx-perm-notice"},W5=xr(l.defineComponent({__name:"PermissionsModal",props:{api:{},path:{},isDir:{type:Boolean},size:{},locale:{}},emits:["close"],setup(e,{emit:t}){const r=e,n=t,a=l.computed(()=>(r.locale??"tr")!=="en");function i(P,j){return a.value?P:j}const o=l.computed(()=>{const P=/^([^:]+):\/\/(.*)$/.exec(r.path),j=P?P[1]:"",M=P?P[2]:r.path,pe=M.split("/").filter(Boolean);return{adapter:j,name:pe.length?pe[pe.length-1]:j,rel:M}}),s=l.ref("perms"),c=l.ref(!1),u=l.ref(!0),f=l.ref(""),h=l.ref([]),d=l.ref([]),p=l.ref(!0),w=l.ref(""),m=l.ref("viewer"),_=l.ref(!1),y=l.ref(""),g=l.ref(!1),b=l.ref("user"),v=l.ref(null),E=l.ref([]),C=l.ref(!1);let A;const k=[{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 B(P){var j;return((j=k.find(M=>M.v===P))==null?void 0:j.l)??P}const T=l.ref([]),F=l.ref(!1),V=l.ref(!1),L=l.ref(0),H=l.ref(null),X=l.ref(""),W=l.ref(""),Z=l.ref(""),Q=l.ref(!1),K=l.ref(""),ue=[{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")}],ne=l.ref(!1),fe=l.ref(0),re=l.ref(!1),ye=l.ref(""),he=l.ref(""),ke=l.ref(""),Ee=l.ref(!0),me=l.ref(!1),te=l.ref(""),se=l.ref(null),ie=l.ref(""),_e=l.ref(!1),He=l.ref("");function je(P){const j=new Set,M=[];for(const pe of P.split(/[,;\s]+/)){const le=pe.trim().toLowerCase();le&&le.includes("@")&&!j.has(le)&&(j.add(le),M.push(le))}return M}function Ve(P){var pe,le;const j=((pe=P.sent)==null?void 0:pe.length)??0,M=((le=P.failed)==null?void 0:le.length)??0;return M===0?i(`E-posta gönderildi ✓ (${j})`,`Email sent ✓ (${j})`):i(`${j} gönderildi, ${M} başarısız`,`${j} sent, ${M} failed`)}async function ge(){u.value=!0,f.value="";try{const P=await r.api.listPermissions(r.path);h.value=P.direct??[],d.value=P.inherited??[],p.value=P.storage_rbac,c.value=!0}catch(P){P.status===403?(c.value=!1,s.value="share"):f.value=P instanceof Error?P.message:String(P)}finally{u.value=!1}}async function Ce(){try{const P=await r.api.listShares(r.path);T.value=P.shares??[]}catch{T.value=[]}}l.onMounted(async()=>{await ge(),await Ce()}),l.onBeforeUnmount(()=>{A&&clearTimeout(A)});function ve(){g.value=!1,v.value=null,y.value="";const P=w.value.trim();if(A&&clearTimeout(A),P.length<1){E.value=[],C.value=!1;return}A=setTimeout(async()=>{try{const j=await r.api.searchUsers(P);E.value=j.users??[],C.value=E.value.length>0}catch{C.value=!1}},180)}async function Oe(P){C.value=!1,w.value=P.email;let j=m.value;P.role==="viewer"&&j!=="viewer"&&(j="viewer"),_.value=!0,y.value="";try{await r.api.addPermission({path:r.path,user_id:P.id,level:j,is_dir:!!r.isDir}),w.value="",E.value=[],await ge(),y.value=i("Yetki verildi.","Access granted.")}catch(M){y.value=M instanceof Error?M.message:String(M)}finally{_.value=!1}}async function tt(){const P=w.value.trim().toLowerCase();if(!P||!P.includes("@")){y.value=i("Geçerli bir e-posta girin.","Enter a valid email.");return}C.value=!1,_.value=!0,y.value="",v.value=null;try{const j=await r.api.resolveEmail(P);if(j.found&&j.user){let M=m.value;j.user.role==="viewer"&&M!=="viewer"&&(M="viewer"),await r.api.addPermission({path:r.path,user_id:j.user.id,level:M,is_dir:!!r.isDir}),w.value="",await ge(),y.value=i("Yetki verildi.","Access granted.")}else g.value=!0}catch(j){y.value=j instanceof Error?j.message:String(j)}finally{_.value=!1}}async function at(){_.value=!0,y.value="";try{const P=await r.api.invitePermission({path:r.path,email:w.value.trim().toLowerCase(),level:m.value,create_user:!0,role:b.value,is_dir:!!r.isDir,locale:r.locale??"tr"});v.value={tempPassword:P.temp_password},y.value=P.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."),g.value=!1,w.value="",await ge()}catch(P){y.value=P instanceof Error?P.message:String(P)}finally{_.value=!1}}function st(){Z.value=w.value.trim().toLowerCase(),g.value=!1,y.value="",s.value="share"}async function It(P,j){if(j!==P.level){_.value=!0;try{await r.api.updatePermission(P.id,j),await ge()}catch(M){y.value=M instanceof Error?M.message:String(M)}finally{_.value=!1}}}async function ut(P){_.value=!0;try{await r.api.deletePermission(P.id),await ge()}catch(j){y.value=j instanceof Error?j.message:String(j)}finally{_.value=!1}}function ft(P){return P.user_display_name||P.user_email||`#${P.user_id}`}function vt(P){return(P.user_display_name||P.user_email||"?").charAt(0).toUpperCase()}function gt(){return L.value?new Date(Date.now()+L.value*864e5).toISOString():null}async function pt(){F.value=!0,X.value="",H.value=null,K.value="";try{const P=await r.api.createShare({path:r.path,password:V.value,expires_at:gt()});H.value={url:P.share.url,pin:P.share.password_pin??null},await Ce()}catch(P){X.value=P instanceof Error?P.message:String(P)}finally{F.value=!1}}async function Ct(){var j;const P=je(Z.value);if(!P.length){K.value=i("Geçerli bir e-posta girin.","Enter a valid email.");return}if((j=H.value)!=null&&j.url){Q.value=!0,K.value="";try{const M=await r.api.shareMail({path:r.path,emails:P,url:H.value.url,pin:H.value.pin??void 0,expires_days:L.value||void 0,locale:r.locale??"tr",is_dir:!!r.isDir,size:r.size});K.value=Ve(M)}catch(M){const pe=M.detail??"";pe.includes("not_configured")?K.value=i("SMTP ayarlı/doğrulanmış değil — linki elle iletin.","SMTP not set up/verified — share the link manually."):pe.includes("send_failed")?K.value=i("Gönderilemedi (geçici hata) — tekrar deneyin.","Send failed (temporary) — please retry."):K.value=M instanceof Error?M.message:String(M)}finally{Q.value=!1}}}function Ae(){return fe.value?new Date(Date.now()+fe.value*864e5).toISOString():null}async function I(){me.value=!0,te.value="",se.value=null,He.value="";try{const P={ask_name:Ee.value};ye.value&&(P.max_files=Number(ye.value)),he.value&&(P.max_file_size_mb=Number(he.value));const j=ke.value.split(/[,\s]+/).map(pe=>pe.trim().replace(/^\./,"")).filter(Boolean);j.length&&(P.allowed_ext=j);const M=await r.api.createShare({path:r.path,kind:"drop",password:ne.value,expires_at:Ae(),drop_settings:P});se.value={url:M.share.url,pin:M.share.password_pin??null}}catch(P){te.value=P instanceof Error?P.message:String(P)}finally{me.value=!1}}async function J(){var j;const P=je(ie.value);if(!P.length){He.value=i("Geçerli bir e-posta girin.","Enter a valid email.");return}if((j=se.value)!=null&&j.url){_e.value=!0,He.value="";try{const M=await r.api.shareMail({path:r.path,emails:P,url:se.value.url,pin:se.value.pin??void 0,expires_days:fe.value||void 0,locale:r.locale??"tr",is_dir:!0,mode:"drop"});He.value=Ve(M)}catch(M){(M.detail??"").includes("not_configured")?He.value=i("SMTP ayarlı/doğrulanmış değil — linki elle iletin.","SMTP not set up/verified — share the link manually."):He.value=M instanceof Error?M.message:String(M)}finally{_e.value=!1}}}async function de(P){F.value=!0;try{await r.api.revokeShare(P.uuid),await Ce()}catch(j){X.value=j instanceof Error?j.message:String(j)}finally{F.value=!1}}function Se(P,j="url"){var M;(M=navigator.clipboard)==null||M.writeText(P),W.value=j,setTimeout(()=>{W.value===j&&(W.value="")},1400)}return(P,j)=>{var M,pe;return l.openBlock(),l.createElementBlock("div",{class:"fx-perm-overlay",onClick:j[22]||(j[22]=l.withModifiers(le=>n("close"),["self"]))},[l.createElementVNode("div",lv,[l.createElementVNode("header",sv,[l.createElementVNode("div",cv,[l.createElementVNode("span",uv,l.toDisplayString(e.isDir?"📁":"📄"),1),l.createElementVNode("div",fv,[l.createElementVNode("h3",null,l.toDisplayString(i("Paylaş / İzinler","Share / Permissions")),1),l.createElementVNode("span",{class:"fx-perm-sub",title:e.path},[l.createTextVNode(l.toDisplayString(o.value.name),1),l.createElementVNode("span",hv," · "+l.toDisplayString(o.value.adapter),1)],8,dv)])]),l.createElementVNode("button",{class:"fx-perm-x",onClick:j[0]||(j[0]=le=>n("close")),"aria-label":"close"},"✕")]),l.createElementVNode("div",pv,[c.value?(l.openBlock(),l.createElementBlock("button",{key:0,class:l.normalizeClass(["fx-perm-tab",{"is-active":s.value==="perms"}]),onClick:j[1]||(j[1]=le=>s.value="perms")},l.toDisplayString(i("Kişiler","People")),3)):l.createCommentVNode("",!0),l.createElementVNode("button",{class:l.normalizeClass(["fx-perm-tab",{"is-active":s.value==="share"}]),onClick:j[2]||(j[2]=le=>s.value="share")},l.toDisplayString(i("Bağlantı","Link")),3),e.isDir?(l.openBlock(),l.createElementBlock("button",{key:1,class:l.normalizeClass(["fx-perm-tab",{"is-active":s.value==="drop"}]),onClick:j[3]||(j[3]=le=>s.value="drop")},l.toDisplayString(i("Dosya İste","Request files")),3)):l.createCommentVNode("",!0)]),l.createElementVNode("div",mv,[s.value==="perms"&&c.value?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[p.value?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",vv,l.toDisplayString(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)),f.value?(l.openBlock(),l.createElementBlock("div",gv,l.toDisplayString(f.value),1)):l.createCommentVNode("",!0),u.value?(l.openBlock(),l.createElementBlock("div",yv,l.toDisplayString(i("Yükleniyor…","Loading…")),1)):(l.openBlock(),l.createElementBlock(l.Fragment,{key:3},[l.createElementVNode("div",bv,[l.createElementVNode("div",wv,[l.createElementVNode("div",_v,[l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":j[4]||(j[4]=le=>w.value=le),type:"email",class:"fx-perm-input",autocomplete:"off",placeholder:i("İsim veya e-posta","Name or email"),onInput:ve,onKeyup:l.withKeys(tt,["enter"]),onFocus:ve},null,40,xv),[[l.vModelText,w.value]]),C.value?(l.openBlock(),l.createElementBlock("ul",kv,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(E.value,le=>(l.openBlock(),l.createElementBlock("li",{key:le.id,onMousedown:l.withModifiers(S=>Oe(le),["prevent"])},[l.createElementVNode("span",Ev,l.toDisplayString((le.display_name||le.email).charAt(0).toUpperCase()),1),l.createElementVNode("span",Cv,[l.createElementVNode("span",Dv,l.toDisplayString(le.display_name||le.email),1),l.createElementVNode("span",Av,l.toDisplayString(le.email)+" · "+l.toDisplayString(le.role),1)])],40,Sv))),128))])):l.createCommentVNode("",!0)]),l.withDirectives(l.createElementVNode("select",{"onUpdate:modelValue":j[5]||(j[5]=le=>m.value=le),class:"fx-perm-sel",title:(M=k.find(le=>le.v===m.value))==null?void 0:M.d},[(l.openBlock(),l.createElementBlock(l.Fragment,null,l.renderList(k,le=>l.createElementVNode("option",{key:le.v,value:le.v},l.toDisplayString(le.l),9,Tv)),64))],8,Bv),[[l.vModelSelect,m.value]]),l.createElementVNode("button",{class:"fx-perm-btn fx-perm-btn--primary",disabled:_.value,onClick:tt},l.toDisplayString(i("Ekle","Add")),9,Mv)]),g.value?(l.openBlock(),l.createElementBlock("div",Iv,[l.createElementVNode("p",zv,l.toDisplayString(i("Bu e-postada hesap yok. Ne yapmak istersiniz?","No account for this email — what next?")),1),l.createElementVNode("div",Fv,[l.createElementVNode("div",Nv,[l.withDirectives(l.createElementVNode("select",{"onUpdate:modelValue":j[6]||(j[6]=le=>b.value=le),class:"fx-perm-sel"},[l.createElementVNode("option",Ov,l.toDisplayString(i("Kullanıcı","User")),1),l.createElementVNode("option",Lv,l.toDisplayString(i("Görüntüleyen","Viewer")),1)],512),[[l.vModelSelect,b.value]]),l.createElementVNode("button",{class:"fx-perm-btn fx-perm-btn--primary",disabled:_.value,onClick:at},l.toDisplayString(i("Kullanıcı oluştur + yetki ver","Create user + grant")),9,Pv)]),l.createElementVNode("button",{class:"fx-perm-btn fx-perm-btn--ghost",disabled:_.value,onClick:st},l.toDisplayString(i("Sadece paylaşım linki gönder →","Just send a share link →")),9,Rv)])])):l.createCommentVNode("",!0),y.value?(l.openBlock(),l.createElementBlock("div",Vv,l.toDisplayString(y.value),1)):l.createCommentVNode("",!0),(pe=v.value)!=null&&pe.tempPassword?(l.openBlock(),l.createElementBlock("div",$v,[l.createTextVNode(l.toDisplayString(i("Geçici parola:","Temp password:"))+" ",1),l.createElementVNode("code",null,l.toDisplayString(v.value.tempPassword),1)])):l.createCommentVNode("",!0)]),l.createElementVNode("div",Uv,[l.createElementVNode("h4",null,l.toDisplayString(i("Erişimi olanlar","People with access")),1),!h.value.length&&!d.value.length?(l.openBlock(),l.createElementBlock("div",Hv,l.toDisplayString(i("Henüz kimseyle paylaşılmadı.","Not shared with anyone yet.")),1)):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(h.value,le=>(l.openBlock(),l.createElementBlock("div",{key:"d"+le.id,class:"fx-perm-person"},[l.createElementVNode("span",Gv,l.toDisplayString(vt(le)),1),l.createElementVNode("span",{class:"fx-perm-user",title:le.user_email},l.toDisplayString(ft(le)),9,jv),l.createElementVNode("select",{class:"fx-perm-sel fx-perm-sel--sm",value:le.level,onChange:S=>It(le,S.target.value)},[(l.openBlock(),l.createElementBlock(l.Fragment,null,l.renderList(k,S=>l.createElementVNode("option",{key:S.v,value:S.v},l.toDisplayString(S.l),9,Wv)),64))],40,qv),l.createElementVNode("button",{class:"fx-perm-del",disabled:_.value,title:i("Kaldır","Remove"),onClick:S=>ut(le)},"✕",8,Xv)]))),128)),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(d.value,le=>(l.openBlock(),l.createElementBlock("div",{key:"i"+le.id,class:"fx-perm-person fx-perm-inh"},[l.createElementVNode("span",Zv,l.toDisplayString(vt(le)),1),l.createElementVNode("span",{class:"fx-perm-user",title:le.user_email},l.toDisplayString(ft(le)),9,Kv),l.createElementVNode("span",Yv,l.toDisplayString(B(le.level)),1),l.createElementVNode("span",{class:"fx-perm-from",title:i("Üst klasörden gelir","Inherited from")+": "+(le.path_prefix||"/")}," ↳ "+l.toDisplayString(le.path_prefix||"/"),9,Jv)]))),128))])],64))],64)):l.createCommentVNode("",!0),s.value==="share"?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createElementVNode("div",Qv,[l.createElementVNode("div",e5,[l.createElementVNode("label",t5,[l.withDirectives(l.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":j[7]||(j[7]=le=>V.value=le)},null,512),[[l.vModelCheckbox,V.value]]),l.createTextVNode(" "+l.toDisplayString(i("PIN ile koru","Protect with a PIN")),1)]),l.createElementVNode("label",r5,[l.createElementVNode("span",n5,l.toDisplayString(i("Süre","Expiry")),1),l.withDirectives(l.createElementVNode("select",{"onUpdate:modelValue":j[8]||(j[8]=le=>L.value=le),class:"fx-perm-sel fx-perm-sel--sm"},[(l.openBlock(),l.createElementBlock(l.Fragment,null,l.renderList(ue,le=>l.createElementVNode("option",{key:le.v,value:le.v},l.toDisplayString(le.l),9,a5)),64))],512),[[l.vModelSelect,L.value,void 0,{number:!0}]])]),l.createElementVNode("button",{class:"fx-perm-btn fx-perm-btn--primary",disabled:F.value,onClick:pt},l.toDisplayString(i("Bağlantı oluştur","Create link")),9,i5)]),X.value?(l.openBlock(),l.createElementBlock("div",o5,l.toDisplayString(X.value),1)):l.createCommentVNode("",!0),H.value?(l.openBlock(),l.createElementBlock("div",l5,[l.createElementVNode("div",s5,[l.createElementVNode("a",{href:H.value.url,target:"_blank",rel:"noopener",class:"fx-perm-link"},l.toDisplayString(H.value.url),9,c5),l.createElementVNode("button",{class:"fx-perm-btn fx-perm-btn--sm",onClick:j[9]||(j[9]=le=>Se(H.value.url,"new"))},l.toDisplayString(W.value==="new"?i("Kopyalandı ✓","Copied ✓"):i("Kopyala","Copy")),1)]),H.value.pin?(l.openBlock(),l.createElementBlock("div",u5,[l.createElementVNode("span",null,[j[23]||(j[23]=l.createTextVNode("PIN: ",-1)),l.createElementVNode("code",null,l.toDisplayString(H.value.pin),1)]),l.createElementVNode("button",{class:"fx-perm-btn fx-perm-btn--sm",onClick:j[10]||(j[10]=le=>Se(H.value.pin,"sharepin"))},l.toDisplayString(W.value==="sharepin"?i("Kopyalandı ✓","Copied ✓"):i("Kopyala","Copy")),1)])):l.createCommentVNode("",!0),l.createElementVNode("div",f5,[l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":j[11]||(j[11]=le=>Z.value=le),type:"text",class:"fx-perm-input",autocomplete:"off",placeholder:i("e-posta(lar) — virgülle ayırın","email(s) — comma separated"),onKeyup:l.withKeys(Ct,["enter"])},null,40,d5),[[l.vModelText,Z.value]]),l.createElementVNode("button",{class:"fx-perm-btn",disabled:Q.value,onClick:Ct},l.toDisplayString(i("Gönder","Send")),9,h5)]),K.value?(l.openBlock(),l.createElementBlock("div",p5,l.toDisplayString(K.value),1)):l.createCommentVNode("",!0)])):Z.value?(l.openBlock(),l.createElementBlock("p",m5,[l.createTextVNode(l.toDisplayString(i("Aşağıdan bir bağlantı oluşturun, ardından","Create a link below, then it will be sent to"))+" ",1),l.createElementVNode("strong",null,l.toDisplayString(Z.value),1),l.createTextVNode(" "+l.toDisplayString(i("adresine gönderin.",".")),1)])):l.createCommentVNode("",!0)]),l.createElementVNode("div",v5,[l.createElementVNode("h4",null,l.toDisplayString(i("Mevcut bağlantılar","Existing links")),1),T.value.length?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",g5,l.toDisplayString(i("Yok","None")),1)),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(T.value,le=>(l.openBlock(),l.createElementBlock("div",{key:le.uuid,class:"fx-perm-person"},[l.createElementVNode("span",{class:"fx-perm-user fx-perm-link",title:le.url},l.toDisplayString(le.url),9,y5),l.createElementVNode("button",{class:"fx-perm-btn fx-perm-btn--sm",onClick:S=>Se(le.url,le.uuid)},l.toDisplayString(W.value===le.uuid?i("✓","✓"):i("Kopyala","Copy")),9,b5),l.createElementVNode("button",{class:"fx-perm-del",disabled:F.value,title:i("İptal","Revoke"),onClick:S=>de(le)},"✕",8,w5)]))),128))])],64)):l.createCommentVNode("",!0),s.value==="drop"?(l.openBlock(),l.createElementBlock("div",_5,[l.createElementVNode("p",x5,l.toDisplayString(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.createElementVNode("div",k5,[l.createElementVNode("label",S5,[l.withDirectives(l.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":j[12]||(j[12]=le=>ne.value=le)},null,512),[[l.vModelCheckbox,ne.value]]),l.createTextVNode(" "+l.toDisplayString(i("PIN ile koru","Protect with a PIN")),1)]),l.createElementVNode("label",E5,[l.createElementVNode("span",C5,l.toDisplayString(i("Süre","Expiry")),1),l.withDirectives(l.createElementVNode("select",{"onUpdate:modelValue":j[13]||(j[13]=le=>fe.value=le),class:"fx-perm-sel fx-perm-sel--sm"},[(l.openBlock(),l.createElementBlock(l.Fragment,null,l.renderList(ue,le=>l.createElementVNode("option",{key:le.v,value:le.v},l.toDisplayString(le.l),9,D5)),64))],512),[[l.vModelSelect,fe.value,void 0,{number:!0}]])]),l.createElementVNode("button",{class:"fx-perm-btn fx-perm-btn--primary",disabled:me.value,onClick:I},l.toDisplayString(i("Bağlantı oluştur","Create link")),9,A5)]),l.createElementVNode("button",{type:"button",class:"fx-perm-btn fx-perm-btn--ghost fx-perm-advtoggle",onClick:j[14]||(j[14]=le=>re.value=!re.value)},l.toDisplayString(re.value?i("Gelişmiş ▲","Advanced ▲"):i("Gelişmiş ▼","Advanced ▼")),1),re.value?(l.openBlock(),l.createElementBlock("div",B5,[l.createElementVNode("label",T5,[l.createElementVNode("span",M5,l.toDisplayString(i("En fazla dosya","Max files")),1),l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":j[15]||(j[15]=le=>ye.value=le),type:"number",min:"1",class:"fx-perm-input fx-perm-input--sm",placeholder:"20"},null,512),[[l.vModelText,ye.value]])]),l.createElementVNode("label",I5,[l.createElementVNode("span",z5,l.toDisplayString(i("Dosya başı MB","MB / file")),1),l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":j[16]||(j[16]=le=>he.value=le),type:"number",min:"1",class:"fx-perm-input fx-perm-input--sm",placeholder:"500"},null,512),[[l.vModelText,he.value]])]),l.createElementVNode("label",F5,[l.createElementVNode("span",N5,l.toDisplayString(i("İzinli türler","Allowed types")),1),l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":j[17]||(j[17]=le=>ke.value=le),type:"text",class:"fx-perm-input fx-perm-input--sm",placeholder:i("hepsi (örn. pdf, jpg)","all (e.g. pdf, jpg)")},null,8,O5),[[l.vModelText,ke.value]])]),l.createElementVNode("label",L5,[l.withDirectives(l.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":j[18]||(j[18]=le=>Ee.value=le)},null,512),[[l.vModelCheckbox,Ee.value]]),l.createTextVNode(" "+l.toDisplayString(i("Yükleyenin adını sor","Ask uploader name")),1)])])):l.createCommentVNode("",!0),te.value?(l.openBlock(),l.createElementBlock("div",P5,l.toDisplayString(te.value),1)):l.createCommentVNode("",!0),se.value?(l.openBlock(),l.createElementBlock("div",R5,[l.createElementVNode("div",V5,[l.createElementVNode("a",{href:se.value.url,target:"_blank",rel:"noopener",class:"fx-perm-link"},l.toDisplayString(se.value.url),9,$5),l.createElementVNode("button",{class:"fx-perm-btn fx-perm-btn--sm",onClick:j[19]||(j[19]=le=>Se(se.value.url,"drop"))},l.toDisplayString(W.value==="drop"?i("Kopyalandı ✓","Copied ✓"):i("Kopyala","Copy")),1)]),se.value.pin?(l.openBlock(),l.createElementBlock("div",U5,[l.createElementVNode("span",null,[j[24]||(j[24]=l.createTextVNode("PIN: ",-1)),l.createElementVNode("code",null,l.toDisplayString(se.value.pin),1)]),l.createElementVNode("button",{class:"fx-perm-btn fx-perm-btn--sm",onClick:j[20]||(j[20]=le=>Se(se.value.pin,"droppin"))},l.toDisplayString(W.value==="droppin"?i("Kopyalandı ✓","Copied ✓"):i("Kopyala","Copy")),1)])):l.createCommentVNode("",!0),l.createElementVNode("div",H5,[l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":j[21]||(j[21]=le=>ie.value=le),type:"text",class:"fx-perm-input",autocomplete:"off",placeholder:i("e-posta(lar) — virgülle ayırın","email(s) — comma separated"),onKeyup:l.withKeys(J,["enter"])},null,40,G5),[[l.vModelText,ie.value]]),l.createElementVNode("button",{class:"fx-perm-btn",disabled:_e.value,onClick:J},l.toDisplayString(i("Gönder","Send")),9,j5)]),He.value?(l.openBlock(),l.createElementBlock("div",q5,l.toDisplayString(He.value),1)):l.createCommentVNode("",!0)])):l.createCommentVNode("",!0)])):l.createCommentVNode("",!0)])])])}}}),[["__scopeId","data-v-4c90f457"]]),X5={key:0,class:"fe__loading"},Z5={class:"fe__loading-text"},K5={key:0,class:"fe__dragover"},Y5={class:"fe-recents__header"},J5={class:"fe-modal__head"},Q5={class:"fe-modal__title"},e3={class:"fe-modal__body"},t3={key:0,class:"fe-toast"},mc="brf-file-explorer:view-mode",Fo="brf-file-explorer:path",ci="application/x-brf-files",r3=l.defineComponent({__name:"FileExplorer",props:{config:{}},emits:["share-created","file-opened","error","upload-progress","selection-change"],setup(e,{emit:t}){const r=e,n=t,a=tc(r.config),i=rc(r.config,a),o=sc(r.config,a,{onSettled:$=>{if($.status==="error")I($.error_message||"İşlem başarısız");else{const U=$.op_type==="copy"?"Kopyalandı":$.op_type==="move"?"Taşındı":"Silindi";I(`${U} (${$.progress_total})`)}M()}}),s=l.ref(!1),c=(r.config.rootPath||"").trim(),u=c.replace("://","/").replace(/^\/+|\/+$/g,""),f=u||r.config.initialPath||"",h=l.ref(f),d=l.ref(r.config.defaultAdapter||"brf"),p=l.ref(f),w=l.ref([]),m=l.ref(""),_=l.customRef(($,U)=>{let be=(()=>{try{const Te=localStorage.getItem(mc);if(Te==="list"||Te==="grid")return Te}catch{}return r.config.viewMode??"list"})();return{get(){return $(),be},set(Te){if(Te!==be){be=Te;try{localStorage.setItem(mc,Te)}catch{}U()}}}}),y=l.ref(""),g=l.ref(!1),b=l.ref(""),v=l.computed(()=>g.value),E=l.computed(()=>r.config.locale||"tr"),C=l.computed(()=>{const $=(h.value??"").replace(/^\/+|\/+$/g,"");return u&&$===u?!1:$.length>0}),A=l.computed(()=>J.value?!(h.value??"").replace(/^\/+|\/+$/g,""):!1);function k(){if(g.value){M(b.value);return}const $=(h.value??"").replace(/^\/+|\/+$/g,"");if(!$||$===u)return;const U=$.lastIndexOf("/");let be=U===-1?"":$.slice(0,U);u&&!(be===u||be.startsWith(u+"/"))&&(be=u),M(be)}const{t:B}=_r(E),T=nc(()=>w.value);l.watch(()=>[...T.selected.value],()=>{n("selection-change",T.nodes.value.map($=>({path:$.path,basename:$.basename,type:$.type})))});const F=l.ref({mode:null,items:[],sourcePath:null}),V=l.ref(null),L=l.ref(new Set),H=l.ref(!1),X=l.ref(!1),W=l.ref(null),Z=l.ref(0);async function Q(){try{const $=await oi(),U=r.config.apiBase??"",be=await fetch(`${U}/api/files/manager/star/list?limit=500`,{headers:$,credentials:"include"});if(!be.ok)return;const Te=await be.json(),ot=Array.isArray(Te)?Te:Array.isArray(Te==null?void 0:Te.entries)?Te.entries:Array.isArray(Te==null?void 0:Te.nodes)?Te.nodes:[];L.value=new Set(ot.map(Ze=>Ze.id).filter(Ze=>typeof Ze=="number"))}catch{}}function K($,U){if(typeof $.id!="number")return;const be=new Set(L.value);U?be.add($.id):be.delete($.id),L.value=be}async function ue($){if(typeof $.id=="number")try{const U=r.config.apiBase??"";await fetch(`${U}/api/files/manager/recent`,{method:"POST",headers:await oi({"Content-Type":"application/json"}),credentials:"include",body:JSON.stringify({node_id:$.id})}),Z.value+=1}catch{}}function ne($){typeof $.id=="number"&&(W.value=$,X.value=!0)}function fe($){const U={type:"file",path:$.path,basename:$.name,extension:($.name.split(".").pop()||"").toLowerCase(),id:$.id};H.value=!1,Ue(U)}const re=l.computed(()=>{var U,be,Te;if(r.config.onlyOfficeBase)return r.config.onlyOfficeBase;const $=(be=(U=V.value)==null?void 0:U.external)==null?void 0:be.onlyoffice;return $&&!To($)?null:((Te=V.value)==null?void 0:Te.onlyoffice_url)||null}),ye=l.computed(()=>re.value&&a.endpoints.onlyOfficeConfig||null),he=l.computed(()=>{var be,Te,ot;const $=r.config.drawioUrl||r.config.drawioBase;if($)return $;const U=(Te=(be=V.value)==null?void 0:be.external)==null?void 0:Te.drawio;return U&&!To(U)?null:((ot=V.value)==null?void 0:ot.drawio_url)||null}),ke=l.computed(()=>{var $;return r.config.convertBase||(($=V.value)==null?void 0:$.convert_url)||null}),Ee=l.ref([]),me=l.ref(null),te=l.ref(!1),se=l.ref(!1),ie=l.ref(!1),_e=l.ref(!1),He=l.ref(!1),je=l.ref(null),Ve=l.ref(null),ge=l.ref(null),Ce=l.ref(null),ve=l.ref("edit"),Oe=l.ref(!1),tt=l.ref(null),at=l.ref(!1),st=l.ref(null);function It($){return $===void 0||$==="editor"||$==="owner"}function ut($){var U;return $.length===1&&typeof((U=$[0])==null?void 0:U.perm)=="string"?$[0].perm:m.value}const ft=l.computed(()=>It(m.value)),vt=l.ref(null),gt=l.ref(null),pt=l.ref(null),Ct=l.ref(null);let Ae;function I($){Ct.value=$,Ae&&clearTimeout(Ae),Ae=setTimeout(()=>Ct.value=null,2500)}const J=l.computed(()=>r.config.multiStorageRoot===!0);function de($){const U=$.replace(/^\/+|\/+$/g,"");if(!U)return{adapter:"",rel:""};const be=U.indexOf("/");return be===-1?{adapter:U,rel:""}:{adapter:U.slice(0,be),rel:U.slice(be+1)}}function Se($){if($.includes("://"))return $;const{adapter:U,rel:be}=de($);return U?be?`${U}://${be}`:`${U}://`:""}function P($){const U=$.indexOf("://");if(U===-1)return $.replace(/^\/+|\/+$/g,"");const be=$.slice(0,U),Te=$.slice(U+3).replace(/^\/+|\/+$/g,"");return Te?`${be}/${Te}`:be}function j(){return(r.config.storages??[]).map(U=>({type:"dir",path:U.name,basename:U.label||U.name,extension:"",storage:U.name,visibility:"private",file_size:0,mime_type:"inode/storage",extra_metadata:{driver:U.driver,readOnly:U.readOnly}}))}async function M($){s.value=!0,g.value=!1;try{let U=$??h.value??"";if(u){const or=String(U).replace(/^\/+|\/+$/g,"");(!or||!(or===u||or.startsWith(u+"/")))&&(U=u)}if(J.value&&!Se(U)){h.value="",d.value="",p.value="",w.value=j();return}const be=J.value?Se(U):S(U),Te=y.value?await a.search(be,y.value):await a.index(be);d.value=Te.adapter,p.value=Te.dirname,m.value=Te.perm||"",w.value=(Te.files||[]).filter(or=>!(or.path.includes(".thumbs")||or.path.includes(".versions")||or.basename===".versions"||or.basename===".trash"||or.basename===".keepdir"));const ot=pe(Te.dirname),Ze=ot==="fileman"||ot==="",qt=ot.startsWith("fileman/.trash"),cr=r.config.trashVisible!==!1;!qt&&Ze&&cr&&w.value.unshift({type:"dir",path:`${Te.adapter}://fileman/.trash`,basename:".trash",extension:"",storage:Te.adapter,visibility:"private",file_size:0,mime_type:"inode/directory",extra_metadata:{}}),h.value=J.value?P(Te.dirname):pe(Te.dirname)}catch(U){const be=U instanceof Error?U.message:String(U);n("error",{message:be,context:{path:$}}),I(be)}finally{s.value=!1}}function pe($){const U=$.indexOf("://");return U===-1?$:$.slice(U+3)}async function le(){s.value=!0,b.value=d.value||"",g.value=!0,T.clear();try{const{entries:$}=await a.listTrash();w.value=$.map(U=>({type:"file",id:U.id,path:U.storage_name?`${U.storage_name}://${U.path}`:U.path,basename:U.name,extension:U.name.includes(".")&&U.name.split(".").pop()||"",storage:U.storage_name||"",visibility:"private",file_size:U.size,mime_type:U.mime||"",extra_metadata:{deleted_at:U.deleted_at,ttl_days:U.ttl_days??null}})),p.value=".trash",h.value=".trash"}catch($){const U=$ instanceof Error?$.message:String($);n("error",{message:U,context:{op:"trash-list"}}),I(U)}finally{s.value=!1}}function S($){if($&&$.includes("://"))return $;if(J.value){const U=Se($??"");return U||(d.value?`${d.value}://`:"")}return $?`${d.value}://${$.replace(/^\/+/,"")}`:`${d.value}://`}l.watch(()=>y.value,()=>void M());function ae(){return r.config.pathPersist??"hash"}function ce(){if(typeof window>"u")return"";const $=ae();if($==="none")return"";if($==="localStorage")try{return localStorage.getItem(Fo)||""}catch{return""}const U=window.location.hash||"";return U.startsWith("#")?decodeURIComponent(U.slice(1)).replace(/^\/+|\/+$/g,""):""}let N=!1;function Y($){if(typeof window>"u")return;const U=ae();if(U==="none")return;if(U==="localStorage"){try{$?localStorage.setItem(Fo,$):localStorage.removeItem(Fo)}catch{}return}const be=$?`#${$}`:"";window.location.hash!==be&&(N=!0,history.replaceState(null,"",be||window.location.pathname+window.location.search))}function oe(){if(ae()!=="hash")return;if(N){N=!1;return}const $=ce();$&&$!==h.value&&M($)}l.watch(h,$=>Y($)),l.onMounted(async()=>{var U;li();const $=ce();await M($||void 0),await l.nextTick(),(U=gt.value)==null||U.focus(),Q(),ae()==="hash"&&window.addEventListener("hashchange",oe),a.endpoints.opsList&&o.startPolling(),a.endpoints.capabilities&&a.capabilities().then(be=>{V.value=be}).catch(()=>{})}),ac(gt,{onDelete:()=>{T.isEmpty.value||(ie.value=!0)},onRename:()=>{T.nodes.value.length===1&&(je.value=T.nodes.value[0],se.value=!0)},onSelectAll:()=>T.selectAll(),onOpen:()=>{const $=T.nodes.value[0];$&&Ue($)},onClose:()=>{var $;te.value=!1,se.value=!1,ie.value=!1,_e.value=!1,He.value=!1,($=vt.value)==null||$.hide()},onFocusSearch:()=>{var $;return($=pt.value)==null?void 0:$.focusSearch()},onCut:()=>z9(),onCopy:()=>F9(),onPaste:()=>Vp(),onGoUp:()=>k(),hasSelection:()=>!T.isEmpty.value});const Qe=new Set(["docx","xlsx","pptx","doc","xls","ppt","odt","ods","odp"]);function Ue($){if($.basename===".trash"){le();return}if($.type==="dir"){const be=J.value?P($.path):pe($.path);M(be);return}const U=($.extension||"").toLowerCase();ve.value=It($.perm??m.value)?bt(U):"view",Ce.value=$,He.value=!0,n("file-opened",{path:$.path,basename:$.basename}),ue($)}const Xe=new Set([...Qe,"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 bt($){return Xe.has($)?"view":"edit"}async function an($){const U=$??T.nodes.value;if(U.length!==0)try{if(g.value){const ot=U.map(qt=>qt.id).filter(qt=>typeof qt=="number"),{restored:Ze}=await a.restoreIds(ot);I(`${Ze} öğe geri getirildi`),T.clear(),await le();return}if(!a.endpoints.restore)return;const be=U.map(ot=>ot.path),{restored:Te}=await a.restore(be);I(`${Te} öğe geri getirildi`),T.clear(),await M()}catch(be){n("error",{message:be.message,context:{op:"restore"}})}}function Ot($){ve.value="view",Ce.value=$,He.value=!0,ue($)}function St($){if($.type==="dir"){const Ze=J.value?P($.path):pe($.path);M(Ze);return}if(!It($.perm??m.value)){Ot($);return}const U=($.extension||"").toLowerCase(),be=r.config.openPageBase;if(!be){Ue($);return}const Te=be.includes("?")?"&":"?",ot=`${be}${Te}path=${encodeURIComponent($.path)}&type=${encodeURIComponent(U)}&mode=edit`;window.open(ot,"_blank","noopener"),n("file-opened",{path:$.path,basename:$.basename}),ue($)}const Lt=l.ref("selection"),Jt=l.ref(""),hr=l.ref(""),ai=l.computed(()=>{const $=T.nodes.value;return $.length===0?"none":$.length===1?$[0].type==="dir"?"single-dir":"single-file":"multi"});async function ii($){const U=T.nodes.value;if($==="open"){U[0]&&Ue(U[0]);return}await Rp($,U)}async function Ht($,U){var be;Lt.value="selection",T.has($.path)||(T.click($.path),await l.nextTick()),(be=vt.value)==null||be.show({clientX:U.clientX,clientY:U.clientY},T.nodes.value)}function Er($){var U;$.preventDefault(),Lt.value="selection",T.clear(),(U=vt.value)==null||U.show({clientX:$.clientX,clientY:$.clientY},[])}function tr($){var U;Lt.value="breadcrumb",Jt.value=$.adapterPath,hr.value=$.label,(U=vt.value)==null||U.show({clientX:$.x,clientY:$.y},[])}const on=l.computed(()=>{if(Lt.value==="breadcrumb")return[{key:"open",label:B("ctx.open"),icon:"↗"},{key:"copy-path",label:B("breadcrumb.copy_path"),icon:"📋"}];const $=T.nodes.value,U=$.length>0,be=$.length===1;if(v.value)return U?[{key:"restore",label:B("ctx.restore"),icon:"↩"},{divider:!0,key:"sep1",label:""},{key:"delete",label:B("ctx.delete_perm"),icon:"🗑",danger:!0}]:[];const Te=(h.value??"").replace(/^\/+|\/+$/g,"");return J.value&&Te===""?U?be?[{key:"open",label:B("ctx.open"),icon:"↗"}]:[]:[]:U?Rr($):It(m.value)?[{key:"new-folder",label:B("toolbar.new_folder"),icon:"📁"},{key:"paste",label:B("ctx.paste"),icon:"📋",disabled:!F.value.mode}]:[]});function Rr($){var Xp,Zp;const U=$.length>0,be=$.length===1,Te=be&&((Xp=$[0])==null?void 0:Xp.type)==="file",ot=E.value==="en"?"Tags…":"Etiketler…",Ze=be&&typeof((Zp=$[0])==null?void 0:Zp.id)=="number",qt=E.value==="en"?"Copy node id":"Node id'yi kopyala",cr=ut($),or=It(cr),nw=E.value==="en"?"Share / Permissions":"Paylaş / İzinler";return[{key:"open",label:B("ctx.open"),icon:"↗",hidden:!be},{key:"preview",label:B("ctx.preview"),icon:"👁",hidden:!be,disabled:!Te},{key:"download",label:B("ctx.download"),icon:"⬇",hidden:!be,disabled:!Te},{key:"convert",label:B("ctx.convert"),icon:"🔄",hidden:!be||!ke.value||!or,disabled:!Te},{key:"access",label:nw,icon:"🔗",hidden:!be||!or},{key:"copy-id",label:qt,icon:"🆔",hidden:!Ze,disabled:!Ze},{divider:!0,key:"sep1",label:"",hidden:!or},{key:"rename",label:B("ctx.rename"),icon:"✎",hidden:!be||!or,disabled:!be},{key:"cut",label:B("ctx.cut"),icon:"✂",hidden:!U||!or,disabled:!U},{key:"copy",label:B("ctx.copy"),icon:"❐",hidden:!U,disabled:!U},{key:"paste",label:B("ctx.paste"),icon:"📋",hidden:!or,disabled:!F.value.mode},{divider:!0,key:"sep-meta",label:"",hidden:!Ze},{key:"tags",label:ot,icon:"🏷",hidden:!Ze,disabled:!Ze},{divider:!0,key:"sep2",label:"",hidden:!or},{key:"delete",label:B("ctx.delete"),icon:"🗑",danger:!0,hidden:!U||!or,disabled:!U}]}const Bo=l.computed(()=>{const $=T.nodes.value;if(v.value)return $.length===0?[]:[{key:"restore",label:B("ctx.restore"),icon:"↩"},{key:"delete",label:B("ctx.delete_perm"),icon:"🗑",danger:!0}];const U=(h.value??"").replace(/^\/+|\/+$/g,"");return J.value&&U===""?$.length===1?[{key:"open",label:B("ctx.open"),icon:"↗"}]:[]:$.length===0?[]:Rr($)});async function I9($,U){if(Lt.value==="breadcrumb"){$.key==="open"?M(pe(Jt.value)):$.key==="copy-path"&&await Wp(Jt.value);return}await Rp($.key,U)}async function Rp($,U){var be;switch($){case"open":U[0]&&St(U[0]);break;case"preview":U[0]&&Ot(U[0]);break;case"download":U[0]&&O9(U[0]);break;case"convert":U[0]&&$9(U[0]);break;case"share":U[0]&&V9(U[0]);break;case"access":U[0]&&(st.value=U[0],at.value=!0);break;case"copy-id":if(U[0]&&typeof U[0].id=="number"){const Te=U[0].id;(be=navigator.clipboard)==null||be.writeText(String(Te)).then(()=>I(E.value==="en"?`Node id ${Te} copied`:`Node id ${Te} kopyalandı`),()=>I(`#${Te}`))}break;case"tags":U[0]&&ne(U[0]);break;case"rename":U[0]&&(je.value=U[0],se.value=!0);break;case"cut":F.value={mode:"cut",items:U,sourcePath:h.value},I("Kes → Yapıştır hazır");break;case"copy":F.value={mode:"copy",items:U,sourcePath:h.value},I("Kopyala → Yapıştır hazır");break;case"paste":await Vp();break;case"delete":ie.value=!0;break;case"restore":U.length>0&&await an(U);break;case"new-folder":te.value=!0;break;case"duplicate":U[0]&&await N9(U[0]);break}}function z9(){T.isEmpty.value||(F.value={mode:"cut",items:T.nodes.value,sourcePath:h.value},I("Kesildi"))}function F9(){T.isEmpty.value||(F.value={mode:"copy",items:T.nodes.value,sourcePath:h.value},I("Kopyalandı"))}async function Vp(){const $=F.value;if(!(!$.mode||$.items.length===0))try{const U=$.items.map(ot=>ot.path),be=$.sourcePath||"";if($.mode==="cut"&&be===h.value){I("Aynı klasöre kesilemez");return}if($.mode==="cut"){const{op:ot}=await a.moveAsync(U,S(h.value),S(be)||void 0);o.register(ot),I("Taşıma kuyruğa alındı")}else{const{op:ot}=await a.copy(U,S(h.value));o.register(ot),I("Kopyalama kuyruğa alındı")}F.value={mode:null,items:[],sourcePath:null}}catch(U){n("error",{message:U.message,context:{op:"paste"}})}}async function N9($){try{const{op:U}=await a.copy([$.path],S(h.value));o.register(U)}catch(U){n("error",{message:U.message,context:{op:"duplicate"}})}}function O9($){const U=a.downloadUrl($.path);window.open(U,"_blank")}async function L9($){try{await a.newFolder(S(h.value),$),te.value=!1,await M()}catch(U){n("error",{message:U.message,context:{op:"newfolder"}})}}async function P9($){const U=je.value;if(U)try{await a.rename(S(h.value),U.path,$),se.value=!1,je.value=null,await M()}catch(be){n("error",{message:be.message,context:{op:"rename"}})}}async function R9(){if(g.value){ie.value=!1,I("Çöpteki öğeler saklama süresi sonunda otomatik silinir. Kalıcı silme yönetici panelinden yapılır.");return}const $=T.nodes.value.map(U=>U.path);if($.length===0){ie.value=!1;return}try{if(a.endpoints.deleteAsync){const{op:U}=await a.deleteAsync($,S(h.value));o.register(U),I("Silme kuyruğa alındı")}else await a.deleteItems(S(h.value),$),await M();ie.value=!1,T.clear()}catch(U){n("error",{message:U.message,context:{op:"delete"}})}}function V9($){Ve.value=$,ge.value=null,_e.value=!0}function $9($){tt.value=$,Oe.value=!0}function U9($){I(E.value==="en"?`Converted → ${$}`:`Dönüştürüldü → ${$}`),M()}async function H9($){const U=Ve.value;if(U)try{const{share:be}=await a.createShare({path:U.path,password:$.password,expires_at:$.expires_at,max_downloads:$.max_downloads});ge.value=be,n("share-created",{path:U.path,url:be.url,pin:be.password_pin??null})}catch(be){n("error",{message:be.message,context:{op:"share"}})}}function G9(){_e.value=!1,Ve.value=null,ge.value=null}function j9(){var $;if(!ft.value){I(E.value==="en"?"Read-only here":"Burada yazma yetkiniz yok");return}($=me.value)==null||$.click()}function q9($){const U=$.target,be=U.files?Array.from(U.files):[];U.value="",$p(be)}async function $p($){if($.length===0)return;const U=!!(a.endpoints.uploadInit&&a.endpoints.uploadFinalize);for(const be of $)U&&be.size>=10*1024*1024&&await X9(be)||await W9(be);await M()}async function W9($){const U=crypto.randomUUID(),be=S(h.value);Ee.value=[...Ee.value,{id:U,file:$,path:be,totalBytes:$.size,uploadedBytes:0,percent:0,status:"uploading",cancel(){}}];const Te=ot=>{const Ze=Ee.value.findIndex(cr=>cr.id===U);if(Ze===-1)return;const qt=[...Ee.value];qt[Ze]={...qt[Ze],...ot},Ee.value=qt};try{await a.uploadMultipart(be,[$],ot=>{Te({percent:ot,uploadedBytes:Math.round(ot/100*$.size)}),n("upload-progress",{uploadId:U,percent:ot,done:ot>=100})}),Te({percent:100,uploadedBytes:$.size,status:"done"}),n("upload-progress",{uploadId:U,percent:100,done:!0})}catch(ot){Te({status:"error"}),n("error",{message:ot.message,context:{op:"upload",file:$.name}})}}async function X9($){const U=crypto.randomUUID();let be=!1;try{return await i.uploadFile({path:S(h.value),file:$,onProgress:Te=>{if(be){const ot=Ee.value.findIndex(Ze=>Ze.id===U);if(ot!==-1){const Ze=[...Ee.value];Ze[ot]={...Te,id:U},Ee.value=Ze}}else{if(Te.status!=="uploading"&&Te.uploadedBytes<=0)return;Ee.value=[...Ee.value,{...Te,id:U}],be=!0}n("upload-progress",{uploadId:Te.uploadId??U,percent:Te.percent,done:Te.status==="done"})}}),!0}catch{return be&&(Ee.value=Ee.value.filter(Te=>Te.id!==U)),!1}}const ya=l.ref(0),ba=l.ref(!1);function Ys($){const U=$.dataTransfer;if(!U||U.types&&U.types.includes(ci))return!1;if(U.items&&U.items.length>0){let be=!1;for(const Te of Array.from(U.items))if(Te.kind==="file"){be=!0;break}return be}return U.types?U.types.includes("Files"):!1}function Z9($){Ys($)&&($.preventDefault(),ya.value++,ba.value=!0)}function K9(){ya.value=Math.max(0,ya.value-1),ya.value===0&&(ba.value=!1)}function Y9($){Ys($)&&$.preventDefault()}function J9($){var be,Te;if((be=$.dataTransfer)!=null&&be.types.includes(ci)){ya.value=0,ba.value=!1;return}if(!Ys($)){ya.value=0,ba.value=!1;return}if($.preventDefault(),ya.value=0,ba.value=!1,!ft.value){I(E.value==="en"?"Read-only here":"Burada yazma yetkiniz yok");return}const U=(Te=$.dataTransfer)!=null&&Te.files?Array.from($.dataTransfer.files):[];U.length!==0&&$p(U)}function Up($){var U;(U=$.dataTransfer)!=null&&U.types.includes("Files")&&$.preventDefault()}function Hp($){const U=gt.value,be=$.target;U&&be&&!U.contains(be)&&$.preventDefault()}l.onMounted(()=>{window.addEventListener("dragover",Up),window.addEventListener("drop",Hp)}),l.onBeforeUnmount(()=>{window.removeEventListener("dragover",Up),window.removeEventListener("drop",Hp),window.removeEventListener("hashchange",oe)});const Js=l.computed(()=>F.value.mode!=="cut"?new Set:new Set(F.value.items.map($=>$.path)));function Gp($,U){if(!U.dataTransfer)return;if($.basename===".trash"){U.preventDefault();return}T.has($.path)||T.click($.path);const be=T.nodes.value.filter(Te=>!Js.value.has(Te.path)).filter(Te=>Te.basename!==".trash").map(Te=>({path:Te.path,basename:Te.basename,type:Te.type}));U.dataTransfer.setData(ci,JSON.stringify(be)),U.dataTransfer.setData("text/plain",be.map(Te=>Te.path).join(`
|
|
2
|
+
`)),U.dataTransfer.effectAllowed="move"}async function jp($,U,be){try{if(a.endpoints.moveAsync){const{op:Te}=await a.moveAsync($,U,S(h.value));o.register(Te),I("Taşıma kuyruğa alındı")}else await a.move(S(h.value),$,U),await M();T.clear()}catch(Te){n("error",{message:Te.message,context:{op:be,targetDir:U}})}}async function qp($,U){var qt;if($.type!=="dir")return;const be=(qt=U.dataTransfer)==null?void 0:qt.getData(ci);if(!be)return;let Te=[];try{Te=JSON.parse(be)}catch{return}if(Te.length===0)return;const ot=$.path,Ze=Te.map(cr=>cr.path).filter(cr=>cr&&cr!==ot&&!ot.startsWith(cr+"/"));if(Ze.length===0){I("Aynı klasöre taşınamaz");return}await jp(Ze,ot,"move-dnd")}async function Q9($,U){var qt;const be=(qt=U.dataTransfer)==null?void 0:qt.getData(ci);if(!be)return;let Te=[];try{Te=JSON.parse(be)}catch{return}if(Te.length===0)return;const ot=$,Ze=Te.map(cr=>cr.path).filter(cr=>cr&&cr!==ot&&!ot.startsWith(cr+"/"));Ze.length!==0&&await jp(Ze,ot,"move-dnd-crumb")}function ew($){$.cancel()}function tw($){Ee.value=Ee.value.filter(U=>U.id!==$.id)}function rw($){if(J.value&&!$){M("");return}if(J.value){M(P($));return}M(pe($))}async function Wp($){try{await navigator.clipboard.writeText($),I(B("breadcrumb.copy_path"))}catch{}}function oi($={}){return a.authHeadersSync({...$})}return($,U)=>{var be,Te,ot;return l.openBlock(),l.createElementBlock("div",{ref_key:"rootEl",ref:gt,class:l.normalizeClass(["fe",{"fe--theme-light":e.config.theme==="light","fe--theme-dark":e.config.theme==="dark","fe--is-dragover":ba.value}]),tabindex:"-1",onDragenter:Z9,onDragover:Y9,onDragleave:K9,onDrop:J9,onContextmenu:Er},[l.createVNode(bm,{ref_key:"toolbarRef",ref:pt,"view-mode":_.value,"search-query":y.value,"trash-active":v.value,actions:Bo.value,"selection-mode":ai.value,"paste-enabled":!!F.value.mode,"convert-enabled":!!ke.value,"can-go-up":C.value,"at-virtual-root":A.value,"can-write":ft.value,locale:E.value,"onUpdate:viewMode":U[0]||(U[0]=Ze=>_.value=Ze),"onUpdate:searchQuery":U[1]||(U[1]=Ze=>y.value=Ze),onNewFolder:U[2]||(U[2]=Ze=>te.value=!0),onUpload:j9,onRefresh:U[3]||(U[3]=()=>M()),onGoUp:k,onAction:ii,onOpenRecents:U[4]||(U[4]=Ze=>H.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"]),l.createVNode(Nm,{dirname:p.value,adapter:d.value,"root-label":d.value,locale:E.value,"multi-storage-root":J.value,"root-path":l.unref(c),onNavigate:rw,onCopyPath:Wp,onCrumbContext:tr,onCrumbDrop:Q9},null,8,["dirname","adapter","root-label","locale","multi-storage-root","root-path"]),l.createElementVNode("div",{class:"fe__body",onClick:U[7]||(U[7]=l.withModifiers(Ze=>l.unref(T).clear(),["self"]))},[s.value&&w.value.length===0?(l.openBlock(),l.createElementBlock("div",X5,[U[23]||(U[23]=l.createElementVNode("span",{class:"fe__spinner","aria-hidden":"true"},null,-1)),l.createElementVNode("p",Z5,l.toDisplayString(l.unref(B)("loading")),1)])):_.value==="list"?(l.openBlock(),l.createBlock(e2,{key:1,files:w.value,selected:l.unref(T).selected.value,clipped:Js.value,"show-parent-path":!!y.value,locale:E.value,loading:s.value,"starred-ids":L.value,"api-base":r.config.apiBase??"","auth-headers":()=>oi(),onClickRow:U[5]||(U[5]=(Ze,qt)=>l.unref(T).click(Ze.path,qt)),onDblRow:Ue,onContextRow:Ht,onItemDragStart:Gp,onItemDropInto:qp,onStarChange:K},null,8,["files","selected","clipped","show-parent-path","locale","loading","starred-ids","api-base","auth-headers"])):(l.openBlock(),l.createBlock(c2,{key:2,files:w.value,selected:l.unref(T).selected.value,clipped:Js.value,"show-parent-path":!!y.value,locale:E.value,loading:s.value,onClickCard:U[6]||(U[6]=(Ze,qt)=>l.unref(T).click(Ze.path,qt)),onDblCard:Ue,onContextCard:Ht,onItemDragStart:Gp,onItemDropInto:qp},null,8,["files","selected","clipped","show-parent-path","locale","loading"]))]),ba.value?(l.openBlock(),l.createElementBlock("div",K5,[...U[24]||(U[24]=[l.createElementVNode("div",{class:"fe__dragover-card"},[l.createElementVNode("span",{class:"fe-icon"},"⬆"),l.createElementVNode("p",null,"Dosyaları buraya bırak")],-1)])])):l.createCommentVNode("",!0),l.createVNode(E2,{jobs:Ee.value,locale:E.value,onCancel:ew,onDismiss:tw},null,8,["jobs","locale"]),l.createVNode(M2,{ops:l.unref(o).ops.value,locale:E.value,onDismiss:U[8]||(U[8]=Ze=>l.unref(o).dismiss(Ze))},null,8,["ops","locale"]),l.createVNode(m2,{ref_key:"ctxRef",ref:vt,locale:E.value,theme:e.config.theme||"auto",actions:on.value,onSelect:I9},null,8,["locale","theme","actions"]),l.createVNode(P2,{open:te.value,locale:E.value,onClose:U[9]||(U[9]=Ze=>te.value=!1),onSubmit:L9},null,8,["open","locale"]),l.createVNode(V2,{open:se.value,locale:E.value,"current-name":((be=je.value)==null?void 0:be.basename)||"",onClose:U[10]||(U[10]=Ze=>se.value=!1),onSubmit:P9},null,8,["open","locale","current-name"]),l.createVNode($2,{open:ie.value,locale:E.value,count:l.unref(T).size.value,onClose:U[11]||(U[11]=Ze=>ie.value=!1),onConfirm:R9},null,8,["open","locale","count"]),l.createVNode(t4,{open:_e.value,locale:E.value,share:ge.value,onClose:G9,onSubmit:H9,onToast:I},null,8,["open","locale","share"]),l.createVNode(pc,{open:He.value,locale:E.value,file:Ce.value,theme:e.config.theme||"auto","preview-url":Ze=>l.unref(a).previewUrl(Ze),"download-url":Ze=>l.unref(a).downloadUrl(Ze),"only-office-base":re.value,"only-office-config-endpoint":ye.value,"save-text-endpoint":l.unref(a).endpoints.saveText||null,"open-mode":ve.value,"auth-headers":()=>oi({"Content-Type":"application/json"}),"auth-credentials":l.unref(a).credentialsMode(),"drawio-url":he.value,"pdf-worker-url":r.config.pdfWorkerUrl||null,"pdf-save-url":r.config.pdfSaveUrl||null,"viewer-base-url":r.config.viewerBaseUrl||null,onClose:U[12]||(U[12]=Ze=>He.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"]),Oe.value&&tt.value&&ke.value?(l.openBlock(),l.createBlock(ov,{key:1,"convert-url":ke.value,"file-name":((Te=tt.value)==null?void 0:Te.basename)||((ot=tt.value)==null?void 0:ot.path)||"","fetch-bytes":()=>{var Ze;return l.unref(a).fetchArrayBuffer(((Ze=tt.value)==null?void 0:Ze.path)??"")},upload:Ze=>l.unref(a).uploadMultipart(S(h.value),[Ze]).then(()=>{}),onClose:U[13]||(U[13]=Ze=>Oe.value=!1),onDone:U9},null,8,["convert-url","file-name","fetch-bytes","upload"])):l.createCommentVNode("",!0),at.value&&st.value?(l.openBlock(),l.createBlock(W5,{key:2,api:l.unref(a),path:st.value.path,"is-dir":st.value.type==="dir",size:typeof st.value.size=="number"?st.value.size:void 0,locale:E.value==="en"?"en":"tr",onClose:U[14]||(U[14]=Ze=>at.value=!1)},null,8,["api","path","is-dir","size","locale"])):l.createCommentVNode("",!0),l.createVNode(l.Transition,{name:"fe-modal"},{default:l.withCtx(()=>[H.value?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(["fe fe-modal__backdrop fe-recents__backdrop",{"fe--theme-light":e.config.theme==="light","fe--theme-dark":e.config.theme==="dark"}]),onClick:U[18]||(U[18]=Ze=>H.value=!1)},[l.createElementVNode("div",{class:"fe-recents__panel",onClick:U[17]||(U[17]=l.withModifiers(()=>{},["stop"]))},[l.createElementVNode("div",Y5,[l.createElementVNode("strong",null,l.toDisplayString(E.value==="en"?"Recently opened":"Son açılanlar"),1),l.createElementVNode("button",{class:"fe-recents__close","aria-label":"Close",onClick:U[15]||(U[15]=Ze=>H.value=!1)},"×")]),l.createVNode(fc,{"api-base":r.config.apiBase??"","auth-headers":()=>oi(),limit:20,"refresh-key":Z.value,onOpen:fe,onError:U[16]||(U[16]=Ze=>n("error",{message:Ze,context:{op:"recents"}}))},null,8,["api-base","auth-headers","refresh-key"])])],2)):l.createCommentVNode("",!0)]),_:1}),l.createVNode(l.Transition,{name:"fe-modal"},{default:l.withCtx(()=>[X.value&&W.value&&typeof W.value.id=="number"?(l.openBlock(),l.createElementBlock("div",{key:0,class:"fe-modal__backdrop",onClick:U[22]||(U[22]=Ze=>X.value=!1)},[l.createElementVNode("div",{class:"fe-modal__card fe-modal__card--md",onClick:U[21]||(U[21]=l.withModifiers(()=>{},["stop"]))},[l.createElementVNode("header",J5,[l.createElementVNode("h2",Q5,l.toDisplayString(E.value==="en"?"Tags":"Etiketler")+" — "+l.toDisplayString(W.value.basename),1),l.createElementVNode("button",{class:"fe-modal__close","aria-label":"Close",onClick:U[19]||(U[19]=Ze=>X.value=!1)},"×")]),l.createElementVNode("div",e3,[l.createVNode(uc,{"node-id":W.value.id,"api-base":r.config.apiBase??"","auth-headers":()=>oi(),onError:U[20]||(U[20]=Ze=>n("error",{message:Ze,context:{op:"tags"}}))},null,8,["node-id","api-base","auth-headers"])])])])):l.createCommentVNode("",!0)]),_:1}),l.createElementVNode("input",{ref_key:"fileInputEl",ref:me,type:"file",multiple:"",class:"fe__file-input",onChange:q9},null,544),l.createVNode(l.Transition,{name:"fe-toast"},{default:l.withCtx(()=>[Ct.value?(l.openBlock(),l.createElementBlock("div",t3,l.toDisplayString(Ct.value),1)):l.createCommentVNode("",!0)]),_:1})],34)}}}),n3={class:"filex-viewer-3d"},a3={key:1,class:"filex-viewer-fallback"},i3={key:2,class:"filex-viewer-fallback"},wa=Object.freeze(Object.defineProperty({__proto__:null,default:xr(l.defineComponent({__name:"Viewer3D",props:{url:{},mime:{},ext:{},t:{type:Function}},setup(e){const t=e,r=new Set(["glb","gltf","usdz"]),n=l.computed(()=>r.has((t.ext||"").toLowerCase())),a=l.ref(null),i=l.ref(!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 l.onMounted(o),l.watch(()=>t.url,()=>{o()}),(s,c)=>{const u=l.resolveComponent("model-viewer");return l.openBlock(),l.createElementBlock("div",n3,[i.value&&!a.value?(l.openBlock(),l.createBlock(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?(l.openBlock(),l.createElementBlock("div",a3,[c[0]||(c[0]=l.createElementVNode("span",{class:"filex-viewer-fallback__icon"},"📦",-1)),l.createElementVNode("p",null,l.toDisplayString(a.value),1)])):(l.openBlock(),l.createElementBlock("div",i3,[c[1]||(c[1]=l.createElementVNode("span",{class:"filex-viewer-fallback__icon"},"⏳",-1)),l.createElementVNode("p",null,l.toDisplayString(e.t?e.t("viewer.loading"):"Loading…"),1)]))])}}}),[["__scopeId","data-v-78bcf18b"]])},Symbol.toStringTag,{value:"Module"})),o3={key:0,class:"filex-viewer-fallback"},l3={key:0,class:"filex-viewer-epub__nav"},s3=["disabled"],c3=["disabled"],u3={key:1,class:"filex-viewer-epub__loading"},f3=Object.freeze(Object.defineProperty({__proto__:null,default:xr(l.defineComponent({__name:"EpubViewer",props:{url:{},mime:{},ext:{},t:{type:Function},authHeaders:{type:Function},authCredentials:{}},setup(e){const t=e,r=l.ref(null),n=l.ref(null),a=l.ref(null),i=l.ref([]);l.ref(!1);const o=l.ref(100),s=l.ref(!1),c=l.ref(!0);let u=null,f=null;async function h(){c.value=!0,s.value=!1,a.value=null;let _=null;try{_=await import("epubjs")}catch{a.value=t.t?t.t("viewer.peer_not_installed"):"EPUB viewer requires `epubjs` — install or use download.",c.value=!1;return}try{const y=_.default??_;let g=t.url;if(t.authHeaders){const v=t.authHeaders(),E=await fetch(t.url,{headers:v,credentials:t.authCredentials||"same-origin"});if(!E.ok)throw new Error(`${E.status} ${E.statusText}`);g=await E.arrayBuffer()}if(u=y(g),!n.value)throw new Error("EPUB mount target missing");f=u.renderTo(n.value,{width:"100%",height:"100%",flow:"paginated",manager:"default"}),await f.display(),f.themes.fontSize(o.value+"%");const b=await u.loaded.navigation;i.value=(b==null?void 0:b.toc)??[],s.value=!0}catch(y){a.value=y instanceof Error?y.message:"EPUB load failed"}finally{c.value=!1}}function d(){var _;(_=f==null?void 0:f.next)==null||_.call(f)}function p(){var _;(_=f==null?void 0:f.prev)==null||_.call(f)}function w(_){_.key==="ArrowRight"||_.key==="PageDown"?d():(_.key==="ArrowLeft"||_.key==="PageUp")&&p()}l.onMounted(()=>{h(),window.addEventListener("keydown",w)}),l.onBeforeUnmount(()=>{var _,y;window.removeEventListener("keydown",w);try{(_=f==null?void 0:f.destroy)==null||_.call(f)}catch{}try{(y=u==null?void 0:u.destroy)==null||y.call(u)}catch{}f=null,u=null}),l.watch(()=>t.url,()=>{if(f)try{f.destroy()}catch{}if(u)try{u.destroy()}catch{}u=null,f=null,h()});function m(_,y){return t.t?t.t(_):y}return(_,y)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"root",ref:r,class:"filex-viewer-epub"},[a.value?(l.openBlock(),l.createElementBlock("div",o3,[y[0]||(y[0]=l.createElementVNode("span",{class:"filex-viewer-fallback__icon"},"📖",-1)),l.createElementVNode("p",null,l.toDisplayString(a.value),1)])):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createElementVNode("div",{ref_key:"containerRef",ref:n,class:"filex-viewer-epub__rendition"},null,512),s.value?(l.openBlock(),l.createElementBlock("div",l3,[l.createElementVNode("button",{type:"button",class:"filex-viewer-btn",onClick:p,disabled:!s.value},"‹",8,s3),l.createElementVNode("button",{type:"button",class:"filex-viewer-btn",onClick:d,disabled:!s.value},"›",8,c3)])):l.createCommentVNode("",!0),c.value?(l.openBlock(),l.createElementBlock("div",u3,l.toDisplayString(m("viewer.loading","Loading…")),1)):l.createCommentVNode("",!0)],64))],512))}}),[["__scopeId","data-v-f9b72a2c"]])},Symbol.toStringTag,{value:"Module"}));async function vc(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 gc(e){return(await vc(e)).arrayBuffer()}async function t0(e){return(await vc(e)).text()}const d3={class:"filex-viewer-mermaid"},h3={key:0,class:"filex-viewer-fallback"},p3={key:1,class:"filex-viewer-fallback"},yc=Object.freeze(Object.defineProperty({__proto__:null,default:xr(l.defineComponent({__name:"MermaidViewer",props:{url:{},mime:{},ext:{},t:{type:Function},authHeaders:{type:Function},authCredentials:{}},setup(e){const t=e,r=l.ref(null),n=l.ref(null),a=l.ref(!0),i=l.ref(1),o=l.ref(0),s=l.ref(0);let c=!1,u=null,f=0,h=null;async function d(){var b,v;if(h)return h;try{const E=await import("mermaid");return h=E.default??E,(v=h.initialize)==null||v.call(h,{startOnLoad:!1,securityLevel:"strict",theme:(b=window.matchMedia)!=null&&b.call(window,"(prefers-color-scheme: dark)").matches?"dark":"default"}),h}catch{return null}}async function p(){var C;a.value=!0,n.value=null;const b=++f,v=await d();if(b!==f)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 E;try{E=await t0({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===f)try{const A=`filex-mermaid-${Date.now()}`,{svg:k}=await v.render(A,E);if(b!==f)return;if(r.value){r.value.innerHTML=k;const B=r.value.querySelector("svg");B&&(B.style.maxWidth="100%",B.style.height="auto")}}catch(A){n.value=A instanceof Error?A.message:"render failed"}finally{a.value=!1}}function w(b){if(!b.ctrlKey&&!b.metaKey)return;b.preventDefault();const E=-b.deltaY>0?1.1:1/1.1;i.value=Math.max(.2,Math.min(8,i.value*E))}function m(b){var v,E;c=!0,u={x:b.clientX,y:b.clientY,tx:o.value,ty:s.value},(E=(v=b.target).setPointerCapture)==null||E.call(v,b.pointerId)}function _(b){!c||!u||(o.value=u.tx+(b.clientX-u.x),s.value=u.ty+(b.clientY-u.y))}function y(){c=!1,u=null}l.onMounted(p),l.onBeforeUnmount(()=>{f++});function g(b,v){return t.t?t.t(b):v}return(b,v)=>(l.openBlock(),l.createElementBlock("div",d3,[l.createElementVNode("div",{class:"filex-viewer-mermaid__pane",onWheel:w,onPointerdown:m,onPointermove:_,onPointerup:y,onPointercancel:y},[n.value?(l.openBlock(),l.createElementBlock("div",h3,[v[0]||(v[0]=l.createElementVNode("span",{class:"filex-viewer-fallback__icon"},"📊",-1)),l.createElementVNode("p",null,l.toDisplayString(n.value),1)])):a.value?(l.openBlock(),l.createElementBlock("div",p3,[v[1]||(v[1]=l.createElementVNode("span",{class:"filex-viewer-fallback__icon"},"⏳",-1)),l.createElementVNode("p",null,l.toDisplayString(g("viewer.loading","Loading…")),1)])):l.createCommentVNode("",!0),l.withDirectives(l.createElementVNode("div",{ref_key:"surface",ref:r,class:"filex-viewer-mermaid__surface",style:l.normalizeStyle({transform:`translate(${o.value}px, ${s.value}px) scale(${i.value})`})},null,4),[[l.vShow,!a.value&&!n.value]])],32)]))}}),[["__scopeId","data-v-fe0bf99e"]])},Symbol.toStringTag,{value:"Module"})),m3={class:"filex-viewer-drawio"},v3={key:0,class:"filex-viewer-fallback"},g3=["src"],bc=Object.freeze(Object.defineProperty({__proto__:null,default:xr(l.defineComponent({__name:"DrawioViewer",props:{url:{},filePath:{},ext:{},drawioUrl:{},saveUrl:{},readOnly:{type:Boolean},t:{type:Function},authHeaders:{type:Function},authCredentials:{}},setup(e){const t=e,r=l.ref(null),n=l.ref(null),a=l.ref("loading"),i=l.ref(!!t.readOnly||!t.saveUrl),o=l.computed(()=>t.drawioUrl?t.drawioUrl.replace(/\/$/,""):null),s=l.computed(()=>{if(!o.value)return"";const m=new URLSearchParams({embed:"1",proto:"json",spin:"1",saveAndExit:"0",noSaveBtn:i.value?"1":"0",noExitBtn:"1",ui:"kennedy",modified:"unsavedChanges"});return`${o.value}/?${m.toString()}`});let c="";async function u(){var m;a.value="loading",n.value=null;try{c=await t0({url:t.url,headers:((m=t.authHeaders)==null?void 0:m.call(t))??{},credentials:t.authCredentials})}catch(_){n.value=_ instanceof Error?_.message:"fetch failed",a.value="error"}}function f(m){var _,y;(y=(_=r.value)==null?void 0:_.contentWindow)==null||y.postMessage(JSON.stringify(m),"*")}async function h(m){var _;if(t.saveUrl){a.value="saving";try{const y={"Content-Type":"application/json",...((_=t.authHeaders)==null?void 0:_.call(t))??{}},g=await fetch(t.saveUrl,{method:"POST",headers:y,credentials:t.authCredentials||"same-origin",body:JSON.stringify({path:t.filePath,content:m})});if(!g.ok)throw new Error(`${g.status} ${g.statusText}`);a.value="saved",setTimeout(()=>{a.value==="saved"&&(a.value="ready")},2500)}catch(y){n.value=y instanceof Error?y.message:"save failed",a.value="error"}}}function d(m){if(typeof m.data!="string"||m.data.length===0)return;const _=m.data[0];if(_!=="{"&&_!=="<")return;let y;try{y=JSON.parse(m.data)}catch{return}if(!(!y||typeof y!="object"))switch(y.event){case"init":f({action:"load",xml:c,autosave:0}),a.value="ready";break;case"save":typeof y.xml=="string"&&h(y.xml);break;case"export":break;case"autosave":typeof y.xml=="string"&&!i.value&&h(y.xml);break}}function p(){if(!o.value){n.value=w("viewer.drawio.disabled","Drawio (diagrams.net) yapılandırılmamış."),a.value="error";return}n.value===w("viewer.drawio.disabled","Drawio (diagrams.net) yapılandırılmamış.")&&(n.value=null,a.value="loading"),u()}l.onMounted(()=>{window.addEventListener("message",d),p()}),l.watch(()=>t.drawioUrl,p),l.onBeforeUnmount(()=>{window.removeEventListener("message",d)});function w(m,_){return t.t?t.t(m):_}return(m,_)=>(l.openBlock(),l.createElementBlock("div",m3,[n.value?(l.openBlock(),l.createElementBlock("div",v3,[_[0]||(_[0]=l.createElementVNode("span",{class:"filex-viewer-fallback__icon"},"📐",-1)),l.createElementVNode("p",null,l.toDisplayString(n.value),1)])):(l.openBlock(),l.createElementBlock("iframe",{key:1,ref_key:"iframeRef",ref:r,src:s.value,class:"filex-viewer-drawio__frame",title:"diagrams.net editor"},null,8,g3))]))}}),[["__scopeId","data-v-2a88618e"]])},Symbol.toStringTag,{value:"Module"})),y3={class:"filex-viewer-tiff"},b3={class:"filex-viewer-tiff__pane"},w3={key:0,class:"filex-viewer-fallback"},_3={key:1,class:"filex-viewer-fallback"},x3={key:2,class:"filex-viewer-tiff__pager"},k3=["disabled"],S3={class:"filex-viewer-tiff__pages"},E3=["disabled"],wc=Object.freeze(Object.defineProperty({__proto__:null,default:xr(l.defineComponent({__name:"TiffViewer",props:{url:{},mime:{},ext:{},t:{type:Function},authHeaders:{type:Function},authCredentials:{}},setup(e){const t=e,r=l.ref(null),n=l.ref(null),a=l.ref(!0);l.ref(1);const i=l.ref(0),o=l.ref(0),s=l.ref({width:0,height:0});let c=null,u=null,f=0;async function h(){if(c)return c;try{const g=await Promise.resolve().then(()=>d8);return c=g.default??g,c}catch{return null}}async function d(){var v;a.value=!0,n.value=null,u=null,i.value=0,o.value=0;const g=++f,b=await h();if(g===f){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 E=await gc({url:t.url,headers:((v=t.authHeaders)==null?void 0:v.call(t))??{},credentials:t.authCredentials});if(g!==f)return;if(u=b.decode(E),o.value=(u==null?void 0:u.length)??0,o.value===0)throw new Error("No pages decoded");p()}catch(E){n.value=E instanceof Error?E.message:"TIFF decode failed"}finally{a.value=!1}}}function p(){if(!c||!u||!r.value)return;const g=Math.max(0,Math.min(i.value,u.length-1)),b=u[g];try{c.decodeImage(void 0,b)}catch{}const v=c.toRGBA8(b),E=b.width,C=b.height;s.value={width:E,height:C};const A=r.value;A.width=E,A.height=C;const k=A.getContext("2d");if(!k)return;const B=k.createImageData(E,C);B.data.set(v),k.putImageData(B,0,0)}function w(){i.value<o.value-1&&(i.value++,p())}function m(){i.value>0&&(i.value--,p())}l.onMounted(d),l.onBeforeUnmount(()=>{f++,u=null}),l.watch(()=>t.url,d);const _=l.computed(()=>(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 y(g,b){return t.t?t.t(g):b}return(g,b)=>(l.openBlock(),l.createElementBlock("div",y3,[l.createElementVNode("div",b3,[n.value?(l.openBlock(),l.createElementBlock("div",w3,[b[0]||(b[0]=l.createElementVNode("span",{class:"filex-viewer-fallback__icon"},"🖼️",-1)),l.createElementVNode("p",null,l.toDisplayString(n.value),1)])):a.value?(l.openBlock(),l.createElementBlock("div",_3,[b[1]||(b[1]=l.createElementVNode("span",{class:"filex-viewer-fallback__icon"},"⏳",-1)),l.createElementVNode("p",null,l.toDisplayString(y("viewer.loading","Loading…")),1)])):l.createCommentVNode("",!0),l.withDirectives(l.createElementVNode("canvas",{ref_key:"canvasEl",ref:r,style:{imageRendering:"pixelated"}},null,512),[[l.vShow,!a.value&&!n.value]]),!a.value&&!n.value&&o.value>1?(l.openBlock(),l.createElementBlock("div",x3,[l.createElementVNode("button",{type:"button",class:"filex-viewer-btn",disabled:i.value===0,onClick:m},"‹",8,k3),l.createElementVNode("span",S3,l.toDisplayString(_.value),1),l.createElementVNode("button",{type:"button",class:"filex-viewer-btn",disabled:i.value>=o.value-1,onClick:w},"›",8,E3)])):l.createCommentVNode("",!0)])]))}}),[["__scopeId","data-v-e6d0bdb2"]])},Symbol.toStringTag,{value:"Module"})),C3={class:"filex-viewer-psd"},D3={class:"filex-viewer-psd__pane"},A3={key:0,class:"filex-viewer-fallback"},B3={key:1,class:"filex-viewer-fallback"},T3=Object.freeze(Object.defineProperty({__proto__:null,default:xr(l.defineComponent({__name:"PsdViewer",props:{url:{},mime:{},ext:{},t:{type:Function},authHeaders:{type:Function},authCredentials:{}},setup(e){const t=e,r=l.ref(null),n=l.ref([]),a=l.ref(null),i=l.ref(!0);l.ref(!1);const o=l.ref({width:0,height:0});l.ref(1);let s=0,c=null;async function u(){if(c)return c;try{return c=await Promise.resolve().then(()=>T9),c}catch{return null}}function f(p,w){if(p&&Array.isArray(p.children))for(const m of p.children)w.push({index:w.length,name:m.name??"(unnamed)",hidden:!!m.hidden}),m.children&&f(m,w)}async function h(){var m;i.value=!0,a.value=null,n.value=[];const p=++s,w=await u();if(p===s){if(!w){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 _=await gc({url:t.url,headers:((m=t.authHeaders)==null?void 0:m.call(t))??{},credentials:t.authCredentials});if(p!==s)return;const y=w.readPsd(_,{skipLayerImageData:!1,skipCompositeImageData:!1,skipThumbnail:!0});o.value={width:y.width,height:y.height};const g=y.canvas;if(g&&r.value){const v=r.value;v.width=y.width,v.height=y.height;const E=v.getContext("2d");E==null||E.drawImage(g,0,0)}else throw new Error("PSD has no composite image (skipCompositeImageData?)");const b=[];f(y,b),n.value=b}catch(_){a.value=_ instanceof Error?_.message:"PSD decode failed"}finally{i.value=!1}}}l.onMounted(h),l.onBeforeUnmount(()=>{s++}),l.watch(()=>t.url,h);function d(p,w){return t.t?t.t(p):w}return(p,w)=>(l.openBlock(),l.createElementBlock("div",C3,[l.createElementVNode("div",D3,[a.value?(l.openBlock(),l.createElementBlock("div",A3,[w[0]||(w[0]=l.createElementVNode("span",{class:"filex-viewer-fallback__icon"},"🎨",-1)),l.createElementVNode("p",null,l.toDisplayString(a.value),1)])):i.value?(l.openBlock(),l.createElementBlock("div",B3,[w[1]||(w[1]=l.createElementVNode("span",{class:"filex-viewer-fallback__icon"},"⏳",-1)),l.createElementVNode("p",null,l.toDisplayString(d("viewer.loading","Loading…")),1)])):l.createCommentVNode("",!0),l.withDirectives(l.createElementVNode("canvas",{ref_key:"canvasEl",ref:r},null,512),[[l.vShow,!i.value&&!a.value]])])]))}}),[["__scopeId","data-v-d23e4974"]])},Symbol.toStringTag,{value:"Module"})),M3={class:"filex-viewer-ipynb"},I3={class:"filex-viewer-ipynb__pane"},z3={key:0,class:"filex-viewer-fallback"},F3={key:1,class:"filex-viewer-fallback"},N3={key:2},O3=["data-type"],L3={class:"filex-viewer-ipynb__exec"},P3={class:"filex-viewer-ipynb__src hljs"},R3=["innerHTML"],V3={key:1},$3={key:0,class:"filex-viewer-ipynb__outputs"},U3=["src","alt"],H3=["innerHTML"],G3=["data-type"],j3=["innerHTML"],q3={key:1,class:"filex-viewer-ipynb__md-raw"},W3={key:2,class:"filex-viewer-ipynb__src"},X3=Object.freeze(Object.defineProperty({__proto__:null,default:xr(l.defineComponent({__name:"IpynbViewer",props:{url:{},ext:{},t:{type:Function},authHeaders:{type:Function},authCredentials:{}},setup(e){const t=e,r=l.ref([]),n=l.ref("python"),a=l.ref(null),i=l.ref(!0),o=l.ref(new Map),s=l.ref(new Map);let c=0,u=null,f=null;async function h(){if(f!==null)return f||null;try{const g=await import("markdown-it"),b=g.default??g;return f=new b({html:!1,linkify:!0,breaks:!0}),f}catch{return f=!1,null}}function d(g){return Array.isArray(g)?g.join(""):g??""}async function p(){var C,A,k,B;i.value=!0,a.value=null,r.value=[],o.value=new Map,s.value=new Map;const g=++c;let b;try{b=await t0({url:t.url,headers:((C=t.authHeaders)==null?void 0:C.call(t))??{},credentials:t.authCredentials})}catch(T){a.value=T instanceof Error?T.message:"fetch failed",i.value=!1;return}if(g!==c)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=((k=(A=v.metadata)==null?void 0:A.kernelspec)==null?void 0:k.language)||"python",u=await e0(),g!==c)return;if(u){const T=u.default??u,F=(B=T.getLanguage)!=null&&B.call(T,n.value)?n.value:null;r.value.forEach((V,L)=>{if(V.cell_type==="code"){const H=d(V.source);try{const X=F?T.highlight(H,{language:F,ignoreIllegals:!0}):T.highlightAuto(H);o.value.set(L,X.value)}catch{}}})}const E=await h();g===c&&(E&&r.value.forEach((T,F)=>{if(T.cell_type==="markdown")try{s.value.set(F,E.render(d(T.source)))}catch{}}),i.value=!1)}function w(g){var b;return g?g.output_type==="stream"?d(g.text):g.output_type==="error"?[g.ename,g.evalue,...g.traceback||[]].filter(Boolean).join(`
|
|
3
|
+
`):(g.output_type==="execute_result"||g.output_type==="display_data")&&(b=g.data)!=null&&b["text/plain"]?d(g.data["text/plain"]):null:null}function m(g){if(!(g!=null&&g.data))return null;if(g.data["image/png"])return`data:image/png;base64,${g.data["image/png"]}`;if(g.data["image/jpeg"])return`data:image/jpeg;base64,${g.data["image/jpeg"]}`;if(g.data["image/svg+xml"]){const b=d(g.data["image/svg+xml"]);return`data:image/svg+xml;utf8,${encodeURIComponent(b)}`}return null}function _(g){return g!=null&&g.data&&g.data["text/html"]?d(g.data["text/html"]).replace(/<script[\s\S]*?<\/script>/gi,""):null}l.onMounted(p),l.onBeforeUnmount(()=>{c++}),l.watch(()=>t.url,p),l.computed(()=>{const g=r.value.filter(v=>v.cell_type==="code").length,b=r.value.filter(v=>v.cell_type==="markdown").length;return{code:g,md:b,total:r.value.length}});function y(g,b){return t.t?t.t(g):b}return(g,b)=>(l.openBlock(),l.createElementBlock("div",M3,[l.createElementVNode("div",I3,[a.value?(l.openBlock(),l.createElementBlock("div",z3,[b[0]||(b[0]=l.createElementVNode("span",{class:"filex-viewer-fallback__icon"},"📓",-1)),l.createElementVNode("p",null,l.toDisplayString(a.value),1)])):i.value?(l.openBlock(),l.createElementBlock("div",F3,[b[1]||(b[1]=l.createElementVNode("span",{class:"filex-viewer-fallback__icon"},"⏳",-1)),l.createElementVNode("p",null,l.toDisplayString(y("viewer.loading","Loading…")),1)])):(l.openBlock(),l.createElementBlock("div",N3,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r.value,(v,E)=>(l.openBlock(),l.createElementBlock("div",{key:E,class:"filex-viewer-ipynb__cell","data-type":v.cell_type},[v.cell_type==="code"?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createElementVNode("div",L3," In ["+l.toDisplayString(v.execution_count??" ")+"]: ",1),l.createElementVNode("pre",P3,[o.value.get(E)?(l.openBlock(),l.createElementBlock("code",{key:0,innerHTML:o.value.get(E)},null,8,R3)):(l.openBlock(),l.createElementBlock("code",V3,l.toDisplayString(d(v.source)),1))]),v.outputs&&v.outputs.length?(l.openBlock(),l.createElementBlock("div",$3,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(v.outputs,(C,A)=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:A},[m(C)?(l.openBlock(),l.createElementBlock("img",{key:0,src:m(C)||"",class:"filex-viewer-ipynb__img",alt:`output ${A}`},null,8,U3)):_(C)?(l.openBlock(),l.createElementBlock("div",{key:1,class:"filex-viewer-ipynb__html",innerHTML:_(C)},null,8,H3)):w(C)?(l.openBlock(),l.createElementBlock("pre",{key:2,class:"filex-viewer-ipynb__out","data-type":C.output_type},l.toDisplayString(w(C)),9,G3)):l.createCommentVNode("",!0)],64))),128))])):l.createCommentVNode("",!0)],64)):v.cell_type==="markdown"?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[s.value.get(E)?(l.openBlock(),l.createElementBlock("div",{key:0,class:"filex-viewer-ipynb__md",innerHTML:s.value.get(E)},null,8,j3)):(l.openBlock(),l.createElementBlock("pre",q3,l.toDisplayString(d(v.source)),1))],64)):(l.openBlock(),l.createElementBlock("pre",W3,l.toDisplayString(d(v.source)),1))],8,O3))),128))]))])]))}}),[["__scopeId","data-v-631b8223"]])},Symbol.toStringTag,{value:"Module"})),Z3={class:"filex-viewer-csv"},K3={class:"filex-viewer-csv__pane"},Y3={key:0,class:"filex-viewer-fallback"},J3={key:1,class:"filex-viewer-fallback"},Q3={key:2,class:"filex-viewer-csv__table"},eg={class:"filex-viewer-csv__rownum"},tg={key:0,class:"filex-viewer-csv__pager"},rg=["disabled"],ng={class:"filex-viewer-csv__pageno"},ag=["disabled"],No=100,_c=1e3,xc=Object.freeze(Object.defineProperty({__proto__:null,default:xr(l.defineComponent({__name:"CsvViewer",props:{url:{},ext:{},t:{type:Function},authHeaders:{type:Function},authCredentials:{}},setup(e){const t=e,r=l.ref([]),n=l.ref(null),a=l.ref(!0),i=l.ref(!0),o=l.ref(""),s=l.ref(1),c=l.ref(","),u=l.ref("auto");let f=0;function h(v){const E=v.split(/\r?\n/).slice(0,5).join(`
|
|
4
|
+
`),C=(E.match(/\t/g)||[]).length,A=(E.match(/;/g)||[]).length,k=(E.match(/,/g)||[]).length;return C>k&&C>A?" ":A>k&&A>C?";":","}async function d(v,E){try{const C=await Promise.resolve().then(()=>M9);return(C.default??C).parse(v,{delimiter:E,skipEmptyLines:!0,header:!1}).data.slice(0,_c)}catch{return v.split(/\r?\n/).filter(C=>C.length>0).slice(0,_c).map(C=>C.split(E))}}async function p(){var A;a.value=!0,n.value=null,r.value=[],s.value=1;const v=++f;let E;try{E=await t0({url:t.url,headers:((A=t.authHeaders)==null?void 0:A.call(t))??{},credentials:t.authCredentials})}catch(k){n.value=k instanceof Error?k.message:"fetch failed",a.value=!1;return}if(v!==f)return;t.ext==="tsv"?c.value=" ":c.value=h(E.slice(0,4096));const C=u.value==="auto"?c.value:u.value;r.value=await d(E,C),a.value=!1}l.onMounted(p),l.watch(()=>t.url,p),l.watch(()=>u.value,()=>{r.value.length!==0&&p()});const w=l.computed(()=>!i.value||r.value.length===0?r.value.length===0?[]:r.value[0].map((v,E)=>`Col ${E+1}`):r.value[0]),m=l.computed(()=>i.value?r.value.slice(1):r.value),_=l.computed(()=>{const v=o.value.trim().toLowerCase();return v?m.value.filter(E=>E.some(C=>(C||"").toLowerCase().includes(v))):m.value}),y=l.computed(()=>Math.max(1,Math.ceil(_.value.length/No))),g=l.computed(()=>{const v=(s.value-1)*No;return _.value.slice(v,v+No)});l.watch(o,()=>{s.value=1});function b(v,E){return t.t?t.t(v):E}return(v,E)=>(l.openBlock(),l.createElementBlock("div",Z3,[l.createElementVNode("div",K3,[n.value?(l.openBlock(),l.createElementBlock("div",Y3,[E[2]||(E[2]=l.createElementVNode("span",{class:"filex-viewer-fallback__icon"},"📊",-1)),l.createElementVNode("p",null,l.toDisplayString(n.value),1)])):a.value?(l.openBlock(),l.createElementBlock("div",J3,[E[3]||(E[3]=l.createElementVNode("span",{class:"filex-viewer-fallback__icon"},"⏳",-1)),l.createElementVNode("p",null,l.toDisplayString(b("viewer.loading","Loading…")),1)])):(l.openBlock(),l.createElementBlock("table",Q3,[l.createElementVNode("thead",null,[l.createElementVNode("tr",null,[E[4]||(E[4]=l.createElementVNode("th",{class:"filex-viewer-csv__rownum"},"#",-1)),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(w.value,(C,A)=>(l.openBlock(),l.createElementBlock("th",{key:A},l.toDisplayString(C),1))),128))])]),l.createElementVNode("tbody",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(g.value,(C,A)=>(l.openBlock(),l.createElementBlock("tr",{key:A},[l.createElementVNode("td",eg,l.toDisplayString((s.value-1)*100+A+1),1),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(C,(k,B)=>(l.openBlock(),l.createElementBlock("td",{key:B},l.toDisplayString(k),1))),128))]))),128))])]))]),!a.value&&!n.value&&y.value>1?(l.openBlock(),l.createElementBlock("div",tg,[l.createElementVNode("button",{type:"button",class:"filex-viewer-btn",disabled:s.value<=1,onClick:E[0]||(E[0]=C=>s.value--)},"‹",8,rg),l.createElementVNode("span",ng,l.toDisplayString(s.value)+" / "+l.toDisplayString(y.value)+" ("+l.toDisplayString(_.value.length)+" satır)",1),l.createElementVNode("button",{type:"button",class:"filex-viewer-btn",disabled:s.value>=y.value,onClick:E[1]||(E[1]=C=>s.value++)},"›",8,ag)])):l.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-fc457b26"]])},Symbol.toStringTag,{value:"Module"})),ig={class:"filex-viewer-archive"},og={key:0,class:"filex-viewer-fallback"},lg={key:1,class:"filex-viewer-fallback"},sg={key:2,class:"filex-viewer-fallback"},cg={key:3,class:"filex-viewer-archive__pane"},ug={class:"filex-viewer-archive__summary"},fg={class:"filex-viewer-archive__table"},dg={class:"filex-viewer-archive__size"},hg=["data-dir"],pg={class:"filex-viewer-archive__icon"},mg={class:"filex-viewer-archive__size"},vg=Object.freeze(Object.defineProperty({__proto__:null,default:xr(l.defineComponent({__name:"ArchiveViewer",props:{url:{},filePath:{},ext:{},t:{type:Function},authHeaders:{type:Function},authCredentials:{}},setup(e){const t=e,r=l.ref([]),n=l.ref(!0),a=l.ref(null);function i(f,h){return t.t?t.t(f):h}function o(f){return f<1024?`${f} B`:f<1024*1024?`${(f/1024).toFixed(1)} KB`:f<1024*1024*1024?`${(f/(1024*1024)).toFixed(1)} MB`:`${(f/(1024*1024*1024)).toFixed(2)} GB`}async function s(){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 f=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(!f.ok)throw new Error(`${f.status} ${f.statusText}`);const h=await f.json();r.value=h.entries??[]}catch(f){a.value=f instanceof Error?f.message:i("viewer.archive.error","Could not read archive contents.")}finally{n.value=!1}}l.onMounted(s),l.watch(()=>t.filePath,s);const c=l.computed(()=>r.value.reduce((f,h)=>f+(h.size||0),0)),u=l.computed(()=>r.value.filter(f=>!f.is_dir).length);return(f,h)=>(l.openBlock(),l.createElementBlock("div",ig,[a.value?(l.openBlock(),l.createElementBlock("div",og,[h[0]||(h[0]=l.createElementVNode("span",{class:"filex-viewer-fallback__icon"},"🗜️",-1)),l.createElementVNode("p",null,l.toDisplayString(a.value),1)])):n.value?(l.openBlock(),l.createElementBlock("div",lg,[h[1]||(h[1]=l.createElementVNode("span",{class:"filex-viewer-fallback__icon"},"⏳",-1)),l.createElementVNode("p",null,l.toDisplayString(i("viewer.loading","Loading…")),1)])):r.value.length===0?(l.openBlock(),l.createElementBlock("div",sg,[h[2]||(h[2]=l.createElementVNode("span",{class:"filex-viewer-fallback__icon"},"🗜️",-1)),l.createElementVNode("p",null,l.toDisplayString(i("viewer.archive.empty","Archive is empty.")),1)])):(l.openBlock(),l.createElementBlock("div",cg,[l.createElementVNode("div",ug,l.toDisplayString(u.value)+" "+l.toDisplayString(i("viewer.archive.entries","{n} files").replace("{n}",String(u.value)))+" · "+l.toDisplayString(o(c.value)),1),l.createElementVNode("table",fg,[l.createElementVNode("thead",null,[l.createElementVNode("tr",null,[l.createElementVNode("th",null,l.toDisplayString(i("viewer.name","Name")),1),l.createElementVNode("th",dg,l.toDisplayString(i("viewer.size","Size")),1)])]),l.createElementVNode("tbody",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r.value,(d,p)=>(l.openBlock(),l.createElementBlock("tr",{key:p,"data-dir":d.is_dir?"1":"0"},[l.createElementVNode("td",null,[l.createElementVNode("span",pg,l.toDisplayString(d.is_dir?"📁":"📄"),1),l.createTextVNode(" "+l.toDisplayString(d.name),1)]),l.createElementVNode("td",mg,l.toDisplayString(d.is_dir?"":o(d.size)),1)],8,hg))),128))])])]))]))}}),[["__scopeId","data-v-6b42eacd"]])},Symbol.toStringTag,{value:"Module"}));class Me extends Error{constructor(t,r){var n="KaTeX parse error: "+t,a,i,o=r&&r.loc;if(o&&o.start<=o.end){var s=o.lexer.input;a=o.start,i=o.end,a===s.length?n+=" at end of input: ":n+=" at position "+(a+1)+": ";var c=s.slice(a,i).replace(/[^]/g,"$&̲"),u;a>15?u="…"+s.slice(a-15,a):u=s.slice(0,a);var f;i+15<s.length?f=s.slice(i,i+15)+"…":f=s.slice(i),n+=u+c+f}super(n),this.name="ParseError",Object.setPrototypeOf(this,Me.prototype),this.position=a,a!=null&&i!=null&&(this.length=i-a),this.rawMessage=t}}var gg=/([A-Z])/g,Oo=e=>e.replace(gg,"-$1").toLowerCase(),yg={"&":"&",">":">","<":"<",'"':""","'":"'"},bg=/[&><"']/g,ur=e=>String(e).replace(bg,t=>yg[t]),r0=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?r0(e.body[0]):e:e.type==="font"?r0(e.body):e,wg=new Set(["mathord","textord","atom"]),bn=e=>wg.has(r0(e).type),_g=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"},n0={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 xg(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 Lo{constructor(t){t===void 0&&(t={}),t=t||{};for(var r of Object.keys(n0)){var n=n0[r],a=t[r];this[r]=a!==void 0?n.processor?n.processor(a):a:xg(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 Me("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=_g(t.url);if(r==null)return!1;t.protocol=r}var n=typeof this.trust=="function"?this.trust(t):this.trust;return!!n}}class On{constructor(t,r,n){this.id=t,this.size=r,this.cramped=n}sup(){return ln[kg[this.id]]}sub(){return ln[Sg[this.id]]}fracNum(){return ln[Eg[this.id]]}fracDen(){return ln[Cg[this.id]]}cramp(){return ln[Dg[this.id]]}text(){return ln[Ag[this.id]]}isTight(){return this.size>=2}}var Po=0,a0=1,_a=2,wn=3,ui=4,Vr=5,xa=6,pr=7,ln=[new On(Po,0,!1),new On(a0,0,!0),new On(_a,1,!1),new On(wn,1,!0),new On(ui,2,!1),new On(Vr,2,!0),new On(xa,3,!1),new On(pr,3,!0)],kg=[ui,Vr,ui,Vr,xa,pr,xa,pr],Sg=[Vr,Vr,Vr,Vr,pr,pr,pr,pr],Eg=[_a,wn,ui,Vr,xa,pr,xa,pr],Cg=[wn,wn,Vr,Vr,pr,pr,pr,pr],Dg=[a0,a0,wn,wn,Vr,Vr,pr,pr],Ag=[Po,a0,_a,wn,_a,wn,_a,wn],lt={DISPLAY:ln[Po],TEXT:ln[_a],SCRIPT:ln[ui],SCRIPTSCRIPT:ln[xa]},Ro=[{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 Bg(e){for(var t=0;t<Ro.length;t++)for(var r=Ro[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 i0=[];Ro.forEach(e=>e.blocks.forEach(t=>i0.push(...t)));function kc(e){for(var t=0;t<i0.length;t+=2)if(e>=i0[t]&&e<=i0[t+1])return!0;return!1}var Qt=e=>e+" "+e,ka=80,Tg=function(t,r){return"M95,"+(622+t+r)+`
|
|
5
|
+
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
|
6
|
+
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
|
|
7
|
+
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
|
|
8
|
+
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
|
|
9
|
+
c69,-144,104.5,-217.7,106.5,-221
|
|
10
|
+
l`+t/2.075+" -"+t+`
|
|
11
|
+
c5.3,-9.3,12,-14,20,-14
|
|
12
|
+
H400000v`+(40+t)+`H845.2724
|
|
13
|
+
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
|
|
14
|
+
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
|
|
15
|
+
M`+(834+t)+" "+r+"h400000v"+(40+t)+"h-400000z"},Mg=function(t,r){return"M263,"+(601+t+r)+`c0.7,0,18,39.7,52,119
|
|
16
|
+
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
|
|
17
|
+
c340,-704.7,510.7,-1060.3,512,-1067
|
|
18
|
+
l`+t/2.084+" -"+t+`
|
|
19
|
+
c4.7,-7.3,11,-11,19,-11
|
|
20
|
+
H40000v`+(40+t)+`H1012.3
|
|
21
|
+
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
|
|
22
|
+
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
|
|
23
|
+
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
|
|
24
|
+
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
|
|
25
|
+
M`+(1001+t)+" "+r+"h400000v"+(40+t)+"h-400000z"},Ig=function(t,r){return"M983 "+(10+t+r)+`
|
|
26
|
+
l`+t/3.13+" -"+t+`
|
|
27
|
+
c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+`
|
|
28
|
+
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
|
|
29
|
+
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
|
|
30
|
+
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
|
|
31
|
+
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
|
|
32
|
+
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
|
|
33
|
+
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
|
|
34
|
+
M`+(1001+t)+" "+r+"h400000v"+(40+t)+"h-400000z"},zg=function(t,r){return"M424,"+(2398+t+r)+`
|
|
35
|
+
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
|
|
36
|
+
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
|
|
37
|
+
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
|
|
38
|
+
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
|
|
39
|
+
l`+t/4.223+" -"+t+`c4,-6.7,10,-10,18,-10 H400000
|
|
40
|
+
v`+(40+t)+`H1014.6
|
|
41
|
+
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
|
|
42
|
+
c-2,6,-10,9,-24,9
|
|
43
|
+
c-8,0,-12,-0.7,-12,-2z M`+(1001+t)+" "+r+`
|
|
44
|
+
h400000v`+(40+t)+"h-400000z"},Fg=function(t,r){return"M473,"+(2713+t+r)+`
|
|
45
|
+
c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+`
|
|
46
|
+
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7
|
|
47
|
+
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
|
|
48
|
+
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
|
|
49
|
+
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
|
|
50
|
+
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
|
|
51
|
+
606zM`+(1001+t)+" "+r+"h400000v"+(40+t)+"H1017.7z"},Ng=function(t){var r=t/2;return"M400000 "+t+" H0 L"+r+" 0 l65 45 L145 "+(t-80)+" H400000z"},Og=function(t,r,n){var a=n-54-r-t;return"M702 "+(t+r)+"H400000"+(40+t)+`
|
|
52
|
+
H742v`+a+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
|
|
53
|
+
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
|
|
54
|
+
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
|
|
55
|
+
219 661 l218 661zM702 `+r+"H400000v"+(40+t)+"H742z"},Lg=function(t,r,n){r=1e3*r;var a="";switch(t){case"sqrtMain":a=Tg(r,ka);break;case"sqrtSize1":a=Mg(r,ka);break;case"sqrtSize2":a=Ig(r,ka);break;case"sqrtSize3":a=zg(r,ka);break;case"sqrtSize4":a=Fg(r,ka);break;case"sqrtTall":a=Og(r,ka,n)}return a},Pg=function(t,r){switch(t){case"⎜":return Qt("M291 0 H417 V"+r+" H291z");case"∣":return Qt("M145 0 H188 V"+r+" H145z");case"∥":return Qt("M145 0 H188 V"+r+" H145z")+Qt("M367 0 H410 V"+r+" H367z");case"⎟":return Qt("M457 0 H583 V"+r+" H457z");case"⎢":return Qt("M319 0 H403 V"+r+" H319z");case"⎥":return Qt("M263 0 H347 V"+r+" H263z");case"⎪":return Qt("M384 0 H504 V"+r+" H384z");case"⏐":return Qt("M312 0 H355 V"+r+" H312z");case"‖":return Qt("M257 0 H300 V"+r+" H257z")+Qt("M478 0 H521 V"+r+" H478z");default:return""}},Sc={doubleleftarrow:`M262 157
|
|
56
|
+
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
|
|
57
|
+
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
|
|
58
|
+
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
|
|
59
|
+
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
|
|
60
|
+
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
|
|
61
|
+
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
|
|
62
|
+
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
|
|
63
|
+
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
|
|
64
|
+
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
|
|
65
|
+
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
|
|
66
|
+
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
|
|
67
|
+
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
|
|
68
|
+
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
|
|
69
|
+
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
|
|
70
|
+
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
|
|
71
|
+
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
|
|
72
|
+
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
|
|
73
|
+
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
|
|
74
|
+
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
|
|
75
|
+
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
|
|
76
|
+
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
|
|
77
|
+
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
|
|
78
|
+
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
|
|
79
|
+
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
|
|
80
|
+
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
|
|
81
|
+
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
|
|
82
|
+
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
|
|
83
|
+
435 0h399565z`,leftgroupunder:`M400000 262
|
|
84
|
+
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
|
|
85
|
+
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
|
|
86
|
+
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
|
|
87
|
+
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
|
|
88
|
+
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
|
|
89
|
+
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
|
|
90
|
+
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
|
|
91
|
+
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
|
|
92
|
+
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
|
|
93
|
+
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
|
|
94
|
+
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
|
|
95
|
+
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
|
|
96
|
+
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
|
|
97
|
+
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
|
|
98
|
+
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
|
|
99
|
+
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
|
|
100
|
+
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
|
|
101
|
+
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:Qt("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:Qt("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:Qt("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:Qt("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
|
|
102
|
+
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
|
|
103
|
+
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
|
|
104
|
+
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:Qt("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:`M200428 334
|
|
105
|
+
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
|
|
106
|
+
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
|
|
107
|
+
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
|
|
108
|
+
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
|
|
109
|
+
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
|
|
110
|
+
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
|
|
111
|
+
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
|
|
112
|
+
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
|
|
113
|
+
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
|
|
114
|
+
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
|
|
115
|
+
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
|
|
116
|
+
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
|
|
117
|
+
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
|
|
118
|
+
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
|
|
119
|
+
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
|
|
120
|
+
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
|
|
121
|
+
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
|
|
122
|
+
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
|
|
123
|
+
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
|
|
124
|
+
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
|
|
125
|
+
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
|
|
126
|
+
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
|
|
127
|
+
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
|
|
128
|
+
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
129
|
+
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
130
|
+
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
|
|
131
|
+
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
|
|
132
|
+
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
|
|
133
|
+
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
|
|
134
|
+
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
|
|
135
|
+
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
|
|
136
|
+
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
|
|
137
|
+
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
|
|
138
|
+
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
|
|
139
|
+
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
|
|
140
|
+
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
|
|
141
|
+
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
|
|
142
|
+
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
|
|
143
|
+
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
|
|
144
|
+
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
|
|
145
|
+
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
|
|
146
|
+
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
|
|
147
|
+
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
|
|
148
|
+
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
|
|
149
|
+
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
|
|
150
|
+
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
|
|
151
|
+
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
|
|
152
|
+
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
|
|
153
|
+
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:Qt("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:Qt("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:Qt("M399995 440 h-120 V150 H0 v-120 H399995z"),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
|
|
154
|
+
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
|
|
155
|
+
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
|
|
156
|
+
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
|
|
157
|
+
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
|
|
158
|
+
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
|
|
159
|
+
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
|
|
160
|
+
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
|
|
161
|
+
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
|
|
162
|
+
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
|
|
163
|
+
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
|
|
164
|
+
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
|
|
165
|
+
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
|
|
166
|
+
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
|
|
167
|
+
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
|
|
168
|
+
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
|
|
169
|
+
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
|
|
170
|
+
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
|
|
171
|
+
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
|
|
172
|
+
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
|
|
173
|
+
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
|
|
174
|
+
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
|
|
175
|
+
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
|
|
176
|
+
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
|
|
177
|
+
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
|
|
178
|
+
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
|
|
179
|
+
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
|
|
180
|
+
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
|
|
181
|
+
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
|
|
182
|
+
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
|
|
183
|
+
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
|
|
184
|
+
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
|
|
185
|
+
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
|
|
186
|
+
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
|
|
187
|
+
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
|
|
188
|
+
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
|
|
189
|
+
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
190
|
+
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
191
|
+
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
192
|
+
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
|
|
193
|
+
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
194
|
+
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
195
|
+
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
196
|
+
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
|
|
197
|
+
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
|
|
198
|
+
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
|
|
199
|
+
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
|
|
200
|
+
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
|
|
201
|
+
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
|
|
202
|
+
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
|
|
203
|
+
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
|
|
204
|
+
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
|
|
205
|
+
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
|
|
206
|
+
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
|
|
207
|
+
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
208
|
+
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
209
|
+
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
210
|
+
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
|
|
211
|
+
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
|
|
212
|
+
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
|
|
213
|
+
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
|
|
214
|
+
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
|
|
215
|
+
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
216
|
+
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
217
|
+
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
218
|
+
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
219
|
+
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
|
|
220
|
+
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
|
|
221
|
+
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
|
|
222
|
+
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
|
|
223
|
+
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
224
|
+
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
225
|
+
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
226
|
+
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Rg=function(t,r){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v1759 h347 v-84
|
|
227
|
+
H403z M403 1759 V0 H319 V1759 v`+r+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v1759 H0 v84 H347z
|
|
228
|
+
M347 1759 V0 H263 V1759 v`+r+" v1759 h84z";case"vert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15
|
|
229
|
+
c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
230
|
+
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+" v585 h43z";case"doublevert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15
|
|
231
|
+
c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
232
|
+
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+` v585 h43z
|
|
233
|
+
M367 15 v585 v`+r+` v585 c2.667,10,9.667,15,21,15
|
|
234
|
+
c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
235
|
+
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+r+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+r+` v1715 h263 v84 H319z
|
|
236
|
+
MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+r+` v1799 H0 v-84 H319z
|
|
237
|
+
MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v602 h84z
|
|
238
|
+
M403 1759 V0 H319 V1759 v`+r+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v602 h84z
|
|
239
|
+
M347 1759 V0 h-84 V1759 v`+r+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
|
|
240
|
+
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
|
|
241
|
+
-36,557 l0,`+(r+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
|
|
242
|
+
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
|
|
243
|
+
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
|
|
244
|
+
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
|
|
245
|
+
l0,-`+(r+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
|
|
246
|
+
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
|
|
247
|
+
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
|
|
248
|
+
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(r+9)+`
|
|
249
|
+
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
|
|
250
|
+
c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
|
|
251
|
+
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
|
|
252
|
+
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
|
|
253
|
+
l0,-`+(r+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
|
|
254
|
+
-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 Sa{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 Vo={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},Vg={ex:!0,em:!0,mu:!0},Ec=function(t){return typeof t!="string"&&(t=t.unit),t in Vo||t in Vg||t==="ex"},$t=function(t,r){var n;if(t.unit in Vo)n=Vo[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 Me("Invalid unit: '"+t.unit+"'");a!==r&&(n*=a.sizeMultiplier/r.sizeMultiplier)}return Math.min(t.number*n,r.maxSize)},Ne=function(t){return+t.toFixed(4)+"em"},Ln=function(t){return t.filter(r=>r).join(" ")},Cc=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)}},Dc=function(t){var r=document.createElement(t);r.className=Ln(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},$g=/[\s"'>/=\x00-\x1f]/,Ac=function(t){var r="<"+t;this.classes.length&&(r+=' class="'+ur(Ln(this.classes))+'"');var n="";for(var a of Object.keys(this.style))n+=Oo(a)+":"+this.style[a]+";";n&&(r+=' style="'+ur(n)+'"');for(var i of Object.keys(this.attributes)){if($g.test(i))throw new Me("Invalid attribute name '"+i+"'");r+=" "+i+'="'+ur(this.attributes[i])+'"'}r+=">";for(var o=0;o<this.children.length;o++)r+=this.children[o].toMarkup();return r+="</"+t+">",r};class Ea{constructor(t,r,n,a){Cc.call(this,t,n,a),this.children=r||[]}setAttribute(t,r){this.attributes[t]=r}hasClass(t){return this.classes.includes(t)}toNode(){return Dc.call(this,"span")}toMarkup(){return Ac.call(this,"span")}}class o0{constructor(t,r,n,a){Cc.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 Dc.call(this,"a")}toMarkup(){return Ac.call(this,"a")}}class Ug{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="'+ur(this.src)+'"'+(' alt="'+ur(this.alt)+'"'),r="";for(var n of Object.keys(this.style))r+=Oo(n)+":"+this.style[n]+";";return r&&(t+=' style="'+ur(r)+'"'),t+="'/>",t}}var Hg={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class Cr{constructor(t,r,n,a,i,o,s,c){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=s||[],this.style=c||{},this.maxFontSize=0;var u=Bg(this.text.charCodeAt(0));u&&this.classes.push(u+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=Hg[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=Ne(this.italic)),this.classes.length>0&&(r=r||document.createElement("span"),r.className=Ln(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+=ur(Ln(this.classes)),r+='"');var n="";this.italic>0&&(n+="margin-right:"+Ne(this.italic)+";");for(var a of Object.keys(this.style))n+=Oo(a)+":"+this.style[a]+";";n&&(t=!0,r+=' style="'+ur(n)+'"');var i=ur(this.text);return t?(r+=">",r+=i,r+="</span>",r):i}}class _n{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+'="'+ur(this.attributes[r])+'"';t+=">";for(var n=0;n<this.children.length;n++)t+=this.children[n].toMarkup();return t+="</svg>",t}}class Pn{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",Sc[this.pathName]),r}toMarkup(){return this.alternate?'<path d="'+ur(this.alternate)+'"/>':'<path d="'+ur(Sc[this.pathName])+'"/>'}}class $o{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+'="'+ur(this.attributes[r])+'"';return t+="/>",t}}function Gg(e){if(e instanceof Cr)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}function jg(e){if(e instanceof Ea)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}var qg=e=>e instanceof Ea||e instanceof o0||e instanceof Sa,sn={"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]}},l0={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]},Bc={Å:"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 Tc(e,t){sn[e]=t}function Uo(e,t,r){if(!sn[t])throw new Error("Font metrics not found for font: "+t+".");var n=e.charCodeAt(0),a=sn[t][n];if(!a&&e[0]in Bc&&(n=Bc[e[0]].charCodeAt(0),a=sn[t][n]),!a&&r==="text"&&kc(n)&&(a=sn[t][77]),a)return{depth:a[0],height:a[1],italic:a[2],skew:a[3],width:a[4]}}var Ho={};function Wg(e){var t;if(e>=5?t=0:e>=3?t=1:t=2,!Ho[t]){var r=Ho[t]={cssEmPerMu:l0.quad[t]/18};for(var n in l0)l0.hasOwnProperty(n)&&(r[n]=l0[n][t])}return Ho[t]}var Xg={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Zg={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Pt={math:{},text:{}};function x(e,t,r,n,a,i){Pt[e][a]={font:t,group:r,replace:n},i&&n&&(Pt[e][n]=Pt[e][a])}var D="math",De="text",z="main",G="ams",Rt="accent-token",We="bin",mr="close",Ca="inner",nt="mathord",Wt="op-token",Dr="open",fi="punct",q="rel",xn="spacing",ee="textord";x(D,z,q,"≡","\\equiv",!0),x(D,z,q,"≺","\\prec",!0),x(D,z,q,"≻","\\succ",!0),x(D,z,q,"∼","\\sim",!0),x(D,z,q,"⊥","\\perp"),x(D,z,q,"⪯","\\preceq",!0),x(D,z,q,"⪰","\\succeq",!0),x(D,z,q,"≃","\\simeq",!0),x(D,z,q,"∣","\\mid",!0),x(D,z,q,"≪","\\ll",!0),x(D,z,q,"≫","\\gg",!0),x(D,z,q,"≍","\\asymp",!0),x(D,z,q,"∥","\\parallel"),x(D,z,q,"⋈","\\bowtie",!0),x(D,z,q,"⌣","\\smile",!0),x(D,z,q,"⊑","\\sqsubseteq",!0),x(D,z,q,"⊒","\\sqsupseteq",!0),x(D,z,q,"≐","\\doteq",!0),x(D,z,q,"⌢","\\frown",!0),x(D,z,q,"∋","\\ni",!0),x(D,z,q,"∝","\\propto",!0),x(D,z,q,"⊢","\\vdash",!0),x(D,z,q,"⊣","\\dashv",!0),x(D,z,q,"∋","\\owns"),x(D,z,fi,".","\\ldotp"),x(D,z,fi,"⋅","\\cdotp"),x(D,z,fi,"⋅","·"),x(De,z,ee,"⋅","·"),x(D,z,ee,"#","\\#"),x(De,z,ee,"#","\\#"),x(D,z,ee,"&","\\&"),x(De,z,ee,"&","\\&"),x(D,z,ee,"ℵ","\\aleph",!0),x(D,z,ee,"∀","\\forall",!0),x(D,z,ee,"ℏ","\\hbar",!0),x(D,z,ee,"∃","\\exists",!0),x(D,z,ee,"∇","\\nabla",!0),x(D,z,ee,"♭","\\flat",!0),x(D,z,ee,"ℓ","\\ell",!0),x(D,z,ee,"♮","\\natural",!0),x(D,z,ee,"♣","\\clubsuit",!0),x(D,z,ee,"℘","\\wp",!0),x(D,z,ee,"♯","\\sharp",!0),x(D,z,ee,"♢","\\diamondsuit",!0),x(D,z,ee,"ℜ","\\Re",!0),x(D,z,ee,"♡","\\heartsuit",!0),x(D,z,ee,"ℑ","\\Im",!0),x(D,z,ee,"♠","\\spadesuit",!0),x(D,z,ee,"§","\\S",!0),x(De,z,ee,"§","\\S"),x(D,z,ee,"¶","\\P",!0),x(De,z,ee,"¶","\\P"),x(D,z,ee,"†","\\dag"),x(De,z,ee,"†","\\dag"),x(De,z,ee,"†","\\textdagger"),x(D,z,ee,"‡","\\ddag"),x(De,z,ee,"‡","\\ddag"),x(De,z,ee,"‡","\\textdaggerdbl"),x(D,z,mr,"⎱","\\rmoustache",!0),x(D,z,Dr,"⎰","\\lmoustache",!0),x(D,z,mr,"⟯","\\rgroup",!0),x(D,z,Dr,"⟮","\\lgroup",!0),x(D,z,We,"∓","\\mp",!0),x(D,z,We,"⊖","\\ominus",!0),x(D,z,We,"⊎","\\uplus",!0),x(D,z,We,"⊓","\\sqcap",!0),x(D,z,We,"∗","\\ast"),x(D,z,We,"⊔","\\sqcup",!0),x(D,z,We,"◯","\\bigcirc",!0),x(D,z,We,"∙","\\bullet",!0),x(D,z,We,"‡","\\ddagger"),x(D,z,We,"≀","\\wr",!0),x(D,z,We,"⨿","\\amalg"),x(D,z,We,"&","\\And"),x(D,z,q,"⟵","\\longleftarrow",!0),x(D,z,q,"⇐","\\Leftarrow",!0),x(D,z,q,"⟸","\\Longleftarrow",!0),x(D,z,q,"⟶","\\longrightarrow",!0),x(D,z,q,"⇒","\\Rightarrow",!0),x(D,z,q,"⟹","\\Longrightarrow",!0),x(D,z,q,"↔","\\leftrightarrow",!0),x(D,z,q,"⟷","\\longleftrightarrow",!0),x(D,z,q,"⇔","\\Leftrightarrow",!0),x(D,z,q,"⟺","\\Longleftrightarrow",!0),x(D,z,q,"↦","\\mapsto",!0),x(D,z,q,"⟼","\\longmapsto",!0),x(D,z,q,"↗","\\nearrow",!0),x(D,z,q,"↩","\\hookleftarrow",!0),x(D,z,q,"↪","\\hookrightarrow",!0),x(D,z,q,"↘","\\searrow",!0),x(D,z,q,"↼","\\leftharpoonup",!0),x(D,z,q,"⇀","\\rightharpoonup",!0),x(D,z,q,"↙","\\swarrow",!0),x(D,z,q,"↽","\\leftharpoondown",!0),x(D,z,q,"⇁","\\rightharpoondown",!0),x(D,z,q,"↖","\\nwarrow",!0),x(D,z,q,"⇌","\\rightleftharpoons",!0),x(D,G,q,"≮","\\nless",!0),x(D,G,q,"","\\@nleqslant"),x(D,G,q,"","\\@nleqq"),x(D,G,q,"⪇","\\lneq",!0),x(D,G,q,"≨","\\lneqq",!0),x(D,G,q,"","\\@lvertneqq"),x(D,G,q,"⋦","\\lnsim",!0),x(D,G,q,"⪉","\\lnapprox",!0),x(D,G,q,"⊀","\\nprec",!0),x(D,G,q,"⋠","\\npreceq",!0),x(D,G,q,"⋨","\\precnsim",!0),x(D,G,q,"⪹","\\precnapprox",!0),x(D,G,q,"≁","\\nsim",!0),x(D,G,q,"","\\@nshortmid"),x(D,G,q,"∤","\\nmid",!0),x(D,G,q,"⊬","\\nvdash",!0),x(D,G,q,"⊭","\\nvDash",!0),x(D,G,q,"⋪","\\ntriangleleft"),x(D,G,q,"⋬","\\ntrianglelefteq",!0),x(D,G,q,"⊊","\\subsetneq",!0),x(D,G,q,"","\\@varsubsetneq"),x(D,G,q,"⫋","\\subsetneqq",!0),x(D,G,q,"","\\@varsubsetneqq"),x(D,G,q,"≯","\\ngtr",!0),x(D,G,q,"","\\@ngeqslant"),x(D,G,q,"","\\@ngeqq"),x(D,G,q,"⪈","\\gneq",!0),x(D,G,q,"≩","\\gneqq",!0),x(D,G,q,"","\\@gvertneqq"),x(D,G,q,"⋧","\\gnsim",!0),x(D,G,q,"⪊","\\gnapprox",!0),x(D,G,q,"⊁","\\nsucc",!0),x(D,G,q,"⋡","\\nsucceq",!0),x(D,G,q,"⋩","\\succnsim",!0),x(D,G,q,"⪺","\\succnapprox",!0),x(D,G,q,"≆","\\ncong",!0),x(D,G,q,"","\\@nshortparallel"),x(D,G,q,"∦","\\nparallel",!0),x(D,G,q,"⊯","\\nVDash",!0),x(D,G,q,"⋫","\\ntriangleright"),x(D,G,q,"⋭","\\ntrianglerighteq",!0),x(D,G,q,"","\\@nsupseteqq"),x(D,G,q,"⊋","\\supsetneq",!0),x(D,G,q,"","\\@varsupsetneq"),x(D,G,q,"⫌","\\supsetneqq",!0),x(D,G,q,"","\\@varsupsetneqq"),x(D,G,q,"⊮","\\nVdash",!0),x(D,G,q,"⪵","\\precneqq",!0),x(D,G,q,"⪶","\\succneqq",!0),x(D,G,q,"","\\@nsubseteqq"),x(D,G,We,"⊴","\\unlhd"),x(D,G,We,"⊵","\\unrhd"),x(D,G,q,"↚","\\nleftarrow",!0),x(D,G,q,"↛","\\nrightarrow",!0),x(D,G,q,"⇍","\\nLeftarrow",!0),x(D,G,q,"⇏","\\nRightarrow",!0),x(D,G,q,"↮","\\nleftrightarrow",!0),x(D,G,q,"⇎","\\nLeftrightarrow",!0),x(D,G,q,"△","\\vartriangle"),x(D,G,ee,"ℏ","\\hslash"),x(D,G,ee,"▽","\\triangledown"),x(D,G,ee,"◊","\\lozenge"),x(D,G,ee,"Ⓢ","\\circledS"),x(D,G,ee,"®","\\circledR"),x(De,G,ee,"®","\\circledR"),x(D,G,ee,"∡","\\measuredangle",!0),x(D,G,ee,"∄","\\nexists"),x(D,G,ee,"℧","\\mho"),x(D,G,ee,"Ⅎ","\\Finv",!0),x(D,G,ee,"⅁","\\Game",!0),x(D,G,ee,"‵","\\backprime"),x(D,G,ee,"▲","\\blacktriangle"),x(D,G,ee,"▼","\\blacktriangledown"),x(D,G,ee,"■","\\blacksquare"),x(D,G,ee,"⧫","\\blacklozenge"),x(D,G,ee,"★","\\bigstar"),x(D,G,ee,"∢","\\sphericalangle",!0),x(D,G,ee,"∁","\\complement",!0),x(D,G,ee,"ð","\\eth",!0),x(De,z,ee,"ð","ð"),x(D,G,ee,"╱","\\diagup"),x(D,G,ee,"╲","\\diagdown"),x(D,G,ee,"□","\\square"),x(D,G,ee,"□","\\Box"),x(D,G,ee,"◊","\\Diamond"),x(D,G,ee,"¥","\\yen",!0),x(De,G,ee,"¥","\\yen",!0),x(D,G,ee,"✓","\\checkmark",!0),x(De,G,ee,"✓","\\checkmark"),x(D,G,ee,"ℶ","\\beth",!0),x(D,G,ee,"ℸ","\\daleth",!0),x(D,G,ee,"ℷ","\\gimel",!0),x(D,G,ee,"ϝ","\\digamma",!0),x(D,G,ee,"ϰ","\\varkappa"),x(D,G,Dr,"┌","\\@ulcorner",!0),x(D,G,mr,"┐","\\@urcorner",!0),x(D,G,Dr,"└","\\@llcorner",!0),x(D,G,mr,"┘","\\@lrcorner",!0),x(D,G,q,"≦","\\leqq",!0),x(D,G,q,"⩽","\\leqslant",!0),x(D,G,q,"⪕","\\eqslantless",!0),x(D,G,q,"≲","\\lesssim",!0),x(D,G,q,"⪅","\\lessapprox",!0),x(D,G,q,"≊","\\approxeq",!0),x(D,G,We,"⋖","\\lessdot"),x(D,G,q,"⋘","\\lll",!0),x(D,G,q,"≶","\\lessgtr",!0),x(D,G,q,"⋚","\\lesseqgtr",!0),x(D,G,q,"⪋","\\lesseqqgtr",!0),x(D,G,q,"≑","\\doteqdot"),x(D,G,q,"≓","\\risingdotseq",!0),x(D,G,q,"≒","\\fallingdotseq",!0),x(D,G,q,"∽","\\backsim",!0),x(D,G,q,"⋍","\\backsimeq",!0),x(D,G,q,"⫅","\\subseteqq",!0),x(D,G,q,"⋐","\\Subset",!0),x(D,G,q,"⊏","\\sqsubset",!0),x(D,G,q,"≼","\\preccurlyeq",!0),x(D,G,q,"⋞","\\curlyeqprec",!0),x(D,G,q,"≾","\\precsim",!0),x(D,G,q,"⪷","\\precapprox",!0),x(D,G,q,"⊲","\\vartriangleleft"),x(D,G,q,"⊴","\\trianglelefteq"),x(D,G,q,"⊨","\\vDash",!0),x(D,G,q,"⊪","\\Vvdash",!0),x(D,G,q,"⌣","\\smallsmile"),x(D,G,q,"⌢","\\smallfrown"),x(D,G,q,"≏","\\bumpeq",!0),x(D,G,q,"≎","\\Bumpeq",!0),x(D,G,q,"≧","\\geqq",!0),x(D,G,q,"⩾","\\geqslant",!0),x(D,G,q,"⪖","\\eqslantgtr",!0),x(D,G,q,"≳","\\gtrsim",!0),x(D,G,q,"⪆","\\gtrapprox",!0),x(D,G,We,"⋗","\\gtrdot"),x(D,G,q,"⋙","\\ggg",!0),x(D,G,q,"≷","\\gtrless",!0),x(D,G,q,"⋛","\\gtreqless",!0),x(D,G,q,"⪌","\\gtreqqless",!0),x(D,G,q,"≖","\\eqcirc",!0),x(D,G,q,"≗","\\circeq",!0),x(D,G,q,"≜","\\triangleq",!0),x(D,G,q,"∼","\\thicksim"),x(D,G,q,"≈","\\thickapprox"),x(D,G,q,"⫆","\\supseteqq",!0),x(D,G,q,"⋑","\\Supset",!0),x(D,G,q,"⊐","\\sqsupset",!0),x(D,G,q,"≽","\\succcurlyeq",!0),x(D,G,q,"⋟","\\curlyeqsucc",!0),x(D,G,q,"≿","\\succsim",!0),x(D,G,q,"⪸","\\succapprox",!0),x(D,G,q,"⊳","\\vartriangleright"),x(D,G,q,"⊵","\\trianglerighteq"),x(D,G,q,"⊩","\\Vdash",!0),x(D,G,q,"∣","\\shortmid"),x(D,G,q,"∥","\\shortparallel"),x(D,G,q,"≬","\\between",!0),x(D,G,q,"⋔","\\pitchfork",!0),x(D,G,q,"∝","\\varpropto"),x(D,G,q,"◀","\\blacktriangleleft"),x(D,G,q,"∴","\\therefore",!0),x(D,G,q,"∍","\\backepsilon"),x(D,G,q,"▶","\\blacktriangleright"),x(D,G,q,"∵","\\because",!0),x(D,G,q,"⋘","\\llless"),x(D,G,q,"⋙","\\gggtr"),x(D,G,We,"⊲","\\lhd"),x(D,G,We,"⊳","\\rhd"),x(D,G,q,"≂","\\eqsim",!0),x(D,z,q,"⋈","\\Join"),x(D,G,q,"≑","\\Doteq",!0),x(D,G,We,"∔","\\dotplus",!0),x(D,G,We,"∖","\\smallsetminus"),x(D,G,We,"⋒","\\Cap",!0),x(D,G,We,"⋓","\\Cup",!0),x(D,G,We,"⩞","\\doublebarwedge",!0),x(D,G,We,"⊟","\\boxminus",!0),x(D,G,We,"⊞","\\boxplus",!0),x(D,G,We,"⋇","\\divideontimes",!0),x(D,G,We,"⋉","\\ltimes",!0),x(D,G,We,"⋊","\\rtimes",!0),x(D,G,We,"⋋","\\leftthreetimes",!0),x(D,G,We,"⋌","\\rightthreetimes",!0),x(D,G,We,"⋏","\\curlywedge",!0),x(D,G,We,"⋎","\\curlyvee",!0),x(D,G,We,"⊝","\\circleddash",!0),x(D,G,We,"⊛","\\circledast",!0),x(D,G,We,"⋅","\\centerdot"),x(D,G,We,"⊺","\\intercal",!0),x(D,G,We,"⋒","\\doublecap"),x(D,G,We,"⋓","\\doublecup"),x(D,G,We,"⊠","\\boxtimes",!0),x(D,G,q,"⇢","\\dashrightarrow",!0),x(D,G,q,"⇠","\\dashleftarrow",!0),x(D,G,q,"⇇","\\leftleftarrows",!0),x(D,G,q,"⇆","\\leftrightarrows",!0),x(D,G,q,"⇚","\\Lleftarrow",!0),x(D,G,q,"↞","\\twoheadleftarrow",!0),x(D,G,q,"↢","\\leftarrowtail",!0),x(D,G,q,"↫","\\looparrowleft",!0),x(D,G,q,"⇋","\\leftrightharpoons",!0),x(D,G,q,"↶","\\curvearrowleft",!0),x(D,G,q,"↺","\\circlearrowleft",!0),x(D,G,q,"↰","\\Lsh",!0),x(D,G,q,"⇈","\\upuparrows",!0),x(D,G,q,"↿","\\upharpoonleft",!0),x(D,G,q,"⇃","\\downharpoonleft",!0),x(D,z,q,"⊶","\\origof",!0),x(D,z,q,"⊷","\\imageof",!0),x(D,G,q,"⊸","\\multimap",!0),x(D,G,q,"↭","\\leftrightsquigarrow",!0),x(D,G,q,"⇉","\\rightrightarrows",!0),x(D,G,q,"⇄","\\rightleftarrows",!0),x(D,G,q,"↠","\\twoheadrightarrow",!0),x(D,G,q,"↣","\\rightarrowtail",!0),x(D,G,q,"↬","\\looparrowright",!0),x(D,G,q,"↷","\\curvearrowright",!0),x(D,G,q,"↻","\\circlearrowright",!0),x(D,G,q,"↱","\\Rsh",!0),x(D,G,q,"⇊","\\downdownarrows",!0),x(D,G,q,"↾","\\upharpoonright",!0),x(D,G,q,"⇂","\\downharpoonright",!0),x(D,G,q,"⇝","\\rightsquigarrow",!0),x(D,G,q,"⇝","\\leadsto"),x(D,G,q,"⇛","\\Rrightarrow",!0),x(D,G,q,"↾","\\restriction"),x(D,z,ee,"‘","`"),x(D,z,ee,"$","\\$"),x(De,z,ee,"$","\\$"),x(De,z,ee,"$","\\textdollar"),x(D,z,ee,"%","\\%"),x(De,z,ee,"%","\\%"),x(D,z,ee,"_","\\_"),x(De,z,ee,"_","\\_"),x(De,z,ee,"_","\\textunderscore"),x(D,z,ee,"∠","\\angle",!0),x(D,z,ee,"∞","\\infty",!0),x(D,z,ee,"′","\\prime"),x(D,z,ee,"△","\\triangle"),x(D,z,ee,"Γ","\\Gamma",!0),x(D,z,ee,"Δ","\\Delta",!0),x(D,z,ee,"Θ","\\Theta",!0),x(D,z,ee,"Λ","\\Lambda",!0),x(D,z,ee,"Ξ","\\Xi",!0),x(D,z,ee,"Π","\\Pi",!0),x(D,z,ee,"Σ","\\Sigma",!0),x(D,z,ee,"Υ","\\Upsilon",!0),x(D,z,ee,"Φ","\\Phi",!0),x(D,z,ee,"Ψ","\\Psi",!0),x(D,z,ee,"Ω","\\Omega",!0),x(D,z,ee,"A","Α"),x(D,z,ee,"B","Β"),x(D,z,ee,"E","Ε"),x(D,z,ee,"Z","Ζ"),x(D,z,ee,"H","Η"),x(D,z,ee,"I","Ι"),x(D,z,ee,"K","Κ"),x(D,z,ee,"M","Μ"),x(D,z,ee,"N","Ν"),x(D,z,ee,"O","Ο"),x(D,z,ee,"P","Ρ"),x(D,z,ee,"T","Τ"),x(D,z,ee,"X","Χ"),x(D,z,ee,"¬","\\neg",!0),x(D,z,ee,"¬","\\lnot"),x(D,z,ee,"⊤","\\top"),x(D,z,ee,"⊥","\\bot"),x(D,z,ee,"∅","\\emptyset"),x(D,G,ee,"∅","\\varnothing"),x(D,z,nt,"α","\\alpha",!0),x(D,z,nt,"β","\\beta",!0),x(D,z,nt,"γ","\\gamma",!0),x(D,z,nt,"δ","\\delta",!0),x(D,z,nt,"ϵ","\\epsilon",!0),x(D,z,nt,"ζ","\\zeta",!0),x(D,z,nt,"η","\\eta",!0),x(D,z,nt,"θ","\\theta",!0),x(D,z,nt,"ι","\\iota",!0),x(D,z,nt,"κ","\\kappa",!0),x(D,z,nt,"λ","\\lambda",!0),x(D,z,nt,"μ","\\mu",!0),x(D,z,nt,"ν","\\nu",!0),x(D,z,nt,"ξ","\\xi",!0),x(D,z,nt,"ο","\\omicron",!0),x(D,z,nt,"π","\\pi",!0),x(D,z,nt,"ρ","\\rho",!0),x(D,z,nt,"σ","\\sigma",!0),x(D,z,nt,"τ","\\tau",!0),x(D,z,nt,"υ","\\upsilon",!0),x(D,z,nt,"ϕ","\\phi",!0),x(D,z,nt,"χ","\\chi",!0),x(D,z,nt,"ψ","\\psi",!0),x(D,z,nt,"ω","\\omega",!0),x(D,z,nt,"ε","\\varepsilon",!0),x(D,z,nt,"ϑ","\\vartheta",!0),x(D,z,nt,"ϖ","\\varpi",!0),x(D,z,nt,"ϱ","\\varrho",!0),x(D,z,nt,"ς","\\varsigma",!0),x(D,z,nt,"φ","\\varphi",!0),x(D,z,We,"∗","*",!0),x(D,z,We,"+","+"),x(D,z,We,"−","-",!0),x(D,z,We,"⋅","\\cdot",!0),x(D,z,We,"∘","\\circ",!0),x(D,z,We,"÷","\\div",!0),x(D,z,We,"±","\\pm",!0),x(D,z,We,"×","\\times",!0),x(D,z,We,"∩","\\cap",!0),x(D,z,We,"∪","\\cup",!0),x(D,z,We,"∖","\\setminus",!0),x(D,z,We,"∧","\\land"),x(D,z,We,"∨","\\lor"),x(D,z,We,"∧","\\wedge",!0),x(D,z,We,"∨","\\vee",!0),x(D,z,ee,"√","\\surd"),x(D,z,Dr,"⟨","\\langle",!0),x(D,z,Dr,"∣","\\lvert"),x(D,z,Dr,"∥","\\lVert"),x(D,z,mr,"?","?"),x(D,z,mr,"!","!"),x(D,z,mr,"⟩","\\rangle",!0),x(D,z,mr,"∣","\\rvert"),x(D,z,mr,"∥","\\rVert"),x(D,z,q,"=","="),x(D,z,q,":",":"),x(D,z,q,"≈","\\approx",!0),x(D,z,q,"≅","\\cong",!0),x(D,z,q,"≥","\\ge"),x(D,z,q,"≥","\\geq",!0),x(D,z,q,"←","\\gets"),x(D,z,q,">","\\gt",!0),x(D,z,q,"∈","\\in",!0),x(D,z,q,"","\\@not"),x(D,z,q,"⊂","\\subset",!0),x(D,z,q,"⊃","\\supset",!0),x(D,z,q,"⊆","\\subseteq",!0),x(D,z,q,"⊇","\\supseteq",!0),x(D,G,q,"⊈","\\nsubseteq",!0),x(D,G,q,"⊉","\\nsupseteq",!0),x(D,z,q,"⊨","\\models"),x(D,z,q,"←","\\leftarrow",!0),x(D,z,q,"≤","\\le"),x(D,z,q,"≤","\\leq",!0),x(D,z,q,"<","\\lt",!0),x(D,z,q,"→","\\rightarrow",!0),x(D,z,q,"→","\\to"),x(D,G,q,"≱","\\ngeq",!0),x(D,G,q,"≰","\\nleq",!0),x(D,z,xn," ","\\ "),x(D,z,xn," ","\\space"),x(D,z,xn," ","\\nobreakspace"),x(De,z,xn," ","\\ "),x(De,z,xn," "," "),x(De,z,xn," ","\\space"),x(De,z,xn," ","\\nobreakspace"),x(D,z,xn,null,"\\nobreak"),x(D,z,xn,null,"\\allowbreak"),x(D,z,fi,",",","),x(D,z,fi,";",";"),x(D,G,We,"⊼","\\barwedge",!0),x(D,G,We,"⊻","\\veebar",!0),x(D,z,We,"⊙","\\odot",!0),x(D,z,We,"⊕","\\oplus",!0),x(D,z,We,"⊗","\\otimes",!0),x(D,z,ee,"∂","\\partial",!0),x(D,z,We,"⊘","\\oslash",!0),x(D,G,We,"⊚","\\circledcirc",!0),x(D,G,We,"⊡","\\boxdot",!0),x(D,z,We,"△","\\bigtriangleup"),x(D,z,We,"▽","\\bigtriangledown"),x(D,z,We,"†","\\dagger"),x(D,z,We,"⋄","\\diamond"),x(D,z,We,"⋆","\\star"),x(D,z,We,"◃","\\triangleleft"),x(D,z,We,"▹","\\triangleright"),x(D,z,Dr,"{","\\{"),x(De,z,ee,"{","\\{"),x(De,z,ee,"{","\\textbraceleft"),x(D,z,mr,"}","\\}"),x(De,z,ee,"}","\\}"),x(De,z,ee,"}","\\textbraceright"),x(D,z,Dr,"{","\\lbrace"),x(D,z,mr,"}","\\rbrace"),x(D,z,Dr,"[","\\lbrack",!0),x(De,z,ee,"[","\\lbrack",!0),x(D,z,mr,"]","\\rbrack",!0),x(De,z,ee,"]","\\rbrack",!0),x(D,z,Dr,"(","\\lparen",!0),x(D,z,mr,")","\\rparen",!0),x(De,z,ee,"<","\\textless",!0),x(De,z,ee,">","\\textgreater",!0),x(D,z,Dr,"⌊","\\lfloor",!0),x(D,z,mr,"⌋","\\rfloor",!0),x(D,z,Dr,"⌈","\\lceil",!0),x(D,z,mr,"⌉","\\rceil",!0),x(D,z,ee,"\\","\\backslash"),x(D,z,ee,"∣","|"),x(D,z,ee,"∣","\\vert"),x(De,z,ee,"|","\\textbar",!0),x(D,z,ee,"∥","\\|"),x(D,z,ee,"∥","\\Vert"),x(De,z,ee,"∥","\\textbardbl"),x(De,z,ee,"~","\\textasciitilde"),x(De,z,ee,"\\","\\textbackslash"),x(De,z,ee,"^","\\textasciicircum"),x(D,z,q,"↑","\\uparrow",!0),x(D,z,q,"⇑","\\Uparrow",!0),x(D,z,q,"↓","\\downarrow",!0),x(D,z,q,"⇓","\\Downarrow",!0),x(D,z,q,"↕","\\updownarrow",!0),x(D,z,q,"⇕","\\Updownarrow",!0),x(D,z,Wt,"∐","\\coprod"),x(D,z,Wt,"⋁","\\bigvee"),x(D,z,Wt,"⋀","\\bigwedge"),x(D,z,Wt,"⨄","\\biguplus"),x(D,z,Wt,"⋂","\\bigcap"),x(D,z,Wt,"⋃","\\bigcup"),x(D,z,Wt,"∫","\\int"),x(D,z,Wt,"∫","\\intop"),x(D,z,Wt,"∬","\\iint"),x(D,z,Wt,"∭","\\iiint"),x(D,z,Wt,"∏","\\prod"),x(D,z,Wt,"∑","\\sum"),x(D,z,Wt,"⨂","\\bigotimes"),x(D,z,Wt,"⨁","\\bigoplus"),x(D,z,Wt,"⨀","\\bigodot"),x(D,z,Wt,"∮","\\oint"),x(D,z,Wt,"∯","\\oiint"),x(D,z,Wt,"∰","\\oiiint"),x(D,z,Wt,"⨆","\\bigsqcup"),x(D,z,Wt,"∫","\\smallint"),x(De,z,Ca,"…","\\textellipsis"),x(D,z,Ca,"…","\\mathellipsis"),x(De,z,Ca,"…","\\ldots",!0),x(D,z,Ca,"…","\\ldots",!0),x(D,z,Ca,"⋯","\\@cdots",!0),x(D,z,Ca,"⋱","\\ddots",!0),x(D,z,ee,"⋮","\\varvdots"),x(De,z,ee,"⋮","\\varvdots"),x(D,z,Rt,"ˊ","\\acute"),x(D,z,Rt,"ˋ","\\grave"),x(D,z,Rt,"¨","\\ddot"),x(D,z,Rt,"~","\\tilde"),x(D,z,Rt,"ˉ","\\bar"),x(D,z,Rt,"˘","\\breve"),x(D,z,Rt,"ˇ","\\check"),x(D,z,Rt,"^","\\hat"),x(D,z,Rt,"⃗","\\vec"),x(D,z,Rt,"˙","\\dot"),x(D,z,Rt,"˚","\\mathring"),x(D,z,nt,"","\\@imath"),x(D,z,nt,"","\\@jmath"),x(D,z,ee,"ı","ı"),x(D,z,ee,"ȷ","ȷ"),x(De,z,ee,"ı","\\i",!0),x(De,z,ee,"ȷ","\\j",!0),x(De,z,ee,"ß","\\ss",!0),x(De,z,ee,"æ","\\ae",!0),x(De,z,ee,"œ","\\oe",!0),x(De,z,ee,"ø","\\o",!0),x(De,z,ee,"Æ","\\AE",!0),x(De,z,ee,"Œ","\\OE",!0),x(De,z,ee,"Ø","\\O",!0),x(De,z,Rt,"ˊ","\\'"),x(De,z,Rt,"ˋ","\\`"),x(De,z,Rt,"ˆ","\\^"),x(De,z,Rt,"˜","\\~"),x(De,z,Rt,"ˉ","\\="),x(De,z,Rt,"˘","\\u"),x(De,z,Rt,"˙","\\."),x(De,z,Rt,"¸","\\c"),x(De,z,Rt,"˚","\\r"),x(De,z,Rt,"ˇ","\\v"),x(De,z,Rt,"¨",'\\"'),x(De,z,Rt,"˝","\\H"),x(De,z,Rt,"◯","\\textcircled");var Mc={"--":!0,"---":!0,"``":!0,"''":!0};x(De,z,ee,"–","--",!0),x(De,z,ee,"–","\\textendash"),x(De,z,ee,"—","---",!0),x(De,z,ee,"—","\\textemdash"),x(De,z,ee,"‘","`",!0),x(De,z,ee,"‘","\\textquoteleft"),x(De,z,ee,"’","'",!0),x(De,z,ee,"’","\\textquoteright"),x(De,z,ee,"“","``",!0),x(De,z,ee,"“","\\textquotedblleft"),x(De,z,ee,"”","''",!0),x(De,z,ee,"”","\\textquotedblright"),x(D,z,ee,"°","\\degree",!0),x(De,z,ee,"°","\\degree"),x(De,z,ee,"°","\\textdegree",!0),x(D,z,ee,"£","\\pounds"),x(D,z,ee,"£","\\mathsterling",!0),x(De,z,ee,"£","\\pounds"),x(De,z,ee,"£","\\textsterling",!0),x(D,G,ee,"✠","\\maltese"),x(De,G,ee,"✠","\\maltese");for(var Ic='0123456789/@."',Go=0;Go<Ic.length;Go++){var zc=Ic.charAt(Go);x(D,z,ee,zc,zc)}for(var Fc='0123456789!@*()-=+";:?/.,',jo=0;jo<Fc.length;jo++){var Nc=Fc.charAt(jo);x(De,z,ee,Nc,Nc)}for(var s0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",qo=0;qo<s0.length;qo++){var c0=s0.charAt(qo);x(D,z,nt,c0,c0),x(De,z,ee,c0,c0)}x(D,G,ee,"C","ℂ"),x(De,G,ee,"C","ℂ"),x(D,G,ee,"H","ℍ"),x(De,G,ee,"H","ℍ"),x(D,G,ee,"N","ℕ"),x(De,G,ee,"N","ℕ"),x(D,G,ee,"P","ℙ"),x(De,G,ee,"P","ℙ"),x(D,G,ee,"Q","ℚ"),x(De,G,ee,"Q","ℚ"),x(D,G,ee,"R","ℝ"),x(De,G,ee,"R","ℝ"),x(D,G,ee,"Z","ℤ"),x(De,G,ee,"Z","ℤ"),x(D,z,nt,"h","ℎ"),x(De,z,nt,"h","ℎ");for(var it="",vr=0;vr<s0.length;vr++){var Gt=s0.charAt(vr);it=String.fromCharCode(55349,56320+vr),x(D,z,nt,Gt,it),x(De,z,ee,Gt,it),it=String.fromCharCode(55349,56372+vr),x(D,z,nt,Gt,it),x(De,z,ee,Gt,it),it=String.fromCharCode(55349,56424+vr),x(D,z,nt,Gt,it),x(De,z,ee,Gt,it),it=String.fromCharCode(55349,56580+vr),x(D,z,nt,Gt,it),x(De,z,ee,Gt,it),it=String.fromCharCode(55349,56684+vr),x(D,z,nt,Gt,it),x(De,z,ee,Gt,it),it=String.fromCharCode(55349,56736+vr),x(D,z,nt,Gt,it),x(De,z,ee,Gt,it),it=String.fromCharCode(55349,56788+vr),x(D,z,nt,Gt,it),x(De,z,ee,Gt,it),it=String.fromCharCode(55349,56840+vr),x(D,z,nt,Gt,it),x(De,z,ee,Gt,it),it=String.fromCharCode(55349,56944+vr),x(D,z,nt,Gt,it),x(De,z,ee,Gt,it),vr<26&&(it=String.fromCharCode(55349,56632+vr),x(D,z,nt,Gt,it),x(De,z,ee,Gt,it),it=String.fromCharCode(55349,56476+vr),x(D,z,nt,Gt,it),x(De,z,ee,Gt,it))}it="𝕜",x(D,z,nt,"k",it),x(De,z,ee,"k",it);for(var ra=0;ra<10;ra++){var Rn=ra.toString();it=String.fromCharCode(55349,57294+ra),x(D,z,nt,Rn,it),x(De,z,ee,Rn,it),it=String.fromCharCode(55349,57314+ra),x(D,z,nt,Rn,it),x(De,z,ee,Rn,it),it=String.fromCharCode(55349,57324+ra),x(D,z,nt,Rn,it),x(De,z,ee,Rn,it),it=String.fromCharCode(55349,57334+ra),x(D,z,nt,Rn,it),x(De,z,ee,Rn,it)}for(var Wo="ÐÞþ",Xo=0;Xo<Wo.length;Xo++){var u0=Wo.charAt(Xo);x(D,z,nt,u0,u0),x(De,z,ee,u0,u0)}var f0=[["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"]],Oc=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Kg=(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[f0[o][2],f0[o][i]]}else if(120782<=a&&a<=120831){var s=Math.floor((a-120782)/10);return[Oc[s][2],Oc[s][i]]}else{if(a===120485||a===120486)return[f0[0][2],f0[0][i]];if(120486<a&&a<120782)return["",""];throw new Me("Unsupported character: "+e)}},d0=function(t,r,n){if(Pt[n][t]){var a=Pt[n][t].replace;a&&(t=a)}return{value:t,metrics:Uo(t,r,n)}},gr=function(t,r,n,a,i){var o=d0(t,r,n),s=o.metrics;t=o.value;var c;if(s){var u=s.italic;(n==="text"||a&&a.font==="mathit")&&(u=0),c=new Cr(t,s.height,s.depth,u,s.skew,s.width,i)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+t+"' in style '"+r+"' and mode '"+n+"'")),c=new Cr(t,0,0,0,0,0,i);if(a){c.maxFontSize=a.sizeMultiplier,a.style.isTight()&&c.classes.push("mtight");var f=a.getColor();f&&(c.style.color=f)}return c},Zo=function(t,r,n,a){return a===void 0&&(a=[]),n.font==="boldsymbol"&&d0(t,"Main-Bold",r).metrics?gr(t,"Main-Bold",r,n,a.concat(["mathbf"])):t==="\\"||Pt[r][t].font==="main"?gr(t,"Main-Regular",r,n,a):gr(t,"AMS-Regular",r,n,a.concat(["amsrm"]))},Yg=function(t,r,n,a,i){return i!=="textord"&&d0(t,"Math-BoldItalic",r).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},h0=function(t,r,n){var a=t.mode,i=t.text,o=["mord"],s=a==="math"||a==="text"&&r.font,c=s?r.font:r.fontFamily,u="",f="";if(i.charCodeAt(0)===55349&&([u,f]=Kg(i,a)),u.length>0)return gr(i,u,a,r,o.concat(f));if(c){var h,d;if(c==="boldsymbol"){var p=Yg(i,a,r,o,n);h=p.fontName,d=[p.fontClass]}else s?(h=Yo[c].fontName,d=[c]):(h=p0(c,r.fontWeight,r.fontShape),d=[c,r.fontWeight,r.fontShape]);if(d0(i,h,a).metrics)return gr(i,h,a,r,o.concat(d));if(Mc.hasOwnProperty(i)&&h.slice(0,10)==="Typewriter"){for(var w=[],m=0;m<i.length;m++)w.push(gr(i[m],h,a,r,o.concat(d)));return kn(w)}}if(n==="mathord")return gr(i,"Math-Italic",a,r,o.concat(["mathnormal"]));if(n==="textord"){var _=Pt[a][i]&&Pt[a][i].font;if(_==="ams"){var y=p0("amsrm",r.fontWeight,r.fontShape);return gr(i,y,a,r,o.concat("amsrm",r.fontWeight,r.fontShape))}else if(_==="main"||!_){var g=p0("textrm",r.fontWeight,r.fontShape);return gr(i,g,a,r,o.concat(r.fontWeight,r.fontShape))}else{var b=p0(_,r.fontWeight,r.fontShape);return gr(i,b,a,r,o.concat(b,r.fontWeight,r.fontShape))}}else throw new Error("unexpected type: "+n+" in makeOrd")},Jg=(e,t)=>{if(Ln(e.classes)!==Ln(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},Lc=e=>{for(var t=0;t<e.length-1;t++){var r=e[t],n=e[t+1];r instanceof Cr&&n instanceof Cr&&Jg(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},Ko=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},Be=function(t,r,n,a){var i=new Ea(t,r,n,a);return Ko(i),i},Vn=(e,t,r,n)=>new Ea(e,t,r,n),Da=function(t,r,n){var a=Be([t],[],r);return a.height=Math.max(n||r.fontMetrics().defaultRuleThickness,r.minRuleThickness),a.style.borderBottomWidth=Ne(a.height),a.maxFontSize=1,a},Qg=function(t,r,n,a){var i=new o0(t,r,n,a);return Ko(i),i},kn=function(t){var r=new Sa(t);return Ko(r),r},Aa=function(t,r){return t instanceof Sa?Be([],[t],r):t},e6=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 s=-r[o].shift-i-r[o].elem.depth,c=s-(r[o-1].elem.height+r[o-1].elem.depth);i=i+s,n.push({type:"kern",size:c}),n.push(r[o])}return{children:n,depth:a}}var u;if(t.positionType==="top"){for(var f=t.positionData,h=0;h<t.children.length;h++){var d=t.children[h];f-=d.type==="kern"?d.size:d.elem.height+d.elem.depth}u=f}else if(t.positionType==="bottom")u=-t.positionData;else{var p=t.children[0];if(p.type!=="elem")throw new Error('First child must have type "elem".');if(t.positionType==="shift")u=-p.elem.depth-t.positionData;else if(t.positionType==="firstBaseline")u=-p.elem.depth;else throw new Error("Invalid positionType "+t.positionType+".")}return{children:t.children,depth:u}},Dt=function(t,r){for(var{children:n,depth:a}=e6(t),i=0,o=0;o<n.length;o++){var s=n[o];if(s.type==="elem"){var c=s.elem;i=Math.max(i,c.maxFontSize,c.height)}}i+=2;var u=Be(["pstrut"],[]);u.style.height=Ne(i);for(var f=[],h=a,d=a,p=a,w=0;w<n.length;w++){var m=n[w];if(m.type==="kern")p+=m.size;else{var _=m.elem,y=m.wrapperClasses||[],g=m.wrapperStyle||{},b=Be(y,[u,_],void 0,g);b.style.top=Ne(-i-p-_.depth),m.marginLeft&&(b.style.marginLeft=m.marginLeft),m.marginRight&&(b.style.marginRight=m.marginRight),f.push(b),p+=_.height+_.depth}h=Math.min(h,p),d=Math.max(d,p)}var v=Be(["vlist"],f);v.style.height=Ne(d);var E;if(h<0){var C=Be([],[]),A=Be(["vlist"],[C]);A.style.height=Ne(-h);var k=Be(["vlist-s"],[new Cr("")]);E=[Be(["vlist-r"],[v,k]),Be(["vlist-r"],[A])]}else E=[Be(["vlist-r"],[v])];var B=Be(["vlist-t"],E);return E.length===2&&B.classes.push("vlist-t2"),B.height=d,B.depth=-h,B},Pc=(e,t)=>{var r=Be(["mspace"],[],t),n=$t(e,t);return r.style.marginRight=Ne(n),r},p0=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},Yo={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"}},Rc={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Vc=function(t,r){var[n,a,i]=Rc[t],o=new Pn(n),s=new _n([o],{width:Ne(a),height:Ne(i),style:"width:"+Ne(a),viewBox:"0 0 "+1e3*a+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),c=Vn(["overlay"],[s],r);return c.height=i,c.style.height=Ne(i),c.style.width=Ne(a),c},Ut={number:3,unit:"mu"},na={number:4,unit:"mu"},Sn={number:5,unit:"mu"},t6={mord:{mop:Ut,mbin:na,mrel:Sn,minner:Ut},mop:{mord:Ut,mop:Ut,mrel:Sn,minner:Ut},mbin:{mord:na,mop:na,mopen:na,minner:na},mrel:{mord:Sn,mop:Sn,mopen:Sn,minner:Sn},mopen:{},mclose:{mop:Ut,mbin:na,mrel:Sn,minner:Ut},mpunct:{mord:Ut,mop:Ut,mrel:Sn,mopen:Ut,mclose:Ut,mpunct:Ut,minner:Ut},minner:{mord:Ut,mop:Ut,mbin:na,mrel:Sn,mopen:Ut,mpunct:Ut,minner:Ut}},r6={mord:{mop:Ut},mop:{mord:Ut,mop:Ut},mbin:{},mrel:{},mopen:{},mclose:{mop:Ut},mpunct:{},minner:{mop:Ut}},$c={},m0={},v0={};function Ge(e){for(var{type:t,names:r,props:n,handler:a,htmlBuilder:i,mathmlBuilder:o}=e,s={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},c=0;c<r.length;++c)$c[r[c]]=s;t&&(i&&(m0[t]=i),o&&(v0[t]=o))}function aa(e){var{type:t,htmlBuilder:r,mathmlBuilder:n}=e;Ge({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:r,mathmlBuilder:n})}var g0=function(t){return t.type==="ordgroup"&&t.body.length===1?t.body[0]:t},Xt=function(t){return t.type==="ordgroup"?t.body:[t]},n6=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),a6=new Set(["rightmost","mrel","mclose","mpunct"]),i6={display:lt.DISPLAY,text:lt.TEXT,script:lt.SCRIPT,scriptscript:lt.SCRIPTSCRIPT},o6={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},er=function(t,r,n,a){a===void 0&&(a=[null,null]);for(var i=[],o=0;o<t.length;o++){var s=At(t[o],r);if(s instanceof Sa){var c=s.children;i.push(...c)}else i.push(s)}if(Lc(i),!n)return i;var u=r;if(t.length===1){var f=t[0];f.type==="sizing"?u=r.havingSize(f.size):f.type==="styling"&&(u=r.havingStyle(i6[f.style]))}var h=Be([a[0]||"leftmost"],[],r),d=Be([a[1]||"rightmost"],[],r),p=n==="root";return Jo(i,(w,m)=>{var _=m.classes[0],y=w.classes[0];_==="mbin"&&a6.has(y)?m.classes[0]="mord":y==="mbin"&&n6.has(_)&&(w.classes[0]="mord")},{node:h},d,p),Jo(i,(w,m)=>{var _,y,g=el(m),b=el(w),v=g&&b?w.hasClass("mtight")?(_=r6[g])==null?void 0:_[b]:(y=t6[g])==null?void 0:y[b]:null;if(v)return Pc(v,u)},{node:h},d,p),i},Jo=function(t,r,n,a,i){a&&t.push(a);for(var o=0;o<t.length;o++){var s=t[o],c=Uc(s);if(c){Jo(c.children,r,n,null,i);continue}var u=!s.hasClass("mspace");if(u){var f=r(s,n.node);f&&(n.insertAfter?n.insertAfter(f):(t.unshift(f),o++))}u?n.node=s:i&&s.hasClass("newline")&&(n.node=Be(["leftmost"])),n.insertAfter=(h=>d=>{t.splice(h+1,0,d),o++})(o)}a&&t.pop()},Uc=function(t){return t instanceof Sa||t instanceof o0||t instanceof Ea&&t.hasClass("enclosing")?t:null},Qo=function(t,r){var n=Uc(t);if(n){var a=n.children;if(a.length){if(r==="right")return Qo(a[a.length-1],"right");if(r==="left")return Qo(a[0],"left")}}return t},el=function(t,r){if(!t)return null;r&&(t=Qo(t,r));var n=t.classes[0];return o6[n]||null},di=function(t,r){var n=["nulldelimiter"].concat(t.baseSizingClasses());return Be(r.concat(n))},At=function(t,r,n){if(!t)return Be();if(m0[t.type]){var a=m0[t.type](t,r);if(n&&r.size!==n.size){a=Be(r.sizingClasses(n),[a],r);var i=r.sizeMultiplier/n.sizeMultiplier;a.height*=i,a.depth*=i}return a}else throw new Me("Got group of unknown type: '"+t.type+"'")};function y0(e,t){var r=Be(["base"],e,t),n=Be(["strut"]);return n.style.height=Ne(r.height+r.depth),r.depth&&(n.style.verticalAlign=Ne(-r.depth)),r.children.unshift(n),r}function tl(e,t){var r=null;e.length===1&&e[0].type==="tag"&&(r=e[0].tag,e=e[0].body);var n=er(e,t,"root"),a;n.length===2&&n[1].hasClass("tag")&&(a=n.pop());for(var i=[],o=[],s=0;s<n.length;s++)if(o.push(n[s]),n[s].hasClass("mbin")||n[s].hasClass("mrel")||n[s].hasClass("allowbreak")){for(var c=!1;s<n.length-1&&n[s+1].hasClass("mspace")&&!n[s+1].hasClass("newline");)s++,o.push(n[s]),n[s].hasClass("nobreak")&&(c=!0);c||(i.push(y0(o,t)),o=[])}else n[s].hasClass("newline")&&(o.pop(),o.length>0&&(i.push(y0(o,t)),o=[]),i.push(n[s]));o.length>0&&i.push(y0(o,t));var u;r?(u=y0(er(r,t,!0),t),u.classes=["tag"],i.push(u)):a&&i.push(a);var f=Be(["katex-html"],i);if(f.setAttribute("aria-hidden","true"),u){var h=u.children[0];h.style.height=Ne(f.height+f.depth),f.depth&&(h.style.verticalAlign=Ne(-f.depth))}return f}function Hc(e){return new Sa(e)}class Ie{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=Ln(this.classes));for(var n=0;n<this.children.length;n++)if(this.children[n]instanceof Zt&&this.children[n+1]instanceof Zt){for(var a=this.children[n].toText()+this.children[++n].toText();this.children[n+1]instanceof Zt;)a+=this.children[++n].toText();t.appendChild(new Zt(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+=ur(this.attributes[r]),t+='"');this.classes.length>0&&(t+=' class ="'+ur(Ln(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 Zt{constructor(t){this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return ur(this.toText())}toText(){return this.text}}class Gc{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",Ne(this.width)),t}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+Ne(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var l6=new Set(["\\imath","\\jmath"]),s6=new Set(["mrow","mtable"]),$r=function(t,r,n){return Pt[r][t]&&Pt[r][t].replace&&t.charCodeAt(0)!==55349&&!(Mc.hasOwnProperty(t)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(t=Pt[r][t].replace),new Zt(t)},rl=function(t){return t.length===1?t[0]:new Ie("mrow",t)},nl=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(l6.has(i))return null;if(Pt[a][i]){var o=Pt[a][i].replace;o&&(i=o)}var s=Yo[n].fontName;return Uo(i,s,a)?Yo[n].variant:null};function al(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var t=e.children[0];return t instanceof Zt&&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 Zt&&r.text===","}else return!1}var Ar=function(t,r,n){if(t.length===1){var a=Ft(t[0],r);return n&&a instanceof Ie&&a.type==="mo"&&(a.setAttribute("lspace","0em"),a.setAttribute("rspace","0em")),[a]}for(var i=[],o,s=0;s<t.length;s++){var c=Ft(t[s],r);if(c instanceof Ie&&o instanceof Ie){if(c.type==="mtext"&&o.type==="mtext"&&c.getAttribute("mathvariant")===o.getAttribute("mathvariant")){o.children.push(...c.children);continue}else if(c.type==="mn"&&o.type==="mn"){o.children.push(...c.children);continue}else if(al(c)&&o.type==="mn"){o.children.push(...c.children);continue}else if(c.type==="mn"&&al(o))c.children=[...o.children,...c.children],i.pop();else if((c.type==="msup"||c.type==="msub")&&c.children.length>=1&&(o.type==="mn"||al(o))){var u=c.children[0];u instanceof Ie&&u.type==="mn"&&(u.children=[...o.children,...u.children],i.pop())}else if(o.type==="mi"&&o.children.length===1){var f=o.children[0];if(f instanceof Zt&&f.text==="̸"&&(c.type==="mo"||c.type==="mi"||c.type==="mn")){var h=c.children[0];h instanceof Zt&&h.text.length>0&&(h.text=h.text.slice(0,1)+"̸"+h.text.slice(1),i.pop())}}}i.push(c),o=c}return i},$n=function(t,r,n){return rl(Ar(t,r,n))},Ft=function(t,r){if(!t)return new Ie("mrow");if(v0[t.type]){var n=v0[t.type](t,r);return n}else throw new Me("Got group of unknown type: '"+t.type+"'")};function jc(e,t,r,n,a){var i=Ar(e,r),o;i.length===1&&i[0]instanceof Ie&&s6.has(i[0].type)?o=i[0]:o=new Ie("mrow",i);var s=new Ie("annotation",[new Zt(t)]);s.setAttribute("encoding","application/x-tex");var c=new Ie("semantics",[o,s]),u=new Ie("math",[c]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&u.setAttribute("display","block");var f=a?"katex":"katex-mathml";return Be([f],[u])}var c6=[[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]],qc=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Wc=function(t,r){return r.size<2?t:c6[t-1][r.size-1]};class En{constructor(t){this.style=t.style,this.color=t.color,this.size=t.size||En.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=qc[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 En(r)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:Wc(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:qc[t-1]})}havingBaseStyle(t){t=t||this.style.text();var r=Wc(En.BASESIZE,t);return this.size===r&&this.textSize===En.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!==En.BASESIZE?["sizing","reset-size"+this.size,"size"+En.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Wg(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}En.BASESIZE=6;var Xc=function(t){return new En({style:t.displayMode?lt.DISPLAY:lt.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},Zc=function(t,r){if(r.displayMode){var n=["katex-display"];r.leqno&&n.push("leqno"),r.fleqn&&n.push("fleqn"),t=Be(n,[t])}return t},u6=function(t,r,n){var a=Xc(n),i;if(n.output==="mathml")return jc(t,r,a,n.displayMode,!0);if(n.output==="html"){var o=tl(t,a);i=Be(["katex"],[o])}else{var s=jc(t,r,a,n.displayMode,!1),c=tl(t,a);i=Be(["katex"],[s,c])}return Zc(i,n)},f6=function(t,r,n){var a=Xc(n),i=tl(t,a),o=Be(["katex"],[i]);return Zc(o,n)},d6={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":"="},b0=function(t){var r=new Ie("mo",[new Zt(d6[t.replace(/^\\/,"")])]);return r.setAttribute("stretchy","true"),r},h6={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]},p6=new Set(["widehat","widecheck","widetilde","utilde"]),w0=function(t,r){function n(){var s=4e5,c=t.label.slice(1);if(p6.has(c)){var u=t,f=u.base.type==="ordgroup"?u.base.body.length:1,h,d,p;if(f>5)c==="widehat"||c==="widecheck"?(h=420,s=2364,p=.42,d=c+"4"):(h=312,s=2340,p=.34,d="tilde4");else{var w=[1,1,2,2,3,3][f];c==="widehat"||c==="widecheck"?(s=[0,1062,2364,2364,2364][w],h=[0,239,300,360,420][w],p=[0,.24,.3,.3,.36,.42][w],d=c+w):(s=[0,600,1033,2339,2340][w],h=[0,260,286,306,312][w],p=[0,.26,.286,.3,.306,.34][w],d="tilde"+w)}var m=new Pn(d),_=new _n([m],{width:"100%",height:Ne(p),viewBox:"0 0 "+s+" "+h,preserveAspectRatio:"none"});return{span:Vn([],[_],r),minWidth:0,height:p}}else{var y=[],g=h6[c],[b,v,E]=g,C=E/1e3,A=b.length,k,B;if(A===1){var T=g[3];k=["hide-tail"],B=[T]}else if(A===2)k=["halfarrow-left","halfarrow-right"],B=["xMinYMin","xMaxYMin"];else if(A===3)k=["brace-left","brace-center","brace-right"],B=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
|
|
255
|
+
`+A+" children.");for(var F=0;F<A;F++){var V=new Pn(b[F]),L=new _n([V],{width:"400em",height:Ne(C),viewBox:"0 0 "+s+" "+E,preserveAspectRatio:B[F]+" slice"}),H=Vn([k[F]],[L],r);if(A===1)return{span:H,minWidth:v,height:C};H.style.height=Ne(C),y.push(H)}return{span:Be(["stretchy"],y,r),minWidth:v,height:C}}}var{span:a,minWidth:i,height:o}=n();return a.height=o,a.style.height=Ne(o),i>0&&(a.style.minWidth=Ne(i)),a},m6=function(t,r,n,a,i){var o,s=t.height+t.depth+n+a;if(/fbox|color|angl/.test(r)){if(o=Be(["stretchy",r],[],i),r==="fbox"){var c=i.color&&i.getColor();c&&(o.style.borderColor=c)}}else{var u=[];/^[bx]cancel$/.test(r)&&u.push(new $o({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&u.push(new $o({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var f=new _n(u,{width:"100%",height:Ne(s)});o=Vn([],[f],i)}return o.height=s,o.style.height=Ne(s),o};function ht(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 _0(e){var t=x0(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 x0(e){return e&&(e.type==="atom"||Zg.hasOwnProperty(e.type))?e:null}var Kc=e=>{if(e instanceof Cr)return e;if(qg(e)&&e.children.length===1)return Kc(e.children[0])},il=(e,t)=>{var r,n,a;e&&e.type==="supsub"?(n=ht(e.base,"accent"),r=n.base,e.base=r,a=jg(At(e,t)),e.base=n):(n=ht(e,"accent"),r=n.base);var i=At(r,t.havingCrampedStyle()),o=n.isShifty&&bn(r),s=0;if(o){var c,u;s=(c=(u=Kc(i))==null?void 0:u.skew)!=null?c:0}var f=n.label==="\\c",h=f?i.height+i.depth:Math.min(i.height,t.fontMetrics().xHeight),d;if(n.isStretchy)d=w0(n,t),d=Dt({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:d,wrapperClasses:["svg-align"],wrapperStyle:s>0?{width:"calc(100% - "+Ne(2*s)+")",marginLeft:Ne(2*s)}:void 0}]});else{var p,w;n.label==="\\vec"?(p=Vc("vec",t),w=Rc.vec[1]):(p=h0({mode:n.mode,text:n.label},t,"textord"),p=Gg(p),p.italic=0,w=p.width,f&&(h+=p.depth)),d=Be(["accent-body"],[p]);var m=n.label==="\\textcircled";m&&(d.classes.push("accent-full"),h=i.height);var _=s;m||(_-=w/2),d.style.left=Ne(_),n.label==="\\textcircled"&&(d.style.top=".2em"),d=Dt({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-h},{type:"elem",elem:d}]})}var y=Be(["mord","accent"],[d],t);return a?(a.children[0]=y,a.height=Math.max(y.height,a.height),a.classes[0]="mord",a):y},Yc=(e,t)=>{var r=e.isStretchy?b0(e.label):new Ie("mo",[$r(e.label,e.mode)]),n=new Ie("mover",[Ft(e.base,t),r]);return n.setAttribute("accent","true"),n},v6=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));Ge({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=g0(t[0]),n=!v6.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:il,mathmlBuilder:Yc}),Ge({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:il,mathmlBuilder:Yc}),Ge({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=At(e.base,t),n=w0(e,t),a=e.label==="\\utilde"?.12:0,i=Dt({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:a},{type:"elem",elem:r}]});return Be(["mord","accentunder"],[i],t)},mathmlBuilder:(e,t)=>{var r=b0(e.label),n=new Ie("munder",[Ft(e.base,t),r]);return n.setAttribute("accentunder","true"),n}});var k0=e=>{var t=new Ie("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};Ge({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=Aa(At(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=Aa(At(e.below,n,t),t),o.classes.push(i+"-arrow-pad"));var s=w0(e,t),c=-t.fontMetrics().axisHeight+.5*s.height,u=-t.fontMetrics().axisHeight-.5*s.height-.111;(a.depth>.25||e.label==="\\xleftequilibrium")&&(u-=a.depth);var f;if(o){var h=-t.fontMetrics().axisHeight+o.height+.5*s.height+.111;f=Dt({positionType:"individualShift",children:[{type:"elem",elem:a,shift:u},{type:"elem",elem:s,shift:c},{type:"elem",elem:o,shift:h}]})}else f=Dt({positionType:"individualShift",children:[{type:"elem",elem:a,shift:u},{type:"elem",elem:s,shift:c}]});return f.children[0].children[0].children[1].classes.push("svg-align"),Be(["mrel","x-arrow"],[f],t)},mathmlBuilder(e,t){var r=b0(e.label);r.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(e.body){var a=k0(Ft(e.body,t));if(e.below){var i=k0(Ft(e.below,t));n=new Ie("munderover",[r,i,a])}else n=new Ie("mover",[r,a])}else if(e.below){var o=k0(Ft(e.below,t));n=new Ie("munder",[r,o])}else n=k0(),n=new Ie("mover",[r,n]);return n}});function Jc(e,t){var r=er(e.body,t,!0);return Be([e.mclass],r,t)}function Qc(e,t){var r,n=Ar(e.body,t);return e.mclass==="minner"?r=new Ie("mpadded",n):e.mclass==="mord"?e.isCharacterBox?(r=n[0],r.type="mi"):r=new Ie("mi",n):(e.isCharacterBox?(r=n[0],r.type="mo"):r=new Ie("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}Ge({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:Xt(a),isCharacterBox:bn(a)}},htmlBuilder:Jc,mathmlBuilder:Qc});var S0=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"};Ge({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:r}=e;return{type:"mclass",mode:r.mode,mclass:S0(t[0]),body:Xt(t[1]),isCharacterBox:bn(t[1])}}}),Ge({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=S0(a):o="mrel";var s={type:"op",mode:a.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:Xt(a)},c={type:"supsub",mode:i.mode,base:s,sup:n==="\\underset"?null:i,sub:n==="\\underset"?i:null};return{type:"mclass",mode:r.mode,mclass:o,body:[c],isCharacterBox:bn(c)}},htmlBuilder:Jc,mathmlBuilder:Qc}),Ge({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"pmb",mode:r.mode,mclass:S0(t[0]),body:Xt(t[0])}},htmlBuilder(e,t){var r=er(e.body,t,!0),n=Be([e.mclass],r,t);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(e,t){var r=Ar(e.body,t),n=new Ie("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var g6={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},eu=()=>({type:"styling",body:[],mode:"math",style:"display"}),tu=e=>e.type==="textord"&&e.text==="@",y6=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;function b6(e,t,r){var n=g6[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],[]),s=r.callFunction("\\\\cdright",[t[1]],[]),c={type:"ordgroup",mode:"math",body:[a,o,s]};return r.callFunction("\\\\cdparent",[c],[])}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 w6(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 Me("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var n=[],a=[n],i=0;i<t.length;i++){for(var o=t[i],s=eu(),c=0;c<o.length;c++)if(!tu(o[c]))s.body.push(o[c]);else{n.push(s),c+=1;var u=_0(o[c]).text,f=new Array(2);if(f[0]={type:"ordgroup",mode:"math",body:[]},f[1]={type:"ordgroup",mode:"math",body:[]},!"=|.".includes(u))if("<>AV".includes(u))for(var h=0;h<2;h++){for(var d=!0,p=c+1;p<o.length;p++){if(y6(o[p],u)){d=!1,c=p;break}if(tu(o[p]))throw new Me("Missing a "+u+" character to complete a CD arrow.",o[p]);f[h].body.push(o[p])}if(d)throw new Me("Missing a "+u+" character to complete a CD arrow.",o[c])}else throw new Me('Expected one of "<>AV=|." after @',o[c]);var w=b6(u,f,e),m={type:"styling",body:[w],mode:"math",style:"display"};n.push(m),s=eu()}i%2===0?n.push(s):n.shift(),n=[],a.push(n)}e.gullet.endGroup(),e.gullet.endGroup();var _=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:_,colSeparationType:"CD",hLinesBeforeRow:new Array(a.length+1).fill([])}}Ge({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=Aa(At(e.label,r,t),t);return n.classes.push("cd-label-"+e.side),n.style.bottom=Ne(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(e,t){var r=new Ie("mrow",[Ft(e.label,t)]);return r=new Ie("mpadded",[r]),r.setAttribute("width","0"),e.side==="left"&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new Ie("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}}),Ge({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=Aa(At(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(e,t){return new Ie("mrow",[Ft(e.fragment,t)])}}),Ge({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:r}=e,n=ht(t[0],"ordgroup"),a=n.body,i="",o=0;o<a.length;o++){var s=ht(a[o],"textord");i+=s.text}var c=parseInt(i),u;if(isNaN(c))throw new Me("\\@char has non-numeric argument "+i);if(c<0||c>=1114111)throw new Me("\\@char with invalid code point "+i);return c<=65535?u=String.fromCharCode(c):(c-=65536,u=String.fromCharCode((c>>10)+55296,(c&1023)+56320)),{type:"textord",mode:r.mode,text:u}}});var ru=(e,t)=>{var r=er(e.body,t.withColor(e.color),!1);return kn(r)},nu=(e,t)=>{var r=Ar(e.body,t.withColor(e.color)),n=new Ie("mstyle",r);return n.setAttribute("mathcolor",e.color),n};Ge({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:r}=e,n=ht(t[0],"color-token").color,a=t[1];return{type:"color",mode:r.mode,color:n,body:Xt(a)}},htmlBuilder:ru,mathmlBuilder:nu}),Ge({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:r,breakOnTokenText:n}=e,a=ht(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:ru,mathmlBuilder:nu}),Ge({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&&ht(a,"size").value}},htmlBuilder(e,t){var r=Be(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=Ne($t(e.size,t)))),r},mathmlBuilder(e,t){var r=new Ie("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",Ne($t(e.size,t)))),r}});var ol={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},au=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new Me("Expected a control sequence",e);return t},_6=e=>{var t=e.gullet.popToken();return t.text==="="&&(t=e.gullet.popToken(),t.text===" "&&(t=e.gullet.popToken())),t},iu=(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)};Ge({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(ol[n.text])return(r==="\\global"||r==="\\\\globallong")&&(n.text=ol[n.text]),ht(t.parseFunction(),"internal");throw new Me("Invalid token after macro prefix",n)}}),Ge({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 Me("Expected a control sequence",n);for(var i=0,o,s=[[]];t.gullet.future().text!=="{";)if(n=t.gullet.popToken(),n.text==="#"){if(t.gullet.future().text==="{"){o=t.gullet.future(),s[i].push("{");break}if(n=t.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new Me('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==i+1)throw new Me('Argument number "'+n.text+'" out of order');i++,s.push([])}else{if(n.text==="EOF")throw new Me("Expected a macro definition");s[i].push(n.text)}var{tokens:c}=t.gullet.consumeArg();return o&&c.unshift(o),(r==="\\edef"||r==="\\xdef")&&(c=t.gullet.expandTokens(c),c.reverse()),t.gullet.macros.set(a,{tokens:c,numArgs:i,delimiters:s},r===ol[r]),{type:"internal",mode:t.mode}}}),Ge({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=au(t.gullet.popToken());t.gullet.consumeSpaces();var a=_6(t);return iu(t,n,a,r==="\\\\globallet"),{type:"internal",mode:t.mode}}}),Ge({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=au(t.gullet.popToken()),a=t.gullet.popToken(),i=t.gullet.popToken();return iu(t,n,i,r==="\\\\globalfuture"),t.gullet.pushToken(i),t.gullet.pushToken(a),{type:"internal",mode:t.mode}}});var hi=function(t,r,n){var a=Pt.math[t]&&Pt.math[t].replace,i=Uo(a||t,r,n);if(!i)throw new Error("Unsupported symbol "+t+" and font size "+r+".");return i},ll=function(t,r,n,a){var i=n.havingBaseStyle(r),o=Be(a.concat(i.sizingClasses(n)),[t],n),s=i.sizeMultiplier/n.sizeMultiplier;return o.height*=s,o.depth*=s,o.maxFontSize=i.sizeMultiplier,o},ou=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=Ne(i),t.height-=i,t.depth+=i},x6=function(t,r,n,a,i,o){var s=gr(t,"Main-Regular",i,a),c=ll(s,r,a,o);return ou(c,a,r),c},k6=function(t,r,n,a){return gr(t,"Size"+r+"-Regular",n,a)},lu=function(t,r,n,a,i,o){var s=k6(t,r,i,a),c=ll(Be(["delimsizing","size"+r],[s],a),lt.TEXT,a,o);return n&&ou(c,a,lt.TEXT),c},sl=function(t,r,n){var a;r==="Size1-Regular"?a="delim-size1":a="delim-size4";var i=Be(["delimsizinginner",a],[Be([],[gr(t,r,n)])]);return{type:"elem",elem:i}},cl=function(t,r,n){var a=sn["Size4-Regular"][t.charCodeAt(0)]?sn["Size4-Regular"][t.charCodeAt(0)][4]:sn["Size1-Regular"][t.charCodeAt(0)][4],i=new Pn("inner",Pg(t,Math.round(1e3*r))),o=new _n([i],{width:Ne(a),height:Ne(r),style:"width:"+Ne(a),viewBox:"0 0 "+1e3*a+" "+Math.round(1e3*r),preserveAspectRatio:"xMinYMin"}),s=Vn([],[o],n);return s.height=r,s.style.height=Ne(r),s.style.width=Ne(a),{type:"elem",elem:s}},ul=.008,E0={type:"kern",size:-1*ul},S6=new Set(["|","\\lvert","\\rvert","\\vert"]),E6=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),su=function(t,r,n,a,i,o){var s,c,u,f,h="",d=0;s=u=f=t,c=null;var p="Size1-Regular";t==="\\uparrow"?u=f="⏐":t==="\\Uparrow"?u=f="‖":t==="\\downarrow"?s=u="⏐":t==="\\Downarrow"?s=u="‖":t==="\\updownarrow"?(s="\\uparrow",u="⏐",f="\\downarrow"):t==="\\Updownarrow"?(s="\\Uparrow",u="‖",f="\\Downarrow"):S6.has(t)?(u="∣",h="vert",d=333):E6.has(t)?(u="∥",h="doublevert",d=556):t==="["||t==="\\lbrack"?(s="⎡",u="⎢",f="⎣",p="Size4-Regular",h="lbrack",d=667):t==="]"||t==="\\rbrack"?(s="⎤",u="⎥",f="⎦",p="Size4-Regular",h="rbrack",d=667):t==="\\lfloor"||t==="⌊"?(u=s="⎢",f="⎣",p="Size4-Regular",h="lfloor",d=667):t==="\\lceil"||t==="⌈"?(s="⎡",u=f="⎢",p="Size4-Regular",h="lceil",d=667):t==="\\rfloor"||t==="⌋"?(u=s="⎥",f="⎦",p="Size4-Regular",h="rfloor",d=667):t==="\\rceil"||t==="⌉"?(s="⎤",u=f="⎥",p="Size4-Regular",h="rceil",d=667):t==="("||t==="\\lparen"?(s="⎛",u="⎜",f="⎝",p="Size4-Regular",h="lparen",d=875):t===")"||t==="\\rparen"?(s="⎞",u="⎟",f="⎠",p="Size4-Regular",h="rparen",d=875):t==="\\{"||t==="\\lbrace"?(s="⎧",c="⎨",f="⎩",u="⎪",p="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(s="⎫",c="⎬",f="⎭",u="⎪",p="Size4-Regular"):t==="\\lgroup"||t==="⟮"?(s="⎧",f="⎩",u="⎪",p="Size4-Regular"):t==="\\rgroup"||t==="⟯"?(s="⎫",f="⎭",u="⎪",p="Size4-Regular"):t==="\\lmoustache"||t==="⎰"?(s="⎧",f="⎭",u="⎪",p="Size4-Regular"):(t==="\\rmoustache"||t==="⎱")&&(s="⎫",f="⎩",u="⎪",p="Size4-Regular");var w=hi(s,p,i),m=w.height+w.depth,_=hi(u,p,i),y=_.height+_.depth,g=hi(f,p,i),b=g.height+g.depth,v=0,E=1;if(c!==null){var C=hi(c,p,i);v=C.height+C.depth,E=2}var A=m+b+v,k=Math.max(0,Math.ceil((r-A)/(E*y))),B=A+k*E*y,T=a.fontMetrics().axisHeight;n&&(T*=a.sizeMultiplier);var F=B/2-T,V=[];if(h.length>0){var L=B-m-b,H=Math.round(B*1e3),X=Rg(h,Math.round(L*1e3)),W=new Pn(h,X),Z=Ne(d/1e3),Q=Ne(H/1e3),K=new _n([W],{width:Z,height:Q,viewBox:"0 0 "+d+" "+H}),ue=Vn([],[K],a);ue.height=H/1e3,ue.style.width=Z,ue.style.height=Q,V.push({type:"elem",elem:ue})}else{if(V.push(sl(f,p,i)),V.push(E0),c===null){var ne=B-m-b+2*ul;V.push(cl(u,ne,a))}else{var fe=(B-m-b-v)/2+2*ul;V.push(cl(u,fe,a)),V.push(E0),V.push(sl(c,p,i)),V.push(E0),V.push(cl(u,fe,a))}V.push(E0),V.push(sl(s,p,i))}var re=a.havingBaseStyle(lt.TEXT),ye=Dt({positionType:"bottom",positionData:F,children:V});return ll(Be(["delimsizing","mult"],[ye],re),lt.TEXT,a,o)},fl=80,dl=.08,hl=function(t,r,n,a,i){var o=Lg(t,a,n),s=new Pn(t,o),c=new _n([s],{width:"400em",height:Ne(r),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return Vn(["hide-tail"],[c],i)},C6=function(t,r){var n=r.havingBaseSizing(),a=hu("\\surd",t*n.sizeMultiplier,du,n),i=n.sizeMultiplier,o=Math.max(0,r.minRuleThickness-r.fontMetrics().sqrtRuleThickness),s,c=0,u=0,f=0,h;return a.type==="small"?(f=1e3+1e3*o+fl,t<1?i=1:t<1.4&&(i=.7),c=(1+o+dl)/i,u=(1+o)/i,s=hl("sqrtMain",c,f,o,r),s.style.minWidth="0.853em",h=.833/i):a.type==="large"?(f=(1e3+fl)*pi[a.size],u=(pi[a.size]+o)/i,c=(pi[a.size]+o+dl)/i,s=hl("sqrtSize"+a.size,c,f,o,r),s.style.minWidth="1.02em",h=1/i):(c=t+o+dl,u=t+o,f=Math.floor(1e3*t+o)+fl,s=hl("sqrtTall",c,f,o,r),s.style.minWidth="0.742em",h=1.056),s.height=u,s.style.height=Ne(c),{span:s,advanceWidth:h,ruleWidth:(r.fontMetrics().sqrtRuleThickness+o)*i}},cu=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),D6=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),uu=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),pi=[0,1.2,1.8,2.4,3],fu=function(t,r,n,a,i){if(t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle"),cu.has(t)||uu.has(t))return lu(t,r,!1,n,a,i);if(D6.has(t))return su(t,pi[r],!1,n,a,i);throw new Me("Illegal delimiter: '"+t+"'")},A6=[{type:"small",style:lt.SCRIPTSCRIPT},{type:"small",style:lt.SCRIPT},{type:"small",style:lt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],B6=[{type:"small",style:lt.SCRIPTSCRIPT},{type:"small",style:lt.SCRIPT},{type:"small",style:lt.TEXT},{type:"stack"}],du=[{type:"small",style:lt.SCRIPTSCRIPT},{type:"small",style:lt.SCRIPT},{type:"small",style:lt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],T6=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.")},hu=function(t,r,n,a){for(var i=Math.min(2,3-a.style.size),o=i;o<n.length;o++){var s=n[o];if(s.type==="stack")break;var c=hi(t,T6(s),"math"),u=c.height+c.depth;if(s.type==="small"){var f=a.havingBaseStyle(s.style);u*=f.sizeMultiplier}if(u>r)return s}return n[n.length-1]},pl=function(t,r,n,a,i,o){t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle");var s;uu.has(t)?s=A6:cu.has(t)?s=du:s=B6;var c=hu(t,r,s,a);return c.type==="small"?x6(t,c.style,n,a,i,o):c.type==="large"?lu(t,c.size,n,a,i,o):su(t,r,n,a,i,o)},ml=function(t,r,n,a,i,o){var s=a.fontMetrics().axisHeight*a.sizeMultiplier,c=901,u=5/a.fontMetrics().ptPerEm,f=Math.max(r-s,n+s),h=Math.max(f/500*c,2*f-u);return pl(t,h,!0,a,i,o)},pu={"\\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}},M6=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 C0(e,t){var r=x0(e);if(r&&M6.has(r.text))return r;throw r?new Me("Invalid delimiter '"+r.text+"' after '"+t.funcName+"'",e):new Me("Invalid delimiter type '"+e.type+"'",e)}Ge({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=C0(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:pu[e.funcName].size,mclass:pu[e.funcName].mclass,delim:r.text}},htmlBuilder:(e,t)=>e.delim==="."?Be([e.mclass]):fu(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!=="."&&t.push($r(e.delim,e.mode));var r=new Ie("mo",t);e.mclass==="mopen"||e.mclass==="mclose"?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=Ne(pi[e.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}});function mu(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Ge({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 Me("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:C0(t[0],e).text,color:r}}}),Ge({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=C0(t[0],e),n=e.parser;++n.leftrightDepth;var a=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var i=ht(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:a,left:r.text,right:i.delim,rightColor:i.color}},htmlBuilder:(e,t)=>{mu(e);for(var r=er(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 s;if(e.left==="."?s=di(t,["mopen"]):s=ml(e.left,n,a,t,e.mode,["mopen"]),r.unshift(s),i)for(var c=1;c<r.length;c++){var u=r[c],f=u.isMiddle;f&&(r[c]=ml(f.delim,n,a,f.options,e.mode,[]))}var h;if(e.right===".")h=di(t,["mclose"]);else{var d=e.rightColor?t.withColor(e.rightColor):t;h=ml(e.right,n,a,d,e.mode,["mclose"])}return r.push(h),Be(["minner"],r,t)},mathmlBuilder:(e,t)=>{mu(e);var r=Ar(e.body,t);if(e.left!=="."){var n=new Ie("mo",[$r(e.left,e.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if(e.right!=="."){var a=new Ie("mo",[$r(e.right,e.mode)]);a.setAttribute("fence","true"),e.rightColor&&a.setAttribute("mathcolor",e.rightColor),r.push(a)}return rl(r)}}),Ge({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=C0(t[0],e);if(!e.parser.leftrightDepth)throw new Me("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},htmlBuilder:(e,t)=>{var r;if(e.delim===".")r=di(t,[]);else{r=fu(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==="|"?$r("|","text"):$r(e.delim,e.mode),n=new Ie("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var D0=(e,t)=>{var r=Aa(At(e.body,t),t),n=e.label.slice(1),a=t.sizeMultiplier,i,o=0,s=bn(e.body);if(n==="sout")i=Be(["stretchy","sout"]),i.height=t.fontMetrics().defaultRuleThickness/a,o=-.5*t.fontMetrics().xHeight;else if(n==="phase"){var c=$t({number:.6,unit:"pt"},t),u=$t({number:.35,unit:"ex"},t),f=t.havingBaseSizing();a=a/f.sizeMultiplier;var h=r.height+r.depth+c+u;r.style.paddingLeft=Ne(h/2+c);var d=Math.floor(1e3*h*a),p=Ng(d),w=new _n([new Pn("phase",p)],{width:"400em",height:Ne(d/1e3),viewBox:"0 0 400000 "+d,preserveAspectRatio:"xMinYMin slice"});i=Vn(["hide-tail"],[w],t),i.style.height=Ne(h),o=r.depth+c+u}else{/cancel/.test(n)?s||r.classes.push("cancel-pad"):n==="angl"?r.classes.push("anglpad"):r.classes.push("boxpad");var m=0,_=0,y=0;/box/.test(n)?(y=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),m=t.fontMetrics().fboxsep+(n==="colorbox"?0:y),_=m):n==="angl"?(y=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),m=4*y,_=Math.max(0,.25-r.depth)):(m=s?.2:0,_=m),i=m6(r,n,m,_,t),/fbox|boxed|fcolorbox/.test(n)?(i.style.borderStyle="solid",i.style.borderWidth=Ne(y)):n==="angl"&&y!==.049&&(i.style.borderTopWidth=Ne(y),i.style.borderRightWidth=Ne(y)),o=r.depth+_,e.backgroundColor&&(i.style.backgroundColor=e.backgroundColor,e.borderColor&&(i.style.borderColor=e.borderColor))}var g;if(e.backgroundColor)g=Dt({positionType:"individualShift",children:[{type:"elem",elem:i,shift:o},{type:"elem",elem:r,shift:0}]});else{var b=/cancel|phase/.test(n)?["svg-align"]:[];g=Dt({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:i,shift:o,wrapperClasses:b}]})}return/cancel/.test(n)&&(g.height=r.height,g.depth=r.depth),/cancel/.test(n)&&!s?Be(["mord","cancel-lap"],[g],t):Be(["mord"],[g],t)},A0=(e,t)=>{var r=0,n=new Ie(e.label.includes("colorbox")?"mpadded":"menclose",[Ft(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: "+Ne(a)+" solid "+e.borderColor)}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n};Ge({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,r){var{parser:n,funcName:a}=e,i=ht(t[0],"color-token").color,o=t[1];return{type:"enclose",mode:n.mode,label:a,backgroundColor:i,body:o}},htmlBuilder:D0,mathmlBuilder:A0}),Ge({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,r){var{parser:n,funcName:a}=e,i=ht(t[0],"color-token").color,o=ht(t[1],"color-token").color,s=t[2];return{type:"enclose",mode:n.mode,label:a,backgroundColor:o,borderColor:i,body:s}},htmlBuilder:D0,mathmlBuilder:A0}),Ge({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]}}}),Ge({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:D0,mathmlBuilder:A0}),Ge({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:D0,mathmlBuilder:A0}),Ge({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 vu={};function cn(e){for(var{type:t,names:r,props:n,handler:a,htmlBuilder:i,mathmlBuilder:o}=e,s={type:t,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:a},c=0;c<r.length;++c)vu[r[c]]=s;i&&(m0[t]=i),o&&(v0[t]=o)}var gu={};function O(e,t){gu[e]=t}class kr{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 kr(t.loc.lexer,t.loc.start,r.loc.end):t&&t.loc}}class Br{constructor(t,r){this.text=t,this.loc=r}range(t,r){return new Br(r,kr.range(this,t))}}function yu(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 B0=e=>{var t=e.parser.settings;if(!t.displayMode)throw new Me("{"+e.envName+"} can be used only in display mode.")},I6=new Set(["gather","gather*"]);function vl(e){if(!e.includes("ed"))return!e.includes("*")}function Un(e,t,r){var{hskipBeforeAndAfter:n,addJot:a,cols:i,arraystretch:o,colSeparationType:s,autoTag:c,singleRow:u,emptySingleRow:f,maxNumCols:h,leqno:d}=t;if(e.gullet.beginGroup(),u||e.gullet.macros.set("\\cr","\\\\\\relax"),!o){var p=e.gullet.expandMacroAsText("\\arraystretch");if(p==null)o=1;else if(o=parseFloat(p),!o||o<0)throw new Me("Invalid \\arraystretch: "+p)}e.gullet.beginGroup();var w=[],m=[w],_=[],y=[],g=c!=null?[]:void 0;function b(){c&&e.gullet.macros.set("\\@eqnsw","1",!0)}function v(){g&&(e.gullet.macros.get("\\df@tag")?(g.push(e.subparse([new Br("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):g.push(!!c&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(b(),y.push(yu(e));;){var E=e.parseExpression(!1,u?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var C={type:"ordgroup",mode:e.mode,body:E};r&&(C={type:"styling",mode:e.mode,style:r,body:[C]}),w.push(C);var A=e.fetch().text;if(A==="&"){if(h&&w.length===h){if(u||s)throw new Me("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(),w.length===1&&C.type==="styling"&&C.body.length===1&&C.body[0].type==="ordgroup"&&C.body[0].body.length===0&&(m.length>1||!f)&&m.pop(),y.length<m.length+1&&y.push([]);break}else if(A==="\\\\"){e.consume();var k=void 0;e.gullet.future().text!==" "&&(k=e.parseSizeGroup(!0)),_.push(k?k.value:null),v(),y.push(yu(e)),w=[],m.push(w),b()}else throw new Me("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:m,cols:i,rowGaps:_,hskipBeforeAndAfter:n,hLinesBeforeRow:y,colSeparationType:s,tags:g,leqno:d}}function gl(e){return e.slice(0,1)==="d"?"display":"text"}var un=function(t,r){var n,a,i=t.body.length,o=t.hLinesBeforeRow,s=0,c=new Array(i),u=[],f=Math.max(r.fontMetrics().arrayRuleWidth,r.minRuleThickness),h=1/r.fontMetrics().ptPerEm,d=5*h;if(t.colSeparationType&&t.colSeparationType==="small"){var p=r.havingStyle(lt.SCRIPT).sizeMultiplier;d=.2778*(p/r.sizeMultiplier)}var w=t.colSeparationType==="CD"?$t({number:3,unit:"ex"},r):12*h,m=3*h,_=t.arraystretch*w,y=.7*_,g=.3*_,b=0;function v(pt){for(var Ct=0;Ct<pt.length;++Ct)Ct>0&&(b+=.25),u.push({pos:b,isDashed:pt[Ct]})}for(v(o[0]),n=0;n<t.body.length;++n){var E=t.body[n],C=y,A=g;s<E.length&&(s=E.length);var k=new Array(E.length);for(a=0;a<E.length;++a){var B=At(E[a],r);A<B.depth&&(A=B.depth),C<B.height&&(C=B.height),k[a]=B}var T=t.rowGaps[n],F=0;T&&(F=$t(T,r),F>0&&(F+=g,A<F&&(A=F),F=0)),t.addJot&&n<t.body.length-1&&(A+=m),k.height=C,k.depth=A,b+=C,k.pos=b,b+=A+F,c[n]=k,v(o[n+1])}var V=b/2+r.fontMetrics().axisHeight,L=t.cols||[],H=[],X,W,Z=[];if(t.tags&&t.tags.some(pt=>pt))for(n=0;n<i;++n){var Q=c[n],K=Q.pos-V,ue=t.tags[n],ne=void 0;ue===!0?ne=Be(["eqn-num"],[],r):ue===!1?ne=Be([],[],r):ne=Be([],er(ue,r,!0),r),ne.depth=Q.depth,ne.height=Q.height,Z.push({type:"elem",elem:ne,shift:K})}for(a=0,W=0;a<s||W<L.length;++a,++W){for(var fe,re=L[W],ye=!0;((he=re)==null?void 0:he.type)==="separator";){var he;if(ye||(X=Be(["arraycolsep"],[]),X.style.width=Ne(r.fontMetrics().doubleRuleSep),H.push(X)),re.separator==="|"||re.separator===":"){var ke=re.separator==="|"?"solid":"dashed",Ee=Be(["vertical-separator"],[],r);Ee.style.height=Ne(b),Ee.style.borderRightWidth=Ne(f),Ee.style.borderRightStyle=ke,Ee.style.margin="0 "+Ne(-f/2);var me=b-V;me&&(Ee.style.verticalAlign=Ne(-me)),H.push(Ee)}else throw new Me("Invalid separator type: "+re.separator);W++,re=L[W],ye=!1}if(!(a>=s)){var te=void 0;if(a>0||t.hskipBeforeAndAfter){var se,ie;te=(se=(ie=re)==null?void 0:ie.pregap)!=null?se:d,te!==0&&(X=Be(["arraycolsep"],[]),X.style.width=Ne(te),H.push(X))}var _e=[];for(n=0;n<i;++n){var He=c[n],je=He[a];if(je){var Ve=He.pos-V;je.depth=He.depth,je.height=He.height,_e.push({type:"elem",elem:je,shift:Ve})}}var ge=Dt({positionType:"individualShift",children:_e}),Ce=Be(["col-align-"+(((fe=re)==null?void 0:fe.align)||"c")],[ge]);if(H.push(Ce),a<s-1||t.hskipBeforeAndAfter){var ve,Oe;te=(ve=(Oe=re)==null?void 0:Oe.postgap)!=null?ve:d,te!==0&&(X=Be(["arraycolsep"],[]),X.style.width=Ne(te),H.push(X))}}}var tt=Be(["mtable"],H);if(u.length>0){for(var at=Da("hline",r,f),st=Da("hdashline",r,f),It=[{type:"elem",elem:tt,shift:0}];u.length>0;){var ut=u.pop(),ft=ut.pos-V;ut.isDashed?It.push({type:"elem",elem:st,shift:ft}):It.push({type:"elem",elem:at,shift:ft})}tt=Dt({positionType:"individualShift",children:It})}if(Z.length===0)return Be(["mord"],[tt],r);var vt=Dt({positionType:"individualShift",children:Z}),gt=Be(["tag"],[vt],r);return kn([tt,gt])},z6={c:"center ",l:"left ",r:"right "},fn=function(t,r){for(var n=[],a=new Ie("mtd",[],["mtr-glue"]),i=new Ie("mtd",[],["mml-eqn-num"]),o=0;o<t.body.length;o++){for(var s=t.body[o],c=[],u=0;u<s.length;u++)c.push(new Ie("mtd",[Ft(s[u],r)]));t.tags&&t.tags[o]&&(c.unshift(a),c.push(a),t.leqno?c.unshift(i):c.push(i)),n.push(new Ie("mtr",c))}var f=new Ie("mtable",n),h=t.arraystretch===.5?.1:.16+t.arraystretch-1+(t.addJot?.09:0);f.setAttribute("rowspacing",Ne(h));var d="",p="";if(t.cols&&t.cols.length>0){var w=t.cols,m="",_=!1,y=0,g=w.length;w[0].type==="separator"&&(d+="top ",y=1),w[w.length-1].type==="separator"&&(d+="bottom ",g-=1);for(var b=y;b<g;b++){var v=w[b];v.type==="align"?(p+=z6[v.align],_&&(m+="none "),_=!0):v.type==="separator"&&_&&(m+=v.separator==="|"?"solid ":"dashed ",_=!1)}f.setAttribute("columnalign",p.trim()),/[sd]/.test(m)&&f.setAttribute("columnlines",m.trim())}if(t.colSeparationType==="align"){for(var E=t.cols||[],C="",A=1;A<E.length;A++)C+=A%2?"0em ":"1em ";f.setAttribute("columnspacing",C.trim())}else t.colSeparationType==="alignat"||t.colSeparationType==="gather"?f.setAttribute("columnspacing","0em"):t.colSeparationType==="small"?f.setAttribute("columnspacing","0.2778em"):t.colSeparationType==="CD"?f.setAttribute("columnspacing","0.5em"):f.setAttribute("columnspacing","1em");var k="",B=t.hLinesBeforeRow;d+=B[0].length>0?"left ":"",d+=B[B.length-1].length>0?"right ":"";for(var T=1;T<B.length-1;T++)k+=B[T].length===0?"none ":B[T][0]?"dashed ":"solid ";return/[sd]/.test(k)&&f.setAttribute("rowlines",k.trim()),d!==""&&(f=new Ie("menclose",[f]),f.setAttribute("notation",d.trim())),t.arraystretch&&t.arraystretch<1&&(f=new Ie("mstyle",[f]),f.setAttribute("scriptlevel","1")),f},bu=function(t,r){t.envName.includes("ed")||B0(t);var n=[],a=t.envName.includes("at")?"alignat":"align",i=t.envName==="split",o=Un(t.parser,{cols:n,addJot:!0,autoTag:i?void 0:vl(t.envName),emptySingleRow:!0,colSeparationType:a,maxNumCols:i?2:void 0,leqno:t.parser.settings.leqno},"display"),s=0,c=0,u={type:"ordgroup",mode:t.mode,body:[]};if(r[0]&&r[0].type==="ordgroup"){for(var f="",h=0;h<r[0].body.length;h++){var d=ht(r[0].body[h],"textord");f+=d.text}s=Number(f),c=s*2}var p=!c;o.body.forEach(function(y){for(var g=1;g<y.length;g+=2){var b=ht(y[g],"styling"),v=ht(b.body[0],"ordgroup");v.body.unshift(u)}if(p)c<y.length&&(c=y.length);else{var E=y.length/2;if(s<E)throw new Me("Too many math in a row: "+("expected "+s+", but got "+E),y[0])}});for(var w=0;w<c;++w){var m="r",_=0;w%2===1?m="l":w>0&&p&&(_=1),n[w]={type:"align",align:m,pregap:_,postgap:0}}return o.colSeparationType=p?"align":"alignat",o};cn({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var r=x0(t[0]),n=r?[t[0]]:ht(t[0],"ordgroup").body,a=n.map(function(o){var s=_0(o),c=s.text;if("lcr".includes(c))return{type:"align",align:c};if(c==="|")return{type:"separator",separator:"|"};if(c===":")return{type:"separator",separator:":"};throw new Me("Unknown column alignment: "+c,o)}),i={cols:a,hskipBeforeAndAfter:!0,maxNumCols:a.length};return Un(e.parser,i,gl(e.envName))},htmlBuilder:un,mathmlBuilder:fn}),cn({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 Me("Expected l or c or r",a.nextToken);a.consume(),a.consumeSpaces(),a.expect("]"),a.consume(),n.cols=[{type:"align",align:r}]}}var i=Un(e.parser,n,gl(e.envName)),o=Math.max(0,...i.body.map(s=>s.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:un,mathmlBuilder:fn}),cn({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:.5},r=Un(e.parser,t,"script");return r.colSeparationType="small",r},htmlBuilder:un,mathmlBuilder:fn}),cn({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var r=x0(t[0]),n=r?[t[0]]:ht(t[0],"ordgroup").body,a=n.map(function(s){var c=_0(s),u=c.text;if("lc".includes(u))return{type:"align",align:u};throw new Me("Unknown column alignment: "+u,s)});if(a.length>1)throw new Me("{subarray} can contain only one column");var i={cols:a,hskipBeforeAndAfter:!1,arraystretch:.5},o=Un(e.parser,i,"script");if(o.body.length>0&&o.body[0].length>1)throw new Me("{subarray} can contain only one column");return o},htmlBuilder:un,mathmlBuilder:fn}),cn({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=Un(e.parser,t,gl(e.envName));return{type:"leftright",mode:e.mode,body:[r],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:un,mathmlBuilder:fn}),cn({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:bu,htmlBuilder:un,mathmlBuilder:fn}),cn({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){I6.has(e.envName)&&B0(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:vl(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Un(e.parser,t,"display")},htmlBuilder:un,mathmlBuilder:fn}),cn({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:bu,htmlBuilder:un,mathmlBuilder:fn}),cn({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){B0(e);var t={autoTag:vl(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Un(e.parser,t,"display")},htmlBuilder:un,mathmlBuilder:fn}),cn({type:"array",names:["CD"],props:{numArgs:0},handler(e){return B0(e),w6(e.parser)},htmlBuilder:un,mathmlBuilder:fn}),O("\\nonumber","\\gdef\\@eqnsw{0}"),O("\\notag","\\nonumber"),Ge({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new Me(e.funcName+" valid only within array environment")}});var wu=vu;Ge({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 Me("Invalid environment name",a);for(var i="",o=0;o<a.body.length;++o)i+=ht(a.body[o],"textord").text;if(n==="\\begin"){if(!wu.hasOwnProperty(i))throw new Me("No such environment: "+i,a);var s=wu[i],{args:c,optArgs:u}=r.parseArguments("\\begin{"+i+"}",s),f={mode:r.mode,envName:i,parser:r},h=s.handler(f,c,u);r.expect("\\end",!1);var d=r.nextToken,p=ht(r.parseFunction(),"environment");if(p.name!==i)throw new Me("Mismatch: \\begin{"+i+"} matched by \\end{"+p.name+"}",d);return h}return{type:"environment",mode:r.mode,name:i,nameGroup:a}}});var _u=(e,t)=>{var r=e.font,n=t.withFont(r);return At(e.body,n)},xu=(e,t)=>{var r=e.font,n=t.withFont(r);return Ft(e.body,n)},ku={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};Ge({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=g0(t[0]),i=n;return i in ku&&(i=ku[i]),{type:"font",mode:r.mode,font:i.slice(1),body:a}},htmlBuilder:_u,mathmlBuilder:xu}),Ge({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:S0(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:bn(n)}}}),Ge({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),s="math"+n.slice(1);return{type:"font",mode:i,font:s,body:{type:"ordgroup",mode:r.mode,body:o}}},htmlBuilder:_u,mathmlBuilder:xu});var F6=(e,t)=>{var r=t.style,n=r.fracNum(),a=r.fracDen(),i;i=t.havingStyle(n);var o=At(e.numer,i,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,c=3.5/t.fontMetrics().ptPerEm;o.height=o.height<s?s:o.height,o.depth=o.depth<c?c:o.depth}i=t.havingStyle(a);var u=At(e.denom,i,t),f,h,d;e.hasBarLine?(e.barSize?(h=$t(e.barSize,t),f=Da("frac-line",t,h)):f=Da("frac-line",t),h=f.height,d=f.height):(f=null,h=0,d=t.fontMetrics().defaultRuleThickness);var p,w,m;r.size===lt.DISPLAY.size?(p=t.fontMetrics().num1,h>0?w=3*d:w=7*d,m=t.fontMetrics().denom1):(h>0?(p=t.fontMetrics().num2,w=d):(p=t.fontMetrics().num3,w=3*d),m=t.fontMetrics().denom2);var _;if(f){var g=t.fontMetrics().axisHeight;p-o.depth-(g+.5*h)<w&&(p+=w-(p-o.depth-(g+.5*h))),g-.5*h-(u.height-m)<w&&(m+=w-(g-.5*h-(u.height-m)));var b=-(g-.5*h);_=Dt({positionType:"individualShift",children:[{type:"elem",elem:u,shift:m},{type:"elem",elem:f,shift:b},{type:"elem",elem:o,shift:-p}]})}else{var y=p-o.depth-(u.height-m);y<w&&(p+=.5*(w-y),m+=.5*(w-y)),_=Dt({positionType:"individualShift",children:[{type:"elem",elem:u,shift:m},{type:"elem",elem:o,shift:-p}]})}i=t.havingStyle(r),_.height*=i.sizeMultiplier/t.sizeMultiplier,_.depth*=i.sizeMultiplier/t.sizeMultiplier;var v;r.size===lt.DISPLAY.size?v=t.fontMetrics().delim1:r.size===lt.SCRIPTSCRIPT.size?v=t.havingStyle(lt.SCRIPT).fontMetrics().delim2:v=t.fontMetrics().delim2;var E,C;return e.leftDelim==null?E=di(t,["mopen"]):E=pl(e.leftDelim,v,!0,t.havingStyle(r),e.mode,["mopen"]),e.continued?C=Be([]):e.rightDelim==null?C=di(t,["mclose"]):C=pl(e.rightDelim,v,!0,t.havingStyle(r),e.mode,["mclose"]),Be(["mord"].concat(i.sizingClasses(t)),[E,Be(["mfrac"],[_]),C],t)},N6=(e,t)=>{var r=new Ie("mfrac",[Ft(e.numer,t),Ft(e.denom,t)]);if(!e.hasBarLine)r.setAttribute("linethickness","0px");else if(e.barSize){var n=$t(e.barSize,t);r.setAttribute("linethickness",Ne(n))}if(e.leftDelim!=null||e.rightDelim!=null){var a=[];if(e.leftDelim!=null){var i=new Ie("mo",[new Zt(e.leftDelim.replace("\\",""))]);i.setAttribute("fence","true"),a.push(i)}if(a.push(r),e.rightDelim!=null){var o=new Ie("mo",[new Zt(e.rightDelim.replace("\\",""))]);o.setAttribute("fence","true"),a.push(o)}return rl(a)}return r},Su=(e,t)=>{if(!t)return e;var r={type:"styling",mode:e.mode,style:t,body:[e]};return r};Ge({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,s=null,c=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,s="(",c=")";break;case"\\\\bracefrac":o=!1,s="\\{",c="\\}";break;case"\\\\brackfrac":o=!1,s="[",c="]";break;default:throw new Error("Unrecognized genfrac command")}var u=n==="\\cfrac",f=null;return u||n.startsWith("\\d")?f="display":n.startsWith("\\t")&&(f="text"),Su({type:"genfrac",mode:r.mode,numer:a,denom:i,continued:u,hasBarLine:o,leftDelim:s,rightDelim:c,barSize:null},f)},htmlBuilder:F6,mathmlBuilder:N6}),Ge({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 Eu=["display","text","script","scriptscript"],Cu=function(t){var r=null;return t.length>0&&(r=t,r=r==="."?null:r),r};Ge({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=g0(t[0]),o=i.type==="atom"&&i.family==="open"?Cu(i.text):null,s=g0(t[1]),c=s.type==="atom"&&s.family==="close"?Cu(s.text):null,u=ht(t[2],"size"),f,h=null;u.isBlank?f=!0:(h=u.value,f=h.number>0);var d=null,p=t[3];if(p.type==="ordgroup"){if(p.body.length>0){var w=ht(p.body[0],"textord");d=Eu[Number(w.text)]}}else p=ht(p,"textord"),d=Eu[Number(p.text)];return Su({type:"genfrac",mode:r.mode,numer:n,denom:a,continued:!1,hasBarLine:f,barSize:h,leftDelim:o,rightDelim:c},d)}}),Ge({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:ht(t[0],"size").value,token:a}}}),Ge({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=t[0],i=ht(t[1],"infix").size;if(!i)throw new Error("\\\\abovefrac expected size, but got "+String(i));var o=t[2],s=i.number>0;return{type:"genfrac",mode:r.mode,numer:a,denom:o,continued:!1,hasBarLine:s,barSize:i,leftDelim:null,rightDelim:null}}});var Du=(e,t)=>{var r=t.style,n,a;e.type==="supsub"?(n=e.sup?At(e.sup,t.havingStyle(r.sup()),t):At(e.sub,t.havingStyle(r.sub()),t),a=ht(e.base,"horizBrace")):a=ht(e,"horizBrace");var i=At(a.base,t.havingBaseStyle(lt.DISPLAY)),o=w0(a,t),s;if(a.isOver?(s=Dt({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:o}]}),s.children[0].children[0].children[1].classes.push("svg-align")):(s=Dt({positionType:"bottom",positionData:i.depth+.1+o.height,children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:i}]}),s.children[0].children[0].children[0].classes.push("svg-align")),n){var c=Be(["minner",a.isOver?"mover":"munder"],[s],t);a.isOver?s=Dt({positionType:"firstBaseline",children:[{type:"elem",elem:c},{type:"kern",size:.2},{type:"elem",elem:n}]}):s=Dt({positionType:"bottom",positionData:c.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:c}]})}return Be(["minner",a.isOver?"mover":"munder"],[s],t)},O6=(e,t)=>{var r=b0(e.label);return new Ie(e.isOver?"mover":"munder",[Ft(e.base,t),r])};Ge({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:Du,mathmlBuilder:O6}),Ge({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[1],a=ht(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:a})?{type:"href",mode:r.mode,href:a,body:Xt(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var r=er(e.body,t,!1);return Qg(e.href,[],r,t)},mathmlBuilder:(e,t)=>{var r=$n(e.body,t);return r instanceof Ie||(r=new Ie("mrow",[r])),r.setAttribute("href",e.href),r}}),Ge({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=ht(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 s={type:"text",mode:r.mode,font:"\\texttt",body:a};return{type:"href",mode:r.mode,href:n,body:Xt(s)}}}),Ge({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:Xt(t[0])}},htmlBuilder(e,t){var r=er(e.body,t,!1);return kn(r)},mathmlBuilder(e,t){return new Ie("mrow",Ar(e.body,t))}}),Ge({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=ht(t[0],"raw").string,o=t[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var s,c={};switch(n){case"\\htmlClass":c.class=i,s={command:"\\htmlClass",class:i};break;case"\\htmlId":c.id=i,s={command:"\\htmlId",id:i};break;case"\\htmlStyle":c.style=i,s={command:"\\htmlStyle",style:i};break;case"\\htmlData":{for(var u=i.split(","),f=0;f<u.length;f++){var h=u[f],d=h.indexOf("=");if(d<0)throw new Me("\\htmlData key/value '"+h+"' missing equals sign");var p=h.slice(0,d),w=h.slice(d+1);c["data-"+p.trim()]=w}s={command:"\\htmlData",attributes:c};break}default:throw new Error("Unrecognized html command")}return r.settings.isTrusted(s)?{type:"html",mode:r.mode,attributes:c,body:Xt(o)}:r.formatUnsupportedCmd(n)},htmlBuilder:(e,t)=>{var r=er(e.body,t,!1),n=["enclosing"];e.attributes.class&&n.push(...e.attributes.class.trim().split(/\s+/));var a=Be(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)=>$n(e.body,t)}),Ge({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:Xt(t[0]),mathml:Xt(t[1])}},htmlBuilder:(e,t)=>{var r=er(e.html,t,!1);return kn(r)},mathmlBuilder:(e,t)=>$n(e.mathml,t)});var yl=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 Me("Invalid size: '"+t+"' in \\includegraphics");var n={number:+(r[1]+r[2]),unit:r[3]};if(!Ec(n))throw new Me("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};Ge({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"},s="";if(r[0])for(var c=ht(r[0],"raw").string,u=c.split(","),f=0;f<u.length;f++){var h=u[f].split("=");if(h.length===2){var d=h[1].trim();switch(h[0].trim()){case"alt":s=d;break;case"width":a=yl(d);break;case"height":i=yl(d);break;case"totalheight":o=yl(d);break;default:throw new Me("Invalid key: '"+h[0]+"' in \\includegraphics.")}}}var p=ht(t[0],"url").url;return s===""&&(s=p,s=s.replace(/^.*[\\/]/,""),s=s.substring(0,s.lastIndexOf("."))),n.settings.isTrusted({command:"\\includegraphics",url:p})?{type:"includegraphics",mode:n.mode,alt:s,width:a,height:i,totalheight:o,src:p}:n.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var r=$t(e.height,t),n=0;e.totalheight.number>0&&(n=$t(e.totalheight,t)-r);var a=0;e.width.number>0&&(a=$t(e.width,t));var i={height:Ne(r+n)};a>0&&(i.width=Ne(a)),n>0&&(i.verticalAlign=Ne(-n));var o=new Ug(e.src,e.alt,i);return o.height=r,o.depth=n,o},mathmlBuilder:(e,t)=>{var r=new Ie("mglyph",[]);r.setAttribute("alt",e.alt);var n=$t(e.height,t),a=0;if(e.totalheight.number>0&&(a=$t(e.totalheight,t)-n,r.setAttribute("valign",Ne(-a))),r.setAttribute("height",Ne(n+a)),e.width.number>0){var i=$t(e.width,t);r.setAttribute("width",Ne(i))}return r.setAttribute("src",e.src),r}}),Ge({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=ht(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 Pc(e.dimension,t)},mathmlBuilder(e,t){var r=$t(e.dimension,t);return new Gc(r)}}),Ge({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=Be([],[At(e.body,t)]),r=Be(["inner"],[r],t)):r=Be(["inner"],[At(e.body,t)]);var n=Be(["fix"],[]),a=Be([e.alignment],[r,n],t),i=Be(["strut"]);return i.style.height=Ne(a.height+a.depth),a.depth&&(i.style.verticalAlign=Ne(-a.depth)),a.children.unshift(i),a=Be(["thinbox"],[a],t),Be(["mord","vbox"],[a],t)},mathmlBuilder:(e,t)=>{var r=new Ie("mpadded",[Ft(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}}),Ge({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}}}),Ge({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new Me("Mismatched "+e.funcName)}});var Au=(e,t)=>{switch(t.style.size){case lt.DISPLAY.size:return e.display;case lt.TEXT.size:return e.text;case lt.SCRIPT.size:return e.script;case lt.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};Ge({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"mathchoice",mode:r.mode,display:Xt(t[0]),text:Xt(t[1]),script:Xt(t[2]),scriptscript:Xt(t[3])}},htmlBuilder:(e,t)=>{var r=Au(e,t),n=er(r,t,!1);return kn(n)},mathmlBuilder:(e,t)=>{var r=Au(e,t);return $n(r,t)}});var Bu=(e,t,r,n,a,i,o)=>{e=Be([],[e]);var s=r&&bn(r),c,u;if(t){var f=At(t,n.havingStyle(a.sup()),n);u={elem:f,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-f.depth)}}if(r){var h=At(r,n.havingStyle(a.sub()),n);c={elem:h,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-h.height)}}var d;if(u&&c){var p=n.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+o;d=Dt({positionType:"bottom",positionData:p,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:Ne(-i)},{type:"kern",size:c.kern},{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:Ne(i)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else if(c){var w=e.height-o;d=Dt({positionType:"top",positionData:w,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:Ne(-i)},{type:"kern",size:c.kern},{type:"elem",elem:e}]})}else if(u){var m=e.depth+o;d=Dt({positionType:"bottom",positionData:m,children:[{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:Ne(i)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else return e;var _=[d];if(c&&i!==0&&!s){var y=Be(["mspace"],[],n);y.style.marginRight=Ne(i),_.unshift(y)}return Be(["mop","op-limits"],_,n)},Tu=new Set(["\\smallint"]),Ba=(e,t)=>{var r,n,a=!1,i;e.type==="supsub"?(r=e.sup,n=e.sub,i=ht(e.base,"op"),a=!0):i=ht(e,"op");var o=t.style,s=!1;o.size===lt.DISPLAY.size&&i.symbol&&!Tu.has(i.name)&&(s=!0);var c;if(i.symbol){var u=s?"Size2-Regular":"Size1-Regular",f="";if((i.name==="\\oiint"||i.name==="\\oiiint")&&(f=i.name.slice(1),i.name=f==="oiint"?"\\iint":"\\iiint"),c=gr(i.name,u,"math",t,["mop","op-symbol",s?"large-op":"small-op"]),f.length>0){var h=c.italic,d=Vc(f+"Size"+(s?"2":"1"),t);c=Dt({positionType:"individualShift",children:[{type:"elem",elem:c,shift:0},{type:"elem",elem:d,shift:s?.08:0}]}),i.name="\\"+f,c.classes.unshift("mop"),c.italic=h}}else if(i.body){var p=er(i.body,t,!0);p.length===1&&p[0]instanceof Cr?(c=p[0],c.classes[0]="mop"):c=Be(["mop"],p,t)}else{for(var w=[],m=1;m<i.name.length;m++)w.push(Zo(i.name[m],i.mode,t));c=Be(["mop"],w,t)}var _=0,y=0;return(c instanceof Cr||i.name==="\\oiint"||i.name==="\\oiiint")&&!i.suppressBaseShift&&(_=(c.height-c.depth)/2-t.fontMetrics().axisHeight,y=c.italic||0),a?Bu(c,r,n,t,o,y,_):(_&&(c.style.position="relative",c.style.top=Ne(_)),c)},mi=(e,t)=>{var r;if(e.symbol)r=new Ie("mo",[$r(e.name,e.mode)]),Tu.has(e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new Ie("mo",Ar(e.body,t));else{r=new Ie("mi",[new Zt(e.name.slice(1))]);var n=new Ie("mo",[$r("","text")]);e.parentIsSupSub?r=new Ie("mrow",[r,n]):r=Hc([r,n])}return r},L6={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};Ge({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=L6[a]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:Ba,mathmlBuilder:mi}),Ge({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:Xt(n)}},htmlBuilder:Ba,mathmlBuilder:mi});var P6={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};Ge({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:Ba,mathmlBuilder:mi}),Ge({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:Ba,mathmlBuilder:mi}),Ge({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=P6[n]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:Ba,mathmlBuilder:mi});var Mu=(e,t)=>{var r,n,a=!1,i;e.type==="supsub"?(r=e.sup,n=e.sub,i=ht(e.base,"operatorname"),a=!0):i=ht(e,"operatorname");var o;if(i.body.length>0){for(var s=i.body.map(h=>{var d="text"in h?h.text:void 0;return typeof d=="string"?{type:"textord",mode:h.mode,text:d}:h}),c=er(s,t.withFont("mathrm"),!0),u=0;u<c.length;u++){var f=c[u];f instanceof Cr&&(f.text=f.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}o=Be(["mop"],c,t)}else o=Be(["mop"],[],t);return a?Bu(o,r,n,t,t.style,0,0):o},R6=(e,t)=>{for(var r=Ar(e.body,t.withFont("mathrm")),n=!0,a=0;a<r.length;a++){var i=r[a];if(!(i instanceof Gc))if(i instanceof Ie)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 Zt?o.text=o.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break}default:n=!1}else n=!1}if(n){var s=r.map(f=>f.toText()).join("");r=[new Zt(s)]}var c=new Ie("mi",r);c.setAttribute("mathvariant","normal");var u=new Ie("mo",[$r("","text")]);return e.parentIsSupSub?new Ie("mrow",[c,u]):Hc([c,u])};Ge({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:Xt(a),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:Mu,mathmlBuilder:R6}),O("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),aa({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?kn(er(e.body,t,!1)):Be(["mord"],er(e.body,t,!0),t)},mathmlBuilder(e,t){return $n(e.body,t,!0)}}),Ge({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=At(e.body,t.havingCrampedStyle()),n=Da("overline-line",t),a=t.fontMetrics().defaultRuleThickness,i=Dt({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*a},{type:"elem",elem:n},{type:"kern",size:a}]});return Be(["mord","overline"],[i],t)},mathmlBuilder(e,t){var r=new Ie("mo",[new Zt("‾")]);r.setAttribute("stretchy","true");var n=new Ie("mover",[Ft(e.body,t),r]);return n.setAttribute("accent","true"),n}}),Ge({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:Xt(n)}},htmlBuilder:(e,t)=>{var r=er(e.body,t.withPhantom(),!1);return kn(r)},mathmlBuilder:(e,t)=>{var r=Ar(e.body,t);return new Ie("mphantom",r)}}),O("\\hphantom","\\smash{\\phantom{#1}}"),Ge({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=Be(["inner"],[At(e.body,t.withPhantom())]),n=Be(["fix"],[]);return Be(["mord","rlap"],[r,n],t)},mathmlBuilder:(e,t)=>{var r=Ar(Xt(e.body),t),n=new Ie("mphantom",r),a=new Ie("mpadded",[n]);return a.setAttribute("width","0px"),a}}),Ge({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e,n=ht(t[0],"size").value,a=t[1];return{type:"raisebox",mode:r.mode,dy:n,body:a}},htmlBuilder(e,t){var r=At(e.body,t),n=$t(e.dy,t);return Dt({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]})},mathmlBuilder(e,t){var r=new Ie("mpadded",[Ft(e.body,t)]),n=e.dy.number+e.dy.unit;return r.setAttribute("voffset",n),r}}),Ge({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}}),Ge({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=ht(t[0],"size"),o=ht(t[1],"size");return{type:"rule",mode:n.mode,shift:a&&ht(a,"size").value,width:i.value,height:o.value}},htmlBuilder(e,t){var r=Be(["mord","rule"],[],t),n=$t(e.width,t),a=$t(e.height,t),i=e.shift?$t(e.shift,t):0;return r.style.borderRightWidth=Ne(n),r.style.borderTopWidth=Ne(a),r.style.bottom=Ne(i),r.width=n,r.height=a+i,r.depth=-i,r.maxFontSize=a*1.125*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=$t(e.width,t),n=$t(e.height,t),a=e.shift?$t(e.shift,t):0,i=t.color&&t.getColor()||"black",o=new Ie("mspace");o.setAttribute("mathbackground",i),o.setAttribute("width",Ne(r)),o.setAttribute("height",Ne(n));var s=new Ie("mpadded",[o]);return a>=0?s.setAttribute("height",Ne(a)):(s.setAttribute("height",Ne(a)),s.setAttribute("depth",Ne(-a))),s.setAttribute("voffset",Ne(a)),s}});function Iu(e,t,r){for(var n=er(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 kn(n)}var zu=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],V6=(e,t)=>{var r=t.havingSize(e.size);return Iu(e.body,r,t)};Ge({type:"sizing",names:zu,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:zu.indexOf(n)+1,body:i}},htmlBuilder:V6,mathmlBuilder:(e,t)=>{var r=t.havingSize(e.size),n=Ar(e.body,r),a=new Ie("mstyle",n);return a.setAttribute("mathsize",Ne(r.sizeMultiplier)),a}}),Ge({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]&&ht(r[0],"ordgroup");if(o)for(var s="",c=0;c<o.body.length;++c){var u=o.body[c];if(s=_0(u).text,s==="t")a=!0;else if(s==="b")i=!0;else{a=!1,i=!1;break}}else a=!0,i=!0;var f=t[0];return{type:"smash",mode:n.mode,body:f,smashHeight:a,smashDepth:i}},htmlBuilder:(e,t)=>{var r=Be([],[At(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 Be(["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=Dt({positionType:"firstBaseline",children:[{type:"elem",elem:r}]});return Be(["mord"],[a],t)},mathmlBuilder:(e,t)=>{var r=new Ie("mpadded",[Ft(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}}),Ge({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=At(e.body,t.havingCrampedStyle());r.height===0&&(r.height=t.fontMetrics().xHeight),r=Aa(r,t);var n=t.fontMetrics(),a=n.defaultRuleThickness,i=a;t.style.id<lt.TEXT.id&&(i=t.fontMetrics().xHeight);var o=a+i/4,s=r.height+r.depth+o+a,{span:c,ruleWidth:u,advanceWidth:f}=C6(s,t),h=c.height-u;h>r.height+r.depth+o&&(o=(o+h-r.height-r.depth)/2);var d=c.height-r.height-o-u;r.style.paddingLeft=Ne(f);var p=Dt({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+d)},{type:"elem",elem:c},{type:"kern",size:u}]});if(e.index){var w=t.havingStyle(lt.SCRIPTSCRIPT),m=At(e.index,w,t),_=.6*(p.height-p.depth),y=Dt({positionType:"shift",positionData:-_,children:[{type:"elem",elem:m}]}),g=Be(["root"],[y]);return Be(["mord","sqrt"],[g,p],t)}else return Be(["mord","sqrt"],[p],t)},mathmlBuilder(e,t){var{body:r,index:n}=e;return n?new Ie("mroot",[Ft(r,t),Ft(n,t)]):new Ie("msqrt",[Ft(r,t)])}});var Fu={display:lt.DISPLAY,text:lt.TEXT,script:lt.SCRIPT,scriptscript:lt.SCRIPTSCRIPT};Ge({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=Fu[e.style],n=t.havingStyle(r).withFont("");return Iu(e.body,n,t)},mathmlBuilder(e,t){var r=Fu[e.style],n=t.havingStyle(r),a=Ar(e.body,n),i=new Ie("mstyle",a),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},s=o[e.style];return i.setAttribute("scriptlevel",s[0]),i.setAttribute("displaystyle",s[1]),i}});var $6=function(t,r){var n=t.base;if(n)if(n.type==="op"){var a=n.limits&&(r.style.size===lt.DISPLAY.size||n.alwaysHandleSupSub);return a?Ba:null}else if(n.type==="operatorname"){var i=n.alwaysHandleSupSub&&(r.style.size===lt.DISPLAY.size||n.limits);return i?Mu:null}else{if(n.type==="accent")return bn(n.base)?il:null;if(n.type==="horizBrace"){var o=!t.sub;return o===n.isOver?Du:null}else return null}else return null};aa({type:"supsub",htmlBuilder(e,t){var r=$6(e,t);if(r)return r(e,t);var{base:n,sup:a,sub:i}=e,o=At(n,t),s,c,u=t.fontMetrics(),f=0,h=0,d=n&&bn(n);if(a){var p=t.havingStyle(t.style.sup());s=At(a,p,t),d||(f=o.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(i){var w=t.havingStyle(t.style.sub());c=At(i,w,t),d||(h=o.depth+w.fontMetrics().subDrop*w.sizeMultiplier/t.sizeMultiplier)}var m;t.style===lt.DISPLAY?m=u.sup1:t.style.cramped?m=u.sup3:m=u.sup2;var _=t.sizeMultiplier,y=Ne(.5/u.ptPerEm/_),g=null;if(c){var b=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");(o instanceof Cr||b)&&(g=Ne(-o.italic))}var v;if(s&&c){f=Math.max(f,m,s.depth+.25*u.xHeight),h=Math.max(h,u.sub2);var E=u.defaultRuleThickness,C=4*E;if(f-s.depth-(c.height-h)<C){h=C-(f-s.depth)+c.height;var A=.8*u.xHeight-(f-s.depth);A>0&&(f+=A,h-=A)}var k=[{type:"elem",elem:c,shift:h,marginRight:y,marginLeft:g},{type:"elem",elem:s,shift:-f,marginRight:y}];v=Dt({positionType:"individualShift",children:k})}else if(c){h=Math.max(h,u.sub1,c.height-.8*u.xHeight);var B=[{type:"elem",elem:c,marginLeft:g,marginRight:y}];v=Dt({positionType:"shift",positionData:h,children:B})}else if(s)f=Math.max(f,m,s.depth+.25*u.xHeight),v=Dt({positionType:"shift",positionData:-f,children:[{type:"elem",elem:s,marginRight:y}]});else throw new Error("supsub must have either sup or sub.");var T=el(o,"right")||"mord";return Be([T],[o,Be(["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=[Ft(e.base,t)];e.sub&&i.push(Ft(e.sub,t)),e.sup&&i.push(Ft(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===lt.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(t.style===lt.DISPLAY||u.limits)?o="munderover":o="msubsup"}else{var c=e.base;c&&c.type==="op"&&c.limits&&(t.style===lt.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||t.style===lt.DISPLAY)?o="munder":o="msub"}else{var s=e.base;s&&s.type==="op"&&s.limits&&(t.style===lt.DISPLAY||s.alwaysHandleSupSub)||s&&s.type==="operatorname"&&s.alwaysHandleSupSub&&(s.limits||t.style===lt.DISPLAY)?o="mover":o="msup"}return new Ie(o,i)}}),aa({type:"atom",htmlBuilder(e,t){return Zo(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var r=new Ie("mo",[$r(e.text,e.mode)]);if(e.family==="bin"){var n=nl(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 Nu={mi:"italic",mn:"normal",mtext:"normal"};aa({type:"mathord",htmlBuilder(e,t){return h0(e,t,"mathord")},mathmlBuilder(e,t){var r=new Ie("mi",[$r(e.text,e.mode,t)]),n=nl(e,t)||"italic";return n!==Nu[r.type]&&r.setAttribute("mathvariant",n),r}}),aa({type:"textord",htmlBuilder(e,t){return h0(e,t,"textord")},mathmlBuilder(e,t){var r=$r(e.text,e.mode,t),n=nl(e,t)||"normal",a;return e.mode==="text"?a=new Ie("mtext",[r]):/[0-9]/.test(e.text)?a=new Ie("mn",[r]):e.text==="\\prime"?a=new Ie("mo",[r]):a=new Ie("mi",[r]),n!==Nu[a.type]&&a.setAttribute("mathvariant",n),a}});var bl={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},wl={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};aa({type:"spacing",htmlBuilder(e,t){if(wl.hasOwnProperty(e.text)){var r=wl[e.text].className||"";if(e.mode==="text"){var n=h0(e,t,"textord");return n.classes.push(r),n}else return Be(["mspace",r],[Zo(e.text,e.mode,t)],t)}else{if(bl.hasOwnProperty(e.text))return Be(["mspace",bl[e.text]],[],t);throw new Me('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,t){var r;if(wl.hasOwnProperty(e.text))r=new Ie("mtext",[new Zt(" ")]);else{if(bl.hasOwnProperty(e.text))return new Ie("mspace");throw new Me('Unknown type of space "'+e.text+'"')}return r}});var Ou=()=>{var e=new Ie("mtd",[]);return e.setAttribute("width","50%"),e};aa({type:"tag",mathmlBuilder(e,t){var r=new Ie("mtable",[new Ie("mtr",[Ou(),new Ie("mtd",[$n(e.body,t)]),Ou(),new Ie("mtd",[$n(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});var Lu={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Pu={"\\textbf":"textbf","\\textmd":"textmd"},U6={"\\textit":"textit","\\textup":"textup"},Ru=(e,t)=>{var r=e.font;if(r){if(Lu[r])return t.withTextFontFamily(Lu[r]);if(Pu[r])return t.withTextFontWeight(Pu[r]);if(r==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit")}else return t;return t.withTextFontShape(U6[r])};Ge({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:Xt(a),font:n}},htmlBuilder(e,t){var r=Ru(e,t),n=er(e.body,r,!0);return Be(["mord","text"],n,r)},mathmlBuilder(e,t){var r=Ru(e,t);return $n(e.body,r)}}),Ge({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=At(e.body,t),n=Da("underline-line",t),a=t.fontMetrics().defaultRuleThickness,i=Dt({positionType:"top",positionData:r.height,children:[{type:"kern",size:a},{type:"elem",elem:n},{type:"kern",size:3*a},{type:"elem",elem:r}]});return Be(["mord","underline"],[i],t)},mathmlBuilder(e,t){var r=new Ie("mo",[new Zt("‾")]);r.setAttribute("stretchy","true");var n=new Ie("munder",[Ft(e.body,t),r]);return n.setAttribute("accentunder","true"),n}}),Ge({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=At(e.body,t),n=t.fontMetrics().axisHeight,a=.5*(r.height-n-(r.depth+n));return Dt({positionType:"shift",positionData:a,children:[{type:"elem",elem:r}]})},mathmlBuilder(e,t){var r=new Ie("mpadded",[Ft(e.body,t)],["vcenter"]);return new Ie("mrow",[r])}}),Ge({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new Me("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var r=Vu(e),n=[],a=t.havingStyle(t.style.text()),i=0;i<r.length;i++){var o=r[i];o==="~"&&(o="\\textasciitilde"),n.push(gr(o,"Typewriter-Regular",e.mode,a,["mord","texttt"]))}return Be(["mord","text"].concat(a.sizingClasses(t)),Lc(n),a)},mathmlBuilder(e,t){var r=new Zt(Vu(e)),n=new Ie("mtext",[r]);return n.setAttribute("mathvariant","monospace"),n}});var Vu=e=>e.body.replace(/ /g,e.star?"␣":" "),Hn=$c,$u=`[ \r
|
|
256
|
+
]`,H6="\\\\[a-zA-Z@]+",G6="\\\\[^\uD800-\uDFFF]",j6="("+H6+")"+$u+"*",q6=`\\\\(
|
|
257
|
+
|[ \r ]+
|
|
258
|
+
?)[ \r ]*`,_l="[̀-ͯ]",W6=new RegExp(_l+"+$"),X6="("+$u+"+)|"+(q6+"|")+"([!-\\[\\]-‧-豈-]"+(_l+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(_l+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+j6)+("|"+G6+")");class Uu{constructor(t,r){this.input=t,this.settings=r,this.tokenRegex=new RegExp(X6,"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 Br("EOF",new kr(this,r,r));var n=this.tokenRegex.exec(t);if(n===null||n.index!==r)throw new Me("Unexpected character: '"+t[r]+"'",new Br(t[r],new kr(this,r,r+1)));var a=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[a]===14){var i=t.indexOf(`
|
|
259
|
+
`,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 Br(a,new kr(this,r,this.tokenRegex.lastIndex))}}class Z6{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 Me("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 K6=gu;O("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),O("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),O("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}}),O("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}}),O("\\@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}}),O("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),O("\\TextOrMath",function(e){var t=e.consumeArgs(2);return e.mode==="text"?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var Hu={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};O("\\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 Me("\\char` missing argument");n=t.text.charCodeAt(0)}else r=10;if(r){if(n=Hu[t.text],n==null||n>=r)throw new Me("Invalid base-"+r+" digit "+t.text);for(var a;(a=Hu[e.future().text])!=null&&a<r;)n*=r,n+=a,e.popToken()}return"\\@char{"+n+"}"});var xl=(e,t,r,n)=>{var a=e.consumeArg().tokens;if(a.length!==1)throw new Me("\\newcommand's first argument must be a macro name");var i=a[0].text,o=e.isDefined(i);if(o&&!t)throw new Me("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!o&&!r)throw new Me("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var s=0;if(a=e.consumeArg().tokens,a.length===1&&a[0].text==="["){for(var c="",u=e.expandNextToken();u.text!=="]"&&u.text!=="EOF";)c+=u.text,u=e.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new Me("Invalid number of arguments: "+c);s=parseInt(c),a=e.consumeArg().tokens}return o&&n||e.macros.set(i,{tokens:a,numArgs:s}),""};O("\\newcommand",e=>xl(e,!1,!0,!1)),O("\\renewcommand",e=>xl(e,!0,!1,!1)),O("\\providecommand",e=>xl(e,!0,!0,!0)),O("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(r=>r.text).join("")),""}),O("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(r=>r.text).join("")),""}),O("\\show",e=>{var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),Hn[r],Pt.math[r],Pt.text[r]),""}),O("\\bgroup","{"),O("\\egroup","}"),O("~","\\nobreakspace"),O("\\lq","`"),O("\\rq","'"),O("\\aa","\\r a"),O("\\AA","\\r A"),O("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),O("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),O("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),O("ℬ","\\mathscr{B}"),O("ℰ","\\mathscr{E}"),O("ℱ","\\mathscr{F}"),O("ℋ","\\mathscr{H}"),O("ℐ","\\mathscr{I}"),O("ℒ","\\mathscr{L}"),O("ℳ","\\mathscr{M}"),O("ℛ","\\mathscr{R}"),O("ℭ","\\mathfrak{C}"),O("ℌ","\\mathfrak{H}"),O("ℨ","\\mathfrak{Z}"),O("\\Bbbk","\\Bbb{k}"),O("\\llap","\\mathllap{\\textrm{#1}}"),O("\\rlap","\\mathrlap{\\textrm{#1}}"),O("\\clap","\\mathclap{\\textrm{#1}}"),O("\\mathstrut","\\vphantom{(}"),O("\\underbar","\\underline{\\text{#1}}"),O("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}'),O("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),O("\\ne","\\neq"),O("≠","\\neq"),O("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),O("∉","\\notin"),O("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),O("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),O("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),O("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),O("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),O("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),O("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),O("⟂","\\perp"),O("‼","\\mathclose{!\\mkern-0.8mu!}"),O("∌","\\notni"),O("⌜","\\ulcorner"),O("⌝","\\urcorner"),O("⌞","\\llcorner"),O("⌟","\\lrcorner"),O("©","\\copyright"),O("®","\\textregistered"),O("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),O("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),O("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),O("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),O("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),O("⋮","\\vdots"),O("\\varGamma","\\mathit{\\Gamma}"),O("\\varDelta","\\mathit{\\Delta}"),O("\\varTheta","\\mathit{\\Theta}"),O("\\varLambda","\\mathit{\\Lambda}"),O("\\varXi","\\mathit{\\Xi}"),O("\\varPi","\\mathit{\\Pi}"),O("\\varSigma","\\mathit{\\Sigma}"),O("\\varUpsilon","\\mathit{\\Upsilon}"),O("\\varPhi","\\mathit{\\Phi}"),O("\\varPsi","\\mathit{\\Psi}"),O("\\varOmega","\\mathit{\\Omega}"),O("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),O("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),O("\\boxed","\\fbox{$\\displaystyle{#1}$}"),O("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),O("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),O("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),O("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),O("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var Gu={",":"\\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"},Y6=new Set(["bin","rel"]);O("\\dots",function(e){var t="\\dotso",r=e.expandAfterFuture().text;return r in Gu?t=Gu[r]:(r.slice(0,4)==="\\not"||r in Pt.math&&Y6.has(Pt.math[r].group))&&(t="\\dotsb"),t});var kl={")":!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};O("\\dotso",function(e){var t=e.future().text;return t in kl?"\\ldots\\,":"\\ldots"}),O("\\dotsc",function(e){var t=e.future().text;return t in kl&&t!==","?"\\ldots\\,":"\\ldots"}),O("\\cdots",function(e){var t=e.future().text;return t in kl?"\\@cdots\\,":"\\@cdots"}),O("\\dotsb","\\cdots"),O("\\dotsm","\\cdots"),O("\\dotsi","\\!\\cdots"),O("\\dotsx","\\ldots\\,"),O("\\DOTSI","\\relax"),O("\\DOTSB","\\relax"),O("\\DOTSX","\\relax"),O("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),O("\\,","\\tmspace+{3mu}{.1667em}"),O("\\thinspace","\\,"),O("\\>","\\mskip{4mu}"),O("\\:","\\tmspace+{4mu}{.2222em}"),O("\\medspace","\\:"),O("\\;","\\tmspace+{5mu}{.2777em}"),O("\\thickspace","\\;"),O("\\!","\\tmspace-{3mu}{.1667em}"),O("\\negthinspace","\\!"),O("\\negmedspace","\\tmspace-{4mu}{.2222em}"),O("\\negthickspace","\\tmspace-{5mu}{.277em}"),O("\\enspace","\\kern.5em "),O("\\enskip","\\hskip.5em\\relax"),O("\\quad","\\hskip1em\\relax"),O("\\qquad","\\hskip2em\\relax"),O("\\tag","\\@ifstar\\tag@literal\\tag@paren"),O("\\tag@paren","\\tag@literal{({#1})}"),O("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new Me("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),O("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),O("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),O("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),O("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),O("\\newline","\\\\\\relax"),O("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var ju=Ne(sn["Main-Regular"][84][1]-.7*sn["Main-Regular"][65][1]);O("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+ju+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}"),O("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+ju+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}"),O("\\hspace","\\@ifstar\\@hspacer\\@hspace"),O("\\@hspace","\\hskip #1\\relax"),O("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),O("\\ordinarycolon",":"),O("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),O("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),O("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),O("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),O("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),O("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),O("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),O("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),O("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),O("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),O("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),O("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),O("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),O("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),O("∷","\\dblcolon"),O("∹","\\eqcolon"),O("≔","\\coloneqq"),O("≕","\\eqqcolon"),O("⩴","\\Coloneqq"),O("\\ratio","\\vcentcolon"),O("\\coloncolon","\\dblcolon"),O("\\colonequals","\\coloneqq"),O("\\coloncolonequals","\\Coloneqq"),O("\\equalscolon","\\eqqcolon"),O("\\equalscoloncolon","\\Eqqcolon"),O("\\colonminus","\\coloneq"),O("\\coloncolonminus","\\Coloneq"),O("\\minuscolon","\\eqcolon"),O("\\minuscoloncolon","\\Eqcolon"),O("\\coloncolonapprox","\\Colonapprox"),O("\\coloncolonsim","\\Colonsim"),O("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),O("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),O("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),O("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),O("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),O("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),O("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),O("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),O("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),O("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),O("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),O("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),O("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),O("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),O("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),O("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),O("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),O("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),O("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),O("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),O("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),O("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),O("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),O("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),O("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),O("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),O("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),O("\\imath","\\html@mathml{\\@imath}{ı}"),O("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),O("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),O("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),O("⟦","\\llbracket"),O("⟧","\\rrbracket"),O("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),O("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),O("⦃","\\lBrace"),O("⦄","\\rBrace"),O("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),O("⦵","\\minuso"),O("\\darr","\\downarrow"),O("\\dArr","\\Downarrow"),O("\\Darr","\\Downarrow"),O("\\lang","\\langle"),O("\\rang","\\rangle"),O("\\uarr","\\uparrow"),O("\\uArr","\\Uparrow"),O("\\Uarr","\\Uparrow"),O("\\N","\\mathbb{N}"),O("\\R","\\mathbb{R}"),O("\\Z","\\mathbb{Z}"),O("\\alef","\\aleph"),O("\\alefsym","\\aleph"),O("\\Alpha","\\mathrm{A}"),O("\\Beta","\\mathrm{B}"),O("\\bull","\\bullet"),O("\\Chi","\\mathrm{X}"),O("\\clubs","\\clubsuit"),O("\\cnums","\\mathbb{C}"),O("\\Complex","\\mathbb{C}"),O("\\Dagger","\\ddagger"),O("\\diamonds","\\diamondsuit"),O("\\empty","\\emptyset"),O("\\Epsilon","\\mathrm{E}"),O("\\Eta","\\mathrm{H}"),O("\\exist","\\exists"),O("\\harr","\\leftrightarrow"),O("\\hArr","\\Leftrightarrow"),O("\\Harr","\\Leftrightarrow"),O("\\hearts","\\heartsuit"),O("\\image","\\Im"),O("\\infin","\\infty"),O("\\Iota","\\mathrm{I}"),O("\\isin","\\in"),O("\\Kappa","\\mathrm{K}"),O("\\larr","\\leftarrow"),O("\\lArr","\\Leftarrow"),O("\\Larr","\\Leftarrow"),O("\\lrarr","\\leftrightarrow"),O("\\lrArr","\\Leftrightarrow"),O("\\Lrarr","\\Leftrightarrow"),O("\\Mu","\\mathrm{M}"),O("\\natnums","\\mathbb{N}"),O("\\Nu","\\mathrm{N}"),O("\\Omicron","\\mathrm{O}"),O("\\plusmn","\\pm"),O("\\rarr","\\rightarrow"),O("\\rArr","\\Rightarrow"),O("\\Rarr","\\Rightarrow"),O("\\real","\\Re"),O("\\reals","\\mathbb{R}"),O("\\Reals","\\mathbb{R}"),O("\\Rho","\\mathrm{P}"),O("\\sdot","\\cdot"),O("\\sect","\\S"),O("\\spades","\\spadesuit"),O("\\sub","\\subset"),O("\\sube","\\subseteq"),O("\\supe","\\supseteq"),O("\\Tau","\\mathrm{T}"),O("\\thetasym","\\vartheta"),O("\\weierp","\\wp"),O("\\Zeta","\\mathrm{Z}"),O("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),O("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),O("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),O("\\bra","\\mathinner{\\langle{#1}|}"),O("\\ket","\\mathinner{|{#1}\\rangle}"),O("\\braket","\\mathinner{\\langle{#1}\\rangle}"),O("\\Bra","\\left\\langle#1\\right|"),O("\\Ket","\\left|#1\\right\\rangle");var qu=e=>t=>{var r=t.consumeArg().tokens,n=t.consumeArg().tokens,a=t.consumeArg().tokens,i=t.consumeArg().tokens,o=t.macros.get("|"),s=t.macros.get("\\|");t.macros.beginGroup();var c=h=>d=>{e&&(d.macros.set("|",o),a.length&&d.macros.set("\\|",s));var p=h;if(!h&&a.length){var w=d.future();w.text==="|"&&(d.popToken(),p=!0)}return{tokens:p?a:n,numArgs:0}};t.macros.set("|",c(!1)),a.length&&t.macros.set("\\|",c(!0));var u=t.consumeArg().tokens,f=t.expandTokens([...i,...u,...r]);return t.macros.endGroup(),{tokens:f.reverse(),numArgs:0}};O("\\bra@ket",qu(!1)),O("\\bra@set",qu(!0)),O("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),O("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),O("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),O("\\angln","{\\angl n}"),O("\\blue","\\textcolor{##6495ed}{#1}"),O("\\orange","\\textcolor{##ffa500}{#1}"),O("\\pink","\\textcolor{##ff00af}{#1}"),O("\\red","\\textcolor{##df0030}{#1}"),O("\\green","\\textcolor{##28ae7b}{#1}"),O("\\gray","\\textcolor{gray}{#1}"),O("\\purple","\\textcolor{##9d38bd}{#1}"),O("\\blueA","\\textcolor{##ccfaff}{#1}"),O("\\blueB","\\textcolor{##80f6ff}{#1}"),O("\\blueC","\\textcolor{##63d9ea}{#1}"),O("\\blueD","\\textcolor{##11accd}{#1}"),O("\\blueE","\\textcolor{##0c7f99}{#1}"),O("\\tealA","\\textcolor{##94fff5}{#1}"),O("\\tealB","\\textcolor{##26edd5}{#1}"),O("\\tealC","\\textcolor{##01d1c1}{#1}"),O("\\tealD","\\textcolor{##01a995}{#1}"),O("\\tealE","\\textcolor{##208170}{#1}"),O("\\greenA","\\textcolor{##b6ffb0}{#1}"),O("\\greenB","\\textcolor{##8af281}{#1}"),O("\\greenC","\\textcolor{##74cf70}{#1}"),O("\\greenD","\\textcolor{##1fab54}{#1}"),O("\\greenE","\\textcolor{##0d923f}{#1}"),O("\\goldA","\\textcolor{##ffd0a9}{#1}"),O("\\goldB","\\textcolor{##ffbb71}{#1}"),O("\\goldC","\\textcolor{##ff9c39}{#1}"),O("\\goldD","\\textcolor{##e07d10}{#1}"),O("\\goldE","\\textcolor{##a75a05}{#1}"),O("\\redA","\\textcolor{##fca9a9}{#1}"),O("\\redB","\\textcolor{##ff8482}{#1}"),O("\\redC","\\textcolor{##f9685d}{#1}"),O("\\redD","\\textcolor{##e84d39}{#1}"),O("\\redE","\\textcolor{##bc2612}{#1}"),O("\\maroonA","\\textcolor{##ffbde0}{#1}"),O("\\maroonB","\\textcolor{##ff92c6}{#1}"),O("\\maroonC","\\textcolor{##ed5fa6}{#1}"),O("\\maroonD","\\textcolor{##ca337c}{#1}"),O("\\maroonE","\\textcolor{##9e034e}{#1}"),O("\\purpleA","\\textcolor{##ddd7ff}{#1}"),O("\\purpleB","\\textcolor{##c6b9fc}{#1}"),O("\\purpleC","\\textcolor{##aa87ff}{#1}"),O("\\purpleD","\\textcolor{##7854ab}{#1}"),O("\\purpleE","\\textcolor{##543b78}{#1}"),O("\\mintA","\\textcolor{##f5f9e8}{#1}"),O("\\mintB","\\textcolor{##edf2df}{#1}"),O("\\mintC","\\textcolor{##e0e5cc}{#1}"),O("\\grayA","\\textcolor{##f6f7f7}{#1}"),O("\\grayB","\\textcolor{##f0f1f2}{#1}"),O("\\grayC","\\textcolor{##e3e5e6}{#1}"),O("\\grayD","\\textcolor{##d6d8da}{#1}"),O("\\grayE","\\textcolor{##babec2}{#1}"),O("\\grayF","\\textcolor{##888d93}{#1}"),O("\\grayG","\\textcolor{##626569}{#1}"),O("\\grayH","\\textcolor{##3b3e40}{#1}"),O("\\grayI","\\textcolor{##21242c}{#1}"),O("\\kaBlue","\\textcolor{##314453}{#1}"),O("\\kaGreen","\\textcolor{##71B307}{#1}");var Wu={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class J6{constructor(t,r,n){this.settings=r,this.expansionCount=0,this.feed(t),this.macros=new Z6(K6,r.macros),this.mode=n,this.stack=[]}feed(t){this.lexer=new Uu(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 Br("EOF",n.loc)),this.pushTokens(a),new Br("",kr.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,s=0;do{if(i=this.popToken(),r.push(i),i.text==="{")++o;else if(i.text==="}"){if(--o,o===-1)throw new Me("Extra }",i)}else if(i.text==="EOF")throw new Me("Unexpected end of input in a macro argument, expected '"+(t&&n?t[s]:"}")+"'",i);if(t&&n)if((o===0||o===1&&t[s]==="{")&&i.text===t[s]){if(++s,s===t.length){r.splice(-s,s);break}}else s=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 Me("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 Me("Use of the macro doesn't match its definition",i)}}for(var o=[],s=0;s<t;s++)o.push(this.consumeArg(r&&r[s+1]).tokens);return o}countExpansion(t){if(this.expansionCount+=t,this.expansionCount>this.settings.maxExpand)throw new Me("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 Me("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 s=i.length-1;s>=0;--s){var c=i[s];if(c.text==="#"){if(s===0)throw new Me("Incomplete placeholder at end of macro body",c);if(c=i[--s],c.text==="#")i.splice(s+1,1);else if(/^[1-9]$/.test(c.text))i.splice(s,2,...o[+c.text-1]);else throw new Me("Not a valid argument number",c)}}}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 Br(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 s=new Uu(a,this.settings),c=[],u=s.lex();u.text!=="EOF";)c.push(u),u=s.lex();c.reverse();var f={tokens:c,numArgs:i};return f}return a}isDefined(t){return this.macros.has(t)||Hn.hasOwnProperty(t)||Pt.math.hasOwnProperty(t)||Pt.text.hasOwnProperty(t)||Wu.hasOwnProperty(t)}isExpandable(t){var r=this.macros.get(t);return r!=null?typeof r=="string"||typeof r=="function"||!r.unexpandable:Hn.hasOwnProperty(t)&&!Hn[t].primitive}}var Xu=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,T0=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Sl={"́":{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"}},Zu={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class M0{constructor(t,r){this.mode="math",this.gullet=new J6(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 Me("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 Br("}")),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(M0.endOfExpression.has(a.text)||r&&a.text===r||t&&Hn[a.text]&&Hn[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 Me("only one infix operator per group",i.token);r=a,n=i.replaceWith}}if(r!==-1&&n){var o,s,c=t.slice(0,r),u=t.slice(r+1);c.length===1&&c[0].type==="ordgroup"?o=c[0]:o={type:"ordgroup",mode:this.mode,body:c},u.length===1&&u[0].type==="ordgroup"?s=u[0]:s={type:"ordgroup",mode:this.mode,body:u};var f;return n==="\\\\abovefrac"?f=this.callFunction(n,[o,t[r],s],[]):f=this.callFunction(n,[o,s],[]),[f]}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 Me("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 Me("Limit controls must follow a math operator",i);this.consume()}else if(i.text==="^"){if(n)throw new Me("Double superscript",i);n=this.handleSupSubscript("superscript")}else if(i.text==="_"){if(a)throw new Me("Double subscript",i);a=this.handleSupSubscript("subscript")}else if(i.text==="'"){if(n)throw new Me("Double superscript",i);var s={type:"textord",mode:this.mode,text:"\\prime"},c=[s];for(this.consume();this.fetch().text==="'";)c.push(s),this.consume();this.fetch().text==="^"&&c.push(this.handleSupSubscript("superscript")),n={type:"ordgroup",mode:this.mode,body:c}}else if(T0[i.text]){var u=Xu.test(i.text),f=[];for(f.push(new Br(T0[i.text])),this.consume();;){var h=this.fetch().text;if(!T0[h]||Xu.test(h)!==u)break;f.unshift(new Br(T0[h])),this.consume()}var d=this.subparse(f);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=Hn[a];if(!i)return null;if(this.consume(),r&&r!=="atom"&&!i.allowedInArgument)throw new Me("Got function '"+a+"' with no arguments"+(r?" as "+r:""),n);if(this.mode==="text"&&!i.allowedInText)throw new Me("Can't use function '"+a+"' in text mode",n);if(this.mode==="math"&&i.allowedInMath===!1)throw new Me("Can't use function '"+a+"' in math mode",n);var{args:o,optArgs:s}=this.parseArguments(a,i);return this.callFunction(a,o,s,n,t)}callFunction(t,r,n,a,i){var o={funcName:t,parser:this,token:a,breakOnTokenText:i},s=Hn[t];if(s&&s.handler)return s.handler(o,r,n);throw new Me("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 s=r.argTypes&&r.argTypes[o],c=o<r.numOptionalArgs;("primitive"in r&&r.primitive&&s==null||r.type==="sqrt"&&o===1&&i[0]==null)&&(s="primitive");var u=this.parseGroupOfType("argument to '"+t+"'",s,c);if(c)i.push(u);else if(u!=null)a.push(u);else throw new Me("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 Me("A primitive argument cannot be optional");var o=this.parseGroup(t);if(o==null)throw new Me("Expected group as "+t,this.fetch());return o}case"original":case null:case void 0:return this.parseArgumentGroup(n);default:throw new Me("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 Me("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 Me("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 Me("Invalid size: '"+r.text+"'",r);var i={number:+(a[1]+a[2]),unit:a[3]};if(!Ec(i))throw new Me("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 s=this.parseExpression(!1,o),c=this.fetch();this.expect(o),this.gullet.endGroup(),i={type:"ordgroup",mode:this.mode,loc:kr.range(n,c),body:s,semisimple:a==="\\begingroup"||void 0}}else if(i=this.parseFunction(r,t)||this.parseSymbol(),i==null&&a[0]==="\\"&&!Wu.hasOwnProperty(a)){if(this.settings.throwOnError)throw new Me("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 s=t[n+2];n+1<r&&s&&s.type==="textord"&&s.text==="-"?(t.splice(n,3,{type:"textord",mode:"text",loc:kr.range(a,s),text:"---"}),r-=2):(t.splice(n,2,{type:"textord",mode:"text",loc:kr.range(a,o),text:"--"}),r-=1)}(i==="'"||i==="`")&&o.text===i&&(t.splice(n,2,{type:"textord",mode:"text",loc:kr.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 Me(`\\verb assertion failed --
|
|
260
|
+
please report what input caused this bug`);return n=n.slice(1,-1),{type:"verb",mode:"text",body:n,star:a}}Zu.hasOwnProperty(r[0])&&!Pt[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=Zu[r[0]]+r.slice(1));var i=W6.exec(r);i&&(r=r.substring(0,i.index),r==="i"?r="ı":r==="j"&&(r="ȷ"));var o;if(Pt[this.mode][r]){this.settings.strict&&this.mode==="math"&&Wo.includes(r)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',t);var s=Pt[this.mode][r].group,c=kr.range(t),u;if(Xg.hasOwnProperty(s)){var f=s;u={type:"atom",mode:this.mode,family:f,loc:c,text:r}}else u={type:s,mode:this.mode,loc:c,text:r};o=u}else if(r.charCodeAt(0)>=128)this.settings.strict&&(kc(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:kr.range(t),text:r};else return null;if(this.consume(),i)for(var h=0;h<i[0].length;h++){var d=i[0][h];if(!Sl[d])throw new Me("Unknown accent ' "+d+"'",t);var p=Sl[d][this.mode]||Sl[d].text;if(!p)throw new Me("Accent "+d+" unsupported in "+this.mode+" mode",t);o={type:"accent",mode:this.mode,loc:kr.range(t),label:p,isStretchy:!1,isShifty:!0,base:o}}return o}}M0.endOfExpression=new Set(["}","\\endgroup","\\end","\\right","&"]);var El=function(t,r){if(!(typeof t=="string"||t instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new M0(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 Me("\\tag works only in display equations");a=[{type:"tag",mode:"text",body:a,tag:n.subparse([new Br("\\df@tag")])}]}return a},Cl=function(t,r,n){r.textContent="";var a=I0(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."),Cl=function(){throw new Me("KaTeX doesn't work in quirks mode.")});var Ku=function(t,r){var n=I0(t,r).toMarkup();return n},Yu=function(t,r){var n=new Lo(r);return El(t,n)},Ju=function(t,r,n){if(n.throwOnError||!(t instanceof Me))throw t;var a=Be(["katex-error"],[new Cr(r)]);return a.setAttribute("title",t.toString()),a.setAttribute("style","color:"+n.errorColor),a},I0=function(t,r){var n=new Lo(r);try{var a=El(t,n);return u6(a,t,n)}catch(i){return Ju(i,t,n)}},Qu=function(t,r){var n=new Lo(r);try{var a=El(t,n);return f6(a,t,n)}catch(i){return Ju(i,t,n)}},ef="0.16.45",tf={Span:Ea,Anchor:o0,SymbolNode:Cr,SvgNode:_n,PathNode:Pn,LineNode:$o},Q6={version:ef,render:Cl,renderToString:Ku,ParseError:Me,SETTINGS_SCHEMA:n0,__parse:Yu,__renderToDomTree:I0,__renderToHTMLTree:Qu,__setFontMetrics:Tc,__defineSymbol:x,__defineFunction:Ge,__defineMacro:O,__domTree:tf};const e8=Object.freeze(Object.defineProperty({__proto__:null,ParseError:Me,SETTINGS_SCHEMA:n0,__defineFunction:Ge,__defineMacro:O,__defineSymbol:x,__domTree:tf,__parse:Yu,__renderToDomTree:I0,__renderToHTMLTree:Qu,__setFontMetrics:Tc,default:Q6,get render(){return Cl},renderToString:Ku,version:ef},Symbol.toStringTag,{value:"Module"}));var t8=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function r8(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 nf={exports:{}},Dl={},af;function Gn(){return af||(af=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 s=o.shift();if(s){if(typeof s!="object")throw new TypeError(s+"must be non-object");for(var c in s)r(s,c)&&(i[c]=s[c])}}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,s,c,u){if(o.subarray&&i.subarray){i.set(o.subarray(s,s+c),u);return}for(var f=0;f<c;f++)i[u+f]=o[s+f]},flattenChunks:function(i){var o,s,c,u,f,h;for(c=0,o=0,s=i.length;o<s;o++)c+=i[o].length;for(h=new Uint8Array(c),u=0,o=0,s=i.length;o<s;o++)f=i[o],h.set(f,u),u+=f.length;return h}},a={arraySet:function(i,o,s,c,u){for(var f=0;f<c;f++)i[u+f]=o[s+f]},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)}(Dl)),Dl}var Ta={},Zr={},ia={},of;function n8(){if(of)return ia;of=1;var e=Gn(),t=4,r=0,n=1,a=2;function i(I){for(var J=I.length;--J>=0;)I[J]=0}var o=0,s=1,c=2,u=3,f=258,h=29,d=256,p=d+1+h,w=30,m=19,_=2*p+1,y=15,g=16,b=7,v=256,E=16,C=17,A=18,k=[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],B=[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],T=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],F=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],V=512,L=new Array((p+2)*2);i(L);var H=new Array(w*2);i(H);var X=new Array(V);i(X);var W=new Array(f-u+1);i(W);var Z=new Array(h);i(Z);var Q=new Array(w);i(Q);function K(I,J,de,Se,P){this.static_tree=I,this.extra_bits=J,this.extra_base=de,this.elems=Se,this.max_length=P,this.has_stree=I&&I.length}var ue,ne,fe;function re(I,J){this.dyn_tree=I,this.max_code=0,this.stat_desc=J}function ye(I){return I<256?X[I]:X[256+(I>>>7)]}function he(I,J){I.pending_buf[I.pending++]=J&255,I.pending_buf[I.pending++]=J>>>8&255}function ke(I,J,de){I.bi_valid>g-de?(I.bi_buf|=J<<I.bi_valid&65535,he(I,I.bi_buf),I.bi_buf=J>>g-I.bi_valid,I.bi_valid+=de-g):(I.bi_buf|=J<<I.bi_valid&65535,I.bi_valid+=de)}function Ee(I,J,de){ke(I,de[J*2],de[J*2+1])}function me(I,J){var de=0;do de|=I&1,I>>>=1,de<<=1;while(--J>0);return de>>>1}function te(I){I.bi_valid===16?(he(I,I.bi_buf),I.bi_buf=0,I.bi_valid=0):I.bi_valid>=8&&(I.pending_buf[I.pending++]=I.bi_buf&255,I.bi_buf>>=8,I.bi_valid-=8)}function se(I,J){var de=J.dyn_tree,Se=J.max_code,P=J.stat_desc.static_tree,j=J.stat_desc.has_stree,M=J.stat_desc.extra_bits,pe=J.stat_desc.extra_base,le=J.stat_desc.max_length,S,ae,ce,N,Y,oe,Qe=0;for(N=0;N<=y;N++)I.bl_count[N]=0;for(de[I.heap[I.heap_max]*2+1]=0,S=I.heap_max+1;S<_;S++)ae=I.heap[S],N=de[de[ae*2+1]*2+1]+1,N>le&&(N=le,Qe++),de[ae*2+1]=N,!(ae>Se)&&(I.bl_count[N]++,Y=0,ae>=pe&&(Y=M[ae-pe]),oe=de[ae*2],I.opt_len+=oe*(N+Y),j&&(I.static_len+=oe*(P[ae*2+1]+Y)));if(Qe!==0){do{for(N=le-1;I.bl_count[N]===0;)N--;I.bl_count[N]--,I.bl_count[N+1]+=2,I.bl_count[le]--,Qe-=2}while(Qe>0);for(N=le;N!==0;N--)for(ae=I.bl_count[N];ae!==0;)ce=I.heap[--S],!(ce>Se)&&(de[ce*2+1]!==N&&(I.opt_len+=(N-de[ce*2+1])*de[ce*2],de[ce*2+1]=N),ae--)}}function ie(I,J,de){var Se=new Array(y+1),P=0,j,M;for(j=1;j<=y;j++)Se[j]=P=P+de[j-1]<<1;for(M=0;M<=J;M++){var pe=I[M*2+1];pe!==0&&(I[M*2]=me(Se[pe]++,pe))}}function _e(){var I,J,de,Se,P,j=new Array(y+1);for(de=0,Se=0;Se<h-1;Se++)for(Z[Se]=de,I=0;I<1<<k[Se];I++)W[de++]=Se;for(W[de-1]=Se,P=0,Se=0;Se<16;Se++)for(Q[Se]=P,I=0;I<1<<B[Se];I++)X[P++]=Se;for(P>>=7;Se<w;Se++)for(Q[Se]=P<<7,I=0;I<1<<B[Se]-7;I++)X[256+P++]=Se;for(J=0;J<=y;J++)j[J]=0;for(I=0;I<=143;)L[I*2+1]=8,I++,j[8]++;for(;I<=255;)L[I*2+1]=9,I++,j[9]++;for(;I<=279;)L[I*2+1]=7,I++,j[7]++;for(;I<=287;)L[I*2+1]=8,I++,j[8]++;for(ie(L,p+1,j),I=0;I<w;I++)H[I*2+1]=5,H[I*2]=me(I,5);ue=new K(L,k,d+1,p,y),ne=new K(H,B,0,w,y),fe=new K(new Array(0),T,0,m,b)}function He(I){var J;for(J=0;J<p;J++)I.dyn_ltree[J*2]=0;for(J=0;J<w;J++)I.dyn_dtree[J*2]=0;for(J=0;J<m;J++)I.bl_tree[J*2]=0;I.dyn_ltree[v*2]=1,I.opt_len=I.static_len=0,I.last_lit=I.matches=0}function je(I){I.bi_valid>8?he(I,I.bi_buf):I.bi_valid>0&&(I.pending_buf[I.pending++]=I.bi_buf),I.bi_buf=0,I.bi_valid=0}function Ve(I,J,de,Se){je(I),he(I,de),he(I,~de),e.arraySet(I.pending_buf,I.window,J,de,I.pending),I.pending+=de}function ge(I,J,de,Se){var P=J*2,j=de*2;return I[P]<I[j]||I[P]===I[j]&&Se[J]<=Se[de]}function Ce(I,J,de){for(var Se=I.heap[de],P=de<<1;P<=I.heap_len&&(P<I.heap_len&&ge(J,I.heap[P+1],I.heap[P],I.depth)&&P++,!ge(J,Se,I.heap[P],I.depth));)I.heap[de]=I.heap[P],de=P,P<<=1;I.heap[de]=Se}function ve(I,J,de){var Se,P,j=0,M,pe;if(I.last_lit!==0)do Se=I.pending_buf[I.d_buf+j*2]<<8|I.pending_buf[I.d_buf+j*2+1],P=I.pending_buf[I.l_buf+j],j++,Se===0?Ee(I,P,J):(M=W[P],Ee(I,M+d+1,J),pe=k[M],pe!==0&&(P-=Z[M],ke(I,P,pe)),Se--,M=ye(Se),Ee(I,M,de),pe=B[M],pe!==0&&(Se-=Q[M],ke(I,Se,pe)));while(j<I.last_lit);Ee(I,v,J)}function Oe(I,J){var de=J.dyn_tree,Se=J.stat_desc.static_tree,P=J.stat_desc.has_stree,j=J.stat_desc.elems,M,pe,le=-1,S;for(I.heap_len=0,I.heap_max=_,M=0;M<j;M++)de[M*2]!==0?(I.heap[++I.heap_len]=le=M,I.depth[M]=0):de[M*2+1]=0;for(;I.heap_len<2;)S=I.heap[++I.heap_len]=le<2?++le:0,de[S*2]=1,I.depth[S]=0,I.opt_len--,P&&(I.static_len-=Se[S*2+1]);for(J.max_code=le,M=I.heap_len>>1;M>=1;M--)Ce(I,de,M);S=j;do M=I.heap[1],I.heap[1]=I.heap[I.heap_len--],Ce(I,de,1),pe=I.heap[1],I.heap[--I.heap_max]=M,I.heap[--I.heap_max]=pe,de[S*2]=de[M*2]+de[pe*2],I.depth[S]=(I.depth[M]>=I.depth[pe]?I.depth[M]:I.depth[pe])+1,de[M*2+1]=de[pe*2+1]=S,I.heap[1]=S++,Ce(I,de,1);while(I.heap_len>=2);I.heap[--I.heap_max]=I.heap[1],se(I,J),ie(de,le,I.bl_count)}function tt(I,J,de){var Se,P=-1,j,M=J[0*2+1],pe=0,le=7,S=4;for(M===0&&(le=138,S=3),J[(de+1)*2+1]=65535,Se=0;Se<=de;Se++)j=M,M=J[(Se+1)*2+1],!(++pe<le&&j===M)&&(pe<S?I.bl_tree[j*2]+=pe:j!==0?(j!==P&&I.bl_tree[j*2]++,I.bl_tree[E*2]++):pe<=10?I.bl_tree[C*2]++:I.bl_tree[A*2]++,pe=0,P=j,M===0?(le=138,S=3):j===M?(le=6,S=3):(le=7,S=4))}function at(I,J,de){var Se,P=-1,j,M=J[0*2+1],pe=0,le=7,S=4;for(M===0&&(le=138,S=3),Se=0;Se<=de;Se++)if(j=M,M=J[(Se+1)*2+1],!(++pe<le&&j===M)){if(pe<S)do Ee(I,j,I.bl_tree);while(--pe!==0);else j!==0?(j!==P&&(Ee(I,j,I.bl_tree),pe--),Ee(I,E,I.bl_tree),ke(I,pe-3,2)):pe<=10?(Ee(I,C,I.bl_tree),ke(I,pe-3,3)):(Ee(I,A,I.bl_tree),ke(I,pe-11,7));pe=0,P=j,M===0?(le=138,S=3):j===M?(le=6,S=3):(le=7,S=4)}}function st(I){var J;for(tt(I,I.dyn_ltree,I.l_desc.max_code),tt(I,I.dyn_dtree,I.d_desc.max_code),Oe(I,I.bl_desc),J=m-1;J>=3&&I.bl_tree[F[J]*2+1]===0;J--);return I.opt_len+=3*(J+1)+5+5+4,J}function It(I,J,de,Se){var P;for(ke(I,J-257,5),ke(I,de-1,5),ke(I,Se-4,4),P=0;P<Se;P++)ke(I,I.bl_tree[F[P]*2+1],3);at(I,I.dyn_ltree,J-1),at(I,I.dyn_dtree,de-1)}function ut(I){var J=4093624447,de;for(de=0;de<=31;de++,J>>>=1)if(J&1&&I.dyn_ltree[de*2]!==0)return r;if(I.dyn_ltree[9*2]!==0||I.dyn_ltree[10*2]!==0||I.dyn_ltree[13*2]!==0)return n;for(de=32;de<d;de++)if(I.dyn_ltree[de*2]!==0)return n;return r}var ft=!1;function vt(I){ft||(_e(),ft=!0),I.l_desc=new re(I.dyn_ltree,ue),I.d_desc=new re(I.dyn_dtree,ne),I.bl_desc=new re(I.bl_tree,fe),I.bi_buf=0,I.bi_valid=0,He(I)}function gt(I,J,de,Se){ke(I,(o<<1)+(Se?1:0),3),Ve(I,J,de)}function pt(I){ke(I,s<<1,3),Ee(I,v,L),te(I)}function Ct(I,J,de,Se){var P,j,M=0;I.level>0?(I.strm.data_type===a&&(I.strm.data_type=ut(I)),Oe(I,I.l_desc),Oe(I,I.d_desc),M=st(I),P=I.opt_len+3+7>>>3,j=I.static_len+3+7>>>3,j<=P&&(P=j)):P=j=de+5,de+4<=P&&J!==-1?gt(I,J,de,Se):I.strategy===t||j===P?(ke(I,(s<<1)+(Se?1:0),3),ve(I,L,H)):(ke(I,(c<<1)+(Se?1:0),3),It(I,I.l_desc.max_code+1,I.d_desc.max_code+1,M+1),ve(I,I.dyn_ltree,I.dyn_dtree)),He(I),Se&&je(I)}function Ae(I,J,de){return I.pending_buf[I.d_buf+I.last_lit*2]=J>>>8&255,I.pending_buf[I.d_buf+I.last_lit*2+1]=J&255,I.pending_buf[I.l_buf+I.last_lit]=de&255,I.last_lit++,J===0?I.dyn_ltree[de*2]++:(I.matches++,J--,I.dyn_ltree[(W[de]+d+1)*2]++,I.dyn_dtree[ye(J)*2]++),I.last_lit===I.lit_bufsize-1}return ia._tr_init=vt,ia._tr_stored_block=gt,ia._tr_flush_block=Ct,ia._tr_tally=Ae,ia._tr_align=pt,ia}var Al,lf;function sf(){if(lf)return Al;lf=1;function e(t,r,n,a){for(var i=t&65535|0,o=t>>>16&65535|0,s=0;n!==0;){s=n>2e3?2e3:n,n-=s;do i=i+r[a++]|0,o=o+i|0;while(--s);i%=65521,o%=65521}return i|o<<16|0}return Al=e,Al}var Bl,cf;function uf(){if(cf)return Bl;cf=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 s=t,c=o+i;n^=-1;for(var u=o;u<c;u++)n=n>>>8^s[(n^a[u])&255];return n^-1}return Bl=r,Bl}var Tl,ff;function Ml(){return ff||(ff=1,Tl={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"}),Tl}var df;function a8(){if(df)return Zr;df=1;var e=Gn(),t=n8(),r=sf(),n=uf(),a=Ml(),i=0,o=1,s=3,c=4,u=5,f=0,h=1,d=-2,p=-3,w=-5,m=-1,_=1,y=2,g=3,b=4,v=0,E=2,C=8,A=9,k=15,B=8,T=29,F=256,V=F+1+T,L=30,H=19,X=2*V+1,W=15,Z=3,Q=258,K=Q+Z+1,ue=32,ne=42,fe=69,re=73,ye=91,he=103,ke=113,Ee=666,me=1,te=2,se=3,ie=4,_e=3;function He(S,ae){return S.msg=a[ae],ae}function je(S){return(S<<1)-(S>4?9:0)}function Ve(S){for(var ae=S.length;--ae>=0;)S[ae]=0}function ge(S){var ae=S.state,ce=ae.pending;ce>S.avail_out&&(ce=S.avail_out),ce!==0&&(e.arraySet(S.output,ae.pending_buf,ae.pending_out,ce,S.next_out),S.next_out+=ce,ae.pending_out+=ce,S.total_out+=ce,S.avail_out-=ce,ae.pending-=ce,ae.pending===0&&(ae.pending_out=0))}function Ce(S,ae){t._tr_flush_block(S,S.block_start>=0?S.block_start:-1,S.strstart-S.block_start,ae),S.block_start=S.strstart,ge(S.strm)}function ve(S,ae){S.pending_buf[S.pending++]=ae}function Oe(S,ae){S.pending_buf[S.pending++]=ae>>>8&255,S.pending_buf[S.pending++]=ae&255}function tt(S,ae,ce,N){var Y=S.avail_in;return Y>N&&(Y=N),Y===0?0:(S.avail_in-=Y,e.arraySet(ae,S.input,S.next_in,Y,ce),S.state.wrap===1?S.adler=r(S.adler,ae,Y,ce):S.state.wrap===2&&(S.adler=n(S.adler,ae,Y,ce)),S.next_in+=Y,S.total_in+=Y,Y)}function at(S,ae){var ce=S.max_chain_length,N=S.strstart,Y,oe,Qe=S.prev_length,Ue=S.nice_match,Xe=S.strstart>S.w_size-K?S.strstart-(S.w_size-K):0,bt=S.window,an=S.w_mask,Ot=S.prev,St=S.strstart+Q,Lt=bt[N+Qe-1],Jt=bt[N+Qe];S.prev_length>=S.good_match&&(ce>>=2),Ue>S.lookahead&&(Ue=S.lookahead);do if(Y=ae,!(bt[Y+Qe]!==Jt||bt[Y+Qe-1]!==Lt||bt[Y]!==bt[N]||bt[++Y]!==bt[N+1])){N+=2,Y++;do;while(bt[++N]===bt[++Y]&&bt[++N]===bt[++Y]&&bt[++N]===bt[++Y]&&bt[++N]===bt[++Y]&&bt[++N]===bt[++Y]&&bt[++N]===bt[++Y]&&bt[++N]===bt[++Y]&&bt[++N]===bt[++Y]&&N<St);if(oe=Q-(St-N),N=St-Q,oe>Qe){if(S.match_start=ae,Qe=oe,oe>=Ue)break;Lt=bt[N+Qe-1],Jt=bt[N+Qe]}}while((ae=Ot[ae&an])>Xe&&--ce!==0);return Qe<=S.lookahead?Qe:S.lookahead}function st(S){var ae=S.w_size,ce,N,Y,oe,Qe;do{if(oe=S.window_size-S.lookahead-S.strstart,S.strstart>=ae+(ae-K)){e.arraySet(S.window,S.window,ae,ae,0),S.match_start-=ae,S.strstart-=ae,S.block_start-=ae,N=S.hash_size,ce=N;do Y=S.head[--ce],S.head[ce]=Y>=ae?Y-ae:0;while(--N);N=ae,ce=N;do Y=S.prev[--ce],S.prev[ce]=Y>=ae?Y-ae:0;while(--N);oe+=ae}if(S.strm.avail_in===0)break;if(N=tt(S.strm,S.window,S.strstart+S.lookahead,oe),S.lookahead+=N,S.lookahead+S.insert>=Z)for(Qe=S.strstart-S.insert,S.ins_h=S.window[Qe],S.ins_h=(S.ins_h<<S.hash_shift^S.window[Qe+1])&S.hash_mask;S.insert&&(S.ins_h=(S.ins_h<<S.hash_shift^S.window[Qe+Z-1])&S.hash_mask,S.prev[Qe&S.w_mask]=S.head[S.ins_h],S.head[S.ins_h]=Qe,Qe++,S.insert--,!(S.lookahead+S.insert<Z)););}while(S.lookahead<K&&S.strm.avail_in!==0)}function It(S,ae){var ce=65535;for(ce>S.pending_buf_size-5&&(ce=S.pending_buf_size-5);;){if(S.lookahead<=1){if(st(S),S.lookahead===0&&ae===i)return me;if(S.lookahead===0)break}S.strstart+=S.lookahead,S.lookahead=0;var N=S.block_start+ce;if((S.strstart===0||S.strstart>=N)&&(S.lookahead=S.strstart-N,S.strstart=N,Ce(S,!1),S.strm.avail_out===0)||S.strstart-S.block_start>=S.w_size-K&&(Ce(S,!1),S.strm.avail_out===0))return me}return S.insert=0,ae===c?(Ce(S,!0),S.strm.avail_out===0?se:ie):(S.strstart>S.block_start&&(Ce(S,!1),S.strm.avail_out===0),me)}function ut(S,ae){for(var ce,N;;){if(S.lookahead<K){if(st(S),S.lookahead<K&&ae===i)return me;if(S.lookahead===0)break}if(ce=0,S.lookahead>=Z&&(S.ins_h=(S.ins_h<<S.hash_shift^S.window[S.strstart+Z-1])&S.hash_mask,ce=S.prev[S.strstart&S.w_mask]=S.head[S.ins_h],S.head[S.ins_h]=S.strstart),ce!==0&&S.strstart-ce<=S.w_size-K&&(S.match_length=at(S,ce)),S.match_length>=Z)if(N=t._tr_tally(S,S.strstart-S.match_start,S.match_length-Z),S.lookahead-=S.match_length,S.match_length<=S.max_lazy_match&&S.lookahead>=Z){S.match_length--;do S.strstart++,S.ins_h=(S.ins_h<<S.hash_shift^S.window[S.strstart+Z-1])&S.hash_mask,ce=S.prev[S.strstart&S.w_mask]=S.head[S.ins_h],S.head[S.ins_h]=S.strstart;while(--S.match_length!==0);S.strstart++}else S.strstart+=S.match_length,S.match_length=0,S.ins_h=S.window[S.strstart],S.ins_h=(S.ins_h<<S.hash_shift^S.window[S.strstart+1])&S.hash_mask;else N=t._tr_tally(S,0,S.window[S.strstart]),S.lookahead--,S.strstart++;if(N&&(Ce(S,!1),S.strm.avail_out===0))return me}return S.insert=S.strstart<Z-1?S.strstart:Z-1,ae===c?(Ce(S,!0),S.strm.avail_out===0?se:ie):S.last_lit&&(Ce(S,!1),S.strm.avail_out===0)?me:te}function ft(S,ae){for(var ce,N,Y;;){if(S.lookahead<K){if(st(S),S.lookahead<K&&ae===i)return me;if(S.lookahead===0)break}if(ce=0,S.lookahead>=Z&&(S.ins_h=(S.ins_h<<S.hash_shift^S.window[S.strstart+Z-1])&S.hash_mask,ce=S.prev[S.strstart&S.w_mask]=S.head[S.ins_h],S.head[S.ins_h]=S.strstart),S.prev_length=S.match_length,S.prev_match=S.match_start,S.match_length=Z-1,ce!==0&&S.prev_length<S.max_lazy_match&&S.strstart-ce<=S.w_size-K&&(S.match_length=at(S,ce),S.match_length<=5&&(S.strategy===_||S.match_length===Z&&S.strstart-S.match_start>4096)&&(S.match_length=Z-1)),S.prev_length>=Z&&S.match_length<=S.prev_length){Y=S.strstart+S.lookahead-Z,N=t._tr_tally(S,S.strstart-1-S.prev_match,S.prev_length-Z),S.lookahead-=S.prev_length-1,S.prev_length-=2;do++S.strstart<=Y&&(S.ins_h=(S.ins_h<<S.hash_shift^S.window[S.strstart+Z-1])&S.hash_mask,ce=S.prev[S.strstart&S.w_mask]=S.head[S.ins_h],S.head[S.ins_h]=S.strstart);while(--S.prev_length!==0);if(S.match_available=0,S.match_length=Z-1,S.strstart++,N&&(Ce(S,!1),S.strm.avail_out===0))return me}else if(S.match_available){if(N=t._tr_tally(S,0,S.window[S.strstart-1]),N&&Ce(S,!1),S.strstart++,S.lookahead--,S.strm.avail_out===0)return me}else S.match_available=1,S.strstart++,S.lookahead--}return S.match_available&&(N=t._tr_tally(S,0,S.window[S.strstart-1]),S.match_available=0),S.insert=S.strstart<Z-1?S.strstart:Z-1,ae===c?(Ce(S,!0),S.strm.avail_out===0?se:ie):S.last_lit&&(Ce(S,!1),S.strm.avail_out===0)?me:te}function vt(S,ae){for(var ce,N,Y,oe,Qe=S.window;;){if(S.lookahead<=Q){if(st(S),S.lookahead<=Q&&ae===i)return me;if(S.lookahead===0)break}if(S.match_length=0,S.lookahead>=Z&&S.strstart>0&&(Y=S.strstart-1,N=Qe[Y],N===Qe[++Y]&&N===Qe[++Y]&&N===Qe[++Y])){oe=S.strstart+Q;do;while(N===Qe[++Y]&&N===Qe[++Y]&&N===Qe[++Y]&&N===Qe[++Y]&&N===Qe[++Y]&&N===Qe[++Y]&&N===Qe[++Y]&&N===Qe[++Y]&&Y<oe);S.match_length=Q-(oe-Y),S.match_length>S.lookahead&&(S.match_length=S.lookahead)}if(S.match_length>=Z?(ce=t._tr_tally(S,1,S.match_length-Z),S.lookahead-=S.match_length,S.strstart+=S.match_length,S.match_length=0):(ce=t._tr_tally(S,0,S.window[S.strstart]),S.lookahead--,S.strstart++),ce&&(Ce(S,!1),S.strm.avail_out===0))return me}return S.insert=0,ae===c?(Ce(S,!0),S.strm.avail_out===0?se:ie):S.last_lit&&(Ce(S,!1),S.strm.avail_out===0)?me:te}function gt(S,ae){for(var ce;;){if(S.lookahead===0&&(st(S),S.lookahead===0)){if(ae===i)return me;break}if(S.match_length=0,ce=t._tr_tally(S,0,S.window[S.strstart]),S.lookahead--,S.strstart++,ce&&(Ce(S,!1),S.strm.avail_out===0))return me}return S.insert=0,ae===c?(Ce(S,!0),S.strm.avail_out===0?se:ie):S.last_lit&&(Ce(S,!1),S.strm.avail_out===0)?me:te}function pt(S,ae,ce,N,Y){this.good_length=S,this.max_lazy=ae,this.nice_length=ce,this.max_chain=N,this.func=Y}var Ct;Ct=[new pt(0,0,0,0,It),new pt(4,4,8,4,ut),new pt(4,5,16,8,ut),new pt(4,6,32,32,ut),new pt(4,4,16,16,ft),new pt(8,16,32,32,ft),new pt(8,16,128,128,ft),new pt(8,32,128,256,ft),new pt(32,128,258,1024,ft),new pt(32,258,258,4096,ft)];function Ae(S){S.window_size=2*S.w_size,Ve(S.head),S.max_lazy_match=Ct[S.level].max_lazy,S.good_match=Ct[S.level].good_length,S.nice_match=Ct[S.level].nice_length,S.max_chain_length=Ct[S.level].max_chain,S.strstart=0,S.block_start=0,S.lookahead=0,S.insert=0,S.match_length=S.prev_length=Z-1,S.match_available=0,S.ins_h=0}function I(){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(X*2),this.dyn_dtree=new e.Buf16((2*L+1)*2),this.bl_tree=new e.Buf16((2*H+1)*2),Ve(this.dyn_ltree),Ve(this.dyn_dtree),Ve(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*V+1),Ve(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new e.Buf16(2*V+1),Ve(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 J(S){var ae;return!S||!S.state?He(S,d):(S.total_in=S.total_out=0,S.data_type=E,ae=S.state,ae.pending=0,ae.pending_out=0,ae.wrap<0&&(ae.wrap=-ae.wrap),ae.status=ae.wrap?ne:ke,S.adler=ae.wrap===2?0:1,ae.last_flush=i,t._tr_init(ae),f)}function de(S){var ae=J(S);return ae===f&&Ae(S.state),ae}function Se(S,ae){return!S||!S.state||S.state.wrap!==2?d:(S.state.gzhead=ae,f)}function P(S,ae,ce,N,Y,oe){if(!S)return d;var Qe=1;if(ae===m&&(ae=6),N<0?(Qe=0,N=-N):N>15&&(Qe=2,N-=16),Y<1||Y>A||ce!==C||N<8||N>15||ae<0||ae>9||oe<0||oe>b)return He(S,d);N===8&&(N=9);var Ue=new I;return S.state=Ue,Ue.strm=S,Ue.wrap=Qe,Ue.gzhead=null,Ue.w_bits=N,Ue.w_size=1<<Ue.w_bits,Ue.w_mask=Ue.w_size-1,Ue.hash_bits=Y+7,Ue.hash_size=1<<Ue.hash_bits,Ue.hash_mask=Ue.hash_size-1,Ue.hash_shift=~~((Ue.hash_bits+Z-1)/Z),Ue.window=new e.Buf8(Ue.w_size*2),Ue.head=new e.Buf16(Ue.hash_size),Ue.prev=new e.Buf16(Ue.w_size),Ue.lit_bufsize=1<<Y+6,Ue.pending_buf_size=Ue.lit_bufsize*4,Ue.pending_buf=new e.Buf8(Ue.pending_buf_size),Ue.d_buf=1*Ue.lit_bufsize,Ue.l_buf=3*Ue.lit_bufsize,Ue.level=ae,Ue.strategy=oe,Ue.method=ce,de(S)}function j(S,ae){return P(S,ae,C,k,B,v)}function M(S,ae){var ce,N,Y,oe;if(!S||!S.state||ae>u||ae<0)return S?He(S,d):d;if(N=S.state,!S.output||!S.input&&S.avail_in!==0||N.status===Ee&&ae!==c)return He(S,S.avail_out===0?w:d);if(N.strm=S,ce=N.last_flush,N.last_flush=ae,N.status===ne)if(N.wrap===2)S.adler=0,ve(N,31),ve(N,139),ve(N,8),N.gzhead?(ve(N,(N.gzhead.text?1:0)+(N.gzhead.hcrc?2:0)+(N.gzhead.extra?4:0)+(N.gzhead.name?8:0)+(N.gzhead.comment?16:0)),ve(N,N.gzhead.time&255),ve(N,N.gzhead.time>>8&255),ve(N,N.gzhead.time>>16&255),ve(N,N.gzhead.time>>24&255),ve(N,N.level===9?2:N.strategy>=y||N.level<2?4:0),ve(N,N.gzhead.os&255),N.gzhead.extra&&N.gzhead.extra.length&&(ve(N,N.gzhead.extra.length&255),ve(N,N.gzhead.extra.length>>8&255)),N.gzhead.hcrc&&(S.adler=n(S.adler,N.pending_buf,N.pending,0)),N.gzindex=0,N.status=fe):(ve(N,0),ve(N,0),ve(N,0),ve(N,0),ve(N,0),ve(N,N.level===9?2:N.strategy>=y||N.level<2?4:0),ve(N,_e),N.status=ke);else{var Qe=C+(N.w_bits-8<<4)<<8,Ue=-1;N.strategy>=y||N.level<2?Ue=0:N.level<6?Ue=1:N.level===6?Ue=2:Ue=3,Qe|=Ue<<6,N.strstart!==0&&(Qe|=ue),Qe+=31-Qe%31,N.status=ke,Oe(N,Qe),N.strstart!==0&&(Oe(N,S.adler>>>16),Oe(N,S.adler&65535)),S.adler=1}if(N.status===fe)if(N.gzhead.extra){for(Y=N.pending;N.gzindex<(N.gzhead.extra.length&65535)&&!(N.pending===N.pending_buf_size&&(N.gzhead.hcrc&&N.pending>Y&&(S.adler=n(S.adler,N.pending_buf,N.pending-Y,Y)),ge(S),Y=N.pending,N.pending===N.pending_buf_size));)ve(N,N.gzhead.extra[N.gzindex]&255),N.gzindex++;N.gzhead.hcrc&&N.pending>Y&&(S.adler=n(S.adler,N.pending_buf,N.pending-Y,Y)),N.gzindex===N.gzhead.extra.length&&(N.gzindex=0,N.status=re)}else N.status=re;if(N.status===re)if(N.gzhead.name){Y=N.pending;do{if(N.pending===N.pending_buf_size&&(N.gzhead.hcrc&&N.pending>Y&&(S.adler=n(S.adler,N.pending_buf,N.pending-Y,Y)),ge(S),Y=N.pending,N.pending===N.pending_buf_size)){oe=1;break}N.gzindex<N.gzhead.name.length?oe=N.gzhead.name.charCodeAt(N.gzindex++)&255:oe=0,ve(N,oe)}while(oe!==0);N.gzhead.hcrc&&N.pending>Y&&(S.adler=n(S.adler,N.pending_buf,N.pending-Y,Y)),oe===0&&(N.gzindex=0,N.status=ye)}else N.status=ye;if(N.status===ye)if(N.gzhead.comment){Y=N.pending;do{if(N.pending===N.pending_buf_size&&(N.gzhead.hcrc&&N.pending>Y&&(S.adler=n(S.adler,N.pending_buf,N.pending-Y,Y)),ge(S),Y=N.pending,N.pending===N.pending_buf_size)){oe=1;break}N.gzindex<N.gzhead.comment.length?oe=N.gzhead.comment.charCodeAt(N.gzindex++)&255:oe=0,ve(N,oe)}while(oe!==0);N.gzhead.hcrc&&N.pending>Y&&(S.adler=n(S.adler,N.pending_buf,N.pending-Y,Y)),oe===0&&(N.status=he)}else N.status=he;if(N.status===he&&(N.gzhead.hcrc?(N.pending+2>N.pending_buf_size&&ge(S),N.pending+2<=N.pending_buf_size&&(ve(N,S.adler&255),ve(N,S.adler>>8&255),S.adler=0,N.status=ke)):N.status=ke),N.pending!==0){if(ge(S),S.avail_out===0)return N.last_flush=-1,f}else if(S.avail_in===0&&je(ae)<=je(ce)&&ae!==c)return He(S,w);if(N.status===Ee&&S.avail_in!==0)return He(S,w);if(S.avail_in!==0||N.lookahead!==0||ae!==i&&N.status!==Ee){var Xe=N.strategy===y?gt(N,ae):N.strategy===g?vt(N,ae):Ct[N.level].func(N,ae);if((Xe===se||Xe===ie)&&(N.status=Ee),Xe===me||Xe===se)return S.avail_out===0&&(N.last_flush=-1),f;if(Xe===te&&(ae===o?t._tr_align(N):ae!==u&&(t._tr_stored_block(N,0,0,!1),ae===s&&(Ve(N.head),N.lookahead===0&&(N.strstart=0,N.block_start=0,N.insert=0))),ge(S),S.avail_out===0))return N.last_flush=-1,f}return ae!==c?f:N.wrap<=0?h:(N.wrap===2?(ve(N,S.adler&255),ve(N,S.adler>>8&255),ve(N,S.adler>>16&255),ve(N,S.adler>>24&255),ve(N,S.total_in&255),ve(N,S.total_in>>8&255),ve(N,S.total_in>>16&255),ve(N,S.total_in>>24&255)):(Oe(N,S.adler>>>16),Oe(N,S.adler&65535)),ge(S),N.wrap>0&&(N.wrap=-N.wrap),N.pending!==0?f:h)}function pe(S){var ae;return!S||!S.state?d:(ae=S.state.status,ae!==ne&&ae!==fe&&ae!==re&&ae!==ye&&ae!==he&&ae!==ke&&ae!==Ee?He(S,d):(S.state=null,ae===ke?He(S,p):f))}function le(S,ae){var ce=ae.length,N,Y,oe,Qe,Ue,Xe,bt,an;if(!S||!S.state||(N=S.state,Qe=N.wrap,Qe===2||Qe===1&&N.status!==ne||N.lookahead))return d;for(Qe===1&&(S.adler=r(S.adler,ae,ce,0)),N.wrap=0,ce>=N.w_size&&(Qe===0&&(Ve(N.head),N.strstart=0,N.block_start=0,N.insert=0),an=new e.Buf8(N.w_size),e.arraySet(an,ae,ce-N.w_size,N.w_size,0),ae=an,ce=N.w_size),Ue=S.avail_in,Xe=S.next_in,bt=S.input,S.avail_in=ce,S.next_in=0,S.input=ae,st(N);N.lookahead>=Z;){Y=N.strstart,oe=N.lookahead-(Z-1);do N.ins_h=(N.ins_h<<N.hash_shift^N.window[Y+Z-1])&N.hash_mask,N.prev[Y&N.w_mask]=N.head[N.ins_h],N.head[N.ins_h]=Y,Y++;while(--oe);N.strstart=Y,N.lookahead=Z-1,st(N)}return N.strstart+=N.lookahead,N.block_start=N.strstart,N.insert=N.lookahead,N.lookahead=0,N.match_length=N.prev_length=Z-1,N.match_available=0,S.next_in=Xe,S.input=bt,S.avail_in=Ue,N.wrap=Qe,f}return Zr.deflateInit=j,Zr.deflateInit2=P,Zr.deflateReset=de,Zr.deflateResetKeep=J,Zr.deflateSetHeader=Se,Zr.deflate=M,Zr.deflateEnd=pe,Zr.deflateSetDictionary=le,Zr.deflateInfo="pako deflate (from Nodeca project)",Zr}var oa={},hf;function pf(){if(hf)return oa;hf=1;var e=Gn(),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,oa.string2buf=function(o){var s,c,u,f,h,d=o.length,p=0;for(f=0;f<d;f++)c=o.charCodeAt(f),(c&64512)===55296&&f+1<d&&(u=o.charCodeAt(f+1),(u&64512)===56320&&(c=65536+(c-55296<<10)+(u-56320),f++)),p+=c<128?1:c<2048?2:c<65536?3:4;for(s=new e.Buf8(p),h=0,f=0;h<p;f++)c=o.charCodeAt(f),(c&64512)===55296&&f+1<d&&(u=o.charCodeAt(f+1),(u&64512)===56320&&(c=65536+(c-55296<<10)+(u-56320),f++)),c<128?s[h++]=c:c<2048?(s[h++]=192|c>>>6,s[h++]=128|c&63):c<65536?(s[h++]=224|c>>>12,s[h++]=128|c>>>6&63,s[h++]=128|c&63):(s[h++]=240|c>>>18,s[h++]=128|c>>>12&63,s[h++]=128|c>>>6&63,s[h++]=128|c&63);return s};function i(o,s){if(s<65534&&(o.subarray&&r||!o.subarray&&t))return String.fromCharCode.apply(null,e.shrinkBuf(o,s));for(var c="",u=0;u<s;u++)c+=String.fromCharCode(o[u]);return c}return oa.buf2binstring=function(o){return i(o,o.length)},oa.binstring2buf=function(o){for(var s=new e.Buf8(o.length),c=0,u=s.length;c<u;c++)s[c]=o.charCodeAt(c);return s},oa.buf2string=function(o,s){var c,u,f,h,d=s||o.length,p=new Array(d*2);for(u=0,c=0;c<d;){if(f=o[c++],f<128){p[u++]=f;continue}if(h=n[f],h>4){p[u++]=65533,c+=h-1;continue}for(f&=h===2?31:h===3?15:7;h>1&&c<d;)f=f<<6|o[c++]&63,h--;if(h>1){p[u++]=65533;continue}f<65536?p[u++]=f:(f-=65536,p[u++]=55296|f>>10&1023,p[u++]=56320|f&1023)}return i(p,u)},oa.utf8border=function(o,s){var c;for(s=s||o.length,s>o.length&&(s=o.length),c=s-1;c>=0&&(o[c]&192)===128;)c--;return c<0||c===0?s:c+n[o[c]]>s?c:s},oa}var Il,mf;function vf(){if(mf)return Il;mf=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 Il=e,Il}var gf;function i8(){if(gf)return Ta;gf=1;var e=a8(),t=Gn(),r=pf(),n=Ml(),a=vf(),i=Object.prototype.toString,o=0,s=4,c=0,u=1,f=2,h=-1,d=0,p=8;function w(g){if(!(this instanceof w))return new w(g);this.options=t.assign({level:h,method:p,chunkSize:16384,windowBits:15,memLevel:8,strategy:d,to:""},g||{});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!==c)throw new Error(n[v]);if(b.header&&e.deflateSetHeader(this.strm,b.header),b.dictionary){var E;if(typeof b.dictionary=="string"?E=r.string2buf(b.dictionary):i.call(b.dictionary)==="[object ArrayBuffer]"?E=new Uint8Array(b.dictionary):E=b.dictionary,v=e.deflateSetDictionary(this.strm,E),v!==c)throw new Error(n[v]);this._dict_set=!0}}w.prototype.push=function(g,b){var v=this.strm,E=this.options.chunkSize,C,A;if(this.ended)return!1;A=b===~~b?b:b===!0?s:o,typeof g=="string"?v.input=r.string2buf(g):i.call(g)==="[object ArrayBuffer]"?v.input=new Uint8Array(g):v.input=g,v.next_in=0,v.avail_in=v.input.length;do{if(v.avail_out===0&&(v.output=new t.Buf8(E),v.next_out=0,v.avail_out=E),C=e.deflate(v,A),C!==u&&C!==c)return this.onEnd(C),this.ended=!0,!1;(v.avail_out===0||v.avail_in===0&&(A===s||A===f))&&(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===s?(C=e.deflateEnd(this.strm),this.onEnd(C),this.ended=!0,C===c):(A===f&&(this.onEnd(c),v.avail_out=0),!0)},w.prototype.onData=function(g){this.chunks.push(g)},w.prototype.onEnd=function(g){g===c&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=t.flattenChunks(this.chunks)),this.chunks=[],this.err=g,this.msg=this.strm.msg};function m(g,b){var v=new w(b);if(v.push(g,!0),v.err)throw v.msg||n[v.err];return v.result}function _(g,b){return b=b||{},b.raw=!0,m(g,b)}function y(g,b){return b=b||{},b.gzip=!0,m(g,b)}return Ta.Deflate=w,Ta.deflate=m,Ta.deflateRaw=_,Ta.gzip=y,Ta}var Ma={},Ur={},zl,yf;function o8(){if(yf)return zl;yf=1;var e=30,t=12;return zl=function(n,a){var i,o,s,c,u,f,h,d,p,w,m,_,y,g,b,v,E,C,A,k,B,T,F,V,L;i=n.state,o=n.next_in,V=n.input,s=o+(n.avail_in-5),c=n.next_out,L=n.output,u=c-(a-n.avail_out),f=c+(n.avail_out-257),h=i.dmax,d=i.wsize,p=i.whave,w=i.wnext,m=i.window,_=i.hold,y=i.bits,g=i.lencode,b=i.distcode,v=(1<<i.lenbits)-1,E=(1<<i.distbits)-1;e:do{y<15&&(_+=V[o++]<<y,y+=8,_+=V[o++]<<y,y+=8),C=g[_&v];t:for(;;){if(A=C>>>24,_>>>=A,y-=A,A=C>>>16&255,A===0)L[c++]=C&65535;else if(A&16){k=C&65535,A&=15,A&&(y<A&&(_+=V[o++]<<y,y+=8),k+=_&(1<<A)-1,_>>>=A,y-=A),y<15&&(_+=V[o++]<<y,y+=8,_+=V[o++]<<y,y+=8),C=b[_&E];r:for(;;){if(A=C>>>24,_>>>=A,y-=A,A=C>>>16&255,A&16){if(B=C&65535,A&=15,y<A&&(_+=V[o++]<<y,y+=8,y<A&&(_+=V[o++]<<y,y+=8)),B+=_&(1<<A)-1,B>h){n.msg="invalid distance too far back",i.mode=e;break e}if(_>>>=A,y-=A,A=c-u,B>A){if(A=B-A,A>p&&i.sane){n.msg="invalid distance too far back",i.mode=e;break e}if(T=0,F=m,w===0){if(T+=d-A,A<k){k-=A;do L[c++]=m[T++];while(--A);T=c-B,F=L}}else if(w<A){if(T+=d+w-A,A-=w,A<k){k-=A;do L[c++]=m[T++];while(--A);if(T=0,w<k){A=w,k-=A;do L[c++]=m[T++];while(--A);T=c-B,F=L}}}else if(T+=w-A,A<k){k-=A;do L[c++]=m[T++];while(--A);T=c-B,F=L}for(;k>2;)L[c++]=F[T++],L[c++]=F[T++],L[c++]=F[T++],k-=3;k&&(L[c++]=F[T++],k>1&&(L[c++]=F[T++]))}else{T=c-B;do L[c++]=L[T++],L[c++]=L[T++],L[c++]=L[T++],k-=3;while(k>2);k&&(L[c++]=L[T++],k>1&&(L[c++]=L[T++]))}}else if(A&64){n.msg="invalid distance code",i.mode=e;break e}else{C=b[(C&65535)+(_&(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=g[(C&65535)+(_&(1<<A)-1)];continue t}break}}while(o<s&&c<f);k=y>>3,o-=k,y-=k<<3,_&=(1<<y)-1,n.next_in=o,n.next_out=c,n.avail_in=o<s?5+(s-o):5-(o-s),n.avail_out=c<f?257+(f-c):257-(c-f),i.hold=_,i.bits=y},zl}var Fl,bf;function l8(){if(bf)return Fl;bf=1;var e=Gn(),t=15,r=852,n=592,a=0,i=1,o=2,s=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],c=[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],f=[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 Fl=function(d,p,w,m,_,y,g,b){var v=b.bits,E=0,C=0,A=0,k=0,B=0,T=0,F=0,V=0,L=0,H=0,X,W,Z,Q,K,ue=null,ne=0,fe,re=new e.Buf16(t+1),ye=new e.Buf16(t+1),he=null,ke=0,Ee,me,te;for(E=0;E<=t;E++)re[E]=0;for(C=0;C<m;C++)re[p[w+C]]++;for(B=v,k=t;k>=1&&re[k]===0;k--);if(B>k&&(B=k),k===0)return _[y++]=1<<24|64<<16|0,_[y++]=1<<24|64<<16|0,b.bits=1,0;for(A=1;A<k&&re[A]===0;A++);for(B<A&&(B=A),V=1,E=1;E<=t;E++)if(V<<=1,V-=re[E],V<0)return-1;if(V>0&&(d===a||k!==1))return-1;for(ye[1]=0,E=1;E<t;E++)ye[E+1]=ye[E]+re[E];for(C=0;C<m;C++)p[w+C]!==0&&(g[ye[p[w+C]]++]=C);if(d===a?(ue=he=g,fe=19):d===i?(ue=s,ne-=257,he=c,ke-=257,fe=256):(ue=u,he=f,fe=-1),H=0,C=0,E=A,K=y,T=B,F=0,Z=-1,L=1<<B,Q=L-1,d===i&&L>r||d===o&&L>n)return 1;for(;;){Ee=E-F,g[C]<fe?(me=0,te=g[C]):g[C]>fe?(me=he[ke+g[C]],te=ue[ne+g[C]]):(me=96,te=0),X=1<<E-F,W=1<<T,A=W;do W-=X,_[K+(H>>F)+W]=Ee<<24|me<<16|te|0;while(W!==0);for(X=1<<E-1;H&X;)X>>=1;if(X!==0?(H&=X-1,H+=X):H=0,C++,--re[E]===0){if(E===k)break;E=p[w+g[C]]}if(E>B&&(H&Q)!==Z){for(F===0&&(F=B),K+=A,T=E-F,V=1<<T;T+F<k&&(V-=re[T+F],!(V<=0));)T++,V<<=1;if(L+=1<<T,d===i&&L>r||d===o&&L>n)return 1;Z=H&Q,_[Z]=B<<24|T<<16|K-y|0}}return H!==0&&(_[K+H]=E-F<<24|64<<16|0),b.bits=B,0},Fl}var wf;function s8(){if(wf)return Ur;wf=1;var e=Gn(),t=sf(),r=uf(),n=o8(),a=l8(),i=0,o=1,s=2,c=4,u=5,f=6,h=0,d=1,p=2,w=-2,m=-3,_=-4,y=-5,g=8,b=1,v=2,E=3,C=4,A=5,k=6,B=7,T=8,F=9,V=10,L=11,H=12,X=13,W=14,Z=15,Q=16,K=17,ue=18,ne=19,fe=20,re=21,ye=22,he=23,ke=24,Ee=25,me=26,te=27,se=28,ie=29,_e=30,He=31,je=32,Ve=852,ge=592,Ce=15,ve=Ce;function Oe(P){return(P>>>24&255)+(P>>>8&65280)+((P&65280)<<8)+((P&255)<<24)}function tt(){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 at(P){var j;return!P||!P.state?w:(j=P.state,P.total_in=P.total_out=j.total=0,P.msg="",j.wrap&&(P.adler=j.wrap&1),j.mode=b,j.last=0,j.havedict=0,j.dmax=32768,j.head=null,j.hold=0,j.bits=0,j.lencode=j.lendyn=new e.Buf32(Ve),j.distcode=j.distdyn=new e.Buf32(ge),j.sane=1,j.back=-1,h)}function st(P){var j;return!P||!P.state?w:(j=P.state,j.wsize=0,j.whave=0,j.wnext=0,at(P))}function It(P,j){var M,pe;return!P||!P.state||(pe=P.state,j<0?(M=0,j=-j):(M=(j>>4)+1,j<48&&(j&=15)),j&&(j<8||j>15))?w:(pe.window!==null&&pe.wbits!==j&&(pe.window=null),pe.wrap=M,pe.wbits=j,st(P))}function ut(P,j){var M,pe;return P?(pe=new tt,P.state=pe,pe.window=null,M=It(P,j),M!==h&&(P.state=null),M):w}function ft(P){return ut(P,ve)}var vt=!0,gt,pt;function Ct(P){if(vt){var j;for(gt=new e.Buf32(512),pt=new e.Buf32(32),j=0;j<144;)P.lens[j++]=8;for(;j<256;)P.lens[j++]=9;for(;j<280;)P.lens[j++]=7;for(;j<288;)P.lens[j++]=8;for(a(o,P.lens,0,288,gt,0,P.work,{bits:9}),j=0;j<32;)P.lens[j++]=5;a(s,P.lens,0,32,pt,0,P.work,{bits:5}),vt=!1}P.lencode=gt,P.lenbits=9,P.distcode=pt,P.distbits=5}function Ae(P,j,M,pe){var le,S=P.state;return S.window===null&&(S.wsize=1<<S.wbits,S.wnext=0,S.whave=0,S.window=new e.Buf8(S.wsize)),pe>=S.wsize?(e.arraySet(S.window,j,M-S.wsize,S.wsize,0),S.wnext=0,S.whave=S.wsize):(le=S.wsize-S.wnext,le>pe&&(le=pe),e.arraySet(S.window,j,M-pe,le,S.wnext),pe-=le,pe?(e.arraySet(S.window,j,M-pe,pe,0),S.wnext=pe,S.whave=S.wsize):(S.wnext+=le,S.wnext===S.wsize&&(S.wnext=0),S.whave<S.wsize&&(S.whave+=le))),0}function I(P,j){var M,pe,le,S,ae,ce,N,Y,oe,Qe,Ue,Xe,bt,an,Ot=0,St,Lt,Jt,hr,ai,ii,Ht,Er,tr=new e.Buf8(4),on,Rr,Bo=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!P||!P.state||!P.output||!P.input&&P.avail_in!==0)return w;M=P.state,M.mode===H&&(M.mode=X),ae=P.next_out,le=P.output,N=P.avail_out,S=P.next_in,pe=P.input,ce=P.avail_in,Y=M.hold,oe=M.bits,Qe=ce,Ue=N,Er=h;e:for(;;)switch(M.mode){case b:if(M.wrap===0){M.mode=X;break}for(;oe<16;){if(ce===0)break e;ce--,Y+=pe[S++]<<oe,oe+=8}if(M.wrap&2&&Y===35615){M.check=0,tr[0]=Y&255,tr[1]=Y>>>8&255,M.check=r(M.check,tr,2,0),Y=0,oe=0,M.mode=v;break}if(M.flags=0,M.head&&(M.head.done=!1),!(M.wrap&1)||(((Y&255)<<8)+(Y>>8))%31){P.msg="incorrect header check",M.mode=_e;break}if((Y&15)!==g){P.msg="unknown compression method",M.mode=_e;break}if(Y>>>=4,oe-=4,Ht=(Y&15)+8,M.wbits===0)M.wbits=Ht;else if(Ht>M.wbits){P.msg="invalid window size",M.mode=_e;break}M.dmax=1<<Ht,P.adler=M.check=1,M.mode=Y&512?V:H,Y=0,oe=0;break;case v:for(;oe<16;){if(ce===0)break e;ce--,Y+=pe[S++]<<oe,oe+=8}if(M.flags=Y,(M.flags&255)!==g){P.msg="unknown compression method",M.mode=_e;break}if(M.flags&57344){P.msg="unknown header flags set",M.mode=_e;break}M.head&&(M.head.text=Y>>8&1),M.flags&512&&(tr[0]=Y&255,tr[1]=Y>>>8&255,M.check=r(M.check,tr,2,0)),Y=0,oe=0,M.mode=E;case E:for(;oe<32;){if(ce===0)break e;ce--,Y+=pe[S++]<<oe,oe+=8}M.head&&(M.head.time=Y),M.flags&512&&(tr[0]=Y&255,tr[1]=Y>>>8&255,tr[2]=Y>>>16&255,tr[3]=Y>>>24&255,M.check=r(M.check,tr,4,0)),Y=0,oe=0,M.mode=C;case C:for(;oe<16;){if(ce===0)break e;ce--,Y+=pe[S++]<<oe,oe+=8}M.head&&(M.head.xflags=Y&255,M.head.os=Y>>8),M.flags&512&&(tr[0]=Y&255,tr[1]=Y>>>8&255,M.check=r(M.check,tr,2,0)),Y=0,oe=0,M.mode=A;case A:if(M.flags&1024){for(;oe<16;){if(ce===0)break e;ce--,Y+=pe[S++]<<oe,oe+=8}M.length=Y,M.head&&(M.head.extra_len=Y),M.flags&512&&(tr[0]=Y&255,tr[1]=Y>>>8&255,M.check=r(M.check,tr,2,0)),Y=0,oe=0}else M.head&&(M.head.extra=null);M.mode=k;case k:if(M.flags&1024&&(Xe=M.length,Xe>ce&&(Xe=ce),Xe&&(M.head&&(Ht=M.head.extra_len-M.length,M.head.extra||(M.head.extra=new Array(M.head.extra_len)),e.arraySet(M.head.extra,pe,S,Xe,Ht)),M.flags&512&&(M.check=r(M.check,pe,Xe,S)),ce-=Xe,S+=Xe,M.length-=Xe),M.length))break e;M.length=0,M.mode=B;case B:if(M.flags&2048){if(ce===0)break e;Xe=0;do Ht=pe[S+Xe++],M.head&&Ht&&M.length<65536&&(M.head.name+=String.fromCharCode(Ht));while(Ht&&Xe<ce);if(M.flags&512&&(M.check=r(M.check,pe,Xe,S)),ce-=Xe,S+=Xe,Ht)break e}else M.head&&(M.head.name=null);M.length=0,M.mode=T;case T:if(M.flags&4096){if(ce===0)break e;Xe=0;do Ht=pe[S+Xe++],M.head&&Ht&&M.length<65536&&(M.head.comment+=String.fromCharCode(Ht));while(Ht&&Xe<ce);if(M.flags&512&&(M.check=r(M.check,pe,Xe,S)),ce-=Xe,S+=Xe,Ht)break e}else M.head&&(M.head.comment=null);M.mode=F;case F:if(M.flags&512){for(;oe<16;){if(ce===0)break e;ce--,Y+=pe[S++]<<oe,oe+=8}if(Y!==(M.check&65535)){P.msg="header crc mismatch",M.mode=_e;break}Y=0,oe=0}M.head&&(M.head.hcrc=M.flags>>9&1,M.head.done=!0),P.adler=M.check=0,M.mode=H;break;case V:for(;oe<32;){if(ce===0)break e;ce--,Y+=pe[S++]<<oe,oe+=8}P.adler=M.check=Oe(Y),Y=0,oe=0,M.mode=L;case L:if(M.havedict===0)return P.next_out=ae,P.avail_out=N,P.next_in=S,P.avail_in=ce,M.hold=Y,M.bits=oe,p;P.adler=M.check=1,M.mode=H;case H:if(j===u||j===f)break e;case X:if(M.last){Y>>>=oe&7,oe-=oe&7,M.mode=te;break}for(;oe<3;){if(ce===0)break e;ce--,Y+=pe[S++]<<oe,oe+=8}switch(M.last=Y&1,Y>>>=1,oe-=1,Y&3){case 0:M.mode=W;break;case 1:if(Ct(M),M.mode=fe,j===f){Y>>>=2,oe-=2;break e}break;case 2:M.mode=K;break;case 3:P.msg="invalid block type",M.mode=_e}Y>>>=2,oe-=2;break;case W:for(Y>>>=oe&7,oe-=oe&7;oe<32;){if(ce===0)break e;ce--,Y+=pe[S++]<<oe,oe+=8}if((Y&65535)!==(Y>>>16^65535)){P.msg="invalid stored block lengths",M.mode=_e;break}if(M.length=Y&65535,Y=0,oe=0,M.mode=Z,j===f)break e;case Z:M.mode=Q;case Q:if(Xe=M.length,Xe){if(Xe>ce&&(Xe=ce),Xe>N&&(Xe=N),Xe===0)break e;e.arraySet(le,pe,S,Xe,ae),ce-=Xe,S+=Xe,N-=Xe,ae+=Xe,M.length-=Xe;break}M.mode=H;break;case K:for(;oe<14;){if(ce===0)break e;ce--,Y+=pe[S++]<<oe,oe+=8}if(M.nlen=(Y&31)+257,Y>>>=5,oe-=5,M.ndist=(Y&31)+1,Y>>>=5,oe-=5,M.ncode=(Y&15)+4,Y>>>=4,oe-=4,M.nlen>286||M.ndist>30){P.msg="too many length or distance symbols",M.mode=_e;break}M.have=0,M.mode=ue;case ue:for(;M.have<M.ncode;){for(;oe<3;){if(ce===0)break e;ce--,Y+=pe[S++]<<oe,oe+=8}M.lens[Bo[M.have++]]=Y&7,Y>>>=3,oe-=3}for(;M.have<19;)M.lens[Bo[M.have++]]=0;if(M.lencode=M.lendyn,M.lenbits=7,on={bits:M.lenbits},Er=a(i,M.lens,0,19,M.lencode,0,M.work,on),M.lenbits=on.bits,Er){P.msg="invalid code lengths set",M.mode=_e;break}M.have=0,M.mode=ne;case ne:for(;M.have<M.nlen+M.ndist;){for(;Ot=M.lencode[Y&(1<<M.lenbits)-1],St=Ot>>>24,Lt=Ot>>>16&255,Jt=Ot&65535,!(St<=oe);){if(ce===0)break e;ce--,Y+=pe[S++]<<oe,oe+=8}if(Jt<16)Y>>>=St,oe-=St,M.lens[M.have++]=Jt;else{if(Jt===16){for(Rr=St+2;oe<Rr;){if(ce===0)break e;ce--,Y+=pe[S++]<<oe,oe+=8}if(Y>>>=St,oe-=St,M.have===0){P.msg="invalid bit length repeat",M.mode=_e;break}Ht=M.lens[M.have-1],Xe=3+(Y&3),Y>>>=2,oe-=2}else if(Jt===17){for(Rr=St+3;oe<Rr;){if(ce===0)break e;ce--,Y+=pe[S++]<<oe,oe+=8}Y>>>=St,oe-=St,Ht=0,Xe=3+(Y&7),Y>>>=3,oe-=3}else{for(Rr=St+7;oe<Rr;){if(ce===0)break e;ce--,Y+=pe[S++]<<oe,oe+=8}Y>>>=St,oe-=St,Ht=0,Xe=11+(Y&127),Y>>>=7,oe-=7}if(M.have+Xe>M.nlen+M.ndist){P.msg="invalid bit length repeat",M.mode=_e;break}for(;Xe--;)M.lens[M.have++]=Ht}}if(M.mode===_e)break;if(M.lens[256]===0){P.msg="invalid code -- missing end-of-block",M.mode=_e;break}if(M.lenbits=9,on={bits:M.lenbits},Er=a(o,M.lens,0,M.nlen,M.lencode,0,M.work,on),M.lenbits=on.bits,Er){P.msg="invalid literal/lengths set",M.mode=_e;break}if(M.distbits=6,M.distcode=M.distdyn,on={bits:M.distbits},Er=a(s,M.lens,M.nlen,M.ndist,M.distcode,0,M.work,on),M.distbits=on.bits,Er){P.msg="invalid distances set",M.mode=_e;break}if(M.mode=fe,j===f)break e;case fe:M.mode=re;case re:if(ce>=6&&N>=258){P.next_out=ae,P.avail_out=N,P.next_in=S,P.avail_in=ce,M.hold=Y,M.bits=oe,n(P,Ue),ae=P.next_out,le=P.output,N=P.avail_out,S=P.next_in,pe=P.input,ce=P.avail_in,Y=M.hold,oe=M.bits,M.mode===H&&(M.back=-1);break}for(M.back=0;Ot=M.lencode[Y&(1<<M.lenbits)-1],St=Ot>>>24,Lt=Ot>>>16&255,Jt=Ot&65535,!(St<=oe);){if(ce===0)break e;ce--,Y+=pe[S++]<<oe,oe+=8}if(Lt&&!(Lt&240)){for(hr=St,ai=Lt,ii=Jt;Ot=M.lencode[ii+((Y&(1<<hr+ai)-1)>>hr)],St=Ot>>>24,Lt=Ot>>>16&255,Jt=Ot&65535,!(hr+St<=oe);){if(ce===0)break e;ce--,Y+=pe[S++]<<oe,oe+=8}Y>>>=hr,oe-=hr,M.back+=hr}if(Y>>>=St,oe-=St,M.back+=St,M.length=Jt,Lt===0){M.mode=me;break}if(Lt&32){M.back=-1,M.mode=H;break}if(Lt&64){P.msg="invalid literal/length code",M.mode=_e;break}M.extra=Lt&15,M.mode=ye;case ye:if(M.extra){for(Rr=M.extra;oe<Rr;){if(ce===0)break e;ce--,Y+=pe[S++]<<oe,oe+=8}M.length+=Y&(1<<M.extra)-1,Y>>>=M.extra,oe-=M.extra,M.back+=M.extra}M.was=M.length,M.mode=he;case he:for(;Ot=M.distcode[Y&(1<<M.distbits)-1],St=Ot>>>24,Lt=Ot>>>16&255,Jt=Ot&65535,!(St<=oe);){if(ce===0)break e;ce--,Y+=pe[S++]<<oe,oe+=8}if(!(Lt&240)){for(hr=St,ai=Lt,ii=Jt;Ot=M.distcode[ii+((Y&(1<<hr+ai)-1)>>hr)],St=Ot>>>24,Lt=Ot>>>16&255,Jt=Ot&65535,!(hr+St<=oe);){if(ce===0)break e;ce--,Y+=pe[S++]<<oe,oe+=8}Y>>>=hr,oe-=hr,M.back+=hr}if(Y>>>=St,oe-=St,M.back+=St,Lt&64){P.msg="invalid distance code",M.mode=_e;break}M.offset=Jt,M.extra=Lt&15,M.mode=ke;case ke:if(M.extra){for(Rr=M.extra;oe<Rr;){if(ce===0)break e;ce--,Y+=pe[S++]<<oe,oe+=8}M.offset+=Y&(1<<M.extra)-1,Y>>>=M.extra,oe-=M.extra,M.back+=M.extra}if(M.offset>M.dmax){P.msg="invalid distance too far back",M.mode=_e;break}M.mode=Ee;case Ee:if(N===0)break e;if(Xe=Ue-N,M.offset>Xe){if(Xe=M.offset-Xe,Xe>M.whave&&M.sane){P.msg="invalid distance too far back",M.mode=_e;break}Xe>M.wnext?(Xe-=M.wnext,bt=M.wsize-Xe):bt=M.wnext-Xe,Xe>M.length&&(Xe=M.length),an=M.window}else an=le,bt=ae-M.offset,Xe=M.length;Xe>N&&(Xe=N),N-=Xe,M.length-=Xe;do le[ae++]=an[bt++];while(--Xe);M.length===0&&(M.mode=re);break;case me:if(N===0)break e;le[ae++]=M.length,N--,M.mode=re;break;case te:if(M.wrap){for(;oe<32;){if(ce===0)break e;ce--,Y|=pe[S++]<<oe,oe+=8}if(Ue-=N,P.total_out+=Ue,M.total+=Ue,Ue&&(P.adler=M.check=M.flags?r(M.check,le,Ue,ae-Ue):t(M.check,le,Ue,ae-Ue)),Ue=N,(M.flags?Y:Oe(Y))!==M.check){P.msg="incorrect data check",M.mode=_e;break}Y=0,oe=0}M.mode=se;case se:if(M.wrap&&M.flags){for(;oe<32;){if(ce===0)break e;ce--,Y+=pe[S++]<<oe,oe+=8}if(Y!==(M.total&4294967295)){P.msg="incorrect length check",M.mode=_e;break}Y=0,oe=0}M.mode=ie;case ie:Er=d;break e;case _e:Er=m;break e;case He:return _;case je:default:return w}return P.next_out=ae,P.avail_out=N,P.next_in=S,P.avail_in=ce,M.hold=Y,M.bits=oe,(M.wsize||Ue!==P.avail_out&&M.mode<_e&&(M.mode<te||j!==c))&&Ae(P,P.output,P.next_out,Ue-P.avail_out),Qe-=P.avail_in,Ue-=P.avail_out,P.total_in+=Qe,P.total_out+=Ue,M.total+=Ue,M.wrap&&Ue&&(P.adler=M.check=M.flags?r(M.check,le,Ue,P.next_out-Ue):t(M.check,le,Ue,P.next_out-Ue)),P.data_type=M.bits+(M.last?64:0)+(M.mode===H?128:0)+(M.mode===fe||M.mode===Z?256:0),(Qe===0&&Ue===0||j===c)&&Er===h&&(Er=y),Er}function J(P){if(!P||!P.state)return w;var j=P.state;return j.window&&(j.window=null),P.state=null,h}function de(P,j){var M;return!P||!P.state||(M=P.state,!(M.wrap&2))?w:(M.head=j,j.done=!1,h)}function Se(P,j){var M=j.length,pe,le,S;return!P||!P.state||(pe=P.state,pe.wrap!==0&&pe.mode!==L)?w:pe.mode===L&&(le=1,le=t(le,j,M,0),le!==pe.check)?m:(S=Ae(P,j,M,M),S?(pe.mode=He,_):(pe.havedict=1,h))}return Ur.inflateReset=st,Ur.inflateReset2=It,Ur.inflateResetKeep=at,Ur.inflateInit=ft,Ur.inflateInit2=ut,Ur.inflate=I,Ur.inflateEnd=J,Ur.inflateGetHeader=de,Ur.inflateSetDictionary=Se,Ur.inflateInfo="pako inflate (from Nodeca project)",Ur}var Nl,_f;function xf(){return _f||(_f=1,Nl={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}),Nl}var Ol,kf;function c8(){if(kf)return Ol;kf=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 Ol=e,Ol}var Sf;function u8(){if(Sf)return Ma;Sf=1;var e=s8(),t=Gn(),r=pf(),n=xf(),a=Ml(),i=vf(),o=c8(),s=Object.prototype.toString;function c(h){if(!(this instanceof c))return new c(h);this.options=t.assign({chunkSize:16384,windowBits:0,to:""},h||{});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&&!(h&&h.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 p=e.inflateInit2(this.strm,d.windowBits);if(p!==n.Z_OK)throw new Error(a[p]);if(this.header=new o,e.inflateGetHeader(this.strm,this.header),d.dictionary&&(typeof d.dictionary=="string"?d.dictionary=r.string2buf(d.dictionary):s.call(d.dictionary)==="[object ArrayBuffer]"&&(d.dictionary=new Uint8Array(d.dictionary)),d.raw&&(p=e.inflateSetDictionary(this.strm,d.dictionary),p!==n.Z_OK)))throw new Error(a[p])}c.prototype.push=function(h,d){var p=this.strm,w=this.options.chunkSize,m=this.options.dictionary,_,y,g,b,v,E=!1;if(this.ended)return!1;y=d===~~d?d:d===!0?n.Z_FINISH:n.Z_NO_FLUSH,typeof h=="string"?p.input=r.binstring2buf(h):s.call(h)==="[object ArrayBuffer]"?p.input=new Uint8Array(h):p.input=h,p.next_in=0,p.avail_in=p.input.length;do{if(p.avail_out===0&&(p.output=new t.Buf8(w),p.next_out=0,p.avail_out=w),_=e.inflate(p,n.Z_NO_FLUSH),_===n.Z_NEED_DICT&&m&&(_=e.inflateSetDictionary(this.strm,m)),_===n.Z_BUF_ERROR&&E===!0&&(_=n.Z_OK,E=!1),_!==n.Z_STREAM_END&&_!==n.Z_OK)return this.onEnd(_),this.ended=!0,!1;p.next_out&&(p.avail_out===0||_===n.Z_STREAM_END||p.avail_in===0&&(y===n.Z_FINISH||y===n.Z_SYNC_FLUSH))&&(this.options.to==="string"?(g=r.utf8border(p.output,p.next_out),b=p.next_out-g,v=r.buf2string(p.output,g),p.next_out=b,p.avail_out=w-b,b&&t.arraySet(p.output,p.output,g,b,0),this.onData(v)):this.onData(t.shrinkBuf(p.output,p.next_out))),p.avail_in===0&&p.avail_out===0&&(E=!0)}while((p.avail_in>0||p.avail_out===0)&&_!==n.Z_STREAM_END);return _===n.Z_STREAM_END&&(y=n.Z_FINISH),y===n.Z_FINISH?(_=e.inflateEnd(this.strm),this.onEnd(_),this.ended=!0,_===n.Z_OK):(y===n.Z_SYNC_FLUSH&&(this.onEnd(n.Z_OK),p.avail_out=0),!0)},c.prototype.onData=function(h){this.chunks.push(h)},c.prototype.onEnd=function(h){h===n.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=t.flattenChunks(this.chunks)),this.chunks=[],this.err=h,this.msg=this.strm.msg};function u(h,d){var p=new c(d);if(p.push(h,!0),p.err)throw p.msg||a[p.err];return p.result}function f(h,d){return d=d||{},d.raw=!0,u(h,d)}return Ma.Inflate=c,Ma.inflate=u,Ma.inflateRaw=f,Ma.ungzip=u,Ma}var Ll,Ef;function f8(){if(Ef)return Ll;Ef=1;var e=Gn().assign,t=i8(),r=u8(),n=xf(),a={};return e(a,t,r,n),Ll=a,Ll}(function(e){(function(){var t={};e.exports=t;var r;typeof r8=="function"?r=f8():r=self.pako;function n(){(typeof process>"u"||process.env.NODE_ENV=="development")&&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},s=function(){function u(f){this.message="JPEG error: "+f}return u.prototype=Error(),u.prototype.name="JpegError",u.constructor=u}(),c=function(){function u(f,h){this.message=f,this.g=h}return u.prototype=Error(),u.prototype.name="DNLMarkerError",u.constructor=u}();(function(){function u(){this.M=null,this.B=-1}function f(m,_){for(var y=0,g=[],b,v,E=16;0<E&&!m[E-1];)E--;g.push({children:[],index:0});var C=g[0],A;for(b=0;b<E;b++){for(v=0;v<m[b];v++){for(C=g.pop(),C.children[C.index]=_[y];0<C.index;)C=g.pop();for(C.index++,g.push(C);g.length<=b;)g.push(A={children:[],index:0}),C.children[C.index]=A.children,C=A;y++}b+1<E&&(g.push(A={children:[],index:0}),C.children[C.index]=A.children,C=A)}return g[0].children}function h(m,_,y,g,b,v,E,C,A){function k(){if(0<ne)return ne--,ue>>ne&1;if(ue=m[_++],ue===255){var Ce=m[_++];if(Ce){if(Ce===220&&Z){_+=2;var ve=m[_++]<<8|m[_++];if(0<ve&&ve!==y.g)throw new c("Found DNL marker (0xFFDC) while parsing scan data",ve)}throw new s("unexpected marker "+(ue<<8|Ce).toString(16))}}return ne=7,ue>>>7}function B(Ce){for(;;){if(Ce=Ce[k()],typeof Ce=="number")return Ce;if((typeof Ce>"u"?"undefined":o(Ce))!=="object")throw new s("invalid huffman sequence")}}function T(Ce){for(var ve=0;0<Ce;)ve=ve<<1|k(),Ce--;return ve}function F(Ce){if(Ce===1)return k()===1?1:-1;var ve=T(Ce);return ve>=1<<Ce-1?ve:ve+(-1<<Ce)+1}function V(Ce,ve){var Oe=B(Ce.D);for(Oe=Oe===0?0:F(Oe),Ce.a[ve]=Ce.m+=Oe,Oe=1;64>Oe;){var tt=B(Ce.o),at=tt&15;if(tt>>=4,at===0){if(15>tt)break;Oe+=16}else Oe+=tt,Ce.a[ve+w[Oe]]=F(at),Oe++}}function L(Ce,ve){var Oe=B(Ce.D);Oe=Oe===0?0:F(Oe)<<A,Ce.a[ve]=Ce.m+=Oe}function H(Ce,ve){Ce.a[ve]|=k()<<A}function X(Ce,ve){if(0<fe)fe--;else for(var Oe=v;Oe<=E;){var tt=B(Ce.o),at=tt&15;if(tt>>=4,at===0){if(15>tt){fe=T(tt)+(1<<tt)-1;break}Oe+=16}else Oe+=tt,Ce.a[ve+w[Oe]]=F(at)*(1<<A),Oe++}}function W(Ce,ve){for(var Oe=v,tt=0,at;Oe<=E;){at=ve+w[Oe];var st=0>Ce.a[at]?-1:1;switch(re){case 0:if(tt=B(Ce.o),at=tt&15,tt>>=4,at===0)15>tt?(fe=T(tt)+(1<<tt),re=4):(tt=16,re=1);else{if(at!==1)throw new s("invalid ACn encoding");ye=F(at),re=tt?2:3}continue;case 1:case 2:Ce.a[at]?Ce.a[at]+=st*(k()<<A):(tt--,tt===0&&(re=re===2?3:0));break;case 3:Ce.a[at]?Ce.a[at]+=st*(k()<<A):(Ce.a[at]=ye<<A,re=0);break;case 4:Ce.a[at]&&(Ce.a[at]+=st*(k()<<A))}Oe++}re===4&&(fe--,fe===0&&(re=0))}for(var Z=9<arguments.length&&arguments[9]!==void 0?arguments[9]:!1,Q=y.P,K=_,ue=0,ne=0,fe=0,re=0,ye,he=g.length,ke,Ee,me,te,se=y.S?v===0?C===0?L:H:C===0?X:W:V,ie=0,_e=he===1?g[0].c*g[0].l:Q*y.O,He,je;ie<_e;){var Ve=b?Math.min(_e-ie,b):_e;for(ke=0;ke<he;ke++)g[ke].m=0;if(fe=0,he===1){var ge=g[0];for(te=0;te<Ve;te++)se(ge,64*((ge.c+1)*(ie/ge.c|0)+ie%ge.c)),ie++}else for(te=0;te<Ve;te++){for(ke=0;ke<he;ke++)for(ge=g[ke],He=ge.h,je=ge.j,Ee=0;Ee<je;Ee++)for(me=0;me<He;me++)se(ge,64*((ge.c+1)*((ie/Q|0)*ge.j+Ee)+(ie%Q*ge.h+me)));ie++}if(ne=0,(ge=p(m,_))&&ge.f&&((0,_util.warn)("decodeScan - unexpected MCU data, current marker is: "+ge.f),_=ge.offset),ge=ge&&ge.F,!ge||65280>=ge)throw new s("marker was not found");if(65488<=ge&&65495>=ge)_+=2;else break}return(ge=p(m,_))&&ge.f&&((0,_util.warn)("decodeScan - unexpected Scan data, current marker is: "+ge.f),_=ge.offset),_-K}function d(m,_){for(var y=_.c,g=_.l,b=new Int16Array(64),v=0;v<g;v++)for(var E=0;E<y;E++){var C=64*((_.c+1)*v+E),A=b,k=_.G,B=_.a;if(!k)throw new s("missing required Quantization Table.");for(var T=0;64>T;T+=8){var F=B[C+T],V=B[C+T+1],L=B[C+T+2],H=B[C+T+3],X=B[C+T+4],W=B[C+T+5],Z=B[C+T+6],Q=B[C+T+7];if(F*=k[T],!(V|L|H|X|W|Z|Q))F=5793*F+512>>10,A[T]=F,A[T+1]=F,A[T+2]=F,A[T+3]=F,A[T+4]=F,A[T+5]=F,A[T+6]=F,A[T+7]=F;else{V*=k[T+1],L*=k[T+2],H*=k[T+3],X*=k[T+4],W*=k[T+5],Z*=k[T+6],Q*=k[T+7];var K=5793*F+128>>8,ue=5793*X+128>>8,ne=L,fe=Z;X=2896*(V-Q)+128>>8,Q=2896*(V+Q)+128>>8,H<<=4,W<<=4,K=K+ue+1>>1,ue=K-ue,F=3784*ne+1567*fe+128>>8,ne=1567*ne-3784*fe+128>>8,fe=F,X=X+W+1>>1,W=X-W,Q=Q+H+1>>1,H=Q-H,K=K+fe+1>>1,fe=K-fe,ue=ue+ne+1>>1,ne=ue-ne,F=2276*X+3406*Q+2048>>12,X=3406*X-2276*Q+2048>>12,Q=F,F=799*H+4017*W+2048>>12,H=4017*H-799*W+2048>>12,W=F,A[T]=K+Q,A[T+7]=K-Q,A[T+1]=ue+W,A[T+6]=ue-W,A[T+2]=ne+H,A[T+5]=ne-H,A[T+3]=fe+X,A[T+4]=fe-X}}for(k=0;8>k;++k)F=A[k],V=A[k+8],L=A[k+16],H=A[k+24],X=A[k+32],W=A[k+40],Z=A[k+48],Q=A[k+56],V|L|H|X|W|Z|Q?(K=5793*F+2048>>12,ue=5793*X+2048>>12,ne=L,fe=Z,X=2896*(V-Q)+2048>>12,Q=2896*(V+Q)+2048>>12,K=(K+ue+1>>1)+4112,ue=K-ue,F=3784*ne+1567*fe+2048>>12,ne=1567*ne-3784*fe+2048>>12,fe=F,X=X+W+1>>1,W=X-W,Q=Q+H+1>>1,H=Q-H,K=K+fe+1>>1,fe=K-fe,ue=ue+ne+1>>1,ne=ue-ne,F=2276*X+3406*Q+2048>>12,X=3406*X-2276*Q+2048>>12,Q=F,F=799*H+4017*W+2048>>12,H=4017*H-799*W+2048>>12,W=F,F=K+Q,Q=K-Q,V=ue+W,Z=ue-W,L=ne+H,W=ne-H,H=fe+X,X=fe-X,F=16>F?0:4080<=F?255:F>>4,V=16>V?0:4080<=V?255:V>>4,L=16>L?0:4080<=L?255:L>>4,H=16>H?0:4080<=H?255:H>>4,X=16>X?0:4080<=X?255:X>>4,W=16>W?0:4080<=W?255:W>>4,Z=16>Z?0:4080<=Z?255:Z>>4,Q=16>Q?0:4080<=Q?255:Q>>4,B[C+k]=F,B[C+k+8]=V,B[C+k+16]=L,B[C+k+24]=H,B[C+k+32]=X,B[C+k+40]=W,B[C+k+48]=Z,B[C+k+56]=Q):(F=5793*F+8192>>14,F=-2040>F?0:2024<=F?255:F+2056>>4,B[C+k]=F,B[C+k+8]=F,B[C+k+16]=F,B[C+k+24]=F,B[C+k+32]=F,B[C+k+40]=F,B[C+k+48]=F,B[C+k+56]=F)}return _.a}function p(m,_){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:_,g=m.length-1;if(y=y<_?y:_,_>=g)return null;var b=m[_]<<8|m[_+1];if(65472<=b&&65534>=b)return{f:null,F:b,offset:_};for(var v=m[y]<<8|m[y+1];!(65472<=v&&65534>=v);){if(++y>=g)return null;v=m[y]<<8|m[y+1]}return{f:b.toString(16),F:v,offset:y}}var w=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(m){function _(){var ne=m[E]<<8|m[E+1];return E+=2,ne}function y(){var ne=_();ne=E+ne-2;var fe=p(m,ne,E);return fe&&fe.f&&((0,_util.warn)("readDataBlock - incorrect length, current marker is: "+fe.f),ne=fe.offset),ne=m.subarray(E,ne),E+=ne.length,ne}function g(ne){for(var fe=Math.ceil(ne.v/8/ne.s),re=Math.ceil(ne.g/8/ne.u),ye=0;ye<ne.b.length;ye++){K=ne.b[ye];var he=Math.ceil(Math.ceil(ne.v/8)*K.h/ne.s),ke=Math.ceil(Math.ceil(ne.g/8)*K.j/ne.u);K.a=new Int16Array(64*re*K.j*(fe*K.h+1)),K.c=he,K.l=ke}ne.P=fe,ne.O=re}var b=(1<arguments.length&&arguments[1]!==void 0?arguments[1]:{}).N,v=b===void 0?null:b,E=0,C=null,A=0;b=[];var k=[],B=[],T=_();if(T!==65496)throw new s("SOI not found");for(T=_();T!==65497;){switch(T){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 F=y();T===65518&&F[0]===65&&F[1]===100&&F[2]===111&&F[3]===98&&F[4]===101&&(C={version:F[5]<<8|F[6],Y:F[7]<<8|F[8],Z:F[9]<<8|F[10],W:F[11]});break;case 65499:T=_()+E-2;for(var V;E<T;){var L=m[E++],H=new Uint16Array(64);if(L>>4)if(L>>4===1)for(F=0;64>F;F++)V=w[F],H[V]=_();else throw new s("DQT - invalid table spec");else for(F=0;64>F;F++)V=w[F],H[V]=m[E++];b[L&15]=H}break;case 65472:case 65473:case 65474:if(X)throw new s("Only single frame JPEGs supported");_();var X={};for(X.X=T===65473,X.S=T===65474,X.precision=m[E++],T=_(),X.g=v||T,X.v=_(),X.b=[],X.C={},F=m[E++],T=H=L=0;T<F;T++){V=m[E];var W=m[E+1]>>4,Z=m[E+1]&15;L<W&&(L=W),H<Z&&(H=Z),W=X.b.push({h:W,j:Z,T:m[E+2],G:null}),X.C[V]=W-1,E+=3}X.s=L,X.u=H,g(X);break;case 65476:for(V=_(),T=2;T<V;){for(L=m[E++],H=new Uint8Array(16),F=W=0;16>F;F++,E++)W+=H[F]=m[E];for(Z=new Uint8Array(W),F=0;F<W;F++,E++)Z[F]=m[E];T+=17+W,(L>>4?k:B)[L&15]=f(H,Z)}break;case 65501:_();var Q=_();break;case 65498:for(F=++A===1&&!v,_(),L=m[E++],V=[],T=0;T<L;T++){H=X.C[m[E++]];var K=X.b[H];H=m[E++],K.D=B[H>>4],K.o=k[H&15],V.push(K)}T=m[E++],L=m[E++],H=m[E++];try{var ue=h(m,E,X,V,Q,T,L,H>>4,H&15,F);E+=ue}catch(ne){if(ne instanceof c)return(0,_util.warn)('Attempting to re-parse JPEG image using "scanLines" parameter found in DNL marker (0xFFDC) segment.'),this.parse(m,{N:ne.g});throw ne}break;case 65500:E+=4;break;case 65535:m[E]!==255&&E--;break;default:if(m[E-3]===255&&192<=m[E-2]&&254>=m[E-2])E-=3;else if((F=p(m,E-2))&&F.f)(0,_util.warn)("JpegImage.parse - unexpected data, current marker is: "+F.f),E=F.offset;else throw new s("unknown marker "+T.toString(16))}T=_()}for(this.width=X.v,this.height=X.g,this.A=C,this.b=[],T=0;T<X.b.length;T++)K=X.b[T],(Q=b[K.T])&&(K.G=Q),this.b.push({R:d(X,K),U:K.h/X.s,V:K.j/X.u,c:K.c,l:K.l});this.i=this.b.length},L:function(m,_){var y=this.width/m,g=this.height/_,b,v,E=this.b.length,C=m*_*E,A=new Uint8ClampedArray(C),k=new Uint32Array(m);for(v=0;v<E;v++){var B=this.b[v],T=B.U*y,F=B.V*g,V=v,L=B.R,H=B.c+1<<3;for(b=0;b<m;b++)B=0|b*T,k[b]=(B&4294967288)<<3|B&7;for(T=0;T<_;T++)for(B=0|T*F,B=H*(B&4294967288)|(B&7)<<3,b=0;b<m;b++)A[V]=L[B+k[b]],V+=E}if(g=this.M)for(v=0;v<C;)for(y=B=0;B<E;B++,v++,y+=2)A[v]=(A[v]*g[y]>>8)+g[y+1];return A},w:function(){return this.A?!!this.A.W:this.i===3?this.B!==0:this.B===1},I:function(m){for(var _,y,g,b=0,v=m.length;b<v;b+=3)_=m[b],y=m[b+1],g=m[b+2],m[b]=_-179.456+1.402*g,m[b+1]=_+135.459-.344*y-.714*g,m[b+2]=_-226.816+1.772*y;return m},K:function(m){for(var _,y,g,b,v=0,E=0,C=m.length;E<C;E+=4)_=m[E],y=m[E+1],g=m[E+2],b=m[E+3],m[v++]=-122.67195406894+y*(-660635669420364e-19*y+.000437130475926232*g-54080610064599e-18*_+.00048449797120281*b-.154362151871126)+g*(-.000957964378445773*g+.000817076911346625*_-.00477271405408747*b+1.53380253221734)+_*(.000961250184130688*_-.00266257332283933*b+.48357088451265)+b*(-.000336197177618394*b+.484791561490776),m[v++]=107.268039397724+y*(219927104525741e-19*y-.000640992018297945*g+.000659397001245577*_+.000426105652938837*b-.176491792462875)+g*(-.000778269941513683*g+.00130872261408275*_+.000770482631801132*b-.151051492775562)+_*(.00126935368114843*_-.00265090189010898*b+.25802910206845)+b*(-.000318913117588328*b-.213742400323665),m[v++]=-20.810012546947+y*(-.000570115196973677*y-263409051004589e-19*g+.0020741088115012*_-.00288260236853442*b+.814272968359295)+g*(-153496057440975e-19*g-.000132689043961446*_+.000560833691242812*b-.195152027534049)+_*(.00174418132927582*_-.00255243321439347*b+.116935020465145)+b*(-.000343531996510555*b+.24165260232407);return m.subarray(0,v)},J:function(m){for(var _,y,g,b=0,v=m.length;b<v;b+=4)_=m[b],y=m[b+1],g=m[b+2],m[b]=434.456-_-1.402*g,m[b+1]=119.541-_+.344*y+.714*g,m[b+2]=481.816-_-1.772*y;return m},H:function(m){for(var _,y,g,b,v=0,E=1/255,C=0,A=m.length;C<A;C+=4)_=m[C]*E,y=m[C+1]*E,g=m[C+2]*E,b=m[C+3]*E,m[v++]=255+_*(-4.387332384609988*_+54.48615194189176*y+18.82290502165302*g+212.25662451639585*b-285.2331026137004)+y*(1.7149763477362134*y-5.6096736904047315*g-17.873870861415444*b-5.497006427196366)+g*(-2.5217340131683033*g-21.248923337353073*b+17.5119270841813)-b*(21.86122147463605*b+189.48180835922747),m[v++]=255+_*(8.841041422036149*_+60.118027045597366*y+6.871425592049007*g+31.159100130055922*b-79.2970844816548)+y*(-15.310361306967817*y+17.575251261109482*g+131.35250912493976*b-190.9453302588951)+g*(4.444339102852739*g+9.8632861493405*b-24.86741582555878)-b*(20.737325471181034*b+187.80453709719578),m[v++]=255+_*(.8842522430003296*_+8.078677503112928*y+30.89978309703729*g-.23883238689178934*b-14.183576799673286)+y*(10.49593273432072*y+63.02378494754052*g+50.606957656360734*b-112.23884253719248)+g*(.03296041114873217*g+115.60384449646641*b-193.58209356861505)-b*(22.33816807309886*b+180.12613974708367);return m.subarray(0,v)},getData:function(m,_,y){if(4<this.i)throw new s("Unsupported color mode");if(m=this.L(m,_),this.i===1&&y){y=m.length,_=new Uint8ClampedArray(3*y);for(var g=0,b=0;b<y;b++){var v=m[b];_[g++]=v,_[g++]=v,_[g++]=v}return _}if(this.i===3&&this.w())return this.I(m);if(this.i===4){if(this.w())return y?this.K(m):this.J(m);if(y)return this.H(m)}return m}},a.JpegDecoder=u})()})(),a.encodeImage=function(o,s,c,u){var f={t256:[s],t257:[c],t258:[8,8,8,8],t259:[1],t262:[2],t273:[1e3],t277:[4],t278:[c],t279:[s*c*4],t282:[1],t283:[1],t284:[1],t286:[0],t287:[0],t296:[1],t305:["Photopea (UTIF.js)"],t338:[1]};if(u)for(var h in u)f[h]=u[h];for(var d=new Uint8Array(a.encode([f])),p=new Uint8Array(o),w=new Uint8Array(1e3+s*c*4),h=0;h<d.length;h++)w[h]=d[h];for(var h=0;h<p.length;h++)w[1e3+h]=p[h];return w.buffer},a.encode=function(o){var s=new Uint8Array(2e4),c=4,u=a._binBE;s[0]=77,s[1]=77,s[3]=42;var f=8;u.writeUint(s,c,f),c+=4;for(var h=0;h<o.length;h++){var d=a._writeIFD(u,s,f,o[h]);f=d[1],h<o.length-1&&u.writeUint(s,d[0],f)}return s.slice(0,f).buffer},a.decode=function(o){a.decode._decodeG3.allow2D=null;var s=new Uint8Array(o),c=0,u=a._binBE.readASCII(s,c,2);c+=2;var f=u=="II"?a._binLE:a._binBE;f.readUshort(s,c),c+=2;var h=f.readUint(s,c);c+=4;for(var d=[];;){var p=a._readIFD(f,s,h,d,0,!1);if(h=f.readUint(s,p),h==0)break}return d},a.decodeImage=function(o,s,c){var u=new Uint8Array(o),f=a._binBE.readASCII(u,0,2);if(s.t256!=null){s.isLE=f=="II",s.width=s.t256[0],s.height=s.t257[0];var h=s.t259?s.t259[0]:1,d=s.t266?s.t266[0]:1;s.t284&&s.t284[0]==2&&n("PlanarConfiguration 2 should not be used!");var p;s.t258?p=Math.min(32,s.t258[0])*s.t258.length:p=s.t277?s.t277[0]:1,h==1&&s.t279!=null&&s.t278&&s.t262[0]==32803&&(p=Math.round(s.t279[0]*8/(s.width*s.t278[0])));var w=Math.ceil(s.width*p/8)*8,m=s.t273;m==null&&(m=s.t324);var _=s.t279;h==1&&m.length==1&&(_=[s.height*(w>>>3)]),_==null&&(_=s.t325);var y=new Uint8Array(s.height*(w>>>3)),g=0;if(s.t322!=null){for(var b=s.t322[0],v=s.t323[0],E=Math.floor((s.width+b-1)/b),C=Math.floor((s.height+v-1)/v),A=new Uint8Array(Math.ceil(b*v*p/8)|0),k=0;k<C;k++)for(var B=0;B<E;B++){for(var T=k*E+B,F=0;F<A.length;F++)A[F]=0;a.decode._decompress(s,c,u,m[T],_[T],h,A,0,d),h==6?y=A:a._copyTile(A,Math.ceil(b*p/8)|0,v,y,Math.ceil(s.width*p/8)|0,s.height,Math.ceil(B*b*p/8)|0,k*v)}g=y.length*8}else{var V=s.t278?s.t278[0]:s.height;V=Math.min(V,s.height);for(var T=0;T<m.length;T++)a.decode._decompress(s,c,u,m[T],_[T],h,y,Math.ceil(g/8)|0,d),g+=w*V;g=Math.min(g,y.length*8)}s.data=new Uint8Array(y.buffer,0,Math.ceil(g/8)|0)}},a.decode._decompress=function(o,s,c,u,f,h,d,p,w){if(h==1||f==d.length&&h!=32767)for(var m=0;m<f;m++)d[p+m]=c[u+m];else if(h==3)a.decode._decodeG3(c,u,f,d,p,o.width,w);else if(h==4)a.decode._decodeG4(c,u,f,d,p,o.width,w);else if(h==5)a.decode._decodeLZW(c,u,d,p);else if(h==6)a.decode._decodeOldJPEG(o,c,u,f,d,p);else if(h==7)a.decode._decodeNewJPEG(o,c,u,f,d,p);else if(h==8)for(var _=new Uint8Array(c.buffer,u,f),y=i.inflate(_),g=0;g<y.length;g++)d[p+g]=y[g];else h==32767?a.decode._decodeARW(o,c,u,f,d,p):h==32773?a.decode._decodePackBits(c,u,f,d,p):h==32809?a.decode._decodeThunder(c,u,f,d,p):h==34713?a.decode._decodeNikon(o,s,c,u,f,d,p):n("Unknown compression",h);var b=o.t258?Math.min(32,o.t258[0]):1,v=o.t277?o.t277[0]:1,E=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 k=0;k<C;k++)for(var B=p+k*A,T=1;T<A;T+=2){var F=d[B+T];d[B+T]=d[B+T-1],d[B+T-1]=F}if(o.t317&&o.t317[0]==2)for(var k=0;k<C;k++){var V=p+k*A;if(b==16)for(var m=E;m<A;m+=2){var L=(d[V+m+1]<<8|d[V+m])+(d[V+m-E+1]<<8|d[V+m-E]);d[V+m]=L&255,d[V+m+1]=L>>>8&255}else if(v==3)for(var m=3;m<A;m+=3)d[V+m]=d[V+m]+d[V+m-3]&255,d[V+m+1]=d[V+m+1]+d[V+m-2]&255,d[V+m+2]=d[V+m+2]+d[V+m-1]&255;else for(var m=E;m<A;m++)d[V+m]=d[V+m]+d[V+m-E]&255}},a.decode._ljpeg_diff=function(o,s,c){var u=a.decode._getbithuff,f,h;return f=u(o,s,c[0],c),h=u(o,s,f,0),h&1<<f-1||(h-=(1<<f)-1),h},a.decode._decodeARW=function(o,s,c,u,f,h){var d=o.t256[0],p=o.t257[0],w=o.t258[0],m=o.isLE?a._binLE:a._binBE,_=d*p==u||d*p*1.5==u;if(!_){p+=8;var y=[c,0,0,0],g=new Uint16Array(32770),b=[3857,3856,3599,3342,3085,2828,2571,2314,2057,1800,1543,1286,1029,772,771,768,514,513],re,v,E,X,H,C=0,A=a.decode._ljpeg_diff;for(g[0]=15,E=re=0;re<18;re++)for(var k=32768>>>(b[re]>>>8),v=0;v<k;v++)g[++E]=b[re];for(X=d;X--;)for(H=0;H<p+1;H+=2)if(H==p&&(H=1),C+=A(s,y,g),H<p){var B=C&4095;a.decode._putsF(f,(H*d+X)*w,B<<16-w)}return}if(d*p*1.5==u){for(var re=0;re<u;re+=3){var T=s[c+re+0],F=s[c+re+1],V=s[c+re+2];f[h+re]=F<<4|T>>>4,f[h+re+1]=T<<4|V>>>4,f[h+re+2]=V<<4|F>>>4}return}var L=new Uint16Array(16),H,X,W,Z,Q,K,ue,ne,fe,re,ye,he=new Uint8Array(d+1);for(H=0;H<p;H++){for(var ke=0;ke<d;ke++)he[ke]=s[c++];for(ye=0,X=0;X<d-30;ye+=16){for(Z=2047&(W=m.readUint(he,ye)),Q=2047&W>>>11,K=15&W>>>22,ue=15&W>>>26,ne=0;ne<4&&128<<ne<=Z-Q;ne++);for(fe=30,re=0;re<16;re++)re==K?L[re]=Z:re==ue?L[re]=Q:(L[re]=((m.readUshort(he,ye+(fe>>3))>>>(fe&7)&127)<<ne)+Q,L[re]>2047&&(L[re]=2047),fe+=7);for(re=0;re<16;re++,X+=2){var B=L[re]<<1;a.decode._putsF(f,(H*d+X)*w,B<<16-w)}X-=X&1?1:31}}},a.decode._decodeNikon=function(o,s,c,u,f,h,d){var p=[[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]],w=o.t256[0],m=o.t257[0],_=o.t258[0],y=0,g=0,b=a.decode._make_decoder,v=a.decode._getbithuff,E=s[0].exifIFD.makerNote,C=E.t150?E.t150:E.t140,A=0,k=C[A++],B=C[A++];(k==73||B==88)&&(A+=2110),k==70&&(y=2),_==14&&(y+=3);for(var T=[[0,0],[0,0]],F=o.isLE?a._binLE:a._binBE,W=0;W<2;W++)for(var V=0;V<2;V++)T[W][V]=F.readShort(C,A),A+=2;var L=1<<_&32767,H=0,X=F.readShort(C,A);A+=2,X>1&&(H=Math.floor(L/(X-1))),k==68&&B==32&&H>0&&(g=F.readShort(C,562));var W,Z,Q,K,ue,ne,fe=[0,0],re=b(p[y]),ye=[u,0,0,0];for(Z=0;Z<m;Z++)for(g&&Z==g&&(re=b(p[y+1])),Q=0;Q<w;Q++){W=v(c,ye,re[0],re),K=W&15,ue=W>>>4,ne=(v(c,ye,K-ue,0)<<1)+1<<ue>>>1,ne&1<<K-1||(ne-=(1<<K)-(ue==0?1:0)),Q<2?fe[Q]=T[Z&1][Q]+=ne:fe[Q&1]+=ne;var he=Math.min(Math.max(fe[Q&1],0),(1<<_)-1),ke=(Z*w+Q)*_;a.decode._putsF(h,ke,he<<16-_)}},a.decode._putsF=function(o,s,c){c=c<<8-(s&7);var u=s>>>3;o[u]|=c>>>16,o[u+1]|=c>>>8,o[u+2]|=c},a.decode._getbithuff=function(o,s,c,u){var f=0;a.decode._get_byte;var h,d=s[0],p=s[1],w=s[2],m=s[3];if(c==0||w<0)return 0;for(;!m&&w<c&&(h=o[d++])!=-1&&!(m=f);)p=(p<<8)+h,w+=8;if(h=p<<32-w>>>32-c,u?(w-=u[h+1]>>>8,h=u[h+1]&255):w-=c,w<0)throw"e";return s[0]=d,s[1]=p,s[2]=w,s[3]=m,h},a.decode._make_decoder=function(o){var s,c,u,f,h,d=[];for(s=16;s!=0&&!o[s];s--);var p=17;for(d[0]=s,u=c=1;c<=s;c++)for(f=0;f<o[c];f++,++p)for(h=0;h<1<<s-c;h++)u<=1<<s&&(d[u++]=c<<8|o[p]);return d},a.decode._decodeNewJPEG=function(o,s,c,u,f,h){var d=o.t347,p=d?d.length:0,w=new Uint8Array(p+u);if(d){for(var m=216,_=217,y=0,g=0;g<p-1&&!(d[g]==255&&d[g+1]==_);g++)w[y++]=d[g];var b=s[c],v=s[c+1];(b!=255||v!=m)&&(w[y++]=b,w[y++]=v);for(var g=2;g<u;g++)w[y++]=s[c+g]}else for(var g=0;g<u;g++)w[g]=s[c+g];if(o.t262[0]==32803||o.t262[0]==34892){var E=o.t258[0],C=a.LosslessJpegDecode(w),A=C.length;if(E==16)if(o.isLE)for(var g=0;g<A;g++)f[h+(g<<1)]=C[g]&255,f[h+(g<<1)+1]=C[g]>>>8;else for(var g=0;g<A;g++)f[h+(g<<1)]=C[g]>>>8,f[h+(g<<1)+1]=C[g]&255;else if(E==14||E==12)for(var k=16-E,g=0;g<A;g++)a.decode._putsF(f,g*E,C[g]<<k);else throw new Error("unsupported bit depth "+E)}else{var B=new a.JpegDecoder;B.parse(w);for(var T=B.getData(B.width,B.height),g=0;g<T.length;g++)f[h+g]=T[g]}o.t262[0]==6&&(o.t262[0]=2)},a.decode._decodeOldJPEGInit=function(o,s,c,u){var f=216,h=219,d=196,p=221,w=192,m=218,_=0,y=0,g,b,v=!1,E,C,A,k=o.t513,B=k?k[0]:0,T=o.t514,F=T?T[0]:0,V=o.t324||o.t273||k,L=o.t530,H=0,X=0,W=o.t277?o.t277[0]:1,Z=o.t515;if(V&&(y=V[0],v=V.length>1),!v){if(s[c]==255&&s[c+1]==f)return{jpegOffset:c};if(k!=null&&(s[c+B]==255&&s[c+B+1]==f?_=c+B:n("JPEGInterchangeFormat does not point to SOI"),T==null?n("JPEGInterchangeFormatLength field is missing"):(B>=y||B+F<=y)&&n("JPEGInterchangeFormatLength field value is invalid"),_!=null))return{jpegOffset:_}}if(L!=null&&(H=L[0],X=L[1]),k!=null&&T!=null)if(F>=2&&B+F<=y){for(s[c+B+F-2]==255&&s[c+B+F-1]==f?g=new Uint8Array(F-2):g=new Uint8Array(F),E=0;E<g.length;E++)g[E]=s[c+B+E];n("Incorrect JPEG interchange format: using JPEGInterchangeFormat offset to derive tables")}else n("JPEGInterchangeFormat+JPEGInterchangeFormatLength > offset to first strip or tile");if(g==null){var Q=0,K=[];K[Q++]=255,K[Q++]=f;var ue=o.t519;if(ue==null)throw new Error("JPEGQTables tag is missing");for(E=0;E<ue.length;E++)for(K[Q++]=255,K[Q++]=h,K[Q++]=0,K[Q++]=67,K[Q++]=E,C=0;C<64;C++)K[Q++]=s[c+ue[E]+C];for(A=0;A<2;A++){var ne=o[A==0?"t520":"t521"];if(ne==null)throw new Error((A==0?"JPEGDCTables":"JPEGACTables")+" tag is missing");for(E=0;E<ne.length;E++){K[Q++]=255,K[Q++]=d;var fe=19;for(C=0;C<16;C++)fe+=s[c+ne[E]+C];for(K[Q++]=fe>>>8,K[Q++]=fe&255,K[Q++]=E|A<<4,C=0;C<16;C++)K[Q++]=s[c+ne[E]+C];for(C=0;C<fe;C++)K[Q++]=s[c+ne[E]+16+C]}}if(K[Q++]=255,K[Q++]=w,K[Q++]=0,K[Q++]=8+3*W,K[Q++]=8,K[Q++]=o.height>>>8&255,K[Q++]=o.height&255,K[Q++]=o.width>>>8&255,K[Q++]=o.width&255,K[Q++]=W,W==1)K[Q++]=1,K[Q++]=17,K[Q++]=0;else for(E=0;E<3;E++)K[Q++]=E+1,K[Q++]=E!=0?17:(H&15)<<4|X&15,K[Q++]=E;Z!=null&&Z[0]!=0&&(K[Q++]=255,K[Q++]=p,K[Q++]=0,K[Q++]=4,K[Q++]=Z[0]>>>8&255,K[Q++]=Z[0]&255),g=new Uint8Array(K)}var re=-1;for(E=0;E<g.length-1;){if(g[E]==255&&g[E+1]==w){re=E;break}E++}if(re==-1){var ye=new Uint8Array(g.length+10+3*W);ye.set(g);var he=g.length;if(re=g.length,g=ye,g[he++]=255,g[he++]=w,g[he++]=0,g[he++]=8+3*W,g[he++]=8,g[he++]=o.height>>>8&255,g[he++]=o.height&255,g[he++]=o.width>>>8&255,g[he++]=o.width&255,g[he++]=W,W==1)g[he++]=1,g[he++]=17,g[he++]=0;else for(E=0;E<3;E++)g[he++]=E+1,g[he++]=E!=0?17:(H&15)<<4|X&15,g[he++]=E}if(s[y]==255&&s[y+1]==m){var ke=s[y+2]<<8|s[y+3];for(b=new Uint8Array(ke+2),b[0]=s[y],b[1]=s[y+1],b[2]=s[y+2],b[3]=s[y+3],E=0;E<ke-2;E++)b[E+4]=s[y+E+4]}else{b=new Uint8Array(8+2*W);var Ee=0;if(b[Ee++]=255,b[Ee++]=m,b[Ee++]=0,b[Ee++]=6+2*W,b[Ee++]=W,W==1)b[Ee++]=1,b[Ee++]=0;else for(E=0;E<3;E++)b[Ee++]=E+1,b[Ee++]=E<<4|E;b[Ee++]=0,b[Ee++]=63,b[Ee++]=0}return{jpegOffset:c,tables:g,sosMarker:b,sofPosition:re}},a.decode._decodeOldJPEG=function(o,s,c,u,f,h){var d,p,w,m,_,y=a.decode._decodeOldJPEGInit(o,s,c,u);if(y.jpegOffset!=null)for(p=c+u-y.jpegOffset,m=new Uint8Array(p),d=0;d<p;d++)m[d]=s[y.jpegOffset+d];else{for(w=y.tables.length,m=new Uint8Array(w+y.sosMarker.length+u+2),m.set(y.tables),_=w,m[y.sofPosition+5]=o.height>>>8&255,m[y.sofPosition+6]=o.height&255,m[y.sofPosition+7]=o.width>>>8&255,m[y.sofPosition+8]=o.width&255,(s[c]!=255||s[c+1]!=SOS)&&(m.set(y.sosMarker,_),_+=sosMarker.length),d=0;d<u;d++)m[_++]=s[c+d];m[_++]=255,m[_++]=EOI}var g=new a.JpegDecoder;g.parse(m);for(var b=g.getData(g.width,g.height),d=0;d<b.length;d++)f[h+d]=b[d];o.t262&&o.t262[0]==6&&(o.t262[0]=2)},a.decode._decodePackBits=function(o,s,c,u,f){for(var h=new Int8Array(o.buffer),d=new Int8Array(u.buffer),p=s+c;s<p;){var w=h[s];if(s++,w>=0&&w<128)for(var m=0;m<w+1;m++)d[f]=h[s],f++,s++;if(w>=-127&&w<0){for(var m=0;m<-w+1;m++)d[f]=h[s],f++;s++}}},a.decode._decodeThunder=function(o,s,c,u,f){for(var h=[0,1,0,-1],d=[0,1,2,3,0,-3,-2,-1],p=s+c,w=f*2,m=0;s<p;){var _=o[s],y=_>>>6,g=_&63;if(s++,y==3&&(m=g&15,u[w>>>1]|=m<<4*(1-w&1),w++),y==0)for(var b=0;b<g;b++)u[w>>>1]|=m<<4*(1-w&1),w++;if(y==2)for(var b=0;b<2;b++){var v=g>>>3*(1-b)&7;v!=4&&(m+=d[v],u[w>>>1]|=m<<4*(1-w&1),w++)}if(y==1)for(var b=0;b<3;b++){var v=g>>>2*(2-b)&3;v!=2&&(m+=h[v],u[w>>>1]|=m<<4*(1-w&1),w++)}}},a.decode._dmap={1:0,"011":1,"000011":2,"0000011":3,"010":-1,"000010":-2,"0000010":-3},a.decode._lens=function(){var o=function(w,m,_,y){for(var g=0;g<m.length;g++)w[m[g]]=_+g*y},s="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",c="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",f="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",h="00000001000,00000001100,00000001101,000000010010,000000010011,000000010100,000000010101,000000010110,000000010111,000000011100,000000011101,000000011110,000000011111";s=s.split(","),c=c.split(","),u=u.split(","),f=f.split(","),h=h.split(",");var d={},p={};return o(d,s,0,1),o(d,u,64,64),o(d,h,1792,64),o(p,c,0,1),o(p,f,64,64),o(p,h,1792,64),[d,p]}(),a.decode._decodeG4=function(o,s,c,u,f,h,d){for(var p=a.decode,w=s<<3,m=0,_="",y=[],g=[],b=0;b<h;b++)g.push(0);g=p._makeDiff(g);for(var v=0,E=0,C=0,A=0,k=0,B=0,T="",F=0,V=Math.ceil(h/8)*8;w>>>3<s+c;){C=p._findDiff(g,v+(v==0?0:1),1-k),A=p._findDiff(g,C,k);var L=0;if(d==1&&(L=o[w>>>3]>>>7-(w&7)&1),d==2&&(L=o[w>>>3]>>>(w&7)&1),w++,_+=L,T=="H"){if(p._lens[k][_]!=null){var H=p._lens[k][_];_="",m+=H,H<64&&(p._addNtimes(y,m,k),v+=m,k=1-k,m=0,F--,F==0&&(T=""))}}else _=="0001"&&(_="",p._addNtimes(y,A-v,k),v=A),_=="001"&&(_="",T="H",F=2),p._dmap[_]!=null&&(E=C+p._dmap[_],p._addNtimes(y,E-v,k),v=E,_="",k=1-k);y.length==h&&T==""&&(p._writeBits(y,u,f*8+B*V),k=0,B++,v=0,g=p._makeDiff(y),y=[])}},a.decode._findDiff=function(o,s,c){for(var u=0;u<o.length;u+=2)if(o[u]>=s&&o[u+1]==c)return o[u]},a.decode._makeDiff=function(o){var s=[];o[0]==1&&s.push(0,1);for(var c=1;c<o.length;c++)o[c-1]!=o[c]&&s.push(c,o[c]);return s.push(o.length,0,o.length,1),s},a.decode._decodeG3=function(o,s,c,u,f,h,d){for(var p=a.decode,w=s<<3,m=0,_="",y=[],g=[],b=0;b<h;b++)y.push(0);for(var v=0,E=0,C=0,A=0,k=0,B=-1,T="",F=0,V=!1,L=Math.ceil(h/8)*8;w>>>3<s+c;){C=p._findDiff(g,v+(v==0?0:1),1-k),A=p._findDiff(g,C,k);var H=0;if(d==1&&(H=o[w>>>3]>>>7-(w&7)&1),d==2&&(H=o[w>>>3]>>>(w&7)&1),w++,_+=H,V){if(p._lens[k][_]!=null){var X=p._lens[k][_];_="",m+=X,X<64&&(p._addNtimes(y,m,k),k=1-k,m=0)}}else if(T=="H"){if(p._lens[k][_]!=null){var X=p._lens[k][_];_="",m+=X,X<64&&(p._addNtimes(y,m,k),v+=m,k=1-k,m=0,F--,F==0&&(T=""))}}else _=="0001"&&(_="",p._addNtimes(y,A-v,k),v=A),_=="001"&&(_="",T="H",F=2),p._dmap[_]!=null&&(E=C+p._dmap[_],p._addNtimes(y,E-v,k),v=E,_="",k=1-k);_.endsWith("000000000001")&&(B>=0&&p._writeBits(y,u,f*8+B*L),d==1&&(V=(o[w>>>3]>>>7-(w&7)&1)==1),d==2&&(V=(o[w>>>3]>>>(w&7)&1)==1),w++,p._decodeG3.allow2D==null&&(p._decodeG3.allow2D=V),p._decodeG3.allow2D||(V=!0,w--),_="",k=0,B++,v=0,g=p._makeDiff(y),y=[])}y.length==h&&p._writeBits(y,u,f*8+B*L)},a.decode._addNtimes=function(o,s,c){for(var u=0;u<s;u++)o.push(c)},a.decode._writeBits=function(o,s,c){for(var u=0;u<o.length;u++)s[c+u>>>3]|=o[u]<<7-(c+u&7)},a.decode._decodeLZW=function(o,s,c,u){if(a.decode._lzwTab==null){for(var f=new Uint32Array(65535),h=new Uint16Array(65535),_=new Uint8Array(2e6),d=0;d<256;d++)_[d<<2]=d,f[d]=d<<2,h[d]=1;a.decode._lzwTab=[f,h,_]}for(var p=a.decode._copyData,w=a.decode._lzwTab[0],m=a.decode._lzwTab[1],_=a.decode._lzwTab[2],y=258,g=1032,b=9,v=s<<3,E=256,C=257,A=0,k=0,B=0;A=o[v>>>3]<<16|o[v+8>>>3]<<8|o[v+16>>>3],k=A>>24-(v&7)-b&(1<<b)-1,v+=b,k!=C;){if(k==E){if(b=9,y=258,g=1032,A=o[v>>>3]<<16|o[v+8>>>3]<<8|o[v+16>>>3],k=A>>24-(v&7)-b&(1<<b)-1,v+=b,k==C)break;c[u]=k,u++}else if(k<y){var T=w[k],F=m[k];if(p(_,T,c,u,F),u+=F,B>=y)w[y]=g,_[w[y]]=T[0],m[y]=1,g=g+1+3&-4,y++;else{w[y]=g;var V=w[B],L=m[B];p(_,V,_,g,L),_[g+L]=_[T],L++,m[y]=L,y++,g=g+L+3&-4}y+1==1<<b&&b++}else{if(B>=y)w[y]=g,m[y]=0,y++;else{w[y]=g;var V=w[B],L=m[B];p(_,V,_,g,L),_[g+L]=_[g],L++,m[y]=L,y++,p(_,g,c,u,L),u+=L,g=g+L+3&-4}y+1==1<<b&&b++}B=k}},a.decode._copyData=function(o,s,c,u,f){for(var h=0;h<f;h+=4)c[u+h]=o[s+h],c[u+h+1]=o[s+h+1],c[u+h+2]=o[s+h+2],c[u+h+3]=o[s+h+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,s,c,u,f,h){var d=o.readUshort(s,c);c+=2;var p={};u.push(p),h&&n(" ".repeat(f),u.length-1,">>>----------------");for(var w=0;w<d;w++){var m=o.readUshort(s,c);c+=2;var _=o.readUshort(s,c);c+=2;var y=o.readUint(s,c);c+=4;var g=o.readUint(s,c);c+=4;var b=[];if((_==1||_==7)&&(b=new Uint8Array(s.buffer,y<5?c-4:g,y)),_==2){var v=y<5?c-4:g,E=s[v];E<128?b.push(o.readASCII(s,v,y-1)):b=new Uint8Array(s.buffer,v,y-1)}if(_==3)for(var C=0;C<y;C++)b.push(o.readUshort(s,(y<3?c-4:g)+2*C));if(_==4)for(var C=0;C<y;C++)b.push(o.readUint(s,(y<2?c-4:g)+4*C));if(_==5)for(var C=0;C<y;C++)b.push(o.readUint(s,g+C*8)/o.readUint(s,g+C*8+4));if(_==8)for(var C=0;C<y;C++)b.push(o.readShort(s,(y<3?c-4:g)+2*C));if(_==9)for(var C=0;C<y;C++)b.push(o.readInt(s,(y<2?c-4:g)+4*C));if(_==10)for(var C=0;C<y;C++)b.push(o.readInt(s,g+C*8)/o.readInt(s,g+C*8+4));if(_==11)for(var C=0;C<y;C++)b.push(o.readFloat(s,g+C*4));if(_==12)for(var C=0;C<y;C++)b.push(o.readDouble(s,g+C*8));if(p["t"+m]=b,y!=0&&b.length==0&&n("unknown TIFF tag type: ",_,"num:",y),h&&n(" ".repeat(f),m,_,a.tags[m],b),!(m==330&&p.t272&&p.t272[0]=="DSLR-A100")){if(m==330||m==34665||m==50740&&o.readUshort(s,o.readUint(b,0))<300){for(var A=m==50740?[o.readUint(b,0)]:b,k=[],C=0;C<A.length;C++)a._readIFD(o,s,A[C],k,f+1,h);m==330&&(p.subIFD=k),m==34665&&(p.exifIFD=k[0]),m==50740&&(p.dngPrvt=k[0])}}if(m==37500){var B=b;if(o.readASCII(B,0,5)=="Nikon")p.makerNote=a.decode(B.slice(10).buffer)[0];else if(o.readUshort(s,g)<300){var T=[];a._readIFD(o,s,g,T,f+1,h),p.makerNote=T[0]}}}return h&&n(" ".repeat(f),"<<<---------------"),c},a._writeIFD=function(o,s,c,u){var f=Object.keys(u);o.writeUshort(s,c,f.length),c+=2;for(var h=c+f.length*12+4,d=0;d<f.length;d++){var p=f[d],w=parseInt(p.slice(1)),m=a.ttypes[w];if(m==null)throw new Error("unknown type of tag: "+w);var _=u[p];m==2&&(_=_[0]+"\0");var y=_.length;o.writeUshort(s,c,w),c+=2,o.writeUshort(s,c,m),c+=2,o.writeUint(s,c,y),c+=4;var g=[-1,1,1,2,4,8,0,0,0,0,0,0,8][m]*y,b=c;if(g>4&&(o.writeUint(s,c,h),b=h),m==2&&o.writeASCII(s,b,_),m==3)for(var v=0;v<y;v++)o.writeUshort(s,b+2*v,_[v]);if(m==4)for(var v=0;v<y;v++)o.writeUint(s,b+4*v,_[v]);if(m==5)for(var v=0;v<y;v++)o.writeUint(s,b+8*v,Math.round(_[v]*1e4)),o.writeUint(s,b+8*v+4,1e4);if(m==12)for(var v=0;v<y;v++)o.writeDouble(s,b+8*v,_[v]);g>4&&(g+=g&1,h+=g),c+=4}return[c,h]},a.toRGBA8=function(o){var s=o.width,c=o.height,u=s*c,f=u*4,h=o.data,d=new Uint8Array(u*4),p=o.t262?o.t262[0]:2,w=o.t258?Math.min(32,o.t258[0]):1;if(p==0)for(var m=Math.ceil(w*s/8),_=0;_<c;_++){var y=_*m,g=_*s;if(w==1)for(var b=0;b<s;b++){var v=g+b<<2,E=h[y+(b>>3)]>>7-(b&7)&1;d[v]=d[v+1]=d[v+2]=(1-E)*255,d[v+3]=255}if(w==4)for(var b=0;b<s;b++){var v=g+b<<2,E=h[y+(b>>1)]>>4-4*(b&1)&15;d[v]=d[v+1]=d[v+2]=(15-E)*17,d[v+3]=255}if(w==8)for(var b=0;b<s;b++){var v=g+b<<2,E=h[y+b];d[v]=d[v+1]=d[v+2]=255-E,d[v+3]=255}}else if(p==1)for(var m=Math.ceil(w*s/8),_=0;_<c;_++){var y=_*m,g=_*s;if(w==1)for(var b=0;b<s;b++){var v=g+b<<2,E=h[y+(b>>3)]>>7-(b&7)&1;d[v]=d[v+1]=d[v+2]=E*255,d[v+3]=255}if(w==2)for(var b=0;b<s;b++){var v=g+b<<2,E=h[y+(b>>2)]>>6-2*(b&3)&3;d[v]=d[v+1]=d[v+2]=E*85,d[v+3]=255}if(w==8)for(var b=0;b<s;b++){var v=g+b<<2,E=h[y+b];d[v]=d[v+1]=d[v+2]=E,d[v+3]=255}if(w==16)for(var b=0;b<s;b++){var v=g+b<<2,E=h[y+(2*b+1)];d[v]=d[v+1]=d[v+2]=Math.min(255,E),d[v+3]=255}}else if(p==2){var C=o.t258?o.t258.length:3;if(w==8){if(C==4)for(var b=0;b<f;b++)d[b]=h[b];if(C==3)for(var b=0;b<u;b++){var v=b<<2,A=b*3;d[v]=h[A],d[v+1]=h[A+1],d[v+2]=h[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]=h[A],d[v+1]=h[A+2],d[v+2]=h[A+4],d[v+3]=h[A+6]}if(C==3)for(var b=0;b<u;b++){var v=b<<2,A=b*6+1;d[v]=h[A],d[v+1]=h[A+2],d[v+2]=h[A+4],d[v+3]=255}}}else if(p==3)for(var k=o.t320,b=0;b<u;b++){var v=b<<2,B=h[b];d[v]=k[B]>>8,d[v+1]=k[256+B]>>8,d[v+2]=k[512+B]>>8,d[v+3]=255}else if(p==5)for(var C=o.t258?o.t258.length:4,T=C>4?1:0,b=0;b<u;b++){var v=b<<2,F=b*C,V=255-h[F],L=255-h[F+1],H=255-h[F+2],X=(255-h[F+3])*(1/255);d[v]=~~(V*X+.5),d[v+1]=~~(L*X+.5),d[v+2]=~~(H*X+.5),d[v+3]=255*(1-T)+h[F+4]*T}else n("Unknown Photometric interpretation: "+p);return d},a.replaceIMG=function(o){o==null&&(o=document.getElementsByTagName("img"));for(var s=["tif","tiff","dng","cr2","nef"],c=0;c<o.length;c++){var u=o[c],f=u.getAttribute("src");if(f!=null){var h=f.split(".").pop().toLowerCase();if(s.indexOf(h)!=-1){var d=new XMLHttpRequest;a._xhrs.push(d),a._imgs.push(u),d.open("GET",f),d.responseType="arraybuffer",d.onload=a._imgLoaded,d.send()}}}},a._xhrs=[],a._imgs=[],a._imgLoaded=function(o){var s=o.target.response,c=a.decode(s),u=c,f=0,h=u[0];c[0].subIFD&&(u=u.concat(c[0].subIFD));for(var d=0;d<u.length;d++){var g=u[d];if(!(g.t258==null||g.t258.length<3)){var p=g.t256*g.t257;p>f&&(f=p,h=g)}}a.decodeImage(s,h,c);var w=a.toRGBA8(h),m=h.width,_=h.height,y=a._xhrs.indexOf(o.target),g=a._imgs[y];a._xhrs.splice(y,1),a._imgs.splice(y,1);var b=document.createElement("canvas");b.width=m,b.height=_;for(var v=b.getContext("2d"),E=v.createImageData(m,_),d=0;d<w.length;d++)E.data[d]=w[d];v.putImageData(E,0,0),g.setAttribute("src",b.toDataURL())},a._binBE={nextZero:function(o,s){for(;o[s]!=0;)s++;return s},readUshort:function(o,s){return o[s]<<8|o[s+1]},readShort:function(o,s){var c=a._binBE.ui8;return c[0]=o[s+1],c[1]=o[s+0],a._binBE.i16[0]},readInt:function(o,s){var c=a._binBE.ui8;return c[0]=o[s+3],c[1]=o[s+2],c[2]=o[s+1],c[3]=o[s+0],a._binBE.i32[0]},readUint:function(o,s){var c=a._binBE.ui8;return c[0]=o[s+3],c[1]=o[s+2],c[2]=o[s+1],c[3]=o[s+0],a._binBE.ui32[0]},readASCII:function(o,s,c){for(var u="",f=0;f<c;f++)u+=String.fromCharCode(o[s+f]);return u},readFloat:function(o,s){for(var c=a._binBE.ui8,u=0;u<4;u++)c[u]=o[s+3-u];return a._binBE.fl32[0]},readDouble:function(o,s){for(var c=a._binBE.ui8,u=0;u<8;u++)c[u]=o[s+7-u];return a._binBE.fl64[0]},writeUshort:function(o,s,c){o[s]=c>>8&255,o[s+1]=c&255},writeUint:function(o,s,c){o[s]=c>>24&255,o[s+1]=c>>16&255,o[s+2]=c>>8&255,o[s+3]=c>>0&255},writeASCII:function(o,s,c){for(var u=0;u<c.length;u++)o[s+u]=c.charCodeAt(u)},writeDouble:function(o,s,c){a._binBE.fl64[0]=c;for(var u=0;u<8;u++)o[s+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,s){return o[s+1]<<8|o[s]},readShort:function(o,s){var c=a._binBE.ui8;return c[0]=o[s+0],c[1]=o[s+1],a._binBE.i16[0]},readInt:function(o,s){var c=a._binBE.ui8;return c[0]=o[s+0],c[1]=o[s+1],c[2]=o[s+2],c[3]=o[s+3],a._binBE.i32[0]},readUint:function(o,s){var c=a._binBE.ui8;return c[0]=o[s+0],c[1]=o[s+1],c[2]=o[s+2],c[3]=o[s+3],a._binBE.ui32[0]},readASCII:a._binBE.readASCII,readFloat:function(o,s){for(var c=a._binBE.ui8,u=0;u<4;u++)c[u]=o[s+u];return a._binBE.fl32[0]},readDouble:function(o,s){for(var c=a._binBE.ui8,u=0;u<8;u++)c[u]=o[s+u];return a._binBE.fl64[0]}},a._copyTile=function(o,s,c,u,f,h,d,p){for(var w=Math.min(s,f-d),m=Math.min(c,h-p),_=0;_<m;_++)for(var y=(p+_)*f+d,g=_*s,b=0;b<w;b++)u[y+b]=o[g+b]},a.LosslessJpegDecode=function(){function o(f){this.w=f,this.N=0,this._=0,this.G=0}o.prototype={t:function(f){this.N=Math.max(0,Math.min(this.w.length,f))},i:function(){return this.w[this.N++]},l:function(){var f=this.N;return this.N+=2,this.w[f]<<8|this.w[f+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(f){var h=this._,d=this.G,p=Math.min(h,f);f-=p,h-=p;for(var w=d>>>h&(1<<p)-1;f>0;)d=this.w[this.N],this.N+=1+(d+1>>>8),p=Math.min(8,f),f-=p,h=8-p,w<<=p,w|=d>>>h&(1<<p)-1;return this._=h,this.G=d,w}};var s={};s.X=function(){return[0,0,-1]},s.s=function(f,h,d){f[s.Y(f,0,d)+2]=h},s.Y=function(f,h,d){if(f[h+2]!=-1)return 0;if(d==0)return h;for(var p=0;p<2;p++){f[h+p]==0&&(f[h+p]=f.length,f.push(0),f.push(0),f.push(-1));var w=s.Y(f,f[h+p],d-1);if(w!=0)return w}return 0},s.B=function(f,h){for(var d=0,p=0,w=0,m=h._,_=h.G,y=h.N;;)if(m==0&&(_=h.w[y],y+=1+(_+1>>>8),m=8),w=_>>>--m&1,d=f[d+w],p=f[d+2],p!=-1)return h._=m,h.G=_,h.N=y,p;return-1};function c(f){this.z=new o(f),this.D(this.z)}c.prototype={$:function(f,h){this.Q=f.i(),this.F=f.l(),this.o=f.l();var d=this.O=f.i();this.L=[];for(var p=0;p<d;p++){var w=f.i();f.i(),f.i(),this.L[w]=p}f.t(f.N+h-(6+d*3))},e:function(){var f=0,h=this.z.i();this.H==null&&(this.H={});for(var d=this.H[h]=s.X(),p=[],w=0;w<16;w++)p[w]=this.z.i(),f+=p[w];for(var w=0;w<16;w++)for(var m=0;m<p[w];m++)s.s(d,this.z.i(),w+1);return f+17},W:function(f){for(;f>0;)f-=this.e()},p:function(f,h){var d=f.i();this.U||(this.U=[]);for(var p=0;p<d;p++){var w=f.i(),m=f.i();this.U[this.L[w]]=this.H[m>>>4]}this.g=f.i(),f.t(f.N+h-(2+d*2))},D:function(f){var h=!1,d=f.l();if(d===c.q)do{var d=f.l(),p=f.l()-2;switch(d){case c.m:this.$(f,p);break;case c.K:this.W(p);break;case c.V:this.p(f,p),h=!0;break;default:f.t(f.N+p);break}}while(!h)},I:function(f,h){var d=s.B(h,f);if(d==16)return-32768;var p=f.Z(d);return p&1<<d-1||(p-=(1<<d)-1),p},B:function(f,h){for(var d=this.z,p=this.O,w=this.F,m=this.I,_=this.g,y=this.o*p,g=this.U,b=0;b<p;b++)f[b]=m(d,g[b])+(1<<this.Q-1);for(var v=p;v<y;v+=p)for(var b=0;b<p;b++)f[v+b]=m(d,g[b])+f[v+b-p];for(var E=h,C=1;C<w;C++){for(var b=0;b<p;b++)f[E+b]=m(d,g[b])+f[E+b-h];for(var v=p;v<y;v+=p)for(var b=0;b<p;b++){var A=E+v+b,k=f[A-p];_==6&&(k=f[A-h]+(k-f[A-p-h]>>>1)),f[A]=k+m(d,g[b])}E+=h}}},c.m=65475,c.K=65476,c.q=65496,c.V=65498;function u(f){var h=new c(f),d=h.Q>8?Uint16Array:Uint8Array,p=new d(h.o*h.F*h.O),w=h.o*h.O;return h.B(p,w),p}return u}()})(t,r)})()})(nf);var Cf=nf.exports;const d8=Qs({__proto__:null,default:rf(Cf)},[Cf]);/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const h8=4,Df=0,Af=1,p8=2;function Ia(e){let t=e.length;for(;--t>=0;)e[t]=0}const m8=0,Bf=1,v8=2,g8=3,y8=258,Pl=29,vi=256,gi=vi+1+Pl,za=30,Rl=19,Tf=2*gi+1,la=15,Vl=16,b8=7,$l=256,Mf=16,If=17,zf=18,Ul=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]),z0=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]),w8=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Ff=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),_8=512,Cn=new Array((gi+2)*2);Ia(Cn);const yi=new Array(za*2);Ia(yi);const bi=new Array(_8);Ia(bi);const wi=new Array(y8-g8+1);Ia(wi);const Hl=new Array(Pl);Ia(Hl);const F0=new Array(za);Ia(F0);function Gl(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 Nf,Of,Lf;function jl(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}const Pf=e=>e<256?bi[e]:bi[256+(e>>>7)],_i=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},Sr=(e,t,r)=>{e.bi_valid>Vl-r?(e.bi_buf|=t<<e.bi_valid&65535,_i(e,e.bi_buf),e.bi_buf=t>>Vl-e.bi_valid,e.bi_valid+=r-Vl):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)},dn=(e,t,r)=>{Sr(e,r[t*2],r[t*2+1])},Rf=(e,t)=>{let r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1},x8=e=>{e.bi_valid===16?(_i(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)},k8=(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,s=t.stat_desc.extra_base,c=t.stat_desc.max_length;let u,f,h,d,p,w,m=0;for(d=0;d<=la;d++)e.bl_count[d]=0;for(r[e.heap[e.heap_max]*2+1]=0,u=e.heap_max+1;u<Tf;u++)f=e.heap[u],d=r[r[f*2+1]*2+1]+1,d>c&&(d=c,m++),r[f*2+1]=d,!(f>n)&&(e.bl_count[d]++,p=0,f>=s&&(p=o[f-s]),w=r[f*2],e.opt_len+=w*(d+p),i&&(e.static_len+=w*(a[f*2+1]+p)));if(m!==0){do{for(d=c-1;e.bl_count[d]===0;)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[c]--,m-=2}while(m>0);for(d=c;d!==0;d--)for(f=e.bl_count[d];f!==0;)h=e.heap[--u],!(h>n)&&(r[h*2+1]!==d&&(e.opt_len+=(d-r[h*2+1])*r[h*2],r[h*2+1]=d),f--)}},Vf=(e,t,r)=>{const n=new Array(la+1);let a=0,i,o;for(i=1;i<=la;i++)a=a+r[i-1]<<1,n[i]=a;for(o=0;o<=t;o++){let s=e[o*2+1];s!==0&&(e[o*2]=Rf(n[s]++,s))}},S8=()=>{let e,t,r,n,a;const i=new Array(la+1);for(r=0,n=0;n<Pl-1;n++)for(Hl[n]=r,e=0;e<1<<Ul[n];e++)wi[r++]=n;for(wi[r-1]=n,a=0,n=0;n<16;n++)for(F0[n]=a,e=0;e<1<<z0[n];e++)bi[a++]=n;for(a>>=7;n<za;n++)for(F0[n]=a<<7,e=0;e<1<<z0[n]-7;e++)bi[256+a++]=n;for(t=0;t<=la;t++)i[t]=0;for(e=0;e<=143;)Cn[e*2+1]=8,e++,i[8]++;for(;e<=255;)Cn[e*2+1]=9,e++,i[9]++;for(;e<=279;)Cn[e*2+1]=7,e++,i[7]++;for(;e<=287;)Cn[e*2+1]=8,e++,i[8]++;for(Vf(Cn,gi+1,i),e=0;e<za;e++)yi[e*2+1]=5,yi[e*2]=Rf(e,5);Nf=new Gl(Cn,Ul,vi+1,gi,la),Of=new Gl(yi,z0,0,za,la),Lf=new Gl(new Array(0),w8,0,Rl,b8)},$f=e=>{let t;for(t=0;t<gi;t++)e.dyn_ltree[t*2]=0;for(t=0;t<za;t++)e.dyn_dtree[t*2]=0;for(t=0;t<Rl;t++)e.bl_tree[t*2]=0;e.dyn_ltree[$l*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},Uf=e=>{e.bi_valid>8?_i(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Hf=(e,t,r,n)=>{const a=t*2,i=r*2;return e[a]<e[i]||e[a]===e[i]&&n[t]<=n[r]},ql=(e,t,r)=>{const n=e.heap[r];let a=r<<1;for(;a<=e.heap_len&&(a<e.heap_len&&Hf(t,e.heap[a+1],e.heap[a],e.depth)&&a++,!Hf(t,n,e.heap[a],e.depth));)e.heap[r]=e.heap[a],r=a,a<<=1;e.heap[r]=n},Gf=(e,t,r)=>{let n,a,i=0,o,s;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?dn(e,a,t):(o=wi[a],dn(e,o+vi+1,t),s=Ul[o],s!==0&&(a-=Hl[o],Sr(e,a,s)),n--,o=Pf(n),dn(e,o,r),s=z0[o],s!==0&&(n-=F0[o],Sr(e,n,s)));while(i<e.sym_next);dn(e,$l,t)},Wl=(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,s,c=-1,u;for(e.heap_len=0,e.heap_max=Tf,o=0;o<i;o++)r[o*2]!==0?(e.heap[++e.heap_len]=c=o,e.depth[o]=0):r[o*2+1]=0;for(;e.heap_len<2;)u=e.heap[++e.heap_len]=c<2?++c:0,r[u*2]=1,e.depth[u]=0,e.opt_len--,a&&(e.static_len-=n[u*2+1]);for(t.max_code=c,o=e.heap_len>>1;o>=1;o--)ql(e,r,o);u=i;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],ql(e,r,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,r[u*2]=r[o*2]+r[s*2],e.depth[u]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,r[o*2+1]=r[s*2+1]=u,e.heap[1]=u++,ql(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],k8(e,t),Vf(r,c,e.bl_count)},jf=(e,t,r)=>{let n,a=-1,i,o=t[0*2+1],s=0,c=7,u=4;for(o===0&&(c=138,u=3),t[(r+1)*2+1]=65535,n=0;n<=r;n++)i=o,o=t[(n+1)*2+1],!(++s<c&&i===o)&&(s<u?e.bl_tree[i*2]+=s:i!==0?(i!==a&&e.bl_tree[i*2]++,e.bl_tree[Mf*2]++):s<=10?e.bl_tree[If*2]++:e.bl_tree[zf*2]++,s=0,a=i,o===0?(c=138,u=3):i===o?(c=6,u=3):(c=7,u=4))},qf=(e,t,r)=>{let n,a=-1,i,o=t[0*2+1],s=0,c=7,u=4;for(o===0&&(c=138,u=3),n=0;n<=r;n++)if(i=o,o=t[(n+1)*2+1],!(++s<c&&i===o)){if(s<u)do dn(e,i,e.bl_tree);while(--s!==0);else i!==0?(i!==a&&(dn(e,i,e.bl_tree),s--),dn(e,Mf,e.bl_tree),Sr(e,s-3,2)):s<=10?(dn(e,If,e.bl_tree),Sr(e,s-3,3)):(dn(e,zf,e.bl_tree),Sr(e,s-11,7));s=0,a=i,o===0?(c=138,u=3):i===o?(c=6,u=3):(c=7,u=4)}},E8=e=>{let t;for(jf(e,e.dyn_ltree,e.l_desc.max_code),jf(e,e.dyn_dtree,e.d_desc.max_code),Wl(e,e.bl_desc),t=Rl-1;t>=3&&e.bl_tree[Ff[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},C8=(e,t,r,n)=>{let a;for(Sr(e,t-257,5),Sr(e,r-1,5),Sr(e,n-4,4),a=0;a<n;a++)Sr(e,e.bl_tree[Ff[a]*2+1],3);qf(e,e.dyn_ltree,t-1),qf(e,e.dyn_dtree,r-1)},D8=e=>{let t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return Df;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return Af;for(r=32;r<vi;r++)if(e.dyn_ltree[r*2]!==0)return Af;return Df};let Wf=!1;const A8=e=>{Wf||(S8(),Wf=!0),e.l_desc=new jl(e.dyn_ltree,Nf),e.d_desc=new jl(e.dyn_dtree,Of),e.bl_desc=new jl(e.bl_tree,Lf),e.bi_buf=0,e.bi_valid=0,$f(e)},Xf=(e,t,r,n)=>{Sr(e,(m8<<1)+(n?1:0),3),Uf(e),_i(e,r),_i(e,~r),r&&e.pending_buf.set(e.window.subarray(t,t+r),e.pending),e.pending+=r},B8=e=>{Sr(e,Bf<<1,3),dn(e,$l,Cn),x8(e)},T8=(e,t,r,n)=>{let a,i,o=0;e.level>0?(e.strm.data_type===p8&&(e.strm.data_type=D8(e)),Wl(e,e.l_desc),Wl(e,e.d_desc),o=E8(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?Xf(e,t,r,n):e.strategy===h8||i===a?(Sr(e,(Bf<<1)+(n?1:0),3),Gf(e,Cn,yi)):(Sr(e,(v8<<1)+(n?1:0),3),C8(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),Gf(e,e.dyn_ltree,e.dyn_dtree)),$f(e),n&&Uf(e)},M8=(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[(wi[r]+vi+1)*2]++,e.dyn_dtree[Pf(t)*2]++),e.sym_next===e.sym_end);var I8=A8,z8=Xf,F8=T8,N8=M8,O8=B8,L8={_tr_init:I8,_tr_stored_block:z8,_tr_flush_block:F8,_tr_tally:N8,_tr_align:O8},xi=(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 P8=()=>{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},R8=new Uint32Array(P8());var rr=(e,t,r,n)=>{const a=R8,i=n+r;e^=-1;for(let o=n;o<i;o++)e=e>>>8^a[(e^t[o])&255];return e^-1},sa={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"},N0={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:V8,_tr_stored_block:Xl,_tr_flush_block:$8,_tr_tally:jn,_tr_align:U8}=L8,{Z_NO_FLUSH:qn,Z_PARTIAL_FLUSH:H8,Z_FULL_FLUSH:G8,Z_FINISH:Hr,Z_BLOCK:Zf,Z_OK:lr,Z_STREAM_END:Kf,Z_STREAM_ERROR:hn,Z_DATA_ERROR:j8,Z_BUF_ERROR:Zl,Z_DEFAULT_COMPRESSION:q8,Z_FILTERED:W8,Z_HUFFMAN_ONLY:O0,Z_RLE:X8,Z_FIXED:Z8,Z_DEFAULT_STRATEGY:K8,Z_UNKNOWN:Y8,Z_DEFLATED:L0}=N0,J8=9,Q8=15,e7=8,Kl=256+1+29,t7=30,r7=19,n7=2*Kl+1,a7=15,wt=3,Wn=258,pn=Wn+wt+1,i7=32,Fa=42,Yl=57,Jl=69,Ql=73,es=91,ts=103,ca=113,ki=666,yr=1,Na=2,ua=3,Oa=4,o7=3,fa=(e,t)=>(e.msg=sa[t],t),Yf=e=>e*2-(e>4?9:0),Xn=e=>{let t=e.length;for(;--t>=0;)e[t]=0},l7=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 Zn=(e,t,r)=>(t<<e.hash_shift^r)&e.hash_mask;const Tr=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))},Mr=(e,t)=>{$8(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Tr(e.strm)},Bt=(e,t)=>{e.pending_buf[e.pending++]=t},Si=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},rs=(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=xi(e.adler,t,a,r):e.state.wrap===2&&(e.adler=rr(e.adler,t,a,r)),e.next_in+=a,e.total_in+=a,a)},Jf=(e,t)=>{let r=e.max_chain_length,n=e.strstart,a,i,o=e.prev_length,s=e.nice_match;const c=e.strstart>e.w_size-pn?e.strstart-(e.w_size-pn):0,u=e.window,f=e.w_mask,h=e.prev,d=e.strstart+Wn;let p=u[n+o-1],w=u[n+o];e.prev_length>=e.good_match&&(r>>=2),s>e.lookahead&&(s=e.lookahead);do if(a=t,!(u[a+o]!==w||u[a+o-1]!==p||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=Wn-(d-n),n=d-Wn,i>o){if(e.match_start=t,o=i,i>=s)break;p=u[n+o-1],w=u[n+o]}}while((t=h[t&f])>c&&--r!==0);return o<=e.lookahead?o:e.lookahead},La=e=>{const t=e.w_size;let r,n,a;do{if(n=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-pn)&&(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),l7(e),n+=t),e.strm.avail_in===0)break;if(r=rs(e.strm,e.window,e.strstart+e.lookahead,n),e.lookahead+=r,e.lookahead+e.insert>=wt)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=Zn(e,e.ins_h,e.window[a+1]);e.insert&&(e.ins_h=Zn(e,e.ins_h,e.window[a+wt-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<wt)););}while(e.lookahead<pn&&e.strm.avail_in!==0)},Qf=(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,s=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!==Hr||t===qn||n!==a+e.strm.avail_in)))break;o=t===Hr&&n===a+e.strm.avail_in?1:0,Xl(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,Tr(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&&(rs(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 s-=e.strm.avail_in,s&&(s>=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<=s&&(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-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),o?Oa:t!==qn&&t!==Hr&&e.strm.avail_in===0&&e.strstart===e.block_start?Na:(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&&(rs(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===Hr)&&t!==qn&&e.strm.avail_in===0&&a<=i)&&(n=a>i?i:a,o=t===Hr&&e.strm.avail_in===0&&n===a?1:0,Xl(e,e.block_start,n,o),e.block_start+=n,Tr(e.strm)),o?ua:yr)},ns=(e,t)=>{let r,n;for(;;){if(e.lookahead<pn){if(La(e),e.lookahead<pn&&t===qn)return yr;if(e.lookahead===0)break}if(r=0,e.lookahead>=wt&&(e.ins_h=Zn(e,e.ins_h,e.window[e.strstart+wt-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-pn&&(e.match_length=Jf(e,r)),e.match_length>=wt)if(n=jn(e,e.strstart-e.match_start,e.match_length-wt),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=wt){e.match_length--;do e.strstart++,e.ins_h=Zn(e,e.ins_h,e.window[e.strstart+wt-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=Zn(e,e.ins_h,e.window[e.strstart+1]);else n=jn(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(Mr(e,!1),e.strm.avail_out===0))return yr}return e.insert=e.strstart<wt-1?e.strstart:wt-1,t===Hr?(Mr(e,!0),e.strm.avail_out===0?ua:Oa):e.sym_next&&(Mr(e,!1),e.strm.avail_out===0)?yr:Na},Pa=(e,t)=>{let r,n,a;for(;;){if(e.lookahead<pn){if(La(e),e.lookahead<pn&&t===qn)return yr;if(e.lookahead===0)break}if(r=0,e.lookahead>=wt&&(e.ins_h=Zn(e,e.ins_h,e.window[e.strstart+wt-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=wt-1,r!==0&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-pn&&(e.match_length=Jf(e,r),e.match_length<=5&&(e.strategy===W8||e.match_length===wt&&e.strstart-e.match_start>4096)&&(e.match_length=wt-1)),e.prev_length>=wt&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-wt,n=jn(e,e.strstart-1-e.prev_match,e.prev_length-wt),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=a&&(e.ins_h=Zn(e,e.ins_h,e.window[e.strstart+wt-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=wt-1,e.strstart++,n&&(Mr(e,!1),e.strm.avail_out===0))return yr}else if(e.match_available){if(n=jn(e,0,e.window[e.strstart-1]),n&&Mr(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return yr}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=jn(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<wt-1?e.strstart:wt-1,t===Hr?(Mr(e,!0),e.strm.avail_out===0?ua:Oa):e.sym_next&&(Mr(e,!1),e.strm.avail_out===0)?yr:Na},s7=(e,t)=>{let r,n,a,i;const o=e.window;for(;;){if(e.lookahead<=Wn){if(La(e),e.lookahead<=Wn&&t===qn)return yr;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=wt&&e.strstart>0&&(a=e.strstart-1,n=o[a],n===o[++a]&&n===o[++a]&&n===o[++a])){i=e.strstart+Wn;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=Wn-(i-a),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=wt?(r=jn(e,1,e.match_length-wt),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=jn(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(Mr(e,!1),e.strm.avail_out===0))return yr}return e.insert=0,t===Hr?(Mr(e,!0),e.strm.avail_out===0?ua:Oa):e.sym_next&&(Mr(e,!1),e.strm.avail_out===0)?yr:Na},c7=(e,t)=>{let r;for(;;){if(e.lookahead===0&&(La(e),e.lookahead===0)){if(t===qn)return yr;break}if(e.match_length=0,r=jn(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(Mr(e,!1),e.strm.avail_out===0))return yr}return e.insert=0,t===Hr?(Mr(e,!0),e.strm.avail_out===0?ua:Oa):e.sym_next&&(Mr(e,!1),e.strm.avail_out===0)?yr:Na};function mn(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 Ei=[new mn(0,0,0,0,Qf),new mn(4,4,8,4,ns),new mn(4,5,16,8,ns),new mn(4,6,32,32,ns),new mn(4,4,16,16,Pa),new mn(8,16,32,32,Pa),new mn(8,16,128,128,Pa),new mn(8,32,128,256,Pa),new mn(32,128,258,1024,Pa),new mn(32,258,258,4096,Pa)],u7=e=>{e.window_size=2*e.w_size,Xn(e.head),e.max_lazy_match=Ei[e.level].max_lazy,e.good_match=Ei[e.level].good_length,e.nice_match=Ei[e.level].nice_length,e.max_chain_length=Ei[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=wt-1,e.match_available=0,e.ins_h=0};function f7(){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=L0,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(n7*2),this.dyn_dtree=new Uint16Array((2*t7+1)*2),this.bl_tree=new Uint16Array((2*r7+1)*2),Xn(this.dyn_ltree),Xn(this.dyn_dtree),Xn(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(a7+1),this.heap=new Uint16Array(2*Kl+1),Xn(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Kl+1),Xn(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 Ci=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==Fa&&t.status!==Yl&&t.status!==Jl&&t.status!==Ql&&t.status!==es&&t.status!==ts&&t.status!==ca&&t.status!==ki?1:0},ed=e=>{if(Ci(e))return fa(e,hn);e.total_in=e.total_out=0,e.data_type=Y8;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?Yl:t.wrap?Fa:ca,e.adler=t.wrap===2?0:1,t.last_flush=-2,V8(t),lr},td=e=>{const t=ed(e);return t===lr&&u7(e.state),t},d7=(e,t)=>Ci(e)||e.state.wrap!==2?hn:(e.state.gzhead=t,lr),rd=(e,t,r,n,a,i)=>{if(!e)return hn;let o=1;if(t===q8&&(t=6),n<0?(o=0,n=-n):n>15&&(o=2,n-=16),a<1||a>J8||r!==L0||n<8||n>15||t<0||t>9||i<0||i>Z8||n===8&&o!==1)return fa(e,hn);n===8&&(n=9);const s=new f7;return e.state=s,s.strm=e,s.status=Fa,s.wrap=o,s.gzhead=null,s.w_bits=n,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=a+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+wt-1)/wt),s.window=new Uint8Array(s.w_size*2),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<a+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Uint8Array(s.pending_buf_size),s.sym_buf=s.lit_bufsize,s.sym_end=(s.lit_bufsize-1)*3,s.level=t,s.strategy=i,s.method=r,td(e)},h7=(e,t)=>rd(e,t,L0,Q8,e7,K8),p7=(e,t)=>{if(Ci(e)||t>Zf||t<0)return e?fa(e,hn):hn;const r=e.state;if(!e.output||e.avail_in!==0&&!e.input||r.status===ki&&t!==Hr)return fa(e,e.avail_out===0?Zl:hn);const n=r.last_flush;if(r.last_flush=t,r.pending!==0){if(Tr(e),e.avail_out===0)return r.last_flush=-1,lr}else if(e.avail_in===0&&Yf(t)<=Yf(n)&&t!==Hr)return fa(e,Zl);if(r.status===ki&&e.avail_in!==0)return fa(e,Zl);if(r.status===Fa&&r.wrap===0&&(r.status=ca),r.status===Fa){let a=L0+(r.w_bits-8<<4)<<8,i=-1;if(r.strategy>=O0||r.level<2?i=0:r.level<6?i=1:r.level===6?i=2:i=3,a|=i<<6,r.strstart!==0&&(a|=i7),a+=31-a%31,Si(r,a),r.strstart!==0&&(Si(r,e.adler>>>16),Si(r,e.adler&65535)),e.adler=1,r.status=ca,Tr(e),r.pending!==0)return r.last_flush=-1,lr}if(r.status===Yl){if(e.adler=0,Bt(r,31),Bt(r,139),Bt(r,8),r.gzhead)Bt(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)),Bt(r,r.gzhead.time&255),Bt(r,r.gzhead.time>>8&255),Bt(r,r.gzhead.time>>16&255),Bt(r,r.gzhead.time>>24&255),Bt(r,r.level===9?2:r.strategy>=O0||r.level<2?4:0),Bt(r,r.gzhead.os&255),r.gzhead.extra&&r.gzhead.extra.length&&(Bt(r,r.gzhead.extra.length&255),Bt(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=rr(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=Jl;else if(Bt(r,0),Bt(r,0),Bt(r,0),Bt(r,0),Bt(r,0),Bt(r,r.level===9?2:r.strategy>=O0||r.level<2?4:0),Bt(r,o7),r.status=ca,Tr(e),r.pending!==0)return r.last_flush=-1,lr}if(r.status===Jl){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 s=r.pending_buf_size-r.pending;if(r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+s),r.pending),r.pending=r.pending_buf_size,r.gzhead.hcrc&&r.pending>a&&(e.adler=rr(e.adler,r.pending_buf,r.pending-a,a)),r.gzindex+=s,Tr(e),r.pending!==0)return r.last_flush=-1,lr;a=0,i-=s}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=rr(e.adler,r.pending_buf,r.pending-a,a)),r.gzindex=0}r.status=Ql}if(r.status===Ql){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=rr(e.adler,r.pending_buf,r.pending-a,a)),Tr(e),r.pending!==0)return r.last_flush=-1,lr;a=0}r.gzindex<r.gzhead.name.length?i=r.gzhead.name.charCodeAt(r.gzindex++)&255:i=0,Bt(r,i)}while(i!==0);r.gzhead.hcrc&&r.pending>a&&(e.adler=rr(e.adler,r.pending_buf,r.pending-a,a)),r.gzindex=0}r.status=es}if(r.status===es){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=rr(e.adler,r.pending_buf,r.pending-a,a)),Tr(e),r.pending!==0)return r.last_flush=-1,lr;a=0}r.gzindex<r.gzhead.comment.length?i=r.gzhead.comment.charCodeAt(r.gzindex++)&255:i=0,Bt(r,i)}while(i!==0);r.gzhead.hcrc&&r.pending>a&&(e.adler=rr(e.adler,r.pending_buf,r.pending-a,a))}r.status=ts}if(r.status===ts){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size&&(Tr(e),r.pending!==0))return r.last_flush=-1,lr;Bt(r,e.adler&255),Bt(r,e.adler>>8&255),e.adler=0}if(r.status=ca,Tr(e),r.pending!==0)return r.last_flush=-1,lr}if(e.avail_in!==0||r.lookahead!==0||t!==qn&&r.status!==ki){let a=r.level===0?Qf(r,t):r.strategy===O0?c7(r,t):r.strategy===X8?s7(r,t):Ei[r.level].func(r,t);if((a===ua||a===Oa)&&(r.status=ki),a===yr||a===ua)return e.avail_out===0&&(r.last_flush=-1),lr;if(a===Na&&(t===H8?U8(r):t!==Zf&&(Xl(r,0,0,!1),t===G8&&(Xn(r.head),r.lookahead===0&&(r.strstart=0,r.block_start=0,r.insert=0))),Tr(e),e.avail_out===0))return r.last_flush=-1,lr}return t!==Hr?lr:r.wrap<=0?Kf:(r.wrap===2?(Bt(r,e.adler&255),Bt(r,e.adler>>8&255),Bt(r,e.adler>>16&255),Bt(r,e.adler>>24&255),Bt(r,e.total_in&255),Bt(r,e.total_in>>8&255),Bt(r,e.total_in>>16&255),Bt(r,e.total_in>>24&255)):(Si(r,e.adler>>>16),Si(r,e.adler&65535)),Tr(e),r.wrap>0&&(r.wrap=-r.wrap),r.pending!==0?lr:Kf)},m7=e=>{if(Ci(e))return hn;const t=e.state.status;return e.state=null,t===ca?fa(e,j8):lr},v7=(e,t)=>{let r=t.length;if(Ci(e))return hn;const n=e.state,a=n.wrap;if(a===2||a===1&&n.status!==Fa||n.lookahead)return hn;if(a===1&&(e.adler=xi(e.adler,t,r,0)),n.wrap=0,r>=n.w_size){a===0&&(Xn(n.head),n.strstart=0,n.block_start=0,n.insert=0);let c=new Uint8Array(n.w_size);c.set(t.subarray(r-n.w_size,r),0),t=c,r=n.w_size}const i=e.avail_in,o=e.next_in,s=e.input;for(e.avail_in=r,e.next_in=0,e.input=t,La(n);n.lookahead>=wt;){let c=n.strstart,u=n.lookahead-(wt-1);do n.ins_h=Zn(n,n.ins_h,n.window[c+wt-1]),n.prev[c&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=c,c++;while(--u);n.strstart=c,n.lookahead=wt-1,La(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=wt-1,n.match_available=0,e.next_in=o,e.input=s,e.avail_in=i,n.wrap=a,lr};var g7=h7,y7=rd,b7=td,w7=ed,_7=d7,x7=p7,k7=m7,S7=v7,E7="pako deflate (from Nodeca project)",Di={deflateInit:g7,deflateInit2:y7,deflateReset:b7,deflateResetKeep:w7,deflateSetHeader:_7,deflate:x7,deflateEnd:k7,deflateSetDictionary:S7,deflateInfo:E7};const C7=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var D7=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)C7(r,n)&&(e[n]=r[n])}}return e},A7=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},P0={assign:D7,flattenChunks:A7};let nd=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{nd=!1}const Ai=new Uint8Array(256);for(let e=0;e<256;e++)Ai[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Ai[254]=Ai[254]=1;var B7=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,r,n,a,i,o=e.length,s=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++)),s+=r<128?1:r<2048?2:r<65536?3:4;for(t=new Uint8Array(s),i=0,a=0;i<s;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 T7=(e,t)=>{if(t<65534&&e.subarray&&nd)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 M7=(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 s=Ai[o];if(s>4){i[a++]=65533,n+=s-1;continue}for(o&=s===2?31:s===3?15:7;s>1&&n<r;)o=o<<6|e[n++]&63,s--;if(s>1){i[a++]=65533;continue}o<65536?i[a++]=o:(o-=65536,i[a++]=55296|o>>10&1023,i[a++]=56320|o&1023)}return T7(i,a)},I7=(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+Ai[e[r]]>t?r:t},Bi={string2buf:B7,buf2string:M7,utf8border:I7};function z7(){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 ad=z7;const id=Object.prototype.toString,{Z_NO_FLUSH:F7,Z_SYNC_FLUSH:N7,Z_FULL_FLUSH:O7,Z_FINISH:L7,Z_OK:R0,Z_STREAM_END:P7,Z_DEFAULT_COMPRESSION:R7,Z_DEFAULT_STRATEGY:V7,Z_DEFLATED:$7}=N0;function V0(e){this.options=P0.assign({level:R7,method:$7,chunkSize:16384,windowBits:15,memLevel:8,strategy:V7},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 ad,this.strm.avail_out=0;let r=Di.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==R0)throw new Error(sa[r]);if(t.header&&Di.deflateSetHeader(this.strm,t.header),t.dictionary){let n;if(typeof t.dictionary=="string"?n=Bi.string2buf(t.dictionary):id.call(t.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(t.dictionary):n=t.dictionary,r=Di.deflateSetDictionary(this.strm,n),r!==R0)throw new Error(sa[r]);this._dict_set=!0}}V0.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?L7:F7,typeof e=="string"?r.input=Bi.string2buf(e):id.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===N7||i===O7)&&r.avail_out<=6){this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;continue}if(a=Di.deflate(r,i),a===P7)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=Di.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===R0;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},V0.prototype.onData=function(e){this.chunks.push(e)},V0.prototype.onEnd=function(e){e===R0&&(this.result=P0.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function U7(e,t){const r=new V0(t);if(r.push(e,!0),r.err)throw r.msg||sa[r.err];return r.result}var H7=U7,G7={deflate:H7};const $0=16209,j7=16191;var q7=function(t,r){let n,a,i,o,s,c,u,f,h,d,p,w,m,_,y,g,b,v,E,C,A,k,B,T;const F=t.state;n=t.next_in,B=t.input,a=n+(t.avail_in-5),i=t.next_out,T=t.output,o=i-(r-t.avail_out),s=i+(t.avail_out-257),c=F.dmax,u=F.wsize,f=F.whave,h=F.wnext,d=F.window,p=F.hold,w=F.bits,m=F.lencode,_=F.distcode,y=(1<<F.lenbits)-1,g=(1<<F.distbits)-1;e:do{w<15&&(p+=B[n++]<<w,w+=8,p+=B[n++]<<w,w+=8),b=m[p&y];t:for(;;){if(v=b>>>24,p>>>=v,w-=v,v=b>>>16&255,v===0)T[i++]=b&65535;else if(v&16){E=b&65535,v&=15,v&&(w<v&&(p+=B[n++]<<w,w+=8),E+=p&(1<<v)-1,p>>>=v,w-=v),w<15&&(p+=B[n++]<<w,w+=8,p+=B[n++]<<w,w+=8),b=_[p&g];r:for(;;){if(v=b>>>24,p>>>=v,w-=v,v=b>>>16&255,v&16){if(C=b&65535,v&=15,w<v&&(p+=B[n++]<<w,w+=8,w<v&&(p+=B[n++]<<w,w+=8)),C+=p&(1<<v)-1,C>c){t.msg="invalid distance too far back",F.mode=$0;break e}if(p>>>=v,w-=v,v=i-o,C>v){if(v=C-v,v>f&&F.sane){t.msg="invalid distance too far back",F.mode=$0;break e}if(A=0,k=d,h===0){if(A+=u-v,v<E){E-=v;do T[i++]=d[A++];while(--v);A=i-C,k=T}}else if(h<v){if(A+=u+h-v,v-=h,v<E){E-=v;do T[i++]=d[A++];while(--v);if(A=0,h<E){v=h,E-=v;do T[i++]=d[A++];while(--v);A=i-C,k=T}}}else if(A+=h-v,v<E){E-=v;do T[i++]=d[A++];while(--v);A=i-C,k=T}for(;E>2;)T[i++]=k[A++],T[i++]=k[A++],T[i++]=k[A++],E-=3;E&&(T[i++]=k[A++],E>1&&(T[i++]=k[A++]))}else{A=i-C;do T[i++]=T[A++],T[i++]=T[A++],T[i++]=T[A++],E-=3;while(E>2);E&&(T[i++]=T[A++],E>1&&(T[i++]=T[A++]))}}else if(v&64){t.msg="invalid distance code",F.mode=$0;break e}else{b=_[(b&65535)+(p&(1<<v)-1)];continue r}break}}else if(v&64)if(v&32){F.mode=j7;break e}else{t.msg="invalid literal/length code",F.mode=$0;break e}else{b=m[(b&65535)+(p&(1<<v)-1)];continue t}break}}while(n<a&&i<s);E=w>>3,n-=E,w-=E<<3,p&=(1<<w)-1,t.next_in=n,t.next_out=i,t.avail_in=n<a?5+(a-n):5-(n-a),t.avail_out=i<s?257+(s-i):257-(i-s),F.hold=p,F.bits=w};const Ra=15,od=852,ld=592,sd=0,as=1,cd=2,W7=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]),X7=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]),Z7=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]),K7=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 Ti=(e,t,r,n,a,i,o,s)=>{const c=s.bits;let u=0,f=0,h=0,d=0,p=0,w=0,m=0,_=0,y=0,g=0,b,v,E,C,A,k=null,B;const T=new Uint16Array(Ra+1),F=new Uint16Array(Ra+1);let V=null,L,H,X;for(u=0;u<=Ra;u++)T[u]=0;for(f=0;f<n;f++)T[t[r+f]]++;for(p=c,d=Ra;d>=1&&T[d]===0;d--);if(p>d&&(p=d),d===0)return a[i++]=1<<24|64<<16|0,a[i++]=1<<24|64<<16|0,s.bits=1,0;for(h=1;h<d&&T[h]===0;h++);for(p<h&&(p=h),_=1,u=1;u<=Ra;u++)if(_<<=1,_-=T[u],_<0)return-1;if(_>0&&(e===sd||d!==1))return-1;for(F[1]=0,u=1;u<Ra;u++)F[u+1]=F[u]+T[u];for(f=0;f<n;f++)t[r+f]!==0&&(o[F[t[r+f]]++]=f);if(e===sd?(k=V=o,B=20):e===as?(k=W7,V=X7,B=257):(k=Z7,V=K7,B=0),g=0,f=0,u=h,A=i,w=p,m=0,E=-1,y=1<<p,C=y-1,e===as&&y>od||e===cd&&y>ld)return 1;for(;;){L=u-m,o[f]+1<B?(H=0,X=o[f]):o[f]>=B?(H=V[o[f]-B],X=k[o[f]-B]):(H=96,X=0),b=1<<u-m,v=1<<w,h=v;do v-=b,a[A+(g>>m)+v]=L<<24|H<<16|X|0;while(v!==0);for(b=1<<u-1;g&b;)b>>=1;if(b!==0?(g&=b-1,g+=b):g=0,f++,--T[u]===0){if(u===d)break;u=t[r+o[f]]}if(u>p&&(g&C)!==E){for(m===0&&(m=p),A+=h,w=u-m,_=1<<w;w+m<d&&(_-=T[w+m],!(_<=0));)w++,_<<=1;if(y+=1<<w,e===as&&y>od||e===cd&&y>ld)return 1;E=g&C,a[E]=p<<24|w<<16|A-i|0}}return g!==0&&(a[A+g]=u-m<<24|64<<16|0),s.bits=p,0};const Y7=0,ud=1,fd=2,{Z_FINISH:dd,Z_BLOCK:J7,Z_TREES:U0,Z_OK:da,Z_STREAM_END:Q7,Z_NEED_DICT:ey,Z_STREAM_ERROR:Gr,Z_DATA_ERROR:hd,Z_MEM_ERROR:pd,Z_BUF_ERROR:ty,Z_DEFLATED:md}=N0,H0=16180,vd=16181,gd=16182,yd=16183,bd=16184,wd=16185,_d=16186,xd=16187,kd=16188,Sd=16189,G0=16190,Dn=16191,is=16192,Ed=16193,os=16194,Cd=16195,Dd=16196,Ad=16197,Bd=16198,j0=16199,q0=16200,Td=16201,Md=16202,Id=16203,zd=16204,Fd=16205,ls=16206,Nd=16207,Od=16208,Vt=16209,Ld=16210,Pd=16211,ry=852,ny=592,ay=15,Rd=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function iy(){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 ha=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<H0||t.mode>Pd?1:0},Vd=e=>{if(ha(e))return Gr;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=H0,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(ry),t.distcode=t.distdyn=new Int32Array(ny),t.sane=1,t.back=-1,da},$d=e=>{if(ha(e))return Gr;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,Vd(e)},Ud=(e,t)=>{let r;if(ha(e))return Gr;const n=e.state;return t<0?(r=0,t=-t):(r=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?Gr:(n.window!==null&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,$d(e))},Hd=(e,t)=>{if(!e)return Gr;const r=new iy;e.state=r,r.strm=e,r.window=null,r.mode=H0;const n=Ud(e,t);return n!==da&&(e.state=null),n},oy=e=>Hd(e,ay);let Gd=!0,ss,cs;const ly=e=>{if(Gd){ss=new Int32Array(512),cs=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(Ti(ud,e.lens,0,288,ss,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Ti(fd,e.lens,0,32,cs,0,e.work,{bits:5}),Gd=!1}e.lencode=ss,e.lenbits=9,e.distcode=cs,e.distbits=5},jd=(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},sy=(e,t)=>{let r,n,a,i,o,s,c,u,f,h,d,p,w,m,_=0,y,g,b,v,E,C,A,k;const B=new Uint8Array(4);let T,F;const V=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(ha(e)||!e.output||!e.input&&e.avail_in!==0)return Gr;r=e.state,r.mode===Dn&&(r.mode=is),o=e.next_out,a=e.output,c=e.avail_out,i=e.next_in,n=e.input,s=e.avail_in,u=r.hold,f=r.bits,h=s,d=c,k=da;e:for(;;)switch(r.mode){case H0:if(r.wrap===0){r.mode=is;break}for(;f<16;){if(s===0)break e;s--,u+=n[i++]<<f,f+=8}if(r.wrap&2&&u===35615){r.wbits===0&&(r.wbits=15),r.check=0,B[0]=u&255,B[1]=u>>>8&255,r.check=rr(r.check,B,2,0),u=0,f=0,r.mode=vd;break}if(r.head&&(r.head.done=!1),!(r.wrap&1)||(((u&255)<<8)+(u>>8))%31){e.msg="incorrect header check",r.mode=Vt;break}if((u&15)!==md){e.msg="unknown compression method",r.mode=Vt;break}if(u>>>=4,f-=4,A=(u&15)+8,r.wbits===0&&(r.wbits=A),A>15||A>r.wbits){e.msg="invalid window size",r.mode=Vt;break}r.dmax=1<<r.wbits,r.flags=0,e.adler=r.check=1,r.mode=u&512?Sd:Dn,u=0,f=0;break;case vd:for(;f<16;){if(s===0)break e;s--,u+=n[i++]<<f,f+=8}if(r.flags=u,(r.flags&255)!==md){e.msg="unknown compression method",r.mode=Vt;break}if(r.flags&57344){e.msg="unknown header flags set",r.mode=Vt;break}r.head&&(r.head.text=u>>8&1),r.flags&512&&r.wrap&4&&(B[0]=u&255,B[1]=u>>>8&255,r.check=rr(r.check,B,2,0)),u=0,f=0,r.mode=gd;case gd:for(;f<32;){if(s===0)break e;s--,u+=n[i++]<<f,f+=8}r.head&&(r.head.time=u),r.flags&512&&r.wrap&4&&(B[0]=u&255,B[1]=u>>>8&255,B[2]=u>>>16&255,B[3]=u>>>24&255,r.check=rr(r.check,B,4,0)),u=0,f=0,r.mode=yd;case yd:for(;f<16;){if(s===0)break e;s--,u+=n[i++]<<f,f+=8}r.head&&(r.head.xflags=u&255,r.head.os=u>>8),r.flags&512&&r.wrap&4&&(B[0]=u&255,B[1]=u>>>8&255,r.check=rr(r.check,B,2,0)),u=0,f=0,r.mode=bd;case bd:if(r.flags&1024){for(;f<16;){if(s===0)break e;s--,u+=n[i++]<<f,f+=8}r.length=u,r.head&&(r.head.extra_len=u),r.flags&512&&r.wrap&4&&(B[0]=u&255,B[1]=u>>>8&255,r.check=rr(r.check,B,2,0)),u=0,f=0}else r.head&&(r.head.extra=null);r.mode=wd;case wd:if(r.flags&1024&&(p=r.length,p>s&&(p=s),p&&(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+p),A)),r.flags&512&&r.wrap&4&&(r.check=rr(r.check,n,p,i)),s-=p,i+=p,r.length-=p),r.length))break e;r.length=0,r.mode=_d;case _d:if(r.flags&2048){if(s===0)break e;p=0;do A=n[i+p++],r.head&&A&&r.length<65536&&(r.head.name+=String.fromCharCode(A));while(A&&p<s);if(r.flags&512&&r.wrap&4&&(r.check=rr(r.check,n,p,i)),s-=p,i+=p,A)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=xd;case xd:if(r.flags&4096){if(s===0)break e;p=0;do A=n[i+p++],r.head&&A&&r.length<65536&&(r.head.comment+=String.fromCharCode(A));while(A&&p<s);if(r.flags&512&&r.wrap&4&&(r.check=rr(r.check,n,p,i)),s-=p,i+=p,A)break e}else r.head&&(r.head.comment=null);r.mode=kd;case kd:if(r.flags&512){for(;f<16;){if(s===0)break e;s--,u+=n[i++]<<f,f+=8}if(r.wrap&4&&u!==(r.check&65535)){e.msg="header crc mismatch",r.mode=Vt;break}u=0,f=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=Dn;break;case Sd:for(;f<32;){if(s===0)break e;s--,u+=n[i++]<<f,f+=8}e.adler=r.check=Rd(u),u=0,f=0,r.mode=G0;case G0:if(r.havedict===0)return e.next_out=o,e.avail_out=c,e.next_in=i,e.avail_in=s,r.hold=u,r.bits=f,ey;e.adler=r.check=1,r.mode=Dn;case Dn:if(t===J7||t===U0)break e;case is:if(r.last){u>>>=f&7,f-=f&7,r.mode=ls;break}for(;f<3;){if(s===0)break e;s--,u+=n[i++]<<f,f+=8}switch(r.last=u&1,u>>>=1,f-=1,u&3){case 0:r.mode=Ed;break;case 1:if(ly(r),r.mode=j0,t===U0){u>>>=2,f-=2;break e}break;case 2:r.mode=Dd;break;case 3:e.msg="invalid block type",r.mode=Vt}u>>>=2,f-=2;break;case Ed:for(u>>>=f&7,f-=f&7;f<32;){if(s===0)break e;s--,u+=n[i++]<<f,f+=8}if((u&65535)!==(u>>>16^65535)){e.msg="invalid stored block lengths",r.mode=Vt;break}if(r.length=u&65535,u=0,f=0,r.mode=os,t===U0)break e;case os:r.mode=Cd;case Cd:if(p=r.length,p){if(p>s&&(p=s),p>c&&(p=c),p===0)break e;a.set(n.subarray(i,i+p),o),s-=p,i+=p,c-=p,o+=p,r.length-=p;break}r.mode=Dn;break;case Dd:for(;f<14;){if(s===0)break e;s--,u+=n[i++]<<f,f+=8}if(r.nlen=(u&31)+257,u>>>=5,f-=5,r.ndist=(u&31)+1,u>>>=5,f-=5,r.ncode=(u&15)+4,u>>>=4,f-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=Vt;break}r.have=0,r.mode=Ad;case Ad:for(;r.have<r.ncode;){for(;f<3;){if(s===0)break e;s--,u+=n[i++]<<f,f+=8}r.lens[V[r.have++]]=u&7,u>>>=3,f-=3}for(;r.have<19;)r.lens[V[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,T={bits:r.lenbits},k=Ti(Y7,r.lens,0,19,r.lencode,0,r.work,T),r.lenbits=T.bits,k){e.msg="invalid code lengths set",r.mode=Vt;break}r.have=0,r.mode=Bd;case Bd:for(;r.have<r.nlen+r.ndist;){for(;_=r.lencode[u&(1<<r.lenbits)-1],y=_>>>24,g=_>>>16&255,b=_&65535,!(y<=f);){if(s===0)break e;s--,u+=n[i++]<<f,f+=8}if(b<16)u>>>=y,f-=y,r.lens[r.have++]=b;else{if(b===16){for(F=y+2;f<F;){if(s===0)break e;s--,u+=n[i++]<<f,f+=8}if(u>>>=y,f-=y,r.have===0){e.msg="invalid bit length repeat",r.mode=Vt;break}A=r.lens[r.have-1],p=3+(u&3),u>>>=2,f-=2}else if(b===17){for(F=y+3;f<F;){if(s===0)break e;s--,u+=n[i++]<<f,f+=8}u>>>=y,f-=y,A=0,p=3+(u&7),u>>>=3,f-=3}else{for(F=y+7;f<F;){if(s===0)break e;s--,u+=n[i++]<<f,f+=8}u>>>=y,f-=y,A=0,p=11+(u&127),u>>>=7,f-=7}if(r.have+p>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=Vt;break}for(;p--;)r.lens[r.have++]=A}}if(r.mode===Vt)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=Vt;break}if(r.lenbits=9,T={bits:r.lenbits},k=Ti(ud,r.lens,0,r.nlen,r.lencode,0,r.work,T),r.lenbits=T.bits,k){e.msg="invalid literal/lengths set",r.mode=Vt;break}if(r.distbits=6,r.distcode=r.distdyn,T={bits:r.distbits},k=Ti(fd,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,T),r.distbits=T.bits,k){e.msg="invalid distances set",r.mode=Vt;break}if(r.mode=j0,t===U0)break e;case j0:r.mode=q0;case q0:if(s>=6&&c>=258){e.next_out=o,e.avail_out=c,e.next_in=i,e.avail_in=s,r.hold=u,r.bits=f,q7(e,d),o=e.next_out,a=e.output,c=e.avail_out,i=e.next_in,n=e.input,s=e.avail_in,u=r.hold,f=r.bits,r.mode===Dn&&(r.back=-1);break}for(r.back=0;_=r.lencode[u&(1<<r.lenbits)-1],y=_>>>24,g=_>>>16&255,b=_&65535,!(y<=f);){if(s===0)break e;s--,u+=n[i++]<<f,f+=8}if(g&&!(g&240)){for(v=y,E=g,C=b;_=r.lencode[C+((u&(1<<v+E)-1)>>v)],y=_>>>24,g=_>>>16&255,b=_&65535,!(v+y<=f);){if(s===0)break e;s--,u+=n[i++]<<f,f+=8}u>>>=v,f-=v,r.back+=v}if(u>>>=y,f-=y,r.back+=y,r.length=b,g===0){r.mode=Fd;break}if(g&32){r.back=-1,r.mode=Dn;break}if(g&64){e.msg="invalid literal/length code",r.mode=Vt;break}r.extra=g&15,r.mode=Td;case Td:if(r.extra){for(F=r.extra;f<F;){if(s===0)break e;s--,u+=n[i++]<<f,f+=8}r.length+=u&(1<<r.extra)-1,u>>>=r.extra,f-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=Md;case Md:for(;_=r.distcode[u&(1<<r.distbits)-1],y=_>>>24,g=_>>>16&255,b=_&65535,!(y<=f);){if(s===0)break e;s--,u+=n[i++]<<f,f+=8}if(!(g&240)){for(v=y,E=g,C=b;_=r.distcode[C+((u&(1<<v+E)-1)>>v)],y=_>>>24,g=_>>>16&255,b=_&65535,!(v+y<=f);){if(s===0)break e;s--,u+=n[i++]<<f,f+=8}u>>>=v,f-=v,r.back+=v}if(u>>>=y,f-=y,r.back+=y,g&64){e.msg="invalid distance code",r.mode=Vt;break}r.offset=b,r.extra=g&15,r.mode=Id;case Id:if(r.extra){for(F=r.extra;f<F;){if(s===0)break e;s--,u+=n[i++]<<f,f+=8}r.offset+=u&(1<<r.extra)-1,u>>>=r.extra,f-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=Vt;break}r.mode=zd;case zd:if(c===0)break e;if(p=d-c,r.offset>p){if(p=r.offset-p,p>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=Vt;break}p>r.wnext?(p-=r.wnext,w=r.wsize-p):w=r.wnext-p,p>r.length&&(p=r.length),m=r.window}else m=a,w=o-r.offset,p=r.length;p>c&&(p=c),c-=p,r.length-=p;do a[o++]=m[w++];while(--p);r.length===0&&(r.mode=q0);break;case Fd:if(c===0)break e;a[o++]=r.length,c--,r.mode=q0;break;case ls:if(r.wrap){for(;f<32;){if(s===0)break e;s--,u|=n[i++]<<f,f+=8}if(d-=c,e.total_out+=d,r.total+=d,r.wrap&4&&d&&(e.adler=r.check=r.flags?rr(r.check,a,d,o-d):xi(r.check,a,d,o-d)),d=c,r.wrap&4&&(r.flags?u:Rd(u))!==r.check){e.msg="incorrect data check",r.mode=Vt;break}u=0,f=0}r.mode=Nd;case Nd:if(r.wrap&&r.flags){for(;f<32;){if(s===0)break e;s--,u+=n[i++]<<f,f+=8}if(r.wrap&4&&u!==(r.total&4294967295)){e.msg="incorrect length check",r.mode=Vt;break}u=0,f=0}r.mode=Od;case Od:k=Q7;break e;case Vt:k=hd;break e;case Ld:return pd;case Pd:default:return Gr}return e.next_out=o,e.avail_out=c,e.next_in=i,e.avail_in=s,r.hold=u,r.bits=f,(r.wsize||d!==e.avail_out&&r.mode<Vt&&(r.mode<ls||t!==dd))&&jd(e,e.output,e.next_out,d-e.avail_out),h-=e.avail_in,d-=e.avail_out,e.total_in+=h,e.total_out+=d,r.total+=d,r.wrap&4&&d&&(e.adler=r.check=r.flags?rr(r.check,a,d,e.next_out-d):xi(r.check,a,d,e.next_out-d)),e.data_type=r.bits+(r.last?64:0)+(r.mode===Dn?128:0)+(r.mode===j0||r.mode===os?256:0),(h===0&&d===0||t===dd)&&k===da&&(k=ty),k},cy=e=>{if(ha(e))return Gr;let t=e.state;return t.window&&(t.window=null),e.state=null,da},uy=(e,t)=>{if(ha(e))return Gr;const r=e.state;return r.wrap&2?(r.head=t,t.done=!1,da):Gr},fy=(e,t)=>{const r=t.length;let n,a,i;return ha(e)||(n=e.state,n.wrap!==0&&n.mode!==G0)?Gr:n.mode===G0&&(a=1,a=xi(a,t,r,0),a!==n.check)?hd:(i=jd(e,t,r,r),i?(n.mode=Ld,pd):(n.havedict=1,da))};var dy=$d,hy=Ud,py=Vd,my=oy,vy=Hd,gy=sy,yy=cy,by=uy,wy=fy,_y="pako inflate (from Nodeca project)",An={inflateReset:dy,inflateReset2:hy,inflateResetKeep:py,inflateInit:my,inflateInit2:vy,inflate:gy,inflateEnd:yy,inflateGetHeader:by,inflateSetDictionary:wy,inflateInfo:_y};function xy(){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 ky=xy;const qd=Object.prototype.toString,{Z_NO_FLUSH:Sy,Z_FINISH:Ey,Z_OK:Mi,Z_STREAM_END:us,Z_NEED_DICT:fs,Z_STREAM_ERROR:Cy,Z_DATA_ERROR:Wd,Z_MEM_ERROR:Dy}=N0;function W0(e){this.options=P0.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 ad,this.strm.avail_out=0;let r=An.inflateInit2(this.strm,t.windowBits);if(r!==Mi)throw new Error(sa[r]);if(this.header=new ky,An.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Bi.string2buf(t.dictionary):qd.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=An.inflateSetDictionary(this.strm,t.dictionary),r!==Mi)))throw new Error(sa[r])}W0.prototype.push=function(e,t){const r=this.strm,n=this.options.chunkSize,a=this.options.dictionary;let i,o,s;if(this.ended)return!1;for(t===~~t?o=t:o=t===!0?Ey:Sy,qd.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=An.inflate(r,o),i===fs&&a&&(i=An.inflateSetDictionary(r,a),i===Mi?i=An.inflate(r,o):i===Wd&&(i=fs));r.avail_in>0&&i===us&&r.state.wrap>0&&e[r.next_in]!==0;)An.inflateReset(r),i=An.inflate(r,o);switch(i){case Cy:case Wd:case fs:case Dy:return this.onEnd(i),this.ended=!0,!1}if(s=r.avail_out,r.next_out&&(r.avail_out===0||i===us))if(this.options.to==="string"){let c=Bi.utf8border(r.output,r.next_out),u=r.next_out-c,f=Bi.buf2string(r.output,c);r.next_out=u,r.avail_out=n-u,u&&r.output.set(r.output.subarray(c,c+u),0),this.onData(f)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(!(i===Mi&&s===0)){if(i===us)return i=An.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,!0;if(r.avail_in===0)break}}return!0},W0.prototype.onData=function(e){this.chunks.push(e)},W0.prototype.onEnd=function(e){e===Mi&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=P0.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Ay(e,t){const r=new W0(t);if(r.push(e),r.err)throw r.msg||sa[r.err];return r.result}var By=Ay,Ty={inflate:By};const{deflate:My}=G7,{inflate:Iy}=Ty;var zy=My,Fy=Iy,Ii=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]),X0=4017,Z0=799,K0=3406,Y0=2276,J0=1567,Q0=3784,Va=5793,eo=2896,Ny=100,Xd=64*1024*1024,ds=0;function $a(e){var t=ds+e;if(t>Xd){var r=Math.ceil((t-Xd)/1024/1024);throw new Error("Max memory limit exceeded by at least ".concat(r,"MB"))}ds=t}function Oy(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 s=0;s<e[o];s++){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 c={children:[],index:0};n.push(c),i.children[i.index]=c.children,i=c}a++}if(o+1<r){var c={children:[],index:0};n.push(c),i.children[i.index]=c.children,i=c}}return n[0].children}function Ly(e,t,r,n,a,i,o,s,c){var u=r.mcusPerLine,f=r.progressive,h=t,d=0,p=0;function w(){if(p>0)return p--,d>>p&1;if(d=e[t++],d==255){var ye=e[t++];if(ye)throw new Error("unexpected marker: ".concat((d<<8|ye).toString(16)))}return p=7,d>>>7}function m(ye){for(var he=ye;;){if(he=he[w()],typeof he=="number")return he;if(he===void 0)throw new Error("invalid huffman sequence")}}function _(ye){for(var he=0;ye>0;)he=he<<1|w(),ye--;return he}function y(ye){var he=_(ye);return he>=1<<ye-1?he:he+(-1<<ye)+1}function g(ye,he){var ke=m(ye.huffmanTableDC),Ee=ke===0?0:y(ke);he[0]=ye.pred+=Ee;for(var me=1;me<64;){var te=m(ye.huffmanTableAC),se=te&15,ie=te>>4;if(se===0){if(ie<15)break;me+=16;continue}me+=ie;var _e=Ii[me];he[_e]=y(se),me++}}function b(ye,he){var ke=m(ye.huffmanTableDC),Ee=ke===0?0:y(ke)<<c;he[0]=ye.pred+=Ee}function v(ye,he){he[0]|=w()<<c}var E=0;function C(ye,he){if(E>0){E--;return}for(var ke=i,Ee=o;ke<=Ee;){var me=m(ye.huffmanTableAC),te=me&15,se=me>>4;if(te===0){if(se<15){E=_(se)+(1<<se)-1;break}ke+=16;continue}ke+=se;var ie=Ii[ke];he[ie]=y(te)*(1<<c),ke++}}var A=0,k=0;function B(ye,he){for(var ke=i,Ee=o,me=0;ke<=Ee;){var te=Ii[ke],se=he[te]<0?-1:1;switch(A){case 0:var ie=m(ye.huffmanTableAC),_e=ie&15;if(me=ie>>4,_e===0)me<15?(E=_(me)+(1<<me),A=4):(me=16,A=1);else{if(_e!==1)throw new Error("invalid ACn encoding");k=y(_e),A=me?2:3}continue;case 1:case 2:he[te]?he[te]+=(w()<<c)*se:(me--,me===0&&(A=A==2?3:0));break;case 3:he[te]?he[te]+=(w()<<c)*se:(he[te]=k<<c,A=0);break;case 4:he[te]&&(he[te]+=(w()<<c)*se);break}ke++}A===4&&(E--,E===0&&(A=0))}function T(ye,he,ke,Ee,me){var te=ke/u|0,se=ke%u,ie=te*ye.v+Ee,_e=se*ye.h+me;ye.blocks[ie]!==void 0&&he(ye,ye.blocks[ie][_e])}function F(ye,he,ke){var Ee=ke/ye.blocksPerLine|0,me=ke%ye.blocksPerLine;ye.blocks[Ee]!==void 0&&he(ye,ye.blocks[Ee][me])}var V=n.length,L,H;f?i===0?H=s===0?b:v:H=s===0?C:B:H=g;var X=0,W;V==1?W=n[0].blocksPerLine*n[0].blocksPerColumn:W=u*r.mcusPerColumn,a||(a=W);for(var Z,Q,K;X<W;){for(var ue=0;ue<V;ue++)n[ue].pred=0;if(E=0,V==1){L=n[0];for(var ne=0;ne<a;ne++)F(L,H,X),X++}else for(var ne=0;ne<a;ne++){for(var ue=0;ue<V;ue++){L=n[ue],Z=L.h,Q=L.v;for(var fe=0;fe<Q;fe++)for(var re=0;re<Z;re++)T(L,H,X,fe,re)}if(X++,X===W)break}if(X===W)do{if(e[t]===255&&e[t+1]!==0)break;t+=1}while(t<e.length-2);if(p=0,K=e[t]<<8|e[t+1],K<65280)throw new Error("marker was not found");if(K>=65488&&K<=65495)t+=2;else break}return t-h}function Py(e){var t=[],r=e.blocksPerLine,n=e.blocksPerColumn,a=r<<3,i=new Int32Array(64),o=new Uint8Array(64);function s(_,y,g){for(var b=e.quantizationTable,v=g,E=0;E<64;E++)v[E]=_[E]*b[E];for(var E=0;E<8;++E){var C=8*E;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=Va*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 k=Va*v[0+C]+128>>8,B=Va*v[4+C]+128>>8,T=v[2+C],F=v[6+C],V=eo*(v[1+C]-v[7+C])+128>>8,L=eo*(v[1+C]+v[7+C])+128>>8,H=v[3+C]<<4,X=v[5+C]<<4,W=k-B+1>>1;k=k+B+1>>1,B=W,W=T*Q0+F*J0+128>>8,T=T*J0-F*Q0+128>>8,F=W,W=V-X+1>>1,V=V+X+1>>1,X=W,W=L+H+1>>1,H=L-H+1>>1,L=W,W=k-F+1>>1,k=k+F+1>>1,F=W,W=B-T+1>>1,B=B+T+1>>1,T=W,W=V*Y0+L*K0+2048>>12,V=V*K0-L*Y0+2048>>12,L=W,W=H*Z0+X*X0+2048>>12,H=H*X0-X*Z0+2048>>12,X=W,v[0+C]=k+L,v[7+C]=k-L,v[1+C]=B+X,v[6+C]=B-X,v[2+C]=T+H,v[5+C]=T-H,v[3+C]=F+V,v[4+C]=F-V}for(var E=0;E<8;++E){var Z=E;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 Q=Va*g[E+0]+8192>>14;v[0*8+Z]=Q,v[1*8+Z]=Q,v[2*8+Z]=Q,v[3*8+Z]=Q,v[4*8+Z]=Q,v[5*8+Z]=Q,v[6*8+Z]=Q,v[7*8+Z]=Q;continue}var k=Va*v[0*8+Z]+2048>>12,B=Va*v[4*8+Z]+2048>>12,T=v[2*8+Z],F=v[6*8+Z],V=eo*(v[1*8+Z]-v[7*8+Z])+2048>>12,L=eo*(v[1*8+Z]+v[7*8+Z])+2048>>12,H=v[3*8+Z],X=v[5*8+Z],W=k-B+1>>1;k=k+B+1>>1,B=W,W=T*Q0+F*J0+2048>>12,T=T*J0-F*Q0+2048>>12,F=W,W=V-X+1>>1,V=V+X+1>>1,X=W,W=L+H+1>>1,H=L-H+1>>1,L=W,W=k-F+1>>1,k=k+F+1>>1,F=W,W=B-T+1>>1,B=B+T+1>>1,T=W,W=V*Y0+L*K0+2048>>12,V=V*K0-L*Y0+2048>>12,L=W,W=H*Z0+X*X0+2048>>12,H=H*X0-X*Z0+2048>>12,X=W,v[0*8+Z]=k+L,v[7*8+Z]=k-L,v[1*8+Z]=B+X,v[6*8+Z]=B-X,v[2*8+Z]=T+H,v[5*8+Z]=T-H,v[3*8+Z]=F+V,v[4*8+Z]=F-V}for(var E=0;E<64;++E){var K=128+(v[E]+8>>4);y[E]=K<0?0:K>255?255:K}}$a(a*n*8);for(var c=0;c<n;c++){for(var u=c<<3,f=0;f<8;f++)t.push(new Uint8Array(a));for(var h=0;h<r;h++){s(e.blocks[c][h],o,i);for(var d=0,p=h<<3,w=0;w<8;w++)for(var m=t[u+w],f=0;f<8;f++)m[p+f]=o[d++]}}return t}function Bn(e){return e<0?0:e>255?255:e}function Ry(e){var t={width:0,height:0,comments:[],adobe:void 0,components:[],exifBuffer:void 0,jfif:void 0},r=Ny*1e3*1e3,n=0;function a(){var Ve=e[n]<<8|e[n+1];return n+=2,Ve}function i(){var Ve=a(),ge=e.subarray(n,n+Ve-2);return n+=ge.length,ge}function o(Ve){var ge=0,Ce=0;for(var ve in Ve.components)if(Ve.components.hasOwnProperty(ve)){var Oe=Ve.components[ve];ge<Oe.h&&(ge=Oe.h),Ce<Oe.v&&(Ce=Oe.v)}var tt=Math.ceil(Ve.samplesPerLine/8/ge),at=Math.ceil(Ve.scanLines/8/Ce);for(var ve in Ve.components)if(Ve.components.hasOwnProperty(ve)){var Oe=Ve.components[ve],st=Math.ceil(Math.ceil(Ve.samplesPerLine/8)*Oe.h/ge),It=Math.ceil(Math.ceil(Ve.scanLines/8)*Oe.v/Ce),ut=tt*Oe.h,ft=at*Oe.v,vt=ft*ut,gt=[];$a(vt*256);for(var pt=0;pt<ft;pt++){for(var Ct=[],Ae=0;Ae<ut;Ae++)Ct.push(new Int32Array(64));gt.push(Ct)}Oe.blocksPerLine=st,Oe.blocksPerColumn=It,Oe.blocks=gt}Ve.maxH=ge,Ve.maxV=Ce,Ve.mcusPerLine=tt,Ve.mcusPerColumn=at}var s=null,c=null,u=void 0,f=0,h=[],d=[],p=[],w=[],m=a(),_=-1;if(m!=65496)throw new Error("SOI not found");for(m=a();m!=65497;){switch(m){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 y=i();if(m===65534){for(var g="",b=0;b<y.byteLength;b++)g+=String.fromCharCode(y[b]);t.comments.push(g)}m===65504&&y[0]===74&&y[1]===70&&y[2]===73&&y[3]===70&&y[4]===0&&(s={version:{major:y[5],minor:y[6]},densityUnits:y[7],xDensity:y[8]<<8|y[9],yDensity:y[10]<<8|y[11],thumbWidth:y[12],thumbHeight:y[13],thumbData:y.subarray(14,14+3*y[12]*y[13])}),m===65505&&y[0]===69&&y[1]===120&&y[2]===105&&y[3]===102&&y[4]===0&&(t.exifBuffer=y.subarray(5,y.length)),m===65518&&y[0]===65&&y[1]===100&&y[2]===111&&y[3]===98&&y[4]===101&&y[5]===0&&(c={version:y[6],flags0:y[7]<<8|y[8],flags1:y[9]<<8|y[10],transformCode:y[11]});break}case 65499:{for(var v=a(),E=v+n-2;n<E;){var C=e[n++];$a(64*4);var A=new Int32Array(64);if(C>>4)if(C>>4===1)for(var k=0;k<64;k++){var B=Ii[k];A[B]=a()}else throw new Error("DQT: invalid table spec");else for(var k=0;k<64;k++){var B=Ii[k];A[B]=e[n++]}h[C&15]=A}break}case 65472:case 65473:case 65474:{a(),u={extended:m===65473,progressive:m===65474,precision:e[n++],scanLines:a(),samplesPerLine:a(),components:{},componentsOrder:[],maxH:0,maxV:0,mcusPerLine:0,mcusPerColumn:0};var T=u.scanLines*u.samplesPerLine;if(T>r){var F=Math.ceil((T-r)/1e6);throw new Error("maxResolutionInMP limit exceeded by ".concat(F,"MP"))}for(var V=e[n++],L=0;L<V;L++){var H=e[n],X=e[n+1]>>4,W=e[n+1]&15,Z=e[n+2];u.componentsOrder.push(H),u.components[H]={h:X,v:W,quantizationIdx:Z,blocksPerColumn:0,blocksPerLine:0,blocks:[],pred:0},n+=3}o(u),d.push(u);break}case 65476:{for(var Q=a(),L=2;L<Q;){for(var K=e[n++],ue=new Uint8Array(16),ne=0,k=0;k<16;k++,n++)ne+=ue[k]=e[n];$a(16+ne);for(var fe=new Uint8Array(ne),k=0;k<ne;k++,n++)fe[k]=e[n];L+=17+ne;var re=K&15,ye=K>>4?p:w;ye[re]=Oy(ue,fe)}break}case 65501:a(),f=a();break;case 65500:a(),a();break;case 65498:{a();for(var he=e[n++],ke=[],L=0;L<he;L++){var Ee=u.components[e[n++]],me=e[n++];Ee.huffmanTableDC=w[me>>4],Ee.huffmanTableAC=p[me&15],ke.push(Ee)}var te=e[n++],se=e[n++],ie=e[n++],_e=Ly(e,n,u,ke,f,te,se,ie>>4,ie&15);n+=_e;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(m===224||m==225){if(_!==-1)throw new Error("first unknown JPEG marker at offset ".concat(_.toString(16),", second unknown JPEG marker ").concat(m.toString(16)," at offset ").concat((n-1).toString(16)));_=n-1;var He=a();if(e[n+He-2]===255){n+=He-2;break}}throw new Error("unknown JPEG marker "+m.toString(16))}}m=a()}if(d.length!=1)throw new Error("only single frame JPEGs supported");for(var L=0;L<d.length;L++){var je=d[L].components;for(var k in je)je[k].quantizationTable=h[je[k].quantizationIdx],delete je[k].quantizationIdx}t.width=u.samplesPerLine,t.height=u.scanLines,t.jfif=s,t.adobe=c,t.components=[];for(var L=0;L<u.componentsOrder.length;L++){var Ee=u.components[u.componentsOrder[L]];t.components.push({lines:Py(Ee),scaleX:Ee.h/u.maxH,scaleY:Ee.v/u.maxV})}return t}function Vy(e){var t=0,r=!1,n=e.width,a=e.height,i=n*a*e.components.length;$a(i);var o=new Uint8Array(i);switch(e.components.length){case 1:{for(var s=e.components[0],c=0;c<a;c++)for(var u=s.lines[0|c*s.scaleY],f=0;f<n;f++){var h=u[0|f*s.scaleX];o[t++]=h}break}case 2:{for(var s=e.components[0],d=e.components[1],c=0;c<a;c++)for(var u=s.lines[0|c*s.scaleY],p=d.lines[0|c*d.scaleY],f=0;f<n;f++){var w=u[0|f*s.scaleX];o[t++]=w;var m=p[0|f*d.scaleX];o[t++]=m}break}case 3:{r=!0,e.adobe&&e.adobe.transformCode&&(r=!0);for(var s=e.components[0],d=e.components[1],_=e.components[2],c=0;c<a;c++)for(var u=s.lines[0|c*s.scaleY],p=d.lines[0|c*d.scaleY],y=_.lines[0|c*_.scaleY],f=0;f<n;f++){var h=void 0,g=void 0,b=void 0,v=void 0,E=void 0,C=void 0;r?(h=u[0|f*s.scaleX],g=p[0|f*d.scaleX],b=y[0|f*_.scaleX],v=Bn(h+1.402*(b-128)),E=Bn(h-.3441363*(g-128)-.71413636*(b-128)),C=Bn(h+1.772*(g-128))):(v=u[0|f*s.scaleX],E=p[0|f*d.scaleX],C=y[0|f*_.scaleX]),o[t++]=v,o[t++]=E,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 s=e.components[0],d=e.components[1],_=e.components[2],A=e.components[3],c=0;c<a;c++)for(var u=s.lines[0|c*s.scaleY],p=d.lines[0|c*d.scaleY],y=_.lines[0|c*_.scaleY],k=A.lines[0|c*A.scaleY],f=0;f<n;f++){var h=void 0,g=void 0,b=void 0,B=void 0,T=void 0,F=void 0,V=void 0;r?(h=u[0|f*s.scaleX],g=p[0|f*d.scaleX],b=y[0|f*_.scaleX],B=k[0|f*A.scaleX],T=255-Bn(h+1.402*(b-128)),F=255-Bn(h-.3441363*(g-128)-.71413636*(b-128)),V=255-Bn(h+1.772*(g-128))):(T=u[0|f*s.scaleX],F=p[0|f*d.scaleX],V=y[0|f*_.scaleX],B=k[0|f*A.scaleX]),o[t++]=255-T,o[t++]=255-F,o[t++]=255-V,o[t++]=255-B}break}default:throw new Error("Unsupported color mode")}return o}function $y(e,t){if(ds=0,e.length===0)throw new Error("Empty jpeg buffer");var r=Ry(e);$a(r.width*r.height*4);var n=Vy(r),a=t(r.width,r.height),i=a.width,o=a.height,s=a.data,c=0,u=0;switch(r.components.length){case 1:for(var f=0;f<o;f++)for(var h=0;h<i;h++){var d=n[c++];s[u++]=d,s[u++]=d,s[u++]=d,s[u++]=255}break;case 3:for(var f=0;f<o;f++)for(var h=0;h<i;h++){var p=n[c++],w=n[c++],m=n[c++];s[u++]=p,s[u++]=w,s[u++]=m,s[u++]=255}break;case 4:for(var f=0;f<o;f++)for(var h=0;h<i;h++){var _=n[c++],y=n[c++],d=n[c++],g=n[c++],p=255-Bn(_*(1-g/255)+g),w=255-Bn(y*(1-g/255)+g),m=255-Bn(d*(1-g/255)+g);s[u++]=p,s[u++]=w,s[u++]=m,s[u++]=255}break;default:throw new Error("Unsupported color mode")}return a}var Uy=!1,to={},Ua={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(Ua).forEach(function(e){return to[Ua[e]]=e});var Zd=["none","red","orange","yellow","green","blue","violet","gray"],Kd=["LMsk","Lr16","Lr32","Layr","Mt16","Mt32","Mtrn","Alph","FMsk","lnk2","FEid","FXid","PxSD","cinf"];function Hy(e){var t={};return Object.keys(e).forEach(function(r){return t[e[r]]=r}),t}function rt(e,t,r){var n=Hy(r),a=function(o){var s=o.split(".")[1];if(s&&!n[s])throw new Error("Unrecognized value for enum: '".concat(o,"'"));return n[s]||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 Yd;(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"})(Yd||(Yd={}));var Jd;(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"})(Jd||(Jd={}));var Qd;(function(e){e[e.UserMaskDensity=1]="UserMaskDensity",e[e.UserMaskFeather=2]="UserMaskFeather",e[e.VectorMaskDensity=4]="VectorMaskDensity",e[e.VectorMaskFeather=8]="VectorMaskFeather"})(Qd||(Qd={}));function e1(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 hs(e,t,r){return e<t?t:e>r?r:e}function t1(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 Gy(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 ro(e){var t=Ha(e.width,e.height),r;if(e.data instanceof Uint8ClampedArray)r=e;else{r=Ga(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 s=n instanceof Uint16Array?8:0,i=0,o=n.length;i<o;i++)a[i]=n[i]>>>s}return t.getContext("2d").putImageData(r,0,0),t}function jy(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 s=0;s<r;)for(var c=e[o++],u=0;u<8&&s<r;u++,s++,i+=4){var f=c&128?0:255;c=c<<1,t[i+0]=f,t[i+1]=f,t[i+2]=f,t[i+3]=255}}function ps(e,t,r,n){var a=t.data,i=t.width,o=t.height;if(!(!i||!o)){for(var s=4*i|0,c=0,u=r.length*(n?4:2)*o|0,f=0,h=r;f<h.length;f++)for(var d=h[f],p=0,w=d|0;p<o;p++){var m=p*s|0,_=m+s|0,y=_+d-4|0,g=y-4|0,b=u;for(w=m+d|0;w<_;w=w+4|0)if(w<g){var v=a[w];w=w+4|0;var E=a[w];w=w+4|0;var C=a[w];if(v===E&&v===C){for(var A=3;A<128&&w<y&&a[w+4|0]===v;)A=A+1|0,w=w+4|0;e[u++]=1-A,e[u++]=v}else{var k=u,B=!0,A=1;for(e[u++]=0,e[u++]=v;w<y&&A<128;)if(w=w+4|0,v=E,E=C,C=a[w],v===E&&v===C){w=w-12|0,B=!1;break}else A++,e[u++]=v;B&&(A<127?(e[u++]=E,e[u++]=C,A+=2):A<128?(e[u++]=E,A++,w=w-4|0):w=w-8|0),e[k]=A-1}}else w===y?(e[u++]=0,e[u++]=a[w]):(e[u++]=1,e[u++]=a[w],w=w+4|0,e[u++]=a[w]);var T=u-b;n&&(e[c++]=T>>24&255,e[c++]=T>>16&255),e[c++]=T>>8&255,e[c++]=T&255}return e.slice(0,u)}}function r1(e,t){for(var r=e.data,n=e.width,a=e.height,i=n*a,o=new Uint8Array(i),s=[],c=0,u=0,f=t;u<f.length;u++){for(var h=f[u],d=0,p=h;d<i;d++,p+=4)o[d]=r[p];var w=zy(o);s.push(w),c+=w.byteLength}if(s.length>0){for(var w=new Uint8Array(c),h=0,m=0,_=s;m<_.length;m++){var y=_[m];w.set(y,h),h+=y.byteLength}return w}else return s[0]}function qy(e){var t=Ha(100,100);try{var r=t.getContext("2d"),n=$y(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 Ha=function(){throw new Error("Canvas not initialized, use initializeCanvas method to set up createCanvas method")},ms=void 0,Ga=function(e,t){return ms||(ms=Ha(1,1)),ms.getContext("2d").createImageData(e,t)};typeof document<"u"&&(Ha=function(e,t){var r=document.createElement("canvas");return r.width=e,r.height=t,r});function Wy(e,t){Ha=e,Ga=t||Ga}for(var n1=Jy,a1=tb,vn=[],jr=[],Xy=typeof Uint8Array<"u"?Uint8Array:Array,vs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ja=0,Zy=vs.length;ja<Zy;++ja)vn[ja]=vs[ja],jr[vs.charCodeAt(ja)]=ja;jr[45]=62,jr[95]=63;function Ky(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 Yy(e,t,r){return(t+r)*3/4-r}function Jy(e){var t,r=Ky(e),n=r[0],a=r[1],i=new Xy(Yy(e,n,a)),o=0,s=a>0?n-4:n,c;for(c=0;c<s;c+=4)t=jr[e.charCodeAt(c)]<<18|jr[e.charCodeAt(c+1)]<<12|jr[e.charCodeAt(c+2)]<<6|jr[e.charCodeAt(c+3)],i[o++]=t>>16&255,i[o++]=t>>8&255,i[o++]=t&255;return a===2&&(t=jr[e.charCodeAt(c)]<<2|jr[e.charCodeAt(c+1)]>>4,i[o++]=t&255),a===1&&(t=jr[e.charCodeAt(c)]<<10|jr[e.charCodeAt(c+1)]<<4|jr[e.charCodeAt(c+2)]>>2,i[o++]=t>>8&255,i[o++]=t&255),i}function Qy(e){return vn[e>>18&63]+vn[e>>12&63]+vn[e>>6&63]+vn[e&63]}function eb(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(Qy(n));return a.join("")}function tb(e){for(var t,r=e.length,n=r%3,a=[],i=16383,o=0,s=r-n;o<s;o+=i)a.push(eb(e,o,o+i>s?s:o+i));return n===1?(t=e[r-1],a.push(vn[t>>2]+vn[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],a.push(vn[t>>10]+vn[t>>4&63]+vn[t<<2&63]+"=")),a.join("")}function gs(e){return e&4294967168?e&4294965248?e&4294901760?4:3:2:1}function rb(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+=gs(((n&1023)<<10)+(a&1023)+65536))}}else t+=gs(n)}return t}function i1(e,t,r){var n=gs(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 nb(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+=i1(e,t,o)}}}else t+=i1(e,t,a)}return t}function o1(e){if(e.length>1e3&&typeof TextEncoder<"u")return new TextEncoder().encode(e);var t=new Uint8Array(rb(e));return nb(t,0,e),t}function qa(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 l1(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=qa(e,r++);if(a=(n&31)<<6|i,a<128)throw Error("Invalid continuation byte")}else if((n&240)===224){var i=qa(e,r++),o=qa(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=qa(e,r++),o=qa(e,r++),s=qa(e,r++);if(a=(n&15)<<18|i<<12|o<<6|s,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 Tn=function(){return Tn=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},Tn.apply(this,arguments)},ab=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 ib(e){var t={};return Object.keys(e).forEach(function(r){return t[e[r]]=r}),t}var zi={"#Ang":"Angle","#Rsl":"Density","#Rlt":"Distance","#Nne":"None","#Prc":"Percent","#Pxl":"Pixels","#Mlm":"Millimeters","#Pnt":"Points",RrPi:"Picas",RrIn:"Inches",RrCm:"Centimeters"},no=ib(zi);function Re(e,t){return{name:e,classID:t}}for(var yt=Re("","null"),s1={strokeStyleContent:Re("","solidColorLayer"),printProofSetup:Re("Proof Setup","proofSetup"),Grad:Re("Gradient","Grdn"),Trnf:Re("Transform","Trnf"),patternFill:Re("","patternFill"),ebbl:Re("","ebbl"),SoFi:Re("","SoFi"),GrFl:Re("","GrFl"),sdwC:Re("","RGBC"),hglC:Re("","RGBC"),"Clr ":Re("","RGBC"),tintColor:Re("","RGBC"),Ofst:Re("","Pnt "),ChFX:Re("","ChFX"),MpgS:Re("","ShpC"),DrSh:Re("","DrSh"),IrSh:Re("","IrSh"),OrGl:Re("","OrGl"),IrGl:Re("","IrGl"),TrnS:Re("","ShpC"),Ptrn:Re("","Ptrn"),FrFX:Re("","FrFX"),phase:Re("","Pnt "),frameStep:yt,duration:yt,workInTime:yt,workOutTime:yt,audioClipGroupList:yt,bounds:Re("","Rctn"),customEnvelopeWarp:Re("","customEnvelopeWarp"),warp:Re("","warp"),"Sz ":Re("","Pnt "),origin:Re("","Pnt "),autoExpandOffset:Re("","Pnt "),keyOriginShapeBBox:Re("","unitRect"),Vrsn:yt,psVersion:yt,docDefaultNewArtboardBackgroundColor:Re("","RGBC"),artboardRect:Re("","classFloatRect"),keyOriginRRectRadii:Re("","radii"),keyOriginBoxCorners:yt,rectangleCornerA:Re("","Pnt "),rectangleCornerB:Re("","Pnt "),rectangleCornerC:Re("","Pnt "),rectangleCornerD:Re("","Pnt "),compInfo:yt,quiltWarp:Re("","quiltWarp"),generatorSettings:yt,crema:yt,FrIn:yt,blendOptions:yt,FXRf:yt,Lefx:yt,time:yt,animKey:yt,timeScope:yt,inTime:yt,outTime:yt,sheetStyle:yt,translation:yt,Skew:yt,boundingBox:Re("","boundingBox"),"Lnk ":Re("","ExternalFileLink"),frameReader:Re("","FrameReader"),effectParams:Re("","motionTrackEffectParams"),Impr:Re("None","none"),Anch:Re("","Pnt "),"Fwd ":Re("","Pnt "),"Bwd ":Re("","Pnt "),FlrC:Re("","Pnt "),meshBoundaryPath:Re("","pathClass"),filterFX:Re("","filterFXStyle"),Fltr:Re("","rigidTransform"),FrgC:Re("","RGBC"),BckC:Re("","RGBC"),sdwM:Re("Parameters","adaptCorrectTones"),hglM:Re("Parameters","adaptCorrectTones"),customShape:Re("","customShape"),origFXRefPoint:yt,FXRefPoint:yt,ClMg:Re("","ClMg")},c1={"Crv ":Re("","CrPt"),Clrs:Re("","Clrt"),Trns:Re("","TrnS"),keyDescriptorList:yt,solidFillMulti:Re("","SoFi"),gradientFillMulti:Re("","GrFl"),dropShadowMulti:Re("","DrSh"),innerShadowMulti:Re("","IrSh"),frameFXMulti:Re("","FrFX"),FrIn:yt,FSts:yt,LaSt:yt,sheetTimelineOptions:yt,trackList:Re("","animationTrack"),globalTrackList:Re("","animationTrack"),keyList:yt,audioClipGroupList:yt,audioClipList:yt,countObjectList:Re("","countObject"),countGroupList:Re("","countGroup"),slices:Re("","slice"),"Pts ":Re("","Pthp"),SbpL:Re("","SbpL"),pathComponents:Re("","PaCm"),filterFXList:Re("","filterFX"),puppetShapeList:Re("","puppetShape"),channelDenoise:Re("","channelDenoiseParams"),ShrP:Re("","Pnt "),layerSettings:yt,list:yt,Adjs:Re("","CrvA")},u1={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"]},ob=["Rd ","Grn ","Bl ","Yllw","Ylw ","Cyn ","Mgnt","Blck","Gry ","Lmnc","A ","B "],f1={"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"},ao={},ys=0,d1=Object.keys(u1);ys<d1.length;ys++)for(var h1=d1[ys],bs=0,p1=u1[h1];bs<p1.length;bs++){var Wa=p1[bs];ao[Wa]=h1}for(var ws=0,m1=Object.keys(s1);ws<m1.length;ws++){var Wa=m1[ws];ao[Wa]||(ao[Wa]="Objc")}for(var _s=0,v1=Object.keys(c1);_s<v1.length;_s++){var Wa=v1[_s];f1[Wa]="Objc"}function lb(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":ao[e]}function Mn(e){var t=qe(e);return vo(e,t||4)}function In(e,t){if(t.length===4&&t!=="warp"&&t!=="time"&&t!=="hold"&&t!=="list")Je(e,0),et(e,t);else{Je(e,t.length);for(var r=0;r<t.length;r++)ze(e,t.charCodeAt(r))}}function g1(e,t){for(var r=pa(e),n=t?{_name:r.name,_classID:r.classID}:{},a=we(e),i=0;i<a;i++){var o=Mn(e),s=Mt(e),c=b1(e,s,t);n[o]=c}return n}function y1(e,t,r,n,a){ga(e,t),In(e,r);var i=Object.keys(n),o=i.length;"_name"in n&&o--,"_classID"in n&&o--,Pe(e,o);for(var s=0,c=i;s<c.length;s++){var u=c[s];if(!(u==="_name"||u==="_classID")){var f=lb(u,n[u],a,n),h=s1[u];u==="bounds"&&a==="text"?h=Re("","bounds"):u==="origin"?f=a==="slices"?"enum":"Objc":(u==="Cyn "||u==="Mgnt"||u==="Ylw "||u==="Blck")&&n._classID==="CMYC"?f="doub":/^PN[a-z][a-z]$/.test(u)?f="TEXT":/^PT[a-z][a-z]$/.test(u)?f="long":/^PF[a-z][a-z]$/.test(u)||(u==="Rds "||u==="Thsh")&&typeof n[u]=="number"&&n._classID==="SmrB"?f="doub":u==="ClSz"||u==="Rds "||u==="Amnt"?f=typeof n[u]=="number"?"long":"UntF":(u==="sdwM"||u==="hglM")&&typeof n[u]=="string"||u==="blur"&&typeof n[u]=="string"?f="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")?f="long":u==="Angl"&&typeof n[u]=="number"?f="doub":u==="bounds"&&a==="slices"?(f="Objc",h=Re("","Rct1")):u==="Scl "?typeof n[u]=="object"&&"Hrzn"in n[u]?(f="Objc",h=yt):typeof n[u]=="number"?f="long":f="UntF":u==="audioClipGroupList"&&i.length===1?f="VlLs":(u==="Strt"||u==="Brgh")&&"H "in n?f="doub":u==="Wdth"&&typeof n[u]=="object"?f="UntF":u==="Ofst"&&typeof n[u]=="number"?f="long":u==="Strt"&&typeof n[u]=="object"?(f="Objc",h=yt):ob.indexOf(u)!==-1?f=r==="RGBC"&&a!=="artd"?"doub":"long":u==="profile"?f=r==="printOutput"?"TEXT":"tdta":u==="strokeStyleContent"?n[u]["Clr "]?h=Re("","solidColorLayer"):n[u].Grad?h=Re("","gradientLayer"):n[u].Ptrn&&(h=Re("","patternLayer")):u==="bounds"&&a==="quiltWarp"&&(h=Re("","classFloatRect")),h&&h.classID==="RGBC"&&"H "in n[u]&&(h={classID:"HSBC",name:""}),In(e,u),et(e,f||"long"),w1(e,f||"long",n[u],u,h,a)}}}function b1(e,t,r){switch(t){case"obj ":return cb(e);case"Objc":case"GlbO":return g1(e,r);case"VlLs":{for(var n=qe(e),a=[],i=0;i<n;i++){var o=Mt(e);a.push(b1(e,o,r))}return a}case"doub":return Wr(e);case"UntF":{var s=Mt(e),c=Wr(e);if(!zi[s])throw new Error("Invalid units: ".concat(s));return{units:zi[s],value:c}}case"UnFl":{var s=Mt(e),c=Jr(e);if(!zi[s])throw new Error("Invalid units: ".concat(s));return{units:zi[s],value:c}}case"TEXT":return Kt(e);case"enum":{var u=Mn(e),c=Mn(e);return"".concat(u,".").concat(c)}case"long":return qe(e);case"comp":{var f=we(e),h=we(e);return{low:f,high:h}}case"bool":return!!Le(e);case"type":case"GlbC":return pa(e);case"alis":{var d=qe(e);return vo(e,d)}case"tdta":{var p=qe(e);return jt(e,p)}case"ObAr":{qe(e),Kt(e),Mn(e);for(var w=qe(e),a=[],i=0;i<w;i++){var m=Mn(e);Mt(e),Mt(e);for(var _=qe(e),y=[],g=0;g<_;g++)y.push(Wr(e));a.push({type:m,values:y})}return a}case"Pth ":{qe(e);var b=Mt(e);Lh(e);var v=Lh(e),E=wb(e,v);return{sig:b,path:E}}default:throw new Error("Invalid TySh descriptor OSType: ".concat(t," at ").concat(e.offset.toString(16)))}}var sb={meshPoints:"rationalPoint",quiltSliceX:"UntF",quiltSliceY:"UntF"};function w1(e,t,r,n,a,i){switch(t){case"obj ":ub(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,s=r._classID||a.classID;y1(e,o,s,r,i);break}case"VlLs":if(!Array.isArray(r))throw new Error("Invalid list value: ".concat(JSON.stringify(r),", key: ").concat(n));Je(e,r.length);for(var c=0;c<r.length;c++){var u=f1[n];et(e,u||"long"),w1(e,u||"long",r[c],"".concat(n,"[]"),c1[n],i)}break;case"doub":if(typeof r!="number")throw new Error("Invalid number value: ".concat(JSON.stringify(r),", key: ").concat(n));Xr(e,r);break;case"UntF":if(!no[r.units])throw new Error("Invalid units: ".concat(r.units," in ").concat(n));et(e,no[r.units]),Xr(e,r.value);break;case"UnFl":if(!no[r.units])throw new Error("Invalid units: ".concat(r.units," in ").concat(n));et(e,no[r.units]),tn(e,r.value);break;case"TEXT":ga(e,r);break;case"enum":{if(typeof r!="string")throw new Error("Invalid enum value: ".concat(JSON.stringify(r),", key: ").concat(n));var f=r.split("."),h=f[0],d=f[1];In(e,h),In(e,d);break}case"long":if(typeof r!="number")throw new Error("Invalid integer value: ".concat(JSON.stringify(r),", key: ").concat(n));Je(e,r);break;case"bool":if(typeof r!="boolean")throw new Error("Invalid boolean value: ".concat(JSON.stringify(r),", key: ").concat(n));ze(e,r?1:0);break;case"tdta":Je(e,r.byteLength),nn(e,r);break;case"ObAr":{Je(e,16),ga(e,"");var p=sb[n];if(!p)throw new Error("Not implemented ObArType for: ".concat(n));In(e,p),Je(e,r.length);for(var c=0;c<r.length;c++){In(e,r[c].type),et(e,"UnFl"),et(e,"#Pxl"),Je(e,r[c].values.length);for(var w=0;w<r[c].values.length;w++)Xr(e,r[c].values[w])}break}case"Pth ":{var m=12+r.path.length*2;Je(e,m),et(e,r.sig),Sp(e,m),Sp(e,r.path.length),s9(e,r.path);break}default:throw new Error("Not implemented descriptor OSType: ".concat(t))}}function cb(e){for(var t=qe(e),r=[],n=0;n<t;n++){var a=Mt(e);switch(a){case"prop":{pa(e);var i=Mn(e);r.push(i);break}case"Clss":r.push(pa(e));break;case"Enmr":{pa(e);var o=Mn(e),s=Mn(e);r.push("".concat(o,".").concat(s));break}case"rele":{pa(e),r.push(we(e));break}case"Idnt":r.push(qe(e));break;case"indx":r.push(qe(e));break;case"name":{pa(e),r.push(Kt(e));break}default:throw new Error("Invalid descriptor reference type: ".concat(a))}}return r}function ub(e,t,r){Je(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"),et(e,i),i){case"Enmr":{var o=a.split("."),s=o[0],c=o[1];_1(e,"\0",s),In(e,s),In(e,c);break}case"name":{_1(e,"\0","Lyr "),Pr(e,a+"\0");break}default:throw new Error("Invalid descriptor reference type: ".concat(i))}}return r}function pa(e){var t=Kt(e),r=Mn(e);return{name:t,classID:r}}function _1(e,t,r){Pr(e,t),In(e,r)}function dt(e,t){t===void 0&&(t=!1);var r=we(e);if(r!==16)throw new Error("Invalid descriptor version: ".concat(r));var n=g1(e,t);return n}function mt(e,t,r,n,a){a===void 0&&(a=""),Pe(e,16),y1(e,t,r,n,a)}function Fi(e){return{x:e.Hrzn,y:e.Vrtc}}function Ni(e){return{Hrzn:e.x,Vrtc:e.y}}function x1(e){return{top:Et(e["Top "]),left:Et(e.Left),right:Et(e.Rght),bottom:Et(e.Btom)}}function k1(e){var t;return t={Left:Nt(e.left,"bounds.left")},t["Top "]=Nt(e.top,"bounds.top"),t.Rght=Nt(e.right,"bounds.right"),t.Btom=Nt(e.bottom,"bounds.bottom"),t}function S1(e){var t={enabled:!!e.enab,position:so.decode(e.Styl),fillType:j1.decode(e.PntT),blendMode:wr.decode(e["Md "]),opacity:Ye(e.Opct),size:Et(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=Kr(e["Clr "])),e.Grad&&(t.gradient=I1(e)),e.Ptrn&&(t.pattern=z1(e)),t}function E1(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=so.encode(e.position),t.PntT=j1.encode(e.fillType),t["Md "]=wr.encode(e.blendMode),t.Opct=nr(e.opacity),t["Sz "]=Nt(e.size,"size"),e.color&&(t["Clr "]=Yr(e.color)),e.gradient&&(t=Tn(Tn({},t),F1(e.gradient))),e.pattern&&(t=Tn(Tn({},t),N1(e.pattern))),e.overprint!==void 0&&(t.overprint=!!e.overprint),t}function Oi(e,t,r){for(var n,a,i,o=r?{"Scl ":qr((n=e.scale)!==null&&n!==void 0?n:1),masterFXSwitch:!e.disabled}:{masterFXSwitch:!e.disabled,"Scl ":qr((a=e.scale)!==null&&a!==void 0?a:1)},s=["dropShadow","innerShadow","solidFill","gradientOverlay","stroke"],c=0,u=s;c<u.length;c++){var f=u[c];if(e[f]&&!Array.isArray(e[f]))throw new Error("".concat(f," should be an array"))}var h=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=zr(e.dropShadow[0],"dropShadow",t)),h(e.dropShadow)&&(o.dropShadowMulti=e.dropShadow.map(function(b){return zr(b,"dropShadow",t)})),d(e.innerShadow)&&(o.IrSh=zr(e.innerShadow[0],"innerShadow",t)),h(e.innerShadow)&&(o.innerShadowMulti=e.innerShadow.map(function(b){return zr(b,"innerShadow",t)})),e.outerGlow&&(o.OrGl=zr(e.outerGlow,"outerGlow",t)),h(e.solidFill)&&(o.solidFillMulti=e.solidFill.map(function(b){return zr(b,"solidFill",t)})),h(e.gradientOverlay)&&(o.gradientFillMulti=e.gradientOverlay.map(function(b){return zr(b,"gradientOverlay",t)})),h(e.stroke)&&(o.frameFXMulti=e.stroke.map(function(b){return E1(b)})),e.innerGlow&&(o.IrGl=zr(e.innerGlow,"innerGlow",t)),e.bevel&&(o.ebbl=zr(e.bevel,"bevel",t)),d(e.solidFill)&&(o.SoFi=zr(e.solidFill[0],"solidFill",t)),e.patternOverlay&&(o.patternFill=zr(e.patternOverlay,"patternOverlay",t)),d(e.gradientOverlay)&&(o.GrFl=zr(e.gradientOverlay[0],"gradientOverlay",t)),e.satin&&(o.ChFX=zr(e.satin,"satin",t)),d(e.stroke)&&(o.FrFX=E1((i=e.stroke)===null||i===void 0?void 0:i[0])),r){o.numModifyingFX=0;for(var p=0,w=Object.keys(e);p<w.length;p++){var f=w[p],m=e[f];if(Array.isArray(m))for(var _=0,y=m;_<y.length;_++){var g=y[_];g.enabled&&o.numModifyingFX++}else m.enabled&&o.numModifyingFX++}}return o}function Li(e,t){var r={},n=e.masterFXSwitch,a=e.DrSh,i=e.dropShadowMulti,o=e.IrSh,s=e.innerShadowMulti,c=e.OrGl,u=e.IrGl,f=e.ebbl,h=e.SoFi,d=e.solidFillMulti,p=e.patternFill,w=e.GrFl,m=e.gradientFillMulti,_=e.ChFX,y=e.FrFX,g=e.frameFXMulti;e.numModifyingFX;var b=ab(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=Ye(e["Scl "])),a&&(r.dropShadow=[Ir(a,t)]),i&&(r.dropShadow=i.map(function(v){return Ir(v,t)})),o&&(r.innerShadow=[Ir(o,t)]),s&&(r.innerShadow=s.map(function(v){return Ir(v,t)})),c&&(r.outerGlow=Ir(c,t)),u&&(r.innerGlow=Ir(u,t)),f&&(r.bevel=Ir(f,t)),h&&(r.solidFill=[Ir(h,t)]),d&&(r.solidFill=d.map(function(v){return Ir(v,t)})),p&&(r.patternOverlay=Ir(p,t)),w&&(r.gradientOverlay=[Ir(w,t)]),m&&(r.gradientOverlay=m.map(function(v){return Ir(v,t)})),_&&(r.satin=Ir(_,t)),y&&(r.stroke=[S1(y)]),g&&(r.stroke=g.map(function(v){return S1(v)})),t&&Object.keys(b).length>1&&console.log("Unhandled effect keys:",b),r}function C1(e,t){for(var r=[],n=0;n<e.length;n++){var a=e[n],i=a.time,o=i.denominator,s=i.numerator,c=a.selected,u=a.animKey,f={numerator:s,denominator:o},h=H1.decode(a.animInterpStyle);switch(u.Type){case"keyType.Opct":r.push({interpolation:h,time:f,selected:c,type:"opacity",value:Ye(u.Opct)});break;case"keyType.Pstn":r.push({interpolation:h,time:f,selected:c,type:"position",x:u.Hrzn,y:u.Vrtc});break;case"keyType.Trnf":r.push({interpolation:h,time:f,selected:c,type:"transform",scale:Fi(u["Scl "]),skew:Fi(u.Skew),rotation:u.rotation,translation:Fi(u.translation)});break;case"keyType.sheetStyle":{var d={interpolation:h,time:f,selected:c,type:"style"};u.sheetStyle.Lefx&&(d.style=Li(u.sheetStyle.Lefx,t)),r.push(d);break}case"keyType.globalLighting":{r.push({interpolation:h,time:f,selected:c,type:"globalLighting",globalAngle:u.gblA,globalAltitude:u.globalAltitude});break}default:throw new Error("Unsupported keyType value")}}return r}function D1(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,s=n.interpolation,c=H1.encode(s),u=void 0;switch(n.type){case"opacity":u={Type:"keyType.Opct",Opct:nr(n.value)};break;case"position":u={Type:"keyType.Pstn",Hrzn:n.x,Vrtc:n.y};break;case"transform":u={Type:"keyType.Trnf","Scl ":Ni(n.scale),Skew:Ni(n.skew),rotation:n.rotation,translation:Ni(n.translation)};break;case"style":u={Type:"keyType.sheetStyle",sheetStyle:{Vrsn:1,blendOptions:{}}},n.style&&(u.sheetStyle={Vrsn:1,Lefx:Oi(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:c,time:a,animKey:u,selected:o})}return t}function A1(e,t){for(var r=[],n=0;n<e.length;n++){var a=e[n],i={type:G1.decode(a.trackID),enabled:a.enab,keys:C1(a.keyList,t)};a.effectParams&&(i.effectParams={fillCanvas:a.effectParams.fillCanvas,zoomOrigin:a.effectParams.zoomOrigin,keys:C1(a.effectParams.keyList,t)}),r.push(i)}return r}function B1(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];t.push(Tn(Tn({trackID:G1.encode(n.type),Vrsn:1,enab:!!n.enabled,Effc:!!n.effectParams},n.effectParams?{effectParams:{keyList:D1(n.keys),fillCanvas:n.effectParams.fillCanvas,zoomOrigin:n.effectParams.zoomOrigin}}:{}),{keyList:D1(n.keys)}))}return t}function Ir(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=Kr(o);break;case"hglC":r.highlightColor=Kr(o);break;case"sdwC":r.shadowColor=Kr(o);break;case"Styl":r.position=so.decode(o);break;case"Md ":r.blendMode=wr.decode(o);break;case"hglM":r.highlightBlendMode=wr.decode(o);break;case"sdwM":r.shadowBlendMode=wr.decode(o);break;case"bvlS":r.style=P1.decode(o);break;case"bvlD":r.direction=V1.decode(o);break;case"bvlT":r.technique=R1.decode(o);break;case"GlwT":r.technique=$1.decode(o);break;case"glwS":r.source=U1.decode(o);break;case"Type":r.type=oo.decode(o);break;case"gs99":r.interpolationMethod=Xa.decode(o);break;case"Opct":r.opacity=Ye(o);break;case"hglO":r.highlightOpacity=Ye(o);break;case"sdwO":r.shadowOpacity=Ye(o);break;case"lagl":r.angle=Kn(o);break;case"Angl":r.angle=Kn(o);break;case"Lald":r.altitude=Kn(o);break;case"Sftn":r.soften=Et(o);break;case"srgR":r.strength=Ye(o);break;case"blur":r.size=Et(o);break;case"Nose":r.noise=Ye(o);break;case"Inpr":r.range=Ye(o);break;case"Ckmt":r.choke=Et(o);break;case"ShdN":r.jitter=Ye(o);break;case"Dstn":r.distance=Et(o);break;case"Scl ":r.scale=Ye(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:Ye(o.Hrzn),y:Ye(o.Vrtc)};break;case"MpgS":case"TrnS":r.contour={name:o["Nm "],curve:o["Crv "].map(function(s){return{x:s.Hrzn,y:s.Vrtc}})};break;case"Grad":r.gradient=T1(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 zr(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],s=o,c=e[s];switch(s){case"enabled":n.enab=!!c;break;case"useGlobalLight":n.uglg=!!c;break;case"antialiased":n.AntA=!!c;break;case"align":n.Algn=!!c;break;case"dither":n.Dthr=!!c;break;case"invert":n.Invr=!!c;break;case"reverse":n.Rvrs=!!c;break;case"color":n["Clr "]=Yr(c);break;case"highlightColor":n.hglC=Yr(c);break;case"shadowColor":n.sdwC=Yr(c);break;case"position":n.Styl=so.encode(c);break;case"blendMode":n["Md "]=wr.encode(c);break;case"highlightBlendMode":n.hglM=wr.encode(c);break;case"shadowBlendMode":n.sdwM=wr.encode(c);break;case"style":n.bvlS=P1.encode(c);break;case"direction":n.bvlD=V1.encode(c);break;case"technique":t==="bevel"?n.bvlT=R1.encode(c):n.GlwT=$1.encode(c);break;case"source":n.glwS=U1.encode(c);break;case"type":n.Type=oo.encode(c);break;case"interpolationMethod":n.gs99=Xa.encode(c);break;case"opacity":n.Opct=nr(c);break;case"highlightOpacity":n.hglO=nr(c);break;case"shadowOpacity":n.sdwO=nr(c);break;case"angle":t==="gradientOverlay"||t==="patternFill"?n.Angl=Vi(c):n.lagl=Vi(c);break;case"altitude":n.Lald=Vi(c);break;case"soften":n.Sftn=Nt(c,s);break;case"strength":n.srgR=nr(c);break;case"size":n.blur=Nt(c,s);break;case"noise":n.Nose=nr(c);break;case"range":n.Inpr=nr(c);break;case"choke":n.Ckmt=Nt(c,s);break;case"jitter":n.ShdN=nr(c);break;case"distance":n.Dstn=Nt(c,s);break;case"scale":n["Scl "]=nr(c);break;case"pattern":n.Ptrn={"Nm ":c.name,Idnt:c.id};break;case"phase":n.phase={Hrzn:c.x,Vrtc:c.y};break;case"offset":n.Ofst={Hrzn:nr(c.x),Vrtc:nr(c.y)};break;case"contour":{n[t==="satin"?"MpgS":"TrnS"]={"Nm ":c.name,"Crv ":c.curve.map(function(u){return{Hrzn:u.x,Vrtc:u.y}})};break}case"gradient":n.Grad=M1(c);break;case"useTexture":case"useShape":case"layerConceals":case"present":case"showInDialog":case"antialiasGloss":n[s]=c;break;default:r&&console.log("Invalid effect key: '".concat(s,"', value:"),c)}}return n}function T1(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:Kr(r["Clr "]),location:r.Lctn/t,midpoint:r.Mdpn/100}}),opacityStops:e.Trns.map(function(r){return{opacity:Ye(r.Opct),location:r.Lctn/t,midpoint:r.Mdpn/100}})}}else return{type:"noise",name:e["Nm "],roughness:e.Smth/4096,colorModel:lo.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 M1(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 ":Yr(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:nr(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:lo.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 I1(e){var t=T1(e.Grad);return t.style=oo.decode(e.Type),e.Dthr!==void 0&&(t.dither=e.Dthr),e.gradientsInterpolationMethod!==void 0&&(t.interpolationMethod=Xa.decode(e.gradientsInterpolationMethod)),e.Rvrs!==void 0&&(t.reverse=e.Rvrs),e.Angl!==void 0&&(t.angle=Kn(e.Angl)),e["Scl "]!==void 0&&(t.scale=Ye(e["Scl "])),e.Algn!==void 0&&(t.align=e.Algn),e.Ofst!==void 0&&(t.offset={x:Ye(e.Ofst.Hrzn),y:Ye(e.Ofst.Vrtc)}),t}function z1(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 Pi(e){if("Grad"in e)return I1(e);if("Ptrn"in e)return Tn({type:"pattern"},z1(e));if("Clr "in e)return{type:"color",color:Kr(e["Clr "])};throw new Error("Invalid vector content")}function F1(e){var t={};return e.dither!==void 0&&(t.Dthr=e.dither),e.interpolationMethod!==void 0&&(t.gradientsInterpolationMethod=Xa.encode(e.interpolationMethod)),e.reverse!==void 0&&(t.Rvrs=e.reverse),e.angle!==void 0&&(t.Angl=Vi(e.angle)),t.Type=oo.encode(e.style),e.align!==void 0&&(t.Algn=e.align),e.scale!==void 0&&(t["Scl "]=nr(e.scale)),e.offset&&(t.Ofst={Hrzn:nr(e.offset.x),Vrtc:nr(e.offset.y)}),t.Grad=M1(e),t}function N1(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 Ri(e){return e.type==="color"?{key:"SoCo",descriptor:{"Clr ":Yr(e.color)}}:e.type==="pattern"?{key:"PtFl",descriptor:N1(e)}:{key:"GdFl",descriptor:F1(e)}}function Kr(e){if("H "in e)return{h:fb(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 Yr(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 ":Vi(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 Kn(e){if(e===void 0)return 0;if(e.units!=="Angle")throw new Error("Invalid units: ".concat(e.units));return e.value}function Ye(e){if(e===void 0)return 1;if(e.units!=="Percent")throw new Error("Invalid units: ".concat(e.units));return e.value/100}function fb(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 Et(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 Yn(e,t){return t===void 0&&(t="Pixels"),typeof e=="number"?{value:e,units:t}:Et(e)}function io(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 Vi(e){return{units:"Angle",value:e||0}}function nr(e){return{units:"Percent",value:Math.round((e||0)*100)}}function qr(e){return{units:"Percent",value:(e||0)*100}}function Nt(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 br(e){var t=e.numerator,r=e.denominator;return{numerator:t,denominator:r}}var O1=rt("textGridding","none",{none:"None",round:"Rnd "}),$i=rt("Ornt","horizontal",{horizontal:"Hrzn",vertical:"Vrtc"}),L1=rt("Annt","sharp",{none:"Anno",sharp:"antiAliasSharp",crisp:"AnCr",strong:"AnSt",smooth:"AnSm",platform:"antiAliasPlatformGray",platformLCD:"antiAliasPlatformLCD"}),xs=rt("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"}),wr=rt("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"}),P1=rt("BESl","inner bevel",{"inner bevel":"InrB","outer bevel":"OtrB",emboss:"Embs","pillow emboss":"PlEb","stroke emboss":"strokeEmboss"}),R1=rt("bvlT","smooth",{smooth:"SfBL","chisel hard":"PrBL","chisel soft":"Slmt"}),V1=rt("BESs","up",{up:"In ",down:"Out "}),$1=rt("BETE","softer",{softer:"SfBL",precise:"PrBL"}),U1=rt("IGSr","edge",{edge:"SrcE",center:"SrcC"}),oo=rt("GrdT","linear",{linear:"Lnr ",radial:"Rdl ",angle:"Angl",reflected:"Rflc",diamond:"Dmnd"}),H1=rt("animInterpStyle","linear",{linear:"Lnr ",hold:"hold"}),G1=rt("stdTrackID","opacity",{opacity:"opacityTrack",style:"styleTrack",sheetTransform:"sheetTransformTrack",sheetPosition:"sheetPositionTrack",globalLighting:"globalLightingTrack"}),Xa=rt("gradientInterpolationMethodType","perceptual",{perceptual:"Perc",linear:"Lnr ",classic:"Gcls",smooth:"Smoo"}),lo=rt("ClrS","rgb",{rgb:"RGBC",hsb:"HSBl",lab:"LbCl",hsl:"HSLC"}),so=rt("FStl","outside",{outside:"OutF",center:"CtrF",inside:"InsF"}),j1=rt("FrFl","color",{color:"SClr",gradient:"GrFl",pattern:"Ptrn"}),q1=rt("ESliceType","image",{image:"Img ",noImage:"noImage"}),W1=rt("ESliceHorzAlign","default",{default:"default"}),X1=rt("ESliceVertAlign","default",{default:"default"}),Z1=rt("ESliceOrigin","userGenerated",{userGenerated:"userGenerated",autoGenerated:"autoGenerated",layer:"layer"}),K1=rt("ESliceBGColorType","none",{none:"None",matte:"matte",color:"Clr "}),Y1=rt("strokeStyleLineCapType","butt",{butt:"strokeStyleButtCap",round:"strokeStyleRoundCap",square:"strokeStyleSquareCap"}),J1=rt("strokeStyleLineJoinType","miter",{miter:"strokeStyleMiterJoin",round:"strokeStyleRoundJoin",bevel:"strokeStyleBevelJoin"}),Q1=rt("strokeStyleLineAlignment","inside",{inside:"strokeStyleAlignInside",center:"strokeStyleAlignCenter",outside:"strokeStyleAlignOutside"}),eh=rt("BlrM","ispinmage",{spin:"Spn ",zoom:"Zm "}),th=rt("BlrQ","good",{draft:"Drft",good:"Gd ",best:"Bst "}),rh=rt("SmBM","normal",{normal:"SBMN","edge only":"SBME","overlay edge":"SBMO"}),nh=rt("SmBQ","medium",{low:"SBQL",medium:"SBQM",high:"SBQH"}),ah=rt("DspM","stretch to fit",{"stretch to fit":"StrF",tile:"Tile"}),Za=rt("UndA","repeat edge pixels",{"wrap around":"WrpA","repeat edge pixels":"RptE"}),ih=rt("Cnvr","rectangular to polar",{"rectangular to polar":"RctP","polar to rectangular":"PlrR"}),oh=rt("RplS","medium",{small:"Sml ",medium:"Mdm ",large:"Lrg "}),lh=rt("SphM","normal",{normal:"Nrml","horizontal only":"HrzO","vertical only":"VrtO"}),sh=rt("Wvtp","sine",{sine:"WvSn",triangle:"WvTr",square:"WvSq"}),ch=rt("ZZTy","pond ripples",{"around center":"ArnC","out from center":"OtFr","pond ripples":"PndR"}),uh=rt("Dstr","uniform",{uniform:"Unfr",gaussian:"Gsn "}),Ui=rt("Chnl","composite",{red:"Rd ",green:"Grn ",blue:"Bl ",composite:"Cmps"}),fh=rt("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"}),dh=rt("Lns ","50-300mm zoom",{"50-300mm zoom":"Zm ","32mm prime":"Nkn ","105mm prime":"Nkn1","movie prime":"PnVs"}),hh=rt("blurType","gaussian blur",{"gaussian blur":"GsnB","lens blur":"lensBlur","motion blur":"MtnB"}),ph=rt("DfsM","normal",{normal:"Nrml","darken only":"DrkO","lighten only":"LghO",anisotropic:"anisotropic"}),mh=rt("ExtT","blocks",{blocks:"Blks",pyramids:"Pyrm"}),vh=rt("ExtR","random",{random:"Rndm","level-based":"LvlB"}),gh=rt("FlCl","background color",{"background color":"FlBc","foreground color":"FlFr","inverse image":"FlIn","unaltered image":"FlSm"}),yh=rt("CntE","upper",{lower:"Lwr ",upper:"Upr "}),bh=rt("WndM","wind",{wind:"Wnd ",blast:"Blst",stagger:"Stgr"}),wh=rt("Drct","from the right",{left:"Left",right:"Rght"}),_h=rt("IntE","odd lines",{"odd lines":"ElmO","even lines":"ElmE"}),xh=rt("IntC","interpolation",{duplication:"CrtD",interpolation:"CrtI"}),kh=rt("FlMd","wrap around",{"set to transparent":"Bckg","repeat edge pixels":"Rpt ","wrap around":"Wrp "});rt("prjM","fisheye",{fisheye:"fisP",perspective:"perP",auto:"auto","full spherical":"fusP"});var Sh=rt("presetKindType","presetKindCustom",{custom:"presetKindCustom",default:"presetKindDefault"}),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)},Eh=[],Ch={};function _t(e,t,r,n){var a={key:e,has:t,read:r,write:n};Eh.push(a),Ch[a.key]=a}var co=[void 0,"PPI","PPCM"],uo=[void 0,"Inches","Centimeters","Points","Picas","Columns"],Dh="0123456789abcdef";function Ah(e){return e<=57?e-48:e-87}function db(e,t){return Ah(e.charCodeAt(t))<<4|Ah(e.charCodeAt(t+1))}function ks(e,t){var r=jt(e,t);return l1(r)}function Ss(e,t){var r=o1(t);nn(e,r)}function hb(e){for(var t=Le(e),r=jt(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 l1(r)}function pb(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=o1(r);ze(e,i.byteLength),nn(e,i)}_t(1061,function(e){return e.captionDigest!==void 0},function(e,t){for(var r="",n=0;n<16;n++){var a=Le(e);r+=Dh[a>>4],r+=Dh[a&15]}t.captionDigest=r},function(e,t){for(var r=0;r<16;r++)ze(e,db(t.captionDigest,r*2))}),_t(1060,function(e){return e.xmpMetadata!==void 0},function(e,t,r){t.xmpMetadata=ks(e,r())},function(e,t){Ss(e,t.xmpMetadata)});var fo=rt("Inte","perceptual",{perceptual:"Img ",saturation:"Grp ","relative colorimetric":"Clrm","absolute colorimetric":"AClr"});_t(1082,function(e){return e.printInformation!==void 0},function(e,t){var r,n,a=dt(e);t.printInformation={printerName:a.printerName||"",renderingIntent:fo.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:fo.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=fo.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:fo.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"},mt(e,"","printOutput",i)}),_t(1005,function(e){return e.resolutionInfo!==void 0},function(e,t){var r=Fr(e),n=Fe(e),a=Fe(e),i=Fr(e),o=Fe(e),s=Fe(e);t.resolutionInfo={horizontalResolution:r,horizontalResolutionUnit:co[n]||"PPI",widthUnit:uo[a]||"Inches",verticalResolution:i,verticalResolutionUnit:co[o]||"PPI",heightUnit:uo[s]||"Inches"}},function(e,t){var r=t.resolutionInfo;Lr(e,r.horizontalResolution||0),xe(e,Math.max(1,co.indexOf(r.horizontalResolutionUnit))),xe(e,Math.max(1,uo.indexOf(r.widthUnit))),Lr(e,r.verticalResolution||0),xe(e,Math.max(1,co.indexOf(r.verticalResolutionUnit))),xe(e,Math.max(1,uo.indexOf(r.heightUnit)))});var Bh=["centered","size to fit","user defined"];_t(1062,function(e){return e.printScale!==void 0},function(e,t){t.printScale={style:Bh[ct(e)],x:Jr(e),y:Jr(e),scale:Jr(e)}},function(e,t){var r=t.printScale,n=r.style,a=r.x,i=r.y,o=r.scale;xt(e,Math.max(0,Bh.indexOf(n))),tn(e,a||0),tn(e,i||0),tn(e,o||0)}),_t(1006,function(e){return e.alphaChannelNames!==void 0},function(e,t,r){if(t.alphaChannelNames)$e(e,r());else for(t.alphaChannelNames=[];r()>0;){var n=hb(e);t.alphaChannelNames.push(n)}},function(e,t){for(var r=0,n=t.alphaChannelNames;r<n.length;r++){var a=n[r];pb(e,a)}}),_t(1045,function(e){return e.alphaChannelNames!==void 0},function(e,t,r){for(t.alphaChannelNames=[];r()>0;)t.alphaChannelNames.push(Kt(e))},function(e,t){for(var r=0,n=t.alphaChannelNames;r<n.length;r++){var a=n[r];ga(e,a)}}),_t(1053,function(e){return e.alphaIdentifiers!==void 0},function(e,t,r){for(t.alphaIdentifiers=[];r()>=4;)t.alphaIdentifiers.push(we(e))},function(e,t){for(var r=0,n=t.alphaIdentifiers;r<n.length;r++){var a=n[r];Pe(e,a)}}),_t(1010,function(e){return e.backgroundColor!==void 0},function(e,t){return t.backgroundColor=ar(e)},function(e,t){return ir(e,t.backgroundColor)}),_t(1037,function(e){return e.globalAngle!==void 0},function(e,t){return t.globalAngle=qe(e)},function(e,t){return Je(e,t.globalAngle)}),_t(1049,function(e){return e.globalAltitude!==void 0},function(e,t){return t.globalAltitude=we(e)},function(e,t){return Pe(e,t.globalAltitude)}),_t(1011,function(e){return e.printFlags!==void 0},function(e,t){t.printFlags={labels:!!Le(e),cropMarks:!!Le(e),colorBars:!!Le(e),registrationMarks:!!Le(e),negative:!!Le(e),flip:!!Le(e),interpolate:!!Le(e),caption:!!Le(e),printFlags:!!Le(e)}},function(e,t){var r=t.printFlags;ze(e,r.labels?1:0),ze(e,r.cropMarks?1:0),ze(e,r.colorBars?1:0),ze(e,r.registrationMarks?1:0),ze(e,r.negative?1:0),ze(e,r.flip?1:0),ze(e,r.interpolate?1:0),ze(e,r.caption?1:0),ze(e,r.printFlags?1:0)}),_t(1034,function(e){return e.copyrighted!==void 0},function(e,t){t.copyrighted=!!Le(e)},function(e,t){ze(e,t.copyrighted?1:0)}),_t(1035,function(e){return e.url!==void 0},function(e,t,r){t.url=vo(e,r())},function(e,t){o9(e,t.url)}),_t(1080,function(e){return e.countInformation!==void 0},function(e,t){var r=dt(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}})}})};mt(e,"","Cnt ",r)}),_t(1024,function(e){return e.layerState!==void 0},function(e,t){return t.layerState=Fe(e)},function(e,t){return xe(e,t.layerState)}),_t(1026,function(e){return e.layersGroup!==void 0},function(e,t,r){for(t.layersGroup=[];r()>0;)t.layersGroup.push(Fe(e))},function(e,t){for(var r=0,n=t.layersGroup;r<n.length;r++){var a=n[r];xe(e,a)}}),_t(1072,function(e){return e.layerGroupsEnabledId!==void 0},function(e,t,r){for(t.layerGroupsEnabledId=[];r()>0;)t.layerGroupsEnabledId.push(Le(e))},function(e,t){for(var r=0,n=t.layerGroupsEnabledId;r<n.length;r++){var a=n[r];ze(e,a)}}),_t(1069,function(e){return e.layerSelectionIds!==void 0},function(e,t){var r=Fe(e);for(t.layerSelectionIds=[];r--;)t.layerSelectionIds.push(we(e))},function(e,t){xe(e,t.layerSelectionIds.length);for(var r=0,n=t.layerSelectionIds;r<n.length;r++){var a=n[r];Pe(e,a)}}),_t(1032,function(e){return e.gridAndGuidesInformation!==void 0},function(e,t){var r=we(e),n=we(e),a=we(e),i=we(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:we(e)/32,direction:Le(e)?"horizontal":"vertical"})},function(e,t){var r=t.gridAndGuidesInformation,n=r.grid||{horizontal:18*32,vertical:18*32},a=r.guides||[];Pe(e,1),Pe(e,n.horizontal),Pe(e,n.vertical),Pe(e,a.length);for(var i=0,o=a;i<o.length;i++){var s=o[i];Pe(e,s.location*32),ze(e,s.direction==="horizontal"?1:0)}}),_t(1065,function(e){return e.layerComps!==void 0},function(e,t){var r=dt(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],s={};s._classID="Comp",s["Nm "]=o.name,"comment"in o&&(s.comment=o.comment),s.compID=o.id,s.capturedInfo=o.capturedInfo,n.list.push(s)}"lastApplied"in r&&(n.lastAppliedComp=r.lastApplied),mt(e,"","CompList",n)});var Th=["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"];_t(1078,function(e){return e.onionSkins!==void 0},function(e,t){var r=dt(e);t.onionSkins={enabled:r.enab,framesBefore:r.numBefore,framesAfter:r.numAfter,frameSpacing:r.Spcn,minOpacity:r.minOpacity/100,maxOpacity:r.maxOpacity/100,blendMode:Th[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,Th.indexOf(r.blendMode))};mt(e,"","null",n)}),_t(1075,function(e){return e.timelineInformation!==void 0},function(e,t){var r,n,a=dt(e);t.timelineInformation={enabled:a.enab,frameStep:br(a.frameStep),frameRate:a.frameRate,time:br(a.time),duration:br(a.duration),workInTime:br(a.workInTime),workOutTime:br(a.workOutTime),repeats:a.LCnt,hasMotion:a.hasMotion,globalTracks:A1(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 s=o.clipID,c=o.timeScope,u=o.muted,f=o.audioLevel,h=o.frameReader;return{id:s,start:br(c.Strt),duration:br(c.duration),inTime:br(c.inTime),outTime:br(c.outTime),muted:u,audioLevel:f,frameReader:{type:h.frameReaderType,mediaDescriptor:h.mediaDescriptor,link:{name:h["Lnk "]["Nm "],fullPath:h["Lnk "].fullPath,relativePath:h["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:B1(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};mt(e,"","null",a,"anim")}),_t(1076,function(e){return e.sheetDisclosure!==void 0},function(e,t){var r=dt(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}})),mt(e,"","null",n)}),_t(1054,function(e){return e.urlsList!==void 0},function(e,t){var r=we(e);t.urlsList=[];for(var n=0;n<r;n++){var a=Mt(e);if(a!=="slic"&&e.throwForMissingFeatures)throw new Error("Unknown long");var i=we(e),o=Kt(e);t.urlsList.push({id:i,url:o,ref:"slice"})}},function(e,t){var r=t.urlsList;Pe(e,r.length);for(var n=0;n<r.length;n++)et(e,"slic"),Pe(e,r[n].id),Pr(e,r[n].url)});function Mh(e){return{"Top ":e.top,Left:e.left,Btom:e.bottom,Rght:e.right}}function Ih(e){return{top:e["Top "],left:e.Left,bottom:e.Btom,right:e.Rght}}function ho(e,t){return e[Math.max(0,Math.min(e.length-1,t))]}var zh=["autoGenerated","layer","userGenerated"],Fh=["noImage","image"],po=["default"];_t(1050,function(e){return e.slices?e.slices.length:0},function(e,t){var r=we(e);if(r===6){t.slices||(t.slices=[]);var n=qe(e),a=qe(e),i=qe(e),o=qe(e),s=Kt(e),c=we(e);t.slices.push({bounds:{top:n,left:a,bottom:i,right:o},groupName:s,slices:[]});for(var u=t.slices[t.slices.length-1].slices,f=0;f<c;f++){var h=we(e),d=we(e),p=ho(zh,we(e)),w=p=="layer"?we(e):0,m=Kt(e),_=ho(Fh,we(e)),y=qe(e),g=qe(e),b=qe(e),v=qe(e),E=Kt(e),C=Kt(e),A=Kt(e),k=Kt(e),B=!!Le(e),T=Kt(e),F=ho(po,we(e)),V=ho(po,we(e)),L=Le(e),H=Le(e),X=Le(e),W=Le(e),Z=L+H+X+W===0?"none":L===0?"matte":"color";u.push({id:h,groupId:d,origin:p,associatedLayerId:w,name:m,target:C,message:A,altTag:k,cellTextIsHTML:B,cellText:T,horizontalAlignment:F,verticalAlignment:V,type:_,url:E,bounds:{top:g,left:y,bottom:v,right:b},backgroundColorType:Z,backgroundColor:{r:H,g:X,b:W,a:L}})}var Q=dt(e);Q.slices.forEach(function(K){var ue=u.find(function(ne){return K.sliceID==ne.id});ue&&(ue.topOutset=K.topOutset,ue.leftOutset=K.leftOutset,ue.bottomOutset=K.bottomOutset,ue.rightOutset=K.rightOutset)})}else if(r===7||r===8){var Q=dt(e);t.slices||(t.slices=[]),t.slices.push({groupName:Q.baseName,bounds:Ih(Q.bounds),slices:Q.slices.map(function(ue){return Ka(Ka({},ue["Nm "]?{name:ue["Nm "]}:{}),{id:ue.sliceID,groupId:ue.groupID,associatedLayerId:0,origin:Z1.decode(ue.origin),type:q1.decode(ue.Type),bounds:Ih(ue.bounds),url:ue.url,target:ue.null,message:ue.Msge,altTag:ue.altTag,cellTextIsHTML:ue.cellTextIsHTML,cellText:ue.cellText,horizontalAlignment:W1.decode(ue.horzAlign),verticalAlignment:X1.decode(ue.vertAlign),backgroundColorType:K1.decode(ue.bgColorType),backgroundColor:ue.bgColor?{r:ue.bgColor["Rd "],g:ue.bgColor["Grn "],b:ue.bgColor["Bl "],a:ue.bgColor.alpha}:{r:0,g:0,b:0,a:0},topOutset:ue.topOutset||0,leftOutset:ue.leftOutset||0,bottomOutset:ue.bottomOutset||0,rightOutset:ue.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;Pe(e,6),Je(e,a.top),Je(e,a.left),Je(e,a.bottom),Je(e,a.right),Pr(e,i),Pe(e,o.length);for(var s=0;s<o.length;s++){var c=o[s],u=c.backgroundColor,f=u.a,h=u.r,d=u.g,p=u.b;c.backgroundColorType==="none"?f=h=d=p=0:c.backgroundColorType==="matte"&&(f=0,h=d=p=255),Pe(e,c.id),Pe(e,c.groupId),Pe(e,zh.indexOf(c.origin)),c.origin==="layer"&&Pe(e,c.associatedLayerId),Pr(e,c.name||""),Pe(e,Fh.indexOf(c.type)),Je(e,c.bounds.left),Je(e,c.bounds.top),Je(e,c.bounds.right),Je(e,c.bounds.bottom),Pr(e,c.url),Pr(e,c.target),Pr(e,c.message),Pr(e,c.altTag),ze(e,c.cellTextIsHTML?1:0),Pr(e,c.cellText),Pe(e,po.indexOf(c.horizontalAlignment)),Pe(e,po.indexOf(c.verticalAlignment)),ze(e,f),ze(e,h),ze(e,d),ze(e,p)}var w={bounds:Mh(a),slices:[]};o.forEach(function(m){var _=Ka(Ka({sliceID:m.id,groupID:m.groupId,origin:Z1.encode(m.origin),Type:q1.encode(m.type),bounds:Mh(m.bounds)},m.name?{"Nm ":m.name}:{}),{url:m.url,null:m.target,Msge:m.message,altTag:m.altTag,cellTextIsHTML:m.cellTextIsHTML,cellText:m.cellText,horzAlign:W1.encode(m.horizontalAlignment),vertAlign:X1.encode(m.verticalAlignment),bgColorType:K1.encode(m.backgroundColorType)});if(m.backgroundColorType==="color"){var y=m.backgroundColor,g=y.r,b=y.g,v=y.b,E=y.a;_.bgColor={"Rd ":g,"Grn ":b,"Bl ":v,alpha:E}}_.topOutset=m.topOutset||0,_.leftOutset=m.leftOutset||0,_.bottomOutset=m.bottomOutset||0,_.rightOutset=m.rightOutset||0,w.slices.push(_)}),mt(e,"","null",w,"slices")}),_t(1064,function(e){return e.pixelAspectRatio!==void 0},function(e,t){if(we(e)>2)throw new Error("Invalid pixelAspectRatio version");t.pixelAspectRatio={aspect:Wr(e)}},function(e,t){Pe(e,2),Xr(e,t.pixelAspectRatio.aspect)}),_t(1041,function(e){return e.iccUntaggedProfile!==void 0},function(e,t){t.iccUntaggedProfile=!!Le(e)},function(e,t){ze(e,t.iccUntaggedProfile?1:0)}),_t(1044,function(e){return e.idsSeedNumber!==void 0},function(e,t){return t.idsSeedNumber=we(e)},function(e,t){return Pe(e,t.idsSeedNumber)}),_t(1036,function(e){return e.thumbnail!==void 0||e.thumbnailRaw!==void 0},function(e,t,r){var n=we(e),a=we(e),i=we(e);we(e),we(e),we(e);var o=Fe(e),s=Fe(e);if(n!==1||o!==24||s!==1){e.logMissingFeatures&&e.log("Invalid thumbnail data (format: ".concat(n,", bitsPerPixel: ").concat(o,", planes: ").concat(s,")")),$e(e,r());return}var c=r(),u=jt(e,c);e.useRawThumbnail?t.thumbnailRaw={width:a,height:i,data:u}:u.byteLength&&(t.thumbnail=qy(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=n1(o),n=t.thumbnail.width,a=t.thumbnail.height)}catch{}var s=24,c=Math.floor((n*s+31)/32)*4,u=1,f=c*a*u,h=i.length;Pe(e,1),Pe(e,n),Pe(e,a),Pe(e,c),Pe(e,f),Pe(e,h),xe(e,s),xe(e,u),nn(e,i)}),_t(1057,function(e){return e.versionInfo!==void 0},function(e,t,r){var n=we(e);if(n!==1)throw new Error("Invalid versionInfo version");t.versionInfo={hasRealMergedData:!!Le(e),writerName:Kt(e),readerName:Kt(e),fileVersion:we(e)},$e(e,r())},function(e,t){var r=t.versionInfo;Pe(e,1),ze(e,r.hasRealMergedData?1:0),Pr(e,r.writerName),Pr(e,r.readerName),Pe(e,r.fileVersion)}),_t(7e3,function(e){return e.imageReadyVariables!==void 0},function(e,t,r){t.imageReadyVariables=ks(e,r())},function(e,t){Ss(e,t.imageReadyVariables)}),_t(7001,function(e){return e.imageReadyDataSets!==void 0},function(e,t,r){t.imageReadyDataSets=ks(e,r())},function(e,t){Ss(e,t.imageReadyDataSets)}),_t(1088,function(e){return e.pathSelectionState!==void 0},function(e,t,r){var n=dt(e);t.pathSelectionState=n.null},function(e,t){var r={null:t.pathSelectionState};mt(e,"","null",r)});var Nh=rt("FrmD","",{auto:"Auto",none:"None",dispose:"Disp"});_t(4e3,function(e){return e.animations!==void 0},function(e,t,r){var n=Mt(e);if(n==="mani")gn(e,"IRFR"),Nr(e,1,function(i){for(var o=function(){gn(e,"8BIM");var s=Mt(e);Nr(e,1,function(c){if(s==="AnDs"){var u=dt(e);t.animations={frames:u.FrIn.map(function(h){return{id:h.FrID,delay:(h.FrDl||0)/100,dispose:h.FrDs?Nh.decode(h.FrDs):"auto"}}),animations:u.FSts.map(function(h){return{id:h.FsID,frames:h.FsFr,repeats:h.LCnt,activeFrame:h.AFrm||0}})}}else if(s==="Roll"){var f=jt(e,c());e.logDevFeatures&&e.log("#4000 Roll",f)}else e.logMissingFeatures&&e.log("Unhandled subsection in #4000",s)})};i()>0;)o()});else if(n==="mopt"){var a=jt(e,r());e.logDevFeatures&&e.log("#4000 mopt",a)}else e.logMissingFeatures&&e.log("Unhandled key in #4000:",n)},function(e,t){t.animations&&(et(e,"mani"),et(e,"IRFR"),sr(e,1,function(){et(e,"8BIM"),et(e,"AnDs"),sr(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=Nh.encode(a.dispose),r.FrIn.push(i)}for(var n=0;n<t.animations.animations.length;n++){var o=t.animations.animations[n],s={FsID:o.id,AFrm:o.activeFrame|0,FsFr:o.frames,LCnt:o.repeats|0};r.FSts.push(s)}mt(e,"","null",r)})}))});var mb=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},Oh=[0,1,3,2],vb=["bitmap","grayscale","indexed","RGB","CMYK","multichannel","duotone","lab"];function mo(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 Ya(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 Es(e,t){if(e.strict)throw new Error(t);e.debug&&e.log(t)}function Le(e){return e.offset+=1,e.view.getUint8(e.offset-1)}function gb(e){return e.view.getUint8(e.offset)}function ct(e){return e.offset+=2,e.view.getInt16(e.offset-2,!1)}function Fe(e){return e.offset+=2,e.view.getUint16(e.offset-2,!1)}function yb(e){return e.offset+=2,e.view.getUint16(e.offset-2,!0)}function qe(e){return e.offset+=4,e.view.getInt32(e.offset-4,!1)}function Lh(e){return e.offset+=4,e.view.getInt32(e.offset-4,!0)}function we(e){return e.offset+=4,e.view.getUint32(e.offset-4,!1)}function Jr(e){return e.offset+=4,e.view.getFloat32(e.offset-4,!1)}function Wr(e){return e.offset+=8,e.view.getFloat64(e.offset-8,!1)}function Fr(e){return qe(e)/65536}function Qr(e){return qe(e)/(1<<24)}function jt(e,t){var r=e.view.byteOffset+e.offset;if(e.offset+=t,r+t>e.view.buffer.byteLength){if(Es(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 Mt(e){return Ph(e,4)}function bb(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 en(e,t){for(var r=Le(e),n=r?Ph(e,r):"";++r%t;)e.offset++;return n}function Kt(e){var t=we(e);return Cs(e,t)}function Cs(e,t){for(var r="";t--;){var n=Fe(e);(n||t>0)&&(r+=String.fromCharCode(n))}return r}function wb(e,t){for(var r="";t--;){var n=yb(e);(n||t>0)&&(r+=String.fromCharCode(n))}return r}function vo(e,t){for(var r="";t--;)r+=String.fromCharCode(Le(e));return r}function $e(e,t){e.offset+=t}function gn(e,t,r){var n=e.offset,a=Mt(e);if(a!==t&&a!==r)throw new Error("Invalid signature: '".concat(a,"' at 0x").concat(n.toString(16)))}function Ph(e,t){for(var r=jt(e,t),n="",a=0;a<r.length;a++)n+=String.fromCharCode(r[a]);return n}function _b(e){return e==="8BIM"||e==="MeSa"||e==="AgHg"||e==="PHUT"||e==="DCSR"}function xb(e,t){var r;t===void 0&&(t={}),gn(e,"8BPS");var n=Fe(e);if(n!==1&&n!==2)throw new Error("Invalid PSD file version: ".concat(n));$e(e,6);var a=Fe(e),i=we(e),o=we(e),s=Fe(e),c=Fe(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(s))throw new Error("Invalid bitsPerChannel: ".concat(s));if(Oh.indexOf(c)===-1)throw new Error("Color mode not supported: ".concat((r=vb[c])!==null&&r!==void 0?r:c));var f={width:o,height:i,channels:a,bitsPerChannel:s,colorMode:c};Object.assign(e,t),e.large=n===2,e.globalAlpha=!1,Nr(e,1,function(m){if(m()){if(c===2){if(m()!=768)throw new Error("Invalid color palette size");f.palette=[];for(var _=0;_<256;_++)f.palette.push({r:Le(e),g:0,b:0});for(var _=0;_<256;_++)f.palette[_].g=Le(e);for(var _=0;_<256;_++)f.palette[_].b=Le(e)}$e(e,m())}});var h={};Nr(e,1,function(m){for(var _=function(){Uh(e,_b);var y=Fe(e);en(e,2),Nr(e,2,function(g){var b=Ch[y],v=y===1036&&!!e.skipThumbnail;if(b&&!v)try{b.read(e,h,g)}catch(E){if(e.throwForMissingFeatures)throw E;$e(e,g())}else $e(e,g())})};m()>0;)_()}),h.layersGroup,h.layerGroupsEnabledId;var d=mb(h,["layersGroup","layerGroupsEnabledId"]);Object.keys(d)&&(f.imageResources=d),Nr(e,1,function(m){if(Nr(e,2,function(y){Ds(e,f,h),$e(e,y())},void 0,e.large),m()>0){var _=Db(e);_&&(f.globalLayerMaskInfo=_)}else $e(e,m());for(;m()>0;){for(;m()&&gb(e)===0;)$e(e,1);m()>=12?Hh(e,f,f,h):$e(e,m())}},void 0,e.large);var p=f.children&&f.children.length,w=e.skipCompositeImageData&&(e.skipLayerImageData||p);return w||Tb(e,f),f}function Ds(e,t,r){var n,a,i=r.layersGroup,o=i===void 0?[]:i,s=r.layerGroupsEnabledId,c=s===void 0?[]:s,u=ct(e);u<0&&(e.globalAlpha=!0,u=-u);for(var f=[],h=[],d=0;d<u;d++){var p=kb(e,t,r),w=p.layer,m=p.channels;o[d]!==void 0&&(w.linkGroup=o[d]),c[d]!==void 0&&(w.linkGroupEnabled=!!c[d]),f.push(w),h.push(m)}for(var d=0;d<u;d++)Cb(e,t,f[d],h[d]);t.children||(t.children=[]);for(var _=[t],d=f.length-1;d>=0;d--){var y=f[d],g=y.sectionDivider?y.sectionDivider.type:0;g===1||g===2?(y.opened=g===1,y.children=[],!((n=y.sectionDivider)===null||n===void 0)&&n.key&&(y.blendMode=(a=Ua[y.sectionDivider.key])!==null&&a!==void 0?a:y.blendMode),_[_.length-1].children.unshift(y),_.push(y)):g===3?_.pop():_[_.length-1].children.unshift(y)}}function kb(e,t,r){var n={};n.top=qe(e),n.left=qe(e),n.bottom=qe(e),n.right=qe(e);for(var a=Fe(e),i=[],o=0;o<a;o++){var s=ct(e),c=we(e);if(e.large){if(c!==0)throw new Error("Sizes larger than 4GB are not supported");c=we(e)}i.push({id:s,length:c})}gn(e,"8BIM");var u=Mt(e);if(!Ua[u])throw new Error("Invalid blend mode: '".concat(u,"'"));n.blendMode=Ua[u],n.opacity=Le(e)/255,n.clipping=Le(e)===1;var f=Le(e);return n.transparencyProtected=(f&1)!==0,n.hidden=(f&2)!==0,f&32&&(n.effectsOpen=!0),$e(e,1),Nr(e,1,function(h){Sb(e,n);var d=Eb(e);for(d&&(n.blendingRanges=d),n.name=en(e,1);h()>4&&!bb(e,e.offset);)e.offset++;for(;h()>=12;)Hh(e,n,t,r);$e(e,h())}),{layer:n,channels:i}}function Sb(e,t){return Nr(e,1,function(r){if(r()){var n={};t.mask=n,n.top=qe(e),n.left=qe(e),n.bottom=qe(e),n.right=qe(e),n.defaultColor=Le(e);var a=Le(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=Le(e);i.positionRelativeToLayer=(o&1)!==0,i.disabled=(o&2)!==0,i.fromVectorData=(o&8)!==0,i.defaultColor=Le(e),i.top=qe(e),i.left=qe(e),i.bottom=qe(e),i.right=qe(e)}if(a&16){var s=Le(e);s&1&&(n.userMaskDensity=Le(e)/255),s&2&&(n.userMaskFeather=Wr(e)),s&4&&(n.vectorMaskDensity=Le(e)/255),s&8&&(n.vectorMaskFeather=Wr(e))}$e(e,r())}})}function go(e){return[Le(e),Le(e),Le(e),Le(e)]}function Eb(e){return Nr(e,1,function(t){for(var r=go(e),n=go(e),a=[];t()>0;){var i=go(e),o=go(e);a.push({sourceRange:i,destRange:o})}return{compositeGrayBlendSource:r,compositeGraphBlendDestinationRange:n,ranges:a}})}function Cb(e,t,r,n){if(!e.skipLayerImageData){var a=t.colorMode,i=a===void 0?3:a,o=t.bitsPerChannel,s=o===void 0?8:o;r.rawData={colorMode:i,bitsPerChannel:s,channels:[],large:e.large};for(var c=0,u=n;c<u.length;c++){var f=u[c],h=e.offset,d=0,p=void 0;if(f.length===1)throw new Error("Invalid channel length");if(f.length){if(d=Fe(e),d>3&&(e.offset-=1,d=Fe(e)),d>3&&(e.offset-=3,d=Fe(e)),d>3)throw new Error("Invalid compression: ".concat(d));f.length>2&&(p=jt(e,f.length-2))}e.offset=h+f.length,r.rawData.channels.push({id:f.id,compression:d,data:p})}e.useRawData||Vh(r,!!e.useImageData,!!e.throwForMissingFeatures)}}function Rh(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,s=a;s<i;s=s+o|0)r[s]=n}function Vh(e,t,r){if(e.rawData){var n=e.rawData,a=n.colorMode,i=n.bitsPerChannel,o=n.channels,s=n.large,c=(e.right||0)-(e.left||0),u=(e.bottom||0)-(e.top||0),f=a===4,h,d=!1;if(c&&u)if(f){if(i!==8)throw new Error("bitsPerChannel Not supproted");h={width:c,height:u,data:new Uint8ClampedArray(c*u*5)}}else h=As(c,u,i);for(var p=0,w=o;p<w.length;p++){var m=w[p],_=m.id,y=m.compression,g=m.data;if(g){var b=Ya(g.buffer,g.byteOffset,g.byteLength);if(_===-2||_===-3){var v=_===-2?e.mask:e.realMask;if(!v)throw new Error("Missing layer ".concat(_===-2?"mask":"real mask"," data"));var E=(v.right||0)-(v.left||0),C=(v.bottom||0)-(v.top||0);if(E<0||C<0||E>3e4||C>3e4)throw new Error("Invalid mask size");if(E&&C){var A=As(E,C,i);$h(b,g.byteLength,A,y,E,C,i,0,s,4),mo(A),Rh(A,!1),t?v.imageData=A:v.canvas=ro(A)}}else{var k=e1(_,f),B=h;if(k<0&&(B=void 0,r))throw new Error("Channel not supported: ".concat(_));$h(b,g.byteLength,B,y,c,u,i,k,s,f?5:4),B&&a===1&&mo(B)}_===-1&&(d=!0)}}if(h){if(d||Rh(h,f),f){var T=h;h=Ga(T.width,T.height),Gh(T,h,!1)}t?e.imageData=h:e.canvas=ro(h)}delete e.rawData}}function $h(e,t,r,n,a,i,o,s,c,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 f=jt(e,t);qh(f,r,o,u,s)}else if(n===1)Jn(e,r,a,i,o,u,[s],c);else if(n===2){var f=jt(e,t);Wh(f,r,a,i,o,u,s,!1)}else if(n===3){var f=jt(e,t);Wh(f,r,a,i,o,u,s,!0)}else throw new Error("Invalid Compression type: ".concat(n))}function Db(e){return Nr(e,1,function(t){if(t()){var r=Fe(e),n=Fe(e),a=Fe(e),i=Fe(e),o=Fe(e),s=Fe(e)/255,c=Le(e);return $e(e,t()),{overlayColorSpace:r,colorSpace1:n,colorSpace2:a,colorSpace3:i,colorSpace4:o,opacity:s,kind:c}}})}var Ab=[0,1,-1,2,-2,3,-3,4,-4];function Uh(e,t){for(var r=e.offset,n="",a=0,i=Ab;a<i.length;a++){var o=i[a];try{e.offset=r+o,n=Mt(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 Bb(e){return e==="8BIM"||e==="8B64"}function Hh(e,t,r,n){var a=Uh(e,Bb),i=Mt(e),o=a==="8B64"||e.large&&Kd.indexOf(i)!==-1;Nr(e,2,function(s){var c=wo[i];if(c)try{c.read(e,t,s,r,n)}catch(u){if(e.throwForMissingFeatures)throw u}else e.logMissingFeatures&&e.log("Unhandled additional info: ".concat(i)),$e(e,s());s()&&(e.logMissingFeatures&&e.log("Unread ".concat(s()," bytes left for additional info: ").concat(i)),$e(e,s()))},!1,o)}function As(e,t,r,n){if(n===void 0&&(n=4),r===1||r===8)return n===4?Ga(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 Tb(e,t){var r,n=Fe(e),a=(r=t.bitsPerChannel)!==null&&r!==void 0?r:8;if(Oh.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=As(t.width,t.height,a);switch(Gy(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=jt(e,Math.ceil(t.width/8)*t.height);else if(n===1)o=new Uint8Array(t.width*t.height),Jn(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));jy(o,i.data,t.width,t.height);break}case 3:case 1:{var s=t.colorMode===1?[0]:[0,1,2];if(t.channels&&t.channels>3)for(var c=3;c<t.channels;c++)s.push(c);else e.globalAlpha&&s.push(3);if(n===0)for(var c=0;c<s.length;c++){var u=jt(e,t.width*t.height*Math.floor(a/8));qh(u,i,a,4,s[c])}else n===1&&(e.offset,Jn(e,i,t.width,t.height,a,4,s,e.large));t.colorMode===1&&mo(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 f={width:i.width,height:i.height,data:new Uint8Array(i.width*i.height)};Jn(e,f,t.width,t.height,a,1,[0],e.large),Mb(f,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 s=[0,1,2,3];if(e.globalAlpha&&s.push(4),n===0)throw new Error("Not implemented");if(n===1){var h={width:i.width,height:i.height,data:new Uint8Array(i.width*i.height*5)};e.offset,Jn(e,h,t.width,t.height,a,5,s,e.large),Gh(h,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,p=i.width*i.height*4,c=0;c<p;c+=4){var w=d[c+3];if(w!=0&&w!=255){var m=w/255,_=1/m,y=255*(1-_);d[c+0]=d[c+0]*_+y,d[c+1]=d[c+1]*_+y,d[c+2]=d[c+2]*_+y}}}e.useImageData?t.imageData=i:t.canvas=ro(i)}function Gh(e,t,r){for(var n=t.width*t.height*4,a=e.data,i=t.data,o=0,s=0;s<n;o+=5,s+=4){var c=a[o],u=a[o+1],f=a[o+2],h=a[o+3];i[s]=(c*h|0)/255|0,i[s+1]=(u*h|0)/255|0,i[s+2]=(f*h|0)/255|0,i[s+3]=r?255-a[o+4]:a[o+4]}}function Mb(e,t,r){for(var n=e.width*e.height,a=e.data,i=t.data,o=0,s=0;o<n;o++,s+=4){var c=r[a[o]];i[s+0]=c.r,i[s+1]=c.g,i[s+2]=c.b,i[s+3]=255}}function Ib(e,t){if(e.byteLength/e.length!==t.byteLength/t.length)throw new Error("Invalid array types")}function jh(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 Bs(e,t,r,n){Ib(e.data,t);for(var a=e.width*e.height,i=e.data,o=0,s=r|0;o<a;o++,s=s+n|0)i[s]=t[o]}function qh(e,t,r,n,a){if(r==32)for(var i=0;i<e.byteLength;i+=4){var o=e[i+0],s=e[i+1],c=e[i+2],u=e[i+3];e[i+0]=u,e[i+1]=c,e[i+2]=s,e[i+3]=o}var f=jh(e,r);t&&a<n&&Bs(t,f,a,n)}function Ts(e,t,r,n){for(var a=0;a<r;a++)for(var i=a*t,o=1,s=i+1;o<t;o++,s++)e[s]=(e[s-1]+e[s])%n}function Wh(e,t,r,n,a,i,o,s){var c=Fy(e);if(t&&o<i){var u=jh(c,a);if(a===8)s&&Ts(c,r,n,256),Bs(t,c,o,i);else if(a===16)s&&Ts(u,r,n,65536),Bs(t,u,o,i);else if(a===32){s&&Ts(c,r*4,n,256);for(var f=o,h=new Uint32Array(t.data.buffer,t.data.byteOffset,t.data.length),d=0;d<n;d++)for(var p=r*4*d,w=0;w<r;w++,p++,f+=i){var m=p+r,_=m+r,y=_+r;h[f]=(c[p]<<24|c[m]<<16|c[_]<<8|c[y])>>>0}}else throw new Error("Invalid bitDepth")}}function Jn(e,t,r,n,a,i,o,s){var c=t&&t.data,u;if(s){u=new Uint32Array(o.length*n);for(var f=0,h=0;f<o.length;f++)for(var d=0;d<n;d++,h++)u[h]=we(e)}else{u=new Uint16Array(o.length*n);for(var f=0,h=0;f<o.length;f++)for(var d=0;d<n;d++,h++)u[h]=Fe(e)}for(var p=i-1|0,w=0,h=0;w<o.length;w++){var m=o[w]|0,_=w>p||m>p;if(!c||_)for(var d=0;d<n;d++,h++)$e(e,u[h]);else for(var d=0,y=m|0;d<n;d++,h++)for(var g=u[h],b=jt(e,g),v=0,E=0;v<g;v++){var C=b[v];if(C>128){var A=b[++v];C=256-C|0;for(var k=0;k<=C&&E<r;k=k+1|0,E=E+1|0)c[y]=A,y=y+i|0}else if(C<128)for(var k=0;k<=C&&E<r;k=k+1|0,E=E+1|0)c[y]=b[++v],y=y+i|0}}}function Nr(e,t,r,n,a){n===void 0&&(n=!0),a===void 0&&(a=!1);var i=we(e);if(a){if(i!==0)throw new Error("Sizes larger than 4GB are not supported");i=we(e)}if(!(i<=0&&n)){var o=e.offset+i;if(o>e.view.byteLength)throw new Error("Section exceeds file size");var s=r(function(){return o-e.offset});for(e.offset!==o&&(e.offset>o?Es(e,"Exceeded section limits"):Es(e,"Unread section data"));i%t;)i++,o++;return e.offset=o,s}}function ar(e){var t=Fe(e);switch(t){case 0:{var r=Fe(e)/257,n=Fe(e)/257,a=Fe(e)/257;return $e(e,2),{r,g:n,b:a}}case 1:{var i=Fe(e)/65535,o=Fe(e)/65535,a=Fe(e)/65535;return $e(e,2),{h:i,s:o,b:a}}case 2:{var s=Fe(e)/257,c=Fe(e)/257,u=Fe(e)/257,f=Fe(e)/257;return{c:s,m:c,y:u,k:f}}case 7:{var h=ct(e)/1e4,d=ct(e),p=ct(e),w=d<0?d/12800:d/12700,a=p<0?p/12800:p/12700;return $e(e,2),{l:h,a:w,b:a}}case 8:{var f=Fe(e)*255/1e4;return $e(e,6),{k:f}}default:throw new Error("Invalid color space")}}function zb(e){for(var t=we(e);t%4;)t++;var r=e.offset+t,n=we(e);if(n!==1)throw new Error("Invalid pattern version: ".concat(n));var a=we(e),i=ct(e),o=ct(e);if(a!==3&&a!==1&&a!==2)throw new Error("Unsupported pattern color mode: ".concat(a));var s=Kt(e),c=en(e,1),u=[];if(a===2){for(var f=0;f<256;f++)u.push({r:Le(e),g:Le(e),b:Le(e)});$e(e,4)}var h=we(e);if(h!==3)throw new Error("Invalid pattern VMAL version: ".concat(h));we(e);for(var d=we(e),p=we(e),w=we(e),m=we(e),_=we(e),y=m-p,g=w-d,b=new Uint8Array(y*g*4),f=3;f<b.byteLength;f+=4)b[f]=255;for(var f=0,v=0;f<_+2;f++){var E=we(e);if(E){var C=we(e),A=we(e),k=we(e),B=we(e),T=we(e),F=we(e),V=Fe(e),L=Le(e),H=C-23,X=jt(e,H);if(A!==8||V!==8)throw new Error("16bit pixel depth not supported for patterns");var W=F-B,Z=T-k,Q=B-p,K=k-d;if(L===0){if(a===3&&v<3)for(var ue=0;ue<Z;ue++)for(var ne=0;ne<W;ne++){var fe=ne+ue*W,re=(Q+ne+(ue+K)*y)*4;b[re+v]=X[fe]}if(a===1&&v<1)for(var ye=0;ye<Z;ye++)for(var he=0;he<W;he++){var fe=he+ye*W,re=(Q+he+(ye+K)*y)*4,ke=X[fe];b[re+0]=ke,b[re+1]=ke,b[re+2]=ke}if(a===2)throw new Error("Indexed pattern color mode not implemented")}else if(L===1){var Ee={data:b,width:y,height:g},me={data:new Uint8Array(W*Z),width:W,height:Z},te=Ya(X.buffer,X.byteOffset,X.byteLength);if(a===3&&v<3&&(Jn(te,me,W,Z,8,1,[0],!1),Xh(me,Ee,Q,K,v)),a===1&&v<1&&(Jn(te,me,W,Z,8,1,[0],!1),Xh(me,Ee,Q,K,0),mo(Ee)),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:c,name:s,x:i,y:o,bounds:{x:p,y:d,w:y,h:g},data:b}}function Xh(e,t,r,n,a){for(var i=e.width,o=e.height,s=t.width,c=0;c<o;c++)for(var u=0;u<i;u++){var f=u+c*i,h=(r+u+(c+n)*s)*4,d=e.data[f];t.data[h+a]=d}}var Zh=[void 0,"outer bevel","inner bevel","emboss","pillow emboss","stroke emboss"];function Ja(e){return gn(e,"8BIM"),Ua[Mt(e)]||"normal"}function Qa(e,t){et(e,"8BIM"),et(e,to[t]||"norm")}function ei(e){return Le(e)/255}function ti(e,t){ze(e,Math.round(t*255)|0)}function Fb(e){var t=Fe(e);if(t!==0)throw new Error("Invalid effects layer version: ".concat(t));for(var r=Fe(e),n={},a=0;a<r;a++){gn(e,"8BIM");var i=Mt(e);switch(i){case"cmnS":{var o=we(e),s=we(e),c=!!Le(e);if($e(e,2),o!==7||s!==0||!c)throw new Error("Invalid effects common state");break}case"dsdw":case"isdw":{var u=we(e),f=we(e);if(u!==41&&u!==51)throw new Error("Invalid shadow size: ".concat(u));if(f!==0&&f!==2)throw new Error("Invalid shadow version: ".concat(f));var o=Fr(e);Fr(e);var h=Fr(e),d=Fr(e),p=ar(e),w=Ja(e),m=!!Le(e),_=!!Le(e),y=ei(e);u>=51&&ar(e);var g={size:{units:"Pixels",value:o},distance:{units:"Pixels",value:d},angle:h,color:p,blendMode:w,enabled:m,useGlobalLight:_,opacity:y};i==="dsdw"?n.dropShadow=[g]:n.innerShadow=[g];break}case"oglw":{var u=we(e),b=we(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=Fr(e);Fr(e);var p=ar(e),w=Ja(e),m=!!Le(e),y=ei(e);u>=42&&ar(e),n.outerGlow={size:{units:"Pixels",value:o},color:p,blendMode:w,enabled:m,opacity:y};break}case"iglw":{var u=we(e),v=we(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=Fr(e);Fr(e);var p=ar(e),w=Ja(e),m=!!Le(e),y=ei(e);u>=43&&(Le(e),ar(e)),n.innerGlow={size:{units:"Pixels",value:o},color:p,blendMode:w,enabled:m,opacity:y};break}case"bevl":{var u=we(e),E=we(e);if(u!==58&&u!==78)throw new Error("Invalid bevel size: ".concat(u));if(E!==0&&E!==2)throw new Error("Invalid bevel version: ".concat(E));var h=Fr(e),C=Fr(e),o=Fr(e),A=Ja(e),k=Ja(e),B=ar(e),T=ar(e),F=Zh[Le(e)]||"inner bevel",V=ei(e),L=ei(e),m=!!Le(e),_=!!Le(e),H=Le(e)?"down":"up";u>=78&&(ar(e),ar(e)),n.bevel={size:{units:"Pixels",value:o},angle:h,strength:C,highlightBlendMode:A,shadowBlendMode:k,highlightColor:B,shadowColor:T,style:F,highlightOpacity:V,shadowOpacity:L,enabled:m,useGlobalLight:_,direction:H};break}case"sofi":{var o=we(e),X=we(e);if(o!==34)throw new Error("Invalid effects solid fill info size: ".concat(o));if(X!==2)throw new Error("Invalid effects solid fill info version: ".concat(X));var w=Ja(e),p=ar(e),y=ei(e),m=!!Le(e);ar(e),n.solidFill=[{blendMode:w,color:p,opacity:y,enabled:m}];break}default:throw new Error("Invalid effect type: '".concat(i,"'"))}}return n}function Kh(e,t){var r;Pe(e,51),Pe(e,2),Lr(e,t.size&&t.size.value||0),Lr(e,0),Lr(e,t.angle||0),Lr(e,t.distance&&t.distance.value||0),ir(e,t.color),Qa(e,t.blendMode),ze(e,t.enabled?1:0),ze(e,t.useGlobalLight?1:0),ti(e,(r=t.opacity)!==null&&r!==void 0?r:1),ir(e,t.color)}function Nb(e,t){var r,n,a,i,o,s,c=(r=t.dropShadow)===null||r===void 0?void 0:r[0],u=(n=t.innerShadow)===null||n===void 0?void 0:n[0],f=t.outerGlow,h=t.innerGlow,d=t.bevel,p=(a=t.solidFill)===null||a===void 0?void 0:a[0],w=1;if(c&&w++,u&&w++,f&&w++,h&&w++,d&&w++,p&&w++,xe(e,0),xe(e,w),et(e,"8BIM"),et(e,"cmnS"),Pe(e,7),Pe(e,0),ze(e,1),kt(e,2),c&&(et(e,"8BIM"),et(e,"dsdw"),Kh(e,c)),u&&(et(e,"8BIM"),et(e,"isdw"),Kh(e,u)),f&&(et(e,"8BIM"),et(e,"oglw"),Pe(e,42),Pe(e,2),Lr(e,((i=f.size)===null||i===void 0?void 0:i.value)||0),Lr(e,0),ir(e,f.color),Qa(e,f.blendMode),ze(e,f.enabled?1:0),ti(e,f.opacity||0),ir(e,f.color)),h&&(et(e,"8BIM"),et(e,"iglw"),Pe(e,43),Pe(e,2),Lr(e,((o=h.size)===null||o===void 0?void 0:o.value)||0),Lr(e,0),ir(e,h.color),Qa(e,h.blendMode),ze(e,h.enabled?1:0),ti(e,h.opacity||0),ze(e,0),ir(e,h.color)),d){et(e,"8BIM"),et(e,"bevl"),Pe(e,78),Pe(e,2),Lr(e,d.angle||0),Lr(e,d.strength||0),Lr(e,((s=d.size)===null||s===void 0?void 0:s.value)||0),Qa(e,d.highlightBlendMode),Qa(e,d.shadowBlendMode),ir(e,d.highlightColor),ir(e,d.shadowColor);var m=Zh.indexOf(d.style);ze(e,m<=0?1:m),ti(e,d.highlightOpacity||0),ti(e,d.shadowOpacity||0),ze(e,d.enabled?1:0),ze(e,d.useGlobalLight?1:0),ze(e,d.direction==="down"?1:0),ir(e,d.highlightColor),ir(e,d.shadowColor)}p&&(et(e,"8BIM"),et(e,"sofi"),Pe(e,34),Pe(e,2),Qa(e,p.blendMode),ir(e,p.color),ti(e,p.opacity||0),ze(e,p.enabled?1:0),ir(e,p.color))}function Yh(e){return e===32||e===10||e===13||e===9}function Jh(e){return e>=48&&e<=57||e===46||e===45}function Qh(e){var t=0;function r(){for(;t<e.length&&Yh(e[t]);)t++}function n(){var g=e[t];return t++,g===92&&(g=e[t],t++),g}function a(){var g="";if(e[t]===41)return t++,g;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(),E=b<<8|v;g+=String.fromCharCode(E)}return t++,g}var i=null,o=[];function s(g){o.length?(c(g),o.push(g)):(o.push(g),i=g)}function c(g){if(!o.length)throw new Error("Invalid data");var b=o[o.length-1];if(typeof b=="string")o[o.length-2][b]=g,f();else if(Array.isArray(b))b.push(g);else throw new Error("Invalid data")}function u(g){o.length||s({});var b=o[o.length-1];if(b&&typeof b=="string")c(g==="nil"?null:"/".concat(g));else if(b&&typeof b=="object")o.push(g);else throw new Error("Invalid data")}function f(){if(!o.length)throw new Error("Invalid data");o.pop()}r();for(var h=e.length;h>0&&e[h-1]===0;)h--;for(;t<h;){var d=t,p=e[d];if(p===60&&e[d+1]===60)t+=2,s({});else if(p===62&&e[d+1]===62)t+=2,f();else if(p===47){t+=1;for(var w=t;t<e.length&&!Yh(e[t]);)t++;for(var m="",_=w;_<t;_++)m+=String.fromCharCode(e[_]);u(m)}else if(p===40)t+=1,c(a());else if(p===91)t+=1,s([]);else if(p===93)t+=1,f();else if(p===110&&e[d+1]===117&&e[d+2]===108&&e[d+3]===108)t+=4,c(null);else if(p===116&&e[d+1]===114&&e[d+2]===117&&e[d+3]===101)t+=4,c(!0);else if(p===102&&e[d+1]===97&&e[d+2]===108&&e[d+3]===115&&e[d+4]===101)t+=5,c(!1);else if(Jh(p)){for(var y="";t<e.length&&Jh(e[t]);)y+=String.fromCharCode(e[t]),t++;c(parseFloat(y))}else t+=1,console.log("Invalid token '".concat(String.fromCharCode(p),"' (").concat(p,") at ").concat(t));r()}return i}var Ob=["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"],Lb=["RunLengthArray"];function Pb(e,t){t===void 0&&(t=!1);var r=new Uint8Array(1024),n=0,a=0;function i(g){if(n>=r.length){var b=new Uint8Array(r.length*2);b.set(r),r=b}r[n]=g,n++}function o(g){for(var b=0;b<g.length;b++)i(g.charCodeAt(b))}function s(){if(t)o(" ");else for(var g=0;g<a;g++)o(" ")}function c(g,b){s(),o("/".concat(g)),w(b,g,!0),t||o(`
|
|
261
|
+
`)}function u(g){return g.toString()}function f(g){return g.toFixed(5).replace(/(\d)0+$/g,"$1").replace(/^0+\.([1-9])/g,".$1").replace(/^-0+\.0(\d)/g,"-.0$1")}function h(g,b){var v=b&&Ob.indexOf(b)!==-1||(g|0)!==g;return v?f(g):u(g)}function d(g){var b=Object.keys(g);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 p(g){(g===40||g===41||g===92)&&i(92),i(g)}function w(g,b,v){v===void 0&&(v=!1);function E(){v?o(" "):s()}if(g===null)E(),o(t?"/nil":"null");else if(typeof g=="number")E(),o(h(g,b));else if(typeof g=="boolean")E(),o(g?"true":"false");else if(typeof g=="string")if(E(),(b==="99"||b==="98")&&g.charAt(0)==="/")o(g);else{o("("),i(254),i(255);for(var C=0;C<g.length;C++){var A=g.charCodeAt(C);p(A>>8&255),p(A&255)}o(")")}else if(Array.isArray(g))if(E(),g.every(function(Z){return typeof Z=="number"})){o("[");for(var k=Lb.indexOf(b)!==-1,B=0,T=g;B<T.length;B++){var F=T[B];o(" "),o(k?h(F):f(F))}o(" ]")}else{o("["),t||o(`
|
|
262
|
+
`);for(var V=0,L=g;V<L.length;V++){var F=L[V];w(F,b),t||o(`
|
|
263
|
+
`)}s(),o("]")}else if(typeof g=="object"){v&&!t&&o(`
|
|
264
|
+
`),s(),o("<<"),t||o(`
|
|
265
|
+
`),a++;for(var H=0,X=d(g);H<X.length;H++){var W=X[H];c(W,g[W])}a--,s(),o(">>")}}if(t){if(typeof e=="object")for(var m=0,_=d(e);m<_.length;m++){var y=_[m];c(y,e[y])}}else o(`
|
|
266
|
+
|
|
267
|
+
`),w(e);return r.slice(0,n)}var Yt=function(){return Yt=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},Yt.apply(this,arguments)},ep={name:"MyriadPro-Regular",script:0,type:0,synthetic:0},yo={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},Rb={font:ep,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},Vb={isOn:!1,show:!1,size:18,leading:22,color:{r:0,g:0,b:255},leadingFillColor:{r:0,g:0,b:255},alignLineHeightToGridFlags:!1},Ms=["justification","firstLineIndent","startIndent","endIndent","spaceBefore","spaceAfter","autoHyphenate","hyphenatedWordSize","preHyphen","postHyphen","consecutiveHyphens","zone","wordSpacing","letterSpacing","glyphSpacing","autoLeading","leadingType","hanging","burasagari","kinsokuOrder","everyLineComposer"],Is=["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"],tp=["none","crisp","strong","smooth","sharp"],rp=["left","right","center","justify-left","justify-right","justify-center","justify-all"];function np(e){return e.substring(0,1).toUpperCase()+e.substring(1)}function $b(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 zs(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 ap(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 ip(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 Ub(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 op(e,t,r){for(var n={},a=0,i=t;a<i.length;a++){var o=i[a],s=np(o);e[s]!==void 0&&(o==="justification"?n[o]=rp[e[s]]:o==="font"?n[o]=r[e[s]]:o==="fillColor"||o==="strokeColor"?n[o]=$b(e[s]):n[o]=e[s])}return n}function lp(e,t,r){for(var n,a={},i=0,o=t;i<o.length;i++){var s=o[i],c=np(s);e[s]!==void 0&&(s==="justification"?a[c]=rp.indexOf((n=e[s])!==null&&n!==void 0?n:"left"):s==="font"?a[c]=Ub(r,e[s]):s==="fillColor"||s==="strokeColor"?a[c]=zs(e[s]):a[c]=e[s])}return a}function Hb(e,t){return op(e,Ms,t)}function Gb(e,t){return op(e,Is,t)}function bo(e,t){return lp(e,Ms,t)}function Fs(e,t){return lp(e,Is,t)}function sp(e,t,r){if(t.length){for(var n=function(s){var c=t[0].style[s];if(c!==void 0){var u=!1;Array.isArray(c)?u=t.every(function(m){return ap(m.style[s],c)}):typeof c=="object"?u=t.every(function(m){return ip(m.style[s],c)}):u=t.every(function(m){return m.style[s]===c}),u&&(e[s]=c)}var f=e[s];if(f!==void 0)for(var h=0,d=t;h<d.length;h++){var p=d[h],w=!1;Array.isArray(c)?w=ap(p.style[s],c):typeof c=="object"?w=ip(p.style[s],c):w=p.style[s]===c,w&&delete p.style[s]}},a=0,i=r;a<i.length;a++){var o=i[a];n(o)}t.every(function(s){return Object.keys(s.style).length===0})&&(t.length=0)}}function jb(e){for(var t,r,n,a,i,o,s=e.EngineDict,c=e.ResourceDict,u=c.FontSet.map(function(C){return{name:C.Name,script:C.Script,type:C.FontType,synthetic:C.Synthetic}}),f=s.Editor.Text.replace(/\r/g,`
|
|
268
|
+
`),h=0;/\n$/.test(f);)f=f.substring(0,f.length-1),h++;var d={text:f,antiAlias:(t=tp[s.AntiAlias])!==null&&t!==void 0?t:"smooth",useFractionalGlyphWidths:!!s.UseFractionalGlyphWidths,superscriptSize:c.SuperscriptSize,superscriptPosition:c.SuperscriptPosition,subscriptSize:c.SubscriptSize,subscriptPosition:c.SubscriptPosition,smallCapSize:c.SmallCapSize},p=(o=(i=(a=(n=(r=s.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;p&&(d.shapeType=p.ShapeType===1?"box":"point",p.PointBase&&(d.pointBase=p.PointBase),p.BoxBounds&&(d.boxBounds=p.BoxBounds));var w=s.ParagraphRun;d.paragraphStyle={},d.paragraphStyleRuns=[];for(var m=0;m<w.RunArray.length;m++){var _=w.RunArray[m],y=w.RunLengthArray[m],g=Hb(_.ParagraphSheet.Properties,u);d.paragraphStyleRuns.push({length:y,style:g})}for(var b=h;d.paragraphStyleRuns.length&&b>0;b--)--d.paragraphStyleRuns[d.paragraphStyleRuns.length-1].length===0&&d.paragraphStyleRuns.pop();sp(d.paragraphStyle,d.paragraphStyleRuns,Ms),d.paragraphStyleRuns.length||delete d.paragraphStyleRuns;var v=s.StyleRun;d.style={},d.styleRuns=[];for(var m=0;m<v.RunArray.length;m++){var E=v.RunLengthArray[m],g=Gb(v.RunArray[m].StyleSheet.StyleSheetData,u);g.font||(g.font=u[0]),d.styleRuns.push({length:E,style:g})}for(var b=h;d.styleRuns.length&&b>0;b--)--d.styleRuns[d.styleRuns.length-1].length===0&&d.styleRuns.pop();return sp(d.style,d.styleRuns,Is),d.styleRuns.length||delete d.styleRuns,d}function qb(e){var t,r,n,a,i,o,s,c,u,f,h,d,p="".concat((e.text||"").replace(/\r?\n/g,"\r"),"\r"),w=[{name:"AdobeInvisFont",script:0,type:0,synthetic:0}],m=((t=e.style)===null||t===void 0?void 0:t.font)||((n=(r=e.styleRuns)===null||r===void 0?void 0:r.find(function(he){return he.style.font}))===null||n===void 0?void 0:n.style.font)||ep,_=[],y=[],g=e.paragraphStyleRuns;if(g&&g.length){for(var b=p.length,v=0,E=g;v<E.length;v++){var C=E[v],A=Math.min(C.length,b);b-=A,A&&(b===1&&C===g[g.length-1]&&(A++,b--),y.push(A),_.push({ParagraphSheet:{DefaultStyleSheet:0,Properties:bo(Yt(Yt(Yt({},yo),e.paragraphStyle),C.style),w)},Adjustments:{Axis:[1,0,1],XY:[0,0]}}))}b&&(y.push(b),_.push({ParagraphSheet:{DefaultStyleSheet:0,Properties:bo(Yt(Yt({},yo),e.paragraphStyle),w)},Adjustments:{Axis:[1,0,1],XY:[0,0]}}))}else for(var k=0,B=0;k<p.length;k++)p.charCodeAt(k)===13&&(y.push(k-B+1),_.push({ParagraphSheet:{DefaultStyleSheet:0,Properties:bo(Yt(Yt({},yo),e.paragraphStyle),w)},Adjustments:{Axis:[1,0,1],XY:[0,0]}}),B=k+1);for(var T=Fs(Yt(Yt({},Rb),{font:m}),w),F=e.styleRuns||[{length:p.length,style:e.style||{}}],V=[],L=[],H=p.length,X=0,W=F;X<W.length;X++){var Z=W[X],A=Math.min(Z.length,H);H-=A,A&&(H===1&&Z===F[F.length-1]&&(A++,H--),L.push(A),V.push({StyleSheet:{StyleSheetData:Fs(Yt(Yt({kerning:0,autoKerning:!0,fillColor:{r:0,g:0,b:0}},e.style),Z.style),w)}}))}H&&F.length&&(L.push(H),V.push({StyleSheet:{StyleSheetData:Fs(Yt({kerning:0,autoKerning:!0,fillColor:{r:0,g:0,b:0}},e.style),w)}}));var Q=Yt(Yt({},Vb),e.gridInfo),K=e.orientation==="vertical"?2:0,ue=e.orientation==="vertical"?1:0,ne=e.shapeType==="box"?1:0,fe={ShapeType:ne};ne===0?fe.PointBase=e.pointBase||[0,0]:fe.BoxBounds=e.boxBounds||[0,0,0,0],fe.Base={ShapeType:ne,TransformPoint0:[1,0],TransformPoint1:[0,1],TransformPoint2:[0,0]};var re={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:bo(Yt(Yt({},yo),e.paragraphStyle),w)}],StyleSheetSet:[{Name:"Normal RGB",StyleSheetData:T}],FontSet:w.map(function(he){return{Name:he.name,Script:he.script||0,FontType:he.type||0,Synthetic:he.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:(s=e.subscriptPosition)!==null&&s!==void 0?s:.333,SmallCapSize:(c=e.smallCapSize)!==null&&c!==void 0?c:.7},ye={EngineDict:{Editor:{Text:p},ParagraphRun:{DefaultRunData:{ParagraphSheet:{DefaultStyleSheet:0,Properties:{}},Adjustments:{Axis:[1,0,1],XY:[0,0]}},RunArray:_,RunLengthArray:y,IsJoinable:1},StyleRun:{DefaultRunData:{StyleSheet:{StyleSheetData:{}}},RunArray:V,RunLengthArray:L,IsJoinable:2},GridInfo:{GridIsOn:!!Q.isOn,ShowGrid:!!Q.show,GridSize:(u=Q.size)!==null&&u!==void 0?u:18,GridLeading:(f=Q.leading)!==null&&f!==void 0?f:22,GridColor:zs(Q.color),GridLeadingFillColor:zs(Q.color),AlignLineHeightToGridFlags:!!Q.alignLineHeightToGridFlags},AntiAlias:tp.indexOf((h=e.antiAlias)!==null&&h!==void 0?h:"sharp"),UseFractionalGlyphWidths:(d=e.useFractionalGlyphWidths)!==null&&d!==void 0?d:!0,Rendered:{Version:1,Shapes:{WritingDirection:K,Children:[{ShapeType:ne,Procession:ue,Lines:{WritingDirection:K,Children:[]},Cookie:{Photoshop:fe}}]}}},ResourceDict:Yt({},re),DocumentResources:Yt({},re)};return ye}var Ns={0:{uproot:!0,children:{0:{name:"Type"},1:{name:"Values"}}}},Os={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:Ns},54:{name:"StrokeColor",children:Ns},55:{children:{99:{uproot:!0}}},79:{children:Ns}},Ls={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:Os}},cp={name:"StyleSheetData",children:Os},Wb={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:cp}}}}}},6:{name:"ParagraphSheetSet",children:{0:{uproot:!0,children:{0:{uproot:!0,children:{0:{name:"Name"},5:{name:"Properties",children:Ls},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:Ls},6:{name:"6"}}}}},1:{name:"RunLength"}}}}},6:{name:"StyleRun",children:{0:{name:"RunArray",children:{0:{name:"StyleSheet",children:{0:{uproot:!0,children:{6:cp}}}},1:{name:"RunLength"}}}}}}},1:{name:"FontVectorData ???"}}},2:{name:"StyleSheet",children:Os},3:{name:"ParagraphSheet",children:Ls}}}};function Hi(e,t){var r,n;if(e===null)return e;if(Array.isArray(e))return e.map(function(c){return Hi(c,t)});if(typeof e!="object")return e;for(var a={},i=0,o=Object.keys(e);i<o.length;i++){var s=o[i];if(t[s])if(t[s].uproot){s!=="99"&&(a=Hi(e[s],(r=t[s].children)!==null&&r!==void 0?r:{})),e[99]&&(a._type=e[99]);break}else a[t[s].name||s]=Hi(e[s],(n=t[s].children)!==null&&n!==void 0?n:{});else s==="99"?a._type=e[s]:a[s]=Hi(e[s],{})}return a}function Xb(e){return Hi(e,Wb)}var R=function(){return R=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},R.apply(this,arguments)},Or="abcdefghijklmnopqrstuvwxyz",up=[],wo={};function Ke(e,t,r,n){var a={key:e,has:t,read:r,write:n};up.push(a),wo[a.key]=a}function ri(e,t){wo[e]=wo[t]}function Tt(e){return function(t){return t[e]!==void 0}}function Ps(e){if(we(e))throw new Error("Resource size above 4 GB limit at ".concat(e.offset.toString(16)));return we(e)}function Rs(e,t){Pe(e,0),Pe(e,t)}Ke("TySh",Tt("text"),function(e,t,r){if(ct(e)!==1)throw new Error("Invalid TySh version");for(var n=[],a=0;a<6;a++)n.push(Wr(e));if(ct(e)!==50)throw new Error("Invalid TySh text version");var i=dt(e);if(ct(e)!==1)throw new Error("Invalid TySh warp version");var o=dt(e);if(t.text={transform:n,left:Jr(e),top:Jr(e),right:Jr(e),bottom:Jr(e),text:i["Txt "].replace(/\r/g,`
|
|
269
|
+
`),index:i.TextIndex||0,gridding:O1.decode(i.textGridding),antiAlias:L1.decode(i.AntA),orientation:$i.decode(i.Ornt),warp:{style:xs.decode(o.warpStyle),value:o.warpValue||0,perspective:o.warpPerspective||0,perspectiveOther:o.warpPerspectiveOther||0,rotate:$i.decode(o.warpRotate)}},i.bounds&&(t.text.bounds=x1(i.bounds)),i.boundingBox&&(t.text.boundingBox=x1(i.boundingBox)),i.EngineData){var s=Qh(i.EngineData),c=jb(s);t.text=R(R({},t.text),c)}$e(e,r())},function(e,t){var r=t.text,n=r.warp||{},a=r.transform||[1,0,0,1,0,0],i=R(R(R({"Txt ":(r.text||"").replace(/\r?\n/g,"\r"),textGridding:O1.encode(r.gridding),Ornt:$i.encode(r.orientation),AntA:L1.encode(r.antiAlias)},r.bounds?{bounds:k1(r.bounds)}:{}),r.boundingBox?{boundingBox:k1(r.boundingBox)}:{}),{TextIndex:r.index||0,EngineData:Pb(qb(r))});xt(e,1);for(var o=0;o<6;o++)Xr(e,a[o]);xt(e,50),mt(e,"","TxLr",i,"text"),xt(e,1),mt(e,"","warp",_o(n)),tn(e,r.left),tn(e,r.top),tn(e,r.right),tn(e,r.bottom)}),Ke("SoCo",function(e){return e.vectorFill!==void 0&&e.vectorStroke===void 0&&e.vectorFill.type==="color"},function(e,t){var r=dt(e);t.vectorFill=Pi(r)},function(e,t){var r=Ri(t.vectorFill).descriptor;mt(e,"","null",r)}),Ke("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=dt(e);t.vectorFill=Pi(n),$e(e,r())},function(e,t){var r=Ri(t.vectorFill).descriptor;mt(e,"","null",r)}),Ke("PtFl",function(e){return e.vectorFill!==void 0&&e.vectorStroke===void 0&&e.vectorFill.type==="pattern"},function(e,t){var r=dt(e);t.vectorFill=Pi(r)},function(e,t){var r=Ri(t.vectorFill).descriptor;mt(e,"","null",r)}),Ke("vscg",function(e){return e.vectorFill!==void 0&&e.vectorStroke!==void 0},function(e,t,r){Mt(e);var n=dt(e);t.vectorFill=Pi(n),$e(e,r())},function(e,t){var r=Ri(t.vectorFill),n=r.descriptor,a=r.key;et(e,a),mt(e,"","null",n)});function Zb(e,t,r){var n=Qr(e)*r,a=Qr(e)*t,i=Qr(e)*r,o=Qr(e)*t,s=Qr(e)*r,c=Qr(e)*t;return[a,n,o,i,c,s]}function Kb(e,t,r,n){rn(e,t[1]/n),rn(e,t[0]/r),rn(e,t[3]/n),rn(e,t[2]/r),rn(e,t[5]/n),rn(e,t[4]/r)}var fp=["exclude","combine","subtract","intersect"];function dp(e,t,r,n,a){for(var i=e.offset+a,o=t.paths,s=void 0;i-e.offset>=26;){var c=Fe(e);switch(c){case 0:case 3:{Fe(e);var u=ct(e),f=Fe(e);$e(e,18),s={open:c===3,knots:[],fillRule:f===2?"non-zero":"even-odd"},u!==-1&&(s.operation=fp[u]),o.push(s);break}case 1:case 2:case 4:case 5:s.knots.push({linked:c===1||c===4,points:Zb(e,r,n)});break;case 6:$e(e,24);break;case 7:{var h=Qr(e),d=Qr(e),p=Qr(e),w=Qr(e),m=Qr(e);$e(e,4),t.clipboard={top:h,left:d,bottom:p,right:w,resolution:m};break}case 8:t.fillStartsWithAllPixels=!!Fe(e),$e(e,22);break;default:throw new Error("Invalid vmsk section")}}return o}Ke("vmsk",Tt("vectorMask"),function(e,t,r,n){var a=n.width,i=n.height;if(we(e)!==3)throw new Error("Invalid vmsk version");t.vectorMask={paths:[]};var o=t.vectorMask,s=we(e);o.invert=(s&1)!==0,o.notLink=(s&2)!==0,o.disable=(s&4)!==0,dp(e,o,a,i,r()),$e(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);Pe(e,3),Pe(e,o),xe(e,6),kt(e,24);var s=i.clipboard;s&&(xe(e,7),rn(e,s.top),rn(e,s.left),rn(e,s.bottom),rn(e,s.right),rn(e,s.resolution),kt(e,4)),xe(e,8),xe(e,i.fillStartsWithAllPixels?1:0),kt(e,22);for(var c=0,u=i.paths;c<u.length;c++){var f=u[c];xe(e,f.open?3:0),xe(e,f.knots.length),xe(e,f.operation?fp.indexOf(f.operation):-1),xe(e,f.fillRule==="non-zero"?2:1),kt(e,18);for(var h=f.open?4:1,d=f.open?5:2,p=0,w=f.knots;p<w.length;p++){var m=w[p],_=m.linked,y=m.points;xe(e,_?h:d),Kb(e,y,n,a)}}}),ri("vsms","vmsk"),Ke("vowv",Tt("vowv"),function(e,t){t.vowv=we(e)},function(e,t){Pe(e,t.vowv)}),Ke("vogk",Tt("vectorOrigination"),function(e,t,r){if(qe(e)!==1)throw new Error("Invalid vogk version");var n=dt(e);t.vectorOrigination={keyDescriptorList:[]};for(var a=0,i=n.keyDescriptorList;a<i.length;a++){var o=i[a],s={};o.keyShapeInvalidated!=null&&(s.keyShapeInvalidated=o.keyShapeInvalidated),o.keyOriginType!=null&&(s.keyOriginType=o.keyOriginType),o.keyOriginResolution!=null&&(s.keyOriginResolution=o.keyOriginResolution),o.keyOriginShapeBBox&&(s.keyOriginShapeBoundingBox={top:Yn(o.keyOriginShapeBBox["Top "]),left:Yn(o.keyOriginShapeBBox.Left),bottom:Yn(o.keyOriginShapeBBox.Btom),right:Yn(o.keyOriginShapeBBox.Rght)});var c=o.keyOriginRRectRadii;c&&(s.keyOriginRRectRadii={topRight:Et(c.topRight),topLeft:Et(c.topLeft),bottomLeft:Et(c.bottomLeft),bottomRight:Et(c.bottomRight)});var u=o.keyOriginBoxCorners;u&&(s.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 f=o.Trnf;f&&(s.transform=[f.xx,f.xy,f.yx,f.yy,f.tx,f.ty]),t.vectorOrigination.keyDescriptorList.push(s)}$e(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 s=i.keyOriginRRectRadii;s&&(o.keyOriginRRectRadii={unitValueQuadVersion:1,topRight:Nt(s.topRight,"topRight"),topLeft:Nt(s.topLeft,"topLeft"),bottomLeft:Nt(s.bottomLeft,"bottomLeft"),bottomRight:Nt(s.bottomRight,"bottomRight")});var c=i.keyOriginShapeBoundingBox;c&&(o.keyOriginShapeBBox={unitValueQuadVersion:1,"Top ":Nt(c.top,"top"),Left:Nt(c.left,"left"),Btom:Nt(c.bottom,"bottom"),Rght:Nt(c.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 f=i.transform;f&&f.length===6&&(o.Trnf={xx:f[0],xy:f[1],yx:f[2],yy:f[3],tx:f[4],ty:f[5]}),i.keyShapeInvalidated!=null&&(o.keyShapeInvalidated=i.keyShapeInvalidated),o.keyOriginIndex=a}Je(e,1),mt(e,"","null",n)}),Ke("lmfx",function(e){return e.effects!==void 0&&xp(e.effects)},function(e,t,r){var n=we(e);if(n!==0)throw new Error("Invalid lmfx version");var a=dt(e);t.effects=Li(a,!!e.logMissingFeatures),$e(e,r())},function(e,t,r,n){var a=Oi(t.effects,!!n.logMissingFeatures,!0);Pe(e,0),mt(e,"","null",a)}),Ke("lrFX",Tt("effects"),function(e,t,r){t.effects||(t.effects=Fb(e)),$e(e,r())},function(e,t){Nb(e,t.effects)}),Ke("luni",Tt("name"),function(e,t,r){if(r()>4){var n=we(e);r()>=n*2?t.name=Cs(e,n):e.logDevFeatures&&e.log("name in luni section is too long")}else e.logDevFeatures&&e.log("empty luni section");$e(e,r())},function(e,t){Pr(e,t.name)}),Ke("lnsr",Tt("nameSource"),function(e,t){return t.nameSource=Mt(e)},function(e,t){return et(e,t.nameSource)}),Ke("lyid",Tt("id"),function(e,t){t.id=we(e)},function(e,t,r,n){for(var a=t.id;n.layerIds.has(a);)a+=100;Pe(e,a),n.layerIds.add(a),n.layerToId.set(t,a)}),Ke("lsct",Tt("sectionDivider"),function(e,t,r){t.sectionDivider={type:we(e)},r()&&(gn(e,"8BIM"),t.sectionDivider.key=Mt(e)),r()&&(t.sectionDivider.subType=we(e))},function(e,t){Pe(e,t.sectionDivider.type),t.sectionDivider.key&&(et(e,"8BIM"),et(e,t.sectionDivider.key),t.sectionDivider.subType!==void 0&&Pe(e,t.sectionDivider.subType))}),ri("lsdk","lsct"),Ke("clbl",Tt("blendClippendElements"),function(e,t){t.blendClippendElements=!!Le(e),$e(e,3)},function(e,t){ze(e,t.blendClippendElements?1:0),kt(e,3)}),Ke("infx",Tt("blendInteriorElements"),function(e,t){t.blendInteriorElements=!!Le(e),$e(e,3)},function(e,t){ze(e,t.blendInteriorElements?1:0),kt(e,3)}),Ke("knko",Tt("knockout"),function(e,t){t.knockout=!!Le(e),$e(e,3)},function(e,t){ze(e,t.knockout?1:0),kt(e,3)}),Ke("lmgm",Tt("layerMaskAsGlobalMask"),function(e,t){t.layerMaskAsGlobalMask=!!Le(e),$e(e,3)},function(e,t){ze(e,t.layerMaskAsGlobalMask?1:0),kt(e,3)}),Ke("lspf",Tt("protected"),function(e,t){var r=we(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);Pe(e,r)}),Ke("lclr",Tt("layerColor"),function(e,t){var r=Fe(e);$e(e,6),t.layerColor=Zd[r]},function(e,t){var r=Zd.indexOf(t.layerColor);xe(e,r===-1?0:r),kt(e,6)}),Ke("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=we(e),a=function(o){gn(e,"8BIM");var s=Mt(e);Le(e),$e(e,3),Nr(e,1,function(c){if(s==="cust"){var u=dt(e);u.layerTime!==void 0&&(t.timestamp=u.layerTime)}else if(s==="mlst"){var u=dt(e);t.animationFrames=[];for(var f=0;f<u.LaSt.length;f++){var h=u.LaSt[f],d={frames:h.FrLs};h.enab!==void 0&&(d.enable=h.enab),h.Ofst&&(d.offset=Fi(h.Ofst)),h.FXRf&&(d.referencePoint=Fi(h.FXRf)),h.Lefx&&(d.effects=Li(h.Lefx,!!e.logMissingFeatures)),h.blendOptions&&h.blendOptions.Opct&&(d.opacity=Ye(h.blendOptions.Opct)),t.animationFrames.push(d)}}else if(s==="mdyn"){Fe(e);var p=Le(e),w=Le(e);t.animationFrameFlags={propagateFrameOne:!p,unifyLayerPosition:(w&1)!==0,unifyLayerStyle:(w&2)!==0,unifyLayerVisibility:(w&4)!==0}}else if(s==="tmln"){var u=dt(e),m=u.timeScope,_={start:br(m.Strt),duration:br(m.duration),inTime:br(m.inTime),outTime:br(m.outTime),autoScope:u.autoScope,audioLevel:u.audioLevel};u.trackList&&(_.tracks=A1(u.trackList,!!e.logMissingFeatures)),t.timeline=_}else if(s==="cmls"){var u=dt(e);t.comps={settings:[]},u.origFXRefPoint&&(t.comps.originalEffectsReferencePoint={x:u.origFXRefPoint.Hrzn,y:u.origFXRefPoint.Vrtc});for(var y=0,g=u.layerSettings;y<g.length;y++){var b=g[y];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(s==="extn"){var u=dt(e);e.logMissingFeatures&&e.log('Unhandled "shmd" section key',s)}else e.logMissingFeatures&&e.log('Unhandled "shmd" section key',s);$e(e,c())})},i=0;i<n;i++)a();$e(e,r())},function(e,t,r,n){var a=t.animationFrames,i=t.animationFrameFlags,o=t.timestamp,s=t.timeline,c=t.comps,u=0;a&&u++,i&&u++,s&&u++,o!==void 0&&u++,c&&u++,Pe(e,u),a&&(et(e,"8BIM"),et(e,"mlst"),ze(e,0),kt(e,3),sr(e,2,function(){for(var f,h={LaID:(f=t.id)!==null&&f!==void 0?f:0,LaSt:[]},d=0;d<a.length;d++){var p=a[d],w={};p.enable!==void 0&&(w.enab=p.enable),w.FrLs=p.frames,p.offset&&(w.Ofst=Ni(p.offset)),p.referencePoint&&(w.FXRf=Ni(p.referencePoint)),p.effects&&(w.Lefx=Oi(p.effects,!1,!1)),p.opacity!==void 0&&(w.blendOptions={Opct:nr(p.opacity)}),h.LaSt.push(w)}mt(e,"","null",h)},!0)),i&&(et(e,"8BIM"),et(e,"mdyn"),ze(e,0),kt(e,3),sr(e,2,function(){xe(e,0),ze(e,i.propagateFrameOne?0:15),ze(e,(i.unifyLayerPosition?1:0)|(i.unifyLayerStyle?2:0)|(i.unifyLayerVisibility?4:0))})),s&&(et(e,"8BIM"),et(e,"tmln"),ze(e,0),kt(e,3),sr(e,2,function(){var f={Vrsn:1,timeScope:{Vrsn:1,Strt:s.start,duration:s.duration,inTime:s.inTime,outTime:s.outTime},autoScope:s.autoScope,audioLevel:s.audioLevel};s.tracks&&(f.trackList=B1(s.tracks));var h=n.layerToId.get(t)||t.id;if(!h)throw new Error("You need to provide layer.id value whan writing document with animations");f.LyrI=h,mt(e,"","null",f,"anim")},!0)),o!==void 0&&(et(e,"8BIM"),et(e,"cust"),ze(e,0),kt(e,3),sr(e,2,function(){var f={layerTime:o};mt(e,"","metadata",f)},!0)),c&&(et(e,"8BIM"),et(e,"cmls"),ze(e,0),kt(e,3),sr(e,2,function(){var f=n.layerToId.get(t)||t.id;if(!f)throw new Error("You need to provide layer.id value whan writing document with layer comps");var h={};c.originalEffectsReferencePoint&&(h.origFXRefPoint={Hrzn:c.originalEffectsReferencePoint.x,Vrtc:c.originalEffectsReferencePoint.y}),h.LyrI=f,h.layerSettings=[];for(var d=0,p=c.settings;d<p.length;d++){var w=p[d],m={};w.enabled!==void 0&&(m.enab=w.enabled),w.offset&&(m.Ofst={Hrzn:w.offset.x,Vrtc:w.offset.y}),w.effectsReferencePoint&&(m.FXRefPoint={Hrzn:w.effectsReferencePoint.x,Vrtc:w.effectsReferencePoint.y}),m.compList=w.compList,h.layerSettings.push(m)}mt(e,"","null",h)},!0))}),Ke("PxSc",function(){return!1},function(e,t){var r=dt(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};mt(e,"","PixelSource",n)}),Ke("vstk",Tt("vectorStroke"),function(e,t,r){var n=dt(e);t.vectorStroke={strokeEnabled:n.strokeEnabled,fillEnabled:n.fillEnabled,lineWidth:Et(n.strokeStyleLineWidth),lineDashOffset:Et(n.strokeStyleLineDashOffset),miterLimit:n.strokeStyleMiterLimit,lineCapType:Y1.decode(n.strokeStyleLineCapType),lineJoinType:J1.decode(n.strokeStyleLineJoinType),lineAlignment:Q1.decode(n.strokeStyleLineAlignment),scaleLock:n.strokeStyleScaleLock,strokeAdjust:n.strokeStyleStrokeAdjust,lineDashSet:n.strokeStyleLineDashSet.map(Et),blendMode:wr.decode(n.strokeStyleBlendMode),opacity:Ye(n.strokeStyleOpacity),content:Pi(n.strokeStyleContent),resolution:n.strokeStyleResolution},$e(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:Y1.encode(i.lineCapType),strokeStyleLineJoinType:J1.encode(i.lineJoinType),strokeStyleLineAlignment:Q1.encode(i.lineAlignment),strokeStyleScaleLock:!!i.scaleLock,strokeStyleStrokeAdjust:!!i.strokeAdjust,strokeStyleLineDashSet:i.lineDashSet||[],strokeStyleBlendMode:wr.encode(i.blendMode),strokeStyleOpacity:nr((n=i.opacity)!==null&&n!==void 0?n:1),strokeStyleContent:Ri(i.content||{type:"color",color:{r:0,g:0,b:0}}).descriptor,strokeStyleResolution:(a=i.resolution)!==null&&a!==void 0?a:72};mt(e,"","strokeStyle",o)}),Ke("artb",Tt("artboard"),function(e,t,r){var n=dt(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:Kr(n["Clr "]),backgroundType:n.artboardBackgroundType},$e(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 ":Yr(n.color),artboardBackgroundType:(r=n.backgroundType)!==null&&r!==void 0?r:1};mt(e,"","artboard",i)}),Ke("sn2P",Tt("usingAlignedRendering"),function(e,t){return t.usingAlignedRendering=!!we(e)},function(e,t){return Pe(e,t.usingAlignedRendering?1:0)});var ni=["unknown","vector","raster","image stack"];function hp(e){var t,r,n,a,i,o,s=R(R({style:xs.decode(e.warpStyle)},e.warpValues?{values:e.warpValues}:{value:e.warpValue||0}),{perspective:e.warpPerspective||0,perspectiveOther:e.warpPerspectiveOther||0,rotate:$i.decode(e.warpRotate),bounds:e.bounds&&{top:Yn(e.bounds["Top "]),left:Yn(e.bounds.Left),bottom:Yn(e.bounds.Btom),right:Yn(e.bounds.Rght)},uOrder:e.uOrder,vOrder:e.vOrder});(e.deformNumRows!=null||e.deformNumCols!=null)&&(s.deformNumRows=e.deformNumRows,s.deformNumCols=e.deformNumCols);var c=e.customEnvelopeWarp;if(c){s.customEnvelopeWarp={meshPoints:[]};for(var u=((t=c.meshPoints.find(function(d){return d.type==="Hrzn"}))===null||t===void 0?void 0:t.values)||[],f=((r=c.meshPoints.find(function(d){return d.type==="Vrtc"}))===null||r===void 0?void 0:r.values)||[],h=0;h<u.length;h++)s.customEnvelopeWarp.meshPoints.push({x:u[h],y:f[h]});(c.quiltSliceX||c.quiltSliceY)&&(s.customEnvelopeWarp.quiltSliceX=((a=(n=c.quiltSliceX)===null||n===void 0?void 0:n[0])===null||a===void 0?void 0:a.values)||[],s.customEnvelopeWarp.quiltSliceY=((o=(i=c.quiltSliceY)===null||i===void 0?void 0:i[0])===null||o===void 0?void 0:o.values)||[])}return s}function Vs(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 _o(e){var t=e.bounds,r=R(R({warpStyle:xs.encode(e.style)},e.values?{warpValues:e.values}:{warpValue:e.value||0}),{warpPerspective:e.perspective||0,warpPerspectiveOther:e.perspectiveOther||0,warpRotate:$i.encode(e.rotate),bounds:{"Top ":Nt(t&&t.top||{units:"Pixels",value:0},"bounds.top"),Left:Nt(t&&t.left||{units:"Pixels",value:0},"bounds.left"),Btom:Nt(t&&t.bottom||{units:"Pixels",value:0},"bounds.bottom"),Rght:Nt(t&&t.right||{units:"Pixels",value:0},"bounds.right")},uOrder:e.uOrder||0,vOrder:e.vOrder||0}),n=Vs(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(c){return c.x})},{type:"Vrtc",values:o.map(function(c){return c.y})}]}}else r.customEnvelopeWarp={_name:"",_classID:"customEnvelopeWarp",meshPoints:[{type:"Hrzn",values:o.map(function(s){return s.x})},{type:"Vrtc",values:o.map(function(s){return s.y})}]}}return r}Ke("PlLd",Tt("placedLayer"),function(e,t,r){if(Mt(e)!=="plcL")throw new Error("Invalid PlLd signature");if(qe(e)!==3)throw new Error("Invalid PlLd version");var n=en(e,1),a=qe(e),i=qe(e);qe(e);var o=qe(e);if(!ni[o])throw new Error("Invalid PlLd type");for(var s=[],c=0;c<8;c++)s.push(Wr(e));var u=qe(e);if(u!==0)throw new Error("Invalid Warp version ".concat(u));var f=dt(e);t.placedLayer=t.placedLayer||{id:n,type:ni[o],pageNumber:a,totalPages:i,transform:s,warp:hp(f)},$e(e,r())},function(e,t){var r=t.placedLayer;if(et(e,"plcL"),Je(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(ta(e,r.id,1),Je(e,1),Je(e,1),Je(e,16),ni.indexOf(r.type)===-1)throw new Error("Invalid placedLayer type");Je(e,ni.indexOf(r.type));for(var n=0;n<8;n++)Xr(e,r.transform[n]);Je(e,0);var a=mp(r),i=Vs(a),o=i?"quiltWarp":"warp";mt(e,"",o,_o(a),o)});function Yb(e){return new Float32Array(e.buffer.slice(e.byteOffset),0,e.byteLength/4)}function Jb(e){return new Uint32Array(e.buffer.slice(e.byteOffset),0,e.byteLength/4)}function $s(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function xo(e){for(var t=[],r=0;r<e.length;r+=2)t.push({x:e[r],y:e[r+1]});return t}function Gi(e){for(var t=[],r=0;r<e.length;r++)t.push(e[r].x,e[r].y);return t}function pp(e){return xo(Yb(e))}function ji(e){return{x:Et(e.Hrzn),y:Et(e.Vrtc)}}function qi(e){return{_name:"",_classID:"Pnt ",Hrzn:Nt(e.x,"x"),Vrtc:Nt(e.y,"y")}}function Qb(e,t){var r={name:e["Nm "],opacity:Ye(e.blendOptions.Opct),blendMode:wr.decode(e.blendOptions["Md "]),enabled:e.enab,hasOptions:e.hasoptions,foregroundColor:Kr(e.FrgC),backgroundColor:Kr(e.BckC)};if("Fltr"in e)switch(e.Fltr._classID){case"boxblur":return R(R({},r),{type:"box blur",filter:{radius:Et(e.Fltr["Rds "])}});case"GsnB":return R(R({},r),{type:"gaussian blur",filter:{radius:Et(e.Fltr["Rds "])}});case"MtnB":return R(R({},r),{type:"motion blur",filter:{angle:e.Fltr.Angl,distance:Et(e.Fltr.Dstn)}});case"RdlB":return R(R({},r),{type:"radial blur",filter:{amount:e.Fltr.Amnt,method:eh.decode(e.Fltr.BlrM),quality:th.decode(e.Fltr.BlrQ)}});case"shapeBlur":return R(R({},r),{type:"shape blur",filter:{radius:Et(e.Fltr["Rds "]),customShape:{name:e.Fltr.customShape["Nm "],id:e.Fltr.customShape.Idnt}}});case"SmrB":return R(R({},r),{type:"smart blur",filter:{radius:e.Fltr["Rds "],threshold:e.Fltr.Thsh,quality:nh.decode(e.Fltr.SmBQ),mode:rh.decode(e.Fltr.SmBM)}});case"surfaceBlur":return R(R({},r),{type:"surface blur",filter:{radius:Et(e.Fltr["Rds "]),threshold:e.Fltr.Thsh}});case"Dspl":return R(R({},r),{type:"displace",filter:{horizontalScale:e.Fltr.HrzS,verticalScale:e.Fltr.VrtS,displacementMap:ah.decode(e.Fltr.DspM),undefinedAreas:Za.decode(e.Fltr.UndA),displacementFile:{signature:e.Fltr.DspF.sig,path:e.Fltr.DspF.path}}});case"Pnch":return R(R({},r),{type:"pinch",filter:{amount:e.Fltr.Amnt}});case"Plr ":return R(R({},r),{type:"polar coordinates",filter:{conversion:ih.decode(e.Fltr.Cnvr)}});case"Rple":return R(R({},r),{type:"ripple",filter:{amount:e.Fltr.Amnt,size:oh.decode(e.Fltr.RplS)}});case"Shr ":return R(R({},r),{type:"shear",filter:{shearPoints:e.Fltr.ShrP.map(function(s){return{x:s.Hrzn,y:s.Vrtc}}),shearStart:e.Fltr.ShrS,shearEnd:e.Fltr.ShrE,undefinedAreas:Za.decode(e.Fltr.UndA)}});case"Sphr":return R(R({},r),{type:"spherize",filter:{amount:e.Fltr.Amnt,mode:lh.decode(e.Fltr.SphM)}});case"Twrl":return R(R({},r),{type:"twirl",filter:{angle:e.Fltr.Angl}});case"Wave":return R(R({},r),{type:"wave",filter:{numberOfGenerators:e.Fltr.NmbG,type:sh.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:Za.decode(e.Fltr.UndA)}});case"ZgZg":return R(R({},r),{type:"zigzag",filter:{amount:e.Fltr.Amnt,ridges:e.Fltr.NmbR,style:ch.decode(e.Fltr.ZZTy)}});case"AdNs":return R(R({},r),{type:"add noise",filter:{amount:Ye(e.Fltr.Nose),distribution:uh.decode(e.Fltr.Dstr),monochromatic:e.Fltr.Mnch,randomSeed:e.Fltr.FlRs}});case"DstS":return R(R({},r),{type:"dust and scratches",filter:{radius:e.Fltr["Rds "],threshold:e.Fltr.Thsh}});case"Mdn ":return R(R({},r),{type:"median",filter:{radius:Et(e.Fltr["Rds "])}});case"denoise":return R(R({},r),{type:"reduce noise",filter:{preset:e.Fltr.preset,removeJpegArtifact:e.Fltr.removeJPEGArtifact,reduceColorNoise:Ye(e.Fltr.ClNs),sharpenDetails:Ye(e.Fltr.Shrp),channelDenoise:e.Fltr.channelDenoise.map(function(s){return R({channels:s.Chnl.map(Ui.decode),amount:s.Amnt},s.EdgF?{preserveDetails:s.EdgF}:{})})}});case"ClrH":return R(R({},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 R(R({},r),{type:"crystallize",filter:{cellSize:e.Fltr.ClSz,randomSeed:e.Fltr.FlRs}});case"Mztn":return R(R({},r),{type:"mezzotint",filter:{type:fh.decode(e.Fltr.MztT),randomSeed:e.Fltr.FlRs}});case"Msc ":return R(R({},r),{type:"mosaic",filter:{cellSize:Et(e.Fltr.ClSz)}});case"Pntl":return R(R({},r),{type:"pointillize",filter:{cellSize:e.Fltr.ClSz,randomSeed:e.Fltr.FlRs}});case"Clds":return R(R({},r),{type:"clouds",filter:{randomSeed:e.Fltr.FlRs}});case"DfrC":return R(R({},r),{type:"difference clouds",filter:{randomSeed:e.Fltr.FlRs}});case"Fbrs":return R(R({},r),{type:"fibers",filter:{variance:e.Fltr.Vrnc,strength:e.Fltr.Strg,randomSeed:e.Fltr.RndS}});case"LnsF":return R(R({},r),{type:"lens flare",filter:{brightness:e.Fltr.Brgh,position:{x:e.Fltr.FlrC.Hrzn,y:e.Fltr.FlrC.Vrtc},lensType:dh.decode(e.Fltr["Lns "])}});case"smartSharpen":return R(R({},r),{type:"smart sharpen",filter:{amount:Ye(e.Fltr.Amnt),radius:Et(e.Fltr["Rds "]),threshold:e.Fltr.Thsh,angle:e.Fltr.Angl,moreAccurate:e.Fltr.moreAccurate,blur:hh.decode(e.Fltr.blur),preset:e.Fltr.preset,shadow:{fadeAmount:Ye(e.Fltr.sdwM.Amnt),tonalWidth:Ye(e.Fltr.sdwM.Wdth),radius:e.Fltr.sdwM["Rds "]},highlight:{fadeAmount:Ye(e.Fltr.hglM.Amnt),tonalWidth:Ye(e.Fltr.hglM.Wdth),radius:e.Fltr.hglM["Rds "]}}});case"UnsM":return R(R({},r),{type:"unsharp mask",filter:{amount:Ye(e.Fltr.Amnt),radius:Et(e.Fltr["Rds "]),threshold:e.Fltr.Thsh}});case"Dfs ":return R(R({},r),{type:"diffuse",filter:{mode:ph.decode(e.Fltr["Md "]),randomSeed:e.Fltr.FlRs}});case"Embs":return R(R({},r),{type:"emboss",filter:{angle:e.Fltr.Angl,height:e.Fltr.Hght,amount:e.Fltr.Amnt}});case"Extr":return R(R({},r),{type:"extrude",filter:{type:mh.decode(e.Fltr.ExtT),size:e.Fltr.ExtS,depth:e.Fltr.ExtD,depthMode:vh.decode(e.Fltr.ExtR),randomSeed:e.Fltr.FlRs,solidFrontFaces:e.Fltr.ExtF,maskIncompleteBlocks:e.Fltr.ExtM}});case"Tls ":return R(R({},r),{type:"tiles",filter:{numberOfTiles:e.Fltr.TlNm,maximumOffset:e.Fltr.TlOf,fillEmptyAreaWith:gh.decode(e.Fltr.FlCl),randomSeed:e.Fltr.FlRs}});case"TrcC":return R(R({},r),{type:"trace contour",filter:{level:e.Fltr["Lvl "],edge:yh.decode(e.Fltr["Edg "])}});case"Wnd ":return R(R({},r),{type:"wind",filter:{method:bh.decode(e.Fltr.WndM),direction:wh.decode(e.Fltr.Drct)}});case"Dntr":return R(R({},r),{type:"de-interlace",filter:{eliminate:_h.decode(e.Fltr.IntE),newFieldsBy:xh.decode(e.Fltr.IntC)}});case"Cstm":return R(R({},r),{type:"custom",filter:{scale:e.Fltr["Scl "],offset:e.Fltr.Ofst,matrix:e.Fltr.Mtrx}});case"HghP":return R(R({},r),{type:"high pass",filter:{radius:Et(e.Fltr["Rds "])}});case"Mxm ":return R(R({},r),{type:"maximum",filter:{radius:Et(e.Fltr["Rds "])}});case"Mnm ":return R(R({},r),{type:"minimum",filter:{radius:Et(e.Fltr["Rds "])}});case"Ofst":return R(R({},r),{type:"offset",filter:{horizontal:e.Fltr.Hrzn,vertical:e.Fltr.Vrtc,undefinedAreas:kh.decode(e.Fltr["Fl "])}});case"rigidTransform":return R(R({},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(s){return{rigidType:s.rigidType,originalVertexArray:pp(s.originalVertexArray),deformedVertexArray:pp(s.deformedVertexArray),indexArray:Array.from(Jb(s.indexArray)),pinOffsets:xo(s.pinOffsets),posFinalPins:xo(s.posFinalPins),pinVertexIndices:s.pinVertexIndices,selectedPin:s.selectedPin,pinPosition:xo(s.PinP),pinRotation:s.PnRt,pinOverlay:s.PnOv,pinDepth:s.PnDp,meshQuality:s.meshQuality,meshExpansion:s.meshExpansion,meshRigidity:s.meshRigidity,imageResolution:s.imageResolution,meshBoundaryPath:{pathComponents:s.meshBoundaryPath.pathComponents.map(function(c){return{shapeOperation:c.shapeOperation.split(".")[1],paths:c.SbpL.map(function(u){return{closed:u.Clsp,points:u["Pts "].map(function(f){return{anchor:ji(f.Anch),forward:ji(f["Fwd "]),backward:ji(f["Bwd "]),smooth:f.Smoo}})}})}})}}})}});case"PbPl":{for(var n=[],a=e.Fltr,i=0;i<Or.length&&a["PN".concat(Or[i],"a")];i++)for(var o=0;o<Or.length&&a["PN".concat(Or[i]).concat(Or[o])];o++)n.push({name:a["PN".concat(Or[i]).concat(Or[o])],value:a["PF".concat(Or[i]).concat(Or[o])]});return R(R({},r),{type:"oil paint plugin",filter:{name:e.Fltr.KnNm,gpu:e.Fltr.GpuY,lighting:e.Fltr.LIWy,parameters:n}})}case"HsbP":return R(R({},r),{type:"hsb/hsl",filter:{inputMode:lo.decode(e.Fltr.Inpt),rowOrder:lo.decode(e.Fltr.Otpt)}});case"oilPaint":return R(R({},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 R(R({},r),{type:"liquify",filter:{liquifyMesh:e.Fltr.LqMe}});case"perspectiveWarpTransform":return R(R({},r),{type:"perspective warp",filter:{vertices:e.Fltr.vertices.map(ji),warpedVertices:e.Fltr.warpedVertices.map(ji),quads:e.Fltr.quads.map(function(s){return s.indices})}});case"Crvs":return R(R({},r),{type:"curves",filter:R({presetKind:Sh.decode(e.Fltr.presetKind)},e.Fltr.Adjs?{adjustments:e.Fltr.Adjs.map(function(s){var c=s.Chnl.map(Ui.decode);if(s["Crv "])return{channels:c,curve:s["Crv "].map(function(u){var f={x:u.Hrzn,y:u.Vrtc};return u.Cnty&&(f.curved=!0),f})};if(s.Mpng)return{channels:c,values:s.Mpng};throw new Error("Unknown curve adjustment")})}:{})});case"BrgC":return R(R({},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 R(R({},r),{type:"average"});case 1114403360:return R(R({},r),{type:"blur"});case 1114403405:return R(R({},r),{type:"blur more"});case 1148416099:return R(R({},r),{type:"despeckle"});case 1180922912:return R(R({},r),{type:"facet"});case 1181902701:return R(R({},r),{type:"fragment"});case 1399353968:return R(R({},r),{type:"sharpen"});case 1399353925:return R(R({},r),{type:"sharpen edges"});case 1399353933:return R(R({},r),{type:"sharpen more"});case 1181639749:return R(R({},r),{type:"find edges"});case 1399616122:return R(R({},r),{type:"solarize"});case 1314149187:return R(R({},r),{type:"ntsc colors"});case 1231976050:return R(R({},r),{type:"invert"});default:if(t.throwForMissingFeatures)throw new Error("Unknown filterID: ".concat(e.filterID))}}function e9(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 Qb(r,t)}).filter(function(r){return!!r})}}function yn(e){return Nt(e.radius,"radius")}function t9(e){var t={_name:"",_classID:"filterFX","Nm ":e.name,blendOptions:{_name:"",_classID:"blendOptions",Opct:qr(e.opacity),"Md ":wr.encode(e.blendMode)},enab:e.enabled,hasoptions:e.hasOptions,FrgC:Yr(e.foregroundColor),BckC:Yr(e.backgroundColor)};switch(e.type){case"average":return R(R({},t),{filterID:1098281575});case"blur":return R(R({},t),{filterID:1114403360});case"blur more":return R(R({},t),{filterID:1114403405});case"box blur":return R(R({},t),{Fltr:{_name:"Box Blur",_classID:"boxblur","Rds ":yn(e.filter)},filterID:697});case"gaussian blur":return R(R({},t),{Fltr:{_name:"Gaussian Blur",_classID:"GsnB","Rds ":yn(e.filter)},filterID:1198747202});case"motion blur":return R(R({},t),{Fltr:{_name:"Motion Blur",_classID:"MtnB",Angl:e.filter.angle,Dstn:Nt(e.filter.distance,"distance")},filterID:1299476034});case"radial blur":return R(R({},t),{Fltr:{_name:"Radial Blur",_classID:"RdlB",Amnt:e.filter.amount,BlrM:eh.encode(e.filter.method),BlrQ:th.encode(e.filter.quality)},filterID:1382313026});case"shape blur":return R(R({},t),{Fltr:{_name:"Shape Blur",_classID:"shapeBlur","Rds ":yn(e.filter),customShape:{_name:"",_classID:"customShape","Nm ":e.filter.customShape.name,Idnt:e.filter.customShape.id}},filterID:702});case"smart blur":return R(R({},t),{Fltr:{_name:"Smart Blur",_classID:"SmrB","Rds ":e.filter.radius,Thsh:e.filter.threshold,SmBQ:nh.encode(e.filter.quality),SmBM:rh.encode(e.filter.mode)},filterID:1399681602});case"surface blur":return R(R({},t),{Fltr:{_name:"Surface Blur",_classID:"surfaceBlur","Rds ":yn(e.filter),Thsh:e.filter.threshold},filterID:701});case"displace":return R(R({},t),{Fltr:{_name:"Displace",_classID:"Dspl",HrzS:e.filter.horizontalScale,VrtS:e.filter.verticalScale,DspM:ah.encode(e.filter.displacementMap),UndA:Za.encode(e.filter.undefinedAreas),DspF:{sig:e.filter.displacementFile.signature,path:e.filter.displacementFile.path}},filterID:1148416108});case"pinch":return R(R({},t),{Fltr:{_name:"Pinch",_classID:"Pnch",Amnt:e.filter.amount},filterID:1349411688});case"polar coordinates":return R(R({},t),{Fltr:{_name:"Polar Coordinates",_classID:"Plr ",Cnvr:ih.encode(e.filter.conversion)},filterID:1349284384});case"ripple":return R(R({},t),{Fltr:{_name:"Ripple",_classID:"Rple",Amnt:e.filter.amount,RplS:oh.encode(e.filter.size)},filterID:1383099493});case"shear":return R(R({},t),{Fltr:{_name:"Shear",_classID:"Shr ",ShrP:e.filter.shearPoints.map(function(c){return{_name:"",_classID:"Pnt ",Hrzn:c.x,Vrtc:c.y}}),UndA:Za.encode(e.filter.undefinedAreas),ShrS:e.filter.shearStart,ShrE:e.filter.shearEnd},filterID:1399353888});case"spherize":return R(R({},t),{Fltr:{_name:"Spherize",_classID:"Sphr",Amnt:e.filter.amount,SphM:lh.encode(e.filter.mode)},filterID:1399875698});case"twirl":return R(R({},t),{Fltr:{_name:"Twirl",_classID:"Twrl",Angl:e.filter.angle},filterID:1417114220});case"wave":return R(R({},t),{Fltr:{_name:"Wave",_classID:"Wave",Wvtp:sh.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:Za.encode(e.filter.undefinedAreas),RndS:e.filter.randomSeed},filterID:1466005093});case"zigzag":return R(R({},t),{Fltr:{_name:"ZigZag",_classID:"ZgZg",Amnt:e.filter.amount,NmbR:e.filter.ridges,ZZTy:ch.encode(e.filter.style)},filterID:1516722791});case"add noise":return R(R({},t),{Fltr:{_name:"Add Noise",_classID:"AdNs",Dstr:uh.encode(e.filter.distribution),Nose:qr(e.filter.amount),Mnch:e.filter.monochromatic,FlRs:e.filter.randomSeed},filterID:1097092723});case"despeckle":return R(R({},t),{filterID:1148416099});case"dust and scratches":return R(R({},t),{Fltr:{_name:"Dust & Scratches",_classID:"DstS","Rds ":e.filter.radius,Thsh:e.filter.threshold},filterID:1148417107});case"median":return R(R({},t),{Fltr:{_name:"Median",_classID:"Mdn ","Rds ":yn(e.filter)},filterID:1298427424});case"reduce noise":return R(R({},t),{Fltr:{_name:"Reduce Noise",_classID:"denoise",ClNs:qr(e.filter.reduceColorNoise),Shrp:qr(e.filter.sharpenDetails),removeJPEGArtifact:e.filter.removeJpegArtifact,channelDenoise:e.filter.channelDenoise.map(function(c){return R({_name:"",_classID:"channelDenoiseParams",Chnl:c.channels.map(function(u){return Ui.encode(u)}),Amnt:c.amount},c.preserveDetails?{EdgF:c.preserveDetails}:{})}),preset:e.filter.preset},filterID:633});case"color halftone":return R(R({},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 R(R({},t),{Fltr:{_name:"Crystallize",_classID:"Crst",ClSz:e.filter.cellSize,FlRs:e.filter.randomSeed},filterID:1131574132});case"facet":return R(R({},t),{filterID:1180922912});case"fragment":return R(R({},t),{filterID:1181902701});case"mezzotint":return R(R({},t),{Fltr:{_name:"Mezzotint",_classID:"Mztn",MztT:fh.encode(e.filter.type),FlRs:e.filter.randomSeed},filterID:1299870830});case"mosaic":return R(R({},t),{Fltr:{_name:"Mosaic",_classID:"Msc ",ClSz:Nt(e.filter.cellSize,"cellSize")},filterID:1299407648});case"pointillize":return R(R({},t),{Fltr:{_name:"Pointillize",_classID:"Pntl",ClSz:e.filter.cellSize,FlRs:e.filter.randomSeed},filterID:1349416044});case"clouds":return R(R({},t),{Fltr:{_name:"Clouds",_classID:"Clds",FlRs:e.filter.randomSeed},filterID:1131177075});case"difference clouds":return R(R({},t),{Fltr:{_name:"Difference Clouds",_classID:"DfrC",FlRs:e.filter.randomSeed},filterID:1147564611});case"fibers":return R(R({},t),{Fltr:{_name:"Fibers",_classID:"Fbrs",Vrnc:e.filter.variance,Strg:e.filter.strength,RndS:e.filter.randomSeed},filterID:1180856947});case"lens flare":return R(R({},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 ":dh.encode(e.filter.lensType)},filterID:1282306886});case"sharpen":return R(R({},t),{filterID:1399353968});case"sharpen edges":return R(R({},t),{filterID:1399353925});case"sharpen more":return R(R({},t),{filterID:1399353933});case"smart sharpen":return R(R({},t),{Fltr:{_name:"Smart Sharpen",_classID:"smartSharpen",Amnt:qr(e.filter.amount),"Rds ":yn(e.filter),Thsh:e.filter.threshold,Angl:e.filter.angle,moreAccurate:e.filter.moreAccurate,blur:hh.encode(e.filter.blur),preset:e.filter.preset,sdwM:{_name:"Parameters",_classID:"adaptCorrectTones",Amnt:qr(e.filter.shadow.fadeAmount),Wdth:qr(e.filter.shadow.tonalWidth),"Rds ":e.filter.shadow.radius},hglM:{_name:"Parameters",_classID:"adaptCorrectTones",Amnt:qr(e.filter.highlight.fadeAmount),Wdth:qr(e.filter.highlight.tonalWidth),"Rds ":e.filter.highlight.radius}},filterID:698});case"unsharp mask":return R(R({},t),{Fltr:{_name:"Unsharp Mask",_classID:"UnsM",Amnt:qr(e.filter.amount),"Rds ":yn(e.filter),Thsh:e.filter.threshold},filterID:1433301837});case"diffuse":return R(R({},t),{Fltr:{_name:"Diffuse",_classID:"Dfs ","Md ":ph.encode(e.filter.mode),FlRs:e.filter.randomSeed},filterID:1147564832});case"emboss":return R(R({},t),{Fltr:{_name:"Emboss",_classID:"Embs",Angl:e.filter.angle,Hght:e.filter.height,Amnt:e.filter.amount},filterID:1164796531});case"extrude":return R(R({},t),{Fltr:{_name:"Extrude",_classID:"Extr",ExtS:e.filter.size,ExtD:e.filter.depth,ExtF:e.filter.solidFrontFaces,ExtM:e.filter.maskIncompleteBlocks,ExtT:mh.encode(e.filter.type),ExtR:vh.encode(e.filter.depthMode),FlRs:e.filter.randomSeed},filterID:1165522034});case"find edges":return R(R({},t),{filterID:1181639749});case"solarize":return R(R({},t),{filterID:1399616122});case"tiles":return R(R({},t),{Fltr:{_name:"Tiles",_classID:"Tls ",TlNm:e.filter.numberOfTiles,TlOf:e.filter.maximumOffset,FlCl:gh.encode(e.filter.fillEmptyAreaWith),FlRs:e.filter.randomSeed},filterID:1416393504});case"trace contour":return R(R({},t),{Fltr:{_name:"Trace Contour",_classID:"TrcC","Lvl ":e.filter.level,"Edg ":yh.encode(e.filter.edge)},filterID:1416782659});case"wind":return R(R({},t),{Fltr:{_name:"Wind",_classID:"Wnd ",WndM:bh.encode(e.filter.method),Drct:wh.encode(e.filter.direction)},filterID:1466852384});case"de-interlace":return R(R({},t),{Fltr:{_name:"De-Interlace",_classID:"Dntr",IntE:_h.encode(e.filter.eliminate),IntC:xh.encode(e.filter.newFieldsBy)},filterID:1148089458});case"ntsc colors":return R(R({},t),{filterID:1314149187});case"invert":return R(R({},t),{filterID:1231976050});case"custom":return R(R({},t),{Fltr:{_name:"Custom",_classID:"Cstm","Scl ":e.filter.scale,Ofst:e.filter.offset,Mtrx:e.filter.matrix},filterID:1131639917});case"high pass":return R(R({},t),{Fltr:{_name:"High Pass",_classID:"HghP","Rds ":yn(e.filter)},filterID:1214736464});case"maximum":return R(R({},t),{Fltr:{_name:"Maximum",_classID:"Mxm ","Rds ":yn(e.filter)},filterID:1299737888});case"minimum":return R(R({},t),{Fltr:{_name:"Minimum",_classID:"Mnm ","Rds ":yn(e.filter)},filterID:1299082528});case"offset":return R(R({},t),{Fltr:{_name:"Offset",_classID:"Ofst",Hrzn:e.filter.horizontal,Vrtc:e.filter.vertical,"Fl ":kh.encode(e.filter.undefinedAreas)},filterID:1332114292});case"puppet":return R(R({},t),{Fltr:{_name:"Rigid Transform",_classID:"rigidTransform",null:["Ordn.Trgt"],rigidType:e.filter.rigidType,puppetShapeList:e.filter.puppetShapeList.map(function(c){return{_name:"",_classID:"puppetShape",rigidType:c.rigidType,VrsM:1,VrsN:0,originalVertexArray:$s(new Float32Array(Gi(c.originalVertexArray))),deformedVertexArray:$s(new Float32Array(Gi(c.deformedVertexArray))),indexArray:$s(new Uint32Array(c.indexArray)),pinOffsets:Gi(c.pinOffsets),posFinalPins:Gi(c.posFinalPins),pinVertexIndices:c.pinVertexIndices,PinP:Gi(c.pinPosition),PnRt:c.pinRotation,PnOv:c.pinOverlay,PnDp:c.pinDepth,meshQuality:c.meshQuality,meshExpansion:c.meshExpansion,meshRigidity:c.meshRigidity,imageResolution:c.imageResolution,meshBoundaryPath:{_name:"",_classID:"pathClass",pathComponents:c.meshBoundaryPath.pathComponents.map(function(u){return{_name:"",_classID:"PaCm",shapeOperation:"shapeOperation.".concat(u.shapeOperation),SbpL:u.paths.map(function(f){return{_name:"",_classID:"Sbpl",Clsp:f.closed,"Pts ":f.points.map(function(h){return{_name:"",_classID:"Pthp",Anch:qi(h.anchor),"Fwd ":qi(h.forward),"Bwd ":qi(h.backward),Smoo:h.smooth}})}})}})},selectedPin:c.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,s="".concat(Or[Math.floor(n/Or.length)]).concat(Or[n%Or.length]);r["PN".concat(s)]=i,r["PT".concat(s)]=0,r["PF".concat(s)]=o}return R(R({},t),{Fltr:R({_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 R(R({},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 R(R({},t),{Fltr:{_name:"Liquify",_classID:"LqFy",LqMe:e.filter.liquifyMesh},filterID:1282492025});case"perspective warp":return R(R({},t),{Fltr:{_name:"Perspective Warp",_classID:"perspectiveWarpTransform",vertices:e.filter.vertices.map(qi),warpedVertices:e.filter.warpedVertices.map(qi),quads:e.filter.quads.map(function(c){return{indices:c}})},filterID:442});case"curves":return R(R({},t),{Fltr:R({_name:"Curves",_classID:"Crvs",presetKind:Sh.encode(e.filter.presetKind)},e.filter.adjustments?{Adjs:e.filter.adjustments.map(function(c){return"curve"in c?{_name:"",_classID:"CrvA",Chnl:c.channels.map(Ui.encode),"Crv ":c.curve.map(function(u){return R({_name:"",_classID:"Pnt ",Hrzn:u.x,Vrtc:u.y},u.curved?{Cnty:!0}:{})})}:{_name:"",_classID:"CrvA",Chnl:c.channels.map(Ui.encode),Mpng:c.values}})}:{}),filterID:1131574899});case"brightness/contrast":return R(R({},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 mp(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,s=0,c=r/3,u=r*2/3,f=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:s},{x:a,y:s},{x:i,y:s},{x:o,y:s},{x:n,y:c},{x:a,y:c},{x:i,y:c},{x:o,y:c},{x:n,y:u},{x:a,y:u},{x:i,y:u},{x:o,y:u},{x:n,y:f},{x:a,y:f},{x:i,y:f},{x:o,y:f}]}}}Ke("SoLd",Tt("placedLayer"),function(e,t,r){if(Mt(e)!=="soLD")throw new Error("Invalid SoLd type");var n=qe(e);if(n!==4&&n!==5)throw new Error("Invalid SoLd version");var a=dt(e,!0);t.placedLayer={id:a.Idnt,placed:a.placed,type:ni[a.Type],pageNumber:a.PgNm,totalPages:a.totalPages,frameStep:br(a.frameStep),duration:br(a.duration),frameCount:a.frameCount,transform:a.Trnf,width:a["Sz "].Wdth,height:a["Sz "].Hght,resolution:Et(a.Rslt),warp:hp(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=e9(a.filterFX,e)),$e(e,r())},function(e,t){var r,n;et(e,"soLD"),Je(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=R(R({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:ni.indexOf(a.type),Trnf:a.transform,nonAffineTransform:(n=a.nonAffineTransform)!==null&&n!==void 0?n:a.transform,warp:_o(mp(a)),"Sz ":{_name:"",_classID:"Pnt ",Wdth:a.width||0,Hght:a.height||0},Rslt:a.resolution?Nt(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(s){return t9(s)})}),a.warp&&Vs(a.warp)){var o=_o(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),mt(e,"","null",i,i.quiltWarp?"quiltWarp":"warp")}),ri("SoLE","SoLd"),Ke("fxrp",Tt("referencePoint"),function(e,t){t.referencePoint={x:Wr(e),y:Wr(e)}},function(e,t){Xr(e,t.referencePoint.x),Xr(e,t.referencePoint.y)}),Ke("Lr16",function(){return!1},function(e,t,r,n,a){Ds(e,n,a)},function(e,t){}),Ke("Lr32",function(){return!1},function(e,t,r,n,a){Ds(e,n,a)},function(e,t){}),Ke("LMsk",Tt("userMask"),function(e,t){t.userMask={colorSpace:ar(e),opacity:Fe(e)/255};var r=Le(e);if(r!==128)throw new Error("Invalid flag value");$e(e,1)},function(e,t){var r=t.userMask;ir(e,r.colorSpace),xe(e,hs(r.opacity,0,1)*255),ze(e,128),kt(e,1)}),Ke("Patt",function(e){return!e},function(e,t,r){r()&&$e(e,r())},function(e,t){});function vp(e){var t=qe(e),r=qe(e),n=qe(e),a=qe(e);return{top:t,left:r,bottom:n,right:a}}function gp(e,t){Je(e,t.top),Je(e,t.left),Je(e,t.bottom),Je(e,t.right)}Ke("Anno",function(e){return e.annotations!==void 0},function(e,t,r){var n=Fe(e),a=Fe(e);if(n!==2||a!==1)throw new Error("Invalid Anno version");for(var i=we(e),o=[],s=0;s<i;s++){we(e);var c=Mt(e),u=!!Le(e);Le(e),Fe(e);var f=vp(e),h=vp(e),d=ar(e),p=en(e,2),w=en(e,2),m=en(e,2);we(e),Mt(e);var _=we(e),y=void 0;if(c==="txtA")_>=2&&Fe(e)===65279?y=Cs(e,(_-2)/2):(e.offset-=2,y=vo(e,_)),y=y.replace(/\r/g,`
|
|
270
|
+
`);else if(c==="sndA")y=jt(e,_);else throw new Error("Unknown annotation type");o.push({type:c==="txtA"?"text":"sound",open:u,iconLocation:f,popupLocation:h,color:d,author:p,name:w,date:m,data:y})}t.annotations=o,$e(e,r())},function(e,t){var r=t.annotations;xe(e,2),xe(e,1),Pe(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 s=e.offset;Pe(e,0),et(e,o?"sndA":"txtA"),ze(e,i.open?1:0),ze(e,28),xe(e,1),gp(e,i.iconLocation),gp(e,i.popupLocation),ir(e,i.color),ta(e,i.author||"",2),ta(e,i.name||"",2),ta(e,i.date||"",2);var c=e.offset;Pe(e,0),et(e,o?"sndM":"txtC"),Pe(e,0);var u=e.offset;if(o)nn(e,i.data);else{xe(e,65279);for(var f=i.data.replace(/\n/g,"\r"),h=0;h<f.length;h++)xe(e,f.charCodeAt(h))}e.view.setUint32(s,e.offset-s,!1),e.view.setUint32(c,e.offset-c,!1),e.view.setUint32(u-4,e.offset-u,!1)}});function yp(e){Ke(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=Ps(t),s=t.offset,c=Mt(t),u=qe(t),f=en(t,1),h=Kt(t),d=Mt(t).trim(),p=Mt(t).trim(),w=Ps(t),m=Le(t),_=m?dt(t):void 0,y=c==="liFE"?dt(t):void 0,g={id:f,name:h};if(d&&(g.type=d),p&&(g.creator=p),_&&(g.descriptor={compInfo:{compID:_.compInfo.compID,originalCompID:_.compInfo.originalCompID}}),c==="liFE"&&u>3){var b=qe(t),v=Le(t),E=Le(t),C=Le(t),A=Le(t),k=Wr(t),B=Math.floor(k),T=(k-B)*1e3;g.time=new Date(Date.UTC(b,v,E,C,A,B,T)).toISOString()}var F=c==="liFE"?Ps(t):0;for(c==="liFA"&&$e(t,8),c==="liFD"&&(g.data=jt(t,w)),u>=5&&(g.childDocumentID=Kt(t)),u>=6&&(g.assetModTime=Wr(t)),u>=7&&(g.assetLockedState=Le(t)),c==="liFE"&&u===2&&(g.data=jt(t,F)),t.skipLinkedFilesData&&(g.data=void 0),e==="lnkE"&&(g.linkedFile={fileSize:F,name:(y==null?void 0:y["Nm "])||"",fullPath:(y==null?void 0:y.fullPath)||"",originalPath:(y==null?void 0:y.originalPath)||"",relativePath:(y==null?void 0:y.relPath)||""}),i.linkedFiles.push(g);o%4;)o++;t.offset=s+o}$e(t,n())},function(t,r){for(var n,a,i,o,s,c,u,f,h,d=r,p=0,w=d.linkedFiles;p<w.length;p++){var m=w[p];if(e==="lnkE"==!!m.linkedFile){var _=2;m.assetLockedState!=null?_=7:m.assetModTime!=null?_=6:m.childDocumentID!=null?_=5:e==="lnkE"&&(_=3),Rs(t,0);var y=t.offset;if(et(t,e==="lnkE"?"liFE":m.data?"liFD":"liFA"),Je(t,_),!m.id||typeof m.id!="string"||!/^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$/.test(m.id))throw new Error("Linked file ID must be in a GUID format (example: 20953ddb-9391-11ec-b4f1-c15674f50bc4)");if(ta(t,m.id,1),ga(t,m.name||""),et(t,m.type?"".concat(m.type," ").substring(0,4):" "),et(t,m.creator?"".concat(m.creator," ").substring(0,4):"\0\0\0\0"),Rs(t,m.data?m.data.byteLength:0),m.descriptor&&m.descriptor.compInfo){var g={compInfo:{compID:m.descriptor.compInfo.compID,originalCompID:m.descriptor.compInfo.originalCompID}};ze(t,1),mt(t,"","null",g)}else ze(t,0);if(e==="lnkE"){var g={descVersion:2,"Nm ":(a=(n=m.linkedFile)===null||n===void 0?void 0:n.name)!==null&&a!==void 0?a:"",fullPath:(o=(i=m.linkedFile)===null||i===void 0?void 0:i.fullPath)!==null&&o!==void 0?o:"",originalPath:(c=(s=m.linkedFile)===null||s===void 0?void 0:s.originalPath)!==null&&c!==void 0?c:"",relPath:(f=(u=m.linkedFile)===null||u===void 0?void 0:u.relativePath)!==null&&f!==void 0?f:""};mt(t,"","ExternalFileLink",g);var b=m.time?new Date(m.time):new Date;Je(t,b.getUTCFullYear()),ze(t,b.getUTCMonth()),ze(t,b.getUTCDate()),ze(t,b.getUTCHours()),ze(t,b.getUTCMinutes()),Xr(t,b.getUTCSeconds()+b.getUTCMilliseconds()/1e3)}m.data?nn(t,m.data):Rs(t,((h=m.linkedFile)===null||h===void 0?void 0:h.fileSize)||0),_>=5&&ga(t,m.childDocumentID||""),_>=6&&Xr(t,m.assetModTime||0),_>=7&&ze(t,m.assetLockedState||0);var v=t.offset-y;for(t.view.setUint32(y-4,v,!1);v%4;)v++,ze(t,0)}}})}yp("lnk2"),yp("lnkE"),ri("lnkD","lnk2"),ri("lnk3","lnk2"),Ke("pths",Tt("pathList"),function(e,t){dt(e,!0),t.pathList=[]},function(e,t){var r={pathList:[]};mt(e,"","pathsDataClass",r)}),Ke("lyvr",Tt("version"),function(e,t){return t.version=we(e)},function(e,t){return Pe(e,t.version)}),Ke("lfxs",function(){return!1},function(e,t,r){var n=we(e);if(n!==0)throw new Error("Invalid lfxs version");var a=dt(e);t.effects=Li(a,!!e.logMissingFeatures),$e(e,r())},function(e,t,r,n){var a=Oi(t.effects,!!n.logMissingFeatures,!0);Pe(e,0),mt(e,"","null",a)});function fr(e){return function(t){return!!t.adjustment&&t.adjustment.type===e}}Ke("brit",fr("brightness/contrast"),function(e,t,r){t.adjustment||(t.adjustment={type:"brightness/contrast",brightness:ct(e),contrast:ct(e),meanValue:ct(e),labColorOnly:!!Le(e),useLegacy:!0}),$e(e,r())},function(e,t){var r,n=t.adjustment;xt(e,n.brightness||0),xt(e,n.contrast||0),xt(e,(r=n.meanValue)!==null&&r!==void 0?r:127),ze(e,n.labColorOnly?1:0),kt(e,1)});function ko(e){var t=ct(e),r=ct(e),n=ct(e),a=ct(e),i=ct(e)/100;return{shadowInput:t,highlightInput:r,shadowOutput:n,highlightOutput:a,midtoneInput:i}}function Wi(e,t){xt(e,t.shadowInput),xt(e,t.highlightInput),xt(e,t.shadowOutput),xt(e,t.highlightOutput),xt(e,Math.round(t.midtoneInput*100))}Ke("levl",fr("levels"),function(e,t,r){if(Fe(e)!==2)throw new Error("Invalid levl version");t.adjustment=R(R({},t.adjustment),{type:"levels",rgb:ko(e),red:ko(e),green:ko(e),blue:ko(e)}),$e(e,r())},function(e,t){var r=t.adjustment,n={shadowInput:0,highlightInput:255,shadowOutput:0,highlightOutput:255,midtoneInput:1};xe(e,2),Wi(e,r.rgb||n),Wi(e,r.red||n),Wi(e,r.blue||n),Wi(e,r.green||n);for(var a=0;a<59;a++)Wi(e,n)});function So(e){for(var t=Fe(e),r=[],n=0;n<t;n++){var a=ct(e),i=ct(e);r.push({input:i,output:a})}return r}function Qn(e,t){xe(e,t.length);for(var r=0,n=t;r<n.length;r++){var a=n[r];xe(e,a.output),xe(e,a.input)}}Ke("curv",fr("curves"),function(e,t,r){if(Le(e),Fe(e)!==1)throw new Error("Invalid curv version");Fe(e);var n=Fe(e),a={type:"curves"};n&1&&(a.rgb=So(e)),n&2&&(a.red=So(e)),n&4&&(a.green=So(e)),n&8&&(a.blue=So(e)),t.adjustment=R(R({},t.adjustment),a),$e(e,r())},function(e,t){var r=t.adjustment,n=r.rgb,a=r.red,i=r.green,o=r.blue,s=0,c=0;n&&n.length&&(s|=1,c++),a&&a.length&&(s|=2,c++),i&&i.length&&(s|=4,c++),o&&o.length&&(s|=8,c++),ze(e,0),xe(e,1),xe(e,0),xe(e,s),n&&n.length&&Qn(e,n),a&&a.length&&Qn(e,a),i&&i.length&&Qn(e,i),o&&o.length&&Qn(e,o),et(e,"Crv "),xe(e,4),xe(e,0),xe(e,c),n&&n.length&&(xe(e,0),Qn(e,n)),a&&a.length&&(xe(e,1),Qn(e,a)),i&&i.length&&(xe(e,2),Qn(e,i)),o&&o.length&&(xe(e,3),Qn(e,o))}),Ke("expA",fr("exposure"),function(e,t,r){if(Fe(e)!==1)throw new Error("Invalid expA version");t.adjustment=R(R({},t.adjustment),{type:"exposure",exposure:Jr(e),offset:Jr(e),gamma:Jr(e)}),$e(e,r())},function(e,t){var r=t.adjustment;xe(e,1),tn(e,r.exposure),tn(e,r.offset),tn(e,r.gamma),kt(e,2)}),Ke("vibA",fr("vibrance"),function(e,t,r){var n=dt(e);t.adjustment={type:"vibrance"},n.vibrance!==void 0&&(t.adjustment.vibrance=n.vibrance),n.Strt!==void 0&&(t.adjustment.saturation=n.Strt),$e(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),mt(e,"","null",n)});function ma(e){return{a:ct(e),b:ct(e),c:ct(e),d:ct(e),hue:ct(e),saturation:ct(e),lightness:ct(e)}}function va(e,t){var r=t||{};xt(e,r.a||0),xt(e,r.b||0),xt(e,r.c||0),xt(e,r.d||0),xt(e,r.hue||0),xt(e,r.saturation||0),xt(e,r.lightness||0)}Ke("hue2",fr("hue/saturation"),function(e,t,r){if(Fe(e)!==2)throw new Error("Invalid hue2 version");t.adjustment=R(R({},t.adjustment),{type:"hue/saturation",master:ma(e),reds:ma(e),yellows:ma(e),greens:ma(e),cyans:ma(e),blues:ma(e),magentas:ma(e)}),$e(e,r())},function(e,t){var r=t.adjustment;xe(e,2),va(e,r.master),va(e,r.reds),va(e,r.yellows),va(e,r.greens),va(e,r.cyans),va(e,r.blues),va(e,r.magentas)});function Us(e){return{cyanRed:ct(e),magentaGreen:ct(e),yellowBlue:ct(e)}}function Hs(e,t){xt(e,t.cyanRed||0),xt(e,t.magentaGreen||0),xt(e,t.yellowBlue||0)}Ke("blnc",fr("color balance"),function(e,t,r){t.adjustment={type:"color balance",shadows:Us(e),midtones:Us(e),highlights:Us(e),preserveLuminosity:!!Le(e)},$e(e,r())},function(e,t){var r=t.adjustment;Hs(e,r.shadows||{}),Hs(e,r.midtones||{}),Hs(e,r.highlights||{}),ze(e,r.preserveLuminosity?1:0),kt(e,1)}),Ke("blwh",fr("black & white"),function(e,t,r){var n=dt(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=Kr(n.tintColor)),$e(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:Yr(r.tintColor),bwPresetKind:r.presetKind||0,blackAndWhitePresetFileName:r.presetFileName||""};mt(e,"","null",n)}),Ke("phfl",fr("photo filter"),function(e,t,r){var n=Fe(e);if(n!==2&&n!==3)throw new Error("Invalid phfl version");var a;n===2?a=ar(e):a={l:qe(e)/100,a:qe(e)/100,b:qe(e)/100},t.adjustment={type:"photo filter",color:a,density:we(e)/100,preserveLuminosity:!!Le(e)},$e(e,r())},function(e,t){var r=t.adjustment;xe(e,2),ir(e,r.color||{l:0,a:0,b:0}),Pe(e,(r.density||0)*100),ze(e,r.preserveLuminosity?1:0),kt(e,3)});function Eo(e){var t=ct(e),r=ct(e),n=ct(e);$e(e,2);var a=ct(e);return{red:t,green:r,blue:n,constant:a}}function Xi(e,t){var r=t||{};xt(e,r.red),xt(e,r.green),xt(e,r.blue),kt(e,2),xt(e,r.constant)}Ke("mixr",fr("channel mixer"),function(e,t,r){if(Fe(e)!==1)throw new Error("Invalid mixr version");var n=t.adjustment=R(R({},t.adjustment),{type:"channel mixer",monochrome:!!Fe(e)});n.monochrome||(n.red=Eo(e),n.green=Eo(e),n.blue=Eo(e)),n.gray=Eo(e),$e(e,r())},function(e,t){var r=t.adjustment;xe(e,1),xe(e,r.monochrome?1:0),r.monochrome?(Xi(e,r.gray),kt(e,3*5*2)):(Xi(e,r.red),Xi(e,r.green),Xi(e,r.blue),Xi(e,r.gray))});var bp=rt("colorLookupType","3DLUT",{"3dlut":"3DLUT",abstractProfile:"abstractProfile",deviceLinkProfile:"deviceLinkProfile"}),wp=rt("LUTFormatType","look",{look:"LUTFormatLOOK",cube:"LUTFormatCUBE","3dl":"LUTFormat3DL"}),Co=rt("colorLookupOrder","rgb",{rgb:"rgbOrder",bgr:"bgrOrder"});Ke("clrL",fr("color lookup"),function(e,t,r){if(Fe(e)!==1)throw new Error("Invalid clrL version");var n=dt(e);t.adjustment={type:"color lookup"};var a=t.adjustment;n.lookupType!==void 0&&(a.lookupType=bp.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=wp.decode(n.LUTFormat)),n.dataOrder!==void 0&&(a.dataOrder=Co.decode(n.dataOrder)),n.tableOrder!==void 0&&(a.tableOrder=Co.decode(n.tableOrder)),n.LUT3DFileData!==void 0&&(a.lut3DFileData=n.LUT3DFileData),n.LUT3DFileName!==void 0&&(a.lut3DFileName=n.LUT3DFileName),$e(e,r())},function(e,t){var r=t.adjustment,n={};r.lookupType!==void 0&&(n.lookupType=bp.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=wp.encode(r.lutFormat)),r.dataOrder!==void 0&&(n.dataOrder=Co.encode(r.dataOrder)),r.tableOrder!==void 0&&(n.tableOrder=Co.encode(r.tableOrder)),r.lut3DFileData!==void 0&&(n.LUT3DFileData=r.lut3DFileData),r.lut3DFileName!==void 0&&(n.LUT3DFileName=r.lut3DFileName),xe(e,1),mt(e,"","null",n)}),Ke("nvrt",fr("invert"),function(e,t,r){t.adjustment={type:"invert"},$e(e,r())},function(){}),Ke("post",fr("posterize"),function(e,t,r){t.adjustment={type:"posterize",levels:Fe(e)},$e(e,r())},function(e,t){var r,n=t.adjustment;xe(e,(r=n.levels)!==null&&r!==void 0?r:4),kt(e,2)}),Ke("thrs",fr("threshold"),function(e,t,r){t.adjustment={type:"threshold",level:Fe(e)},$e(e,r())},function(e,t){var r,n=t.adjustment;xe(e,(r=n.level)!==null&&r!==void 0?r:128),kt(e,2)});var _p=["","","","rgb","hsb","","lab"];Ke("grdm",fr("gradient map"),function(e,t,r){var n=Fe(e);if(n!==1&&n!==3)throw new Error("Invalid grdm version");var a={type:"gradient map",gradientType:"solid"};a.reverse=!!Le(e),a.dither=!!Le(e);var i=!!Le(e);if(e.offset--,i){var o=Mt(e);a.method=Xa.decode(o)}a.name=Kt(e),a.colorStops=[],a.opacityStops=[];for(var s=Fe(e),c=0;c<s;c++)a.colorStops.push({location:we(e),midpoint:we(e)/100,color:ar(e)}),$e(e,2);for(var u=Fe(e),c=0;c<u;c++)a.opacityStops.push({location:we(e),midpoint:we(e)/100,opacity:Fe(e)/255});var f=Fe(e);if(f!==2)throw new Error("Invalid grdm expansion count");var h=Fe(e);a.smoothness=h/4096;var d=Fe(e);if(d!==32)throw new Error("Invalid grdm length");a.gradientType=Fe(e)?"noise":"solid",a.randomSeed=we(e),a.addTransparency=!!Fe(e),a.restrictColors=!!Fe(e),a.roughness=we(e)/4096,a.colorModel=_p[Fe(e)]||"rgb",a.min=[Fe(e)/32768,Fe(e)/32768,Fe(e)/32768,Fe(e)/32768],a.max=[Fe(e)/32768,Fe(e)/32768,Fe(e)/32768,Fe(e)/32768],$e(e,r());for(var p=0,w=a.colorStops;p<w.length;p++){var m=w[p];m.location/=h}for(var _=0,y=a.opacityStops;_<y.length;_++){var m=y[_];m.location/=h}t.adjustment=a},function(e,t){var r,n,a,i=t.adjustment;xe(e,i.method!==void 0?3:1),ze(e,i.reverse?1:0),ze(e,i.dither?1:0),i.method!==void 0&&et(e,Xa.encode(i.method)),ga(e,i.name||""),xe(e,i.colorStops&&i.colorStops.length||0);for(var o=Math.round(((r=i.smoothness)!==null&&r!==void 0?r:1)*4096),s=0,c=i.colorStops||[];s<c.length;s++){var u=c[s];Pe(e,Math.round(u.location*o)),Pe(e,Math.round(u.midpoint*100)),ir(e,u.color),kt(e,2)}xe(e,i.opacityStops&&i.opacityStops.length||0);for(var f=0,h=i.opacityStops||[];f<h.length;f++){var u=h[f];Pe(e,Math.round(u.location*o)),Pe(e,Math.round(u.midpoint*100)),xe(e,Math.round(u.opacity*255))}xe(e,2),xe(e,o),xe(e,32),xe(e,i.gradientType==="noise"?1:0),Pe(e,i.randomSeed||0),xe(e,i.addTransparency?1:0),xe(e,i.restrictColors?1:0),Pe(e,Math.round(((n=i.roughness)!==null&&n!==void 0?n:1)*4096));var d=_p.indexOf((a=i.colorModel)!==null&&a!==void 0?a:"rgb");xe(e,d===-1?3:d);for(var p=0;p<4;p++)xe(e,Math.round((i.min&&i.min[p]||0)*32768));for(var p=0;p<4;p++)xe(e,Math.round((i.max&&i.max[p]||0)*32768));kt(e,4)});function zn(e){return{c:ct(e),m:ct(e),y:ct(e),k:ct(e)}}function Fn(e,t){var r=t||{};xt(e,r.c),xt(e,r.m),xt(e,r.y),xt(e,r.k)}Ke("selc",fr("selective color"),function(e,t){if(Fe(e)!==1)throw new Error("Invalid selc version");var r=Fe(e)?"absolute":"relative";$e(e,8),t.adjustment={type:"selective color",mode:r,reds:zn(e),yellows:zn(e),greens:zn(e),cyans:zn(e),blues:zn(e),magentas:zn(e),whites:zn(e),neutrals:zn(e),blacks:zn(e)}},function(e,t){var r=t.adjustment;xe(e,1),xe(e,r.mode==="absolute"?1:0),kt(e,8),Fn(e,r.reds),Fn(e,r.yellows),Fn(e,r.greens),Fn(e,r.cyans),Fn(e,r.blues),Fn(e,r.magentas),Fn(e,r.whites),Fn(e,r.neutrals),Fn(e,r.blacks)}),Ke("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=dt(e);if(n.Vrsn!==1)throw new Error("Invalid CgEd version");"presetFileName"in n?t.adjustment=R(R({},t.adjustment),{presetKind:n.presetKind,presetFileName:n.presetFileName}):"curvesPresetFileName"in n?t.adjustment=R(R({},t.adjustment),{presetKind:n.curvesPresetKind,presetFileName:n.curvesPresetFileName}):"mixerPresetFileName"in n?t.adjustment=R(R({},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},$e(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 s={Vrsn:1,presetKind:(r=o.presetKind)!==null&&r!==void 0?r:1,presetFileName:o.presetFileName||""};mt(e,"","null",s)}else if(o.type==="curves"){var s={Vrsn:1,curvesPresetKind:(n=o.presetKind)!==null&&n!==void 0?n:1,curvesPresetFileName:o.presetFileName||""};mt(e,"","null",s)}else if(o.type==="channel mixer"){var s={Vrsn:1,mixerPresetKind:(a=o.presetKind)!==null&&a!==void 0?a:1,mixerPresetFileName:o.presetFileName||""};mt(e,"","null",s)}else if(o.type==="brightness/contrast"){var s={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};mt(e,"","null",s)}else throw new Error("Unhandled CgEd case")});function r9(e){var t=[];function r(n){var a;if(n.children)for(var i=0,o=n.children;i<o.length;i++){var s=o[i];((a=s.text)===null||a===void 0?void 0:a.index)!==void 0&&(t[s.text.index]=s),r(s)}}return r(e),t}Ke("Txt2",Tt("engineData"),function(e,t,r,n){var a=jt(e,r());t.engineData=a1(a);var i=r9(n),o=Qh(a),s=Xb(o),c=s.ResourceDict.TextFrameSet;if(c)for(var u=0;u<c.length;u++){var f=i[u];c[u].path&&(f!=null&&f.text)&&(f.text.textPath=c[u].path)}},function(e,t){var r=n1(t.engineData);nn(e,r)}),Ke("FEid",Tt("filterEffectsMasks"),function(e,t,r){var n=qe(e);if(n<1||n>3)throw new Error("Invalid filterEffects version ".concat(n));for(t.filterEffectsMasks=[];r()>8;){if(we(e))throw new Error("filterEffects: 64 bit length is not supported");var a=we(e),i=e.offset+a,o=en(e,1),s=qe(e);if(s!==1)throw new Error("Invalid filterEffect version ".concat(s));if(we(e))throw new Error("filterEffect: 64 bit length is not supported");we(e);for(var c=qe(e),u=qe(e),f=qe(e),h=qe(e),d=qe(e),p=qe(e),w=[],m=0;m<p+2;m++){var _=qe(e);if(_){if(we(e))throw new Error("filterEffect: 64 bit length is not supported");var y=we(e);if(!y)throw new Error("filterEffect: Empty channel");var g=Fe(e),b=jt(e,y-2);w.push({compressionMode:g,data:b})}else w.push(void 0)}if(t.filterEffectsMasks.push({id:o,top:c,left:u,bottom:f,right:h,depth:d,channels:w}),e.offset<i&&Le(e)){var v=qe(e),E=qe(e),C=qe(e),A=qe(e);if(we(e))throw new Error("filterEffect: 64 bit length is not supported");var k=we(e),g=Fe(e),b=jt(e,k-2);t.filterEffectsMasks[t.filterEffectsMasks.length-1].extra={top:v,left:E,bottom:C,right:A,compressionMode:g,data:b}}e.offset=i;for(var B=a;B%4;)e.offset++,B++}},function(e,t){var r;Je(e,3);for(var n=0,a=t.filterEffectsMasks;n<a.length;n++){var i=a[n];Pe(e,0),Pe(e,0);var o=e.offset;ta(e,i.id,1),Je(e,1),Pe(e,0),Pe(e,0);var s=e.offset;Je(e,i.top),Je(e,i.left),Je(e,i.bottom),Je(e,i.right),Je(e,i.depth);var c=Math.max(0,i.channels.length-2);Je(e,c);for(var u=0;u<c+2;u++){var f=i.channels[u];Je(e,f?1:0),f&&(Pe(e,0),Pe(e,f.data.length+2),xe(e,f.compressionMode),nn(e,f.data))}e.view.setUint32(s-4,e.offset-s,!1);var h=(r=t.filterEffectsMasks[t.filterEffectsMasks.length-1])===null||r===void 0?void 0:r.extra;h&&(ze(e,1),Je(e,h.top),Je(e,h.left),Je(e,h.bottom),Je(e,h.right),Pe(e,0),Pe(e,h.data.byteLength+2),xe(e,h.compressionMode),nn(e,h.data));var d=e.offset-o;for(e.view.setUint32(o-4,d,!1);d%4;)kt(e,1),d++}}),ri("FXid","FEid"),Ke("FMsk",Tt("filterMask"),function(e,t){t.filterMask={colorSpace:ar(e),opacity:Fe(e)/255}},function(e,t){var r;ir(e,t.filterMask.colorSpace),xe(e,hs((r=t.filterMask.opacity)!==null&&r!==void 0?r:1,0,1)*255)}),Ke("artd",function(e){return e.artboards!==void 0},function(e,t,r){var n=dt(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:Kr(n.docDefaultNewArtboardBackgroundColor),docDefaultNewArtboardBackgroundType:n.docDefaultNewArtboardBackgroundType},$e(e,r())},function(e,t){var r,n,a,i,o,s=t.artboards,c={"Cnt ":s.count,autoExpandOffset:s.autoExpandOffset?{Hrzn:s.autoExpandOffset.horizontal,Vrtc:s.autoExpandOffset.vertical}:{Hrzn:0,Vrtc:0},origin:s.origin?{Hrzn:s.origin.horizontal,Vrtc:s.origin.vertical}:{Hrzn:0,Vrtc:0},autoExpandEnabled:(r=s.autoExpandEnabled)!==null&&r!==void 0?r:!0,autoNestEnabled:(n=s.autoNestEnabled)!==null&&n!==void 0?n:!0,autoPositionEnabled:(a=s.autoPositionEnabled)!==null&&a!==void 0?a:!0,shrinkwrapOnSaveEnabled:(i=s.shrinkwrapOnSaveEnabled)!==null&&i!==void 0?i:!0,docDefaultNewArtboardBackgroundColor:Yr(s.docDefaultNewArtboardBackgroundColor),docDefaultNewArtboardBackgroundType:(o=s.docDefaultNewArtboardBackgroundType)!==null&&o!==void 0?o:1};mt(e,"","null",c,"artd")});function xp(e){return Object.keys(e).map(function(t){return e[t]}).some(function(t){return Array.isArray(t)&&t.length>1})}Ke("lfx2",function(e){return e.effects!==void 0&&!xp(e.effects)},function(e,t,r){var n=we(e);if(n!==0)throw new Error("Invalid lfx2 version");var a=dt(e);t.effects=Li(a,!!e.logMissingFeatures),$e(e,r())},function(e,t,r,n){var a=Oi(t.effects,!!n.logMissingFeatures,!0);Pe(e,0),mt(e,"","null",a)}),Ke("cinf",Tt("compositorUsed"),function(e,t,r){var n=dt(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)),$e(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)),mt(e,"","null",n)}),Ke("extn",function(e){return e._extn!==void 0},function(e,t){dt(e)},function(e,t){}),Ke("iOpa",Tt("fillOpacity"),function(e,t){t.fillOpacity=Le(e)/255,$e(e,3)},function(e,t){ze(e,t.fillOpacity*255),kt(e,3)}),Ke("brst",Tt("channelBlendingRestrictions"),function(e,t,r){for(t.channelBlendingRestrictions=[];r()>4;)t.channelBlendingRestrictions.push(qe(e))},function(e,t){for(var r=0,n=t.channelBlendingRestrictions;r<n.length;r++){var a=n[r];Je(e,a)}}),Ke("tsly",Tt("transparencyShapesLayer"),function(e,t){t.transparencyShapesLayer=!!Le(e),$e(e,3)},function(e,t){ze(e,t.transparencyShapesLayer?1:0),kt(e,3)});var ea=function(){return ea=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},ea.apply(this,arguments)};function kp(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 n9(e){return e.buffer.slice(0,e.offset)}function a9(e){return new Uint8Array(e.buffer,0,e.offset)}function ze(e,t){var r=Nn(e,1);e.view.setUint8(r,t)}function xt(e,t){var r=Nn(e,2);e.view.setInt16(r,t,!1)}function xe(e,t){var r=Nn(e,2);e.view.setUint16(r,t,!1)}function i9(e,t){var r=Nn(e,2);e.view.setUint16(r,t,!0)}function Je(e,t){var r=Nn(e,4);e.view.setInt32(r,t,!1)}function Sp(e,t){var r=Nn(e,4);e.view.setInt32(r,t,!0)}function Pe(e,t){var r=Nn(e,4);e.view.setUint32(r,t,!1)}function tn(e,t){var r=Nn(e,4);e.view.setFloat32(r,t,!1)}function Xr(e,t){var r=Nn(e,8);e.view.setFloat64(r,t,!1)}function Lr(e,t){Je(e,t*65536)}function rn(e,t){Je(e,t*(1<<24))}function nn(e,t){if(t){Tp(e,e.offset+t.length);var r=new Uint8Array(e.buffer);r.set(t,e.offset),e.offset+=t.length}}function kt(e,t){for(var r=0;r<t;r++)ze(e,0)}function et(e,t){if(t.length!==4)throw new Error("Invalid signature: '".concat(t,"'"));for(var r=0;r<4;r++)ze(e,t.charCodeAt(r))}function o9(e,t){for(var r=0;r<t.length;r++)ze(e,t.charCodeAt(r))}function ta(e,t,r){var n=t.length;if(n>255)throw new Error("String too long");ze(e,n);for(var a=0;a<n;a++){var i=t.charCodeAt(a);ze(e,i<128?i:63)}for(;++n%r;)ze(e,0)}function l9(e,t){for(var r=0;r<t.length;r++)xe(e,t.charCodeAt(r))}function s9(e,t){for(var r=0;r<t.length;r++)i9(e,t.charCodeAt(r))}function Pr(e,t){Pe(e,t.length),l9(e,t)}function ga(e,t){Pe(e,t.length+1);for(var r=0;r<t.length;r++)xe(e,t.charCodeAt(r));xe(e,0)}function Ep(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=Gs(a),o=i.width,s=i.height;t=Math.max(t,2*s+2*o*s)}a.children&&(t=Math.max(t,Ep(a.children)))}return t}function sr(e,t,r,n,a){n===void 0&&(n=!1),a===void 0&&(a=!1),a&&Pe(e,0);var i=e.offset;Pe(e,0),r();for(var o=e.offset-i-4,s=o;s%t;)ze(e,0),s++;n&&(o=s),e.view.setUint32(i,o,!1)}function Cp(e){var t;(t=e.children)===null||t===void 0||t.forEach(Cp);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 Dp(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");Cp(t);var i=ea({},t.imageResources),o=ea(ea({},r),{layerIds:new Set,layerToId:new Map});o.generateThumbnail&&(i.thumbnail=p9(t));var s=t.imageData;if(!s&&t.canvas&&(s=t.canvas.getContext("2d").getImageData(0,0,t.canvas.width,t.canvas.height)),s&&(t.width!==s.width||t.height!==s.height))throw new Error("Document canvas must have the same size as document");var c=!!s&&t1(s),u=Math.max(Ep(t.children),4*2*t.width*t.height+2*t.height);e.tempBuffer=new Uint8Array(u),et(e,"8BPS"),xe(e,r.psb?2:1),kt(e,6),xe(e,c?4:3),Pe(e,t.height),Pe(e,t.width),xe(e,a),xe(e,3),sr(e,1,function(){var E,C,A;if(t.palette){for(var k=0;k<256;k++)ze(e,((E=t.palette[k])===null||E===void 0?void 0:E.r)||0);for(var k=0;k<256;k++)ze(e,((C=t.palette[k])===null||C===void 0?void 0:C.g)||0);for(var k=0;k<256;k++)ze(e,((A=t.palette[k])===null||A===void 0?void 0:A.b)||0)}});var f=[];Bp(f,t.children),f.length||f.push({}),i.layersGroup=f.map(function(E){return E.linkGroup||0}),i.layerGroupsEnabledId=f.map(function(E){return E.linkGroupEnabled==!1?0:1}),sr(e,1,function(){for(var E=function(B){for(var T=B.has(i),F=T===!1?0:T===!0?1:T,V=function(H){et(e,"8BIM"),xe(e,B.key),ta(e,"",2),sr(e,2,function(){return B.write(e,i,H)})},L=0;L<F;L++)V(L)},C=0,A=Eh;C<A.length;C++){var k=A[C];E(k)}}),sr(e,2,function(){c9(e,f,t,c,o),d9(e,t.globalLayerMaskInfo),Ap(e,t,t,o)},void 0,!!o.psb);var h=c?[0,1,2,3]:[0,1,2],d=s?s.width:t.width,p=s?s.height:t.height,w={data:new Uint8Array(d*p*4),width:d,height:p};xe(e,1);{if(s&&w.data.set(new Uint8Array(s.data.buffer,s.data.byteOffset,s.data.byteLength)),c)for(var m=w.width*w.height*4,_=w.data,y=0;y<m;y+=4){var g=_[y+3];if(g!=0&&g!=255){var b=g/255,v=255*(1-b);_[y+0]=_[y+0]*b+v,_[y+1]=_[y+1]*b+v,_[y+2]=_[y+2]*b+v}}nn(e,ps(e.tempBuffer,w,h,!!r.psb))}}function c9(e,t,r,n,a){sr(e,4,function(){var i;xt(e,n?-t.length:t.length);for(var o=t.map(function(_,y){return m9(e.tempBuffer,_,y===0,a)}),s=function(_){var y=_.layer,g=_.top,b=_.left,v=_.bottom,E=_.right,C=_.channels;Je(e,g),Je(e,b),Je(e,v),Je(e,E),xe(e,C.length);for(var A=0,k=C;A<k.length;A++){var B=k[A];xt(e,B.channelId),a.psb&&Pe(e,0),Pe(e,B.length)}et(e,"8BIM"),et(e,to[y.blendMode]||"norm"),ze(e,Math.round(hs((i=y.opacity)!==null&&i!==void 0?i:1,0,1)*255)),ze(e,y.clipping?1:0);var T=8;y.transparencyProtected&&(T|=1),y.hidden&&(T|=2),(y.vectorMask||y.sectionDivider&&y.sectionDivider.type!==0||y.adjustment)&&(T|=16),y.effectsOpen&&(T|=32),ze(e,T),ze(e,0),sr(e,1,function(){u9(e,y,_),f9(e,y),ta(e,(y.name||"").substring(0,255),4),Ap(e,y,r,a)})},c=0,u=o;c<u.length;c++){var f=u[c];s(f)}for(var h=0,d=o;h<d.length;h++)for(var f=d[h],p=0,w=f.channels;p<w.length;p++){var m=w[p];xe(e,m.compression),m.buffer&&nn(e,m.buffer)}},!0,a.psb)}function u9(e,t,r){var n=t.mask,a=t.realMask;sr(e,1,function(){if(!(!n&&!a)){var i=0,o=0,s=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 c=r.mask||{};if(Je(e,c.top||0),Je(e,c.left||0),Je(e,c.bottom||0),Je(e,c.right||0),ze(e,n&&n.defaultColor||0),ze(e,o),a){a.disabled&&(s|=2),a.positionRelativeToLayer&&(s|=1),a.fromVectorData&&(s|=8);var u=r.realMask||{};ze(e,s),ze(e,a.defaultColor||0),Je(e,u.top||0),Je(e,u.left||0),Je(e,u.bottom||0),Je(e,u.right||0)}i&&n&&(ze(e,i),n.userMaskDensity!==void 0&&ze(e,Math.round(n.userMaskDensity*255)),n.userMaskFeather!==void 0&&Xr(e,n.userMaskFeather),n.vectorMaskDensity!==void 0&&ze(e,Math.round(n.vectorMaskDensity*255)),n.vectorMaskFeather!==void 0&&Xr(e,n.vectorMaskFeather)),kt(e,2)}})}function Do(e,t){ze(e,t[0]),ze(e,t[1]),ze(e,t[2]),ze(e,t[3])}function f9(e,t){sr(e,1,function(){var r=t.blendingRanges;if(r){Do(e,r.compositeGrayBlendSource),Do(e,r.compositeGraphBlendDestinationRange);for(var n=0,a=r.ranges;n<a.length;n++){var i=a[n];Do(e,i.sourceRange),Do(e,i.destRange)}}})}function d9(e,t){sr(e,1,function(){t&&(xe(e,t.overlayColorSpace),xe(e,t.colorSpace1),xe(e,t.colorSpace2),xe(e,t.colorSpace3),xe(e,t.colorSpace4),xe(e,t.opacity*255),ze(e,t.kind),kt(e,3))})}function Ap(e,t,r,n){for(var a=function(c){var u=c.key;if(u==="Txt2"&&n.invalidateTextLayers)return"continue";if(u==="vmsk"&&n.psb&&(u="vsms"),c.has(t)){var f=n.psb&&Kd.indexOf(u)!==-1,h=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";et(e,f?"8B64":"8BIM"),et(e,u),sr(e,d?4:2,function(){c.write(e,t,r,n)},h,f)}},i=0,o=up;i<o.length;i++){var s=o[i];a(s)}}function Bp(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}}),Bp(e,a.children),e.push(ea(ea({},a),{blendMode:a.blendMode==="pass through"?"normal":a.blendMode,sectionDivider:{type:a.opened===!1?2:1,key:to[a.blendMode]||"pass",subType:0}}))):e.push(ea({},a))}}function h9(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 Tp(e,t){t>e.buffer.byteLength&&h9(e,t)}function Nn(e,t){var r=e.offset;return Tp(e,e.offset+=t),r}function p9(e){var t=Ha(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(ro(e.imageData),0,0):e.canvas&&n.drawImage(e.canvas,0,0),t}function Mp(e,t,r,n,a,i){var o=n.top|0,s=n.left|0,c=n.right|0,u=n.bottom|0,f=Gs(n),h=f.width,d=f.height,p=n.imageData;if(!p&&n.canvas&&h&&d&&(p=n.canvas.getContext("2d").getImageData(0,0,h,d)),p&&(p.width!==h||p.height!==d))throw new Error("Invalid imageData dimentions");c=s+h,u=o+d;var w,m;p?a.compress?(w=r1(p,[0]),m=2):(w=ps(e,p,[0],!!a.psb),m=1):(w=new Uint8Array(0),m=1),t.channels.push({channelId:i?-3:-2,compression:m,buffer:w,length:2+w.length}),t[i?"realMask":"mask"]={top:o,left:s,right:c,bottom:u}}function m9(e,t,r,n){var a=g9(e,t,r,n);return t.mask&&Mp(e,a,t,t.mask,n,!1),t.realMask&&Mp(e,a,t,t.realMask,n,!0),a}function Gs(e){var t,r,n,a,i=e.canvas,o=e.imageData,s=(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,c=(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:s,height:c}}function v9(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=Ga(n,a),o=e.data,s=i.data,c=0;c<a;c++)for(var u=0;u<n;u++){var f=(u+t+(c+r)*e.width)*4,h=(u+c*n)*4;s[h]=o[f],s[h+1]=o[f+1],s[h+2]=o[f+2],s[h+3]=o[f+3]}return i}function g9(e,t,r,n){var a=t.top|0,i=t.left|0,o=t.right|0,s=t.bottom|0,c=[{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=Gs(t),f=u.width,h=u.height;if(!(t.canvas||t.imageData)||!f||!h)return o=i,s=a,{layer:t,top:a,left:i,right:o,bottom:s,channels:c};o=i+f,s=a+h;var d=t.imageData||t.canvas.getContext("2d").getImageData(0,0,f,h);if(n.trimImageData){var p=y9(d);if(p.left!==0||p.top!==0||p.right!==d.width||p.bottom!==d.height){if(i+=p.left,a+=p.top,o-=d.width-p.right,s-=d.height-p.bottom,f=o-i,h=s-a,!f||!h)return{layer:t,top:a,left:i,right:o,bottom:s,channels:c};d=v9(d,p.left,p.top,f,h)}}var w=[0,1,2];return(!r||n.noBackground||t.mask||t1(d)||Uy)&&w.unshift(-1),c=w.map(function(m){var _=e1(m,!1),y,g;return n.compress?(y=r1(d,[_]),g=2):(y=ps(e,d,[_],!!n.psb),g=1),{channelId:m,compression:g,buffer:y,length:2+y.length}}),{layer:t,top:a,left:i,right:o,bottom:s,channels:c}}function Ip(e,t,r,n){for(var a=e.data,i=e.width,o=(t*i+r)*4+3|0,s=o+(n-r)*4|0,c=o;c<s;c=c+4|0)if(a[c]!==0)return!1;return!0}function zp(e,t,r,n){for(var a=e.data,i=e.width,o=i*4|0,s=r*o+t*4+3|0,c=r,u=s;c<n;c++,u=u+o|0)if(a[u]!==0)return!1;return!0}function y9(e){for(var t=0,r=0,n=e.width,a=e.height;t<a&&Ip(e,t,r,n);)t++;for(;a>t&&Ip(e,a-1,r,n);)a--;for(;r<n&&zp(e,r,t,a);)r++;for(;n>r&&zp(e,n-1,t,a);)n--;return{top:t,left:r,right:n,bottom:a}}function ir(e,t){t?"r"in t?(xe(e,0),xe(e,Math.round(t.r*257)),xe(e,Math.round(t.g*257)),xe(e,Math.round(t.b*257)),xe(e,0)):"fr"in t?(xe(e,0),xe(e,Math.round(t.fr*255*257)),xe(e,Math.round(t.fg*255*257)),xe(e,Math.round(t.fb*255*257)),xe(e,0)):"l"in t?(xe(e,7),xt(e,Math.round(t.l*1e4)),xt(e,Math.round(t.a<0?t.a*12800:t.a*12700)),xt(e,Math.round(t.b<0?t.b*12800:t.b*12700)),xe(e,0)):"h"in t?(xe(e,1),xe(e,Math.round(t.h*65535)),xe(e,Math.round(t.s*65535)),xe(e,Math.round(t.b*65535)),xe(e,0)):"c"in t?(xe(e,2),xe(e,Math.round(t.c*257)),xe(e,Math.round(t.m*257)),xe(e,Math.round(t.y*257)),xe(e,Math.round(t.k*257))):(xe(e,8),xe(e,Math.round(t.k*1e4/255)),kt(e,6)):(xe(e,0),kt(e,8))}var Ao=function(){return Ao=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},Ao.apply(this,arguments)},b9=["off","fade","pen pressure","pen tilt","stylus wheel","initial direction","direction","initial rotation","rotation"],Fp=["round point","round blunt","round curve","round angle","round fan","flat point","flat blunt","flat curve","flat angle","flat fan"],w9=["erodible point","erodible flat","erodible round","erodible square","erodible triangle","custom"],_9={_:"brush",MixB:"mixer brush",SmTl:"smudge brush"};function dr(e){return{control:b9[e.bVTy],steps:e.fStp,jitter:Ye(e.jitter),minimum:Ye(e["Mnm "])}}function Np(e){switch(e._classID){case"computedBrush":return{type:"computed",size:io(e.Dmtr,"Pixels"),angle:Kn(e.Angl),roundness:Ye(e.Rndn),spacingOn:e.Intr,spacing:Ye(e.Spcn),flipX:e.flipX,flipY:e.flipY,hardness:Ye(e.Hrdn)};case"sampledBrush":return{type:"sampled",size:io(e.Dmtr,"Pixels"),angle:Kn(e.Angl),roundness:Ye(e.Rndn),spacingOn:e.Intr,spacing:Ye(e.Spcn),flipX:e.flipX,flipY:e.flipY,name:e["Nm "],sampledData:e.sampledData};case"dBrush":return{type:"dynamic",shape:Fp[e["Shp "]],angle:Kn(e.Angl),size:io(e.Dmtr,"Pixels"),density:Ye(e.Dnst),length:Ye(e.Lngt),clumping:Ye(e.clumping),thickness:Ye(e.thickness),stiffness:Ye(e.stiffness),physics:e.physics,spacing:Ye(e.Spcn),spacingOn:e.Intr,flipX:e.flipX,flipY:e.flipY};case"dTips":return Ao(Ao({type:"tips",angle:Kn(e.Angl),size:io(e.Dmtr,"Pixels"),shape:Fp[e["Shp "]],physics:e.physics,spacing:Ye(e.Spcn),spacingOn:e.Intr,flipX:e.flipX,flipY:e.flipY,tipsType:w9[e.dtipsType],tipsLengthRatio:Ye(e.dtipsLengthRatio),tipsHardness:Ye(e.dtipsHardness)},e.dtipsGridSize&&e.dtipsErodibleTipHeightMap?{tipsGridSize:e.dtipsGridSize,tipsErodibleTipHeightMap:x9(e.dtipsErodibleTipHeightMap)}:{}),{tipsAirbrushCutoffAngle:e.dtipsAirbrushCutoffAngle,tipsAirbrushGranularity:Ye(e.dtipsAirbrushGranularity),tipsAirbrushStreakiness:Ye(e.dtipsAirbrushStreakiness),tipsAirbrushSplatSize:Ye(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 x9(e){for(var t=[],r=0;r<e.byteLength;r++)t.push(e[r]);return t}function k9(e,t){var r,n,a,i;t===void 0&&(t={});var o=Ya(e.buffer,e.byteOffset,e.byteLength),s=ct(o),c=[],u=[],f=[];if(s===1||s===2)throw new Error("Unsupported ABR version (".concat(s,")"));if(s===6||s===7||s===9||s===10){var h=ct(o);if(h!==1&&h!==2)throw new Error("Unsupported ABR minor version");for(;o.offset<o.view.byteLength;){gn(o,"8BIM");var d=Mt(o),p=we(o),w=o.offset+p;switch(d){case"samp":{for(;o.offset<w;){for(var m=we(o);m&3;)m++;var _=o.offset+m,y=en(o,1);$e(o,h===1?10:264);var g=qe(o),b=qe(o),v=qe(o)-g,E=qe(o)-b;if(E<=0||v<=0)throw new Error("Invalid bounds");var C=ct(o),A=Le(o),k=new Uint8Array(E*v);if(C===8)if(A===0)k.set(jt(o,k.byteLength));else if(A===1)Jn(o,{width:E,height:v,data:k},E,v,C,1,[0],!1);else throw new Error("Invalid compression");else if(C===16)if(A===0)for(var B=0;B<k.byteLength;B++)k[B]=Fe(o)>>8;else throw A===1?new Error("not implemented (16bit RLE)"):new Error("Invalid compression");else throw new Error("Invalid depth");c.push({id:y,bounds:{x:b,y:g,w:E,h:v},alpha:k}),o.offset=_}break}case"desc":{for(var T=dt(o,!0),F=0,V=T.Brsh;F<V.length;F++){var L=V[F],H={name:L["Nm "],shape:Np(L.Brsh),spacing:Ye(L.Spcn),wetEdges:L.Wtdg,noise:L.Nose,useBrushSize:L.useBrushSize};L.interpretation!=null&&(H.interpretation=L.interpretation),L.protectTexture!=null&&(H.protectTexture=L.protectTexture),L.useTipDynamics&&(H.shapeDynamics={tiltScale:Ye(L.tiltScale),sizeDynamics:dr(L.szVr),angleDynamics:dr(L.angleDynamics),roundnessDynamics:dr(L.roundnessDynamics),flipX:L.flipX,flipY:L.flipY,brushProjection:L.brushProjection,minimumDiameter:Ye(L.minimumDiameter),minimumRoundness:Ye(L.minimumRoundness)}),L.useScatter&&(H.scatter={count:L["Cnt "],bothAxes:L.bothAxes,countDynamics:dr(L.countDynamics),scatterDynamics:dr(L.scatterDynamics)}),L.useTexture&&L.Txtr&&(H.texture={id:L.Txtr.Idnt,name:L.Txtr["Nm "],blendMode:wr.decode(L.textureBlendMode),depth:Ye(L.textureDepth),depthMinimum:Ye(L.minimumDepth),depthDynamics:dr(L.textureDepthDynamics),scale:Ye(L.textureScale),invert:L.InvT,brightness:L.textureBrightness,contrast:L.textureContrast,textureEachTip:!!L.TxtC});var X=L.dualBrush;X&&X.useDualBrush&&(H.dualBrush={flip:X.Flip,shape:Np(X.Brsh),blendMode:wr.decode(X.BlnM),useScatter:X.useScatter,spacing:Ye(X.Spcn),count:X["Cnt "],bothAxes:X.bothAxes,countDynamics:dr(X.countDynamics),scatterDynamics:dr(X.scatterDynamics)}),L.useColorDynamics&&(H.colorDynamics={foregroundBackground:dr(L.clVr),hue:Ye(L["H "]),saturation:Ye(L.Strt),brightness:Ye(L.Brgh),purity:Ye(L.purity),perTip:L.colorDynamicsPerTip}),L.usePaintDynamics&&(H.transfer={flowDynamics:dr(L.prVr),opacityDynamics:dr(L.opVr),wetnessDynamics:dr(L.wtVr),mixDynamics:dr(L.mxVr)}),L.useBrushPose&&(H.brushPose={overrideAngle:L.overridePoseAngle,overrideTiltX:L.overridePoseTiltX,overrideTiltY:L.overridePoseTiltY,overridePressure:L.overridePosePressure,pressure:Ye(L.brushPosePressure),tiltX:L.brushPoseTiltX,tiltY:L.brushPoseTiltY,angle:L.brushPoseAngle});var W=L.toolOptions;W&&(H.toolOptions={type:_9[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:wr.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&&(H.toolOptions.flowDynamics=dr(W.prVr)),W.opVr&&(H.toolOptions.opacityDynamics=dr(W.opVr)),W.szVr&&(H.toolOptions.sizeDynamics=dr(W.szVr)),"wetness"in W&&(H.toolOptions.wetness=W.wetness),"dryness"in W&&(H.toolOptions.dryness=W.dryness),"mix"in W&&(H.toolOptions.mix=W.mix),"autoFill"in W&&(H.toolOptions.autoFill=W.autoFill),"autoClean"in W&&(H.toolOptions.autoClean=W.autoClean),"loadSolidColorOnly"in W&&(H.toolOptions.loadSolidColorOnly=W.loadSolidColorOnly),"sampleAllLayers"in W&&(H.toolOptions.sampleAllLayers=W.sampleAllLayers),"SmdF"in W&&(H.toolOptions.smudgeFingerPainting=W.SmdF),"SmdS"in W&&(H.toolOptions.smudgeSampleAllLayers=W.SmdS),"Prs "in W&&(H.toolOptions.strength=W["Prs "]),"SmdF"in W&&(H.toolOptions.smudgeFingerPainting=W.SmdF),"SmdS"in W&&(H.toolOptions.smudgeSampleAllLayers=W.SmdS)),u.push(H)}break}case"patt":{for(;o.offset<w;)f.push(zb(o));o.offset=w;break}case"phry":{var T=dt(o);t.logMissingFeatures&&!((i=T.hierarchy)===null||i===void 0)&&i.length;break}default:throw new Error("Invalid brush type: ".concat(d))}for(;p%4;)o.offset++,p++}}else throw new Error("Unsupported ABR version (".concat(s,")"));return{samples:c,patterns:f,brushes:u}}var js=function(){return js=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},js.apply(this,arguments)};function S9(e){var t=Ya(e.buffer,e.byteOffset,e.byteLength),r={shapes:[]};if(gn(t,"cush"),we(t)!==2)throw new Error("Invalid version");for(var n=we(t),a=0;a<n;a++){for(var i=Kt(t);t.offset%4;)t.offset++;if(we(t)!==1)throw new Error("Invalid shape version");var o=we(t),s=t.offset+o,c=en(t,1),u=we(t),f=we(t),h=we(t),d=we(t),p=d-f,w=h-u,m={paths:[]};dp(t,m,p,w,s-t.offset),r.shapes.push(js({name:i,id:c,width:p,height:w},m)),t.offset=s}return r}var qs;(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"})(qs||(qs={}));var Ws;(function(e){e[e.Other=0]="Other",e[e.OpenFolder=1]="OpenFolder",e[e.ClosedFolder=2]="ClosedFolder",e[e.BoundingSectionDivider=3]="BoundingSectionDivider"})(Ws||(Ws={}));var Xs;(function(e){e[e.None=0]="None",e[e.Visibility=1]="Visibility",e[e.Position=2]="Position",e[e.Appearance=4]="Appearance"})(Xs||(Xs={}));var Zs;(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"})(Zs||(Zs={}));var Ks;(function(e){e[e.RawData=0]="RawData",e[e.RleCompressed=1]="RleCompressed",e[e.ZipWithoutPrediction=2]="ZipWithoutPrediction",e[e.ZipWithPrediction=3]="ZipWithPrediction"})(Ks||(Ks={}));var E9=a1;function C9(e,t){var r="buffer"in e?Ya(e.buffer,e.byteOffset,e.byteLength):Ya(e);return xb(r,t)}function D9(e,t){var r=kp();return Dp(r,e,t),n9(r)}function Op(e,t){var r=kp();return Dp(r,e,t),a9(r)}function A9(e,t){if(typeof Buffer>"u")throw new Error("Buffer not supported on this platform");return Buffer.from(Op(e,t))}function B9(e,t){Vh(e,t)}const T9=Object.freeze(Object.defineProperty({__proto__:null,get ChannelID(){return Zs},get ColorMode(){return qs},get Compression(){return Ks},get LayerCompCapturedInfo(){return Xs},get SectionDividerType(){return Ws},byteArrayToBase64:E9,decodeLayerPixels:B9,initializeCanvas:Wy,readAbr:k9,readCsh:S9,readPsd:C9,writePsd:D9,writePsdBuffer:A9,writePsdUint8Array:Op},Symbol.toStringTag,{value:"Module"}));var Lp={exports:{}};/* @license
|
|
271
|
+
Papa Parse
|
|
272
|
+
v5.5.3
|
|
273
|
+
https://github.com/mholt/PapaParse
|
|
274
|
+
License: MIT
|
|
275
|
+
*/(function(e,t){((r,n)=>{e.exports=n()})(t8,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,s={},c=0,u={};function f(k){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(B){var T=E(B);T.chunkSize=parseInt(T.chunkSize),B.step||B.chunk||(T.chunkSize=null),this._handle=new m(T),(this._handle.streamer=this)._config=T}).call(this,k),this.parseChunk=function(B,T){var F=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<F){let L=this._config.newline;L||(V=this._config.quoteChar||'"',L=this._handle.guessLineEndings(B,V)),B=[...B.split(L).slice(F)].join(L)}this.isFirstChunk&&A(this._config.beforeFirstChunk)&&(V=this._config.beforeFirstChunk(B))!==void 0&&(B=V),this.isFirstChunk=!1,this._halted=!1;var F=this._partialLine+B,V=(this._partialLine="",this._handle.parse(F,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(B=V.meta.cursor,F=(this._finished||(this._partialLine=F.substring(B-this._baseIndex),this._baseIndex=B),V&&V.data&&(this._rowCount+=V.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),o)n.postMessage({results:V,workerId:u.WORKER_ID,finished:F});else if(A(this._config.chunk)&&!T){if(this._config.chunk(V,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=V=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(V.data),this._completeResults.errors=this._completeResults.errors.concat(V.errors),this._completeResults.meta=V.meta),this._completed||!F||!A(this._config.complete)||V&&V.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),F||V&&V.meta.paused||this._nextChunk(),V}this._halted=!0},this._sendError=function(B){A(this._config.error)?this._config.error(B):o&&this._config.error&&n.postMessage({workerId:u.WORKER_ID,error:B,finished:!1})}}function h(k){var B;(k=k||{}).chunkSize||(k.chunkSize=u.RemoteChunkSize),f.call(this,k),this._nextChunk=i?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(T){this._input=T,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(B=new XMLHttpRequest,this._config.withCredentials&&(B.withCredentials=this._config.withCredentials),i||(B.onload=C(this._chunkLoaded,this),B.onerror=C(this._chunkError,this)),B.open(this._config.downloadRequestBody?"POST":"GET",this._input,!i),this._config.downloadRequestHeaders){var T,F=this._config.downloadRequestHeaders;for(T in F)B.setRequestHeader(T,F[T])}var V;this._config.chunkSize&&(V=this._start+this._config.chunkSize-1,B.setRequestHeader("Range","bytes="+this._start+"-"+V));try{B.send(this._config.downloadRequestBody)}catch(L){this._chunkError(L.message)}i&&B.status===0&&this._chunkError()}},this._chunkLoaded=function(){B.readyState===4&&(B.status<200||400<=B.status?this._chunkError():(this._start+=this._config.chunkSize||B.responseText.length,this._finished=!this._config.chunkSize||this._start>=(T=>(T=T.getResponseHeader("Content-Range"))!==null?parseInt(T.substring(T.lastIndexOf("/")+1)):-1)(B),this.parseChunk(B.responseText)))},this._chunkError=function(T){T=B.statusText||T,this._sendError(new Error(T))}}function d(k){(k=k||{}).chunkSize||(k.chunkSize=u.LocalChunkSize),f.call(this,k);var B,T,F=typeof FileReader<"u";this.stream=function(V){this._input=V,T=V.slice||V.webkitSlice||V.mozSlice,F?((B=new FileReader).onload=C(this._chunkLoaded,this),B.onerror=C(this._chunkError,this)):B=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var V=this._input,L=(this._config.chunkSize&&(L=Math.min(this._start+this._config.chunkSize,this._input.size),V=T.call(V,this._start,L)),B.readAsText(V,this._config.encoding));F||this._chunkLoaded({target:{result:L}})},this._chunkLoaded=function(V){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(V.target.result)},this._chunkError=function(){this._sendError(B.error)}}function p(k){var B;f.call(this,k=k||{}),this.stream=function(T){return B=T,this._nextChunk()},this._nextChunk=function(){var T,F;if(!this._finished)return T=this._config.chunkSize,B=T?(F=B.substring(0,T),B.substring(T)):(F=B,""),this._finished=!B,this.parseChunk(F)}}function w(k){f.call(this,k=k||{});var B=[],T=!0,F=!1;this.pause=function(){f.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){f.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(V){this._input=V,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){F&&B.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),B.length?this.parseChunk(B.shift()):T=!0},this._streamData=C(function(V){try{B.push(typeof V=="string"?V:V.toString(this._config.encoding)),T&&(T=!1,this._checkIsFinished(),this.parseChunk(B.shift()))}catch(L){this._streamError(L)}},this),this._streamError=C(function(V){this._streamCleanUp(),this._sendError(V)},this),this._streamEnd=C(function(){this._streamCleanUp(),F=!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 m(k){var B,T,F,V,L=Math.pow(2,53),H=-L,X=/^\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,Q=0,K=0,ue=!1,ne=!1,fe=[],re={data:[],errors:[],meta:{}};function ye(me){return k.skipEmptyLines==="greedy"?me.join("").trim()==="":me.length===1&&me[0].length===0}function he(){if(re&&F&&(Ee("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+u.DefaultDelimiter+"'"),F=!1),k.skipEmptyLines&&(re.data=re.data.filter(function(ie){return!ye(ie)})),ke()){let ie=function(_e,He){A(k.transformHeader)&&(_e=k.transformHeader(_e,He)),fe.push(_e)};if(re)if(Array.isArray(re.data[0])){for(var me=0;ke()&&me<re.data.length;me++)re.data[me].forEach(ie);re.data.splice(0,1)}else re.data.forEach(ie)}function te(ie,_e){for(var He=k.header?{}:[],je=0;je<ie.length;je++){var Ve=je,ge=ie[je],ge=((Ce,ve)=>(Oe=>(k.dynamicTypingFunction&&k.dynamicTyping[Oe]===void 0&&(k.dynamicTyping[Oe]=k.dynamicTypingFunction(Oe)),(k.dynamicTyping[Oe]||k.dynamicTyping)===!0))(Ce)?ve==="true"||ve==="TRUE"||ve!=="false"&&ve!=="FALSE"&&((Oe=>{if(X.test(Oe)&&(Oe=parseFloat(Oe),H<Oe&&Oe<L))return 1})(ve)?parseFloat(ve):W.test(ve)?new Date(ve):ve===""?null:ve):ve)(Ve=k.header?je>=fe.length?"__parsed_extra":fe[je]:Ve,ge=k.transform?k.transform(ge,Ve):ge);Ve==="__parsed_extra"?(He[Ve]=He[Ve]||[],He[Ve].push(ge)):He[Ve]=ge}return k.header&&(je>fe.length?Ee("FieldMismatch","TooManyFields","Too many fields: expected "+fe.length+" fields but parsed "+je,K+_e):je<fe.length&&Ee("FieldMismatch","TooFewFields","Too few fields: expected "+fe.length+" fields but parsed "+je,K+_e)),He}var se;re&&(k.header||k.dynamicTyping||k.transform)&&(se=1,!re.data.length||Array.isArray(re.data[0])?(re.data=re.data.map(te),se=re.data.length):re.data=te(re.data,0),k.header&&re.meta&&(re.meta.fields=fe),K+=se)}function ke(){return k.header&&fe.length===0}function Ee(me,te,se,ie){me={type:me,code:te,message:se},ie!==void 0&&(me.row=ie),re.errors.push(me)}A(k.step)&&(V=k.step,k.step=function(me){re=me,ke()?he():(he(),re.data.length!==0&&(Q+=me.data.length,k.preview&&Q>k.preview?T.abort():(re.data=re.data[0],V(re,Z))))}),this.parse=function(me,te,se){var ie=k.quoteChar||'"',ie=(k.newline||(k.newline=this.guessLineEndings(me,ie)),F=!1,k.delimiter?A(k.delimiter)&&(k.delimiter=k.delimiter(me),re.meta.delimiter=k.delimiter):((ie=((_e,He,je,Ve,ge)=>{var Ce,ve,Oe,tt;ge=ge||[","," ","|",";",u.RECORD_SEP,u.UNIT_SEP];for(var at=0;at<ge.length;at++){for(var st,It=ge[at],ut=0,ft=0,vt=0,gt=(Oe=void 0,new y({comments:Ve,delimiter:It,newline:He,preview:10}).parse(_e)),pt=0;pt<gt.data.length;pt++)je&&ye(gt.data[pt])?vt++:(st=gt.data[pt].length,ft+=st,Oe===void 0?Oe=st:0<st&&(ut+=Math.abs(st-Oe),Oe=st));0<gt.data.length&&(ft/=gt.data.length-vt),(ve===void 0||ut<=ve)&&(tt===void 0||tt<ft)&&1.99<ft&&(ve=ut,Ce=It,tt=ft)}return{successful:!!(k.delimiter=Ce),bestDelimiter:Ce}})(me,k.newline,k.skipEmptyLines,k.comments,k.delimitersToGuess)).successful?k.delimiter=ie.bestDelimiter:(F=!0,k.delimiter=u.DefaultDelimiter),re.meta.delimiter=k.delimiter),E(k));return k.preview&&k.header&&ie.preview++,B=me,T=new y(ie),re=T.parse(B,te,se),he(),ue?{meta:{paused:!0}}:re||{meta:{paused:!1}}},this.paused=function(){return ue},this.pause=function(){ue=!0,T.abort(),B=A(k.chunk)?"":B.substring(T.getCharIndex())},this.resume=function(){Z.streamer._halted?(ue=!1,Z.streamer.parseChunk(B,!0)):setTimeout(Z.resume,3)},this.aborted=function(){return ne},this.abort=function(){ne=!0,T.abort(),re.meta.aborted=!0,A(k.complete)&&k.complete(re),B=""},this.guessLineEndings=function(_e,ie){_e=_e.substring(0,1048576);var ie=new RegExp(_(ie)+"([^]*?)"+_(ie),"gm"),se=(_e=_e.replace(ie,"")).split("\r"),ie=_e.split(`
|
|
276
|
+
`),_e=1<ie.length&&ie[0].length<se[0].length;if(se.length===1||_e)return`
|
|
277
|
+
`;for(var He=0,je=0;je<se.length;je++)se[je][0]===`
|
|
278
|
+
`&&He++;return He>=se.length/2?`\r
|
|
279
|
+
`:"\r"}}function _(k){return k.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function y(k){var B=(k=k||{}).delimiter,T=k.newline,F=k.comments,V=k.step,L=k.preview,H=k.fastMode,X=null,W=!1,Z=k.quoteChar==null?'"':k.quoteChar,Q=Z;if(k.escapeChar!==void 0&&(Q=k.escapeChar),(typeof B!="string"||-1<u.BAD_DELIMITERS.indexOf(B))&&(B=","),F===B)throw new Error("Comment character same as delimiter");F===!0?F="#":(typeof F!="string"||-1<u.BAD_DELIMITERS.indexOf(F))&&(F=!1),T!==`
|
|
280
|
+
`&&T!=="\r"&&T!==`\r
|
|
281
|
+
`&&(T=`
|
|
282
|
+
`);var K=0,ue=!1;this.parse=function(ne,fe,re){if(typeof ne!="string")throw new Error("Input must be a string");var ye=ne.length,he=B.length,ke=T.length,Ee=F.length,me=A(V),te=[],se=[],ie=[],_e=K=0;if(!ne)return ut();if(H||H!==!1&&ne.indexOf(Z)===-1){for(var He=ne.split(T),je=0;je<He.length;je++){if(ie=He[je],K+=ie.length,je!==He.length-1)K+=T.length;else if(re)return ut();if(!F||ie.substring(0,Ee)!==F){if(me){if(te=[],tt(ie.split(B)),ft(),ue)return ut()}else tt(ie.split(B));if(L&&L<=je)return te=te.slice(0,L),ut(!0)}}return ut()}for(var Ve=ne.indexOf(B,K),ge=ne.indexOf(T,K),Ce=new RegExp(_(Q)+_(Z),"g"),ve=ne.indexOf(Z,K);;)if(ne[K]===Z)for(ve=K,K++;;){if((ve=ne.indexOf(Z,ve+1))===-1)return re||se.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:te.length,index:K}),st();if(ve===ye-1)return st(ne.substring(K,ve).replace(Ce,Z));if(Z===Q&&ne[ve+1]===Q)ve++;else if(Z===Q||ve===0||ne[ve-1]!==Q){Ve!==-1&&Ve<ve+1&&(Ve=ne.indexOf(B,ve+1));var Oe=at((ge=ge!==-1&&ge<ve+1?ne.indexOf(T,ve+1):ge)===-1?Ve:Math.min(Ve,ge));if(ne.substr(ve+1+Oe,he)===B){ie.push(ne.substring(K,ve).replace(Ce,Z)),ne[K=ve+1+Oe+he]!==Z&&(ve=ne.indexOf(Z,K)),Ve=ne.indexOf(B,K),ge=ne.indexOf(T,K);break}if(Oe=at(ge),ne.substring(ve+1+Oe,ve+1+Oe+ke)===T){if(ie.push(ne.substring(K,ve).replace(Ce,Z)),It(ve+1+Oe+ke),Ve=ne.indexOf(B,K),ve=ne.indexOf(Z,K),me&&(ft(),ue))return ut();if(L&&te.length>=L)return ut(!0);break}se.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:te.length,index:K}),ve++}}else if(F&&ie.length===0&&ne.substring(K,K+Ee)===F){if(ge===-1)return ut();K=ge+ke,ge=ne.indexOf(T,K),Ve=ne.indexOf(B,K)}else if(Ve!==-1&&(Ve<ge||ge===-1))ie.push(ne.substring(K,Ve)),K=Ve+he,Ve=ne.indexOf(B,K);else{if(ge===-1)break;if(ie.push(ne.substring(K,ge)),It(ge+ke),me&&(ft(),ue))return ut();if(L&&te.length>=L)return ut(!0)}return st();function tt(vt){te.push(vt),_e=K}function at(vt){var gt=0;return gt=vt!==-1&&(vt=ne.substring(ve+1,vt))&&vt.trim()===""?vt.length:gt}function st(vt){return re||(vt===void 0&&(vt=ne.substring(K)),ie.push(vt),K=ye,tt(ie),me&&ft()),ut()}function It(vt){K=vt,tt(ie),ie=[],ge=ne.indexOf(T,K)}function ut(vt){if(k.header&&!fe&&te.length&&!W){var gt=te[0],pt=Object.create(null),Ct=new Set(gt);let Ae=!1;for(let I=0;I<gt.length;I++){let J=gt[I];if(pt[J=A(k.transformHeader)?k.transformHeader(J,I):J]){let de,Se=pt[J];for(;de=J+"_"+Se,Se++,Ct.has(de););Ct.add(de),gt[I]=de,pt[J]++,Ae=!0,(X=X===null?{}:X)[de]=J}else pt[J]=1,gt[I]=J;Ct.add(J)}Ae&&console.warn("Duplicate headers found and renamed."),W=!0}return{data:te,errors:se,meta:{delimiter:B,linebreak:T,aborted:ue,truncated:!!vt,cursor:_e+(fe||0),renamedHeaders:X}}}function ft(){V(ut()),te=[],se=[]}},this.abort=function(){ue=!0},this.getCharIndex=function(){return K}}function g(k){var B=k.data,T=s[B.workerId],F=!1;if(B.error)T.userError(B.error,B.file);else if(B.results&&B.results.data){var V={abort:function(){F=!0,b(B.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:v,resume:v};if(A(T.userStep)){for(var L=0;L<B.results.data.length&&(T.userStep({data:B.results.data[L],errors:B.results.errors,meta:B.results.meta},V),!F);L++);delete B.results}else A(T.userChunk)&&(T.userChunk(B.results,V,B.file),delete B.results)}B.finished&&!F&&b(B.workerId,B.results)}function b(k,B){var T=s[k];A(T.userComplete)&&T.userComplete(B),T.terminate(),delete s[k]}function v(){throw new Error("Not implemented.")}function E(k){if(typeof k!="object"||k===null)return k;var B,T=Array.isArray(k)?[]:{};for(B in k)T[B]=E(k[B]);return T}function C(k,B){return function(){k.apply(B,arguments)}}function A(k){return typeof k=="function"}return u.parse=function(k,B){var T=(B=B||{}).dynamicTyping||!1;if(A(T)&&(B.dynamicTypingFunction=T,T={}),B.dynamicTyping=T,B.transform=!!A(B.transform)&&B.transform,!B.worker||!u.WORKERS_SUPPORTED)return T=null,u.NODE_STREAM_INPUT,typeof k=="string"?(k=(F=>F.charCodeAt(0)!==65279?F:F.slice(1))(k),T=new(B.download?h:p)(B)):k.readable===!0&&A(k.read)&&A(k.on)?T=new w(B):(n.File&&k instanceof File||k instanceof Object)&&(T=new d(B)),T.stream(k);(T=(()=>{var F;return!!u.WORKERS_SUPPORTED&&(F=(()=>{var V=n.URL||n.webkitURL||null,L=r.toString();return u.BLOB_URL||(u.BLOB_URL=V.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; ","(",L,")();"],{type:"text/javascript"})))})(),(F=new n.Worker(F)).onmessage=g,F.id=c++,s[F.id]=F)})()).userStep=B.step,T.userChunk=B.chunk,T.userComplete=B.complete,T.userError=B.error,B.step=A(B.step),B.chunk=A(B.chunk),B.complete=A(B.complete),B.error=A(B.error),delete B.worker,T.postMessage({input:k,config:B,workerId:T.id})},u.unparse=function(k,B){var T=!1,F=!0,V=",",L=`\r
|
|
283
|
+
`,H='"',X=H+H,W=!1,Z=null,Q=!1,K=((()=>{if(typeof B=="object"){if(typeof B.delimiter!="string"||u.BAD_DELIMITERS.filter(function(fe){return B.delimiter.indexOf(fe)!==-1}).length||(V=B.delimiter),typeof B.quotes!="boolean"&&typeof B.quotes!="function"&&!Array.isArray(B.quotes)||(T=B.quotes),typeof B.skipEmptyLines!="boolean"&&typeof B.skipEmptyLines!="string"||(W=B.skipEmptyLines),typeof B.newline=="string"&&(L=B.newline),typeof B.quoteChar=="string"&&(H=B.quoteChar),typeof B.header=="boolean"&&(F=B.header),Array.isArray(B.columns)){if(B.columns.length===0)throw new Error("Option columns is empty");Z=B.columns}B.escapeChar!==void 0&&(X=B.escapeChar+H),B.escapeFormulae instanceof RegExp?Q=B.escapeFormulae:typeof B.escapeFormulae=="boolean"&&B.escapeFormulae&&(Q=/^[=+\-@\t\r].*$/)}})(),new RegExp(_(H),"g"));if(typeof k=="string"&&(k=JSON.parse(k)),Array.isArray(k)){if(!k.length||Array.isArray(k[0]))return ue(null,k,W);if(typeof k[0]=="object")return ue(Z||Object.keys(k[0]),k,W)}else if(typeof k=="object")return typeof k.data=="string"&&(k.data=JSON.parse(k.data)),Array.isArray(k.data)&&(k.fields||(k.fields=k.meta&&k.meta.fields||Z),k.fields||(k.fields=Array.isArray(k.data[0])?k.fields:typeof k.data[0]=="object"?Object.keys(k.data[0]):[]),Array.isArray(k.data[0])||typeof k.data[0]=="object"||(k.data=[k.data])),ue(k.fields||[],k.data||[],W);throw new Error("Unable to serialize unrecognized input");function ue(fe,re,ye){var he="",ke=(typeof fe=="string"&&(fe=JSON.parse(fe)),typeof re=="string"&&(re=JSON.parse(re)),Array.isArray(fe)&&0<fe.length),Ee=!Array.isArray(re[0]);if(ke&&F){for(var me=0;me<fe.length;me++)0<me&&(he+=V),he+=ne(fe[me],me);0<re.length&&(he+=L)}for(var te=0;te<re.length;te++){var se=(ke?fe:re[te]).length,ie=!1,_e=ke?Object.keys(re[te]).length===0:re[te].length===0;if(ye&&!ke&&(ie=ye==="greedy"?re[te].join("").trim()==="":re[te].length===1&&re[te][0].length===0),ye==="greedy"&&ke){for(var He=[],je=0;je<se;je++){var Ve=Ee?fe[je]:je;He.push(re[te][Ve])}ie=He.join("").trim()===""}if(!ie){for(var ge=0;ge<se;ge++){0<ge&&!_e&&(he+=V);var Ce=ke&&Ee?fe[ge]:ge;he+=ne(re[te][Ce],ge)}te<re.length-1&&(!ye||0<se&&!_e)&&(he+=L)}}return he}function ne(fe,re){var ye,he;return fe==null?"":fe.constructor===Date?JSON.stringify(fe).slice(1,25):(he=!1,Q&&typeof fe=="string"&&Q.test(fe)&&(fe="'"+fe,he=!0),ye=fe.toString().replace(K,X),(he=he||T===!0||typeof T=="function"&&T(fe,re)||Array.isArray(T)&&T[re]||((ke,Ee)=>{for(var me=0;me<Ee.length;me++)if(-1<ke.indexOf(Ee[me]))return!0;return!1})(ye,u.BAD_DELIMITERS)||-1<ye.indexOf(V)||ye.charAt(0)===" "||ye.charAt(ye.length-1)===" ")?H+ye+H:ye)}},u.RECORD_SEP="",u.UNIT_SEP="",u.BYTE_ORDER_MARK="\uFEFF",u.BAD_DELIMITERS=["\r",`
|
|
284
|
+
`,'"',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=y,u.ParserHandle=m,u.NetworkStreamer=h,u.FileStreamer=d,u.StringStreamer=p,u.ReadableStreamStreamer=w,n.jQuery&&((a=n.jQuery).fn.parse=function(k){var B=k.config||{},T=[];return this.each(function(L){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 H=0;H<this.files.length;H++)T.push({file:this.files[H],inputElem:this,instanceConfig:a.extend({},B)})}),F(),this;function F(){if(T.length===0)A(k.complete)&&k.complete();else{var L,H,X,W,Z=T[0];if(A(k.before)){var Q=k.before(Z.file,Z.inputElem);if(typeof Q=="object"){if(Q.action==="abort")return L="AbortError",H=Z.file,X=Z.inputElem,W=Q.reason,void(A(k.error)&&k.error({name:L},H,X,W));if(Q.action==="skip")return void V();typeof Q.config=="object"&&(Z.instanceConfig=a.extend(Z.instanceConfig,Q.config))}else if(Q==="skip")return void V()}var K=Z.instanceConfig.complete;Z.instanceConfig.complete=function(ue){A(K)&&K(ue,Z.file,Z.inputElem),V()},u.parse(Z.file,Z.instanceConfig)}}function V(){T.splice(0,1),F()}}),o&&(n.onmessage=function(k){k=k.data,u.WORKER_ID===void 0&&k&&(u.WORKER_ID=k.workerId),typeof k.input=="string"?n.postMessage({workerId:u.WORKER_ID,results:u.parse(k.input,k.config),finished:!0}):(n.File&&k.input instanceof File||k.input instanceof Object)&&(k=u.parse(k.input,k.config))&&n.postMessage({workerId:u.WORKER_ID,results:k,finished:!0})}),(h.prototype=Object.create(f.prototype)).constructor=h,(d.prototype=Object.create(f.prototype)).constructor=d,(p.prototype=Object.create(p.prototype)).constructor=p,(w.prototype=Object.create(f.prototype)).constructor=w,u})})(Lp);var Pp=Lp.exports;const M9=Qs({__proto__:null,default:rf(Pp)},[Pp]);zt.FileExplorer=r3,zt.PreviewModal=pc,zt.RecentlyOpened=fc,zt.StarButton=dc,zt.TagPicker=uc,zt.en=oc,zt.ensureHighlight=e0,zt.ensureMonaco=Qi,zt.getHighlight=cc,zt.getMonaco=Io,zt.isExternalUsable=To,zt.messages=Mo,zt.preloadEditor=li,zt.resolveEndpoints=ec,zt.tr=ic,zt.useFileApi=tc,zt.useKeyboardShortcuts=ac,zt.useLocale=_r,zt.useMonacoLoader=em,zt.usePendingOps=sc,zt.useSelection=nc,zt.useUploadChunked=rc,Object.defineProperty(zt,Symbol.toStringTag,{value:"Module"})});
|
|
285
|
+
//# sourceMappingURL=filex-core.umd.cjs.map
|