lecodes-viewer 0.19.0

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.
Files changed (103) hide show
  1. package/README.md +5 -0
  2. package/dist-embed/VERSION.json +5 -0
  3. package/dist-embed/assets/Roboto-Variable-DHm9jpd-.woff2 +0 -0
  4. package/dist-embed/assets/__vite-browser-external-BIHI7g3E.js +1 -0
  5. package/dist-embed/assets/basis-C64VHDVD.js +1 -0
  6. package/dist-embed/assets/basis_transcoder-VXdx5NbI.wasm +0 -0
  7. package/dist-embed/assets/createViewer2d-D12Wy3VF.js +1 -0
  8. package/dist-embed/assets/createViewerLite-CP-WHGLg.js +707 -0
  9. package/dist-embed/assets/creator-gl-BF2CQzeI.wasm +0 -0
  10. package/dist-embed/assets/creator-gl.js-B_0GrQRe.symbols +5379 -0
  11. package/dist-embed/assets/creator-ui-BX5Fvnbt.js +1 -0
  12. package/dist-embed/assets/creator-ui-CzKHLH2Q.wasm +0 -0
  13. package/dist-embed/assets/creator2d-BtQ-1_B0.wasm +0 -0
  14. package/dist-embed/assets/draco-BiISTFcR.js +118 -0
  15. package/dist-embed/assets/draco_decoder-DsQ12WqX.wasm +0 -0
  16. package/dist-embed/assets/host-CWKB1WDd.js +162 -0
  17. package/dist-embed/assets/index-CIK8PnUA.js +2 -0
  18. package/dist-embed/assets/lit-DUE9rhY9.filamat +0 -0
  19. package/dist-embed/assets/loadCreatorUiNode-UAdhjRTd.js +1 -0
  20. package/dist-embed/assets/neutral_ibl128-D-lzdkLN.ktx +0 -0
  21. package/dist-embed/assets/particles-DxYDmI1O.filamat +0 -0
  22. package/dist-embed/assets/particles-quad-DwYo9yCK.filamat +0 -0
  23. package/dist-embed/assets/shadow-C9xJpqlY.filamat +0 -0
  24. package/dist-embed/assets/uberarchive-uXjRYa9p.bin +0 -0
  25. package/dist-embed/assets/unlit-pe4tFY5b.filamat +0 -0
  26. package/dist-embed/assets/unlit-transparent-D9OyaOBR.filamat +0 -0
  27. package/dist-embed/assets/video-eedvhMvS.filamat +0 -0
  28. package/dist-embed/assets/worker-Caf-yYEI.js +2 -0
  29. package/dist-embed/embed.html +48 -0
  30. package/dist-embed/embed.js +187 -0
  31. package/embed.html +48 -0
  32. package/package.json +35 -0
  33. package/src/assets/banner.png +0 -0
  34. package/src/assets/image2.png +0 -0
  35. package/src/assets/landing.mp4 +0 -0
  36. package/src/assets/neutral_ibl128.ktx +0 -0
  37. package/src/assets/neutral_ibl256.ktx +0 -0
  38. package/src/assets/output.mp4 +0 -0
  39. package/src/assets/output2.mp4 +0 -0
  40. package/src/assets/texture.png +0 -0
  41. package/src/assets/vue.svg +1 -0
  42. package/src/canvas/createCanvasHost.ts +2 -0
  43. package/src/createViewer.ts +103 -0
  44. package/src/embed.ts +515 -0
  45. package/src/host.ts +428 -0
  46. package/src/lite-test.ts +160 -0
  47. package/src/main.ts +77 -0
  48. package/src/sourcemapError.ts +2 -0
  49. package/src/ui/CuiProps.gen.ts +103 -0
  50. package/src/ui/UIScreen.ts +486 -0
  51. package/src/ui/createBareUI.ts +32 -0
  52. package/src/ui/createMeasureSystem.ts +220 -0
  53. package/src/ui/createNodeElement.ts +77 -0
  54. package/src/ui/createPagerSystem.ts +345 -0
  55. package/src/ui/createTouchSystem.ts +2 -0
  56. package/src/ui/createUI.ts +806 -0
  57. package/src/ui/creator-ui.js +14 -0
  58. package/src/ui/creator-ui.wasm +0 -0
  59. package/src/ui/defaultStyle.css +176 -0
  60. package/src/ui/layers.ts +9 -0
  61. package/src/ui/mountCanvasUI.ts +213 -0
  62. package/src/ui/nativeViewSystem.ts +91 -0
  63. package/src/ui/presentPlayer.ts +156 -0
  64. package/src/ui/props-apply.ts +403 -0
  65. package/src/ui/router.ts +2 -0
  66. package/src/ui/safeAreaSpec.ts +3 -0
  67. package/src/ui/shells.ts +37 -0
  68. package/src/ui/toasts.ts +2 -0
  69. package/src/ui/transitions.ts +250 -0
  70. package/src/ui/ui.d.ts +78 -0
  71. package/src/ui/vListSystem.ts +212 -0
  72. package/src/ui/viewScale.ts +2 -0
  73. package/src/utils/animate.ts +2 -0
  74. package/src/utils/createUtils.ts +2 -0
  75. package/src/utils/fetch.ts +3 -0
  76. package/src/utils/fonts.ts +2 -0
  77. package/src/utils/globals.ts +2 -0
  78. package/src/utils/imageNode.ts +260 -0
  79. package/src/utils/openFilePicker.ts +2 -0
  80. package/src/utils/svg.ts +2 -0
  81. package/src/utils/videoNode.ts +2 -0
  82. package/src/utils/ws.ts +2 -0
  83. package/src/viewer/createViewer.ts +993 -0
  84. package/src/viewer/creator-gl.js +14 -0
  85. package/src/viewer/creator-gl.js.symbols +5379 -0
  86. package/src/viewer/creator-gl.wasm +0 -0
  87. package/src/viewer/lit.filamat +0 -0
  88. package/src/viewer/mediaplayer.ts +3 -0
  89. package/src/viewer/particles-quad.filamat +0 -0
  90. package/src/viewer/particles.filamat +0 -0
  91. package/src/viewer/physics.ts +140 -0
  92. package/src/viewer/shadow.filamat +0 -0
  93. package/src/viewer/uberarchive.bin +0 -0
  94. package/src/viewer/unlit-transparent.filamat +0 -0
  95. package/src/viewer/unlit.filamat +0 -0
  96. package/src/viewer/validateGlb.ts +262 -0
  97. package/src/viewer/video.filamat +0 -0
  98. package/src/viewer/wasmCrashSymbolizer.ts +133 -0
  99. package/src/viewer2d/createViewer2d.ts +438 -0
  100. package/src/viewer2d/creator2d.js +14 -0
  101. package/src/viewer2d/creator2d.wasm +0 -0
  102. package/src/viewer2d/sprite2d.ts +80 -0
  103. package/src/vite-env.d.ts +1 -0
