@thorvg/lottie-player 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gl/lottie-player.cjs.js +2 -2
- package/dist/gl/lottie-player.esm.js +2 -2
- package/dist/gl/lottie-player.js +2 -2
- package/dist/gl/thorvg.wasm +0 -0
- package/dist/gl-lite/lottie-player.cjs.js +2 -2
- package/dist/gl-lite/lottie-player.esm.js +2 -2
- package/dist/gl-lite/lottie-player.js +2 -2
- package/dist/gl-lite/thorvg.wasm +0 -0
- package/dist/lottie-player.cjs.js +2 -2
- package/dist/lottie-player.esm.js +2 -2
- package/dist/lottie-player.js +2 -2
- package/dist/sw/lottie-player.cjs.js +1 -1
- package/dist/sw/lottie-player.esm.js +1 -1
- package/dist/sw/lottie-player.js +1 -1
- package/dist/sw/thorvg.wasm +0 -0
- package/dist/sw-lite/lottie-player.cjs.js +1 -1
- package/dist/sw-lite/lottie-player.esm.js +1 -1
- package/dist/sw-lite/lottie-player.js +1 -1
- package/dist/sw-lite/thorvg.wasm +0 -0
- package/dist/thorvg.wasm +0 -0
- package/dist/wg/lottie-player.cjs.js +1 -1
- package/dist/wg/lottie-player.esm.js +1 -1
- package/dist/wg/lottie-player.js +1 -1
- package/dist/wg/thorvg.wasm +0 -0
- package/dist/wg-lite/lottie-player.cjs.js +1 -1
- package/dist/wg-lite/lottie-player.esm.js +1 -1
- package/dist/wg-lite/lottie-player.js +1 -1
- package/dist/wg-lite/thorvg.wasm +0 -0
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var t="undefined"!=typeof document?document.currentScript:null;const e=globalThis,r=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,n=Symbol(),i=new WeakMap;let a=class{constructor(t,e,r){if(this._$cssResult$=!0,r!==n)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(r&&void 0===t){const r=void 0!==e&&1===e.length;r&&(t=i.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&i.set(e,t))}return t}toString(){return this.cssText}};const s=r?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const r of t.cssRules)e+=r.cssText;return(t=>new a("string"==typeof t?t:t+"",void 0,n))(e)})(t):t,{is:o,defineProperty:h,getOwnPropertyDescriptor:l,getOwnPropertyNames:c,getOwnPropertySymbols:u,getPrototypeOf:d}=Object,f=globalThis,p=f.trustedTypes,w=p?p.emptyScript:"",m=f.reactiveElementPolyfillSupport,v=(t,e)=>t,y={toAttribute(t,e){switch(e){case Boolean:t=t?w:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=null!==t;break;case Number:r=null===t?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch(t){r=null}}return r}},g=(t,e)=>!o(t,e),b={attribute:!0,type:String,converter:y,reflect:!1,useDefault:!1,hasChanged:g};Symbol.metadata??=Symbol("metadata"),f.litPropertyMetadata??=new WeakMap;let $=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=b){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const r=Symbol(),n=this.getPropertyDescriptor(t,r,e);void 0!==n&&h(this.prototype,t,n)}}static getPropertyDescriptor(t,e,r){const{get:n,set:i}=l(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:n,set(e){const a=n?.call(this);i?.call(this,e),this.requestUpdate(t,a,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(v("elementProperties")))return;const t=d(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(v("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(v("properties"))){const t=this.properties,e=[...c(t),...u(t)];for(const r of e)this.createProperty(r,t[r])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,r]of e)this.elementProperties.set(t,r)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const r=this._$Eu(t,e);void 0!==r&&this._$Eh.set(r,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const t of r)e.unshift(s(t))}else void 0!==t&&e.push(s(t));return e}static _$Eu(t,e){const r=e.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,n)=>{if(r)t.adoptedStyleSheets=n.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const r of n){const n=document.createElement("style"),i=e.litNonce;void 0!==i&&n.setAttribute("nonce",i),n.textContent=r.cssText,t.appendChild(n)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$ET(t,e){const r=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,r);if(void 0!==n&&!0===r.reflect){const i=(void 0!==r.converter?.toAttribute?r.converter:y).toAttribute(e,r.type);this._$Em=t,null==i?this.removeAttribute(n):this.setAttribute(n,i),this._$Em=null}}_$AK(t,e){const r=this.constructor,n=r._$Eh.get(t);if(void 0!==n&&this._$Em!==n){const t=r.getPropertyOptions(n),i="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:y;this._$Em=n;const a=i.fromAttribute(e,t.type);this[n]=a??this._$Ej?.get(n)??a,this._$Em=null}}requestUpdate(t,e,r){if(void 0!==t){const n=this.constructor,i=this[t];if(r??=n.getPropertyOptions(t),!((r.hasChanged??g)(i,e)||r.useDefault&&r.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(n._$Eu(t,r))))return;this.C(t,e,r)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:r,reflect:n,wrapped:i},a){r&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,a??e??this[t]),!0!==i||void 0!==a)||(this._$AL.has(t)||(this.hasUpdated||r||(e=void 0),this._$AL.set(t,e)),!0===n&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,r]of t){const{wrapped:t}=r,n=this[e];!0!==t||this._$AL.has(e)||void 0===n||this.C(e,void 0,r,n)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}};$.elementStyles=[],$.shadowRootOptions={mode:"open"},$[v("elementProperties")]=new Map,$[v("finalized")]=new Map,m?.({ReactiveElement:$}),(f.reactiveElementVersions??=[]).push("2.1.1");const _={attribute:!0,type:String,converter:y,reflect:!1,hasChanged:g},A=(t=_,e,r)=>{const{kind:n,metadata:i}=r;let a=globalThis.litPropertyMetadata.get(i);if(void 0===a&&globalThis.litPropertyMetadata.set(i,a=new Map),"setter"===n&&((t=Object.create(t)).wrapped=!0),a.set(r.name,t),"accessor"===n){const{name:n}=r;return{set(r){const i=e.get.call(this);e.set.call(this,r),this.requestUpdate(n,i,t)},init(e){return void 0!==e&&this.C(n,void 0,t,e),e}}}if("setter"===n){const{name:n}=r;return function(r){const i=this[n];e.call(this,r),this.requestUpdate(n,i,t)}}throw Error("Unsupported decorator location: "+n)};function S(t){return(e,r)=>"object"==typeof r?A(t,e,r):((t,e,r)=>{const n=e.hasOwnProperty(r);return e.constructor.createProperty(r,t),n?Object.getOwnPropertyDescriptor(e,r):void 0})(t,e,r)}const E=globalThis,k=E.trustedTypes,R=k?k.createPolicy("lit-html",{createHTML:t=>t}):void 0,T="$lit$",L=`lit$${Math.random().toFixed(9).slice(2)}$`,P="?"+L,O=`<${P}>`,C=document,M=()=>C.createComment(""),U=t=>null===t||"object"!=typeof t&&"function"!=typeof t,N=Array.isArray,x="[ \t\n\f\r]",j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,F=/-->/g,V=/>/g,D=RegExp(`>|${x}(?:([^\\s"'>=/]+)(${x}*=${x}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),z=/'/g,H=/"/g,I=/^(?:script|style|textarea|title)$/i,W=(t,...e)=>({_$litType$:1,strings:t,values:e}),B=Symbol.for("lit-noChange"),G=Symbol.for("lit-nothing"),q=new WeakMap,X=C.createTreeWalker(C,129);function Z(t,e){if(!N(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==R?R.createHTML(e):e}const Y=(t,e)=>{const r=t.length-1,n=[];let i,a=2===e?"<svg>":3===e?"<math>":"",s=j;for(let e=0;e<r;e++){const r=t[e];let o,h,l=-1,c=0;for(;c<r.length&&(s.lastIndex=c,h=s.exec(r),null!==h);)c=s.lastIndex,s===j?"!--"===h[1]?s=F:void 0!==h[1]?s=V:void 0!==h[2]?(I.test(h[2])&&(i=RegExp("</"+h[2],"g")),s=D):void 0!==h[3]&&(s=D):s===D?">"===h[0]?(s=i??j,l=-1):void 0===h[1]?l=-2:(l=s.lastIndex-h[2].length,o=h[1],s=void 0===h[3]?D:'"'===h[3]?H:z):s===H||s===z?s=D:s===F||s===V?s=j:(s=D,i=void 0);const u=s===D&&t[e+1].startsWith("/>")?" ":"";a+=s===j?r+O:l>=0?(n.push(o),r.slice(0,l)+T+r.slice(l)+L+u):r+L+(-2===l?e:u)}return[Z(t,a+(t[r]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),n]};class J{constructor({strings:t,_$litType$:e},r){let n;this.parts=[];let i=0,a=0;const s=t.length-1,o=this.parts,[h,l]=Y(t,e);if(this.el=J.createElement(h,r),X.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(n=X.nextNode())&&o.length<s;){if(1===n.nodeType){if(n.hasAttributes())for(const t of n.getAttributeNames())if(t.endsWith(T)){const e=l[a++],r=n.getAttribute(t).split(L),s=/([.?@])?(.*)/.exec(e);o.push({type:1,index:i,name:s[2],strings:r,ctor:"."===s[1]?rt:"?"===s[1]?nt:"@"===s[1]?it:et}),n.removeAttribute(t)}else t.startsWith(L)&&(o.push({type:6,index:i}),n.removeAttribute(t));if(I.test(n.tagName)){const t=n.textContent.split(L),e=t.length-1;if(e>0){n.textContent=k?k.emptyScript:"";for(let r=0;r<e;r++)n.append(t[r],M()),X.nextNode(),o.push({type:2,index:++i});n.append(t[e],M())}}}else if(8===n.nodeType)if(n.data===P)o.push({type:2,index:i});else{let t=-1;for(;-1!==(t=n.data.indexOf(L,t+1));)o.push({type:7,index:i}),t+=L.length-1}i++}}static createElement(t,e){const r=C.createElement("template");return r.innerHTML=t,r}}function K(t,e,r=t,n){if(e===B)return e;let i=void 0!==n?r._$Co?.[n]:r._$Cl;const a=U(e)?void 0:e._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),void 0===a?i=void 0:(i=new a(t),i._$AT(t,r,n)),void 0!==n?(r._$Co??=[])[n]=i:r._$Cl=i),void 0!==i&&(e=K(t,i._$AS(t,e.values),i,n)),e}class Q{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:r}=this._$AD,n=(t?.creationScope??C).importNode(e,!0);X.currentNode=n;let i=X.nextNode(),a=0,s=0,o=r[0];for(;void 0!==o;){if(a===o.index){let e;2===o.type?e=new tt(i,i.nextSibling,this,t):1===o.type?e=new o.ctor(i,o.name,o.strings,this,t):6===o.type&&(e=new at(i,this,t)),this._$AV.push(e),o=r[++s]}a!==o?.index&&(i=X.nextNode(),a++)}return X.currentNode=C,n}p(t){let e=0;for(const r of this._$AV)void 0!==r&&(void 0!==r.strings?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}}class tt{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,n){this.type=2,this._$AH=G,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=K(this,t,e),U(t)?t===G||null==t||""===t?(this._$AH!==G&&this._$AR(),this._$AH=G):t!==this._$AH&&t!==B&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>N(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==G&&U(this._$AH)?this._$AA.nextSibling.data=t:this.T(C.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:r}=t,n="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=J.createElement(Z(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(e);else{const t=new Q(n,this),r=t.u(this.options);t.p(e),this.T(r),this._$AH=t}}_$AC(t){let e=q.get(t.strings);return void 0===e&&q.set(t.strings,e=new J(t)),e}k(t){N(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let r,n=0;for(const i of t)n===e.length?e.push(r=new tt(this.O(M()),this.O(M()),this,this.options)):r=e[n],r._$AI(i),n++;n<e.length&&(this._$AR(r&&r._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class et{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,n,i){this.type=1,this._$AH=G,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=i,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=G}_$AI(t,e=this,r,n){const i=this.strings;let a=!1;if(void 0===i)t=K(this,t,e,0),a=!U(t)||t!==this._$AH&&t!==B,a&&(this._$AH=t);else{const n=t;let s,o;for(t=i[0],s=0;s<i.length-1;s++)o=K(this,n[r+s],e,s),o===B&&(o=this._$AH[s]),a||=!U(o)||o!==this._$AH[s],o===G?t=G:t!==G&&(t+=(o??"")+i[s+1]),this._$AH[s]=o}a&&!n&&this.j(t)}j(t){t===G?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class rt extends et{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===G?void 0:t}}class nt extends et{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==G)}}class it extends et{constructor(t,e,r,n,i){super(t,e,r,n,i),this.type=5}_$AI(t,e=this){if((t=K(this,t,e,0)??G)===B)return;const r=this._$AH,n=t===G&&r!==G||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,i=t!==G&&(r===G||n);n&&this.element.removeEventListener(this.name,this,r),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class at{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){K(this,t)}}const st=E.litHtmlPolyfillSupport;st?.(J,tt),(E.litHtmlVersions??=[]).push("3.3.1");const ot=globalThis;class ht extends ${constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,r)=>{const n=r?.renderBefore??e;let i=n._$litPart$;if(void 0===i){const t=r?.renderBefore??null;n._$litPart$=i=new tt(e.insertBefore(M(),t),t,void 0,r??{})}return i._$AI(t),i})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return B}}ht._$litElement$=!0,ht.finalized=!0,ot.litElementHydrateSupport?.({LitElement:ht});const lt=ot.litElementPolyfillSupport;function ct(t,e,r,n){var i,a=arguments.length,s=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,n);else for(var o=t.length-1;o>=0;o--)(i=t[o])&&(s=(a<3?i(s):a>3?i(e,r,s):i(e,r))||s);return a>3&&s&&Object.defineProperty(e,r,s),s}lt?.({LitElement:ht}),(ot.litElementVersions??=[]).push("4.2.1");let ut=null,dt=!1;var ft=function(t){return t.JSON="json",t.LOT="lot",t.JPG="jpg",t.PNG="png",t.SVG="svg",t}({});const pt=t=>new Promise(e=>setTimeout(e,t));let wt="idle";class mt extends ht{src;wasmUrl;fileType="json";speed=1;autoPlay=!1;count;loop=!1;direction=1;mode="normal";intermission=1;totalFrame=0;currentFrame=0;currentState="loading";get size(){return Float32Array.from(this.TVG?.size()||[0,0])}TVG=null;canvas;config;_imageData;_beginTime=Date.now();_counter=1;_timer;_observer;_observable=!1;_assetResolverCallback;_assetResolverData;async _init(){if(dt)for(;!ut;)await pt(100);if(ut||(dt=!0,ut=await async function(e={}){var r,n=e,i=!!globalThis.window,a=!!globalThis.WorkerGlobalScope,s=globalThis.process?.versions?.node&&"renderer"!=globalThis.process?.type;if(s){const{createRequire:e}=await Promise.resolve().then(function(){return gt});var o=e("undefined"==typeof document?require("url").pathToFileURL(__filename).href:t&&"SCRIPT"===t.tagName.toUpperCase()&&t.src||new URL("lottie-player.cjs.js",document.baseURI).href)}var h,l,c=(t,e)=>{throw e},u="undefined"==typeof document?require("url").pathToFileURL(__filename).href:t&&"SCRIPT"===t.tagName.toUpperCase()&&t.src||new URL("lottie-player.cjs.js",document.baseURI).href,d="";if(s){var f=o("fs");u.startsWith("file:")&&(d=o("path").dirname(o("url").fileURLToPath(u))+"/"),l=t=>(t=C(t)?new URL(t):t,f.readFileSync(t)),h=async t=>(t=C(t)?new URL(t):t,f.readFileSync(t,void 0)),process.argv.slice(2),c=(t,e)=>{throw process.exitCode=t,e}}else if(i||a){try{d=new URL(".",u).href}catch{}a&&(l=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),h=async t=>{if(C(t))return new Promise((e,r)=>{var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):r(n.status)},n.onerror=r,n.send(null)});var e=await fetch(t,{credentials:"same-origin"});if(e.ok)return e.arrayBuffer();throw Error(e.status+" : "+e.url)}}var p,w,m,v,y,g,b,$,_,A,S,E,k,R,T,L=function(){}.bind(),P=function(){}.bind(),O=!1,C=t=>t.startsWith("file://"),M=!1;function U(){var t=Ke.buffer;y=new Int8Array(t),b=new Int16Array(t),g=new Uint8Array(t),$=new Uint16Array(t),_=new Int32Array(t),A=new Uint32Array(t),S=new Float32Array(t),E=new Float64Array(t),k=new BigInt64Array(t),R=new BigUint64Array(t)}function N(t){throw n.onAbort?.(t),P(t="Aborted("+t+")"),O=!0,t=new WebAssembly.RuntimeError(t+". Build with -sASSERTIONS for more info."),v?.(t),t}class x{name="ExitStatus";constructor(t){this.message=`Program terminated with exit(${t})`,this.status=t}}var j=t=>{for(;0<t.length;)t.shift()(n)},F=[],V=[],D=()=>{var t=n.preRun.shift();V.push(t)},z=!0,H=t=>{for(var e="";;){var r=g[t++];if(!r)return e;e+=String.fromCharCode(r)}},I={},W={},B={},G=class extends Error{constructor(t){super(t),this.name="BindingError"}},q=t=>{throw new G(t)};function X(t,e,r={}){return function(t,e,r={}){var n=e.name;if(!t)throw new G(`type "${n}" must have a positive integer typeid pointer`);if(W.hasOwnProperty(t)){if(r.vb)return;throw new G(`Cannot register type '${n}' twice`)}W[t]=e,delete B[t],I.hasOwnProperty(t)&&(e=I[t],delete I[t],e.forEach(t=>t()))}(t,e,r)}var Z=(t,e,r)=>{switch(e){case 1:return r?t=>y[t]:t=>g[t];case 2:return r?t=>b[t>>1]:t=>$[t>>1];case 4:return r?t=>_[t>>2]:t=>A[t>>2];case 8:return r?t=>k[t>>3]:t=>R[t>>3];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Y=t=>{throw new G(t.M.U.R.name+" instance already deleted")},J=!1,K=()=>{},Q=t=>globalThis.FinalizationRegistry?(J=new FinalizationRegistry(t=>{--(t=t.M).count.value,0===t.count.value&&(t.X?t.aa.oa(t.X):t.U.R.oa(t.S))}),Q=t=>{var e=t.M;return e.X&&J.register(t,{M:e},t),t},K=t=>{J.unregister(t)},Q(t)):(Q=t=>t,t);function tt(){}var et=(t,e)=>Object.defineProperty(e,"name",{value:t}),rt={},nt=(t,e,r)=>{if(void 0===t[e].W){var n=t[e];t[e]=function(...n){if(!t[e].W.hasOwnProperty(n.length))throw new G(`Function '${r}' called with an invalid number of arguments (${n.length}) - expects one of (${t[e].W})!`);return t[e].W[n.length].apply(this,n)},t[e].W=[],t[e].W[n.wa]=n}},it=(t,e,r)=>{if(n.hasOwnProperty(t)){if(void 0===r||void 0!==n[t].W&&void 0!==n[t].W[r])throw new G(`Cannot register public name '${t}' twice`);if(nt(n,t,t),n[t].W.hasOwnProperty(r))throw new G(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`);n[t].W[r]=e}else n[t]=e,n[t].wa=r};function at(t,e,r,n,i,a,s,o){this.name=t,this.constructor=e,this.ta=r,this.oa=n,this.Z=i,this.rb=a,this.Ba=s,this.ob=o,this.Bb=[]}var st=(t,e,r)=>{for(;e!==r;){if(!e.Ba)throw new G(`Expected null or instance of ${r.name}, got an instance of ${e.name}`);t=e.Ba(t),e=e.Z}return t},ot=t=>{if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t};function ht(t,e){if(null===e){if(this.La)throw new G(`null is not a valid ${this.name}`);return 0}if(!e.M)throw new G(`Cannot pass "${ot(e)}" as a ${this.name}`);if(!e.M.S)throw new G(`Cannot pass deleted object as a pointer of type ${this.name}`);return st(e.M.S,e.M.U.R,this.R)}function lt(t,e){if(null===e){if(this.La)throw new G(`null is not a valid ${this.name}`);if(this.Ea){var r=this.Cb();return null!==t&&t.push(this.oa,r),r}return 0}if(!e||!e.M)throw new G(`Cannot pass "${ot(e)}" as a ${this.name}`);if(!e.M.S)throw new G(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.Da&&e.M.U.Da)throw new G(`Cannot convert argument of type ${e.M.aa?e.M.aa.name:e.M.U.name} to parameter type ${this.name}`);if(r=st(e.M.S,e.M.U.R,this.R),this.Ea){if(void 0===e.M.X)throw new G("Passing raw pointer to smart pointer is illegal");switch(this.Eb){case 0:if(e.M.aa!==this)throw new G(`Cannot convert argument of type ${e.M.aa?e.M.aa.name:e.M.U.name} to parameter type ${this.name}`);r=e.M.X;break;case 1:r=e.M.X;break;case 2:if(e.M.aa===this)r=e.M.X;else{var n=e.clone();r=this.Db(r,Mt(()=>n.delete())),null!==t&&t.push(this.oa,r)}break;default:throw new G("Unsupporting sharing policy")}}return r}function ct(t,e){if(null===e){if(this.La)throw new G(`null is not a valid ${this.name}`);return 0}if(!e.M)throw new G(`Cannot pass "${ot(e)}" as a ${this.name}`);if(!e.M.S)throw new G(`Cannot pass deleted object as a pointer of type ${this.name}`);if(e.M.U.Da)throw new G(`Cannot convert argument of type ${e.M.U.name} to parameter type ${this.name}`);return st(e.M.S,e.M.U.R,this.R)}function ut(t){return this.Y(A[t>>2])}var dt=(t,e,r)=>e===r?t:void 0===r.Z||null===(t=dt(t,e,r.Z))?null:r.ob(t),ft={},pt=class extends Error{constructor(t){super(t),this.name="InternalError"}},wt=(t,e)=>{if(!e.U||!e.S)throw new pt("makeClassHandle requires ptr and ptrType");if(!!e.aa!=!!e.X)throw new pt("Both smartPtrType and smartPtr must be specified");return e.count={value:1},Q(Object.create(t,{M:{value:e,writable:!0}}))};function mt(t,e,r,n,i,a,s,o,h,l,c){this.name=t,this.R=e,this.La=r,this.Da=n,this.Ea=i,this.Ab=a,this.Eb=s,this.eb=o,this.Cb=h,this.Db=l,this.oa=c,i||void 0!==e.Z?this.ba=lt:(this.ba=n?ht:ct,this.da=null)}var vt=(t,e,r)=>{if(!n.hasOwnProperty(t))throw new pt("Replacing nonexistent public symbol");void 0!==n[t].W&&void 0!==r?n[t].W[r]=e:(n[t]=e,n[t].wa=r)},yt=(t,e)=>{t=H(t);var r=Qe.get(e);if("function"!=typeof r)throw new G(`unknown function pointer with signature ${t}: ${e}`);return r};class bt extends Error{}var $t=t=>{t=Ye(t);var e=H(t);return Xe(t),e},_t=(t,e)=>{var r=[],n={};throw e.forEach(function t(e){n[e]||W[e]||(B[e]?B[e].forEach(t):(r.push(e),n[e]=!0))}),new bt(`${t}: `+r.map($t).join([", "]))},At=(t,e,r)=>{function n(e){if((e=r(e)).length!==t.length)throw new pt("Mismatched type converter count");for(var n=0;n<t.length;++n)X(t[n],e[n])}t.forEach(t=>B[t]=e);var i=Array(e.length),a=[],s=0;for(let[t,r]of e.entries())W.hasOwnProperty(r)?i[t]=W[r]:(a.push(r),I.hasOwnProperty(r)||(I[r]=[]),I[r].push(()=>{i[t]=W[r],++s===a.length&&n(i)}));0===a.length&&n(i)},St=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(A[e+4*n>>2]);return r},Et=t=>{for(;t.length;){var e=t.pop();t.pop()(e)}};function kt(t){for(var e=1;e<t.length;++e)if(null!==t[e]&&void 0===t[e].da)return!0;return!1}function Rt(t,e,r,n,i,a){var s=e.length;if(2>s)throw new G("argTypes array size mismatch! Must at least get return value and 'this' types!");var o=null!==e[1]&&null!==r,h=kt(e);r=!e[0].bb;var l=e[0],c=e[1];for(n=[t,q,n,i,Et,l.Y.bind(l),c?.ba.bind(c)],i=2;i<s;++i)n.push((l=e[i]).ba.bind(l));if(!h)for(i=o?1:2;i<e.length;++i)null!==e[i].da&&n.push(e[i].da);for(h=kt(e),i=e.length-2,c=[],l=["fn"],o&&l.push("thisWired"),s=0;s<i;++s)c.push(`arg${s}`),l.push(`arg${s}Wired`);c=c.join(","),l=l.join(","),c=`return function (${c}) {\n`,h&&(c+="var destructors = [];\n");var u=h?"destructors":"null",d="humanName throwBindingError invoker fn runDestructors fromRetWire toClassParamWire".split(" ");for(o&&(c+=`var thisWired = toClassParamWire(${u}, this);\n`),s=0;s<i;++s){var f=`toArg${s}Wire`;c+=`var arg${s}Wired = ${f}(${u}, arg${s});\n`,d.push(f)}if(c+=(r||a?"var rv = ":"")+`invoker(${l});\n`,h)c+="runDestructors(destructors);\n";else for(s=o?1:2;s<e.length;++s)a=1===s?"thisWired":"arg"+(s-2)+"Wired",null!==e[s].da&&(c+=`${a}_dtor(${a});\n`,d.push(`${a}_dtor`));return r&&(c+="var ret = fromRetWire(rv);\nreturn ret;\n"),e=new Function(d,c+"}\n")(...n),et(t,e)}var Tt=t=>{const e=(t=t.trim()).indexOf("(");return-1===e?t:t.slice(0,e)},Lt=[],Pt=[0,1,,1,null,1,!0,1,!1,1],Ot=t=>{9<t&&0===--Pt[t+1]&&(Pt[t]=void 0,Lt.push(t))},Ct=t=>{if(!t)throw new G(`Cannot use deleted val. handle = ${t}`);return Pt[t]},Mt=t=>{switch(t){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:const e=Lt.pop()||Pt.length;return Pt[e]=t,Pt[e+1]=1,e}},Ut={name:"emscripten::val",Y:t=>{var e=Ct(t);return Ot(t),e},ba:(t,e)=>Mt(e),ma:ut,da:null},Nt=(t,e)=>{switch(e){case 4:return function(t){return this.Y(S[t>>2])};case 8:return function(t){return this.Y(E[t>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},xt=(t,e,r,n)=>{if(!(0<n))return 0;var i=r;n=r+n-1;for(var a=0;a<t.length;++a){var s=t.codePointAt(a);if(127>=s){if(r>=n)break;e[r++]=s}else if(2047>=s){if(r+1>=n)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(65535>=s){if(r+2>=n)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=n)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s,a++}}return e[r]=0,r-i},jt=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);127>=n?e++:2047>=n?e+=2:55296<=n&&57343>=n?(e+=4,++r):e+=3}return e},Ft=new TextDecoder,Vt=(t,e,r,n)=>{if(r=e+r,n)return r;for(;t[e]&&!(e>=r);)++e;return e},Dt=new TextDecoder("utf-16le"),zt=(t,e,r)=>Dt.decode($.subarray(t>>=1,Vt($,t,e/2,r))),Ht=(t,e,r)=>{if(r??=2147483647,2>r)return 0;var n=e;r=(r-=2)<2*t.length?r/2:t.length;for(var i=0;i<r;++i)b[e>>1]=t.charCodeAt(i),e+=2;return b[e>>1]=0,e-n},It=t=>2*t.length,Wt=(t,e,r)=>{var n="";t>>=2;for(var i=0;!(i>=e/4);i++){var a=A[t+i];if(!a&&!r)break;n+=String.fromCodePoint(a)}return n},Bt=(t,e,r)=>{if(r??=2147483647,4>r)return 0;var n=e;r=n+r-4;for(var i=0;i<t.length;++i){var a=t.codePointAt(i);if(65535<a&&i++,_[e>>2]=a,(e+=4)+4>r)break}return _[e>>2]=0,e-n},Gt=t=>{for(var e=0,r=0;r<t.length;++r)65535<t.codePointAt(r)&&r++,e+=4;return e},qt=0,Xt=[],Zt=(t,e,r)=>{var n=[];return t=t(n,r),n.length&&(A[e>>2]=Mt(n)),t},Yt={},Jt=t=>{var e=Yt[t];return void 0===e?H(t):e},Kt={},Qt=t=>{w=t,z||0<qt||(n.onExit?.(t),O=!0),c(t,new x(t))},te=(t,e)=>{for(var r=0,n=t.length-1;0<=n;n--){var i=t[n];"."===i?t.splice(n,1):".."===i?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r;r--)t.unshift("..");return t},ee=t=>{var e="/"===t.charAt(0),r="/"===t.slice(-1);return(t=te(t.split("/").filter(t=>!!t),!e).join("/"))||e||(t="."),t&&r&&(t+="/"),(e?"/":"")+t},re=t=>{var e=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(t).slice(1);return t=e[0],e=e[1],t||e?(e&&=e.slice(0,-1),t+e):"."},ne=t=>t&&t.match(/([^\/]+|\/)\/*$/)[1],ie=t=>{(ie=(()=>{if(s){var t=o("crypto");return e=>t.randomFillSync(e)}return t=>crypto.getRandomValues(t)})())(t)},ae=(...t)=>{for(var e="",r=!1,n=t.length-1;-1<=n&&!r;n--){if("string"!=typeof(r=0<=n?t[n]:qe.cwd()))throw new TypeError("Arguments to path.resolve must be strings");if(!r)return"";e=r+"/"+e,r="/"===r.charAt(0)}return e=te(e.split("/").filter(t=>!!t),!r).join("/"),(r?"/":"")+e||"."},se=(t,e)=>{function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;0<=r&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=ae(t).slice(1),e=ae(e).slice(1),t=r(t.split("/")),e=r(e.split("/"));for(var n=Math.min(t.length,e.length),i=n,a=0;a<n;a++)if(t[a]!==e[a]){i=a;break}for(n=[],a=i;a<t.length;a++)n.push("..");return(n=n.concat(e.slice(i))).join("/")},oe=t=>{var e=Vt(t,0);return Ft.decode(t.buffer?t.subarray(0,e):new Uint8Array(t.slice(0,e)))},he=[],le=t=>{var e=Array(jt(t)+1);return t=xt(t,e,0,e.length),e.length=t,e},ce=[];function ue(t,e){ce[t]={input:[],output:[],va:e},Se(t,de)}var de={open(t){var e=ce[t.node.rdev];if(!e)throw new qe.L(43);t.tty=e,t.seekable=!1},close(t){t.tty.va.fsync(t.tty)},fsync(t){t.tty.va.fsync(t.tty)},read(t,e,r,n){if(!t.tty||!t.tty.va.Za)throw new qe.L(60);for(var i=0,a=0;a<n;a++){try{var s=t.tty.va.Za(t.tty)}catch(t){throw new qe.L(29)}if(void 0===s&&0===i)throw new qe.L(6);if(null==s)break;i++,e[r+a]=s}return i&&(t.node.atime=Date.now()),i},write(t,e,r,n){if(!t.tty||!t.tty.va.Pa)throw new qe.L(60);try{for(var i=0;i<n;i++)t.tty.va.Pa(t.tty,e[r+i])}catch(t){throw new qe.L(29)}return n&&(t.node.mtime=t.node.ctime=Date.now()),i}},fe={Za(){t:{if(!he.length){var t=null;if(s){var e=Buffer.alloc(256),r=0,n=process.stdin.fd;try{r=f.readSync(n,e,0,256)}catch(t){if(!t.toString().includes("EOF"))throw t;r=0}0<r&&(t=e.slice(0,r).toString("utf-8"))}else globalThis.window?.prompt&&null!==(t=window.prompt("Input: "))&&(t+="\n");if(!t){t=null;break t}he=le(t)}t=he.shift()}return t},Pa(t,e){null===e||10===e?(L(oe(t.output)),t.output=[]):0!=e&&t.output.push(e)},fsync(t){0<t.output?.length&&(L(oe(t.output)),t.output=[])},Zb:()=>({Mb:25856,Ob:5,Lb:191,Nb:35387,Kb:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),$b:()=>0,ac:()=>[24,80]},pe={Pa(t,e){null===e||10===e?(P(oe(t.output)),t.output=[]):0!=e&&t.output.push(e)},fsync(t){0<t.output?.length&&(P(oe(t.output)),t.output=[])}},we={ia:null,T:()=>we.createNode(null,"/",16895,0),createNode(t,e,r,n){if(24576==(61440&r)||qe.isFIFO(r))throw new qe.L(63);return we.ia||(we.ia={dir:{node:{fa:we.N.fa,ha:we.N.ha,lookup:we.N.lookup,ka:we.N.ka,rename:we.N.rename,unlink:we.N.unlink,rmdir:we.N.rmdir,readdir:we.N.readdir,symlink:we.N.symlink},stream:{$:we.O.$}},file:{node:{fa:we.N.fa,ha:we.N.ha},stream:{$:we.O.$,read:we.O.read,write:we.O.write,ua:we.O.ua,za:we.O.za}},link:{node:{fa:we.N.fa,ha:we.N.ha,readlink:we.N.readlink},stream:{}},Ua:{node:{fa:we.N.fa,ha:we.N.ha},stream:qe.mb}}),Ee((r=qe.createNode(t,e,r,n)).mode)?(r.N=we.ia.dir.node,r.O=we.ia.dir.stream,r.P={}):qe.isFile(r.mode)?(r.N=we.ia.file.node,r.O=we.ia.file.stream,r.V=0,r.P=null):40960==(61440&r.mode)?(r.N=we.ia.link.node,r.O=we.ia.link.stream):8192==(61440&r.mode)&&(r.N=we.ia.Ua.node,r.O=we.ia.Ua.stream),r.atime=r.mtime=r.ctime=Date.now(),t&&(t.P[e]=r,t.atime=t.mtime=t.ctime=r.atime),r},Yb:t=>t.P?t.P.subarray?t.P.subarray(0,t.V):new Uint8Array(t.P):new Uint8Array(0),N:{fa(t){var e={};return e.dev=8192==(61440&t.mode)?t.id:1,e.ino=t.id,e.mode=t.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=t.rdev,e.size=Ee(t.mode)?4096:qe.isFile(t.mode)?t.V:40960==(61440&t.mode)?t.link.length:0,e.atime=new Date(t.atime),e.mtime=new Date(t.mtime),e.ctime=new Date(t.ctime),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},ha(t,e){for(var r of["mode","atime","mtime","ctime"])null!=e[r]&&(t[r]=e[r]);void 0!==e.size&&t.V!=(e=e.size)&&(0==e?(t.P=null,t.V=0):(r=t.P,t.P=new Uint8Array(e),r&&t.P.set(r.subarray(0,Math.min(e,t.V))),t.V=e))},lookup(){throw we.Ia||(we.Ia=new qe.L(44),we.Ia.stack="<generic error, no stack>"),we.Ia},ka:(t,e,r,n)=>we.createNode(t,e,r,n),rename(t,e,r){try{var n=ke(e,r)}catch(t){}if(n){if(Ee(t.mode))for(var i in n.P)throw new qe.L(55);Re(n)}delete t.parent.P[t.name],e.P[r]=t,t.name=r,e.ctime=e.mtime=t.parent.ctime=t.parent.mtime=Date.now()},unlink(t,e){delete t.P[e],t.ctime=t.mtime=Date.now()},rmdir(t,e){var r,n=ke(t,e);for(r in n.P)throw new qe.L(55);delete t.P[e],t.ctime=t.mtime=Date.now()},readdir:t=>[".","..",...Object.keys(t.P)],symlink:(t,e,r)=>((t=we.createNode(t,e,41471,0)).link=r,t),readlink(t){if(40960!=(61440&t.mode))throw new qe.L(28);return t.link}},O:{read(t,e,r,n,i){var a=t.node.P;if(i>=t.node.V)return 0;if(8<(t=Math.min(t.node.V-i,n))&&a.subarray)e.set(a.subarray(i,i+t),r);else for(n=0;n<t;n++)e[r+n]=a[i+n];return t},write(t,e,r,n,i,a){if(e.buffer===y.buffer&&(a=!1),!n)return 0;if((t=t.node).mtime=t.ctime=Date.now(),e.subarray&&(!t.P||t.P.subarray)){if(a)return t.P=e.subarray(r,r+n),t.V=n;if(0===t.V&&0===i)return t.P=e.slice(r,r+n),t.V=n;if(i+n<=t.V)return t.P.set(e.subarray(r,r+n),i),n}var s=t.P?t.P.length:0;if(s>=(a=i+n)||(a=Math.max(a,s*(1048576>s?2:1.125)>>>0),0!=s&&(a=Math.max(a,256)),s=t.P,t.P=new Uint8Array(a),0<t.V&&t.P.set(s.subarray(0,t.V),0)),t.P.subarray&&e.subarray)t.P.set(e.subarray(r,r+n),i);else for(a=0;a<n;a++)t.P[i+a]=e[r+a];return t.V=Math.max(t.V,i+n),n},$(t,e,r){if(1===r?e+=t.position:2===r&&qe.isFile(t.node.mode)&&(e+=t.node.V),0>e)throw new qe.L(28);return e},ua(t,e,r,n,i){if(!qe.isFile(t.node.mode))throw new qe.L(43);if(t=t.node.P,2&i||!t||t.buffer!==y.buffer){if(n=!0,N(),!(i=void 0))throw new qe.L(48);t&&((0<r||r+e<t.length)&&(t=t.subarray?t.subarray(r,r+e):Array.prototype.slice.call(t,r,r+e)),y.set(t,i))}else n=!1,i=t.byteOffset;return{S:i,Gb:n}},za:(t,e,r,n)=>(we.O.write(t,e,0,n,r,!1),0)}},me=(t,e)=>{var r=0;return t&&(r|=365),e&&(r|=146),r},ve=0,ye=null,ge=()=>{if(ve--,n.monitorRunDependencies?.(ve),0==ve&&ye){var t=ye;ye=null,t()}},be=()=>{ve++,n.monitorRunDependencies?.(ve)},$e=[],_e=async(t,e,r,n,i,a,s,o)=>{var l=e?ae(ee(t+"/"+e)):t;be();try{var c=r;"string"==typeof r&&(c=await(async t=>(t=await h(t),new Uint8Array(t)))(r)),c=await(async(t,e)=>{for(var r of("undefined"!=typeof Browser&&Ae(),$e))if(r.canHandle(e))return r.handle(t,e);return t})(c,l),o?.(),a||Te(t,e,c,n,i,s)}finally{ge()}};function Ae(){var t,e,r;qe.Ka=!0,t??=n.stdin,e??=n.stdout,r??=n.stderr,t?qe.na("/dev","stdin",t):qe.symlink("/dev/tty","/dev/stdin"),e?qe.na("/dev","stdout",null,e):qe.symlink("/dev/tty","/dev/stdout"),r?qe.na("/dev","stderr",null,r):qe.symlink("/dev/tty1","/dev/stderr"),qe.open("/dev/stdin",0),qe.open("/dev/stdout",1),qe.open("/dev/stderr",1)}function Se(t,e){qe.Xa[t]={O:e}}function Ee(t){return 16384==(61440&t)}function ke(t,e){var r=Ee(t.mode)?(r=Ue(t,"x"))?r:t.N.lookup?0:2:54;if(r)throw new qe.L(r);for(r=qe.la[Oe(t.id,e)];r;r=r.sa)if(r.parent.id===t.id&&r.name===e)return r;return qe.lookup(t,e)}function Re(t){var e=Oe(t.parent.id,t.name);if(qe.la[e]===t)qe.la[e]=t.sa;else for(e=qe.la[e];e;){if(e.sa===t){e.sa=t.sa;break}e=e.sa}}function Te(t,e,r,n,i,a){var s=e;if(t&&(t="string"==typeof t?t:Pe(t),s=e?ee(t+"/"+e):t),t=me(n,i),s=qe.create(s,t),r){if("string"==typeof r){for(e=Array(r.length),n=0,i=r.length;n<i;++n)e[n]=r.charCodeAt(n);r=e}qe.chmod(s,146|t),e=qe.open(s,577),qe.write(e,r,0,r.length,0,a),qe.close(e),qe.chmod(s,t)}}function Le(t,e={}){if(!t)throw new qe.L(44);e.Ca??(e.Ca=!0),"/"===t.charAt(0)||(t=qe.cwd()+"/"+t);var r=0;t:for(;40>r;r++){t=t.split("/").filter(t=>!!t);for(var n=qe.root,i="/",a=0;a<t.length;a++){var s=a===t.length-1;if(s&&e.parent)break;if("."!==t[a])if(".."===t[a]){if(i=re(i),qe.Ma(n)){t=i+"/"+t.slice(a+1).join("/"),r--;continue t}n=n.parent}else{i=ee(i+"/"+t[a]);try{n=ke(n,t[a])}catch(t){if(44===t?.qa&&s&&e.yb)return{path:i};throw t}if(!n.ga||s&&!e.Ca||(n=n.ga.root),40960==(61440&n.mode)&&(!s||e.ea)){if(!n.N.readlink)throw new qe.L(52);"/"===(n=n.N.readlink(n)).charAt(0)||(n=re(i)+"/"+n),t=n+"/"+t.slice(a+1).join("/");continue t}}}return{path:i,node:n}}throw new qe.L(32)}function Pe(t){for(var e;;){if(qe.Ma(t))return t=t.T.cb,e?"/"!==t[t.length-1]?`${t}/${e}`:t+e:t;e=e?`${t.name}/${e}`:t.name,t=t.parent}}function Oe(t,e){for(var r=0,n=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n)|0;return(t+r>>>0)%qe.la.length}function Ce(t){var e=Oe(t.parent.id,t.name);t.sa=qe.la[e],qe.la[e]=t}function Me(t){var e=["r","w","rw"][3&t];return 512&t&&(e+="w"),e}function Ue(t,e){return qe.$a?0:!e.includes("r")||292&t.mode?e.includes("w")&&!(146&t.mode)||e.includes("x")&&!(73&t.mode)?2:0:2}function Ne(t,e){if(!Ee(t.mode))return 54;try{return ke(t,e),20}catch(t){}return Ue(t,"wx")}function xe(t,e,r){try{var n=ke(t,e)}catch(t){return t.qa}if(t=Ue(t,"wx"))return t;if(r){if(!Ee(n.mode))return 54;if(qe.Ma(n)||Pe(n)===qe.cwd())return 10}else if(Ee(n.mode))return 31;return 0}function je(t,e){if(!t)throw new qe.L(e);return t}function Fe(t){if(!(t=qe.ub(t)))throw new qe.L(8);return t}function Ve(t,e=-1){if(t=Object.assign(new qe.jb,t),-1==e)t:{for(e=0;e<=qe.kb;e++)if(!qe.streams[e])break t;throw new qe.L(33)}return t.fd=e,qe.streams[e]=t}function De(t,e,r){var n=t?.O.ha;t=n?t:e,n??=e.N.ha,je(n,63),n(t,r)}function ze(t){var e=[];for(t=[t];t.length;){var r=t.pop();e.push(r),t.push(...r.ya)}return e}function He(t){var e={Jb:4096,Vb:4096,blocks:1e6,Ib:5e5,Hb:5e5,files:qe.Oa,Tb:qe.Oa-1,Wb:42,flags:2,dc:255};return t.N.gb&&Object.assign(e,t.N.gb(t.T.zb.root)),e}function Ie(t,e,r){return void 0===r&&(r=e,e=438),qe.ka(t,8192|e,r)}function We(t,e,r,n){De(t,e,{mode:4095&r|-4096&e.mode,ctime:Date.now(),Ya:n})}function Be(t,e,r){if(Ee(e.mode))throw new qe.L(31);if(!qe.isFile(e.mode))throw new qe.L(28);var n=Ue(e,"w");if(n)throw new qe.L(n);De(t,e,{size:r,timestamp:Date.now()})}function Ge(t){if(!(t.wb||t.xb||t.link||t.P))if(globalThis.XMLHttpRequest)N("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");else try{t.P=l(t.url)}catch(t){throw new qe.L(29)}}var qe={root:null,ya:[],Xa:{},streams:[],Oa:1,la:null,Va:"/",Ka:!1,$a:!0,qb:null,Fa:0,fb:{},L:class{name="ErrnoError";constructor(t){this.qa=t}},jb:class{ja={};node=null;get object(){return this.node}set object(t){this.node=t}get flags(){return this.ja.flags}set flags(t){this.ja.flags=t}get position(){return this.ja.position}set position(t){this.ja.position=t}},ib:class{N={};O={};ga=null;constructor(t,e,r,n){t||=this,this.parent=t,this.T=t.T,this.id=qe.Oa++,this.name=e,this.mode=r,this.rdev=n,this.atime=this.mtime=this.ctime=Date.now()}get read(){return!(365&~this.mode)}set read(t){t?this.mode|=365:this.mode&=-366}get write(){return!(146&~this.mode)}set write(t){t?this.mode|=146:this.mode&=-147}get xb(){return Ee(this.mode)}get wb(){return 8192==(61440&this.mode)}},createNode:(t,e,r,n)=>(Ce(t=new qe.ib(t,e,r,n)),t),Ma:t=>t===t.parent,isFile:t=>32768==(61440&t),isFIFO:t=>4096==(61440&t),isSocket:t=>!(49152&~t),kb:4096,ub:t=>qe.streams[t],Sb:(t,e=-1)=>(t=Ve(t,e),t.O?.Rb?.(t),t),mb:{open(t){t.O=qe.sb(t.node.rdev).O,t.O.open?.(t)},$(){throw new qe.L(70)}},Na:t=>t>>8,bc:t=>255&t,ra:(t,e)=>t<<8|e,sb:t=>qe.Xa[t],hb(t,e){function r(t){return qe.Fa--,e(t)}function n(t){if(t){if(!n.pb)return n.pb=!0,r(t)}else++s>=a.length&&r(null)}"function"==typeof t&&(e=t,t=!1),qe.Fa++,1<qe.Fa&&P(`warning: ${qe.Fa} FS.syncfs operations in flight at once, probably just doing extra work`);var i,a=ze(qe.root.T),s=0;for(i of a)i.type.hb?i.type.hb(i,t,n):n(null)},T(t,e,r){var n="/"===r;if(n&&qe.root)throw new qe.L(10);if(!n&&r){var i=Le(r,{Ca:!1});if(r=i.path,(i=i.node).ga)throw new qe.L(10);if(!Ee(i.mode))throw new qe.L(54)}return(t=t.T(e={type:t,zb:e,cb:r,ya:[]})).T=e,e.root=t,n?qe.root=t:i&&(i.ga=e,i.T&&i.T.ya.push(e)),t},jc(t){if(!(t=Le(t,{Ca:!1})).node.ga)throw new qe.L(28);var e=(t=t.node).ga,r=ze(e);for([,i]of Object.entries(qe.la))for(;i;){var n=i.sa;r.includes(i.T)&&Re(i);var i=n}t.ga=null,t.T.ya.splice(t.T.ya.indexOf(e),1)},lookup:(t,e)=>t.N.lookup(t,e),ka(t,e,r){var n=Le(t,{parent:!0}).node;if(!(t=ne(t)))throw new qe.L(28);if("."===t||".."===t)throw new qe.L(20);var i=Ne(n,t);if(i)throw new qe.L(i);if(!n.N.ka)throw new qe.L(63);return n.N.ka(n,t,e,r)},gb:t=>He(Le(t,{ea:!0}).node),hc:t=>He(t.node),create:(t,e=438)=>qe.ka(t,4095&e|32768,0),mkdir:(t,e=511)=>qe.ka(t,1023&e|16384,0),cc(t,e){var r,n=t.split("/"),i="";for(r of n)if(r){(i||"/"===t.charAt(0))&&(i+="/"),i+=r;try{qe.mkdir(i,e)}catch(t){if(20!=t.qa)throw t}}},symlink(t,e){if(!ae(t))throw new qe.L(44);var r=Le(e,{parent:!0}).node;if(!r)throw new qe.L(44);var n=Ne(r,e=ne(e));if(n)throw new qe.L(n);if(!r.N.symlink)throw new qe.L(63);return r.N.symlink(r,e,t)},rename(t,e){var r=re(t),n=re(e),i=ne(t),a=ne(e),s=Le(t,{parent:!0}),o=s.node;if(s=(s=Le(e,{parent:!0})).node,!o||!s)throw new qe.L(44);if(o.T!==s.T)throw new qe.L(75);var h=ke(o,i);if("."!==(t=se(t,n)).charAt(0))throw new qe.L(28);if("."!==(t=se(e,r)).charAt(0))throw new qe.L(55);try{var l=ke(s,a)}catch(t){}if(h!==l){if(i=xe(o,i,e=Ee(h.mode)))throw new qe.L(i);if(i=l?xe(s,a,e):Ne(s,a))throw new qe.L(i);if(!o.N.rename)throw new qe.L(63);if(h.ga||l&&l.ga)throw new qe.L(10);if(s!==o&&(i=Ue(o,"w")))throw new qe.L(i);Re(h);try{o.N.rename(h,s,a),h.parent=s}catch(t){throw t}finally{Ce(h)}}},rmdir(t){var e=Le(t,{parent:!0}).node,r=ke(e,t=ne(t)),n=xe(e,t,!0);if(n)throw new qe.L(n);if(!e.N.rmdir)throw new qe.L(63);if(r.ga)throw new qe.L(10);e.N.rmdir(e,t),Re(r)},readdir:t=>je((t=Le(t,{ea:!0}).node).N.readdir,54)(t),unlink(t){var e=Le(t,{parent:!0}).node;if(!e)throw new qe.L(44);var r=ke(e,t=ne(t)),n=xe(e,t,!1);if(n)throw new qe.L(n);if(!e.N.unlink)throw new qe.L(63);if(r.ga)throw new qe.L(10);e.N.unlink(e,t),Re(r)},readlink(t){if(!(t=Le(t).node))throw new qe.L(44);if(!t.N.readlink)throw new qe.L(28);return t.N.readlink(t)},stat:(t,e)=>je((t=Le(t,{ea:!e}).node).N.fa,63)(t),fstat(t){var e=Fe(t);t=e.node;var r=e.O.fa;return e=r?e:t,r??=t.N.fa,je(r,63),r(e)},lstat:t=>qe.stat(t,!0),chmod(t,e,r){We(null,t="string"==typeof t?Le(t,{ea:!r}).node:t,e,r)},lchmod(t,e){qe.chmod(t,e,!0)},fchmod(t,e){We(t=Fe(t),t.node,e,!1)},chown(t,e,r,n){De(null,t="string"==typeof t?Le(t,{ea:!n}).node:t,{timestamp:Date.now(),Ya:n})},lchown(t,e,r){qe.chown(t,e,r,!0)},fchown(t){De(t=Fe(t),t.node,{timestamp:Date.now(),Ya:!1})},truncate(t,e){if(0>e)throw new qe.L(28);Be(null,t="string"==typeof t?Le(t,{ea:!0}).node:t,e)},Xb(t,e){if(t=Fe(t),0>e||!(2097155&t.flags))throw new qe.L(28);Be(t,t.node,e)},kc(t,e,r){je((t=Le(t,{ea:!0}).node).N.ha,63)(t,{atime:e,mtime:r})},open(t,e,r=438){if(""===t)throw new qe.L(44);if("string"==typeof e){var i={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===i)throw Error(`Unknown file open mode: ${e}`);e=i}if(r=64&e?4095&r|32768:0,"object"==typeof t)i=t;else{var a=t.endsWith("/");i=(t=Le(t,{ea:!(131072&e),yb:!0})).node,t=t.path}var s=!1;if(64&e)if(i){if(128&e)throw new qe.L(20)}else{if(a)throw new qe.L(31);i=qe.ka(t,511|r,0),s=!0}if(!i)throw new qe.L(44);if(8192==(61440&i.mode)&&(e&=-513),65536&e&&!Ee(i.mode))throw new qe.L(54);if(!s&&(a=i?40960==(61440&i.mode)?32:Ee(i.mode)&&("r"!==Me(e)||576&e)?31:Ue(i,Me(e)):44))throw new qe.L(a);return 512&e&&!s&&qe.truncate(i,0),e&=-131713,(a=Ve({node:i,path:Pe(i),flags:e,seekable:!0,position:0,O:i.O,Fb:[],error:!1})).O.open&&a.O.open(a),s&&qe.chmod(i,511&r),!n.logReadFiles||1&e||t in qe.fb||(qe.fb[t]=1),a},close(t){if(null===t.fd)throw new qe.L(8);t.Ja&&(t.Ja=null);try{t.O.close&&t.O.close(t)}catch(t){throw t}finally{qe.streams[t.fd]=null}t.fd=null},$(t,e,r){if(null===t.fd)throw new qe.L(8);if(!t.seekable||!t.O.$)throw new qe.L(70);if(0!=r&&1!=r&&2!=r)throw new qe.L(28);return t.position=t.O.$(t,e,r),t.Fb=[],t.position},read(t,e,r,n,i){if(0>n||0>i)throw new qe.L(28);if(null===t.fd)throw new qe.L(8);if(1==(2097155&t.flags))throw new qe.L(8);if(Ee(t.node.mode))throw new qe.L(31);if(!t.O.read)throw new qe.L(28);var a=void 0!==i;if(a){if(!t.seekable)throw new qe.L(70)}else i=t.position;return e=t.O.read(t,e,r,n,i),a||(t.position+=e),e},write(t,e,r,n,i,a){if(0>n||0>i)throw new qe.L(28);if(null===t.fd)throw new qe.L(8);if(!(2097155&t.flags))throw new qe.L(8);if(Ee(t.node.mode))throw new qe.L(31);if(!t.O.write)throw new qe.L(28);t.seekable&&1024&t.flags&&qe.$(t,0,2);var s=void 0!==i;if(s){if(!t.seekable)throw new qe.L(70)}else i=t.position;return e=t.O.write(t,e,r,n,i,a),s||(t.position+=e),e},ua(t,e,r,n,i){if(2&n&&!(2&i)&&2!=(2097155&t.flags))throw new qe.L(2);if(1==(2097155&t.flags))throw new qe.L(2);if(!t.O.ua)throw new qe.L(43);if(!e)throw new qe.L(28);return t.O.ua(t,e,r,n,i)},za:(t,e,r,n,i)=>t.O.za?t.O.za(t,e,r,n,i):0,ab(t,e,r){if(!t.O.ab)throw new qe.L(59);return t.O.ab(t,e,r)},readFile(t,e={}){e.flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding&&N(`Invalid encoding type "${e.encoding}"`);var r=qe.open(t,e.flags);t=qe.stat(t).size;var n=new Uint8Array(t);return qe.read(r,n,0,t,0),"utf8"===e.encoding&&(n=oe(n)),qe.close(r),n},writeFile(t,e,r={}){r.flags=r.flags||577,t=qe.open(t,r.flags,r.mode),"string"==typeof e&&(e=new Uint8Array(le(e))),ArrayBuffer.isView(e)?qe.write(t,e,0,e.byteLength,void 0,r.Pb):N("Unsupported data type"),qe.close(t)},cwd:()=>qe.Va,chdir(t){if(null===(t=Le(t,{ea:!0})).node)throw new qe.L(44);if(!Ee(t.node.mode))throw new qe.L(54);var e=Ue(t.node,"x");if(e)throw new qe.L(e);qe.Va=t.path},fc(){for(var t of(qe.Ka=!1,qe.streams))t&&qe.close(t)},Ub(t,e){try{var r=Le(t,{ea:!e});t=r.path}catch(t){}var n=!1,i=null;try{r=Le(t,{parent:!0}),ne(t),r=Le(t,{ea:!e}),n=!0,i=r.node}catch(t){}return n?i:null},na(t,e,r,n){var i;return t=((t,e)=>ee(t+"/"+e))("string"==typeof t?t:Pe(t),e),e=me(!!r,!!n),(i=qe.na).Na??(i.Na=64),Se(i=qe.ra(qe.na.Na++,0),{open(t){t.seekable=!1},close(){n?.buffer?.length&&n(10)},read(t,e,n,i){for(var a=0,s=0;s<i;s++){try{var o=r()}catch(t){throw new qe.L(29)}if(void 0===o&&0===a)throw new qe.L(6);if(null==o)break;a++,e[n+s]=o}return a&&(t.node.atime=Date.now()),a},write(t,e,r,i){for(var a=0;a<i;a++)try{n(e[r+a])}catch(t){throw new qe.L(29)}return i&&(t.node.mtime=t.node.ctime=Date.now()),a}}),Ie(t,e,i)}};if((()=>{let t=tt.prototype;Object.assign(t,{isAliasOf:function(t){if(!(this instanceof tt&&t instanceof tt))return!1;var e=this.M.U.R,r=this.M.S;t.M=t.M;var n=t.M.U.R;for(t=t.M.S;e.Z;)r=e.Ba(r),e=e.Z;for(;n.Z;)t=n.Ba(t),n=n.Z;return e===n&&r===t},clone:function(){if(this.M.S||Y(this),this.M.Aa)return this.M.count.value+=1,this;var t=Q,e=Object,r=e.create,n=Object.getPrototypeOf(this),i=this.M;return(t=t(r.call(e,n,{M:{value:{count:i.count,xa:i.xa,Aa:i.Aa,S:i.S,U:i.U,X:i.X,aa:i.aa}}}))).M.count.value+=1,t.M.xa=!1,t},delete(){if(this.M.S||Y(this),this.M.xa&&!this.M.Aa)throw new G("Object already scheduled for deletion");K(this);var t=this.M;--t.count.value,0===t.count.value&&(t.X?t.aa.oa(t.X):t.U.R.oa(t.S)),this.M.Aa||(this.M.X=void 0,this.M.S=void 0)},isDeleted:function(){return!this.M.S},deleteLater:function(){if(this.M.S||Y(this),this.M.xa&&!this.M.Aa)throw new G("Object already scheduled for deletion");return this.M.xa=!0,this}});const e=Symbol.dispose;e&&(t[e]=t.delete)})(),Object.assign(mt.prototype,{tb(t){return this.eb&&(t=this.eb(t)),t},Wa(t){this.oa?.(t)},ma:ut,Y:function(t){function e(){return wt(this.R.ta,this.Ea?{U:this.Ab,S:r,aa:this,X:t}:{U:this,S:t})}var r=this.tb(t);if(!r)return this.Wa(t),null;var n=((t,e)=>{if(void 0===e)throw new G("ptr should not be undefined");for(;t.Z;)e=t.Ba(e),t=t.Z;return ft[e]})(this.R,r);if(void 0!==n)return 0===n.M.count.value?(n.M.S=r,n.M.X=t,n.clone()):(n=n.clone(),this.Wa(t),n);if(n=this.R.rb(r),!(n=rt[n]))return e.call(this);var i=dt(r,this.R,(n=this.Da?n.nb:n.pointerType).R);return null===i?e.call(this):wt(n.R.ta,this.Ea?{U:n,S:i,aa:this,X:t}:{U:n,S:i})}}),qe.Qb=(t,e,r,n,i,a,s,o,h,l)=>{_e(t,e,r,n,i,o,h,l).then(a).catch(s)},qe.ec=_e,qe.la=Array(4096),qe.T(we,{},"/"),qe.mkdir("/tmp"),qe.mkdir("/home"),qe.mkdir("/home/web_user"),function(){qe.mkdir("/dev"),Se(qe.ra(1,3),{read:()=>0,write:(t,e,r,n)=>n,$:()=>0}),Ie("/dev/null",qe.ra(1,3)),ue(qe.ra(5,0),fe),ue(qe.ra(6,0),pe),Ie("/dev/tty",qe.ra(5,0)),Ie("/dev/tty1",qe.ra(6,0));var t=new Uint8Array(1024),e=0,r=()=>(0===e&&(ie(t),e=t.byteLength),t[--e]);qe.na("/dev","random",r),qe.na("/dev","urandom",r),qe.mkdir("/dev/shm"),qe.mkdir("/dev/shm/tmp")}(),function(){qe.mkdir("/proc");var t=qe.mkdir("/proc/self");qe.mkdir("/proc/self/fd"),qe.T({T(){var e=qe.createNode(t,"fd",16895,73);return e.O={$:we.O.$},e.N={lookup(t,e){var r=Fe(t=+e);return(t={parent:null,T:{cb:"fake"},N:{readlink:()=>r.path},id:t+1}).parent=t},readdir:()=>Array.from(qe.streams.entries()).filter(([,t])=>t).map(([t])=>t.toString())},e}},{},"/proc/self/fd")}(),qe.qb={MEMFS:we},n.noExitRuntime&&(z=n.noExitRuntime),n.preloadPlugins&&($e=n.preloadPlugins),n.print&&(L=n.print),n.printErr&&(P=n.printErr),n.wasmBinary&&(p=n.wasmBinary),n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);0<n.preInit.length;)n.preInit.shift()();n.addRunDependency=be,n.removeRunDependency=ge,n.FS_preloadFile=_e,n.FS_unlink=(...t)=>qe.unlink(...t),n.FS_createPath=(...t)=>function(t,e){for(t="string"==typeof t?t:Pe(t),e=e.split("/").reverse();e.length;){var r=e.pop();if(r){var n=ee(t+"/"+r);try{qe.mkdir(n)}catch(t){if(20!=t.qa)throw t}t=n}}return n}(...t),n.FS_createDevice=(...t)=>qe.na(...t),n.FS=qe,n.FS_createDataFile=(...t)=>Te(...t),n.FS_createLazyFile=(...t)=>function(t,e,r,n,i){class s{Ha=!1;ja=[];Ga=void 0;Ra=0;Qa=0;get(t){if(!(t>this.length-1||0>t)){var e=t%this.chunkSize;return this.Ga(t/this.chunkSize|0)[e]}}lb(t){this.Ga=t}Sa(){var t=new XMLHttpRequest;t.open("HEAD",r,!1),t.send(null),200<=t.status&&300>t.status||304===t.status||N("Couldn't load "+r+". Status: "+t.status);var e,n=Number(t.getResponseHeader("Content-length")),i=(e=t.getResponseHeader("Accept-Ranges"))&&"bytes"===e;t=(e=t.getResponseHeader("Content-Encoding"))&&"gzip"===e;var a=1048576;i||(a=n);var s=this;s.lb(t=>{var e=t*a,i=(t+1)*a-1;if(i=Math.min(i,n-1),void 0===s.ja[t]){var o=s.ja;e>i&&N("invalid range ("+e+", "+i+") or no bytes requested!"),i>n-1&&N("only "+n+" bytes available! programmer error!");var h=new XMLHttpRequest;h.open("GET",r,!1),n!==a&&h.setRequestHeader("Range","bytes="+e+"-"+i),h.responseType="arraybuffer",h.overrideMimeType&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send(null),200<=h.status&&300>h.status||304===h.status||N("Couldn't load "+r+". Status: "+h.status),e=void 0!==h.response?new Uint8Array(h.response||[]):le(h.responseText||""),o[t]=e}return void 0===s.ja[t]&&N("doXHR failed!"),s.ja[t]}),!t&&n||(a=n=1,a=n=this.Ga(0).length,L("LazyFiles on gzip forces download of the whole file when length is accessed")),this.Ra=n,this.Qa=a,this.Ha=!0}get length(){return this.Ha||this.Sa(),this.Ra}get chunkSize(){return this.Ha||this.Sa(),this.Qa}}if(globalThis.XMLHttpRequest){a||N("Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc");var o=new s,h=void 0}else h=r,o=void 0;var l=function(t,e,r,n){return t="string"==typeof t?t:Pe(t),e=ee(t+"/"+e),qe.create(e,me(r,n))}(t,e,n,i);o?l.P=o:h&&(l.P=null,l.url=h),Object.defineProperties(l,{V:{get:function(){return this.P.length}}}),t={};for(const[e,r]of Object.entries(l.O))t[e]=(...t)=>(Ge(l),r(...t));return t.read=(t,e,r,n,i)=>{if(Ge(l),i>=(t=t.node.P).length)e=0;else{if(n=Math.min(t.length-i,n),t.slice)for(var a=0;a<n;a++)e[r+a]=t[i+a];else for(a=0;a<n;a++)e[r+a]=t.get(i+a);e=n}return e},t.ua=()=>{throw Ge(l),N(),new qe.L(48)},l.O=t,l}(...t);var Xe,Ze,Ye,Je,Ke,Qe,tr,er={v:()=>N(""),k:(t,e,r,n,i)=>{e=H(e);let a=t=>t;if(n=0n===n){const t=8*r;a=e=>BigInt.asUintN(t,e),i=a(i)}X(t,{name:e,Y:a,ba:(t,e)=>("number"==typeof e&&(e=BigInt(e)),e),ma:Z(e,r,!n),da:null})},A:(t,e,r,n)=>{X(t,{name:e=H(e),Y:function(t){return!!t},ba:function(t,e){return e?r:n},ma:function(t){return this.Y(g[t])},da:null})},x:(t,e,r,n,i,a,s,o,h,l,c,u,d)=>{c=H(c),a=yt(i,a),o&&=yt(s,o),l&&=yt(h,l),d=yt(u,d);var f=(t=>{var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return 48<=e&&57>=e?`_${t}`:t})(c);it(f,function(){_t(`Cannot construct ${c} due to unbound types`,[n])}),At([t,e,r],n?[n]:[],e=>{if(e=e[0],n)var r=e.R,i=r.ta;else i=tt.prototype;e=et(c,function(...t){if(Object.getPrototypeOf(this)!==s)throw new G(`Use 'new' to construct ${c}`);if(void 0===u.pa)throw new G(`${c} has no accessible constructor`);var e=u.pa[t.length];if(void 0===e)throw new G(`Tried to invoke ctor of ${c} with invalid number of parameters (${t.length}) - expected (${Object.keys(u.pa).toString()}) parameters instead!`);return e.apply(this,t)});var s=Object.create(i,{constructor:{value:e}});e.prototype=s;var h,u=new at(c,e,s,d,r,a,o,l);return u.Z&&((h=u.Z).Ta??(h.Ta=[]),u.Z.Ta.push(u)),r=new mt(c,u,!0,!1,!1),h=new mt(c+"*",u,!1,!1,!1),i=new mt(c+" const*",u,!1,!0,!1),rt[t]={pointerType:h,nb:i},vt(f,e),[r,h,i]})},n:(t,e,r,n,i,a)=>{var s=St(e,r);i=yt(n,i),At([],[t],t=>{var r=`constructor ${(t=t[0]).name}`;if(void 0===t.R.pa&&(t.R.pa=[]),void 0!==t.R.pa[e-1])throw new G(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${t.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return t.R.pa[e-1]=()=>{_t(`Cannot construct ${t.name} due to unbound types`,s)},At([],s,n=>(n.splice(1,0,null),t.R.pa[e-1]=Rt(r,n,null,i,a),[])),[]})},b:(t,e,r,n,i,a,s,o,h)=>{var l=St(r,n);e=H(e),e=Tt(e),a=yt(i,a),At([],[t],t=>{function n(){_t(`Cannot call ${i} due to unbound types`,l)}var i=`${(t=t[0]).name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),o&&t.R.Bb.push(e);var c=t.R.ta,u=c[e];return void 0===u||void 0===u.W&&u.className!==t.name&&u.wa===r-2?(n.wa=r-2,n.className=t.name,c[e]=n):(nt(c,e,i),c[e].W[r-2]=n),At([],l,n=>(n=Rt(i,n,t,a,s,h),void 0===c[e].W?(n.wa=r-2,c[e]=n):c[e].W[r-2]=n,[])),[]})},y:t=>X(t,Ut),j:(t,e,r)=>{X(t,{name:e=H(e),Y:t=>t,ba:(t,e)=>e,ma:Nt(e,r),da:null})},l:(t,e,r,n,i,a,s)=>{var o=St(e,r);t=H(t),t=Tt(t),i=yt(n,i),it(t,function(){_t(`Cannot call ${t} due to unbound types`,o)},e-1),At([],o,r=>(r=[r[0],null].concat(r.slice(1)),vt(t,Rt(t,r,null,i,a,s),e-1),[]))},c:(t,e,r,n,i)=>{e=H(e);let a=t=>t;if(0===n){var s=32-8*r;a=t=>t<<s>>>s,i=a(i)}X(t,{name:e,Y:a,ba:(t,e)=>e,ma:Z(e,r,0!==n),da:null})},a:(t,e,r)=>{function n(t){return new i(y.buffer,A[t+4>>2],A[t>>2])}var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][e];X(t,{name:r=H(r),Y:n,ma:n},{vb:!0})},z:(t,e)=>{X(t,{name:e=H(e),Y(t){var e=(e=t+4)?Ft.decode(g.subarray(e,Vt(g,e,A[t>>2],!0))):"";return Xe(t),e},ba(t,e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));var r="string"==typeof e;if(!(r||ArrayBuffer.isView(e)&&1==e.BYTES_PER_ELEMENT))throw new G("Cannot pass non-string to std::string");var n=r?jt(e):e.length,i=Ze(4+n+1),a=i+4;return A[i>>2]=n,r?xt(e,g,a,n+1):g.set(e,a),null!==t&&t.push(Xe,i),i},ma:ut,da(t){Xe(t)}})},g:(t,e,r)=>{if(r=H(r),2===e)var n=zt,i=Ht,a=It;else n=Wt,i=Bt,a=Gt;X(t,{name:r,Y:t=>{var r=n(t+4,A[t>>2]*e,!0);return Xe(t),r},ba:(t,n)=>{if("string"!=typeof n)throw new G(`Cannot pass non-string to C++ string type ${r}`);var s=a(n),o=Ze(4+s+e);return A[o>>2]=s/e,i(n,o+4,s+e),null!==t&&t.push(Xe,o),o},ma:ut,da(t){Xe(t)}})},h:t=>{X(t,Ut)},B:(t,e)=>{X(t,{bb:!0,name:e=H(e),Y:()=>{},ba:()=>{}})},q:()=>{z=!1,qt=0},e:(t,e,r)=>{var[n,...i]=((t,e)=>{for(var r=Array(t),n=0;n<t;++n){var i=n,a=A[e+4*n>>2],s=W[a];if(void 0===s)throw t=`parameter ${n} has unknown type ${$t(a)}`,new G(t);r[i]=s}return r})(t,e);e=n.ba.bind(n);var a=i.map(t=>t.ma.bind(t));t--;var s={toValue:Ct};switch(t=a.map((t,e)=>{var r=`argFromPtr${e}`;return s[r]=t,`${r}(args${e?"+"+8*e:""})`}),r){case 0:var o="toValue(handle)";break;case 2:o="new (toValue(handle))";break;case 3:o="";break;case 1:s.getStringOrSymbol=Jt,o="toValue(handle)[getStringOrSymbol(methodName)]"}return o+=`(${t})`,n.bb||(s.toReturnWire=e,s.emval_returnValue=Zt,o=`return emval_returnValue(toReturnWire, destructorsRef, ${o})`),o=`return function (handle, methodName, destructorsRef, args) {\n ${o}\n }`,r=new Function(Object.keys(s),o)(...Object.values(s)),o=`methodCaller<(${i.map(t=>t.name)}) => ${n.name}>`,(t=>{var e=Xt.length;return Xt.push(t),e})(et(o,r))},o:Ot,C:t=>t?(t=Jt(t),Mt(globalThis[t])):Mt(globalThis),f:(t,e)=>(t=Ct(t),e=Ct(e),Mt(t[e])),i:t=>{9<t&&(Pt[t+1]+=1)},d:(t,e,r,n,i)=>Xt[t](e,r,n,i),D:t=>Mt(Jt(t)),m:t=>{var e=Ct(t);Et(e),Ot(t)},r:(t,e)=>{if(Kt[t]&&(clearTimeout(Kt[t].id),delete Kt[t]),!e)return 0;var r=setTimeout(()=>{delete Kt[t],(t=>{if(!O)try{if(t(),!(z||0<qt))try{w=t=w,Qt(t)}catch(t){t instanceof x||"unwind"==t||c(1,t)}}catch(t){t instanceof x||"unwind"==t||c(1,t)}})(()=>Je(t,performance.now()))},e);return Kt[t]={id:r,ic:e},0},w:t=>{var e=g.length;if(2147483648<(t>>>=0))return!1;for(var r=1;4>=r;r*=2){var n=e*(1+.2/r);n=Math.min(n,t+100663296);t:{n=(Math.min(2147483648,65536*Math.ceil(Math.max(t,n)/65536))-Ke.buffer.byteLength+65535)/65536|0;try{Ke.grow(n),U();var i=1;break t}catch(t){}i=void 0}if(i)return!0}return!1},u:function(t){try{var e=Fe(t);return qe.close(e),0}catch(t){if(void 0===qe||"ErrnoError"!==t.name)throw t;return t.qa}},s:function(t,e,r,n){e=-9007199254740992>e||9007199254740992<e?NaN:Number(e);try{if(isNaN(e))return 61;var i=Fe(t);return qe.$(i,e,r),k[n>>3]=BigInt(i.position),i.Ja&&0===e&&0===r&&(i.Ja=null),0}catch(t){if(void 0===qe||"ErrnoError"!==t.name)throw t;return t.qa}},t:function(t,e,r,n){try{t:{var i=Fe(t);t=e;for(var a,s=e=0;s<r;s++){var o=A[t>>2],h=A[t+4>>2];t+=8;var l=qe.write(i,y,o,h,a);if(0>l){var c=-1;break t}if(e+=l,l<h)break;void 0!==a&&(a+=l)}c=e}return A[n>>2]=c,0}catch(t){if(void 0===qe||"ErrnoError"!==t.name)throw t;return t.qa}},p:Qt};return tr=await async function(){function e(t){return t=tr=t.exports,Xe=t.G,Ze=t.H,Ye=t.I,Je=t.J,Ke=t.E,Qe=t.K,U(),tr}var r={a:er};return n.instantiateWasm?new Promise(t=>{n.instantiateWasm(r,(r,n)=>{t(e(r))})}):(T??=n.locateFile?n.locateFile?n.locateFile("thorvg.wasm",d):d+"thorvg.wasm":new URL("thorvg.wasm","undefined"==typeof document?require("url").pathToFileURL(__filename).href:t&&"SCRIPT"===t.tagName.toUpperCase()&&t.src||new URL("lottie-player.cjs.js",document.baseURI).href).href,e((await async function(t){var e=T;if(!p&&!C(e)&&!s)try{var r=fetch(e,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(r,t)}catch(t){P(`wasm streaming compile failed: ${t}`),P("falling back to ArrayBuffer instantiation")}return async function(t,e){try{var r=await async function(t){if(!p)try{var e=await h(t);return new Uint8Array(e)}catch{}if(t==T&&p)t=new Uint8Array(p);else{if(!l)throw"both async and sync fetching of the wasm failed";t=l(t)}return t}(t);return await WebAssembly.instantiate(r,e)}catch(t){P(`failed to asynchronously prepare wasm: ${t}`),N(t)}}(e,t)}(r)).instance))}(),function t(){function e(){if(n.calledRun=!0,!O){if(M=!0,n.noFSInit||qe.Ka||Ae(),tr.F(),qe.$a=!1,m?.(n),n.onRuntimeInitialized?.(),n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;){var t=n.postRun.shift();F.push(t)}j(F)}}if(0<ve)ye=t;else{if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)D();j(V),0<ve?ye=t:n.setStatus?(n.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>n.setStatus(""),1),e()},1)):e()}}(),r=M?n:new Promise((t,e)=>{m=t,v=e}),r}({locateFile:(t,e)=>t.endsWith(".wasm")?this.wasmUrl||"https://unpkg.com/@thorvg/lottie-player@latest/dist/thorvg.wasm":e+t})),!this._timer)return;clearInterval(this._timer),this._timer=void 0;const e=this.config?.renderer||"sw";if(await(async t=>{if("wg"===t){for(;"requested"===wt;)await pt(100);if("initialized"!==wt&&(wt="requested",ut))for(;;)switch(ut.init()){case 0:return void(wt="initialized");case 1:return void(wt="failed");case 2:await pt(100)}}})(e),"failed"===wt)return this.currentState="error",void this.dispatchEvent(new CustomEvent("error"));this.TVG=new ut.TvgLottieAnimation(e,`#${this.canvas.id}`),this.src&&this.load(this.src,this.fileType)}_viewport(){const{left:t,right:e,top:r,bottom:n}=this.getBoundingClientRect(),i=window.innerWidth,a=window.innerHeight;let s=0,o=0,h=this.canvas.width,l=this.canvas.height;t<0&&(s=Math.abs(t),h-=s),r<0&&(o=Math.abs(r),l-=o),e>i&&(h-=e-i),n>a&&(l-=n-a),this.TVG.viewport(s,o,h,l)}_observerCallback(t){const e=t[0],r=e.target;r._observable=e.isIntersecting,e.isIntersecting?"frozen"===r.currentState&&r.play():"playing"===r.currentState&&(r.freeze(),r.dispatchEvent(new CustomEvent("freeze")))}firstUpdated(t){this.canvas=this.querySelector(".thorvg"),this.canvas.id=`thorvg-${Date.now().toString(36)+Math.random().toString(36).substring(2)}`,this.canvas.width=this.canvas.offsetWidth,this.canvas.height=this.canvas.offsetHeight,this._observer=new IntersectionObserver(this._observerCallback),this._observer.observe(this),this.TVG?this.src&&this.load(this.src,this.fileType):this._timer=setInterval(this._init.bind(this),100)}createRenderRoot(){return this.style.display="block",this}async _animLoop(){this.TVG&&await this._update()&&(this._render(),window.requestAnimationFrame(this._animLoop.bind(this)))}_loadBytes(t){if(!this.TVG)throw new Error("TVG is not initialized");if(this._assetResolverCallback&&this.TVG.setAssetResolver(this._assetResolverCallback,this._assetResolverData),!this.TVG.load(t,this.fileType,this.canvas.width,this.canvas.height))throw new Error(`Unable to load an image. Error: ${this.TVG.error()}`);this._render(),this.dispatchEvent(new CustomEvent("load")),this.autoPlay&&this.play()}_flush(){this.canvas.getContext("2d").putImageData(this._imageData,0,0)}_render(){if(!this.TVG)return;if(!1!==this.config?.enableDevicePixelRatio){const t=1+.75*(window.devicePixelRatio-1),{width:e,height:r}=this.canvas.getBoundingClientRect();this.canvas.width=e*t,this.canvas.height=r*t}if(this.TVG.resize(this.canvas.width,this.canvas.height),this._viewport(),!this.TVG.update())return;if("wg"===this.config?.renderer||"gl"===this.config?.renderer)return void this.TVG.render();const t=this.TVG.render(),e=new Uint8ClampedArray(t,0,t.byteLength);e.length<1||(this._imageData=new ImageData(e,this.canvas.width,this.canvas.height),this._flush())}async _update(){if(!this.TVG)return!1;if("playing"!==this.currentState)return!1;const t=this.TVG.duration(),e=Date.now()/1e3;if(this.currentFrame=(e-this._beginTime)/t*this.totalFrame*this.speed,-1===this.direction&&(this.currentFrame=this.totalFrame-this.currentFrame),1===this.direction&&this.currentFrame>=this.totalFrame||-1===this.direction&&this.currentFrame<=0){const t=this.count?"bounce"===this.mode?2*this.count:this.count:0;if(this.loop||t&&this._counter<t)return"bounce"===this.mode&&(this.direction=1===this.direction?-1:1,this.currentFrame=1===this.direction?0:this.totalFrame),this.count&&(this._counter+=1),await pt(this.intermission),this.play(),!0;this.dispatchEvent(new CustomEvent("complete")),this.currentState="stopped"}return this.dispatchEvent(new CustomEvent("frame",{detail:{frame:this.currentFrame}})),this.TVG.frame(this.currentFrame)}_frame(t){this.TVG&&(this.pause(),this.currentFrame=t,this.TVG.frame(t))}async load(t,e="json"){try{await this._init();const r=await(async(t,e)=>{const r=new TextEncoder;let n=t;switch(typeof n){case"object":return n instanceof ArrayBuffer?new Uint8Array(n):(n=JSON.stringify(n),r.encode(n));case"string":if("json"===e||"lot"===e)return n=await(async t=>{try{t=JSON.parse(t)}catch(e){const r=await(async t=>{if("string"!=typeof t)throw new Error("The url value must be a string");try{const e=new URL(t),r=await fetch(e.toString());return await r.json()}catch(t){throw new Error("An error occurred while trying to load the Lottie file from URL")}})(t);t=JSON.stringify(r)}return t})(n),r.encode(n);const t=await(async t=>(await fetch(t)).arrayBuffer())(n);return new Uint8Array(t);default:throw new Error("Invalid src type")}})(t,e);this.dispatchEvent(new CustomEvent("ready")),this.fileType=e,await this._loadBytes(r)}catch(t){this.currentState="error",this.dispatchEvent(new CustomEvent("error"))}}play(){if(this.TVG&&!("json"!==this.fileType&&"lot"!==this.fileType||(this.totalFrame=this.TVG.totalFrame(),this.totalFrame<1||(this._beginTime=Date.now()/1e3,"playing"===this.currentState))))return this._observable?(this.currentState="playing",void window.requestAnimationFrame(this._animLoop.bind(this))):void(this.currentState="frozen")}pause(){this.currentState="paused",this.dispatchEvent(new CustomEvent("pause"))}stop(){this.currentState="stopped",this.currentFrame=0,this._counter=1,this.seek(0),this.dispatchEvent(new CustomEvent("stop"))}freeze(){this.currentState="frozen",this.dispatchEvent(new CustomEvent("freeze"))}async seek(t){this._frame(t),await this._update(),this._render()}resize(t,e){this.canvas.width=t,this.canvas.height=e,"playing"!==this.currentState&&this._render()}destroy(){this.TVG&&(this.TVG.delete(),this.TVG=null,this.currentState="destroyed",this._observer&&(this._observer.disconnect(),this._observer=void 0),this.dispatchEvent(new CustomEvent("destroyed")),this.remove())}term(){ut&&(ut.term(),ut=null)}setLooping(t){this.TVG&&(this.loop=t)}setDirection(t){this.TVG&&(this.direction=t)}setSpeed(t){this.TVG&&(this.speed=t)}setBgColor(t){this.TVG&&(this.canvas.style.backgroundColor=t)}setQuality(t){this.TVG&&this.TVG.quality(t)&&"playing"!==this.currentState&&this._render()}setAssetResolver(t,e){this._assetResolverCallback=t,this._assetResolverData=e,this.TVG&&this.TVG.setAssetResolver(t,e)}getVersion(){return{THORVG_VERSION:"1.0.0"}}render(){return W`
|
|
1
|
+
"use strict";var t="undefined"!=typeof document?document.currentScript:null;const e=globalThis,r=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,n=Symbol(),i=new WeakMap;let a=class{constructor(t,e,r){if(this._$cssResult$=!0,r!==n)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(r&&void 0===t){const r=void 0!==e&&1===e.length;r&&(t=i.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&i.set(e,t))}return t}toString(){return this.cssText}};const s=r?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const r of t.cssRules)e+=r.cssText;return(t=>new a("string"==typeof t?t:t+"",void 0,n))(e)})(t):t,{is:o,defineProperty:h,getOwnPropertyDescriptor:l,getOwnPropertyNames:c,getOwnPropertySymbols:u,getPrototypeOf:d}=Object,f=globalThis,p=f.trustedTypes,w=p?p.emptyScript:"",m=f.reactiveElementPolyfillSupport,v=(t,e)=>t,y={toAttribute(t,e){switch(e){case Boolean:t=t?w:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=null!==t;break;case Number:r=null===t?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch(t){r=null}}return r}},g=(t,e)=>!o(t,e),b={attribute:!0,type:String,converter:y,reflect:!1,useDefault:!1,hasChanged:g};Symbol.metadata??=Symbol("metadata"),f.litPropertyMetadata??=new WeakMap;let $=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=b){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const r=Symbol(),n=this.getPropertyDescriptor(t,r,e);void 0!==n&&h(this.prototype,t,n)}}static getPropertyDescriptor(t,e,r){const{get:n,set:i}=l(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:n,set(e){const a=n?.call(this);i?.call(this,e),this.requestUpdate(t,a,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(v("elementProperties")))return;const t=d(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(v("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(v("properties"))){const t=this.properties,e=[...c(t),...u(t)];for(const r of e)this.createProperty(r,t[r])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,r]of e)this.elementProperties.set(t,r)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const r=this._$Eu(t,e);void 0!==r&&this._$Eh.set(r,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const t of r)e.unshift(s(t))}else void 0!==t&&e.push(s(t));return e}static _$Eu(t,e){const r=e.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,n)=>{if(r)t.adoptedStyleSheets=n.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const r of n){const n=document.createElement("style"),i=e.litNonce;void 0!==i&&n.setAttribute("nonce",i),n.textContent=r.cssText,t.appendChild(n)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$ET(t,e){const r=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,r);if(void 0!==n&&!0===r.reflect){const i=(void 0!==r.converter?.toAttribute?r.converter:y).toAttribute(e,r.type);this._$Em=t,null==i?this.removeAttribute(n):this.setAttribute(n,i),this._$Em=null}}_$AK(t,e){const r=this.constructor,n=r._$Eh.get(t);if(void 0!==n&&this._$Em!==n){const t=r.getPropertyOptions(n),i="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:y;this._$Em=n;const a=i.fromAttribute(e,t.type);this[n]=a??this._$Ej?.get(n)??a,this._$Em=null}}requestUpdate(t,e,r){if(void 0!==t){const n=this.constructor,i=this[t];if(r??=n.getPropertyOptions(t),!((r.hasChanged??g)(i,e)||r.useDefault&&r.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(n._$Eu(t,r))))return;this.C(t,e,r)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:r,reflect:n,wrapped:i},a){r&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,a??e??this[t]),!0!==i||void 0!==a)||(this._$AL.has(t)||(this.hasUpdated||r||(e=void 0),this._$AL.set(t,e)),!0===n&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,r]of t){const{wrapped:t}=r,n=this[e];!0!==t||this._$AL.has(e)||void 0===n||this.C(e,void 0,r,n)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}};$.elementStyles=[],$.shadowRootOptions={mode:"open"},$[v("elementProperties")]=new Map,$[v("finalized")]=new Map,m?.({ReactiveElement:$}),(f.reactiveElementVersions??=[]).push("2.1.1");const _={attribute:!0,type:String,converter:y,reflect:!1,hasChanged:g},A=(t=_,e,r)=>{const{kind:n,metadata:i}=r;let a=globalThis.litPropertyMetadata.get(i);if(void 0===a&&globalThis.litPropertyMetadata.set(i,a=new Map),"setter"===n&&((t=Object.create(t)).wrapped=!0),a.set(r.name,t),"accessor"===n){const{name:n}=r;return{set(r){const i=e.get.call(this);e.set.call(this,r),this.requestUpdate(n,i,t)},init(e){return void 0!==e&&this.C(n,void 0,t,e),e}}}if("setter"===n){const{name:n}=r;return function(r){const i=this[n];e.call(this,r),this.requestUpdate(n,i,t)}}throw Error("Unsupported decorator location: "+n)};function S(t){return(e,r)=>"object"==typeof r?A(t,e,r):((t,e,r)=>{const n=e.hasOwnProperty(r);return e.constructor.createProperty(r,t),n?Object.getOwnPropertyDescriptor(e,r):void 0})(t,e,r)}const E=globalThis,k=E.trustedTypes,R=k?k.createPolicy("lit-html",{createHTML:t=>t}):void 0,T="$lit$",L=`lit$${Math.random().toFixed(9).slice(2)}$`,P="?"+L,O=`<${P}>`,C=document,M=()=>C.createComment(""),U=t=>null===t||"object"!=typeof t&&"function"!=typeof t,N=Array.isArray,x="[ \t\n\f\r]",j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,F=/-->/g,V=/>/g,D=RegExp(`>|${x}(?:([^\\s"'>=/]+)(${x}*=${x}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),z=/'/g,H=/"/g,I=/^(?:script|style|textarea|title)$/i,W=(t,...e)=>({_$litType$:1,strings:t,values:e}),B=Symbol.for("lit-noChange"),G=Symbol.for("lit-nothing"),q=new WeakMap,X=C.createTreeWalker(C,129);function Z(t,e){if(!N(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==R?R.createHTML(e):e}const Y=(t,e)=>{const r=t.length-1,n=[];let i,a=2===e?"<svg>":3===e?"<math>":"",s=j;for(let e=0;e<r;e++){const r=t[e];let o,h,l=-1,c=0;for(;c<r.length&&(s.lastIndex=c,h=s.exec(r),null!==h);)c=s.lastIndex,s===j?"!--"===h[1]?s=F:void 0!==h[1]?s=V:void 0!==h[2]?(I.test(h[2])&&(i=RegExp("</"+h[2],"g")),s=D):void 0!==h[3]&&(s=D):s===D?">"===h[0]?(s=i??j,l=-1):void 0===h[1]?l=-2:(l=s.lastIndex-h[2].length,o=h[1],s=void 0===h[3]?D:'"'===h[3]?H:z):s===H||s===z?s=D:s===F||s===V?s=j:(s=D,i=void 0);const u=s===D&&t[e+1].startsWith("/>")?" ":"";a+=s===j?r+O:l>=0?(n.push(o),r.slice(0,l)+T+r.slice(l)+L+u):r+L+(-2===l?e:u)}return[Z(t,a+(t[r]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),n]};class J{constructor({strings:t,_$litType$:e},r){let n;this.parts=[];let i=0,a=0;const s=t.length-1,o=this.parts,[h,l]=Y(t,e);if(this.el=J.createElement(h,r),X.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(n=X.nextNode())&&o.length<s;){if(1===n.nodeType){if(n.hasAttributes())for(const t of n.getAttributeNames())if(t.endsWith(T)){const e=l[a++],r=n.getAttribute(t).split(L),s=/([.?@])?(.*)/.exec(e);o.push({type:1,index:i,name:s[2],strings:r,ctor:"."===s[1]?rt:"?"===s[1]?nt:"@"===s[1]?it:et}),n.removeAttribute(t)}else t.startsWith(L)&&(o.push({type:6,index:i}),n.removeAttribute(t));if(I.test(n.tagName)){const t=n.textContent.split(L),e=t.length-1;if(e>0){n.textContent=k?k.emptyScript:"";for(let r=0;r<e;r++)n.append(t[r],M()),X.nextNode(),o.push({type:2,index:++i});n.append(t[e],M())}}}else if(8===n.nodeType)if(n.data===P)o.push({type:2,index:i});else{let t=-1;for(;-1!==(t=n.data.indexOf(L,t+1));)o.push({type:7,index:i}),t+=L.length-1}i++}}static createElement(t,e){const r=C.createElement("template");return r.innerHTML=t,r}}function K(t,e,r=t,n){if(e===B)return e;let i=void 0!==n?r._$Co?.[n]:r._$Cl;const a=U(e)?void 0:e._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),void 0===a?i=void 0:(i=new a(t),i._$AT(t,r,n)),void 0!==n?(r._$Co??=[])[n]=i:r._$Cl=i),void 0!==i&&(e=K(t,i._$AS(t,e.values),i,n)),e}class Q{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:r}=this._$AD,n=(t?.creationScope??C).importNode(e,!0);X.currentNode=n;let i=X.nextNode(),a=0,s=0,o=r[0];for(;void 0!==o;){if(a===o.index){let e;2===o.type?e=new tt(i,i.nextSibling,this,t):1===o.type?e=new o.ctor(i,o.name,o.strings,this,t):6===o.type&&(e=new at(i,this,t)),this._$AV.push(e),o=r[++s]}a!==o?.index&&(i=X.nextNode(),a++)}return X.currentNode=C,n}p(t){let e=0;for(const r of this._$AV)void 0!==r&&(void 0!==r.strings?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}}class tt{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,n){this.type=2,this._$AH=G,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=K(this,t,e),U(t)?t===G||null==t||""===t?(this._$AH!==G&&this._$AR(),this._$AH=G):t!==this._$AH&&t!==B&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>N(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==G&&U(this._$AH)?this._$AA.nextSibling.data=t:this.T(C.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:r}=t,n="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=J.createElement(Z(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(e);else{const t=new Q(n,this),r=t.u(this.options);t.p(e),this.T(r),this._$AH=t}}_$AC(t){let e=q.get(t.strings);return void 0===e&&q.set(t.strings,e=new J(t)),e}k(t){N(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let r,n=0;for(const i of t)n===e.length?e.push(r=new tt(this.O(M()),this.O(M()),this,this.options)):r=e[n],r._$AI(i),n++;n<e.length&&(this._$AR(r&&r._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class et{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,n,i){this.type=1,this._$AH=G,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=i,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=G}_$AI(t,e=this,r,n){const i=this.strings;let a=!1;if(void 0===i)t=K(this,t,e,0),a=!U(t)||t!==this._$AH&&t!==B,a&&(this._$AH=t);else{const n=t;let s,o;for(t=i[0],s=0;s<i.length-1;s++)o=K(this,n[r+s],e,s),o===B&&(o=this._$AH[s]),a||=!U(o)||o!==this._$AH[s],o===G?t=G:t!==G&&(t+=(o??"")+i[s+1]),this._$AH[s]=o}a&&!n&&this.j(t)}j(t){t===G?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class rt extends et{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===G?void 0:t}}class nt extends et{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==G)}}class it extends et{constructor(t,e,r,n,i){super(t,e,r,n,i),this.type=5}_$AI(t,e=this){if((t=K(this,t,e,0)??G)===B)return;const r=this._$AH,n=t===G&&r!==G||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,i=t!==G&&(r===G||n);n&&this.element.removeEventListener(this.name,this,r),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class at{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){K(this,t)}}const st=E.litHtmlPolyfillSupport;st?.(J,tt),(E.litHtmlVersions??=[]).push("3.3.1");const ot=globalThis;class ht extends ${constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,r)=>{const n=r?.renderBefore??e;let i=n._$litPart$;if(void 0===i){const t=r?.renderBefore??null;n._$litPart$=i=new tt(e.insertBefore(M(),t),t,void 0,r??{})}return i._$AI(t),i})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return B}}ht._$litElement$=!0,ht.finalized=!0,ot.litElementHydrateSupport?.({LitElement:ht});const lt=ot.litElementPolyfillSupport;function ct(t,e,r,n){var i,a=arguments.length,s=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,n);else for(var o=t.length-1;o>=0;o--)(i=t[o])&&(s=(a<3?i(s):a>3?i(e,r,s):i(e,r))||s);return a>3&&s&&Object.defineProperty(e,r,s),s}lt?.({LitElement:ht}),(ot.litElementVersions??=[]).push("4.2.1");let ut=null,dt=!1;var ft=function(t){return t.JSON="json",t.LOT="lot",t.JPG="jpg",t.PNG="png",t.SVG="svg",t}({});const pt=t=>new Promise(e=>setTimeout(e,t));let wt="idle";class mt extends ht{src;wasmUrl;fileType="json";speed=1;autoPlay=!1;count;loop=!1;direction=1;mode="normal";intermission=1;totalFrame=0;currentFrame=0;currentState="loading";get size(){return Float32Array.from(this.TVG?.size()||[0,0])}TVG=null;canvas;config;_imageData;_beginTime=Date.now();_counter=1;_timer;_observer;_observable=!1;_assetResolverCallback;_assetResolverData;async _init(){if(dt)for(;!ut;)await pt(100);if(ut||(dt=!0,ut=await async function(e={}){var r,n=e,i=!!globalThis.window,a=!!globalThis.WorkerGlobalScope,s=globalThis.process?.versions?.node&&"renderer"!=globalThis.process?.type;if(s){const{createRequire:e}=await Promise.resolve().then(function(){return gt});var o=e("undefined"==typeof document?require("url").pathToFileURL(__filename).href:t&&"SCRIPT"===t.tagName.toUpperCase()&&t.src||new URL("lottie-player.cjs.js",document.baseURI).href)}var h,l,c=(t,e)=>{throw e},u="undefined"==typeof document?require("url").pathToFileURL(__filename).href:t&&"SCRIPT"===t.tagName.toUpperCase()&&t.src||new URL("lottie-player.cjs.js",document.baseURI).href,d="";if(s){var f=o("fs");u.startsWith("file:")&&(d=o("path").dirname(o("url").fileURLToPath(u))+"/"),l=t=>(t=C(t)?new URL(t):t,f.readFileSync(t)),h=async t=>(t=C(t)?new URL(t):t,f.readFileSync(t,void 0)),process.argv.slice(2),c=(t,e)=>{throw process.exitCode=t,e}}else if(i||a){try{d=new URL(".",u).href}catch{}a&&(l=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),h=async t=>{if(C(t))return new Promise((e,r)=>{var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):r(n.status)},n.onerror=r,n.send(null)});var e=await fetch(t,{credentials:"same-origin"});if(e.ok)return e.arrayBuffer();throw Error(e.status+" : "+e.url)}}var p,w,m,v,y,g,b,$,_,A,S,E,k,R,T,L=function(){}.bind(),P=function(){}.bind(),O=!1,C=t=>t.startsWith("file://"),M=!1;function U(){var t=Ke.buffer;y=new Int8Array(t),b=new Int16Array(t),g=new Uint8Array(t),$=new Uint16Array(t),_=new Int32Array(t),A=new Uint32Array(t),S=new Float32Array(t),E=new Float64Array(t),k=new BigInt64Array(t),R=new BigUint64Array(t)}function N(t){throw n.onAbort?.(t),P(t="Aborted("+t+")"),O=!0,t=new WebAssembly.RuntimeError(t+". Build with -sASSERTIONS for more info."),v?.(t),t}class x{name="ExitStatus";constructor(t){this.message=`Program terminated with exit(${t})`,this.status=t}}var j=t=>{for(;0<t.length;)t.shift()(n)},F=[],V=[],D=()=>{var t=n.preRun.shift();V.push(t)},z=!0,H=t=>{for(var e="";;){var r=g[t++];if(!r)return e;e+=String.fromCharCode(r)}},I={},W={},B={},G=class extends Error{constructor(t){super(t),this.name="BindingError"}},q=t=>{throw new G(t)};function X(t,e,r={}){return function(t,e,r={}){var n=e.name;if(!t)throw new G(`type "${n}" must have a positive integer typeid pointer`);if(W.hasOwnProperty(t)){if(r.vb)return;throw new G(`Cannot register type '${n}' twice`)}W[t]=e,delete B[t],I.hasOwnProperty(t)&&(e=I[t],delete I[t],e.forEach(t=>t()))}(t,e,r)}var Z=(t,e,r)=>{switch(e){case 1:return r?t=>y[t]:t=>g[t];case 2:return r?t=>b[t>>1]:t=>$[t>>1];case 4:return r?t=>_[t>>2]:t=>A[t>>2];case 8:return r?t=>k[t>>3]:t=>R[t>>3];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Y=t=>{throw new G(t.M.U.R.name+" instance already deleted")},J=!1,K=()=>{},Q=t=>globalThis.FinalizationRegistry?(J=new FinalizationRegistry(t=>{--(t=t.M).count.value,0===t.count.value&&(t.X?t.aa.oa(t.X):t.U.R.oa(t.S))}),Q=t=>{var e=t.M;return e.X&&J.register(t,{M:e},t),t},K=t=>{J.unregister(t)},Q(t)):(Q=t=>t,t);function tt(){}var et=(t,e)=>Object.defineProperty(e,"name",{value:t}),rt={},nt=(t,e,r)=>{if(void 0===t[e].W){var n=t[e];t[e]=function(...n){if(!t[e].W.hasOwnProperty(n.length))throw new G(`Function '${r}' called with an invalid number of arguments (${n.length}) - expects one of (${t[e].W})!`);return t[e].W[n.length].apply(this,n)},t[e].W=[],t[e].W[n.wa]=n}},it=(t,e,r)=>{if(n.hasOwnProperty(t)){if(void 0===r||void 0!==n[t].W&&void 0!==n[t].W[r])throw new G(`Cannot register public name '${t}' twice`);if(nt(n,t,t),n[t].W.hasOwnProperty(r))throw new G(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`);n[t].W[r]=e}else n[t]=e,n[t].wa=r};function at(t,e,r,n,i,a,s,o){this.name=t,this.constructor=e,this.ta=r,this.oa=n,this.Z=i,this.rb=a,this.Ba=s,this.ob=o,this.Bb=[]}var st=(t,e,r)=>{for(;e!==r;){if(!e.Ba)throw new G(`Expected null or instance of ${r.name}, got an instance of ${e.name}`);t=e.Ba(t),e=e.Z}return t},ot=t=>{if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t};function ht(t,e){if(null===e){if(this.La)throw new G(`null is not a valid ${this.name}`);return 0}if(!e.M)throw new G(`Cannot pass "${ot(e)}" as a ${this.name}`);if(!e.M.S)throw new G(`Cannot pass deleted object as a pointer of type ${this.name}`);return st(e.M.S,e.M.U.R,this.R)}function lt(t,e){if(null===e){if(this.La)throw new G(`null is not a valid ${this.name}`);if(this.Ea){var r=this.Cb();return null!==t&&t.push(this.oa,r),r}return 0}if(!e||!e.M)throw new G(`Cannot pass "${ot(e)}" as a ${this.name}`);if(!e.M.S)throw new G(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.Da&&e.M.U.Da)throw new G(`Cannot convert argument of type ${e.M.aa?e.M.aa.name:e.M.U.name} to parameter type ${this.name}`);if(r=st(e.M.S,e.M.U.R,this.R),this.Ea){if(void 0===e.M.X)throw new G("Passing raw pointer to smart pointer is illegal");switch(this.Eb){case 0:if(e.M.aa!==this)throw new G(`Cannot convert argument of type ${e.M.aa?e.M.aa.name:e.M.U.name} to parameter type ${this.name}`);r=e.M.X;break;case 1:r=e.M.X;break;case 2:if(e.M.aa===this)r=e.M.X;else{var n=e.clone();r=this.Db(r,Mt(()=>n.delete())),null!==t&&t.push(this.oa,r)}break;default:throw new G("Unsupporting sharing policy")}}return r}function ct(t,e){if(null===e){if(this.La)throw new G(`null is not a valid ${this.name}`);return 0}if(!e.M)throw new G(`Cannot pass "${ot(e)}" as a ${this.name}`);if(!e.M.S)throw new G(`Cannot pass deleted object as a pointer of type ${this.name}`);if(e.M.U.Da)throw new G(`Cannot convert argument of type ${e.M.U.name} to parameter type ${this.name}`);return st(e.M.S,e.M.U.R,this.R)}function ut(t){return this.Y(A[t>>2])}var dt=(t,e,r)=>e===r?t:void 0===r.Z||null===(t=dt(t,e,r.Z))?null:r.ob(t),ft={},pt=class extends Error{constructor(t){super(t),this.name="InternalError"}},wt=(t,e)=>{if(!e.U||!e.S)throw new pt("makeClassHandle requires ptr and ptrType");if(!!e.aa!=!!e.X)throw new pt("Both smartPtrType and smartPtr must be specified");return e.count={value:1},Q(Object.create(t,{M:{value:e,writable:!0}}))};function mt(t,e,r,n,i,a,s,o,h,l,c){this.name=t,this.R=e,this.La=r,this.Da=n,this.Ea=i,this.Ab=a,this.Eb=s,this.eb=o,this.Cb=h,this.Db=l,this.oa=c,i||void 0!==e.Z?this.ba=lt:(this.ba=n?ht:ct,this.da=null)}var vt=(t,e,r)=>{if(!n.hasOwnProperty(t))throw new pt("Replacing nonexistent public symbol");void 0!==n[t].W&&void 0!==r?n[t].W[r]=e:(n[t]=e,n[t].wa=r)},yt=(t,e)=>{t=H(t);var r=Qe.get(e);if("function"!=typeof r)throw new G(`unknown function pointer with signature ${t}: ${e}`);return r};class bt extends Error{}var $t=t=>{t=Ye(t);var e=H(t);return Xe(t),e},_t=(t,e)=>{var r=[],n={};throw e.forEach(function t(e){n[e]||W[e]||(B[e]?B[e].forEach(t):(r.push(e),n[e]=!0))}),new bt(`${t}: `+r.map($t).join([", "]))},At=(t,e,r)=>{function n(e){if((e=r(e)).length!==t.length)throw new pt("Mismatched type converter count");for(var n=0;n<t.length;++n)X(t[n],e[n])}t.forEach(t=>B[t]=e);var i=Array(e.length),a=[],s=0;for(let[t,r]of e.entries())W.hasOwnProperty(r)?i[t]=W[r]:(a.push(r),I.hasOwnProperty(r)||(I[r]=[]),I[r].push(()=>{i[t]=W[r],++s===a.length&&n(i)}));0===a.length&&n(i)},St=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(A[e+4*n>>2]);return r},Et=t=>{for(;t.length;){var e=t.pop();t.pop()(e)}};function kt(t){for(var e=1;e<t.length;++e)if(null!==t[e]&&void 0===t[e].da)return!0;return!1}function Rt(t,e,r,n,i,a){var s=e.length;if(2>s)throw new G("argTypes array size mismatch! Must at least get return value and 'this' types!");var o=null!==e[1]&&null!==r,h=kt(e);r=!e[0].bb;var l=e[0],c=e[1];for(n=[t,q,n,i,Et,l.Y.bind(l),c?.ba.bind(c)],i=2;i<s;++i)n.push((l=e[i]).ba.bind(l));if(!h)for(i=o?1:2;i<e.length;++i)null!==e[i].da&&n.push(e[i].da);for(h=kt(e),i=e.length-2,c=[],l=["fn"],o&&l.push("thisWired"),s=0;s<i;++s)c.push(`arg${s}`),l.push(`arg${s}Wired`);c=c.join(","),l=l.join(","),c=`return function (${c}) {\n`,h&&(c+="var destructors = [];\n");var u=h?"destructors":"null",d="humanName throwBindingError invoker fn runDestructors fromRetWire toClassParamWire".split(" ");for(o&&(c+=`var thisWired = toClassParamWire(${u}, this);\n`),s=0;s<i;++s){var f=`toArg${s}Wire`;c+=`var arg${s}Wired = ${f}(${u}, arg${s});\n`,d.push(f)}if(c+=(r||a?"var rv = ":"")+`invoker(${l});\n`,h)c+="runDestructors(destructors);\n";else for(s=o?1:2;s<e.length;++s)a=1===s?"thisWired":"arg"+(s-2)+"Wired",null!==e[s].da&&(c+=`${a}_dtor(${a});\n`,d.push(`${a}_dtor`));return r&&(c+="var ret = fromRetWire(rv);\nreturn ret;\n"),e=new Function(d,c+"}\n")(...n),et(t,e)}var Tt=t=>{const e=(t=t.trim()).indexOf("(");return-1===e?t:t.slice(0,e)},Lt=[],Pt=[0,1,,1,null,1,!0,1,!1,1],Ot=t=>{9<t&&0===--Pt[t+1]&&(Pt[t]=void 0,Lt.push(t))},Ct=t=>{if(!t)throw new G(`Cannot use deleted val. handle = ${t}`);return Pt[t]},Mt=t=>{switch(t){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:const e=Lt.pop()||Pt.length;return Pt[e]=t,Pt[e+1]=1,e}},Ut={name:"emscripten::val",Y:t=>{var e=Ct(t);return Ot(t),e},ba:(t,e)=>Mt(e),ma:ut,da:null},Nt=(t,e)=>{switch(e){case 4:return function(t){return this.Y(S[t>>2])};case 8:return function(t){return this.Y(E[t>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},xt=(t,e,r,n)=>{if(!(0<n))return 0;var i=r;n=r+n-1;for(var a=0;a<t.length;++a){var s=t.codePointAt(a);if(127>=s){if(r>=n)break;e[r++]=s}else if(2047>=s){if(r+1>=n)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(65535>=s){if(r+2>=n)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=n)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s,a++}}return e[r]=0,r-i},jt=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);127>=n?e++:2047>=n?e+=2:55296<=n&&57343>=n?(e+=4,++r):e+=3}return e},Ft=new TextDecoder,Vt=(t,e,r,n)=>{if(r=e+r,n)return r;for(;t[e]&&!(e>=r);)++e;return e},Dt=new TextDecoder("utf-16le"),zt=(t,e,r)=>Dt.decode($.subarray(t>>=1,Vt($,t,e/2,r))),Ht=(t,e,r)=>{if(r??=2147483647,2>r)return 0;var n=e;r=(r-=2)<2*t.length?r/2:t.length;for(var i=0;i<r;++i)b[e>>1]=t.charCodeAt(i),e+=2;return b[e>>1]=0,e-n},It=t=>2*t.length,Wt=(t,e,r)=>{var n="";t>>=2;for(var i=0;!(i>=e/4);i++){var a=A[t+i];if(!a&&!r)break;n+=String.fromCodePoint(a)}return n},Bt=(t,e,r)=>{if(r??=2147483647,4>r)return 0;var n=e;r=n+r-4;for(var i=0;i<t.length;++i){var a=t.codePointAt(i);if(65535<a&&i++,_[e>>2]=a,(e+=4)+4>r)break}return _[e>>2]=0,e-n},Gt=t=>{for(var e=0,r=0;r<t.length;++r)65535<t.codePointAt(r)&&r++,e+=4;return e},qt=0,Xt=[],Zt=(t,e,r)=>{var n=[];return t=t(n,r),n.length&&(A[e>>2]=Mt(n)),t},Yt={},Jt=t=>{var e=Yt[t];return void 0===e?H(t):e},Kt={},Qt=t=>{w=t,z||0<qt||(n.onExit?.(t),O=!0),c(t,new x(t))},te=(t,e)=>{for(var r=0,n=t.length-1;0<=n;n--){var i=t[n];"."===i?t.splice(n,1):".."===i?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r;r--)t.unshift("..");return t},ee=t=>{var e="/"===t.charAt(0),r="/"===t.slice(-1);return(t=te(t.split("/").filter(t=>!!t),!e).join("/"))||e||(t="."),t&&r&&(t+="/"),(e?"/":"")+t},re=t=>{var e=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(t).slice(1);return t=e[0],e=e[1],t||e?(e&&=e.slice(0,-1),t+e):"."},ne=t=>t&&t.match(/([^\/]+|\/)\/*$/)[1],ie=t=>{(ie=(()=>{if(s){var t=o("crypto");return e=>t.randomFillSync(e)}return t=>crypto.getRandomValues(t)})())(t)},ae=(...t)=>{for(var e="",r=!1,n=t.length-1;-1<=n&&!r;n--){if("string"!=typeof(r=0<=n?t[n]:qe.cwd()))throw new TypeError("Arguments to path.resolve must be strings");if(!r)return"";e=r+"/"+e,r="/"===r.charAt(0)}return e=te(e.split("/").filter(t=>!!t),!r).join("/"),(r?"/":"")+e||"."},se=(t,e)=>{function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;0<=r&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=ae(t).slice(1),e=ae(e).slice(1),t=r(t.split("/")),e=r(e.split("/"));for(var n=Math.min(t.length,e.length),i=n,a=0;a<n;a++)if(t[a]!==e[a]){i=a;break}for(n=[],a=i;a<t.length;a++)n.push("..");return(n=n.concat(e.slice(i))).join("/")},oe=t=>{var e=Vt(t,0);return Ft.decode(t.buffer?t.subarray(0,e):new Uint8Array(t.slice(0,e)))},he=[],le=t=>{var e=Array(jt(t)+1);return t=xt(t,e,0,e.length),e.length=t,e},ce=[];function ue(t,e){ce[t]={input:[],output:[],va:e},Se(t,de)}var de={open(t){var e=ce[t.node.rdev];if(!e)throw new qe.L(43);t.tty=e,t.seekable=!1},close(t){t.tty.va.fsync(t.tty)},fsync(t){t.tty.va.fsync(t.tty)},read(t,e,r,n){if(!t.tty||!t.tty.va.Za)throw new qe.L(60);for(var i=0,a=0;a<n;a++){try{var s=t.tty.va.Za(t.tty)}catch(t){throw new qe.L(29)}if(void 0===s&&0===i)throw new qe.L(6);if(null==s)break;i++,e[r+a]=s}return i&&(t.node.atime=Date.now()),i},write(t,e,r,n){if(!t.tty||!t.tty.va.Pa)throw new qe.L(60);try{for(var i=0;i<n;i++)t.tty.va.Pa(t.tty,e[r+i])}catch(t){throw new qe.L(29)}return n&&(t.node.mtime=t.node.ctime=Date.now()),i}},fe={Za(){t:{if(!he.length){var t=null;if(s){var e=Buffer.alloc(256),r=0,n=process.stdin.fd;try{r=f.readSync(n,e,0,256)}catch(t){if(!t.toString().includes("EOF"))throw t;r=0}0<r&&(t=e.slice(0,r).toString("utf-8"))}else globalThis.window?.prompt&&null!==(t=window.prompt("Input: "))&&(t+="\n");if(!t){t=null;break t}he=le(t)}t=he.shift()}return t},Pa(t,e){null===e||10===e?(L(oe(t.output)),t.output=[]):0!=e&&t.output.push(e)},fsync(t){0<t.output?.length&&(L(oe(t.output)),t.output=[])},Zb:()=>({Mb:25856,Ob:5,Lb:191,Nb:35387,Kb:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),$b:()=>0,ac:()=>[24,80]},pe={Pa(t,e){null===e||10===e?(P(oe(t.output)),t.output=[]):0!=e&&t.output.push(e)},fsync(t){0<t.output?.length&&(P(oe(t.output)),t.output=[])}},we={ia:null,T:()=>we.createNode(null,"/",16895,0),createNode(t,e,r,n){if(24576==(61440&r)||qe.isFIFO(r))throw new qe.L(63);return we.ia||(we.ia={dir:{node:{fa:we.N.fa,ha:we.N.ha,lookup:we.N.lookup,ka:we.N.ka,rename:we.N.rename,unlink:we.N.unlink,rmdir:we.N.rmdir,readdir:we.N.readdir,symlink:we.N.symlink},stream:{$:we.O.$}},file:{node:{fa:we.N.fa,ha:we.N.ha},stream:{$:we.O.$,read:we.O.read,write:we.O.write,ua:we.O.ua,za:we.O.za}},link:{node:{fa:we.N.fa,ha:we.N.ha,readlink:we.N.readlink},stream:{}},Ua:{node:{fa:we.N.fa,ha:we.N.ha},stream:qe.mb}}),Ee((r=qe.createNode(t,e,r,n)).mode)?(r.N=we.ia.dir.node,r.O=we.ia.dir.stream,r.P={}):qe.isFile(r.mode)?(r.N=we.ia.file.node,r.O=we.ia.file.stream,r.V=0,r.P=null):40960==(61440&r.mode)?(r.N=we.ia.link.node,r.O=we.ia.link.stream):8192==(61440&r.mode)&&(r.N=we.ia.Ua.node,r.O=we.ia.Ua.stream),r.atime=r.mtime=r.ctime=Date.now(),t&&(t.P[e]=r,t.atime=t.mtime=t.ctime=r.atime),r},Yb:t=>t.P?t.P.subarray?t.P.subarray(0,t.V):new Uint8Array(t.P):new Uint8Array(0),N:{fa(t){var e={};return e.dev=8192==(61440&t.mode)?t.id:1,e.ino=t.id,e.mode=t.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=t.rdev,e.size=Ee(t.mode)?4096:qe.isFile(t.mode)?t.V:40960==(61440&t.mode)?t.link.length:0,e.atime=new Date(t.atime),e.mtime=new Date(t.mtime),e.ctime=new Date(t.ctime),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},ha(t,e){for(var r of["mode","atime","mtime","ctime"])null!=e[r]&&(t[r]=e[r]);void 0!==e.size&&t.V!=(e=e.size)&&(0==e?(t.P=null,t.V=0):(r=t.P,t.P=new Uint8Array(e),r&&t.P.set(r.subarray(0,Math.min(e,t.V))),t.V=e))},lookup(){throw we.Ia||(we.Ia=new qe.L(44),we.Ia.stack="<generic error, no stack>"),we.Ia},ka:(t,e,r,n)=>we.createNode(t,e,r,n),rename(t,e,r){try{var n=ke(e,r)}catch(t){}if(n){if(Ee(t.mode))for(var i in n.P)throw new qe.L(55);Re(n)}delete t.parent.P[t.name],e.P[r]=t,t.name=r,e.ctime=e.mtime=t.parent.ctime=t.parent.mtime=Date.now()},unlink(t,e){delete t.P[e],t.ctime=t.mtime=Date.now()},rmdir(t,e){var r,n=ke(t,e);for(r in n.P)throw new qe.L(55);delete t.P[e],t.ctime=t.mtime=Date.now()},readdir:t=>[".","..",...Object.keys(t.P)],symlink:(t,e,r)=>((t=we.createNode(t,e,41471,0)).link=r,t),readlink(t){if(40960!=(61440&t.mode))throw new qe.L(28);return t.link}},O:{read(t,e,r,n,i){var a=t.node.P;if(i>=t.node.V)return 0;if(8<(t=Math.min(t.node.V-i,n))&&a.subarray)e.set(a.subarray(i,i+t),r);else for(n=0;n<t;n++)e[r+n]=a[i+n];return t},write(t,e,r,n,i,a){if(e.buffer===y.buffer&&(a=!1),!n)return 0;if((t=t.node).mtime=t.ctime=Date.now(),e.subarray&&(!t.P||t.P.subarray)){if(a)return t.P=e.subarray(r,r+n),t.V=n;if(0===t.V&&0===i)return t.P=e.slice(r,r+n),t.V=n;if(i+n<=t.V)return t.P.set(e.subarray(r,r+n),i),n}var s=t.P?t.P.length:0;if(s>=(a=i+n)||(a=Math.max(a,s*(1048576>s?2:1.125)>>>0),0!=s&&(a=Math.max(a,256)),s=t.P,t.P=new Uint8Array(a),0<t.V&&t.P.set(s.subarray(0,t.V),0)),t.P.subarray&&e.subarray)t.P.set(e.subarray(r,r+n),i);else for(a=0;a<n;a++)t.P[i+a]=e[r+a];return t.V=Math.max(t.V,i+n),n},$(t,e,r){if(1===r?e+=t.position:2===r&&qe.isFile(t.node.mode)&&(e+=t.node.V),0>e)throw new qe.L(28);return e},ua(t,e,r,n,i){if(!qe.isFile(t.node.mode))throw new qe.L(43);if(t=t.node.P,2&i||!t||t.buffer!==y.buffer){if(n=!0,N(),!(i=void 0))throw new qe.L(48);t&&((0<r||r+e<t.length)&&(t=t.subarray?t.subarray(r,r+e):Array.prototype.slice.call(t,r,r+e)),y.set(t,i))}else n=!1,i=t.byteOffset;return{S:i,Gb:n}},za:(t,e,r,n)=>(we.O.write(t,e,0,n,r,!1),0)}},me=(t,e)=>{var r=0;return t&&(r|=365),e&&(r|=146),r},ve=0,ye=null,ge=()=>{if(ve--,n.monitorRunDependencies?.(ve),0==ve&&ye){var t=ye;ye=null,t()}},be=()=>{ve++,n.monitorRunDependencies?.(ve)},$e=[],_e=async(t,e,r,n,i,a,s,o)=>{var l=e?ae(ee(t+"/"+e)):t;be();try{var c=r;"string"==typeof r&&(c=await(async t=>(t=await h(t),new Uint8Array(t)))(r)),c=await(async(t,e)=>{for(var r of("undefined"!=typeof Browser&&Ae(),$e))if(r.canHandle(e))return r.handle(t,e);return t})(c,l),o?.(),a||Te(t,e,c,n,i,s)}finally{ge()}};function Ae(){var t,e,r;qe.Ka=!0,t??=n.stdin,e??=n.stdout,r??=n.stderr,t?qe.na("/dev","stdin",t):qe.symlink("/dev/tty","/dev/stdin"),e?qe.na("/dev","stdout",null,e):qe.symlink("/dev/tty","/dev/stdout"),r?qe.na("/dev","stderr",null,r):qe.symlink("/dev/tty1","/dev/stderr"),qe.open("/dev/stdin",0),qe.open("/dev/stdout",1),qe.open("/dev/stderr",1)}function Se(t,e){qe.Xa[t]={O:e}}function Ee(t){return 16384==(61440&t)}function ke(t,e){var r=Ee(t.mode)?(r=Ue(t,"x"))?r:t.N.lookup?0:2:54;if(r)throw new qe.L(r);for(r=qe.la[Oe(t.id,e)];r;r=r.sa)if(r.parent.id===t.id&&r.name===e)return r;return qe.lookup(t,e)}function Re(t){var e=Oe(t.parent.id,t.name);if(qe.la[e]===t)qe.la[e]=t.sa;else for(e=qe.la[e];e;){if(e.sa===t){e.sa=t.sa;break}e=e.sa}}function Te(t,e,r,n,i,a){var s=e;if(t&&(t="string"==typeof t?t:Pe(t),s=e?ee(t+"/"+e):t),t=me(n,i),s=qe.create(s,t),r){if("string"==typeof r){for(e=Array(r.length),n=0,i=r.length;n<i;++n)e[n]=r.charCodeAt(n);r=e}qe.chmod(s,146|t),e=qe.open(s,577),qe.write(e,r,0,r.length,0,a),qe.close(e),qe.chmod(s,t)}}function Le(t,e={}){if(!t)throw new qe.L(44);e.Ca??(e.Ca=!0),"/"===t.charAt(0)||(t=qe.cwd()+"/"+t);var r=0;t:for(;40>r;r++){t=t.split("/").filter(t=>!!t);for(var n=qe.root,i="/",a=0;a<t.length;a++){var s=a===t.length-1;if(s&&e.parent)break;if("."!==t[a])if(".."===t[a]){if(i=re(i),qe.Ma(n)){t=i+"/"+t.slice(a+1).join("/"),r--;continue t}n=n.parent}else{i=ee(i+"/"+t[a]);try{n=ke(n,t[a])}catch(t){if(44===t?.qa&&s&&e.yb)return{path:i};throw t}if(!n.ga||s&&!e.Ca||(n=n.ga.root),40960==(61440&n.mode)&&(!s||e.ea)){if(!n.N.readlink)throw new qe.L(52);"/"===(n=n.N.readlink(n)).charAt(0)||(n=re(i)+"/"+n),t=n+"/"+t.slice(a+1).join("/");continue t}}}return{path:i,node:n}}throw new qe.L(32)}function Pe(t){for(var e;;){if(qe.Ma(t))return t=t.T.cb,e?"/"!==t[t.length-1]?`${t}/${e}`:t+e:t;e=e?`${t.name}/${e}`:t.name,t=t.parent}}function Oe(t,e){for(var r=0,n=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n)|0;return(t+r>>>0)%qe.la.length}function Ce(t){var e=Oe(t.parent.id,t.name);t.sa=qe.la[e],qe.la[e]=t}function Me(t){var e=["r","w","rw"][3&t];return 512&t&&(e+="w"),e}function Ue(t,e){return qe.$a?0:!e.includes("r")||292&t.mode?e.includes("w")&&!(146&t.mode)||e.includes("x")&&!(73&t.mode)?2:0:2}function Ne(t,e){if(!Ee(t.mode))return 54;try{return ke(t,e),20}catch(t){}return Ue(t,"wx")}function xe(t,e,r){try{var n=ke(t,e)}catch(t){return t.qa}if(t=Ue(t,"wx"))return t;if(r){if(!Ee(n.mode))return 54;if(qe.Ma(n)||Pe(n)===qe.cwd())return 10}else if(Ee(n.mode))return 31;return 0}function je(t,e){if(!t)throw new qe.L(e);return t}function Fe(t){if(!(t=qe.ub(t)))throw new qe.L(8);return t}function Ve(t,e=-1){if(t=Object.assign(new qe.jb,t),-1==e)t:{for(e=0;e<=qe.kb;e++)if(!qe.streams[e])break t;throw new qe.L(33)}return t.fd=e,qe.streams[e]=t}function De(t,e,r){var n=t?.O.ha;t=n?t:e,n??=e.N.ha,je(n,63),n(t,r)}function ze(t){var e=[];for(t=[t];t.length;){var r=t.pop();e.push(r),t.push(...r.ya)}return e}function He(t){var e={Jb:4096,Vb:4096,blocks:1e6,Ib:5e5,Hb:5e5,files:qe.Oa,Tb:qe.Oa-1,Wb:42,flags:2,dc:255};return t.N.gb&&Object.assign(e,t.N.gb(t.T.zb.root)),e}function Ie(t,e,r){return void 0===r&&(r=e,e=438),qe.ka(t,8192|e,r)}function We(t,e,r,n){De(t,e,{mode:4095&r|-4096&e.mode,ctime:Date.now(),Ya:n})}function Be(t,e,r){if(Ee(e.mode))throw new qe.L(31);if(!qe.isFile(e.mode))throw new qe.L(28);var n=Ue(e,"w");if(n)throw new qe.L(n);De(t,e,{size:r,timestamp:Date.now()})}function Ge(t){if(!(t.wb||t.xb||t.link||t.P))if(globalThis.XMLHttpRequest)N("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");else try{t.P=l(t.url)}catch(t){throw new qe.L(29)}}var qe={root:null,ya:[],Xa:{},streams:[],Oa:1,la:null,Va:"/",Ka:!1,$a:!0,qb:null,Fa:0,fb:{},L:class{name="ErrnoError";constructor(t){this.qa=t}},jb:class{ja={};node=null;get object(){return this.node}set object(t){this.node=t}get flags(){return this.ja.flags}set flags(t){this.ja.flags=t}get position(){return this.ja.position}set position(t){this.ja.position=t}},ib:class{N={};O={};ga=null;constructor(t,e,r,n){t||=this,this.parent=t,this.T=t.T,this.id=qe.Oa++,this.name=e,this.mode=r,this.rdev=n,this.atime=this.mtime=this.ctime=Date.now()}get read(){return!(365&~this.mode)}set read(t){t?this.mode|=365:this.mode&=-366}get write(){return!(146&~this.mode)}set write(t){t?this.mode|=146:this.mode&=-147}get xb(){return Ee(this.mode)}get wb(){return 8192==(61440&this.mode)}},createNode:(t,e,r,n)=>(Ce(t=new qe.ib(t,e,r,n)),t),Ma:t=>t===t.parent,isFile:t=>32768==(61440&t),isFIFO:t=>4096==(61440&t),isSocket:t=>!(49152&~t),kb:4096,ub:t=>qe.streams[t],Sb:(t,e=-1)=>(t=Ve(t,e),t.O?.Rb?.(t),t),mb:{open(t){t.O=qe.sb(t.node.rdev).O,t.O.open?.(t)},$(){throw new qe.L(70)}},Na:t=>t>>8,bc:t=>255&t,ra:(t,e)=>t<<8|e,sb:t=>qe.Xa[t],hb(t,e){function r(t){return qe.Fa--,e(t)}function n(t){if(t){if(!n.pb)return n.pb=!0,r(t)}else++s>=a.length&&r(null)}"function"==typeof t&&(e=t,t=!1),qe.Fa++,1<qe.Fa&&P(`warning: ${qe.Fa} FS.syncfs operations in flight at once, probably just doing extra work`);var i,a=ze(qe.root.T),s=0;for(i of a)i.type.hb?i.type.hb(i,t,n):n(null)},T(t,e,r){var n="/"===r;if(n&&qe.root)throw new qe.L(10);if(!n&&r){var i=Le(r,{Ca:!1});if(r=i.path,(i=i.node).ga)throw new qe.L(10);if(!Ee(i.mode))throw new qe.L(54)}return(t=t.T(e={type:t,zb:e,cb:r,ya:[]})).T=e,e.root=t,n?qe.root=t:i&&(i.ga=e,i.T&&i.T.ya.push(e)),t},jc(t){if(!(t=Le(t,{Ca:!1})).node.ga)throw new qe.L(28);var e=(t=t.node).ga,r=ze(e);for([,i]of Object.entries(qe.la))for(;i;){var n=i.sa;r.includes(i.T)&&Re(i);var i=n}t.ga=null,t.T.ya.splice(t.T.ya.indexOf(e),1)},lookup:(t,e)=>t.N.lookup(t,e),ka(t,e,r){var n=Le(t,{parent:!0}).node;if(!(t=ne(t)))throw new qe.L(28);if("."===t||".."===t)throw new qe.L(20);var i=Ne(n,t);if(i)throw new qe.L(i);if(!n.N.ka)throw new qe.L(63);return n.N.ka(n,t,e,r)},gb:t=>He(Le(t,{ea:!0}).node),hc:t=>He(t.node),create:(t,e=438)=>qe.ka(t,4095&e|32768,0),mkdir:(t,e=511)=>qe.ka(t,1023&e|16384,0),cc(t,e){var r,n=t.split("/"),i="";for(r of n)if(r){(i||"/"===t.charAt(0))&&(i+="/"),i+=r;try{qe.mkdir(i,e)}catch(t){if(20!=t.qa)throw t}}},symlink(t,e){if(!ae(t))throw new qe.L(44);var r=Le(e,{parent:!0}).node;if(!r)throw new qe.L(44);var n=Ne(r,e=ne(e));if(n)throw new qe.L(n);if(!r.N.symlink)throw new qe.L(63);return r.N.symlink(r,e,t)},rename(t,e){var r=re(t),n=re(e),i=ne(t),a=ne(e),s=Le(t,{parent:!0}),o=s.node;if(s=(s=Le(e,{parent:!0})).node,!o||!s)throw new qe.L(44);if(o.T!==s.T)throw new qe.L(75);var h=ke(o,i);if("."!==(t=se(t,n)).charAt(0))throw new qe.L(28);if("."!==(t=se(e,r)).charAt(0))throw new qe.L(55);try{var l=ke(s,a)}catch(t){}if(h!==l){if(i=xe(o,i,e=Ee(h.mode)))throw new qe.L(i);if(i=l?xe(s,a,e):Ne(s,a))throw new qe.L(i);if(!o.N.rename)throw new qe.L(63);if(h.ga||l&&l.ga)throw new qe.L(10);if(s!==o&&(i=Ue(o,"w")))throw new qe.L(i);Re(h);try{o.N.rename(h,s,a),h.parent=s}catch(t){throw t}finally{Ce(h)}}},rmdir(t){var e=Le(t,{parent:!0}).node,r=ke(e,t=ne(t)),n=xe(e,t,!0);if(n)throw new qe.L(n);if(!e.N.rmdir)throw new qe.L(63);if(r.ga)throw new qe.L(10);e.N.rmdir(e,t),Re(r)},readdir:t=>je((t=Le(t,{ea:!0}).node).N.readdir,54)(t),unlink(t){var e=Le(t,{parent:!0}).node;if(!e)throw new qe.L(44);var r=ke(e,t=ne(t)),n=xe(e,t,!1);if(n)throw new qe.L(n);if(!e.N.unlink)throw new qe.L(63);if(r.ga)throw new qe.L(10);e.N.unlink(e,t),Re(r)},readlink(t){if(!(t=Le(t).node))throw new qe.L(44);if(!t.N.readlink)throw new qe.L(28);return t.N.readlink(t)},stat:(t,e)=>je((t=Le(t,{ea:!e}).node).N.fa,63)(t),fstat(t){var e=Fe(t);t=e.node;var r=e.O.fa;return e=r?e:t,r??=t.N.fa,je(r,63),r(e)},lstat:t=>qe.stat(t,!0),chmod(t,e,r){We(null,t="string"==typeof t?Le(t,{ea:!r}).node:t,e,r)},lchmod(t,e){qe.chmod(t,e,!0)},fchmod(t,e){We(t=Fe(t),t.node,e,!1)},chown(t,e,r,n){De(null,t="string"==typeof t?Le(t,{ea:!n}).node:t,{timestamp:Date.now(),Ya:n})},lchown(t,e,r){qe.chown(t,e,r,!0)},fchown(t){De(t=Fe(t),t.node,{timestamp:Date.now(),Ya:!1})},truncate(t,e){if(0>e)throw new qe.L(28);Be(null,t="string"==typeof t?Le(t,{ea:!0}).node:t,e)},Xb(t,e){if(t=Fe(t),0>e||!(2097155&t.flags))throw new qe.L(28);Be(t,t.node,e)},kc(t,e,r){je((t=Le(t,{ea:!0}).node).N.ha,63)(t,{atime:e,mtime:r})},open(t,e,r=438){if(""===t)throw new qe.L(44);if("string"==typeof e){var i={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===i)throw Error(`Unknown file open mode: ${e}`);e=i}if(r=64&e?4095&r|32768:0,"object"==typeof t)i=t;else{var a=t.endsWith("/");i=(t=Le(t,{ea:!(131072&e),yb:!0})).node,t=t.path}var s=!1;if(64&e)if(i){if(128&e)throw new qe.L(20)}else{if(a)throw new qe.L(31);i=qe.ka(t,511|r,0),s=!0}if(!i)throw new qe.L(44);if(8192==(61440&i.mode)&&(e&=-513),65536&e&&!Ee(i.mode))throw new qe.L(54);if(!s&&(a=i?40960==(61440&i.mode)?32:Ee(i.mode)&&("r"!==Me(e)||576&e)?31:Ue(i,Me(e)):44))throw new qe.L(a);return 512&e&&!s&&qe.truncate(i,0),e&=-131713,(a=Ve({node:i,path:Pe(i),flags:e,seekable:!0,position:0,O:i.O,Fb:[],error:!1})).O.open&&a.O.open(a),s&&qe.chmod(i,511&r),!n.logReadFiles||1&e||t in qe.fb||(qe.fb[t]=1),a},close(t){if(null===t.fd)throw new qe.L(8);t.Ja&&(t.Ja=null);try{t.O.close&&t.O.close(t)}catch(t){throw t}finally{qe.streams[t.fd]=null}t.fd=null},$(t,e,r){if(null===t.fd)throw new qe.L(8);if(!t.seekable||!t.O.$)throw new qe.L(70);if(0!=r&&1!=r&&2!=r)throw new qe.L(28);return t.position=t.O.$(t,e,r),t.Fb=[],t.position},read(t,e,r,n,i){if(0>n||0>i)throw new qe.L(28);if(null===t.fd)throw new qe.L(8);if(1==(2097155&t.flags))throw new qe.L(8);if(Ee(t.node.mode))throw new qe.L(31);if(!t.O.read)throw new qe.L(28);var a=void 0!==i;if(a){if(!t.seekable)throw new qe.L(70)}else i=t.position;return e=t.O.read(t,e,r,n,i),a||(t.position+=e),e},write(t,e,r,n,i,a){if(0>n||0>i)throw new qe.L(28);if(null===t.fd)throw new qe.L(8);if(!(2097155&t.flags))throw new qe.L(8);if(Ee(t.node.mode))throw new qe.L(31);if(!t.O.write)throw new qe.L(28);t.seekable&&1024&t.flags&&qe.$(t,0,2);var s=void 0!==i;if(s){if(!t.seekable)throw new qe.L(70)}else i=t.position;return e=t.O.write(t,e,r,n,i,a),s||(t.position+=e),e},ua(t,e,r,n,i){if(2&n&&!(2&i)&&2!=(2097155&t.flags))throw new qe.L(2);if(1==(2097155&t.flags))throw new qe.L(2);if(!t.O.ua)throw new qe.L(43);if(!e)throw new qe.L(28);return t.O.ua(t,e,r,n,i)},za:(t,e,r,n,i)=>t.O.za?t.O.za(t,e,r,n,i):0,ab(t,e,r){if(!t.O.ab)throw new qe.L(59);return t.O.ab(t,e,r)},readFile(t,e={}){e.flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding&&N(`Invalid encoding type "${e.encoding}"`);var r=qe.open(t,e.flags);t=qe.stat(t).size;var n=new Uint8Array(t);return qe.read(r,n,0,t,0),"utf8"===e.encoding&&(n=oe(n)),qe.close(r),n},writeFile(t,e,r={}){r.flags=r.flags||577,t=qe.open(t,r.flags,r.mode),"string"==typeof e&&(e=new Uint8Array(le(e))),ArrayBuffer.isView(e)?qe.write(t,e,0,e.byteLength,void 0,r.Pb):N("Unsupported data type"),qe.close(t)},cwd:()=>qe.Va,chdir(t){if(null===(t=Le(t,{ea:!0})).node)throw new qe.L(44);if(!Ee(t.node.mode))throw new qe.L(54);var e=Ue(t.node,"x");if(e)throw new qe.L(e);qe.Va=t.path},fc(){for(var t of(qe.Ka=!1,qe.streams))t&&qe.close(t)},Ub(t,e){try{var r=Le(t,{ea:!e});t=r.path}catch(t){}var n=!1,i=null;try{r=Le(t,{parent:!0}),ne(t),r=Le(t,{ea:!e}),n=!0,i=r.node}catch(t){}return n?i:null},na(t,e,r,n){var i;return t=((t,e)=>ee(t+"/"+e))("string"==typeof t?t:Pe(t),e),e=me(!!r,!!n),(i=qe.na).Na??(i.Na=64),Se(i=qe.ra(qe.na.Na++,0),{open(t){t.seekable=!1},close(){n?.buffer?.length&&n(10)},read(t,e,n,i){for(var a=0,s=0;s<i;s++){try{var o=r()}catch(t){throw new qe.L(29)}if(void 0===o&&0===a)throw new qe.L(6);if(null==o)break;a++,e[n+s]=o}return a&&(t.node.atime=Date.now()),a},write(t,e,r,i){for(var a=0;a<i;a++)try{n(e[r+a])}catch(t){throw new qe.L(29)}return i&&(t.node.mtime=t.node.ctime=Date.now()),a}}),Ie(t,e,i)}};if((()=>{let t=tt.prototype;Object.assign(t,{isAliasOf:function(t){if(!(this instanceof tt&&t instanceof tt))return!1;var e=this.M.U.R,r=this.M.S;t.M=t.M;var n=t.M.U.R;for(t=t.M.S;e.Z;)r=e.Ba(r),e=e.Z;for(;n.Z;)t=n.Ba(t),n=n.Z;return e===n&&r===t},clone:function(){if(this.M.S||Y(this),this.M.Aa)return this.M.count.value+=1,this;var t=Q,e=Object,r=e.create,n=Object.getPrototypeOf(this),i=this.M;return(t=t(r.call(e,n,{M:{value:{count:i.count,xa:i.xa,Aa:i.Aa,S:i.S,U:i.U,X:i.X,aa:i.aa}}}))).M.count.value+=1,t.M.xa=!1,t},delete(){if(this.M.S||Y(this),this.M.xa&&!this.M.Aa)throw new G("Object already scheduled for deletion");K(this);var t=this.M;--t.count.value,0===t.count.value&&(t.X?t.aa.oa(t.X):t.U.R.oa(t.S)),this.M.Aa||(this.M.X=void 0,this.M.S=void 0)},isDeleted:function(){return!this.M.S},deleteLater:function(){if(this.M.S||Y(this),this.M.xa&&!this.M.Aa)throw new G("Object already scheduled for deletion");return this.M.xa=!0,this}});const e=Symbol.dispose;e&&(t[e]=t.delete)})(),Object.assign(mt.prototype,{tb(t){return this.eb&&(t=this.eb(t)),t},Wa(t){this.oa?.(t)},ma:ut,Y:function(t){function e(){return wt(this.R.ta,this.Ea?{U:this.Ab,S:r,aa:this,X:t}:{U:this,S:t})}var r=this.tb(t);if(!r)return this.Wa(t),null;var n=((t,e)=>{if(void 0===e)throw new G("ptr should not be undefined");for(;t.Z;)e=t.Ba(e),t=t.Z;return ft[e]})(this.R,r);if(void 0!==n)return 0===n.M.count.value?(n.M.S=r,n.M.X=t,n.clone()):(n=n.clone(),this.Wa(t),n);if(n=this.R.rb(r),!(n=rt[n]))return e.call(this);var i=dt(r,this.R,(n=this.Da?n.nb:n.pointerType).R);return null===i?e.call(this):wt(n.R.ta,this.Ea?{U:n,S:i,aa:this,X:t}:{U:n,S:i})}}),qe.Qb=(t,e,r,n,i,a,s,o,h,l)=>{_e(t,e,r,n,i,o,h,l).then(a).catch(s)},qe.ec=_e,qe.la=Array(4096),qe.T(we,{},"/"),qe.mkdir("/tmp"),qe.mkdir("/home"),qe.mkdir("/home/web_user"),function(){qe.mkdir("/dev"),Se(qe.ra(1,3),{read:()=>0,write:(t,e,r,n)=>n,$:()=>0}),Ie("/dev/null",qe.ra(1,3)),ue(qe.ra(5,0),fe),ue(qe.ra(6,0),pe),Ie("/dev/tty",qe.ra(5,0)),Ie("/dev/tty1",qe.ra(6,0));var t=new Uint8Array(1024),e=0,r=()=>(0===e&&(ie(t),e=t.byteLength),t[--e]);qe.na("/dev","random",r),qe.na("/dev","urandom",r),qe.mkdir("/dev/shm"),qe.mkdir("/dev/shm/tmp")}(),function(){qe.mkdir("/proc");var t=qe.mkdir("/proc/self");qe.mkdir("/proc/self/fd"),qe.T({T(){var e=qe.createNode(t,"fd",16895,73);return e.O={$:we.O.$},e.N={lookup(t,e){var r=Fe(t=+e);return(t={parent:null,T:{cb:"fake"},N:{readlink:()=>r.path},id:t+1}).parent=t},readdir:()=>Array.from(qe.streams.entries()).filter(([,t])=>t).map(([t])=>t.toString())},e}},{},"/proc/self/fd")}(),qe.qb={MEMFS:we},n.noExitRuntime&&(z=n.noExitRuntime),n.preloadPlugins&&($e=n.preloadPlugins),n.print&&(L=n.print),n.printErr&&(P=n.printErr),n.wasmBinary&&(p=n.wasmBinary),n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);0<n.preInit.length;)n.preInit.shift()();n.addRunDependency=be,n.removeRunDependency=ge,n.FS_preloadFile=_e,n.FS_unlink=(...t)=>qe.unlink(...t),n.FS_createPath=(...t)=>function(t,e){for(t="string"==typeof t?t:Pe(t),e=e.split("/").reverse();e.length;){var r=e.pop();if(r){var n=ee(t+"/"+r);try{qe.mkdir(n)}catch(t){if(20!=t.qa)throw t}t=n}}return n}(...t),n.FS_createDevice=(...t)=>qe.na(...t),n.FS=qe,n.FS_createDataFile=(...t)=>Te(...t),n.FS_createLazyFile=(...t)=>function(t,e,r,n,i){class s{Ha=!1;ja=[];Ga=void 0;Ra=0;Qa=0;get(t){if(!(t>this.length-1||0>t)){var e=t%this.chunkSize;return this.Ga(t/this.chunkSize|0)[e]}}lb(t){this.Ga=t}Sa(){var t=new XMLHttpRequest;t.open("HEAD",r,!1),t.send(null),200<=t.status&&300>t.status||304===t.status||N("Couldn't load "+r+". Status: "+t.status);var e,n=Number(t.getResponseHeader("Content-length")),i=(e=t.getResponseHeader("Accept-Ranges"))&&"bytes"===e;t=(e=t.getResponseHeader("Content-Encoding"))&&"gzip"===e;var a=1048576;i||(a=n);var s=this;s.lb(t=>{var e=t*a,i=(t+1)*a-1;if(i=Math.min(i,n-1),void 0===s.ja[t]){var o=s.ja;e>i&&N("invalid range ("+e+", "+i+") or no bytes requested!"),i>n-1&&N("only "+n+" bytes available! programmer error!");var h=new XMLHttpRequest;h.open("GET",r,!1),n!==a&&h.setRequestHeader("Range","bytes="+e+"-"+i),h.responseType="arraybuffer",h.overrideMimeType&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send(null),200<=h.status&&300>h.status||304===h.status||N("Couldn't load "+r+". Status: "+h.status),e=void 0!==h.response?new Uint8Array(h.response||[]):le(h.responseText||""),o[t]=e}return void 0===s.ja[t]&&N("doXHR failed!"),s.ja[t]}),!t&&n||(a=n=1,a=n=this.Ga(0).length,L("LazyFiles on gzip forces download of the whole file when length is accessed")),this.Ra=n,this.Qa=a,this.Ha=!0}get length(){return this.Ha||this.Sa(),this.Ra}get chunkSize(){return this.Ha||this.Sa(),this.Qa}}if(globalThis.XMLHttpRequest){a||N("Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc");var o=new s,h=void 0}else h=r,o=void 0;var l=function(t,e,r,n){return t="string"==typeof t?t:Pe(t),e=ee(t+"/"+e),qe.create(e,me(r,n))}(t,e,n,i);o?l.P=o:h&&(l.P=null,l.url=h),Object.defineProperties(l,{V:{get:function(){return this.P.length}}}),t={};for(const[e,r]of Object.entries(l.O))t[e]=(...t)=>(Ge(l),r(...t));return t.read=(t,e,r,n,i)=>{if(Ge(l),i>=(t=t.node.P).length)e=0;else{if(n=Math.min(t.length-i,n),t.slice)for(var a=0;a<n;a++)e[r+a]=t[i+a];else for(a=0;a<n;a++)e[r+a]=t.get(i+a);e=n}return e},t.ua=()=>{throw Ge(l),N(),new qe.L(48)},l.O=t,l}(...t);var Xe,Ze,Ye,Je,Ke,Qe,tr,er={v:()=>N(""),k:(t,e,r,n,i)=>{e=H(e);let a=t=>t;if(n=0n===n){const t=8*r;a=e=>BigInt.asUintN(t,e),i=a(i)}X(t,{name:e,Y:a,ba:(t,e)=>("number"==typeof e&&(e=BigInt(e)),e),ma:Z(e,r,!n),da:null})},A:(t,e,r,n)=>{X(t,{name:e=H(e),Y:function(t){return!!t},ba:function(t,e){return e?r:n},ma:function(t){return this.Y(g[t])},da:null})},x:(t,e,r,n,i,a,s,o,h,l,c,u,d)=>{c=H(c),a=yt(i,a),o&&=yt(s,o),l&&=yt(h,l),d=yt(u,d);var f=(t=>{var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return 48<=e&&57>=e?`_${t}`:t})(c);it(f,function(){_t(`Cannot construct ${c} due to unbound types`,[n])}),At([t,e,r],n?[n]:[],e=>{if(e=e[0],n)var r=e.R,i=r.ta;else i=tt.prototype;e=et(c,function(...t){if(Object.getPrototypeOf(this)!==s)throw new G(`Use 'new' to construct ${c}`);if(void 0===u.pa)throw new G(`${c} has no accessible constructor`);var e=u.pa[t.length];if(void 0===e)throw new G(`Tried to invoke ctor of ${c} with invalid number of parameters (${t.length}) - expected (${Object.keys(u.pa).toString()}) parameters instead!`);return e.apply(this,t)});var s=Object.create(i,{constructor:{value:e}});e.prototype=s;var h,u=new at(c,e,s,d,r,a,o,l);return u.Z&&((h=u.Z).Ta??(h.Ta=[]),u.Z.Ta.push(u)),r=new mt(c,u,!0,!1,!1),h=new mt(c+"*",u,!1,!1,!1),i=new mt(c+" const*",u,!1,!0,!1),rt[t]={pointerType:h,nb:i},vt(f,e),[r,h,i]})},n:(t,e,r,n,i,a)=>{var s=St(e,r);i=yt(n,i),At([],[t],t=>{var r=`constructor ${(t=t[0]).name}`;if(void 0===t.R.pa&&(t.R.pa=[]),void 0!==t.R.pa[e-1])throw new G(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${t.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return t.R.pa[e-1]=()=>{_t(`Cannot construct ${t.name} due to unbound types`,s)},At([],s,n=>(n.splice(1,0,null),t.R.pa[e-1]=Rt(r,n,null,i,a),[])),[]})},b:(t,e,r,n,i,a,s,o,h)=>{var l=St(r,n);e=H(e),e=Tt(e),a=yt(i,a),At([],[t],t=>{function n(){_t(`Cannot call ${i} due to unbound types`,l)}var i=`${(t=t[0]).name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),o&&t.R.Bb.push(e);var c=t.R.ta,u=c[e];return void 0===u||void 0===u.W&&u.className!==t.name&&u.wa===r-2?(n.wa=r-2,n.className=t.name,c[e]=n):(nt(c,e,i),c[e].W[r-2]=n),At([],l,n=>(n=Rt(i,n,t,a,s,h),void 0===c[e].W?(n.wa=r-2,c[e]=n):c[e].W[r-2]=n,[])),[]})},y:t=>X(t,Ut),j:(t,e,r)=>{X(t,{name:e=H(e),Y:t=>t,ba:(t,e)=>e,ma:Nt(e,r),da:null})},l:(t,e,r,n,i,a,s)=>{var o=St(e,r);t=H(t),t=Tt(t),i=yt(n,i),it(t,function(){_t(`Cannot call ${t} due to unbound types`,o)},e-1),At([],o,r=>(r=[r[0],null].concat(r.slice(1)),vt(t,Rt(t,r,null,i,a,s),e-1),[]))},c:(t,e,r,n,i)=>{e=H(e);let a=t=>t;if(0===n){var s=32-8*r;a=t=>t<<s>>>s,i=a(i)}X(t,{name:e,Y:a,ba:(t,e)=>e,ma:Z(e,r,0!==n),da:null})},a:(t,e,r)=>{function n(t){return new i(y.buffer,A[t+4>>2],A[t>>2])}var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][e];X(t,{name:r=H(r),Y:n,ma:n},{vb:!0})},z:(t,e)=>{X(t,{name:e=H(e),Y(t){var e=(e=t+4)?Ft.decode(g.subarray(e,Vt(g,e,A[t>>2],!0))):"";return Xe(t),e},ba(t,e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));var r="string"==typeof e;if(!(r||ArrayBuffer.isView(e)&&1==e.BYTES_PER_ELEMENT))throw new G("Cannot pass non-string to std::string");var n=r?jt(e):e.length,i=Ze(4+n+1),a=i+4;return A[i>>2]=n,r?xt(e,g,a,n+1):g.set(e,a),null!==t&&t.push(Xe,i),i},ma:ut,da(t){Xe(t)}})},g:(t,e,r)=>{if(r=H(r),2===e)var n=zt,i=Ht,a=It;else n=Wt,i=Bt,a=Gt;X(t,{name:r,Y:t=>{var r=n(t+4,A[t>>2]*e,!0);return Xe(t),r},ba:(t,n)=>{if("string"!=typeof n)throw new G(`Cannot pass non-string to C++ string type ${r}`);var s=a(n),o=Ze(4+s+e);return A[o>>2]=s/e,i(n,o+4,s+e),null!==t&&t.push(Xe,o),o},ma:ut,da(t){Xe(t)}})},h:t=>{X(t,Ut)},B:(t,e)=>{X(t,{bb:!0,name:e=H(e),Y:()=>{},ba:()=>{}})},q:()=>{z=!1,qt=0},e:(t,e,r)=>{var[n,...i]=((t,e)=>{for(var r=Array(t),n=0;n<t;++n){var i=n,a=A[e+4*n>>2],s=W[a];if(void 0===s)throw t=`parameter ${n} has unknown type ${$t(a)}`,new G(t);r[i]=s}return r})(t,e);e=n.ba.bind(n);var a=i.map(t=>t.ma.bind(t));t--;var s={toValue:Ct};switch(t=a.map((t,e)=>{var r=`argFromPtr${e}`;return s[r]=t,`${r}(args${e?"+"+8*e:""})`}),r){case 0:var o="toValue(handle)";break;case 2:o="new (toValue(handle))";break;case 3:o="";break;case 1:s.getStringOrSymbol=Jt,o="toValue(handle)[getStringOrSymbol(methodName)]"}return o+=`(${t})`,n.bb||(s.toReturnWire=e,s.emval_returnValue=Zt,o=`return emval_returnValue(toReturnWire, destructorsRef, ${o})`),o=`return function (handle, methodName, destructorsRef, args) {\n ${o}\n }`,r=new Function(Object.keys(s),o)(...Object.values(s)),o=`methodCaller<(${i.map(t=>t.name)}) => ${n.name}>`,(t=>{var e=Xt.length;return Xt.push(t),e})(et(o,r))},o:Ot,C:t=>t?(t=Jt(t),Mt(globalThis[t])):Mt(globalThis),f:(t,e)=>(t=Ct(t),e=Ct(e),Mt(t[e])),i:t=>{9<t&&(Pt[t+1]+=1)},d:(t,e,r,n,i)=>Xt[t](e,r,n,i),D:t=>Mt(Jt(t)),m:t=>{var e=Ct(t);Et(e),Ot(t)},r:(t,e)=>{if(Kt[t]&&(clearTimeout(Kt[t].id),delete Kt[t]),!e)return 0;var r=setTimeout(()=>{delete Kt[t],(t=>{if(!O)try{if(t(),!(z||0<qt))try{w=t=w,Qt(t)}catch(t){t instanceof x||"unwind"==t||c(1,t)}}catch(t){t instanceof x||"unwind"==t||c(1,t)}})(()=>Je(t,performance.now()))},e);return Kt[t]={id:r,ic:e},0},w:t=>{var e=g.length;if(2147483648<(t>>>=0))return!1;for(var r=1;4>=r;r*=2){var n=e*(1+.2/r);n=Math.min(n,t+100663296);t:{n=(Math.min(2147483648,65536*Math.ceil(Math.max(t,n)/65536))-Ke.buffer.byteLength+65535)/65536|0;try{Ke.grow(n),U();var i=1;break t}catch(t){}i=void 0}if(i)return!0}return!1},u:function(t){try{var e=Fe(t);return qe.close(e),0}catch(t){if(void 0===qe||"ErrnoError"!==t.name)throw t;return t.qa}},s:function(t,e,r,n){e=-9007199254740992>e||9007199254740992<e?NaN:Number(e);try{if(isNaN(e))return 61;var i=Fe(t);return qe.$(i,e,r),k[n>>3]=BigInt(i.position),i.Ja&&0===e&&0===r&&(i.Ja=null),0}catch(t){if(void 0===qe||"ErrnoError"!==t.name)throw t;return t.qa}},t:function(t,e,r,n){try{t:{var i=Fe(t);t=e;for(var a,s=e=0;s<r;s++){var o=A[t>>2],h=A[t+4>>2];t+=8;var l=qe.write(i,y,o,h,a);if(0>l){var c=-1;break t}if(e+=l,l<h)break;void 0!==a&&(a+=l)}c=e}return A[n>>2]=c,0}catch(t){if(void 0===qe||"ErrnoError"!==t.name)throw t;return t.qa}},p:Qt};return tr=await async function(){function e(t){return t=tr=t.exports,Xe=t.G,Ze=t.H,Ye=t.I,Je=t.J,Ke=t.E,Qe=t.K,U(),tr}var r={a:er};return n.instantiateWasm?new Promise(t=>{n.instantiateWasm(r,(r,n)=>{t(e(r))})}):(T??=n.locateFile?n.locateFile?n.locateFile("thorvg.wasm",d):d+"thorvg.wasm":new URL("thorvg.wasm","undefined"==typeof document?require("url").pathToFileURL(__filename).href:t&&"SCRIPT"===t.tagName.toUpperCase()&&t.src||new URL("lottie-player.cjs.js",document.baseURI).href).href,e((await async function(t){var e=T;if(!p&&!C(e)&&!s)try{var r=fetch(e,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(r,t)}catch(t){P(`wasm streaming compile failed: ${t}`),P("falling back to ArrayBuffer instantiation")}return async function(t,e){try{var r=await async function(t){if(!p)try{var e=await h(t);return new Uint8Array(e)}catch{}if(t==T&&p)t=new Uint8Array(p);else{if(!l)throw"both async and sync fetching of the wasm failed";t=l(t)}return t}(t);return await WebAssembly.instantiate(r,e)}catch(t){P(`failed to asynchronously prepare wasm: ${t}`),N(t)}}(e,t)}(r)).instance))}(),function t(){function e(){if(n.calledRun=!0,!O){if(M=!0,n.noFSInit||qe.Ka||Ae(),tr.F(),qe.$a=!1,m?.(n),n.onRuntimeInitialized?.(),n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;){var t=n.postRun.shift();F.push(t)}j(F)}}if(0<ve)ye=t;else{if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)D();j(V),0<ve?ye=t:n.setStatus?(n.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>n.setStatus(""),1),e()},1)):e()}}(),r=M?n:new Promise((t,e)=>{m=t,v=e}),r}({locateFile:(t,e)=>t.endsWith(".wasm")?this.wasmUrl||"https://unpkg.com/@thorvg/lottie-player@latest/dist/thorvg.wasm":e+t})),!this._timer)return;clearInterval(this._timer),this._timer=void 0;const e=this.config?.renderer||"sw";if(await(async t=>{if("wg"===t){for(;"requested"===wt;)await pt(100);if("initialized"!==wt&&(wt="requested",ut))for(;;)switch(ut.init()){case 0:return void(wt="initialized");case 1:return void(wt="failed");case 2:await pt(100)}}})(e),"failed"===wt)return this.currentState="error",void this.dispatchEvent(new CustomEvent("error"));this.TVG=new ut.TvgLottieAnimation(e,`#${this.canvas.id}`),this.src&&this.load(this.src,this.fileType)}_viewport(){const{left:t,right:e,top:r,bottom:n}=this.getBoundingClientRect(),i=window.innerWidth,a=window.innerHeight;let s=0,o=0,h=this.canvas.width,l=this.canvas.height;t<0&&(s=Math.abs(t),h-=s),r<0&&(o=Math.abs(r),l-=o),e>i&&(h-=e-i),n>a&&(l-=n-a),this.TVG.viewport(s,o,h,l)}_observerCallback(t){const e=t[0],r=e.target;r._observable=e.isIntersecting,e.isIntersecting?"frozen"===r.currentState&&r.play():"playing"===r.currentState&&(r.freeze(),r.dispatchEvent(new CustomEvent("freeze")))}firstUpdated(t){this.canvas=this.querySelector(".thorvg"),this.canvas.id=`thorvg-${Date.now().toString(36)+Math.random().toString(36).substring(2)}`,this.canvas.width=this.canvas.offsetWidth,this.canvas.height=this.canvas.offsetHeight,this._observer=new IntersectionObserver(this._observerCallback),this._observer.observe(this),this.TVG?this.src&&this.load(this.src,this.fileType):this._timer=setInterval(this._init.bind(this),100)}createRenderRoot(){return this.style.display="block",this}async _animLoop(){this.TVG&&await this._update()&&(this._render(),window.requestAnimationFrame(this._animLoop.bind(this)))}_loadBytes(t){if(!this.TVG)throw new Error("TVG is not initialized");if(this._assetResolverCallback&&this.TVG.setAssetResolver(this._assetResolverCallback,this._assetResolverData),!this.TVG.load(t,this.fileType,this.canvas.width,this.canvas.height))throw new Error(`Unable to load an image. Error: ${this.TVG.error()}`);this._render(),this.dispatchEvent(new CustomEvent("load")),this.autoPlay&&this.play()}_flush(){this.canvas.getContext("2d").putImageData(this._imageData,0,0)}_render(){if(!this.TVG)return;if(!1!==this.config?.enableDevicePixelRatio){const t=1+.75*(window.devicePixelRatio-1),{width:e,height:r}=this.canvas.getBoundingClientRect();this.canvas.width=e*t,this.canvas.height=r*t}if(this.TVG.resize(this.canvas.width,this.canvas.height),this._viewport(),!this.TVG.update())return;if("wg"===this.config?.renderer||"gl"===this.config?.renderer)return void this.TVG.render();const t=this.TVG.render(),e=new Uint8ClampedArray(t,0,t.byteLength);e.length<1||(this._imageData=new ImageData(e,this.canvas.width,this.canvas.height),this._flush())}async _update(){if(!this.TVG)return!1;if("playing"!==this.currentState)return!1;const t=this.TVG.duration(),e=Date.now()/1e3;if(this.currentFrame=(e-this._beginTime)/t*this.totalFrame*this.speed,-1===this.direction&&(this.currentFrame=this.totalFrame-this.currentFrame),1===this.direction&&this.currentFrame>=this.totalFrame||-1===this.direction&&this.currentFrame<=0){const t=this.count?"bounce"===this.mode?2*this.count:this.count:0;if(this.loop||t&&this._counter<t)return"bounce"===this.mode&&(this.direction=1===this.direction?-1:1,this.currentFrame=1===this.direction?0:this.totalFrame),this.count&&(this._counter+=1),await pt(this.intermission),this.play(),!0;this.dispatchEvent(new CustomEvent("complete")),this.currentState="stopped"}return this.dispatchEvent(new CustomEvent("frame",{detail:{frame:this.currentFrame}})),this.TVG.frame(this.currentFrame)}_frame(t){this.TVG&&(this.pause(),this.currentFrame=t,this.TVG.frame(t))}async load(t,e="json"){try{await this._init();const r=await(async(t,e)=>{const r=new TextEncoder;let n=t;switch(typeof n){case"object":return n instanceof ArrayBuffer?new Uint8Array(n):(n=JSON.stringify(n),r.encode(n));case"string":if("json"===e||"lot"===e)return n=await(async t=>{try{t=JSON.parse(t)}catch(e){const r=await(async t=>{if("string"!=typeof t)throw new Error("The url value must be a string");try{const e=new URL(t),r=await fetch(e.toString());return await r.json()}catch(t){throw new Error("An error occurred while trying to load the Lottie file from URL")}})(t);t=JSON.stringify(r)}return t})(n),r.encode(n);const t=await(async t=>(await fetch(t)).arrayBuffer())(n);return new Uint8Array(t);default:throw new Error("Invalid src type")}})(t,e);this.dispatchEvent(new CustomEvent("ready")),this.fileType=e,await this._loadBytes(r)}catch(t){this.currentState="error",this.dispatchEvent(new CustomEvent("error"))}}play(){if(this.TVG&&!("json"!==this.fileType&&"lot"!==this.fileType||(this.totalFrame=this.TVG.totalFrame(),this.totalFrame<1||(this._beginTime=Date.now()/1e3,"playing"===this.currentState))))return this._observable?(this.currentState="playing",void window.requestAnimationFrame(this._animLoop.bind(this))):void(this.currentState="frozen")}pause(){this.currentState="paused",this.dispatchEvent(new CustomEvent("pause"))}stop(){this.currentState="stopped",this.currentFrame=0,this._counter=1,this.seek(0),this.dispatchEvent(new CustomEvent("stop"))}freeze(){this.currentState="frozen",this.dispatchEvent(new CustomEvent("freeze"))}async seek(t){this._frame(t),await this._update(),this._render()}resize(t,e){this.canvas.width=t,this.canvas.height=e,"playing"!==this.currentState&&this._render()}destroy(){this.TVG&&(this.TVG.delete(),this.TVG=null,this.currentState="destroyed",this._observer&&(this._observer.disconnect(),this._observer=void 0),this.dispatchEvent(new CustomEvent("destroyed")),this.remove())}term(){ut&&(ut.term(),ut=null)}setLooping(t){this.TVG&&(this.loop=t)}setDirection(t){this.TVG&&(this.direction=t)}setSpeed(t){this.TVG&&(this.speed=t)}setBgColor(t){this.TVG&&(this.canvas.style.backgroundColor=t)}setQuality(t){this.TVG&&this.TVG.quality(t)&&"playing"!==this.currentState&&this._render()}setAssetResolver(t,e){this._assetResolverCallback=t,this._assetResolverData=e,this.TVG&&this.TVG.setAssetResolver(t,e)}getVersion(){return{THORVG_VERSION:"1.0.2"}}render(){return W`
|
|
2
2
|
<canvas class="thorvg" style="width: 100%; height: 100%;" />
|
|
3
3
|
`}}function vt(t,e,r,n){var i,a=arguments.length,s=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,n);else for(var o=t.length-1;o>=0;o--)(i=t[o])&&(s=(a<3?i(s):a>3?i(e,r,s):i(e,r))||s);return a>3&&s&&Object.defineProperty(e,r,s),s}ct([S({type:String})],mt.prototype,"src",void 0),ct([S({type:String})],mt.prototype,"wasmUrl",void 0),ct([S({type:ft})],mt.prototype,"fileType",void 0),ct([S({type:Number})],mt.prototype,"speed",void 0),ct([S({type:Boolean})],mt.prototype,"autoPlay",void 0),ct([S({type:Number})],mt.prototype,"count",void 0),ct([S({type:Boolean})],mt.prototype,"loop",void 0),ct([S({type:Number})],mt.prototype,"direction",void 0),ct([S()],mt.prototype,"mode",void 0),ct([S()],mt.prototype,"intermission",void 0),ct([S({type:Number})],mt.prototype,"totalFrame",void 0),ct([S({type:Number})],mt.prototype,"currentFrame",void 0),ct([S({type:Number})],mt.prototype,"currentState",void 0),ct([S({type:Float32Array})],mt.prototype,"size",null);class yt extends mt{set renderConfig(t){this.config={renderer:"sw",enableDevicePixelRatio:t.enableDevicePixelRatio}}get renderConfig(){return this.config||{}}}vt([S({type:Object})],yt.prototype,"renderConfig",null),yt=vt([(t=>(e,r)=>{void 0!==r?r.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)})("lottie-player")],yt);var gt=Object.freeze({__proto__:null});exports.LottiePresetPlayer=yt;
|
|
4
4
|
//# sourceMappingURL=lottie-player.cjs.js.map
|