var LMV;(()=>{var t={6247:(t,e,r)=>{"use strict";function n(t){return t[t.LMV_APP_NAMESPACE]=t[t.LMV_APP_NAMESPACE]||{}}function i(){const t="undefined"!=typeof window&&null!==window?window:"undefined"!=typeof self&&null!==self?self:r.g;return t.USE_LMV_APP_NAMESPACES?(t.globalProxy||(t.globalProxy=new Proxy({},{get(e,r){let n=t[r];return"function"==typeof n?function(t,e){return new Proxy(e,{get:(t,e)=>t[e],apply:(e,r,n)=>e.call(t||r,...n)})}(t,n):n},set:(e,r,i)=>(Object.prototype.hasOwnProperty.call(t,r)?t[r]!==i&&(t[r]=i):(n(t)[r]=i,Object.defineProperty(t,r,{get:()=>n(t)[r],set:e=>{n(t)[r]=e}})),!0)})),t.globalProxy):t}var s;r.d(e,{mS:()=>i,Xb:()=>f,Gz:()=>u,nr:()=>d,CN:()=>c});const o=i(),a=(o&&o.document,"undefined"!=typeof navigator),u=function(){return!a};function c(){return"undefined"!=typeof window&&("ontouchstart"in window||navigator.maxTouchPoints>0)}a&&navigator.userAgent.match(/Edge|Trident\/7\./),a&&navigator.userAgent.match(/Trident\/7\./);const h=a&&(/ip(ad|hone|od)/.test(navigator.userAgent.toLowerCase())||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||/^ip(ad|hone|od)$/.test(null===(s=navigator.platform)||void 0===s?void 0:s.toLowerCase()));const l=a&&-1!==navigator.userAgent.toLowerCase().indexOf("android");function f(){return!!a&&(h||l)}function d(){if(!a)return!1;var t=navigator.userAgent.toLowerCase();return-1!==t.indexOf("safari")&&-1===t.indexOf("chrome")}},3293:(t,e,r)=>{"use strict";r.d(e,{z:()=>l});var n=r(2759),i=new ArrayBuffer(8),s=new Uint8Array(i),o=new Uint16Array(i),a=new Int32Array(i),u=new Uint32Array(i),c=new Float32Array(i),h=new Float64Array(i);function l(t){this.buffer=t,this.offset=0,this.byteLength=t.length}l.prototype.seek=function(t){this.offset=t},l.prototype.getBytes=function(t){var e=new Uint8Array(this.buffer.buffer,this.offset,t);return this.offset+=t,e},l.prototype.getVarints=function(){var t,e=0,r=0;do{e|=(127&(t=this.buffer[this.offset++]))<32767&&(t|=4294901760),t},l.prototype.getInt32=function(){var t=this.buffer,e=s,r=this.offset;return e[0]=t[r],e[1]=t[r+1],e[2]=t[r+2],e[3]=t[r+3],this.offset+=4,a[0]},l.prototype.getUint32=function(){var t=this.buffer,e=s,r=this.offset;return e[0]=t[r],e[1]=t[r+1],e[2]=t[r+2],e[3]=t[r+3],this.offset+=4,u[0]},l.prototype.getFloat32=function(){var t=this.buffer,e=s,r=this.offset;return e[0]=t[r],e[1]=t[r+1],e[2]=t[r+2],e[3]=t[r+3],this.offset+=4,c[0]},l.prototype.getIndicesArray=function(t,e,r){for(var n=this.buffer,i=new Uint8Array(t,e,2*r),s=this.offset,o=0,a=2*r;o{"use strict";r.d(e,{J:()=>h});var n,i,s,o,a,u=r(3293),c=r(7365);function h(t){var e=this.stream=new u.z(t),r=e.getInt32();this.type=e.getString(r),this.version=e.getInt32(),this.types=null,this.entryOffsets=[];var n=e.offset;e.seek(e.byteLength-8);var i=e.getUint32();this.typesOffset=e.getUint32(),e.seek(this.typesOffset);var s=this.readU32V();this.types=[];for(var o=0;o=this.getEntryCounts())return null;this.stream.seek(this.entryOffsets[t]);var e=this.stream.getUint32();return e>=this.types.length?null:this.types[e]},h.prototype.readPathID=function(){let t,e=this.stream;if(this.version<2){let r=e.getUint16();if(!r)return null;if(e.getUint16(),1==r)return"";t=e.getUint16();for(let n=2;n{"use strict";function n(t,e,r){var n,i,s,o,a,u;for(n="",s=r,i=0;i>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:n+=String.fromCharCode(o);break;case 12:case 13:a=t[e+i++],n+=String.fromCharCode((31&o)<<6|63&a);break;case 14:a=t[e+i++],u=t[e+i++],n+=String.fromCharCode((15&o)<<12|(63&a)<<6|63&u)}return n}function i(t,e,r){var n,i,s,o=r||0;if(i=t.length,e)for(n=0;n=1&&s<=127?e[o++]=s:s>2047?(e[o++]=224|s>>12&15,e[o++]=128|s>>6&63,e[o++]=128|63&s):(e[o++]=192|s>>6&31,e[o++]=128|63&s);else for(n=0;n=1&&s<=127?o++:o+=s>2047?3:2;return o-(r||0)}r.d(e,{$d:()=>c,GB:()=>l,Pd:()=>f,TN:()=>u,WC:()=>i,_f:()=>h,jI:()=>n,xH:()=>a});var s=!0,o=1048576;function a(t,e,r){if(void 0===e&&(e=0),void 0===r&&(r=t.length),s)return r>o?function(t,e,r){var n,i,s,o,a,u,c,h;for(n="",a=[],s=r,u=0,i=0;i>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:a.push(String.fromCharCode(o));break;case 12:case 13:c=t[e+i++],a.push(String.fromCharCode((31&o)<<6|63&c));break;case 14:c=t[e+i++],h=t[e+i++],a.push(String.fromCharCode((15&o)<<12|(63&c)<<6|63&h))}(++u>=32768||i>=s)&&(n+=a.join(""),a.length=0,u=0)}return n}(t,e,r):n(t,e,r);for(var i="",a=e,u=e+r;a=48&&i<=57&&(r=10*r+(i-48)),n++}return r}function l(t,e){for(var r=0,n=0,i=t.length;n=48&&c<=57?(u=10*u+(c-48),a=!0):44==c||93==c?a&&(s[r++]=u,a=!1,u=0):(a=!1,u=0),n++}return s}function f(t){for(var e=0,r=t.length-1,n=0;n{"use strict";r.d(e,{s:()=>n});const n={deduceUVRepetition:function(t){for(var e in t.vblayout)if(0==e.indexOf("uv")&&0!=e.indexOf("uvw"))for(var r=t.vblayout[e].offset,n=t.vbstride,i=t.vb,s=t.vb.length/n,o=0,a=r;o2||u<0||c>2||c<0){t.vblayout[e].isPattern=!0;break}}},computeBounds3D:function(t){var e,r,n,i,s,o=1/0,a=1/0,u=1/0,c=-1/0,h=-1/0,l=-1/0,f=t.vbstride,d=t.vblayout.position.offset,p=t.vb,m=t.vb.length/f;for(e=0,r=d;e(n=p[r])&&(o=n),a>(i=p[r+1])&&(a=i),u>(s=p[r+2])&&(u=s),cx&&(x=A)}b.radius=Math.sqrt(x)},bboxUnion:function(t,e){e.min.xt.max.x&&(t.max.x=e.max.x),e.max.y>t.max.y&&(t.max.y=e.max.y),e.max.z>t.max.z&&(t.max.z=e.max.z)}}},8661:(t,e,r)=>{"use strict";r.d(e,{nW:()=>b,d$:()=>g,xL:()=>v,uq:()=>y});var n=2*Math.PI,i=[0,1,3,0,3,2];function s(t,e,r,n){var i=e||65536;this.FULL_COUNT=0|(r||32767),this.useInstancing=t,this.useCompactBuffers=n,this.stride=10,this.allocVcount=4*(this.useInstancing?i/4:i),this.vb=new ArrayBuffer(this.stride*this.allocVcount),this.vbf=new Float32Array(this.vb),this.vbi=new Int32Array(this.vb),this.ib=this.useInstancing?null:new Uint16Array(i),this.minLineWidth=Number.MAX_VALUE,this.reset(0)}s.FORCE_BUTT_CAPS_FOR_TESTING=!1,s.prototype.reset=function(t){this.vcount=t,this.icount=0,this.minx=this.miny=1/0,this.maxx=this.maxy=-1/0,this.dbIds={},this.lastDbId=null,this.colors={},this.numEllipticals=0,this.numCirculars=0,this.numTriangleGeoms=0,this.numMiterLines=0,this.hasLineStyles=!1,this.changeTracking={},this.stride=10},s.prototype.expandStride=function(){var t=this.stride;if(!(t>=12)){for(var e=this.stride+2,r=new ArrayBuffer(e*this.allocVcount),n=new Uint8Array(this.vb),i=new Uint8Array(r),s=0,o=this.vcount;sthis.maxx&&(this.maxx=t),ethis.maxy&&(this.maxy=e)},s.prototype.addToBoundsWithLineWidth=function(t,e,r,n,i){if(i<0)return this.addToBounds(t,e),void this.addToBounds(r,n);const s=[Math.min(t,r)-.5*i,Math.max(t,r)+.5*i],o=[Math.min(e,n)-.5*i,Math.max(e,n)+.5*i];this.addToBounds(s[0],o[0]),this.addToBounds(s[1],o[1])};var o=new Int32Array(1);function a(t){return o[0]=t,o[0]}s.prototype.trackChanges=function(t,e,r,n,i,s){if(r!==this.lastDbId&&(this.dbIds[a(r)]=1,this.lastDbId=r),s&&(this.hasLineStyles=!0),this.useCompactBuffers){var o=this.changeTracking;u("geomType",t),u("color",e),u("dbId",r),u("layerId",n),u("viewportId",i),u("linePattern",s),this.colors[a(e)]=1}function u(e,r){void 0===o[e]?o[e]=t:o[e]===r&&(o[e+"Varies"]=!0)}},s.prototype.setCommonVertexAttribs=function(t,e,r,n,i,s,o,a){this.trackChanges(r,n,i,s,o,a),e&=255,r&=255,a&=255,s&=65535,o&=65535,this.vbi[t+8]=e|r<<8|a<<16,this.vbi[t+6]=n,this.vbi[t+7]=i,this.vbi[t+9]=s|o<<16},s.prototype.addVertexTriangleGeom=function(t,e,r,n,i,s,o,a,u,c){for(var h=this.vcount,l=this.vbf,f=this.useInstancing?1:4,d=0;d=0&&a>0&&i>0&&(this.minLineWidth=Math.min(this.minLineWidth,a)),s.FORCE_BUTT_CAPS_FOR_TESTING&&(d=!0,p=!0);var v=1;d&&p?v=8:d?v=9:p&&(v=10);for(var y=this.useInstancing?1:4,b=0;b=0&&u>0&&(this.minLineWidth=Math.min(this.minLineWidth,u));for(var g=this.useInstancing?1:4,v=0;v6&&void 0!==arguments[6]?arguments[6]:0;if(!this.useInstancing){var a=this.vcount,u=this.stride*a,c=this.vbf;return c[u]=t,c[u+1]=e,this.setCommonVertexAttribs(u,0,o,r,n,i,s,0),this.vcount++,a}},s.prototype.addVertexPolytriangle=function(t,e,r,n,i,s){this.useInstancing||(this.addVertex(t,e,r,n,i,s),this.addToBounds(t,e))},s.prototype.addVertexMSDFPolytriangle=function(t,e,r,n,i,s,o,a){this.addVertexTexPolytriangle(t,e,r,n,i,s,o,a,6)},s.prototype.addIndices=function(t,e){if(!this.useInstancing){var r=this.ib,n=this.icount;if(n+t.length>=r.length){var i=new Uint16Array(2*Math.max(t.length,r.length));for(let t=0;t1e-4&&Math.abs(m-n)>1e-4){var g=t+s*Math.cos(r),v=e+o*Math.sin(r);this.addSegment(g,v,g,v,0,c,h,l,f,d);var y=t+s*Math.cos(i),b=e+o*Math.sin(i);this.addSegment(y,b,y,b,0,c,h,l,f,d)}else this.addToBoundsWithLineWidth(t-s,e-o,t+s,e+o,c);const a=33554431;var x=this.addVertexLine(t,e,0,1e-4,0,0,a,l,f,d);this.finalizeQuad(x)}var w=this.addVertexArc(t,e,r,i,s,o,a,c,h,l,f,d);this.finalizeQuad(w)},s.prototype.addTexturedQuad=function(t,e,r,n,i,s,o,a,u){var c=this.addVertexTexQuad(t,e,r,n,i,s,o,a,u);this.finalizeQuad(c);var h=.5*Math.cos(i),l=.5*Math.sin(i),f=Math.abs(r*h)+Math.abs(n*l),d=Math.abs(r*l)+Math.abs(n*h);this.addToBounds(t-f,e-d),this.addToBounds(t+f,e+d)},s.prototype.addVertexImagePolytriangle=function(t,e,r,n,i,s,o,a){return this.addVertexTexPolytriangle(t,e,r,n,i,s,o,a,7)},s.prototype.addVertexTexPolytriangle=function(t,e,r,n,i,s,o,a,u){if(this.useInstancing)return;let c=this.vcount,h=this.vbf;this.addVertex(t,e,i,s,o,a,u),h[c*this.stride+2]=r,h[c*this.stride+3]=n,this.addToBounds(t,e)},s.prototype.isFull=function(t){t=t||3;var e=this.useInstancing?4:1;return this.vcount*e+t>this.FULL_COUNT},s.prototype.makeCompactVertexLayout=function(){var t=Object.keys(this.colors),e=Object.keys(this.dbIds);if(10!==this.stride)return null;var r=t.length+e.length;if(t.length+e.length>65536)return null;var n=new Int32Array(r+1);n[0]=0;var i=1;for(let e=0;e>8&255){case 0:a[w]=d(this.vbf[b]),a[w+1]=p(this.vbf[b+1]);break;case 1:case 8:case 9:case 10:a[w]=d(this.vbf[b]),a[w+1]=p(this.vbf[b+1]),a[w+2]=g(this.vbf[b+2]),a[w+3]=m(this.vbf[b+3]),a[w+4]=v(this.vbf[b+4]);break;case 2:a[w]=d(this.vbf[b]),a[w+1]=p(this.vbf[b+1]),a[w+2]=g(this.vbf[b+2]),a[w+3]=g(this.vbf[b+3]),a[w+4]=v(this.vbf[b+4]),a[w+5]=m(this.vbf[b+5]);break;case 3:case 11:break;case 4:a[w]=d(this.vbf[b]),a[w+1]=p(this.vbf[b+1]),a[w+2]=g(this.vbf[b+2]),a[w+3]=m(this.vbf[b+3]),a[w+4]=m(this.vbf[b+4]);break;case 5:a[w]=d(this.vbf[b]),a[w+1]=p(this.vbf[b+1]),a[w+2]=d(this.vbf[b+2]),a[w+3]=p(this.vbf[b+3]),a[w+4]=d(this.vbf[b+4]),a[w+5]=p(this.vbf[b+5]);break;default:console.error("Unknown geometry type")}a[w+6]=this.colors[this.vbi[b+6]]||0,a[w+7]=this.dbIds[this.vbi[b+7]]||0,o[x+4]=this.vbi[b+8],o[x+5]=this.vbi[b+9]}var _={};_.vb=new Float32Array(s),_.vbstride=6;var I=this.useInstancing?1:0;return _.vblayout={fields1:{offset:0,itemSize:2,bytesPerItem:2,divisor:I,normalized:!0},fields2:{offset:1,itemSize:4,bytesPerItem:2,divisor:I,normalized:!0},uvIdColor:{offset:3,itemSize:2,bytesPerItem:2,divisor:I,normalized:!1},flags4b:{offset:4,itemSize:4,bytesPerItem:1,divisor:I,normalized:!1},layerVp4b:{offset:5,itemSize:4,bytesPerItem:1,divisor:I,normalized:!1}},_.unpackXform={x:u,y:c,z:h,w:l},_.texData=n,_},s.prototype.makeWideVertexLayout=function(){var t={};t.vb=new Float32Array(this.vb.slice(0,this.vcount*this.stride*4)),t.vbstride=this.stride;var e=this.useInstancing?1:0;return t.vblayout={fields1:{offset:0,itemSize:2,bytesPerItem:4,divisor:e,normalized:!1},fields2:{offset:2,itemSize:4,bytesPerItem:4,divisor:e,normalized:!1},color4b:{offset:6,itemSize:4,bytesPerItem:1,divisor:e,normalized:!0},dbId4b:{offset:7,itemSize:4,bytesPerItem:1,divisor:e,normalized:!1},flags4b:{offset:8,itemSize:4,bytesPerItem:1,divisor:e,normalized:!1},layerVp4b:{offset:9,itemSize:4,bytesPerItem:1,divisor:e,normalized:!1}},t.vblayout.extraParams={offset:this.stride-2,itemSize:2,bytesPerItem:4,divisor:e,normalized:!1},t},s.prototype.toMesh=function(){var t=null;if(this.useCompactBuffers&&(t=this.makeCompactVertexLayout()),t||(t=this.makeWideVertexLayout()),this.useInstancing){t.numInstances=this.vcount;var e=new Int32Array([0,1,2,3]);t.vblayout.instFlags4b={offset:0,itemSize:4,bytesPerItem:1,divisor:0,normalized:!1},t.vblayout.instFlags4b.array=e.buffer,t.indices=new Uint16Array(i)}else t.indices=new Uint16Array(this.ib.buffer.slice(0,2*this.icount));t.dbIds=this.dbIds;var r=this.maxx-this.minx,n=this.maxy-this.miny,s=Math.max(r,n);return t.boundingBox={min:{x:this.minx,y:this.miny,z:.001*-s},max:{x:this.maxx,y:this.maxy,z:.001*s}},t.boundingSphere={center:{x:.5*(this.minx+this.maxx),y:.5*(this.miny+this.maxy),z:0},radius:.5*Math.sqrt(r*r+n*n)},t};var u=function(t,e){function r(){function r(t,e){return Math.abs(t-e)<.001}r(t,0)&&(t=0),r(e,0)&&(e=0),r(t,n)&&(t=n),r(e,n)&&(e=n)}if(r(),t>e)for(;t>n;)t-=n,e-=n;else for(;e>n;)t-=n,e-=n;return r(),t<0&&e>0&&(t+=n),{start:t,end:e}},c=r(1706),h=r(6118),l=r(2816),f=r(3293),d=r(6916),p=r(7480),m=16383,g={dt_object:0,dt_void:1,dt_byte:2,dt_int:3,dt_float:4,dt_double:5,dt_varint:6,dt_point_varint:7,dt_byte_array:32,dt_int_array:33,dt_float_array:34,dt_double_array:35,dt_varint_array:36,dt_point_varint_array:37,dt_arc:38,dt_circle:39,dt_circular_arc:40,dt_string:63,dt_last_data_type:127},v={st_object_member:0,st_fill:1,st_fill_off:2,st_clip_off:3,st_layer:4,st_link:5,st_line_weight:6,st_miter_angle:7,st_miter_length:8,st_line_pattern_ref:9,st_back_color:10,st_color:11,st_markup:12,st_object_id:13,st_markup_id:14,st_reset_rel_offset:15,st_font_ref:16,st_begin_object:32,st_clip:33,st_line_caps:34,st_line_join:35,st_line_pattern_def:36,st_font_def:37,st_viewport:38,st_sheet:42,st_arc:43,st_polyline:44,st_raster:45,st_text:46,st_polytriangle:47,st_dot:48,st_end_object:63,st_last_semantic_type:127};function y(t){return 1&t?-(t>>>1):t>>>1}function b(t,e,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(this.metadata=t,this.scaleX=1,this.scaleY=1,this.bbox={min:{x:0,y:0,z:0},max:{x:0,y:0,z:0}},this.is2d=!0,this.layersMap={},this.fontDefs={},this.fontCount=0,this.fontId=0,this.manifestAvailable=!1,this.geomMetricsSum=0,this.objectMemberQueue=[],this.propertydb={attrs:[],avs:[],ids:[],values:[],offsets:[],viewables:[]},t){var i=t.page_dimensions;this.paperWidth=i.page_width,this.paperHeight=i.page_height,this.scaleX=this.paperWidth/i.plot_width,this.scaleY=this.paperHeight/i.plot_height,this.hidePaper=i.hide_paper;var o=this.paperWidth,a=this.paperHeight;this.bbox.max.x=o,this.bbox.max.y=a;var u=t.page_dimensions||{};if(isFinite(u.paper_rotation)&&0!==u.paper_rotation){var h=u.paper_rotation*Math.PI/180,l=Math.cos(h),f=Math.sin(h),d=o*l,p=o*f,g=-a*f,v=a*l;this.bbox.min.x=Math.min(0,d,g,d+g),this.bbox.max.x=Math.max(0,d,g,d+g),this.bbox.min.y=Math.min(0,p,v,p+v),this.bbox.max.y=Math.max(0,p,v,p+v)}isFinite(u.paper_offset_x)&&0!==u.paper_offset_x&&(this.bbox.min.x+=u.paper_offset_x,this.bbox.max.x+=u.paper_offset_x),isFinite(u.paper_offset_y)&&0!==u.paper_offset_y&&(this.bbox.min.y+=u.paper_offset_y,this.bbox.max.y+=u.paper_offset_y);var y=0;for(var b in this.layersMap[0]=y++,t.layers){var x=parseInt(b);this.layersMap[x]=y++}if(this.layerCount=y,this.createLayerGroups(t.layers),t.geom_metrics){var w=Object.keys(t.geom_metrics).map((function(e){return t.geom_metrics[e]}));this.geomMetricsSum=w.reduce(((t,e)=>t+e))}}this.hidePaper=this.hidePaper||n.modelSpace,this.noShadow=!!n.noShadow,this.hasPageShadow=!1,this.opCount=0,this.excludeTextGeometry=n.excludeTextGeometry,this.extendStringsFetching=n.extendStringsFetching,this.fontFaces=[],this.fontFamilies=[],this.viewports=[{}],this.currentVpId=0,this.viewports[0].geom_metrics=this.currentGeomMetrics={arcs:0,circles:0,circ_arcs:0,viewports:0,clips:0,colors:0,db_ids:0,dots:0,fills:0,layers:0,line_caps:0,line_joins:0,line_patterns:0,line_pat_refs:0,plines:0,pline_points:0,line_weights:0,links:0,miters:0,ptris:0,ptri_indices:0,ptri_points:0,rasters:0,texts:0,strings:[]},this.clips=[0],this.strings=[],this.stringDbIds=[],this.stringBoxes=[],this.extendStringsFetching&&(this.stringCharWidths=[],this.stringAngles=[],this.stringPositions=[],this.stringHeights=[]),this.currentStringNumber=-1,this.currentStringBox=new c.K,this.linkBoxes=[],this.currentLinkBox=new c.K,this.objectNumber=0,this.currentFakeId=-2,this.imageNumber=0,this.linkNumber=0,this.maxObjectNumber=0,this.objectStack=[],this.objectNameStack=[],this.parseObjState={polyTriangle:{},viewport:{},clip:{},raster:{},text:{},fontDef:{},uknown:{}},this.layer=0,this.bgColor="number"==typeof n.bgColor?n.bgColor:4294967295,this.contrastColor=this.color=this.fillColor=4278190080,this.hidePaper&&(this.contrastColor=4294967040),this.isMobile=n&&!!n.isMobile;var _=this.isMobile,I=this.isMobile;if(this.max_vcount=this.isMobile?m:void 0,this.currentVbb=new s(_,void 0,this.max_vcount,I),this.meshes=[],this.numCircles=this.numEllipses=this.numPolylines=this.numLineSegs=0,this.numPolytriangles=this.numTriangles=0,this.error=!1,this.offsetX=0,this.offsetY=0,e){this.manifestAvailable=!0,this.imageId2URI={};for(var A=e.assets,O=0,S=A.length;O>16&255,r=t>>8&255,n=255&t;return(t>>24&255)<<24|(e=255-e)<<16|(r=255-r)<<8|255-n},b.prototype.mapColor=function(t,e){if(!this.hidePaper||0!==this.bgColor)return t;var r=255&t;return r<127||r===(65280&t)>>8&&r===(16711680&t)>>16&&e&&(t&=1442840575),t},b.prototype.parsePointPositions=function(){var t=this.stream.getVarints(),e=this.stream.getVarints();return t=y(t),e=y(e),t+=this.offsetX,e+=this.offsetY,this.offsetX=t,this.offsetY=e,[this.tx(t),this.ty(e)]},b.prototype.parserAssert=function(t,e,r){return t!=e&&(d.vF.warn("Expect "+e+"; actual type is "+t+"; in function "+r),this.error=!0,!0)},b.prototype.unhandledTypeWarning=function(t,e){d.vF.warn("Unhandled semantic type : "+e+" in function "+t)},b.prototype.parseObject=function(){var t=this.stream.getVarints();switch(this.objectStack.push(t),t){case v.st_sheet:this.objectNameStack.push("sheet"),this.objectMemberQueue.unshift("paperColor");break;case v.st_viewport:this.objectNameStack.push("viewport"),this.objectMemberQueue.unshift("units","transform");break;case v.st_clip:this.objectNameStack.push("clip"),this.objectMemberQueue.unshift("contourCounts","points","indices");break;case v.st_polytriangle:this.objectNameStack.push("polyTriangle"),this.objectMemberQueue.unshift("points","indices","colors");break;case v.st_raster:this.objectNameStack.push("raster"),this.objectMemberQueue.unshift("position","width","height","imageId");break;case v.st_text:this.currentStringNumber=this.strings.length,0===this.objectNumber&&(this.objectNumber=this.currentFakeId--),this.currentStringBox.makeEmpty(),this.objectNameStack.push("text"),this.objectMemberQueue.unshift("string","position","height","widthScale","rotation","oblique","charWidths");break;case v.st_font_def:this.objectNameStack.push("fontDef"),this.objectMemberQueue.unshift("name","fullName","flags","spacing","panose");break;case v.st_end_object:if(this.objectStack.pop(),this.objectStack.length){switch(this.objectStack.pop()){case v.st_polytriangle:this.actOnPolyTriangle();break;case v.st_viewport:this.actOnViewport();break;case v.st_clip:this.actOnClip();break;case v.st_raster:this.actOnRaster();break;case v.st_text:this.actOnText();break;case v.st_font_def:this.actOnFontDef()}var e=this.objectNameStack.pop(),r=this.parseObjState[e];for(var n in r)r[n]=null}else this.parserAssert(0,1,"parseEndObject (Stack Empty)");this.objectMemberQueue.length=0;break;default:this.objectNameStack.push("unknown"),this.error=!0,this.unhandledTypeWarning("parseObject",t)}},b.prototype.initSheet=function(t){if(!this.hidePaper&&(this.bgColor=t,this.metadata)){var e=this.paperWidth,r=this.paperHeight,n={x:0,y:0},i={x:e,y:0},s={x:0,y:r},o=this.metadata.page_dimensions||{};if(isFinite(o.paper_rotation)&&0!==o.paper_rotation){var a=o.paper_rotation*Math.PI/180,u=Math.cos(a),c=Math.sin(a);i.y=e*c,i.x=e*u,s.x=-r*c,s.y=r*u}isFinite(o.paper_offset_x)&&0!==o.paper_offset_x&&(n.x=o.paper_offset_x),isFinite(o.paper_offset_y)&&0!==o.paper_offset_y&&(n.y=o.paper_offset_y);var h=this.currentVbb,l=[n.x,n.y,n.x+i.x,n.y+i.y,n.x+i.x+s.x,n.y+i.y+s.y,n.x+s.x,n.y+s.y],f=[t,t,t,t],d=[0,1,2,0,2,3];if(!this.noShadow){var p=.0075*e,m={x:i.x*p/e,y:i.y*p/e},g={x:s.x*p/r,y:s.y*p/r},v={x:n.x+m.x,y:n.y+m.y},y={x:n.x+i.x,y:n.y+i.y},b=4283782485;l=l.concat([v.x-g.x,v.y-g.y,v.x-g.x+i.x,v.y-g.y+i.y,v.x+i.x,v.y+i.y,v.x,v.y,y.x,y.y,y.x+m.x,y.y+m.y,y.x+m.x-g.x+s.x,y.y+m.y-g.y+s.y,y.x-g.x+s.x,y.y-g.y+s.y]),f=f.concat([b,b,b,b,b,b,b,b]),d=d.concat([4,5,6,4,6,7,8,9,10,8,10,11]),this.hasPageShadow=!0}this.addPolyTriangle(l,f,d,4294967295,-1,0,!1),h.addSegment(n.x,n.y,n.x+i.x,n.y+i.y,0,1e-6,4278190080,-1,0,this.currentVpId),h.addSegment(n.x+i.x,n.y+i.y,n.x+i.x+s.x,n.y+i.y+s.y,0,1e-6,4278190080,-1,0,this.currentVpId),h.addSegment(n.x+i.x+s.x,n.y+i.y+s.y,n.x+s.x,n.y+s.y,0,1e-6,4278190080,-1,0,this.currentVpId),h.addSegment(n.x+s.x,n.y+s.y,n.x,n.y,0,1e-6,4278190080,-1,0,this.currentVpId)}},b.prototype.setObjectMember=function(t){if(!this.objectMemberQueue.length)return d.vF.warn("Unexpected object member. "+t+" on object "+this.objectNameStack[this.objectNameStack.length-1]),!1;var e=this.objectMemberQueue.shift(),r=this.objectNameStack[this.objectNameStack.length-1];return"sheet"==r&&"paperColor"==e?(this.initSheet(t),!0):!!r&&(this.parseObjState[r][e]=t,!0)},b.prototype.parseString=function(){var t=this.stream,e=t.getVarints(),r=t.getVarints(),n=t.getString(r);if(e===v.st_object_member){if(this.setObjectMember(n))return}else d.vF.info("Unexpected opcode semantic type for string.");return n},b.prototype.actOnFontDef=function(){var t=this.parseObjState.fontDef;this.fontDefs[++this.fontCount]=t,this.fontId=this.fontCount},b.prototype.parsePoint=function(){var t=this.stream.getVarints(),e=this.parsePointPositions();if(t===v.st_object_member){if(this.setObjectMember(e))return}else d.vF.info("Unexpected opcode semantic type for point.");return e},b.prototype.parsePointsArray=function(){var t=this.stream,e=t.getVarints(),r=t.getVarints();if(r){r/=2;for(var n,i=[],s=0;se){var r=t;t=e,e=r}if(u[t]){var n=u[t],i=n.lastIndexOf(e);-1==i?n.push(e):n[i]=-1}else u[t]=[e]}function l(r,o){if(r>o){var h=r;r=o,o=h}var l=u[r];l&&-1!=l.indexOf(o)&&(a.flushBuffer(4),a.currentVbb.addSegment(t[2*r],t[2*r+1],t[2*o],t[2*o+1],0,c,a.mapColor(e?e[r]:n,!0),i,s,a.currentVpId),e&&e[r]!=e[o]&&d.vF.warn("Gouraud triangle encountered. Will have incorrect antialiasing."))}if(this.objectStack[this.objectStack.length-1]==v.st_text&&(c=-.5),o){u=new Array(t.length/2);for(let t=0,e=r.length;t1)for(var h=0;h{const e=new Array(256);for(let t=0;t<256;t++){let r=t.toString(16);1===r.length&&(r="0"+r),e[t]=r}var r=new Array(20),n=new Array(10);t.exports={binToPackedString:function(t,e,r){for(var i=20===r?n:[],s=0;s>8&255]}return n.join("")},packedToBin:function(t,e,r){for(let n=0;n>8&255}}}},3314:(t,e,r)=>{const{WebSocketBase:n,STATE:i}=r(4318),s=r(5982).packedToBin,o=r(5982).binToPackedString;class a extends n{clone(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const e=new a(this.url,this.queryParams,this.headers,this.onResourcesReceived,this.onResourceFailed,this.onConnectionFailed);return this.authorizeUrns.forEach((r=>{e.addAuthorizeUrn(r,t)})),e}_decodeMessage(t){const e=new Int32Array(t,0,3);if(827019343!==e[0])return void console.error("Invalid message format",e[0].toString(16),e[1],t);const r=String.fromCharCode(255&e[1]),n=e[2],i=new Int32Array(t,12,n),s=new Uint8Array(t,12+4*n),a=[],u=[],c=[];for(let t=0;t{const n=r(169),i="undefined"!=typeof navigator,s=function(){return!i},o=Object.freeze({CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3});t.exports.WebSocketBase=class{constructor(t,e,r,i,s,o){this.ws=null,this.url=t,this.queryParams=e,this.headers=r,this.numRequestsSent=0,this.numRequestsReceived=0,this.authorizeUrns=new Set,this._retriedOpen=0,this.retryEvent=null,this.hasPermanentError=void 0===n||!this.url,this.lastError=null,this.lastErrorNumInFlight=null,this.onResourcesReceived=i,this.onResourceFailed=s,this.onConnectionFailed=o,this._pendingSends=new Map,this._numPendingSends=0,this.inFlightRequests=new Map,this.msgBuffer=new Uint8Array(201)}addAuthorizeUrn(t){var e;let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.authorizeUrns.has(t)||this.hasPermanentError||(r&&this._openWebSocket(),(null===(e=this.ws)||void 0===e?void 0:e.readyState)===o.OPEN&&this.ws.send("/auth/"+t),this.authorizeUrns.add(t))}_openWebSocket(){if(this.ws||this.hasPermanentError)return;let t=this.url.replace("https:","wss:").replace("http:","ws:").replace(":7124",":7125");this.queryParams&&(t+="?"+this.queryParams),this.ws=new n(t,void 0,s()?{headers:this.headers}:{}),this.ws.onopen=()=>{this.accountIdSent=null,this.ws.binaryType="arraybuffer",s()||this.ws.send("/headers/"+JSON.stringify(this.headers)),this.ws.send("/options/"+JSON.stringify({batch_responses:!0,report_errors:!0}));for(const t of this.authorizeUrns)this.ws.send("/auth/"+t)},this.ws.onmessage=t=>this._decodeMessage(t.data),this.ws.onclose=t=>{1e3!==t.code||0!==this.inFlightRequests.size?(console.warn("Abnormal socket close.","pending sends:",this._numPendingSends,"in flight",this.inFlightRequests.size,"event:",t),this._pendingSends=new Map,this._numPendingSends=0,this._retriedOpen<3?(console.warn("Retrying"),this._retriedOpen++,this.retryEvent=setTimeout((()=>{this.retryEvent=null,this.ws=null,this._openWebSocket()}),2e3)):(console.error("Too many WebSocket failures. Giving up."),this.hasPermanentError=!0,this.lastError=t,this.lastErrorNumInFlight=this.inFlightRequests.size),this.onConnectionFailed(this.inFlightRequests),this.inFlightRequests.clear()):this.closeWebSocket()}}closeWebSocket(){if(!this.ws)return;console.assert(0===this.inFlightRequests.size,"closeWebSocket called even though there are requests in flight"),this.retryEvent&&(clearTimeout(this.retryEvent),this.retryEvent=null),this.ws.onclose=null;const t=this.ws;this.ws.readyState===o.CONNECTING?this.ws.onopen=()=>t.close(1e3,"no more work expected"):this.ws.close(1e3,"no more work expected"),this.ws=null}_decodeMessage(t){throw new Error("Implement!")}_flushSendQueue(){throw new Error("Implement!")}requestResource(){throw new Error("Implement!")}},t.exports.STATE=o},7480:(t,e,r)=>{"use strict";r.d(e,{$f:()=>i,tG:()=>n});const n={UNKNOWN_FAILURE:1,BAD_DATA:2,NETWORK_FAILURE:3,NETWORK_ACCESS_DENIED:4,NETWORK_FILE_NOT_FOUND:5,NETWORK_SERVER_ERROR:6,NETWORK_UNHANDLED_RESPONSE_CODE:7,BROWSER_WEBGL_NOT_SUPPORTED:8,BAD_DATA_NO_VIEWABLE_CONTENT:9,BROWSER_WEBGL_DISABLED:10,BAD_DATA_MODEL_IS_EMPTY:11,UNSUPORTED_FILE_EXTENSION:13,VIEWER_INTERNAL_ERROR:14,WEBGL_LOST_CONTEXT:15,LOAD_CANCELED:16};function i(t){return"ErrorCode:"+t+"."}},1136:(t,e,r)=>{"use strict";r.d(e,{PG:()=>h}),r(4423),r(9479),r(8845),r(7656),r(5105),r(7467),r(586),r(1517),r(3777),r(4190),r(2359),r(6097),r(9172),r(7019),r(7273),r(1723),r(7415),r(9929),r(7583),r(5122),r(6385),r(230),r(7268),r(9733),r(8179),r(456),r(4017),r(9310),r(3062),r(6369),r(5637),r(2848),r(4842),r(4746),r(3454),r(6660),r(5941),r(2101),r(2917),r(7628),r(5186),r(2978),r(2527),r(9852),r(2376),r(617),r(3067),r(6820),r(8288),r(5509),r(5223),r(321),r(1927),r(1632),r(4377),r(9522),r(6771),r(2516),r(8931),r(2514),r(5694),r(2774),r(3283),r(9536),r(1926),r(4483),r(6215),r(8898),r(4176),r(3275),r(2793),r(7208),r(7348),r(6957),r(9732),r(3742),r(6422),r(2451),r(6270),r(9848);var n=r(6916),i=r(7480),s=r(2759),o=r(577),a=r(6247),u=r(4406),c=r(9861);let h={WORKER_REGISTER_FILE_PORT:"REGISTER_FILE_PORT",WORKER_READ_FILE:"READ_FILE"};var l=!1;function f(t){var e=t.split("/");if(0==e.length)return t;for(var r=[],n=0;n=200&&t.statusCode<400),s=t;!r&&function(t,e){return!!("gzip"===t.headers["content-encoding"]||e.endsWith(".json.gz")||e.endsWith("FragmentList.pack")||e.endsWith("LightList.bin")||e.endsWith("CameraList.bin")||e.endsWith("CameraDefinitions.bin")||e.endsWith("LightDefinitions.bin"))}(t,b.pathname)&&(s=t.pipe(e.createGunzip())),"json"!==v.responseType&&"text"!==v.responseType&&v.responseType||s.setEncoding("utf8");var o=[],a=(Buffer.allocUnsafe(65536),0);s.on("data",(function(t){o.push(t),v.ondata&&v.ondata(t)})),s.on("end",(function(){if(t.statusCode>=200&&t.statusCode<400){if("json"===v.responseType){var r=JSON.parse(o.join(""));return void m(r)}if("text"===v.responseType||""===v.responseType){var s=o.join("");return void m(s)}var u=Buffer.concat(o);if(31===u[0]&&139===u[1]){n.vF.warn("An LMV resource ("+p+") was double compressed, or Content-Encoding header missing");try{u=e.gunzipSync(u),a=u.length}catch(t){g(i.tG.BAD_DATA,"Malformed data received when requesting file",{url:p,exception:t.toString(),stack:t.stack})}}200===_.status&&v.range&&(u=new Uint8Array(u,v.range.min,v.range.max-v.range.min)),m(u,a)}else g&&g(t.statusCode,t.statusMessage,{url:p})}))}));_.on("error",(function(t){g&&g(t.code,t.message,{url:p})})),v.postData&&_.write(v.postData),_.end()}else!function(r,n,i,s){function o(t){if("json"===s.responseType)try{return JSON.parse(t.toString("utf8"))}catch(t){i(t)}return t}0===r.indexOf("file://")&&(r=r.substr(7)),t.readFile(r,(function(t,a){t?i(0,0,{httpStatusText:t,url:r}):31===a[0]&&139===a[1]?e.gunzip(a,null,(function(t,e){t?i(0,0,{httpStatusText:t,url:r}):(e=o(e),s.ondata&&s.ondata(e),n(e))})):(a=o(a),s.ondata&&s.ondata(a),n(a))}))}(p,m,g,v)}}();else{var p=new(r(1436));p.max=25;var m={},g={},v={};h.registerProtocolPort=function(t,e){/^(http(s)?|file):/gi.test(t)?console.warn("http(s) or file protocol were not allowed to be handled"):e?(m[t]=e,e.onmessage=function(t){var e=t.data.url;if(g[e]){var r=g[e];if(t.data.error)r.onFailureWrapped(i.tG.BAD_DATA,"Malformed data received when requesting file",{url:e,exception:t.data.error.message,stack:t.data.error.stack});else{var n=t.data.buffer;if(g[e]=void 0,31===n[0]&&139===n[1]&&e.match(/(.f2d|.gz)$/gi))try{n=(0,c.Wt)(n),r.options&&r.options.ondata&&r.options.ondata(n),r.onSuccessWrapped(n)}catch(t){r.onFailureWrapped(i.tG.BAD_DATA,"Malformed data received when requesting file",{url:e,exception:t.toString(),stack:t.stack})}else r.onSuccessWrapped(n)}}else if(v[e]){var s=[];t.data&&t.data.buffer&&t.data.buffer.buffer instanceof ArrayBuffer&&s.push(t.data.buffer.buffer),v[e].postMessage(t.data,s),v[e]=void 0}}):m[t]&&m[t]instanceof MessagePort&&(m[t].onmessage=void 0,m[t]=void 0)},h.handlerProtocol=function(t,e,r,n,i){var s=m[t];g[e]={onSuccessWrapped:r,onFailureWrapped:n,options:i},s.postMessage({operation:h.WORKER_READ_FILE,url:e})},h.forwardProtocolHandlerToWorker=function(t){var e={},r=new MessageChannel;for(var n in r.port1.onmessage=function(t){var e=new URL(t.data.url);m[e.protocol].postMessage(t.data),v[e]=r.port1},m)m[n]instanceof MessagePort&&(e[n]=r.port2);t.doOperation({operation:h.WORKER_REGISTER_FILE_PORT,protocolPortMap:e},[r.port2])},h.rawGet=function(t,e,r,i,s,o){p.go((a=>{let u=function(){a();for(var t=arguments.length,e=new Array(t),r=0;r=500);if((arguments.length<=2?void 0:arguments[2]).aborted&&(s=!1),s){const s=arguments.length<=3?void 0:arguments[3];let a=100,l=5,f=!1;if(429!==i&&503!==i||null==s||!s.getResponseHeader("Retry-After")?0===i&&(f=3,l=2):f=s.getResponseHeader("Retry-After"),f){const t=Number(f);a=!isNaN(t)&&1e3*t||Date.parse(f)-(new Date).getTime(),a=a>100?a:100}h._retryRequest(t,e,r,o,a,l).then((t=>{n.vF.warn(`request ${r} successful after retries.`),c(...t)})).catch((t=>{n.vF.warn(`request ${r} unsuccessful after retries.`),u(...t)}))}else u(...arguments)}),o)}}))},h._retryRequest=function(t,e,r,i,s,o){const a={delayFirstAttempt:!0,startingDelay:s,numOfAttempts:4,retry:(t,e)=>{let[r,i,{url:s}]=t;return n.vF.warn(`request ${s} failed with status ${r} ${i}. Attempt ${e}`),!0},timeMultiple:o};return(0,u.backOff)((()=>new Promise(((n,s)=>{let o=h._rawGet;null!=i&&i.useFetch&&(o=h._rawGetFetch),o(t,e,r,(function(){for(var t=arguments.length,e=new Array(t),r=0;r{const r=t.indexOf("?acmsession=");-1!==r&&(t=t.substring(0,r)),t+="/signeds3download?useCdn=true";const n=new XMLHttpRequest;n.open("GET",t),n.setRequestHeader("Authorization",o.sR.HTTP_REQUEST_HEADERS.Authorization),n.responseType="json",n.send();const i=()=>{e(null)};n.onload=t=>{const r=t.currentTarget.response;e(r.url)},n.onerror=i,n.ontimeout=i,n.onabort=i}))},h._rawGet=async function(t,e,r,o,a,u){u=u||{},r=h.generateUrl(t,e,r,u.apiData,u.escapeOssObjects,u.guid);let f=!1;if(h.isOSSUrl(r)){const t=await h.getSignedS3DownloadUrl(r);t?(r=t,f=!0):console.warn("Failed getting signed URL - Fallback to direct OSS resource.")}if(u.queryParams&&!f){var d=-1===r.indexOf("?")?"?":"&";r=r+d+u.queryParams}var p=new XMLHttpRequest;function m(t){a&&a(p.status,p.statusText,{url:r},p)}function g(t){if("json"===u.responseType)try{if(t instanceof Uint8Array)return(0,s.TN)(t);if("string"==typeof t)return JSON.parse(t)}catch(t){}return t}function v(t){if(p.status>=200&&p.status<400)if(p.response&&p.response instanceof ArrayBuffer){var e;if(31===(e=200===p.status&&u.range?new Uint8Array(p.response,u.range.min,u.range.max-u.range.min):new Uint8Array(p.response))[0]&&139===e[1]){l||(l=!0,n.vF.warn("An LMV resource ("+r+") was not uncompressed by the browser. This hurts performance. Check the Content-Encoding header returned by the server and check whether you're getting double-compressed streams. The warning prints only once but it's likely the problem affects multiple resources."));try{e=(0,c.Wt)(e)}catch(t){a(i.tG.BAD_DATA,"Malformed data received when requesting file",{url:r,exception:t.toString(),stack:t.stack},p)}}o&&o(g(e))}else{var s=p.response;s||u.responseType&&"text"!==u.responseType||(s=p.responseText),o&&o(g(s))}else m()}try{var y=!Object.prototype.hasOwnProperty.call(u,"asynchronous")||u.asynchronous;if(p.open(u.method||(u.noBody?"HEAD":"GET"),r,y),Object.prototype.hasOwnProperty.call(u,"responseType")&&(p.responseType=u.responseType),u.range&&p.setRequestHeader("Range","bytes="+u.range.min+"-"+u.range.max),!f&&(p.withCredentials=!0,Object.prototype.hasOwnProperty.call(u,"withCredentials")&&(p.withCredentials=u.withCredentials),u.headers))for(var b in u.headers)p.setRequestHeader(b,u.headers[b]),"authorization"===b.toLocaleLowerCase()&&(p.withCredentials=!1);y&&(p.onload=v,p.onerror=m,p.ontimeout=m,p.onabort=function(t){a&&a(p.status,"request was aborted",{url:r,aborted:!0},p)},u.ondata&&(p.overrideMimeType("text/plain; charset=x-user-defined"),u._dlProgress={streamOffset:0},p.onreadystatechange=function(){if(p.readyState>2&&200===p.status&&u.ondata){var t=p.responseText;if(u._dlProgress.streamOffset>=t.length)return;var e=function(t,e){for(var r=t.length-e,n=new ArrayBuffer(r),i=new Uint8Array(n,0),s=0,o=e;s{var r;return null==t||null===(r=t.headers)||void 0===r?void 0:r.get(e)}}}try{const t={method:s.method||(s.noBody?"HEAD":"GET"),body:s.postData,headers:s.headers||{},signal:s.abortSignal};if(s.range&&(t.headers.Range="bytes="+s.range.min+"-"+s.range.max),!o&&(t.credentials="include",Object.prototype.hasOwnProperty.call(s,"withCredentials")&&!1===s.withCredentials&&(t.credentials="omit"),s.headers))for(var f in s.headers)"authorization"===f.toLocaleLowerCase()&&(t.credentials="omit");if(!(u=await fetch(c,t)).ok){let t=await u.text();return void i(u.status,t,{url:r},l(u))}if(s.ondata){const t=u.body.getReader();for(;;){let{done:e,value:r}=await t.read();if(e)return void(n&&n(null));s.ondata(r)}}else{let t;s.responseType&&"text"!==s.responseType?"json"===s.responseType?t=await u.json():(t=await u.arrayBuffer(),200===c.status&&s.range&&(t=new Uint8Array(t,s.range.min,s.range.max-s.range.min))):t=await u.text(),n&&n(t)}}catch(t){"AbortError"===t.name?i(0,"request was aborted",{url:r,aborted:!0},l(u)):u?i(u.status,u.statusText,{url:r,exception:t},l(u)):i(0,"network error",{url:r,exception:t})}}}function y(t,e){Object.prototype.hasOwnProperty.call(e,"responseType")||(e.responseType="arraybuffer"),Object.prototype.hasOwnProperty.call(e,"withCredentials")||(e.withCredentials=!!t.auth),e.headers=t.headers,e.queryParams=t.queryParams,e.endpoint=t.endpoint,e.escapeOssObjects=t.escapeOssObjects}h.defaultFailureCallback=function(t,e,r){403==t?this.raiseError(i.tG.NETWORK_ACCESS_DENIED,"Access denied to remote resource",{url:r.url,httpStatus:t,httpStatusText:e}):404==t?this.raiseError(i.tG.NETWORK_FILE_NOT_FOUND,"Remote resource not found",{url:r.url,httpStatus:t,httpStatusText:e}):0===t&&r.aborted?this.raiseError(i.tG.LOAD_CANCELED,"Request aborted",{url:r.url,httpStatus:t,httpStatusText:e}):t>=500&&t<600?this.raiseError(i.tG.NETWORK_SERVER_ERROR,"Server error when accessing resource",{url:r.url,httpStatus:t,httpStatusText:e}):r.exception?this.raiseError(i.tG.NETWORK_FAILURE,"Network failure",{url:r.url,exception:r.exception.toString(),stack:r.exception.stack}):this.raiseError(i.tG.NETWORK_UNHANDLED_RESPONSE_CODE,"Unhandled response code from server",{url:r.url,httpStatus:t,httpStatusText:e,data:r})},h.getItem=function(t,e,r,n,i){if(y(t,i=i||{}),i.range&&!t.supportsRangeRequests){let t="start="+i.range.min+"&end="+i.range.max;i.queryParams?i.queryParams+="&"+t:i.queryParams=t,i.range=void 0}h.rawGet(t.endpoint,"items",e,r,n,i)},h.getManifest=function(t,e,r,n,i){i=i||{},Object.prototype.hasOwnProperty.call(i,"responseType")||(i.responseType="json"),y(t,i),h.rawGet(t.endpoint,"bubbles",e,r,n,i)},h.getProperties=function(t,e,r,n,i,s){const o={};y(t,o),o.responseType="json",o.guid=r,o.method="POST",o.postData=JSON.stringify(n),o.headers["Content-Type"]="application/json",o.headers.accept="application/json",o.headers["Access-Control-Allow-Origin"]="*",h.rawGet(t.endpoint,"properties",e,i,s,o)},h.getThumbnail=function(t,e,r,n,i){y(t,i=i||{});var s=i.queryParams||"",o=[];if(-1===s.indexOf("guid=")&&i.guid&&o.push("guid="+encodeURIComponent(i.guid)),-1===s.indexOf("role=")){var a=i.role||"rendered";o.push("role="+a)}if(-1===s.indexOf("width=")){let t=i.size||400;o.push("width="+t)}if(-1===s.indexOf("height=")){let t=i.size||400;o.push("height="+t)}-1===s.indexOf("acmsession=")&&i.acmsession&&o.push("acmsession="+i.acmsession);var u=o.join("&");i.queryParams?i.queryParams=i.queryParams+"&"+u:i.queryParams=u,h.rawGet(t.endpoint,"thumbnails",e,r,n,i)},h.getACMSession=function(t,e,r,i){const s={numOfAttempts:4,timeMultiple:5,retry:(t,e)=>(n.vF.warn(`acmsession request failed. Attempt #${e}`),!0)};(0,u.backOff)((()=>new Promise(((r,n)=>{h._getACMSession(t,e,r,n)}))),s).then((function(){return r(...arguments)})).catch((function(){return i(...arguments)}))},h._getACMSession=function(t,e,r,n){var i,s={};for(var o in e)"oauth2AccessToken"===o?i=e[o]:-1!==o.indexOf("x-ads-acm")&&(s[o]=e[o]);s.application="autodesk";var a=new XMLHttpRequest;a.open("POST",t+"/oss-ext/v2/acmsessions",!0),a.setRequestHeader("Content-Type","application/json"),a.setRequestHeader("Authorization","Bearer "+i),a.responseType="json",a.onload=function(){if(200===a.status&&a.response){var t="string"==typeof a.response?JSON.parse(a.response):a.response;t&&t.acmsession?r(t.acmsession):n(a.status,"Can't get acm session from response.")}else n(a.status)},a.onerror=n,a.ontimeout=n,a.send(JSON.stringify(s)),delete s.application}},577:(t,e,r)=>{"use strict";r.d(e,{sR:()=>x,_$:()=>v,aK:()=>b});var n=r(6247),i=(0,n.mS)(),s=i;s&&s.document,i.LOCALIZATION_REL_PATH="",i.LMV_VIEWER_VERSION="7.99.1",i.LMV_BUILD_TYPE="Production",i.LMV_RESOURCE_ROOT="",i.LMV_IS_FLUENT_BUILD=!1,i.USE_OTG_DS_PROXY=!1,i.LMV_THIRD_PARTY_COOKIE=!(0,n.Gz)()&&void 0,"v"===i.LMV_VIEWER_VERSION.charAt(0)&&(i.LMV_VIEWER_VERSION=i.LMV_VIEWER_VERSION.substr(1)),i.LMV_VECTOR_PDF=!1,i.LMV_RASTER_PDF=!0;const o=(0,n.mS)();var a={},u=null;a.ENDPOINT_API_DERIVATIVE_SERVICE_V2="derivativeV2",a.ENDPOINT_API_MODEL_DERIVATIVE_V2="modelDerivativeV2",a.ENDPOINT_API_FLUENT="fluent",a.ENDPOINT_API_D3S="D3S",a.ENDPOINT_API_DERIVATIVE_STREAMING="streamingV2";var c,h={derivativeV2:{baseURL:"/derivativeservice/v2",itemURL:"/derivativeservice/v2/derivatives/:derivativeurn",manifestURL:"/derivativeservice/v2/manifest/:urn",thumbnailsURL:"/derivativeservice/v2/thumbnails/:urn",propertyQueryURL:"/modelderivative/v2/designdata/:urn/metadata/:guid/properties:query"},derivativeV2_EU:{baseURL:"/derivativeservice/v2/regions/eu",itemURL:"/derivativeservice/v2/regions/eu/derivatives/:derivativeurn",manifestURL:"/derivativeservice/v2/regions/eu/manifest/:urn",thumbnailsURL:"/derivativeservice/v2/regions/eu/thumbnails/:urn"},derivativeV2_APAC:{baseURL:"/derivativeservice/v2/regions/apac",itemURL:"/derivativeservice/v2/regions/apac/derivatives/:derivativeurn",manifestURL:"/derivativeservice/v2/regions/apac/manifest/:urn",thumbnailsURL:"/derivativeservice/v2/regions/apac/thumbnails/:urn"},derivativeV2_Fedramp:{baseURL:"/derivativeservice/v2",itemURL:"/derivativeservice/v2/derivatives/:derivativeurn",manifestURL:"/derivativeservice/v2/manifest/:urn",thumbnailsURL:"/derivativeservice/v2/thumbnails/:urn"},modelDerivativeV2:{baseURL:"/modelderivative/v2/",itemURL:"/modelderivative/v2/designdata/:urn/manifest/:derivativeurn",manifestURL:"/modelderivative/v2/designdata/:urn/manifest",thumbnailsURL:"/modelderivative/v2/designdata/:urn/thumbnail",propertyQueryURL:"/modelderivative/v2/designdata/:urn/metadata/:guid/properties:query"},fluent:{baseURL:"/modeldata",itemURL:"/modeldata/file/:derivativeurn",manifestURL:"/modeldata/manifest/:urn",thumbnailsURL:"/derivativeservice/v2/thumbnails/:urn",cdnURL:"/cdn",cdnWS:"/cdnws"},D3S:{baseURL:"/modeldata",itemURL:"/modeldata/file/:derivativeurn",manifestURL:"/modeldata/manifest/:urn",thumbnailsURL:"/derivativeservice/v2/thumbnails/:urn",cdnURL:"/cdn",cdnWS:"/cdnws"},D3S_EU:{baseURL:"/modeldata",itemURL:"/modeldata/file/:derivativeurn",manifestURL:"/modeldata/manifest/:urn",thumbnailsURL:"/derivativeservice/v2/regions/eu/thumbnails/:urn",cdnURL:"/cdn",cdnWS:"/cdnws"},D3S_APAC:{baseURL:"/modeldata",itemURL:"/modeldata/file/:derivativeurn",manifestURL:"/modeldata/manifest/:urn",thumbnailsURL:"/derivativeservice/v2/regions/APAC/thumbnails/:urn",cdnURL:"/cdn",cdnWS:"/cdnws"},streamingV2:{baseURL:"/modeldata",itemURL:"/modeldata/file/:derivativeurn",manifestURL:"/modeldata/manifest/:urn",thumbnailsURL:"/derivativeservice/v2/thumbnails/:urn",cdnURL:"/cdn",cdnWS:"/cdnws"},streamingV2_EU:{baseURL:"/regions/eu/modeldata",itemURL:"/regions/eu/modeldata/file/:derivativeurn",manifestURL:"/regions/eu/modeldata/manifest/:urn",thumbnailsURL:"/derivativeservice/v2/regions/eu/thumbnails/:urn",cdnURL:"/regions/eu/cdn",cdnWS:"/regions/eu/cdnws"},streamingV2_APAC:{baseURL:"/modeldata",itemURL:"/modeldata/file/:derivativeurn",manifestURL:"/modeldata/manifest/:urn",thumbnailsURL:"/derivativeservice/v2/thumbnails/:urn",cdnURL:"/cdn",cdnWS:"/cdnws"},streamingV2_Fedramp:{baseURL:"/modeldata",itemURL:"/modeldata/file/:derivativeurn",manifestURL:"/modeldata/manifest/:urn",thumbnailsURL:"/derivativeservice/v2/thumbnails/:urn",cdnURL:"/cdn",cdnWS:"/cdnws"}},l="",f=a.ENDPOINT_API_DERIVATIVE_SERVICE_V2,d=!1,p=!1,m="",g=!1;function v(){return c}a.HTTP_REQUEST_HEADERS={},a.queryParams={},a.setEndpointAndApi=function(t,e){null!=t&&(l=t),e&&(f=e,e.startsWith("D3S")&&console.warn(`api=${e} is deprecated and will be removed in a future release. Use streamingV2 or streamingV2_EU (europe region) instead`))},a.getEndpointAndApi=function(){return l+h[f].baseURL},a.getApiEndpoint=function(){return l},a.getApiFlavor=function(){return f},a.getCdnUrl=function(){return u||(l?l+h[f].cdnURL:void 0)},a.getCdnWebSocketEndpoint=function(){return l+(h[f].cdnWS||"")},a.setCdnUrl=function(t){u=t},a.getCdnRedirectUrl=function(){var t=h[f].cdnRedirectURL;return t?l+t:null},a.setAcmSession=function(t){m=t},a.getAcmSession=function(){return m},a.getManifestApi=function(t,e,r){var n=t||l;return e=e||"",(n+=h[r=r||f].manifestURL).replace(":urn",e)},a.getItemApi=function(t,e,r){var n=r||f,i=(t||l)+h[n].itemURL;e=e||"";var s=decodeURIComponent(e);if(-1!==i.indexOf(":urn")){var o=s.split("/")[0]||"";o=(o=o.split(":"))[o.length-1]||"",i=i.replace(":urn",o)}return n===a.ENDPOINT_API_MODEL_DERIVATIVE_V2&&(e=encodeURIComponent(s)),i.replace(":derivativeurn",e)},a.getThumbnailApi=function(t,e,r){return((t||l)+h[r||f].thumbnailsURL).replace(":urn",e||"")},a.getPropertyQueryApi=function(t,e,r,n){let i=(t||l)+h[r||f].propertyQueryURL;return i=i.replace(":urn",e||""),i.replace(":guid",n||"")},a.getUseCredentials=function(){return d},a.getDomainParam=function(){return console.warn("getDomainParam is deprecated, switch to getQueryParams instead."),this.getUseCredentials()&&!(0,n.Gz)()?"domain="+encodeURIComponent(o.location.origin):""},a.addQueryParam=function(t,e){this.queryParams[t]=e},a.deleteQueryParam=function(t){delete this.queryParams[t]},a.getQueryParams=function(t){let e=this.getUseCredentials()&&!(0,n.Gz)()?"domain="+encodeURIComponent(o.location.origin):"";var r;r="bypassds","undefined"!=typeof window&&function(t,e){t=t.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var r=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(e);return null==r?"":decodeURIComponent(r[1].replace(/\+/g," "))}(r,s.location.href)&&(e=e?e+"&bypassds=1":"bypassds=1");let i=[];for(let t in this.queryParams)i.push(encodeURIComponent(t)+"="+encodeURIComponent(this.queryParams[t]));return i.length&&(e?e+="&"+i.join("&"):e=i.join("&")),e&&t&&(t.queryParams?t.queryParams+="&"+e:t.queryParams=e),e},a.setUseCredentials=function(t){d=t},a.setUseCookie=function(t){p=t},a.getUseCookie=function(){return p},a.isOtgBackend=function(){return this.getApiFlavor()===this.ENDPOINT_API_FLUENT},a.isSVF2Backend=function(){let t=this.getApiFlavor();return t.startsWith(this.ENDPOINT_API_D3S)||t.startsWith(this.ENDPOINT_API_DERIVATIVE_STREAMING)},a.setEscapeOssObjects=function(t){g=t},a.getEscapeOssObjects=function(){return g},a.initLoadContext=function(t){for(var e in(t=t||{}).auth=this.getUseCredentials(),t.endpoint||(t.endpoint=this.getApiEndpoint()),t.api||(t.api=this.getApiFlavor()),t.headers||(t.headers={}),this.HTTP_REQUEST_HEADERS)t.headers[e]=this.HTTP_REQUEST_HEADERS[e];return t.api,this.ENDPOINT_API_FLUENT,this.getQueryParams(t),t.otg_cdn=u||this.getCdnUrl(),t.otg_ws=this.getCdnWebSocketEndpoint(),t.escapeOssObjects=this.getEscapeOssObjects(),t};var y=!1;function b(){return y}let x=a;a.initLoadContext.bind(a)},7676:(t,e,r)=>{"use strict";r.d(e,{k:()=>s});var n=r(5468);function i(t){var e=new n.iD(t.fragments);e.finfo.wantSort=t.fragments.wantSort,e.build(t.bvhOptions);var r={nodes:e.nodes.getRawData(),primitives:e.primitives};t.worker.postMessage({bvh:r,modelId:t.modelId,jobId:t.jobId},[r.nodes,r.primitives.buffer])}function s(t){t.register("COMPUTE_BVH",{doOperation:i})}},1711:(t,e,r)=>{"use strict";r.d(e,{k:()=>d});var n=r(7365),i=r(6118),s=1;function o(){this.vb=null,this.vbstride=0,this.posOffset=0,this.normalOffset=0,this.matrices=null,this.ranges=null,this.dbIds=null,this.id=s++}function a(t){t.x=.5*(1+Math.atan2(t.y,t.x)/Math.PI),t.y=.5*(1+t.z),t.z=0}function u(t,e,r){e[r++]=255&t,e[r++]=t>>8&255,e[r++]=t>>16&255,e[r]=0}var c=function(t,e,r,n,i,s,o){for(var u,c,h,l,f,d,p,m=t.posOffset,g=n;g{"use strict";r.d(e,{k:()=>d});var n=r(8661);class i{constructor(){this.numPolyLine=0,this.numEllipticals=0,this.numCirculars=0,this.numSegments=0,this.geometries=[]}addPolyLine(t,e,r){this.numPolyLine++;const n=t.length/2,i=[];for(let e=0;e({type:"polyLine",vertices:t,fillColor:e,dbId:r}))(i,e,r);this.geometries.push(s)}addSegment(t,e,r){this.numSegments++;const n=((t,e,r)=>({type:"lineSegment",from:t,to:e,dbId:r}))(t,e,r);this.geometries.push(n)}addCircularArc(t,e,r,n,i,s){this.numCirculars++;const o=((t,e,r,n,i)=>({type:"circularCurve",circle:{center:t,radius:e},startInRadians:r,endInRadians:n,dbId:i}))([t,e],r,n,i,s);this.geometries.push(o)}addEllipticalArc(t,e,r,n,i,s,o){this.numEllipticals++;const a={ellipse:{center:[t,e],majorAxis:i,minorAxis:s,tiltInRadians:r},startInRadians:n,endInRadians:o,dbId:void 0};this.geometries.push(a)}}var s=r(3293),o=r(6916),a=r(7480);class u{constructor(t,e){if(this.metadata=t,this.scaleX=1,this.scaleY=1,this.bbox={min:{x:0,y:0,z:0},max:{x:0,y:0,z:0}},this.fillColor=null,t){const e=t.page_dimensions;this.setScale(e)}this.excludeTextGeometry=e.excludeTextGeometry||!0,this.dbId=0,this.maxDbId=0,this.geometry=new i,this.error=!1,this.offsetX=0,this.offsetY=0}setScale(t){this.paperWidth=t.page_width,this.paperHeight=t.page_height,this.scaleX=this.paperWidth/t.plot_width,this.scaleY=this.paperHeight/t.plot_height}load(t,e){e instanceof Uint8Array||(e=new Uint8Array(e)),this.data=e,this.parse(),t.loadDoneCB(!0)}loadFrames(t){this.loadContext=t;let e=t.data;e?(e instanceof Uint8Array||(e=new Uint8Array(e)),this.data=e):t.finalFrame&&(this.data=null),this.probeFrames(t.finalFrame),t.loadDoneCB(!0)}sx(t){return t*this.scaleX}sy(t){return t*this.scaleY}parserAssert(t,e,r){return t!=e&&(o.vF.warn("Expect "+e+"; actual type is "+t+"; in function "+r),this.error=!0,!0)}parseDataType(){const t=this.stream.getVarints();switch(t){case n.d$.dt_void:this.parseVoid();break;case n.d$.dt_int:this.parseInt();break;case n.d$.dt_object:this.parseObject();break;case n.d$.dt_varint:this.parseVarint();break;case n.d$.dt_point_varint:this.parsePoint();break;case n.d$.dt_float:this.parseFloat();break;case n.d$.dt_point_varint_array:this.parsePointsArray();break;case n.d$.dt_circular_arc:this.parseCircularArc();break;case n.d$.dt_circle:this.parseCircle();break;case n.d$.dt_arc:this.parseArc();break;case n.d$.dt_int_array:this.parseIntArray();break;case n.d$.dt_varint_array:this.parseVarintArray();break;case n.d$.dt_byte_array:this.parseByteArray();break;case n.d$.dt_string:this.parseString();break;case n.d$.dt_double_array:this.parseDoubleArray();break;default:this.error=!0,o.vF.info("Data type not supported yet: "+t)}}readHeader(){const t=this.stream=new s.z(this.data),e=t.getString(3);if("F2D"!==e)return o.vF.error("Invalid F2D header : "+e,(0,a.$f)(a.tG.BAD_DATA)),!1;const r=t.getString(2);return"01"!==r?(o.vF.error("Only support f2d major version 1; actual version is : "+r,(0,a.$f)(a.tG.BAD_DATA)),!1):"."!==t.getString(1)?(o.vF.error("Invalid version delimiter.",(0,a.$f)(a.tG.BAD_DATA)),!1):(t.getString(2),!0)}probe(){const t=this.stream;this.error=!1;try{for(;t.offset{"use strict";r.d(e,{k:()=>v});var n=r(1136);function i(t){this.buffer=t,this.offset=0,this.byteLength=t.length,this.convBuf=new ArrayBuffer(8),this.convUint8=new Uint8Array(this.convBuf),this.convUint16=new Uint16Array(this.convBuf),this.convInt32=new Int32Array(this.convBuf),this.convUint32=new Uint32Array(this.convBuf)}function s(t){this.offset=t,this.message="try to access an offset that is out of bounds: "+this.offset,this.toString=function(){return this.message}}i.prototype.boundsCheck=function(t){if(t>=this.byteLength)throw new s(t)},i.prototype.seek=function(t){this.boundsCheck(t),this.offset=t},i.prototype.getBytes=function(t){this.boundsCheck(this.offset+t);var e=new Uint8Array(this.buffer.buffer,this.offset,t);return this.offset+=t,e},i.prototype.skipBytes=function(t){this.boundsCheck(this.offset+t),this.offset+=t},i.prototype.getVarints=function(){var t,e=0,r=0;do{this.boundsCheck(this.offset),e|=(127&(t=this.buffer[this.offset++]))<32767&&(t|=4294901760),t},i.prototype.getInt32=function(){this.boundsCheck(this.offset+4);var t=this.buffer,e=this.convUint8,r=this.offset;return e[0]=t[r],e[1]=t[r+1],e[2]=t[r+2],e[3]=t[r+3],this.offset+=4,this.convInt32[0]},i.prototype.getUint32=function(){this.boundsCheck(this.offset+4);var t=this.buffer,e=this.convUint8,r=this.offset;return e[0]=t[r],e[1]=t[r+1],e[2]=t[r+2],e[3]=t[r+3],this.offset+=4,this.convUint32[0]},i.prototype.skipUint32=function(){this.boundsCheck(this.offset+4),this.offset+=4},i.prototype.getFloat32=function(){return this.boundsCheck(this.offset+4),this.offset+=4,0},i.prototype.getFloat64=function(){return this.boundsCheck(this.offset+8),this.offset+=8,0},i.prototype.skipFloat64=function(){this.boundsCheck(this.offset+8),this.offset+=8},i.prototype.reset=function(t){this.buffer=t,this.offset=0,this.byteLength=t.length};var o=r(8661),a=r(7480),u=r(6916);function c(){this.data=null,this.frameStart=0,this.frameEnd=0,this.stream=null,this.opCount=0,this.marker={frameStart:this.frameStart,frameEnd:this.frameEnd}}c.prototype.load=function(t){return this.data=t,this.frameStart=0,this.stream?(this.stream.reset(this.data),this.stream.seek(0),this.frameEnd=0):(this.stream=new i(this.data),this.stream.seek(8),this.frameStart=8,this.frameEnd=8),this.probe(),this.marker.frameStart=this.frameStart,this.marker.frameEnd=this.frameEnd,this.marker};var h=o.d$,l=o.xL;c.prototype.readColor=function(){var t=this.stream;t.getVarints(),t.getVarints(),t.skipUint32()},c.prototype.parsePointPositions=function(){this.stream.getVarints(),this.stream.getVarints()},c.prototype.unhandledTypeWarning=function(t,e){u.vF.warn("Unhandled semantic type when probing F2d : "+e+" in function "+t)},c.prototype.parseObject=function(){this.stream.getVarints()},c.prototype.parseString=function(){var t=this.stream;t.getVarints();var e=t.getVarints();t.skipBytes(e)},c.prototype.parsePoint=function(){this.stream.getVarints(),this.parsePointPositions()},c.prototype.parseVarintArray=function(){var t=this.stream;t.getVarints();for(var e=t.getVarints(),r=0;r0&&(m=y);var w=new c,_=!0,I=0,A=!1;function O(i){if(n.postMessage({type:"F2DAssetURL",urls:f}),f=null,p){let s={type:"F2DSTREAM",finalFrame:!0,finished:!0,progress:1};return A||(s.manifest=e,s.metadata=r,s.basePath=t.basePath,s.f2dSize=m,A=!0),n.debug("Total text bytes count : "+i.length),void n.postMessage(s)}var a;if(s.length>o&&(s=new Uint8Array(s.buffer.slice(0,o))),31==s[0]&&139==s[1])try{a=new Uint8Array(s.buffer,0,o),a=(0,d.Wt)(a)}catch(t){console.error(t)}var u={type:"F2DBLOB",metadata:r,manifest:e,f2dSize:m,basePath:t.basePath,progress:1,buffer:a.buffer},c=[];c.push(a.buffer),n.postMessage(u,c)}function S(){if(p){if(_&&(_=!1,31==s[0]&&139==s[1]))return u.vF.error("F2D streaming broken by non-streaming unzip!",(0,a.$f)(a.tG.BAD_DATA)),void(p=!1);var i=new Uint8Array(s.buffer,I,o-I);try{var c=w.load(i);if(c.frameEnd>c.frameStart){var h=s.buffer.slice(I+c.frameStart,I+c.frameEnd);I+=c.frameEnd;var l=[];l.push(h);let i={type:"F2DSTREAM",frames:h,finalFrame:!1};m&&(i.progress=I/m),A||(i.manifest=e,i.metadata=r,i.f2dSize=m,i.basePath=t.basePath,A=!0),n.postMessage(i,l)}}catch(t){n.debug(t)}}}v=O,g=function(t){l(t),S()},o>0&&S(),null!=h&&O(h)}n.PG.getItem(t,t.url,(function(t){v(t)}),t.onFailureCallback,{ondata:function(t){g(t)},responseType:""}),m(t,"metadata.json.gz",(function(n){try{e=JSON.parse((0,f.xH)(n)),i++}catch(t){self.raiseError(a.tG.BAD_DATA,"")}2===i&&y(t,r,e)})),m(t,"manifest.json.gz",(function(n){try{n&&(r=JSON.parse((0,f.xH)(n))),i++}catch(t){}2===i&&y(t,r,e)}))}function v(t){t.register("STREAM_F2D",{doOperation:g})}},574:(t,e,r)=>{"use strict";r.d(e,{k:()=>N});var n=r(8983),i=r(6247),s=r(2816),o=new Float32Array(3),a=1/Math.PI,u=Math.atan2;(0,i.Gz)()||(u=function(t,e){var r=Math.abs(e),n=Math.abs(t),i=Math.min(r,n)/Math.max(r,n),s=i*i,o=((-.0464964749*s+.15931422)*s-.327622764)*s*i+i;return n>r&&(o=1.57079637-o),e<0&&(o=3.14159274-o),t<0&&(o=-o),o});var c=function(t,e,r,n,i){var s={x:e[t*n],y:e[t*n+1],z:e[t*n+2]},o={x:s.x-e[t*i],y:s.y-e[t*i+1],z:s.z-e[t*i+2]},a=r[n].next==i?r[n].prev:r[n].next;return{pos:s,next:o,prev:a<0?{x:o.x,y:o.y,z:o.z}:{x:e[t*a]-s.x,y:e[t*a+1]-s.y,z:e[t*a+2]-s.z}}},h=function(t,e,r,n,i){if("OCTM"!=t.getString(4))return null;if(5!=t.getInt32())return null;var c=t.getString(3);t.getUint8();var h={stream:null,vertices:null,indices:null,normals:null,colors:null,uvs:[],attrs:[]};h.vertexCount=t.getInt32(),h.triangleCount=t.getInt32(),h.texMapCount=t.getInt32(),h.attribMapCount=t.getInt32(),h.flags=t.getInt32(),h.comment=t.getString(t.getInt32());var l=i;h.vbstride=3,1&h.flags&&(h.vbstride+=l?1:3),h.vbstride+=2*(h.texMapCount||0),h.vbstride+=3*(h.attribMapCount||0),h.vblayout={};var f=0;if(h.vblayout.position={offset:f,itemSize:3},f+=3,1&h.flags&&(h.vblayout.normal={offset:f,itemSize:l?2:3,bytesPerItem:l?2:4,normalized:l},f+=l?1:3),h.texMapCount)for(var d=0;d1?(a.vertexCount=t.readU16(),i=t.readU16(),o=t.readU16(),e.version>2&&(a.lineWidth=t.readF32())):(a.vertexCount=t.readU32V(),i=t.readU32V(),o=t.readU32V()),a.isLines=!0):(a.vertexCount=t.readU16(),i=t.readU16(),a.pointSize=t.readF32(),a.isPoints=!0);var u=0!=t.stream.getUint8();a.vbstride=3,u&&(a.vbstride+=3),a.vblayout={};var h=0;a.vblayout.position={offset:h,itemSize:3},h+=3,u&&(a.vblayout.color={offset:h,itemSize:3}),a.vb=new Float32Array(a.vertexCount*a.vbstride);var l,f,d=a.vb,p=a.vbstride,m=t.stream;if(m.getVector3Array(d,a.vertexCount,a.vblayout.position.offset,p),u)for(l=0,h=a.vblayout.color.offset,f=a.vertexCount;l1?(v=new Uint16Array(g(m.getBytes(2*i))),y=new Uint16Array(g(m.getBytes(2*o)))):(v=new Int32Array(g(m.getBytes(4*i))),y=new Int32Array(g(m.getBytes(4*o))));var b=y[o-1]-o+1;a.indices=new Uint16Array(2*b);for(var x=0,w=0;w+1=0&&++l,f[h].prev=u,f[h].prev_seg=o,f[h].next>=0&&++l;var d=2*n,p=new Array(d),m=new Uint16Array(6*(n+l)),g=0;for(o=0;o=0&&(h=2*f[u].prev_seg+1,u=a,m[g++]=2*h,m[g++]=2*u,m[g++]=2*h+1,m[g++]=2*u+1,m[g++]=2*u,m[g++]=2*h);t.indices=m;var v=2*d;t.vb=new Float32Array(v*t.vbstride),i=t.vblayout.position.offset;for(var y=0;y0?(this.precisionTolerance=r,this.scale=1/this.precisionTolerance):(this.precisionTolerance=-r*this.boxSize,this.scale=1/this.precisionTolerance),this.snapBaseX=this.bbox.min.x,this.snapBaseY=this.bbox.min.y,this.snapBaseZ=this.bbox.min.z,this.xymap={}}findOrAddPoint(t,e,r,n){let i,s=0|(t-this.snapBaseX)*this.scale,o=0|(e-this.snapBaseY)*this.scale,a=0|(r-this.snapBaseZ)*this.scale,u=1/0;for(let n=s-1;n<=s+1;n++){let s=this.xymap[n];if(s)for(let n=o-1;n<=o+1;n++){let o=s[n];if(o)for(let n=a-1;n<=a+1;n++){let s=o[n];if(void 0===s)continue;this.getVertex(s,M);let a=M,c=(a.x-t)*(a.x-t)+(a.y-e)*(a.y-e)+(a.z-r)*(a.z-r);cthis.precisionTolerance&&(i=void 0),void 0===i){let t=this.xymap[s];t||(t=this.xymap[s]={});let e=t[o];return e||(e=t[o]={}),e[a]=n,n}return i}}let F=new S.S,R=new S.S,z=new S.S,V=new S.S,U=new S.S;class D{constructor(t,e,r){let n=t.boundingBox||r,i=new T.K;n&&i.copy(n),this.geom=t,this.myVerts=function(t,e){var r=new Float32Array(3*P(t));return function(t,e,r){t.attributes,m||(m=new S.S,g=new S.S,new S.S),r&&(v||(v=new THREE.Matrix3),v.getNormalMatrix(r));const{positions:n,stride:i,poffset:s}=k(t),{normals:o,noffset:a}=C(t);if(n)for(var u=P(t),c=s,h=a,l=0;lu){var l=a;a=u,u=l,h=!0}var f=s[a];if(f){var d=f[u];if(void 0===d)f[u]=h?-r-1:r;else{if(n)o.push(t),o.push(e);else{i.getNormal(t,e,r,V),d<0?i.getNormal(u,a,i.remap[-d-1],U):i.getNormal(a,u,i.remap[d],U);var p=V.dot(U);Math.abs(p)<.25&&(o.push(t),o.push(e))}delete f[u]}}else s[a]={},s[a][u]=r}}for(var u in function(t,e){var r,n,i;y||(y=new S.S,b=new S.S,x=new S.S,w=new S.S,_=new S.S,I=new S.S);const{positions:s,stride:o,poffset:a}=k(t),{normals:u,noffset:c}=C(t),h=function(t){return t.ib||t.indices||(t.index?t.index.array:null)}(t);if(s)if(h){var l=t.groups;l&&0!==l.length||(l=[{start:0,count:h.length,index:0}]);for(var f=0,d=l.length;f>5];return!(e&&e&1<<(31&t))};for(i=0;i{"use strict";r.d(e,{k:()=>h});var n=r(1136),i=r(5468),s=r(1706);function o(t,e){this.min.x=t[e],this.min.y=t[e+1],this.min.z=t[e+2],this.max.x=t[e+3],this.max.y=t[e+4],this.max.z=t[e+5]}function a(t,e){t[e]=this.min.x,t[e+1]=this.min.y,t[e+2]=this.min.z,t[e+3]=this.max.x,t[e+4]=this.max.y,t[e+5]=this.max.z}function u(t,e){var r=t[1]<<8|t[0];r||(r=28),this.boxStride=r/4,this.count=t.byteLength/r-1;let n=e.globalOffset||{x:0,y:0,z:0},i=e.fragmentTransformsOffset||{x:0,y:0,z:0};if(this.count){this.boxes=new Float32Array(t.buffer,r),this.flags=new Int32Array(t.buffer,r);var u=this.boxes;if(e.placementTransform){var c=new s.K,h=0;for(let t=0;t{"use strict";r.d(e,{k:()=>E});var n=r(1136),i=r(6247);const s="otg",o="otg-content",a="otg-lru",u=25e4;class c{constructor(t){this.db=null,this.readTransaction=null,this.loaded=!1,this.opening=!1,this.dbDisabled=this._isDbDisabled(t),!(0,i.Gz)()&&this.dbDisabled&&console.log("IndexedDb disabled"),this.storeName=o,this.storeNameTimestamp=a,this.bothStoreNames=[this.storeName,this.storeNameTimestamp],this.pendingTimestampUpdates={},this.pendingTimestampCount=0,this.pendingStores=[],this._pendingCallbacks=[]}_isDbDisabled(t){return t||(0,i.Gz)()||(0,i.nr)()||(0,i.Xb)()||"undefined"==typeof indexedDB}notifyPendingCallbacks(t){this._pendingCallbacks.forEach((e=>e(t,this.db))),this._pendingCallbacks=[]}open(t){if(this.dbDisabled)return void(t&&t());if(this.loaded)return void(t&&t(null,this.db));if(t&&this._pendingCallbacks.push(t),this.opening)return;this.opening=!0;let e=indexedDB.open(s,1);e.onerror=t=>{console.error("Failed to open or create cache database."),this.dbDisabled=!0,this.notifyPendingCallbacks(t)},e.onsuccess=t=>{this.opening=!1,this.db=t.target.result,this.db.onerror=function(t){console.error("Database error",t)},this.loaded=!0,this.notifyPendingCallbacks()},e.onupgradeneeded=t=>{console.log("Db upgrade",this.storeName);let e=t.target.result;e.createObjectStore(o),e.createObjectStore(a).createIndex(a+"-index","t",{unique:!1})}}deleteOld(t){if(!this.db)return void t();if(this.deleteInProgress)return;this.deleteInProgress=!0;let e=IDBKeyRange.upperBound(Date.now()-3e5,!0),r=[];this.db.transaction([this.storeNameTimestamp]).objectStore(this.storeNameTimestamp).index(this.storeNameTimestamp+"-index").openCursor(e).onsuccess=e=>{let n=e.target.result;if(n&&r.length<200)return r.push(n.primaryKey),void n.continue();if(r.length){console.log("Deleting old objects.",r.length);let e=this.db.transaction(this.bothStoreNames,"readwrite");e.oncomplete=e=>{this.deleteInProgress=!1,console.log("Delete done"),t&&t()},e.onerror=t=>{this.deleteInProgress=!1,console.error("Transaction error.",t)},e.onabort=t=>{this.deleteInProgress=!1;let e=t.target.error;console.log("Failed to delete cached objects",e)};let n=e.objectStore(this.storeName),i=e.objectStore(this.storeNameTimestamp);for(let t=0;t{t()}),e.onerror=e=>{console.error("Transaction error.",e),t&&t(e.target.error)},e.onabort=e=>{"QuotaExceededError"===e.target.error.name&&this.deleteOld((()=>{})),t&&t(e.target.error)},this.writeTransaction=e}for(var e=0;e{console.error("Object store error.",t)},this.writeTransaction.objectStore(this.storeNameTimestamp).put({t:Date.now()},r)}this.pendingStores=[],this.writeTransaction=null}else t&&t()}store(t,e,r){this.db?(e=e.slice(),this.pendingStores.push(t),this.pendingStores.push(e),this.pendingStores.length<200||this.deleteInProgress?r&&r():this.flush(r)):r&&r()}flushTimestamps(t){let e=this.db.transaction([this.storeNameTimestamp],"readwrite");t&&(e.oncomplete=e=>{t()}),e.onerror=e=>{console.error("Transaction error.",e),t&&t(e.target.error)},e.onabort=e=>{"QuotaExceededError"===e.target.error.name&&(console.log("Quota exceeded"),this.deleteOld((()=>{}))),t&&t(e.target.error)};let r=e.objectStore(this.storeNameTimestamp);for(let t in this.pendingTimestampUpdates)r.put({t:this.pendingTimestampUpdates[t]},t);this.pendingTimestampUpdates={},this.pendingTimestampCount=0}_createReadTransaction(){let t=this.readTransaction=this.db.transaction(this.storeName);t.oncomplete=t=>{this.readTransaction=null},t.onerror=t=>{console.error("Transaction error.",t),this.readTransaction=null},t.onabort=t=>{console.warn("Transaction abort",t),this.readTransaction=null}}get(t,e){if(this.opening)return console.error("Tried to get IndexedDb resource while database was still opening"),void e(-1,null);if(!this.db)return void e(-1,null);let r;this.readTransaction||this._createReadTransaction();try{r=this.readTransaction.objectStore(this.storeName).get(t)}catch(e){this._createReadTransaction(),r=this.readTransaction.objectStore(this.storeName).get(t)}r.onsuccess=r=>{if(!r.target.result)return void e(-1,null);let n=r.target.result;e(null,n),this.pendingTimestampUpdates[t]=Date.now(),this.pendingTimestampCount++},r.onerror=t=>{e(t.target.errorCode)}}flushStoresAndTimestamps(){this.db&&this.flush((t=>{t||this.flushTimestamps()}))}size(t){if(!this.db)return void t();let e=0,r=0,n=this.db.transaction([this.storeName]).objectStore(this.storeName).openCursor();n.onsuccess=n=>{let i=n.target.result;if(i){let t=i.value;e+=t.length,r++,i.continue()}else t(null,{size:e,items:r})},n.onerror=function(e){t(e)}}estimateCachedHashCount(t){if(this.opening)return console.error("Tried to get IndexedDb resource while database was still opening"),void t(void 0);if(!this.db)return void t(void 0);let e,r=this.db.transaction(this.storeNameTimestamp);try{e=r.objectStore(this.storeNameTimestamp).openKeyCursor()}catch(e){return void t(void 0)}let n=2;e.onsuccess=e=>{const i=e.target.result;if(i)if(--n>0)i.advance(999);else{const e=i.key.charCodeAt(0);t(65536e3/e),r.abort()}else t(2==n?0:1==n?1e3:void 0)},e.onerror=e=>{t(void 0)}}readAllCachedHashes(t){if(this.opening)return console.error("Tried to get IndexedDb resource while database was still opening"),void t([]);if(!this.db)return void t([]);let e,r=this.db.transaction(this.storeNameTimestamp);try{e=r.objectStore(this.storeNameTimestamp).getAllKeys()}catch(e){return void t([])}e.onsuccess=e=>{t(e.target.result)},e.onerror=e=>{t([])}}}var h=r(8914),l=r(9861),f=r(3314),d=r(4318);r(6916);(class{MAX_SIZE=2e3;#t=0;totalBytes=0;head;tail;get count(){return this.#t}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2e3,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(t,e)=>this.count>this.MAX_SIZE;this.MAX_SIZE=t,this.trimEval=e}clear(){this.#t=0,this.totalBytes=0,this.head=null,this.tail=null}onReceived(t,e){this.addNode(new p(t),e)}addNode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;for(0===this.#t?this.head=t:1===this.#t?(this.tail=t,this.head.setNext(t)):(this.tail.setNext(t),this.tail=t),this.#t+=e;this.trimEval(this.head,this.tail);){var r;const t=this.head.next;this.head.unlink(),this.totalBytes-=this.head.size,this.#t-=(null===(r=this.head.data)||void 0===r?void 0:r.count)||1,this.head=t}this.totalBytes+=t.size}}).prototype[Symbol.iterator]=function*(){let t=this.tail;for(;t;)yield t,t=t.prev};class p{data;size=0;prev;next;timestamp;constructor(t){this.data=t,t.size&&(this.size=t.size),this.timestamp=Date.now()}setNext(t){return this.next=t,t&&(this.next.prev=this),this}setPrev(t){return this.prev=t,t&&(this.prev.next=this),this}unlink(){var t,e;null===(t=this.prev)||void 0===t||t.setNext(this.next),null===(e=this.next)||void 0===e||e.setPrev(this.prev),this.prev=null,this.next=null}}const m=2,g=20,v=400;function y(t){return t.worker.ctx||(t.worker.ctx={otgws:[],localDbCache:null,opfsCache:null,numRequests:0,pendingForNetwork:[],_pendingGeomHashes:[],_pendingGeoms:[],_pendingFromCache:[],_pendingTransferList:[],_requestsSent:0,_requestsReceived:0,decoderPorts:[],nextPortIndex:0,analyticsForHttpFallbackSent:!1}),t.worker.ctx}function b(t){var e=y(t);if(!t.disableWebSocket){const r=(e,r,n,i)=>I(t,e,r,n,!1,i),n=(e,r,n)=>function(t,e,r,n){t.raiseError(null,n,{hash:e,resourceType:r}),O(t)}(t,e,r,n),i=e=>function(t,e){for(const[r,n]of e)t.queryParams=n.queryParams,S(t,[r],[n.url],[n.lineageUrn],n.type)}(t,e);for(let s=0;s{t.worker.postMessage({event:e,properties:r})};e.opfsCache=new h.x(r),t.clearIndexedDbIfItsLarge&&async function(){if(!indexedDB.databases)return;if(await new Promise((t=>setTimeout(t,2e4))),!(await indexedDB.databases()).find((t=>{let{name:e}=t;return e===s})))return;let t=indexedDB.open(s,1);t.onerror=t=>{console.error("Failed to open cache database for cleanup.",t)},t.onsuccess=t=>{const e=t.target.result,r=e.transaction(o).objectStore(o).count();r.onsuccess=t=>{if(t.target.result>u){console.log("OPFS cache is enabled and the old IndexedDb cache is taking up storage space. Deleting IndexedDb cache."),e.close();const t=indexedDB.deleteDatabase(s);t.onsuccess=()=>{console.log("IndexedDb cache deleted")},t.onerror=t=>{console.error("Failed to delete IndexedDb cache",t)}}},r.onerror=t=>{console.error("Failed to get count from IndexedDb",t)}}}()}else e.localDbCache=new c(t.disableIndexedDb),e.localDbCache.open(null);e.decoderPorts=t.ports}function x(t){var e=y(t);for(const r of e.otgws)r.addAuthorizeUrn(t.modelUrn);t.useOpfs&&e.opfsCache.open(t.lineageUrn),e.flushMessages||(e.flushMessages=setInterval((()=>{!function(t){var e=y(t);if(0===e.pendingForNetwork.length)return;let r=[],i=0,s=0;for(const t of e.otgws){var o;t.hasPermanentError||i++,(null===(o=t.ws)||void 0===o?void 0:o.readyState)===d.STATE.OPEN?(r.push(t),s+=t.inFlightRequests.size):t._openWebSocket()}if(0===i){e.analyticsForHttpFallbackSent||(e.analyticsForHttpFallbackSent=!0,t.worker.postMessage({event:"OTG_FALLBACK_TO_HTTP",properties:{wsStates:e.otgws.map((t=>{var e;return null===(e=t.ws)||void 0===e?void 0:e.readyState})),wsLastErrorNumInFlight:e.otgws.map((t=>t.lastErrorNumInFlight)),wsLastErrorReasons:e.otgws.map((t=>{var e;return null===(e=t.lastError)||void 0===e?void 0:e.reason})),wsLastErrorCodes:e.otgws.map((t=>{var e;return null===(e=t.lastError)||void 0===e?void 0:e.code}))}}));for(const[r,i,s,o,a]of e.pendingForNetwork)t.queryParams=a,n.PG.getItem(t,i,(e=>I(t,[r],[s],[e],!1,o)),w(t,r,o),{responseType:"arraybuffer",withCredentials:!0});return void(e.pendingForNetwork=[])}if(r.length<=0)return;const a=r.sort(((t,e)=>t.inFlightRequests.size-e.inFlightRequests.size));let u=e.pendingForNetwork.length,c=a[0].inFlightRequests.size;for(let t=1;t=0;t--){const r=a[t],n=c-r.inFlightRequests.size;if(!(n50&&A(t)}O(t,e.length)}function A(t){var e=y(t);if(!e._pendingGeomHashes.length)return;const r=e.decoderPorts[e.nextPortIndex];e.nextPortIndex=++e.nextPortIndex%e.decoderPorts.length,r.postMessage({operation:"DECODE_GEOMETRIES",hashes:e._pendingGeomHashes,arrays:e._pendingGeoms,fromCache:e._pendingFromCache},e._pendingTransferList),e._pendingGeomHashes=[],e._pendingGeoms=[],e._pendingFromCache=[],e._pendingTransferList=[]}function O(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const r=y(t);r.numRequests-=e,r._requestsReceived+=e,!r.flushCacheAndDisconnectRequested||r.numRequests||r._pendingGeomHashes.length||(function(t){var e,r,n=y(t);(n.numRequests||n._pendingGeomHashes.length)&&(console.error("OtgLoadWorker disconnect requested even though there are requests in flight"),A(t));for(const t of n.otgws)t.closeWebSocket();clearInterval(n.flushMessages),n.flushMessages=null,null===(e=n.localDbCache)||void 0===e||e.open((()=>n.localDbCache.flushStoresAndTimestamps())),null===(r=n.opfsCache)||void 0===r||r.close()}(t),r.flushCacheAndDisconnectRequested=!1)}function S(t,e,r,n,i,s){var o=y(t);if(o._requestsSent+=e.length,o.opfsCache)o.opfsCache.get(e,n).then((s=>{for(let a=0;ao.localDbCache.get(a,(function(e,r){r?I(t,[a],[""],[r],!0,i):o.pendingForNetwork.push([a,u,"",i,t.queryParams])})))):o.pendingForNetwork.push([a,u,"",i,t.queryParams])}}function P(t){var e=y(t);S(t,t.hashes,t.urls,t.lineageUrns,t.type,t.couldBeInCache),e.numRequests+=t.urls.length}function k(t){y(t).flushCacheAndDisconnectRequested=!0,O(t,0)}function C(t){const e=y(t);if(!(t.count<=e.otgws.length))for(let r=e.otgws.length;rt.numRequestsSent)),wsReceived:e.otgws.map((t=>t.numRequestsReceived))};console.log("WorkerState: ",r)}function E(t){t.register("INIT_WORKER_OTG",{doOperation:b}),t.register("ADD_MODEL_OTG",{doOperation:x}),t.register("LOAD_CDN_RESOURCE_OTG",{doOperation:P}),t.register("FLUSH_CACHE_AND_DISCONNECT_OTG",{doOperation:k}),t.register("CLEAR_OPFS_CACHE",{doOperation:T}),t.register("REPORT_LOADING_STATE",{doOperation:M}),t.register("SET_OTGWS_COUNT",{doOperation:C})}},6324:(t,e,r)=>{"use strict";r.d(e,{k:()=>$});var n=r(1136),i=r(2759);function s(t,e){let r,n=0,i=t.length-1;for(;n<=i;){if(r=(n+i)/2|0,e===t[r])return r;e-1||i.indexOf(c[5])>-1)))if(t==g){var h=A.getAttrValue(t,u);a=!0,o.name=h}else{var f=A.attributeHidden(t);if(n&&f)return;var d=A._getObjectProperty(t,u);o.properties.push(d)}}else{var p=A.getObjectProperties(A.getAttrValue(t,u),r,!0,i,s);p&&p.properties&&(l=p)}})),l){var f={},d=o.properties;for(let t=0;t0?t:e},this.nodeHasChild=function(t){let e=!1;return this.enumObjectProperties(t,(function(t){if(t===p)return e=!0,!0})),e},this.getNodeNameAndChildren=function(t,e){var r,n,i=t.dbId;if(this.enumObjectProperties(i,(function(i,s){var o;if(i===m);else if(i!=p||e)i===g?t.name=A.getAttrValue(i,s):i===x?t.flags=A.getAttrValue(i,s,!0):i===v&&(n=s);else if((o=A.getAttrValue(i,s,!0))!==t.dbId){var a={dbId:o,parent:t.dbId};r?r.push(a):r=[a]}})),(!t.name||!t.flags)&&n){const e=A.getAttrValue(v,n,!0);let r=P[e];r||(P[e]=r={dbId:e,name:null,flags:null},A.getNodeNameAndChildren(r,!0)),r.name&&!t.name&&(t.name=r.name),"number"!=typeof t.flags&&"number"==typeof r.flags&&(t.flags=r.flags)}return r},this.buildDbIdToFragMap=T,this.buildObjectTree=function(t,e,r,n){var i;e&&(i=T(e)),_={},I=0;var s=this.buildObjectTreeRec(t,0,i,0,r,n);return I>0&&console.warn("Property database integrity not guaranteed ("+I+")."),_=null,P={},s},this.buildObjectTreeRec=function(t,e,r,n,i,s){if(_[t])return I++,0;_[t]=e||t,n>i[0]&&(i[0]=n);var o,a={dbId:t},u=this.getNodeNameAndChildren(a),c=[];if(u)for(var h=0;h1&&n.push(e[r]);return n},this.bruteForceSearch=function(t,r,n){const i=this.getSearchTerms(t);if(0===i.length)return[];var o=[];const a=null==n?void 0:n.searchHidden,u=null==n?void 0:n.includeInherited,c={};for(let t=0;t{const r=new Set(t);for(let n=0;n7?r[7]:0}},this.enumAttributes=function(t){for(var r=1;r=1;for(let t=0;tg,w=void 0;void 0===g||g>y?((w=u._getObjectProperty(y,b)).displayValueB=w.displayValue,w.displayValue=void 0,r++):x?((w=a._getObjectProperty(g,v)).displayValueB=void 0,e++):((w=a._getObjectProperty(g,v)).displayValueB=A.getAttrValue(y,b),e++,r++),d||(d=[]),d.push(w)}else e++,r++}i&&(n.changedIds.push(t),s&&n.propChanges.push(d))}},p=-1,m=function(t,e){var n=Math.floor(100*t/e);n!=p&&(r&&r(n),p=n)};if(i)for(var g=0;gthis.customAttrs=t,this._attributeIsBlacklisted=t=>this._impl._attributeIsBlacklisted(t),this._getAttributeAndValueIds=(t,e,r,n)=>this._impl._getAttributeAndValueIds(t,e,r,n),this._ignoreAttribute=t=>this._impl._ignoreAttribute(t),this.attributeHidden=t=>this._impl.attributeHidden(t),this.setIdsBlob=t=>this._impl.setIdsBlob(t),this.getObjectCount=()=>this._impl.getObjectCount(),this.getIdAt=t=>this._impl.getIdAt(t),this.externalIdsLoaded=()=>this._impl.externalIdsLoaded(),this.getExternalIdMapping=t=>this._impl.getExternalIdMapping(t),this.findRootNodes=()=>this._impl.findRootNodes(),this.nodeHasChild=t=>this._impl.nodeHasChild(t),this.getNodeNameAndChildren=(t,e)=>this._impl.getNodeNameAndChildren(t,e),this.buildDbIdToFragMap=t=>this._impl.buildDbIdToFragMap(t),this.buildObjectTree=(t,e,r,n)=>this._impl.buildObjectTree(t,e,r,n),this.buildObjectTreeRec=(t,e,r,n,i,s)=>this._impl.buildObjectTreeRec(t,e,r,n,i,s),this.getSearchTerms=t=>this._impl.getSearchTerms(t),this.bruteForceSearch=(t,e,r)=>this._impl.bruteForceSearch(t,e,r),this.bruteForceFind=t=>this._impl.bruteForceFind(t),this.getLayerToNodeIdMapping=()=>this._impl.getLayerToNodeIdMapping(),this.findLayers=()=>this._impl.findLayers(),this.enumObjects=(t,e,r)=>this._impl.enumObjects(t,e,r),this.getAttrChild=()=>this._impl.getAttrChild(),this.getAttrParent=()=>this._impl.getAttrParent(),this.getAttrName=()=>this._impl.getAttrName(),this.getAttrLayers=()=>this._impl.getAttrLayers(),this.getAttrInstanceOf=()=>this._impl.getAttrInstanceOf(),this.getAttrViewableIn=()=>this._impl.getAttrViewableIn(),this.getAttrXref=()=>this._impl.getAttrXref(),this.getAttrNodeFlags=()=>this._impl.getAttrNodeFlags(),this.findParent=t=>this._impl.findParent(t),this.findDifferences=(t,e,r)=>this._impl.findDifferences(t,e,r),this.numberOfAttributes=()=>this._impl.numberOfAttributes(),this.numberOfValues=()=>this._impl.numberOfValues(),this.dtor=()=>this._impl.dtor(),this._customAttrIdOffset=this._impl.numberOfAttributes(),this._customValueIdOffset=this._impl.numberOfValues(),this.getObjectCustomProperties=(t,e)=>{var r;return(null===(r=this.customAttrs)||void 0===r?void 0:r.getObjectProperties(t,e,this._customAttrIdOffset,this._customValueIdOffset))??[]},this.getValueAt=t=>{const e=t-this._customValueIdOffset;return e>=0?this.customAttrs.getValueAt(e):this._impl.getValueAt(t)},this.getIntValueAt=t=>{const e=t-this._customValueIdOffset;return e>=0?this.customAttrs.getValueAt(e):this._impl.getIntValueAt(t)},this.getAttrValue=(t,e,r)=>t-this._customAttrIdOffset>=0?this.customAttrs.getValueAt(e-this._customValueIdOffset):this._impl.getAttrValue(t,e,r),this._getObjectProperty=(t,e)=>{const r=t-this._customAttrIdOffset;return r>=0?this.customAttrs._getObjectProperty(r,e-this._customValueIdOffset):this._impl._getObjectProperty(t,e)},this.getObjectProperties=(t,e,r,n,i)=>{var s;const o=this._impl.getObjectProperties(t,e,r,n,i)??{};return null===(s=this.customAttrs)||void 0===s||s.enumObjectProperties(t,((t,r)=>{const s=this.customAttrs.getAttributeAt(t);e&&-1===e.indexOf(s.name)&&-1===e.indexOf(s.displayName)||i&&-1===i.indexOf(s.category)||n&&(n.indexOf(s.name)>-1||n.indexOf(s.displayName)>-1)||o.properties.push(this.customAttrs._getObjectProperty(t,r))}),0,0),o},this.getAttributeDef=t=>{const e=t-this._customAttrIdOffset;return e>=0?this.customAttrs.getAttributeAt(e):this._impl.getAttributeDef(t)},this.enumAttributes=t=>{var e;this._impl.enumAttributes(t),null===(e=this.customAttrs)||void 0===e||e.enumAttributes(t,this._customAttrIdOffset)},this.enumObjectProperties=(t,e)=>{var r;this._impl.enumObjectProperties(t,e),null===(r=this.customAttrs)||void 0===r||r.enumObjectProperties(t,e,this._customAttrIdOffset,this._customValueIdOffset)},this.getPropertiesSubsetWithInheritance=(t,e,r)=>{var n;const i=this._impl.getPropertiesSubsetWithInheritance(t,e,r);return null===(n=this.customAttrs)||void 0===n||n.enumObjectProperties(t,((t,n)=>{e&&!e[t]||(i.push(t,n),r&&(r[t]=n))}),this._customAttrIdOffset,this._customValueIdOffset),i}}d.prototype.getIndex=function(t){var e=this.dbIdToIndex[t];if(e)return e;e=this.nextNode++,this.nodes.push(t);for(var r=1;rthis.children.length&&console.error("Child index out of bounds -- should not happen"),this.processName(a,r)},d.prototype.processName=function(t,e){var r,n,i=-1,s=-1;if(e&&(s=e.lastIndexOf("]"),-1!==(i=e.lastIndexOf("["))&&-1!==s||(i=e.lastIndexOf(":"),s=e.length)),i>=0&&s>i){r=e.slice(0,i+1);var o=e.slice(i+1,s);(n=parseInt(o,10))&&n+""===o||(r=e,n=0)}else r=e,n=0;var a=this.s2i[r];void 0===a&&(a=this.strings.add(r),this.s2i[r]=a),this.names[t]=a,this.nameSuffixes[t]=n},d.prototype.flatten=function(){this.nodes=p(this.nodes),this.children=p(this.children),this.names=p(this.names),this.nameSuffixes=p(this.nameSuffixes),this.strings.flatten(),this.s2i=null},m.prototype.dtor=function(){this.nodes=null,this.children=null,this.dbIdToIndex=null,this.names=null,this.nameSuffixes=null,this.strings=null,this.visibleIds=null,this.nodeBoxes=null},m.prototype.getNumNodes=function(){return this.numNodes},m.prototype.getIndex=function(t){return this.dbIdToIndex[t]},m.prototype.name=function(t,e){var r,n=this.dbIdToIndex[t],i=this.strings.get(this.names[n]),s=this.nameSuffixes[n];return r=s?"["===i.charAt(i.length-1)?i+s+"]":i+s:i,e&&(this.childCounts||this.computeChildCounts(),this.childCounts[t]>0&&(r+=" ("+this.childCounts[t]+")")),r},m.prototype.getParentId=function(t){var e=this.dbIdToIndex[t];return this.nodes[e*f+1]},m.prototype.getNodeFlags=function(t){var e=this.dbIdToIndex[t];return this.nodes[e*f+4]},m.prototype.setNodeFlags=function(t,e){var r=this.dbIdToIndex[t];r&&(this.nodes[r*f+4]=e)},m.prototype.getNumChildren=function(t){var e=this.dbIdToIndex[t],r=this.nodes[e*f+3];if(r>=0)return r;var n=this.nodes[e*f+2];r=Math.abs(r);for(var i=0,s=0;s=0)return 0;for(var n=this.nodes[e*f+2],i=0,s=(r=Math.abs(r))-1;s>=0&&!(this.children[n+s]>=0);s--)i++;return i},m.prototype.getNodeBox=function(t,e){for(var r=6*this.getIndex(t),n=0;n<6;n++)e[n]=this.nodeBoxes[r+n]},m.prototype.getVisibleIds=function(){return this.visibleIds||(this.visibleIds=Object.keys(this.dbIdToIndex).map((function(t){return parseInt(t)}))),this.visibleIds},m.prototype.enumNodeChildren=function(t,e){var r=this.dbIdToIndex[t],n=this.nodes[r*f+2],i=this.nodes[r*f+3];i=Math.abs(i);for(var s=0;s0)&&e(-o-1,t,r))return t}}},m.prototype.computeBoxes=function(t){this.nodeBoxes||(this.nodeBoxes=new Float32Array(6*this.numNodes));var e=this,r=e.getIndex(e.rootId),n=e.nodeBoxes;function i(t,r,i){var s=e.getIndex(t);o(t,s);for(var a=6*i,u=6*s,c=0;c<3;c++)n[a+c]>n[u+c]&&(n[a+c]=n[u+c]),n[a+c+3]t[s+a]&&(n[o+a]=t[s+a]),n[o+a+3]{e[n]+=r(t)}),!0),t.getNumFragments(n)&&(i=1)),e[n]+i}(t.rootId)},m.prototype.dbIdToIndexFiltered=function(t){const e={},r=this,n=i=>{let s=t(i);return r.enumNodeChildren(i,(t=>{n(t)&&(s=!0)})),s&&(e[i]=r.dbIdToIndex[i]),s};return n(this.rootId),e};const v={Boolean:1,Integer:2,Double:3,Float:4,Blob:10,DbKey:11,String:20,LocalizableString:21,DateTime:22,GeoLocation:23,Position:24},y=[];class b{constructor(){this.lastUpdated=new Date(0),this.lastFetched=new Date(0),this.customValueIds=new Map([["",1]]),this.customValues=[null,""],this.customAttributeValues=new Map}hasObjectProperties(t){return void 0!==this.customAttributeValues.get(t)}enumObjectProperties(t,e,r,n,i){const s=this.customAttributeValues.get(e)??y;for(let e=0;e{r&&this.customAttributeValues.clear();for(const r of e.results){const e=t.customAttrIds.get(r.propId);if(void 0===e)continue;const n=r.svf2Id;let i=this.customAttributeValues.get(n);void 0===i&&(i=[],this.customAttributeValues.set(n,i)),null!==r.value&&i.push(e,this.internValue(r.value))}n&&(this.lastUpdated=Date.parse(e.lastModifiedAt))};await async function(t,e){const{onPage:r}=e??{},n=[];let i=!0;for(;t;){var s;const o=await fetch(t,e);if(!o.ok)throw new Error(o.statusText);const a=await o.json();t=null===(s=a.pagination)||void 0===s?void 0:s.nextUrl,r?await r(a,i,!t):n.push(a),i=!1}return n}(a,{headers:{"Content-Type":"application/json",...n},onPage:e})}catch(t){throw console.error(t),t}return this.lastFetched=Date.now(),this}async setCustomPropertiesValues(t,e){let{baseUrl:r,headers:n,projectId:i,seedFileUrn:s,selection:o,props:a}=e;const u=`${r}/v2/projects/${i}/versions/${encodeURIComponent(s)}/custom-properties`,c={},h={},l=[];for(const[t,e]of Object.entries(a))void 0===e||""===e?l.push(t):h[t]=e;Object.entries(h).length>0&&(c.assignments=[{svf2Ids:o,props:h}]),l.length>0&&(c.removals=[{svf2Ids:o,propIds:l}]);var f=await fetch(u,{method:"POST",body:JSON.stringify(c),headers:{"Content-Type":"application/json",...n}});if(!f.ok)throw new Error(f.statusText);const d=await f.json();if("FAILED"===d.status)return d;const p=Object.entries(a);for(const e of d.successfulSvf2Ids)for(const[r,n]of p){const i=t.customAttrIds.get(r);if(void 0===i)continue;let s=this.customAttributeValues.get(e);void 0===s&&(s=[],this.customAttributeValues.set(e,s));let o=-1;for(let t=0;t=0&&s.splice(o,2);else{const t=this.internValue(n);o<0?s.push(i,t):s[o+1]=t}0===s.length&&this.customAttributeValues.delete(e)}return d}}class x{constructor(){const t=new Date(0);this.attributes={lastFetched:t,lastUpdated:t,customAttrIds:new Map,customAttrs:[]},this.values=null}getValueAt(t){return this.values.customValues[t]}getAttributeAt(t){return this.attributes.customAttrs[t]}_getObjectProperty(t,e){const r=this.getAttributeAt(t);return{displayName:r.displayName??r.name,displayValue:this.getValueAt(e),displayCategory:r.category,attributeName:r.name,type:r.dataType,units:r.dataTypeContext,hidden:!1,precision:r.precision,propType:r.propType,propertyHash:r.propertyHash}}hasObjectProperties(t){var e;return null===(e=this.values)||void 0===e?void 0:e.hasObjectProperties(t)}enumAttributes(t,e){this.attributes.customAttrs.forEach(((r,n)=>{t(n+e,r)}))}enumObjectProperties(t,e,r,n){var i;return null===(i=this.values)||void 0===i?void 0:i.enumObjectProperties(this.attributes.customAttrs,t,e,r,n)}async parseResponse(t,e){const r=t.body.getReader(),n=new TextDecoder;let{value:i,done:s}=await r.read(),o=i?n.decode(i):"";const a=/\r\n|\n|\r/g;let u=0,c=null;for(;;)if(c=a.exec(o),c)e(o.substring(u,c.index)),u=a.lastIndex;else{if(s)break;const t=o.substring(u);({value:i,done:s}=await r.read()),o=t+(i?n.decode(i):""),u=a.lastIndex=0}u{if(null==t)return null;let e=c.get(t);return void 0===e&&(e=t,c.set(t,t)),e};await this.parseResponse(u,(t=>{try{const r=JSON.parse(t);if(s&&!s.has(r.key))return;const n={propertyHash:r.key,category:f(r.category),name:r.name,displayName:r.displayName,dataType:v[r.type]??0,dataTypeContext:f(r.uom)??"",flags:0,precision:f(r.precision)??0,propType:f(r.propType),parameterId:r.parameterId,parameterTypeId:f(r.parameterTypeId),defaultValue:f(r.defaultValue),applicableTo:r.applicableTo};var e=h.get(n.propertyHash);e||(e=l.length,l.push(n)),h.set(n.propertyHash,e)}catch(e){throw console.error(e),console.log(t),e}}));const d=this.attributes;return d.customAttrIds=h,d.customAttrs=l,d.lastFetched=Date.now(),this}async acquireValues(t){let{baseUrl:e,headers:r,projectId:n,seedFileUrn:i,worker:s,dbPath:o,limit:a}=t,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,c=this.values;try{var h;if(c instanceof Promise)c=await c;else if(null===c||u&&Date.now()-c.lastFetched>u){c??=new b;const t=c.refreshCustomPropertiesValues(this.attributes,{baseUrl:e,headers:r,projectId:n,seedFileUrn:i,limit:a});this.values=t,await t,this.values=c}var l=null===(h=s.pdbCache)||void 0===h||null===(h=h.get(o))||void 0===h?void 0:h.pdb;l&&"setCustomAttrs"in l&&l.setCustomAttrs(this)}catch(t){throw this.values=null,t}return c}async setCustomPropertiesValues(t){let{baseUrl:e,headers:r,projectId:n,seedFileUrn:i,selection:s,props:o,worker:a,dbPath:u,limit:c}=t;const h=await this.acquireValues({baseUrl:e,headers:r,projectId:n,seedFileUrn:i,worker:a,dbPath:u,limit:c},0);return await h.setCustomPropertiesValues(this.attributes,{baseUrl:e,headers:r,projectId:n,seedFileUrn:i,selection:s,props:o})}async applyDefinitions(t){let{baseUrl:e,headers:r,projectId:n,seedFileUrn:i,bindings:s,limit:o}=t;const a=`${e}/v2/projects/${n}/lineages/${encodeURIComponent(i)}/custom-properties/bindings`,u={method:"POST",body:JSON.stringify(s),headers:{"Content-Type":"application/json",...r}};delete u.headers["x-use-contingency"];var c=await fetch(a,u);if(c.ok){const t=new Set(this.attributes.customAttrIds.keys());return s.forEach((e=>{let{propId:r,isDeleted:n}=e;return n?t.delete(r):t.add(r)})),await this.refreshCustomProperties({baseUrl:e,headers:r,projectId:n,seedFileUrn:i,propertyFilter:t,limit:o}),await this.values.refreshCustomPropertiesValues(this.attributes,{baseUrl:e,headers:r,projectId:n,seedFileUrn:i,limit:o}),this}throw new Error(c.statusText)}}class w{constructor(){this._cache={}}delete(t){delete this._cache[t]}async acquireDefinitions(t){let{baseUrl:e,headers:r,projectId:n,seedFileUrn:i,dbPath:s}=t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3e4,a=this._cache[s];try{if(a instanceof Promise)a=await a;else if(void 0===a||o>0&&Date.now()-a.attributes.lastFetched>o){a??=new x;const t=a.refreshCustomProperties({baseUrl:e,headers:r,projectId:n,seedFileUrn:i});this._cache[s]=t,await t,this._cache[s]=a}}catch(t){throw delete this._cache[s],t}return a}async applyDefinitions(t){let{baseUrl:e,headers:r,projectId:n,seedFileUrn:i,dbPath:s,bindings:o,limit:a}=t,u=this._cache[s]??=new x;return u instanceof Promise&&(u=await u),await u.applyDefinitions({baseUrl:e,headers:r,projectId:n,seedFileUrn:i,dbPath:s,bindings:o,limit:a}),u}}function _(t){let e=t.customPropsCache;return e||(t.customPropsCache=e=new w),e}function I(t,e){this.pdb=null,this.waitingCallbacks=[],this.error=!1,this.dbPath=t,this.dbFiles=null,this.isShared=e,this.timestamp=Date.now()}function A(t){this.data=t,this.refCount=1}class O{constructor(){this.pdbCache={},this.fileCache={}}get(t){let e=this.pdbCache[t];return e&&(e.timestamp=Date.now()),e}set(t,e){let r=new I(t,e);return this.pdbCache[t]=r,r}getFile(t){let e=this.fileCache[t];return e&&(e.timestamp=Date.now()),e}setFile(t,e){this.fileCache[t]=new A(e)}delete(t){var e=this.get(t);if(e&&e.pdb&&(e.pdb.refCount--,0===e.pdb.refCount&&(e.isShared||delete this.pdbCache[t],!e.isShared)))for(var r in e.dbFiles){var n=e.dbFiles[r];this.unrefFileCacheEntry(n.storage)}}unrefFileCacheEntry(t){for(var e in t){var r=this.fileCache[e];r&&(r.refCount--,0===r.refCount&&delete this.fileCache[e])}}}function S(t,e,r,i,s){var o;if(-1!==t.indexOf("://")||0===t.indexOf("urn:"))o=t;else{if(!e.dbPath)return void r(null);o=`${e.dbPath}${t}`}var a=n.PG.generateUrl(e.endpoint,"items",o),u=function(t){s&&e.worker.pdbCache&&e.worker.pdbCache.setFile(a,t),i[a]=t,r(t)},c=e.worker.pdbCache&&e.worker.pdbCache.getFile(a);c?(c.refCount++,u(c.data)):n.PG.getItem(e,o,u,(function(t,n,i){404!==t&&e.onFailureCallback(t,n,i),r(null)}))}function P(t,e,r,n){var i,s=t.dbId,o=t.children,a=[];if(o)for(var u=0;udbid mapping!.");else console.warn("ID remap required, but not loaded.");var y=r.idroots;if(y&&y.length){if(o=new d,1==y.length&&r.nodeHasChild(y[0]))s=y[0],r.buildObjectTree(s,h,a,o);else{s=-1e10;var b=[];for(let t=0;t0)){if(e==t.dbId)return r.name=t.name,void(r.dbId=e);var n=t.children;if(n)for(var i=0;i"ElementId"===t.attributeName));if(e&&(t=e.displayValue),s.externalId&&!t){const e=s.externalId.split("-");e.length&&(t=parseInt(e[e.length-1],16))}t&&!s.name.includes(t)&&(s.name+=` [${t}]`)}catch(t){console.warn(`Caught error in updating ElementIds, object with dbId ${s.dbId} skipped`,t)}o.forEach((function(t){"Name"!==t.displayName||t.displayCategory||n.push(s.name);var e=t.displayCategory?`${t.displayCategory}/${t.displayName}`:t.displayName;Object.prototype.hasOwnProperty.call(r,e)||(r[e]=[]),t.parentName=s.name,t.dbId=s.dbId,r[e].push(t)})),Object.prototype.hasOwnProperty.call(s,"name")&&-1===n.indexOf(s.name)&&(Object.prototype.hasOwnProperty.call(r,"Name")||(r.Name=[]),r.Name.push({displayName:"Name",displayValue:s.name,displayCategory:null,attributeName:"Name",type:20,units:null,hidden:!1,precision:0,dbId:s.dbId,parentName:s.name}))}n=[],r.__selected_dbIds__=t.dbIds,t.worker.postMessage({cbId:t.cbId,result:r})}function D(t){var e=t.worker,r=e.pdbCache&&e.pdbCache.get(t.dbPath);if(r&&r.pdb){var n=r.pdb.getExternalIdMapping(t.extIdFilter);e.postMessage({cbId:t.cbId,result:n})}}function L(t){var e=t.worker,r=e.pdbCache&&e.pdbCache.get(t.dbPath);if(r&&r.pdb){var n=r.pdb.getLayerToNodeIdMapping();e.postMessage({cbId:t.cbId,result:n})}}function j(t){var e=t.worker;if(t.clearCaches)return e.pdbCache=null,void(e.customPropsCache=null);e.pdbCache&&e.pdbCache.delete(t.dbPath),e.customPropsCache&&e.customPropsCache.delete(t.dbPath)}function N(t){var e=t.worker,r=t.idsFile||{path:"objects_ids.json.gz"},n={},i=e.pdbCache.get(t.dbPath);i?i.pdb&&i.pdb.externalIdsLoaded()?e.postMessage({cbId:t.cbId}):S(r.path,t,(function(s){if(!s)return;let o=e.pdbCache;(i=o.get(t.dbPath))&&i.pdb||(o.unrefFileCacheEntry(n),e.postMessage({cbId:t.cbId,error:{propDbWasUnloaded:!0}})),i.pdb.setIdsBlob(s),i.byteSize+=s.byteLength;var a={filename:r.path,storage:n};i.dbFiles.push(a),e.postMessage({cbId:t.cbId})}),n,r.isShared):console.error("Delay-loading of externalIDs requires to load the propDb first.")}function B(t){var e=t.worker;if(t.userFunction)try{importScripts(t.userFunction)}catch(r){return console.error(r),void e.postMessage({cbId:t.cbId,error:{msg:"Error while importing 'userFunction'."}})}if(self.userFunction){var r=e.pdbCache&&e.pdbCache.get(t.dbPath);if(r&&r.pdb){var n;try{n=self.userFunction(r.pdb,t.userData)}catch(r){return console.error(r),void e.postMessage({cbId:t.cbId,error:{msg:"Error while executing 'userFunction'."}})}finally{self.userFunction=void 0}e.postMessage({cbId:t.cbId,result:n})}}else e.postMessage({cbId:t.cbId,error:{msg:"function 'userFunction' was not found."}})}async function W(t){const e=t.worker,r=_(e);let n,i;try{var s;n=null===(s=(await r.acquireDefinitions(t)).attributes)||void 0===s?void 0:s.lastFetched}catch(t){i={msg:t.message,error:t}}e.postMessage({cbId:t.cbId,result:n,error:i})}async function G(t){const e=t.worker,r=_(e);let n,i;try{var s;await r.applyDefinitions(t),n=null===(s=(await r.acquireDefinitions(t)).attributes)||void 0===s?void 0:s.lastFetched}catch(t){i={msg:t.message,error:t}}e.postMessage({cbId:t.cbId,result:n,error:i})}async function q(t){const e=t.worker,r=_(e);let n,i;try{const e=await r.acquireDefinitions(t);n=(await e.acquireValues(t,1e3)).lastFetched}catch(t){i={msg:t.message,error:t}}e.postMessage({cbId:t.cbId,result:n,error:i})}async function H(t){const e=t.worker,r=_(e);let n,i;try{const e=await r.acquireDefinitions(t,0);n=(await e.setCustomPropertiesValues(t)).lastUpdated}catch(t){i={msg:t.message,error:t}}e.postMessage({cbId:t.cbId,result:n,error:i})}function $(t){t.register("BUILD_EXTERNAL_ID_MAPPING",{doOperation:D}),t.register("BUILD_LAYER_TO_NODE_ID_MAPPING",{doOperation:L}),t.register("GET_PROPERTIES",{doOperation:V}),t.register("GET_PROPERTY_SET",{doOperation:U}),t.register("SEARCH_PROPERTIES",{doOperation:T}),t.register("DIFF_PROPERTIES",{doOperation:M}),t.register("FIND_PROPERTY",{doOperation:E}),t.register("FIND_LAYERS",{doOperation:F}),t.register("LOAD_PROPERTYDB",{doOperation:C}),t.register("CREATE_TREE",{doOperation:k}),t.register("UNLOAD_PROPERTYDB",{doOperation:j}),t.register("USER_FUNCTION",{doOperation:B}),t.register("LOAD_EXTERNAL_IDS",{doOperation:N}),t.register("REFRESH_CUSTOM_PROPERTIES",{doOperation:W}),t.register("REFRESH_CUSTOM_PROPERTIES_VALUES",{doOperation:q}),t.register("APPLY_CUSTOM_PROPERTIES",{doOperation:G}),t.register("SET_CUSTOM_PROPERTIES_VALUES",{doOperation:H})}},3870:(t,e,r)=>{"use strict";r.d(e,{k:()=>z});var n=r(6247),i=r(5468),s=r(6118),o=r(1136),a=r(3293),u=r(8983),c=r(1706),h=r(7365);var l=((0,n.Xb)(),null);function f(){this.length=0,this.numLoaded=0,this.boxes=null,this.transforms=null,this.materials=null,this.packIds=null,this.entityIndexes=null,this.fragId2dbId=null,this.topoIndexes=null,this.visibilityFlags=null}var d=new s.S;function p(t,e,r,n){var i=t.seekToEntry(e);return i?i.version>2?null:(i.version>1&&t.readU8(),{definition:t.stream.getUint32(),transform:t.readTransform(void 0,void 0,void 0,r,n),instanceNodePath:t.readPathID()}):null}function m(t){switch(t){case"meter":case"meters":case"m":default:return 1;case"feet and inches":case"foot":case"feet":case"ft":return.3048;case"inch":case"inches":case"in":return.0254;case"centimeter":case"centimeters":case"cm":return.01;case"millimeter":case"millimeters":case"mm":return.001}}function g(t,e){var r=t.globalOffset;if(r.x||r.y||r.z){if(e){var n=new h.T(!0);n.copy(e),(e=n).elements[12]-=r.x,e.elements[13]-=r.y,e.elements[14]-=r.z}else(e=new h.T(!0)).makeTranslation(-r.x,-r.y,-r.z);t.placementWithOffset=e}else t.placementWithOffset=e}function v(t,e){t[0]-=e.x,t[1]-=e.y,t[2]-=e.z}function y(t,e){if(e&&(e.transformPoint(t.position),e.transformPoint(t.target),e.transformDirection(t.up),isFinite(t.orthoScale))){const r=e.getMaxScaleOnAxis();t.orthoScale*=r}}function b(t,e){var r=e.definition,n=t.seekToEntry(r);if(!n)return null;if(n.version>2)return null;var i=t.stream,s={isPerspective:!i.getUint8(),position:t.readVector3f(),target:t.readVector3f(),up:t.readVector3f(),aspect:i.getFloat32(),fov:i.getFloat32()*(180/Math.PI)};return n.version<2&&(i.getFloat32(),i.getFloat32()),s.orthoScale=i.getFloat32(),s}function x(t,e){var r=t.seekToEntry(e);if(!r)return null;if(r.version>1)return null;var n=t.stream;return{position:t.readVector3f(),dir:t.readVector3f(),r:n.getFloat32(),g:n.getFloat32(),b:n.getFloat32(),intensity:n.getFloat32(),spotAngle:n.getFloat32(),size:n.getFloat32(),type:n.getUint8()}}const w={NI_Inner:0,NI_Leaf:1};function _(t){const e=t.readString();let r=function(t){let e="";for(let r=0;r<16;r++)e+=t.readU8();return e}(t);const n=t.readU8();if(n===w.NI_Leaf)return{name:e,entry:t.readVarint(),uuid:r};if(n===w.NI_Inner){const r=t.readVarint(),n=[];for(let e=0;et.name===e})[e];if(!r)throw new Error("Error while extracting "+e);return r}function C(t){this.zipPack=t,this.manifest=null,this.materials=null,this.metadata=null,this.fragments=null,this.geompacks=[],this.instances=[],this.cameras=[],this.lights=[],this.viewpoints=[],this.overrideSets=[],this.propertydb={attrs:[],avs:[],ids:[],values:[],offsets:[]},this.bbox=null,this.animations=null,this.pendingRequests=0,this.globalOffset={x:0,y:0,z:0},this.topologyPath=null}C.prototype.loadAsyncResource=function(t,e,r,n){if(r)n(r);else{var i=this;this.pendingRequests++,o.PG.getItem(t,t.basePath+e,(function(e){i.pendingRequests--,n(e),0==i.pendingRequests&&i.postLoad(t)}),t.onFailureCallback)}},C.prototype.loadManifest=function(t){const e=k(this.zipPack,"manifest.json"),r=new a.z(e);this.manifest=JSON.parse(r.getString(e.byteLength))},C.prototype.applyLargeBoxOffset=function(t){!t||t.x===this.globalOffset.x&&t.y===this.globalOffset.y&&t.z===this.globalOffset.z||(this.bbox.isEmpty()||this.bbox.translate({x:this.globalOffset.x-t.x,y:this.globalOffset.y-t.y,z:this.globalOffset.z-t.z}),this.verylargebbox=!0,this.globalOffset.copy(t),g(this,this.placementTransform))},C.prototype.parseFragmentList=function(t,e,r,n){var i=this;this.loadAsyncResource(e,r,n,(function(t){var r=new u.J(t),n=function(t,e,r,n,i,o,a,u){var f=function(t,e){var r=[];if(!e)return r;for(var n=t.getEntryCounts(),i=t.stream,s=0;s5)return;o.version>4&&t.readU8(),t.readU32V(),o.version>2||t.readString(),t.readU32V(),t.readTransform(s,null,12*s);for(var a=0;a<6;a++)i.getFloat32();if(o.version>1){var u=t.readU32V();e.indexOf(u)>=0&&r.push(s)}}return r}(t,void 0),p=f.length?f.length:t.getEntryCounts(),m=t.stream;l&&p>l&&(p=l),e.totalLength=t.getEntryCounts(),e.length=p,e.numLoaded=0;var g,v,y=e.boxes=i?new Float64Array(6*p):new Float32Array(6*p),b=e.transforms=i?new Float64Array(12*p):new Float32Array(12*p),x=e.materials=new Int32Array(p),w=e.packIds=new Int32Array(p),_=e.entityIndexes=new Int32Array(p),I=e.geomDataIndexes=new Int32Array(p),A=e.fragId2dbId=new Int32Array(p),O=e.visibilityFlags=new Uint16Array(p),S=[0,0,0];n&&(g=new c.K,v=new h.T(!0).fromArray(n.elements));var P=!r&&a,k=b,C=12,T=9;function M(t){if(n){var e=6*t;g.setFromArray(y,e),g.applyMatrix4(v),g.copyToArray(y,e)}}function E(t){for(var e=6*t,r=0;r<6;r++)y[e++]=m.getFloat32()}function F(t,e){for(var r=6*t,n=0;n<6;n++)y[r++]=m.getFloat32()+e[n%3]}P&&(i||(y=new Float64Array(6*p),k=new Float64Array(3*p),C=3,T=0));for(var R=0,z=e.length;R5)return;var U=!0;if(V.version>4&&(U=!!(1&t.readU8())),O[R]=U?1:0,x[R]=t.readU32V(),V.version>2?I[R]=t.readU32V():(w[R]=parseInt(t.readString()),_[R]=t.readU32V()),t.readTransform(R,b,12*R,n,r,S),P&&k!==b&&k.set(S,R*C+T),V.version>3?F(R,S):E(R),M(R),r){var D=6*R;y[D++]-=r.x,y[D++]-=r.y,y[D++]-=r.z,y[D++]-=r.x,y[D++]-=r.y,y[D++]-=r.z}V.version>1&&(A[R]=t.readU32V())}if(P){var L=-1,j=-1,N=-1,B=y.length;for(let t=0;t100*L||W.y>100*j||W.z>100*N){var G=0,q=0,H=0;for(let t=0;t2){var f=n.getInt32();if(-1!=f&&void 0===i){i=e.topoIndexes=new Int32Array(r);for(var d=0;d=5&&a.getUint8(),e>=3&&(n[o]=a.getVarints()),o)switch(u){case 0:break;case 1:if(e<2){let t=a.getUint16();if(1===t)i[o]=a.getUint32();else if(t>0){let e=[];for(let r=0;r0){let e=[];for(let r=0;r3&&0!==o[3]&&(this.metadata=JSON.parse(l.getString(o.byteLength)).metadata,function(t,e){if(t.metadata){var r=t.metadata["world bounding box"],n=new s.S(r.minXYZ[0],r.minXYZ[1],r.minXYZ[2]),i=new s.S(r.maxXYZ[0],r.maxXYZ[1],r.maxXYZ[2]);t.bbox=new c.K(n,i),t.modelSpaceBBox=t.bbox.clone();var o=function(t,e){var r=t.metadata["custom values"];if(t.placementTransform=e.placementTransform,e.applyScaling){var n="m";t.metadata["distance unit"]&&(n=t.metadata["distance unit"].value),t.scalingUnit=n,"object"==typeof e.applyScaling?(e.applyScaling.from&&(n=e.applyScaling.from),e.applyScaling.to&&(t.scalingUnit=e.applyScaling.to)):t.scalingUnit=e.applyScaling;var i=m(n)/m(t.scalingUnit);if(1!=i){var s=new h.T(!0),o=new h.T(!0);o.elements[0]=i,o.elements[5]=i,o.elements[10]=i,e.placementTransform&&s.copy(e.placementTransform),e.applyPlacementInModelUnits?e.placementTransform=o.multiply(s):e.placementTransform=s.multiply(o),t.placementTransform=e.placementTransform,t.scalingFactor=i}}if(r&&r.refPointTransform){t.refPointTransform=new h.T(!0);var a=t.refPointTransform.elements,u=r.refPointTransform;a[0]=u[0],a[1]=u[1],a[2]=u[2],a[4]=u[3],a[5]=u[4],a[6]=u[5],a[8]=u[6],a[9]=u[7],a[10]=u[8],a[12]=u[9],a[13]=u[10],a[14]=u[11]}else{var c=t.metadata.georeference,l=c&&c.refPointLMV,f=0;if(r&&Object.prototype.hasOwnProperty.call(r,"angleToTrueNorth")&&(f=Math.PI/180*r.angleToTrueNorth),l||f){var d=new h.T(!0),p=d.elements;p[0]=p[5]=Math.cos(f),p[1]=-Math.sin(f),p[4]=Math.sin(f);var g=new h.T(!0);p=g.elements,l&&(p[12]=-l[0],p[13]=-l[1],p[14]=-l[2]),t.refPointTransform=d.multiply(g)}}if(e.applyRefPoint&&t.refPointTransform){var v=new h.T(!0);e.placementTransform&&v.copy(e.placementTransform),v.multiply(t.refPointTransform),t.placementTransform=e.placementTransform=v}else!e.applyRefPoint&&e.placementTransform&&(t.placementTransform=new h.T(!0).copy(e.placementTransform));return t.placementTransform&&function(t){for(var e=t.elements,r=0;r<4;r++)for(var n=0;n<4;n++)if(r===n){if(1!==e[4*r+n])return!1}else if(0!==e[4*r+n])return!1;return!0}(t.placementTransform)&&(t.placementTransform=null),t.placementTransform}(t,e);o&&!t.bbox.isEmpty()&&t.bbox.applyMatrix4(o),e.globalOffset?t.globalOffset=e.globalOffset:t.globalOffset=t.bbox.getCenter(new s.S),g(t,o),t.bbox.isEmpty()||(t.bbox.min.sub(t.globalOffset),t.bbox.max.sub(t.globalOffset)),Object.prototype.hasOwnProperty.call(t.metadata,"double sided geometry")&&t.metadata["double sided geometry"].value&&(t.doubleSided=!0)}}(this,t)),this.packFileTotalSize=0,this.primitiveCount=0;var f=r.typesets,d={};for(let t=0;te[o]&&(e[o]=n[a+o])}this.bbox={min:{x:e[0],y:e[1],z:e[2]},max:{x:e[3],y:e[4],z:e[5]}}}},C.prototype.postLoadOfObjectIds=function(t){let e=new Set(t.objectIds);if(e.size>0){let t=new Set,r=new Set;for(let n=0;nn[t]&&(n[t]=i[x+t])}return t.boxes=i,t.transforms=s,t.materials=o,t.packIds=a,t.entityIndexes=u,t.mesh2frag=p,t.visibilityFlags=c,t.fragId2dbId=h,t.polygonCounts=l,t.geomDataIndexes=f,t.topoIndexes=d,t.totalLength=r,n}(this.fragments,[...r]);this.bbox={min:{x:i[0],y:i[1],z:i[2]},max:{x:i[3],y:i[4],z:i[5]}}}},C.prototype.postLoadBubbleConsolidation=function(){const t=this.viewpointTreeRoot;if(t&&(t.name=t.name||"Saved Viewpoints"),null==t||!t.children)return;let e=0;function r(t){if(t.children){for(let e=0;e{"use strict";r.d(e,{vF:()=>f});var n=r(6247),i=r(577);class s{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=t}init(){}register(){}static get name(){return null}static get defaultOptions(){return{}}optIn(t){}optOut(t){}hasOptedOut(){}getDistinctId(){}track(t,e){}identify(t){}}const o=new class{constructor(){this.providerMap={},this.instances=[],this.superProps={},this.shouldTrack=!0,this.trackCache=[],this.oneTimers={}}registerProvider(t){if(!t)return void f.error("Undefined provider");if(!t.name)return void f.error("missing provider name");const e=t.name.toLowerCase();this.isProviderRegistered(e)?f.warn(`Provider with name ${t.name} already registered`):this.providerMap[e]=t;const r=this.createInstance(t.name,t.defaultOptions);this.instances.push(r),this.shouldTrack&&this.init(r),this.trackCache.length>0&&(this.trackCache.forEach((t=>{let{event:e,properties:r}=t;this.track(e,r)})),this.trackCache=[])}isProviderRegistered(t){var e;return("string"==typeof t?t:null===(e=t.name)||void 0===e?void 0:e.toLowerCase())in this.providerMap}init(t){t.initialized||(t.init(),t.register(this.superProps))}createInstance(t,e){const r=t&&t.toLowerCase();if(!(r in this.providerMap))return void f.error(`Unknown ${t}`);const n=this.providerMap[r],i=new n(e);if(!(i instanceof s))throw new Error("not an analytics provider");return n.instanceCount=n.instanceCount||0,i.name=`${r}-${n.instanceCount}`,n.instanceCount++,i}optIn(t){this.instances.forEach((t=>this.init(t))),this._callMethod("optIn",t),this.shouldTrack=!0}optOut(t){this._callMethod("optOut",t),this.shouldTrack=!1}hasOptedOut(){return this._callMethod("hasOptedOut")}getDistinctId(){return this._callMethod("getDistinctId")}track(t,e,r){if(this.shouldTrack){if(r){const r={event:t,properties:e};try{const t=JSON.stringify(r);if(this.oneTimers[t])return;this.oneTimers[t]=!0}catch(t){}}0===this.instances.length?this.trackCache.push({event:t,properties:e}):this._callMethod("track",t,e)}}identify(t){this._callMethod("identify",t)}_callMethod(){for(var t=arguments.length,e=new Array(t),r=0;r({name:t.name,value:t[n](...i)})))}},a=(0,n.mS)(),u=a;function c(){this.runtimeStats={},this.level=-1,this.setLevel(1),this._reportError=this._reportError.bind(this)}function h(t,e){let r;"string"==typeof e?r={message:e}:"object"==typeof e&&(r=e),o.track(t,r)}function l(){}c.prototype.initialize=function(t){if(t.eventCallback&&(this.callback=t.eventCallback),this.sessionId=t.sessionId,!this.sessionId){var e=Date.now()+"";this.sessionId=parseFloat((1e4*Math.random()|0)+""+e.substring(4))}"number"==typeof t.logLevel&&this.setLevel(t.logLevel),this.environmentInfo={touch:(0,n.CN)(),env:(0,i._$)(),referer:"undefined"!=typeof window?encodeURI(u.location.href):"",version:a.LMV_VIEWER_VERSION,build_type:a.LMV_BUILD_TYPE};var r={category:"viewer_start",touch:this.environmentInfo.touch,env:this.environmentInfo.env,referer:this.environmentInfo.referer,version:this.environmentInfo.version,build_type:this.environmentInfo.build_type};this.track(r);var s=this;this.interval=setInterval((function(){s.reportRuntimeStats()}),6e4)},c.prototype.shutdown=function(){clearInterval(this.interval),this.interval=void 0},c.prototype.track=function(t){this.updateRuntimeStats(t),!(0,i.aK)()&&this.sessionId&&(this.callback&&(t.timestamp=Date.now(),t.sessionId=this.sessionId,this.callback(t)),"error"===(null==t?void 0:t.category)&&h("viewer.error.tracked",t))},c.prototype.updateRuntimeStats=function(t){if(Object.prototype.hasOwnProperty.call(t,"aggregate"))switch(t.aggregate){case"count":this.runtimeStats[t.name]>0?this.runtimeStats[t.name]++:this.runtimeStats[t.name]=1,this.runtimeStats._nonempty=!0;break;case"last":this.runtimeStats[t.name]=t.value,this.runtimeStats._nonempty=!0;break;default:this.warn("unknown log aggregate type")}},c.prototype.reportRuntimeStats=function(){this.runtimeStats._nonempty&&(delete this.runtimeStats._nonempty,this.runtimeStats.category="misc_stats",this.track(this.runtimeStats),this.runtimeStats={})},c.prototype.setLevel=function(t){this.level!==t&&(this.level=t,this.debug=t>=5?console.log:l,this.log=t>=4?console.log:l,this.info=t>=3?console.info:l,this.warn=t>=2?console.warn:l,this.error=t>=1?this._reportError:l)},c.prototype._reportError=function(){console.error.apply(console,arguments);const t=Array.prototype.slice.call(arguments).join(" ");this.callback&&this.callback({category:"error",message:t}),h("viewer.error.logged",t)};let f=new c},5468:(t,e,r)=>{"use strict";function n(t,e){var r,n;this.bytes_per_node=e?32:36,t instanceof ArrayBuffer?(r=t.byteLength/this.bytes_per_node,n=t,this.nodeCount=r):(r=0|t,n=new ArrayBuffer(this.bytes_per_node*r),this.nodeCount=0),this.nodeCapacity=r,this.nodesRaw=n,this.is_lean_node=e,this.node_stride=this.bytes_per_node/4,this.node_stride_short=this.bytes_per_node/2,this.nodesF=new Float32Array(this.nodesRaw),this.nodesI=new Int32Array(this.nodesRaw),this.nodesS=new Uint16Array(this.nodesRaw)}r.d(e,{iD:()=>h}),n.prototype.setLeftChild=function(t,e){this.nodesI[t*this.node_stride+6]=e},n.prototype.getLeftChild=function(t){return this.nodesI[t*this.node_stride+6]},n.prototype.setPrimStart=function(t,e){this.is_lean_node?this.nodesI[t*this.node_stride+6]=e:this.nodesI[t*this.node_stride+8]=e},n.prototype.getPrimStart=function(t){return this.is_lean_node?this.nodesI[t*this.node_stride+6]:this.nodesI[t*this.node_stride+8]},n.prototype.setPrimCount=function(t,e){this.nodesS[t*this.node_stride_short+14]=e},n.prototype.getPrimCount=function(t){return this.nodesS[t*this.node_stride_short+14]},n.prototype.setFlags=function(t,e,r,n){this.nodesS[t*this.node_stride_short+15]=n<<3|r<<2|3&e},n.prototype.getFlags=function(t){return this.nodesS[t*this.node_stride_short+15]},n.prototype.setBox0=function(t,e){var r=t*this.node_stride,n=this.nodesF;n[r]=e[0],n[r+1]=e[1],n[r+2]=e[2],n[r+3]=e[3],n[r+4]=e[4],n[r+5]=e[5]},n.prototype.getBoxThree=function(t,e){var r=t*this.node_stride,n=this.nodesF;e.min.x=n[r],e.min.y=n[r+1],e.min.z=n[r+2],e.max.x=n[r+3],e.max.y=n[r+4],e.max.z=n[r+5]},n.prototype.getBoxArray=function(t,e,r){var n=t*this.node_stride,i=this.nodesF;e[0+(r=r||0)]=i[n],e[1+r]=i[n+1],e[2+r]=i[n+2],e[3+r]=i[n+3],e[4+r]=i[n+4],e[5+r]=i[n+5]},n.prototype.setBoxThree=function(t,e){var r=t*this.node_stride,n=this.nodesF;n[r]=e.min.x,n[r+1]=e.min.y,n[r+2]=e.min.z,n[r+3]=e.max.x,n[r+4]=e.max.y,n[r+5]=e.max.z},n.prototype.makeEmpty=function(t){var e=t*this.node_stride,r=this.nodesI;r[e+6]=-1,r[e+7]=0,this.is_lean_node||(r[e+8]=-1)},n.prototype.realloc=function(t){if(this.nodeCount+t>this.nodeCapacity){var e=0|3*this.nodeCapacity/2;ee[r]&&(t[0]=e[r]),t[3]e[r+1]&&(t[1]=e[r+1]),t[4]e[r+2]&&(t[2]=e[r+2]),t[5]e[r]&&(t[0]=e[r]),t[1]>e[r+1]&&(t[1]=e[r+1]),t[2]>e[r+2]&&(t[2]=e[r+2]),t[3]e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]>e[2]&&(t[2]=e[2]),t[3]y[0]&&(S=1),y[2]>y[S]&&(S=2),_.setBox0(u,d);var P=0,k=0,C=f-l+1;let T=!1;if(o.finfo.hasPolygonCounts&&o.frags_per_inner_node){let t=new Set;var M=C<=o.frags_per_inner_node?f:l+o.frags_per_inner_node-1;const e=o.prim_sizes[o.primitives[l]];let r,n=l;for(;n<=M;n++){const i=o.primitives[n];if(T=(P+=o.finfo.getPolygonCount(i))>O,r=e/o.prim_sizes[i],T||=e>s&&r>o.max_size_ratio,o.per_tile_consolidation&&(t.add(o.finfo.getDrawCallId(i)),T||=t.size>=o.max_drawcalls_per_node),k++,T){++n;break}}if(o.per_tile_consolidation&&t.size>=o.max_drawcalls_per_node){const i=n;let a=[],u=[],c=!1;for(;n<=M;n++){const i=o.primitives[n],h=o.finfo.getPolygonCount(i);if(t.has(o.finfo.getDrawCallId(i))){if(c||=P+h>O,r=e/o.prim_sizes[i],c||=e>s&&r>o.max_size_ratio,c)break;a.push(i),k++,P+=h}else u.push(i)}if(a.length>0){n=i;for(let t=0;t15||y[S]e.frags_per_inner_node&&(d=e.frags_per_inner_node),d>h&&(d=h),r.setPrimStart(i,s),r.setPrimCount(i,d),s+=d,a(u);for(var p=s;p<=o;p++)t(u,f,3*l[p]);n(c,0,u,0);var m=0;return c[1]>c[0]&&(m=1),c[2]>c[m]&&(m=2),m}(o,_,u,l,f,b,y,k),l+=_.getPrimCount(u));var E=new h;if(function(n,s,o,a,u,h,l){if(h[a]o-s+1&&(y=o-s+1),f=0;f=u&&(b=u-1),g[v]=b,p[b].num_prims++,e(p[b].box_bbox,l,y*f),t(p[b].box_centroid,c,3*y)}}(n,s,o,a,u,h,y),i(m[0].BL,p[0].box_bbox),i(m[0].CL,p[0].box_centroid),m[0].AL=c(m[0].BL),m[0].NL=p[0].num_prims,f=1;f=1;f--){d=p[f],r(g,d.box_bbox),r(v,d.box_centroid);var A=(x=c(g))*(w+=d.num_prims)+m[f-1].AL*m[f-1].NL;A<=I&&(I=A,_=f,i(l.vb_right,g),i(l.cb_right,v),i(l.vb_left,m[f-1].BL),i(l.cb_left,m[f-1].CL),l.num_left=m[f-1].NL)}l.best_split=_,l.best_cost=I}}(o,l,f,S,b,y,E),E.num_bins<0)_.setPrimCount(u,_.getPrimCount(u)+f-l+1);else{!function(t,e,r,n,i,s,o){var a,u,c=t.primitives,h=t.sort_prims,l=0,f=0|e,d=0|o.best_split;for(a=e;a<=r;a++){var p=0|c[a];h[a]=r.first_transparent?(t(c,p,3*x),e(u,m,g*x)):(t(o,p,3*x),e(i,m,g*x))}n(y,0,r.boxv_o,0);var w=Math.max(y[0],y[1],y[2]);r.scene_epsilon=s*w},box_area:function(t,e){return u(t[e+3]-t[e],t[e+4]-t[e+1],t[e+5]-t[e+2])},sqr_diag_len:function(t,e){var r=t[e+3]-t[e],n=t[e+4]-t[e+1],i=t[e+5]-t[e+2];return r*r+n*n+i*i},box_area_three:function(t){return u(t.max.x-t.min.x,t.max.y-t.min.y,t.max.z-t.min.z)}}}();function a(t,e){this.boxes=t.boxes,this.polygonCounts=t.polygonCounts,this.hasPolygonCounts=!!this.polygonCounts,this.geomIds=t.geomids,this.flags=t.flags,this.materials=t.materials,this.materialDefs=e,this.count=t.length,this.boxStride=6,this.wantSort=t.wantSort??!0}a.prototype.getCount=function(){return this.count},a.prototype.isTransparent=function(t){return this.flags?!!(this.flags[t]&u.IS_TRANSPARENT):!(!this.materialDefs||!this.materialDefs[this.materials[t]])&&this.materialDefs[this.materials[t]].transparent},a.prototype.getPolygonCount=function(t){return this.polygonCounts[t]},a.prototype.getGeometryId=function(t){return this.geomIds[t]},a.prototype.getCanBeConsolidated=function(t){return!!this.flags[t]&u.IS_CONSOLIDATED},a.prototype.getDrawCallId=function(t){return`${this.materials[t]}${this.getCanBeConsolidated(t)?"":"_"+this.getGeometryId(t)}`},a.prototype.supportsPerTileConsolidation=function(){return!!this.materials&&!!this.flags&&!!this.geomIds};const u=Object.freeze({IS_CONSOLIDATED:1,IS_TRANSPARENT:2}),c=Object.freeze({BOX_AREA:"box_area",DIAMETER:"sqr_diag_len"});function h(t,e,r){this.finfo=r||new a(t,e),this.prim_count=this.finfo.getCount(),this.frags_per_leaf_node=-1,this.frags_per_inner_node=-1,this.nodes=null,this.work_buf=new ArrayBuffer(4*this.prim_count),this.sort_prims=new Int32Array(this.work_buf),this.primitives=new Int32Array(this.prim_count),this.centroids=new Float32Array(i*this.prim_count),this.boxv_o=new Float32Array(6),this.boxc_o=new Float32Array(6),this.boxv_t=new Float32Array(6),this.boxc_t=new Float32Array(6),this.recursion_stack=[]}h.prototype.sortPrimitives=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BOX_AREA;var r=new Float32Array(this.max_size_ratio===1/0?this.work_buf:this.prim_count),n=this.primitives,i=0,s=t;const a=o[e];var u,h;for(u=0,h=this.prim_count;u=0?n[d++]=n[u]:f[p++]=n[u];n.set(f,this.prim_count-i)}this.prim_sizes=r,this.first_transparent=this.prim_count-i},h.prototype.build=function(t){var e=t&&!!t.useSlimNodes,r=this;function i(e,n){Object.prototype.hasOwnProperty.call(t,e)?r[e]=t[e]:r[e]=n}if(i("max_size_ratio",1/0),i("per_tile_consolidation",!1),t.sortFuncType===c.DIAMETER&&(this.max_size_ratio*=this.max_size_ratio),e)i("frags_per_leaf_node",1),i("frags_per_inner_node",0),i("frags_per_leaf_node_transparent",1),i("frags_per_inner_node_transparent",0),i("max_polys_per_node",1/0);else{var s=t.isWeakDevice?.5:1;i("frags_per_leaf_node",0|256*s),i("frags_per_inner_node",0|this.frags_per_leaf_node),i("frags_per_leaf_node_transparent",this.frags_per_leaf_node),i("frags_per_inner_node_transparent",0),i("max_polys_per_node",0|2e4*s),i("max_drawcalls_per_node",1/0),i("want_sort",this.finfo.wantSort)}if(this.per_tile_consolidation=this.per_tile_consolidation&&this.finfo.supportsPerTileConsolidation()&&this.want_sort,this.nodes&&this.nodes.is_lean_node==e)this.nodes.nodeCount=0;else{for(var a=this.prim_count/this.frags_per_leaf_node,u=1;u{"use strict";r.d(e,{K:()=>i});var n=r(6118);let i=function(t,e){this.min=void 0!==t?t:new n.S(1/0,1/0,1/0),this.max=void 0!==e?e:new n.S(-1/0,-1/0,-1/0)};var s,o,a;i.prototype={constructor:i,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,r=t.length;ethis.max.x||t.ythis.max.y||t.zthis.max.z)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z},getParameter:function(t,e){return(e||new n.S).set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))},isIntersectionBox:function(t){return!(t.max.xthis.max.x||t.max.ythis.max.y||t.max.zthis.max.z)},intersectsBox:function(t){return this.isIntersectionBox(t)},clampPoint:function(t,e){return(e||new n.S).copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new n.S;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},applyMatrix4:(s=new n.S,o=new n.S,function(t){for(var e=t.elements,r=0;r<3;r++){let t=e[12+r],u=t;for(var n=0;n<3;n++){var i=e[r+4*n]*this.min.getComponent(n),a=e[r+4*n]*this.max.getComponent(n);t+=Math.min(i,a),u+=Math.max(i,a)}s.setComponent(r,t),o.setComponent(r,u)}return this.min.copy(s),this.max.copy(o),this}),translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}},7365:(t,e,r)=>{"use strict";r.d(e,{T:()=>i});var n=r(6118);let i=function(t){this.elements=t?new Float64Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]):new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.isDoublePrecision=!!t};var s,o,a,u,c;i.prototype={constructor:i,set:function(t,e,r,n,i,s,o,a,u,c,h,l,f,d,p,m){var g=this.elements;return g[0]=t,g[4]=e,g[8]=r,g[12]=n,g[1]=i,g[5]=s,g[9]=o,g[13]=a,g[2]=u,g[6]=c,g[10]=h,g[14]=l,g[3]=f,g[7]=d,g[11]=p,g[15]=m,this},identity:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},copy:function(t){return this.elements.set(t.elements),this},makeRotationFromQuaternion:function(t){var e=this.elements,r=t.x,n=t.y,i=t.z,s=t.w,o=r+r,a=n+n,u=i+i,c=r*o,h=r*a,l=r*u,f=n*a,d=n*u,p=i*u,m=s*o,g=s*a,v=s*u;return e[0]=1-(f+p),e[4]=h-v,e[8]=l+g,e[1]=h+v,e[5]=1-(c+p),e[9]=d-m,e[2]=l-g,e[6]=d+m,e[10]=1-(c+f),e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},multiply:function(t){return this.multiplyMatrices(this,t)},multiplyMatrices:function(t,e){var r=t.elements,n=e.elements,i=this.elements,s=r[0],o=r[4],a=r[8],u=r[12],c=r[1],h=r[5],l=r[9],f=r[13],d=r[2],p=r[6],m=r[10],g=r[14],v=r[3],y=r[7],b=r[11],x=r[15],w=n[0],_=n[4],I=n[8],A=n[12],O=n[1],S=n[5],P=n[9],k=n[13],C=n[2],T=n[6],M=n[10],E=n[14],F=n[3],R=n[7],z=n[11],V=n[15];return i[0]=s*w+o*O+a*C+u*F,i[4]=s*_+o*S+a*T+u*R,i[8]=s*I+o*P+a*M+u*z,i[12]=s*A+o*k+a*E+u*V,i[1]=c*w+h*O+l*C+f*F,i[5]=c*_+h*S+l*T+f*R,i[9]=c*I+h*P+l*M+f*z,i[13]=c*A+h*k+l*E+f*V,i[2]=d*w+p*O+m*C+g*F,i[6]=d*_+p*S+m*T+g*R,i[10]=d*I+p*P+m*M+g*z,i[14]=d*A+p*k+m*E+g*V,i[3]=v*w+y*O+b*C+x*F,i[7]=v*_+y*S+b*T+x*R,i[11]=v*I+y*P+b*M+x*z,i[15]=v*A+y*k+b*E+x*V,this},multiplyToArray:function(t,e,r){var n=this.elements;return this.multiplyMatrices(t,e),r[0]=n[0],r[1]=n[1],r[2]=n[2],r[3]=n[3],r[4]=n[4],r[5]=n[5],r[6]=n[6],r[7]=n[7],r[8]=n[8],r[9]=n[9],r[10]=n[10],r[11]=n[11],r[12]=n[12],r[13]=n[13],r[14]=n[14],r[15]=n[15],this},multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this},determinant:function(){var t=this.elements,e=t[0],r=t[4],n=t[8],i=t[12],s=t[1],o=t[5],a=t[9],u=t[13],c=t[2],h=t[6],l=t[10],f=t[14];return t[3]*(+i*a*h-n*u*h-i*o*l+r*u*l+n*o*f-r*a*f)+t[7]*(+e*a*f-e*u*l+i*s*l-n*s*f+n*u*c-i*a*c)+t[11]*(+e*u*h-e*o*f-i*s*h+r*s*f+i*o*c-r*u*c)+t[15]*(-n*o*c-e*a*h+e*o*l+n*s*h-r*s*l+r*a*c)},transpose:function(){var t,e=this.elements;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this},flattenToArrayOffset:function(t,e){var r=this.elements;return t[e]=r[0],t[e+1]=r[1],t[e+2]=r[2],t[e+3]=r[3],t[e+4]=r[4],t[e+5]=r[5],t[e+6]=r[6],t[e+7]=r[7],t[e+8]=r[8],t[e+9]=r[9],t[e+10]=r[10],t[e+11]=r[11],t[e+12]=r[12],t[e+13]=r[13],t[e+14]=r[14],t[e+15]=r[15],t},setPosition:function(t){var e=this.elements;return e[12]=t.x,e[13]=t.y,e[14]=t.z,this},invert:function(t){const e=this.elements,r=e[0],n=e[1],i=e[2],s=e[3],o=e[4],a=e[5],u=e[6],c=e[7],h=e[8],l=e[9],f=e[10],d=e[11],p=e[12],m=e[13],g=e[14],v=e[15],y=l*g*c-m*f*c+m*u*d-a*g*d-l*u*v+a*f*v,b=p*f*c-h*g*c-p*u*d+o*g*d+h*u*v-o*f*v,x=h*m*c-p*l*c+p*a*d-o*m*d-h*a*v+o*l*v,w=p*l*u-h*m*u-p*a*f+o*m*f+h*a*g-o*l*g,_=r*y+n*b+i*x+s*w;if(0===_)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const I=1/_;return e[0]=y*I,e[1]=(m*f*s-l*g*s-m*i*d+n*g*d+l*i*v-n*f*v)*I,e[2]=(a*g*s-m*u*s+m*i*c-n*g*c-a*i*v+n*u*v)*I,e[3]=(l*u*s-a*f*s-l*i*c+n*f*c+a*i*d-n*u*d)*I,e[4]=b*I,e[5]=(h*g*s-p*f*s+p*i*d-r*g*d-h*i*v+r*f*v)*I,e[6]=(p*u*s-o*g*s-p*i*c+r*g*c+o*i*v-r*u*v)*I,e[7]=(o*f*s-h*u*s+h*i*c-r*f*c-o*i*d+r*u*d)*I,e[8]=x*I,e[9]=(p*l*s-h*m*s-p*n*d+r*m*d+h*n*v-r*l*v)*I,e[10]=(o*m*s-p*a*s+p*n*c-r*m*c-o*n*v+r*a*v)*I,e[11]=(h*a*s-o*l*s-h*n*c+r*l*c+o*n*d-r*a*d)*I,e[12]=w*I,e[13]=(h*m*i-p*l*i+p*n*f-r*m*f-h*n*g+r*l*g)*I,e[14]=(p*a*i-o*m*i-p*n*u+r*m*u+o*n*g-r*a*g)*I,e[15]=(o*l*i-h*a*i+h*n*u-r*l*u-o*n*f+r*a*f)*I,this},getInverse:function(t,e){if(console.warn("LmvMatrix4.getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(t).invert(),0===this.determinant()){const t="Matrix4.getInverse(): can't invert matrix, determinant is 0";if(e)throw new Error(t);console.warn(t),this.identity()}return this},scale:function(t){var e=this.elements,r=t.x,n=t.y,i=t.z;return e[0]*=r,e[4]*=n,e[8]*=i,e[1]*=r,e[5]*=n,e[9]*=i,e[2]*=r,e[6]*=n,e[10]*=i,e[3]*=r,e[7]*=n,e[11]*=i,this},getMaxScaleOnAxis:function(){var t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],r=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],n=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,Math.max(r,n)))},makeTranslation:function(t,e,r){return this.set(1,0,0,t,0,1,0,e,0,0,1,r,0,0,0,1),this},makeRotationX:function(t){var e=Math.cos(t),r=Math.sin(t);return this.set(1,0,0,0,0,e,-r,0,0,r,e,0,0,0,0,1),this},makeRotationY:function(t){var e=Math.cos(t),r=Math.sin(t);return this.set(e,0,r,0,0,1,0,0,-r,0,e,0,0,0,0,1),this},makeRotationZ:function(t){var e=Math.cos(t),r=Math.sin(t);return this.set(e,-r,0,0,r,e,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(t,e){var r=Math.cos(e),n=Math.sin(e),i=1-r,s=t.x,o=t.y,a=t.z,u=i*s,c=i*o;return this.set(u*s+r,u*o-n*a,u*a+n*o,0,u*o+n*a,c*o+r,c*a-n*s,0,u*a-n*o,c*a+n*s,i*a*a+r,0,0,0,0,1),this},makeScale:function(t,e,r){return this.set(t,0,0,0,0,e,0,0,0,0,r,0,0,0,0,1),this},lookAt:(a=new n.S,u=new n.S,c=new n.S,function(t,e,r){var n=this.elements;return c.subVectors(t,e).normalize(),0===c.length()&&(c.z=1),a.crossVectors(r,c).normalize(),0===a.length()&&(c.x+=1e-4,a.crossVectors(r,c).normalize()),u.crossVectors(c,a),n[0]=a.x,n[4]=u.x,n[8]=c.x,n[1]=a.y,n[5]=u.y,n[9]=c.y,n[2]=a.z,n[6]=u.z,n[10]=c.z,this}),compose:function(t,e,r){return this.makeRotationFromQuaternion(e),this.scale(r),this.setPosition(t),this},decompose:(s=new n.S,o=new i(!0),function(t,e,r){var n=this.elements,i=s.set(n[0],n[1],n[2]).length(),a=s.set(n[4],n[5],n[6]).length(),u=s.set(n[8],n[9],n[10]).length();this.determinant()<0&&(i=-i),t.x=n[12],t.y=n[13],t.z=n[14],o.elements.set(this.elements);var c=1/i,h=1/a,l=1/u;return o.elements[0]*=c,o.elements[1]*=c,o.elements[2]*=c,o.elements[4]*=h,o.elements[5]*=h,o.elements[6]*=h,o.elements[8]*=l,o.elements[9]*=l,o.elements[10]*=l,e.setFromRotationMatrix(o),r.x=i,r.y=a,r.z=u,this}),transformPoint:function(t){var e=t.x,r=t.y,n=t.z,i=this.elements;return t.x=i[0]*e+i[4]*r+i[8]*n+i[12],t.y=i[1]*e+i[5]*r+i[9]*n+i[13],t.z=i[2]*e+i[6]*r+i[10]*n+i[14],t},transformDirection:function(t){var e=t.x,r=t.y,n=t.z,i=this.elements;t.x=i[0]*e+i[4]*r+i[8]*n,t.y=i[1]*e+i[5]*r+i[9]*n,t.z=i[2]*e+i[6]*r+i[10]*n;var s=Math.sqrt(t.x*t.x+t.y*t.y+t.z*t.z);if(s>0){var o=1/s;t.x*=o,t.y*=o,t.z*=o}return t},equals(t){const e=this.elements,r=t.elements;for(var n=0;n<16;n++)if(e[n]!==r[n])return!1;return!0},fromArray:function(t){return this.elements.set(t),this},toArray:function(){var t=this.elements;return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]},clone:function(){return new i(this.isDoublePrecision).fromArray(this.elements)}}},6118:(t,e,r)=>{"use strict";r.d(e,{S:()=>n});let n=function(t,e,r){this.x=t||0,this.y=e||0,this.z=r||0};var i,s,o,a;n.prototype={constructor:n,set:function(t,e,r){return this.x=t,this.y=e,this.z=r,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this},multiply:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(t,e)):(this.x*=t.x,this.y*=t.y,this.z*=t.z,this)},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this},multiplyVectors:function(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this},applyMatrix3:function(t){var e=this.x,r=this.y,n=this.z,i=t.elements;return this.x=i[0]*e+i[3]*r+i[6]*n,this.y=i[1]*e+i[4]*r+i[7]*n,this.z=i[2]*e+i[5]*r+i[8]*n,this},applyMatrix4:function(t){var e=this.x,r=this.y,n=this.z,i=t.elements;return this.x=i[0]*e+i[4]*r+i[8]*n+i[12],this.y=i[1]*e+i[5]*r+i[9]*n+i[13],this.z=i[2]*e+i[6]*r+i[10]*n+i[14],this},applyProjection:function(t){var e=this.x,r=this.y,n=this.z,i=t.elements,s=1/(i[3]*e+i[7]*r+i[11]*n+i[15]);return this.x=(i[0]*e+i[4]*r+i[8]*n+i[12])*s,this.y=(i[1]*e+i[5]*r+i[9]*n+i[13])*s,this.z=(i[2]*e+i[6]*r+i[10]*n+i[14])*s,this},applyQuaternion:function(t){var e=this.x,r=this.y,n=this.z,i=t.x,s=t.y,o=t.z,a=t.w,u=a*e+s*n-o*r,c=a*r+o*e-i*n,h=a*n+i*r-s*e,l=-i*e-s*r-o*n;return this.x=u*a+l*-i+c*-o-h*-s,this.y=c*a+l*-s+h*-i-u*-o,this.z=h*a+l*-o+u*-s-c*-i,this},transformDirection:function(t){var e=this.x,r=this.y,n=this.z,i=t.elements;return this.x=i[0]*e+i[4]*r+i[8]*n,this.y=i[1]*e+i[5]*r+i[9]*n,this.z=i[2]*e+i[6]*r+i[10]*n,this.normalize(),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){if(0!==t){var e=1/t;this.x*=e,this.y*=e,this.z*=e}else this.x=0,this.y=0,this.z=0;return this},min:function(t){return this.x>t.x&&(this.x=t.x),this.y>t.y&&(this.y=t.y),this.z>t.z&&(this.z=t.z),this},max:function(t){return this.xe.x&&(this.x=e.x),this.ye.y&&(this.y=e.y),this.ze.z&&(this.z=e.z),this},clampScalar:function(t,e){return void 0===o&&(o=new n,a=new n),o.set(t,t,t),a.set(e,e,e),this.clamp(o,a)},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length())},setLength:function(t){var e=this.length();return 0!==e&&t!==e&&this.multiplyScalar(t/e),this},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this},lerpVectors:function(t,e,r){return this.subVectors(e,t).multiplyScalar(r).add(t),this},cross:function(t,e){if(void 0!==e)return console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e);var r=this.x,n=this.y,i=this.z;return this.x=n*t.z-i*t.y,this.y=i*t.x-r*t.z,this.z=r*t.y-n*t.x,this},crossVectors:function(t,e){var r=t.x,n=t.y,i=t.z,s=e.x,o=e.y,a=e.z;return this.x=n*a-i*o,this.y=i*s-r*a,this.z=r*o-n*s,this},projectOnVector:function(t){return void 0===i&&(i=new n),i.copy(t).normalize(),s=this.dot(i),this.copy(i).multiplyScalar(s)},projectOnPlane:function(){var t;return function(e){return void 0===t&&(t=new n),t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t;return function(e){return void 0===t&&(t=new n),this.sub(t.copy(e).multiplyScalar(2*this.dot(e)))}}(),distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,r=this.y-t.y,n=this.z-t.z;return e*e+r*r+n*n},setEulerFromRotationMatrix:function(t,e){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},setEulerFromQuaternion:function(t,e){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},getPositionFromMatrix:function(t){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(t)},getScaleFromMatrix:function(t){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(t)},getColumnFromMatrix:function(t,e){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(t,e)},setFromMatrixPosition:function(t){return this.x=t.elements[12],this.y=t.elements[13],this.z=t.elements[14],this},setFromMatrixScale:function(t){var e=this.set(t.elements[0],t.elements[1],t.elements[2]).length(),r=this.set(t.elements[4],t.elements[5],t.elements[6]).length(),n=this.set(t.elements[8],t.elements[9],t.elements[10]).length();return this.x=e,this.y=r,this.z=n,this},setFromMatrixColumn:function(t,e){var r=4*t,n=e.elements;return this.x=n[r],this.y=n[r+1],this.z=n[r+2],this},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t},fromAttribute:function(t,e,r){return void 0===r&&(r=0),e=e*t.itemSize+r,this.x=t.array[e],this.y=t.array[e+1],this.z=t.array[e+2],this}}},4406:function(t,e,r){"use strict";var n=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,s){function o(t){try{u(n.next(t))}catch(t){s(t)}}function a(t){try{u(n.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(o,a)}u((n=n.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var r,n,i,s,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]=this.options.numOfAttempts},enumerable:!0,configurable:!0}),t.prototype.applyDelay=function(){return n(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,o.DelayFactory(this.options,this.attemptNumber).apply()];case 1:return t.sent(),[2]}}))}))},t}()},8348:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e}(r(6698).Delay);e.AlwaysDelay=s},6698:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(6071),i=function(){function t(t){this.options=t,this.attempt=0}return t.prototype.apply=function(){var t=this;return new Promise((function(e){return setTimeout(e,t.jitteredDelay)}))},t.prototype.setAttemptNumber=function(t){this.attempt=t},Object.defineProperty(t.prototype,"jitteredDelay",{get:function(){return n.JitterFactory(this.options)(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"delay",{get:function(){var t=this.options.startingDelay,e=this.options.timeMultiple,r=this.numOfDelayedAttempts,n=t*Math.pow(e,r);return Math.min(n,this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),t}();e.Delay=i},5757:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(7510),i=r(8348);e.DelayFactory=function(t,e){var r=function(t){return t.delayFirstAttempt?new i.AlwaysDelay(t):new n.SkipFirstDelay(t)}(t);return r.setAttemptNumber(e),r}},7510:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),s=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,s){function o(t){try{u(n.next(t))}catch(t){s(t)}}function a(t){try{u(n.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(o,a)}u((n=n.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var r,n,i,s,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fullJitter=function(t){var e=Math.random()*t;return Math.round(e)}},6071:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(8500),i=r(4764);e.JitterFactory=function(t){return"full"===t.jitter?n.fullJitter:i.noJitter}},4764:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.noJitter=function(t){return t}},784:function(t,e){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,r=1,n=arguments.length;r{"use strict";r.d(e,{AO:()=>ct,Wt:()=>nt,u3:()=>rt});var n=Uint8Array,i=Uint16Array,s=Int32Array,o=new n([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),a=new n([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),u=new n([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),c=function(t,e){for(var r=new i(31),n=0;n<31;++n)r[n]=e+=1<>1|(21845&v)<<1;y=(61680&(y=(52428&y)>>2|(13107&y)<<2))>>4|(3855&y)<<4,g[v]=((65280&y)>>8|(255&y)<<8)>>1}var b=function(t,e,r){for(var n=t.length,s=0,o=new i(e);s>c]=h}else for(a=new i(n),s=0;s>15-t[s]);return a},x=new n(288);for(v=0;v<144;++v)x[v]=8;for(v=144;v<256;++v)x[v]=9;for(v=256;v<280;++v)x[v]=7;for(v=280;v<288;++v)x[v]=8;var w=new n(32);for(v=0;v<32;++v)w[v]=5;var _=b(x,9,0),I=b(x,9,1),A=b(w,5,0),O=b(w,5,1),S=function(t){for(var e=t[0],r=1;re&&(e=t[r]);return e},P=function(t,e,r){var n=e/8|0;return(t[n]|t[n+1]<<8)>>(7&e)&r},k=function(t,e){var r=e/8|0;return(t[r]|t[r+1]<<8|t[r+2]<<16)>>(7&e)},C=function(t){return(t+7)/8|0},T=function(t,e,r){return(null==e||e<0)&&(e=0),(null==r||r>t.length)&&(r=t.length),new n(t.subarray(e,r))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,e,r){var n=new Error(e||M[t]);if(n.code=t,Error.captureStackTrace&&Error.captureStackTrace(n,E),!r)throw n;return n},F=function(t,e,r,i){var s=t.length,c=i?i.length:0;if(!s||e.f&&!e.l)return r||new n(0);var h=!r,f=h||2!=e.i,d=e.i;h&&(r=new n(3*s));var m=function(t){var e=r.length;if(t>e){var i=new n(Math.max(2*e,t));i.set(r),r=i}},g=e.f||0,v=e.p||0,y=e.b||0,x=e.l,w=e.d,_=e.m,A=e.n,M=8*s;do{if(!x){g=P(t,v,1);var F=P(t,v+1,3);if(v+=3,!F){var R=t[(q=C(v)+4)-4]|t[q-3]<<8,z=q+R;if(z>s){d&&E(0);break}f&&m(y+R),r.set(t.subarray(q,z),y),e.b=y+=R,e.p=v=8*z,e.f=g;continue}if(1==F)x=I,w=O,_=9,A=5;else if(2==F){var V=P(t,v,31)+257,U=P(t,v+10,15)+4,D=V+P(t,v+5,31)+1;v+=14;for(var L=new n(D),j=new n(19),N=0;N>4)<16)L[N++]=q;else{var $=0,Q=0;for(16==q?(Q=3+P(t,v,3),v+=2,$=L[N-1]):17==q?(Q=3+P(t,v,7),v+=3):18==q&&(Q=11+P(t,v,127),v+=7);Q--;)L[N++]=$}}var K=L.subarray(0,V),X=L.subarray(V);_=S(K),A=S(X),x=b(K,_,1),w=b(X,A,1)}else E(1);if(v>M){d&&E(0);break}}f&&m(y+131072);for(var Y=(1<<_)-1,J=(1<>4;if((v+=15&$)>M){d&&E(0);break}if($||E(2),tt<256)r[y++]=tt;else{if(256==tt){Z=v,x=null;break}var et=tt-254;if(tt>264){var rt=o[N=tt-257];et=P(t,v,(1<>4;if(nt||E(3),v+=15&nt,X=p[it],it>3&&(rt=a[it],X+=k(t,v)&(1<M){d&&E(0);break}f&&m(y+131072);var st=y+et;if(y>8},z=function(t,e,r){r<<=7&e;var n=e/8|0;t[n]|=r,t[n+1]|=r>>8,t[n+2]|=r>>16},V=function(t,e){for(var r=[],s=0;sp&&(p=a[s].s);var m=new i(p+1),g=U(r[f-1],m,0);if(g>e){s=0;var v=0,y=g-e,b=1<e))break;v+=b-(1<>=y;v>0;){var w=a[s].s;m[w]=0&&v;--s){var _=a[s].s;m[_]==e&&(--m[_],++v)}g=e}return{t:new n(m),l:g}},U=function(t,e,r){return-1==t.s?Math.max(U(t.l,e,r+1),U(t.r,e,r+1)):e[t.s]=r},D=function(t){for(var e=t.length;e&&!t[--e];);for(var r=new i(++e),n=0,s=t[0],o=1,a=function(t){r[n++]=t},u=1;u<=e;++u)if(t[u]==s&&u!=e)++o;else{if(!s&&o>2){for(;o>138;o-=138)a(32754);o>2&&(a(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(a(s),--o;o>6;o-=6)a(8304);o>2&&(a(o-3<<5|8208),o=0)}for(;o--;)a(s);o=1,s=t[u]}return{c:r.subarray(0,n),n:e}},L=function(t,e){for(var r=0,n=0;n>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s4&&!N[u[W-1]];--W);var G,q,H,$,Q=d+5<<3,K=L(s,x)+L(c,w)+h,X=L(s,g)+L(c,I)+h+14+3*W+L(E,N)+2*E[16]+3*E[17]+7*E[18];if(f>=0&&Q<=K&&Q<=X)return j(e,p,t.subarray(f,f+d));if(R(e,p,1+(X15&&(R(e,p,tt[F]>>5&127),p+=tt[F]>>12)}}}else G=_,q=x,H=A,$=w;for(F=0;F255){z(e,p,G[257+(et=rt>>18&31)]),p+=q[et+257],et>7&&(R(e,p,rt>>23&31),p+=o[et]);var nt=31&rt;z(e,p,H[nt]),p+=$[nt],nt>3&&(z(e,p,rt>>5&8191),p+=a[nt])}else z(e,p,G[rt]),p+=q[rt]}return z(e,p,G[256]),p+q[256]},B=new s([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),W=new n(0),G=function(){for(var t=new Int32Array(256),e=0;e<256;++e){for(var r=e,n=9;--n;)r=(1&r&&-306674912)^r>>>1;t[e]=r}return t}(),q=function(){var t=-1;return{p:function(e){for(var r=t,n=0;n>>8;t=r},d:function(){return~t}}},H=function(t,e,r,u,c){if(!c&&(c={l:1},e.dictionary)){var h=e.dictionary.subarray(-32768),l=new n(h.length+t.length);l.set(h),l.set(t,h.length),t=l,c.w=h.length}return function(t,e,r,u,c,h){var l=h.z||t.length,d=new n(u+l+5*(1+Math.ceil(l/7e3))+c),p=d.subarray(u,d.length-c),g=h.l,v=7&(h.r||0);if(e){v&&(p[0]=h.r>>3);for(var y=B[e-1],b=y>>13,x=8191&y,w=(1<7e3||z>24576)&&(G>423||!g)){v=N(t,p,0,P,k,M,F,z,U,R-U,v),z=E=F=0,U=R;for(var q=0;q<286;++q)k[q]=0;for(q=0;q<30;++q)M[q]=0}var H=2,$=0,Q=x,K=L-W&32767;if(G>2&&D==S(R-K))for(var X=Math.min(b,G)-1,Y=Math.min(32767,R),J=Math.min(258,G);K<=Y&&--Q&&L!=W;){if(t[R+H]==t[R+H-K]){for(var Z=0;ZH){if(H=Z,$=K,Z>X)break;var tt=Math.min(K,Z-2),et=0;for(q=0;qet&&(et=nt,W=rt)}}}K+=(L=W)-(W=_[L])&32767}if($){P[z++]=268435456|f[H]<<18|m[$];var it=31&f[H],st=31&m[$];F+=o[it]+a[st],++k[257+it],++M[st],V=R+H,++E}else P[z++]=t[R],++k[t[R]]}}for(R=Math.max(R,V);R=l&&(p[v/8|0]=g,ot=l),v=j(p,v+1,t.subarray(R,ot))}h.i=l}return T(d,0,u+C(v)+c)}(t,null==e.level?6:e.level,null==e.mem?c.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):20:12+e.mem,r,u,c)},$=function(t,e){return t[e]|t[e+1]<<8},Q=function(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0},K=function(t,e){return Q(t,e)+4294967296*Q(t,e+4)},X=function(t,e,r){for(;r;++e)t[e]=r,r>>>=8},Y=function(t,e){var r=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=e.level<2?4:9==e.level?2:0,t[9]=3,0!=e.mtime&&X(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),r){t[3]=8;for(var n=0;n<=r.length;++n)t[n+10]=r.charCodeAt(n)}},J=function(t){31==t[0]&&139==t[1]&&8==t[2]||E(6,"invalid gzip data");var e=t[3],r=10;4&e&&(r+=2+(t[10]|t[11]<<8));for(var n=(e>>3&1)+(e>>4&1);n>0;n-=!t[r++]);return r+(2&e)},Z=function(t){var e=t.length;return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0},tt=function(t){return 10+(t.filename?t.filename.length+1:0)};function et(t,e){return F(t,{i:2},e&&e.out,e&&e.dictionary)}function rt(t,e){e||(e={});var r=q(),n=t.length;r.p(t);var i=H(t,e,tt(e),8),s=i.length;return Y(i,e),X(i,s-8,r.d()),X(i,s-4,n),i}function nt(t,e){var r=J(t);return r+8>t.length&&E(6,"invalid gzip data"),F(t.subarray(r,-8),{i:2},e&&e.out||new n(Z(t)),e&&e.dictionary)}var it="undefined"!=typeof TextDecoder&&new TextDecoder;try{it.decode(W,{stream:!0})}catch(t){}function st(t,e){if(e){for(var r="",n=0;n127)+(n>223)+(n>239);if(r+i>t.length)return{s:e,r:T(t,r-1)};i?3==i?(n=((15&n)<<18|(63&t[r++])<<12|(63&t[r++])<<6|63&t[r++])-65536,e+=String.fromCharCode(55296|n>>10,56320|1023&n)):e+=1&i?String.fromCharCode((31&n)<<6|63&t[r++]):String.fromCharCode((15&n)<<12|(63&t[r++])<<6|63&t[r++]):e+=String.fromCharCode(n)}}(t),s=i.s;return(r=i.r).length&&E(8),s}var ot=function(t,e){return e+30+$(t,e+26)+$(t,e+28)},at=function(t,e,r){var n=$(t,e+28),i=st(t.subarray(e+46,e+46+n),!(2048&$(t,e+8))),s=e+46+n,o=Q(t,e+20),a=r&&4294967295==o?ut(t,s):[o,Q(t,e+24),Q(t,e+42)],u=a[0],c=a[1],h=a[2];return[$(t,e+10),u,c,i,s+$(t,e+30)+$(t,e+32),h]},ut=function(t,e){for(;1!=$(t,e);e+=4+$(t,e+2));return[K(t,e+12),K(t,e+4),K(t,e+20)]};function ct(t,e){for(var r={},i=t.length-22;101010256!=Q(t,i);--i)(!i||t.length-i>65558)&&E(13);var s=$(t,i+8);if(!s)return{};var o=Q(t,i+16),a=4294967295==o||65535==s;if(a){var u=Q(t,i-12);(a=101075792==Q(t,u))&&(s=Q(t,u+32),o=Q(t,u+48))}for(var c=e&&e.filter,h=0;h{var n=null;"undefined"!=typeof WebSocket?n=WebSocket:"undefined"!=typeof MozWebSocket?n=MozWebSocket:void 0!==r.g?n=r.g.WebSocket||r.g.MozWebSocket:"undefined"!=typeof window?n=window.WebSocket||window.MozWebSocket:"undefined"!=typeof self&&(n=self.WebSocket||self.MozWebSocket),t.exports=n},1436:t=>{function e(){this.pending=0,this.max=1/0,this.listeners=[],this.waiting=[],this.error=null}function r(t){t.pending+=1;var e=!1;return function(i){if(e)throw new Error("callback called twice");if(e=!0,t.error=t.error||i,t.pending-=1,t.waiting.length>0&&t.pending{"use strict";r.d(e,{x:()=>u});var n=r(5982);const i="_metadata",s="Placeholder value for buckets that failed to open",o="QuotaExceededError";async function a(t){const e=[];for await(const[r,n]of t)"file"===n.kind&&e.push(n.getFile().then((t=>[r,t])));return Promise.all(e)}class u{#e;#r=!1;#n;#i;#s=null;#o=new Map;#a=new Map;#u="";constructor(t,e="otg_cache"){this.#u=e,this.#n=this.#c(),this.#e=t}async#c(){try{const t=await navigator.storage.getDirectory();this.#s=await t.getDirectoryHandle(this.#u,{create:!0})}catch(t){console.warn("Failed to open OPFS cache directory",t),this.#e?.("viewer.opfsCache.cacheOpenFailed",{errorName:t.name,errorMessage:t.message})}this.#n=void 0}async open(t){const e=this.#o.get(t);if(e)return e;let r=this.#a.get(t);return r||(r=(async()=>{let e,r,n;await this.#n;const o=t.replaceAll(/<|>|:|"|\/|\\|\||\?\*/g,"_"),a="opfs-cache-write-lock-"+o;try{if(!this.#s)throw new Error("OPFS cache directory not initialized");const s=await this.#s.getFileHandle(o,{create:!0});e=await s.createSyncAccessHandle({mode:"readwrite-unsafe"});const u=await this.#s.getFileHandle(o+i,{create:!0});r=await u.createSyncAccessHandle({mode:"readwrite-unsafe"});const c=new Uint32Array(1);return c[0]=(new Date).valueOf(),r.write(c,{at:0}),n={dataHandle:e,offsets:new Map,metadataHandle:r},this.#o.set(t,n),await new Promise((t=>{navigator.locks.request(a,{ifAvailable:!0,mode:"exclusive"},(e=>{if(t(),e)return new Promise((t=>{n.writeLock=t}))}))})),this.#h(n)!==n.dataHandle.getSize()&&(console.warn("Data file has unexpected size, clearing OPFS cache for",t),n.offsets.clear(),n.dataHandle.truncate(0),n.metadataHandle.truncate(4)),console.log("Opened OPFS cache bucket",t,"with",n.offsets.size,"entries"),n}catch(i){return"NoModificationAllowedError"===i.name?(console.warn(i.message),console.warn(`Failed to open OPFS cache bucket for ${t}. It is probably open in another tab. Disabling cache.`)):console.warn("Failed to initialize OFPS cache bucket",t,i),this.#s&&this.#e?.("viewer.opfsCache.bucketOpenFailed",{bucketName:t,errorName:i.name,errorMessage:i.message}),e?.close(),r?.close(),n?.writeLock?.(),this.#o.set(t,s),s}finally{this.#a.delete(t)}})(),this.#a.set(t,r),r)}#h(t){t.offsets.clear();const e=t.metadataHandle.getSize()-4,r=new Uint8Array(e),i=new Uint16Array(r.buffer),s=new Uint32Array(r.buffer);t.metadataHandle.read(r,{at:4});let o=0;for(let e=0;et.length)),a=new Uint8Array(24*t.length),u=new Uint32Array(a.buffer),c=new Uint8Array(o.reduce(((t,e)=>t+e),0));let h=0;for(let e=0;esetTimeout(t,0))),i!==this.#o.get(e))return;if(!this.#f(i,c,a)&&(await this.#d(),!this.#f(i,c,a)))return;let l=i.dataHandle.getSize()-c.length;for(let e=0;ee.length)throw new DOMException("Quota Exceeded in Chrome Incognito mode",o);if(n!==e.length)throw new DOMException("Partial write detected")}async get(t,e){const r=new Array(t.length).fill(null);for(let n=0;nt.lastModified-e.lastModified));let o=0;const u=Date.now()-7776e6;for(const t of s){if(t.lastModified>u&&o>=n)break;try{await this.#s.removeEntry(t.name),o+=t.size;const e=t.name.slice(0,-9),r=await(await this.#s.getFileHandle(e)).getFile();await this.#s.removeEntry(e),o+=r.size}catch(t){"NoModificationAllowedError"!==t.name&&console.warn("Error during cache eviction",t)}}return o>=n}async close(){this.#n&&await this.#n,this.#a.size&&await Promise.all(this.#a.values());for(const t of this.#o.values())t&&t!==s&&(t.dataHandle&&(t.dataHandle.flush(),t.dataHandle.close()),t.metadataHandle&&(t.metadataHandle.flush(),t.metadataHandle.close()),t.writeLock?.());this.#o.clear(),await this.#d(0)}async clear(){await this.close(),await this.#d(1)}async getStats(){await this.#n;let t=0,e=0,r=0;if(this.#s)for(const[n,s]of await a(this.#s))n.endsWith(i)?(r+=s.size,t+=(s.size-4)/24):e+=s.size;return{entries:t,dataSize:e,metadataSize:r}}#m(){this.#r||(this.#r=!0,navigator.storage.estimate().then((t=>{this.#e?.("viewer.opfsCache.quotaExceeded",t)})).catch((t=>{console.error("Failed to get storage estimate",t)})))}}},8401:(t,e,r)=>{"use strict";r.d(e,{k:()=>x});var n=r(6247),i=r(3293),s=r(1706);const o={Index:0,IndexEdges:1,Position:2,Normal:3,TextureUV:4,Color:5},a={TRIANGLES:0,LINES:1,POINTS:2,WIDE_LINES:3},u=(o.Position,o.Normal,o.Index,o.IndexEdges,o.Color,{});u[o.Position]="position",u[o.Normal]="normal",u[o.Index]="index",u[o.IndexEdges]="indexlines",u[o.Color]="color",u[o.TextureUV]="uv";const c={};function h(t){if(t.length){t[1]+=t[0],t[2]+=t[0];for(var e=3;e>4,r.bytesPerItem=c[r.type],r.normalized=4===r.type||5===r.type||6===r.type||7===r.type,r.itemOffset=this.buffer.readUInt8(this.readOffset)/4,this.readOffset++,r.itemStride=this.buffer.readUInt8(this.readOffset)/4,this.readOffset++,r.bufferIndex=this.buffer.readUInt8(this.readOffset),this.readOffset++,this.attributes.push(r)}for(;this.readOffset%4!=0;)this.readOffset++;for(let t=0;t>4,r.bytesPerItem=c[r.type],r.normalized=4===r.type||5===r.type||6===r.type||7===r.type,r.itemOffset=t.getUint8()/4,r.itemStride=t.getUint8()/4,r.bufferIndex=t.getUint8(),this.attributes.push(r)}for(;t.offset%4!=0;)t.offset++;for(let e=0;e1&&(v+=i.toString())),n.vbstride?n.vbstride!==c.itemStride&&console.error("Unexpected vertex buffer stride mismatch."):n.vbstride=c.itemStride,c.itemOffset>=c.itemStride||(n.vblayout[v]={bytesPerItem:c.bytesPerItem,offset:c.itemOffset,normalized:c.normalized,itemSize:c.itemSize})}}var y;return{mesh:n,packId:0,meshIndex:0}}var v=r(9861);function y(t){return 31===t[0]&&139===t[1]}function b(t){t.port.onmessage=e=>{switch(e.data.operation){case"DECODE_GEOMETRIES":!function(t,e,r,n){const i=new Array;for(let s=0;st.buffer)))}(t.worker,e.data.hashes,e.data.arrays)}}}function x(t){t.register("INSTALL_INPUT_PORT",{doOperation:b})}},9709:()=>{},684:()=>{},9631:()=>{},8215:()=>{},315:()=>{},9306:(t,e,r)=>{"use strict";var n=r(4901),i=r(6823),s=TypeError;t.exports=function(t){if(n(t))return t;throw new s(i(t)+" is not a function")}},6194:(t,e,r)=>{"use strict";var n=r(2248).has;t.exports=function(t){return n(t),t}},3506:(t,e,r)=>{"use strict";var n=r(3925),i=String,s=TypeError;t.exports=function(t){if(n(t))return t;throw new s("Can't set "+i(t)+" as a prototype")}},7080:(t,e,r)=>{"use strict";var n=r(4402).has;t.exports=function(t){return n(t),t}},6557:(t,e,r)=>{"use strict";var n=r(4995).has;t.exports=function(t){return n(t),t}},3755:(t,e,r)=>{"use strict";var n=r(8205).has;t.exports=function(t){return n(t),t}},6469:(t,e,r)=>{"use strict";var n=r(8227),i=r(2360),s=r(4913).f,o=n("unscopables"),a=Array.prototype;void 0===a[o]&&s(a,o,{configurable:!0,value:i(null)}),t.exports=function(t){a[o][t]=!0}},679:(t,e,r)=>{"use strict";var n=r(1625),i=TypeError;t.exports=function(t,e){if(n(e,t))return t;throw new i("Incorrect invocation")}},8551:(t,e,r)=>{"use strict";var n=r(34),i=String,s=TypeError;t.exports=function(t){if(n(t))return t;throw new s(i(t)+" is not an object")}},7811:t=>{"use strict";t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},5652:(t,e,r)=>{"use strict";var n=r(9039);t.exports=n((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},4644:(t,e,r)=>{"use strict";var n,i,s,o=r(7811),a=r(3724),u=r(4475),c=r(4901),h=r(34),l=r(9297),f=r(6955),d=r(6823),p=r(6699),m=r(6840),g=r(2106),v=r(1625),y=r(2787),b=r(2967),x=r(8227),w=r(3392),_=r(1181),I=_.enforce,A=_.get,O=u.Int8Array,S=O&&O.prototype,P=u.Uint8ClampedArray,k=P&&P.prototype,C=O&&y(O),T=S&&y(S),M=Object.prototype,E=u.TypeError,F=x("toStringTag"),R=w("TYPED_ARRAY_TAG"),z="TypedArrayConstructor",V=o&&!!b&&"Opera"!==f(u.opera),U=!1,D={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},L={BigInt64Array:8,BigUint64Array:8},j=function(t){var e=y(t);if(h(e)){var r=A(e);return r&&l(r,z)?r[z]:j(e)}},N=function(t){if(!h(t))return!1;var e=f(t);return l(D,e)||l(L,e)};for(n in D)(s=(i=u[n])&&i.prototype)?I(s)[z]=i:V=!1;for(n in L)(s=(i=u[n])&&i.prototype)&&(I(s)[z]=i);if((!V||!c(C)||C===Function.prototype)&&(C=function(){throw new E("Incorrect invocation")},V))for(n in D)u[n]&&b(u[n],C);if((!V||!T||T===M)&&(T=C.prototype,V))for(n in D)u[n]&&b(u[n].prototype,T);if(V&&y(k)!==T&&b(k,T),a&&!l(T,F))for(n in U=!0,g(T,F,{configurable:!0,get:function(){return h(this)?this[R]:void 0}}),D)u[n]&&p(u[n],R,n);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:V,TYPED_ARRAY_TAG:U&&R,aTypedArray:function(t){if(N(t))return t;throw new E("Target is not a typed array")},aTypedArrayConstructor:function(t){if(c(t)&&(!b||v(C,t)))return t;throw new E(d(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,e,r,n){if(a){if(r)for(var i in D){var s=u[i];if(s&&l(s.prototype,t))try{delete s.prototype[t]}catch(r){try{s.prototype[t]=e}catch(t){}}}T[t]&&!r||m(T,t,r?e:V&&S[t]||e,n)}},exportTypedArrayStaticMethod:function(t,e,r){var n,i;if(a){if(b){if(r)for(n in D)if((i=u[n])&&l(i,t))try{delete i[t]}catch(t){}if(C[t]&&!r)return;try{return m(C,t,r?e:V&&C[t]||e)}catch(t){}}for(n in D)!(i=u[n])||i[t]&&!r||m(i,t,e)}},getTypedArrayConstructor:j,isView:function(t){if(!h(t))return!1;var e=f(t);return"DataView"===e||l(D,e)||l(L,e)},isTypedArray:N,TypedArray:C,TypedArrayPrototype:T}},9617:(t,e,r)=>{"use strict";var n=r(5397),i=r(5610),s=r(6198),o=function(t){return function(e,r,o){var a=n(e),u=s(a);if(0===u)return!t&&-1;var c,h=i(o,u);if(t&&r!=r){for(;u>h;)if((c=a[h++])!=c)return!0}else for(;u>h;h++)if((t||h in a)&&a[h]===r)return t||h||0;return!t&&-1}};t.exports={includes:o(!0),indexOf:o(!1)}},9213:(t,e,r)=>{"use strict";var n=r(6080),i=r(9504),s=r(7055),o=r(8981),a=r(6198),u=r(1469),c=i([].push),h=function(t){var e=1===t,r=2===t,i=3===t,h=4===t,l=6===t,f=7===t,d=5===t||l;return function(p,m,g,v){for(var y,b,x=o(p),w=s(x),_=a(w),I=n(m,g),A=0,O=v||u,S=e?O(p,_):r||f?O(p,0):void 0;_>A;A++)if((d||A in w)&&(b=I(y=w[A],A,x),t))if(e)S[A]=b;else if(b)switch(t){case 3:return!0;case 5:return y;case 6:return A;case 2:c(S,y)}else switch(t){case 4:return!1;case 7:c(S,y)}return l?-1:i||h?h:S}};t.exports={forEach:h(0),map:h(1),filter:h(2),some:h(3),every:h(4),find:h(5),findIndex:h(6),filterReject:h(7)}},7680:(t,e,r)=>{"use strict";var n=r(9504);t.exports=n([].slice)},7433:(t,e,r)=>{"use strict";var n=r(4376),i=r(3517),s=r(34),o=r(8227)("species"),a=Array;t.exports=function(t){var e;return n(t)&&(e=t.constructor,(i(e)&&(e===a||n(e.prototype))||s(e)&&null===(e=e[o]))&&(e=void 0)),void 0===e?a:e}},1469:(t,e,r)=>{"use strict";var n=r(7433);t.exports=function(t,e){return new(n(t))(0===e?0:e)}},1946:(t,e,r)=>{"use strict";var n=r(9504),i=r(9306),s=r(4117),o=r(6198),a=r(8981),u=r(2248),c=r(6223),h=u.Map,l=u.has,f=u.set,d=n([].push);t.exports=function(t){var e,r,n,u=a(this),p=o(u),m=[],g=new h,v=s(t)?function(t){return t}:i(t);for(e=0;e{"use strict";var n=r(8227)("iterator"),i=!1;try{var s=0,o={next:function(){return{done:!!s++}},return:function(){i=!0}};o[n]=function(){return this},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,e){try{if(!e&&!i)return!1}catch(t){return!1}var r=!1;try{var s={};s[n]=function(){return{next:function(){return{done:r=!0}}}},t(s)}catch(t){}return r}},4576:(t,e,r)=>{"use strict";var n=r(9504),i=n({}.toString),s=n("".slice);t.exports=function(t){return s(i(t),8,-1)}},6955:(t,e,r)=>{"use strict";var n=r(2140),i=r(4901),s=r(4576),o=r(8227)("toStringTag"),a=Object,u="Arguments"===s(function(){return arguments}());t.exports=n?s:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=a(t),o))?r:u?s(e):"Object"===(n=s(e))&&i(e.callee)?"Arguments":n}},933:(t,e,r)=>{"use strict";var n=r(6080),i=r(8551),s=r(8981),o=r(2652);t.exports=function(t,e,r){return function(a){var u=s(a),c=arguments.length,h=c>1?arguments[1]:void 0,l=void 0!==h,f=l?n(h,c>2?arguments[2]:void 0):void 0,d=new t,p=0;return o(u,(function(t){var n=l?f(t,p++):t;r?e(d,i(n)[0],n[1]):e(d,n)})),d}}},7500:(t,e,r)=>{"use strict";var n=r(8551);t.exports=function(t,e,r){return function(){for(var i=new t,s=arguments.length,o=0;o{"use strict";var n=r(2360),i=r(2106),s=r(6279),o=r(6080),a=r(679),u=r(4117),c=r(2652),h=r(1088),l=r(2529),f=r(7633),d=r(3724),p=r(3451).fastKey,m=r(1181),g=m.set,v=m.getterFor;t.exports={getConstructor:function(t,e,r,h){var l=t((function(t,i){a(t,f),g(t,{type:e,index:n(null),first:void 0,last:void 0,size:0}),d||(t.size=0),u(i)||c(i,t[h],{that:t,AS_ENTRIES:r})})),f=l.prototype,m=v(e),y=function(t,e,r){var n,i,s=m(t),o=b(t,e);return o?o.value=r:(s.last=o={index:i=p(e,!0),key:e,value:r,previous:n=s.last,next:void 0,removed:!1},s.first||(s.first=o),n&&(n.next=o),d?s.size++:t.size++,"F"!==i&&(s.index[i]=o)),t},b=function(t,e){var r,n=m(t),i=p(e);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key===e)return r};return s(f,{clear:function(){for(var t=m(this),e=t.first;e;)e.removed=!0,e.previous&&(e.previous=e.previous.next=void 0),e=e.next;t.first=t.last=void 0,t.index=n(null),d?t.size=0:this.size=0},delete:function(t){var e=this,r=m(e),n=b(e,t);if(n){var i=n.next,s=n.previous;delete r.index[n.index],n.removed=!0,s&&(s.next=i),i&&(i.previous=s),r.first===n&&(r.first=i),r.last===n&&(r.last=s),d?r.size--:e.size--}return!!n},forEach:function(t){for(var e,r=m(this),n=o(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:r.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!b(this,t)}}),s(f,r?{get:function(t){var e=b(this,t);return e&&e.value},set:function(t,e){return y(this,0===t?0:t,e)}}:{add:function(t){return y(this,t=0===t?0:t,t)}}),d&&i(f,"size",{configurable:!0,get:function(){return m(this).size}}),l},setStrong:function(t,e,r){var n=e+" Iterator",i=v(e),s=v(n);h(t,e,(function(t,e){g(this,{type:n,target:t,state:i(t),kind:e,last:void 0})}),(function(){for(var t=s(this),e=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?l("keys"===e?r.key:"values"===e?r.value:[r.key,r.value],!1):(t.target=void 0,l(void 0,!0))}),r?"entries":"values",!r,!0),f(e)}}},4006:(t,e,r)=>{"use strict";var n=r(9504),i=r(6279),s=r(3451).getWeakData,o=r(679),a=r(8551),u=r(4117),c=r(34),h=r(2652),l=r(9213),f=r(9297),d=r(1181),p=d.set,m=d.getterFor,g=l.find,v=l.findIndex,y=n([].splice),b=0,x=function(t){return t.frozen||(t.frozen=new w)},w=function(){this.entries=[]},_=function(t,e){return g(t.entries,(function(t){return t[0]===e}))};w.prototype={get:function(t){var e=_(this,t);if(e)return e[1]},has:function(t){return!!_(this,t)},set:function(t,e){var r=_(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=v(this.entries,(function(e){return e[0]===t}));return~e&&y(this.entries,e,1),!!~e}},t.exports={getConstructor:function(t,e,r,n){var l=t((function(t,i){o(t,d),p(t,{type:e,id:b++,frozen:void 0}),u(i)||h(i,t[n],{that:t,AS_ENTRIES:r})})),d=l.prototype,g=m(e),v=function(t,e,r){var n=g(t),i=s(a(e),!0);return!0===i?x(n).set(e,r):i[n.id]=r,t};return i(d,{delete:function(t){var e=g(this);if(!c(t))return!1;var r=s(t);return!0===r?x(e).delete(t):r&&f(r,e.id)&&delete r[e.id]},has:function(t){var e=g(this);if(!c(t))return!1;var r=s(t);return!0===r?x(e).has(t):r&&f(r,e.id)}}),i(d,r?{get:function(t){var e=g(this);if(c(t)){var r=s(t);return!0===r?x(e).get(t):r?r[e.id]:void 0}},set:function(t,e){return v(this,t,e)}}:{add:function(t){return v(this,t,!0)}}),l}}},6468:(t,e,r)=>{"use strict";var n=r(6518),i=r(4475),s=r(9504),o=r(2796),a=r(6840),u=r(3451),c=r(2652),h=r(679),l=r(4901),f=r(4117),d=r(34),p=r(9039),m=r(4428),g=r(687),v=r(3167);t.exports=function(t,e,r){var y=-1!==t.indexOf("Map"),b=-1!==t.indexOf("Weak"),x=y?"set":"add",w=i[t],_=w&&w.prototype,I=w,A={},O=function(t){var e=s(_[t]);a(_,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(b&&!d(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return b&&!d(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(b&&!d(t))&&e(this,0===t?0:t)}:function(t,r){return e(this,0===t?0:t,r),this})};if(o(t,!l(w)||!(b||_.forEach&&!p((function(){(new w).entries().next()})))))I=r.getConstructor(e,t,y,x),u.enable();else if(o(t,!0)){var S=new I,P=S[x](b?{}:-0,1)!==S,k=p((function(){S.has(1)})),C=m((function(t){new w(t)})),T=!b&&p((function(){for(var t=new w,e=5;e--;)t[x](e,e);return!t.has(-0)}));C||((I=e((function(t,e){h(t,_);var r=v(new w,t,I);return f(e)||c(e,r[x],{that:r,AS_ENTRIES:y}),r}))).prototype=_,_.constructor=I),(k||T)&&(O("delete"),O("has"),y&&O("get")),(T||P)&&O(x),b&&_.clear&&delete _.clear}return A[t]=I,n({global:!0,constructor:!0,forced:I!==w},A),g(I,t),b||r.setStrong(I,t,y),I}},9323:(t,e,r)=>{"use strict";r(6033),r(3772);var n=r(7751),i=r(2360),s=r(34),o=Object,a=TypeError,u=n("Map"),c=n("WeakMap"),h=function(){this.object=null,this.symbol=null,this.primitives=null,this.objectsByIndex=i(null)};h.prototype.get=function(t,e){return this[t]||(this[t]=e())},h.prototype.next=function(t,e,r){var n=r?this.objectsByIndex[t]||(this.objectsByIndex[t]=new c):this.primitives||(this.primitives=new u),i=n.get(e);return i||n.set(e,i=new h),i};var l=new h;t.exports=function(){var t,e,r=l,n=arguments.length;for(t=0;t{"use strict";var n=r(9297),i=r(5031),s=r(7347),o=r(4913);t.exports=function(t,e,r){for(var a=i(e),u=o.f,c=s.f,h=0;h{"use strict";var n=r(9039);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},2529:t=>{"use strict";t.exports=function(t,e){return{value:t,done:e}}},6699:(t,e,r)=>{"use strict";var n=r(3724),i=r(4913),s=r(6980);t.exports=n?function(t,e,r){return i.f(t,e,s(1,r))}:function(t,e,r){return t[e]=r,t}},6980:t=>{"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},2106:(t,e,r)=>{"use strict";var n=r(283),i=r(4913);t.exports=function(t,e,r){return r.get&&n(r.get,e,{getter:!0}),r.set&&n(r.set,e,{setter:!0}),i.f(t,e,r)}},6840:(t,e,r)=>{"use strict";var n=r(4901),i=r(4913),s=r(283),o=r(9433);t.exports=function(t,e,r,a){a||(a={});var u=a.enumerable,c=void 0!==a.name?a.name:e;if(n(r)&&s(r,c,a),a.global)u?t[e]=r:o(e,r);else{try{a.unsafe?t[e]&&(u=!0):delete t[e]}catch(t){}u?t[e]=r:i.f(t,e,{value:r,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},6279:(t,e,r)=>{"use strict";var n=r(6840);t.exports=function(t,e,r){for(var i in e)n(t,i,e[i],r);return t}},9433:(t,e,r)=>{"use strict";var n=r(4475),i=Object.defineProperty;t.exports=function(t,e){try{i(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},3724:(t,e,r)=>{"use strict";var n=r(9039);t.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4055:(t,e,r)=>{"use strict";var n=r(4475),i=r(34),s=n.document,o=i(s)&&i(s.createElement);t.exports=function(t){return o?s.createElement(t):{}}},6763:t=>{"use strict";t.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},8119:(t,e,r)=>{"use strict";var n=r(9392);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},9088:(t,e,r)=>{"use strict";var n=r(4475),i=r(4576);t.exports="process"===i(n.process)},9392:t=>{"use strict";t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},7388:(t,e,r)=>{"use strict";var n,i,s=r(4475),o=r(9392),a=s.process,u=s.Deno,c=a&&a.versions||u&&u.version,h=c&&c.v8;h&&(i=(n=h.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&o&&(!(n=o.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=o.match(/Chrome\/(\d+)/))&&(i=+n[1]),t.exports=i},8727:t=>{"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6518:(t,e,r)=>{"use strict";var n=r(4475),i=r(7347).f,s=r(6699),o=r(6840),a=r(9433),u=r(7740),c=r(2796);t.exports=function(t,e){var r,h,l,f,d,p=t.target,m=t.global,g=t.stat;if(r=m?n:g?n[p]||a(p,{}):n[p]&&n[p].prototype)for(h in e){if(f=e[h],l=t.dontCallGetSet?(d=i(r,h))&&d.value:r[h],!c(m?h:p+(g?".":"#")+h,t.forced)&&void 0!==l){if(typeof f==typeof l)continue;u(f,l)}(t.sham||l&&l.sham)&&s(f,"sham",!0),o(r,h,f,t)}}},9039:t=>{"use strict";t.exports=function(t){try{return!!t()}catch(t){return!0}}},2744:(t,e,r)=>{"use strict";var n=r(9039);t.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},8745:(t,e,r)=>{"use strict";var n=r(616),i=Function.prototype,s=i.apply,o=i.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?o.bind(s):function(){return o.apply(s,arguments)})},6080:(t,e,r)=>{"use strict";var n=r(7476),i=r(9306),s=r(616),o=n(n.bind);t.exports=function(t,e){return i(t),void 0===e?t:s?o(t,e):function(){return t.apply(e,arguments)}}},616:(t,e,r)=>{"use strict";var n=r(9039);t.exports=!n((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},9565:(t,e,r)=>{"use strict";var n=r(616),i=Function.prototype.call;t.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},350:(t,e,r)=>{"use strict";var n=r(3724),i=r(9297),s=Function.prototype,o=n&&Object.getOwnPropertyDescriptor,a=i(s,"name"),u=a&&"something"===function(){}.name,c=a&&(!n||n&&o(s,"name").configurable);t.exports={EXISTS:a,PROPER:u,CONFIGURABLE:c}},6706:(t,e,r)=>{"use strict";var n=r(9504),i=r(9306);t.exports=function(t,e,r){try{return n(i(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}}},7476:(t,e,r)=>{"use strict";var n=r(4576),i=r(9504);t.exports=function(t){if("Function"===n(t))return i(t)}},9504:(t,e,r)=>{"use strict";var n=r(616),i=Function.prototype,s=i.call,o=n&&i.bind.bind(s,s);t.exports=n?o:function(t){return function(){return s.apply(t,arguments)}}},7751:(t,e,r)=>{"use strict";var n=r(4475),i=r(4901);t.exports=function(t,e){return arguments.length<2?(r=n[t],i(r)?r:void 0):n[t]&&n[t][e];var r}},1767:t=>{"use strict";t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},851:(t,e,r)=>{"use strict";var n=r(6955),i=r(5966),s=r(4117),o=r(6269),a=r(8227)("iterator");t.exports=function(t){if(!s(t))return i(t,a)||i(t,"@@iterator")||o[n(t)]}},81:(t,e,r)=>{"use strict";var n=r(9565),i=r(9306),s=r(8551),o=r(6823),a=r(851),u=TypeError;t.exports=function(t,e){var r=arguments.length<2?a(t):e;if(i(r))return s(n(r,t));throw new u(o(t)+" is not iterable")}},5966:(t,e,r)=>{"use strict";var n=r(9306),i=r(4117);t.exports=function(t,e){var r=t[e];return i(r)?void 0:n(r)}},3789:(t,e,r)=>{"use strict";var n=r(9306),i=r(8551),s=r(9565),o=r(1291),a=r(1767),u="Invalid size",c=RangeError,h=TypeError,l=Math.max,f=function(t,e){this.set=t,this.size=l(e,0),this.has=n(t.has),this.keys=n(t.keys)};f.prototype={getIterator:function(){return a(i(s(this.keys,this.set)))},includes:function(t){return s(this.has,this.set,t)}},t.exports=function(t){i(t);var e=+t.size;if(e!=e)throw new h(u);var r=o(e);if(r<0)throw new c(u);return new f(t,r)}},4475:function(t,e,r){"use strict";var n=function(t){return t&&t.Math===Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9297:(t,e,r)=>{"use strict";var n=r(9504),i=r(8981),s=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return s(i(t),e)}},421:t=>{"use strict";t.exports={}},3138:t=>{"use strict";t.exports=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}}},397:(t,e,r)=>{"use strict";var n=r(7751);t.exports=n("document","documentElement")},5917:(t,e,r)=>{"use strict";var n=r(3724),i=r(9039),s=r(4055);t.exports=!n&&!i((function(){return 7!==Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a}))},7055:(t,e,r)=>{"use strict";var n=r(9504),i=r(9039),s=r(4576),o=Object,a=n("".split);t.exports=i((function(){return!o("z").propertyIsEnumerable(0)}))?function(t){return"String"===s(t)?a(t,""):o(t)}:o},3167:(t,e,r)=>{"use strict";var n=r(4901),i=r(34),s=r(2967);t.exports=function(t,e,r){var o,a;return s&&n(o=e.constructor)&&o!==r&&i(a=o.prototype)&&a!==r.prototype&&s(t,a),t}},3706:(t,e,r)=>{"use strict";var n=r(9504),i=r(4901),s=r(7629),o=n(Function.toString);i(s.inspectSource)||(s.inspectSource=function(t){return o(t)}),t.exports=s.inspectSource},3451:(t,e,r)=>{"use strict";var n=r(6518),i=r(9504),s=r(421),o=r(34),a=r(9297),u=r(4913).f,c=r(8480),h=r(298),l=r(4124),f=r(3392),d=r(2744),p=!1,m=f("meta"),g=0,v=function(t){u(t,m,{value:{objectID:"O"+g++,weakData:{}}})},y=t.exports={enable:function(){y.enable=function(){},p=!0;var t=c.f,e=i([].splice),r={};r[m]=1,t(r).length&&(c.f=function(r){for(var n=t(r),i=0,s=n.length;i{"use strict";var n,i,s,o=r(8622),a=r(4475),u=r(34),c=r(6699),h=r(9297),l=r(7629),f=r(6119),d=r(421),p="Object already initialized",m=a.TypeError,g=a.WeakMap;if(o||l.state){var v=l.state||(l.state=new g);v.get=v.get,v.has=v.has,v.set=v.set,n=function(t,e){if(v.has(t))throw new m(p);return e.facade=t,v.set(t,e),e},i=function(t){return v.get(t)||{}},s=function(t){return v.has(t)}}else{var y=f("state");d[y]=!0,n=function(t,e){if(h(t,y))throw new m(p);return e.facade=t,c(t,y,e),e},i=function(t){return h(t,y)?t[y]:{}},s=function(t){return h(t,y)}}t.exports={set:n,get:i,has:s,enforce:function(t){return s(t)?i(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!u(e)||(r=i(e)).type!==t)throw new m("Incompatible receiver, "+t+" required");return r}}}},4209:(t,e,r)=>{"use strict";var n=r(8227),i=r(6269),s=n("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||o[s]===t)}},4376:(t,e,r)=>{"use strict";var n=r(4576);t.exports=Array.isArray||function(t){return"Array"===n(t)}},4901:t=>{"use strict";var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},3517:(t,e,r)=>{"use strict";var n=r(9504),i=r(9039),s=r(4901),o=r(6955),a=r(7751),u=r(3706),c=function(){},h=a("Reflect","construct"),l=/^\s*(?:class|function)\b/,f=n(l.exec),d=!l.test(c),p=function(t){if(!s(t))return!1;try{return h(c,[],t),!0}catch(t){return!1}},m=function(t){if(!s(t))return!1;switch(o(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return d||!!f(l,u(t))}catch(t){return!0}};m.sham=!0,t.exports=!h||i((function(){var t;return p(p.call)||!p(Object)||!p((function(){t=!0}))||t}))?m:p},2796:(t,e,r)=>{"use strict";var n=r(9039),i=r(4901),s=/#|\.prototype\./,o=function(t,e){var r=u[a(t)];return r===h||r!==c&&(i(e)?n(e):!!e)},a=o.normalize=function(t){return String(t).replace(s,".").toLowerCase()},u=o.data={},c=o.NATIVE="N",h=o.POLYFILL="P";t.exports=o},1563:(t,e,r)=>{"use strict";var n=r(6955),i=r(9297),s=r(4117),o=r(8227),a=r(6269),u=o("iterator"),c=Object;t.exports=function(t){if(s(t))return!1;var e=c(t);return void 0!==e[u]||"@@iterator"in e||i(a,n(e))}},4117:t=>{"use strict";t.exports=function(t){return null==t}},34:(t,e,r)=>{"use strict";var n=r(4901);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},3925:(t,e,r)=>{"use strict";var n=r(34);t.exports=function(t){return n(t)||null===t}},6395:t=>{"use strict";t.exports=!1},757:(t,e,r)=>{"use strict";var n=r(7751),i=r(4901),s=r(1625),o=r(7040),a=Object;t.exports=o?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return i(e)&&s(e.prototype,a(t))}},507:(t,e,r)=>{"use strict";var n=r(9565);t.exports=function(t,e,r){for(var i,s,o=r?t:t.iterator,a=t.next;!(i=n(a,o)).done;)if(void 0!==(s=e(i.value)))return s}},2652:(t,e,r)=>{"use strict";var n=r(6080),i=r(9565),s=r(8551),o=r(6823),a=r(4209),u=r(6198),c=r(1625),h=r(81),l=r(851),f=r(9539),d=TypeError,p=function(t,e){this.stopped=t,this.result=e},m=p.prototype;t.exports=function(t,e,r){var g,v,y,b,x,w,_,I=r&&r.that,A=!(!r||!r.AS_ENTRIES),O=!(!r||!r.IS_RECORD),S=!(!r||!r.IS_ITERATOR),P=!(!r||!r.INTERRUPTED),k=n(e,I),C=function(t){return g&&f(g,"normal",t),new p(!0,t)},T=function(t){return A?(s(t),P?k(t[0],t[1],C):k(t[0],t[1])):P?k(t,C):k(t)};if(O)g=t.iterator;else if(S)g=t;else{if(!(v=l(t)))throw new d(o(t)+" is not iterable");if(a(v)){for(y=0,b=u(t);b>y;y++)if((x=T(t[y]))&&c(m,x))return x;return new p(!1)}g=h(t,v)}for(w=O?t.next:g.next;!(_=i(w,g)).done;){try{x=T(_.value)}catch(t){f(g,"throw",t)}if("object"==typeof x&&x&&c(m,x))return x}return new p(!1)}},9539:(t,e,r)=>{"use strict";var n=r(9565),i=r(8551),s=r(5966);t.exports=function(t,e,r){var o,a;i(t);try{if(!(o=s(t,"return"))){if("throw"===e)throw r;return r}o=n(o,t)}catch(t){a=!0,o=t}if("throw"===e)throw r;if(a)throw o;return i(o),r}},3994:(t,e,r)=>{"use strict";var n=r(7657).IteratorPrototype,i=r(2360),s=r(6980),o=r(687),a=r(6269),u=function(){return this};t.exports=function(t,e,r,c){var h=e+" Iterator";return t.prototype=i(n,{next:s(+!c,r)}),o(t,h,!1,!0),a[h]=u,t}},1088:(t,e,r)=>{"use strict";var n=r(6518),i=r(9565),s=r(6395),o=r(350),a=r(4901),u=r(3994),c=r(2787),h=r(2967),l=r(687),f=r(6699),d=r(6840),p=r(8227),m=r(6269),g=r(7657),v=o.PROPER,y=o.CONFIGURABLE,b=g.IteratorPrototype,x=g.BUGGY_SAFARI_ITERATORS,w=p("iterator"),_="keys",I="values",A="entries",O=function(){return this};t.exports=function(t,e,r,o,p,g,S){u(r,e,o);var P,k,C,T=function(t){if(t===p&&z)return z;if(!x&&t&&t in F)return F[t];switch(t){case _:case I:case A:return function(){return new r(this,t)}}return function(){return new r(this)}},M=e+" Iterator",E=!1,F=t.prototype,R=F[w]||F["@@iterator"]||p&&F[p],z=!x&&R||T(p),V="Array"===e&&F.entries||R;if(V&&(P=c(V.call(new t)))!==Object.prototype&&P.next&&(s||c(P)===b||(h?h(P,b):a(P[w])||d(P,w,O)),l(P,M,!0,!0),s&&(m[M]=O)),v&&p===I&&R&&R.name!==I&&(!s&&y?f(F,"name",I):(E=!0,z=function(){return i(R,this)})),p)if(k={values:T(I),keys:g?z:T(_),entries:T(A)},S)for(C in k)(x||E||!(C in F))&&d(F,C,k[C]);else n({target:e,proto:!0,forced:x||E},k);return s&&!S||F[w]===z||d(F,w,z,{name:p}),m[e]=z,k}},7657:(t,e,r)=>{"use strict";var n,i,s,o=r(9039),a=r(4901),u=r(34),c=r(2360),h=r(2787),l=r(6840),f=r(8227),d=r(6395),p=f("iterator"),m=!1;[].keys&&("next"in(s=[].keys())?(i=h(h(s)))!==Object.prototype&&(n=i):m=!0),!u(n)||o((function(){var t={};return n[p].call(t)!==t}))?n={}:d&&(n=c(n)),a(n[p])||l(n,p,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:m}},6269:t=>{"use strict";t.exports={}},6198:(t,e,r)=>{"use strict";var n=r(8014);t.exports=function(t){return n(t.length)}},283:(t,e,r)=>{"use strict";var n=r(9504),i=r(9039),s=r(4901),o=r(9297),a=r(3724),u=r(350).CONFIGURABLE,c=r(3706),h=r(1181),l=h.enforce,f=h.get,d=String,p=Object.defineProperty,m=n("".slice),g=n("".replace),v=n([].join),y=a&&!i((function(){return 8!==p((function(){}),"length",{value:8}).length})),b=String(String).split("String"),x=t.exports=function(t,e,r){"Symbol("===m(d(e),0,7)&&(e="["+g(d(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!o(t,"name")||u&&t.name!==e)&&(a?p(t,"name",{value:e,configurable:!0}):t.name=e),y&&r&&o(r,"arity")&&t.length!==r.arity&&p(t,"length",{value:r.arity});try{r&&o(r,"constructor")&&r.constructor?a&&p(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=l(t);return o(n,"source")||(n.source=v(b,"string"==typeof e?e:"")),t};Function.prototype.toString=x((function(){return s(this)&&f(this).source||c(this)}),"toString")},2248:(t,e,r)=>{"use strict";var n=r(9504),i=Map.prototype;t.exports={Map,set:n(i.set),get:n(i.get),has:n(i.has),remove:n(i.delete),proto:i}},6223:(t,e,r)=>{"use strict";var n=r(9504),i=r(507),s=r(2248),o=s.Map,a=s.proto,u=n(a.forEach),c=n(a.entries),h=c(new o).next;t.exports=function(t,e,r){return r?i({iterator:c(t),next:h},(function(t){return e(t[1],t[0])})):u(t,e)}},3164:(t,e,r)=>{"use strict";var n=r(7782),i=Math.abs,s=2220446049250313e-31,o=1/s;t.exports=function(t,e,r,a){var u=+t,c=i(u),h=n(u);if(cr||f!=f?h*(1/0):h*f}},5617:(t,e,r)=>{"use strict";var n=r(3164);t.exports=Math.fround||function(t){return n(t,1.1920928955078125e-7,34028234663852886e22,11754943508222875e-54)}},7905:t=>{"use strict";t.exports=Math.scale||function(t,e,r,n,i){var s=+t,o=+e,a=+r,u=+n,c=+i;return s!=s||o!=o||a!=a||u!=u||c!=c?NaN:s===1/0||s===-1/0?s:(s-o)*(c-u)/(a-o)+u}},7782:t=>{"use strict";t.exports=Math.sign||function(t){var e=+t;return 0===e||e!=e?e:e<0?-1:1}},741:t=>{"use strict";var e=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?r:e)(n)}},6043:(t,e,r)=>{"use strict";var n=r(9306),i=TypeError,s=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw new i("Bad Promise constructor");e=t,r=n})),this.resolve=n(e),this.reject=n(r)};t.exports.f=function(t){return new s(t)}},360:(t,e,r)=>{"use strict";var n=r(4475).isFinite;t.exports=Number.isFinite||function(t){return"number"==typeof t&&n(t)}},2360:(t,e,r)=>{"use strict";var n,i=r(8551),s=r(6801),o=r(8727),a=r(421),u=r(397),c=r(4055),h=r(6119),l="prototype",f="script",d=h("IE_PROTO"),p=function(){},m=function(t){return"<"+f+">"+t+""},g=function(t){t.write(m("")),t.close();var e=t.parentWindow.Object;return t=null,e},v=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;v="undefined"!=typeof document?document.domain&&n?g(n):(e=c("iframe"),r="java"+f+":",e.style.display="none",u.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(m("document.F=Object")),t.close(),t.F):g(n);for(var i=o.length;i--;)delete v[l][o[i]];return v()};a[d]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(p[l]=i(t),r=new p,p[l]=null,r[d]=t):r=v(),void 0===e?r:s.f(r,e)}},6801:(t,e,r)=>{"use strict";var n=r(3724),i=r(8686),s=r(4913),o=r(8551),a=r(5397),u=r(1072);e.f=n&&!i?Object.defineProperties:function(t,e){o(t);for(var r,n=a(e),i=u(e),c=i.length,h=0;c>h;)s.f(t,r=i[h++],n[r]);return t}},4913:(t,e,r)=>{"use strict";var n=r(3724),i=r(5917),s=r(8686),o=r(8551),a=r(6969),u=TypeError,c=Object.defineProperty,h=Object.getOwnPropertyDescriptor,l="enumerable",f="configurable",d="writable";e.f=n?s?function(t,e,r){if(o(t),e=a(e),o(r),"function"==typeof t&&"prototype"===e&&"value"in r&&d in r&&!r[d]){var n=h(t,e);n&&n[d]&&(t[e]=r.value,r={configurable:f in r?r[f]:n[f],enumerable:l in r?r[l]:n[l],writable:!1})}return c(t,e,r)}:c:function(t,e,r){if(o(t),e=a(e),o(r),i)try{return c(t,e,r)}catch(t){}if("get"in r||"set"in r)throw new u("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},7347:(t,e,r)=>{"use strict";var n=r(3724),i=r(9565),s=r(8773),o=r(6980),a=r(5397),u=r(6969),c=r(9297),h=r(5917),l=Object.getOwnPropertyDescriptor;e.f=n?l:function(t,e){if(t=a(t),e=u(e),h)try{return l(t,e)}catch(t){}if(c(t,e))return o(!i(s.f,t,e),t[e])}},298:(t,e,r)=>{"use strict";var n=r(4576),i=r(5397),s=r(8480).f,o=r(7680),a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"Window"===n(t)?function(t){try{return s(t)}catch(t){return o(a)}}(t):s(i(t))}},8480:(t,e,r)=>{"use strict";var n=r(1828),i=r(8727).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,i)}},3717:(t,e)=>{"use strict";e.f=Object.getOwnPropertySymbols},2787:(t,e,r)=>{"use strict";var n=r(9297),i=r(4901),s=r(8981),o=r(6119),a=r(2211),u=o("IE_PROTO"),c=Object,h=c.prototype;t.exports=a?c.getPrototypeOf:function(t){var e=s(t);if(n(e,u))return e[u];var r=e.constructor;return i(r)&&e instanceof r?r.prototype:e instanceof c?h:null}},4124:(t,e,r)=>{"use strict";var n=r(9039),i=r(34),s=r(4576),o=r(5652),a=Object.isExtensible,u=n((function(){a(1)}));t.exports=u||o?function(t){return!!i(t)&&(!o||"ArrayBuffer"!==s(t))&&(!a||a(t))}:a},1625:(t,e,r)=>{"use strict";var n=r(9504);t.exports=n({}.isPrototypeOf)},1828:(t,e,r)=>{"use strict";var n=r(9504),i=r(9297),s=r(5397),o=r(9617).indexOf,a=r(421),u=n([].push);t.exports=function(t,e){var r,n=s(t),c=0,h=[];for(r in n)!i(a,r)&&i(n,r)&&u(h,r);for(;e.length>c;)i(n,r=e[c++])&&(~o(h,r)||u(h,r));return h}},1072:(t,e,r)=>{"use strict";var n=r(1828),i=r(8727);t.exports=Object.keys||function(t){return n(t,i)}},8773:(t,e)=>{"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,i=n&&!r.call({1:2},1);e.f=i?function(t){var e=n(this,t);return!!e&&e.enumerable}:r},2967:(t,e,r)=>{"use strict";var n=r(6706),i=r(34),s=r(7750),o=r(3506);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=n(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return s(r),o(n),i(r)?(e?t(r,n):r.__proto__=n,r):r}}():void 0)},4270:(t,e,r)=>{"use strict";var n=r(9565),i=r(4901),s=r(34),o=TypeError;t.exports=function(t,e){var r,a;if("string"===e&&i(r=t.toString)&&!s(a=n(r,t)))return a;if(i(r=t.valueOf)&&!s(a=n(r,t)))return a;if("string"!==e&&i(r=t.toString)&&!s(a=n(r,t)))return a;throw new o("Can't convert object to primitive value")}},5031:(t,e,r)=>{"use strict";var n=r(7751),i=r(9504),s=r(8480),o=r(3717),a=r(8551),u=i([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=s.f(a(t)),r=o.f;return r?u(e,r(t)):e}},9167:(t,e,r)=>{"use strict";var n=r(4475);t.exports=n},1103:t=>{"use strict";t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},8449:(t,e,r)=>{"use strict";r(6033),r(3772);var n=r(7751),i=r(9504),s=r(5745),o=n("Map"),a=n("WeakMap"),u=i([].push),c=s("metadata"),h=c.store||(c.store=new a),l=function(t,e,r){var n=h.get(t);if(!n){if(!r)return;h.set(t,n=new o)}var i=n.get(e);if(!i){if(!r)return;n.set(e,i=new o)}return i};t.exports={store:h,getMap:l,has:function(t,e,r){var n=l(e,r,!1);return void 0!==n&&n.has(t)},get:function(t,e,r){var n=l(e,r,!1);return void 0===n?void 0:n.get(t)},set:function(t,e,r,n){l(r,n,!0).set(t,e)},keys:function(t,e){var r=l(t,e,!1),n=[];return r&&r.forEach((function(t,e){u(n,e)})),n},toKey:function(t){return void 0===t||"symbol"==typeof t?t:String(t)}}},7979:(t,e,r)=>{"use strict";var n=r(8551);t.exports=function(){var t=n(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},7750:(t,e,r)=>{"use strict";var n=r(4117),i=TypeError;t.exports=function(t){if(n(t))throw new i("Can't call method on "+t);return t}},3317:t=>{"use strict";t.exports=function(t,e){return t===e||t!=t&&e!=e}},9472:(t,e,r)=>{"use strict";var n,i=r(4475),s=r(8745),o=r(4901),a=r(6763),u=r(9392),c=r(7680),h=r(2812),l=i.Function,f=/MSIE .\./.test(u)||a&&((n=i.Bun.version.split(".")).length<3||"0"===n[0]&&(n[1]<3||"3"===n[1]&&"0"===n[2]));t.exports=function(t,e){var r=e?2:1;return f?function(n,i){var a=h(arguments.length,1)>r,u=o(n)?n:l(n),f=a?c(arguments,r):[],d=a?function(){s(u,this,f)}:u;return e?t(d,i):t(d)}:t}},9286:(t,e,r)=>{"use strict";var n=r(4402),i=r(8469),s=n.Set,o=n.add;t.exports=function(t){var e=new s;return i(t,(function(t){o(e,t)})),e}},3440:(t,e,r)=>{"use strict";var n=r(7080),i=r(4402),s=r(9286),o=r(5170),a=r(3789),u=r(8469),c=r(507),h=i.has,l=i.remove;t.exports=function(t){var e=n(this),r=a(t),i=s(e);return o(e)<=r.size?u(e,(function(t){r.includes(t)&&l(i,t)})):c(r.getIterator(),(function(t){h(e,t)&&l(i,t)})),i}},4402:(t,e,r)=>{"use strict";var n=r(9504),i=Set.prototype;t.exports={Set,add:n(i.add),has:n(i.has),remove:n(i.delete),proto:i}},8750:(t,e,r)=>{"use strict";var n=r(7080),i=r(4402),s=r(5170),o=r(3789),a=r(8469),u=r(507),c=i.Set,h=i.add,l=i.has;t.exports=function(t){var e=n(this),r=o(t),i=new c;return s(e)>r.size?u(r.getIterator(),(function(t){l(e,t)&&h(i,t)})):a(e,(function(t){r.includes(t)&&h(i,t)})),i}},4449:(t,e,r)=>{"use strict";var n=r(7080),i=r(4402).has,s=r(5170),o=r(3789),a=r(8469),u=r(507),c=r(9539);t.exports=function(t){var e=n(this),r=o(t);if(s(e)<=r.size)return!1!==a(e,(function(t){if(r.includes(t))return!1}),!0);var h=r.getIterator();return!1!==u(h,(function(t){if(i(e,t))return c(h,"normal",!1)}))}},3838:(t,e,r)=>{"use strict";var n=r(7080),i=r(5170),s=r(8469),o=r(3789);t.exports=function(t){var e=n(this),r=o(t);return!(i(e)>r.size)&&!1!==s(e,(function(t){if(!r.includes(t))return!1}),!0)}},8527:(t,e,r)=>{"use strict";var n=r(7080),i=r(4402).has,s=r(5170),o=r(3789),a=r(507),u=r(9539);t.exports=function(t){var e=n(this),r=o(t);if(s(e){"use strict";var n=r(9504),i=r(507),s=r(4402),o=s.Set,a=s.proto,u=n(a.forEach),c=n(a.keys),h=c(new o).next;t.exports=function(t,e,r){return r?i({iterator:c(t),next:h},e):u(t,e)}},5170:(t,e,r)=>{"use strict";var n=r(6706),i=r(4402);t.exports=n(i.proto,"size","get")||function(t){return t.size}},7633:(t,e,r)=>{"use strict";var n=r(7751),i=r(2106),s=r(8227),o=r(3724),a=s("species");t.exports=function(t){var e=n(t);o&&e&&!e[a]&&i(e,a,{configurable:!0,get:function(){return this}})}},3650:(t,e,r)=>{"use strict";var n=r(7080),i=r(4402),s=r(9286),o=r(3789),a=r(507),u=i.add,c=i.has,h=i.remove;t.exports=function(t){var e=n(this),r=o(t).getIterator(),i=s(e);return a(r,(function(t){c(e,t)?h(i,t):u(i,t)})),i}},687:(t,e,r)=>{"use strict";var n=r(4913).f,i=r(9297),s=r(8227)("toStringTag");t.exports=function(t,e,r){t&&!r&&(t=t.prototype),t&&!i(t,s)&&n(t,s,{configurable:!0,value:e})}},4204:(t,e,r)=>{"use strict";var n=r(7080),i=r(4402).add,s=r(9286),o=r(3789),a=r(507);t.exports=function(t){var e=n(this),r=o(t).getIterator(),u=s(e);return a(r,(function(t){i(u,t)})),u}},6119:(t,e,r)=>{"use strict";var n=r(5745),i=r(3392),s=n("keys");t.exports=function(t){return s[t]||(s[t]=i(t))}},7629:(t,e,r)=>{"use strict";var n=r(6395),i=r(4475),s=r(9433),o="__core-js_shared__",a=t.exports=i[o]||s(o,{});(a.versions||(a.versions=[])).push({version:"3.36.1",mode:n?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE",source:"https://github.com/zloirock/core-js"})},5745:(t,e,r)=>{"use strict";var n=r(7629);t.exports=function(t,e){return n[t]||(n[t]=e||{})}},8183:(t,e,r)=>{"use strict";var n=r(9504),i=r(1291),s=r(655),o=r(7750),a=n("".charAt),u=n("".charCodeAt),c=n("".slice),h=function(t){return function(e,r){var n,h,l=s(o(e)),f=i(r),d=l.length;return f<0||f>=d?t?"":void 0:(n=u(l,f))<55296||n>56319||f+1===d||(h=u(l,f+1))<56320||h>57343?t?a(l,f):n:t?c(l,f,f+2):h-56320+(n-55296<<10)+65536}};t.exports={codeAt:h(!1),charAt:h(!0)}},4495:(t,e,r)=>{"use strict";var n=r(7388),i=r(9039),s=r(4475).String;t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol("symbol detection");return!s(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},9225:(t,e,r)=>{"use strict";var n,i,s,o,a=r(4475),u=r(8745),c=r(6080),h=r(4901),l=r(9297),f=r(9039),d=r(397),p=r(7680),m=r(4055),g=r(2812),v=r(8119),y=r(9088),b=a.setImmediate,x=a.clearImmediate,w=a.process,_=a.Dispatch,I=a.Function,A=a.MessageChannel,O=a.String,S=0,P={},k="onreadystatechange";f((function(){n=a.location}));var C=function(t){if(l(P,t)){var e=P[t];delete P[t],e()}},T=function(t){return function(){C(t)}},M=function(t){C(t.data)},E=function(t){a.postMessage(O(t),n.protocol+"//"+n.host)};b&&x||(b=function(t){g(arguments.length,1);var e=h(t)?t:I(t),r=p(arguments,1);return P[++S]=function(){u(e,void 0,r)},i(S),S},x=function(t){delete P[t]},y?i=function(t){w.nextTick(T(t))}:_&&_.now?i=function(t){_.now(T(t))}:A&&!v?(o=(s=new A).port2,s.port1.onmessage=M,i=c(o.postMessage,o)):a.addEventListener&&h(a.postMessage)&&!a.importScripts&&n&&"file:"!==n.protocol&&!f(E)?(i=E,a.addEventListener("message",M,!1)):i=k in m("script")?function(t){d.appendChild(m("script"))[k]=function(){d.removeChild(this),C(t)}}:function(t){setTimeout(T(t),0)}),t.exports={set:b,clear:x}},5610:(t,e,r)=>{"use strict";var n=r(1291),i=Math.max,s=Math.min;t.exports=function(t,e){var r=n(t);return r<0?i(r+e,0):s(r,e)}},5397:(t,e,r)=>{"use strict";var n=r(7055),i=r(7750);t.exports=function(t){return n(i(t))}},1291:(t,e,r)=>{"use strict";var n=r(741);t.exports=function(t){var e=+t;return e!=e||0===e?0:n(e)}},8014:(t,e,r)=>{"use strict";var n=r(1291),i=Math.min;t.exports=function(t){var e=n(t);return e>0?i(e,9007199254740991):0}},8981:(t,e,r)=>{"use strict";var n=r(7750),i=Object;t.exports=function(t){return i(n(t))}},8229:(t,e,r)=>{"use strict";var n=r(9590),i=RangeError;t.exports=function(t,e){var r=n(t);if(r%e)throw new i("Wrong offset");return r}},9590:(t,e,r)=>{"use strict";var n=r(1291),i=RangeError;t.exports=function(t){var e=n(t);if(e<0)throw new i("The argument can't be less than 0");return e}},2777:(t,e,r)=>{"use strict";var n=r(9565),i=r(34),s=r(757),o=r(5966),a=r(4270),u=r(8227),c=TypeError,h=u("toPrimitive");t.exports=function(t,e){if(!i(t)||s(t))return t;var r,u=o(t,h);if(u){if(void 0===e&&(e="default"),r=n(u,t,e),!i(r)||s(r))return r;throw new c("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},6969:(t,e,r)=>{"use strict";var n=r(2777),i=r(757);t.exports=function(t){var e=n(t,"string");return i(e)?e:e+""}},7650:(t,e,r)=>{"use strict";var n=r(7751),i=r(4901),s=r(1563),o=r(34),a=n("Set");t.exports=function(t){return function(t){return o(t)&&"number"==typeof t.size&&i(t.has)&&i(t.keys)}(t)?t:s(t)?new a(t):t}},2140:(t,e,r)=>{"use strict";var n={};n[r(8227)("toStringTag")]="z",t.exports="[object z]"===String(n)},655:(t,e,r)=>{"use strict";var n=r(6955),i=String;t.exports=function(t){if("Symbol"===n(t))throw new TypeError("Cannot convert a Symbol value to a string");return i(t)}},6823:t=>{"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},3392:(t,e,r)=>{"use strict";var n=r(9504),i=0,s=Math.random(),o=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+o(++i+s,36)}},7040:(t,e,r)=>{"use strict";var n=r(4495);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8686:(t,e,r)=>{"use strict";var n=r(3724),i=r(9039);t.exports=n&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},2812:t=>{"use strict";var e=TypeError;t.exports=function(t,r){if(t{"use strict";var n=r(4475),i=r(4901),s=n.WeakMap;t.exports=i(s)&&/native code/.test(String(s))},4995:(t,e,r)=>{"use strict";var n=r(9504),i=WeakMap.prototype;t.exports={WeakMap,set:n(i.set),get:n(i.get),has:n(i.has),remove:n(i.delete)}},8205:(t,e,r)=>{"use strict";var n=r(9504),i=WeakSet.prototype;t.exports={WeakSet,add:n(i.add),has:n(i.has),remove:n(i.delete)}},511:(t,e,r)=>{"use strict";var n=r(9167),i=r(9297),s=r(1951),o=r(4913).f;t.exports=function(t){var e=n.Symbol||(n.Symbol={});i(e,t)||o(e,t,{value:s.f(t)})}},1951:(t,e,r)=>{"use strict";var n=r(8227);e.f=n},8227:(t,e,r)=>{"use strict";var n=r(4475),i=r(5745),s=r(9297),o=r(3392),a=r(4495),u=r(7040),c=n.Symbol,h=i("wks"),l=u?c.for||c:c&&c.withoutSetter||o;t.exports=function(t){return s(h,t)||(h[t]=a&&s(c,t)?c[t]:l("Symbol."+t)),h[t]}},4423:(t,e,r)=>{"use strict";var n=r(6518),i=r(9617).includes,s=r(9039),o=r(6469);n({target:"Array",proto:!0,forced:s((function(){return!Array(1).includes()}))},{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o("includes")},8523:(t,e,r)=>{"use strict";r(6468)("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),r(6938))},7072:(t,e,r)=>{"use strict";var n=r(6518),i=r(9504),s=r(9306),o=r(7750),a=r(2652),u=r(2248),c=r(6395),h=u.Map,l=u.has,f=u.get,d=u.set,p=i([].push);n({target:"Map",stat:!0,forced:c},{groupBy:function(t,e){o(t),s(e);var r=new h,n=0;return a(t,(function(t){var i=e(t,n++);l(r,i)?p(f(r,i),t):d(r,i,[t])})),r}})},6033:(t,e,r)=>{"use strict";r(8523)},9479:(t,e,r)=>{"use strict";var n=r(4475),i=r(3724),s=r(2106),o=r(7979),a=r(9039),u=n.RegExp,c=u.prototype;i&&a((function(){var t=!0;try{u(".","d")}catch(e){t=!1}var e={},r="",n=t?"dgimsy":"gimsy",i=function(t,n){Object.defineProperty(e,t,{get:function(){return r+=n,!0}})},s={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var o in t&&(s.hasIndices="d"),s)i(o,s[o]);return Object.getOwnPropertyDescriptor(c,"flags").get.call(e)!==n||r!==n}))&&s(c,"flags",{configurable:!0,get:o})},8845:(t,e,r)=>{"use strict";var n=r(4475),i=r(9565),s=r(4644),o=r(6198),a=r(8229),u=r(8981),c=r(9039),h=n.RangeError,l=n.Int8Array,f=l&&l.prototype,d=f&&f.set,p=s.aTypedArray,m=s.exportTypedArrayMethod,g=!c((function(){var t=new Uint8ClampedArray(2);return i(d,t,{length:1,0:3},1),3!==t[1]})),v=g&&s.NATIVE_ARRAY_BUFFER_VIEWS&&c((function(){var t=new l(2);return t.set(1),t.set("2",1),0!==t[0]||2!==t[1]}));m("set",(function(t){p(this);var e=a(arguments.length>1?arguments[1]:void 0,1),r=u(t);if(g)return i(d,this,r,e);var n=this.length,s=o(r),c=0;if(s+e>n)throw new h("Wrong length");for(;c{"use strict";var n,i=r(2744),s=r(4475),o=r(9504),a=r(6279),u=r(3451),c=r(6468),h=r(4006),l=r(34),f=r(1181).enforce,d=r(9039),p=r(8622),m=Object,g=Array.isArray,v=m.isExtensible,y=m.isFrozen,b=m.isSealed,x=m.freeze,w=m.seal,_=!s.ActiveXObject&&"ActiveXObject"in s,I=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},A=c("WeakMap",I,h),O=A.prototype,S=o(O.set);if(p)if(_){n=h.getConstructor(I,"WeakMap",!0),u.enable();var P=o(O.delete),k=o(O.has),C=o(O.get);a(O,{delete:function(t){if(l(t)&&!v(t)){var e=f(this);return e.frozen||(e.frozen=new n),P(this,t)||e.frozen.delete(t)}return P(this,t)},has:function(t){if(l(t)&&!v(t)){var e=f(this);return e.frozen||(e.frozen=new n),k(this,t)||e.frozen.has(t)}return k(this,t)},get:function(t){if(l(t)&&!v(t)){var e=f(this);return e.frozen||(e.frozen=new n),k(this,t)?C(this,t):e.frozen.get(t)}return C(this,t)},set:function(t,e){if(l(t)&&!v(t)){var r=f(this);r.frozen||(r.frozen=new n),k(this,t)?S(this,t,e):r.frozen.set(t,e)}else S(this,t,e);return this}})}else i&&d((function(){var t=x([]);return S(new A,t,1),!y(t)}))&&a(O,{set:function(t,e){var r;return g(t)&&(y(t)?r=x:b(t)&&(r=w)),S(this,t,e),r&&r(t),this}})},3772:(t,e,r)=>{"use strict";r(5746)},7656:(t,e,r)=>{"use strict";var n=r(3724),i=r(6469),s=r(8981),o=r(6198),a=r(2106);n&&(a(Array.prototype,"lastIndex",{configurable:!0,get:function(){var t=s(this),e=o(t);return 0===e?0:e-1}}),i("lastIndex"))},5105:(t,e,r)=>{"use strict";var n=r(3724),i=r(6469),s=r(8981),o=r(6198),a=r(2106);n&&(a(Array.prototype,"lastItem",{configurable:!0,get:function(){var t=s(this),e=o(t);return 0===e?void 0:t[e-1]},set:function(t){var e=s(this),r=o(e);return e[0===r?0:r-1]=t}}),i("lastItem"))},7467:(t,e,r)=>{"use strict";var n=r(6518),i=r(8745),s=r(9323),o=r(7751),a=r(2360),u=Object,c=function(){var t=o("Object","freeze");return t?t(a(null)):a(null)};n({global:!0,forced:!0},{compositeKey:function(){return i(s,u,arguments).get("object",c)}})},586:(t,e,r)=>{"use strict";var n=r(6518),i=r(9323),s=r(7751),o=r(8745);n({global:!0,forced:!0},{compositeSymbol:function(){return 1===arguments.length&&"string"==typeof arguments[0]?s("Symbol").for(arguments[0]):o(i,null,arguments).get("symbol",s("Symbol"))}})},1517:(t,e,r)=>{"use strict";var n=r(6518),i=r(6194),s=r(2248).remove;n({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var t,e=i(this),r=!0,n=0,o=arguments.length;n{"use strict";var n=r(6518),i=r(6080),s=r(6194),o=r(6223);n({target:"Map",proto:!0,real:!0,forced:!0},{every:function(t){var e=s(this),r=i(t,arguments.length>1?arguments[1]:void 0);return!1!==o(e,(function(t,n){if(!r(t,n,e))return!1}),!0)}})},4190:(t,e,r)=>{"use strict";var n=r(6518),i=r(6080),s=r(6194),o=r(2248),a=r(6223),u=o.Map,c=o.set;n({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(t){var e=s(this),r=i(t,arguments.length>1?arguments[1]:void 0),n=new u;return a(e,(function(t,i){r(t,i,e)&&c(n,i,t)})),n}})},6097:(t,e,r)=>{"use strict";var n=r(6518),i=r(6080),s=r(6194),o=r(6223);n({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(t){var e=s(this),r=i(t,arguments.length>1?arguments[1]:void 0),n=o(e,(function(t,n){if(r(t,n,e))return{key:n}}),!0);return n&&n.key}})},2359:(t,e,r)=>{"use strict";var n=r(6518),i=r(6080),s=r(6194),o=r(6223);n({target:"Map",proto:!0,real:!0,forced:!0},{find:function(t){var e=s(this),r=i(t,arguments.length>1?arguments[1]:void 0),n=o(e,(function(t,n){if(r(t,n,e))return{value:t}}),!0);return n&&n.value}})},9172:(t,e,r)=>{"use strict";var n=r(6518),i=r(2248);n({target:"Map",stat:!0,forced:!0},{from:r(933)(i.Map,i.set,!0)})},7019:(t,e,r)=>{"use strict";r(7072)},7273:(t,e,r)=>{"use strict";var n=r(6518),i=r(3317),s=r(6194),o=r(6223);n({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(t){return!0===o(s(this),(function(e){if(i(e,t))return!0}),!0)}})},1723:(t,e,r)=>{"use strict";var n=r(6518),i=r(9565),s=r(2652),o=r(4901),a=r(9306),u=r(2248).Map;n({target:"Map",stat:!0,forced:!0},{keyBy:function(t,e){var r=new(o(this)?this:u);a(e);var n=a(r.set);return s(t,(function(t){i(n,r,e(t),t)})),r}})},7415:(t,e,r)=>{"use strict";var n=r(6518),i=r(6194),s=r(6223);n({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(t){var e=s(i(this),(function(e,r){if(e===t)return{key:r}}),!0);return e&&e.key}})},9929:(t,e,r)=>{"use strict";var n=r(6518),i=r(6080),s=r(6194),o=r(2248),a=r(6223),u=o.Map,c=o.set;n({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(t){var e=s(this),r=i(t,arguments.length>1?arguments[1]:void 0),n=new u;return a(e,(function(t,i){c(n,r(t,i,e),t)})),n}})},7583:(t,e,r)=>{"use strict";var n=r(6518),i=r(6080),s=r(6194),o=r(2248),a=r(6223),u=o.Map,c=o.set;n({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(t){var e=s(this),r=i(t,arguments.length>1?arguments[1]:void 0),n=new u;return a(e,(function(t,i){c(n,i,r(t,i,e))})),n}})},5122:(t,e,r)=>{"use strict";var n=r(6518),i=r(6194),s=r(2652),o=r(2248).set;n({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(t){for(var e=i(this),r=arguments.length,n=0;n{"use strict";var n=r(6518),i=r(2248);n({target:"Map",stat:!0,forced:!0},{of:r(7500)(i.Map,i.set,!0)})},230:(t,e,r)=>{"use strict";var n=r(6518),i=r(9306),s=r(6194),o=r(6223),a=TypeError;n({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(t){var e=s(this),r=arguments.length<2,n=r?void 0:arguments[1];if(i(t),o(e,(function(i,s){r?(r=!1,n=i):n=t(n,i,s,e)})),r)throw new a("Reduce of empty map with no initial value");return n}})},7268:(t,e,r)=>{"use strict";var n=r(6518),i=r(6080),s=r(6194),o=r(6223);n({target:"Map",proto:!0,real:!0,forced:!0},{some:function(t){var e=s(this),r=i(t,arguments.length>1?arguments[1]:void 0);return!0===o(e,(function(t,n){if(r(t,n,e))return!0}),!0)}})},9733:(t,e,r)=>{"use strict";var n=r(6518),i=r(9306),s=r(6194),o=r(2248),a=TypeError,u=o.get,c=o.has,h=o.set;n({target:"Map",proto:!0,real:!0,forced:!0},{update:function(t,e){var r=s(this),n=arguments.length;i(e);var o=c(r,t);if(!o&&n<3)throw new a("Updating absent value");var l=o?u(r,t):i(n>2?arguments[2]:void 0)(t,r);return h(r,t,e(l,t,r)),r}})},8179:(t,e,r)=>{"use strict";var n=r(6518),i=Math.min,s=Math.max;n({target:"Math",stat:!0,forced:!0},{clamp:function(t,e,r){return i(r,s(e,t))}})},456:(t,e,r)=>{"use strict";r(6518)({target:"Math",stat:!0,nonConfigurable:!0,nonWritable:!0},{DEG_PER_RAD:Math.PI/180})},4017:(t,e,r)=>{"use strict";var n=r(6518),i=180/Math.PI;n({target:"Math",stat:!0,forced:!0},{degrees:function(t){return t*i}})},9310:(t,e,r)=>{"use strict";var n=r(6518),i=r(7905),s=r(5617);n({target:"Math",stat:!0,forced:!0},{fscale:function(t,e,r,n,o){return s(i(t,e,r,n,o))}})},3062:(t,e,r)=>{"use strict";r(6518)({target:"Math",stat:!0,forced:!0},{iaddh:function(t,e,r,n){var i=t>>>0,s=r>>>0;return(e>>>0)+(n>>>0)+((i&s|(i|s)&~(i+s>>>0))>>>31)|0}})},6369:(t,e,r)=>{"use strict";r(6518)({target:"Math",stat:!0,forced:!0},{imulh:function(t,e){var r=65535,n=+t,i=+e,s=n&r,o=i&r,a=n>>16,u=i>>16,c=(a*o>>>0)+(s*o>>>16);return a*u+(c>>16)+((s*u>>>0)+(c&r)>>16)}})},5637:(t,e,r)=>{"use strict";r(6518)({target:"Math",stat:!0,forced:!0},{isubh:function(t,e,r,n){var i=t>>>0,s=r>>>0;return(e>>>0)-(n>>>0)-((~i&s|(i^~s)&i-s>>>0)>>>31)|0}})},2848:(t,e,r)=>{"use strict";r(6518)({target:"Math",stat:!0,nonConfigurable:!0,nonWritable:!0},{RAD_PER_DEG:180/Math.PI})},4842:(t,e,r)=>{"use strict";var n=r(6518),i=Math.PI/180;n({target:"Math",stat:!0,forced:!0},{radians:function(t){return t*i}})},4746:(t,e,r)=>{"use strict";r(6518)({target:"Math",stat:!0,forced:!0},{scale:r(7905)})},3454:(t,e,r)=>{"use strict";var n=r(6518),i=r(8551),s=r(360),o=r(3994),a=r(2529),u=r(1181),c="Seeded Random",h=c+" Generator",l=u.set,f=u.getterFor(h),d=TypeError,p=o((function(t){l(this,{type:h,seed:t%2147483647})}),c,(function(){var t=f(this),e=t.seed=(1103515245*t.seed+12345)%2147483647;return a((1073741823&e)/1073741823,!1)}));n({target:"Math",stat:!0,forced:!0},{seededPRNG:function(t){var e=i(t).seed;if(!s(e))throw new d('Math.seededPRNG() argument should have a "seed" field with a finite value.');return new p(e)}})},6660:(t,e,r)=>{"use strict";r(6518)({target:"Math",stat:!0,forced:!0},{signbit:function(t){var e=+t;return e==e&&0===e?1/e==-1/0:e<0}})},5941:(t,e,r)=>{"use strict";r(6518)({target:"Math",stat:!0,forced:!0},{umulh:function(t,e){var r=65535,n=+t,i=+e,s=n&r,o=i&r,a=n>>>16,u=i>>>16,c=(a*o>>>0)+(s*o>>>16);return a*u+(c>>>16)+((s*u>>>0)+(c&r)>>>16)}})},2101:(t,e,r)=>{"use strict";var n=r(6518),i=r(9504),s=r(1291),o="Invalid number representation",a=RangeError,u=SyntaxError,c=TypeError,h=parseInt,l=Math.pow,f=/^[\d.a-z]+$/,d=i("".charAt),p=i(f.exec),m=i(1..toString),g=i("".slice),v=i("".split);n({target:"Number",stat:!0,forced:!0},{fromString:function(t,e){var r=1;if("string"!=typeof t)throw new c(o);if(!t.length)throw new u(o);if("-"===d(t,0)&&(r=-1,!(t=g(t,1)).length))throw new u(o);var n=void 0===e?10:s(e);if(n<2||n>36)throw new a("Invalid radix");if(!p(f,t))throw new u(o);var i=v(t,"."),y=h(i[0],n);if(i.length>1&&(y+=h(i[1],n)/l(n,i[1].length)),10===n&&m(y,n)!==t)throw new u(o);return r*y}})},5239:(t,e,r)=>{"use strict";var n=r(6518),i=r(9565),s=r(3724),o=r(7633),a=r(9306),u=r(8551),c=r(679),h=r(4901),l=r(4117),f=r(34),d=r(5966),p=r(6840),m=r(6279),g=r(2106),v=r(3138),y=r(8227),b=r(1181),x=y("observable"),w="Observable",_="Subscription",I="SubscriptionObserver",A=b.getterFor,O=b.set,S=A(w),P=A(_),k=A(I),C=function(t){this.observer=u(t),this.cleanup=void 0,this.subscriptionObserver=void 0};C.prototype={type:_,clean:function(){var t=this.cleanup;if(t){this.cleanup=void 0;try{t()}catch(t){v(t)}}},close:function(){if(!s){var t=this.facade,e=this.subscriptionObserver;t.closed=!0,e&&(e.closed=!0)}this.observer=void 0},isClosed:function(){return void 0===this.observer}};var T=function(t,e){var r,n=O(this,new C(t));s||(this.closed=!1);try{(r=d(t,"start"))&&i(r,t,this)}catch(t){v(t)}if(!n.isClosed()){var o=n.subscriptionObserver=new M(n);try{var u=e(o),c=u;l(u)||(n.cleanup=h(u.unsubscribe)?function(){c.unsubscribe()}:a(u))}catch(t){return void o.error(t)}n.isClosed()&&n.clean()}};T.prototype=m({},{unsubscribe:function(){var t=P(this);t.isClosed()||(t.close(),t.clean())}}),s&&g(T.prototype,"closed",{configurable:!0,get:function(){return P(this).isClosed()}});var M=function(t){O(this,{type:I,subscriptionState:t}),s||(this.closed=!1)};M.prototype=m({},{next:function(t){var e=k(this).subscriptionState;if(!e.isClosed()){var r=e.observer;try{var n=d(r,"next");n&&i(n,r,t)}catch(t){v(t)}}},error:function(t){var e=k(this).subscriptionState;if(!e.isClosed()){var r=e.observer;e.close();try{var n=d(r,"error");n?i(n,r,t):v(t)}catch(t){v(t)}e.clean()}},complete:function(){var t=k(this).subscriptionState;if(!t.isClosed()){var e=t.observer;t.close();try{var r=d(e,"complete");r&&i(r,e)}catch(t){v(t)}t.clean()}}}),s&&g(M.prototype,"closed",{configurable:!0,get:function(){return k(this).subscriptionState.isClosed()}});var E=function(t){c(this,F),O(this,{type:w,subscriber:a(t)})},F=E.prototype;m(F,{subscribe:function(t){var e=arguments.length;return new T(h(t)?{next:t,error:e>1?arguments[1]:void 0,complete:e>2?arguments[2]:void 0}:f(t)?t:{},S(this).subscriber)}}),p(F,x,(function(){return this})),n({global:!0,constructor:!0,forced:!0},{Observable:E}),o(w)},9035:(t,e,r)=>{"use strict";var n=r(6518),i=r(7751),s=r(9565),o=r(8551),a=r(3517),u=r(81),c=r(5966),h=r(2652),l=r(8227)("observable");n({target:"Observable",stat:!0,forced:!0},{from:function(t){var e=a(this)?this:i("Observable"),r=c(o(t),l);if(r){var n=o(s(r,t));return n.constructor===e?n:new e((function(t){return n.subscribe(t)}))}var f=u(t);return new e((function(t){h(f,(function(e,r){if(t.next(e),t.closed)return r()}),{IS_ITERATOR:!0,INTERRUPTED:!0}),t.complete()}))}})},2917:(t,e,r)=>{"use strict";r(5239),r(9035),r(8662)},8662:(t,e,r)=>{"use strict";var n=r(6518),i=r(7751),s=r(3517),o=i("Array");n({target:"Observable",stat:!0,forced:!0},{of:function(){for(var t=s(this)?this:i("Observable"),e=arguments.length,r=o(e),n=0;n{"use strict";var n=r(6518),i=r(6043),s=r(1103);n({target:"Promise",stat:!0,forced:!0},{try:function(t){var e=i.f(this),r=s(t);return(r.error?e.reject:e.resolve)(r.value),e.promise}})},5186:(t,e,r)=>{"use strict";var n=r(6518),i=r(8449),s=r(8551),o=i.toKey,a=i.set;n({target:"Reflect",stat:!0},{defineMetadata:function(t,e,r){var n=arguments.length<4?void 0:o(arguments[3]);a(t,e,s(r),n)}})},2978:(t,e,r)=>{"use strict";var n=r(6518),i=r(8449),s=r(8551),o=i.toKey,a=i.getMap,u=i.store;n({target:"Reflect",stat:!0},{deleteMetadata:function(t,e){var r=arguments.length<3?void 0:o(arguments[2]),n=a(s(e),r,!1);if(void 0===n||!n.delete(t))return!1;if(n.size)return!0;var i=u.get(e);return i.delete(r),!!i.size||u.delete(e)}})},9852:(t,e,r)=>{"use strict";var n=r(6518),i=r(9504),s=r(8449),o=r(8551),a=r(2787),u=i(r(1946)),c=i([].concat),h=s.keys,l=s.toKey,f=function(t,e){var r=h(t,e),n=a(t);if(null===n)return r;var i=f(n,e);return i.length?r.length?u(c(r,i)):i:r};n({target:"Reflect",stat:!0},{getMetadataKeys:function(t){var e=arguments.length<2?void 0:l(arguments[1]);return f(o(t),e)}})},2527:(t,e,r)=>{"use strict";var n=r(6518),i=r(8449),s=r(8551),o=r(2787),a=i.has,u=i.get,c=i.toKey,h=function(t,e,r){if(a(t,e,r))return u(t,e,r);var n=o(e);return null!==n?h(t,n,r):void 0};n({target:"Reflect",stat:!0},{getMetadata:function(t,e){var r=arguments.length<3?void 0:c(arguments[2]);return h(t,s(e),r)}})},617:(t,e,r)=>{"use strict";var n=r(6518),i=r(8449),s=r(8551),o=i.keys,a=i.toKey;n({target:"Reflect",stat:!0},{getOwnMetadataKeys:function(t){var e=arguments.length<2?void 0:a(arguments[1]);return o(s(t),e)}})},2376:(t,e,r)=>{"use strict";var n=r(6518),i=r(8449),s=r(8551),o=i.get,a=i.toKey;n({target:"Reflect",stat:!0},{getOwnMetadata:function(t,e){var r=arguments.length<3?void 0:a(arguments[2]);return o(t,s(e),r)}})},3067:(t,e,r)=>{"use strict";var n=r(6518),i=r(8449),s=r(8551),o=r(2787),a=i.has,u=i.toKey,c=function(t,e,r){if(a(t,e,r))return!0;var n=o(e);return null!==n&&c(t,n,r)};n({target:"Reflect",stat:!0},{hasMetadata:function(t,e){var r=arguments.length<3?void 0:u(arguments[2]);return c(t,s(e),r)}})},6820:(t,e,r)=>{"use strict";var n=r(6518),i=r(8449),s=r(8551),o=i.has,a=i.toKey;n({target:"Reflect",stat:!0},{hasOwnMetadata:function(t,e){var r=arguments.length<3?void 0:a(arguments[2]);return o(t,s(e),r)}})},8288:(t,e,r)=>{"use strict";var n=r(6518),i=r(8449),s=r(8551),o=i.toKey,a=i.set;n({target:"Reflect",stat:!0},{metadata:function(t,e){return function(r,n){a(t,e,s(r),o(n))}}})},5509:(t,e,r)=>{"use strict";var n=r(6518),i=r(7080),s=r(4402).add;n({target:"Set",proto:!0,real:!0,forced:!0},{addAll:function(){for(var t=i(this),e=0,r=arguments.length;e{"use strict";var n=r(6518),i=r(7080),s=r(4402).remove;n({target:"Set",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var t,e=i(this),r=!0,n=0,o=arguments.length;n{"use strict";var n=r(6518),i=r(9565),s=r(7650),o=r(3440);n({target:"Set",proto:!0,real:!0,forced:!0},{difference:function(t){return i(o,this,s(t))}})},1927:(t,e,r)=>{"use strict";var n=r(6518),i=r(6080),s=r(7080),o=r(8469);n({target:"Set",proto:!0,real:!0,forced:!0},{every:function(t){var e=s(this),r=i(t,arguments.length>1?arguments[1]:void 0);return!1!==o(e,(function(t){if(!r(t,t,e))return!1}),!0)}})},1632:(t,e,r)=>{"use strict";var n=r(6518),i=r(6080),s=r(7080),o=r(4402),a=r(8469),u=o.Set,c=o.add;n({target:"Set",proto:!0,real:!0,forced:!0},{filter:function(t){var e=s(this),r=i(t,arguments.length>1?arguments[1]:void 0),n=new u;return a(e,(function(t){r(t,t,e)&&c(n,t)})),n}})},4377:(t,e,r)=>{"use strict";var n=r(6518),i=r(6080),s=r(7080),o=r(8469);n({target:"Set",proto:!0,real:!0,forced:!0},{find:function(t){var e=s(this),r=i(t,arguments.length>1?arguments[1]:void 0),n=o(e,(function(t){if(r(t,t,e))return{value:t}}),!0);return n&&n.value}})},9522:(t,e,r)=>{"use strict";var n=r(6518),i=r(4402);n({target:"Set",stat:!0,forced:!0},{from:r(933)(i.Set,i.add,!1)})},6771:(t,e,r)=>{"use strict";var n=r(6518),i=r(9565),s=r(7650),o=r(8750);n({target:"Set",proto:!0,real:!0,forced:!0},{intersection:function(t){return i(o,this,s(t))}})},2516:(t,e,r)=>{"use strict";var n=r(6518),i=r(9565),s=r(7650),o=r(4449);n({target:"Set",proto:!0,real:!0,forced:!0},{isDisjointFrom:function(t){return i(o,this,s(t))}})},8931:(t,e,r)=>{"use strict";var n=r(6518),i=r(9565),s=r(7650),o=r(3838);n({target:"Set",proto:!0,real:!0,forced:!0},{isSubsetOf:function(t){return i(o,this,s(t))}})},2514:(t,e,r)=>{"use strict";var n=r(6518),i=r(9565),s=r(7650),o=r(8527);n({target:"Set",proto:!0,real:!0,forced:!0},{isSupersetOf:function(t){return i(o,this,s(t))}})},5694:(t,e,r)=>{"use strict";var n=r(6518),i=r(9504),s=r(7080),o=r(8469),a=r(655),u=i([].join),c=i([].push);n({target:"Set",proto:!0,real:!0,forced:!0},{join:function(t){var e=s(this),r=void 0===t?",":a(t),n=[];return o(e,(function(t){c(n,t)})),u(n,r)}})},2774:(t,e,r)=>{"use strict";var n=r(6518),i=r(6080),s=r(7080),o=r(4402),a=r(8469),u=o.Set,c=o.add;n({target:"Set",proto:!0,real:!0,forced:!0},{map:function(t){var e=s(this),r=i(t,arguments.length>1?arguments[1]:void 0),n=new u;return a(e,(function(t){c(n,r(t,t,e))})),n}})},3283:(t,e,r)=>{"use strict";var n=r(6518),i=r(4402);n({target:"Set",stat:!0,forced:!0},{of:r(7500)(i.Set,i.add,!1)})},9536:(t,e,r)=>{"use strict";var n=r(6518),i=r(9306),s=r(7080),o=r(8469),a=TypeError;n({target:"Set",proto:!0,real:!0,forced:!0},{reduce:function(t){var e=s(this),r=arguments.length<2,n=r?void 0:arguments[1];if(i(t),o(e,(function(i){r?(r=!1,n=i):n=t(n,i,i,e)})),r)throw new a("Reduce of empty set with no initial value");return n}})},1926:(t,e,r)=>{"use strict";var n=r(6518),i=r(6080),s=r(7080),o=r(8469);n({target:"Set",proto:!0,real:!0,forced:!0},{some:function(t){var e=s(this),r=i(t,arguments.length>1?arguments[1]:void 0);return!0===o(e,(function(t){if(r(t,t,e))return!0}),!0)}})},4483:(t,e,r)=>{"use strict";var n=r(6518),i=r(9565),s=r(7650),o=r(3650);n({target:"Set",proto:!0,real:!0,forced:!0},{symmetricDifference:function(t){return i(o,this,s(t))}})},6215:(t,e,r)=>{"use strict";var n=r(6518),i=r(9565),s=r(7650),o=r(4204);n({target:"Set",proto:!0,real:!0,forced:!0},{union:function(t){return i(o,this,s(t))}})},8898:(t,e,r)=>{"use strict";var n=r(6518),i=r(8183).charAt,s=r(7750),o=r(1291),a=r(655);n({target:"String",proto:!0,forced:!0},{at:function(t){var e=a(s(this)),r=e.length,n=o(t),u=n>=0?n:r+n;return u<0||u>=r?void 0:i(e,u)}})},4176:(t,e,r)=>{"use strict";var n=r(6518),i=r(3994),s=r(2529),o=r(7750),a=r(655),u=r(1181),c=r(8183),h=c.codeAt,l=c.charAt,f="String Iterator",d=u.set,p=u.getterFor(f),m=i((function(t){d(this,{type:f,string:t,index:0})}),"String",(function(){var t,e=p(this),r=e.string,n=e.index;return n>=r.length?s(void 0,!0):(t=l(r,n),e.index+=t.length,s({codePoint:h(t,0),position:n},!1))}));n({target:"String",proto:!0,forced:!0},{codePoints:function(){return new m(a(o(this)))}})},3275:(t,e,r)=>{"use strict";var n=r(4475),i=r(511),s=r(4913).f,o=r(7347).f,a=n.Symbol;if(i("dispose"),a){var u=o(a,"dispose");u.enumerable&&u.configurable&&u.writable&&s(a,"dispose",{value:u.value,enumerable:!1,configurable:!1,writable:!1})}},2793:(t,e,r)=>{"use strict";r(511)("observable")},7208:(t,e,r)=>{"use strict";r(511)("patternMatch")},7348:(t,e,r)=>{"use strict";var n=r(6518),i=r(6557),s=r(4995).remove;n({target:"WeakMap",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var t,e=i(this),r=!0,n=0,o=arguments.length;n{"use strict";var n=r(6518),i=r(4995);n({target:"WeakMap",stat:!0,forced:!0},{from:r(933)(i.WeakMap,i.set,!0)})},9732:(t,e,r)=>{"use strict";var n=r(6518),i=r(4995);n({target:"WeakMap",stat:!0,forced:!0},{of:r(7500)(i.WeakMap,i.set,!0)})},3742:(t,e,r)=>{"use strict";var n=r(6518),i=r(3755),s=r(8205).add;n({target:"WeakSet",proto:!0,real:!0,forced:!0},{addAll:function(){for(var t=i(this),e=0,r=arguments.length;e{"use strict";var n=r(6518),i=r(3755),s=r(8205).remove;n({target:"WeakSet",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var t,e=i(this),r=!0,n=0,o=arguments.length;n{"use strict";var n=r(6518),i=r(8205);n({target:"WeakSet",stat:!0,forced:!0},{from:r(933)(i.WeakSet,i.add,!1)})},6270:(t,e,r)=>{"use strict";var n=r(6518),i=r(8205);n({target:"WeakSet",stat:!0,forced:!0},{of:r(7500)(i.WeakSet,i.add,!1)})},6368:(t,e,r)=>{"use strict";var n=r(6518),i=r(4475),s=r(9225).clear;n({global:!0,bind:!0,enumerable:!0,forced:i.clearImmediate!==s},{clearImmediate:s})},9848:(t,e,r)=>{"use strict";r(6368),r(9309)},9309:(t,e,r)=>{"use strict";var n=r(6518),i=r(4475),s=r(9225).set,o=r(9472),a=i.setImmediate?o(s,!1):s;n({global:!0,bind:!0,enumerable:!0,forced:i.setImmediate!==a},{setImmediate:a})}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var s=e[n]={exports:{}};return t[n].call(s.exports,s,s.exports,r),s.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{OPFSCache:()=>s.x});var t=r(1136),e=r(577);let i=new class{constructor(){this._workers={}}dispatch(r){if(Object.prototype.hasOwnProperty.call(r,"operation")){r.endpoint&&e.sR.setEndpointAndApi(r.endpoint,r.api);var n=this._workers[r.operation];if(n){if(r.basePath="",r.url){var i=r.url.lastIndexOf("/");-1!=i&&(r.basePath=r.url.substr(0,i+1))}r.raiseError=function(){r.worker.raiseError.apply(r.worker,arguments)},r.onFailureCallback=t.PG.defaultFailureCallback.bind(r),n.doOperation(r)}}}register(t,e){this._workers[t]=e}unregister(t){delete this._workers[t]}};r(3870).k(i),r(574).k(i),r(8262).k(i),r(5499).k(i),r(3484).k(i),r(2637).k(i),r(8401).k(i),r(6324).k(i),r(1711).k(i),r(7676).k(i),i.register("REGISTER_FILE_PORT",{doOperation:function(e){if(e&&e.protocolPortMap)for(var r in e.protocolPortMap)t.PG.registerProtocolPort(r,e.protocolPortMap[r])}});var s=r(8914);self.addEventListener("message",(function(t){var e=t.data;e.worker=self,i.dispatch(e)}),!1),self.raiseError=function(t,e,r){self.postMessage({error:{code:t,msg:e,args:r}})},self.debug=function(t){self.postMessage({debug:1,message:t})}})(),LMV=n})(); //# sourceMappingURL=lmvworker.min.js.map