@@ -0,0 +1 @@
1
+ var Lr=(async function(ee={}){var O,t=ee,D,H,re=new Promise((e,r)=>{D=e,H=r}),te=import.meta.url,N="";function ne(e){return t.locateFile?t.locateFile(e,N):N+e}var j;{try{N=new URL(".",te).href}catch{}j=async e=>{var r=await fetch(e,{credentials:"same-origin"});if(r.ok)return r.arrayBuffer();throw new Error(r.status+" : "+r.url)}}var M=console.log.bind(console),R=console.error.bind(console),P,z,V=!1,F,k,y;function ae(){var e=z.buffer;F=new Int8Array(e),t.HEAPU8=k=new Uint8Array(e),t.HEAPU32=y=new Uint32Array(e),t.HEAPF32=new Float32Array(e),new BigInt64Array(e),new BigUint64Array(e)}function ie(){if(t.preRun)for(typeof t.preRun=="function"&&(t.preRun=[t.preRun]);t.preRun.length;)me(t.preRun.shift());G(q)}function oe(){i.R()}function se(){if(t.postRun)for(typeof t.postRun=="function"&&(t.postRun=[t.postRun]);t.postRun.length;)de(t.postRun.shift());G(K)}var g=0,S=null;function ce(e){var r;g++,(r=t.monitorRunDependencies)==null||r.call(t,g)}function fe(e){var n;if(g--,(n=t.monitorRunDependencies)==null||n.call(t,g),g==0&&S){var r=S;S=null,r()}}function U(e){var n;(n=t.onAbort)==null||n.call(t,e),e="Aborted("+e+")",R(e),V=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw H(r),r}var B;function ve(){return t.locateFile?ne("creator-ui.wasm"):new URL(""+new URL("creator-ui-CzKHLH2Q.wasm",import.meta.url).href,import.meta.url).href}function _e(e){if(e==B&&P)return new Uint8Array(P);throw"both async and sync fetching of the wasm failed"}async function ue(e){if(!P)try{var r=await j(e);return new Uint8Array(r)}catch{}return _e(e)}async function le(e,r){try{var n=await ue(e),a=await WebAssembly.instantiate(n,r);return a}catch(o){R(`failed to asynchronously prepare wasm: ${o}`),U(o)}}async function he(e,r,n){if(!e&&typeof WebAssembly.instantiateStreaming=="function")try{var a=fetch(r,{credentials:"same-origin"}),o=await WebAssembly.instantiateStreaming(a,n);return o}catch(s){R(`wasm streaming compile failed: ${s}`),R("falling back to ArrayBuffer instantiation")}return le(r,n)}function pe(){return{a:Ke}}async function ye(){function e(s,c){return i=s.exports,z=i.Q,ae(),A=i.S,fe(),i}ce();function r(s){return e(s.instance)}var n=pe();if(t.instantiateWasm)return new Promise((s,c)=>{t.instantiateWasm(n,(f,h)=>{s(e(f))})});B??(B=ve());try{var a=await he(P,B,n),o=r(a);return o}catch(s){return H(s),Promise.reject(s)}}var G=e=>{for(;e.length>0;)e.shift()(t)},K=[],de=e=>K.push(e),q=[],me=e=>q.push(e),u=e=>$e(e),l=()=>Je(),L=[],we=e=>{var r=new C(e);return r.get_caught()||r.set_caught(!0),r.set_rethrown(!1),L.push(r),Qe(e),Ze(e)},d=0,ge=()=>{_(0,0);var e=L.pop();Xe(e.excPtr),d=0};class C{constructor(r){this.excPtr=r,this.ptr=r-24}set_type(r){y[this.ptr+4>>2]=r}get_type(){return y[this.ptr+4>>2]}set_destructor(r){y[this.ptr+8>>2]=r}get_destructor(){return y[this.ptr+8>>2]}set_caught(r){r=r?1:0,F[this.ptr+12]=r}get_caught(){return F[this.ptr+12]!=0}set_rethrown(r){r=r?1:0,F[this.ptr+13]=r}get_rethrown(){return F[this.ptr+13]!=0}init(r,n){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(n)}set_adjusted_ptr(r){y[this.ptr+16>>2]=r}get_adjusted_ptr(){return y[this.ptr+16>>2]}}var W=e=>qe(e),$=e=>{var r=d;if(!r)return W(0),0;var n=new C(r);n.set_adjusted_ptr(r);var a=n.get_type();if(!a)return W(0),r;for(var o of e){if(o===0||o===a)break;var s=n.ptr+16;if(Ye(o,a,s))return W(o),r}return W(a),r},be=()=>$([]),Re=e=>$([e]),ke=()=>{var e=L.pop();e||U("no exception to throw");var r=e.excPtr;throw e.get_rethrown()||(L.push(e),e.set_rethrown(!0),e.set_caught(!1)),d=r,d},Ae=(e,r,n)=>{var a=new C(e);throw a.init(r,n),d=e,d},Te=e=>{throw d||(d=e),d},Pe=()=>U(""),Fe=e=>{U("OOM")},Se=e=>{k.length,Fe()},Ee=e=>52;function Ue(e,r,n,a){return 70}var Le=[null,[],[]],J=new TextDecoder,We=(e,r=0,n=NaN)=>{for(var a=r+n,o=r;e[o]&&!(o>=a);)++o;return J.decode(e.buffer?e.subarray(r,o):new Uint8Array(e.slice(r,o)))},He=(e,r)=>{var n=Le[e];r===0||r===10?((e===1?M:R)(We(n)),n.length=0):n.push(r)},Q=(e,r)=>{if(!e)return"";for(var n=e+r,a=e;!(a>=n)&&k[a];)++a;return J.decode(k.subarray(e,a))},Ne=(e,r,n,a)=>{for(var o=0,s=0;s<n;s++){var c=y[r>>2],f=y[r+4>>2];r+=8;for(var h=0;h<f;h++)He(e,k[c+h]);o+=f}return y[a>>2]=o,0},A,v=e=>A.get(e),X=(e,r)=>{e<128?r.push(e):r.push(e%128|128,e>>7)},Be=e=>{for(var r={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},n={parameters:[],results:e[0]=="v"?[]:[r[e[0]]]},a=1;a<e.length;++a)n.parameters.push(r[e[a]]);return n},Ce=(e,r)=>{var n=e.slice(0,1),a=e.slice(1),o={i:127,p:127,j:126,f:125,d:124,e:111};r.push(96),X(a.length,r);for(var s of a)r.push(o[s]);n=="v"?r.push(0):r.push(1,o[n])},xe=(e,r)=>{if(typeof WebAssembly.Function=="function")return new WebAssembly.Function(Be(r),e);var n=[1];Ce(r,n);var a=[0,97,115,109,1,0,0,0,1];X(n.length,a),a.push(...n),a.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var o=new WebAssembly.Module(new Uint8Array(a)),s=new WebAssembly.Instance(o,{e:{f:e}}),c=s.exports.f;return c},Ie=(e,r)=>{if(T)for(var n=e;n<e+r;n++){var a=v(n);a&&T.set(a,n)}},T,Oe=e=>(T||(T=new WeakMap,Ie(0,A.length)),T.get(e)||0),Y=[],De=()=>{if(Y.length)return Y.pop();try{A.grow(1)}catch(e){throw e instanceof RangeError?"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.":e}return A.length-1},Z=(e,r)=>A.set(e,r),je=(e,r)=>{var n=Oe(e);if(n)return n;var a=De();try{Z(a,e)}catch(s){if(!(s instanceof TypeError))throw s;var o=xe(e,r);Z(a,o)}return T.set(e,a),a},Me=(e,r,n,a)=>{if(!(a>0))return 0;for(var o=n,s=n+a-1,c=0;c<e.length;++c){var f=e.charCodeAt(c);if(f>=55296&&f<=57343){var h=e.charCodeAt(++c);f=65536+((f&1023)<<10)|h&1023}if(f<=127){if(n>=s)break;r[n++]=f}else if(f<=2047){if(n+1>=s)break;r[n++]=192|f>>6,r[n++]=128|f&63}else if(f<=65535){if(n+2>=s)break;r[n++]=224|f>>12,r[n++]=128|f>>6&63,r[n++]=128|f&63}else{if(n+3>=s)break;r[n++]=240|f>>18,r[n++]=128|f>>12&63,r[n++]=128|f>>6&63,r[n++]=128|f&63}}return r[n]=0,n-o},ze=(e,r,n)=>Me(e,k,r,n),Ve=e=>{for(var r=0,n=0;n<e.length;++n){var a=e.charCodeAt(n);a<=127?r++:a<=2047?r+=2:a>=55296&&a<=57343?(r+=4,++n):r+=3}return r};t.noExitRuntime&&t.noExitRuntime,t.print&&(M=t.print),t.printErr&&(R=t.printErr),t.wasmBinary&&(P=t.wasmBinary),t.arguments&&t.arguments,t.thisProgram&&t.thisProgram,t.UTF8ToString=Q,t.addFunction=je,t.stringToUTF8=ze,t.lengthBytesUTF8=Ve;function Ge(e){console.error(Q(e))}var Ke={u:we,M:ge,a:be,m:Re,N:ke,t:Ae,d:Te,E:Pe,L:Ge,D:Se,G:Ee,F:Ue,w:Ne,n:cr,v:ar,j:hr,h:lr,i:ur,z:wr,c:tr,s:pr,e:er,r:kr,p:dr,J:Tr,B:sr,K:Rr,o:gr,b:rr,A:_r,I:Fr,l:or,f:fr,x:Pr,P:vr,k:mr,O:yr,C:ir,g:nr,H:Sr,y:br,q:Ar},i=await ye();i.R,t._setMeasureFunc=i.T,t._getScreenId=i.U,t._createNodeRoot=i.V,t._createNode=i.W,t._cancelSubtreeLoops=i.X,t._freeNode=i.Y,t._removeNode=i.Z,t._addStringHandler=i._,t._addFloatHandler=i.$,t._addUIntHandler=i.aa,t._addResetHandler=i.ba,t._clearUIHandlers=i.ca,t._setMatrixHandler=i.da,t._setTransformOriginHandler=i.ea,t._setGradientHandler=i.fa,t._setGradientsHandler=i.ga,t._setFloat=i.ha,t._setFloatExt=i.ia,t._getColor=i.ja,t._setString=i.ka,t._setStringExt=i.la,t._getThemeValue=i.ma,t._resetProp=i.na,t._resetPropExt=i.oa,t._enableNodeLayer=i.pa,t._disableNodeLayer=i.qa,t._resetNodeLayer=i.ra,t._setNodeLayerLoop=i.sa,t._cancelNodeLayerLoop=i.ta,t._mergeNodeLayer=i.ua,t._getLayer=i.va,t._setNodeClass=i.wa,t._setNodePressed=i.xa,t._setNodeFocused=i.ya,t._calculate=i.za,t._setConditionValue=i.Aa,t._calculateWidget=i.Ba,t._freeWidget=i.Ca,t._setSafePaddings=i.Da,t._overrideRootSafeBottom=i.Ea,t._setSafeAreaBars=i.Fa,t._setThemeValue=i.Ga,t._applyTheme=i.Ha,t._recalculate=i.Ia,t._consumeNeedsLayout=i.Ja,t._getCachedRoot=i.Ka,t._calculateRoot=i.La,t._collectBegin=i.Ma,t._collectRoot=i.Na,t._collectCount=i.Oa,t._collectNodes=i.Pa,t._collectRects=i.Qa,t._markNodeDirty=i.Ra,t._nodeHasFixedSize=i.Sa,t._nodeHasMeasure=i.Ta,t._getOffset=i.Ua,t._getParentNode=i.Va,t._getContentHeight=i.Wa,t._getContentWidth=i.Xa,t._getLayoutPointer=i.Ya,t._getLayoutDOMPointer=i.Za,t._getPaddingPointer=i._a,t._setVListHandlers=i.$a,t._vlistInit=i.ab,t._vlistExists=i.bb,t._vlistFree=i.cb,t._vlistSetKeys=i.db,t._vlistInsertKeys=i.eb,t._vlistRemoveKeys=i.fb,t._vlistInvalidate=i.gb,t._vlistCreateItemRoot=i.hb,t._vlistItemMounted=i.ib,t._vlistItemUnmounted=i.jb,t._vlistOnScroll=i.kb,t._vlistUpdateLayout=i.lb,t._vlistToPhysical=i.mb,t._vlistOffsetOf=i.nb,t._vlistItemOffsetOf=i.ob,t._free=i.pb,t._malloc=i.qb;var _=i.rb,qe=i.sb,$e=i.tb,Je=i.ub,Qe=i.vb,Xe=i.wb,Ye=i.xb,Ze=i.yb;function er(e,r,n){var a=l();try{return v(e)(r,n)}catch(o){if(u(a),o!==o+0)throw o;_(1,0)}}function rr(e,r){var n=l();try{v(e)(r)}catch(a){if(u(n),a!==a+0)throw a;_(1,0)}}function tr(e,r){var n=l();try{return v(e)(r)}catch(a){if(u(n),a!==a+0)throw a;_(1,0)}}function nr(e,r,n,a,o){var s=l();try{v(e)(r,n,a,o)}catch(c){if(u(s),c!==c+0)throw c;_(1,0)}}function ar(e,r,n){var a=l();try{return v(e)(r,n)}catch(o){if(u(a),o!==o+0)throw o;_(1,0)}}function ir(e,r,n,a,o,s,c,f,h,m,w){var p=l();try{v(e)(r,n,a,o,s,c,f,h,m,w)}catch(b){if(u(p),b!==b+0)throw b;_(1,0)}}function or(e,r,n,a){var o=l();try{v(e)(r,n,a)}catch(s){if(u(o),s!==s+0)throw s;_(1,0)}}function sr(e,r,n,a,o,s,c,f,h,m,w,p){var b=l();try{return v(e)(r,n,a,o,s,c,f,h,m,w,p)}catch(E){if(u(b),E!==E+0)throw E;_(1,0)}}function cr(e,r){var n=l();try{return v(e)(r)}catch(a){if(u(n),a!==a+0)throw a;_(1,0)}}function fr(e,r,n){var a=l();try{v(e)(r,n)}catch(o){if(u(a),o!==o+0)throw o;_(1,0)}}function vr(e,r,n,a,o){var s=l();try{v(e)(r,n,a,o)}catch(c){if(u(s),c!==c+0)throw c;_(1,0)}}function _r(e,r,n){var a=l();try{v(e)(r,n)}catch(o){if(u(a),o!==o+0)throw o;_(1,0)}}function ur(e,r,n,a,o,s){var c=l();try{return v(e)(r,n,a,o,s)}catch(f){if(u(c),f!==f+0)throw f;_(1,0)}}function lr(e,r,n,a,o){var s=l();try{return v(e)(r,n,a,o)}catch(c){if(u(s),c!==c+0)throw c;_(1,0)}}function hr(e,r,n,a){var o=l();try{return v(e)(r,n,a)}catch(s){if(u(o),s!==s+0)throw s;_(1,0)}}function pr(e,r,n,a,o,s,c,f,h,m,w,p,b,E){var Ur=l();try{return v(e)(r,n,a,o,s,c,f,h,m,w,p,b,E)}catch(I){if(u(Ur),I!==I+0)throw I;_(1,0)}}function yr(e,r,n,a,o,s,c,f,h,m){var w=l();try{v(e)(r,n,a,o,s,c,f,h,m)}catch(p){if(u(w),p!==p+0)throw p;_(1,0)}}function dr(e,r,n,a,o){var s=l();try{return v(e)(r,n,a,o)}catch(c){if(u(s),c!==c+0)throw c;_(1,0)}}function mr(e,r,n,a){var o=l();try{v(e)(r,n,a)}catch(s){if(u(o),s!==s+0)throw s;_(1,0)}}function wr(e,r,n,a,o,s,c){var f=l();try{return v(e)(r,n,a,o,s,c)}catch(h){if(u(f),h!==h+0)throw h;_(1,0)}}function gr(e){var r=l();try{v(e)()}catch(n){if(u(r),n!==n+0)throw n;_(1,0)}}function br(e,r,n,a,o,s){var c=l();try{v(e)(r,n,a,o,s)}catch(f){if(u(c),f!==f+0)throw f;_(1,0)}}function Rr(e,r,n,a,o,s,c,f,h,m){var w=l();try{return v(e)(r,n,a,o,s,c,f,h,m)}catch(p){if(u(w),p!==p+0)throw p;_(1,0)}}function kr(e,r,n,a){var o=l();try{return v(e)(r,n,a)}catch(s){if(u(o),s!==s+0)throw s;_(1,0)}}function Ar(e,r,n,a,o,s,c){var f=l();try{v(e)(r,n,a,o,s,c)}catch(h){if(u(f),h!==h+0)throw h;_(1,0)}}function Tr(e,r,n,a,o,s){var c=l();try{return v(e)(r,n,a,o,s)}catch(f){if(u(c),f!==f+0)throw f;_(1,0)}}function Pr(e,r,n,a){var o=l();try{v(e)(r,n,a)}catch(s){if(u(o),s!==s+0)throw s;_(1,0)}}function Fr(e,r,n,a,o){var s=l();try{v(e)(r,n,a,o)}catch(c){if(u(s),c!==c+0)throw c;_(1,0)}}function Sr(e,r,n,a,o,s){var c=l();try{v(e)(r,n,a,o,s)}catch(f){if(u(c),f!==f+0)throw f;_(1,0)}}function x(){if(g>0){S=x;return}if(ie(),g>0){S=x;return}function e(){var r;t.calledRun=!0,!V&&(oe(),D(t),(r=t.onRuntimeInitialized)==null||r.call(t),se())}t.setStatus?(t.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>t.setStatus(""),1),e()},1)):e()}function Er(){if(t.preInit)for(typeof t.preInit=="function"&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.shift()()}return Er(),x(),O=re,O});export{Lr as default};
@@ -0,0 +1,118 @@
1
+ import{s as h}from"./worker-Caf-yYEI.js";const A=`var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(k){var n=0;return function(){return n<k.length?{done:!1,value:k[n++]}:{done:!0}}};$jscomp.arrayIterator=function(k){return{next:$jscomp.arrayIteratorImpl(k)}};$jscomp.makeIterator=function(k){var n="undefined"!=typeof Symbol&&Symbol.iterator&&k[Symbol.iterator];return n?n.call(k):$jscomp.arrayIterator(k)};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;
2
+ $jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;$jscomp.getGlobal=function(k){k=["object"==typeof globalThis&&globalThis,k,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var n=0;n<k.length;++n){var l=k[n];if(l&&l.Math==Math)return l}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
3
+ $jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(k,n,l){if(k==Array.prototype||k==Object.prototype)return k;k[n]=l.value;return k};$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";
4
+ var $jscomp$lookupPolyfilledValue=function(k,n){var l=$jscomp.propertyToPolyfillSymbol[n];if(null==l)return k[n];l=k[l];return void 0!==l?l:k[n]};$jscomp.polyfill=function(k,n,l,p){n&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(k,n,l,p):$jscomp.polyfillUnisolated(k,n,l,p))};
5
+ $jscomp.polyfillUnisolated=function(k,n,l,p){l=$jscomp.global;k=k.split(".");for(p=0;p<k.length-1;p++){var h=k[p];if(!(h in l))return;l=l[h]}k=k[k.length-1];p=l[k];n=n(p);n!=p&&null!=n&&$jscomp.defineProperty(l,k,{configurable:!0,writable:!0,value:n})};
6
+ $jscomp.polyfillIsolated=function(k,n,l,p){var h=k.split(".");k=1===h.length;p=h[0];p=!k&&p in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var A=0;A<h.length-1;A++){var f=h[A];if(!(f in p))return;p=p[f]}h=h[h.length-1];l=$jscomp.IS_SYMBOL_NATIVE&&"es6"===l?p[h]:null;n=n(l);null!=n&&(k?$jscomp.defineProperty($jscomp.polyfills,h,{configurable:!0,writable:!0,value:n}):n!==l&&(void 0===$jscomp.propertyToPolyfillSymbol[h]&&(l=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[h]=$jscomp.IS_SYMBOL_NATIVE?
7
+ $jscomp.global.Symbol(h):$jscomp.POLYFILL_PREFIX+l+"$"+h),$jscomp.defineProperty(p,$jscomp.propertyToPolyfillSymbol[h],{configurable:!0,writable:!0,value:n})))};
8
+ $jscomp.polyfill("Promise",function(k){function n(){this.batch_=null}function l(f){return f instanceof h?f:new h(function(q,v){q(f)})}if(k&&(!($jscomp.FORCE_POLYFILL_PROMISE||$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION&&"undefined"===typeof $jscomp.global.PromiseRejectionEvent)||!$jscomp.global.Promise||-1===$jscomp.global.Promise.toString().indexOf("[native code]")))return k;n.prototype.asyncExecute=function(f){if(null==this.batch_){this.batch_=[];var q=this;this.asyncExecuteFunction(function(){q.executeBatch_()})}this.batch_.push(f)};
9
+ var p=$jscomp.global.setTimeout;n.prototype.asyncExecuteFunction=function(f){p(f,0)};n.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var f=this.batch_;this.batch_=[];for(var q=0;q<f.length;++q){var v=f[q];f[q]=null;try{v()}catch(z){this.asyncThrow_(z)}}}this.batch_=null};n.prototype.asyncThrow_=function(f){this.asyncExecuteFunction(function(){throw f;})};var h=function(f){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];this.isRejectionHandled_=!1;var q=this.createResolveAndReject_();
10
+ try{f(q.resolve,q.reject)}catch(v){q.reject(v)}};h.prototype.createResolveAndReject_=function(){function f(z){return function(O){v||(v=!0,z.call(q,O))}}var q=this,v=!1;return{resolve:f(this.resolveTo_),reject:f(this.reject_)}};h.prototype.resolveTo_=function(f){if(f===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(f instanceof h)this.settleSameAsPromise_(f);else{a:switch(typeof f){case "object":var q=null!=f;break a;case "function":q=!0;break a;default:q=!1}q?this.resolveToNonPromiseObj_(f):
11
+ this.fulfill_(f)}};h.prototype.resolveToNonPromiseObj_=function(f){var q=void 0;try{q=f.then}catch(v){this.reject_(v);return}"function"==typeof q?this.settleSameAsThenable_(q,f):this.fulfill_(f)};h.prototype.reject_=function(f){this.settle_(2,f)};h.prototype.fulfill_=function(f){this.settle_(1,f)};h.prototype.settle_=function(f,q){if(0!=this.state_)throw Error("Cannot settle("+f+", "+q+"): Promise already settled in state"+this.state_);this.state_=f;this.result_=q;2===this.state_&&this.scheduleUnhandledRejectionCheck_();
12
+ this.executeOnSettledCallbacks_()};h.prototype.scheduleUnhandledRejectionCheck_=function(){var f=this;p(function(){if(f.notifyUnhandledRejection_()){var q=$jscomp.global.console;"undefined"!==typeof q&&q.error(f.result_)}},1)};h.prototype.notifyUnhandledRejection_=function(){if(this.isRejectionHandled_)return!1;var f=$jscomp.global.CustomEvent,q=$jscomp.global.Event,v=$jscomp.global.dispatchEvent;if("undefined"===typeof v)return!0;"function"===typeof f?f=new f("unhandledrejection",{cancelable:!0}):
13
+ "function"===typeof q?f=new q("unhandledrejection",{cancelable:!0}):(f=$jscomp.global.document.createEvent("CustomEvent"),f.initCustomEvent("unhandledrejection",!1,!0,f));f.promise=this;f.reason=this.result_;return v(f)};h.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var f=0;f<this.onSettledCallbacks_.length;++f)A.asyncExecute(this.onSettledCallbacks_[f]);this.onSettledCallbacks_=null}};var A=new n;h.prototype.settleSameAsPromise_=function(f){var q=this.createResolveAndReject_();
14
+ f.callWhenSettled_(q.resolve,q.reject)};h.prototype.settleSameAsThenable_=function(f,q){var v=this.createResolveAndReject_();try{f.call(q,v.resolve,v.reject)}catch(z){v.reject(z)}};h.prototype.then=function(f,q){function v(t,x){return"function"==typeof t?function(D){try{z(t(D))}catch(R){O(R)}}:x}var z,O,ba=new h(function(t,x){z=t;O=x});this.callWhenSettled_(v(f,z),v(q,O));return ba};h.prototype.catch=function(f){return this.then(void 0,f)};h.prototype.callWhenSettled_=function(f,q){function v(){switch(z.state_){case 1:f(z.result_);
15
+ break;case 2:q(z.result_);break;default:throw Error("Unexpected state: "+z.state_);}}var z=this;null==this.onSettledCallbacks_?A.asyncExecute(v):this.onSettledCallbacks_.push(v);this.isRejectionHandled_=!0};h.resolve=l;h.reject=function(f){return new h(function(q,v){v(f)})};h.race=function(f){return new h(function(q,v){for(var z=$jscomp.makeIterator(f),O=z.next();!O.done;O=z.next())l(O.value).callWhenSettled_(q,v)})};h.all=function(f){var q=$jscomp.makeIterator(f),v=q.next();return v.done?l([]):new h(function(z,
16
+ O){function ba(D){return function(R){t[D]=R;x--;0==x&&z(t)}}var t=[],x=0;do t.push(void 0),x++,l(v.value).callWhenSettled_(ba(t.length-1),O),v=q.next();while(!v.done)})};return h},"es6","es3");$jscomp.owns=function(k,n){return Object.prototype.hasOwnProperty.call(k,n)};$jscomp.assign=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.assign?Object.assign:function(k,n){for(var l=1;l<arguments.length;l++){var p=arguments[l];if(p)for(var h in p)$jscomp.owns(p,h)&&(k[h]=p[h])}return k};
17
+ $jscomp.polyfill("Object.assign",function(k){return k||$jscomp.assign},"es6","es3");$jscomp.checkStringArgs=function(k,n,l){if(null==k)throw new TypeError("The 'this' value for String.prototype."+l+" must not be null or undefined");if(n instanceof RegExp)throw new TypeError("First argument to String.prototype."+l+" must not be a regular expression");return k+""};
18
+ $jscomp.polyfill("String.prototype.startsWith",function(k){return k?k:function(n,l){var p=$jscomp.checkStringArgs(this,n,"startsWith");n+="";var h=p.length,A=n.length;l=Math.max(0,Math.min(l|0,p.length));for(var f=0;f<A&&l<h;)if(p[l++]!=n[f++])return!1;return f>=A}},"es6","es3");
19
+ $jscomp.polyfill("Array.prototype.copyWithin",function(k){function n(l){l=Number(l);return Infinity===l||-Infinity===l?l:l|0}return k?k:function(l,p,h){var A=this.length;l=n(l);p=n(p);h=void 0===h?A:n(h);l=0>l?Math.max(A+l,0):Math.min(l,A);p=0>p?Math.max(A+p,0):Math.min(p,A);h=0>h?Math.max(A+h,0):Math.min(h,A);if(l<p)for(;p<h;)p in this?this[l++]=this[p++]:(delete this[l++],p++);else for(h=Math.min(h,A+p-l),l+=h-p;h>p;)--h in this?this[--l]=this[h]:delete this[--l];return this}},"es6","es3");
20
+ $jscomp.typedArrayCopyWithin=function(k){return k?k:Array.prototype.copyWithin};$jscomp.polyfill("Int8Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Uint8Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Uint8ClampedArray.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Int16Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");
21
+ $jscomp.polyfill("Uint16Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Int32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Uint32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Float32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Float64Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");
22
+ var DracoDecoderModule=function(){var k="undefined"!==typeof document&&document.currentScript?document.currentScript.src:void 0;"undefined"!==typeof __filename&&(k=k||__filename);return function(n){function l(e){return a.locateFile?a.locateFile(e,U):U+e}function p(e,b,c){var d=b+c;for(c=b;e[c]&&!(c>=d);)++c;if(16<c-b&&e.buffer&&va)return va.decode(e.subarray(b,c));for(d="";b<c;){var g=e[b++];if(g&128){var u=e[b++]&63;if(192==(g&224))d+=String.fromCharCode((g&31)<<6|u);else{var X=e[b++]&63;g=224==
23
+ (g&240)?(g&15)<<12|u<<6|X:(g&7)<<18|u<<12|X<<6|e[b++]&63;65536>g?d+=String.fromCharCode(g):(g-=65536,d+=String.fromCharCode(55296|g>>10,56320|g&1023))}}else d+=String.fromCharCode(g)}return d}function h(e,b){return e?p(ea,e,b):""}function A(){var e=ja.buffer;a.HEAP8=Y=new Int8Array(e);a.HEAP16=new Int16Array(e);a.HEAP32=ca=new Int32Array(e);a.HEAPU8=ea=new Uint8Array(e);a.HEAPU16=new Uint16Array(e);a.HEAPU32=V=new Uint32Array(e);a.HEAPF32=new Float32Array(e);a.HEAPF64=new Float64Array(e)}function f(e){if(a.onAbort)a.onAbort(e);
24
+ e="Aborted("+e+")";da(e);wa=!0;e=new WebAssembly.RuntimeError(e+". Build with -sASSERTIONS for more info.");ka(e);throw e;}function q(e){try{if(e==P&&fa)return new Uint8Array(fa);if(ma)return ma(e);throw"both async and sync fetching of the wasm failed";}catch(b){f(b)}}function v(){if(!fa&&(xa||ha)){if("function"==typeof fetch&&!P.startsWith("file://"))return fetch(P,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+P+"'";return e.arrayBuffer()}).catch(function(){return q(P)});
25
+ if(na)return new Promise(function(e,b){na(P,function(c){e(new Uint8Array(c))},b)})}return Promise.resolve().then(function(){return q(P)})}function z(e){for(;0<e.length;)e.shift()(a)}function O(e){this.excPtr=e;this.ptr=e-24;this.set_type=function(b){V[this.ptr+4>>2]=b};this.get_type=function(){return V[this.ptr+4>>2]};this.set_destructor=function(b){V[this.ptr+8>>2]=b};this.get_destructor=function(){return V[this.ptr+8>>2]};this.set_refcount=function(b){ca[this.ptr>>2]=b};this.set_caught=function(b){Y[this.ptr+
26
+ 12>>0]=b?1:0};this.get_caught=function(){return 0!=Y[this.ptr+12>>0]};this.set_rethrown=function(b){Y[this.ptr+13>>0]=b?1:0};this.get_rethrown=function(){return 0!=Y[this.ptr+13>>0]};this.init=function(b,c){this.set_adjusted_ptr(0);this.set_type(b);this.set_destructor(c);this.set_refcount(0);this.set_caught(!1);this.set_rethrown(!1)};this.add_ref=function(){ca[this.ptr>>2]+=1};this.release_ref=function(){var b=ca[this.ptr>>2];ca[this.ptr>>2]=b-1;return 1===b};this.set_adjusted_ptr=function(b){V[this.ptr+
27
+ 16>>2]=b};this.get_adjusted_ptr=function(){return V[this.ptr+16>>2]};this.get_exception_ptr=function(){if(ya(this.get_type()))return V[this.excPtr>>2];var b=this.get_adjusted_ptr();return 0!==b?b:this.excPtr}}function ba(){function e(){if(!la&&(la=!0,a.calledRun=!0,!wa)){za=!0;z(oa);Aa(a);if(a.onRuntimeInitialized)a.onRuntimeInitialized();if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)Ba.unshift(a.postRun.shift());z(Ba)}}if(!(0<aa)){if(a.preRun)for("function"==
28
+ typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)Ca.unshift(a.preRun.shift());z(Ca);0<aa||(a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1);e()},1)):e())}}function t(){}function x(e){return(e||t).__cache__}function D(e,b){var c=x(b),d=c[e];if(d)return d;d=Object.create((b||t).prototype);d.ptr=e;return c[e]=d}function R(e){if("string"===typeof e){for(var b=0,c=0;c<e.length;++c){var d=e.charCodeAt(c);127>=d?b++:2047>=d?b+=2:55296<=d&&57343>=
29
+ d?(b+=4,++c):b+=3}b=Array(b+1);c=0;d=b.length;if(0<d){d=c+d-1;for(var g=0;g<e.length;++g){var u=e.charCodeAt(g);if(55296<=u&&57343>=u){var X=e.charCodeAt(++g);u=65536+((u&1023)<<10)|X&1023}if(127>=u){if(c>=d)break;b[c++]=u}else{if(2047>=u){if(c+1>=d)break;b[c++]=192|u>>6}else{if(65535>=u){if(c+2>=d)break;b[c++]=224|u>>12}else{if(c+3>=d)break;b[c++]=240|u>>18;b[c++]=128|u>>12&63}b[c++]=128|u>>6&63}b[c++]=128|u&63}}b[c]=0}e=r.alloc(b,Y);r.copy(b,Y,e);return e}return e}function pa(e){if("object"===typeof e){var b=
30
+ r.alloc(e,Y);r.copy(e,Y,b);return b}return e}function Z(){throw"cannot construct a VoidPtr, no constructor in IDL";}function S(){this.ptr=Da();x(S)[this.ptr]=this}function Q(){this.ptr=Ea();x(Q)[this.ptr]=this}function W(){this.ptr=Fa();x(W)[this.ptr]=this}function w(){this.ptr=Ga();x(w)[this.ptr]=this}function C(){this.ptr=Ha();x(C)[this.ptr]=this}function F(){this.ptr=Ia();x(F)[this.ptr]=this}function G(){this.ptr=Ja();x(G)[this.ptr]=this}function E(){this.ptr=Ka();x(E)[this.ptr]=this}function T(){this.ptr=
31
+ La();x(T)[this.ptr]=this}function B(){throw"cannot construct a Status, no constructor in IDL";}function H(){this.ptr=Ma();x(H)[this.ptr]=this}function I(){this.ptr=Na();x(I)[this.ptr]=this}function J(){this.ptr=Oa();x(J)[this.ptr]=this}function K(){this.ptr=Pa();x(K)[this.ptr]=this}function L(){this.ptr=Qa();x(L)[this.ptr]=this}function M(){this.ptr=Ra();x(M)[this.ptr]=this}function N(){this.ptr=Sa();x(N)[this.ptr]=this}function y(){this.ptr=Ta();x(y)[this.ptr]=this}function m(){this.ptr=Ua();x(m)[this.ptr]=
32
+ this}n=void 0===n?{}:n;var a="undefined"!=typeof n?n:{},Aa,ka;a.ready=new Promise(function(e,b){Aa=e;ka=b});var Va=!1,Wa=!1;a.onRuntimeInitialized=function(){Va=!0;if(Wa&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.onModuleParsed=function(){Wa=!0;if(Va&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.isVersionSupported=function(e){if("string"!==typeof e)return!1;e=e.split(".");return 2>e.length||3<e.length?!1:1==e[0]&&0<=e[1]&&5>=e[1]?!0:0!=e[0]||10<e[1]?!1:!0};var Xa=
33
+ Object.assign({},a),xa="object"==typeof window,ha="function"==typeof importScripts,Ya="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,U="";if(Ya){var Za=require("fs"),qa=require("path");U=ha?qa.dirname(U)+"/":__dirname+"/";var $a=function(e,b){e=e.startsWith("file://")?new URL(e):qa.normalize(e);return Za.readFileSync(e,b?void 0:"utf8")};var ma=function(e){e=$a(e,!0);e.buffer||(e=new Uint8Array(e));return e};var na=function(e,b,c){e=e.startsWith("file://")?
34
+ new URL(e):qa.normalize(e);Za.readFile(e,function(d,g){d?c(d):b(g.buffer)})};1<process.argv.length&&process.argv[1].replace(/\\\\/g,"/");process.argv.slice(2);a.inspect=function(){return"[Emscripten Module object]"}}else if(xa||ha)ha?U=self.location.href:"undefined"!=typeof document&&document.currentScript&&(U=document.currentScript.src),k&&(U=k),U=0!==U.indexOf("blob:")?U.substr(0,U.replace(/[?#].*/,"").lastIndexOf("/")+1):"",$a=function(e){var b=new XMLHttpRequest;b.open("GET",e,!1);b.send(null);
35
+ return b.responseText},ha&&(ma=function(e){var b=new XMLHttpRequest;b.open("GET",e,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),na=function(e,b,c){var d=new XMLHttpRequest;d.open("GET",e,!0);d.responseType="arraybuffer";d.onload=function(){200==d.status||0==d.status&&d.response?b(d.response):c()};d.onerror=c;d.send(null)};var ud=a.print||console.log.bind(console),da=a.printErr||console.warn.bind(console);Object.assign(a,Xa);Xa=null;var fa;a.wasmBinary&&(fa=a.wasmBinary);
36
+ "object"!=typeof WebAssembly&&f("no native wasm support detected");var ja,wa=!1,va="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,Y,ea,ca,V,Ca=[],oa=[],Ba=[],za=!1,aa=0,ra=null,ia=null;var P="draco_decoder.wasm";P.startsWith("data:application/octet-stream;base64,")||(P=l(P));var vd=0,wd=[null,[],[]],xd={b:function(e,b,c){(new O(e)).init(b,c);vd++;throw e;},a:function(){f("")},g:function(e,b,c){ea.copyWithin(e,b,b+c)},e:function(e){var b=ea.length;e>>>=0;if(2147483648<e)return!1;for(var c=
37
+ 1;4>=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,e+100663296);var g=Math;d=Math.max(e,d);g=g.min.call(g,2147483648,d+(65536-d%65536)%65536);a:{d=ja.buffer;try{ja.grow(g-d.byteLength+65535>>>16);A();var u=1;break a}catch(X){}u=void 0}if(u)return!0}return!1},f:function(e){return 52},d:function(e,b,c,d,g){return 70},c:function(e,b,c,d){for(var g=0,u=0;u<c;u++){var X=V[b>>2],ab=V[b+4>>2];b+=8;for(var sa=0;sa<ab;sa++){var ta=ea[X+sa],ua=wd[e];0===ta||10===ta?((1===e?ud:da)(p(ua,0)),ua.length=0):ua.push(ta)}g+=
38
+ ab}V[d>>2]=g;return 0}};(function(){function e(g,u){a.asm=g.exports;ja=a.asm.h;A();oa.unshift(a.asm.i);aa--;a.monitorRunDependencies&&a.monitorRunDependencies(aa);0==aa&&(null!==ra&&(clearInterval(ra),ra=null),ia&&(g=ia,ia=null,g()))}function b(g){e(g.instance)}function c(g){return v().then(function(u){return WebAssembly.instantiate(u,d)}).then(function(u){return u}).then(g,function(u){da("failed to asynchronously prepare wasm: "+u);f(u)})}var d={a:xd};aa++;a.monitorRunDependencies&&a.monitorRunDependencies(aa);
39
+ if(a.instantiateWasm)try{return a.instantiateWasm(d,e)}catch(g){da("Module.instantiateWasm callback failed with error: "+g),ka(g)}(function(){return fa||"function"!=typeof WebAssembly.instantiateStreaming||P.startsWith("data:application/octet-stream;base64,")||P.startsWith("file://")||Ya||"function"!=typeof fetch?c(b):fetch(P,{credentials:"same-origin"}).then(function(g){return WebAssembly.instantiateStreaming(g,d).then(b,function(u){da("wasm streaming compile failed: "+u);da("falling back to ArrayBuffer instantiation");
40
+ return c(b)})})})().catch(ka);return{}})();var bb=a._emscripten_bind_VoidPtr___destroy___0=function(){return(bb=a._emscripten_bind_VoidPtr___destroy___0=a.asm.k).apply(null,arguments)},Da=a._emscripten_bind_DecoderBuffer_DecoderBuffer_0=function(){return(Da=a._emscripten_bind_DecoderBuffer_DecoderBuffer_0=a.asm.l).apply(null,arguments)},cb=a._emscripten_bind_DecoderBuffer_Init_2=function(){return(cb=a._emscripten_bind_DecoderBuffer_Init_2=a.asm.m).apply(null,arguments)},db=a._emscripten_bind_DecoderBuffer___destroy___0=
41
+ function(){return(db=a._emscripten_bind_DecoderBuffer___destroy___0=a.asm.n).apply(null,arguments)},Ea=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0=function(){return(Ea=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0=a.asm.o).apply(null,arguments)},eb=a._emscripten_bind_AttributeTransformData_transform_type_0=function(){return(eb=a._emscripten_bind_AttributeTransformData_transform_type_0=a.asm.p).apply(null,arguments)},fb=a._emscripten_bind_AttributeTransformData___destroy___0=
42
+ function(){return(fb=a._emscripten_bind_AttributeTransformData___destroy___0=a.asm.q).apply(null,arguments)},Fa=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=function(){return(Fa=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=a.asm.r).apply(null,arguments)},gb=a._emscripten_bind_GeometryAttribute___destroy___0=function(){return(gb=a._emscripten_bind_GeometryAttribute___destroy___0=a.asm.s).apply(null,arguments)},Ga=a._emscripten_bind_PointAttribute_PointAttribute_0=function(){return(Ga=
43
+ a._emscripten_bind_PointAttribute_PointAttribute_0=a.asm.t).apply(null,arguments)},hb=a._emscripten_bind_PointAttribute_size_0=function(){return(hb=a._emscripten_bind_PointAttribute_size_0=a.asm.u).apply(null,arguments)},ib=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=function(){return(ib=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=a.asm.v).apply(null,arguments)},jb=a._emscripten_bind_PointAttribute_attribute_type_0=function(){return(jb=a._emscripten_bind_PointAttribute_attribute_type_0=
44
+ a.asm.w).apply(null,arguments)},kb=a._emscripten_bind_PointAttribute_data_type_0=function(){return(kb=a._emscripten_bind_PointAttribute_data_type_0=a.asm.x).apply(null,arguments)},lb=a._emscripten_bind_PointAttribute_num_components_0=function(){return(lb=a._emscripten_bind_PointAttribute_num_components_0=a.asm.y).apply(null,arguments)},mb=a._emscripten_bind_PointAttribute_normalized_0=function(){return(mb=a._emscripten_bind_PointAttribute_normalized_0=a.asm.z).apply(null,arguments)},nb=a._emscripten_bind_PointAttribute_byte_stride_0=
45
+ function(){return(nb=a._emscripten_bind_PointAttribute_byte_stride_0=a.asm.A).apply(null,arguments)},ob=a._emscripten_bind_PointAttribute_byte_offset_0=function(){return(ob=a._emscripten_bind_PointAttribute_byte_offset_0=a.asm.B).apply(null,arguments)},pb=a._emscripten_bind_PointAttribute_unique_id_0=function(){return(pb=a._emscripten_bind_PointAttribute_unique_id_0=a.asm.C).apply(null,arguments)},qb=a._emscripten_bind_PointAttribute___destroy___0=function(){return(qb=a._emscripten_bind_PointAttribute___destroy___0=
46
+ a.asm.D).apply(null,arguments)},Ha=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=function(){return(Ha=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=a.asm.E).apply(null,arguments)},rb=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=function(){return(rb=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=a.asm.F).apply(null,arguments)},sb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=
47
+ function(){return(sb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=a.asm.G).apply(null,arguments)},tb=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=function(){return(tb=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=a.asm.H).apply(null,arguments)},ub=a._emscripten_bind_AttributeQuantizationTransform_range_0=function(){return(ub=a._emscripten_bind_AttributeQuantizationTransform_range_0=a.asm.I).apply(null,arguments)},vb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=
48
+ function(){return(vb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=a.asm.J).apply(null,arguments)},Ia=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return(Ia=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=a.asm.K).apply(null,arguments)},wb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=function(){return(wb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=a.asm.L).apply(null,
49
+ arguments)},xb=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=function(){return(xb=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=a.asm.M).apply(null,arguments)},yb=a._emscripten_bind_AttributeOctahedronTransform___destroy___0=function(){return(yb=a._emscripten_bind_AttributeOctahedronTransform___destroy___0=a.asm.N).apply(null,arguments)},Ja=a._emscripten_bind_PointCloud_PointCloud_0=function(){return(Ja=a._emscripten_bind_PointCloud_PointCloud_0=a.asm.O).apply(null,
50
+ arguments)},zb=a._emscripten_bind_PointCloud_num_attributes_0=function(){return(zb=a._emscripten_bind_PointCloud_num_attributes_0=a.asm.P).apply(null,arguments)},Ab=a._emscripten_bind_PointCloud_num_points_0=function(){return(Ab=a._emscripten_bind_PointCloud_num_points_0=a.asm.Q).apply(null,arguments)},Bb=a._emscripten_bind_PointCloud___destroy___0=function(){return(Bb=a._emscripten_bind_PointCloud___destroy___0=a.asm.R).apply(null,arguments)},Ka=a._emscripten_bind_Mesh_Mesh_0=function(){return(Ka=
51
+ a._emscripten_bind_Mesh_Mesh_0=a.asm.S).apply(null,arguments)},Cb=a._emscripten_bind_Mesh_num_faces_0=function(){return(Cb=a._emscripten_bind_Mesh_num_faces_0=a.asm.T).apply(null,arguments)},Db=a._emscripten_bind_Mesh_num_attributes_0=function(){return(Db=a._emscripten_bind_Mesh_num_attributes_0=a.asm.U).apply(null,arguments)},Eb=a._emscripten_bind_Mesh_num_points_0=function(){return(Eb=a._emscripten_bind_Mesh_num_points_0=a.asm.V).apply(null,arguments)},Fb=a._emscripten_bind_Mesh___destroy___0=function(){return(Fb=
52
+ a._emscripten_bind_Mesh___destroy___0=a.asm.W).apply(null,arguments)},La=a._emscripten_bind_Metadata_Metadata_0=function(){return(La=a._emscripten_bind_Metadata_Metadata_0=a.asm.X).apply(null,arguments)},Gb=a._emscripten_bind_Metadata___destroy___0=function(){return(Gb=a._emscripten_bind_Metadata___destroy___0=a.asm.Y).apply(null,arguments)},Hb=a._emscripten_bind_Status_code_0=function(){return(Hb=a._emscripten_bind_Status_code_0=a.asm.Z).apply(null,arguments)},Ib=a._emscripten_bind_Status_ok_0=function(){return(Ib=
53
+ a._emscripten_bind_Status_ok_0=a.asm._).apply(null,arguments)},Jb=a._emscripten_bind_Status_error_msg_0=function(){return(Jb=a._emscripten_bind_Status_error_msg_0=a.asm.$).apply(null,arguments)},Kb=a._emscripten_bind_Status___destroy___0=function(){return(Kb=a._emscripten_bind_Status___destroy___0=a.asm.aa).apply(null,arguments)},Ma=a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=function(){return(Ma=a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=a.asm.ba).apply(null,arguments)},
54
+ Lb=a._emscripten_bind_DracoFloat32Array_GetValue_1=function(){return(Lb=a._emscripten_bind_DracoFloat32Array_GetValue_1=a.asm.ca).apply(null,arguments)},Mb=a._emscripten_bind_DracoFloat32Array_size_0=function(){return(Mb=a._emscripten_bind_DracoFloat32Array_size_0=a.asm.da).apply(null,arguments)},Nb=a._emscripten_bind_DracoFloat32Array___destroy___0=function(){return(Nb=a._emscripten_bind_DracoFloat32Array___destroy___0=a.asm.ea).apply(null,arguments)},Na=a._emscripten_bind_DracoInt8Array_DracoInt8Array_0=
55
+ function(){return(Na=a._emscripten_bind_DracoInt8Array_DracoInt8Array_0=a.asm.fa).apply(null,arguments)},Ob=a._emscripten_bind_DracoInt8Array_GetValue_1=function(){return(Ob=a._emscripten_bind_DracoInt8Array_GetValue_1=a.asm.ga).apply(null,arguments)},Pb=a._emscripten_bind_DracoInt8Array_size_0=function(){return(Pb=a._emscripten_bind_DracoInt8Array_size_0=a.asm.ha).apply(null,arguments)},Qb=a._emscripten_bind_DracoInt8Array___destroy___0=function(){return(Qb=a._emscripten_bind_DracoInt8Array___destroy___0=
56
+ a.asm.ia).apply(null,arguments)},Oa=a._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=function(){return(Oa=a._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=a.asm.ja).apply(null,arguments)},Rb=a._emscripten_bind_DracoUInt8Array_GetValue_1=function(){return(Rb=a._emscripten_bind_DracoUInt8Array_GetValue_1=a.asm.ka).apply(null,arguments)},Sb=a._emscripten_bind_DracoUInt8Array_size_0=function(){return(Sb=a._emscripten_bind_DracoUInt8Array_size_0=a.asm.la).apply(null,arguments)},Tb=a._emscripten_bind_DracoUInt8Array___destroy___0=
57
+ function(){return(Tb=a._emscripten_bind_DracoUInt8Array___destroy___0=a.asm.ma).apply(null,arguments)},Pa=a._emscripten_bind_DracoInt16Array_DracoInt16Array_0=function(){return(Pa=a._emscripten_bind_DracoInt16Array_DracoInt16Array_0=a.asm.na).apply(null,arguments)},Ub=a._emscripten_bind_DracoInt16Array_GetValue_1=function(){return(Ub=a._emscripten_bind_DracoInt16Array_GetValue_1=a.asm.oa).apply(null,arguments)},Vb=a._emscripten_bind_DracoInt16Array_size_0=function(){return(Vb=a._emscripten_bind_DracoInt16Array_size_0=
58
+ a.asm.pa).apply(null,arguments)},Wb=a._emscripten_bind_DracoInt16Array___destroy___0=function(){return(Wb=a._emscripten_bind_DracoInt16Array___destroy___0=a.asm.qa).apply(null,arguments)},Qa=a._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=function(){return(Qa=a._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=a.asm.ra).apply(null,arguments)},Xb=a._emscripten_bind_DracoUInt16Array_GetValue_1=function(){return(Xb=a._emscripten_bind_DracoUInt16Array_GetValue_1=a.asm.sa).apply(null,arguments)},
59
+ Yb=a._emscripten_bind_DracoUInt16Array_size_0=function(){return(Yb=a._emscripten_bind_DracoUInt16Array_size_0=a.asm.ta).apply(null,arguments)},Zb=a._emscripten_bind_DracoUInt16Array___destroy___0=function(){return(Zb=a._emscripten_bind_DracoUInt16Array___destroy___0=a.asm.ua).apply(null,arguments)},Ra=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0=function(){return(Ra=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0=a.asm.va).apply(null,arguments)},$b=a._emscripten_bind_DracoInt32Array_GetValue_1=
60
+ function(){return($b=a._emscripten_bind_DracoInt32Array_GetValue_1=a.asm.wa).apply(null,arguments)},ac=a._emscripten_bind_DracoInt32Array_size_0=function(){return(ac=a._emscripten_bind_DracoInt32Array_size_0=a.asm.xa).apply(null,arguments)},bc=a._emscripten_bind_DracoInt32Array___destroy___0=function(){return(bc=a._emscripten_bind_DracoInt32Array___destroy___0=a.asm.ya).apply(null,arguments)},Sa=a._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=function(){return(Sa=a._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=
61
+ a.asm.za).apply(null,arguments)},cc=a._emscripten_bind_DracoUInt32Array_GetValue_1=function(){return(cc=a._emscripten_bind_DracoUInt32Array_GetValue_1=a.asm.Aa).apply(null,arguments)},dc=a._emscripten_bind_DracoUInt32Array_size_0=function(){return(dc=a._emscripten_bind_DracoUInt32Array_size_0=a.asm.Ba).apply(null,arguments)},ec=a._emscripten_bind_DracoUInt32Array___destroy___0=function(){return(ec=a._emscripten_bind_DracoUInt32Array___destroy___0=a.asm.Ca).apply(null,arguments)},Ta=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=
62
+ function(){return(Ta=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=a.asm.Da).apply(null,arguments)},fc=a._emscripten_bind_MetadataQuerier_HasEntry_2=function(){return(fc=a._emscripten_bind_MetadataQuerier_HasEntry_2=a.asm.Ea).apply(null,arguments)},gc=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=function(){return(gc=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=a.asm.Fa).apply(null,arguments)},hc=a._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=function(){return(hc=a._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=
63
+ a.asm.Ga).apply(null,arguments)},ic=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=function(){return(ic=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=a.asm.Ha).apply(null,arguments)},jc=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=function(){return(jc=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=a.asm.Ia).apply(null,arguments)},kc=a._emscripten_bind_MetadataQuerier_NumEntries_1=function(){return(kc=a._emscripten_bind_MetadataQuerier_NumEntries_1=a.asm.Ja).apply(null,arguments)},
64
+ lc=a._emscripten_bind_MetadataQuerier_GetEntryName_2=function(){return(lc=a._emscripten_bind_MetadataQuerier_GetEntryName_2=a.asm.Ka).apply(null,arguments)},mc=a._emscripten_bind_MetadataQuerier___destroy___0=function(){return(mc=a._emscripten_bind_MetadataQuerier___destroy___0=a.asm.La).apply(null,arguments)},Ua=a._emscripten_bind_Decoder_Decoder_0=function(){return(Ua=a._emscripten_bind_Decoder_Decoder_0=a.asm.Ma).apply(null,arguments)},nc=a._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=function(){return(nc=
65
+ a._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=a.asm.Na).apply(null,arguments)},oc=a._emscripten_bind_Decoder_DecodeArrayToMesh_3=function(){return(oc=a._emscripten_bind_Decoder_DecodeArrayToMesh_3=a.asm.Oa).apply(null,arguments)},pc=a._emscripten_bind_Decoder_GetAttributeId_2=function(){return(pc=a._emscripten_bind_Decoder_GetAttributeId_2=a.asm.Pa).apply(null,arguments)},qc=a._emscripten_bind_Decoder_GetAttributeIdByName_2=function(){return(qc=a._emscripten_bind_Decoder_GetAttributeIdByName_2=
66
+ a.asm.Qa).apply(null,arguments)},rc=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=function(){return(rc=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=a.asm.Ra).apply(null,arguments)},sc=a._emscripten_bind_Decoder_GetAttribute_2=function(){return(sc=a._emscripten_bind_Decoder_GetAttribute_2=a.asm.Sa).apply(null,arguments)},tc=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=function(){return(tc=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=a.asm.Ta).apply(null,arguments)},
67
+ uc=a._emscripten_bind_Decoder_GetMetadata_1=function(){return(uc=a._emscripten_bind_Decoder_GetMetadata_1=a.asm.Ua).apply(null,arguments)},vc=a._emscripten_bind_Decoder_GetAttributeMetadata_2=function(){return(vc=a._emscripten_bind_Decoder_GetAttributeMetadata_2=a.asm.Va).apply(null,arguments)},wc=a._emscripten_bind_Decoder_GetFaceFromMesh_3=function(){return(wc=a._emscripten_bind_Decoder_GetFaceFromMesh_3=a.asm.Wa).apply(null,arguments)},xc=a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=
68
+ function(){return(xc=a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=a.asm.Xa).apply(null,arguments)},yc=a._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=function(){return(yc=a._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=a.asm.Ya).apply(null,arguments)},zc=a._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=function(){return(zc=a._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=a.asm.Za).apply(null,arguments)},Ac=a._emscripten_bind_Decoder_GetAttributeFloat_3=function(){return(Ac=
69
+ a._emscripten_bind_Decoder_GetAttributeFloat_3=a.asm._a).apply(null,arguments)},Bc=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=function(){return(Bc=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=a.asm.$a).apply(null,arguments)},Cc=a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=function(){return(Cc=a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=a.asm.ab).apply(null,arguments)},Dc=a._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=function(){return(Dc=
70
+ a._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=a.asm.bb).apply(null,arguments)},Ec=a._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=function(){return(Ec=a._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=a.asm.cb).apply(null,arguments)},Fc=a._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=function(){return(Fc=a._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=a.asm.db).apply(null,arguments)},Gc=a._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=
71
+ function(){return(Gc=a._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=a.asm.eb).apply(null,arguments)},Hc=a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=function(){return(Hc=a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=a.asm.fb).apply(null,arguments)},Ic=a._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=function(){return(Ic=a._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=a.asm.gb).apply(null,arguments)},Jc=a._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=
72
+ function(){return(Jc=a._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=a.asm.hb).apply(null,arguments)},Kc=a._emscripten_bind_Decoder_SkipAttributeTransform_1=function(){return(Kc=a._emscripten_bind_Decoder_SkipAttributeTransform_1=a.asm.ib).apply(null,arguments)},Lc=a._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1=function(){return(Lc=a._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1=a.asm.jb).apply(null,arguments)},Mc=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=
73
+ function(){return(Mc=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=a.asm.kb).apply(null,arguments)},Nc=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=function(){return(Nc=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=a.asm.lb).apply(null,arguments)},Oc=a._emscripten_bind_Decoder___destroy___0=function(){return(Oc=a._emscripten_bind_Decoder___destroy___0=a.asm.mb).apply(null,arguments)},Pc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=function(){return(Pc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=
74
+ a.asm.nb).apply(null,arguments)},Qc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=function(){return(Qc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=a.asm.ob).apply(null,arguments)},Rc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=function(){return(Rc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=a.asm.pb).apply(null,arguments)},Sc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=
75
+ function(){return(Sc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=a.asm.qb).apply(null,arguments)},Tc=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return(Tc=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=a.asm.rb).apply(null,arguments)},Uc=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=function(){return(Uc=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=a.asm.sb).apply(null,arguments)},Vc=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=
76
+ function(){return(Vc=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=a.asm.tb).apply(null,arguments)},Wc=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=function(){return(Wc=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=a.asm.ub).apply(null,arguments)},Xc=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=function(){return(Xc=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=a.asm.vb).apply(null,arguments)},Yc=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=
77
+ function(){return(Yc=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=a.asm.wb).apply(null,arguments)},Zc=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=function(){return(Zc=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=a.asm.xb).apply(null,arguments)},$c=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return($c=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=a.asm.yb).apply(null,arguments)},ad=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=
78
+ function(){return(ad=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=a.asm.zb).apply(null,arguments)},bd=a._emscripten_enum_draco_DataType_DT_INVALID=function(){return(bd=a._emscripten_enum_draco_DataType_DT_INVALID=a.asm.Ab).apply(null,arguments)},cd=a._emscripten_enum_draco_DataType_DT_INT8=function(){return(cd=a._emscripten_enum_draco_DataType_DT_INT8=a.asm.Bb).apply(null,arguments)},dd=a._emscripten_enum_draco_DataType_DT_UINT8=function(){return(dd=a._emscripten_enum_draco_DataType_DT_UINT8=
79
+ a.asm.Cb).apply(null,arguments)},ed=a._emscripten_enum_draco_DataType_DT_INT16=function(){return(ed=a._emscripten_enum_draco_DataType_DT_INT16=a.asm.Db).apply(null,arguments)},fd=a._emscripten_enum_draco_DataType_DT_UINT16=function(){return(fd=a._emscripten_enum_draco_DataType_DT_UINT16=a.asm.Eb).apply(null,arguments)},gd=a._emscripten_enum_draco_DataType_DT_INT32=function(){return(gd=a._emscripten_enum_draco_DataType_DT_INT32=a.asm.Fb).apply(null,arguments)},hd=a._emscripten_enum_draco_DataType_DT_UINT32=
80
+ function(){return(hd=a._emscripten_enum_draco_DataType_DT_UINT32=a.asm.Gb).apply(null,arguments)},id=a._emscripten_enum_draco_DataType_DT_INT64=function(){return(id=a._emscripten_enum_draco_DataType_DT_INT64=a.asm.Hb).apply(null,arguments)},jd=a._emscripten_enum_draco_DataType_DT_UINT64=function(){return(jd=a._emscripten_enum_draco_DataType_DT_UINT64=a.asm.Ib).apply(null,arguments)},kd=a._emscripten_enum_draco_DataType_DT_FLOAT32=function(){return(kd=a._emscripten_enum_draco_DataType_DT_FLOAT32=a.asm.Jb).apply(null,
81
+ arguments)},ld=a._emscripten_enum_draco_DataType_DT_FLOAT64=function(){return(ld=a._emscripten_enum_draco_DataType_DT_FLOAT64=a.asm.Kb).apply(null,arguments)},md=a._emscripten_enum_draco_DataType_DT_BOOL=function(){return(md=a._emscripten_enum_draco_DataType_DT_BOOL=a.asm.Lb).apply(null,arguments)},nd=a._emscripten_enum_draco_DataType_DT_TYPES_COUNT=function(){return(nd=a._emscripten_enum_draco_DataType_DT_TYPES_COUNT=a.asm.Mb).apply(null,arguments)},od=a._emscripten_enum_draco_StatusCode_OK=function(){return(od=
82
+ a._emscripten_enum_draco_StatusCode_OK=a.asm.Nb).apply(null,arguments)},pd=a._emscripten_enum_draco_StatusCode_DRACO_ERROR=function(){return(pd=a._emscripten_enum_draco_StatusCode_DRACO_ERROR=a.asm.Ob).apply(null,arguments)},qd=a._emscripten_enum_draco_StatusCode_IO_ERROR=function(){return(qd=a._emscripten_enum_draco_StatusCode_IO_ERROR=a.asm.Pb).apply(null,arguments)},rd=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=function(){return(rd=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=
83
+ a.asm.Qb).apply(null,arguments)},sd=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=function(){return(sd=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=a.asm.Rb).apply(null,arguments)},td=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=function(){return(td=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=a.asm.Sb).apply(null,arguments)};a._malloc=function(){return(a._malloc=a.asm.Tb).apply(null,arguments)};a._free=function(){return(a._free=a.asm.Ub).apply(null,arguments)};
84
+ var ya=function(){return(ya=a.asm.Vb).apply(null,arguments)};a.___start_em_js=15856;a.___stop_em_js=15954;var la;ia=function b(){la||ba();la||(ia=b)};if(a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);0<a.preInit.length;)a.preInit.pop()();ba();t.prototype=Object.create(t.prototype);t.prototype.constructor=t;t.prototype.__class__=t;t.__cache__={};a.WrapperObject=t;a.getCache=x;a.wrapPointer=D;a.castObject=function(b,c){return D(b.ptr,c)};a.NULL=D(0);a.destroy=function(b){if(!b.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";
85
+ b.__destroy__();delete x(b.__class__)[b.ptr]};a.compare=function(b,c){return b.ptr===c.ptr};a.getPointer=function(b){return b.ptr};a.getClass=function(b){return b.__class__};var r={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(r.needed){for(var b=0;b<r.temps.length;b++)a._free(r.temps[b]);r.temps.length=0;a._free(r.buffer);r.buffer=0;r.size+=r.needed;r.needed=0}r.buffer||(r.size+=128,r.buffer=a._malloc(r.size),r.buffer||f(void 0));r.pos=0},alloc:function(b,c){r.buffer||f(void 0);b=
86
+ b.length*c.BYTES_PER_ELEMENT;b=b+7&-8;r.pos+b>=r.size?(0<b||f(void 0),r.needed+=b,c=a._malloc(b),r.temps.push(c)):(c=r.buffer+r.pos,r.pos+=b);return c},copy:function(b,c,d){d>>>=0;switch(c.BYTES_PER_ELEMENT){case 2:d>>>=1;break;case 4:d>>>=2;break;case 8:d>>>=3}for(var g=0;g<b.length;g++)c[d+g]=b[g]}};Z.prototype=Object.create(t.prototype);Z.prototype.constructor=Z;Z.prototype.__class__=Z;Z.__cache__={};a.VoidPtr=Z;Z.prototype.__destroy__=Z.prototype.__destroy__=function(){bb(this.ptr)};S.prototype=
87
+ Object.create(t.prototype);S.prototype.constructor=S;S.prototype.__class__=S;S.__cache__={};a.DecoderBuffer=S;S.prototype.Init=S.prototype.Init=function(b,c){var d=this.ptr;r.prepare();"object"==typeof b&&(b=pa(b));c&&"object"===typeof c&&(c=c.ptr);cb(d,b,c)};S.prototype.__destroy__=S.prototype.__destroy__=function(){db(this.ptr)};Q.prototype=Object.create(t.prototype);Q.prototype.constructor=Q;Q.prototype.__class__=Q;Q.__cache__={};a.AttributeTransformData=Q;Q.prototype.transform_type=Q.prototype.transform_type=
88
+ function(){return eb(this.ptr)};Q.prototype.__destroy__=Q.prototype.__destroy__=function(){fb(this.ptr)};W.prototype=Object.create(t.prototype);W.prototype.constructor=W;W.prototype.__class__=W;W.__cache__={};a.GeometryAttribute=W;W.prototype.__destroy__=W.prototype.__destroy__=function(){gb(this.ptr)};w.prototype=Object.create(t.prototype);w.prototype.constructor=w;w.prototype.__class__=w;w.__cache__={};a.PointAttribute=w;w.prototype.size=w.prototype.size=function(){return hb(this.ptr)};w.prototype.GetAttributeTransformData=
89
+ w.prototype.GetAttributeTransformData=function(){return D(ib(this.ptr),Q)};w.prototype.attribute_type=w.prototype.attribute_type=function(){return jb(this.ptr)};w.prototype.data_type=w.prototype.data_type=function(){return kb(this.ptr)};w.prototype.num_components=w.prototype.num_components=function(){return lb(this.ptr)};w.prototype.normalized=w.prototype.normalized=function(){return!!mb(this.ptr)};w.prototype.byte_stride=w.prototype.byte_stride=function(){return nb(this.ptr)};w.prototype.byte_offset=
90
+ w.prototype.byte_offset=function(){return ob(this.ptr)};w.prototype.unique_id=w.prototype.unique_id=function(){return pb(this.ptr)};w.prototype.__destroy__=w.prototype.__destroy__=function(){qb(this.ptr)};C.prototype=Object.create(t.prototype);C.prototype.constructor=C;C.prototype.__class__=C;C.__cache__={};a.AttributeQuantizationTransform=C;C.prototype.InitFromAttribute=C.prototype.InitFromAttribute=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return!!rb(c,b)};C.prototype.quantization_bits=
91
+ C.prototype.quantization_bits=function(){return sb(this.ptr)};C.prototype.min_value=C.prototype.min_value=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return tb(c,b)};C.prototype.range=C.prototype.range=function(){return ub(this.ptr)};C.prototype.__destroy__=C.prototype.__destroy__=function(){vb(this.ptr)};F.prototype=Object.create(t.prototype);F.prototype.constructor=F;F.prototype.__class__=F;F.__cache__={};a.AttributeOctahedronTransform=F;F.prototype.InitFromAttribute=F.prototype.InitFromAttribute=
92
+ function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return!!wb(c,b)};F.prototype.quantization_bits=F.prototype.quantization_bits=function(){return xb(this.ptr)};F.prototype.__destroy__=F.prototype.__destroy__=function(){yb(this.ptr)};G.prototype=Object.create(t.prototype);G.prototype.constructor=G;G.prototype.__class__=G;G.__cache__={};a.PointCloud=G;G.prototype.num_attributes=G.prototype.num_attributes=function(){return zb(this.ptr)};G.prototype.num_points=G.prototype.num_points=function(){return Ab(this.ptr)};
93
+ G.prototype.__destroy__=G.prototype.__destroy__=function(){Bb(this.ptr)};E.prototype=Object.create(t.prototype);E.prototype.constructor=E;E.prototype.__class__=E;E.__cache__={};a.Mesh=E;E.prototype.num_faces=E.prototype.num_faces=function(){return Cb(this.ptr)};E.prototype.num_attributes=E.prototype.num_attributes=function(){return Db(this.ptr)};E.prototype.num_points=E.prototype.num_points=function(){return Eb(this.ptr)};E.prototype.__destroy__=E.prototype.__destroy__=function(){Fb(this.ptr)};T.prototype=
94
+ Object.create(t.prototype);T.prototype.constructor=T;T.prototype.__class__=T;T.__cache__={};a.Metadata=T;T.prototype.__destroy__=T.prototype.__destroy__=function(){Gb(this.ptr)};B.prototype=Object.create(t.prototype);B.prototype.constructor=B;B.prototype.__class__=B;B.__cache__={};a.Status=B;B.prototype.code=B.prototype.code=function(){return Hb(this.ptr)};B.prototype.ok=B.prototype.ok=function(){return!!Ib(this.ptr)};B.prototype.error_msg=B.prototype.error_msg=function(){return h(Jb(this.ptr))};
95
+ B.prototype.__destroy__=B.prototype.__destroy__=function(){Kb(this.ptr)};H.prototype=Object.create(t.prototype);H.prototype.constructor=H;H.prototype.__class__=H;H.__cache__={};a.DracoFloat32Array=H;H.prototype.GetValue=H.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Lb(c,b)};H.prototype.size=H.prototype.size=function(){return Mb(this.ptr)};H.prototype.__destroy__=H.prototype.__destroy__=function(){Nb(this.ptr)};I.prototype=Object.create(t.prototype);I.prototype.constructor=
96
+ I;I.prototype.__class__=I;I.__cache__={};a.DracoInt8Array=I;I.prototype.GetValue=I.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Ob(c,b)};I.prototype.size=I.prototype.size=function(){return Pb(this.ptr)};I.prototype.__destroy__=I.prototype.__destroy__=function(){Qb(this.ptr)};J.prototype=Object.create(t.prototype);J.prototype.constructor=J;J.prototype.__class__=J;J.__cache__={};a.DracoUInt8Array=J;J.prototype.GetValue=J.prototype.GetValue=function(b){var c=
97
+ this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Rb(c,b)};J.prototype.size=J.prototype.size=function(){return Sb(this.ptr)};J.prototype.__destroy__=J.prototype.__destroy__=function(){Tb(this.ptr)};K.prototype=Object.create(t.prototype);K.prototype.constructor=K;K.prototype.__class__=K;K.__cache__={};a.DracoInt16Array=K;K.prototype.GetValue=K.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Ub(c,b)};K.prototype.size=K.prototype.size=function(){return Vb(this.ptr)};
98
+ K.prototype.__destroy__=K.prototype.__destroy__=function(){Wb(this.ptr)};L.prototype=Object.create(t.prototype);L.prototype.constructor=L;L.prototype.__class__=L;L.__cache__={};a.DracoUInt16Array=L;L.prototype.GetValue=L.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Xb(c,b)};L.prototype.size=L.prototype.size=function(){return Yb(this.ptr)};L.prototype.__destroy__=L.prototype.__destroy__=function(){Zb(this.ptr)};M.prototype=Object.create(t.prototype);M.prototype.constructor=
99
+ M;M.prototype.__class__=M;M.__cache__={};a.DracoInt32Array=M;M.prototype.GetValue=M.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return $b(c,b)};M.prototype.size=M.prototype.size=function(){return ac(this.ptr)};M.prototype.__destroy__=M.prototype.__destroy__=function(){bc(this.ptr)};N.prototype=Object.create(t.prototype);N.prototype.constructor=N;N.prototype.__class__=N;N.__cache__={};a.DracoUInt32Array=N;N.prototype.GetValue=N.prototype.GetValue=function(b){var c=
100
+ this.ptr;b&&"object"===typeof b&&(b=b.ptr);return cc(c,b)};N.prototype.size=N.prototype.size=function(){return dc(this.ptr)};N.prototype.__destroy__=N.prototype.__destroy__=function(){ec(this.ptr)};y.prototype=Object.create(t.prototype);y.prototype.constructor=y;y.prototype.__class__=y;y.__cache__={};a.MetadataQuerier=y;y.prototype.HasEntry=y.prototype.HasEntry=function(b,c){var d=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:R(c);return!!fc(d,b,c)};y.prototype.GetIntEntry=
101
+ y.prototype.GetIntEntry=function(b,c){var d=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:R(c);return gc(d,b,c)};y.prototype.GetIntEntryArray=y.prototype.GetIntEntryArray=function(b,c,d){var g=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:R(c);d&&"object"===typeof d&&(d=d.ptr);hc(g,b,c,d)};y.prototype.GetDoubleEntry=y.prototype.GetDoubleEntry=function(b,c){var d=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=
102
+ c&&"object"===typeof c?c.ptr:R(c);return ic(d,b,c)};y.prototype.GetStringEntry=y.prototype.GetStringEntry=function(b,c){var d=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:R(c);return h(jc(d,b,c))};y.prototype.NumEntries=y.prototype.NumEntries=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return kc(c,b)};y.prototype.GetEntryName=y.prototype.GetEntryName=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=
103
+ c.ptr);return h(lc(d,b,c))};y.prototype.__destroy__=y.prototype.__destroy__=function(){mc(this.ptr)};m.prototype=Object.create(t.prototype);m.prototype.constructor=m;m.prototype.__class__=m;m.__cache__={};a.Decoder=m;m.prototype.DecodeArrayToPointCloud=m.prototype.DecodeArrayToPointCloud=function(b,c,d){var g=this.ptr;r.prepare();"object"==typeof b&&(b=pa(b));c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return D(nc(g,b,c,d),B)};m.prototype.DecodeArrayToMesh=m.prototype.DecodeArrayToMesh=
104
+ function(b,c,d){var g=this.ptr;r.prepare();"object"==typeof b&&(b=pa(b));c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return D(oc(g,b,c,d),B)};m.prototype.GetAttributeId=m.prototype.GetAttributeId=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return pc(d,b,c)};m.prototype.GetAttributeIdByName=m.prototype.GetAttributeIdByName=function(b,c){var d=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?
105
+ c.ptr:R(c);return qc(d,b,c)};m.prototype.GetAttributeIdByMetadataEntry=m.prototype.GetAttributeIdByMetadataEntry=function(b,c,d){var g=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:R(c);d=d&&"object"===typeof d?d.ptr:R(d);return rc(g,b,c,d)};m.prototype.GetAttribute=m.prototype.GetAttribute=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return D(sc(d,b,c),w)};m.prototype.GetAttributeByUniqueId=m.prototype.GetAttributeByUniqueId=
106
+ function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return D(tc(d,b,c),w)};m.prototype.GetMetadata=m.prototype.GetMetadata=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return D(uc(c,b),T)};m.prototype.GetAttributeMetadata=m.prototype.GetAttributeMetadata=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return D(vc(d,b,c),T)};m.prototype.GetFaceFromMesh=m.prototype.GetFaceFromMesh=function(b,
107
+ c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!wc(g,b,c,d)};m.prototype.GetTriangleStripsFromMesh=m.prototype.GetTriangleStripsFromMesh=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return xc(d,b,c)};m.prototype.GetTrianglesUInt16Array=m.prototype.GetTrianglesUInt16Array=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);
108
+ d&&"object"===typeof d&&(d=d.ptr);return!!yc(g,b,c,d)};m.prototype.GetTrianglesUInt32Array=m.prototype.GetTrianglesUInt32Array=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!zc(g,b,c,d)};m.prototype.GetAttributeFloat=m.prototype.GetAttributeFloat=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Ac(g,b,c,d)};m.prototype.GetAttributeFloatForAllPoints=
109
+ m.prototype.GetAttributeFloatForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Bc(g,b,c,d)};m.prototype.GetAttributeIntForAllPoints=m.prototype.GetAttributeIntForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Cc(g,b,c,d)};m.prototype.GetAttributeInt8ForAllPoints=m.prototype.GetAttributeInt8ForAllPoints=
110
+ function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Dc(g,b,c,d)};m.prototype.GetAttributeUInt8ForAllPoints=m.prototype.GetAttributeUInt8ForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Ec(g,b,c,d)};m.prototype.GetAttributeInt16ForAllPoints=m.prototype.GetAttributeInt16ForAllPoints=function(b,c,d){var g=this.ptr;
111
+ b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Fc(g,b,c,d)};m.prototype.GetAttributeUInt16ForAllPoints=m.prototype.GetAttributeUInt16ForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Gc(g,b,c,d)};m.prototype.GetAttributeInt32ForAllPoints=m.prototype.GetAttributeInt32ForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&
112
+ (b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Hc(g,b,c,d)};m.prototype.GetAttributeUInt32ForAllPoints=m.prototype.GetAttributeUInt32ForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Ic(g,b,c,d)};m.prototype.GetAttributeDataArrayForAllPoints=m.prototype.GetAttributeDataArrayForAllPoints=function(b,c,d,g,u){var X=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&
113
+ "object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);g&&"object"===typeof g&&(g=g.ptr);u&&"object"===typeof u&&(u=u.ptr);return!!Jc(X,b,c,d,g,u)};m.prototype.SkipAttributeTransform=m.prototype.SkipAttributeTransform=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);Kc(c,b)};m.prototype.GetEncodedGeometryType_Deprecated=m.prototype.GetEncodedGeometryType_Deprecated=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Lc(c,b)};m.prototype.DecodeBufferToPointCloud=
114
+ m.prototype.DecodeBufferToPointCloud=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return D(Mc(d,b,c),B)};m.prototype.DecodeBufferToMesh=m.prototype.DecodeBufferToMesh=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return D(Nc(d,b,c),B)};m.prototype.__destroy__=m.prototype.__destroy__=function(){Oc(this.ptr)};(function(){function b(){a.ATTRIBUTE_INVALID_TRANSFORM=Pc();a.ATTRIBUTE_NO_TRANSFORM=Qc();
115
+ a.ATTRIBUTE_QUANTIZATION_TRANSFORM=Rc();a.ATTRIBUTE_OCTAHEDRON_TRANSFORM=Sc();a.INVALID=Tc();a.POSITION=Uc();a.NORMAL=Vc();a.COLOR=Wc();a.TEX_COORD=Xc();a.GENERIC=Yc();a.INVALID_GEOMETRY_TYPE=Zc();a.POINT_CLOUD=$c();a.TRIANGULAR_MESH=ad();a.DT_INVALID=bd();a.DT_INT8=cd();a.DT_UINT8=dd();a.DT_INT16=ed();a.DT_UINT16=fd();a.DT_INT32=gd();a.DT_UINT32=hd();a.DT_INT64=id();a.DT_UINT64=jd();a.DT_FLOAT32=kd();a.DT_FLOAT64=ld();a.DT_BOOL=md();a.DT_TYPES_COUNT=nd();a.OK=od();a.DRACO_ERROR=pd();a.IO_ERROR=qd();
116
+ a.INVALID_PARAMETER=rd();a.UNSUPPORTED_VERSION=sd();a.UNKNOWN_VERSION=td()}za?b():oa.unshift(b)})();if("function"===typeof a.onModuleParsed)a.onModuleParsed();a.Decoder.prototype.GetEncodedGeometryType=function(b){if(b.__class__&&b.__class__===a.DecoderBuffer)return a.Decoder.prototype.GetEncodedGeometryType_Deprecated(b);if(8>b.byteLength)return a.INVALID_GEOMETRY_TYPE;switch(b[7]){case 0:return a.POINT_CLOUD;case 1:return a.TRIANGULAR_MESH;default:return a.INVALID_GEOMETRY_TYPE}};return n.ready}}();
117
+ "object"===typeof exports&&"object"===typeof module?module.exports=DracoDecoderModule:"function"===typeof define&&define.amd?define([],function(){return DracoDecoderModule}):"object"===typeof exports&&(exports.DracoDecoderModule=DracoDecoderModule);
118
+ `,T=""+new URL("draco_decoder-DsQ12WqX.wasm",import.meta.url).href,g=()=>{const i=self;let s;const m=(t,n,o,e,a,r)=>{const b=r.num_components(),p=o.num_points()*b,l=i[a],d={Float32Array:t.DT_FLOAT32,Int8Array:t.DT_INT8,Int16Array:t.DT_INT16,Int32Array:t.DT_INT32,Uint8Array:t.DT_UINT8,Uint16Array:t.DT_UINT16,Uint32Array:t.DT_UINT32}[a],_=p*l.BYTES_PER_ELEMENT,c=t._malloc(_);n.GetAttributeDataArrayForAllPoints(o,r,d,_,c);const y=new l(t.HEAPF32.buffer,c,p).slice();return t._free(c),{name:e,array:y,itemSize:b}},u=(t,n,o)=>{const e=new t.Decoder,a=new t.DecoderBuffer;a.Init(new Int8Array(n),n.byteLength);let r;try{const b=e.GetEncodedGeometryType(a);let p;if(b===t.TRIANGULAR_MESH?(r=new t.Mesh,p=e.DecodeBufferToMesh(a,r)):(r=new t.PointCloud,p=e.DecodeBufferToPointCloud(a,r)),!p.ok()||r.ptr===0)throw new Error("draco decode failed: "+p.error_msg());const l=[];for(const _ in o.attributeIds){const c=e.GetAttributeByUniqueId(r,o.attributeIds[_]);l.push(m(t,e,r,_,o.attributeTypes[_],c))}const d={attributes:l};if(b===t.TRIANGULAR_MESH){const _=r.num_faces()*3,c=_*4,y=t._malloc(c);e.GetTrianglesUInt32Array(r,c,y),d.index={array:new Uint32Array(t.HEAPF32.buffer,y,_).slice(),itemSize:1},t._free(y)}return d}finally{r&&t.destroy(r),t.destroy(a),t.destroy(e)}};i.onmessage=t=>{const n=t.data;if(n.type==="init"){s=new Promise(o=>i.DracoDecoderModule({wasmBinary:n.wasmBinary,onModuleLoaded:o}));return}s.then(o=>{try{const e=u(o,n.buffer,n.config),a=e.attributes.map(r=>r.array.buffer);e.index&&a.push(e.index.array.buffer),i.postMessage({id:n.id,geometry:e},a)}catch(e){i.postMessage({id:n.id,error:String(e&&e.message||e)})}})}},f=new WeakMap,I=async()=>{const i=await h(A,T,g);return{decodeGeometry:(s,m)=>{let u=f.get(s);return u||(u=i({buffer:s,config:m}).then(t=>t.geometry),f.set(s,u)),u}}};export{I as createDracoManager};
@@ -0,0 +1,162 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./createViewerLite-CP-WHGLg.js","../embed.js"])))=>i.map(i=>d[i]);
2
+ var _t=Object.defineProperty;var kt=(o,e,n)=>e in o?_t(o,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[e]=n;var $=(o,e,n)=>kt(o,typeof e!="symbol"?e+"":e,n);import{s as be,i as oe,c as me,e as Be,a as Lt,g as Ve,b as Tt,d as Rt,f as Ct,h as At,R as Nt,j as Mt,k as zt,o as Ot,D as Te,l as $t,m as Dt,_ as Re,n as It,p as Pt,q as Ht,r as Wt,t as jt,u as Ce,v as Ft,w as Bt,x as Ae,y as Ne,z as Vt}from"../embed.js";const Ut=`/* Base element styles for the lite UI renderer. Layout is real CSS flexbox — these classes bake
3
+ * the SDK's layout defaults (flexbox-only, column, no grow/shrink, stretch, clipped, border-box)
4
+ * so per-node inline styles only carry what the app actually set. Inline styles always win. */
5
+
6
+ .lc {
7
+ display: flex;
8
+ flex-direction: column;
9
+ position: relative;
10
+ flex-grow: 0;
11
+ flex-shrink: 0;
12
+ align-items: stretch;
13
+ overflow: hidden;
14
+ box-sizing: border-box;
15
+ border-width: 0;
16
+ border-style: solid;
17
+ min-width: 0;
18
+ min-height: 0;
19
+ margin: 0;
20
+ padding: 0;
21
+ background-repeat: no-repeat;
22
+ background-position: center;
23
+ }
24
+
25
+ .lc-screen {
26
+ position: absolute;
27
+ inset: 0;
28
+ width: 100%;
29
+ height: 100%;
30
+ pointer-events: none;
31
+ user-select: none;
32
+ -webkit-user-select: none;
33
+ -webkit-touch-callout: none; /* no iOS long-press callout on images/text (long-press is the app's) */
34
+ text-align: left;
35
+ /* Default text color sourced from the theme (docs/ui-theme-plan.md system defaults):
36
+ _creatorUI.setTheme writes --color on the app root; unset → white, as before. */
37
+ color: var(--color, white);
38
+ font-size: 14px;
39
+ }
40
+ .lc-screen.interactive {
41
+ pointer-events: all;
42
+ }
43
+
44
+ .lc-text {
45
+ display: block;
46
+ white-space: pre-wrap;
47
+ font-size: 14px;
48
+ line-height: 1.2em;
49
+ }
50
+
51
+ /* Per-type layout defaults (row direction, box/button centering, spacer grow, input min-height,
52
+ * widget position) come from the SDK — inlined into each node's own style at construction. */
53
+
54
+ button.lc {
55
+ border: none;
56
+ outline: none;
57
+ cursor: pointer;
58
+ pointer-events: all;
59
+ background: none;
60
+ text-align: left;
61
+ color: inherit;
62
+ font: inherit;
63
+ }
64
+
65
+ img.lc, video.lc {
66
+ display: block;
67
+ object-fit: contain;
68
+ user-select: none;
69
+ -webkit-user-drag: none;
70
+ }
71
+
72
+ input.lc, textarea.lc {
73
+ display: block;
74
+ pointer-events: all;
75
+ border: none;
76
+ outline: none;
77
+ background: none;
78
+ resize: none;
79
+ color: inherit;
80
+ font: inherit;
81
+ font-size: 14px;
82
+ user-select: text;
83
+ -webkit-user-select: text;
84
+ }
85
+ /* Auto-grow: a textarea with no explicit height follows its content (an inline \`height\` from an
86
+ app style overrides this). Safari/Firefox fall back to the scrollHeight sync in LiteScreen. */
87
+ textarea.lc {
88
+ field-sizing: content;
89
+ }
90
+ input.lc::placeholder, textarea.lc::placeholder {
91
+ color: var(--placeholder-color, #aaa);
92
+ }
93
+
94
+ .lc-scrollable {
95
+ overflow-y: auto;
96
+ overflow-x: hidden;
97
+ pointer-events: all;
98
+ }
99
+ .lc-scrollable.scrollable_horizontal {
100
+ overflow-x: auto;
101
+ overflow-y: hidden;
102
+ }
103
+ .lc-scrollable::-webkit-scrollbar {
104
+ width: 2px;
105
+ }
106
+ .lc-scrollable.scrollable_horizontal::-webkit-scrollbar {
107
+ height: 2px;
108
+ }
109
+ .lc-noscrollbar::-webkit-scrollbar {
110
+ display: none;
111
+ }
112
+
113
+ /* snap (ScrollStyle.snap): scroll-snap-type is set inline on the container per axis; the align of
114
+ each direct child rides these classes so the parent never has to stamp its children. */
115
+ .lc-snap-start > * { scroll-snap-align: start; }
116
+ .lc-snap-center > * { scroll-snap-align: center; }
117
+ .lc-snap-end > * { scroll-snap-align: end; }
118
+
119
+ .lc-vlist {
120
+ overflow-y: auto;
121
+ overflow-x: hidden;
122
+ pointer-events: all;
123
+ }
124
+ .lc-vlist::before {
125
+ content: "";
126
+ display: block;
127
+ height: var(--scroll-height, 0px);
128
+ }
129
+ .lc-vlist::-webkit-scrollbar {
130
+ width: 2px;
131
+ }
132
+ .lc-vlist-item {
133
+ position: absolute;
134
+ left: 0;
135
+ right: 0;
136
+ display: flex;
137
+ flex-direction: column;
138
+ align-items: stretch;
139
+ }
140
+
141
+ .lc ::-webkit-scrollbar-track {
142
+ background: transparent;
143
+ border-radius: 4px;
144
+ }
145
+ .lc ::-webkit-scrollbar-thumb {
146
+ background: rgba(0, 0, 0, 0.8);
147
+ border-radius: 4px;
148
+ }
149
+
150
+ .lc-widget {
151
+ z-index: 10;
152
+ /* Like .lc-screen: pointer-transparent by default, so a full-screen widget (a HUD over a scene)
153
+ lets taps on its empty areas fall through. Interactive children re-enable pointer-events; a
154
+ widget with a root onTouchStart gets .interactive to catch its whole surface. */
155
+ pointer-events: none;
156
+ }
157
+ .lc-widget.interactive {
158
+ pointer-events: all;
159
+ }
160
+ `,Yt=o=>{const e=new Map,n=(a,f)=>a.heights.get(a.keys[f])??a.estimates[f]??40,i=a=>{let f=0;for(let u=0;u<a.keys.length;u++)f+=n(a,u);return f},c=(a,f)=>{let u=0;for(let g=0;g<a.keys.length;g++){if(a.keys[g]===f)return u;u+=n(a,g)}return NaN},l=a=>{let f=0;for(let u=0;u<a.keys.length;u++){const g=a.mounted.get(a.keys[u]);g&&(g.wrap.style.top=f+"px"),f+=n(a,u)}a.el.style.setProperty("--scroll-height",f+"px")},p=a=>{const f=a.el,u=i(a),g=a.jsNode._endThreshold??0,m=a.jsNode._startThreshold??0,_=f.scrollTop+f.clientHeight>=u-g;if(_&&!a.atEnd)for(const R of a.jsNode.erl??[])R();a.atEnd=_;const L=f.scrollTop<=m;if(L&&!a.atStart)for(const R of a.jsNode.strl??[])R();a.atStart=L},w=a=>{const f=a.el,u=f.clientHeight;if(u===0)return;const g=a.jsNode._overscan===-1?u:a.jsNode._overscan??u,m=f.scrollTop-g,_=f.scrollTop+u+g,L=new Set;let R=0;for(let O=0;O<a.keys.length&&R<_;O++){const K=n(a,O);R+K>m&&L.add(a.keys[O]),R+=K}const Y=[];for(const[O,K]of a.mounted)L.has(O)||(a.mounted.delete(O),K.wrap.remove(),a.screen.releaseSubtree(K.subtree),Y.push(O));const G=[...L].filter(O=>!a.mounted.has(O));(Y.length>0||G.length>0)&&a.jsNode._syncWindow(Y,G),l(a),p(a)},E=(a,f)=>{a.el.scrollTo({top:i(a)-a.el.clientHeight,behavior:f?"smooth":"auto"})},M=(a,f,u,g)=>{const m={nodeId:g,el:u,jsNode:f,screen:a,keys:[...f._keys??[]],estimates:[...f._estimates??[]],heights:new Map,mounted:new Map,atStart:!1,atEnd:!1,pinnedToEnd:!!f._inverted,resizeObserver:new ResizeObserver(()=>{m.pinnedToEnd&&(m.pinnedToEnd=!1,w(m),E(m,!1)),w(m)})};e.set(g,m),m.resizeObserver.observe(u),u.addEventListener("scroll",()=>{w(m);for(const _ of f.sl??[])_(u.scrollTop)})},A=a=>{const f=e.get(a);if(f){f.resizeObserver.disconnect();for(const u of f.mounted.values())u.wrap.remove(),f.screen.releaseSubtree(u.subtree);f.mounted.clear(),e.delete(a)}},x=a=>a.el.scrollTop+a.el.clientHeight>=i(a)-2;return{register:M,unregister:A,api:{vlistSetKeys:(a,f,u)=>{const g=e.get(a._id);if(!g)return;const m=new Set(f);for(const _ of g.heights.keys())m.has(_)||g.heights.delete(_);g.keys=[...f],g.estimates=[...u],w(g)},vlistInsertKeys:(a,f,u,g)=>{const m=e.get(a._id);if(!m)return;const _=m.jsNode._inverted&&x(m);f<0||f>=m.keys.length?(m.keys.push(...u),m.estimates.push(...g)):(m.keys.splice(f,0,...u),m.estimates.splice(f,0,...g),f===0&&m.el.scrollTop>0&&(m.el.scrollTop+=g.reduce((L,R)=>L+(R??40),0))),w(m),_&&E(m,!0)},vlistRemoveKeys:(a,f)=>{const u=e.get(a._id);if(!u)return;const g=new Set(f),m=[],_=[];for(let L=0;L<u.keys.length;L++)g.has(u.keys[L])||(m.push(u.keys[L]),_.push(u.estimates[L]));u.keys=m,u.estimates=_;for(const L of f){u.heights.delete(L);const R=u.mounted.get(L);R&&(u.mounted.delete(L),R.wrap.remove(),u.screen.releaseSubtree(R.subtree))}w(u)},vlistInvalidate:(a,f)=>{const u=e.get(a._id);if(!u)return;const g=u.mounted.get(f);g&&(u.mounted.delete(f),g.wrap.remove(),u.screen.releaseSubtree(g.subtree),u.jsNode._syncWindow([f],[f]),l(u))},vlistMount:(a,f,u)=>{const g=e.get(a._id);if(!g)return;const m=o().doc.createElement("div");m.className="lc-vlist-item",m.appendChild(g.screen.addNodeRecursive(u)),g.el.appendChild(m),g.mounted.set(f,{wrap:m,subtree:u});const _=m.offsetHeight;_>0&&g.heights.set(f,_)},command:(a,f,...u)=>{const g=e.get(a._id);if(!g)return;const m=_=>_?"smooth":"auto";switch(f){case"scrollTo":g.el.scrollTo({top:u[0],behavior:m(u[1]??!0)});break;case"scrollToKey":{const _=c(g,u[0]);isNaN(_)||g.el.scrollTo({top:_,behavior:m(u[1]??!0)});break}case"scrollToEnd":E(g,u[0]??!0);break}}}}},ye=2,le=256,ue=257,pe=258,Gt=272,Me=60270,he=60271,Kt=61e3,Xt=/\b(?:calc|min|max|clamp)\(/,qt=o=>{if(!Xt.test(o))return o;let e="";for(let n=0;n<o.length;n++){if(o.startsWith("var(",n)){let c=0;const l=n;for(;n<o.length;n++)if(o[n]==="(")c++;else if(o[n]===")"&&--c===0)break;e+=o.slice(l,Math.min(n+1,o.length));continue}const i=o[n];if(i==="+"||i==="-"){const c=e[e.length-1]??"";if(!(i==="-"&&(c==="e"&&"btlr".includes(o[n+1]??"")||o.slice(Math.max(0,n-7),n)==="comfort"))&&/[\w%.)]/.test(c)){for(e=e.trimEnd()+" "+i+" ";o[n+1]===" ";)n++;continue}}e+=i}return e.replace(/\d*\.\d+|\d+/g,(n,i,c)=>{const l=c.slice(0,i).trimEnd(),p=c.slice(i+n.length).trimStart();return/[\w.%]$/.test(l)||/^[\w.%]/.test(p)||/[*/]$/.test(l)||/^[*/]/.test(p)?n:n+"px"})},Qt={top:"12px",bottom:"4px",left:"16px",right:"16px"},Ue=o=>`max(var(--safe-${o}), calc(var(--safe-${o}-bar, 0px) + var(--comfort-${o}, ${Qt[o]})))`,ve=o=>qt(o).replace(new RegExp("(?<!-)\\bcomfort-(top|bottom|left|right)\\b","g"),(e,n)=>Ue(n)).replace(new RegExp("(?<!-)\\bsafe-(top|bottom|left|right)\\b","g"),(e,n)=>`var(--safe-${n})`),Zt=o=>{if(typeof o=="number")return o+"px";const e=String(o);return/^\d*\.?\d+$/.test(e)?e+"px":ve(e)},ee=o=>{if(typeof o=="number")return o<=16777215&&Number.isInteger(o)?"#"+(o>>>0).toString(16).padStart(6,"0"):"#"+(o>>>0).toString(16).padStart(8,"0");const e=String(o);return e==="clear"?"transparent":e},ze={p:["top","right","bottom","left"],padding:["top","right","bottom","left"],px:["left","right"],paddingHorizontal:["left","right"],py:["top","bottom"],paddingVertical:["top","bottom"],pt:["top"],paddingTop:["top"],pr:["right"],paddingRight:["right"],pb:["bottom"],paddingBottom:["bottom"],pl:["left"],paddingLeft:["left"]},Oe={m:["top","right","bottom","left"],margin:["top","right","bottom","left"],mx:["left","right"],marginHorizontal:["left","right"],my:["top","bottom"],marginVertical:["top","bottom"],mt:["top"],marginTop:["top"],mr:["right"],marginRight:["right"],mb:["bottom"],marginBottom:["bottom"],ml:["left"],marginLeft:["left"]},$e={width:"width",height:"height",minWidth:"min-width",maxWidth:"max-width",minHeight:"min-height",maxHeight:"max-height",top:"top",left:"left",bottom:"bottom",right:"right",gap:"gap",fontSize:"font-size",lineHeight:"line-height",letterSpacing:"letter-spacing",flexBase:"flex-basis",borderWidth:"border-width",borderTopWidth:"border-top-width",borderRightWidth:"border-right-width",borderBottomWidth:"border-bottom-width",borderLeftWidth:"border-left-width",borderTopLeftRadius:"border-top-left-radius",borderTopRightRadius:"border-top-right-radius",borderBottomLeftRadius:"border-bottom-left-radius",borderBottomRightRadius:"border-bottom-right-radius"},De={flexDirection:"flex-direction",justifyContent:"justify-content",alignItems:"align-items",alignSelf:"align-self",flexWrap:"flex-wrap",position:"position",display:"display",overflow:"overflow",boxSizing:"box-sizing",textAlign:"text-align",textDecoration:"text-decoration",transform:"transform",transformOrigin:"transform-origin",backgroundSize:"background-size",bgSize:"background-size"},Ie={opacity:"opacity",flexGrow:"flex-grow",flexShrink:"flex-shrink",aspectRatio:"aspect-ratio",fontWeight:"font-weight"},Pe={color:"color",bgColor:"background-color",backgroundColor:"background-color",borderColor:"border-color",borderTopColor:"border-top-color",borderRightColor:"border-right-color",borderBottomColor:"border-bottom-color",borderLeftColor:"border-left-color",placeholderColor:"--placeholder-color"},He=new Set(["bgImage","backgroundImage","bgGradient","backgroundGradient","tintColor","objectFit","overlayColor","placeholder","type","scrollDirection","showScrollbar","keyboardDismissMode","snap","sheetDetents","sheetDetent","sheetDismissible","scrollX","scrollY","overscrollMode","rippleColor","refreshControlColor","pointerEvents"]),We=(o,e,n,i)=>{if(i==="safe-all"){for(const l of e)o.set(`${n}-${l}`,`var(--safe-${l})`);return}if(i==="comfort-all"||i==="comfort-x"||i==="comfort-y"){for(const l of e)o.set(`${n}-${l}`,Ue(l));return}const c=typeof i=="number"?i+"px":ve(String(i));for(const l of e)o.set(`${n}-${l}`,c)},je=(o,e,n)=>{if(n==null)return!0;if(e in ze)return We(o,ze[e],"padding",n),!0;if(e in Oe)return We(o,Oe[e],"margin",n),!0;if(e in $e)return o.set($e[e],Zt(n)),!0;if(e in De)return o.set(De[e],String(n)),!0;if(e in Ie)return o.set(Ie[e],String(n)),!0;if(e in Pe)return o.set(Pe[e],ee(n)),!0;switch(e){case"flex":return o.set("flex",String(n)),!0;case"fontFamily":return o.set("font-family",n==="monospaced"?"monospace":String(n)),!0;case"borderRadius":return typeof n=="number"?o.set("border-radius",n+"px"):o.set("border-radius",String(n).trim().split(/\s+/).map(i=>/^\d*\.?\d+$/.test(i)?i+"px":ve(i)).join(" ")),!0;case"border":return typeof n=="number"?o.set("border-width",n+"px"):o.set("border",String(n)),!0;case"borderTop":case"borderRight":case"borderBottom":case"borderLeft":{const i=e.slice(6).toLowerCase();return typeof n=="number"?o.set(`border-${i}-width`,n+"px"):o.set(`border-${i}`,String(n)),!0}case"fontStyle":return o.set("font-style",n===2?"italic":n===0?"normal":String(n)),!0}return!1},Ye=(o,e)=>{var n;return oe(e)?me(e.svg):typeof e=="object"&&e!==null&&"canvasSurface"in e?((n=o.canvasHost)==null?void 0:n.surfaceToDataUrl(e.canvasSurface))??"":typeof e=="object"&&e!==null?Ve(e._id):String(e??"")},we=(o,e,n)=>{const i=e.el;if(i.tagName.toLowerCase()===n)return i;const c=o.doc.createElement(n);c.setAttribute("style",i.getAttribute("style")??""),c.setAttribute("class",i.getAttribute("class")??"");for(const l of["data-viewbox","data-node-id"]){const p=i.getAttribute(l);p!==null&&c.setAttribute(l,p)}return c._lecodesNode=i._lecodesNode,c._sourceRect=i._sourceRect,c._atlasSize=i._atlasSize,e.screen.nodeMap.set(e.id,c),e.el=c,i.replaceWith(c),c},ce=(o,e,n)=>{e.layers.set(ye,{props:n})},Jt=o=>{const e=Be(o);if(!e)return{};const n=e.trim().split(/[\s,]+/).map(Number),i=n[2],c=n[3];return!i||!c?{}:{width:i,aspectRatio:i/c}},en=o=>{var n;if(o._sourceRect)return!0;const e=o._src;return oe(e)&&!!((n=o._style)!=null&&n.tintColor||be(e))},tn=(o,e)=>{var l;const n=e.node,i=n._sourceRect;if(i){e.el._sourceRect=i,ce(o,e,{width:i[2],height:i[3]}),Ke(e.el,Ye(o,n._src),null);return}const c=((l=n._style)==null?void 0:l.tintColor)??be(n._src);Ge(o,e,n._src,c===void 0?void 0:ee(c))},Ge=(o,e,n,i)=>{const c=e.el;if(c instanceof HTMLImageElement){if(c.referrerPolicy="no-referrer",c.crossOrigin="anonymous",oe(n)){c.src=me(n.svg);const l=Be(n.svg);l?c.setAttribute("data-viewbox",l):c.removeAttribute("data-viewbox")}else c.removeAttribute("data-viewbox"),c.src=Ye(o,n);return}oe(n)&&i&&(Lt(c,n.svg,i),ce(o,e,Jt(n.svg)))},nn=(o,e,n)=>{const i=e.el instanceof HTMLDivElement?e.el.style.backgroundColor:"",c=be(n)??(i||void 0),l=oe(n)&&!!c;l||e.layers.delete(ye);const p=we(o,e,l?"div":"img");p._sourceRect=void 0,Ge(o,e,n,c===void 0?void 0:ee(c)),o.computeStyle(e)},on=(o,e,n)=>{const i=e.el;if(!(i instanceof HTMLImageElement))return;const c=i.src,l=we(o,e,"div"),p=l.style;p.webkitMaskImage=p.maskImage=`url("${c}")`,p.webkitMaskRepeat=p.maskRepeat="no-repeat",p.webkitMaskPosition=p.maskPosition="center",p.maskSize||(p.webkitMaskSize=p.maskSize="contain"),l.style.backgroundColor=n;const w=l.getAttribute("data-viewbox");if(w){const E=w.trim().split(/[\s,]+/).map(Number);E[2]&&E[3]&&ce(o,e,{width:E[2],aspectRatio:E[2]/E[3]})}},sn=(o,e,n,i,c,l)=>{const p=e.el,w=p._sourceRect;if(p._sourceRect=[n,i,c,l],p instanceof HTMLImageElement){const E=we(o,e,"div");E._sourceRect=[n,i,c,l],Ke(E,p.src,p)}else ge(p);(!w||w[2]!==c||w[3]!==l)&&(ce(o,e,{width:c,height:l}),o.computeStyle(e))},Ke=(o,e,n)=>{if(o.style.backgroundRepeat="no-repeat",n&&n.naturalWidth>0){o._atlasSize=[n.naturalWidth,n.naturalHeight],o.style.backgroundImage=`url("${e}")`,ge(o);return}const i=new Image;i.crossOrigin="anonymous",i.referrerPolicy="no-referrer",i.addEventListener("load",()=>{o._atlasSize=[i.naturalWidth,i.naturalHeight],o.style.backgroundImage=`url("${e}")`,ge(o)},{once:!0}),i.src=e},ge=o=>{const e=o._sourceRect,n=o._atlasSize;if(!e||!n)return;const[i,c,l,p]=e,[w,E]=n;o.style.backgroundSize=`${w/l*100}% ${E/p*100}%`,o.style.backgroundPosition=`${w===l?0:i/(w-l)*100}% ${E===p?0:c/(E-p)*100}%`},rn=(o,e)=>{switch(e.type){case"image":return o.createElement(en(e)?"div":"img");case"video":return Rt(e);case"button":return o.createElement("button");case"input":return o.createElement("input");case"textarea":return o.createElement("textarea");default:return o.createElement("div")}},an=typeof CSS<"u"&&!!CSS.supports&&CSS.supports("field-sizing","content"),ln=(o,e)=>{if(o.type!=="textarea"||an)return;const n=()=>{var i;((i=o._style)==null?void 0:i.height)==null&&(e.style.height="auto",e.style.height=`${e.scrollHeight}px`)};e._growTextArea=n,e.addEventListener("input",n),requestAnimationFrame(n)},cn={screen:"lc-screen",text:"lc-text",row:"lc-row",box:"lc-box",button:"lc-button",spacer:"lc-spacer",scrollable:"lc-scrollable",vlist:"lc-vlist",widget:"lc-widget"};class Fe{constructor(e,n){$(this,"core");$(this,"nodeMap",new Map);$(this,"root");$(this,"node");$(this,"screenId");$(this,"isWidget",!1);$(this,"deregister");$(this,"overlayElement",null);$(this,"screenWidth",0);$(this,"screenHeight",0);$(this,"firedScreenWidth",-1);$(this,"firedScreenHeight",-1);$(this,"vlistIds",[]);$(this,"insertNode",(e,n,i)=>{const c=this.nodeMap.get(e);if(!c)return;const l=this.addNodeRecursive(i);c.insertBefore(l,c.children[n]??null)});$(this,"removeNode",(e,n)=>{const i=this.nodeMap.get(e);i&&this.detachNode(i,n)});this.core=e,this.deregister=n}init(e,n){this.node=n,this.screenId=e,this.root=this.addNodeRecursive(n)}addNodeRecursive(e){var w,E,M;const n=this.core,i=rn(n.doc,e);i.classList.add("lc");const c=cn[e.type];c&&i.classList.add(c),e.type==="widget"&&i.classList.add("widget"),i._lecodesNode=e;const l=n.nextId();i.setAttribute("data-node-id",String(l));const p=n.registerNode(l,i,e,this);e._id=l,this.nodeMap.set(l,i),e._text&&(i.textContent=e._text),e.type==="screen"&&(e.scrollable&&i.classList.add("lc-scrollable"),((w=e.touchStartListeners)==null?void 0:w.length)>0&&i.classList.add("interactive")),e.type==="widget"&&((E=e.touchStartListeners)==null?void 0:E.length)>0&&i.classList.add("interactive"),e.type==="button"&&((M=e.touchStartListeners)==null?void 0:M.length)>0&&i.classList.add("interactive"),e.type==="image"&&tn(n,p),e.type==="video"&&Tt(i),this.attachListeners(e,i,p);for(const[A,x]of Object.entries(e._style??{}))n.applyStyleValue(p,le,A,x,!1);if(e._classes)for(const A of e._classes)p.active.add(n.classLayer(A));if(n.computeStyle(p),(e.type==="input"||e.type==="textarea")&&e._value&&(i.value=e._value),e.ll&&n.observeLayout(p),e.type==="vlist")n.vlist.register(this,e,i,l),this.vlistIds.push(l);else if("children"in e)for(const A of e.children)A&&i.appendChild(this.addNodeRecursive(A));return i}attachListeners(e,n,i){var l;const c=this.core.touch;if((e.type==="button"||e.type==="widget"||e.type==="screen")&&(n.addEventListener("pointerdown",c.onUIButtonTouchStart.bind(null,e)),e.type==="button"&&n.addEventListener("pointerup",c.onUIButtonTouchEnd.bind(null,e))),e.type==="input"||e.type==="textarea"){const p=n;p._lcNode=e,ln(e,p),((l=e.cl)==null?void 0:l.length)>0&&p.addEventListener("input",()=>{for(const w of e.cl)w(p.value)}),p.addEventListener("focus",()=>{this.core.setLayerEnabled(i,he,!0);for(const w of e.fl??[])w()}),p.addEventListener("blur",()=>{this.core.setLayerEnabled(i,he,!1);for(const w of e.bl??[])w()})}(e.type==="scrollable"||e.type==="screen"&&e.scrollable)&&e.sl&&n.addEventListener("scroll",()=>{const p=n.classList.contains("scrollable_horizontal")?n.scrollLeft:n.scrollTop;for(const w of e.sl)w(p)})}applyLayout(e,n){if(this.screenWidth=e,this.screenHeight=n,!this.isWidget&&!(e===this.firedScreenWidth&&n===this.firedScreenHeight)){this.firedScreenWidth=e,this.firedScreenHeight=n;for(const i of this.node.ll??[])i({left:0,top:0,width:e,height:n})}}setContent(e,n,i){const c=this.nodeMap.get(e);if(c){for(const l of n)l&&this.detachNode(c,l);for(const l of i)l&&c.appendChild(this.addNodeRecursive(l))}}detachNode(e,n){const i=this.nodeMap.get(n._id);i&&i.parentElement===e&&e.removeChild(i),this.releaseSubtree(n)}releaseSubtree(e){if(e._id){if(e.type==="vlist"){this.core.vlist.unregister(e._id);const n=this.vlistIds.indexOf(e._id);n>=0&&this.vlistIds.splice(n,1)}this.core.dropNode(e._id),this.nodeMap.delete(e._id),e._id=0}if("children"in e)for(const n of e.children)n&&this.releaseSubtree(n)}remove(){this.removeFromHTML(),this.releaseSubtree(this.node),this.nodeMap.clear(),this.deregister(this.screenId)}removeFromHTML(){var e;this.root.remove(),(e=this.overlayElement)==null||e.remove(),this.overlayElement=null,this.screenWidth=0,this.screenHeight=0,this.firedScreenWidth=-1,this.firedScreenHeight=-1}}const dn=async(o,e)=>{const n=o.ownerDocument,i=n.defaultView??window,c=n.createElement("style");c.innerHTML=Ut,o.append(c);const l=new Map;let p=1;const w=new Map;let E=0;const M=new Map;let A=1,x=null;const N=t=>{t<0?M.delete(t):w.delete(t)};let a=!1;const f=new Set;let u=Te;const g=(t,s)=>{const r=t>s,{insets:d,bars:h}=Ot(u,r),b={top:d[0],right:d[1],bottom:d[2],left:d[3]},y=o.style;for(const[P,S]of Object.entries(b))y.setProperty(`--safe-${P}`,S+"px"),h.includes(P)?y.setProperty(`--safe-${P}-bar`,S+"px"):y.removeProperty(`--safe-${P}-bar`);if(r!==a){a=r;for(const P of f)D(P)}},m=t=>{u=t??Te,Q>0&&Z>0&&g(Q,Z)},_=t=>{const s=o.style;for(const r of Object.keys(t)){if(r.startsWith("safe-")||r==="vw"||r==="vh"||r==="vmin"||r==="vmax")continue;const d=t[r];d==null?s.removeProperty(`--${r}`):s.setProperty(`--${r}`,typeof d=="number"?d+"px":String(d))}},L=new Map,R=t=>{const s=t.startsWith("$")?t.slice(1):t;let r=L.get(s);return r===void 0&&(r=Gt+L.size,L.set(s,r)),r},Y=t=>{if(t.startsWith("$"))return R(t);switch(t){case"onPressed":return Me;case"onFocused":return he;case"onLandscape":return ue;case"onPortait":case"onPortrait":return pe}return null},G=t=>t===null||typeof t!="object"?t:"_id"in t?Ve(t._id):"svg"in t?me(t.svg):"canvasSurface"in t?(e==null?void 0:e.surfaceToDataUrl(t.canvasSurface))??"":t,O=(t,s)=>{let r=t.layers.get(s);return r||(r={props:{}},t.layers.set(s,r)),r},K=(t,s)=>s===ue?a:s===pe?!a:s===le||s===ye?!0:t.active.has(s),se=t=>{const s=new Map;for(const[r,d]of Object.entries(t)){if(He.has(r)){r==="tintColor"?s.set("background-color",""):(r==="bgImage"||r==="backgroundImage"||r==="bgGradient"||r==="backgroundGradient")&&s.set("background-image","");continue}je(s,r,d??0)}return[...s.keys()]},re=t=>t.transitions?[...t.transitions.values()].join(", "):"",te=(t,s,r)=>`${t} ${s??225}ms ease-in-out${r?` ${r}ms`:""}`,v=(t,s,r,d)=>{t.transitions||(t.transitions=new Map);for(const h of se(s))t.transitions.set(h,te(h,r,d));t.el.style.transition=re(t)},k=new Set,C=t=>{k.has(t)||(k.add(t),console.warn(`[viewer-lite] unsupported style prop "${t}"`))},z=(t,s,r,d,h=!0)=>{const b=G(d);if(b!=null&&typeof b=="object"){const y=Y(r);if(y===null){C(r);return}const{duration:P,delay:S,layer:T,...j}=b,J={};for(const[ne,ae]of Object.entries(j))J[ne]=G(ae);t.layers.set(y,{props:J,duration:P,delay:S}),(y===ue||y===pe)&&f.add(t),(P!=null||S!=null)&&v(t,J,P,S)}else if(b==null){const y=Y(r);y!==null?t.layers.delete(y):delete O(t,s).props[r]}else O(t,s).props[r]=b;h&&D(t)},B=(t,s,r)=>{var P;const d=s.bgGradient??s.backgroundGradient,h=s.bgImage??s.backgroundImage;if(d||h){const S=[];d&&S.push(String(d)),h&&S.push(`url("${h}")`),r.set("background-image",S.join(", "))}if((s.bgSize??s.backgroundSize)==="tile"&&(r.set("background-size","auto"),r.set("background-repeat","repeat")),s.pointerEvents!==void 0&&r.set("pointer-events",s.pointerEvents==="none"?"none":"auto"),s.objectFit!==void 0){const S=t.el;if(S instanceof HTMLImageElement||S instanceof HTMLVideoElement)r.set("object-fit",String(s.objectFit));else if(S.hasAttribute("data-viewbox")&&!S._sourceRect){const T=s.objectFit==="cover"?"cover":s.objectFit==="fill"?"100% 100%":"contain";r.set("-webkit-mask-size",T),r.set("mask-size",T)}}s.tintColor!==void 0&&t.node.type==="image"&&(t.el instanceof HTMLImageElement&&t.el.hasAttribute("data-viewbox")&&on(X,t,ee(s.tintColor)),r.set("background-color",ee(s.tintColor)));const y=t.el;if((y instanceof HTMLInputElement||y instanceof HTMLTextAreaElement)&&(y.placeholder=s.placeholder!=null?String(s.placeholder):"",y instanceof HTMLInputElement&&s.type!==void 0&&(y.type=String(s.type))),t.node.type==="scrollable"){y.classList.toggle("scrollable_horizontal",s.scrollDirection==="horizontal");const S=s.snap,T=S!==void 0&&S!=="none",j=s.scrollDirection==="horizontal";r.set("scroll-snap-type",T?`${j?"x":"y"} mandatory`:"none"),y.classList.toggle("lc-snap-start",S==="start"),y.classList.toggle("lc-snap-center",S==="center"),y.classList.toggle("lc-snap-end",S==="end");const J=r.get(j?"padding-left":"padding-top"),ne=r.get(j?"padding-right":"padding-bottom"),ae=(Et,xt)=>r.set(`scroll-padding-${Et}`,S==="start"||S==="end"?xt??"0px":"0px");ae(j?"left":"top",J),ae(j?"right":"bottom",ne)}if(s.showScrollbar!==void 0&&y.classList.toggle("lc-noscrollbar",s.showScrollbar===!1),t.node.type==="widget"&&s.sheetDetents!==void 0){const S=String(s.sheetDetents).split(",").map(Number).filter(ne=>ne>0),T=S[S.length-1]??.5,j=Math.floor(Number(s.sheetDetent??0)),J=j>=0?S[Math.min(j,S.length-1)]??T:0;r.set("transform",`translateY(${(T-J)/T*100}%)`),r.set("transition","transform 250ms ease")}if(t._kbDismissMode=s.keyboardDismissMode,s.keyboardDismissMode==="scroll"&&!t._kbDismissBound){t._kbDismissBound=!0;const S=()=>{if(t._kbDismissMode!=="scroll")return;const T=n.activeElement;(T instanceof HTMLInputElement||T instanceof HTMLTextAreaElement)&&T.blur()};y.addEventListener("touchmove",S,{passive:!0}),y.addEventListener("wheel",S,{passive:!0})}if(s.overlayColor!==void 0&&s.overlayColor!==null){const S=t.screen;let T=S.overlayElement;T||(T=n.createElement("div"),T.style.position="absolute",T.style.inset="0",T.style.pointerEvents="auto",T.style.zIndex="9",T.addEventListener("click",()=>{for(const j of S.node.otl??[])j()}),o.appendChild(T),S.overlayElement=T),T.style.background=ee(s.overlayColor),t.hasOverlay=!0}else t.hasOverlay&&((P=t.screen.overlayElement)==null||P.remove(),t.screen.overlayElement=null,t.hasOverlay=!1);s.scrollY!==void 0&&s.scrollY!==t._lastScrollY&&(t._lastScrollY=s.scrollY,y.scrollTop=Number(s.scrollY)),s.scrollX!==void 0&&s.scrollX!==t._lastScrollX&&(t._lastScrollX=s.scrollX,y.scrollLeft=Number(s.scrollX))},D=t=>{const s={};for(const h of[...t.layers.keys()].sort((b,y)=>b-y))if(K(t,h))for(const[b,y]of Object.entries(t.layers.get(h).props))y===null?delete s[b]:y!==void 0&&(s[b]=y);const r=new Map;for(const[h,b]of Object.entries(s))He.has(h)||je(r,h,b)||C(h);B(t,s,r);const d=t.el;for(const[h,b]of r)t.applied.get(h)!==b&&d.style.setProperty(h,b);for(const h of t.applied.keys())r.has(h)||d.style.removeProperty(h);t.applied=r},V=(t,s,r)=>{r?t.active.add(s):t.active.delete(s),t.layers.has(s)&&D(t)},U=new Map,H=new ResizeObserver(t=>{for(const s of t){const r=U.get(s.target);if(!r)continue;const d=s.target,h={left:d.offsetLeft,top:d.offsetTop,width:d.offsetWidth,height:d.offsetHeight};for(const b of r.node.ll??[])b(h)}}),q=t=>{t.node.type!=="screen"&&(U.set(t.el,t),H.observe(t.el))},W=Yt(()=>X),I=Mt(o);I.onNodeStateChanged((t,s)=>{const r=l.get(t);r&&V(r,Me,s)});const X={doc:n,nodes:l,touch:I,canvasHost:e,nextId:()=>p++,registerNode(t,s,r,d){const h={id:t,el:s,node:r,screen:d,layers:new Map,active:new Set,applied:new Map,transitions:null};return l.set(t,h),h},dropNode(t){const s=l.get(t);s&&(U.delete(s.el)&&H.unobserve(s.el),f.delete(s),l.delete(t))},applyStyleValue:z,computeStyle:D,setLayerEnabled:V,classLayer:R,observeLayout:q,vlist:W},Se=()=>[o.clientWidth,o.clientHeight],ie=t=>{const s=new Fe(X,N),r=E++;return w.set(r,s),s.init(r,t),s},de=t=>{if(x!==null){for(const s of x.node.cl??[])s();t?x.removeFromHTML():x.remove(),x=null}},qe=t=>{F.show?xe():de(!1);const[s,r]=Se();g(s,r),Q=s,Z=r,x=ie(t),o.appendChild(x.root);for(const d of t.ol??[])d();return x.applyLayout(s,r),x},Qe=()=>{x==null||x.remove(),x=null};let Ee=()=>{};const F=new Nt(t=>{de(!0),x=t,o.appendChild(t.root),t.applyLayout(Q,Z),Ee(t.node);for(const s of t.node.ol??[])s()},t=>t.remove()),Ze=(t,s)=>{x!==null&&(F.stack.includes(x)?x.removeFromHTML():x.remove(),x=null);for(const h of F.stack)h.remove();F.stack=[];const[r,d]=Se();g(r,d),Q=r,Z=d,Ee=s,F.init(ie(t))},xe=()=>{F.hide(),x&&F.stack.includes(x)&&de(!0)},Je=t=>{for(const r of M.values())if(r.node===t)return;const s=new Fe(X,N);s.isWidget=!0,M.set(-A,s),s.init(-A,t),A++,o.appendChild(s.root)},et=t=>{if(!t._id)return;const s=l.get(t._id);!s||!s.screen.isWidget||s.screen.remove()},tt=(t,s,r)=>{const d=l.get(t);d&&z(d,le,s,r)},nt=(t,s)=>{const r=l.get(t);if(r){for(const[d,h]of Object.entries(s))z(r,le,d,h,!1);D(r)}},ot=(t,s,r)=>{const d=l.get(t);d&&V(d,R(s),r)},st=(t,s,r)=>{var h,b;const d=l.get(t);if(d)switch(s){case"text":d.el.textContent=r;break;case"value":d.el.value=r,(b=(h=d.el)._growTextArea)==null||b.call(h);break;case"src":nn(X,d,r);break}},rt=(t,s,r,d,h)=>{const b=l.get(t);b&&sn(X,b,s,r,d,h)},it=t=>{var r;const s=(r=l.get(t))==null?void 0:r.el;return(s==null?void 0:s.value)??""},at=t=>{var b;const s=(b=l.get(t))==null?void 0:b.el;if(!s||!s.isConnected)return null;const r=s.getBoundingClientRect();if(r.width===0&&r.height===0&&r.left===0&&r.top===0)return null;const d=o.getBoundingClientRect(),h=o.clientWidth>0&&d.width>0?d.width/o.clientWidth:1;return[(r.left-d.left)/h,(r.top-d.top)/h,r.width/h,r.height/h]},lt=(t,s,r)=>{var d;(d=l.get(s))==null||d.screen.insertNode(s,t,r)},ct=(t,s)=>{var r;(r=l.get(t))==null||r.screen.removeNode(t,s)},dt=(t,s,r)=>{var d;(d=l.get(t))==null||d.screen.setContent(t,s,r)},_e=t=>{const{duration:s,delay:r,layer:d,...h}=t,b={};for(const[y,P]of Object.entries(h))b[y]=G(P);return{duration:s,delay:r,layerNum:Kt+(d??44),props:b}},ke=(t,s,r,d)=>{t.el.style.transition=se(s).map(b=>te(b,r,d)).join(", ");const h=b=>{b.target===t.el&&(t.el.style.transition=re(t),t.el.removeEventListener("transitionend",h))};t.el.addEventListener("transitionend",h)},ft=(t,s)=>{const r=l.get(t);if(!r)return;const{duration:d,delay:h,layerNum:b,props:y}=_e(s);r.layers.set(b,{props:y}),ke(r,y,d,h),i.requestAnimationFrame(()=>{r.active.add(b),D(r)})},ut=(t,s)=>{const r=l.get(t);if(!r)return;const{duration:d,delay:h,layerNum:b,props:y}=_e(s);r.layers.set(b,{props:y}),r.active.add(b),D(r),i.requestAnimationFrame(()=>{ke(r,y,d,h),r.active.delete(b),D(r)})},fe=[],pt=(t,s,r,d,h)=>{const b=new FontFace(t,`url(${s})`,r);b.load().then(()=>{n.fonts.add(b),fe.push(b),d()}).catch(h)};let Le=()=>{},Q=0,Z=0;const ht=(t,s)=>{if(!(t===0||s===0)){g(t,s),Q=t,Z=s,x==null||x.applyLayout(t,s);for(const r of M.values())r.applyLayout(t,s);Le(t,s)}},gt=t=>{Le=t},bt=()=>[Q,Z],mt=zt(o),yt=o.style.touchAction;o.style.touchAction="pan-x pan-y";const vt=Ct(o,{scroller:".lc-scrollable,.lc-vlist"});o.addEventListener("pointerdown",I.onSceneTouchDown),o.addEventListener("pointerup",I.onSceneTouchEnd),o.addEventListener("pointercancel",I.onSceneTouchCancel);const wt=At(o),St=()=>{wt(),vt(),o.style.touchAction=yt,o.removeEventListener("pointerdown",I.onSceneTouchDown),o.removeEventListener("pointerup",I.onSceneTouchEnd),o.removeEventListener("pointercancel",I.onSceneTouchCancel),I._destroy(),H.disconnect(),U.clear();for(const t of fe)n.fonts.delete(t);fe.length=0};return{openScreen:qe,closeScreen:Qe,routerOpen:Ze,routerPush:t=>F.push(ie(t)),routerReplace:t=>F.replace(ie(t)),routerPop:t=>F.pop(t),routerHide:xe,routerRestore:()=>F.restore(),updateNode:st,setSourceRect:rt,updateStyle:tt,mergeStyle:nt,setClass:ot,registerFont:pt,fontFormat:"woff2",toast:mt,registerTouchStartEvent:I.registerTouchStartEvent,registerTouchEndEvent:I.registerTouchEndEvent,isButtonPressed:I.isButtonPressed,registerResizeEvent:gt,getDisplaySize:bt,getTextValue:it,getBoundingClientRect:at,insertNode:lt,removeNode:ct,setContent:dt,animateTo:ft,animateFrom:ut,showWidget:Je,hideWidget:et,setTheme:_,...W.api,_onResize:ht,_destroy:St,_setCreator:I.setCreator,_setSafeAreaSpec:m}},fn=async(o,e={})=>{var te;const n=e.engine??"gl-lite",i=e.preloads??new Set,c=o.ownerDocument,l=c.defaultView??window,p=e.ui===!1?void 0:$t(e.fonts,c),w=e.ui===!1?void 0:Dt(e.bootFonts??[],c),E=c.createElement("canvas");E.style.cssText="width:100%;height:100%;touch-action:none;user-select:none;-webkit-user-drag:none;display:none",o.appendChild(E);const M=Wt(Vt,Ne),A=Bt(Ne);let x=()=>{},N;if(n==="defer")N={raycastView(){return 0},_raycastView(){return 0},_onResize(){},_dispose(){}},x=async()=>{const v=o.getBoundingClientRect();E.width=v.width,E.height=v.height;const{createViewerLite:k}=await Re(async()=>{const{createViewerLite:z}=await import("./createViewerLite-CP-WHGLg.js").then(B=>B.c);return{createViewerLite:z}},__vite__mapDeps([0,1]),import.meta.url),C=await k(E,{preloads:i,canvasHost:M});Object.assign(N,C)};else{const v=o.getBoundingClientRect();E.width=v.width,E.height=v.height;const{createViewerLite:k}=await Re(async()=>{const{createViewerLite:C}=await import("./createViewerLite-CP-WHGLg.js").then(z=>z.c);return{createViewerLite:C}},__vite__mapDeps([0,1]),import.meta.url);N=await k(E,{preloads:i,canvasHost:M}),e.methods&&Object.assign(N,e.methods)}const a=e.ui===!1?void 0:await(e.ui??dn)(o,M),f=It({launchUrl:e.launchUrl,onOrientation:e.onOrientation});a==null||a._setCreator(N),e.safeArea&&((te=a==null?void 0:a._setSafeAreaSpec)==null||te.call(a,e.safeArea));const u=new ResizeObserver(([v])=>{N==null||N._onResize(v.contentRect.width,v.contentRect.height),a==null||a._onResize(v.contentRect.width,v.contentRect.height)});u.observe(o);const m=Pt({windows:l===window?[window]:[l,window],root:o,keyboard:e.keyboard!==!1});f.inputKey=m.inputKey,f.inputRead=m.inputRead,f.inputSetPointerLock=m.inputSetPointerLock,f.registerInputEvent=m.registerInputEvent;const _=[];let L=!1;const R=(v,k,C,z)=>{var V,U;if(C.length===0&&Ae(k)){const H=typeof k=="number"||typeof k=="bigint"?`code ${k}`:k instanceof Error?k.message||k.name:String(k),q=[z,H].filter(W=>!!W).filter((W,I,X)=>X.indexOf(W)===I).join(`
161
+ `);console.error(`[le.codes] native engine error — ${q||H}`),(V=v.onError)==null||V.call(v,{message:"Native engine error",detail:q,frames:[],native:!0,stack:k instanceof Error?k.stack:void 0});return}const D=k instanceof Error?k.message:String(k);if(C.length>0){const H=C[0];console.error(`[le.codes] ${D}
162
+ at ${H.source}:${H.line}:${H.column}${H.fn?` (${H.fn})`:""}`)}else console.error(`[le.codes] ${D}`);(U=v.onError)==null||U.call(v,{message:D,frames:C,stack:k instanceof Error?k.stack:void 0})},Y=(v,k)=>{for(let C=_.length-1;C>=0;C--){const z=_[C];if(!z.sourceMap)continue;const B=Ce(v,z.sourceMap);if(B.length>0)return R(z,v,B,k)}if(Ae(v)){const C=_[_.length-1];C&&R(C,v,[],k)}},G=v=>Y(v.error??v.message,v.message),O=v=>Y(v.reason),K=()=>{L||(L=!0,window.addEventListener("error",G),window.addEventListener("unhandledrejection",O))},se=(v,k={})=>{K();const C=Ft(),z=jt(v);let B=!1;const D=()=>{if(B)return;B=!0;const W=_.indexOf(V);W>=0&&_.splice(W,1),C.disposeAll()},V={sourceMap:z,onError:k.onError,dispose:D};_.push(V);const U={_creator:N,_creator2d:void 0,_creatorUI:a,_creatorUtils:f,_creatorCanvas:M.bridge,_creatorNav:A,...C.globals,createEngine:x},H=new Function(...Object.keys(U),v);let q;try{q=H(...Object.values(U))}catch(W){throw R(V,W,z?Ce(W,z):[]),W}return{result:q,dispose:D}},re=()=>{var v;u.disconnect();for(const k of[..._])k.dispose();L&&(window.removeEventListener("error",G),window.removeEventListener("unhandledrejection",O)),N._dispose(),(v=a==null?void 0:a._destroy)==null||v.call(a),E.remove(),f._disposeWebsockets(),f._disposeServices(),f._disposeAppEvents(),m.dispose()};return await p,await w,{_creator:N,_creatorUI:a,_creatorUtils:f,canvasHost:M,run:se,destroy:re}},Xe="overflow:hidden;font-family:var(--fontFamily,'Roboto'),system-ui,-apple-system,sans-serif",un="position:absolute;inset:0;"+Xe,pn=o=>{const e=new Set(o.childNodes),n=o.getAttribute("style"),c=(o.ownerDocument.defaultView??window).getComputedStyle(o).position!=="static";return o.style.cssText=`${n?n+";":""}${c?"":"position:relative;"}${Xe}`,{root:o,remove:()=>{for(const l of Array.from(o.childNodes))e.has(l)||l.remove();n===null?o.removeAttribute("style"):o.setAttribute("style",n)}}},hn=o=>{const n=o.ownerDocument.createElement("iframe");n.style.cssText="border:none;display:block;width:100%;height:100%;background:transparent",n.allow="camera; microphone; autoplay; fullscreen",o.appendChild(n);const i=n.contentDocument,c=i.createElement("style");c.textContent="html,body{margin:0;padding:0;width:100%;height:100%;overflow:hidden;background:transparent}canvas{display:block}",i.head.appendChild(c);const l=i.createElement("div");return l.style.cssText=un,i.body.appendChild(l),{root:l,remove:()=>n.remove()}},mn=async(o,e="",n,i={})=>{var N;const c=e.slice(0,2e3);if(c.includes("// 2d: enable")){const a="Web Lite doesn't support 2D projects — use the regular preview";return console.warn(`[viewer-lite] ${a}`),(N=i.onError)==null||N.call(i,{message:a,frames:[]}),{_creator:void 0,_creatorUI:void 0,_creatorUtils:void 0,uiRoot:void 0,result:void 0,destroy(){}}}const l=new Set,p=c.match(/\/\/ preload: (.+)/);if(p)for(const a of p[1].split(";"))l.add(a);const w=c.includes("// gl: disable")||c.includes("// gl: defer"),{root:E,remove:M}=i.frame===!1?pn(o):hn(o),A=await fn(E,{engine:w?"defer":"gl-lite",fonts:i.fonts,bootFonts:Ht(c),preloads:l,methods:n,safeArea:i.safeArea,onOrientation:i.onOrientation}),x=A.run(e,{onError:i.onError});return{_creator:A._creator,_creatorUI:A._creatorUI,_creatorUtils:A._creatorUtils,uiRoot:E,result:x.result,destroy(){x.dispose(),A.destroy(),M()}}};export{fn as createLiteHost,mn as mountCreatorLite};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./basis-C64VHDVD.js","./worker-Caf-yYEI.js","./draco-BiISTFcR.js"])))=>i.map(i=>d[i]);
2
+ import{_ as o}from"../embed.js";import{G as i}from"./createViewerLite-CP-WHGLg.js";let a=null,n=null,c=null;const u=[171,75,84,88,32,50,48,187,13,10,26,10],m=t=>t.length>=12&&u.every((e,r)=>t[r]===e),g=t=>{if(t.byteLength<80)return!0;const e=new DataView(t),r=e.getUint32(48,!0);return r+15>t.byteLength?!0:e.getUint8(r+14)!==1},h=async(t,e)=>(await l(t),c.parseTexture(e));let s=null;const w=async t=>{s??(s=o(async()=>{const{createBasisManager:r}=await import("./basis-C64VHDVD.js");return{createBasisManager:r}},__vite__mapDeps([0,1]),import.meta.url).then(({createBasisManager:r})=>r(null)).catch(r=>{throw s=null,r}));const e=await(await s).parseTexture(t);if(!e||e.isCompressedTexture)throw new Error("KTX2 did not transcode to an image");return e},p=()=>(a??(a=o(async()=>{const{createDracoManager:t}=await import("./draco-BiISTFcR.js");return{createDracoManager:t}},__vite__mapDeps([2,1]),import.meta.url).then(({createDracoManager:t})=>t()).then(t=>{i.setDracoManager(t)}).catch(t=>{throw a=null,t})),a),l=t=>(n??(n=o(async()=>{const{createBasisManager:e}=await import("./basis-C64VHDVD.js");return{createBasisManager:e}},__vite__mapDeps([0,1]),import.meta.url).then(({createBasisManager:e})=>e(t)).then(e=>{c=e,i.setBasisManager(e)}).catch(e=>{throw n=null,e})),n);export{w as decodeKtx2Image,l as ensureBasisTranscoder,p as ensureDracoDecoder,m as isKtx2Bytes,g as ktx2IsSrgb,h as transcodeKtx2};
@@ -0,0 +1 @@
1
+ import{_ as a,J as _}from"../embed.js";async function m(){const{readFileSync:r}=await a(async()=>{const{readFileSync:t}=await import("./__vite-browser-external-BIHI7g3E.js");return{readFileSync:t}},[],import.meta.url),{fileURLToPath:e}=await a(async()=>{const{fileURLToPath:t}=await import("./__vite-browser-external-BIHI7g3E.js");return{fileURLToPath:t}},[],import.meta.url),o=e(new URL(""+new URL("creator-ui-CzKHLH2Q.wasm",import.meta.url).href,import.meta.url)),i=r(o),n=(await a(async()=>{const{default:t}=await import("./creator-ui-BX5Fvnbt.js");return{default:t}},[],import.meta.url)).default;return _(n,i)}export{m as loadCreatorUiNode};
@@ -0,0 +1,2 @@
1
+ const d=async(a,s,w)=>{const c=await fetch(s).then(e=>{if(!e.ok)throw new Error(`decoder wasm fetch failed (${e.status}) — ${s}`);return e.arrayBuffer()}),p=new Blob([a,`
2
+ ;(`,w.toString(),")();"],{type:"application/javascript"}),n=new Worker(URL.createObjectURL(p));n.postMessage({type:"init",wasmBinary:c},[c]);let f=1;const o=new Map;return n.onmessage=({data:e})=>{const r=o.get(e.id);r&&(o.delete(e.id),e.error?r.reject(new Error(e.error)):r.resolve(e))},n.onerror=e=>{const r=new Error(`decoder worker error: ${e.message??"unknown"}`);for(const t of o.values())t.reject(r);o.clear()},(e,r=[])=>new Promise((t,l)=>{const i=f++;o.set(i,{resolve:t,reject:l}),n.postMessage({id:i,...e},r)})};export{d as s};
@@ -0,0 +1,48 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
6
+ <title>LeCodes example</title>
7
+ <!-- Roboto (the runtime's default UI font) is vendored and registered by the host's
8
+ ensureFontsLoaded before the first layout — no font CDN involved. -->
9
+ <style>
10
+ html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; background: #000; }
11
+ #app { position: relative; width: 100%; height: 100%; font-family: Roboto, system-ui, sans-serif; }
12
+ .embed-error {
13
+ position: absolute; inset: 0; z-index: 10;
14
+ display: flex; align-items: center; justify-content: center;
15
+ padding: 18px; background: rgba(0, 0, 0, 0.88); color: #ff7a6e;
16
+ font: 12.5px/1.6 ui-monospace, Consolas, monospace; white-space: pre-wrap;
17
+ overflow: auto;
18
+ }
19
+ /* Boot/switch spinner. In the HTML (not injected) and on by default, so it
20
+ shows from the first paint — before the runner module even downloads.
21
+ embed.ts toggles `--on` around every bundle run. */
22
+ .embed-loader {
23
+ position: absolute; inset: 0; z-index: 9;
24
+ display: flex; align-items: center; justify-content: center;
25
+ background: #000; opacity: 0; visibility: hidden;
26
+ transition: opacity 0.2s ease, visibility 0s linear 0.2s;
27
+ }
28
+ .embed-loader--on {
29
+ opacity: 1; visibility: visible;
30
+ transition: opacity 0.2s ease;
31
+ }
32
+ .embed-loader__spin {
33
+ width: 34px; height: 34px; border-radius: 50%;
34
+ border: 3px solid rgba(255, 255, 255, 0.16);
35
+ border-top-color: rgba(255, 255, 255, 0.85);
36
+ animation: embed-spin 0.8s linear infinite;
37
+ }
38
+ @keyframes embed-spin {
39
+ to { transform: rotate(360deg); }
40
+ }
41
+ </style>
42
+ <script type="module" crossorigin src="./embed.js"></script>
43
+ </head>
44
+ <body>
45
+ <div id="app"></div>
46
+ <div id="loader" class="embed-loader embed-loader--on"><div class="embed-loader__spin"></div></div>
47
+ </body>
48
+ </html>