archgine 1.0.49 → 1.0.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.umd.js CHANGED
@@ -1,37 +1,37 @@
1
- (function(le,Un){typeof exports=="object"&&typeof module<"u"?Un(exports):typeof define=="function"&&define.amd?define(["exports"],Un):(le=typeof globalThis<"u"?globalThis:le||self,Un(le.archgine={}))})(this,function(le){"use strict";const Un={name:"TinyEngine",containerId:"tinyEngine",canvas:"tinyEngine",width:0,height:0,aspect:1,dpr:1,alpha:!1,color:"#232323",fps:60,syncDelay:800,animateDuration:600,mergeRendering:!1,usedCache:!1,showPoints:!1,wireframe:!1,castShadow:!1,workerRender:!1,monitorDuration:1e4,light:{color:"#f2f2f2",position:[-6,6,0],castShadow:!0,shadowBlur:16},camera:{left:-1,right:1,top:1,bottom:-1,aspect:1,eye:[0,0,0],up:[0,0,1],helperEnable:!0},controls:{target:[0,0,0],minDistance:.1,maxDistance:1e3,enablePan:!0,enableRotate:!0,enableZoom:!0,focusMode:!0,autoRotate:!1,autoRotateSpeed:.5,enableDamping:!0,dampingFactor:.2},gridHelper:{fill:"#e3e3e3"},axesHelper:{},displayUnits:"",tooltip:!0,assetType:"rm",zoomToSelectEnable:!1,selectEnable:!1,multiSelectEnable:!1,socialDistanceEnable:!1,socialDistance:{radius:3}};function dh(r,t){const e=r.x*Math.cos(t)-r.y*Math.sin(t),n=r.y*Math.cos(t)+r.x*Math.sin(t);r.x=e,r.y=n}function jd(r,t,e){r.x+=t,r.y+=e}function gh(r,t){r.x*=t,r.y*=t}class Hn{commands;constructor(t){this.commands=[],t&&t instanceof Hn?this.commands.push(...t.commands):t&&(this.commands=rg(t))}addPath(t){t&&t instanceof Hn&&this.commands.push(...t.commands)}moveTo(t,e){this.commands.push(["M",t,e])}lineTo(t,e){this.commands.push(["L",t,e])}arc(t,e,n,a,u,l){this.commands.push(["AC",t,e,n,a,u,!!l])}arcTo(t,e,n,a,u){this.commands.push(["AT",t,e,n,a,u])}ellipse(t,e,n,a,u,l,c,f){this.commands.push(["E",t,e,n,a,u,l,c,!!f])}closePath(){this.commands.push(["Z"])}bezierCurveTo(t,e,n,a,u,l){this.commands.push(["C",t,e,n,a,u,l])}quadraticCurveTo(t,e,n,a){this.commands.push(["Q",t,e,n,a])}rect(t,e,n,a){this.commands.push(["R",t,e,n,a])}roundRect(t,e,n,a,u){typeof u>"u"?this.commands.push(["RR",t,e,n,a,0]):this.commands.push(["RR",t,e,n,a,u])}}function Ku(r,t){let e=0,n=0,a,u,l,c,f,d,y,A,_,C,F,N,M,R,q,z,w,L,U,j,tt,Z=null,rt=null,J=null,st=null,ht=null,ct=null;r.beginPath();for(let ft=0;ft<t.length;++ft){L=t[ft][0],L!=="S"&&L!=="s"&&L!=="C"&&L!=="c"&&(Z=null,rt=null),L!=="T"&&L!=="t"&&L!=="Q"&&L!=="q"&&(J=null,st=null);let O;switch(L){case"m":case"M":O=t[ft],L==="m"?(e+=O[1],n+=O[2]):(e=O[1],n=O[2]),(L==="M"||!ht)&&(ht={x:e,y:n}),r.moveTo(e,n);break;case"l":O=t[ft],e+=O[1],n+=O[2],r.lineTo(e,n);break;case"L":O=t[ft],e=O[1],n=O[2],r.lineTo(e,n);break;case"H":O=t[ft],e=O[1],r.lineTo(e,n);break;case"h":O=t[ft],e+=O[1],r.lineTo(e,n);break;case"V":O=t[ft],n=O[1],r.lineTo(e,n);break;case"v":O=t[ft],n+=O[1],r.lineTo(e,n);break;case"a":case"A":if(O=t[ft],ct===null)throw new Error("This should never happen");L==="a"?(e+=O[6],n+=O[7]):(e=O[6],n=O[7]),R=O[1],q=O[2],y=O[3]*Math.PI/180,l=!!O[4],c=!!O[5],f={x:e,y:n},d={x:(ct.x-f.x)/2,y:(ct.y-f.y)/2},dh(d,-y),A=d.x*d.x/(R*R)+d.y*d.y/(q*q),A>1&&(A=Math.sqrt(A),R*=A,q*=A),U={x:R*d.y/q,y:-(q*d.x)/R},_=R*R*q*q,C=R*R*d.y*d.y+q*q*d.x*d.x,c!==l?gh(U,Math.sqrt((_-C)/C)||0):gh(U,-Math.sqrt((_-C)/C)||0),u=Math.atan2((d.y-U.y)/q,(d.x-U.x)/R),a=Math.atan2(-(d.y+U.y)/q,-(d.x+U.x)/R),dh(U,y),jd(U,(f.x+ct.x)/2,(f.y+ct.y)/2),r.save(),r.translate(U.x,U.y),r.rotate(y),r.scale(R,q),r.arc(0,0,1,u,a,!c),r.restore();break;case"C":O=t[ft],Z=O[3],rt=O[4],e=O[5],n=O[6],r.bezierCurveTo(O[1],O[2],Z,rt,e,n);break;case"c":O=t[ft],r.bezierCurveTo(O[1]+e,O[2]+n,O[3]+e,O[4]+n,O[5]+e,O[6]+n),Z=O[3]+e,rt=O[4]+n,e+=O[5],n+=O[6];break;case"S":O=t[ft],(Z===null||rt===null)&&(Z=e,rt=n),r.bezierCurveTo(2*e-Z,2*n-rt,O[1],O[2],O[3],O[4]),Z=O[1],rt=O[2],e=O[3],n=O[4];break;case"s":O=t[ft],(Z===null||rt===null)&&(Z=e,rt=n),r.bezierCurveTo(2*e-Z,2*n-rt,O[1]+e,O[2]+n,O[3]+e,O[4]+n),Z=O[1]+e,rt=O[2]+n,e+=O[3],n+=O[4];break;case"Q":O=t[ft],J=O[1],st=O[2],e=O[3],n=O[4],r.quadraticCurveTo(J,st,e,n);break;case"q":O=t[ft],J=O[1]+e,st=O[2]+n,e+=O[3],n+=O[4],r.quadraticCurveTo(J,st,e,n);break;case"T":O=t[ft],(J===null||st===null)&&(J=e,st=n),J=2*e-J,st=2*n-st,e=O[1],n=O[2],r.quadraticCurveTo(J,st,e,n);break;case"t":O=t[ft],(J===null||st===null)&&(J=e,st=n),J=2*e-J,st=2*n-st,e+=O[1],n+=O[2],r.quadraticCurveTo(J,st,e,n);break;case"z":case"Z":ht&&(e=ht.x,n=ht.y),ht=null,r.closePath();break;case"AC":O=t[ft],e=O[1],n=O[2],M=O[3],u=O[4],a=O[5],j=O[6],r.arc(e,n,M,u,a,j);break;case"AT":O=t[ft],F=O[1],N=O[2],e=O[3],n=O[4],M=O[5],r.arcTo(F,N,e,n,M);break;case"E":O=t[ft],e=O[1],n=O[2],R=O[3],q=O[4],y=O[5],u=O[6],a=O[7],j=O[8],r.save(),r.translate(e,n),r.rotate(y),r.scale(R,q),r.arc(0,0,1,u,a,j),r.restore();break;case"R":O=t[ft],e=O[1],n=O[2],z=O[3],w=O[4],ht={x:e,y:n},r.rect(e,n,z,w);break;case"RR":O=t[ft],e=O[1],n=O[2],z=O[3],w=O[4],tt=O[5],ht={x:e,y:n},r.roundRect(e,n,z,w,tt);break}ct?(ct.x=e,ct.y=n):ct={x:e,y:n}}}function Kd(r){if(!r||!r.CanvasRenderingContext2D||r.Path2D)return;const{CanvasRenderingContext2D:t}=r,e=t==null?void 0:t.prototype.fill,n=t==null?void 0:t.prototype.stroke,a=t==null?void 0:t.prototype.isPointInPath;t.prototype.fill=function(...l){if(l[0]instanceof Hn){const c=l[0],f=l[1]||"nonzero";Ku(this,c.commands),e.apply(this,[f])}else{const c=l[0]||"nonzero";return e.apply(this,[c])}},t.prototype.stroke=function(l){l&&Ku(this,l.commands),n.apply(this)},t.prototype.isPointInPath=function(...l){if(l[0]instanceof Hn){const c=l[0],f=l[1],d=l[2],y=l[3]||"nonzero";return Ku(this,c.commands),a.apply(this,[f,d,y])}else return a.apply(this,l)},r.Path2D=Hn}const Ss={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},Jd=/([astvzqmhlc])([^astvzqmhlc]*)/gi,tg=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function eg(r){const t=r.match(tg);return t?t.map(Number):[]}function rg(r){const t=[],e=String(r).trim();return e[0]!=="M"&&e[0]!=="m"||e.replace(Jd,(n,a,u)=>{const l=eg(u);let c=a.toLowerCase(),f=a;if(c==="m"&&l.length>2&&(t.push([f,...l.splice(0,2)]),c="l",f=f==="m"?"l":"L"),l.length<Ss[c])return"";for(t.push([f,...l.splice(0,Ss[c])]);l.length>=Ss[c]&&l.length&&Ss[c];)t.push([f,...l.splice(0,Ss[c])]);return""}),t}var Os=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yh(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Pi={},hi={};function ig(r,t,e){if(e===void 0&&(e=Array.prototype),r&&typeof e.find=="function")return e.find.call(r,t);for(var n=0;n<r.length;n++)if(Object.prototype.hasOwnProperty.call(r,n)){var a=r[n];if(t.call(void 0,a,n,r))return a}}function Ju(r,t){return t===void 0&&(t=Object),t&&typeof t.freeze=="function"?t.freeze(r):r}function ng(r,t){if(r===null||typeof r!="object")throw new TypeError("target is not an object");for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=t[e]);return r}var vh=Ju({HTML:"text/html",isHTML:function(r){return r===vh.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),mh=Ju({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(r){return r===mh.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});hi.assign=ng,hi.find=ig,hi.freeze=Ju,hi.MIME_TYPE=vh,hi.NAMESPACE=mh;var xh=hi,Xr=xh.find,Ns=xh.NAMESPACE;function sg(r){return r!==""}function ag(r){return r?r.split(/[\t\n\f\r ]+/).filter(sg):[]}function ug(r,t){return r.hasOwnProperty(t)||(r[t]=!0),r}function Eh(r){if(!r)return[];var t=ag(r);return Object.keys(t.reduce(ug,{}))}function og(r){return function(t){return r&&r.indexOf(t)!==-1}}function Ms(r,t){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}function He(r,t){var e=r.prototype;if(!(e instanceof t)){let n=function(){};n.prototype=t.prototype,n=new n,Ms(e,n),r.prototype=e=n}e.constructor!=r&&(typeof r!="function"&&console.error("unknown Class:"+r),e.constructor=r)}var qe={},Nr=qe.ELEMENT_NODE=1,qn=qe.ATTRIBUTE_NODE=2,Ma=qe.TEXT_NODE=3,Ah=qe.CDATA_SECTION_NODE=4,bh=qe.ENTITY_REFERENCE_NODE=5,lg=qe.ENTITY_NODE=6,wh=qe.PROCESSING_INSTRUCTION_NODE=7,Th=qe.COMMENT_NODE=8,_h=qe.DOCUMENT_NODE=9,Ch=qe.DOCUMENT_TYPE_NODE=10,ci=qe.DOCUMENT_FRAGMENT_NODE=11,hg=qe.NOTATION_NODE=12,_e={},ge={};_e.INDEX_SIZE_ERR=(ge[1]="Index size error",1),_e.DOMSTRING_SIZE_ERR=(ge[2]="DOMString size error",2);var We=_e.HIERARCHY_REQUEST_ERR=(ge[3]="Hierarchy request error",3);_e.WRONG_DOCUMENT_ERR=(ge[4]="Wrong document",4),_e.INVALID_CHARACTER_ERR=(ge[5]="Invalid character",5),_e.NO_DATA_ALLOWED_ERR=(ge[6]="No data allowed",6),_e.NO_MODIFICATION_ALLOWED_ERR=(ge[7]="No modification allowed",7);var Dh=_e.NOT_FOUND_ERR=(ge[8]="Not found",8);_e.NOT_SUPPORTED_ERR=(ge[9]="Not supported",9);var Sh=_e.INUSE_ATTRIBUTE_ERR=(ge[10]="Attribute in use",10);_e.INVALID_STATE_ERR=(ge[11]="Invalid state",11),_e.SYNTAX_ERR=(ge[12]="Syntax error",12),_e.INVALID_MODIFICATION_ERR=(ge[13]="Invalid modification",13),_e.NAMESPACE_ERR=(ge[14]="Invalid namespace",14),_e.INVALID_ACCESS_ERR=(ge[15]="Invalid access",15);function Kt(r,t){if(t instanceof Error)var e=t;else e=this,Error.call(this,ge[r]),this.message=ge[r],Error.captureStackTrace&&Error.captureStackTrace(this,Kt);return e.code=r,t&&(this.message=this.message+": "+t),e}Kt.prototype=Error.prototype,Ms(_e,Kt);function fi(){}fi.prototype={length:0,item:function(r){return r>=0&&r<this.length?this[r]:null},toString:function(r,t){for(var e=[],n=0;n<this.length;n++)Vn(this[n],e,r,t);return e.join("")},filter:function(r){return Array.prototype.filter.call(this,r)},indexOf:function(r){return Array.prototype.indexOf.call(this,r)}};function Wn(r,t){this._node=r,this._refresh=t,to(this)}function to(r){var t=r._node._inc||r._node.ownerDocument._inc;if(r._inc!==t){var e=r._refresh(r._node);if(zh(r,"length",e.length),!r.$$length||e.length<r.$$length)for(var n=e.length;n in r;n++)Object.prototype.hasOwnProperty.call(r,n)&&delete r[n];Ms(e,r),r._inc=t}}Wn.prototype.item=function(r){return to(this),this[r]||null},He(Wn,fi);function Ba(){}function Oh(r,t){for(var e=r.length;e--;)if(r[e]===t)return e}function Nh(r,t,e,n){if(n?t[Oh(t,n)]=e:t[t.length++]=e,r){e.ownerElement=r;var a=r.ownerDocument;a&&(n&&Rh(a,r,n),cg(a,r,e))}}function Mh(r,t,e){var n=Oh(t,e);if(n>=0){for(var a=t.length-1;n<a;)t[n]=t[++n];if(t.length=a,r){var u=r.ownerDocument;u&&(Rh(u,r,e),e.ownerElement=null)}}else throw new Kt(Dh,new Error(r.tagName+"@"+e))}Ba.prototype={length:0,item:fi.prototype.item,getNamedItem:function(r){for(var t=this.length;t--;){var e=this[t];if(e.nodeName==r)return e}},setNamedItem:function(r){var t=r.ownerElement;if(t&&t!=this._ownerElement)throw new Kt(Sh);var e=this.getNamedItem(r.nodeName);return Nh(this._ownerElement,this,r,e),e},setNamedItemNS:function(r){var t=r.ownerElement,e;if(t&&t!=this._ownerElement)throw new Kt(Sh);return e=this.getNamedItemNS(r.namespaceURI,r.localName),Nh(this._ownerElement,this,r,e),e},removeNamedItem:function(r){var t=this.getNamedItem(r);return Mh(this._ownerElement,this,t),t},removeNamedItemNS:function(r,t){var e=this.getNamedItemNS(r,t);return Mh(this._ownerElement,this,e),e},getNamedItemNS:function(r,t){for(var e=this.length;e--;){var n=this[e];if(n.localName==t&&n.namespaceURI==r)return n}return null}};function Bh(){}Bh.prototype={hasFeature:function(r,t){return!0},createDocument:function(r,t,e){var n=new Is;if(n.implementation=this,n.childNodes=new fi,n.doctype=e||null,e&&n.appendChild(e),t){var a=n.createElementNS(r,t);n.appendChild(a)}return n},createDocumentType:function(r,t,e){var n=new La;return n.name=r,n.nodeName=r,n.publicId=t||"",n.systemId=e||"",n}};function Rt(){}Rt.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(r,t){return Ia(this,r,t)},replaceChild:function(r,t){Ia(this,r,t,kh),t&&this.removeChild(t)},removeChild:function(r){return Lh(this,r)},appendChild:function(r){return this.insertBefore(r,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(r){return lo(this.ownerDocument||this,this,r)},normalize:function(){for(var r=this.firstChild;r;){var t=r.nextSibling;t&&t.nodeType==Ma&&r.nodeType==Ma?(this.removeChild(t),r.appendData(t.data)):(r.normalize(),r=t)}},isSupported:function(r,t){return this.ownerDocument.implementation.hasFeature(r,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(r){for(var t=this;t;){var e=t._nsMap;if(e){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&e[n]===r)return n}t=t.nodeType==qn?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(r){for(var t=this;t;){var e=t._nsMap;if(e&&Object.prototype.hasOwnProperty.call(e,r))return e[r];t=t.nodeType==qn?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(r){var t=this.lookupPrefix(r);return t==null}};function Ih(r){return r=="<"&&"&lt;"||r==">"&&"&gt;"||r=="&"&&"&amp;"||r=='"'&&"&quot;"||"&#"+r.charCodeAt()+";"}Ms(qe,Rt),Ms(qe,Rt.prototype);function Bs(r,t){if(t(r))return!0;if(r=r.firstChild)do if(Bs(r,t))return!0;while(r=r.nextSibling)}function Is(){this.ownerDocument=this}function cg(r,t,e){r&&r._inc++;var n=e.namespaceURI;n===Ns.XMLNS&&(t._nsMap[e.prefix?e.localName:""]=e.value)}function Rh(r,t,e,n){r&&r._inc++;var a=e.namespaceURI;a===Ns.XMLNS&&delete t._nsMap[e.prefix?e.localName:""]}function eo(r,t,e){if(r&&r._inc){r._inc++;var n=t.childNodes;if(e)n[n.length++]=e;else{for(var a=t.firstChild,u=0;a;)n[u++]=a,a=a.nextSibling;n.length=u,delete n[n.length]}}}function Lh(r,t){var e=t.previousSibling,n=t.nextSibling;return e?e.nextSibling=n:r.firstChild=n,n?n.previousSibling=e:r.lastChild=e,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,eo(r.ownerDocument,r),t}function fg(r){return r&&(r.nodeType===Rt.DOCUMENT_NODE||r.nodeType===Rt.DOCUMENT_FRAGMENT_NODE||r.nodeType===Rt.ELEMENT_NODE)}function pg(r){return r&&(Zr(r)||ro(r)||pi(r)||r.nodeType===Rt.DOCUMENT_FRAGMENT_NODE||r.nodeType===Rt.COMMENT_NODE||r.nodeType===Rt.PROCESSING_INSTRUCTION_NODE)}function pi(r){return r&&r.nodeType===Rt.DOCUMENT_TYPE_NODE}function Zr(r){return r&&r.nodeType===Rt.ELEMENT_NODE}function ro(r){return r&&r.nodeType===Rt.TEXT_NODE}function Ph(r,t){var e=r.childNodes||[];if(Xr(e,Zr)||pi(t))return!1;var n=Xr(e,pi);return!(t&&n&&e.indexOf(n)>e.indexOf(t))}function Fh(r,t){var e=r.childNodes||[];function n(u){return Zr(u)&&u!==t}if(Xr(e,n))return!1;var a=Xr(e,pi);return!(t&&a&&e.indexOf(a)>e.indexOf(t))}function dg(r,t,e){if(!fg(r))throw new Kt(We,"Unexpected parent node type "+r.nodeType);if(e&&e.parentNode!==r)throw new Kt(Dh,"child not in parent");if(!pg(t)||pi(t)&&r.nodeType!==Rt.DOCUMENT_NODE)throw new Kt(We,"Unexpected node type "+t.nodeType+" for parent node type "+r.nodeType)}function gg(r,t,e){var n=r.childNodes||[],a=t.childNodes||[];if(t.nodeType===Rt.DOCUMENT_FRAGMENT_NODE){var u=a.filter(Zr);if(u.length>1||Xr(a,ro))throw new Kt(We,"More than one element or text in fragment");if(u.length===1&&!Ph(r,e))throw new Kt(We,"Element in fragment can not be inserted before doctype")}if(Zr(t)&&!Ph(r,e))throw new Kt(We,"Only one element can be added and only after doctype");if(pi(t)){if(Xr(n,pi))throw new Kt(We,"Only one doctype is allowed");var l=Xr(n,Zr);if(e&&n.indexOf(l)<n.indexOf(e))throw new Kt(We,"Doctype can only be inserted before an element");if(!e&&l)throw new Kt(We,"Doctype can not be appended since element is present")}}function kh(r,t,e){var n=r.childNodes||[],a=t.childNodes||[];if(t.nodeType===Rt.DOCUMENT_FRAGMENT_NODE){var u=a.filter(Zr);if(u.length>1||Xr(a,ro))throw new Kt(We,"More than one element or text in fragment");if(u.length===1&&!Fh(r,e))throw new Kt(We,"Element in fragment can not be inserted before doctype")}if(Zr(t)&&!Fh(r,e))throw new Kt(We,"Only one element can be added and only after doctype");if(pi(t)){if(Xr(n,function(f){return pi(f)&&f!==e}))throw new Kt(We,"Only one doctype is allowed");var l=Xr(n,Zr);if(e&&n.indexOf(l)<n.indexOf(e))throw new Kt(We,"Doctype can only be inserted before an element")}}function Ia(r,t,e,n){dg(r,t,e),r.nodeType===Rt.DOCUMENT_NODE&&(n||gg)(r,t,e);var a=t.parentNode;if(a&&a.removeChild(t),t.nodeType===ci){var u=t.firstChild;if(u==null)return t;var l=t.lastChild}else u=l=t;var c=e?e.previousSibling:r.lastChild;u.previousSibling=c,l.nextSibling=e,c?c.nextSibling=u:r.firstChild=u,e==null?r.lastChild=l:e.previousSibling=l;do u.parentNode=r;while(u!==l&&(u=u.nextSibling));return eo(r.ownerDocument||r,r),t.nodeType==ci&&(t.firstChild=t.lastChild=null),t}function yg(r,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=r,t.previousSibling=r.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:r.firstChild=t,r.lastChild=t,eo(r.ownerDocument,r,t),t}Is.prototype={nodeName:"#document",nodeType:_h,doctype:null,documentElement:null,_inc:1,insertBefore:function(r,t){if(r.nodeType==ci){for(var e=r.firstChild;e;){var n=e.nextSibling;this.insertBefore(e,t),e=n}return r}return Ia(this,r,t),r.ownerDocument=this,this.documentElement===null&&r.nodeType===Nr&&(this.documentElement=r),r},removeChild:function(r){return this.documentElement==r&&(this.documentElement=null),Lh(this,r)},replaceChild:function(r,t){Ia(this,r,t,kh),r.ownerDocument=this,t&&this.removeChild(t),Zr(r)&&(this.documentElement=r)},importNode:function(r,t){return $h(this,r,t)},getElementById:function(r){var t=null;return Bs(this.documentElement,function(e){if(e.nodeType==Nr&&e.getAttribute("id")==r)return t=e,!0}),t},getElementsByClassName:function(r){var t=Eh(r);return new Wn(this,function(e){var n=[];return t.length>0&&Bs(e.documentElement,function(a){if(a!==e&&a.nodeType===Nr){var u=a.getAttribute("class");if(u){var l=r===u;if(!l){var c=Eh(u);l=t.every(og(c))}l&&n.push(a)}}}),n})},createElement:function(r){var t=new cn;t.ownerDocument=this,t.nodeName=r,t.tagName=r,t.localName=r,t.childNodes=new fi;var e=t.attributes=new Ba;return e._ownerElement=t,t},createDocumentFragment:function(){var r=new Pa;return r.ownerDocument=this,r.childNodes=new fi,r},createTextNode:function(r){var t=new io;return t.ownerDocument=this,t.appendData(r),t},createComment:function(r){var t=new no;return t.ownerDocument=this,t.appendData(r),t},createCDATASection:function(r){var t=new so;return t.ownerDocument=this,t.appendData(r),t},createProcessingInstruction:function(r,t){var e=new uo;return e.ownerDocument=this,e.tagName=e.nodeName=e.target=r,e.nodeValue=e.data=t,e},createAttribute:function(r){var t=new Ra;return t.ownerDocument=this,t.name=r,t.nodeName=r,t.localName=r,t.specified=!0,t},createEntityReference:function(r){var t=new ao;return t.ownerDocument=this,t.nodeName=r,t},createElementNS:function(r,t){var e=new cn,n=t.split(":"),a=e.attributes=new Ba;return e.childNodes=new fi,e.ownerDocument=this,e.nodeName=t,e.tagName=t,e.namespaceURI=r,n.length==2?(e.prefix=n[0],e.localName=n[1]):e.localName=t,a._ownerElement=e,e},createAttributeNS:function(r,t){var e=new Ra,n=t.split(":");return e.ownerDocument=this,e.nodeName=t,e.name=t,e.namespaceURI=r,e.specified=!0,n.length==2?(e.prefix=n[0],e.localName=n[1]):e.localName=t,e}},He(Is,Rt);function cn(){this._nsMap={}}cn.prototype={nodeType:Nr,hasAttribute:function(r){return this.getAttributeNode(r)!=null},getAttribute:function(r){var t=this.getAttributeNode(r);return t&&t.value||""},getAttributeNode:function(r){return this.attributes.getNamedItem(r)},setAttribute:function(r,t){var e=this.ownerDocument.createAttribute(r);e.value=e.nodeValue=""+t,this.setAttributeNode(e)},removeAttribute:function(r){var t=this.getAttributeNode(r);t&&this.removeAttributeNode(t)},appendChild:function(r){return r.nodeType===ci?this.insertBefore(r,null):yg(this,r)},setAttributeNode:function(r){return this.attributes.setNamedItem(r)},setAttributeNodeNS:function(r){return this.attributes.setNamedItemNS(r)},removeAttributeNode:function(r){return this.attributes.removeNamedItem(r.nodeName)},removeAttributeNS:function(r,t){var e=this.getAttributeNodeNS(r,t);e&&this.removeAttributeNode(e)},hasAttributeNS:function(r,t){return this.getAttributeNodeNS(r,t)!=null},getAttributeNS:function(r,t){var e=this.getAttributeNodeNS(r,t);return e&&e.value||""},setAttributeNS:function(r,t,e){var n=this.ownerDocument.createAttributeNS(r,t);n.value=n.nodeValue=""+e,this.setAttributeNode(n)},getAttributeNodeNS:function(r,t){return this.attributes.getNamedItemNS(r,t)},getElementsByTagName:function(r){return new Wn(this,function(t){var e=[];return Bs(t,function(n){n!==t&&n.nodeType==Nr&&(r==="*"||n.tagName==r)&&e.push(n)}),e})},getElementsByTagNameNS:function(r,t){return new Wn(this,function(e){var n=[];return Bs(e,function(a){a!==e&&a.nodeType===Nr&&(r==="*"||a.namespaceURI===r)&&(t==="*"||a.localName==t)&&n.push(a)}),n})}},Is.prototype.getElementsByTagName=cn.prototype.getElementsByTagName,Is.prototype.getElementsByTagNameNS=cn.prototype.getElementsByTagNameNS,He(cn,Rt);function Ra(){}Ra.prototype.nodeType=qn,He(Ra,Rt);function Rs(){}Rs.prototype={data:"",substringData:function(r,t){return this.data.substring(r,r+t)},appendData:function(r){r=this.data+r,this.nodeValue=this.data=r,this.length=r.length},insertData:function(r,t){this.replaceData(r,0,t)},appendChild:function(r){throw new Error(ge[We])},deleteData:function(r,t){this.replaceData(r,t,"")},replaceData:function(r,t,e){var n=this.data.substring(0,r),a=this.data.substring(r+t);e=n+e+a,this.nodeValue=this.data=e,this.length=e.length}},He(Rs,Rt);function io(){}io.prototype={nodeName:"#text",nodeType:Ma,splitText:function(r){var t=this.data,e=t.substring(r);t=t.substring(0,r),this.data=this.nodeValue=t,this.length=t.length;var n=this.ownerDocument.createTextNode(e);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},He(io,Rs);function no(){}no.prototype={nodeName:"#comment",nodeType:Th},He(no,Rs);function so(){}so.prototype={nodeName:"#cdata-section",nodeType:Ah},He(so,Rs);function La(){}La.prototype.nodeType=Ch,He(La,Rt);function Uh(){}Uh.prototype.nodeType=hg,He(Uh,Rt);function Hh(){}Hh.prototype.nodeType=lg,He(Hh,Rt);function ao(){}ao.prototype.nodeType=bh,He(ao,Rt);function Pa(){}Pa.prototype.nodeName="#document-fragment",Pa.prototype.nodeType=ci,He(Pa,Rt);function uo(){}uo.prototype.nodeType=wh,He(uo,Rt);function qh(){}qh.prototype.serializeToString=function(r,t,e){return Wh.call(r,t,e)},Rt.prototype.toString=Wh;function Wh(r,t){var e=[],n=this.nodeType==9&&this.documentElement||this,a=n.prefix,u=n.namespaceURI;if(u&&a==null){var a=n.lookupPrefix(u);if(a==null)var l=[{namespace:u,prefix:null}]}return Vn(this,e,r,t,l),e.join("")}function Vh(r,t,e){var n=r.prefix||"",a=r.namespaceURI;if(!a||n==="xml"&&a===Ns.XML||a===Ns.XMLNS)return!1;for(var u=e.length;u--;){var l=e[u];if(l.prefix===n)return l.namespace!==a}return!0}function oo(r,t,e){r.push(" ",t,'="',e.replace(/[<>&"\t\n\r]/g,Ih),'"')}function Vn(r,t,e,n,a){if(a||(a=[]),n)if(r=n(r),r){if(typeof r=="string"){t.push(r);return}}else return;switch(r.nodeType){case Nr:var u=r.attributes,l=u.length,R=r.firstChild,c=r.tagName;e=Ns.isHTML(r.namespaceURI)||e;var f=c;if(!e&&!r.prefix&&r.namespaceURI){for(var d,y=0;y<u.length;y++)if(u.item(y).name==="xmlns"){d=u.item(y).value;break}if(!d)for(var A=a.length-1;A>=0;A--){var _=a[A];if(_.prefix===""&&_.namespace===r.namespaceURI){d=_.namespace;break}}if(d!==r.namespaceURI)for(var A=a.length-1;A>=0;A--){var _=a[A];if(_.namespace===r.namespaceURI){_.prefix&&(f=_.prefix+":"+c);break}}}t.push("<",f);for(var C=0;C<l;C++){var F=u.item(C);F.prefix=="xmlns"?a.push({prefix:F.localName,namespace:F.value}):F.nodeName=="xmlns"&&a.push({prefix:"",namespace:F.value})}for(var C=0;C<l;C++){var F=u.item(C);if(Vh(F,e,a)){var N=F.prefix||"",M=F.namespaceURI;oo(t,N?"xmlns:"+N:"xmlns",M),a.push({prefix:N,namespace:M})}Vn(F,t,e,n,a)}if(c===f&&Vh(r,e,a)){var N=r.prefix||"",M=r.namespaceURI;oo(t,N?"xmlns:"+N:"xmlns",M),a.push({prefix:N,namespace:M})}if(R||e&&!/^(?:meta|link|img|br|hr|input)$/i.test(c)){if(t.push(">"),e&&/^script$/i.test(c))for(;R;)R.data?t.push(R.data):Vn(R,t,e,n,a.slice()),R=R.nextSibling;else for(;R;)Vn(R,t,e,n,a.slice()),R=R.nextSibling;t.push("</",f,">")}else t.push("/>");return;case _h:case ci:for(var R=r.firstChild;R;)Vn(R,t,e,n,a.slice()),R=R.nextSibling;return;case qn:return oo(t,r.name,r.value);case Ma:return t.push(r.data.replace(/[<&>]/g,Ih));case Ah:return t.push("<![CDATA[",r.data,"]]>");case Th:return t.push("<!--",r.data,"-->");case Ch:var q=r.publicId,z=r.systemId;if(t.push("<!DOCTYPE ",r.name),q)t.push(" PUBLIC ",q),z&&z!="."&&t.push(" ",z),t.push(">");else if(z&&z!=".")t.push(" SYSTEM ",z,">");else{var w=r.internalSubset;w&&t.push(" [",w,"]"),t.push(">")}return;case wh:return t.push("<?",r.target," ",r.data,"?>");case bh:return t.push("&",r.nodeName,";");default:t.push("??",r.nodeName)}}function $h(r,t,e){var n;switch(t.nodeType){case Nr:n=t.cloneNode(!1),n.ownerDocument=r;case ci:break;case qn:e=!0;break}if(n||(n=t.cloneNode(!1)),n.ownerDocument=r,n.parentNode=null,e)for(var a=t.firstChild;a;)n.appendChild($h(r,a,e)),a=a.nextSibling;return n}function lo(r,t,e){var n=new t.constructor;for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var u=t[a];typeof u!="object"&&u!=n[a]&&(n[a]=u)}switch(t.childNodes&&(n.childNodes=new fi),n.ownerDocument=r,n.nodeType){case Nr:var l=t.attributes,c=n.attributes=new Ba,f=l.length;c._ownerElement=n;for(var d=0;d<f;d++)n.setAttributeNode(lo(r,l.item(d),!0));break;case qn:e=!0}if(e)for(var y=t.firstChild;y;)n.appendChild(lo(r,y,e)),y=y.nextSibling;return n}function zh(r,t,e){r[t]=e}try{if(Object.defineProperty){let r=function(t){switch(t.nodeType){case Nr:case ci:var e=[];for(t=t.firstChild;t;)t.nodeType!==7&&t.nodeType!==8&&e.push(r(t)),t=t.nextSibling;return e.join("");default:return t.nodeValue}};Object.defineProperty(Wn.prototype,"length",{get:function(){return to(this),this.$$length}}),Object.defineProperty(Rt.prototype,"textContent",{get:function(){return r(this)},set:function(t){switch(this.nodeType){case Nr:case ci:for(;this.firstChild;)this.removeChild(this.firstChild);(t||String(t))&&this.appendChild(this.ownerDocument.createTextNode(t));break;default:this.data=t,this.value=t,this.nodeValue=t}}}),zh=function(t,e,n){t["$$"+e]=n}}}catch{}Pi.DocumentType=La,Pi.DOMException=Kt,Pi.DOMImplementation=Bh,Pi.Element=cn,Pi.Node=Rt,Pi.NodeList=fi,Pi.XMLSerializer=qh;var Fa={},Gh={};(function(r){var t=hi.freeze;r.XML_ENTITIES=t({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),r.HTML_ENTITIES=t({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
2
- `,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),r.entityMap=r.HTML_ENTITIES})(Gh);var ho={},Ls=hi.NAMESPACE,co=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Yh=new RegExp("[\\-\\.0-9"+co.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),Xh=new RegExp("^"+co.source+Yh.source+"*(?::"+co.source+Yh.source+"*)?$"),Ps=0,Fi=1,$n=2,Fs=3,zn=4,Gn=5,ks=6,ka=7;function Yn(r,t){this.message=r,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,Yn)}Yn.prototype=new Error,Yn.prototype.name=Yn.name;function Zh(){}Zh.prototype={parse:function(r,t,e){var n=this.domBuilder;n.startDocument(),Kh(t,t={}),vg(r,t,e,n,this.errorHandler),n.endDocument()}};function vg(r,t,e,n,a){function u(O){if(O>65535){O-=65536;var yt=55296+(O>>10),Bt=56320+(O&1023);return String.fromCharCode(yt,Bt)}else return String.fromCharCode(O)}function l(O){var yt=O.slice(1,-1);return Object.hasOwnProperty.call(e,yt)?e[yt]:yt.charAt(0)==="#"?u(parseInt(yt.substr(1).replace("x","0x"))):(a.error("entity not found:"+O),O)}function c(O){if(O>N){var yt=r.substring(N,O).replace(/&#?\w+;/g,l);_&&f(N),n.characters(yt,0,O-N),N=O}}function f(O,yt){for(;O>=y&&(yt=A.exec(r));)d=yt.index,y=d+yt[0].length,_.lineNumber++;_.columnNumber=O-d+1}for(var d=0,y=0,A=/.*(?:\r\n?|\n)|.*$/g,_=n.locator,C=[{currentNSMap:t}],F={},N=0;;){try{var M=r.indexOf("<",N);if(M<0){if(!r.substr(N).match(/^\s*$/)){var R=n.doc,q=R.createTextNode(r.substr(N));R.appendChild(q),n.currentElement=q}return}switch(M>N&&c(M),r.charAt(M+1)){case"/":var J=r.indexOf(">",M+3),z=r.substring(M+2,J).replace(/[ \t\n\r]+$/g,""),w=C.pop();J<0?(z=r.substring(M+2).replace(/[\s<].*/,""),a.error("end tag name: "+z+" is not complete:"+w.tagName),J=M+1+z.length):z.match(/\s</)&&(z=z.replace(/[\s<].*/,""),a.error("end tag name: "+z+" maybe not complete"),J=M+1+z.length);var L=w.localNSMap,U=w.tagName==z,j=U||w.tagName&&w.tagName.toLowerCase()==z.toLowerCase();if(j){if(n.endElement(w.uri,w.localName,z),L)for(var tt in L)Object.prototype.hasOwnProperty.call(L,tt)&&n.endPrefixMapping(tt);U||a.fatalError("end tag name: "+z+" is not match the current start tagName:"+w.tagName)}else C.push(w);J++;break;case"?":_&&f(M),J=bg(r,M,n);break;case"!":_&&f(M),J=Ag(r,M,n,a);break;default:_&&f(M);var Z=new Jh,rt=C[C.length-1].currentNSMap,J=mg(r,M,Z,rt,l,a),st=Z.length;if(!Z.closed&&Eg(r,J,Z.tagName,F)&&(Z.closed=!0,e.nbsp||a.warning("unclosed xml attribute")),_&&st){for(var ht=Qh(_,{}),ct=0;ct<st;ct++){var ft=Z[ct];f(ft.offset),ft.locator=Qh(_,{})}n.locator=ht,jh(Z,n,rt)&&C.push(Z),n.locator=_}else jh(Z,n,rt)&&C.push(Z);Ls.isHTML(Z.uri)&&!Z.closed?J=xg(r,J,Z.tagName,l,n):J++}}catch(O){if(O instanceof Yn)throw O;a.error("element parse error: "+O),J=-1}J>N?N=J:c(Math.max(M,N)+1)}}function Qh(r,t){return t.lineNumber=r.lineNumber,t.columnNumber=r.columnNumber,t}function mg(r,t,e,n,a,u){function l(_,C,F){e.attributeNames.hasOwnProperty(_)&&u.fatalError("Attribute "+_+" redefined"),e.addValue(_,C.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,a),F)}for(var c,f,d=++t,y=Ps;;){var A=r.charAt(d);switch(A){case"=":if(y===Fi)c=r.slice(t,d),y=Fs;else if(y===$n)y=Fs;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(y===Fs||y===Fi)if(y===Fi&&(u.warning('attribute value must after "="'),c=r.slice(t,d)),t=d+1,d=r.indexOf(A,t),d>0)f=r.slice(t,d),l(c,f,t-1),y=Gn;else throw new Error("attribute value no end '"+A+"' match");else if(y==zn)f=r.slice(t,d),l(c,f,t),u.warning('attribute "'+c+'" missed start quot('+A+")!!"),t=d+1,y=Gn;else throw new Error('attribute value must after "="');break;case"/":switch(y){case Ps:e.setTagName(r.slice(t,d));case Gn:case ks:case ka:y=ka,e.closed=!0;case zn:case Fi:break;case $n:e.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return u.error("unexpected end of input"),y==Ps&&e.setTagName(r.slice(t,d)),d;case">":switch(y){case Ps:e.setTagName(r.slice(t,d));case Gn:case ks:case ka:break;case zn:case Fi:f=r.slice(t,d),f.slice(-1)==="/"&&(e.closed=!0,f=f.slice(0,-1));case $n:y===$n&&(f=c),y==zn?(u.warning('attribute "'+f+'" missed quot(")!'),l(c,f,t)):((!Ls.isHTML(n[""])||!f.match(/^(?:disabled|checked|selected)$/i))&&u.warning('attribute "'+f+'" missed value!! "'+f+'" instead!!'),l(f,f,t));break;case Fs:throw new Error("attribute value missed!!")}return d;case"€":A=" ";default:if(A<=" ")switch(y){case Ps:e.setTagName(r.slice(t,d)),y=ks;break;case Fi:c=r.slice(t,d),y=$n;break;case zn:var f=r.slice(t,d);u.warning('attribute "'+f+'" missed quot(")!!'),l(c,f,t);case Gn:y=ks;break}else switch(y){case $n:e.tagName,(!Ls.isHTML(n[""])||!c.match(/^(?:disabled|checked|selected)$/i))&&u.warning('attribute "'+c+'" missed value!! "'+c+'" instead2!!'),l(c,c,t),t=d,y=Fi;break;case Gn:u.warning('attribute space is required"'+c+'"!!');case ks:y=Fi,t=d;break;case Fs:y=zn,t=d;break;case ka:throw new Error("elements closed character '/' and '>' must be connected to")}}d++}}function jh(r,t,e){for(var n=r.tagName,a=null,A=r.length;A--;){var u=r[A],l=u.qName,c=u.value,_=l.indexOf(":");if(_>0)var f=u.prefix=l.slice(0,_),d=l.slice(_+1),y=f==="xmlns"&&d;else d=l,f=null,y=l==="xmlns"&&"";u.localName=d,y!==!1&&(a==null&&(a={},Kh(e,e={})),e[y]=a[y]=c,u.uri=Ls.XMLNS,t.startPrefixMapping(y,c))}for(var A=r.length;A--;){u=r[A];var f=u.prefix;f&&(f==="xml"&&(u.uri=Ls.XML),f!=="xmlns"&&(u.uri=e[f||""]))}var _=n.indexOf(":");_>0?(f=r.prefix=n.slice(0,_),d=r.localName=n.slice(_+1)):(f=null,d=r.localName=n);var C=r.uri=e[f||""];if(t.startElement(C,d,n,r),r.closed){if(t.endElement(C,d,n),a)for(f in a)Object.prototype.hasOwnProperty.call(a,f)&&t.endPrefixMapping(f)}else return r.currentNSMap=e,r.localNSMap=a,!0}function xg(r,t,e,n,a){if(/^(?:script|textarea)$/i.test(e)){var u=r.indexOf("</"+e+">",t),l=r.substring(t+1,u);if(/[&<]/.test(l))return/^script$/i.test(e)?(a.characters(l,0,l.length),u):(l=l.replace(/&#?\w+;/g,n),a.characters(l,0,l.length),u)}return t+1}function Eg(r,t,e,n){var a=n[e];return a==null&&(a=r.lastIndexOf("</"+e+">"),a<t&&(a=r.lastIndexOf("</"+e)),n[e]=a),a<t}function Kh(r,t){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}function Ag(r,t,e,n){var a=r.charAt(t+2);switch(a){case"-":if(r.charAt(t+3)==="-"){var u=r.indexOf("-->",t+4);return u>t?(e.comment(r,t+4,u-t-4),u+3):(n.error("Unclosed comment"),-1)}else return-1;default:if(r.substr(t+3,6)=="CDATA["){var u=r.indexOf("]]>",t+9);return e.startCDATA(),e.characters(r,t+9,u-t-9),e.endCDATA(),u+3}var l=wg(r,t),c=l.length;if(c>1&&/!doctype/i.test(l[0][0])){var f=l[1][0],d=!1,y=!1;c>3&&(/^public$/i.test(l[2][0])?(d=l[3][0],y=c>4&&l[4][0]):/^system$/i.test(l[2][0])&&(y=l[3][0]));var A=l[c-1];return e.startDTD(f,d,y),e.endDTD(),A.index+A[0].length}}return-1}function bg(r,t,e){var n=r.indexOf("?>",t);if(n){var a=r.substring(t,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return a?(a[0].length,e.processingInstruction(a[1],a[2]),n+2):-1}return-1}function Jh(){this.attributeNames={}}Jh.prototype={setTagName:function(r){if(!Xh.test(r))throw new Error("invalid tagName:"+r);this.tagName=r},addValue:function(r,t,e){if(!Xh.test(r))throw new Error("invalid attribute:"+r);this.attributeNames[r]=this.length,this[this.length++]={qName:r,value:t,offset:e}},length:0,getLocalName:function(r){return this[r].localName},getLocator:function(r){return this[r].locator},getQName:function(r){return this[r].qName},getURI:function(r){return this[r].uri},getValue:function(r){return this[r].value}};function wg(r,t){var e,n=[],a=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(a.lastIndex=t,a.exec(r);e=a.exec(r);)if(n.push(e),e[1])return n}ho.XMLReader=Zh,ho.ParseError=Yn;var Tg=hi,_g=Pi,tc=Gh,ec=ho,Cg=_g.DOMImplementation,rc=Tg.NAMESPACE,Dg=ec.ParseError,Sg=ec.XMLReader;function ic(r){return r.replace(/\r[\n\u0085]/g,`
1
+ (function(he,Yn){typeof exports=="object"&&typeof module<"u"?Yn(exports):typeof define=="function"&&define.amd?define(["exports"],Yn):(he=typeof globalThis<"u"?globalThis:he||self,Yn(he.archgine={}))})(this,function(he){"use strict";const Yn={name:"TinyEngine",containerId:"tinyEngine",canvas:"tinyEngine",width:0,height:0,aspect:1,dpr:1,alpha:!1,color:"#232323",fps:60,syncDelay:800,animateDuration:600,mergeRendering:!1,sliceRendering:!0,sliceDuration:15,usedCache:!1,separateCache:!1,showPoints:!1,wireframe:!1,castShadow:!1,workerRender:!1,monitorDuration:1e4,light:{color:"#f2f2f2",position:[-6,6,0],castShadow:!0,shadowBlur:16},camera:{left:-1,right:1,top:1,bottom:-1,aspect:1,eye:[0,0,0],up:[0,0,1],helperEnable:!0},controls:{target:[0,0,0],minDistance:.1,maxDistance:1e3,enablePan:!0,enableRotate:!0,enableZoom:!0,focusMode:!0,autoRotate:!1,autoRotateSpeed:.5,enableDamping:!0,dampingFactor:.2},gridHelper:{fill:"#e3e3e3"},axesHelper:{},displayUnits:"",tooltip:!0,assetType:"rm",zoomToSelectEnable:!1,selectEnable:!1,multiSelectEnable:!1,socialDistanceEnable:!1,socialDistance:{radius:3}};function Dh(r,t){const e=r.x*Math.cos(t)-r.y*Math.sin(t),i=r.y*Math.cos(t)+r.x*Math.sin(t);r.x=e,r.y=i}function dg(r,t,e){r.x+=t,r.y+=e}function Sh(r,t){r.x*=t,r.y*=t}class Xn{commands;constructor(t){this.commands=[],t&&t instanceof Xn?this.commands.push(...t.commands):t&&(this.commands=xg(t))}addPath(t){t&&t instanceof Xn&&this.commands.push(...t.commands)}moveTo(t,e){this.commands.push(["M",t,e])}lineTo(t,e){this.commands.push(["L",t,e])}arc(t,e,i,a,u,l){this.commands.push(["AC",t,e,i,a,u,!!l])}arcTo(t,e,i,a,u){this.commands.push(["AT",t,e,i,a,u])}ellipse(t,e,i,a,u,l,c,f){this.commands.push(["E",t,e,i,a,u,l,c,!!f])}closePath(){this.commands.push(["Z"])}bezierCurveTo(t,e,i,a,u,l){this.commands.push(["C",t,e,i,a,u,l])}quadraticCurveTo(t,e,i,a){this.commands.push(["Q",t,e,i,a])}rect(t,e,i,a){this.commands.push(["R",t,e,i,a])}roundRect(t,e,i,a,u){typeof u>"u"?this.commands.push(["RR",t,e,i,a,0]):this.commands.push(["RR",t,e,i,a,u])}}function ho(r,t){let e=0,i=0,a,u,l,c,f,d,g,E,T,C,L,N,M,R,W,G,b,P,H,K,tt,Z=null,rt=null,J=null,st=null,ht=null,ct=null;r.beginPath();for(let ft=0;ft<t.length;++ft){P=t[ft][0],P!=="S"&&P!=="s"&&P!=="C"&&P!=="c"&&(Z=null,rt=null),P!=="T"&&P!=="t"&&P!=="Q"&&P!=="q"&&(J=null,st=null);let O;switch(P){case"m":case"M":O=t[ft],P==="m"?(e+=O[1],i+=O[2]):(e=O[1],i=O[2]),(P==="M"||!ht)&&(ht={x:e,y:i}),r.moveTo(e,i);break;case"l":O=t[ft],e+=O[1],i+=O[2],r.lineTo(e,i);break;case"L":O=t[ft],e=O[1],i=O[2],r.lineTo(e,i);break;case"H":O=t[ft],e=O[1],r.lineTo(e,i);break;case"h":O=t[ft],e+=O[1],r.lineTo(e,i);break;case"V":O=t[ft],i=O[1],r.lineTo(e,i);break;case"v":O=t[ft],i+=O[1],r.lineTo(e,i);break;case"a":case"A":if(O=t[ft],ct===null)throw new Error("This should never happen");P==="a"?(e+=O[6],i+=O[7]):(e=O[6],i=O[7]),R=O[1],W=O[2],g=O[3]*Math.PI/180,l=!!O[4],c=!!O[5],f={x:e,y:i},d={x:(ct.x-f.x)/2,y:(ct.y-f.y)/2},Dh(d,-g),E=d.x*d.x/(R*R)+d.y*d.y/(W*W),E>1&&(E=Math.sqrt(E),R*=E,W*=E),H={x:R*d.y/W,y:-(W*d.x)/R},T=R*R*W*W,C=R*R*d.y*d.y+W*W*d.x*d.x,c!==l?Sh(H,Math.sqrt((T-C)/C)||0):Sh(H,-Math.sqrt((T-C)/C)||0),u=Math.atan2((d.y-H.y)/W,(d.x-H.x)/R),a=Math.atan2(-(d.y+H.y)/W,-(d.x+H.x)/R),Dh(H,g),dg(H,(f.x+ct.x)/2,(f.y+ct.y)/2),r.save(),r.translate(H.x,H.y),r.rotate(g),r.scale(R,W),r.arc(0,0,1,u,a,!c),r.restore();break;case"C":O=t[ft],Z=O[3],rt=O[4],e=O[5],i=O[6],r.bezierCurveTo(O[1],O[2],Z,rt,e,i);break;case"c":O=t[ft],r.bezierCurveTo(O[1]+e,O[2]+i,O[3]+e,O[4]+i,O[5]+e,O[6]+i),Z=O[3]+e,rt=O[4]+i,e+=O[5],i+=O[6];break;case"S":O=t[ft],(Z===null||rt===null)&&(Z=e,rt=i),r.bezierCurveTo(2*e-Z,2*i-rt,O[1],O[2],O[3],O[4]),Z=O[1],rt=O[2],e=O[3],i=O[4];break;case"s":O=t[ft],(Z===null||rt===null)&&(Z=e,rt=i),r.bezierCurveTo(2*e-Z,2*i-rt,O[1]+e,O[2]+i,O[3]+e,O[4]+i),Z=O[1]+e,rt=O[2]+i,e+=O[3],i+=O[4];break;case"Q":O=t[ft],J=O[1],st=O[2],e=O[3],i=O[4],r.quadraticCurveTo(J,st,e,i);break;case"q":O=t[ft],J=O[1]+e,st=O[2]+i,e+=O[3],i+=O[4],r.quadraticCurveTo(J,st,e,i);break;case"T":O=t[ft],(J===null||st===null)&&(J=e,st=i),J=2*e-J,st=2*i-st,e=O[1],i=O[2],r.quadraticCurveTo(J,st,e,i);break;case"t":O=t[ft],(J===null||st===null)&&(J=e,st=i),J=2*e-J,st=2*i-st,e+=O[1],i+=O[2],r.quadraticCurveTo(J,st,e,i);break;case"z":case"Z":ht&&(e=ht.x,i=ht.y),ht=null,r.closePath();break;case"AC":O=t[ft],e=O[1],i=O[2],M=O[3],u=O[4],a=O[5],K=O[6],r.arc(e,i,M,u,a,K);break;case"AT":O=t[ft],L=O[1],N=O[2],e=O[3],i=O[4],M=O[5],r.arcTo(L,N,e,i,M);break;case"E":O=t[ft],e=O[1],i=O[2],R=O[3],W=O[4],g=O[5],u=O[6],a=O[7],K=O[8],r.save(),r.translate(e,i),r.rotate(g),r.scale(R,W),r.arc(0,0,1,u,a,K),r.restore();break;case"R":O=t[ft],e=O[1],i=O[2],G=O[3],b=O[4],ht={x:e,y:i},r.rect(e,i,G,b);break;case"RR":O=t[ft],e=O[1],i=O[2],G=O[3],b=O[4],tt=O[5],ht={x:e,y:i},r.roundRect(e,i,G,b,tt);break}ct?(ct.x=e,ct.y=i):ct={x:e,y:i}}}function gg(r){if(!r||!r.CanvasRenderingContext2D||r.Path2D)return;const{CanvasRenderingContext2D:t}=r,e=t==null?void 0:t.prototype.fill,i=t==null?void 0:t.prototype.stroke,a=t==null?void 0:t.prototype.isPointInPath;t.prototype.fill=function(...l){if(l[0]instanceof Xn){const c=l[0],f=l[1]||"nonzero";ho(this,c.commands),e.apply(this,[f])}else{const c=l[0]||"nonzero";return e.apply(this,[c])}},t.prototype.stroke=function(l){l&&ho(this,l.commands),i.apply(this)},t.prototype.isPointInPath=function(...l){if(l[0]instanceof Xn){const c=l[0],f=l[1],d=l[2],g=l[3]||"nonzero";return ho(this,c.commands),a.apply(this,[f,d,g])}else return a.apply(this,l)},r.Path2D=Xn}const Ps={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},yg=/([astvzqmhlc])([^astvzqmhlc]*)/gi,mg=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function vg(r){const t=r.match(mg);return t?t.map(Number):[]}function xg(r){const t=[],e=String(r).trim();return e[0]!=="M"&&e[0]!=="m"||e.replace(yg,(i,a,u)=>{const l=vg(u);let c=a.toLowerCase(),f=a;if(c==="m"&&l.length>2&&(t.push([f,...l.splice(0,2)]),c="l",f=f==="m"?"l":"L"),l.length<Ps[c])return"";for(t.push([f,...l.splice(0,Ps[c])]);l.length>=Ps[c]&&l.length&&Ps[c];)t.push([f,...l.splice(0,Ps[c])]);return""}),t}var Fs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Oh(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var qi={},pi={};function Eg(r,t,e){if(e===void 0&&(e=Array.prototype),r&&typeof e.find=="function")return e.find.call(r,t);for(var i=0;i<r.length;i++)if(Object.prototype.hasOwnProperty.call(r,i)){var a=r[i];if(t.call(void 0,a,i,r))return a}}function co(r,t){return t===void 0&&(t=Object),t&&typeof t.freeze=="function"?t.freeze(r):r}function Ag(r,t){if(r===null||typeof r!="object")throw new TypeError("target is not an object");for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=t[e]);return r}var Nh=co({HTML:"text/html",isHTML:function(r){return r===Nh.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),Mh=co({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(r){return r===Mh.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});pi.assign=Ag,pi.find=Eg,pi.freeze=co,pi.MIME_TYPE=Nh,pi.NAMESPACE=Mh;var Bh=pi,Qr=Bh.find,Us=Bh.NAMESPACE;function wg(r){return r!==""}function bg(r){return r?r.split(/[\t\n\f\r ]+/).filter(wg):[]}function Tg(r,t){return r.hasOwnProperty(t)||(r[t]=!0),r}function Ih(r){if(!r)return[];var t=bg(r);return Object.keys(t.reduce(Tg,{}))}function _g(r){return function(t){return r&&r.indexOf(t)!==-1}}function ks(r,t){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}function He(r,t){var e=r.prototype;if(!(e instanceof t)){let i=function(){};i.prototype=t.prototype,i=new i,ks(e,i),r.prototype=e=i}e.constructor!=r&&(typeof r!="function"&&console.error("unknown Class:"+r),e.constructor=r)}var qe={},Br=qe.ELEMENT_NODE=1,Zn=qe.ATTRIBUTE_NODE=2,qa=qe.TEXT_NODE=3,Rh=qe.CDATA_SECTION_NODE=4,Lh=qe.ENTITY_REFERENCE_NODE=5,Cg=qe.ENTITY_NODE=6,Ph=qe.PROCESSING_INSTRUCTION_NODE=7,Fh=qe.COMMENT_NODE=8,Uh=qe.DOCUMENT_NODE=9,kh=qe.DOCUMENT_TYPE_NODE=10,di=qe.DOCUMENT_FRAGMENT_NODE=11,Dg=qe.NOTATION_NODE=12,_e={},ge={};_e.INDEX_SIZE_ERR=(ge[1]="Index size error",1),_e.DOMSTRING_SIZE_ERR=(ge[2]="DOMString size error",2);var We=_e.HIERARCHY_REQUEST_ERR=(ge[3]="Hierarchy request error",3);_e.WRONG_DOCUMENT_ERR=(ge[4]="Wrong document",4),_e.INVALID_CHARACTER_ERR=(ge[5]="Invalid character",5),_e.NO_DATA_ALLOWED_ERR=(ge[6]="No data allowed",6),_e.NO_MODIFICATION_ALLOWED_ERR=(ge[7]="No modification allowed",7);var Hh=_e.NOT_FOUND_ERR=(ge[8]="Not found",8);_e.NOT_SUPPORTED_ERR=(ge[9]="Not supported",9);var qh=_e.INUSE_ATTRIBUTE_ERR=(ge[10]="Attribute in use",10);_e.INVALID_STATE_ERR=(ge[11]="Invalid state",11),_e.SYNTAX_ERR=(ge[12]="Syntax error",12),_e.INVALID_MODIFICATION_ERR=(ge[13]="Invalid modification",13),_e.NAMESPACE_ERR=(ge[14]="Invalid namespace",14),_e.INVALID_ACCESS_ERR=(ge[15]="Invalid access",15);function Jt(r,t){if(t instanceof Error)var e=t;else e=this,Error.call(this,ge[r]),this.message=ge[r],Error.captureStackTrace&&Error.captureStackTrace(this,Jt);return e.code=r,t&&(this.message=this.message+": "+t),e}Jt.prototype=Error.prototype,ks(_e,Jt);function gi(){}gi.prototype={length:0,item:function(r){return r>=0&&r<this.length?this[r]:null},toString:function(r,t){for(var e=[],i=0;i<this.length;i++)Kn(this[i],e,r,t);return e.join("")},filter:function(r){return Array.prototype.filter.call(this,r)},indexOf:function(r){return Array.prototype.indexOf.call(this,r)}};function Qn(r,t){this._node=r,this._refresh=t,fo(this)}function fo(r){var t=r._node._inc||r._node.ownerDocument._inc;if(r._inc!==t){var e=r._refresh(r._node);if(nc(r,"length",e.length),!r.$$length||e.length<r.$$length)for(var i=e.length;i in r;i++)Object.prototype.hasOwnProperty.call(r,i)&&delete r[i];ks(e,r),r._inc=t}}Qn.prototype.item=function(r){return fo(this),this[r]||null},He(Qn,gi);function Wa(){}function Wh(r,t){for(var e=r.length;e--;)if(r[e]===t)return e}function Vh(r,t,e,i){if(i?t[Wh(t,i)]=e:t[t.length++]=e,r){e.ownerElement=r;var a=r.ownerDocument;a&&(i&&Yh(a,r,i),Sg(a,r,e))}}function zh(r,t,e){var i=Wh(t,e);if(i>=0){for(var a=t.length-1;i<a;)t[i]=t[++i];if(t.length=a,r){var u=r.ownerDocument;u&&(Yh(u,r,e),e.ownerElement=null)}}else throw new Jt(Hh,new Error(r.tagName+"@"+e))}Wa.prototype={length:0,item:gi.prototype.item,getNamedItem:function(r){for(var t=this.length;t--;){var e=this[t];if(e.nodeName==r)return e}},setNamedItem:function(r){var t=r.ownerElement;if(t&&t!=this._ownerElement)throw new Jt(qh);var e=this.getNamedItem(r.nodeName);return Vh(this._ownerElement,this,r,e),e},setNamedItemNS:function(r){var t=r.ownerElement,e;if(t&&t!=this._ownerElement)throw new Jt(qh);return e=this.getNamedItemNS(r.namespaceURI,r.localName),Vh(this._ownerElement,this,r,e),e},removeNamedItem:function(r){var t=this.getNamedItem(r);return zh(this._ownerElement,this,t),t},removeNamedItemNS:function(r,t){var e=this.getNamedItemNS(r,t);return zh(this._ownerElement,this,e),e},getNamedItemNS:function(r,t){for(var e=this.length;e--;){var i=this[e];if(i.localName==t&&i.namespaceURI==r)return i}return null}};function $h(){}$h.prototype={hasFeature:function(r,t){return!0},createDocument:function(r,t,e){var i=new qs;if(i.implementation=this,i.childNodes=new gi,i.doctype=e||null,e&&i.appendChild(e),t){var a=i.createElementNS(r,t);i.appendChild(a)}return i},createDocumentType:function(r,t,e){var i=new $a;return i.name=r,i.nodeName=r,i.publicId=t||"",i.systemId=e||"",i}};function Rt(){}Rt.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(r,t){return Va(this,r,t)},replaceChild:function(r,t){Va(this,r,t,Kh),t&&this.removeChild(t)},removeChild:function(r){return Xh(this,r)},appendChild:function(r){return this.insertBefore(r,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(r){return wo(this.ownerDocument||this,this,r)},normalize:function(){for(var r=this.firstChild;r;){var t=r.nextSibling;t&&t.nodeType==qa&&r.nodeType==qa?(this.removeChild(t),r.appendData(t.data)):(r.normalize(),r=t)}},isSupported:function(r,t){return this.ownerDocument.implementation.hasFeature(r,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(r){for(var t=this;t;){var e=t._nsMap;if(e){for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&e[i]===r)return i}t=t.nodeType==Zn?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(r){for(var t=this;t;){var e=t._nsMap;if(e&&Object.prototype.hasOwnProperty.call(e,r))return e[r];t=t.nodeType==Zn?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(r){var t=this.lookupPrefix(r);return t==null}};function Gh(r){return r=="<"&&"&lt;"||r==">"&&"&gt;"||r=="&"&&"&amp;"||r=='"'&&"&quot;"||"&#"+r.charCodeAt()+";"}ks(qe,Rt),ks(qe,Rt.prototype);function Hs(r,t){if(t(r))return!0;if(r=r.firstChild)do if(Hs(r,t))return!0;while(r=r.nextSibling)}function qs(){this.ownerDocument=this}function Sg(r,t,e){r&&r._inc++;var i=e.namespaceURI;i===Us.XMLNS&&(t._nsMap[e.prefix?e.localName:""]=e.value)}function Yh(r,t,e,i){r&&r._inc++;var a=e.namespaceURI;a===Us.XMLNS&&delete t._nsMap[e.prefix?e.localName:""]}function po(r,t,e){if(r&&r._inc){r._inc++;var i=t.childNodes;if(e)i[i.length++]=e;else{for(var a=t.firstChild,u=0;a;)i[u++]=a,a=a.nextSibling;i.length=u,delete i[i.length]}}}function Xh(r,t){var e=t.previousSibling,i=t.nextSibling;return e?e.nextSibling=i:r.firstChild=i,i?i.previousSibling=e:r.lastChild=e,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,po(r.ownerDocument,r),t}function Og(r){return r&&(r.nodeType===Rt.DOCUMENT_NODE||r.nodeType===Rt.DOCUMENT_FRAGMENT_NODE||r.nodeType===Rt.ELEMENT_NODE)}function Ng(r){return r&&(Kr(r)||go(r)||yi(r)||r.nodeType===Rt.DOCUMENT_FRAGMENT_NODE||r.nodeType===Rt.COMMENT_NODE||r.nodeType===Rt.PROCESSING_INSTRUCTION_NODE)}function yi(r){return r&&r.nodeType===Rt.DOCUMENT_TYPE_NODE}function Kr(r){return r&&r.nodeType===Rt.ELEMENT_NODE}function go(r){return r&&r.nodeType===Rt.TEXT_NODE}function Zh(r,t){var e=r.childNodes||[];if(Qr(e,Kr)||yi(t))return!1;var i=Qr(e,yi);return!(t&&i&&e.indexOf(i)>e.indexOf(t))}function Qh(r,t){var e=r.childNodes||[];function i(u){return Kr(u)&&u!==t}if(Qr(e,i))return!1;var a=Qr(e,yi);return!(t&&a&&e.indexOf(a)>e.indexOf(t))}function Mg(r,t,e){if(!Og(r))throw new Jt(We,"Unexpected parent node type "+r.nodeType);if(e&&e.parentNode!==r)throw new Jt(Hh,"child not in parent");if(!Ng(t)||yi(t)&&r.nodeType!==Rt.DOCUMENT_NODE)throw new Jt(We,"Unexpected node type "+t.nodeType+" for parent node type "+r.nodeType)}function Bg(r,t,e){var i=r.childNodes||[],a=t.childNodes||[];if(t.nodeType===Rt.DOCUMENT_FRAGMENT_NODE){var u=a.filter(Kr);if(u.length>1||Qr(a,go))throw new Jt(We,"More than one element or text in fragment");if(u.length===1&&!Zh(r,e))throw new Jt(We,"Element in fragment can not be inserted before doctype")}if(Kr(t)&&!Zh(r,e))throw new Jt(We,"Only one element can be added and only after doctype");if(yi(t)){if(Qr(i,yi))throw new Jt(We,"Only one doctype is allowed");var l=Qr(i,Kr);if(e&&i.indexOf(l)<i.indexOf(e))throw new Jt(We,"Doctype can only be inserted before an element");if(!e&&l)throw new Jt(We,"Doctype can not be appended since element is present")}}function Kh(r,t,e){var i=r.childNodes||[],a=t.childNodes||[];if(t.nodeType===Rt.DOCUMENT_FRAGMENT_NODE){var u=a.filter(Kr);if(u.length>1||Qr(a,go))throw new Jt(We,"More than one element or text in fragment");if(u.length===1&&!Qh(r,e))throw new Jt(We,"Element in fragment can not be inserted before doctype")}if(Kr(t)&&!Qh(r,e))throw new Jt(We,"Only one element can be added and only after doctype");if(yi(t)){if(Qr(i,function(f){return yi(f)&&f!==e}))throw new Jt(We,"Only one doctype is allowed");var l=Qr(i,Kr);if(e&&i.indexOf(l)<i.indexOf(e))throw new Jt(We,"Doctype can only be inserted before an element")}}function Va(r,t,e,i){Mg(r,t,e),r.nodeType===Rt.DOCUMENT_NODE&&(i||Bg)(r,t,e);var a=t.parentNode;if(a&&a.removeChild(t),t.nodeType===di){var u=t.firstChild;if(u==null)return t;var l=t.lastChild}else u=l=t;var c=e?e.previousSibling:r.lastChild;u.previousSibling=c,l.nextSibling=e,c?c.nextSibling=u:r.firstChild=u,e==null?r.lastChild=l:e.previousSibling=l;do u.parentNode=r;while(u!==l&&(u=u.nextSibling));return po(r.ownerDocument||r,r),t.nodeType==di&&(t.firstChild=t.lastChild=null),t}function Ig(r,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=r,t.previousSibling=r.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:r.firstChild=t,r.lastChild=t,po(r.ownerDocument,r,t),t}qs.prototype={nodeName:"#document",nodeType:Uh,doctype:null,documentElement:null,_inc:1,insertBefore:function(r,t){if(r.nodeType==di){for(var e=r.firstChild;e;){var i=e.nextSibling;this.insertBefore(e,t),e=i}return r}return Va(this,r,t),r.ownerDocument=this,this.documentElement===null&&r.nodeType===Br&&(this.documentElement=r),r},removeChild:function(r){return this.documentElement==r&&(this.documentElement=null),Xh(this,r)},replaceChild:function(r,t){Va(this,r,t,Kh),r.ownerDocument=this,t&&this.removeChild(t),Kr(r)&&(this.documentElement=r)},importNode:function(r,t){return ic(this,r,t)},getElementById:function(r){var t=null;return Hs(this.documentElement,function(e){if(e.nodeType==Br&&e.getAttribute("id")==r)return t=e,!0}),t},getElementsByClassName:function(r){var t=Ih(r);return new Qn(this,function(e){var i=[];return t.length>0&&Hs(e.documentElement,function(a){if(a!==e&&a.nodeType===Br){var u=a.getAttribute("class");if(u){var l=r===u;if(!l){var c=Ih(u);l=t.every(_g(c))}l&&i.push(a)}}}),i})},createElement:function(r){var t=new vn;t.ownerDocument=this,t.nodeName=r,t.tagName=r,t.localName=r,t.childNodes=new gi;var e=t.attributes=new Wa;return e._ownerElement=t,t},createDocumentFragment:function(){var r=new Ga;return r.ownerDocument=this,r.childNodes=new gi,r},createTextNode:function(r){var t=new yo;return t.ownerDocument=this,t.appendData(r),t},createComment:function(r){var t=new mo;return t.ownerDocument=this,t.appendData(r),t},createCDATASection:function(r){var t=new vo;return t.ownerDocument=this,t.appendData(r),t},createProcessingInstruction:function(r,t){var e=new Eo;return e.ownerDocument=this,e.tagName=e.nodeName=e.target=r,e.nodeValue=e.data=t,e},createAttribute:function(r){var t=new za;return t.ownerDocument=this,t.name=r,t.nodeName=r,t.localName=r,t.specified=!0,t},createEntityReference:function(r){var t=new xo;return t.ownerDocument=this,t.nodeName=r,t},createElementNS:function(r,t){var e=new vn,i=t.split(":"),a=e.attributes=new Wa;return e.childNodes=new gi,e.ownerDocument=this,e.nodeName=t,e.tagName=t,e.namespaceURI=r,i.length==2?(e.prefix=i[0],e.localName=i[1]):e.localName=t,a._ownerElement=e,e},createAttributeNS:function(r,t){var e=new za,i=t.split(":");return e.ownerDocument=this,e.nodeName=t,e.name=t,e.namespaceURI=r,e.specified=!0,i.length==2?(e.prefix=i[0],e.localName=i[1]):e.localName=t,e}},He(qs,Rt);function vn(){this._nsMap={}}vn.prototype={nodeType:Br,hasAttribute:function(r){return this.getAttributeNode(r)!=null},getAttribute:function(r){var t=this.getAttributeNode(r);return t&&t.value||""},getAttributeNode:function(r){return this.attributes.getNamedItem(r)},setAttribute:function(r,t){var e=this.ownerDocument.createAttribute(r);e.value=e.nodeValue=""+t,this.setAttributeNode(e)},removeAttribute:function(r){var t=this.getAttributeNode(r);t&&this.removeAttributeNode(t)},appendChild:function(r){return r.nodeType===di?this.insertBefore(r,null):Ig(this,r)},setAttributeNode:function(r){return this.attributes.setNamedItem(r)},setAttributeNodeNS:function(r){return this.attributes.setNamedItemNS(r)},removeAttributeNode:function(r){return this.attributes.removeNamedItem(r.nodeName)},removeAttributeNS:function(r,t){var e=this.getAttributeNodeNS(r,t);e&&this.removeAttributeNode(e)},hasAttributeNS:function(r,t){return this.getAttributeNodeNS(r,t)!=null},getAttributeNS:function(r,t){var e=this.getAttributeNodeNS(r,t);return e&&e.value||""},setAttributeNS:function(r,t,e){var i=this.ownerDocument.createAttributeNS(r,t);i.value=i.nodeValue=""+e,this.setAttributeNode(i)},getAttributeNodeNS:function(r,t){return this.attributes.getNamedItemNS(r,t)},getElementsByTagName:function(r){return new Qn(this,function(t){var e=[];return Hs(t,function(i){i!==t&&i.nodeType==Br&&(r==="*"||i.tagName==r)&&e.push(i)}),e})},getElementsByTagNameNS:function(r,t){return new Qn(this,function(e){var i=[];return Hs(e,function(a){a!==e&&a.nodeType===Br&&(r==="*"||a.namespaceURI===r)&&(t==="*"||a.localName==t)&&i.push(a)}),i})}},qs.prototype.getElementsByTagName=vn.prototype.getElementsByTagName,qs.prototype.getElementsByTagNameNS=vn.prototype.getElementsByTagNameNS,He(vn,Rt);function za(){}za.prototype.nodeType=Zn,He(za,Rt);function Ws(){}Ws.prototype={data:"",substringData:function(r,t){return this.data.substring(r,r+t)},appendData:function(r){r=this.data+r,this.nodeValue=this.data=r,this.length=r.length},insertData:function(r,t){this.replaceData(r,0,t)},appendChild:function(r){throw new Error(ge[We])},deleteData:function(r,t){this.replaceData(r,t,"")},replaceData:function(r,t,e){var i=this.data.substring(0,r),a=this.data.substring(r+t);e=i+e+a,this.nodeValue=this.data=e,this.length=e.length}},He(Ws,Rt);function yo(){}yo.prototype={nodeName:"#text",nodeType:qa,splitText:function(r){var t=this.data,e=t.substring(r);t=t.substring(0,r),this.data=this.nodeValue=t,this.length=t.length;var i=this.ownerDocument.createTextNode(e);return this.parentNode&&this.parentNode.insertBefore(i,this.nextSibling),i}},He(yo,Ws);function mo(){}mo.prototype={nodeName:"#comment",nodeType:Fh},He(mo,Ws);function vo(){}vo.prototype={nodeName:"#cdata-section",nodeType:Rh},He(vo,Ws);function $a(){}$a.prototype.nodeType=kh,He($a,Rt);function jh(){}jh.prototype.nodeType=Dg,He(jh,Rt);function Jh(){}Jh.prototype.nodeType=Cg,He(Jh,Rt);function xo(){}xo.prototype.nodeType=Lh,He(xo,Rt);function Ga(){}Ga.prototype.nodeName="#document-fragment",Ga.prototype.nodeType=di,He(Ga,Rt);function Eo(){}Eo.prototype.nodeType=Ph,He(Eo,Rt);function tc(){}tc.prototype.serializeToString=function(r,t,e){return ec.call(r,t,e)},Rt.prototype.toString=ec;function ec(r,t){var e=[],i=this.nodeType==9&&this.documentElement||this,a=i.prefix,u=i.namespaceURI;if(u&&a==null){var a=i.lookupPrefix(u);if(a==null)var l=[{namespace:u,prefix:null}]}return Kn(this,e,r,t,l),e.join("")}function rc(r,t,e){var i=r.prefix||"",a=r.namespaceURI;if(!a||i==="xml"&&a===Us.XML||a===Us.XMLNS)return!1;for(var u=e.length;u--;){var l=e[u];if(l.prefix===i)return l.namespace!==a}return!0}function Ao(r,t,e){r.push(" ",t,'="',e.replace(/[<>&"\t\n\r]/g,Gh),'"')}function Kn(r,t,e,i,a){if(a||(a=[]),i)if(r=i(r),r){if(typeof r=="string"){t.push(r);return}}else return;switch(r.nodeType){case Br:var u=r.attributes,l=u.length,R=r.firstChild,c=r.tagName;e=Us.isHTML(r.namespaceURI)||e;var f=c;if(!e&&!r.prefix&&r.namespaceURI){for(var d,g=0;g<u.length;g++)if(u.item(g).name==="xmlns"){d=u.item(g).value;break}if(!d)for(var E=a.length-1;E>=0;E--){var T=a[E];if(T.prefix===""&&T.namespace===r.namespaceURI){d=T.namespace;break}}if(d!==r.namespaceURI)for(var E=a.length-1;E>=0;E--){var T=a[E];if(T.namespace===r.namespaceURI){T.prefix&&(f=T.prefix+":"+c);break}}}t.push("<",f);for(var C=0;C<l;C++){var L=u.item(C);L.prefix=="xmlns"?a.push({prefix:L.localName,namespace:L.value}):L.nodeName=="xmlns"&&a.push({prefix:"",namespace:L.value})}for(var C=0;C<l;C++){var L=u.item(C);if(rc(L,e,a)){var N=L.prefix||"",M=L.namespaceURI;Ao(t,N?"xmlns:"+N:"xmlns",M),a.push({prefix:N,namespace:M})}Kn(L,t,e,i,a)}if(c===f&&rc(r,e,a)){var N=r.prefix||"",M=r.namespaceURI;Ao(t,N?"xmlns:"+N:"xmlns",M),a.push({prefix:N,namespace:M})}if(R||e&&!/^(?:meta|link|img|br|hr|input)$/i.test(c)){if(t.push(">"),e&&/^script$/i.test(c))for(;R;)R.data?t.push(R.data):Kn(R,t,e,i,a.slice()),R=R.nextSibling;else for(;R;)Kn(R,t,e,i,a.slice()),R=R.nextSibling;t.push("</",f,">")}else t.push("/>");return;case Uh:case di:for(var R=r.firstChild;R;)Kn(R,t,e,i,a.slice()),R=R.nextSibling;return;case Zn:return Ao(t,r.name,r.value);case qa:return t.push(r.data.replace(/[<&>]/g,Gh));case Rh:return t.push("<![CDATA[",r.data,"]]>");case Fh:return t.push("<!--",r.data,"-->");case kh:var W=r.publicId,G=r.systemId;if(t.push("<!DOCTYPE ",r.name),W)t.push(" PUBLIC ",W),G&&G!="."&&t.push(" ",G),t.push(">");else if(G&&G!=".")t.push(" SYSTEM ",G,">");else{var b=r.internalSubset;b&&t.push(" [",b,"]"),t.push(">")}return;case Ph:return t.push("<?",r.target," ",r.data,"?>");case Lh:return t.push("&",r.nodeName,";");default:t.push("??",r.nodeName)}}function ic(r,t,e){var i;switch(t.nodeType){case Br:i=t.cloneNode(!1),i.ownerDocument=r;case di:break;case Zn:e=!0;break}if(i||(i=t.cloneNode(!1)),i.ownerDocument=r,i.parentNode=null,e)for(var a=t.firstChild;a;)i.appendChild(ic(r,a,e)),a=a.nextSibling;return i}function wo(r,t,e){var i=new t.constructor;for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var u=t[a];typeof u!="object"&&u!=i[a]&&(i[a]=u)}switch(t.childNodes&&(i.childNodes=new gi),i.ownerDocument=r,i.nodeType){case Br:var l=t.attributes,c=i.attributes=new Wa,f=l.length;c._ownerElement=i;for(var d=0;d<f;d++)i.setAttributeNode(wo(r,l.item(d),!0));break;case Zn:e=!0}if(e)for(var g=t.firstChild;g;)i.appendChild(wo(r,g,e)),g=g.nextSibling;return i}function nc(r,t,e){r[t]=e}try{if(Object.defineProperty){let r=function(t){switch(t.nodeType){case Br:case di:var e=[];for(t=t.firstChild;t;)t.nodeType!==7&&t.nodeType!==8&&e.push(r(t)),t=t.nextSibling;return e.join("");default:return t.nodeValue}};Object.defineProperty(Qn.prototype,"length",{get:function(){return fo(this),this.$$length}}),Object.defineProperty(Rt.prototype,"textContent",{get:function(){return r(this)},set:function(t){switch(this.nodeType){case Br:case di:for(;this.firstChild;)this.removeChild(this.firstChild);(t||String(t))&&this.appendChild(this.ownerDocument.createTextNode(t));break;default:this.data=t,this.value=t,this.nodeValue=t}}}),nc=function(t,e,i){t["$$"+e]=i}}}catch{}qi.DocumentType=$a,qi.DOMException=Jt,qi.DOMImplementation=$h,qi.Element=vn,qi.Node=Rt,qi.NodeList=gi,qi.XMLSerializer=tc;var Ya={},sc={};(function(r){var t=pi.freeze;r.XML_ENTITIES=t({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),r.HTML_ENTITIES=t({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
2
+ `,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),r.entityMap=r.HTML_ENTITIES})(sc);var bo={},Vs=pi.NAMESPACE,To=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,ac=new RegExp("[\\-\\.0-9"+To.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),uc=new RegExp("^"+To.source+ac.source+"*(?::"+To.source+ac.source+"*)?$"),zs=0,Wi=1,jn=2,$s=3,Jn=4,ts=5,Gs=6,Xa=7;function es(r,t){this.message=r,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,es)}es.prototype=new Error,es.prototype.name=es.name;function oc(){}oc.prototype={parse:function(r,t,e){var i=this.domBuilder;i.startDocument(),cc(t,t={}),Rg(r,t,e,i,this.errorHandler),i.endDocument()}};function Rg(r,t,e,i,a){function u(O){if(O>65535){O-=65536;var yt=55296+(O>>10),Bt=56320+(O&1023);return String.fromCharCode(yt,Bt)}else return String.fromCharCode(O)}function l(O){var yt=O.slice(1,-1);return Object.hasOwnProperty.call(e,yt)?e[yt]:yt.charAt(0)==="#"?u(parseInt(yt.substr(1).replace("x","0x"))):(a.error("entity not found:"+O),O)}function c(O){if(O>N){var yt=r.substring(N,O).replace(/&#?\w+;/g,l);T&&f(N),i.characters(yt,0,O-N),N=O}}function f(O,yt){for(;O>=g&&(yt=E.exec(r));)d=yt.index,g=d+yt[0].length,T.lineNumber++;T.columnNumber=O-d+1}for(var d=0,g=0,E=/.*(?:\r\n?|\n)|.*$/g,T=i.locator,C=[{currentNSMap:t}],L={},N=0;;){try{var M=r.indexOf("<",N);if(M<0){if(!r.substr(N).match(/^\s*$/)){var R=i.doc,W=R.createTextNode(r.substr(N));R.appendChild(W),i.currentElement=W}return}switch(M>N&&c(M),r.charAt(M+1)){case"/":var J=r.indexOf(">",M+3),G=r.substring(M+2,J).replace(/[ \t\n\r]+$/g,""),b=C.pop();J<0?(G=r.substring(M+2).replace(/[\s<].*/,""),a.error("end tag name: "+G+" is not complete:"+b.tagName),J=M+1+G.length):G.match(/\s</)&&(G=G.replace(/[\s<].*/,""),a.error("end tag name: "+G+" maybe not complete"),J=M+1+G.length);var P=b.localNSMap,H=b.tagName==G,K=H||b.tagName&&b.tagName.toLowerCase()==G.toLowerCase();if(K){if(i.endElement(b.uri,b.localName,G),P)for(var tt in P)Object.prototype.hasOwnProperty.call(P,tt)&&i.endPrefixMapping(tt);H||a.fatalError("end tag name: "+G+" is not match the current start tagName:"+b.tagName)}else C.push(b);J++;break;case"?":T&&f(M),J=kg(r,M,i);break;case"!":T&&f(M),J=Ug(r,M,i,a);break;default:T&&f(M);var Z=new fc,rt=C[C.length-1].currentNSMap,J=Lg(r,M,Z,rt,l,a),st=Z.length;if(!Z.closed&&Fg(r,J,Z.tagName,L)&&(Z.closed=!0,e.nbsp||a.warning("unclosed xml attribute")),T&&st){for(var ht=lc(T,{}),ct=0;ct<st;ct++){var ft=Z[ct];f(ft.offset),ft.locator=lc(T,{})}i.locator=ht,hc(Z,i,rt)&&C.push(Z),i.locator=T}else hc(Z,i,rt)&&C.push(Z);Vs.isHTML(Z.uri)&&!Z.closed?J=Pg(r,J,Z.tagName,l,i):J++}}catch(O){if(O instanceof es)throw O;a.error("element parse error: "+O),J=-1}J>N?N=J:c(Math.max(M,N)+1)}}function lc(r,t){return t.lineNumber=r.lineNumber,t.columnNumber=r.columnNumber,t}function Lg(r,t,e,i,a,u){function l(T,C,L){e.attributeNames.hasOwnProperty(T)&&u.fatalError("Attribute "+T+" redefined"),e.addValue(T,C.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,a),L)}for(var c,f,d=++t,g=zs;;){var E=r.charAt(d);switch(E){case"=":if(g===Wi)c=r.slice(t,d),g=$s;else if(g===jn)g=$s;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(g===$s||g===Wi)if(g===Wi&&(u.warning('attribute value must after "="'),c=r.slice(t,d)),t=d+1,d=r.indexOf(E,t),d>0)f=r.slice(t,d),l(c,f,t-1),g=ts;else throw new Error("attribute value no end '"+E+"' match");else if(g==Jn)f=r.slice(t,d),l(c,f,t),u.warning('attribute "'+c+'" missed start quot('+E+")!!"),t=d+1,g=ts;else throw new Error('attribute value must after "="');break;case"/":switch(g){case zs:e.setTagName(r.slice(t,d));case ts:case Gs:case Xa:g=Xa,e.closed=!0;case Jn:case Wi:break;case jn:e.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return u.error("unexpected end of input"),g==zs&&e.setTagName(r.slice(t,d)),d;case">":switch(g){case zs:e.setTagName(r.slice(t,d));case ts:case Gs:case Xa:break;case Jn:case Wi:f=r.slice(t,d),f.slice(-1)==="/"&&(e.closed=!0,f=f.slice(0,-1));case jn:g===jn&&(f=c),g==Jn?(u.warning('attribute "'+f+'" missed quot(")!'),l(c,f,t)):((!Vs.isHTML(i[""])||!f.match(/^(?:disabled|checked|selected)$/i))&&u.warning('attribute "'+f+'" missed value!! "'+f+'" instead!!'),l(f,f,t));break;case $s:throw new Error("attribute value missed!!")}return d;case"€":E=" ";default:if(E<=" ")switch(g){case zs:e.setTagName(r.slice(t,d)),g=Gs;break;case Wi:c=r.slice(t,d),g=jn;break;case Jn:var f=r.slice(t,d);u.warning('attribute "'+f+'" missed quot(")!!'),l(c,f,t);case ts:g=Gs;break}else switch(g){case jn:e.tagName,(!Vs.isHTML(i[""])||!c.match(/^(?:disabled|checked|selected)$/i))&&u.warning('attribute "'+c+'" missed value!! "'+c+'" instead2!!'),l(c,c,t),t=d,g=Wi;break;case ts:u.warning('attribute space is required"'+c+'"!!');case Gs:g=Wi,t=d;break;case $s:g=Jn,t=d;break;case Xa:throw new Error("elements closed character '/' and '>' must be connected to")}}d++}}function hc(r,t,e){for(var i=r.tagName,a=null,E=r.length;E--;){var u=r[E],l=u.qName,c=u.value,T=l.indexOf(":");if(T>0)var f=u.prefix=l.slice(0,T),d=l.slice(T+1),g=f==="xmlns"&&d;else d=l,f=null,g=l==="xmlns"&&"";u.localName=d,g!==!1&&(a==null&&(a={},cc(e,e={})),e[g]=a[g]=c,u.uri=Vs.XMLNS,t.startPrefixMapping(g,c))}for(var E=r.length;E--;){u=r[E];var f=u.prefix;f&&(f==="xml"&&(u.uri=Vs.XML),f!=="xmlns"&&(u.uri=e[f||""]))}var T=i.indexOf(":");T>0?(f=r.prefix=i.slice(0,T),d=r.localName=i.slice(T+1)):(f=null,d=r.localName=i);var C=r.uri=e[f||""];if(t.startElement(C,d,i,r),r.closed){if(t.endElement(C,d,i),a)for(f in a)Object.prototype.hasOwnProperty.call(a,f)&&t.endPrefixMapping(f)}else return r.currentNSMap=e,r.localNSMap=a,!0}function Pg(r,t,e,i,a){if(/^(?:script|textarea)$/i.test(e)){var u=r.indexOf("</"+e+">",t),l=r.substring(t+1,u);if(/[&<]/.test(l))return/^script$/i.test(e)?(a.characters(l,0,l.length),u):(l=l.replace(/&#?\w+;/g,i),a.characters(l,0,l.length),u)}return t+1}function Fg(r,t,e,i){var a=i[e];return a==null&&(a=r.lastIndexOf("</"+e+">"),a<t&&(a=r.lastIndexOf("</"+e)),i[e]=a),a<t}function cc(r,t){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}function Ug(r,t,e,i){var a=r.charAt(t+2);switch(a){case"-":if(r.charAt(t+3)==="-"){var u=r.indexOf("-->",t+4);return u>t?(e.comment(r,t+4,u-t-4),u+3):(i.error("Unclosed comment"),-1)}else return-1;default:if(r.substr(t+3,6)=="CDATA["){var u=r.indexOf("]]>",t+9);return e.startCDATA(),e.characters(r,t+9,u-t-9),e.endCDATA(),u+3}var l=Hg(r,t),c=l.length;if(c>1&&/!doctype/i.test(l[0][0])){var f=l[1][0],d=!1,g=!1;c>3&&(/^public$/i.test(l[2][0])?(d=l[3][0],g=c>4&&l[4][0]):/^system$/i.test(l[2][0])&&(g=l[3][0]));var E=l[c-1];return e.startDTD(f,d,g),e.endDTD(),E.index+E[0].length}}return-1}function kg(r,t,e){var i=r.indexOf("?>",t);if(i){var a=r.substring(t,i).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return a?(a[0].length,e.processingInstruction(a[1],a[2]),i+2):-1}return-1}function fc(){this.attributeNames={}}fc.prototype={setTagName:function(r){if(!uc.test(r))throw new Error("invalid tagName:"+r);this.tagName=r},addValue:function(r,t,e){if(!uc.test(r))throw new Error("invalid attribute:"+r);this.attributeNames[r]=this.length,this[this.length++]={qName:r,value:t,offset:e}},length:0,getLocalName:function(r){return this[r].localName},getLocator:function(r){return this[r].locator},getQName:function(r){return this[r].qName},getURI:function(r){return this[r].uri},getValue:function(r){return this[r].value}};function Hg(r,t){var e,i=[],a=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(a.lastIndex=t,a.exec(r);e=a.exec(r);)if(i.push(e),e[1])return i}bo.XMLReader=oc,bo.ParseError=es;var qg=pi,Wg=qi,pc=sc,dc=bo,Vg=Wg.DOMImplementation,gc=qg.NAMESPACE,zg=dc.ParseError,$g=dc.XMLReader;function yc(r){return r.replace(/\r[\n\u0085]/g,`
3
3
  `).replace(/[\r\u0085\u2028]/g,`
4
- `)}function nc(r){this.options=r||{locator:{}}}nc.prototype.parseFromString=function(r,t){var e=this.options,n=new Sg,a=e.domBuilder||new Us,u=e.errorHandler,l=e.locator,c=e.xmlns||{},f=/\/x?html?$/.test(t),d=f?tc.HTML_ENTITIES:tc.XML_ENTITIES;l&&a.setDocumentLocator(l),n.errorHandler=Og(u,a,l),n.domBuilder=e.domBuilder||a,f&&(c[""]=rc.HTML),c.xml=c.xml||rc.XML;var y=e.normalizeLineEndings||ic;return r&&typeof r=="string"?n.parse(y(r),c,d):n.errorHandler.error("invalid doc source"),a.doc};function Og(r,t,e){if(!r){if(t instanceof Us)return t;r=t}var n={},a=r instanceof Function;e=e||{};function u(l){var c=r[l];!c&&a&&(c=r.length==2?function(f){r(l,f)}:r),n[l]=c&&function(f){c("[xmldom "+l+"] "+f+fo(e))}||function(){}}return u("warning"),u("error"),u("fatalError"),n}function Us(){this.cdata=!1}function Xn(r,t){t.lineNumber=r.lineNumber,t.columnNumber=r.columnNumber}Us.prototype={startDocument:function(){this.doc=new Cg().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(r,t,e,n){var a=this.doc,u=a.createElementNS(r,e||t),l=n.length;Ua(this,u),this.currentElement=u,this.locator&&Xn(this.locator,u);for(var c=0;c<l;c++){var r=n.getURI(c),f=n.getValue(c),e=n.getQName(c),d=a.createAttributeNS(r,e);this.locator&&Xn(n.getLocator(c),d),d.value=d.nodeValue=f,u.setAttributeNode(d)}},endElement:function(r,t,e){var n=this.currentElement;n.tagName,this.currentElement=n.parentNode},startPrefixMapping:function(r,t){},endPrefixMapping:function(r){},processingInstruction:function(r,t){var e=this.doc.createProcessingInstruction(r,t);this.locator&&Xn(this.locator,e),Ua(this,e)},ignorableWhitespace:function(r,t,e){},characters:function(r,t,e){if(r=sc.apply(this,arguments),r){if(this.cdata)var n=this.doc.createCDATASection(r);else var n=this.doc.createTextNode(r);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(r)&&this.doc.appendChild(n),this.locator&&Xn(this.locator,n)}},skippedEntity:function(r){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(r){(this.locator=r)&&(r.lineNumber=0)},comment:function(r,t,e){r=sc.apply(this,arguments);var n=this.doc.createComment(r);this.locator&&Xn(this.locator,n),Ua(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(r,t,e){var n=this.doc.implementation;if(n&&n.createDocumentType){var a=n.createDocumentType(r,t,e);this.locator&&Xn(this.locator,a),Ua(this,a),this.doc.doctype=a}},warning:function(r){console.warn("[xmldom warning] "+r,fo(this.locator))},error:function(r){console.error("[xmldom error] "+r,fo(this.locator))},fatalError:function(r){throw new Dg(r,this.locator)}};function fo(r){if(r)return`
5
- @`+(r.systemId||"")+"#[line:"+r.lineNumber+",col:"+r.columnNumber+"]"}function sc(r,t,e){return typeof r=="string"?r.substr(t,e):r.length>=t+e||t?new java.lang.String(r,t,e)+"":r}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(r){Us.prototype[r]=function(){return null}});function Ua(r,t){r.currentElement?r.currentElement.appendChild(t):r.doc.appendChild(t)}Fa.__DOMHandler=Us,Fa.normalizeLineEndings=ic,Fa.DOMParser=nc;var Ng=Fa.DOMParser;const Mg="1.0.49";function Bg(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const Zn=typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{document:void 0,tinyEngine:void 0};Zn.Path2D||Kd(Zn),Zn.DOMParser||(Zn.DOMParser=Ng);const Zt={window:Zn,version:Mg,isBrowser:Bg(),dpr:typeof window<"u"&&window.devicePixelRatio||1,document:Zn.document,time:0,deltaTime:0,config:Un},Hs=(r,t,e)=>Math.max(t,Math.min(e,r)),ac=(r,t=1e-6)=>Math.abs(r)<t?0:r<0?-1:1,uc=r=>r*(Math.PI/180),Ig=(r,t)=>(r%t+t)%t,po=(r,t,e)=>(1-e)*r+e*t,Rg=r=>{let t=r*(180/Math.PI);return t<0&&(t+=360),t>360&&(t-=360),t},he={transparent:"rgba(1, 1, 1, 0)",green:"#45b787",darkGreen:"#314a43",blue:"#6e9bc5",darkBlue:"#2775b6",red:"#F26666",darkRed:"#D95970",brown:"#ECD2B9",darkBrown:"#BF9D8A",yellow:"#ECDEC0",darkYellow:"#D0AC57",lightGray:"#e0e0e0",gray:"#beb6b6",darkGray:"#918883",white:"#F2F2F2",darkWhite:"#ececec",lightBlack:"#2E3032",black:"#182327",blackAlpha5:"rgba(0, 0, 0, 0.5)"},Lg={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Mr={h:0,s:0,l:0},Ha={h:0,s:0,l:0};function go(r,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?r+(t-r)*6*e:e<1/2?t:e<2/3?r+(t-r)*6*(2/3-e):r}const Pg=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}|[A-Fa-f0-9]{8})$|rgb\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)|rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*[\d.]+\s*\)/;class Wt{isColor=!0;r=1;g=1;b=1;a=1;constructor(t,e,n,a){return e===void 0&&n===void 0?this.set(t):this.setRGBA(t,e,n,a)}static isColor(t){return typeof t=="string"?Pg.test(t):typeof t=="number"?t>=0&&t<=16777215:!1}static getRandomStyle(){return di.random().getStyle()}static getDarken(t,e=.8){return di.set(t).getHSL(qa),di.setHSL(qa.h,qa.s,qa.l*e).getStyle()}static getLighten(t,e=1.2){return this.getDarken(t,e)}static getContrast(t){return di.set(t),di.getContrastString()}static getArray(t){return di.set(t).toArray()}static getComplementary(t){return di.set(t),di.getComplementaryString()}static getMoreTransparent(t,e){return di.set(t).setA(e).getStyle()}set(t){return t&&t.isColor?this.copy(t):typeof t=="number"?this.setHex(t):typeof t=="string"&&this.setStyle(t),this}random(){return this.setHex(Math.floor(Math.random()*(1<<24)))}setScalar(t){return this.r=t,this.g=t,this.b=t,this.a=1,this}setHex(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,this.a=1,this}setR(t){return this.r=t,this}setG(t){return this.g=t,this}setB(t){return this.b=t,this}setA(t){return this.a=t,this}setRGB(t,e,n){return this.setRGBA(t,e,n,this.a)}setRGBA(t,e,n,a=1){return this.r=t,this.g=e,this.b=n,this.a=a,this}setHSL(t,e,n,a=1){if(t=Ig(t,1),e=Hs(e,0,1),n=Hs(n,0,1),e===0)this.r=this.g=this.b=n;else{const u=n<=.5?n*(1+e):n+e-n*e,l=2*n-u;this.r=go(l,u,t+1/3),this.g=go(l,u,t),this.b=go(l,u,t-1/3)}return this.a=a,this}setStyle(t){let e;if(e=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(t)){let n;const a=e[1],u=e[2];switch(a){case"rgb":case"rgba":if(n=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(u))return this.r=Math.min(255,parseInt(n[1],10))/255,this.g=Math.min(255,parseInt(n[2],10))/255,this.b=Math.min(255,parseInt(n[3],10))/255,this.a=Math.max(Math.min(1,n[4]!==void 0?parseFloat(n[4]):1),0),this;if(n=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(u))return this.r=Math.min(100,parseInt(n[1],10))/100,this.g=Math.min(100,parseInt(n[2],10))/100,this.b=Math.min(100,parseInt(n[3],10))/100,this.a=Math.max(Math.min(1,n[4]!==void 0?parseFloat(n[4]):1),0),this;break;case"hsl":case"hsla":if(n=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(u)){const l=parseFloat(n[1])/360,c=parseInt(n[2],10)/100,f=parseInt(n[3],10)/100,d=Math.max(Math.min(1,n[4]!==void 0?parseFloat(n[4]):1),0);return this.setHSL(l,c,f,d)}break}}else if(e=/^\#([A-Fa-f\d]+)$/.exec(t)){const n=e[1],a=n.length;if(a===3)return this.r=parseInt(n.charAt(0)+n.charAt(0),16)/255,this.g=parseInt(n.charAt(1)+n.charAt(1),16)/255,this.b=parseInt(n.charAt(2)+n.charAt(2),16)/255,this.a=1,this;if(a===6)return this.r=parseInt(n.charAt(0)+n.charAt(1),16)/255,this.g=parseInt(n.charAt(2)+n.charAt(3),16)/255,this.b=parseInt(n.charAt(4)+n.charAt(5),16)/255,this.a=1,this}return t&&t.length>0?this.setColorName(t):this}setColorName(t){const e=Lg[t.toLowerCase()];return e!==void 0?this.setHex(e):console.warn("Color: Unknown color "+t),this}clone(){return new Wt(this.r,this.g,this.b,this.a)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this}getRGB(t=new Wt){return t.setRGB(this.r,this.g,this.b)}getRGBByBg(t=new Wt){const e=this.a,n=e*this.r+(1-e)*t.r,a=e*this.g+(1-e)*t.g,u=e*this.b+(1-e)*t.b;return new Wt(n,a,u)}getHex(){return Hs(this.r*255,0,255)<<16^Hs(this.g*255,0,255)<<8^Hs(this.b*255,0,255)<<0}getHSL(t){const e=this.r,n=this.g,a=this.b,u=Math.max(e,n,a),l=Math.min(e,n,a);let c=0,f;const d=(l+u)/2;if(l===u)c=0,f=0;else{const y=u-l;switch(f=d<=.5?y/(u+l):y/(2-u-l),u){case e:c=(n-a)/y+(n<a?6:0);break;case n:c=(a-e)/y+2;break;case a:c=(e-n)/y+4;break}c/=6}return t.h=c,t.s=f,t.l=d,t}getStyle(){return this.a===1?`rgb(${this.r*255|0},${this.g*255|0},${this.b*255|0})`:`rgba(${this.r*255|0},${this.g*255|0},${this.b*255|0},${this.a||1})`}getHexString(){return"#"+("000000"+this.getHex().toString(16)).slice(-6)}getBrightness(){let t=(this.r*255*299+this.g*255*587+this.b*255*144)/1e3;return t+=(255-t)*(255-this.a*255)/255,t}getContrastString(){return this.getBrightness()>125?"#2f2f2f":"#f2f2f2"}getComplementary(t=new Wt){const e=this.toArray(),n=[0,0,0,1];for(let a=0;a<e.length;a++)if(a<3)n[a]=1-e[a];else if(a===3)e[a]>1||e[a]<=0?n[a]=1:n[a]=Math.max(Math.min(parseFloat(e[a].toFixed(2)),1),0);else continue;return t.setRGBA(n[0],n[1],n[2],parseFloat(n[3].toFixed(2)))}getComplementaryString(){return this.getComplementary().getStyle()}getLightenOrDarken(t){if(typeof t>"u"||t>=1)return this.getHexString();const e=this.getRGBByBg(),n=e.r*t+(1-t),a=e.g*t+(1-t),u=e.b*t+(1-t);return new Wt(n,a,u).getHexString()}getNormalized(){return[parseFloat(Math.max(Math.min(this.r,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.g,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.b,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.a,1),0).toFixed(2))]}getNormalized3(){return[parseFloat(Math.max(Math.min(this.r,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.g,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.b,1),0).toFixed(2))]}offsetHSL(t,e,n){return this.getHSL(Mr),Mr.h+=t,Mr.s+=e,Mr.l+=n,this.setHSL(Mr.h,Mr.s,Mr.l),this}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this}multiply(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this}lerpColors(t,e,n){return this.r=t.r+(e.r-t.r)*n,this.g=t.g+(e.g-t.g)*n,this.b=t.b+(e.b-t.b)*n,this}lerpHSL(t,e){this.getHSL(Mr),t.getHSL(Ha);const n=po(Mr.h,Ha.h,e),a=po(Mr.s,Ha.s,e),u=po(Mr.l,Ha.l,e);return this.setHSL(n,a,u),this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this.a=t[e+3],this}toArray(t=[0,0,0,0],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t[e+3]=this.a,t}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),t.normalized===!0&&(this.r/=255,this.g/=255,this.b/=255),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const di=new Wt,qa={h:0,s:0,l:0};class Y{isVector2=!0;x=0;y=0;z;constructor(t=0,e=0,n){this.x=t,this.y=e,this.z=n||0}static isZero(t){return t.x===0&&t.y===0}static isEmpty(t){return!Number.isFinite(t.x)&&!Number.isFinite(t.y)}static equals(t,e,n=!0){return n?t.x===e.x&&t.y===e.y:Math.abs(t.x-e.x)<Number.EPSILON&&Math.abs(t.y-e.y)<Number.EPSILON}static getInt32Array(t,e=2){const n=new ArrayBuffer(t.length*e*4),a=new Int32Array(n);for(let u=0,l=t.length;u<l;u++)a[u*2]=t[u].x,a[u*2+1]=t[u].y;return a}static getFloat64Array(t,e=2){const n=new ArrayBuffer(t.length*e*8),a=new Float64Array(n);for(let u=0,l=t.length;u<l;u++)a[u*2]=t[u].x,a[u*2+1]=t[u].y;return a}static getVectors(t){const e=[];for(let n=0,a=t.length;n<a;n++)e.push(new Y(t[n].x,t[n].y));return e}static getStrings(t){const e=[];if(!t||!t.length)return"";for(let n=0,a=t.length;n<a;n++)e.push(Y.getString(t[n]));return e.join(",")}static getString(t){return`${t.x},${t.y}`}static getLength(t){return Math.sqrt(t.x*t.x+t.y*t.y)}static getDistance(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}static dot(t,e){return t.x*e.x+t.y*e.y}static cross(t,e){return t.x*e.y-t.y*e.x}static sub(t,e){return new Y().subVectors(t,e)}static isPointOnSegment(t,e,n){return ac(this.sub(t,n).cross(this.sub(e,n)))===0&&ac(this.sub(t,n).dot(this.sub(e,n)))<=0}static angle(t,e,n){return n?Math.atan2(t.y-e.y,t.x-e.x):Rg(Math.atan2(t.y-e.y,t.x-e.x))}static getSamplingPoints(t,e=100){let n=this.getClothoidPoints(t,e),a=0;for(let u=0,l=n.length;u<l;u++){let c=Math.max(0,u-1);u>0?a+=this.getDistance(n[c],n[c+1]):a=0,n[u].l=Math.round(a);let f=this.angle(n[c+1],n[c]);n[u].a=Math.round(f*100)/100}return n}static getClothoidPoints(t,e=100){let n=[],a=t.concat([]);if(!a||a.length<2)return n;a.length===2?(a.push(a[1]),a.unshift(a[0])):a.length===3&&a.splice(2,0,a[1]);for(let u=0;u<a.length-3;u+=3){let l=new Y(a[u].x,a[u].y),c=new Y(a[u+1].x,a[u+1].y),f=new Y(a[u+2].x,a[u+2].y),d=new Y(a[u+3].x,a[u+3].y),y=0;y+=l.distanceTo(c),y+=c.distanceTo(f),y+=f.distanceTo(d);let A=Math.min(.5,1/(y/e));for(let _=A;_<1;_+=A){let C=3*(c.x-l.x),F=3*(f.x-c.x)-C,N=d.x-l.x-C-F,M=3*(c.y-l.y),R=3*(f.y-c.y)-M,q=d.y-l.y-M-R,z=N*Math.pow(_,3)+F*Math.pow(_,2)+C*_+l.x,w=q*Math.pow(_,3)+R*Math.pow(_,2)+M*_+l.y;n.push({x:Math.round(z),y:Math.round(w),a:0,l:0})}}return n.unshift({x:a[0].x,y:a[0].y,a:0,l:0}),n.push({x:a[a.length-1].x,y:a[a.length-1].y,a:0,l:0}),n}static getClothoidLength(t){let e=0;if(t.length>2)for(let n=0;n<t.length;n++){let a=Math.max(0,n-1);n>0&&(e+=this.getDistance(t[a],t[a+1]))}return e}static getCircleCenterByChord(t,e,n,a=!0,u=new Y){const l=this.getDistance(t,e);if(l===0)return u.x=1/0,u.y=1/0,u;yo.set((t.x+e.x)/2,(t.y+e.y)/2);const c=Math.sqrt(n*n-l*l/4),f=a?-1:1;return u.x=yo.x+f*c*(e.y-t.y)/l,u.y=yo.y-f*c*(e.x-t.x)/l,u}static isPointInCircle(t,e,n){return this.getDistance(n,t)<e}static isPointInPolygonByRay(t,e){let n=0;const a=new Y().copy(t),u=new Y,l=new Y;for(let c=0;c<e.length;c++){c===e.length-1?(u.copy(e[c]),l.copy(e[0])):(u.copy(e[c]),l.copy(e[c+1]));let f=[u.y,l.y].sort((d,y)=>d-y);f[0]<a.y&&f[1]>a.y&&(u.x<a.x||l.x<a.x)&&n++}return n%2===1}static whichSideOfSegment(t,e,n){return(e.x-t.x)*(n.y-t.y)-(n.x-t.x)*(e.y-t.y)}static getIntersectionOfSegments(t,e,n,a,u=!1,l=new Y){const c=(a.y-n.y)*(e.x-t.x)-(a.x-n.x)*(e.y-t.y);if(c===0)return l.makeEmpty();const f=(a.x-n.x)*(t.y-n.y)-(a.y-n.y)*(t.x-n.x),d=(e.x-t.x)*(t.y-n.y)-(e.y-t.y)*(t.x-n.x),y=f/c,A=d/c;return u&&(y<0||y>1||A<0||A>1)?l.makeEmpty():(l.x=t.x+y*(e.x-t.x),l.y=t.y+y*(e.y-t.y),l)}static getConvexHullByGrahamScan(t,e=!1,n=[]){if(!t||!t.length)return n;const a=t.length;let u=0;for(let f=0;f<a;f++)t[f].x<t[u].x&&(u=f);let l=u,c;do{n.push(t[l]),c=(l+1)%a;for(let f=0;f<a;f++)this.whichSideOfSegment(t[l],t[f],t[c])>0&&(c=f);l=c}while(l!==u);return e&&n.push(t[u]),n}static getPointsWithMatrix3(t,e){const n=[];if(!t)return n;for(let a=0,u=t.length;a<u;a++)n.push({x:e.elements[0]*t[a].x+e.elements[3]*t[a].y+e.elements[6],y:e.elements[1]*t[a].x+e.elements[4]*t[a].y+e.elements[7]});return n}static getPointsApplyMatrix3(t,e=[]){for(let n=0,a=e.length;n<a;n++){const u=t.elements[0]*e[n].x+t.elements[3]*e[n].y+t.elements[6],l=t.elements[1]*e[n].x+t.elements[4]*e[n].y+t.elements[7];e[n].x=u,e[n].y=l}return e}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}applyMatrix3(t){const e=this.x,n=this.y,a=t.elements;return this.x=a[0]*e+a[3]*n+a[6],this.y=a[1]*e+a[4]*n+a[7],this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}ceilToZero(){return this.x=this.x<0?Math.floor(this.x):Math.ceil(this.x),this.y=this.y<0?Math.floor(this.y):Math.ceil(this.y),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this}clone(){return new Y(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}cross(t){return this.x*t.y-this.y*t.x}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y;return e*e+n*n}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}dot(t){return this.x*t.x+this.y*t.y}equals(t,e=!0){return e?t.x===this.x&&t.y===this.y:Math.abs(t.x-this.x)<Number.EPSILON&&Math.abs(t.y-this.y)<Number.EPSILON}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}floorToZero(){return this.roundToZero()}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("out of range: "+t)}}identity(){return this.set(0,0)}isEmpty(){return!Number.isFinite(this.x)&&!Number.isFinite(this.y)}isZero(){return this.x===0&&this.y===0}length(){return Math.sqrt(this.dot(this))}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this}makeEmpty(){return this.x=1/0,this.y=1/0,this}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}maxXY(t,e){return this.x=Math.max(this.x,t),this.y=Math.max(this.y,e),this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}minXY(t,e){return this.x=Math.min(this.x,t),this.y=Math.min(this.y,e),this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t,e){return this.x*=t,this.y*=e||t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this}negate(){return this.x=-this.x,this.y=-this.y,this}normalize(){return this.divideScalar(this.length()||1)}project(t){return this.applyMatrix3(t.matrixWorldInverse).applyMatrix3(t.projectionMatrix)}random(){return this.x=Math.random(),this.y=Math.random(),this}rotate(t){const e=Math.cos(t),n=Math.sin(t),a=this.x,u=this.y;return this.x=a*e-u*n,this.y=a*n+u*e,this}rotateAround(t,e){const n=Math.cos(e),a=Math.sin(e),u=this.x-t.x,l=this.y-t.y;return this.x=u*n-l*a+t.x,this.y=u*a+l*n+t.y,this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){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}set(t,e){return this.x=t,this.y=e,this}setComponent(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("out of range: "+t)}return this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,e*3)}setLength(t){return this.normalize().multiplyScalar(t)}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}toString(){return`{"x":${this.x},"y":${this.y}}`}unproject(t,e=!1){return this.applyMatrix3(t.projectionMatrixInverse).applyMatrix3(t.matrixWorld)}validate(){return!(isNaN(this.x)||isNaN(this.y))}*[Symbol.iterator](){yield this.x,yield this.y}}const yo=new Y,Fg=Object.freeze(Object.defineProperty({__proto__:null,default:Y},Symbol.toStringTag,{value:"Module"}));var Wa={exports:{}};/**
4
+ `)}function mc(r){this.options=r||{locator:{}}}mc.prototype.parseFromString=function(r,t){var e=this.options,i=new $g,a=e.domBuilder||new Ys,u=e.errorHandler,l=e.locator,c=e.xmlns||{},f=/\/x?html?$/.test(t),d=f?pc.HTML_ENTITIES:pc.XML_ENTITIES;l&&a.setDocumentLocator(l),i.errorHandler=Gg(u,a,l),i.domBuilder=e.domBuilder||a,f&&(c[""]=gc.HTML),c.xml=c.xml||gc.XML;var g=e.normalizeLineEndings||yc;return r&&typeof r=="string"?i.parse(g(r),c,d):i.errorHandler.error("invalid doc source"),a.doc};function Gg(r,t,e){if(!r){if(t instanceof Ys)return t;r=t}var i={},a=r instanceof Function;e=e||{};function u(l){var c=r[l];!c&&a&&(c=r.length==2?function(f){r(l,f)}:r),i[l]=c&&function(f){c("[xmldom "+l+"] "+f+_o(e))}||function(){}}return u("warning"),u("error"),u("fatalError"),i}function Ys(){this.cdata=!1}function rs(r,t){t.lineNumber=r.lineNumber,t.columnNumber=r.columnNumber}Ys.prototype={startDocument:function(){this.doc=new Vg().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(r,t,e,i){var a=this.doc,u=a.createElementNS(r,e||t),l=i.length;Za(this,u),this.currentElement=u,this.locator&&rs(this.locator,u);for(var c=0;c<l;c++){var r=i.getURI(c),f=i.getValue(c),e=i.getQName(c),d=a.createAttributeNS(r,e);this.locator&&rs(i.getLocator(c),d),d.value=d.nodeValue=f,u.setAttributeNode(d)}},endElement:function(r,t,e){var i=this.currentElement;i.tagName,this.currentElement=i.parentNode},startPrefixMapping:function(r,t){},endPrefixMapping:function(r){},processingInstruction:function(r,t){var e=this.doc.createProcessingInstruction(r,t);this.locator&&rs(this.locator,e),Za(this,e)},ignorableWhitespace:function(r,t,e){},characters:function(r,t,e){if(r=vc.apply(this,arguments),r){if(this.cdata)var i=this.doc.createCDATASection(r);else var i=this.doc.createTextNode(r);this.currentElement?this.currentElement.appendChild(i):/^\s*$/.test(r)&&this.doc.appendChild(i),this.locator&&rs(this.locator,i)}},skippedEntity:function(r){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(r){(this.locator=r)&&(r.lineNumber=0)},comment:function(r,t,e){r=vc.apply(this,arguments);var i=this.doc.createComment(r);this.locator&&rs(this.locator,i),Za(this,i)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(r,t,e){var i=this.doc.implementation;if(i&&i.createDocumentType){var a=i.createDocumentType(r,t,e);this.locator&&rs(this.locator,a),Za(this,a),this.doc.doctype=a}},warning:function(r){console.warn("[xmldom warning] "+r,_o(this.locator))},error:function(r){console.error("[xmldom error] "+r,_o(this.locator))},fatalError:function(r){throw new zg(r,this.locator)}};function _o(r){if(r)return`
5
+ @`+(r.systemId||"")+"#[line:"+r.lineNumber+",col:"+r.columnNumber+"]"}function vc(r,t,e){return typeof r=="string"?r.substr(t,e):r.length>=t+e||t?new java.lang.String(r,t,e)+"":r}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(r){Ys.prototype[r]=function(){return null}});function Za(r,t){r.currentElement?r.currentElement.appendChild(t):r.doc.appendChild(t)}Ya.__DOMHandler=Ys,Ya.normalizeLineEndings=yc,Ya.DOMParser=mc;var Yg=Ya.DOMParser;const Xg="1.0.53";function Zg(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const is=typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{document:void 0,tinyEngine:void 0};is.Path2D||gg(is),is.DOMParser||(is.DOMParser=Yg);const Pt={window:is,version:Xg,isBrowser:Zg(),dpr:typeof window<"u"&&window.devicePixelRatio||1,document:is.document,time:0,deltaTime:0,config:Yn},Xs=(r,t,e)=>Math.max(t,Math.min(e,r)),xc=(r,t=1e-6)=>Math.abs(r)<t?0:r<0?-1:1,Qg=r=>r*(Math.PI/180),Kg=(r,t)=>(r%t+t)%t,Co=(r,t,e)=>(1-e)*r+e*t,jg=r=>{let t=r*(180/Math.PI);return t<0&&(t+=360),t>360&&(t-=360),t},zt={transparent:"rgba(1, 1, 1, 0)",green:"#45b787",darkGreen:"#314a43",blue:"#6e9bc5",darkBlue:"#2775b6",red:"#F26666",darkRed:"#D95970",brown:"#ECD2B9",darkBrown:"#BF9D8A",yellow:"#ECDEC0",darkYellow:"#D0AC57",lightGray:"#e0e0e0",gray:"#beb6b6",darkGray:"#918883",white:"#F2F2F2",darkWhite:"#ececec",lightBlack:"#2E3032",black:"#182327",blackAlpha5:"rgba(0, 0, 0, 0.5)"},Jg={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Ir={h:0,s:0,l:0},Qa={h:0,s:0,l:0};function Do(r,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?r+(t-r)*6*e:e<1/2?t:e<2/3?r+(t-r)*6*(2/3-e):r}const t0=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}|[A-Fa-f0-9]{8})$|rgb\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)|rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*[\d.]+\s*\)/;class qt{isColor=!0;r=1;g=1;b=1;a=1;constructor(t,e,i,a){return e===void 0&&i===void 0?this.set(t):this.setRGBA(t,e,i,a)}static isColor(t){return typeof t=="string"?t0.test(t):typeof t=="number"?t>=0&&t<=16777215:!1}static getRandomStyle(){return mi.random().getStyle()}static getDarken(t,e=.8){return mi.set(t).getHSL(Ka),mi.setHSL(Ka.h,Ka.s,Ka.l*e).getStyle()}static getLighten(t,e=1.2){return this.getDarken(t,e)}static getContrast(t){return mi.set(t),mi.getContrastString()}static getArray(t){return mi.set(t).toArray()}static getComplementary(t){return mi.set(t),mi.getComplementaryString()}static getMoreTransparent(t,e){return mi.set(t).setA(e).getStyle()}set(t){return t&&t.isColor?this.copy(t):typeof t=="number"?this.setHex(t):typeof t=="string"&&this.setStyle(t),this}random(){return this.setHex(Math.floor(Math.random()*(1<<24)))}setScalar(t){return this.r=t,this.g=t,this.b=t,this.a=1,this}setHex(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,this.a=1,this}setR(t){return this.r=t,this}setG(t){return this.g=t,this}setB(t){return this.b=t,this}setA(t){return this.a=t,this}setRGB(t,e,i){return this.setRGBA(t,e,i,this.a)}setRGBA(t,e,i,a=1){return this.r=t,this.g=e,this.b=i,this.a=a,this}setHSL(t,e,i,a=1){if(t=Kg(t,1),e=Xs(e,0,1),i=Xs(i,0,1),e===0)this.r=this.g=this.b=i;else{const u=i<=.5?i*(1+e):i+e-i*e,l=2*i-u;this.r=Do(l,u,t+1/3),this.g=Do(l,u,t),this.b=Do(l,u,t-1/3)}return this.a=a,this}setStyle(t){let e;if(e=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(t)){let i;const a=e[1],u=e[2];switch(a){case"rgb":case"rgba":if(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(u))return this.r=Math.min(255,parseInt(i[1],10))/255,this.g=Math.min(255,parseInt(i[2],10))/255,this.b=Math.min(255,parseInt(i[3],10))/255,this.a=Math.max(Math.min(1,i[4]!==void 0?parseFloat(i[4]):1),0),this;if(i=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(u))return this.r=Math.min(100,parseInt(i[1],10))/100,this.g=Math.min(100,parseInt(i[2],10))/100,this.b=Math.min(100,parseInt(i[3],10))/100,this.a=Math.max(Math.min(1,i[4]!==void 0?parseFloat(i[4]):1),0),this;break;case"hsl":case"hsla":if(i=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(u)){const l=parseFloat(i[1])/360,c=parseInt(i[2],10)/100,f=parseInt(i[3],10)/100,d=Math.max(Math.min(1,i[4]!==void 0?parseFloat(i[4]):1),0);return this.setHSL(l,c,f,d)}break}}else if(e=/^\#([A-Fa-f\d]+)$/.exec(t)){const i=e[1],a=i.length;if(a===3)return this.r=parseInt(i.charAt(0)+i.charAt(0),16)/255,this.g=parseInt(i.charAt(1)+i.charAt(1),16)/255,this.b=parseInt(i.charAt(2)+i.charAt(2),16)/255,this.a=1,this;if(a===6)return this.r=parseInt(i.charAt(0)+i.charAt(1),16)/255,this.g=parseInt(i.charAt(2)+i.charAt(3),16)/255,this.b=parseInt(i.charAt(4)+i.charAt(5),16)/255,this.a=1,this}return t&&t.length>0?this.setColorName(t):this}setColorName(t){const e=Jg[t.toLowerCase()];return e!==void 0?this.setHex(e):console.warn("Color: Unknown color "+t),this}clone(){return new qt(this.r,this.g,this.b,this.a)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this}getRGB(t=new qt){return t.setRGB(this.r,this.g,this.b)}getRGBByBg(t=new qt){const e=this.a,i=e*this.r+(1-e)*t.r,a=e*this.g+(1-e)*t.g,u=e*this.b+(1-e)*t.b;return new qt(i,a,u)}getHex(){return Xs(this.r*255,0,255)<<16^Xs(this.g*255,0,255)<<8^Xs(this.b*255,0,255)<<0}getHSL(t){const e=this.r,i=this.g,a=this.b,u=Math.max(e,i,a),l=Math.min(e,i,a);let c=0,f;const d=(l+u)/2;if(l===u)c=0,f=0;else{const g=u-l;switch(f=d<=.5?g/(u+l):g/(2-u-l),u){case e:c=(i-a)/g+(i<a?6:0);break;case i:c=(a-e)/g+2;break;case a:c=(e-i)/g+4;break}c/=6}return t.h=c,t.s=f,t.l=d,t}getStyle(){return this.a===1?`rgb(${this.r*255|0},${this.g*255|0},${this.b*255|0})`:`rgba(${this.r*255|0},${this.g*255|0},${this.b*255|0},${this.a||1})`}getHexString(){return"#"+("000000"+this.getHex().toString(16)).slice(-6)}getBrightness(){let t=(this.r*255*299+this.g*255*587+this.b*255*144)/1e3;return t+=(255-t)*(255-this.a*255)/255,t}getContrastString(){return this.getBrightness()>125?"#2f2f2f":"#f2f2f2"}getComplementary(t=new qt){const e=this.toArray(),i=[0,0,0,1];for(let a=0;a<e.length;a++)if(a<3)i[a]=1-e[a];else if(a===3)e[a]>1||e[a]<=0?i[a]=1:i[a]=Math.max(Math.min(parseFloat(e[a].toFixed(2)),1),0);else continue;return t.setRGBA(i[0],i[1],i[2],parseFloat(i[3].toFixed(2)))}getComplementaryString(){return this.getComplementary().getStyle()}getLightenOrDarken(t){if(typeof t>"u"||t>=1)return this.getHexString();const e=this.getRGBByBg(),i=e.r*t+(1-t),a=e.g*t+(1-t),u=e.b*t+(1-t);return new qt(i,a,u).getHexString()}getNormalized(){return[parseFloat(Math.max(Math.min(this.r,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.g,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.b,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.a,1),0).toFixed(2))]}getNormalized3(){return[parseFloat(Math.max(Math.min(this.r,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.g,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.b,1),0).toFixed(2))]}offsetHSL(t,e,i){return this.getHSL(Ir),Ir.h+=t,Ir.s+=e,Ir.l+=i,this.setHSL(Ir.h,Ir.s,Ir.l),this}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this}multiply(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this}lerpColors(t,e,i){return this.r=t.r+(e.r-t.r)*i,this.g=t.g+(e.g-t.g)*i,this.b=t.b+(e.b-t.b)*i,this}lerpHSL(t,e){this.getHSL(Ir),t.getHSL(Qa);const i=Co(Ir.h,Qa.h,e),a=Co(Ir.s,Qa.s,e),u=Co(Ir.l,Qa.l,e);return this.setHSL(i,a,u),this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this.a=t[e+3],this}toArray(t=[0,0,0,0],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t[e+3]=this.a,t}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),t.normalized===!0&&(this.r/=255,this.g/=255,this.b/=255),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const mi=new qt,Ka={h:0,s:0,l:0};class F{isVector2=!0;x=0;y=0;z;constructor(t=0,e=0,i){this.x=t,this.y=e,this.z=i||0}static isZero(t){return t.x===0&&t.y===0}static isEmpty(t){return!Number.isFinite(t.x)&&!Number.isFinite(t.y)}static equals(t,e,i=!0){return i?t.x===e.x&&t.y===e.y:Math.abs(t.x-e.x)<Number.EPSILON&&Math.abs(t.y-e.y)<Number.EPSILON}static getInt32Array(t,e=2){const i=new ArrayBuffer(t.length*e*4),a=new Int32Array(i);for(let u=0,l=t.length;u<l;u++)a[u*2]=t[u].x,a[u*2+1]=t[u].y;return a}static getFloat64Array(t,e=2){const i=new ArrayBuffer(t.length*e*8),a=new Float64Array(i);for(let u=0,l=t.length;u<l;u++)a[u*2]=t[u].x,a[u*2+1]=t[u].y;return a}static getVectors(t){const e=[];for(let i=0,a=t.length;i<a;i++)e.push(new F(t[i].x,t[i].y));return e}static getStrings(t){const e=[];if(!t||!t.length)return"";for(let i=0,a=t.length;i<a;i++)e.push(F.getString(t[i]));return e.join(",")}static getString(t){return`${t.x},${t.y}`}static getLength(t){return Math.sqrt(t.x*t.x+t.y*t.y)}static getDistance(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}static dot(t,e){return t.x*e.x+t.y*e.y}static cross(t,e){return t.x*e.y-t.y*e.x}static sub(t,e){return new F().subVectors(t,e)}static isPointOnSegment(t,e,i){return xc(this.sub(t,i).cross(this.sub(e,i)))===0&&xc(this.sub(t,i).dot(this.sub(e,i)))<=0}static angle(t,e,i){return i?Math.atan2(t.y-e.y,t.x-e.x):jg(Math.atan2(t.y-e.y,t.x-e.x))}static getSamplingPoints(t,e=100){let i=this.getClothoidPoints(t,e),a=0;for(let u=0,l=i.length;u<l;u++){let c=Math.max(0,u-1);u>0?a+=this.getDistance(i[c],i[c+1]):a=0,i[u].l=Math.round(a);let f=this.angle(i[c+1],i[c]);i[u].a=Math.round(f*100)/100}return i}static getClothoidPoints(t,e=100){let i=[],a=t.concat([]);if(!a||a.length<2)return i;a.length===2?(a.push(a[1]),a.unshift(a[0])):a.length===3&&a.splice(2,0,a[1]);for(let u=0;u<a.length-3;u+=3){let l=new F(a[u].x,a[u].y),c=new F(a[u+1].x,a[u+1].y),f=new F(a[u+2].x,a[u+2].y),d=new F(a[u+3].x,a[u+3].y),g=0;g+=l.distanceTo(c),g+=c.distanceTo(f),g+=f.distanceTo(d);let E=Math.min(.5,1/(g/e));for(let T=E;T<1;T+=E){let C=3*(c.x-l.x),L=3*(f.x-c.x)-C,N=d.x-l.x-C-L,M=3*(c.y-l.y),R=3*(f.y-c.y)-M,W=d.y-l.y-M-R,G=N*Math.pow(T,3)+L*Math.pow(T,2)+C*T+l.x,b=W*Math.pow(T,3)+R*Math.pow(T,2)+M*T+l.y;i.push({x:Math.round(G),y:Math.round(b),a:0,l:0})}}return i.unshift({x:a[0].x,y:a[0].y,a:0,l:0}),i.push({x:a[a.length-1].x,y:a[a.length-1].y,a:0,l:0}),i}static getClothoidLength(t){let e=0;if(t.length>2)for(let i=0;i<t.length;i++){let a=Math.max(0,i-1);i>0&&(e+=this.getDistance(t[a],t[a+1]))}return e}static getCircleCenterByChord(t,e,i,a=!0,u=new F){const l=this.getDistance(t,e);if(l===0)return u.x=1/0,u.y=1/0,u;So.set((t.x+e.x)/2,(t.y+e.y)/2);const c=Math.sqrt(i*i-l*l/4),f=a?-1:1;return u.x=So.x+f*c*(e.y-t.y)/l,u.y=So.y-f*c*(e.x-t.x)/l,u}static isPointInCircle(t,e,i){return this.getDistance(i,t)<e}static isPointInPolygonByRay(t,e){let i=0;const a=new F().copy(t),u=new F,l=new F;for(let c=0;c<e.length;c++){c===e.length-1?(u.copy(e[c]),l.copy(e[0])):(u.copy(e[c]),l.copy(e[c+1]));let f=[u.y,l.y].sort((d,g)=>d-g);f[0]<a.y&&f[1]>a.y&&(u.x<a.x||l.x<a.x)&&i++}return i%2===1}static whichSideOfSegment(t,e,i){return(e.x-t.x)*(i.y-t.y)-(i.x-t.x)*(e.y-t.y)}static getIntersectionOfSegments(t,e,i,a,u=!1,l=new F){const c=(a.y-i.y)*(e.x-t.x)-(a.x-i.x)*(e.y-t.y);if(c===0)return l.makeEmpty();const f=(a.x-i.x)*(t.y-i.y)-(a.y-i.y)*(t.x-i.x),d=(e.x-t.x)*(t.y-i.y)-(e.y-t.y)*(t.x-i.x),g=f/c,E=d/c;return u&&(g<0||g>1||E<0||E>1)?l.makeEmpty():(l.x=t.x+g*(e.x-t.x),l.y=t.y+g*(e.y-t.y),l)}static getConvexHullByGrahamScan(t,e=!1,i=[]){if(!t||!t.length)return i;const a=t.length;let u=0;for(let f=0;f<a;f++)t[f].x<t[u].x&&(u=f);let l=u,c;do{i.push(t[l]),c=(l+1)%a;for(let f=0;f<a;f++)this.whichSideOfSegment(t[l],t[f],t[c])>0&&(c=f);l=c}while(l!==u);return e&&i.push(t[u]),i}static getPointsWithMatrix3(t,e){const i=[];if(!t)return i;for(let a=0,u=t.length;a<u;a++)i.push({x:e.elements[0]*t[a].x+e.elements[3]*t[a].y+e.elements[6],y:e.elements[1]*t[a].x+e.elements[4]*t[a].y+e.elements[7]});return i}static getPointsApplyMatrix3(t,e=[]){for(let i=0,a=e.length;i<a;i++){const u=t.elements[0]*e[i].x+t.elements[3]*e[i].y+t.elements[6],l=t.elements[1]*e[i].x+t.elements[4]*e[i].y+t.elements[7];e[i].x=u,e[i].y=l}return e}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}applyMatrix3(t){const e=this.x,i=this.y,a=t.elements;return this.x=a[0]*e+a[3]*i+a[6],this.y=a[1]*e+a[4]*i+a[7],this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}ceilToZero(){return this.x=this.x<0?Math.floor(this.x):Math.ceil(this.x),this.y=this.y<0?Math.floor(this.y):Math.ceil(this.y),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this}clampLength(t,e){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this}clone(){return new F(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}cross(t){return this.x*t.y-this.y*t.x}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,i=this.y-t.y;return e*e+i*i}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}dot(t){return this.x*t.x+this.y*t.y}equals(t,e=!0){return e?t.x===this.x&&t.y===this.y:Math.abs(t.x-this.x)<Number.EPSILON&&Math.abs(t.y-this.y)<Number.EPSILON}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}floorToZero(){return this.roundToZero()}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("out of range: "+t)}}identity(){return this.set(0,0)}isEmpty(){return!Number.isFinite(this.x)&&!Number.isFinite(this.y)}isZero(){return this.x===0&&this.y===0}length(){return Math.sqrt(this.dot(this))}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this}makeEmpty(){return this.x=1/0,this.y=1/0,this}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}maxXY(t,e){return this.x=Math.max(this.x,t),this.y=Math.max(this.y,e),this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}minXY(t,e){return this.x=Math.min(this.x,t),this.y=Math.min(this.y,e),this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t,e){return this.x*=t,this.y*=e||t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this}negate(){return this.x=-this.x,this.y=-this.y,this}normalize(){return this.divideScalar(this.length()||1)}project(t){return this.applyMatrix3(t.matrixWorldInverse).applyMatrix3(t.projectionMatrix)}random(){return this.x=Math.random(),this.y=Math.random(),this}rotate(t){const e=Math.cos(t),i=Math.sin(t),a=this.x,u=this.y;return this.x=a*e-u*i,this.y=a*i+u*e,this}rotateAround(t,e){const i=Math.cos(e),a=Math.sin(e),u=this.x-t.x,l=this.y-t.y;return this.x=u*i-l*a+t.x,this.y=u*a+l*i+t.y,this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){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}set(t,e){return this.x=t,this.y=e,this}setComponent(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("out of range: "+t)}return this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,e*3)}setLength(t){return this.normalize().multiplyScalar(t)}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}toString(){return`{"x":${this.x},"y":${this.y}}`}unproject(t,e=!1){return this.applyMatrix3(t.projectionMatrixInverse).applyMatrix3(t.matrixWorld)}validate(){return!(isNaN(this.x)||isNaN(this.y))}*[Symbol.iterator](){yield this.x,yield this.y}}const So=new F,e0=Object.freeze(Object.defineProperty({__proto__:null,default:F},Symbol.toStringTag,{value:"Module"}));var ja={exports:{}};/**
6
6
  * @license
7
7
  * Lodash <https://lodash.com/>
8
8
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
9
9
  * Released under MIT license <https://lodash.com/license>
10
10
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
11
11
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
12
- */Wa.exports,function(r,t){(function(){var e,n="4.17.21",a=200,u="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",c="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",d=500,y="__lodash_placeholder__",A=1,_=2,C=4,F=1,N=2,M=1,R=2,q=4,z=8,w=16,L=32,U=64,j=128,tt=256,Z=512,rt=30,J="...",st=800,ht=16,ct=1,ft=2,O=3,yt=1/0,Bt=9007199254740991,Re=17976931348623157e292,be=NaN,se=4294967295,ve=se-1,qr=se>>>1,Le=[["ary",j],["bind",M],["bindKey",R],["curry",z],["curryRight",w],["flip",Z],["partial",L],["partialRight",U],["rearg",tt]],ae="[object Arguments]",Se="[object Array]",Vt="[object AsyncFunction]",Gt="[object Boolean]",Ct="[object Date]",Ht="[object DOMException]",Oe="[object Error]",Pe="[object Function]",ze="[object GeneratorFunction]",Qt="[object Map]",Ne="[object Number]",me="[object Null]",Yt="[object Object]",ii="[object Promise]",Ai="[object Proxy]",ue="[object RegExp]",Dt="[object Set]",nr="[object String]",Ge="[object Symbol]",bi="[object Undefined]",mr="[object WeakMap]",Gi="[object WeakSet]",sr="[object ArrayBuffer]",Ye="[object DataView]",Yi="[object Float32Array]",Xi="[object Float64Array]",ni="[object Int8Array]",wi="[object Int16Array]",bn="[object Int32Array]",P="[object Uint8Array]",it="[object Uint8ClampedArray]",at="[object Uint16Array]",wt="[object Uint32Array]",vt=/\b__p \+= '';/g,fe=/\b(__p \+=) '' \+/g,Me=/(__e\(.*?\)|\b__t\)) \+\n'';/g,xr=/&(?:amp|lt|gt|quot|#39);/g,Zi=/[&<>"']/g,ar=RegExp(xr.source),wn=RegExp(Zi.source),Qi=/<%-([\s\S]+?)%>/g,si=/<%([\s\S]+?)%>/g,Tn=/<%=([\s\S]+?)%>/g,_n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ji=/^\w*$/,el=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ki=/[\\^$.*+?()[\]{}|]/g,rl=RegExp(Ki.source),la=/^\s+/,su=/\s/,ha=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,il=/\{\n\/\* \[wrapped with (.+)\] \*/,au=/,? & /,nl=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,uu=/[()=,{}\[\]\/\s]/,ou=/\\(\\)?/g,lu=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ca=/\w*$/,fa=/^[-+]0x[0-9a-f]+$/i,Ti=/^0b[01]+$/i,Cn=/^\[object .+?Constructor\]$/,Dn=/^0o[0-7]+$/i,os=/^(?:0|[1-9]\d*)$/,pa=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ls=/($^)/,sl=/['\n\r\u2028\u2029\\]/g,_i="\\ud800-\\udfff",Xe="\\u0300-\\u036f",Ji="\\ufe20-\\ufe2f",ai="\\u20d0-\\u20ff",Er=Xe+Ji+ai,tn="\\u2700-\\u27bf",ur="a-z\\xdf-\\xf6\\xf8-\\xff",Wr="\\xac\\xb1\\xd7\\xf7",hu="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",cu="\\u2000-\\u206f",hs=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ze="A-Z\\xc0-\\xd6\\xd8-\\xde",Sn="\\ufe0e\\ufe0f",cs=Wr+hu+cu+hs,On="['’]",da="["+_i+"]",fs="["+cs+"]",Ci="["+Er+"]",Vr="\\d+",al="["+tn+"]",ga="["+ur+"]",ps="[^"+_i+cs+Vr+tn+ur+Ze+"]",ds="\\ud83c[\\udffb-\\udfff]",ul="(?:"+Ci+"|"+ds+")",fu="[^"+_i+"]",g="(?:\\ud83c[\\udde6-\\uddff]){2}",x="[\\ud800-\\udbff][\\udc00-\\udfff]",b="["+Ze+"]",B="\\u200d",G="(?:"+ga+"|"+ps+")",K="(?:"+b+"|"+ps+")",mt="(?:"+On+"(?:d|ll|m|re|s|t|ve))?",Jt="(?:"+On+"(?:D|LL|M|RE|S|T|VE))?",oe=ul+"?",xe="["+Sn+"]?",Ar="(?:"+B+"(?:"+[fu,g,x].join("|")+")"+xe+oe+")*",dv="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",gv="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Vf=xe+oe+Ar,yv="(?:"+[al,g,x].join("|")+")"+Vf,vv="(?:"+[fu+Ci+"?",Ci,g,x,da].join("|")+")",mv=RegExp(On,"g"),xv=RegExp(Ci,"g"),ol=RegExp(ds+"(?="+ds+")|"+vv+Vf,"g"),Ev=RegExp([b+"?"+ga+"+"+mt+"(?="+[fs,b,"$"].join("|")+")",K+"+"+Jt+"(?="+[fs,b+G,"$"].join("|")+")",b+"?"+G+"+"+mt,b+"+"+Jt,gv,dv,Vr,yv].join("|"),"g"),Av=RegExp("["+B+_i+Er+Sn+"]"),bv=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,wv=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Tv=-1,qt={};qt[Yi]=qt[Xi]=qt[ni]=qt[wi]=qt[bn]=qt[P]=qt[it]=qt[at]=qt[wt]=!0,qt[ae]=qt[Se]=qt[sr]=qt[Gt]=qt[Ye]=qt[Ct]=qt[Oe]=qt[Pe]=qt[Qt]=qt[Ne]=qt[Yt]=qt[ue]=qt[Dt]=qt[nr]=qt[mr]=!1;var Ut={};Ut[ae]=Ut[Se]=Ut[sr]=Ut[Ye]=Ut[Gt]=Ut[Ct]=Ut[Yi]=Ut[Xi]=Ut[ni]=Ut[wi]=Ut[bn]=Ut[Qt]=Ut[Ne]=Ut[Yt]=Ut[ue]=Ut[Dt]=Ut[nr]=Ut[Ge]=Ut[P]=Ut[it]=Ut[at]=Ut[wt]=!0,Ut[Oe]=Ut[Pe]=Ut[mr]=!1;var _v={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Cv={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Dv={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Sv={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ov=parseFloat,Nv=parseInt,$f=typeof Os=="object"&&Os&&Os.Object===Object&&Os,Mv=typeof self=="object"&&self&&self.Object===Object&&self,we=$f||Mv||Function("return this")(),ll=t&&!t.nodeType&&t,Nn=ll&&!0&&r&&!r.nodeType&&r,zf=Nn&&Nn.exports===ll,hl=zf&&$f.process,br=function(){try{var D=Nn&&Nn.require&&Nn.require("util").types;return D||hl&&hl.binding&&hl.binding("util")}catch{}}(),Gf=br&&br.isArrayBuffer,Yf=br&&br.isDate,Xf=br&&br.isMap,Zf=br&&br.isRegExp,Qf=br&&br.isSet,jf=br&&br.isTypedArray;function or(D,k,I){switch(I.length){case 0:return D.call(k);case 1:return D.call(k,I[0]);case 2:return D.call(k,I[0],I[1]);case 3:return D.call(k,I[0],I[1],I[2])}return D.apply(k,I)}function Bv(D,k,I,et){for(var pt=-1,Nt=D==null?0:D.length;++pt<Nt;){var pe=D[pt];k(et,pe,I(pe),D)}return et}function wr(D,k){for(var I=-1,et=D==null?0:D.length;++I<et&&k(D[I],I,D)!==!1;);return D}function Iv(D,k){for(var I=D==null?0:D.length;I--&&k(D[I],I,D)!==!1;);return D}function Kf(D,k){for(var I=-1,et=D==null?0:D.length;++I<et;)if(!k(D[I],I,D))return!1;return!0}function en(D,k){for(var I=-1,et=D==null?0:D.length,pt=0,Nt=[];++I<et;){var pe=D[I];k(pe,I,D)&&(Nt[pt++]=pe)}return Nt}function pu(D,k){var I=D==null?0:D.length;return!!I&&gs(D,k,0)>-1}function cl(D,k,I){for(var et=-1,pt=D==null?0:D.length;++et<pt;)if(I(k,D[et]))return!0;return!1}function $t(D,k){for(var I=-1,et=D==null?0:D.length,pt=Array(et);++I<et;)pt[I]=k(D[I],I,D);return pt}function rn(D,k){for(var I=-1,et=k.length,pt=D.length;++I<et;)D[pt+I]=k[I];return D}function fl(D,k,I,et){var pt=-1,Nt=D==null?0:D.length;for(et&&Nt&&(I=D[++pt]);++pt<Nt;)I=k(I,D[pt],pt,D);return I}function Rv(D,k,I,et){var pt=D==null?0:D.length;for(et&&pt&&(I=D[--pt]);pt--;)I=k(I,D[pt],pt,D);return I}function pl(D,k){for(var I=-1,et=D==null?0:D.length;++I<et;)if(k(D[I],I,D))return!0;return!1}var Lv=dl("length");function Pv(D){return D.split("")}function Fv(D){return D.match(nl)||[]}function Jf(D,k,I){var et;return I(D,function(pt,Nt,pe){if(k(pt,Nt,pe))return et=Nt,!1}),et}function du(D,k,I,et){for(var pt=D.length,Nt=I+(et?1:-1);et?Nt--:++Nt<pt;)if(k(D[Nt],Nt,D))return Nt;return-1}function gs(D,k,I){return k===k?Zv(D,k,I):du(D,tp,I)}function kv(D,k,I,et){for(var pt=I-1,Nt=D.length;++pt<Nt;)if(et(D[pt],k))return pt;return-1}function tp(D){return D!==D}function ep(D,k){var I=D==null?0:D.length;return I?yl(D,k)/I:be}function dl(D){return function(k){return k==null?e:k[D]}}function gl(D){return function(k){return D==null?e:D[k]}}function rp(D,k,I,et,pt){return pt(D,function(Nt,pe,kt){I=et?(et=!1,Nt):k(I,Nt,pe,kt)}),I}function Uv(D,k){var I=D.length;for(D.sort(k);I--;)D[I]=D[I].value;return D}function yl(D,k){for(var I,et=-1,pt=D.length;++et<pt;){var Nt=k(D[et]);Nt!==e&&(I=I===e?Nt:I+Nt)}return I}function vl(D,k){for(var I=-1,et=Array(D);++I<D;)et[I]=k(I);return et}function Hv(D,k){return $t(k,function(I){return[I,D[I]]})}function ip(D){return D&&D.slice(0,up(D)+1).replace(la,"")}function lr(D){return function(k){return D(k)}}function ml(D,k){return $t(k,function(I){return D[I]})}function ya(D,k){return D.has(k)}function np(D,k){for(var I=-1,et=D.length;++I<et&&gs(k,D[I],0)>-1;);return I}function sp(D,k){for(var I=D.length;I--&&gs(k,D[I],0)>-1;);return I}function qv(D,k){for(var I=D.length,et=0;I--;)D[I]===k&&++et;return et}var Wv=gl(_v),Vv=gl(Cv);function $v(D){return"\\"+Sv[D]}function zv(D,k){return D==null?e:D[k]}function ys(D){return Av.test(D)}function Gv(D){return bv.test(D)}function Yv(D){for(var k,I=[];!(k=D.next()).done;)I.push(k.value);return I}function xl(D){var k=-1,I=Array(D.size);return D.forEach(function(et,pt){I[++k]=[pt,et]}),I}function ap(D,k){return function(I){return D(k(I))}}function nn(D,k){for(var I=-1,et=D.length,pt=0,Nt=[];++I<et;){var pe=D[I];(pe===k||pe===y)&&(D[I]=y,Nt[pt++]=I)}return Nt}function gu(D){var k=-1,I=Array(D.size);return D.forEach(function(et){I[++k]=et}),I}function Xv(D){var k=-1,I=Array(D.size);return D.forEach(function(et){I[++k]=[et,et]}),I}function Zv(D,k,I){for(var et=I-1,pt=D.length;++et<pt;)if(D[et]===k)return et;return-1}function Qv(D,k,I){for(var et=I+1;et--;)if(D[et]===k)return et;return et}function vs(D){return ys(D)?Kv(D):Lv(D)}function $r(D){return ys(D)?Jv(D):Pv(D)}function up(D){for(var k=D.length;k--&&su.test(D.charAt(k)););return k}var jv=gl(Dv);function Kv(D){for(var k=ol.lastIndex=0;ol.test(D);)++k;return k}function Jv(D){return D.match(ol)||[]}function tm(D){return D.match(Ev)||[]}var em=function D(k){k=k==null?we:ms.defaults(we.Object(),k,ms.pick(we,wv));var I=k.Array,et=k.Date,pt=k.Error,Nt=k.Function,pe=k.Math,kt=k.Object,El=k.RegExp,rm=k.String,Tr=k.TypeError,yu=I.prototype,im=Nt.prototype,xs=kt.prototype,vu=k["__core-js_shared__"],mu=im.toString,Lt=xs.hasOwnProperty,nm=0,op=function(){var i=/[^.]+$/.exec(vu&&vu.keys&&vu.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),xu=xs.toString,sm=mu.call(kt),am=we._,um=El("^"+mu.call(Lt).replace(Ki,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Eu=zf?k.Buffer:e,sn=k.Symbol,Au=k.Uint8Array,lp=Eu?Eu.allocUnsafe:e,bu=ap(kt.getPrototypeOf,kt),hp=kt.create,cp=xs.propertyIsEnumerable,wu=yu.splice,fp=sn?sn.isConcatSpreadable:e,va=sn?sn.iterator:e,Mn=sn?sn.toStringTag:e,Tu=function(){try{var i=Pn(kt,"defineProperty");return i({},"",{}),i}catch{}}(),om=k.clearTimeout!==we.clearTimeout&&k.clearTimeout,lm=et&&et.now!==we.Date.now&&et.now,hm=k.setTimeout!==we.setTimeout&&k.setTimeout,_u=pe.ceil,Cu=pe.floor,Al=kt.getOwnPropertySymbols,cm=Eu?Eu.isBuffer:e,pp=k.isFinite,fm=yu.join,pm=ap(kt.keys,kt),de=pe.max,Be=pe.min,dm=et.now,gm=k.parseInt,dp=pe.random,ym=yu.reverse,bl=Pn(k,"DataView"),ma=Pn(k,"Map"),wl=Pn(k,"Promise"),Es=Pn(k,"Set"),xa=Pn(k,"WeakMap"),Ea=Pn(kt,"create"),Du=xa&&new xa,As={},vm=Fn(bl),mm=Fn(ma),xm=Fn(wl),Em=Fn(Es),Am=Fn(xa),Su=sn?sn.prototype:e,Aa=Su?Su.valueOf:e,gp=Su?Su.toString:e;function v(i){if(jt(i)&&!dt(i)&&!(i instanceof bt)){if(i instanceof _r)return i;if(Lt.call(i,"__wrapped__"))return yd(i)}return new _r(i)}var bs=function(){function i(){}return function(s){if(!Xt(s))return{};if(hp)return hp(s);i.prototype=s;var o=new i;return i.prototype=e,o}}();function Ou(){}function _r(i,s){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!s,this.__index__=0,this.__values__=e}v.templateSettings={escape:Qi,evaluate:si,interpolate:Tn,variable:"",imports:{_:v}},v.prototype=Ou.prototype,v.prototype.constructor=v,_r.prototype=bs(Ou.prototype),_r.prototype.constructor=_r;function bt(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=se,this.__views__=[]}function bm(){var i=new bt(this.__wrapped__);return i.__actions__=Qe(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=Qe(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=Qe(this.__views__),i}function wm(){if(this.__filtered__){var i=new bt(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function Tm(){var i=this.__wrapped__.value(),s=this.__dir__,o=dt(i),h=s<0,p=o?i.length:0,m=P1(0,p,this.__views__),E=m.start,T=m.end,S=T-E,W=h?T:E-1,V=this.__iteratees__,$=V.length,Q=0,nt=Be(S,this.__takeCount__);if(!o||!h&&p==S&&nt==S)return Up(i,this.__actions__);var ot=[];t:for(;S--&&Q<nt;){W+=s;for(var xt=-1,lt=i[W];++xt<$;){var At=V[xt],Tt=At.iteratee,fr=At.type,Ue=Tt(lt);if(fr==ft)lt=Ue;else if(!Ue){if(fr==ct)continue t;break t}}ot[Q++]=lt}return ot}bt.prototype=bs(Ou.prototype),bt.prototype.constructor=bt;function Bn(i){var s=-1,o=i==null?0:i.length;for(this.clear();++s<o;){var h=i[s];this.set(h[0],h[1])}}function _m(){this.__data__=Ea?Ea(null):{},this.size=0}function Cm(i){var s=this.has(i)&&delete this.__data__[i];return this.size-=s?1:0,s}function Dm(i){var s=this.__data__;if(Ea){var o=s[i];return o===f?e:o}return Lt.call(s,i)?s[i]:e}function Sm(i){var s=this.__data__;return Ea?s[i]!==e:Lt.call(s,i)}function Om(i,s){var o=this.__data__;return this.size+=this.has(i)?0:1,o[i]=Ea&&s===e?f:s,this}Bn.prototype.clear=_m,Bn.prototype.delete=Cm,Bn.prototype.get=Dm,Bn.prototype.has=Sm,Bn.prototype.set=Om;function Di(i){var s=-1,o=i==null?0:i.length;for(this.clear();++s<o;){var h=i[s];this.set(h[0],h[1])}}function Nm(){this.__data__=[],this.size=0}function Mm(i){var s=this.__data__,o=Nu(s,i);if(o<0)return!1;var h=s.length-1;return o==h?s.pop():wu.call(s,o,1),--this.size,!0}function Bm(i){var s=this.__data__,o=Nu(s,i);return o<0?e:s[o][1]}function Im(i){return Nu(this.__data__,i)>-1}function Rm(i,s){var o=this.__data__,h=Nu(o,i);return h<0?(++this.size,o.push([i,s])):o[h][1]=s,this}Di.prototype.clear=Nm,Di.prototype.delete=Mm,Di.prototype.get=Bm,Di.prototype.has=Im,Di.prototype.set=Rm;function Si(i){var s=-1,o=i==null?0:i.length;for(this.clear();++s<o;){var h=i[s];this.set(h[0],h[1])}}function Lm(){this.size=0,this.__data__={hash:new Bn,map:new(ma||Di),string:new Bn}}function Pm(i){var s=Wu(this,i).delete(i);return this.size-=s?1:0,s}function Fm(i){return Wu(this,i).get(i)}function km(i){return Wu(this,i).has(i)}function Um(i,s){var o=Wu(this,i),h=o.size;return o.set(i,s),this.size+=o.size==h?0:1,this}Si.prototype.clear=Lm,Si.prototype.delete=Pm,Si.prototype.get=Fm,Si.prototype.has=km,Si.prototype.set=Um;function In(i){var s=-1,o=i==null?0:i.length;for(this.__data__=new Si;++s<o;)this.add(i[s])}function Hm(i){return this.__data__.set(i,f),this}function qm(i){return this.__data__.has(i)}In.prototype.add=In.prototype.push=Hm,In.prototype.has=qm;function zr(i){var s=this.__data__=new Di(i);this.size=s.size}function Wm(){this.__data__=new Di,this.size=0}function Vm(i){var s=this.__data__,o=s.delete(i);return this.size=s.size,o}function $m(i){return this.__data__.get(i)}function zm(i){return this.__data__.has(i)}function Gm(i,s){var o=this.__data__;if(o instanceof Di){var h=o.__data__;if(!ma||h.length<a-1)return h.push([i,s]),this.size=++o.size,this;o=this.__data__=new Si(h)}return o.set(i,s),this.size=o.size,this}zr.prototype.clear=Wm,zr.prototype.delete=Vm,zr.prototype.get=$m,zr.prototype.has=zm,zr.prototype.set=Gm;function yp(i,s){var o=dt(i),h=!o&&kn(i),p=!o&&!h&&hn(i),m=!o&&!h&&!p&&Cs(i),E=o||h||p||m,T=E?vl(i.length,rm):[],S=T.length;for(var W in i)(s||Lt.call(i,W))&&!(E&&(W=="length"||p&&(W=="offset"||W=="parent")||m&&(W=="buffer"||W=="byteLength"||W=="byteOffset")||Bi(W,S)))&&T.push(W);return T}function vp(i){var s=i.length;return s?i[Rl(0,s-1)]:e}function Ym(i,s){return Vu(Qe(i),Rn(s,0,i.length))}function Xm(i){return Vu(Qe(i))}function Tl(i,s,o){(o!==e&&!Gr(i[s],o)||o===e&&!(s in i))&&Oi(i,s,o)}function ba(i,s,o){var h=i[s];(!(Lt.call(i,s)&&Gr(h,o))||o===e&&!(s in i))&&Oi(i,s,o)}function Nu(i,s){for(var o=i.length;o--;)if(Gr(i[o][0],s))return o;return-1}function Zm(i,s,o,h){return an(i,function(p,m,E){s(h,p,o(p),E)}),h}function mp(i,s){return i&&oi(s,Ee(s),i)}function Qm(i,s){return i&&oi(s,Ke(s),i)}function Oi(i,s,o){s=="__proto__"&&Tu?Tu(i,s,{configurable:!0,enumerable:!0,value:o,writable:!0}):i[s]=o}function _l(i,s){for(var o=-1,h=s.length,p=I(h),m=i==null;++o<h;)p[o]=m?e:sh(i,s[o]);return p}function Rn(i,s,o){return i===i&&(o!==e&&(i=i<=o?i:o),s!==e&&(i=i>=s?i:s)),i}function Cr(i,s,o,h,p,m){var E,T=s&A,S=s&_,W=s&C;if(o&&(E=p?o(i,h,p,m):o(i)),E!==e)return E;if(!Xt(i))return i;var V=dt(i);if(V){if(E=k1(i),!T)return Qe(i,E)}else{var $=Ie(i),Q=$==Pe||$==ze;if(hn(i))return Wp(i,T);if($==Yt||$==ae||Q&&!p){if(E=S||Q?{}:ud(i),!T)return S?D1(i,Qm(E,i)):C1(i,mp(E,i))}else{if(!Ut[$])return p?i:{};E=U1(i,$,T)}}m||(m=new zr);var nt=m.get(i);if(nt)return nt;m.set(i,E),Pd(i)?i.forEach(function(lt){E.add(Cr(lt,s,o,lt,i,m))}):Rd(i)&&i.forEach(function(lt,At){E.set(At,Cr(lt,s,o,At,i,m))});var ot=W?S?zl:$l:S?Ke:Ee,xt=V?e:ot(i);return wr(xt||i,function(lt,At){xt&&(At=lt,lt=i[At]),ba(E,At,Cr(lt,s,o,At,i,m))}),E}function jm(i){var s=Ee(i);return function(o){return xp(o,i,s)}}function xp(i,s,o){var h=o.length;if(i==null)return!h;for(i=kt(i);h--;){var p=o[h],m=s[p],E=i[p];if(E===e&&!(p in i)||!m(E))return!1}return!0}function Ep(i,s,o){if(typeof i!="function")throw new Tr(l);return Oa(function(){i.apply(e,o)},s)}function wa(i,s,o,h){var p=-1,m=pu,E=!0,T=i.length,S=[],W=s.length;if(!T)return S;o&&(s=$t(s,lr(o))),h?(m=cl,E=!1):s.length>=a&&(m=ya,E=!1,s=new In(s));t:for(;++p<T;){var V=i[p],$=o==null?V:o(V);if(V=h||V!==0?V:0,E&&$===$){for(var Q=W;Q--;)if(s[Q]===$)continue t;S.push(V)}else m(s,$,h)||S.push(V)}return S}var an=Yp(ui),Ap=Yp(Dl,!0);function Km(i,s){var o=!0;return an(i,function(h,p,m){return o=!!s(h,p,m),o}),o}function Mu(i,s,o){for(var h=-1,p=i.length;++h<p;){var m=i[h],E=s(m);if(E!=null&&(T===e?E===E&&!cr(E):o(E,T)))var T=E,S=m}return S}function Jm(i,s,o,h){var p=i.length;for(o=gt(o),o<0&&(o=-o>p?0:p+o),h=h===e||h>p?p:gt(h),h<0&&(h+=p),h=o>h?0:kd(h);o<h;)i[o++]=s;return i}function bp(i,s){var o=[];return an(i,function(h,p,m){s(h,p,m)&&o.push(h)}),o}function Te(i,s,o,h,p){var m=-1,E=i.length;for(o||(o=q1),p||(p=[]);++m<E;){var T=i[m];s>0&&o(T)?s>1?Te(T,s-1,o,h,p):rn(p,T):h||(p[p.length]=T)}return p}var Cl=Xp(),wp=Xp(!0);function ui(i,s){return i&&Cl(i,s,Ee)}function Dl(i,s){return i&&wp(i,s,Ee)}function Bu(i,s){return en(s,function(o){return Ii(i[o])})}function Ln(i,s){s=on(s,i);for(var o=0,h=s.length;i!=null&&o<h;)i=i[li(s[o++])];return o&&o==h?i:e}function Tp(i,s,o){var h=s(i);return dt(i)?h:rn(h,o(i))}function Fe(i){return i==null?i===e?bi:me:Mn&&Mn in kt(i)?L1(i):X1(i)}function Sl(i,s){return i>s}function t1(i,s){return i!=null&&Lt.call(i,s)}function e1(i,s){return i!=null&&s in kt(i)}function r1(i,s,o){return i>=Be(s,o)&&i<de(s,o)}function Ol(i,s,o){for(var h=o?cl:pu,p=i[0].length,m=i.length,E=m,T=I(m),S=1/0,W=[];E--;){var V=i[E];E&&s&&(V=$t(V,lr(s))),S=Be(V.length,S),T[E]=!o&&(s||p>=120&&V.length>=120)?new In(E&&V):e}V=i[0];var $=-1,Q=T[0];t:for(;++$<p&&W.length<S;){var nt=V[$],ot=s?s(nt):nt;if(nt=o||nt!==0?nt:0,!(Q?ya(Q,ot):h(W,ot,o))){for(E=m;--E;){var xt=T[E];if(!(xt?ya(xt,ot):h(i[E],ot,o)))continue t}Q&&Q.push(ot),W.push(nt)}}return W}function i1(i,s,o,h){return ui(i,function(p,m,E){s(h,o(p),m,E)}),h}function Ta(i,s,o){s=on(s,i),i=cd(i,s);var h=i==null?i:i[li(Sr(s))];return h==null?e:or(h,i,o)}function _p(i){return jt(i)&&Fe(i)==ae}function n1(i){return jt(i)&&Fe(i)==sr}function s1(i){return jt(i)&&Fe(i)==Ct}function _a(i,s,o,h,p){return i===s?!0:i==null||s==null||!jt(i)&&!jt(s)?i!==i&&s!==s:a1(i,s,o,h,_a,p)}function a1(i,s,o,h,p,m){var E=dt(i),T=dt(s),S=E?Se:Ie(i),W=T?Se:Ie(s);S=S==ae?Yt:S,W=W==ae?Yt:W;var V=S==Yt,$=W==Yt,Q=S==W;if(Q&&hn(i)){if(!hn(s))return!1;E=!0,V=!1}if(Q&&!V)return m||(m=new zr),E||Cs(i)?nd(i,s,o,h,p,m):I1(i,s,S,o,h,p,m);if(!(o&F)){var nt=V&&Lt.call(i,"__wrapped__"),ot=$&&Lt.call(s,"__wrapped__");if(nt||ot){var xt=nt?i.value():i,lt=ot?s.value():s;return m||(m=new zr),p(xt,lt,o,h,m)}}return Q?(m||(m=new zr),R1(i,s,o,h,p,m)):!1}function u1(i){return jt(i)&&Ie(i)==Qt}function Nl(i,s,o,h){var p=o.length,m=p,E=!h;if(i==null)return!m;for(i=kt(i);p--;){var T=o[p];if(E&&T[2]?T[1]!==i[T[0]]:!(T[0]in i))return!1}for(;++p<m;){T=o[p];var S=T[0],W=i[S],V=T[1];if(E&&T[2]){if(W===e&&!(S in i))return!1}else{var $=new zr;if(h)var Q=h(W,V,S,i,s,$);if(!(Q===e?_a(V,W,F|N,h,$):Q))return!1}}return!0}function Cp(i){if(!Xt(i)||V1(i))return!1;var s=Ii(i)?um:Cn;return s.test(Fn(i))}function o1(i){return jt(i)&&Fe(i)==ue}function l1(i){return jt(i)&&Ie(i)==Dt}function h1(i){return jt(i)&&Zu(i.length)&&!!qt[Fe(i)]}function Dp(i){return typeof i=="function"?i:i==null?Je:typeof i=="object"?dt(i)?Np(i[0],i[1]):Op(i):Zd(i)}function Ml(i){if(!Sa(i))return pm(i);var s=[];for(var o in kt(i))Lt.call(i,o)&&o!="constructor"&&s.push(o);return s}function c1(i){if(!Xt(i))return Y1(i);var s=Sa(i),o=[];for(var h in i)h=="constructor"&&(s||!Lt.call(i,h))||o.push(h);return o}function Bl(i,s){return i<s}function Sp(i,s){var o=-1,h=je(i)?I(i.length):[];return an(i,function(p,m,E){h[++o]=s(p,m,E)}),h}function Op(i){var s=Yl(i);return s.length==1&&s[0][2]?ld(s[0][0],s[0][1]):function(o){return o===i||Nl(o,i,s)}}function Np(i,s){return Zl(i)&&od(s)?ld(li(i),s):function(o){var h=sh(o,i);return h===e&&h===s?ah(o,i):_a(s,h,F|N)}}function Iu(i,s,o,h,p){i!==s&&Cl(s,function(m,E){if(p||(p=new zr),Xt(m))f1(i,s,E,o,Iu,h,p);else{var T=h?h(jl(i,E),m,E+"",i,s,p):e;T===e&&(T=m),Tl(i,E,T)}},Ke)}function f1(i,s,o,h,p,m,E){var T=jl(i,o),S=jl(s,o),W=E.get(S);if(W){Tl(i,o,W);return}var V=m?m(T,S,o+"",i,s,E):e,$=V===e;if($){var Q=dt(S),nt=!Q&&hn(S),ot=!Q&&!nt&&Cs(S);V=S,Q||nt||ot?dt(T)?V=T:te(T)?V=Qe(T):nt?($=!1,V=Wp(S,!0)):ot?($=!1,V=Vp(S,!0)):V=[]:Na(S)||kn(S)?(V=T,kn(T)?V=Ud(T):(!Xt(T)||Ii(T))&&(V=ud(S))):$=!1}$&&(E.set(S,V),p(V,S,h,m,E),E.delete(S)),Tl(i,o,V)}function Mp(i,s){var o=i.length;if(o)return s+=s<0?o:0,Bi(s,o)?i[s]:e}function Bp(i,s,o){s.length?s=$t(s,function(m){return dt(m)?function(E){return Ln(E,m.length===1?m[0]:m)}:m}):s=[Je];var h=-1;s=$t(s,lr(ut()));var p=Sp(i,function(m,E,T){var S=$t(s,function(W){return W(m)});return{criteria:S,index:++h,value:m}});return Uv(p,function(m,E){return _1(m,E,o)})}function p1(i,s){return Ip(i,s,function(o,h){return ah(i,h)})}function Ip(i,s,o){for(var h=-1,p=s.length,m={};++h<p;){var E=s[h],T=Ln(i,E);o(T,E)&&Ca(m,on(E,i),T)}return m}function d1(i){return function(s){return Ln(s,i)}}function Il(i,s,o,h){var p=h?kv:gs,m=-1,E=s.length,T=i;for(i===s&&(s=Qe(s)),o&&(T=$t(i,lr(o)));++m<E;)for(var S=0,W=s[m],V=o?o(W):W;(S=p(T,V,S,h))>-1;)T!==i&&wu.call(T,S,1),wu.call(i,S,1);return i}function Rp(i,s){for(var o=i?s.length:0,h=o-1;o--;){var p=s[o];if(o==h||p!==m){var m=p;Bi(p)?wu.call(i,p,1):Fl(i,p)}}return i}function Rl(i,s){return i+Cu(dp()*(s-i+1))}function g1(i,s,o,h){for(var p=-1,m=de(_u((s-i)/(o||1)),0),E=I(m);m--;)E[h?m:++p]=i,i+=o;return E}function Ll(i,s){var o="";if(!i||s<1||s>Bt)return o;do s%2&&(o+=i),s=Cu(s/2),s&&(i+=i);while(s);return o}function Et(i,s){return Kl(hd(i,s,Je),i+"")}function y1(i){return vp(Ds(i))}function v1(i,s){var o=Ds(i);return Vu(o,Rn(s,0,o.length))}function Ca(i,s,o,h){if(!Xt(i))return i;s=on(s,i);for(var p=-1,m=s.length,E=m-1,T=i;T!=null&&++p<m;){var S=li(s[p]),W=o;if(S==="__proto__"||S==="constructor"||S==="prototype")return i;if(p!=E){var V=T[S];W=h?h(V,S,T):e,W===e&&(W=Xt(V)?V:Bi(s[p+1])?[]:{})}ba(T,S,W),T=T[S]}return i}var Lp=Du?function(i,s){return Du.set(i,s),i}:Je,m1=Tu?function(i,s){return Tu(i,"toString",{configurable:!0,enumerable:!1,value:oh(s),writable:!0})}:Je;function x1(i){return Vu(Ds(i))}function Dr(i,s,o){var h=-1,p=i.length;s<0&&(s=-s>p?0:p+s),o=o>p?p:o,o<0&&(o+=p),p=s>o?0:o-s>>>0,s>>>=0;for(var m=I(p);++h<p;)m[h]=i[h+s];return m}function E1(i,s){var o;return an(i,function(h,p,m){return o=s(h,p,m),!o}),!!o}function Ru(i,s,o){var h=0,p=i==null?h:i.length;if(typeof s=="number"&&s===s&&p<=qr){for(;h<p;){var m=h+p>>>1,E=i[m];E!==null&&!cr(E)&&(o?E<=s:E<s)?h=m+1:p=m}return p}return Pl(i,s,Je,o)}function Pl(i,s,o,h){var p=0,m=i==null?0:i.length;if(m===0)return 0;s=o(s);for(var E=s!==s,T=s===null,S=cr(s),W=s===e;p<m;){var V=Cu((p+m)/2),$=o(i[V]),Q=$!==e,nt=$===null,ot=$===$,xt=cr($);if(E)var lt=h||ot;else W?lt=ot&&(h||Q):T?lt=ot&&Q&&(h||!nt):S?lt=ot&&Q&&!nt&&(h||!xt):nt||xt?lt=!1:lt=h?$<=s:$<s;lt?p=V+1:m=V}return Be(m,ve)}function Pp(i,s){for(var o=-1,h=i.length,p=0,m=[];++o<h;){var E=i[o],T=s?s(E):E;if(!o||!Gr(T,S)){var S=T;m[p++]=E===0?0:E}}return m}function Fp(i){return typeof i=="number"?i:cr(i)?be:+i}function hr(i){if(typeof i=="string")return i;if(dt(i))return $t(i,hr)+"";if(cr(i))return gp?gp.call(i):"";var s=i+"";return s=="0"&&1/i==-yt?"-0":s}function un(i,s,o){var h=-1,p=pu,m=i.length,E=!0,T=[],S=T;if(o)E=!1,p=cl;else if(m>=a){var W=s?null:M1(i);if(W)return gu(W);E=!1,p=ya,S=new In}else S=s?[]:T;t:for(;++h<m;){var V=i[h],$=s?s(V):V;if(V=o||V!==0?V:0,E&&$===$){for(var Q=S.length;Q--;)if(S[Q]===$)continue t;s&&S.push($),T.push(V)}else p(S,$,o)||(S!==T&&S.push($),T.push(V))}return T}function Fl(i,s){return s=on(s,i),i=cd(i,s),i==null||delete i[li(Sr(s))]}function kp(i,s,o,h){return Ca(i,s,o(Ln(i,s)),h)}function Lu(i,s,o,h){for(var p=i.length,m=h?p:-1;(h?m--:++m<p)&&s(i[m],m,i););return o?Dr(i,h?0:m,h?m+1:p):Dr(i,h?m+1:0,h?p:m)}function Up(i,s){var o=i;return o instanceof bt&&(o=o.value()),fl(s,function(h,p){return p.func.apply(p.thisArg,rn([h],p.args))},o)}function kl(i,s,o){var h=i.length;if(h<2)return h?un(i[0]):[];for(var p=-1,m=I(h);++p<h;)for(var E=i[p],T=-1;++T<h;)T!=p&&(m[p]=wa(m[p]||E,i[T],s,o));return un(Te(m,1),s,o)}function Hp(i,s,o){for(var h=-1,p=i.length,m=s.length,E={};++h<p;){var T=h<m?s[h]:e;o(E,i[h],T)}return E}function Ul(i){return te(i)?i:[]}function Hl(i){return typeof i=="function"?i:Je}function on(i,s){return dt(i)?i:Zl(i,s)?[i]:gd(It(i))}var A1=Et;function ln(i,s,o){var h=i.length;return o=o===e?h:o,!s&&o>=h?i:Dr(i,s,o)}var qp=om||function(i){return we.clearTimeout(i)};function Wp(i,s){if(s)return i.slice();var o=i.length,h=lp?lp(o):new i.constructor(o);return i.copy(h),h}function ql(i){var s=new i.constructor(i.byteLength);return new Au(s).set(new Au(i)),s}function b1(i,s){var o=s?ql(i.buffer):i.buffer;return new i.constructor(o,i.byteOffset,i.byteLength)}function w1(i){var s=new i.constructor(i.source,ca.exec(i));return s.lastIndex=i.lastIndex,s}function T1(i){return Aa?kt(Aa.call(i)):{}}function Vp(i,s){var o=s?ql(i.buffer):i.buffer;return new i.constructor(o,i.byteOffset,i.length)}function $p(i,s){if(i!==s){var o=i!==e,h=i===null,p=i===i,m=cr(i),E=s!==e,T=s===null,S=s===s,W=cr(s);if(!T&&!W&&!m&&i>s||m&&E&&S&&!T&&!W||h&&E&&S||!o&&S||!p)return 1;if(!h&&!m&&!W&&i<s||W&&o&&p&&!h&&!m||T&&o&&p||!E&&p||!S)return-1}return 0}function _1(i,s,o){for(var h=-1,p=i.criteria,m=s.criteria,E=p.length,T=o.length;++h<E;){var S=$p(p[h],m[h]);if(S){if(h>=T)return S;var W=o[h];return S*(W=="desc"?-1:1)}}return i.index-s.index}function zp(i,s,o,h){for(var p=-1,m=i.length,E=o.length,T=-1,S=s.length,W=de(m-E,0),V=I(S+W),$=!h;++T<S;)V[T]=s[T];for(;++p<E;)($||p<m)&&(V[o[p]]=i[p]);for(;W--;)V[T++]=i[p++];return V}function Gp(i,s,o,h){for(var p=-1,m=i.length,E=-1,T=o.length,S=-1,W=s.length,V=de(m-T,0),$=I(V+W),Q=!h;++p<V;)$[p]=i[p];for(var nt=p;++S<W;)$[nt+S]=s[S];for(;++E<T;)(Q||p<m)&&($[nt+o[E]]=i[p++]);return $}function Qe(i,s){var o=-1,h=i.length;for(s||(s=I(h));++o<h;)s[o]=i[o];return s}function oi(i,s,o,h){var p=!o;o||(o={});for(var m=-1,E=s.length;++m<E;){var T=s[m],S=h?h(o[T],i[T],T,o,i):e;S===e&&(S=i[T]),p?Oi(o,T,S):ba(o,T,S)}return o}function C1(i,s){return oi(i,Xl(i),s)}function D1(i,s){return oi(i,sd(i),s)}function Pu(i,s){return function(o,h){var p=dt(o)?Bv:Zm,m=s?s():{};return p(o,i,ut(h,2),m)}}function ws(i){return Et(function(s,o){var h=-1,p=o.length,m=p>1?o[p-1]:e,E=p>2?o[2]:e;for(m=i.length>3&&typeof m=="function"?(p--,m):e,E&&ke(o[0],o[1],E)&&(m=p<3?e:m,p=1),s=kt(s);++h<p;){var T=o[h];T&&i(s,T,h,m)}return s})}function Yp(i,s){return function(o,h){if(o==null)return o;if(!je(o))return i(o,h);for(var p=o.length,m=s?p:-1,E=kt(o);(s?m--:++m<p)&&h(E[m],m,E)!==!1;);return o}}function Xp(i){return function(s,o,h){for(var p=-1,m=kt(s),E=h(s),T=E.length;T--;){var S=E[i?T:++p];if(o(m[S],S,m)===!1)break}return s}}function S1(i,s,o){var h=s&M,p=Da(i);function m(){var E=this&&this!==we&&this instanceof m?p:i;return E.apply(h?o:this,arguments)}return m}function Zp(i){return function(s){s=It(s);var o=ys(s)?$r(s):e,h=o?o[0]:s.charAt(0),p=o?ln(o,1).join(""):s.slice(1);return h[i]()+p}}function Ts(i){return function(s){return fl(Yd(Gd(s).replace(mv,"")),i,"")}}function Da(i){return function(){var s=arguments;switch(s.length){case 0:return new i;case 1:return new i(s[0]);case 2:return new i(s[0],s[1]);case 3:return new i(s[0],s[1],s[2]);case 4:return new i(s[0],s[1],s[2],s[3]);case 5:return new i(s[0],s[1],s[2],s[3],s[4]);case 6:return new i(s[0],s[1],s[2],s[3],s[4],s[5]);case 7:return new i(s[0],s[1],s[2],s[3],s[4],s[5],s[6])}var o=bs(i.prototype),h=i.apply(o,s);return Xt(h)?h:o}}function O1(i,s,o){var h=Da(i);function p(){for(var m=arguments.length,E=I(m),T=m,S=_s(p);T--;)E[T]=arguments[T];var W=m<3&&E[0]!==S&&E[m-1]!==S?[]:nn(E,S);if(m-=W.length,m<o)return td(i,s,Fu,p.placeholder,e,E,W,e,e,o-m);var V=this&&this!==we&&this instanceof p?h:i;return or(V,this,E)}return p}function Qp(i){return function(s,o,h){var p=kt(s);if(!je(s)){var m=ut(o,3);s=Ee(s),o=function(T){return m(p[T],T,p)}}var E=i(s,o,h);return E>-1?p[m?s[E]:E]:e}}function jp(i){return Mi(function(s){var o=s.length,h=o,p=_r.prototype.thru;for(i&&s.reverse();h--;){var m=s[h];if(typeof m!="function")throw new Tr(l);if(p&&!E&&qu(m)=="wrapper")var E=new _r([],!0)}for(h=E?h:o;++h<o;){m=s[h];var T=qu(m),S=T=="wrapper"?Gl(m):e;S&&Ql(S[0])&&S[1]==(j|z|L|tt)&&!S[4].length&&S[9]==1?E=E[qu(S[0])].apply(E,S[3]):E=m.length==1&&Ql(m)?E[T]():E.thru(m)}return function(){var W=arguments,V=W[0];if(E&&W.length==1&&dt(V))return E.plant(V).value();for(var $=0,Q=o?s[$].apply(this,W):V;++$<o;)Q=s[$].call(this,Q);return Q}})}function Fu(i,s,o,h,p,m,E,T,S,W){var V=s&j,$=s&M,Q=s&R,nt=s&(z|w),ot=s&Z,xt=Q?e:Da(i);function lt(){for(var At=arguments.length,Tt=I(At),fr=At;fr--;)Tt[fr]=arguments[fr];if(nt)var Ue=_s(lt),pr=qv(Tt,Ue);if(h&&(Tt=zp(Tt,h,p,nt)),m&&(Tt=Gp(Tt,m,E,nt)),At-=pr,nt&&At<W){var ee=nn(Tt,Ue);return td(i,s,Fu,lt.placeholder,o,Tt,ee,T,S,W-At)}var Yr=$?o:this,Li=Q?Yr[i]:i;return At=Tt.length,T?Tt=Z1(Tt,T):ot&&At>1&&Tt.reverse(),V&&S<At&&(Tt.length=S),this&&this!==we&&this instanceof lt&&(Li=xt||Da(Li)),Li.apply(Yr,Tt)}return lt}function Kp(i,s){return function(o,h){return i1(o,i,s(h),{})}}function ku(i,s){return function(o,h){var p;if(o===e&&h===e)return s;if(o!==e&&(p=o),h!==e){if(p===e)return h;typeof o=="string"||typeof h=="string"?(o=hr(o),h=hr(h)):(o=Fp(o),h=Fp(h)),p=i(o,h)}return p}}function Wl(i){return Mi(function(s){return s=$t(s,lr(ut())),Et(function(o){var h=this;return i(s,function(p){return or(p,h,o)})})})}function Uu(i,s){s=s===e?" ":hr(s);var o=s.length;if(o<2)return o?Ll(s,i):s;var h=Ll(s,_u(i/vs(s)));return ys(s)?ln($r(h),0,i).join(""):h.slice(0,i)}function N1(i,s,o,h){var p=s&M,m=Da(i);function E(){for(var T=-1,S=arguments.length,W=-1,V=h.length,$=I(V+S),Q=this&&this!==we&&this instanceof E?m:i;++W<V;)$[W]=h[W];for(;S--;)$[W++]=arguments[++T];return or(Q,p?o:this,$)}return E}function Jp(i){return function(s,o,h){return h&&typeof h!="number"&&ke(s,o,h)&&(o=h=e),s=Ri(s),o===e?(o=s,s=0):o=Ri(o),h=h===e?s<o?1:-1:Ri(h),g1(s,o,h,i)}}function Hu(i){return function(s,o){return typeof s=="string"&&typeof o=="string"||(s=Or(s),o=Or(o)),i(s,o)}}function td(i,s,o,h,p,m,E,T,S,W){var V=s&z,$=V?E:e,Q=V?e:E,nt=V?m:e,ot=V?e:m;s|=V?L:U,s&=~(V?U:L),s&q||(s&=~(M|R));var xt=[i,s,p,nt,$,ot,Q,T,S,W],lt=o.apply(e,xt);return Ql(i)&&fd(lt,xt),lt.placeholder=h,pd(lt,i,s)}function Vl(i){var s=pe[i];return function(o,h){if(o=Or(o),h=h==null?0:Be(gt(h),292),h&&pp(o)){var p=(It(o)+"e").split("e"),m=s(p[0]+"e"+(+p[1]+h));return p=(It(m)+"e").split("e"),+(p[0]+"e"+(+p[1]-h))}return s(o)}}var M1=Es&&1/gu(new Es([,-0]))[1]==yt?function(i){return new Es(i)}:ch;function ed(i){return function(s){var o=Ie(s);return o==Qt?xl(s):o==Dt?Xv(s):Hv(s,i(s))}}function Ni(i,s,o,h,p,m,E,T){var S=s&R;if(!S&&typeof i!="function")throw new Tr(l);var W=h?h.length:0;if(W||(s&=~(L|U),h=p=e),E=E===e?E:de(gt(E),0),T=T===e?T:gt(T),W-=p?p.length:0,s&U){var V=h,$=p;h=p=e}var Q=S?e:Gl(i),nt=[i,s,o,h,p,V,$,m,E,T];if(Q&&G1(nt,Q),i=nt[0],s=nt[1],o=nt[2],h=nt[3],p=nt[4],T=nt[9]=nt[9]===e?S?0:i.length:de(nt[9]-W,0),!T&&s&(z|w)&&(s&=~(z|w)),!s||s==M)var ot=S1(i,s,o);else s==z||s==w?ot=O1(i,s,T):(s==L||s==(M|L))&&!p.length?ot=N1(i,s,o,h):ot=Fu.apply(e,nt);var xt=Q?Lp:fd;return pd(xt(ot,nt),i,s)}function rd(i,s,o,h){return i===e||Gr(i,xs[o])&&!Lt.call(h,o)?s:i}function id(i,s,o,h,p,m){return Xt(i)&&Xt(s)&&(m.set(s,i),Iu(i,s,e,id,m),m.delete(s)),i}function B1(i){return Na(i)?e:i}function nd(i,s,o,h,p,m){var E=o&F,T=i.length,S=s.length;if(T!=S&&!(E&&S>T))return!1;var W=m.get(i),V=m.get(s);if(W&&V)return W==s&&V==i;var $=-1,Q=!0,nt=o&N?new In:e;for(m.set(i,s),m.set(s,i);++$<T;){var ot=i[$],xt=s[$];if(h)var lt=E?h(xt,ot,$,s,i,m):h(ot,xt,$,i,s,m);if(lt!==e){if(lt)continue;Q=!1;break}if(nt){if(!pl(s,function(At,Tt){if(!ya(nt,Tt)&&(ot===At||p(ot,At,o,h,m)))return nt.push(Tt)})){Q=!1;break}}else if(!(ot===xt||p(ot,xt,o,h,m))){Q=!1;break}}return m.delete(i),m.delete(s),Q}function I1(i,s,o,h,p,m,E){switch(o){case Ye:if(i.byteLength!=s.byteLength||i.byteOffset!=s.byteOffset)return!1;i=i.buffer,s=s.buffer;case sr:return!(i.byteLength!=s.byteLength||!m(new Au(i),new Au(s)));case Gt:case Ct:case Ne:return Gr(+i,+s);case Oe:return i.name==s.name&&i.message==s.message;case ue:case nr:return i==s+"";case Qt:var T=xl;case Dt:var S=h&F;if(T||(T=gu),i.size!=s.size&&!S)return!1;var W=E.get(i);if(W)return W==s;h|=N,E.set(i,s);var V=nd(T(i),T(s),h,p,m,E);return E.delete(i),V;case Ge:if(Aa)return Aa.call(i)==Aa.call(s)}return!1}function R1(i,s,o,h,p,m){var E=o&F,T=$l(i),S=T.length,W=$l(s),V=W.length;if(S!=V&&!E)return!1;for(var $=S;$--;){var Q=T[$];if(!(E?Q in s:Lt.call(s,Q)))return!1}var nt=m.get(i),ot=m.get(s);if(nt&&ot)return nt==s&&ot==i;var xt=!0;m.set(i,s),m.set(s,i);for(var lt=E;++$<S;){Q=T[$];var At=i[Q],Tt=s[Q];if(h)var fr=E?h(Tt,At,Q,s,i,m):h(At,Tt,Q,i,s,m);if(!(fr===e?At===Tt||p(At,Tt,o,h,m):fr)){xt=!1;break}lt||(lt=Q=="constructor")}if(xt&&!lt){var Ue=i.constructor,pr=s.constructor;Ue!=pr&&"constructor"in i&&"constructor"in s&&!(typeof Ue=="function"&&Ue instanceof Ue&&typeof pr=="function"&&pr instanceof pr)&&(xt=!1)}return m.delete(i),m.delete(s),xt}function Mi(i){return Kl(hd(i,e,xd),i+"")}function $l(i){return Tp(i,Ee,Xl)}function zl(i){return Tp(i,Ke,sd)}var Gl=Du?function(i){return Du.get(i)}:ch;function qu(i){for(var s=i.name+"",o=As[s],h=Lt.call(As,s)?o.length:0;h--;){var p=o[h],m=p.func;if(m==null||m==i)return p.name}return s}function _s(i){var s=Lt.call(v,"placeholder")?v:i;return s.placeholder}function ut(){var i=v.iteratee||lh;return i=i===lh?Dp:i,arguments.length?i(arguments[0],arguments[1]):i}function Wu(i,s){var o=i.__data__;return W1(s)?o[typeof s=="string"?"string":"hash"]:o.map}function Yl(i){for(var s=Ee(i),o=s.length;o--;){var h=s[o],p=i[h];s[o]=[h,p,od(p)]}return s}function Pn(i,s){var o=zv(i,s);return Cp(o)?o:e}function L1(i){var s=Lt.call(i,Mn),o=i[Mn];try{i[Mn]=e;var h=!0}catch{}var p=xu.call(i);return h&&(s?i[Mn]=o:delete i[Mn]),p}var Xl=Al?function(i){return i==null?[]:(i=kt(i),en(Al(i),function(s){return cp.call(i,s)}))}:fh,sd=Al?function(i){for(var s=[];i;)rn(s,Xl(i)),i=bu(i);return s}:fh,Ie=Fe;(bl&&Ie(new bl(new ArrayBuffer(1)))!=Ye||ma&&Ie(new ma)!=Qt||wl&&Ie(wl.resolve())!=ii||Es&&Ie(new Es)!=Dt||xa&&Ie(new xa)!=mr)&&(Ie=function(i){var s=Fe(i),o=s==Yt?i.constructor:e,h=o?Fn(o):"";if(h)switch(h){case vm:return Ye;case mm:return Qt;case xm:return ii;case Em:return Dt;case Am:return mr}return s});function P1(i,s,o){for(var h=-1,p=o.length;++h<p;){var m=o[h],E=m.size;switch(m.type){case"drop":i+=E;break;case"dropRight":s-=E;break;case"take":s=Be(s,i+E);break;case"takeRight":i=de(i,s-E);break}}return{start:i,end:s}}function F1(i){var s=i.match(il);return s?s[1].split(au):[]}function ad(i,s,o){s=on(s,i);for(var h=-1,p=s.length,m=!1;++h<p;){var E=li(s[h]);if(!(m=i!=null&&o(i,E)))break;i=i[E]}return m||++h!=p?m:(p=i==null?0:i.length,!!p&&Zu(p)&&Bi(E,p)&&(dt(i)||kn(i)))}function k1(i){var s=i.length,o=new i.constructor(s);return s&&typeof i[0]=="string"&&Lt.call(i,"index")&&(o.index=i.index,o.input=i.input),o}function ud(i){return typeof i.constructor=="function"&&!Sa(i)?bs(bu(i)):{}}function U1(i,s,o){var h=i.constructor;switch(s){case sr:return ql(i);case Gt:case Ct:return new h(+i);case Ye:return b1(i,o);case Yi:case Xi:case ni:case wi:case bn:case P:case it:case at:case wt:return Vp(i,o);case Qt:return new h;case Ne:case nr:return new h(i);case ue:return w1(i);case Dt:return new h;case Ge:return T1(i)}}function H1(i,s){var o=s.length;if(!o)return i;var h=o-1;return s[h]=(o>1?"& ":"")+s[h],s=s.join(o>2?", ":" "),i.replace(ha,`{
12
+ */ja.exports,function(r,t){(function(){var e,i="4.17.21",a=200,u="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",c="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",d=500,g="__lodash_placeholder__",E=1,T=2,C=4,L=1,N=2,M=1,R=2,W=4,G=8,b=16,P=32,H=64,K=128,tt=256,Z=512,rt=30,J="...",st=800,ht=16,ct=1,ft=2,O=3,yt=1/0,Bt=9007199254740991,Re=17976931348623157e292,we=NaN,ae=4294967295,me=ae-1,Vr=ae>>>1,Le=[["ary",K],["bind",M],["bindKey",R],["curry",G],["curryRight",b],["flip",Z],["partial",P],["partialRight",H],["rearg",tt]],ue="[object Arguments]",Se="[object Array]",$t="[object AsyncFunction]",Xt="[object Boolean]",Ct="[object Date]",Wt="[object DOMException]",Oe="[object Error]",Pe="[object Function]",$e="[object GeneratorFunction]",Kt="[object Map]",Ne="[object Number]",ve="[object Null]",Zt="[object Object]",ai="[object Promise]",Ci="[object Proxy]",oe="[object RegExp]",Dt="[object Set]",nr="[object String]",Ge="[object Symbol]",Di="[object Undefined]",Er="[object WeakMap]",Ji="[object WeakSet]",sr="[object ArrayBuffer]",Ye="[object DataView]",tn="[object Float32Array]",en="[object Float64Array]",ui="[object Int8Array]",Si="[object Int16Array]",Nn="[object Int32Array]",U="[object Uint8Array]",it="[object Uint8ClampedArray]",at="[object Uint16Array]",bt="[object Uint32Array]",mt=/\b__p \+= '';/g,fe=/\b(__p \+=) '' \+/g,Me=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ar=/&(?:amp|lt|gt|quot|#39);/g,rn=/[&<>"']/g,ar=RegExp(Ar.source),Mn=RegExp(rn.source),nn=/<%-([\s\S]+?)%>/g,oi=/<%([\s\S]+?)%>/g,Bn=/<%=([\s\S]+?)%>/g,In=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,sn=/^\w*$/,dl=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,an=/[\\^$.*+?()[\]{}|]/g,gl=RegExp(an.source),xa=/^\s+/,mu=/\s/,Ea=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,yl=/\{\n\/\* \[wrapped with (.+)\] \*/,vu=/,? & /,ml=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,xu=/[()=,{}\[\]\/\s]/,Eu=/\\(\\)?/g,Au=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Aa=/\w*$/,wa=/^[-+]0x[0-9a-f]+$/i,Oi=/^0b[01]+$/i,Rn=/^\[object .+?Constructor\]$/,Ln=/^0o[0-7]+$/i,ys=/^(?:0|[1-9]\d*)$/,ba=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ms=/($^)/,vl=/['\n\r\u2028\u2029\\]/g,Ni="\\ud800-\\udfff",Xe="\\u0300-\\u036f",un="\\ufe20-\\ufe2f",li="\\u20d0-\\u20ff",wr=Xe+un+li,on="\\u2700-\\u27bf",ur="a-z\\xdf-\\xf6\\xf8-\\xff",zr="\\xac\\xb1\\xd7\\xf7",wu="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",bu="\\u2000-\\u206f",vs=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ze="A-Z\\xc0-\\xd6\\xd8-\\xde",Pn="\\ufe0e\\ufe0f",xs=zr+wu+bu+vs,Fn="['’]",Ta="["+Ni+"]",Es="["+xs+"]",Mi="["+wr+"]",$r="\\d+",xl="["+on+"]",_a="["+ur+"]",As="[^"+Ni+xs+$r+on+ur+Ze+"]",ws="\\ud83c[\\udffb-\\udfff]",El="(?:"+Mi+"|"+ws+")",Tu="[^"+Ni+"]",y="(?:\\ud83c[\\udde6-\\uddff]){2}",x="[\\ud800-\\udbff][\\udc00-\\udfff]",w="["+Ze+"]",B="\\u200d",Y="(?:"+_a+"|"+As+")",j="(?:"+w+"|"+As+")",vt="(?:"+Fn+"(?:d|ll|m|re|s|t|ve))?",te="(?:"+Fn+"(?:D|LL|M|RE|S|T|VE))?",le=El+"?",xe="["+Pn+"]?",br="(?:"+B+"(?:"+[Tu,y,x].join("|")+")"+xe+le+")*",zm="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",$m="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ap=xe+le+br,Gm="(?:"+[xl,y,x].join("|")+")"+ap,Ym="(?:"+[Tu+Mi+"?",Mi,y,x,Ta].join("|")+")",Xm=RegExp(Fn,"g"),Zm=RegExp(Mi,"g"),Al=RegExp(ws+"(?="+ws+")|"+Ym+ap,"g"),Qm=RegExp([w+"?"+_a+"+"+vt+"(?="+[Es,w,"$"].join("|")+")",j+"+"+te+"(?="+[Es,w+Y,"$"].join("|")+")",w+"?"+Y+"+"+vt,w+"+"+te,$m,zm,$r,Gm].join("|"),"g"),Km=RegExp("["+B+Ni+wr+Pn+"]"),jm=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Jm=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],tv=-1,Vt={};Vt[tn]=Vt[en]=Vt[ui]=Vt[Si]=Vt[Nn]=Vt[U]=Vt[it]=Vt[at]=Vt[bt]=!0,Vt[ue]=Vt[Se]=Vt[sr]=Vt[Xt]=Vt[Ye]=Vt[Ct]=Vt[Oe]=Vt[Pe]=Vt[Kt]=Vt[Ne]=Vt[Zt]=Vt[oe]=Vt[Dt]=Vt[nr]=Vt[Er]=!1;var Ht={};Ht[ue]=Ht[Se]=Ht[sr]=Ht[Ye]=Ht[Xt]=Ht[Ct]=Ht[tn]=Ht[en]=Ht[ui]=Ht[Si]=Ht[Nn]=Ht[Kt]=Ht[Ne]=Ht[Zt]=Ht[oe]=Ht[Dt]=Ht[nr]=Ht[Ge]=Ht[U]=Ht[it]=Ht[at]=Ht[bt]=!0,Ht[Oe]=Ht[Pe]=Ht[Er]=!1;var ev={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},rv={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},iv={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},nv={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},sv=parseFloat,av=parseInt,up=typeof Fs=="object"&&Fs&&Fs.Object===Object&&Fs,uv=typeof self=="object"&&self&&self.Object===Object&&self,be=up||uv||Function("return this")(),wl=t&&!t.nodeType&&t,Un=wl&&!0&&r&&!r.nodeType&&r,op=Un&&Un.exports===wl,bl=op&&up.process,Tr=function(){try{var D=Un&&Un.require&&Un.require("util").types;return D||bl&&bl.binding&&bl.binding("util")}catch{}}(),lp=Tr&&Tr.isArrayBuffer,hp=Tr&&Tr.isDate,cp=Tr&&Tr.isMap,fp=Tr&&Tr.isRegExp,pp=Tr&&Tr.isSet,dp=Tr&&Tr.isTypedArray;function or(D,k,I){switch(I.length){case 0:return D.call(k);case 1:return D.call(k,I[0]);case 2:return D.call(k,I[0],I[1]);case 3:return D.call(k,I[0],I[1],I[2])}return D.apply(k,I)}function ov(D,k,I,et){for(var pt=-1,Mt=D==null?0:D.length;++pt<Mt;){var pe=D[pt];k(et,pe,I(pe),D)}return et}function _r(D,k){for(var I=-1,et=D==null?0:D.length;++I<et&&k(D[I],I,D)!==!1;);return D}function lv(D,k){for(var I=D==null?0:D.length;I--&&k(D[I],I,D)!==!1;);return D}function gp(D,k){for(var I=-1,et=D==null?0:D.length;++I<et;)if(!k(D[I],I,D))return!1;return!0}function ln(D,k){for(var I=-1,et=D==null?0:D.length,pt=0,Mt=[];++I<et;){var pe=D[I];k(pe,I,D)&&(Mt[pt++]=pe)}return Mt}function _u(D,k){var I=D==null?0:D.length;return!!I&&bs(D,k,0)>-1}function Tl(D,k,I){for(var et=-1,pt=D==null?0:D.length;++et<pt;)if(I(k,D[et]))return!0;return!1}function Gt(D,k){for(var I=-1,et=D==null?0:D.length,pt=Array(et);++I<et;)pt[I]=k(D[I],I,D);return pt}function hn(D,k){for(var I=-1,et=k.length,pt=D.length;++I<et;)D[pt+I]=k[I];return D}function _l(D,k,I,et){var pt=-1,Mt=D==null?0:D.length;for(et&&Mt&&(I=D[++pt]);++pt<Mt;)I=k(I,D[pt],pt,D);return I}function hv(D,k,I,et){var pt=D==null?0:D.length;for(et&&pt&&(I=D[--pt]);pt--;)I=k(I,D[pt],pt,D);return I}function Cl(D,k){for(var I=-1,et=D==null?0:D.length;++I<et;)if(k(D[I],I,D))return!0;return!1}var cv=Dl("length");function fv(D){return D.split("")}function pv(D){return D.match(ml)||[]}function yp(D,k,I){var et;return I(D,function(pt,Mt,pe){if(k(pt,Mt,pe))return et=Mt,!1}),et}function Cu(D,k,I,et){for(var pt=D.length,Mt=I+(et?1:-1);et?Mt--:++Mt<pt;)if(k(D[Mt],Mt,D))return Mt;return-1}function bs(D,k,I){return k===k?_v(D,k,I):Cu(D,mp,I)}function dv(D,k,I,et){for(var pt=I-1,Mt=D.length;++pt<Mt;)if(et(D[pt],k))return pt;return-1}function mp(D){return D!==D}function vp(D,k){var I=D==null?0:D.length;return I?Ol(D,k)/I:we}function Dl(D){return function(k){return k==null?e:k[D]}}function Sl(D){return function(k){return D==null?e:D[k]}}function xp(D,k,I,et,pt){return pt(D,function(Mt,pe,kt){I=et?(et=!1,Mt):k(I,Mt,pe,kt)}),I}function gv(D,k){var I=D.length;for(D.sort(k);I--;)D[I]=D[I].value;return D}function Ol(D,k){for(var I,et=-1,pt=D.length;++et<pt;){var Mt=k(D[et]);Mt!==e&&(I=I===e?Mt:I+Mt)}return I}function Nl(D,k){for(var I=-1,et=Array(D);++I<D;)et[I]=k(I);return et}function yv(D,k){return Gt(k,function(I){return[I,D[I]]})}function Ep(D){return D&&D.slice(0,Tp(D)+1).replace(xa,"")}function lr(D){return function(k){return D(k)}}function Ml(D,k){return Gt(k,function(I){return D[I]})}function Ca(D,k){return D.has(k)}function Ap(D,k){for(var I=-1,et=D.length;++I<et&&bs(k,D[I],0)>-1;);return I}function wp(D,k){for(var I=D.length;I--&&bs(k,D[I],0)>-1;);return I}function mv(D,k){for(var I=D.length,et=0;I--;)D[I]===k&&++et;return et}var vv=Sl(ev),xv=Sl(rv);function Ev(D){return"\\"+nv[D]}function Av(D,k){return D==null?e:D[k]}function Ts(D){return Km.test(D)}function wv(D){return jm.test(D)}function bv(D){for(var k,I=[];!(k=D.next()).done;)I.push(k.value);return I}function Bl(D){var k=-1,I=Array(D.size);return D.forEach(function(et,pt){I[++k]=[pt,et]}),I}function bp(D,k){return function(I){return D(k(I))}}function cn(D,k){for(var I=-1,et=D.length,pt=0,Mt=[];++I<et;){var pe=D[I];(pe===k||pe===g)&&(D[I]=g,Mt[pt++]=I)}return Mt}function Du(D){var k=-1,I=Array(D.size);return D.forEach(function(et){I[++k]=et}),I}function Tv(D){var k=-1,I=Array(D.size);return D.forEach(function(et){I[++k]=[et,et]}),I}function _v(D,k,I){for(var et=I-1,pt=D.length;++et<pt;)if(D[et]===k)return et;return-1}function Cv(D,k,I){for(var et=I+1;et--;)if(D[et]===k)return et;return et}function _s(D){return Ts(D)?Sv(D):cv(D)}function Gr(D){return Ts(D)?Ov(D):fv(D)}function Tp(D){for(var k=D.length;k--&&mu.test(D.charAt(k)););return k}var Dv=Sl(iv);function Sv(D){for(var k=Al.lastIndex=0;Al.test(D);)++k;return k}function Ov(D){return D.match(Al)||[]}function Nv(D){return D.match(Qm)||[]}var Mv=function D(k){k=k==null?be:Cs.defaults(be.Object(),k,Cs.pick(be,Jm));var I=k.Array,et=k.Date,pt=k.Error,Mt=k.Function,pe=k.Math,kt=k.Object,Il=k.RegExp,Bv=k.String,Cr=k.TypeError,Su=I.prototype,Iv=Mt.prototype,Ds=kt.prototype,Ou=k["__core-js_shared__"],Nu=Iv.toString,Lt=Ds.hasOwnProperty,Rv=0,_p=function(){var n=/[^.]+$/.exec(Ou&&Ou.keys&&Ou.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),Mu=Ds.toString,Lv=Nu.call(kt),Pv=be._,Fv=Il("^"+Nu.call(Lt).replace(an,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Bu=op?k.Buffer:e,fn=k.Symbol,Iu=k.Uint8Array,Cp=Bu?Bu.allocUnsafe:e,Ru=bp(kt.getPrototypeOf,kt),Dp=kt.create,Sp=Ds.propertyIsEnumerable,Lu=Su.splice,Op=fn?fn.isConcatSpreadable:e,Da=fn?fn.iterator:e,kn=fn?fn.toStringTag:e,Pu=function(){try{var n=zn(kt,"defineProperty");return n({},"",{}),n}catch{}}(),Uv=k.clearTimeout!==be.clearTimeout&&k.clearTimeout,kv=et&&et.now!==be.Date.now&&et.now,Hv=k.setTimeout!==be.setTimeout&&k.setTimeout,Fu=pe.ceil,Uu=pe.floor,Rl=kt.getOwnPropertySymbols,qv=Bu?Bu.isBuffer:e,Np=k.isFinite,Wv=Su.join,Vv=bp(kt.keys,kt),de=pe.max,Be=pe.min,zv=et.now,$v=k.parseInt,Mp=pe.random,Gv=Su.reverse,Ll=zn(k,"DataView"),Sa=zn(k,"Map"),Pl=zn(k,"Promise"),Ss=zn(k,"Set"),Oa=zn(k,"WeakMap"),Na=zn(kt,"create"),ku=Oa&&new Oa,Os={},Yv=$n(Ll),Xv=$n(Sa),Zv=$n(Pl),Qv=$n(Ss),Kv=$n(Oa),Hu=fn?fn.prototype:e,Ma=Hu?Hu.valueOf:e,Bp=Hu?Hu.toString:e;function m(n){if(jt(n)&&!dt(n)&&!(n instanceof wt)){if(n instanceof Dr)return n;if(Lt.call(n,"__wrapped__"))return Id(n)}return new Dr(n)}var Ns=function(){function n(){}return function(s){if(!Qt(s))return{};if(Dp)return Dp(s);n.prototype=s;var o=new n;return n.prototype=e,o}}();function qu(){}function Dr(n,s){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!s,this.__index__=0,this.__values__=e}m.templateSettings={escape:nn,evaluate:oi,interpolate:Bn,variable:"",imports:{_:m}},m.prototype=qu.prototype,m.prototype.constructor=m,Dr.prototype=Ns(qu.prototype),Dr.prototype.constructor=Dr;function wt(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ae,this.__views__=[]}function jv(){var n=new wt(this.__wrapped__);return n.__actions__=Qe(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Qe(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Qe(this.__views__),n}function Jv(){if(this.__filtered__){var n=new wt(this);n.__dir__=-1,n.__filtered__=!0}else n=this.clone(),n.__dir__*=-1;return n}function t1(){var n=this.__wrapped__.value(),s=this.__dir__,o=dt(n),h=s<0,p=o?n.length:0,v=fx(0,p,this.__views__),A=v.start,_=v.end,S=_-A,V=h?_:A-1,z=this.__iteratees__,$=z.length,Q=0,nt=Be(S,this.__takeCount__);if(!o||!h&&p==S&&nt==S)return rd(n,this.__actions__);var ot=[];t:for(;S--&&Q<nt;){V+=s;for(var xt=-1,lt=n[V];++xt<$;){var At=z[xt],Tt=At.iteratee,fr=At.type,ke=Tt(lt);if(fr==ft)lt=ke;else if(!ke){if(fr==ct)continue t;break t}}ot[Q++]=lt}return ot}wt.prototype=Ns(qu.prototype),wt.prototype.constructor=wt;function Hn(n){var s=-1,o=n==null?0:n.length;for(this.clear();++s<o;){var h=n[s];this.set(h[0],h[1])}}function e1(){this.__data__=Na?Na(null):{},this.size=0}function r1(n){var s=this.has(n)&&delete this.__data__[n];return this.size-=s?1:0,s}function i1(n){var s=this.__data__;if(Na){var o=s[n];return o===f?e:o}return Lt.call(s,n)?s[n]:e}function n1(n){var s=this.__data__;return Na?s[n]!==e:Lt.call(s,n)}function s1(n,s){var o=this.__data__;return this.size+=this.has(n)?0:1,o[n]=Na&&s===e?f:s,this}Hn.prototype.clear=e1,Hn.prototype.delete=r1,Hn.prototype.get=i1,Hn.prototype.has=n1,Hn.prototype.set=s1;function Bi(n){var s=-1,o=n==null?0:n.length;for(this.clear();++s<o;){var h=n[s];this.set(h[0],h[1])}}function a1(){this.__data__=[],this.size=0}function u1(n){var s=this.__data__,o=Wu(s,n);if(o<0)return!1;var h=s.length-1;return o==h?s.pop():Lu.call(s,o,1),--this.size,!0}function o1(n){var s=this.__data__,o=Wu(s,n);return o<0?e:s[o][1]}function l1(n){return Wu(this.__data__,n)>-1}function h1(n,s){var o=this.__data__,h=Wu(o,n);return h<0?(++this.size,o.push([n,s])):o[h][1]=s,this}Bi.prototype.clear=a1,Bi.prototype.delete=u1,Bi.prototype.get=o1,Bi.prototype.has=l1,Bi.prototype.set=h1;function Ii(n){var s=-1,o=n==null?0:n.length;for(this.clear();++s<o;){var h=n[s];this.set(h[0],h[1])}}function c1(){this.size=0,this.__data__={hash:new Hn,map:new(Sa||Bi),string:new Hn}}function f1(n){var s=to(this,n).delete(n);return this.size-=s?1:0,s}function p1(n){return to(this,n).get(n)}function d1(n){return to(this,n).has(n)}function g1(n,s){var o=to(this,n),h=o.size;return o.set(n,s),this.size+=o.size==h?0:1,this}Ii.prototype.clear=c1,Ii.prototype.delete=f1,Ii.prototype.get=p1,Ii.prototype.has=d1,Ii.prototype.set=g1;function qn(n){var s=-1,o=n==null?0:n.length;for(this.__data__=new Ii;++s<o;)this.add(n[s])}function y1(n){return this.__data__.set(n,f),this}function m1(n){return this.__data__.has(n)}qn.prototype.add=qn.prototype.push=y1,qn.prototype.has=m1;function Yr(n){var s=this.__data__=new Bi(n);this.size=s.size}function v1(){this.__data__=new Bi,this.size=0}function x1(n){var s=this.__data__,o=s.delete(n);return this.size=s.size,o}function E1(n){return this.__data__.get(n)}function A1(n){return this.__data__.has(n)}function w1(n,s){var o=this.__data__;if(o instanceof Bi){var h=o.__data__;if(!Sa||h.length<a-1)return h.push([n,s]),this.size=++o.size,this;o=this.__data__=new Ii(h)}return o.set(n,s),this.size=o.size,this}Yr.prototype.clear=v1,Yr.prototype.delete=x1,Yr.prototype.get=E1,Yr.prototype.has=A1,Yr.prototype.set=w1;function Ip(n,s){var o=dt(n),h=!o&&Gn(n),p=!o&&!h&&mn(n),v=!o&&!h&&!p&&Rs(n),A=o||h||p||v,_=A?Nl(n.length,Bv):[],S=_.length;for(var V in n)(s||Lt.call(n,V))&&!(A&&(V=="length"||p&&(V=="offset"||V=="parent")||v&&(V=="buffer"||V=="byteLength"||V=="byteOffset")||Fi(V,S)))&&_.push(V);return _}function Rp(n){var s=n.length;return s?n[Yl(0,s-1)]:e}function b1(n,s){return eo(Qe(n),Wn(s,0,n.length))}function T1(n){return eo(Qe(n))}function Fl(n,s,o){(o!==e&&!Xr(n[s],o)||o===e&&!(s in n))&&Ri(n,s,o)}function Ba(n,s,o){var h=n[s];(!(Lt.call(n,s)&&Xr(h,o))||o===e&&!(s in n))&&Ri(n,s,o)}function Wu(n,s){for(var o=n.length;o--;)if(Xr(n[o][0],s))return o;return-1}function _1(n,s,o,h){return pn(n,function(p,v,A){s(h,p,o(p),A)}),h}function Lp(n,s){return n&&ci(s,Ee(s),n)}function C1(n,s){return n&&ci(s,je(s),n)}function Ri(n,s,o){s=="__proto__"&&Pu?Pu(n,s,{configurable:!0,enumerable:!0,value:o,writable:!0}):n[s]=o}function Ul(n,s){for(var o=-1,h=s.length,p=I(h),v=n==null;++o<h;)p[o]=v?e:vh(n,s[o]);return p}function Wn(n,s,o){return n===n&&(o!==e&&(n=n<=o?n:o),s!==e&&(n=n>=s?n:s)),n}function Sr(n,s,o,h,p,v){var A,_=s&E,S=s&T,V=s&C;if(o&&(A=p?o(n,h,p,v):o(n)),A!==e)return A;if(!Qt(n))return n;var z=dt(n);if(z){if(A=dx(n),!_)return Qe(n,A)}else{var $=Ie(n),Q=$==Pe||$==$e;if(mn(n))return sd(n,_);if($==Zt||$==ue||Q&&!p){if(A=S||Q?{}:Td(n),!_)return S?ix(n,C1(A,n)):rx(n,Lp(A,n))}else{if(!Ht[$])return p?n:{};A=gx(n,$,_)}}v||(v=new Yr);var nt=v.get(n);if(nt)return nt;v.set(n,A),Jd(n)?n.forEach(function(lt){A.add(Sr(lt,s,o,lt,n,v))}):Kd(n)&&n.forEach(function(lt,At){A.set(At,Sr(lt,s,o,At,n,v))});var ot=V?S?nh:ih:S?je:Ee,xt=z?e:ot(n);return _r(xt||n,function(lt,At){xt&&(At=lt,lt=n[At]),Ba(A,At,Sr(lt,s,o,At,n,v))}),A}function D1(n){var s=Ee(n);return function(o){return Pp(o,n,s)}}function Pp(n,s,o){var h=o.length;if(n==null)return!h;for(n=kt(n);h--;){var p=o[h],v=s[p],A=n[p];if(A===e&&!(p in n)||!v(A))return!1}return!0}function Fp(n,s,o){if(typeof n!="function")throw new Cr(l);return ka(function(){n.apply(e,o)},s)}function Ia(n,s,o,h){var p=-1,v=_u,A=!0,_=n.length,S=[],V=s.length;if(!_)return S;o&&(s=Gt(s,lr(o))),h?(v=Tl,A=!1):s.length>=a&&(v=Ca,A=!1,s=new qn(s));t:for(;++p<_;){var z=n[p],$=o==null?z:o(z);if(z=h||z!==0?z:0,A&&$===$){for(var Q=V;Q--;)if(s[Q]===$)continue t;S.push(z)}else v(s,$,h)||S.push(z)}return S}var pn=hd(hi),Up=hd(Hl,!0);function S1(n,s){var o=!0;return pn(n,function(h,p,v){return o=!!s(h,p,v),o}),o}function Vu(n,s,o){for(var h=-1,p=n.length;++h<p;){var v=n[h],A=s(v);if(A!=null&&(_===e?A===A&&!cr(A):o(A,_)))var _=A,S=v}return S}function O1(n,s,o,h){var p=n.length;for(o=gt(o),o<0&&(o=-o>p?0:p+o),h=h===e||h>p?p:gt(h),h<0&&(h+=p),h=o>h?0:eg(h);o<h;)n[o++]=s;return n}function kp(n,s){var o=[];return pn(n,function(h,p,v){s(h,p,v)&&o.push(h)}),o}function Te(n,s,o,h,p){var v=-1,A=n.length;for(o||(o=mx),p||(p=[]);++v<A;){var _=n[v];s>0&&o(_)?s>1?Te(_,s-1,o,h,p):hn(p,_):h||(p[p.length]=_)}return p}var kl=cd(),Hp=cd(!0);function hi(n,s){return n&&kl(n,s,Ee)}function Hl(n,s){return n&&Hp(n,s,Ee)}function zu(n,s){return ln(s,function(o){return Ui(n[o])})}function Vn(n,s){s=gn(s,n);for(var o=0,h=s.length;n!=null&&o<h;)n=n[fi(s[o++])];return o&&o==h?n:e}function qp(n,s,o){var h=s(n);return dt(n)?h:hn(h,o(n))}function Fe(n){return n==null?n===e?Di:ve:kn&&kn in kt(n)?cx(n):Tx(n)}function ql(n,s){return n>s}function N1(n,s){return n!=null&&Lt.call(n,s)}function M1(n,s){return n!=null&&s in kt(n)}function B1(n,s,o){return n>=Be(s,o)&&n<de(s,o)}function Wl(n,s,o){for(var h=o?Tl:_u,p=n[0].length,v=n.length,A=v,_=I(v),S=1/0,V=[];A--;){var z=n[A];A&&s&&(z=Gt(z,lr(s))),S=Be(z.length,S),_[A]=!o&&(s||p>=120&&z.length>=120)?new qn(A&&z):e}z=n[0];var $=-1,Q=_[0];t:for(;++$<p&&V.length<S;){var nt=z[$],ot=s?s(nt):nt;if(nt=o||nt!==0?nt:0,!(Q?Ca(Q,ot):h(V,ot,o))){for(A=v;--A;){var xt=_[A];if(!(xt?Ca(xt,ot):h(n[A],ot,o)))continue t}Q&&Q.push(ot),V.push(nt)}}return V}function I1(n,s,o,h){return hi(n,function(p,v,A){s(h,o(p),v,A)}),h}function Ra(n,s,o){s=gn(s,n),n=Sd(n,s);var h=n==null?n:n[fi(Nr(s))];return h==null?e:or(h,n,o)}function Wp(n){return jt(n)&&Fe(n)==ue}function R1(n){return jt(n)&&Fe(n)==sr}function L1(n){return jt(n)&&Fe(n)==Ct}function La(n,s,o,h,p){return n===s?!0:n==null||s==null||!jt(n)&&!jt(s)?n!==n&&s!==s:P1(n,s,o,h,La,p)}function P1(n,s,o,h,p,v){var A=dt(n),_=dt(s),S=A?Se:Ie(n),V=_?Se:Ie(s);S=S==ue?Zt:S,V=V==ue?Zt:V;var z=S==Zt,$=V==Zt,Q=S==V;if(Q&&mn(n)){if(!mn(s))return!1;A=!0,z=!1}if(Q&&!z)return v||(v=new Yr),A||Rs(n)?Ad(n,s,o,h,p,v):lx(n,s,S,o,h,p,v);if(!(o&L)){var nt=z&&Lt.call(n,"__wrapped__"),ot=$&&Lt.call(s,"__wrapped__");if(nt||ot){var xt=nt?n.value():n,lt=ot?s.value():s;return v||(v=new Yr),p(xt,lt,o,h,v)}}return Q?(v||(v=new Yr),hx(n,s,o,h,p,v)):!1}function F1(n){return jt(n)&&Ie(n)==Kt}function Vl(n,s,o,h){var p=o.length,v=p,A=!h;if(n==null)return!v;for(n=kt(n);p--;){var _=o[p];if(A&&_[2]?_[1]!==n[_[0]]:!(_[0]in n))return!1}for(;++p<v;){_=o[p];var S=_[0],V=n[S],z=_[1];if(A&&_[2]){if(V===e&&!(S in n))return!1}else{var $=new Yr;if(h)var Q=h(V,z,S,n,s,$);if(!(Q===e?La(z,V,L|N,h,$):Q))return!1}}return!0}function Vp(n){if(!Qt(n)||xx(n))return!1;var s=Ui(n)?Fv:Rn;return s.test($n(n))}function U1(n){return jt(n)&&Fe(n)==oe}function k1(n){return jt(n)&&Ie(n)==Dt}function H1(n){return jt(n)&&uo(n.length)&&!!Vt[Fe(n)]}function zp(n){return typeof n=="function"?n:n==null?Je:typeof n=="object"?dt(n)?Yp(n[0],n[1]):Gp(n):fg(n)}function zl(n){if(!Ua(n))return Vv(n);var s=[];for(var o in kt(n))Lt.call(n,o)&&o!="constructor"&&s.push(o);return s}function q1(n){if(!Qt(n))return bx(n);var s=Ua(n),o=[];for(var h in n)h=="constructor"&&(s||!Lt.call(n,h))||o.push(h);return o}function $l(n,s){return n<s}function $p(n,s){var o=-1,h=Ke(n)?I(n.length):[];return pn(n,function(p,v,A){h[++o]=s(p,v,A)}),h}function Gp(n){var s=ah(n);return s.length==1&&s[0][2]?Cd(s[0][0],s[0][1]):function(o){return o===n||Vl(o,n,s)}}function Yp(n,s){return oh(n)&&_d(s)?Cd(fi(n),s):function(o){var h=vh(o,n);return h===e&&h===s?xh(o,n):La(s,h,L|N)}}function $u(n,s,o,h,p){n!==s&&kl(s,function(v,A){if(p||(p=new Yr),Qt(v))W1(n,s,A,o,$u,h,p);else{var _=h?h(hh(n,A),v,A+"",n,s,p):e;_===e&&(_=v),Fl(n,A,_)}},je)}function W1(n,s,o,h,p,v,A){var _=hh(n,o),S=hh(s,o),V=A.get(S);if(V){Fl(n,o,V);return}var z=v?v(_,S,o+"",n,s,A):e,$=z===e;if($){var Q=dt(S),nt=!Q&&mn(S),ot=!Q&&!nt&&Rs(S);z=S,Q||nt||ot?dt(_)?z=_:ee(_)?z=Qe(_):nt?($=!1,z=sd(S,!0)):ot?($=!1,z=ad(S,!0)):z=[]:Ha(S)||Gn(S)?(z=_,Gn(_)?z=rg(_):(!Qt(_)||Ui(_))&&(z=Td(S))):$=!1}$&&(A.set(S,z),p(z,S,h,v,A),A.delete(S)),Fl(n,o,z)}function Xp(n,s){var o=n.length;if(o)return s+=s<0?o:0,Fi(s,o)?n[s]:e}function Zp(n,s,o){s.length?s=Gt(s,function(v){return dt(v)?function(A){return Vn(A,v.length===1?v[0]:v)}:v}):s=[Je];var h=-1;s=Gt(s,lr(ut()));var p=$p(n,function(v,A,_){var S=Gt(s,function(V){return V(v)});return{criteria:S,index:++h,value:v}});return gv(p,function(v,A){return ex(v,A,o)})}function V1(n,s){return Qp(n,s,function(o,h){return xh(n,h)})}function Qp(n,s,o){for(var h=-1,p=s.length,v={};++h<p;){var A=s[h],_=Vn(n,A);o(_,A)&&Pa(v,gn(A,n),_)}return v}function z1(n){return function(s){return Vn(s,n)}}function Gl(n,s,o,h){var p=h?dv:bs,v=-1,A=s.length,_=n;for(n===s&&(s=Qe(s)),o&&(_=Gt(n,lr(o)));++v<A;)for(var S=0,V=s[v],z=o?o(V):V;(S=p(_,z,S,h))>-1;)_!==n&&Lu.call(_,S,1),Lu.call(n,S,1);return n}function Kp(n,s){for(var o=n?s.length:0,h=o-1;o--;){var p=s[o];if(o==h||p!==v){var v=p;Fi(p)?Lu.call(n,p,1):Ql(n,p)}}return n}function Yl(n,s){return n+Uu(Mp()*(s-n+1))}function $1(n,s,o,h){for(var p=-1,v=de(Fu((s-n)/(o||1)),0),A=I(v);v--;)A[h?v:++p]=n,n+=o;return A}function Xl(n,s){var o="";if(!n||s<1||s>Bt)return o;do s%2&&(o+=n),s=Uu(s/2),s&&(n+=n);while(s);return o}function Et(n,s){return ch(Dd(n,s,Je),n+"")}function G1(n){return Rp(Ls(n))}function Y1(n,s){var o=Ls(n);return eo(o,Wn(s,0,o.length))}function Pa(n,s,o,h){if(!Qt(n))return n;s=gn(s,n);for(var p=-1,v=s.length,A=v-1,_=n;_!=null&&++p<v;){var S=fi(s[p]),V=o;if(S==="__proto__"||S==="constructor"||S==="prototype")return n;if(p!=A){var z=_[S];V=h?h(z,S,_):e,V===e&&(V=Qt(z)?z:Fi(s[p+1])?[]:{})}Ba(_,S,V),_=_[S]}return n}var jp=ku?function(n,s){return ku.set(n,s),n}:Je,X1=Pu?function(n,s){return Pu(n,"toString",{configurable:!0,enumerable:!1,value:Ah(s),writable:!0})}:Je;function Z1(n){return eo(Ls(n))}function Or(n,s,o){var h=-1,p=n.length;s<0&&(s=-s>p?0:p+s),o=o>p?p:o,o<0&&(o+=p),p=s>o?0:o-s>>>0,s>>>=0;for(var v=I(p);++h<p;)v[h]=n[h+s];return v}function Q1(n,s){var o;return pn(n,function(h,p,v){return o=s(h,p,v),!o}),!!o}function Gu(n,s,o){var h=0,p=n==null?h:n.length;if(typeof s=="number"&&s===s&&p<=Vr){for(;h<p;){var v=h+p>>>1,A=n[v];A!==null&&!cr(A)&&(o?A<=s:A<s)?h=v+1:p=v}return p}return Zl(n,s,Je,o)}function Zl(n,s,o,h){var p=0,v=n==null?0:n.length;if(v===0)return 0;s=o(s);for(var A=s!==s,_=s===null,S=cr(s),V=s===e;p<v;){var z=Uu((p+v)/2),$=o(n[z]),Q=$!==e,nt=$===null,ot=$===$,xt=cr($);if(A)var lt=h||ot;else V?lt=ot&&(h||Q):_?lt=ot&&Q&&(h||!nt):S?lt=ot&&Q&&!nt&&(h||!xt):nt||xt?lt=!1:lt=h?$<=s:$<s;lt?p=z+1:v=z}return Be(v,me)}function Jp(n,s){for(var o=-1,h=n.length,p=0,v=[];++o<h;){var A=n[o],_=s?s(A):A;if(!o||!Xr(_,S)){var S=_;v[p++]=A===0?0:A}}return v}function td(n){return typeof n=="number"?n:cr(n)?we:+n}function hr(n){if(typeof n=="string")return n;if(dt(n))return Gt(n,hr)+"";if(cr(n))return Bp?Bp.call(n):"";var s=n+"";return s=="0"&&1/n==-yt?"-0":s}function dn(n,s,o){var h=-1,p=_u,v=n.length,A=!0,_=[],S=_;if(o)A=!1,p=Tl;else if(v>=a){var V=s?null:ux(n);if(V)return Du(V);A=!1,p=Ca,S=new qn}else S=s?[]:_;t:for(;++h<v;){var z=n[h],$=s?s(z):z;if(z=o||z!==0?z:0,A&&$===$){for(var Q=S.length;Q--;)if(S[Q]===$)continue t;s&&S.push($),_.push(z)}else p(S,$,o)||(S!==_&&S.push($),_.push(z))}return _}function Ql(n,s){return s=gn(s,n),n=Sd(n,s),n==null||delete n[fi(Nr(s))]}function ed(n,s,o,h){return Pa(n,s,o(Vn(n,s)),h)}function Yu(n,s,o,h){for(var p=n.length,v=h?p:-1;(h?v--:++v<p)&&s(n[v],v,n););return o?Or(n,h?0:v,h?v+1:p):Or(n,h?v+1:0,h?p:v)}function rd(n,s){var o=n;return o instanceof wt&&(o=o.value()),_l(s,function(h,p){return p.func.apply(p.thisArg,hn([h],p.args))},o)}function Kl(n,s,o){var h=n.length;if(h<2)return h?dn(n[0]):[];for(var p=-1,v=I(h);++p<h;)for(var A=n[p],_=-1;++_<h;)_!=p&&(v[p]=Ia(v[p]||A,n[_],s,o));return dn(Te(v,1),s,o)}function id(n,s,o){for(var h=-1,p=n.length,v=s.length,A={};++h<p;){var _=h<v?s[h]:e;o(A,n[h],_)}return A}function jl(n){return ee(n)?n:[]}function Jl(n){return typeof n=="function"?n:Je}function gn(n,s){return dt(n)?n:oh(n,s)?[n]:Bd(It(n))}var K1=Et;function yn(n,s,o){var h=n.length;return o=o===e?h:o,!s&&o>=h?n:Or(n,s,o)}var nd=Uv||function(n){return be.clearTimeout(n)};function sd(n,s){if(s)return n.slice();var o=n.length,h=Cp?Cp(o):new n.constructor(o);return n.copy(h),h}function th(n){var s=new n.constructor(n.byteLength);return new Iu(s).set(new Iu(n)),s}function j1(n,s){var o=s?th(n.buffer):n.buffer;return new n.constructor(o,n.byteOffset,n.byteLength)}function J1(n){var s=new n.constructor(n.source,Aa.exec(n));return s.lastIndex=n.lastIndex,s}function tx(n){return Ma?kt(Ma.call(n)):{}}function ad(n,s){var o=s?th(n.buffer):n.buffer;return new n.constructor(o,n.byteOffset,n.length)}function ud(n,s){if(n!==s){var o=n!==e,h=n===null,p=n===n,v=cr(n),A=s!==e,_=s===null,S=s===s,V=cr(s);if(!_&&!V&&!v&&n>s||v&&A&&S&&!_&&!V||h&&A&&S||!o&&S||!p)return 1;if(!h&&!v&&!V&&n<s||V&&o&&p&&!h&&!v||_&&o&&p||!A&&p||!S)return-1}return 0}function ex(n,s,o){for(var h=-1,p=n.criteria,v=s.criteria,A=p.length,_=o.length;++h<A;){var S=ud(p[h],v[h]);if(S){if(h>=_)return S;var V=o[h];return S*(V=="desc"?-1:1)}}return n.index-s.index}function od(n,s,o,h){for(var p=-1,v=n.length,A=o.length,_=-1,S=s.length,V=de(v-A,0),z=I(S+V),$=!h;++_<S;)z[_]=s[_];for(;++p<A;)($||p<v)&&(z[o[p]]=n[p]);for(;V--;)z[_++]=n[p++];return z}function ld(n,s,o,h){for(var p=-1,v=n.length,A=-1,_=o.length,S=-1,V=s.length,z=de(v-_,0),$=I(z+V),Q=!h;++p<z;)$[p]=n[p];for(var nt=p;++S<V;)$[nt+S]=s[S];for(;++A<_;)(Q||p<v)&&($[nt+o[A]]=n[p++]);return $}function Qe(n,s){var o=-1,h=n.length;for(s||(s=I(h));++o<h;)s[o]=n[o];return s}function ci(n,s,o,h){var p=!o;o||(o={});for(var v=-1,A=s.length;++v<A;){var _=s[v],S=h?h(o[_],n[_],_,o,n):e;S===e&&(S=n[_]),p?Ri(o,_,S):Ba(o,_,S)}return o}function rx(n,s){return ci(n,uh(n),s)}function ix(n,s){return ci(n,wd(n),s)}function Xu(n,s){return function(o,h){var p=dt(o)?ov:_1,v=s?s():{};return p(o,n,ut(h,2),v)}}function Ms(n){return Et(function(s,o){var h=-1,p=o.length,v=p>1?o[p-1]:e,A=p>2?o[2]:e;for(v=n.length>3&&typeof v=="function"?(p--,v):e,A&&Ue(o[0],o[1],A)&&(v=p<3?e:v,p=1),s=kt(s);++h<p;){var _=o[h];_&&n(s,_,h,v)}return s})}function hd(n,s){return function(o,h){if(o==null)return o;if(!Ke(o))return n(o,h);for(var p=o.length,v=s?p:-1,A=kt(o);(s?v--:++v<p)&&h(A[v],v,A)!==!1;);return o}}function cd(n){return function(s,o,h){for(var p=-1,v=kt(s),A=h(s),_=A.length;_--;){var S=A[n?_:++p];if(o(v[S],S,v)===!1)break}return s}}function nx(n,s,o){var h=s&M,p=Fa(n);function v(){var A=this&&this!==be&&this instanceof v?p:n;return A.apply(h?o:this,arguments)}return v}function fd(n){return function(s){s=It(s);var o=Ts(s)?Gr(s):e,h=o?o[0]:s.charAt(0),p=o?yn(o,1).join(""):s.slice(1);return h[n]()+p}}function Bs(n){return function(s){return _l(hg(lg(s).replace(Xm,"")),n,"")}}function Fa(n){return function(){var s=arguments;switch(s.length){case 0:return new n;case 1:return new n(s[0]);case 2:return new n(s[0],s[1]);case 3:return new n(s[0],s[1],s[2]);case 4:return new n(s[0],s[1],s[2],s[3]);case 5:return new n(s[0],s[1],s[2],s[3],s[4]);case 6:return new n(s[0],s[1],s[2],s[3],s[4],s[5]);case 7:return new n(s[0],s[1],s[2],s[3],s[4],s[5],s[6])}var o=Ns(n.prototype),h=n.apply(o,s);return Qt(h)?h:o}}function sx(n,s,o){var h=Fa(n);function p(){for(var v=arguments.length,A=I(v),_=v,S=Is(p);_--;)A[_]=arguments[_];var V=v<3&&A[0]!==S&&A[v-1]!==S?[]:cn(A,S);if(v-=V.length,v<o)return md(n,s,Zu,p.placeholder,e,A,V,e,e,o-v);var z=this&&this!==be&&this instanceof p?h:n;return or(z,this,A)}return p}function pd(n){return function(s,o,h){var p=kt(s);if(!Ke(s)){var v=ut(o,3);s=Ee(s),o=function(_){return v(p[_],_,p)}}var A=n(s,o,h);return A>-1?p[v?s[A]:A]:e}}function dd(n){return Pi(function(s){var o=s.length,h=o,p=Dr.prototype.thru;for(n&&s.reverse();h--;){var v=s[h];if(typeof v!="function")throw new Cr(l);if(p&&!A&&Ju(v)=="wrapper")var A=new Dr([],!0)}for(h=A?h:o;++h<o;){v=s[h];var _=Ju(v),S=_=="wrapper"?sh(v):e;S&&lh(S[0])&&S[1]==(K|G|P|tt)&&!S[4].length&&S[9]==1?A=A[Ju(S[0])].apply(A,S[3]):A=v.length==1&&lh(v)?A[_]():A.thru(v)}return function(){var V=arguments,z=V[0];if(A&&V.length==1&&dt(z))return A.plant(z).value();for(var $=0,Q=o?s[$].apply(this,V):z;++$<o;)Q=s[$].call(this,Q);return Q}})}function Zu(n,s,o,h,p,v,A,_,S,V){var z=s&K,$=s&M,Q=s&R,nt=s&(G|b),ot=s&Z,xt=Q?e:Fa(n);function lt(){for(var At=arguments.length,Tt=I(At),fr=At;fr--;)Tt[fr]=arguments[fr];if(nt)var ke=Is(lt),pr=mv(Tt,ke);if(h&&(Tt=od(Tt,h,p,nt)),v&&(Tt=ld(Tt,v,A,nt)),At-=pr,nt&&At<V){var re=cn(Tt,ke);return md(n,s,Zu,lt.placeholder,o,Tt,re,_,S,V-At)}var Zr=$?o:this,Hi=Q?Zr[n]:n;return At=Tt.length,_?Tt=_x(Tt,_):ot&&At>1&&Tt.reverse(),z&&S<At&&(Tt.length=S),this&&this!==be&&this instanceof lt&&(Hi=xt||Fa(Hi)),Hi.apply(Zr,Tt)}return lt}function gd(n,s){return function(o,h){return I1(o,n,s(h),{})}}function Qu(n,s){return function(o,h){var p;if(o===e&&h===e)return s;if(o!==e&&(p=o),h!==e){if(p===e)return h;typeof o=="string"||typeof h=="string"?(o=hr(o),h=hr(h)):(o=td(o),h=td(h)),p=n(o,h)}return p}}function eh(n){return Pi(function(s){return s=Gt(s,lr(ut())),Et(function(o){var h=this;return n(s,function(p){return or(p,h,o)})})})}function Ku(n,s){s=s===e?" ":hr(s);var o=s.length;if(o<2)return o?Xl(s,n):s;var h=Xl(s,Fu(n/_s(s)));return Ts(s)?yn(Gr(h),0,n).join(""):h.slice(0,n)}function ax(n,s,o,h){var p=s&M,v=Fa(n);function A(){for(var _=-1,S=arguments.length,V=-1,z=h.length,$=I(z+S),Q=this&&this!==be&&this instanceof A?v:n;++V<z;)$[V]=h[V];for(;S--;)$[V++]=arguments[++_];return or(Q,p?o:this,$)}return A}function yd(n){return function(s,o,h){return h&&typeof h!="number"&&Ue(s,o,h)&&(o=h=e),s=ki(s),o===e?(o=s,s=0):o=ki(o),h=h===e?s<o?1:-1:ki(h),$1(s,o,h,n)}}function ju(n){return function(s,o){return typeof s=="string"&&typeof o=="string"||(s=Mr(s),o=Mr(o)),n(s,o)}}function md(n,s,o,h,p,v,A,_,S,V){var z=s&G,$=z?A:e,Q=z?e:A,nt=z?v:e,ot=z?e:v;s|=z?P:H,s&=~(z?H:P),s&W||(s&=~(M|R));var xt=[n,s,p,nt,$,ot,Q,_,S,V],lt=o.apply(e,xt);return lh(n)&&Od(lt,xt),lt.placeholder=h,Nd(lt,n,s)}function rh(n){var s=pe[n];return function(o,h){if(o=Mr(o),h=h==null?0:Be(gt(h),292),h&&Np(o)){var p=(It(o)+"e").split("e"),v=s(p[0]+"e"+(+p[1]+h));return p=(It(v)+"e").split("e"),+(p[0]+"e"+(+p[1]-h))}return s(o)}}var ux=Ss&&1/Du(new Ss([,-0]))[1]==yt?function(n){return new Ss(n)}:Th;function vd(n){return function(s){var o=Ie(s);return o==Kt?Bl(s):o==Dt?Tv(s):yv(s,n(s))}}function Li(n,s,o,h,p,v,A,_){var S=s&R;if(!S&&typeof n!="function")throw new Cr(l);var V=h?h.length:0;if(V||(s&=~(P|H),h=p=e),A=A===e?A:de(gt(A),0),_=_===e?_:gt(_),V-=p?p.length:0,s&H){var z=h,$=p;h=p=e}var Q=S?e:sh(n),nt=[n,s,o,h,p,z,$,v,A,_];if(Q&&wx(nt,Q),n=nt[0],s=nt[1],o=nt[2],h=nt[3],p=nt[4],_=nt[9]=nt[9]===e?S?0:n.length:de(nt[9]-V,0),!_&&s&(G|b)&&(s&=~(G|b)),!s||s==M)var ot=nx(n,s,o);else s==G||s==b?ot=sx(n,s,_):(s==P||s==(M|P))&&!p.length?ot=ax(n,s,o,h):ot=Zu.apply(e,nt);var xt=Q?jp:Od;return Nd(xt(ot,nt),n,s)}function xd(n,s,o,h){return n===e||Xr(n,Ds[o])&&!Lt.call(h,o)?s:n}function Ed(n,s,o,h,p,v){return Qt(n)&&Qt(s)&&(v.set(s,n),$u(n,s,e,Ed,v),v.delete(s)),n}function ox(n){return Ha(n)?e:n}function Ad(n,s,o,h,p,v){var A=o&L,_=n.length,S=s.length;if(_!=S&&!(A&&S>_))return!1;var V=v.get(n),z=v.get(s);if(V&&z)return V==s&&z==n;var $=-1,Q=!0,nt=o&N?new qn:e;for(v.set(n,s),v.set(s,n);++$<_;){var ot=n[$],xt=s[$];if(h)var lt=A?h(xt,ot,$,s,n,v):h(ot,xt,$,n,s,v);if(lt!==e){if(lt)continue;Q=!1;break}if(nt){if(!Cl(s,function(At,Tt){if(!Ca(nt,Tt)&&(ot===At||p(ot,At,o,h,v)))return nt.push(Tt)})){Q=!1;break}}else if(!(ot===xt||p(ot,xt,o,h,v))){Q=!1;break}}return v.delete(n),v.delete(s),Q}function lx(n,s,o,h,p,v,A){switch(o){case Ye:if(n.byteLength!=s.byteLength||n.byteOffset!=s.byteOffset)return!1;n=n.buffer,s=s.buffer;case sr:return!(n.byteLength!=s.byteLength||!v(new Iu(n),new Iu(s)));case Xt:case Ct:case Ne:return Xr(+n,+s);case Oe:return n.name==s.name&&n.message==s.message;case oe:case nr:return n==s+"";case Kt:var _=Bl;case Dt:var S=h&L;if(_||(_=Du),n.size!=s.size&&!S)return!1;var V=A.get(n);if(V)return V==s;h|=N,A.set(n,s);var z=Ad(_(n),_(s),h,p,v,A);return A.delete(n),z;case Ge:if(Ma)return Ma.call(n)==Ma.call(s)}return!1}function hx(n,s,o,h,p,v){var A=o&L,_=ih(n),S=_.length,V=ih(s),z=V.length;if(S!=z&&!A)return!1;for(var $=S;$--;){var Q=_[$];if(!(A?Q in s:Lt.call(s,Q)))return!1}var nt=v.get(n),ot=v.get(s);if(nt&&ot)return nt==s&&ot==n;var xt=!0;v.set(n,s),v.set(s,n);for(var lt=A;++$<S;){Q=_[$];var At=n[Q],Tt=s[Q];if(h)var fr=A?h(Tt,At,Q,s,n,v):h(At,Tt,Q,n,s,v);if(!(fr===e?At===Tt||p(At,Tt,o,h,v):fr)){xt=!1;break}lt||(lt=Q=="constructor")}if(xt&&!lt){var ke=n.constructor,pr=s.constructor;ke!=pr&&"constructor"in n&&"constructor"in s&&!(typeof ke=="function"&&ke instanceof ke&&typeof pr=="function"&&pr instanceof pr)&&(xt=!1)}return v.delete(n),v.delete(s),xt}function Pi(n){return ch(Dd(n,e,Pd),n+"")}function ih(n){return qp(n,Ee,uh)}function nh(n){return qp(n,je,wd)}var sh=ku?function(n){return ku.get(n)}:Th;function Ju(n){for(var s=n.name+"",o=Os[s],h=Lt.call(Os,s)?o.length:0;h--;){var p=o[h],v=p.func;if(v==null||v==n)return p.name}return s}function Is(n){var s=Lt.call(m,"placeholder")?m:n;return s.placeholder}function ut(){var n=m.iteratee||wh;return n=n===wh?zp:n,arguments.length?n(arguments[0],arguments[1]):n}function to(n,s){var o=n.__data__;return vx(s)?o[typeof s=="string"?"string":"hash"]:o.map}function ah(n){for(var s=Ee(n),o=s.length;o--;){var h=s[o],p=n[h];s[o]=[h,p,_d(p)]}return s}function zn(n,s){var o=Av(n,s);return Vp(o)?o:e}function cx(n){var s=Lt.call(n,kn),o=n[kn];try{n[kn]=e;var h=!0}catch{}var p=Mu.call(n);return h&&(s?n[kn]=o:delete n[kn]),p}var uh=Rl?function(n){return n==null?[]:(n=kt(n),ln(Rl(n),function(s){return Sp.call(n,s)}))}:_h,wd=Rl?function(n){for(var s=[];n;)hn(s,uh(n)),n=Ru(n);return s}:_h,Ie=Fe;(Ll&&Ie(new Ll(new ArrayBuffer(1)))!=Ye||Sa&&Ie(new Sa)!=Kt||Pl&&Ie(Pl.resolve())!=ai||Ss&&Ie(new Ss)!=Dt||Oa&&Ie(new Oa)!=Er)&&(Ie=function(n){var s=Fe(n),o=s==Zt?n.constructor:e,h=o?$n(o):"";if(h)switch(h){case Yv:return Ye;case Xv:return Kt;case Zv:return ai;case Qv:return Dt;case Kv:return Er}return s});function fx(n,s,o){for(var h=-1,p=o.length;++h<p;){var v=o[h],A=v.size;switch(v.type){case"drop":n+=A;break;case"dropRight":s-=A;break;case"take":s=Be(s,n+A);break;case"takeRight":n=de(n,s-A);break}}return{start:n,end:s}}function px(n){var s=n.match(yl);return s?s[1].split(vu):[]}function bd(n,s,o){s=gn(s,n);for(var h=-1,p=s.length,v=!1;++h<p;){var A=fi(s[h]);if(!(v=n!=null&&o(n,A)))break;n=n[A]}return v||++h!=p?v:(p=n==null?0:n.length,!!p&&uo(p)&&Fi(A,p)&&(dt(n)||Gn(n)))}function dx(n){var s=n.length,o=new n.constructor(s);return s&&typeof n[0]=="string"&&Lt.call(n,"index")&&(o.index=n.index,o.input=n.input),o}function Td(n){return typeof n.constructor=="function"&&!Ua(n)?Ns(Ru(n)):{}}function gx(n,s,o){var h=n.constructor;switch(s){case sr:return th(n);case Xt:case Ct:return new h(+n);case Ye:return j1(n,o);case tn:case en:case ui:case Si:case Nn:case U:case it:case at:case bt:return ad(n,o);case Kt:return new h;case Ne:case nr:return new h(n);case oe:return J1(n);case Dt:return new h;case Ge:return tx(n)}}function yx(n,s){var o=s.length;if(!o)return n;var h=o-1;return s[h]=(o>1?"& ":"")+s[h],s=s.join(o>2?", ":" "),n.replace(Ea,`{
13
13
  /* [wrapped with `+s+`] */
14
- `)}function q1(i){return dt(i)||kn(i)||!!(fp&&i&&i[fp])}function Bi(i,s){var o=typeof i;return s=s??Bt,!!s&&(o=="number"||o!="symbol"&&os.test(i))&&i>-1&&i%1==0&&i<s}function ke(i,s,o){if(!Xt(o))return!1;var h=typeof s;return(h=="number"?je(o)&&Bi(s,o.length):h=="string"&&s in o)?Gr(o[s],i):!1}function Zl(i,s){if(dt(i))return!1;var o=typeof i;return o=="number"||o=="symbol"||o=="boolean"||i==null||cr(i)?!0:ji.test(i)||!_n.test(i)||s!=null&&i in kt(s)}function W1(i){var s=typeof i;return s=="string"||s=="number"||s=="symbol"||s=="boolean"?i!=="__proto__":i===null}function Ql(i){var s=qu(i),o=v[s];if(typeof o!="function"||!(s in bt.prototype))return!1;if(i===o)return!0;var h=Gl(o);return!!h&&i===h[0]}function V1(i){return!!op&&op in i}var $1=vu?Ii:ph;function Sa(i){var s=i&&i.constructor,o=typeof s=="function"&&s.prototype||xs;return i===o}function od(i){return i===i&&!Xt(i)}function ld(i,s){return function(o){return o==null?!1:o[i]===s&&(s!==e||i in kt(o))}}function z1(i){var s=Yu(i,function(h){return o.size===d&&o.clear(),h}),o=s.cache;return s}function G1(i,s){var o=i[1],h=s[1],p=o|h,m=p<(M|R|j),E=h==j&&o==z||h==j&&o==tt&&i[7].length<=s[8]||h==(j|tt)&&s[7].length<=s[8]&&o==z;if(!(m||E))return i;h&M&&(i[2]=s[2],p|=o&M?0:q);var T=s[3];if(T){var S=i[3];i[3]=S?zp(S,T,s[4]):T,i[4]=S?nn(i[3],y):s[4]}return T=s[5],T&&(S=i[5],i[5]=S?Gp(S,T,s[6]):T,i[6]=S?nn(i[5],y):s[6]),T=s[7],T&&(i[7]=T),h&j&&(i[8]=i[8]==null?s[8]:Be(i[8],s[8])),i[9]==null&&(i[9]=s[9]),i[0]=s[0],i[1]=p,i}function Y1(i){var s=[];if(i!=null)for(var o in kt(i))s.push(o);return s}function X1(i){return xu.call(i)}function hd(i,s,o){return s=de(s===e?i.length-1:s,0),function(){for(var h=arguments,p=-1,m=de(h.length-s,0),E=I(m);++p<m;)E[p]=h[s+p];p=-1;for(var T=I(s+1);++p<s;)T[p]=h[p];return T[s]=o(E),or(i,this,T)}}function cd(i,s){return s.length<2?i:Ln(i,Dr(s,0,-1))}function Z1(i,s){for(var o=i.length,h=Be(s.length,o),p=Qe(i);h--;){var m=s[h];i[h]=Bi(m,o)?p[m]:e}return i}function jl(i,s){if(!(s==="constructor"&&typeof i[s]=="function")&&s!="__proto__")return i[s]}var fd=dd(Lp),Oa=hm||function(i,s){return we.setTimeout(i,s)},Kl=dd(m1);function pd(i,s,o){var h=s+"";return Kl(i,H1(h,Q1(F1(h),o)))}function dd(i){var s=0,o=0;return function(){var h=dm(),p=ht-(h-o);if(o=h,p>0){if(++s>=st)return arguments[0]}else s=0;return i.apply(e,arguments)}}function Vu(i,s){var o=-1,h=i.length,p=h-1;for(s=s===e?h:s;++o<s;){var m=Rl(o,p),E=i[m];i[m]=i[o],i[o]=E}return i.length=s,i}var gd=z1(function(i){var s=[];return i.charCodeAt(0)===46&&s.push(""),i.replace(el,function(o,h,p,m){s.push(p?m.replace(ou,"$1"):h||o)}),s});function li(i){if(typeof i=="string"||cr(i))return i;var s=i+"";return s=="0"&&1/i==-yt?"-0":s}function Fn(i){if(i!=null){try{return mu.call(i)}catch{}try{return i+""}catch{}}return""}function Q1(i,s){return wr(Le,function(o){var h="_."+o[0];s&o[1]&&!pu(i,h)&&i.push(h)}),i.sort()}function yd(i){if(i instanceof bt)return i.clone();var s=new _r(i.__wrapped__,i.__chain__);return s.__actions__=Qe(i.__actions__),s.__index__=i.__index__,s.__values__=i.__values__,s}function j1(i,s,o){(o?ke(i,s,o):s===e)?s=1:s=de(gt(s),0);var h=i==null?0:i.length;if(!h||s<1)return[];for(var p=0,m=0,E=I(_u(h/s));p<h;)E[m++]=Dr(i,p,p+=s);return E}function K1(i){for(var s=-1,o=i==null?0:i.length,h=0,p=[];++s<o;){var m=i[s];m&&(p[h++]=m)}return p}function J1(){var i=arguments.length;if(!i)return[];for(var s=I(i-1),o=arguments[0],h=i;h--;)s[h-1]=arguments[h];return rn(dt(o)?Qe(o):[o],Te(s,1))}var tx=Et(function(i,s){return te(i)?wa(i,Te(s,1,te,!0)):[]}),ex=Et(function(i,s){var o=Sr(s);return te(o)&&(o=e),te(i)?wa(i,Te(s,1,te,!0),ut(o,2)):[]}),rx=Et(function(i,s){var o=Sr(s);return te(o)&&(o=e),te(i)?wa(i,Te(s,1,te,!0),e,o):[]});function ix(i,s,o){var h=i==null?0:i.length;return h?(s=o||s===e?1:gt(s),Dr(i,s<0?0:s,h)):[]}function nx(i,s,o){var h=i==null?0:i.length;return h?(s=o||s===e?1:gt(s),s=h-s,Dr(i,0,s<0?0:s)):[]}function sx(i,s){return i&&i.length?Lu(i,ut(s,3),!0,!0):[]}function ax(i,s){return i&&i.length?Lu(i,ut(s,3),!0):[]}function ux(i,s,o,h){var p=i==null?0:i.length;return p?(o&&typeof o!="number"&&ke(i,s,o)&&(o=0,h=p),Jm(i,s,o,h)):[]}function vd(i,s,o){var h=i==null?0:i.length;if(!h)return-1;var p=o==null?0:gt(o);return p<0&&(p=de(h+p,0)),du(i,ut(s,3),p)}function md(i,s,o){var h=i==null?0:i.length;if(!h)return-1;var p=h-1;return o!==e&&(p=gt(o),p=o<0?de(h+p,0):Be(p,h-1)),du(i,ut(s,3),p,!0)}function xd(i){var s=i==null?0:i.length;return s?Te(i,1):[]}function ox(i){var s=i==null?0:i.length;return s?Te(i,yt):[]}function lx(i,s){var o=i==null?0:i.length;return o?(s=s===e?1:gt(s),Te(i,s)):[]}function hx(i){for(var s=-1,o=i==null?0:i.length,h={};++s<o;){var p=i[s];h[p[0]]=p[1]}return h}function Ed(i){return i&&i.length?i[0]:e}function cx(i,s,o){var h=i==null?0:i.length;if(!h)return-1;var p=o==null?0:gt(o);return p<0&&(p=de(h+p,0)),gs(i,s,p)}function fx(i){var s=i==null?0:i.length;return s?Dr(i,0,-1):[]}var px=Et(function(i){var s=$t(i,Ul);return s.length&&s[0]===i[0]?Ol(s):[]}),dx=Et(function(i){var s=Sr(i),o=$t(i,Ul);return s===Sr(o)?s=e:o.pop(),o.length&&o[0]===i[0]?Ol(o,ut(s,2)):[]}),gx=Et(function(i){var s=Sr(i),o=$t(i,Ul);return s=typeof s=="function"?s:e,s&&o.pop(),o.length&&o[0]===i[0]?Ol(o,e,s):[]});function yx(i,s){return i==null?"":fm.call(i,s)}function Sr(i){var s=i==null?0:i.length;return s?i[s-1]:e}function vx(i,s,o){var h=i==null?0:i.length;if(!h)return-1;var p=h;return o!==e&&(p=gt(o),p=p<0?de(h+p,0):Be(p,h-1)),s===s?Qv(i,s,p):du(i,tp,p,!0)}function mx(i,s){return i&&i.length?Mp(i,gt(s)):e}var xx=Et(Ad);function Ad(i,s){return i&&i.length&&s&&s.length?Il(i,s):i}function Ex(i,s,o){return i&&i.length&&s&&s.length?Il(i,s,ut(o,2)):i}function Ax(i,s,o){return i&&i.length&&s&&s.length?Il(i,s,e,o):i}var bx=Mi(function(i,s){var o=i==null?0:i.length,h=_l(i,s);return Rp(i,$t(s,function(p){return Bi(p,o)?+p:p}).sort($p)),h});function wx(i,s){var o=[];if(!(i&&i.length))return o;var h=-1,p=[],m=i.length;for(s=ut(s,3);++h<m;){var E=i[h];s(E,h,i)&&(o.push(E),p.push(h))}return Rp(i,p),o}function Jl(i){return i==null?i:ym.call(i)}function Tx(i,s,o){var h=i==null?0:i.length;return h?(o&&typeof o!="number"&&ke(i,s,o)?(s=0,o=h):(s=s==null?0:gt(s),o=o===e?h:gt(o)),Dr(i,s,o)):[]}function _x(i,s){return Ru(i,s)}function Cx(i,s,o){return Pl(i,s,ut(o,2))}function Dx(i,s){var o=i==null?0:i.length;if(o){var h=Ru(i,s);if(h<o&&Gr(i[h],s))return h}return-1}function Sx(i,s){return Ru(i,s,!0)}function Ox(i,s,o){return Pl(i,s,ut(o,2),!0)}function Nx(i,s){var o=i==null?0:i.length;if(o){var h=Ru(i,s,!0)-1;if(Gr(i[h],s))return h}return-1}function Mx(i){return i&&i.length?Pp(i):[]}function Bx(i,s){return i&&i.length?Pp(i,ut(s,2)):[]}function Ix(i){var s=i==null?0:i.length;return s?Dr(i,1,s):[]}function Rx(i,s,o){return i&&i.length?(s=o||s===e?1:gt(s),Dr(i,0,s<0?0:s)):[]}function Lx(i,s,o){var h=i==null?0:i.length;return h?(s=o||s===e?1:gt(s),s=h-s,Dr(i,s<0?0:s,h)):[]}function Px(i,s){return i&&i.length?Lu(i,ut(s,3),!1,!0):[]}function Fx(i,s){return i&&i.length?Lu(i,ut(s,3)):[]}var kx=Et(function(i){return un(Te(i,1,te,!0))}),Ux=Et(function(i){var s=Sr(i);return te(s)&&(s=e),un(Te(i,1,te,!0),ut(s,2))}),Hx=Et(function(i){var s=Sr(i);return s=typeof s=="function"?s:e,un(Te(i,1,te,!0),e,s)});function qx(i){return i&&i.length?un(i):[]}function Wx(i,s){return i&&i.length?un(i,ut(s,2)):[]}function Vx(i,s){return s=typeof s=="function"?s:e,i&&i.length?un(i,e,s):[]}function th(i){if(!(i&&i.length))return[];var s=0;return i=en(i,function(o){if(te(o))return s=de(o.length,s),!0}),vl(s,function(o){return $t(i,dl(o))})}function bd(i,s){if(!(i&&i.length))return[];var o=th(i);return s==null?o:$t(o,function(h){return or(s,e,h)})}var $x=Et(function(i,s){return te(i)?wa(i,s):[]}),zx=Et(function(i){return kl(en(i,te))}),Gx=Et(function(i){var s=Sr(i);return te(s)&&(s=e),kl(en(i,te),ut(s,2))}),Yx=Et(function(i){var s=Sr(i);return s=typeof s=="function"?s:e,kl(en(i,te),e,s)}),Xx=Et(th);function Zx(i,s){return Hp(i||[],s||[],ba)}function Qx(i,s){return Hp(i||[],s||[],Ca)}var jx=Et(function(i){var s=i.length,o=s>1?i[s-1]:e;return o=typeof o=="function"?(i.pop(),o):e,bd(i,o)});function wd(i){var s=v(i);return s.__chain__=!0,s}function Kx(i,s){return s(i),i}function $u(i,s){return s(i)}var Jx=Mi(function(i){var s=i.length,o=s?i[0]:0,h=this.__wrapped__,p=function(m){return _l(m,i)};return s>1||this.__actions__.length||!(h instanceof bt)||!Bi(o)?this.thru(p):(h=h.slice(o,+o+(s?1:0)),h.__actions__.push({func:$u,args:[p],thisArg:e}),new _r(h,this.__chain__).thru(function(m){return s&&!m.length&&m.push(e),m}))});function tE(){return wd(this)}function eE(){return new _r(this.value(),this.__chain__)}function rE(){this.__values__===e&&(this.__values__=Fd(this.value()));var i=this.__index__>=this.__values__.length,s=i?e:this.__values__[this.__index__++];return{done:i,value:s}}function iE(){return this}function nE(i){for(var s,o=this;o instanceof Ou;){var h=yd(o);h.__index__=0,h.__values__=e,s?p.__wrapped__=h:s=h;var p=h;o=o.__wrapped__}return p.__wrapped__=i,s}function sE(){var i=this.__wrapped__;if(i instanceof bt){var s=i;return this.__actions__.length&&(s=new bt(this)),s=s.reverse(),s.__actions__.push({func:$u,args:[Jl],thisArg:e}),new _r(s,this.__chain__)}return this.thru(Jl)}function aE(){return Up(this.__wrapped__,this.__actions__)}var uE=Pu(function(i,s,o){Lt.call(i,o)?++i[o]:Oi(i,o,1)});function oE(i,s,o){var h=dt(i)?Kf:Km;return o&&ke(i,s,o)&&(s=e),h(i,ut(s,3))}function lE(i,s){var o=dt(i)?en:bp;return o(i,ut(s,3))}var hE=Qp(vd),cE=Qp(md);function fE(i,s){return Te(zu(i,s),1)}function pE(i,s){return Te(zu(i,s),yt)}function dE(i,s,o){return o=o===e?1:gt(o),Te(zu(i,s),o)}function Td(i,s){var o=dt(i)?wr:an;return o(i,ut(s,3))}function _d(i,s){var o=dt(i)?Iv:Ap;return o(i,ut(s,3))}var gE=Pu(function(i,s,o){Lt.call(i,o)?i[o].push(s):Oi(i,o,[s])});function yE(i,s,o,h){i=je(i)?i:Ds(i),o=o&&!h?gt(o):0;var p=i.length;return o<0&&(o=de(p+o,0)),Qu(i)?o<=p&&i.indexOf(s,o)>-1:!!p&&gs(i,s,o)>-1}var vE=Et(function(i,s,o){var h=-1,p=typeof s=="function",m=je(i)?I(i.length):[];return an(i,function(E){m[++h]=p?or(s,E,o):Ta(E,s,o)}),m}),mE=Pu(function(i,s,o){Oi(i,o,s)});function zu(i,s){var o=dt(i)?$t:Sp;return o(i,ut(s,3))}function xE(i,s,o,h){return i==null?[]:(dt(s)||(s=s==null?[]:[s]),o=h?e:o,dt(o)||(o=o==null?[]:[o]),Bp(i,s,o))}var EE=Pu(function(i,s,o){i[o?0:1].push(s)},function(){return[[],[]]});function AE(i,s,o){var h=dt(i)?fl:rp,p=arguments.length<3;return h(i,ut(s,4),o,p,an)}function bE(i,s,o){var h=dt(i)?Rv:rp,p=arguments.length<3;return h(i,ut(s,4),o,p,Ap)}function wE(i,s){var o=dt(i)?en:bp;return o(i,Xu(ut(s,3)))}function TE(i){var s=dt(i)?vp:y1;return s(i)}function _E(i,s,o){(o?ke(i,s,o):s===e)?s=1:s=gt(s);var h=dt(i)?Ym:v1;return h(i,s)}function CE(i){var s=dt(i)?Xm:x1;return s(i)}function DE(i){if(i==null)return 0;if(je(i))return Qu(i)?vs(i):i.length;var s=Ie(i);return s==Qt||s==Dt?i.size:Ml(i).length}function SE(i,s,o){var h=dt(i)?pl:E1;return o&&ke(i,s,o)&&(s=e),h(i,ut(s,3))}var OE=Et(function(i,s){if(i==null)return[];var o=s.length;return o>1&&ke(i,s[0],s[1])?s=[]:o>2&&ke(s[0],s[1],s[2])&&(s=[s[0]]),Bp(i,Te(s,1),[])}),Gu=lm||function(){return we.Date.now()};function NE(i,s){if(typeof s!="function")throw new Tr(l);return i=gt(i),function(){if(--i<1)return s.apply(this,arguments)}}function Cd(i,s,o){return s=o?e:s,s=i&&s==null?i.length:s,Ni(i,j,e,e,e,e,s)}function Dd(i,s){var o;if(typeof s!="function")throw new Tr(l);return i=gt(i),function(){return--i>0&&(o=s.apply(this,arguments)),i<=1&&(s=e),o}}var eh=Et(function(i,s,o){var h=M;if(o.length){var p=nn(o,_s(eh));h|=L}return Ni(i,h,s,o,p)}),Sd=Et(function(i,s,o){var h=M|R;if(o.length){var p=nn(o,_s(Sd));h|=L}return Ni(s,h,i,o,p)});function Od(i,s,o){s=o?e:s;var h=Ni(i,z,e,e,e,e,e,s);return h.placeholder=Od.placeholder,h}function Nd(i,s,o){s=o?e:s;var h=Ni(i,w,e,e,e,e,e,s);return h.placeholder=Nd.placeholder,h}function Md(i,s,o){var h,p,m,E,T,S,W=0,V=!1,$=!1,Q=!0;if(typeof i!="function")throw new Tr(l);s=Or(s)||0,Xt(o)&&(V=!!o.leading,$="maxWait"in o,m=$?de(Or(o.maxWait)||0,s):m,Q="trailing"in o?!!o.trailing:Q);function nt(ee){var Yr=h,Li=p;return h=p=e,W=ee,E=i.apply(Li,Yr),E}function ot(ee){return W=ee,T=Oa(At,s),V?nt(ee):E}function xt(ee){var Yr=ee-S,Li=ee-W,Qd=s-Yr;return $?Be(Qd,m-Li):Qd}function lt(ee){var Yr=ee-S,Li=ee-W;return S===e||Yr>=s||Yr<0||$&&Li>=m}function At(){var ee=Gu();if(lt(ee))return Tt(ee);T=Oa(At,xt(ee))}function Tt(ee){return T=e,Q&&h?nt(ee):(h=p=e,E)}function fr(){T!==e&&qp(T),W=0,h=S=p=T=e}function Ue(){return T===e?E:Tt(Gu())}function pr(){var ee=Gu(),Yr=lt(ee);if(h=arguments,p=this,S=ee,Yr){if(T===e)return ot(S);if($)return qp(T),T=Oa(At,s),nt(S)}return T===e&&(T=Oa(At,s)),E}return pr.cancel=fr,pr.flush=Ue,pr}var ME=Et(function(i,s){return Ep(i,1,s)}),BE=Et(function(i,s,o){return Ep(i,Or(s)||0,o)});function IE(i){return Ni(i,Z)}function Yu(i,s){if(typeof i!="function"||s!=null&&typeof s!="function")throw new Tr(l);var o=function(){var h=arguments,p=s?s.apply(this,h):h[0],m=o.cache;if(m.has(p))return m.get(p);var E=i.apply(this,h);return o.cache=m.set(p,E)||m,E};return o.cache=new(Yu.Cache||Si),o}Yu.Cache=Si;function Xu(i){if(typeof i!="function")throw new Tr(l);return function(){var s=arguments;switch(s.length){case 0:return!i.call(this);case 1:return!i.call(this,s[0]);case 2:return!i.call(this,s[0],s[1]);case 3:return!i.call(this,s[0],s[1],s[2])}return!i.apply(this,s)}}function RE(i){return Dd(2,i)}var LE=A1(function(i,s){s=s.length==1&&dt(s[0])?$t(s[0],lr(ut())):$t(Te(s,1),lr(ut()));var o=s.length;return Et(function(h){for(var p=-1,m=Be(h.length,o);++p<m;)h[p]=s[p].call(this,h[p]);return or(i,this,h)})}),rh=Et(function(i,s){var o=nn(s,_s(rh));return Ni(i,L,e,s,o)}),Bd=Et(function(i,s){var o=nn(s,_s(Bd));return Ni(i,U,e,s,o)}),PE=Mi(function(i,s){return Ni(i,tt,e,e,e,s)});function FE(i,s){if(typeof i!="function")throw new Tr(l);return s=s===e?s:gt(s),Et(i,s)}function kE(i,s){if(typeof i!="function")throw new Tr(l);return s=s==null?0:de(gt(s),0),Et(function(o){var h=o[s],p=ln(o,0,s);return h&&rn(p,h),or(i,this,p)})}function UE(i,s,o){var h=!0,p=!0;if(typeof i!="function")throw new Tr(l);return Xt(o)&&(h="leading"in o?!!o.leading:h,p="trailing"in o?!!o.trailing:p),Md(i,s,{leading:h,maxWait:s,trailing:p})}function HE(i){return Cd(i,1)}function qE(i,s){return rh(Hl(s),i)}function WE(){if(!arguments.length)return[];var i=arguments[0];return dt(i)?i:[i]}function VE(i){return Cr(i,C)}function $E(i,s){return s=typeof s=="function"?s:e,Cr(i,C,s)}function zE(i){return Cr(i,A|C)}function GE(i,s){return s=typeof s=="function"?s:e,Cr(i,A|C,s)}function YE(i,s){return s==null||xp(i,s,Ee(s))}function Gr(i,s){return i===s||i!==i&&s!==s}var XE=Hu(Sl),ZE=Hu(function(i,s){return i>=s}),kn=_p(function(){return arguments}())?_p:function(i){return jt(i)&&Lt.call(i,"callee")&&!cp.call(i,"callee")},dt=I.isArray,QE=Gf?lr(Gf):n1;function je(i){return i!=null&&Zu(i.length)&&!Ii(i)}function te(i){return jt(i)&&je(i)}function jE(i){return i===!0||i===!1||jt(i)&&Fe(i)==Gt}var hn=cm||ph,KE=Yf?lr(Yf):s1;function JE(i){return jt(i)&&i.nodeType===1&&!Na(i)}function tA(i){if(i==null)return!0;if(je(i)&&(dt(i)||typeof i=="string"||typeof i.splice=="function"||hn(i)||Cs(i)||kn(i)))return!i.length;var s=Ie(i);if(s==Qt||s==Dt)return!i.size;if(Sa(i))return!Ml(i).length;for(var o in i)if(Lt.call(i,o))return!1;return!0}function eA(i,s){return _a(i,s)}function rA(i,s,o){o=typeof o=="function"?o:e;var h=o?o(i,s):e;return h===e?_a(i,s,e,o):!!h}function ih(i){if(!jt(i))return!1;var s=Fe(i);return s==Oe||s==Ht||typeof i.message=="string"&&typeof i.name=="string"&&!Na(i)}function iA(i){return typeof i=="number"&&pp(i)}function Ii(i){if(!Xt(i))return!1;var s=Fe(i);return s==Pe||s==ze||s==Vt||s==Ai}function Id(i){return typeof i=="number"&&i==gt(i)}function Zu(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=Bt}function Xt(i){var s=typeof i;return i!=null&&(s=="object"||s=="function")}function jt(i){return i!=null&&typeof i=="object"}var Rd=Xf?lr(Xf):u1;function nA(i,s){return i===s||Nl(i,s,Yl(s))}function sA(i,s,o){return o=typeof o=="function"?o:e,Nl(i,s,Yl(s),o)}function aA(i){return Ld(i)&&i!=+i}function uA(i){if($1(i))throw new pt(u);return Cp(i)}function oA(i){return i===null}function lA(i){return i==null}function Ld(i){return typeof i=="number"||jt(i)&&Fe(i)==Ne}function Na(i){if(!jt(i)||Fe(i)!=Yt)return!1;var s=bu(i);if(s===null)return!0;var o=Lt.call(s,"constructor")&&s.constructor;return typeof o=="function"&&o instanceof o&&mu.call(o)==sm}var nh=Zf?lr(Zf):o1;function hA(i){return Id(i)&&i>=-Bt&&i<=Bt}var Pd=Qf?lr(Qf):l1;function Qu(i){return typeof i=="string"||!dt(i)&&jt(i)&&Fe(i)==nr}function cr(i){return typeof i=="symbol"||jt(i)&&Fe(i)==Ge}var Cs=jf?lr(jf):h1;function cA(i){return i===e}function fA(i){return jt(i)&&Ie(i)==mr}function pA(i){return jt(i)&&Fe(i)==Gi}var dA=Hu(Bl),gA=Hu(function(i,s){return i<=s});function Fd(i){if(!i)return[];if(je(i))return Qu(i)?$r(i):Qe(i);if(va&&i[va])return Yv(i[va]());var s=Ie(i),o=s==Qt?xl:s==Dt?gu:Ds;return o(i)}function Ri(i){if(!i)return i===0?i:0;if(i=Or(i),i===yt||i===-yt){var s=i<0?-1:1;return s*Re}return i===i?i:0}function gt(i){var s=Ri(i),o=s%1;return s===s?o?s-o:s:0}function kd(i){return i?Rn(gt(i),0,se):0}function Or(i){if(typeof i=="number")return i;if(cr(i))return be;if(Xt(i)){var s=typeof i.valueOf=="function"?i.valueOf():i;i=Xt(s)?s+"":s}if(typeof i!="string")return i===0?i:+i;i=ip(i);var o=Ti.test(i);return o||Dn.test(i)?Nv(i.slice(2),o?2:8):fa.test(i)?be:+i}function Ud(i){return oi(i,Ke(i))}function yA(i){return i?Rn(gt(i),-Bt,Bt):i===0?i:0}function It(i){return i==null?"":hr(i)}var vA=ws(function(i,s){if(Sa(s)||je(s)){oi(s,Ee(s),i);return}for(var o in s)Lt.call(s,o)&&ba(i,o,s[o])}),Hd=ws(function(i,s){oi(s,Ke(s),i)}),ju=ws(function(i,s,o,h){oi(s,Ke(s),i,h)}),mA=ws(function(i,s,o,h){oi(s,Ee(s),i,h)}),xA=Mi(_l);function EA(i,s){var o=bs(i);return s==null?o:mp(o,s)}var AA=Et(function(i,s){i=kt(i);var o=-1,h=s.length,p=h>2?s[2]:e;for(p&&ke(s[0],s[1],p)&&(h=1);++o<h;)for(var m=s[o],E=Ke(m),T=-1,S=E.length;++T<S;){var W=E[T],V=i[W];(V===e||Gr(V,xs[W])&&!Lt.call(i,W))&&(i[W]=m[W])}return i}),bA=Et(function(i){return i.push(e,id),or(qd,e,i)});function wA(i,s){return Jf(i,ut(s,3),ui)}function TA(i,s){return Jf(i,ut(s,3),Dl)}function _A(i,s){return i==null?i:Cl(i,ut(s,3),Ke)}function CA(i,s){return i==null?i:wp(i,ut(s,3),Ke)}function DA(i,s){return i&&ui(i,ut(s,3))}function SA(i,s){return i&&Dl(i,ut(s,3))}function OA(i){return i==null?[]:Bu(i,Ee(i))}function NA(i){return i==null?[]:Bu(i,Ke(i))}function sh(i,s,o){var h=i==null?e:Ln(i,s);return h===e?o:h}function MA(i,s){return i!=null&&ad(i,s,t1)}function ah(i,s){return i!=null&&ad(i,s,e1)}var BA=Kp(function(i,s,o){s!=null&&typeof s.toString!="function"&&(s=xu.call(s)),i[s]=o},oh(Je)),IA=Kp(function(i,s,o){s!=null&&typeof s.toString!="function"&&(s=xu.call(s)),Lt.call(i,s)?i[s].push(o):i[s]=[o]},ut),RA=Et(Ta);function Ee(i){return je(i)?yp(i):Ml(i)}function Ke(i){return je(i)?yp(i,!0):c1(i)}function LA(i,s){var o={};return s=ut(s,3),ui(i,function(h,p,m){Oi(o,s(h,p,m),h)}),o}function PA(i,s){var o={};return s=ut(s,3),ui(i,function(h,p,m){Oi(o,p,s(h,p,m))}),o}var FA=ws(function(i,s,o){Iu(i,s,o)}),qd=ws(function(i,s,o,h){Iu(i,s,o,h)}),kA=Mi(function(i,s){var o={};if(i==null)return o;var h=!1;s=$t(s,function(m){return m=on(m,i),h||(h=m.length>1),m}),oi(i,zl(i),o),h&&(o=Cr(o,A|_|C,B1));for(var p=s.length;p--;)Fl(o,s[p]);return o});function UA(i,s){return Wd(i,Xu(ut(s)))}var HA=Mi(function(i,s){return i==null?{}:p1(i,s)});function Wd(i,s){if(i==null)return{};var o=$t(zl(i),function(h){return[h]});return s=ut(s),Ip(i,o,function(h,p){return s(h,p[0])})}function qA(i,s,o){s=on(s,i);var h=-1,p=s.length;for(p||(p=1,i=e);++h<p;){var m=i==null?e:i[li(s[h])];m===e&&(h=p,m=o),i=Ii(m)?m.call(i):m}return i}function WA(i,s,o){return i==null?i:Ca(i,s,o)}function VA(i,s,o,h){return h=typeof h=="function"?h:e,i==null?i:Ca(i,s,o,h)}var Vd=ed(Ee),$d=ed(Ke);function $A(i,s,o){var h=dt(i),p=h||hn(i)||Cs(i);if(s=ut(s,4),o==null){var m=i&&i.constructor;p?o=h?new m:[]:Xt(i)?o=Ii(m)?bs(bu(i)):{}:o={}}return(p?wr:ui)(i,function(E,T,S){return s(o,E,T,S)}),o}function zA(i,s){return i==null?!0:Fl(i,s)}function GA(i,s,o){return i==null?i:kp(i,s,Hl(o))}function YA(i,s,o,h){return h=typeof h=="function"?h:e,i==null?i:kp(i,s,Hl(o),h)}function Ds(i){return i==null?[]:ml(i,Ee(i))}function XA(i){return i==null?[]:ml(i,Ke(i))}function ZA(i,s,o){return o===e&&(o=s,s=e),o!==e&&(o=Or(o),o=o===o?o:0),s!==e&&(s=Or(s),s=s===s?s:0),Rn(Or(i),s,o)}function QA(i,s,o){return s=Ri(s),o===e?(o=s,s=0):o=Ri(o),i=Or(i),r1(i,s,o)}function jA(i,s,o){if(o&&typeof o!="boolean"&&ke(i,s,o)&&(s=o=e),o===e&&(typeof s=="boolean"?(o=s,s=e):typeof i=="boolean"&&(o=i,i=e)),i===e&&s===e?(i=0,s=1):(i=Ri(i),s===e?(s=i,i=0):s=Ri(s)),i>s){var h=i;i=s,s=h}if(o||i%1||s%1){var p=dp();return Be(i+p*(s-i+Ov("1e-"+((p+"").length-1))),s)}return Rl(i,s)}var KA=Ts(function(i,s,o){return s=s.toLowerCase(),i+(o?zd(s):s)});function zd(i){return uh(It(i).toLowerCase())}function Gd(i){return i=It(i),i&&i.replace(pa,Wv).replace(xv,"")}function JA(i,s,o){i=It(i),s=hr(s);var h=i.length;o=o===e?h:Rn(gt(o),0,h);var p=o;return o-=s.length,o>=0&&i.slice(o,p)==s}function tb(i){return i=It(i),i&&wn.test(i)?i.replace(Zi,Vv):i}function eb(i){return i=It(i),i&&rl.test(i)?i.replace(Ki,"\\$&"):i}var rb=Ts(function(i,s,o){return i+(o?"-":"")+s.toLowerCase()}),ib=Ts(function(i,s,o){return i+(o?" ":"")+s.toLowerCase()}),nb=Zp("toLowerCase");function sb(i,s,o){i=It(i),s=gt(s);var h=s?vs(i):0;if(!s||h>=s)return i;var p=(s-h)/2;return Uu(Cu(p),o)+i+Uu(_u(p),o)}function ab(i,s,o){i=It(i),s=gt(s);var h=s?vs(i):0;return s&&h<s?i+Uu(s-h,o):i}function ub(i,s,o){i=It(i),s=gt(s);var h=s?vs(i):0;return s&&h<s?Uu(s-h,o)+i:i}function ob(i,s,o){return o||s==null?s=0:s&&(s=+s),gm(It(i).replace(la,""),s||0)}function lb(i,s,o){return(o?ke(i,s,o):s===e)?s=1:s=gt(s),Ll(It(i),s)}function hb(){var i=arguments,s=It(i[0]);return i.length<3?s:s.replace(i[1],i[2])}var cb=Ts(function(i,s,o){return i+(o?"_":"")+s.toLowerCase()});function fb(i,s,o){return o&&typeof o!="number"&&ke(i,s,o)&&(s=o=e),o=o===e?se:o>>>0,o?(i=It(i),i&&(typeof s=="string"||s!=null&&!nh(s))&&(s=hr(s),!s&&ys(i))?ln($r(i),0,o):i.split(s,o)):[]}var pb=Ts(function(i,s,o){return i+(o?" ":"")+uh(s)});function db(i,s,o){return i=It(i),o=o==null?0:Rn(gt(o),0,i.length),s=hr(s),i.slice(o,o+s.length)==s}function gb(i,s,o){var h=v.templateSettings;o&&ke(i,s,o)&&(s=e),i=It(i),s=ju({},s,h,rd);var p=ju({},s.imports,h.imports,rd),m=Ee(p),E=ml(p,m),T,S,W=0,V=s.interpolate||ls,$="__p += '",Q=El((s.escape||ls).source+"|"+V.source+"|"+(V===Tn?lu:ls).source+"|"+(s.evaluate||ls).source+"|$","g"),nt="//# sourceURL="+(Lt.call(s,"sourceURL")?(s.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Tv+"]")+`
15
- `;i.replace(Q,function(lt,At,Tt,fr,Ue,pr){return Tt||(Tt=fr),$+=i.slice(W,pr).replace(sl,$v),At&&(T=!0,$+=`' +
14
+ `)}function mx(n){return dt(n)||Gn(n)||!!(Op&&n&&n[Op])}function Fi(n,s){var o=typeof n;return s=s??Bt,!!s&&(o=="number"||o!="symbol"&&ys.test(n))&&n>-1&&n%1==0&&n<s}function Ue(n,s,o){if(!Qt(o))return!1;var h=typeof s;return(h=="number"?Ke(o)&&Fi(s,o.length):h=="string"&&s in o)?Xr(o[s],n):!1}function oh(n,s){if(dt(n))return!1;var o=typeof n;return o=="number"||o=="symbol"||o=="boolean"||n==null||cr(n)?!0:sn.test(n)||!In.test(n)||s!=null&&n in kt(s)}function vx(n){var s=typeof n;return s=="string"||s=="number"||s=="symbol"||s=="boolean"?n!=="__proto__":n===null}function lh(n){var s=Ju(n),o=m[s];if(typeof o!="function"||!(s in wt.prototype))return!1;if(n===o)return!0;var h=sh(o);return!!h&&n===h[0]}function xx(n){return!!_p&&_p in n}var Ex=Ou?Ui:Ch;function Ua(n){var s=n&&n.constructor,o=typeof s=="function"&&s.prototype||Ds;return n===o}function _d(n){return n===n&&!Qt(n)}function Cd(n,s){return function(o){return o==null?!1:o[n]===s&&(s!==e||n in kt(o))}}function Ax(n){var s=so(n,function(h){return o.size===d&&o.clear(),h}),o=s.cache;return s}function wx(n,s){var o=n[1],h=s[1],p=o|h,v=p<(M|R|K),A=h==K&&o==G||h==K&&o==tt&&n[7].length<=s[8]||h==(K|tt)&&s[7].length<=s[8]&&o==G;if(!(v||A))return n;h&M&&(n[2]=s[2],p|=o&M?0:W);var _=s[3];if(_){var S=n[3];n[3]=S?od(S,_,s[4]):_,n[4]=S?cn(n[3],g):s[4]}return _=s[5],_&&(S=n[5],n[5]=S?ld(S,_,s[6]):_,n[6]=S?cn(n[5],g):s[6]),_=s[7],_&&(n[7]=_),h&K&&(n[8]=n[8]==null?s[8]:Be(n[8],s[8])),n[9]==null&&(n[9]=s[9]),n[0]=s[0],n[1]=p,n}function bx(n){var s=[];if(n!=null)for(var o in kt(n))s.push(o);return s}function Tx(n){return Mu.call(n)}function Dd(n,s,o){return s=de(s===e?n.length-1:s,0),function(){for(var h=arguments,p=-1,v=de(h.length-s,0),A=I(v);++p<v;)A[p]=h[s+p];p=-1;for(var _=I(s+1);++p<s;)_[p]=h[p];return _[s]=o(A),or(n,this,_)}}function Sd(n,s){return s.length<2?n:Vn(n,Or(s,0,-1))}function _x(n,s){for(var o=n.length,h=Be(s.length,o),p=Qe(n);h--;){var v=s[h];n[h]=Fi(v,o)?p[v]:e}return n}function hh(n,s){if(!(s==="constructor"&&typeof n[s]=="function")&&s!="__proto__")return n[s]}var Od=Md(jp),ka=Hv||function(n,s){return be.setTimeout(n,s)},ch=Md(X1);function Nd(n,s,o){var h=s+"";return ch(n,yx(h,Cx(px(h),o)))}function Md(n){var s=0,o=0;return function(){var h=zv(),p=ht-(h-o);if(o=h,p>0){if(++s>=st)return arguments[0]}else s=0;return n.apply(e,arguments)}}function eo(n,s){var o=-1,h=n.length,p=h-1;for(s=s===e?h:s;++o<s;){var v=Yl(o,p),A=n[v];n[v]=n[o],n[o]=A}return n.length=s,n}var Bd=Ax(function(n){var s=[];return n.charCodeAt(0)===46&&s.push(""),n.replace(dl,function(o,h,p,v){s.push(p?v.replace(Eu,"$1"):h||o)}),s});function fi(n){if(typeof n=="string"||cr(n))return n;var s=n+"";return s=="0"&&1/n==-yt?"-0":s}function $n(n){if(n!=null){try{return Nu.call(n)}catch{}try{return n+""}catch{}}return""}function Cx(n,s){return _r(Le,function(o){var h="_."+o[0];s&o[1]&&!_u(n,h)&&n.push(h)}),n.sort()}function Id(n){if(n instanceof wt)return n.clone();var s=new Dr(n.__wrapped__,n.__chain__);return s.__actions__=Qe(n.__actions__),s.__index__=n.__index__,s.__values__=n.__values__,s}function Dx(n,s,o){(o?Ue(n,s,o):s===e)?s=1:s=de(gt(s),0);var h=n==null?0:n.length;if(!h||s<1)return[];for(var p=0,v=0,A=I(Fu(h/s));p<h;)A[v++]=Or(n,p,p+=s);return A}function Sx(n){for(var s=-1,o=n==null?0:n.length,h=0,p=[];++s<o;){var v=n[s];v&&(p[h++]=v)}return p}function Ox(){var n=arguments.length;if(!n)return[];for(var s=I(n-1),o=arguments[0],h=n;h--;)s[h-1]=arguments[h];return hn(dt(o)?Qe(o):[o],Te(s,1))}var Nx=Et(function(n,s){return ee(n)?Ia(n,Te(s,1,ee,!0)):[]}),Mx=Et(function(n,s){var o=Nr(s);return ee(o)&&(o=e),ee(n)?Ia(n,Te(s,1,ee,!0),ut(o,2)):[]}),Bx=Et(function(n,s){var o=Nr(s);return ee(o)&&(o=e),ee(n)?Ia(n,Te(s,1,ee,!0),e,o):[]});function Ix(n,s,o){var h=n==null?0:n.length;return h?(s=o||s===e?1:gt(s),Or(n,s<0?0:s,h)):[]}function Rx(n,s,o){var h=n==null?0:n.length;return h?(s=o||s===e?1:gt(s),s=h-s,Or(n,0,s<0?0:s)):[]}function Lx(n,s){return n&&n.length?Yu(n,ut(s,3),!0,!0):[]}function Px(n,s){return n&&n.length?Yu(n,ut(s,3),!0):[]}function Fx(n,s,o,h){var p=n==null?0:n.length;return p?(o&&typeof o!="number"&&Ue(n,s,o)&&(o=0,h=p),O1(n,s,o,h)):[]}function Rd(n,s,o){var h=n==null?0:n.length;if(!h)return-1;var p=o==null?0:gt(o);return p<0&&(p=de(h+p,0)),Cu(n,ut(s,3),p)}function Ld(n,s,o){var h=n==null?0:n.length;if(!h)return-1;var p=h-1;return o!==e&&(p=gt(o),p=o<0?de(h+p,0):Be(p,h-1)),Cu(n,ut(s,3),p,!0)}function Pd(n){var s=n==null?0:n.length;return s?Te(n,1):[]}function Ux(n){var s=n==null?0:n.length;return s?Te(n,yt):[]}function kx(n,s){var o=n==null?0:n.length;return o?(s=s===e?1:gt(s),Te(n,s)):[]}function Hx(n){for(var s=-1,o=n==null?0:n.length,h={};++s<o;){var p=n[s];h[p[0]]=p[1]}return h}function Fd(n){return n&&n.length?n[0]:e}function qx(n,s,o){var h=n==null?0:n.length;if(!h)return-1;var p=o==null?0:gt(o);return p<0&&(p=de(h+p,0)),bs(n,s,p)}function Wx(n){var s=n==null?0:n.length;return s?Or(n,0,-1):[]}var Vx=Et(function(n){var s=Gt(n,jl);return s.length&&s[0]===n[0]?Wl(s):[]}),zx=Et(function(n){var s=Nr(n),o=Gt(n,jl);return s===Nr(o)?s=e:o.pop(),o.length&&o[0]===n[0]?Wl(o,ut(s,2)):[]}),$x=Et(function(n){var s=Nr(n),o=Gt(n,jl);return s=typeof s=="function"?s:e,s&&o.pop(),o.length&&o[0]===n[0]?Wl(o,e,s):[]});function Gx(n,s){return n==null?"":Wv.call(n,s)}function Nr(n){var s=n==null?0:n.length;return s?n[s-1]:e}function Yx(n,s,o){var h=n==null?0:n.length;if(!h)return-1;var p=h;return o!==e&&(p=gt(o),p=p<0?de(h+p,0):Be(p,h-1)),s===s?Cv(n,s,p):Cu(n,mp,p,!0)}function Xx(n,s){return n&&n.length?Xp(n,gt(s)):e}var Zx=Et(Ud);function Ud(n,s){return n&&n.length&&s&&s.length?Gl(n,s):n}function Qx(n,s,o){return n&&n.length&&s&&s.length?Gl(n,s,ut(o,2)):n}function Kx(n,s,o){return n&&n.length&&s&&s.length?Gl(n,s,e,o):n}var jx=Pi(function(n,s){var o=n==null?0:n.length,h=Ul(n,s);return Kp(n,Gt(s,function(p){return Fi(p,o)?+p:p}).sort(ud)),h});function Jx(n,s){var o=[];if(!(n&&n.length))return o;var h=-1,p=[],v=n.length;for(s=ut(s,3);++h<v;){var A=n[h];s(A,h,n)&&(o.push(A),p.push(h))}return Kp(n,p),o}function fh(n){return n==null?n:Gv.call(n)}function tE(n,s,o){var h=n==null?0:n.length;return h?(o&&typeof o!="number"&&Ue(n,s,o)?(s=0,o=h):(s=s==null?0:gt(s),o=o===e?h:gt(o)),Or(n,s,o)):[]}function eE(n,s){return Gu(n,s)}function rE(n,s,o){return Zl(n,s,ut(o,2))}function iE(n,s){var o=n==null?0:n.length;if(o){var h=Gu(n,s);if(h<o&&Xr(n[h],s))return h}return-1}function nE(n,s){return Gu(n,s,!0)}function sE(n,s,o){return Zl(n,s,ut(o,2),!0)}function aE(n,s){var o=n==null?0:n.length;if(o){var h=Gu(n,s,!0)-1;if(Xr(n[h],s))return h}return-1}function uE(n){return n&&n.length?Jp(n):[]}function oE(n,s){return n&&n.length?Jp(n,ut(s,2)):[]}function lE(n){var s=n==null?0:n.length;return s?Or(n,1,s):[]}function hE(n,s,o){return n&&n.length?(s=o||s===e?1:gt(s),Or(n,0,s<0?0:s)):[]}function cE(n,s,o){var h=n==null?0:n.length;return h?(s=o||s===e?1:gt(s),s=h-s,Or(n,s<0?0:s,h)):[]}function fE(n,s){return n&&n.length?Yu(n,ut(s,3),!1,!0):[]}function pE(n,s){return n&&n.length?Yu(n,ut(s,3)):[]}var dE=Et(function(n){return dn(Te(n,1,ee,!0))}),gE=Et(function(n){var s=Nr(n);return ee(s)&&(s=e),dn(Te(n,1,ee,!0),ut(s,2))}),yE=Et(function(n){var s=Nr(n);return s=typeof s=="function"?s:e,dn(Te(n,1,ee,!0),e,s)});function mE(n){return n&&n.length?dn(n):[]}function vE(n,s){return n&&n.length?dn(n,ut(s,2)):[]}function xE(n,s){return s=typeof s=="function"?s:e,n&&n.length?dn(n,e,s):[]}function ph(n){if(!(n&&n.length))return[];var s=0;return n=ln(n,function(o){if(ee(o))return s=de(o.length,s),!0}),Nl(s,function(o){return Gt(n,Dl(o))})}function kd(n,s){if(!(n&&n.length))return[];var o=ph(n);return s==null?o:Gt(o,function(h){return or(s,e,h)})}var EE=Et(function(n,s){return ee(n)?Ia(n,s):[]}),AE=Et(function(n){return Kl(ln(n,ee))}),wE=Et(function(n){var s=Nr(n);return ee(s)&&(s=e),Kl(ln(n,ee),ut(s,2))}),bE=Et(function(n){var s=Nr(n);return s=typeof s=="function"?s:e,Kl(ln(n,ee),e,s)}),TE=Et(ph);function _E(n,s){return id(n||[],s||[],Ba)}function CE(n,s){return id(n||[],s||[],Pa)}var DE=Et(function(n){var s=n.length,o=s>1?n[s-1]:e;return o=typeof o=="function"?(n.pop(),o):e,kd(n,o)});function Hd(n){var s=m(n);return s.__chain__=!0,s}function SE(n,s){return s(n),n}function ro(n,s){return s(n)}var OE=Pi(function(n){var s=n.length,o=s?n[0]:0,h=this.__wrapped__,p=function(v){return Ul(v,n)};return s>1||this.__actions__.length||!(h instanceof wt)||!Fi(o)?this.thru(p):(h=h.slice(o,+o+(s?1:0)),h.__actions__.push({func:ro,args:[p],thisArg:e}),new Dr(h,this.__chain__).thru(function(v){return s&&!v.length&&v.push(e),v}))});function NE(){return Hd(this)}function ME(){return new Dr(this.value(),this.__chain__)}function BE(){this.__values__===e&&(this.__values__=tg(this.value()));var n=this.__index__>=this.__values__.length,s=n?e:this.__values__[this.__index__++];return{done:n,value:s}}function IE(){return this}function RE(n){for(var s,o=this;o instanceof qu;){var h=Id(o);h.__index__=0,h.__values__=e,s?p.__wrapped__=h:s=h;var p=h;o=o.__wrapped__}return p.__wrapped__=n,s}function LE(){var n=this.__wrapped__;if(n instanceof wt){var s=n;return this.__actions__.length&&(s=new wt(this)),s=s.reverse(),s.__actions__.push({func:ro,args:[fh],thisArg:e}),new Dr(s,this.__chain__)}return this.thru(fh)}function PE(){return rd(this.__wrapped__,this.__actions__)}var FE=Xu(function(n,s,o){Lt.call(n,o)?++n[o]:Ri(n,o,1)});function UE(n,s,o){var h=dt(n)?gp:S1;return o&&Ue(n,s,o)&&(s=e),h(n,ut(s,3))}function kE(n,s){var o=dt(n)?ln:kp;return o(n,ut(s,3))}var HE=pd(Rd),qE=pd(Ld);function WE(n,s){return Te(io(n,s),1)}function VE(n,s){return Te(io(n,s),yt)}function zE(n,s,o){return o=o===e?1:gt(o),Te(io(n,s),o)}function qd(n,s){var o=dt(n)?_r:pn;return o(n,ut(s,3))}function Wd(n,s){var o=dt(n)?lv:Up;return o(n,ut(s,3))}var $E=Xu(function(n,s,o){Lt.call(n,o)?n[o].push(s):Ri(n,o,[s])});function GE(n,s,o,h){n=Ke(n)?n:Ls(n),o=o&&!h?gt(o):0;var p=n.length;return o<0&&(o=de(p+o,0)),oo(n)?o<=p&&n.indexOf(s,o)>-1:!!p&&bs(n,s,o)>-1}var YE=Et(function(n,s,o){var h=-1,p=typeof s=="function",v=Ke(n)?I(n.length):[];return pn(n,function(A){v[++h]=p?or(s,A,o):Ra(A,s,o)}),v}),XE=Xu(function(n,s,o){Ri(n,o,s)});function io(n,s){var o=dt(n)?Gt:$p;return o(n,ut(s,3))}function ZE(n,s,o,h){return n==null?[]:(dt(s)||(s=s==null?[]:[s]),o=h?e:o,dt(o)||(o=o==null?[]:[o]),Zp(n,s,o))}var QE=Xu(function(n,s,o){n[o?0:1].push(s)},function(){return[[],[]]});function KE(n,s,o){var h=dt(n)?_l:xp,p=arguments.length<3;return h(n,ut(s,4),o,p,pn)}function jE(n,s,o){var h=dt(n)?hv:xp,p=arguments.length<3;return h(n,ut(s,4),o,p,Up)}function JE(n,s){var o=dt(n)?ln:kp;return o(n,ao(ut(s,3)))}function tA(n){var s=dt(n)?Rp:G1;return s(n)}function eA(n,s,o){(o?Ue(n,s,o):s===e)?s=1:s=gt(s);var h=dt(n)?b1:Y1;return h(n,s)}function rA(n){var s=dt(n)?T1:Z1;return s(n)}function iA(n){if(n==null)return 0;if(Ke(n))return oo(n)?_s(n):n.length;var s=Ie(n);return s==Kt||s==Dt?n.size:zl(n).length}function nA(n,s,o){var h=dt(n)?Cl:Q1;return o&&Ue(n,s,o)&&(s=e),h(n,ut(s,3))}var sA=Et(function(n,s){if(n==null)return[];var o=s.length;return o>1&&Ue(n,s[0],s[1])?s=[]:o>2&&Ue(s[0],s[1],s[2])&&(s=[s[0]]),Zp(n,Te(s,1),[])}),no=kv||function(){return be.Date.now()};function aA(n,s){if(typeof s!="function")throw new Cr(l);return n=gt(n),function(){if(--n<1)return s.apply(this,arguments)}}function Vd(n,s,o){return s=o?e:s,s=n&&s==null?n.length:s,Li(n,K,e,e,e,e,s)}function zd(n,s){var o;if(typeof s!="function")throw new Cr(l);return n=gt(n),function(){return--n>0&&(o=s.apply(this,arguments)),n<=1&&(s=e),o}}var dh=Et(function(n,s,o){var h=M;if(o.length){var p=cn(o,Is(dh));h|=P}return Li(n,h,s,o,p)}),$d=Et(function(n,s,o){var h=M|R;if(o.length){var p=cn(o,Is($d));h|=P}return Li(s,h,n,o,p)});function Gd(n,s,o){s=o?e:s;var h=Li(n,G,e,e,e,e,e,s);return h.placeholder=Gd.placeholder,h}function Yd(n,s,o){s=o?e:s;var h=Li(n,b,e,e,e,e,e,s);return h.placeholder=Yd.placeholder,h}function Xd(n,s,o){var h,p,v,A,_,S,V=0,z=!1,$=!1,Q=!0;if(typeof n!="function")throw new Cr(l);s=Mr(s)||0,Qt(o)&&(z=!!o.leading,$="maxWait"in o,v=$?de(Mr(o.maxWait)||0,s):v,Q="trailing"in o?!!o.trailing:Q);function nt(re){var Zr=h,Hi=p;return h=p=e,V=re,A=n.apply(Hi,Zr),A}function ot(re){return V=re,_=ka(At,s),z?nt(re):A}function xt(re){var Zr=re-S,Hi=re-V,pg=s-Zr;return $?Be(pg,v-Hi):pg}function lt(re){var Zr=re-S,Hi=re-V;return S===e||Zr>=s||Zr<0||$&&Hi>=v}function At(){var re=no();if(lt(re))return Tt(re);_=ka(At,xt(re))}function Tt(re){return _=e,Q&&h?nt(re):(h=p=e,A)}function fr(){_!==e&&nd(_),V=0,h=S=p=_=e}function ke(){return _===e?A:Tt(no())}function pr(){var re=no(),Zr=lt(re);if(h=arguments,p=this,S=re,Zr){if(_===e)return ot(S);if($)return nd(_),_=ka(At,s),nt(S)}return _===e&&(_=ka(At,s)),A}return pr.cancel=fr,pr.flush=ke,pr}var uA=Et(function(n,s){return Fp(n,1,s)}),oA=Et(function(n,s,o){return Fp(n,Mr(s)||0,o)});function lA(n){return Li(n,Z)}function so(n,s){if(typeof n!="function"||s!=null&&typeof s!="function")throw new Cr(l);var o=function(){var h=arguments,p=s?s.apply(this,h):h[0],v=o.cache;if(v.has(p))return v.get(p);var A=n.apply(this,h);return o.cache=v.set(p,A)||v,A};return o.cache=new(so.Cache||Ii),o}so.Cache=Ii;function ao(n){if(typeof n!="function")throw new Cr(l);return function(){var s=arguments;switch(s.length){case 0:return!n.call(this);case 1:return!n.call(this,s[0]);case 2:return!n.call(this,s[0],s[1]);case 3:return!n.call(this,s[0],s[1],s[2])}return!n.apply(this,s)}}function hA(n){return zd(2,n)}var cA=K1(function(n,s){s=s.length==1&&dt(s[0])?Gt(s[0],lr(ut())):Gt(Te(s,1),lr(ut()));var o=s.length;return Et(function(h){for(var p=-1,v=Be(h.length,o);++p<v;)h[p]=s[p].call(this,h[p]);return or(n,this,h)})}),gh=Et(function(n,s){var o=cn(s,Is(gh));return Li(n,P,e,s,o)}),Zd=Et(function(n,s){var o=cn(s,Is(Zd));return Li(n,H,e,s,o)}),fA=Pi(function(n,s){return Li(n,tt,e,e,e,s)});function pA(n,s){if(typeof n!="function")throw new Cr(l);return s=s===e?s:gt(s),Et(n,s)}function dA(n,s){if(typeof n!="function")throw new Cr(l);return s=s==null?0:de(gt(s),0),Et(function(o){var h=o[s],p=yn(o,0,s);return h&&hn(p,h),or(n,this,p)})}function gA(n,s,o){var h=!0,p=!0;if(typeof n!="function")throw new Cr(l);return Qt(o)&&(h="leading"in o?!!o.leading:h,p="trailing"in o?!!o.trailing:p),Xd(n,s,{leading:h,maxWait:s,trailing:p})}function yA(n){return Vd(n,1)}function mA(n,s){return gh(Jl(s),n)}function vA(){if(!arguments.length)return[];var n=arguments[0];return dt(n)?n:[n]}function xA(n){return Sr(n,C)}function EA(n,s){return s=typeof s=="function"?s:e,Sr(n,C,s)}function AA(n){return Sr(n,E|C)}function wA(n,s){return s=typeof s=="function"?s:e,Sr(n,E|C,s)}function bA(n,s){return s==null||Pp(n,s,Ee(s))}function Xr(n,s){return n===s||n!==n&&s!==s}var TA=ju(ql),_A=ju(function(n,s){return n>=s}),Gn=Wp(function(){return arguments}())?Wp:function(n){return jt(n)&&Lt.call(n,"callee")&&!Sp.call(n,"callee")},dt=I.isArray,CA=lp?lr(lp):R1;function Ke(n){return n!=null&&uo(n.length)&&!Ui(n)}function ee(n){return jt(n)&&Ke(n)}function DA(n){return n===!0||n===!1||jt(n)&&Fe(n)==Xt}var mn=qv||Ch,SA=hp?lr(hp):L1;function OA(n){return jt(n)&&n.nodeType===1&&!Ha(n)}function NA(n){if(n==null)return!0;if(Ke(n)&&(dt(n)||typeof n=="string"||typeof n.splice=="function"||mn(n)||Rs(n)||Gn(n)))return!n.length;var s=Ie(n);if(s==Kt||s==Dt)return!n.size;if(Ua(n))return!zl(n).length;for(var o in n)if(Lt.call(n,o))return!1;return!0}function MA(n,s){return La(n,s)}function BA(n,s,o){o=typeof o=="function"?o:e;var h=o?o(n,s):e;return h===e?La(n,s,e,o):!!h}function yh(n){if(!jt(n))return!1;var s=Fe(n);return s==Oe||s==Wt||typeof n.message=="string"&&typeof n.name=="string"&&!Ha(n)}function IA(n){return typeof n=="number"&&Np(n)}function Ui(n){if(!Qt(n))return!1;var s=Fe(n);return s==Pe||s==$e||s==$t||s==Ci}function Qd(n){return typeof n=="number"&&n==gt(n)}function uo(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=Bt}function Qt(n){var s=typeof n;return n!=null&&(s=="object"||s=="function")}function jt(n){return n!=null&&typeof n=="object"}var Kd=cp?lr(cp):F1;function RA(n,s){return n===s||Vl(n,s,ah(s))}function LA(n,s,o){return o=typeof o=="function"?o:e,Vl(n,s,ah(s),o)}function PA(n){return jd(n)&&n!=+n}function FA(n){if(Ex(n))throw new pt(u);return Vp(n)}function UA(n){return n===null}function kA(n){return n==null}function jd(n){return typeof n=="number"||jt(n)&&Fe(n)==Ne}function Ha(n){if(!jt(n)||Fe(n)!=Zt)return!1;var s=Ru(n);if(s===null)return!0;var o=Lt.call(s,"constructor")&&s.constructor;return typeof o=="function"&&o instanceof o&&Nu.call(o)==Lv}var mh=fp?lr(fp):U1;function HA(n){return Qd(n)&&n>=-Bt&&n<=Bt}var Jd=pp?lr(pp):k1;function oo(n){return typeof n=="string"||!dt(n)&&jt(n)&&Fe(n)==nr}function cr(n){return typeof n=="symbol"||jt(n)&&Fe(n)==Ge}var Rs=dp?lr(dp):H1;function qA(n){return n===e}function WA(n){return jt(n)&&Ie(n)==Er}function VA(n){return jt(n)&&Fe(n)==Ji}var zA=ju($l),$A=ju(function(n,s){return n<=s});function tg(n){if(!n)return[];if(Ke(n))return oo(n)?Gr(n):Qe(n);if(Da&&n[Da])return bv(n[Da]());var s=Ie(n),o=s==Kt?Bl:s==Dt?Du:Ls;return o(n)}function ki(n){if(!n)return n===0?n:0;if(n=Mr(n),n===yt||n===-yt){var s=n<0?-1:1;return s*Re}return n===n?n:0}function gt(n){var s=ki(n),o=s%1;return s===s?o?s-o:s:0}function eg(n){return n?Wn(gt(n),0,ae):0}function Mr(n){if(typeof n=="number")return n;if(cr(n))return we;if(Qt(n)){var s=typeof n.valueOf=="function"?n.valueOf():n;n=Qt(s)?s+"":s}if(typeof n!="string")return n===0?n:+n;n=Ep(n);var o=Oi.test(n);return o||Ln.test(n)?av(n.slice(2),o?2:8):wa.test(n)?we:+n}function rg(n){return ci(n,je(n))}function GA(n){return n?Wn(gt(n),-Bt,Bt):n===0?n:0}function It(n){return n==null?"":hr(n)}var YA=Ms(function(n,s){if(Ua(s)||Ke(s)){ci(s,Ee(s),n);return}for(var o in s)Lt.call(s,o)&&Ba(n,o,s[o])}),ig=Ms(function(n,s){ci(s,je(s),n)}),lo=Ms(function(n,s,o,h){ci(s,je(s),n,h)}),XA=Ms(function(n,s,o,h){ci(s,Ee(s),n,h)}),ZA=Pi(Ul);function QA(n,s){var o=Ns(n);return s==null?o:Lp(o,s)}var KA=Et(function(n,s){n=kt(n);var o=-1,h=s.length,p=h>2?s[2]:e;for(p&&Ue(s[0],s[1],p)&&(h=1);++o<h;)for(var v=s[o],A=je(v),_=-1,S=A.length;++_<S;){var V=A[_],z=n[V];(z===e||Xr(z,Ds[V])&&!Lt.call(n,V))&&(n[V]=v[V])}return n}),jA=Et(function(n){return n.push(e,Ed),or(ng,e,n)});function JA(n,s){return yp(n,ut(s,3),hi)}function tw(n,s){return yp(n,ut(s,3),Hl)}function ew(n,s){return n==null?n:kl(n,ut(s,3),je)}function rw(n,s){return n==null?n:Hp(n,ut(s,3),je)}function iw(n,s){return n&&hi(n,ut(s,3))}function nw(n,s){return n&&Hl(n,ut(s,3))}function sw(n){return n==null?[]:zu(n,Ee(n))}function aw(n){return n==null?[]:zu(n,je(n))}function vh(n,s,o){var h=n==null?e:Vn(n,s);return h===e?o:h}function uw(n,s){return n!=null&&bd(n,s,N1)}function xh(n,s){return n!=null&&bd(n,s,M1)}var ow=gd(function(n,s,o){s!=null&&typeof s.toString!="function"&&(s=Mu.call(s)),n[s]=o},Ah(Je)),lw=gd(function(n,s,o){s!=null&&typeof s.toString!="function"&&(s=Mu.call(s)),Lt.call(n,s)?n[s].push(o):n[s]=[o]},ut),hw=Et(Ra);function Ee(n){return Ke(n)?Ip(n):zl(n)}function je(n){return Ke(n)?Ip(n,!0):q1(n)}function cw(n,s){var o={};return s=ut(s,3),hi(n,function(h,p,v){Ri(o,s(h,p,v),h)}),o}function fw(n,s){var o={};return s=ut(s,3),hi(n,function(h,p,v){Ri(o,p,s(h,p,v))}),o}var pw=Ms(function(n,s,o){$u(n,s,o)}),ng=Ms(function(n,s,o,h){$u(n,s,o,h)}),dw=Pi(function(n,s){var o={};if(n==null)return o;var h=!1;s=Gt(s,function(v){return v=gn(v,n),h||(h=v.length>1),v}),ci(n,nh(n),o),h&&(o=Sr(o,E|T|C,ox));for(var p=s.length;p--;)Ql(o,s[p]);return o});function gw(n,s){return sg(n,ao(ut(s)))}var yw=Pi(function(n,s){return n==null?{}:V1(n,s)});function sg(n,s){if(n==null)return{};var o=Gt(nh(n),function(h){return[h]});return s=ut(s),Qp(n,o,function(h,p){return s(h,p[0])})}function mw(n,s,o){s=gn(s,n);var h=-1,p=s.length;for(p||(p=1,n=e);++h<p;){var v=n==null?e:n[fi(s[h])];v===e&&(h=p,v=o),n=Ui(v)?v.call(n):v}return n}function vw(n,s,o){return n==null?n:Pa(n,s,o)}function xw(n,s,o,h){return h=typeof h=="function"?h:e,n==null?n:Pa(n,s,o,h)}var ag=vd(Ee),ug=vd(je);function Ew(n,s,o){var h=dt(n),p=h||mn(n)||Rs(n);if(s=ut(s,4),o==null){var v=n&&n.constructor;p?o=h?new v:[]:Qt(n)?o=Ui(v)?Ns(Ru(n)):{}:o={}}return(p?_r:hi)(n,function(A,_,S){return s(o,A,_,S)}),o}function Aw(n,s){return n==null?!0:Ql(n,s)}function ww(n,s,o){return n==null?n:ed(n,s,Jl(o))}function bw(n,s,o,h){return h=typeof h=="function"?h:e,n==null?n:ed(n,s,Jl(o),h)}function Ls(n){return n==null?[]:Ml(n,Ee(n))}function Tw(n){return n==null?[]:Ml(n,je(n))}function _w(n,s,o){return o===e&&(o=s,s=e),o!==e&&(o=Mr(o),o=o===o?o:0),s!==e&&(s=Mr(s),s=s===s?s:0),Wn(Mr(n),s,o)}function Cw(n,s,o){return s=ki(s),o===e?(o=s,s=0):o=ki(o),n=Mr(n),B1(n,s,o)}function Dw(n,s,o){if(o&&typeof o!="boolean"&&Ue(n,s,o)&&(s=o=e),o===e&&(typeof s=="boolean"?(o=s,s=e):typeof n=="boolean"&&(o=n,n=e)),n===e&&s===e?(n=0,s=1):(n=ki(n),s===e?(s=n,n=0):s=ki(s)),n>s){var h=n;n=s,s=h}if(o||n%1||s%1){var p=Mp();return Be(n+p*(s-n+sv("1e-"+((p+"").length-1))),s)}return Yl(n,s)}var Sw=Bs(function(n,s,o){return s=s.toLowerCase(),n+(o?og(s):s)});function og(n){return Eh(It(n).toLowerCase())}function lg(n){return n=It(n),n&&n.replace(ba,vv).replace(Zm,"")}function Ow(n,s,o){n=It(n),s=hr(s);var h=n.length;o=o===e?h:Wn(gt(o),0,h);var p=o;return o-=s.length,o>=0&&n.slice(o,p)==s}function Nw(n){return n=It(n),n&&Mn.test(n)?n.replace(rn,xv):n}function Mw(n){return n=It(n),n&&gl.test(n)?n.replace(an,"\\$&"):n}var Bw=Bs(function(n,s,o){return n+(o?"-":"")+s.toLowerCase()}),Iw=Bs(function(n,s,o){return n+(o?" ":"")+s.toLowerCase()}),Rw=fd("toLowerCase");function Lw(n,s,o){n=It(n),s=gt(s);var h=s?_s(n):0;if(!s||h>=s)return n;var p=(s-h)/2;return Ku(Uu(p),o)+n+Ku(Fu(p),o)}function Pw(n,s,o){n=It(n),s=gt(s);var h=s?_s(n):0;return s&&h<s?n+Ku(s-h,o):n}function Fw(n,s,o){n=It(n),s=gt(s);var h=s?_s(n):0;return s&&h<s?Ku(s-h,o)+n:n}function Uw(n,s,o){return o||s==null?s=0:s&&(s=+s),$v(It(n).replace(xa,""),s||0)}function kw(n,s,o){return(o?Ue(n,s,o):s===e)?s=1:s=gt(s),Xl(It(n),s)}function Hw(){var n=arguments,s=It(n[0]);return n.length<3?s:s.replace(n[1],n[2])}var qw=Bs(function(n,s,o){return n+(o?"_":"")+s.toLowerCase()});function Ww(n,s,o){return o&&typeof o!="number"&&Ue(n,s,o)&&(s=o=e),o=o===e?ae:o>>>0,o?(n=It(n),n&&(typeof s=="string"||s!=null&&!mh(s))&&(s=hr(s),!s&&Ts(n))?yn(Gr(n),0,o):n.split(s,o)):[]}var Vw=Bs(function(n,s,o){return n+(o?" ":"")+Eh(s)});function zw(n,s,o){return n=It(n),o=o==null?0:Wn(gt(o),0,n.length),s=hr(s),n.slice(o,o+s.length)==s}function $w(n,s,o){var h=m.templateSettings;o&&Ue(n,s,o)&&(s=e),n=It(n),s=lo({},s,h,xd);var p=lo({},s.imports,h.imports,xd),v=Ee(p),A=Ml(p,v),_,S,V=0,z=s.interpolate||ms,$="__p += '",Q=Il((s.escape||ms).source+"|"+z.source+"|"+(z===Bn?Au:ms).source+"|"+(s.evaluate||ms).source+"|$","g"),nt="//# sourceURL="+(Lt.call(s,"sourceURL")?(s.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++tv+"]")+`
15
+ `;n.replace(Q,function(lt,At,Tt,fr,ke,pr){return Tt||(Tt=fr),$+=n.slice(V,pr).replace(vl,Ev),At&&(_=!0,$+=`' +
16
16
  __e(`+At+`) +
17
- '`),Ue&&(S=!0,$+=`';
18
- `+Ue+`;
17
+ '`),ke&&(S=!0,$+=`';
18
+ `+ke+`;
19
19
  __p += '`),Tt&&($+=`' +
20
20
  ((__t = (`+Tt+`)) == null ? '' : __t) +
21
- '`),W=pr+lt.length,lt}),$+=`';
21
+ '`),V=pr+lt.length,lt}),$+=`';
22
22
  `;var ot=Lt.call(s,"variable")&&s.variable;if(!ot)$=`with (obj) {
23
23
  `+$+`
24
24
  }
25
- `;else if(uu.test(ot))throw new pt(c);$=(S?$.replace(vt,""):$).replace(fe,"$1").replace(Me,"$1;"),$="function("+(ot||"obj")+`) {
25
+ `;else if(xu.test(ot))throw new pt(c);$=(S?$.replace(mt,""):$).replace(fe,"$1").replace(Me,"$1;"),$="function("+(ot||"obj")+`) {
26
26
  `+(ot?"":`obj || (obj = {});
27
- `)+"var __t, __p = ''"+(T?", __e = _.escape":"")+(S?`, __j = Array.prototype.join;
27
+ `)+"var __t, __p = ''"+(_?", __e = _.escape":"")+(S?`, __j = Array.prototype.join;
28
28
  function print() { __p += __j.call(arguments, '') }
29
29
  `:`;
30
30
  `)+$+`return __p
31
- }`;var xt=Xd(function(){return Nt(m,nt+"return "+$).apply(e,E)});if(xt.source=$,ih(xt))throw xt;return xt}function yb(i){return It(i).toLowerCase()}function vb(i){return It(i).toUpperCase()}function mb(i,s,o){if(i=It(i),i&&(o||s===e))return ip(i);if(!i||!(s=hr(s)))return i;var h=$r(i),p=$r(s),m=np(h,p),E=sp(h,p)+1;return ln(h,m,E).join("")}function xb(i,s,o){if(i=It(i),i&&(o||s===e))return i.slice(0,up(i)+1);if(!i||!(s=hr(s)))return i;var h=$r(i),p=sp(h,$r(s))+1;return ln(h,0,p).join("")}function Eb(i,s,o){if(i=It(i),i&&(o||s===e))return i.replace(la,"");if(!i||!(s=hr(s)))return i;var h=$r(i),p=np(h,$r(s));return ln(h,p).join("")}function Ab(i,s){var o=rt,h=J;if(Xt(s)){var p="separator"in s?s.separator:p;o="length"in s?gt(s.length):o,h="omission"in s?hr(s.omission):h}i=It(i);var m=i.length;if(ys(i)){var E=$r(i);m=E.length}if(o>=m)return i;var T=o-vs(h);if(T<1)return h;var S=E?ln(E,0,T).join(""):i.slice(0,T);if(p===e)return S+h;if(E&&(T+=S.length-T),nh(p)){if(i.slice(T).search(p)){var W,V=S;for(p.global||(p=El(p.source,It(ca.exec(p))+"g")),p.lastIndex=0;W=p.exec(V);)var $=W.index;S=S.slice(0,$===e?T:$)}}else if(i.indexOf(hr(p),T)!=T){var Q=S.lastIndexOf(p);Q>-1&&(S=S.slice(0,Q))}return S+h}function bb(i){return i=It(i),i&&ar.test(i)?i.replace(xr,jv):i}var wb=Ts(function(i,s,o){return i+(o?" ":"")+s.toUpperCase()}),uh=Zp("toUpperCase");function Yd(i,s,o){return i=It(i),s=o?e:s,s===e?Gv(i)?tm(i):Fv(i):i.match(s)||[]}var Xd=Et(function(i,s){try{return or(i,e,s)}catch(o){return ih(o)?o:new pt(o)}}),Tb=Mi(function(i,s){return wr(s,function(o){o=li(o),Oi(i,o,eh(i[o],i))}),i});function _b(i){var s=i==null?0:i.length,o=ut();return i=s?$t(i,function(h){if(typeof h[1]!="function")throw new Tr(l);return[o(h[0]),h[1]]}):[],Et(function(h){for(var p=-1;++p<s;){var m=i[p];if(or(m[0],this,h))return or(m[1],this,h)}})}function Cb(i){return jm(Cr(i,A))}function oh(i){return function(){return i}}function Db(i,s){return i==null||i!==i?s:i}var Sb=jp(),Ob=jp(!0);function Je(i){return i}function lh(i){return Dp(typeof i=="function"?i:Cr(i,A))}function Nb(i){return Op(Cr(i,A))}function Mb(i,s){return Np(i,Cr(s,A))}var Bb=Et(function(i,s){return function(o){return Ta(o,i,s)}}),Ib=Et(function(i,s){return function(o){return Ta(i,o,s)}});function hh(i,s,o){var h=Ee(s),p=Bu(s,h);o==null&&!(Xt(s)&&(p.length||!h.length))&&(o=s,s=i,i=this,p=Bu(s,Ee(s)));var m=!(Xt(o)&&"chain"in o)||!!o.chain,E=Ii(i);return wr(p,function(T){var S=s[T];i[T]=S,E&&(i.prototype[T]=function(){var W=this.__chain__;if(m||W){var V=i(this.__wrapped__),$=V.__actions__=Qe(this.__actions__);return $.push({func:S,args:arguments,thisArg:i}),V.__chain__=W,V}return S.apply(i,rn([this.value()],arguments))})}),i}function Rb(){return we._===this&&(we._=am),this}function ch(){}function Lb(i){return i=gt(i),Et(function(s){return Mp(s,i)})}var Pb=Wl($t),Fb=Wl(Kf),kb=Wl(pl);function Zd(i){return Zl(i)?dl(li(i)):d1(i)}function Ub(i){return function(s){return i==null?e:Ln(i,s)}}var Hb=Jp(),qb=Jp(!0);function fh(){return[]}function ph(){return!1}function Wb(){return{}}function Vb(){return""}function $b(){return!0}function zb(i,s){if(i=gt(i),i<1||i>Bt)return[];var o=se,h=Be(i,se);s=ut(s),i-=se;for(var p=vl(h,s);++o<i;)s(o);return p}function Gb(i){return dt(i)?$t(i,li):cr(i)?[i]:Qe(gd(It(i)))}function Yb(i){var s=++nm;return It(i)+s}var Xb=ku(function(i,s){return i+s},0),Zb=Vl("ceil"),Qb=ku(function(i,s){return i/s},1),jb=Vl("floor");function Kb(i){return i&&i.length?Mu(i,Je,Sl):e}function Jb(i,s){return i&&i.length?Mu(i,ut(s,2),Sl):e}function tw(i){return ep(i,Je)}function ew(i,s){return ep(i,ut(s,2))}function rw(i){return i&&i.length?Mu(i,Je,Bl):e}function iw(i,s){return i&&i.length?Mu(i,ut(s,2),Bl):e}var nw=ku(function(i,s){return i*s},1),sw=Vl("round"),aw=ku(function(i,s){return i-s},0);function uw(i){return i&&i.length?yl(i,Je):0}function ow(i,s){return i&&i.length?yl(i,ut(s,2)):0}return v.after=NE,v.ary=Cd,v.assign=vA,v.assignIn=Hd,v.assignInWith=ju,v.assignWith=mA,v.at=xA,v.before=Dd,v.bind=eh,v.bindAll=Tb,v.bindKey=Sd,v.castArray=WE,v.chain=wd,v.chunk=j1,v.compact=K1,v.concat=J1,v.cond=_b,v.conforms=Cb,v.constant=oh,v.countBy=uE,v.create=EA,v.curry=Od,v.curryRight=Nd,v.debounce=Md,v.defaults=AA,v.defaultsDeep=bA,v.defer=ME,v.delay=BE,v.difference=tx,v.differenceBy=ex,v.differenceWith=rx,v.drop=ix,v.dropRight=nx,v.dropRightWhile=sx,v.dropWhile=ax,v.fill=ux,v.filter=lE,v.flatMap=fE,v.flatMapDeep=pE,v.flatMapDepth=dE,v.flatten=xd,v.flattenDeep=ox,v.flattenDepth=lx,v.flip=IE,v.flow=Sb,v.flowRight=Ob,v.fromPairs=hx,v.functions=OA,v.functionsIn=NA,v.groupBy=gE,v.initial=fx,v.intersection=px,v.intersectionBy=dx,v.intersectionWith=gx,v.invert=BA,v.invertBy=IA,v.invokeMap=vE,v.iteratee=lh,v.keyBy=mE,v.keys=Ee,v.keysIn=Ke,v.map=zu,v.mapKeys=LA,v.mapValues=PA,v.matches=Nb,v.matchesProperty=Mb,v.memoize=Yu,v.merge=FA,v.mergeWith=qd,v.method=Bb,v.methodOf=Ib,v.mixin=hh,v.negate=Xu,v.nthArg=Lb,v.omit=kA,v.omitBy=UA,v.once=RE,v.orderBy=xE,v.over=Pb,v.overArgs=LE,v.overEvery=Fb,v.overSome=kb,v.partial=rh,v.partialRight=Bd,v.partition=EE,v.pick=HA,v.pickBy=Wd,v.property=Zd,v.propertyOf=Ub,v.pull=xx,v.pullAll=Ad,v.pullAllBy=Ex,v.pullAllWith=Ax,v.pullAt=bx,v.range=Hb,v.rangeRight=qb,v.rearg=PE,v.reject=wE,v.remove=wx,v.rest=FE,v.reverse=Jl,v.sampleSize=_E,v.set=WA,v.setWith=VA,v.shuffle=CE,v.slice=Tx,v.sortBy=OE,v.sortedUniq=Mx,v.sortedUniqBy=Bx,v.split=fb,v.spread=kE,v.tail=Ix,v.take=Rx,v.takeRight=Lx,v.takeRightWhile=Px,v.takeWhile=Fx,v.tap=Kx,v.throttle=UE,v.thru=$u,v.toArray=Fd,v.toPairs=Vd,v.toPairsIn=$d,v.toPath=Gb,v.toPlainObject=Ud,v.transform=$A,v.unary=HE,v.union=kx,v.unionBy=Ux,v.unionWith=Hx,v.uniq=qx,v.uniqBy=Wx,v.uniqWith=Vx,v.unset=zA,v.unzip=th,v.unzipWith=bd,v.update=GA,v.updateWith=YA,v.values=Ds,v.valuesIn=XA,v.without=$x,v.words=Yd,v.wrap=qE,v.xor=zx,v.xorBy=Gx,v.xorWith=Yx,v.zip=Xx,v.zipObject=Zx,v.zipObjectDeep=Qx,v.zipWith=jx,v.entries=Vd,v.entriesIn=$d,v.extend=Hd,v.extendWith=ju,hh(v,v),v.add=Xb,v.attempt=Xd,v.camelCase=KA,v.capitalize=zd,v.ceil=Zb,v.clamp=ZA,v.clone=VE,v.cloneDeep=zE,v.cloneDeepWith=GE,v.cloneWith=$E,v.conformsTo=YE,v.deburr=Gd,v.defaultTo=Db,v.divide=Qb,v.endsWith=JA,v.eq=Gr,v.escape=tb,v.escapeRegExp=eb,v.every=oE,v.find=hE,v.findIndex=vd,v.findKey=wA,v.findLast=cE,v.findLastIndex=md,v.findLastKey=TA,v.floor=jb,v.forEach=Td,v.forEachRight=_d,v.forIn=_A,v.forInRight=CA,v.forOwn=DA,v.forOwnRight=SA,v.get=sh,v.gt=XE,v.gte=ZE,v.has=MA,v.hasIn=ah,v.head=Ed,v.identity=Je,v.includes=yE,v.indexOf=cx,v.inRange=QA,v.invoke=RA,v.isArguments=kn,v.isArray=dt,v.isArrayBuffer=QE,v.isArrayLike=je,v.isArrayLikeObject=te,v.isBoolean=jE,v.isBuffer=hn,v.isDate=KE,v.isElement=JE,v.isEmpty=tA,v.isEqual=eA,v.isEqualWith=rA,v.isError=ih,v.isFinite=iA,v.isFunction=Ii,v.isInteger=Id,v.isLength=Zu,v.isMap=Rd,v.isMatch=nA,v.isMatchWith=sA,v.isNaN=aA,v.isNative=uA,v.isNil=lA,v.isNull=oA,v.isNumber=Ld,v.isObject=Xt,v.isObjectLike=jt,v.isPlainObject=Na,v.isRegExp=nh,v.isSafeInteger=hA,v.isSet=Pd,v.isString=Qu,v.isSymbol=cr,v.isTypedArray=Cs,v.isUndefined=cA,v.isWeakMap=fA,v.isWeakSet=pA,v.join=yx,v.kebabCase=rb,v.last=Sr,v.lastIndexOf=vx,v.lowerCase=ib,v.lowerFirst=nb,v.lt=dA,v.lte=gA,v.max=Kb,v.maxBy=Jb,v.mean=tw,v.meanBy=ew,v.min=rw,v.minBy=iw,v.stubArray=fh,v.stubFalse=ph,v.stubObject=Wb,v.stubString=Vb,v.stubTrue=$b,v.multiply=nw,v.nth=mx,v.noConflict=Rb,v.noop=ch,v.now=Gu,v.pad=sb,v.padEnd=ab,v.padStart=ub,v.parseInt=ob,v.random=jA,v.reduce=AE,v.reduceRight=bE,v.repeat=lb,v.replace=hb,v.result=qA,v.round=sw,v.runInContext=D,v.sample=TE,v.size=DE,v.snakeCase=cb,v.some=SE,v.sortedIndex=_x,v.sortedIndexBy=Cx,v.sortedIndexOf=Dx,v.sortedLastIndex=Sx,v.sortedLastIndexBy=Ox,v.sortedLastIndexOf=Nx,v.startCase=pb,v.startsWith=db,v.subtract=aw,v.sum=uw,v.sumBy=ow,v.template=gb,v.times=zb,v.toFinite=Ri,v.toInteger=gt,v.toLength=kd,v.toLower=yb,v.toNumber=Or,v.toSafeInteger=yA,v.toString=It,v.toUpper=vb,v.trim=mb,v.trimEnd=xb,v.trimStart=Eb,v.truncate=Ab,v.unescape=bb,v.uniqueId=Yb,v.upperCase=wb,v.upperFirst=uh,v.each=Td,v.eachRight=_d,v.first=Ed,hh(v,function(){var i={};return ui(v,function(s,o){Lt.call(v.prototype,o)||(i[o]=s)}),i}(),{chain:!1}),v.VERSION=n,wr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){v[i].placeholder=v}),wr(["drop","take"],function(i,s){bt.prototype[i]=function(o){o=o===e?1:de(gt(o),0);var h=this.__filtered__&&!s?new bt(this):this.clone();return h.__filtered__?h.__takeCount__=Be(o,h.__takeCount__):h.__views__.push({size:Be(o,se),type:i+(h.__dir__<0?"Right":"")}),h},bt.prototype[i+"Right"]=function(o){return this.reverse()[i](o).reverse()}}),wr(["filter","map","takeWhile"],function(i,s){var o=s+1,h=o==ct||o==O;bt.prototype[i]=function(p){var m=this.clone();return m.__iteratees__.push({iteratee:ut(p,3),type:o}),m.__filtered__=m.__filtered__||h,m}}),wr(["head","last"],function(i,s){var o="take"+(s?"Right":"");bt.prototype[i]=function(){return this[o](1).value()[0]}}),wr(["initial","tail"],function(i,s){var o="drop"+(s?"":"Right");bt.prototype[i]=function(){return this.__filtered__?new bt(this):this[o](1)}}),bt.prototype.compact=function(){return this.filter(Je)},bt.prototype.find=function(i){return this.filter(i).head()},bt.prototype.findLast=function(i){return this.reverse().find(i)},bt.prototype.invokeMap=Et(function(i,s){return typeof i=="function"?new bt(this):this.map(function(o){return Ta(o,i,s)})}),bt.prototype.reject=function(i){return this.filter(Xu(ut(i)))},bt.prototype.slice=function(i,s){i=gt(i);var o=this;return o.__filtered__&&(i>0||s<0)?new bt(o):(i<0?o=o.takeRight(-i):i&&(o=o.drop(i)),s!==e&&(s=gt(s),o=s<0?o.dropRight(-s):o.take(s-i)),o)},bt.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},bt.prototype.toArray=function(){return this.take(se)},ui(bt.prototype,function(i,s){var o=/^(?:filter|find|map|reject)|While$/.test(s),h=/^(?:head|last)$/.test(s),p=v[h?"take"+(s=="last"?"Right":""):s],m=h||/^find/.test(s);p&&(v.prototype[s]=function(){var E=this.__wrapped__,T=h?[1]:arguments,S=E instanceof bt,W=T[0],V=S||dt(E),$=function(At){var Tt=p.apply(v,rn([At],T));return h&&Q?Tt[0]:Tt};V&&o&&typeof W=="function"&&W.length!=1&&(S=V=!1);var Q=this.__chain__,nt=!!this.__actions__.length,ot=m&&!Q,xt=S&&!nt;if(!m&&V){E=xt?E:new bt(this);var lt=i.apply(E,T);return lt.__actions__.push({func:$u,args:[$],thisArg:e}),new _r(lt,Q)}return ot&&xt?i.apply(this,T):(lt=this.thru($),ot?h?lt.value()[0]:lt.value():lt)})}),wr(["pop","push","shift","sort","splice","unshift"],function(i){var s=yu[i],o=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",h=/^(?:pop|shift)$/.test(i);v.prototype[i]=function(){var p=arguments;if(h&&!this.__chain__){var m=this.value();return s.apply(dt(m)?m:[],p)}return this[o](function(E){return s.apply(dt(E)?E:[],p)})}}),ui(bt.prototype,function(i,s){var o=v[s];if(o){var h=o.name+"";Lt.call(As,h)||(As[h]=[]),As[h].push({name:s,func:o})}}),As[Fu(e,R).name]=[{name:"wrapper",func:e}],bt.prototype.clone=bm,bt.prototype.reverse=wm,bt.prototype.value=Tm,v.prototype.at=Jx,v.prototype.chain=tE,v.prototype.commit=eE,v.prototype.next=rE,v.prototype.plant=nE,v.prototype.reverse=sE,v.prototype.toJSON=v.prototype.valueOf=v.prototype.value=aE,v.prototype.first=v.prototype.head,va&&(v.prototype[va]=iE),v},ms=em();Nn?((Nn.exports=ms)._=ms,ll._=ms):we._=ms}).call(Os)}(Wa,Wa.exports);var kg=Wa.exports;const Mt=yh(kg);class St{isBox2=!0;min;max;constructor(t=new Y(1/0,1/0),e=new Y(-1/0,-1/0)){this.min=t,this.max=e}applyMatrix3(t){return this.isEmpty()?this:(qs[0].set(this.min.x,this.min.y).applyMatrix3(t),qs[1].set(this.min.x,this.max.y).applyMatrix3(t),qs[3].set(this.max.x,this.max.y).applyMatrix3(t),qs[2].set(this.max.x,this.min.y).applyMatrix3(t),this.setFromPoints(qs),this)}clone(){return new St().copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}containsPoint(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y)}containsBox(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}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}ceil(){return this.min.ceilToZero(),this.max.ceilToZero(),this}distanceToPoint(t){return Br.copy(t).clamp(this.min,this.max).sub(t).length()}expandByXY(t,e){return this.min.minXY(t,e),this.max.maxXY(t,e),this}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByPoints(t){if(!t||!t.length)return this;for(let e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}expandByObject(t){return t.updateWorldMatrix(!1,!1),t.geometry.boundingBox!==void 0?((!t.geometry.boundingBox||t.geometry.boundingBox.isEmpty())&&t.computeBoundingBox(),Qn.copy(t.geometry.boundingBox),Qn.applyMatrix3(t.matrixWorld),this.union(Qn)):t.geometry.points&&t.geometry.points.length&&(Qn.setFromPoints(t.geometry.points),Qn.applyMatrix3(t.matrixWorld),this.union(Qn)),this}expandByBox(t){this.expandByPoint(t.min),this.expandByPoint(t.max)}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}floor(){return this.min.floorToZero(),this.max.floorToZero(),this}getCenter(t=new Y){return this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return this.isEmpty()?t.set(0,0):t.subVectors(this.max,this.min)}getPoints(t=[]){return t.length=0,t[0]={x:this.min.x,y:this.min.y},t[1]={x:this.min.x,y:this.max.y},t[2]={x:this.max.x,y:this.max.y},t[3]={x:this.max.x,y:this.min.y},t}getArea(){return this.getSize(Br),Br.x*Br.y}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}intersectsBox(t){return t?!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y):!1}intersectsObject(t){return!t||!t.geometry?!1:this.intersectsBox(t.geometry.boundingBox)}intersect(t){return this.min.max(t.min),this.max.min(t.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}round(){return this.min.roundToZero(),this.max.roundToZero(),this}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){this.makeEmpty();for(let e=0,n=t.length;e<n;e+=3)this.expandByPoint(Br.fromArray(t,e));return this}setFromPoints(t){this.makeEmpty();for(let e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this}setFromCenterAndSize(t,e){const n=Br.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(n),this.max.copy(t).add(n),this}setFromProjectionMatrix(t){return this.min.set(t.elements[6],t.elements[7]),this.max.set(t.elements[6],t.elements[7]),this}setFromObject(t){return this.makeEmpty(),this.expandByObject(t)}setFromMinMaxString(t,e=" "){if(this.makeEmpty(),!(t!=null&&t.length))return this;let n=t.split(e),a=Mt.map(n,u=>parseFloat(u));for(let u=0,l=a.length;u<l;u+=2)this.expandByPoint(Br.fromArray(a,u));return this}translate(t){return this.min.add(t),this.max.add(t),this}toString(){return`{"min":${this.min.toString()},"max":${this.max.toString()}}`}fromString(t){return t?(this.copy(JSON.parse(t)),this):this}union(t){return t.validate()?(this.min.min(t.min),this.max.max(t.max),this):this}validate(){return this.min.validate()&&this.max.validate()}unproject(t){return this.applyMatrix3(t.projectionMatrixInverse).applyMatrix3(t.matrixWorld)}centralArrange(t=1,e=20,n=10){const a=e+n;this.getCenter(Br),this.getSize(fn),fn.subScalar(e);const u=Math.floor(fn.x/a),l=Math.ceil(t/u),c=u*a,f=l*a;if(fn.x<a||fn.y<a||c>=fn.x||f>=fn.y)return Br.clone();let y=[],A=0,_=0;for(let C=0;C<t;C++){const F=u>t?t*a:c,N=Br.x-F/2+_*a+a/2,M=Br.y-f/2+A*a+a/2;y.push(new Y(N,M)),_++,_>=u&&(_=0,A++)}return y}}const Qn=new St,qs=[new Y,new Y,new Y,new Y],Br=new Y,fn=new Y,Ug=Object.freeze(Object.defineProperty({__proto__:null,default:St},Symbol.toStringTag,{value:"Module"})),Hg=Zt.window.requestAnimationFrame,Ws=Zt.window.performance?()=>Zt.window.performance.now():()=>new Date().getTime(),oc=Hg;class Pt{static idCounter=0;static children=[];static isRunning=!1;static actived=!1;static duration=0;static lastTime=Ws();static messages=[];static maxLetters=20;id=Pt.idCounter++;timers=new Map;timersDuration=new Map;counters=new Map;countersAmount=new Map;out=[];constructor(){}static active(t){t?Pt.actived=!0:Pt.actived=!1,Pt.duration=t||0}static add(t){this.children.push(t),this.handleStart()}static remove(t){for(let e=0,n=Pt.children.length;e<n;e++)if(Pt.children[e].id===t.id){this.children.splice(e,1);break}}static handleStart(){this.isRunning||(this.isRunning=!0,oc(this.runLoop))}static runLoop(){Pt.children.length?(Pt.runFrames(),oc(Pt.runLoop)):Pt.isRunning=!1}static runFrames(){let t,e=Ws();if(!(e-Pt.lastTime<Pt.duration)){Pt.lastTime=e;for(let n=0,a=this.children.length;n<a;n++)t=this.children[n],t.calculateTimers(),t.calculateCounters(),Pt.messages=Pt.messages.concat(t.out),t.out.length=0;if(Pt.messages.length){if(Pt.actived){let n=[];n.push(qg),n.push(Wg),n.push(Vg),this.messages.forEach(a=>n.push(Zg(a,this.maxLetters))),n.push($g),console.log(n.join(`
32
- `))}Pt.messages.length=0}}}destroy(){Pt.remove(this)}addTimer(t,e=Ws(),n=Ws()-(this.timersDuration.get(t)||Ws())){this.addTimerDuration(t,n),this.timersDuration.set(t,e)}addTimerDuration(t,e){var n;this.timers.has(t)||this.timers.set(t,[]),(n=this.timers.get(t))==null||n.push(e)}calculateTimers(){this.timers.forEach((t,e)=>{!t||!t.length||(this.out.push(this.calculateDurations(e,t)),t.length=0)})}addCounterAmount(t,e){var n;this.counters.has(t)||this.counters.set(t,[]),(n=this.counters.get(t))==null||n.push(e)}calculateCounters(){this.counters.forEach((t,e)=>{!t||!t.length||(this.out.push(this.calculateAmounts(e,t)),t.length=0)})}start(){return this.stop(),Pt.add(this),this}stop(){return Pt.remove(this),this}calculateDurations(t,e){const n={name:t,avg:0,min:0,max:0,stdDev:0,count:0,FPS:0};if(!e||!e.length)return n;const a=e.length,{min:u,max:l,avg:c}=this.minMaxAvg(e),f=parseFloat(this.stdDev(e,c).toFixed(2));return{name:t,avg:this.fd(c),min:this.fd(u),max:this.fd(l),stdDev:f,count:a,FPS:Math.ceil(a/Pt.duration*1e3)}}calculateAmounts(t,e){const n={name:t,avg:0,min:0,max:0,stdDev:0,count:0,FPS:0};if(!e||!e.length)return n;const a=e.length,{min:u,max:l,avg:c}=this.minMaxAvg(e),f=this.stdDev(e,c);return{name:t,avg:c,min:u,max:l,stdDev:f,count:a,FPS:Math.ceil(a/Pt.duration*1e3)}}minMaxAvg(t){let e=t[0],n=t[0],a=t.length,u=0;for(let c=0;c<t.length;c++){const f=t[c];u+=f,f<e&&(e=f),f>n&&(n=f)}const l=u/a;return{min:this.fx(e),max:this.fx(n),avg:this.fx(l)}}stdDev(t,e){let n=0;for(let u=0;u<t.length;u++){const l=t[u];n+=(l-e)*(l-e)}const a=t.length;return this.fx(Math.sqrt(n/a))}fd(t){return t>1e3?(t/1e3).toFixed(1)+"s":t.toFixed(1)+"ms"}fx(t,e=1){return e===1?Math.round(t*10)/10:e===2?Math.round(t*100)/100:e===3?Math.round(t*1e3)/1e3:t}}const Va=20,$a=["avg","min","max","stdDev","count","FPS"],Qr=Gg($a,1),qg=zg($a,Va),Wg=Yg($a,Va),Vg=Xg($a,Va),$g=Qg(Va);function zg(r,t=20){let e="┌";e+="─".repeat(t),e+="┬";for(let n=0,a=r.length;n<a;n++)e+="─".repeat(Qr),n<a-1?e+="┬":e+="┐";return e}function Gg(r,t=0){let e=0;for(let n=0,a=r.length;n<a;n++)e=Math.max(e,r[n].length);return e+t}function Yg(r,t=20){let e="│";e+=" ".repeat(t),e+="│";for(let n=0,a=r.length;n<a;n++)e+=" ".repeat(Math.max(Qr-r[n].length-1,0)),e+=r[n],e+=" │";return e}function Xg(r,t=20){let e="├";e+="─".repeat(t),e+="┼";for(let n=0,a=r.length;n<a;n++)e+="─".repeat(Qr),n<a-1?e+="┴":e+="┘";return e}function Zg(r,t=20){let e="│";e+=" ".repeat(Math.max(t-r.name.length,0)),e+=r.name,e+="│";const n=typeof r.avg=="string"?Qr-r.avg.length:Qr-r.avg.toString().length;return e+=" ".repeat(Math.max(n,0)),e+=r.avg+" ",e+=" ".repeat(Math.max(Qr-r.min.toString().length,0)),e+=r.min+" ",e+=" ".repeat(Math.max(Qr-r.max.toString().length,0)),e+=r.max+" ",e+=" ".repeat(Math.max(Qr-r.stdDev.toString().length,0)),e+=r.stdDev+" ",e+=" ".repeat(Math.max(Qr-r.count.toString().length,0)),e+=r.count+" ",e+=" ".repeat(Math.max(Qr-r.FPS.toString().length,0)),e+=r.FPS,e}function Qg(r=20){let t="└";for(let e=0;e<r;e++)t+="─";return t+="┘",t}var er=(r=>(r.GROS="gros",r.RM="rm",r.WS="ws",r.SU="su",r.EQ="eq",r.FN="fn",r.GL="gl",r.IP="ip",r))(er||{}),Vs=(r=>(r.BACKGROUND="background",r.ASSETS="assets",r.ANNOTATIONS="annotations",r.TEXT="text",r.ASSET_LABELS="asset-labels",r.LABELS="labels",r))(Vs||{});class Ir{_listeners=new Map;destroy(){this._listeners.clear()}addEventListener(t,e){let n=this._listeners.get(t);n||(n=[],this._listeners.set(t,n)),n.includes(e)||n.push(e)}addEventListeners(t,e){const n=t.split(","),a=n.length;for(let u=0;u<a;u++)this.addEventListener(n[u].trim(),e)}isListening(t){var e;return this._listeners.has(t)&&!!((e=this._listeners.get(t))!=null&&e.length)}hasEventListener(t,e){var n;return this._listeners.size===0?!1:this._listeners.has(t)&&!!((n=this._listeners.get(t))!=null&&n.includes(e))}removeEventListener(t,e){const n=this._listeners.get(t);if(n){const a=n.indexOf(e);a>-1&&n.splice(a,1)}}dispatchEvent(t){const e=this._listeners.get(t.type);if(e){t.target=this;const n=e.slice(0);for(let a=0,u=n.length;a<u;a++)n[a].call(this,t);t.target=void 0}}dispatchEventAsync(t){const e=this._listeners.get(t.type);e&&setTimeout(()=>{for(const n of e)n.call(this,t)})}}function vo(r,t="http://www.w3.org/2000/svg"){var e,n;return(n=(e=Zt.window)==null?void 0:e.document)==null?void 0:n.createElementNS(t,r)}async function lc(r=2e3){return new Promise(t=>setTimeout(t,(Math.random()+.5)*r))}function hc(r,t=[]){var e,n;return!r||!r.value||(t.push(r.value),(e=r.children)!=null&&e.length&&((n=r.children)==null||n.forEach(a=>hc(a,t)))),t}function cc(r){if(!r)return"inches";let t=r.querySelector("#defaultView"),e=t==null?void 0:t.getAttribute("units");return e||"inches"}function jg(r){if(!r)return 1;let t=cc(r),e=1;switch(t){case"mm":e=500/39.3701;break;case"cm":e=50/39.3701;break;case"Metres":e=.5/39.3701;break;case"m":e=.5/39.3701;break;default:e=1}return e}function Kg(r,t=new St){if(!r)return t;let e=r.split(" "),n=Mt.map(e,a=>parseFloat(a));return(n==null?void 0:n.length)!==4||(t.min.set(n[0],n[1]),t.max.set(n[0]+n[2],n[1]+n[3])),t}function Jg(r=new St){let t="";const e=[];return e.push(r.min.x),e.push(r.min.y),e.push(Math.abs(r.max.x-r.min.x)),e.push(Math.abs(r.max.y-r.min.y)),t=e.join(" "),t}function fc(r){var t;if((t=r==null?void 0:r.children)!=null&&t.length){for(let e=0,n=r.children.length;e<n;e++)if(r.children[e].nodeName==="g")return r.children[e]}}const t0=new Pt().start();class e0{isSvgRenderer=!0;id;params;container=Zt.window.document.getElementsByTagName("body")[0];cameraVersion=-1;viewAreaLimit=-1;constructor(t){this.id="SvgRenderer@"+Date.now(),this.params=t,Zt.config=t,this.initSvg(),Pt.active(this.params.monitorDuration)}destroy(){Pt.active(0)}initSvg(){if(this.params.containerId&&(this.container=Zt.window.document.getElementById(this.params.containerId)),this.container||(this.container=Zt.window.document.getElementsByTagName("body")[0]),!this.params.width||!this.params.height){const t=this.container.getBoundingClientRect();this.params.width=t.width,this.params.height=t.height}this.container.style.overflow="hidden",this.container.style.transform="translateZ(0)",this.setSize(this.params.width,this.params.height)}resize(){var e,n;const t=(n=(e=this.container)==null?void 0:e.parentElement)==null?void 0:n.getBoundingClientRect();t&&this.setSize(t.width,t.height)}setSize(t,e){this.container.style.width=t+"px",this.container.style.height=e+"px",this.params.width=t,this.params.height=e,this.params.camera||(this.params.camera={}),this.params.camera.width=this.params.width,this.params.camera.height=this.params.height,this.params.aspect=this.params.width/this.params.height,this.params.camera.aspect=this.params.aspect,this.params.camera.left=this.params.width*-.5,this.params.camera.right=this.params.width*.5,this.params.camera.top=this.params.height*.5,this.params.camera.bottom=this.params.height*-.5}getSize(t){return t.set(this.params.width,this.params.height)}clean(){}async render(t,e){var a;if(!t||!e||this.cameraVersion===(e==null?void 0:e.version))return;e.updateMatrixWorld(),dc.set(0,0).unproject(e),gc.set(this.params.width,this.params.height).unproject(e),pc.setFromPoints([dc,gc]);let n=Jg(pc);(a=t.svg)==null||a.setAttribute("viewBox",n),this.cameraVersion=e.version||-1,t0.addTimer("render cycle")}autoClear;getRenderTarget(){}setRenderTarget(t){}renderTexture(t){}}const pc=new St,dc=new Y,gc=new Y;class re{isMatrix3=!0;elements=[1,0,0,0,1,0,0,0,1];constructor(){}static equals(t,e,n=1e-6){if(t.elements.length!=e.elements.length)return!1;for(let a=0,u=t.elements.length;a<u;a++){const l=t.elements[a]-e.elements[a];if(Math.abs(l)>n)return!1}return!0}copy(t){const e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this}clone(){return new re().fromArray(this.elements)}compose(t,e,n){const a=Math.sin(e.x),u=Math.cos(e.x);return this.set(n.x*u,n.y*a*-1,t.x,n.x*a,n.y*u,t.y,0,0,1)}composeWithCenter(t,e,n,a){return Rr.identity(),za.makeTranslation(t.x,t.y),$s.makeRotation(e.x),jn.makeScale(n.x,n.y),Ae.copy(a).applyMatrix3(jn),Rr.multiply(mo.makeTranslation(-Ae.x,-Ae.y)).multiply(za).multiply(mo.makeTranslation(Ae.x,Ae.y)).multiply($s).multiply(mo.makeTranslation(-Ae.x,-Ae.y)).multiply(jn),this.copy(Rr)}decompose(t,e,n){const a=Rr.copy(this).elements,u=Math.sqrt(a[0]*a[0]+a[3]*a[3]),l=Math.sqrt(a[1]*a[1]+a[4]*a[4]),c=a[0]*a[4]-a[3]*a[1];a[0]||a[3]?n.set(u,c/u):a[1]||a[4]?n.set(c/l,l):n.set(0,0);let f=0;a[0]||a[3]?f=a[3]>0?-Math.acos(a[0]/u):Math.acos(a[0]/u):a[1]||a[4]?f=Math.PI/2-(a[4]>0?Math.acos(-a[1]/l):-Math.acos(a[1]/l)):f=0,f!==0&&n.y<0&&(f*=-1),e.set(f,f),t.set(a[6],a[7])}compose2(t,e,n){return this.identity().translate(t.x,t.y).rotate(e.x).scale(n.x,n.y),this}decompose2(t,e,n){const a=this.clone();a.scale(-1,1);const u=a.elements[0],l=a.elements[1],c=a.elements[3],f=a.elements[4];let d=0,y=0,A=0;if(u!==0||c!==0){const _=Math.hypot(u,c);d=_,y=(u*f-l*c)/_;const C=Math.acos(u/_);A=c>0?-C:C}else if(l!==0||f!==0){const _=Math.hypot(l,f);d=(u*f-l*c)/_,y=_;const C=Math.acos(l/_);A=Math.PI/2+(f>0?-C:C)}else d=0,y=0,A=0;d=-d,t.x=a.elements[6],t.y=a.elements[7],e.x=e.y=A/Math.PI/180,n.x=d,n.y=y}composeSvgTransform(t=0,e=0,n){if(!n&&!t&&!e)return this;let a=n==null?void 0:n.split(") ").map(u=>u.trim()+")").filter(u=>u!==")");return a||(a=[]),(t||e)&&a.push(`translate(${t},${e})`),this.identity(),Rr.identity(),a.forEach(u=>{const l=/scale\(\s*([^\s,)]+)[ ,]([^\s,)]+)/.exec(u),c=/rotate\(\s*(-?\d*\.?\d+)(?:[ ,](-?\d*\.?\d+)(?:[ ,](-?\d*\.?\d+))?)?\s*\)/.exec(u),f=/translate\(\s*([^\s,)]+)[ ,]([^\s,)]+)/.exec(u);if(l){const d=Number(l[1])||1,y=Number(l[2])||d;Rr.multiply(jn.makeScale(d,y))}else c?Number(c[2])||Number(c[3])?(Ce.set(Number(c[2]||"0"),Number(c[3]||"0")),Rr.multiply($s.makeRotationByPoint(uc(Number(c[1])),Ce))):Rr.multiply($s.makeRotation(uc(Number(c[1])||0))):f&&Rr.multiply(za.makeTranslation(Number(f[1])||0,Number(f[2])||0))}),this.copy(Rr),this}decomposeSvgMatrix(t,e,n){const a=Rr.copy(this).elements;Ce.set(a[0],a[1]),Ae.set(a[3],a[4]);let u=Ce.length();Ce.normalize();let l=Ce.dot(Ae);yc.copy(Ce).multiplyScalar(-l),Ae.add(yc);const c=Ae.length()||0;Ae.normalize(),Ce.x*Ae.y<Ae.x*Ce.y&&(Ce.x=-Ce.x,Ce.y=-Ce.y,u=-u,l=-l);const f=u?Math.atan2(Ce.y,Ce.x):Math.atan2(-Ce.x,Ae.y);t.set(a[6],a[7]),e.set(f,f),n.set(u,c)}determinant(){const t=this.elements,e=t[0],n=t[3],a=t[6],u=t[1],l=t[4],c=t[7],f=t[2],d=t[5],y=t[8];return e*l*y-e*d*c-u*n*y+u*d*a+f*n*c-f*l*a}equals(t,e=0){const n=this.elements,a=t.elements;for(let u=0;u<9;u++)if(Math.abs(n[u]-a[u])>e)return!1;return!0}extractBasis2(t,e){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),this}flipY(){return this.multiply(jn.makeScale(1,-1))}fromArray(t,e=0){for(let n=0;n<9;n++)this.elements[n]=t[n+e];return this}getComponents(t=[1,0,0,1,0,0]){return t[0]=this.elements[0],t[1]=this.elements[1],t[2]=this.elements[3],t[3]=this.elements[4],t[4]=this.elements[6],t[5]=this.elements[7],t}getNormalMatrix(t){return this.setFromMatrix(t).invert().transpose()}getRotation(t){let e=this.elements;const n=Math.sqrt(e[0]*e[0]+e[3]*e[3]),a=Math.sqrt(e[1]*e[1]+e[4]*e[4]);let u=0;e[0]||e[3]?u=e[3]>0?-Math.acos(e[0]/n):Math.acos(e[0]/n):e[1]||e[4]?u=Math.PI/2-(e[4]>0?Math.acos(-e[1]/a):-Math.acos(e[1]/a)):u=0,this.getScale(Ae),u!==0&&Ae.x<0&&(u*=-1),t.set(u,u)}getScale(t){let e=this.elements,n=Math.sqrt(e[0]*e[0]+e[1]*e[1]),a=Math.sqrt(e[3]*e[3]+e[4]*e[4]),u=e[0]*e[4]-e[3]*e[1];e[0]||e[1]?t.set(u/a,a):e[3]||e[4]?t.set(n,u/n):t.set(0,0)}getTransition(t){t.set(this.elements[6],this.elements[7])}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}invert(){const t=this.elements,e=t[0],n=t[1],a=t[2],u=t[3],l=t[4],c=t[5],f=t[6],d=t[7],y=t[8],A=y*l-c*d,_=c*f-y*u,C=d*u-l*f,F=e*A+n*_+a*C;if(F===0)return this.set(0,0,0,0,0,0,0,0,0);const N=1/F;return t[0]=A*N,t[1]=(a*d-y*n)*N,t[2]=(c*n-a*l)*N,t[3]=_*N,t[4]=(y*e-a*f)*N,t[5]=(a*u-c*e)*N,t[6]=C*N,t[7]=(n*f-d*e)*N,t[8]=(l*e-n*u)*N,this}lookAt(t,e,n){return this.identity().rotate(e.angle()-t.angle()+n.angle())}makeProjection(t,e,n,a,u,l){const c=u/(e-t),f=l/(n-a),d=u/2-(e+t)*c,y=l/2+(n+a)*f;return this.elements[0]=c,this.elements[3]=0,this.elements[6]=d,this.elements[1]=0,this.elements[4]=-f,this.elements[7]=y,this.elements[2]=0,this.elements[5]=0,this.elements[8]=1,this}makeRotation(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,n,e,0,0,0,1),this}makeRotationByPoint(t,e){const n=Math.cos(t),a=Math.sin(t),u=-e.x*n+e.y*a+e.x,l=-e.x*a-e.y*n+e.y;return this.set(n,-a,u,a,n,l,0,0,1),this}makeRotationFromQuaternion(t){return this.compose(r0,t,i0)}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}makeTranslation(t,e){return this.set(1,0,t,0,1,e,0,0,1),this}multiply(t){return this.multiplyMatrices(this,t)}multiplyMatrices(t,e){const n=t.elements,a=e.elements,u=this.elements,l=n[0],c=n[3],f=n[6],d=n[1],y=n[4],A=n[7],_=n[2],C=n[5],F=n[8],N=a[0],M=a[3],R=a[6],q=a[1],z=a[4],w=a[7],L=a[2],U=a[5],j=a[8];return u[0]=l*N+c*q+f*L,u[3]=l*M+c*z+f*U,u[6]=l*R+c*w+f*j,u[1]=d*N+y*q+A*L,u[4]=d*M+y*z+A*U,u[7]=d*R+y*w+A*j,u[2]=_*N+C*q+F*L,u[5]=_*M+C*z+F*U,u[8]=_*R+C*w+F*j,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}premultiply(t){return this.multiplyMatrices(t,this)}rotate(t){return this.premultiply($s.makeRotation(-t))}scale(t,e){return this.premultiply(jn.makeScale(t,e))}set(t,e,n,a,u,l,c,f,d){return this.elements[0]=t,this.elements[3]=e,this.elements[6]=n,this.elements[1]=a,this.elements[4]=u,this.elements[7]=l,this.elements[2]=c,this.elements[5]=f,this.elements[8]=d,this}setFromDomMatrix(t){return typeof t.m11<"u"&&typeof t.m21<"u"&&typeof t.m41<"u"&&typeof t.m12<"u"&&typeof t.m22<"u"&&typeof t.m42<"u"&&typeof t.m14<"u"&&typeof t.m24<"u"&&typeof t.m44<"u"?this.set(t.m11,t.m21,t.m41,t.m12,t.m22,t.m42,t.m14,t.m24,t.m44):typeof t.a<"u"&&typeof t.b<"u"&&typeof t.c<"u"&&typeof t.d<"u"&&typeof t.e<"u"&&typeof t.f<"u"&&this.set(t.a,t.c,t.e,t.b,t.d,t.f,0,0,1),this}setFromMatrix(t){const e=t.elements;return this.set(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8]),this}setUvTransform(t,e,n,a,u,l,c){const f=Math.cos(u),d=Math.sin(u);return this.set(n*f,n*d,-n*(f*l+d*c)+l+t,-a*d,a*f,-a*(-d*l+f*c)+c+e,0,0,1),this}toArray(t=[],e=0){const n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}toString(){return`[${this.elements[0]},${this.elements[1]}, ${this.elements[3]},${this.elements[4]}, ${this.elements[6]},${this.elements[7]}]`}translate(t,e){return this.premultiply(za.makeTranslation(t,e))}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}transposeIntoArray(t){const e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}}const Ce=new Y,Ae=new Y,yc=new Y,Rr=new re,za=new re,$s=new re,jn=new re,mo=new re,r0=new Y(0,0,0),i0=new Y(1,1,1),De=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"],n0=()=>{const r=Math.random()*4294967295|0,t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(De[r&255]+De[r>>8&255]+De[r>>16&255]+De[r>>24&255]+"-"+De[t&255]+De[t>>8&255]+"-"+De[t>>16&15|64]+De[t>>24&255]+"-"+De[e&63|128]+De[e>>8&255]+"-"+De[e>>16&255]+De[e>>24&255]+De[n&255]+De[n>>8&255]+De[n>>16&255]+De[n>>24&255]).toLowerCase()};let s0=0;const xo=new Y,jr=new re,vc=new Y,Eo=new St,zs=new Y,Ao=new Y,pn=new Y,a0=new Y(0,1),u0={type:"added"},bo={type:"removed"};class mc extends Ir{isObject2=!0;id=s0++;uuid=n0();name;type="Object2";featureKey="Object2_"+this.id;parent;children=[];up=new Y(0,1);position=new Y;rotation=new Y;scaled=new Y(1,1);flipY=!1;selectable=!1;matrix=new re;matrixWorld=new re;matrixWorldInverse=new re;modelViewMatrix=new re;normalMatrix=new re;fixed=!1;dynamically=!1;matrixAutoUpdate=!1;matrixWorldNeedsUpdate=!1;matrixWorldAutoUpdate=!1;composeNode=!1;isInComposeNode=!1;alignCenter=!1;boundingBox=new St;boundingBoxWorld=new St;boundingBoxNeedsUpdate=!1;centerPoint=new Y;visible=!0;castShadow=!1;receiveShadow=!1;renderOrder=0;animations=[];finalSize;userData={};DefaultUp=new Y(0,1);_autoSort=!0;constructor(t={}){super(),t.name!==void 0?this.name=t.name:this.name="Object2",t.flipY!==void 0&&(this.flipY=t.flipY),t.selectable!==void 0&&(this.selectable=t.selectable),t.finalSize!==void 0&&(this.finalSize=t.finalSize),this.setAttrs(t)}_version=0;get version(){return this._version}set version(t){this._version=t}set needsUpdate(t){t&&this._version++}destroy(){super.destroy(),this.clear(),this.parent=void 0,this.dispatchEvent(bo)}setPosition(t){return this.position.set(t.x,t.y),this}translate(t,e){this.position.x+=t,this.position.y+=e}setScale(t,e){return this.scaled.set(t,e),this}setRotationFromMatrix(t){t.decompose(zs,this.rotation,Ao)}setRotation(t){return this.rotation.set(t,t),this}rotate(t){this.rotation.x+=t}scale(t,e){e?(this.scaled.x*=t,this.scaled.y*=e):this.scaled.multiplyScalar(t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix3(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix3(jr.copy(this.matrixWorld).invert())}lookAt(t){vc.copy(t),this.updateWorldMatrix(!0,!1),this.matrixWorld.getTransition(zs),jr.lookAt(zs,vc,a0),jr.getRotation(pn),this.rotation.set(pn.x,pn.x),this.parent&&(this.parent.matrixWorld.getRotation(pn),this.rotate(pn.x))}applyMatrix3(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.rotation,this.scaled)}updateMatrix(){xo.copy(this.scaled),this.flipY&&(xo.y*=-1),this.matrix.compose(this.position,this.rotation,xo),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.parent?this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix):this.matrixWorld.copy(this.matrix),this.matrixWorldInverse.copy(this.matrixWorld).invert(),this.matrixWorldNeedsUpdate=!1,t=!0,this.boundingBoxNeedsUpdate=!0);const e=this.children;for(let n=0,a=e.length;n<a;n++)e[n].updateMatrixWorld(t);this.boundingBoxNeedsUpdate&&(this.updateBoundingBox(),this.boundingBoxNeedsUpdate=!1)}updateWorldMatrix(t=!1,e=!1){const n=this.parent;if(t&&n&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.parent?this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix):this.matrixWorld.copy(this.matrix),this.matrixWorldInverse.copy(this.matrixWorld).invert(),e){const a=this.children;for(let u=0,l=a.length;u<l;u++)a[u].updateWorldMatrix(!1,!0)}}updateModelViewMatrix(t){jr.copy(this.matrixWorld),this.isInComposeNode?this.modelViewMatrix.copy(this.matrix):t&&this.fixed?this.modelViewMatrix.copy(t.projectionMatrix):t?this.modelViewMatrix.multiplyMatrices(t.viewMatrix,jr):this.modelViewMatrix.copy(jr);for(let e=0,n=this.children.length;e<n;e++)this.children[e].updateModelViewMatrix(t)}computeBoundingBox(){this.boundingBox.makeEmpty(),this.centerPoint.set(0,0);for(let t=0,e=this.children.length;t<e;t++)this.children[t].updateMatrixWorld(),Eo.copy(this.children[t].computeBoundingBox()),Eo.applyMatrix3(jr.copy(this.children[t].matrixWorld)),this.boundingBox.union(Eo);return this.boundingBox.applyMatrix3(this.matrixWorldInverse),this.boundingBox}updateBoundingBox(){this.boundingBox.isEmpty()||this.boundingBoxWorld.copy(this.boundingBox).applyMatrix3(this.matrixWorld)}setAttrs(t){if(!t)return this;for(const e in t)if(!(e==="children"||t[e]===void 0)){if(e==="userData"&&t[e]){Object.keys(t[e]).forEach(n=>this.userData[n]=t[e][n]);continue}this.userData[e]=t[e]}return this}add(t){return!t||!t.isObject2||t===this?this:(t.parent&&t.parent.remove(t),t.parent=this,this.children.push(t),t.isInComposeNode=this.composeNode||this.isInComposeNode,t.selectable&&t.parent.setSelectable(t.selectable),this._autoSort&&this.children.sort((e,n)=>e.renderOrder-n.renderOrder),t.dispatchEvent(u0),this.matrixAutoUpdate||(this.matrixWorldNeedsUpdate=!0),this)}adds(t){if(!t||!t.length)return this;this._autoSort=!1;for(let e=0,n=t.length;e<n;e++)e===t.length-1&&(this._autoSort=!0),this.add(t[e]);return this}remove(t){const e=this.children.indexOf(t);return e!==-1&&(t.parent=void 0,this.children.splice(e,1),t.dispatchEvent(bo)),this}removes(t){for(let e=0,n=t.length;e<n;e++)this.remove(t[e]);return this}removeFromParent(){const t=this.parent;return t&&t.remove(this),this}moveToLast(){var e;if(!this.parent)return;let t=this.clone();this.removeFromParent(),(e=t.parent)==null||e.add(t)}clear(){for(let t=0;t<this.children.length;t++){const e=this.children[t];e.parent=void 0,e.destroy(),e.dispatchEvent(bo)}return this.children.length=0,this}attach(t){return this.updateWorldMatrix(!0,!1),jr.copy(this.matrixWorld).invert(),t.parent&&(t.parent.updateWorldMatrix(!0,!1),jr.multiply(t.parent.matrixWorld)),t.applyMatrix3(jr),this.add(t),t.updateWorldMatrix(!1,!0),this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,e){if(this[t]===e)return this;for(let n=0,a=this.children.length;n<a;n++){const l=this.children[n].getObjectByProperty(t,e);if(l!==void 0)return l}}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(t,pn,Ao),t}getWorldRotation(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(zs,t,Ao),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(zs,pn,t),t}getWorldDirection(t){return this.updateWorldMatrix(!0,!1),t.set(this.matrixWorld.elements[6],this.matrixWorld.elements[7]).normalize()}traverse(t){t(this);const e=this.children;for(let n=0,a=e.length;n<a;n++)e[n].traverse(t)}traverseVisible(t){if(this.visible)return;t(this);const e=this.children;for(let n=0,a=e.length;n<a;n++)e[n].traverseVisible(t)}traverseAncestors(t){const e=this.parent;e&&(t(e),e.traverseAncestors(t))}onBeforeRender(t,e,n){}render(t){}onAfterRender(t,e,n){}setSelectable(t){this.selectable=t,this.parent&&this.parent.setSelectable(t)}raycast(t,e=[]){}clone(t=!0){const e=this.constructor;return new e(this.userData).copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.type=t.type,this.featureKey=t.featureKey,this._version=0,this.parent=t.parent,this.up.copy(t.up),this.position.copy(t.position),this.rotation.copy(t.rotation),this.scaled.copy(t.scaled),this.flipY=t.flipY,this.selectable=t.selectable,this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.modelViewMatrix.copy(t.modelViewMatrix),this.normalMatrix.copy(t.normalMatrix),this.fixed=t.fixed,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.composeNode=t.composeNode,this.alignCenter=t.alignCenter,this.boundingBox.copy(t.boundingBox),this.boundingBoxWorld.copy(t.boundingBoxWorld),this.boundingBoxNeedsUpdate=t.boundingBoxNeedsUpdate,this.centerPoint.copy(t.centerPoint),this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),e)for(let n=0;n<t.children.length;n++){const a=t.children[n];this.add(a.clone())}return this}}class o0 extends mc{name="Scene";type="Scene";isScene=!0;view;background;featureKey="Scene_"+this.id;matrixAutoUpdate=!1;constructor(){super()}destroy(){super.destroy(),this.boundingBox.makeEmpty()}setup(t){this.view=t}onBeforeRender(t,e,n){super.onBeforeRender(t,e,n),n&&this.cameraVersion!==n.version&&(this.matrixAutoUpdate||this.updateMatrix(),this.needsUpdate=!0,this.cameraVersion=n.version)}render(t){var e;this.visible&&((e=this.children)==null||e.forEach(function(n){n.isShape&&n.render(t)}))}getIntersectObjects(t,e=er.RM,n=[]){throw new Error("must be implemented in derived")}}class l0{isLoading=!1;itemsLoaded=0;itemsTotal=0;urlModifier;handlers=[];onStart;onLoad;onProgress;onError;constructor(t,e,n){this.onLoad=t,this.onProgress=e,this.onError=n}itemStart(t){this.itemsTotal++,this.isLoading||this.onStart!==void 0&&this.onStart(t,this.itemsLoaded,this.itemsTotal),this.isLoading=!0}itemEnd(t){this.itemsLoaded++,this.onProgress!==void 0&&this.onProgress(t,this.itemsLoaded,this.itemsTotal),this.itemsLoaded===this.itemsTotal&&(this.isLoading=!1,this.onLoad!==void 0&&this.onLoad())}itemError(t){this.onError!==void 0&&this.onError(t)}resolveURL(t){return this.urlModifier!==void 0?this.urlModifier(t):t}setURLModifier(t){return this.urlModifier=t,this}addHandler(t,e){return this.handlers.push(t,e),this}removeHandler(t){const e=this.handlers.indexOf(t);return e!==-1&&this.handlers.splice(e,2),this}getHandler(t){for(let e=0,n=this.handlers.length;e<n;e+=2){const a=this.handlers[e],u=this.handlers[e+1];if(a.global&&(a.lastIndex=0),a.test(t))return u}return null}}const xc={enabled:!1,files:{},add:function(r,t){this.enabled&&(this.files[r]=t)},get:function(r){if(this.enabled)return this.files[r]},remove:function(r){delete this.files[r]},clear:function(){this.files={}}},h0=new l0;class Ec{manager;crossOrigin="anonymous";withCredentials=!1;path="";resourcePath="";requestHeader={};constructor(t=h0){this.manager=t}loadAsync(t,e){const n=this;return new Promise(function(a,u){n.load(t,a,e,u)})}setCrossOrigin(t){return this.crossOrigin=t,this}setWithCredentials(t){return this.withCredentials=t,this}setPath(t){return this.path=t,this}setResourcePath(t){return this.resourcePath=t,this}setRequestHeader(t){return this.requestHeader=t,this}}const gi={};class c0 extends Error{response;constructor(t,e){super(t),this.response=e}}class f0 extends Ec{mimeType;responseType;constructor(t){super(t)}load(t,e,n,a){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);const u=xc.get(t);if(u!==void 0)return this.manager.itemStart(t),setTimeout(()=>{e&&e(u),this.manager.itemEnd(t)},0),u;if(gi[t]!==void 0){gi[t].push({onLoad:e,onProgress:n,onError:a});return}gi[t]=[],gi[t].push({onLoad:e,onProgress:n,onError:a});const l=new Zt.window.Request(t,{headers:new Zt.window.Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),c=this.mimeType,f=this.responseType;fetch(l).then(d=>{if(d.status===200||d.status===0){if(d.status===0&&console.warn("FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||d.body===void 0||d.body.getReader===void 0)return d;const y=gi[t],A=d.body.getReader(),_=d.headers.get("Content-Length")||d.headers.get("X-File-Size"),C=_?parseInt(_):0,F=C!==0;let N=0;const M=new ReadableStream({start(R){q();function q(){A.read().then(({done:z,value:w})=>{if(z)R.close();else{N+=w.byteLength;const L=new ProgressEvent("progress",{lengthComputable:F,loaded:N,total:C});for(let U=0,j=y.length;U<j;U++){const tt=y[U];tt.onProgress&&tt.onProgress(L)}R.enqueue(w),q()}})}}});return new Response(M)}else throw new c0(`fetch for "${d.url}" responded with ${d.status}: ${d.statusText}`,d)}).then(d=>{switch(f){case"arraybuffer":return d.arrayBuffer();case"blob":return d.blob();case"document":return d.text().then(y=>new DOMParser().parseFromString(y,c));case"json":return d.json();default:if(c===void 0)return d.text();{const A=/charset="?([^;"\s]*)"?/i.exec(c),_=A&&A[1]?A[1].toLowerCase():void 0,C=new TextDecoder(_);return d.arrayBuffer().then(F=>C.decode(F))}}}).then(d=>{xc.add(t,d);const y=gi[t];delete gi[t];for(let A=0,_=y.length;A<_;A++){const C=y[A];C.onLoad&&C.onLoad(d)}}).catch(d=>{const y=gi[t];if(y===void 0)throw this.manager.itemError(t),d;delete gi[t];for(let A=0,_=y.length;A<_;A++){const C=y[A];C.onError&&C.onError(d)}this.manager.itemError(t)}).finally(()=>{this.manager.itemEnd(t)}),this.manager.itemStart(t)}setMimeType(t){return this.mimeType=t,this}setResponseType(t){return this.responseType=t,this}}class Ac extends Ec{constructor(t){super(t)}load(t,e,n,a){const u=this,l=new f0(u.manager);l.setPath(u.path),l.setRequestHeader(u.requestHeader),l.setWithCredentials(u.withCredentials),l.load(t,function(c){try{e&&e(c)}catch(f){a?a(f):console.error(f),u.manager.itemError(t)}},n,a)}}const Kn="ae",bc="-",Ga="rm-assets",wc="rm-labels";function Gs(r){return r+bc+Vs.ASSETS}function Ya(r){return r+bc+Vs.LABELS}const p0={rm:["su-assets","su-labels","eq-assets","eq-labels","fn-assets","fn-labels"],su:[Ga,wc,"eq-assets","eq-labels","fn-assets","fn-labels"],eq:[Ga,wc,"su-assets","su-labels","fn-assets","fn-labels"]};function wo(r,t,e){const n=r==null?void 0:r.getAttribute(t);return n?Number(n):e}new re().makeScale(1,-1);function d0(r,t,e,n,a,u,l,c,f){let d=f*(Math.PI/180),y=Math.cos(d)*(r-e)/2+Math.sin(d)*(t-n)/2,A=-1*Math.sin(d)*(r-e)/2+Math.cos(d)*(t-n)/2,_=y*y/(l*l)+A*A/(c*c);_>1&&(l*=Math.sqrt(_),c*=Math.sqrt(_));let C=Math.sqrt((l*l*(c*c)-l*l*(A*A)-c*c*(y*y))/(l*l*(A*A)+c*c*(y*y)));a===u&&(C*=-1),isNaN(C)&&(C=0);let F=C*l*A/c,N=C*-c*y/l,M=(r+e)/2+Math.cos(d)*F-Math.sin(d)*N,R=(t+n)/2+Math.sin(d)*F+Math.cos(d)*N,q=function(Z){return Math.sqrt(Z[0]*Z[0]+Z[1]*Z[1])},z=function(Z,rt){return(Z[0]*rt[0]+Z[1]*rt[1])/(q(Z)*q(rt))},w=function(Z,rt){return(Z[0]*rt[1]<Z[1]*rt[0]?-1:1)*Math.acos(z(Z,rt))},L=w([1,0],[(y-F)/l,(A-N)/c]),U=[(y-F)/l,(A-N)/c],j=[(-1*y-F)/l,(-1*A-N)/c],tt=w(U,j);return z(U,j)<=-1&&(tt=Math.PI),z(U,j)>=1&&(tt=0),u===0&&tt>0&&(tt=tt-2*Math.PI),u===1&&tt<0&&(tt=tt+2*Math.PI),[M,R,l,c,L,tt,d,u]}const ie=" ";function g0(r){let t="";Array.isArray(r)||(r=[r]);for(let e=0;e<r.length;e++){const n=r[e];if(n.type===H.CLOSE_PATH)t+="z";else if(n.type===H.HORIZ_LINE_TO)t+=(n.relative?"h":"H")+n.x;else if(n.type===H.VERT_LINE_TO)t+=(n.relative?"v":"V")+n.y;else if(n.type===H.MOVE_TO)t+=(n.relative?"m":"M")+n.x+ie+n.y;else if(n.type===H.LINE_TO)t+=(n.relative?"l":"L")+n.x+ie+n.y;else if(n.type===H.CURVE_TO)t+=(n.relative?"c":"C")+n.x1+ie+n.y1+ie+n.x2+ie+n.y2+ie+n.x+ie+n.y;else if(n.type===H.SMOOTH_CURVE_TO)t+=(n.relative?"s":"S")+n.x2+ie+n.y2+ie+n.x+ie+n.y;else if(n.type===H.QUAD_TO)t+=(n.relative?"q":"Q")+n.x1+ie+n.y1+ie+n.x+ie+n.y;else if(n.type===H.SMOOTH_QUAD_TO)t+=(n.relative?"t":"T")+n.x+ie+n.y;else if(n.type===H.ARC)t+=(n.relative?"a":"A")+n.rX+ie+n.rY+ie+n.xRot+ie+ +n.lArcFlag+ie+ +n.sweepFlag+ie+n.x+ie+n.y;else throw new Error(`Unexpected command type "${n==null?void 0:n.type}" at index ${e}.`)}return t}function To([r,t],e){return[r*Math.cos(e)-t*Math.sin(e),r*Math.sin(e)+t*Math.cos(e)]}function Lr(...r){for(let t=0;t<r.length;t++)if(typeof r[t]!="number")throw new Error(`assertNumbers arguments[${t}] is not a number. ${typeof r[t]} == typeof ${r[t]}`);return!0}const ki=Math.PI;function _o(r,t,e){r.lArcFlag=r.lArcFlag===0?0:1,r.sweepFlag=r.sweepFlag===0?0:1;let{rX:n,rY:a}=r;const{x:u,y:l}=r;n=Math.abs(r.rX),a=Math.abs(r.rY);const[c,f]=To([(t-u)/2,(e-l)/2],-r.xRot/180*ki),d=Math.pow(c,2)/Math.pow(n,2)+Math.pow(f,2)/Math.pow(a,2);1<d&&(n*=Math.sqrt(d),a*=Math.sqrt(d)),r.rX=n,r.rY=a;const y=Math.pow(n,2)*Math.pow(f,2)+Math.pow(a,2)*Math.pow(c,2),A=(r.lArcFlag!==r.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(n,2)*Math.pow(a,2)-y)/y)),_=n*f/a*A,C=-a*c/n*A,F=To([_,C],r.xRot/180*ki);r.cX=F[0]+(t+u)/2,r.cY=F[1]+(e+l)/2,r.phi1=Math.atan2((f-C)/a,(c-_)/n),r.phi2=Math.atan2((-f-C)/a,(-c-_)/n),r.sweepFlag===0&&r.phi2>r.phi1&&(r.phi2-=2*ki),r.sweepFlag===1&&r.phi2<r.phi1&&(r.phi2+=2*ki),r.phi1*=180/ki,r.phi2*=180/ki}function Tc(r,t,e){Lr(r,t,e);const n=r*r+t*t-e*e;if(0>n)return[];if(n===0)return[[r*e/(r*r+t*t),t*e/(r*r+t*t)]];const a=Math.sqrt(n);return[[(r*e+t*a)/(r*r+t*t),(t*e-r*a)/(r*r+t*t)],[(r*e-t*a)/(r*r+t*t),(t*e+r*a)/(r*r+t*t)]]}const yi=Math.PI/180;function _c(r,t,e){return(1-e)*r+e*t}function Cc(r,t,e,n){return r+Math.cos(n/180*ki)*t+Math.sin(n/180*ki)*e}function Dc(r,t,e,n){const u=t-r,l=e-t,c=n-e,f=3*u+3*c-6*l,d=(l-u)*6,y=3*u;return Math.abs(f)<1e-6?[-y/d]:y0(d/f,y/f,1e-6)}function Sc(r,t,e,n,a){const u=1-a,l=u*u*u,c=3*u*u*a,f=3*u*a*a,d=a*a*a;return r*l+t*c+e*f+n*d}function y0(r,t,e=1e-6){const n=r*r/4-t;if(n<-e)return[];if(n<=e)return[-r/2];const a=Math.sqrt(n);return[-(r/2)-a,-(r/2)+a]}function v0(r,t,e){r.cX||_o(r,t,e);const n=Math.min(r.phi1,r.phi2),a=Math.max(r.phi1,r.phi2),u=a-n,l=Math.ceil(u/90),c=new Array(l);let f=t,d=e;for(let y=0;y<l;y++){const A=_c(r.phi1,r.phi2,y/l),_=_c(r.phi1,r.phi2,(y+1)/l),C=_-A,F=4/3*Math.tan(C*yi/4),[N,M]=[Math.cos(A*yi)-F*Math.sin(A*yi),Math.sin(A*yi)+F*Math.cos(A*yi)],[R,q]=[Math.cos(_*yi),Math.sin(_*yi)],[z,w]=[R+F*Math.sin(_*yi),q-F*Math.cos(_*yi)],L={relative:r.relative,type:H.CURVE_TO},U=(j,tt)=>{const[Z,rt]=To([j*r.rX,tt*r.rY],r.xRot);return[r.cX+Z,r.cY+rt]};[L.x1,L.y1]=U(N,M),[L.x2,L.y2]=U(z,w),[L.x,L.y]=U(R,q),r.relative&&(L.x1-=f,L.y1-=d,L.x2-=f,L.y2-=d,L.x-=f,L.y-=d),[f,d]=[L.x,L.y],c[y]=L}return c}function m0(r=1e13){Lr(r);function t(e){return Math.round(e*r)/r}return function(n){return"x1"in n&&typeof n.x1<"u"&&(n.x1=t(n.x1)),"y1"in n&&typeof n.y1<"u"&&(n.y1=t(n.y1)),"x2"in n&&typeof n.x2<"u"&&(n.x2=t(n.x2)),"y2"in n&&typeof n.y2<"u"&&(n.y2=t(n.y2)),"x"in n&&typeof n.x<"u"&&(n.x=t(n.x)),"y"in n&&typeof n.y<"u"&&(n.y=t(n.y)),"rX"in n&&typeof n.rX<"u"&&(n.rX=t(n.rX)),"rY"in n&&typeof n.rY<"u"&&(n.rY=t(n.rY)),n}}function Oc(){return Pr((r,t,e)=>(r.relative&&(typeof r.x1<"u"&&(r.x1+=t),typeof r.y1<"u"&&(r.y1+=e),typeof r.x2<"u"&&(r.x2+=t),typeof r.y2<"u"&&(r.y2+=e),typeof r.x<"u"&&(r.x+=t),typeof r.y<"u"&&(r.y+=e),r.relative=!1),r))}function x0(){return Pr((r,t,e)=>(r.relative||(typeof r.x1<"u"&&(r.x1-=t),typeof r.y1<"u"&&(r.y1-=e),typeof r.x2<"u"&&(r.x2-=t),typeof r.y2<"u"&&(r.y2-=e),typeof r.x<"u"&&(r.x-=t),typeof r.y<"u"&&(r.y-=e),r.relative=!0),r))}function E0(r=!0,t=!0,e=!0){return Pr((n,a,u,l,c)=>{if(isNaN(l)&&!(n.type&H.MOVE_TO))throw new Error("path must start with moveto");return t&&n.type&H.HORIZ_LINE_TO&&(n.type=H.LINE_TO,n.y=n.relative?0:u),e&&n.type&H.VERT_LINE_TO&&(n.type=H.LINE_TO,n.x=n.relative?0:a),r&&n.type&H.CLOSE_PATH&&(n.type=H.LINE_TO,n.x=n.relative?l-a:l,n.y=n.relative?c-u:c),n.type&H.ARC&&(n.rX===0||n.rY===0)&&(n.type=H.LINE_TO,delete n.rX,delete n.rY,delete n.xRot,delete n.lArcFlag,delete n.sweepFlag),n})}function Nc(){let r=NaN,t=NaN,e=NaN,n=NaN;return Pr((a,u,l)=>(a.type&H.SMOOTH_CURVE_TO&&(a.type=H.CURVE_TO,r=isNaN(r)?u:r,t=isNaN(t)?l:t,a.x1=a.relative?u-r:2*u-r,a.y1=a.relative?l-t:2*l-t),a.type&H.CURVE_TO?(r=a.relative?u+a.x2:a.x2,t=a.relative?l+a.y2:a.y2):(r=NaN,t=NaN),a.type&H.SMOOTH_QUAD_TO&&(a.type=H.QUAD_TO,e=isNaN(e)?u:e,n=isNaN(n)?l:n,a.x1=a.relative?u-e:2*u-e,a.y1=a.relative?l-n:2*l-n),a.type&H.QUAD_TO?(e=a.relative?u+a.x1:a.x1,n=a.relative?l+a.y1:a.y1):(e=NaN,n=NaN),a))}function Mc(){let r=NaN,t=NaN;return Pr((e,n,a)=>{if(e.type&H.SMOOTH_QUAD_TO&&(e.type=H.QUAD_TO,r=isNaN(r)?n:r,t=isNaN(t)?a:t,e.x1=e.relative?n-r:2*n-r,e.y1=e.relative?a-t:2*a-t),e.type&H.QUAD_TO){r=e.relative?n+e.x1:e.x1,t=e.relative?a+e.y1:e.y1;const u=e.x1,l=e.y1;e.type=H.CURVE_TO,e.x1=((e.relative?0:n)+u*2)/3,e.y1=((e.relative?0:a)+l*2)/3,e.x2=(e.x+u*2)/3,e.y2=(e.y+l*2)/3}else r=NaN,t=NaN;return e})}function Pr(r){let t=0,e=0,n=NaN,a=NaN;return function(l){if(isNaN(n)&&!(l.type&H.MOVE_TO))throw new Error("path must start with moveto");const c=r(l,t,e,n,a);return l.type&H.CLOSE_PATH&&(t=n,e=a),"x"in l&&typeof l.x<"u"&&(t=l.relative?t+l.x:l.x),"y"in l&&typeof l.y<"u"&&(e=l.relative?e+l.y:l.y),l.type&H.MOVE_TO&&(n=t,a=e),c}}function A0(r=0){Lr(r);let t=NaN,e=NaN,n=NaN,a=NaN;return Pr((u,l,c,f,d)=>{const y=Math.abs;let A=!1,_=0,C=0;if(u.type&H.SMOOTH_CURVE_TO&&(_=isNaN(t)?0:l-t,C=isNaN(e)?0:c-e),u.type&(H.CURVE_TO|H.SMOOTH_CURVE_TO)?(t=u.relative?l+u.x2:u.x2,e=u.relative?c+u.y2:u.y2):(t=NaN,e=NaN),u.type&H.SMOOTH_QUAD_TO?(n=isNaN(n)?l:2*l-n,a=isNaN(a)?c:2*c-a):u.type&H.QUAD_TO?(n=u.relative?l+u.x1:u.x1,a=u.relative?c+u.y1:u.y2):(n=NaN,a=NaN),u.type&H.LINE_COMMANDS||u.type&H.ARC&&(u.rX===0||u.rY===0||!u.lArcFlag)||u.type&H.CURVE_TO||u.type&H.SMOOTH_CURVE_TO||u.type&H.QUAD_TO||u.type&H.SMOOTH_QUAD_TO){const F=typeof u.x>"u"?0:u.relative?u.x:u.x-l,N=typeof u.y>"u"?0:u.relative?u.y:u.y-c;_=isNaN(n)?typeof u.x1>"u"?_:u.relative?u.x:u.x1-l:n-l,C=isNaN(a)?typeof u.y1>"u"?C:u.relative?u.y:u.y1-c:a-c;const M=typeof u.x2>"u"?0:u.relative?u.x:u.x2-l,R=typeof u.y2>"u"?0:u.relative?u.y:u.y2-c;y(F)<=r&&y(N)<=r&&y(_)<=r&&y(C)<=r&&y(M)<=r&&y(R)<=r&&(A=!0)}return u.type&H.CLOSE_PATH&&y(l-f)<=r&&y(c-d)<=r&&(A=!0),A?[]:u})}function Ui(r,t,e,n,a,u){return Lr(r,t,e,n,a,u),Pr((l,c,f,d)=>{const y=l.x1,A=l.x2,_=l.relative&&!isNaN(d),C=typeof l.x<"u"?l.x:_?0:c,F=typeof l.y<"u"?l.y:_?0:f;l.type&H.HORIZ_LINE_TO&&t!==0&&(l.type=H.LINE_TO,l.y=l.relative?0:f),l.type&H.VERT_LINE_TO&&e!==0&&(l.type=H.LINE_TO,l.x=l.relative?0:c),typeof l.x<"u"&&(l.x=l.x*r+F*e+(_?0:a)),typeof l.y<"u"&&(l.y=C*t+l.y*n+(_?0:u)),typeof l.x1<"u"&&(l.x1=l.x1*r+l.y1*e+(_?0:a)),typeof l.y1<"u"&&(l.y1=y*t+l.y1*n+(_?0:u)),typeof l.x2<"u"&&(l.x2=l.x2*r+l.y2*e+(_?0:a)),typeof l.y2<"u"&&(l.y2=A*t+l.y2*n+(_?0:u));function N(R){return R*R}const M=r*n-t*e;if(typeof l.xRot<"u"&&(r!==1||t!==0||e!==0||n!==1))if(M===0)delete l.rX,delete l.rY,delete l.xRot,delete l.lArcFlag,delete l.sweepFlag,l.type=H.LINE_TO;else{const R=l.xRot*Math.PI/180,q=Math.sin(R),z=Math.cos(R),w=1/N(l.rX),L=1/N(l.rY),U=N(z)*w+N(q)*L,j=2*q*z*(w-L),tt=N(q)*w+N(z)*L,Z=U*n*n-j*t*n+tt*t*t,rt=j*(r*n+t*e)-2*(U*e*n+tt*r*t),J=U*e*e-j*r*e+tt*r*r,st=(Math.atan2(rt,Z-J)+Math.PI)%Math.PI/2,ht=Math.sin(st),ct=Math.cos(st);l.rX=Math.abs(M)/Math.sqrt(Z*N(ct)+rt*ht*ct+J*N(ht)),l.rY=Math.abs(M)/Math.sqrt(Z*N(ht)-rt*ht*ct+J*N(ct)),l.xRot=st*180/Math.PI}return typeof l.sweepFlag<"u"&&0>M&&(l.sweepFlag=+!l.sweepFlag),l})}function b0(r,t=0,e=0){Lr(r,t,e);const n=Math.sin(r),a=Math.cos(r);return Ui(a,n,-n,a,t-t*a+e*n,e-t*n-e*a)}function w0(r,t=0){return Lr(r,t),Ui(1,0,0,1,r,t)}function T0(r,t=r){return Lr(r,t),Ui(r,0,0,t,0,0)}function _0(r){return Lr(r),Ui(1,0,Math.atan(r),1,0,0)}function C0(r){return Lr(r),Ui(1,Math.atan(r),0,1,0,0)}function D0(r=0){return Lr(r),Ui(-1,0,0,1,r,0)}function S0(r=0){return Lr(r),Ui(1,0,0,-1,0,r)}function O0(){return Pr((r,t,e)=>H.ARC===r.type?v0(r,r.relative?0:t,r.relative?0:e):r)}function N0(){return Pr((r,t,e)=>(r.relative&&(t=0,e=0),H.ARC===r.type&&_o(r,t,e),r))}function Bc(){return r=>({...r})}function M0(){const r=Bc(),t=Oc(),e=Mc(),n=Nc(),a=Pr((u,l,c)=>{const f=n(e(t(r(u))));function d(A){A>a.maxX&&(a.maxX=A),A<a.minX&&(a.minX=A)}function y(A){A>a.maxY&&(a.maxY=A),A<a.minY&&(a.minY=A)}if(f.type&H.DRAWING_COMMANDS&&(d(l),y(c)),f.type&H.HORIZ_LINE_TO&&d(f.x),f.type&H.VERT_LINE_TO&&y(f.y),f.type&H.LINE_TO&&(d(f.x),y(f.y)),f.type&H.CURVE_TO){d(f.x),y(f.y);const A=Dc(l,f.x1,f.x2,f.x);for(const C of A)0<C&&1>C&&d(Sc(l,f.x1,f.x2,f.x,C));const _=Dc(c,f.y1,f.y2,f.y);for(const C of _)0<C&&1>C&&y(Sc(c,f.y1,f.y2,f.y,C))}if(f.type&H.ARC){d(f.x),y(f.y),_o(f,l,c);const A=f.xRot/180*Math.PI,_=Math.cos(A)*f.rX,C=Math.sin(A)*f.rX,F=-Math.sin(A)*f.rY,N=Math.cos(A)*f.rY,[M,R]=f.phi1<f.phi2?[f.phi1,f.phi2]:-180>f.phi2?[f.phi2+360,f.phi1+360]:[f.phi2,f.phi1],q=([L,U])=>{const tt=Math.atan2(U,L)*180/Math.PI;return tt<M?tt+360:tt},z=Tc(F,-_,0).map(q);for(const L of z)L>M&&L<R&&d(Cc(f.cX,_,F,L));const w=Tc(N,-C,0).map(q);for(const L of w)L>M&&L<R&&y(Cc(f.cY,C,N,L))}return u});return a.minX=1/0,a.maxX=-1/0,a.minY=1/0,a.maxY=-1/0,a}const ye={ROUND:m0,TO_ABS:Oc,TO_REL:x0,NORMALIZE_HVZ:E0,NORMALIZE_ST:Nc,QT_TO_C:Mc,INFO:Pr,SANITIZE:A0,MATRIX:Ui,ROTATE:b0,TRANSLATE:w0,SCALE:T0,SKEW_X:_0,SKEW_Y:C0,X_AXIS_SYMMETRY:D0,Y_AXIS_SYMMETRY:S0,A_TO_C:O0,ANNOTATE_ARCS:N0,CLONE:Bc,CALCULATE_BOUNDS:M0};let Ic=class{round(t){return this.transform(ye.ROUND(t))}toAbs(){return this.transform(ye.TO_ABS())}toRel(){return this.transform(ye.TO_REL())}normalizeHVZ(t,e,n){return this.transform(ye.NORMALIZE_HVZ(t,e,n))}normalizeST(){return this.transform(ye.NORMALIZE_ST())}qtToC(){return this.transform(ye.QT_TO_C())}aToC(){return this.transform(ye.A_TO_C())}sanitize(t){return this.transform(ye.SANITIZE(t))}translate(t,e){return this.transform(ye.TRANSLATE(t,e))}scale(t,e){return this.transform(ye.SCALE(t,e))}rotate(t,e,n){return this.transform(ye.ROTATE(t,e,n))}matrix(t,e,n,a,u,l){return this.transform(ye.MATRIX(t,e,n,a,u,l))}skewX(t){return this.transform(ye.SKEW_X(t))}skewY(t){return this.transform(ye.SKEW_Y(t))}xSymmetry(t){return this.transform(ye.X_AXIS_SYMMETRY(t))}ySymmetry(t){return this.transform(ye.Y_AXIS_SYMMETRY(t))}annotateArcs(){return this.transform(ye.ANNOTATE_ARCS())}};const B0=r=>r===" "||r===" "||r==="\r"||r===`
33
- `,Rc=r=>48<=r.charCodeAt(0)&&r.charCodeAt(0)<=57;let I0=class extends Ic{curNumber="";curCommandType=-1;curCommandRelative=!1;canParseCommandOrComma=!0;curNumberHasExp=!1;curNumberHasExpDigits=!1;curNumberHasDecimal=!1;curArgs=[];constructor(){super()}finish(t=[]){if(this.parse(" ",t),this.curArgs.length!==0||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return t}parse(t,e=[]){const n=a=>{e.push(a),this.curArgs.length=0,this.canParseCommandOrComma=!0};for(let a=0;a<t.length;a++){const u=t[a],l=this.curCommandType===H.ARC&&(this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber.length===1&&(this.curNumber==="0"||this.curNumber==="1"),c=Rc(u)&&(this.curNumber==="0"&&u==="0"||l);if(Rc(u)&&!c){this.curNumber+=u,this.curNumberHasExpDigits=this.curNumberHasExp;continue}if(u==="e"||u==="E"){this.curNumber+=u,this.curNumberHasExp=!0;continue}if((u==="-"||u==="+")&&this.curNumberHasExp&&!this.curNumberHasExpDigits){this.curNumber+=u;continue}if(u==="."&&!this.curNumberHasExp&&!this.curNumberHasDecimal&&!l){this.curNumber+=u,this.curNumberHasDecimal=!0;continue}if(this.curNumber&&this.curCommandType!==-1){const f=Number(this.curNumber);if(isNaN(f))throw new SyntaxError(`Invalid number ending at ${a}`);if(this.curCommandType===H.ARC){if(this.curArgs.length===0||this.curArgs.length===1){if(0>f)throw new SyntaxError(`Expected positive number, got "${f}" at index "${a}"`)}else if((this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber!=="0"&&this.curNumber!=="1")throw new SyntaxError(`Expected a flag, got "${this.curNumber}" at index "${a}"`)}this.curArgs.push(f),this.curArgs.length===R0[this.curCommandType]&&(H.HORIZ_LINE_TO===this.curCommandType?n({type:H.HORIZ_LINE_TO,relative:this.curCommandRelative,x:f}):H.VERT_LINE_TO===this.curCommandType?n({type:H.VERT_LINE_TO,relative:this.curCommandRelative,y:f}):this.curCommandType===H.MOVE_TO||this.curCommandType===H.LINE_TO||this.curCommandType===H.SMOOTH_QUAD_TO?(n({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),H.MOVE_TO===this.curCommandType&&(this.curCommandType=H.LINE_TO)):this.curCommandType===H.CURVE_TO?n({type:H.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===H.SMOOTH_CURVE_TO?n({type:H.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===H.QUAD_TO?n({type:H.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===H.ARC&&n({type:H.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!B0(u)){if(u===","&&this.canParseCommandOrComma){this.canParseCommandOrComma=!1;continue}if(u==="+"||u==="-"||u==="."){this.curNumber=u,this.curNumberHasDecimal=u===".";continue}if(c){this.curNumber=u,this.curNumberHasDecimal=!1;continue}if(this.curArgs.length!==0)throw new SyntaxError(`Unterminated command at index ${a}.`);if(!this.canParseCommandOrComma)throw new SyntaxError(`Unexpected character "${u}" at index ${a}. Command cannot follow comma`);if(this.canParseCommandOrComma=!1,u==="z"||u==="Z"){e.push({type:H.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1;continue}else if(u==="h"||u==="H")this.curCommandType=H.HORIZ_LINE_TO,this.curCommandRelative=u==="h";else if(u==="v"||u==="V")this.curCommandType=H.VERT_LINE_TO,this.curCommandRelative=u==="v";else if(u==="m"||u==="M")this.curCommandType=H.MOVE_TO,this.curCommandRelative=u==="m";else if(u==="l"||u==="L")this.curCommandType=H.LINE_TO,this.curCommandRelative=u==="l";else if(u==="c"||u==="C")this.curCommandType=H.CURVE_TO,this.curCommandRelative=u==="c";else if(u==="s"||u==="S")this.curCommandType=H.SMOOTH_CURVE_TO,this.curCommandRelative=u==="s";else if(u==="q"||u==="Q")this.curCommandType=H.QUAD_TO,this.curCommandRelative=u==="q";else if(u==="t"||u==="T")this.curCommandType=H.SMOOTH_QUAD_TO,this.curCommandRelative=u==="t";else if(u==="a"||u==="A")this.curCommandType=H.ARC,this.curCommandRelative=u==="a";else throw new SyntaxError(`Unexpected character "${u}" at index ${a}.`)}}return e}transform(t){return Object.create(this,{parse:{value(n,a=[]){const u=Object.getPrototypeOf(this).parse.call(this,n);for(const l of u){const c=t(l);Array.isArray(c)?a.push(...c):a.push(c)}return a}}})}},H=class tr extends Ic{commands;constructor(t){super(),typeof t=="string"?this.commands=tr.parse(t):this.commands=t}encode(){return tr.encode(this.commands)}getBounds(){const t=ye.CALCULATE_BOUNDS();return this.transform(t),t}transform(t){const e=[];for(const n of this.commands){const a=t(n);Array.isArray(a)?e.push(...a):e.push(a)}return this.commands=e,this}static encode(t){return g0(t)}static parse(t){const e=new I0,n=[];return e.parse(t,n),e.finish(n),n}static CLOSE_PATH=1;static MOVE_TO=2;static HORIZ_LINE_TO=4;static VERT_LINE_TO=8;static LINE_TO=16;static CURVE_TO=32;static SMOOTH_CURVE_TO=64;static QUAD_TO=128;static SMOOTH_QUAD_TO=256;static ARC=512;static LINE_COMMANDS=tr.LINE_TO|tr.HORIZ_LINE_TO|tr.VERT_LINE_TO;static DRAWING_COMMANDS=tr.HORIZ_LINE_TO|tr.VERT_LINE_TO|tr.LINE_TO|tr.CURVE_TO|tr.SMOOTH_CURVE_TO|tr.QUAD_TO|tr.SMOOTH_QUAD_TO|tr.ARC};const R0={[H.MOVE_TO]:2,[H.LINE_TO]:2,[H.HORIZ_LINE_TO]:1,[H.VERT_LINE_TO]:1,[H.CLOSE_PATH]:0,[H.QUAD_TO]:4,[H.SMOOTH_QUAD_TO]:2,[H.CURVE_TO]:6,[H.SMOOTH_CURVE_TO]:4,[H.ARC]:7},ne=" ";function L0(r){let t="";Array.isArray(r)||(r=[r]);for(let e=0;e<r.length;e++){const n=r[e];if(n.type===X.CLOSE_PATH)t+="z";else if(n.type===X.HORIZ_LINE_TO)t+=(n.relative?"h":"H")+n.x;else if(n.type===X.VERT_LINE_TO)t+=(n.relative?"v":"V")+n.y;else if(n.type===X.MOVE_TO)t+=(n.relative?"m":"M")+n.x+ne+n.y;else if(n.type===X.LINE_TO)t+=(n.relative?"l":"L")+n.x+ne+n.y;else if(n.type===X.CURVE_TO)t+=(n.relative?"c":"C")+n.x1+ne+n.y1+ne+n.x2+ne+n.y2+ne+n.x+ne+n.y;else if(n.type===X.SMOOTH_CURVE_TO)t+=(n.relative?"s":"S")+n.x2+ne+n.y2+ne+n.x+ne+n.y;else if(n.type===X.QUAD_TO)t+=(n.relative?"q":"Q")+n.x1+ne+n.y1+ne+n.x+ne+n.y;else if(n.type===X.SMOOTH_QUAD_TO)t+=(n.relative?"t":"T")+n.x+ne+n.y;else if(n.type===X.ARC)t+=(n.relative?"a":"A")+n.rX+ne+n.rY+ne+n.xRot+ne+ +n.lArcFlag+ne+ +n.sweepFlag+ne+n.x+ne+n.y;else throw new Error(`Unexpected command type "${n==null?void 0:n.type}" at index ${e}.`)}return t}class Lc{round(t){return this.transform(ce.ROUND(t))}toAbs(){return this.transform(ce.TO_ABS())}toRel(){return this.transform(ce.TO_REL())}normalizeHVZ(t,e,n){return this.transform(ce.NORMALIZE_HVZ(t,e,n))}normalizeST(){return this.transform(ce.NORMALIZE_ST())}qtToC(){return this.transform(ce.QT_TO_C())}aToC(){return this.transform(ce.A_TO_C())}sanitize(t){return this.transform(ce.SANITIZE(t))}translate(t,e){return this.transform(ce.TRANSLATE(t,e))}scale(t,e){return this.transform(ce.SCALE(t,e))}rotate(t,e,n){return this.transform(ce.ROTATE(t,e,n))}matrix(t,e,n,a,u,l){return this.transform(ce.MATRIX(t,e,n,a,u,l))}skewX(t){return this.transform(ce.SKEW_X(t))}skewY(t){return this.transform(ce.SKEW_Y(t))}xSymmetry(t){return this.transform(ce.X_AXIS_SYMMETRY(t))}ySymmetry(t){return this.transform(ce.Y_AXIS_SYMMETRY(t))}annotateArcs(){return this.transform(ce.ANNOTATE_ARCS())}}const P0=r=>r===" "||r===" "||r==="\r"||r===`
34
- `,Pc=r=>48<=r.charCodeAt(0)&&r.charCodeAt(0)<=57;class F0 extends Lc{constructor(){super(),this.curNumber="",this.curCommandType=-1,this.curCommandRelative=!1,this.canParseCommandOrComma=!0,this.curNumberHasExp=!1,this.curNumberHasExpDigits=!1,this.curNumberHasDecimal=!1,this.curArgs=[]}finish(t=[]){if(this.parse(" ",t),this.curArgs.length!==0||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return t}parse(t,e=[]){const n=a=>{e.push(a),this.curArgs.length=0,this.canParseCommandOrComma=!0};for(let a=0;a<t.length;a++){const u=t[a],l=this.curCommandType===X.ARC&&(this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber.length===1&&(this.curNumber==="0"||this.curNumber==="1"),c=Pc(u)&&(this.curNumber==="0"&&u==="0"||l);if(Pc(u)&&!c){this.curNumber+=u,this.curNumberHasExpDigits=this.curNumberHasExp;continue}if(u==="e"||u==="E"){this.curNumber+=u,this.curNumberHasExp=!0;continue}if((u==="-"||u==="+")&&this.curNumberHasExp&&!this.curNumberHasExpDigits){this.curNumber+=u;continue}if(u==="."&&!this.curNumberHasExp&&!this.curNumberHasDecimal&&!l){this.curNumber+=u,this.curNumberHasDecimal=!0;continue}if(this.curNumber&&this.curCommandType!==-1){const f=Number(this.curNumber);if(isNaN(f))throw new SyntaxError(`Invalid number ending at ${a}`);if(this.curCommandType===X.ARC){if(this.curArgs.length===0||this.curArgs.length===1){if(0>f)throw new SyntaxError(`Expected positive number, got "${f}" at index "${a}"`)}else if((this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber!=="0"&&this.curNumber!=="1")throw new SyntaxError(`Expected a flag, got "${this.curNumber}" at index "${a}"`)}this.curArgs.push(f),this.curArgs.length===k0[this.curCommandType]&&(X.HORIZ_LINE_TO===this.curCommandType?n({type:X.HORIZ_LINE_TO,relative:this.curCommandRelative,x:f}):X.VERT_LINE_TO===this.curCommandType?n({type:X.VERT_LINE_TO,relative:this.curCommandRelative,y:f}):this.curCommandType===X.MOVE_TO||this.curCommandType===X.LINE_TO||this.curCommandType===X.SMOOTH_QUAD_TO?(n({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),X.MOVE_TO===this.curCommandType&&(this.curCommandType=X.LINE_TO)):this.curCommandType===X.CURVE_TO?n({type:X.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===X.SMOOTH_CURVE_TO?n({type:X.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===X.QUAD_TO?n({type:X.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===X.ARC&&n({type:X.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!P0(u)){if(u===","&&this.canParseCommandOrComma){this.canParseCommandOrComma=!1;continue}if(u==="+"||u==="-"||u==="."){this.curNumber=u,this.curNumberHasDecimal=u===".";continue}if(c){this.curNumber=u,this.curNumberHasDecimal=!1;continue}if(this.curArgs.length!==0)throw new SyntaxError(`Unterminated command at index ${a}.`);if(!this.canParseCommandOrComma)throw new SyntaxError(`Unexpected character "${u}" at index ${a}. Command cannot follow comma`);if(this.canParseCommandOrComma=!1,u==="z"||u==="Z"){e.push({type:X.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1;continue}else if(u==="h"||u==="H")this.curCommandType=X.HORIZ_LINE_TO,this.curCommandRelative=u==="h";else if(u==="v"||u==="V")this.curCommandType=X.VERT_LINE_TO,this.curCommandRelative=u==="v";else if(u==="m"||u==="M")this.curCommandType=X.MOVE_TO,this.curCommandRelative=u==="m";else if(u==="l"||u==="L")this.curCommandType=X.LINE_TO,this.curCommandRelative=u==="l";else if(u==="c"||u==="C")this.curCommandType=X.CURVE_TO,this.curCommandRelative=u==="c";else if(u==="s"||u==="S")this.curCommandType=X.SMOOTH_CURVE_TO,this.curCommandRelative=u==="s";else if(u==="q"||u==="Q")this.curCommandType=X.QUAD_TO,this.curCommandRelative=u==="q";else if(u==="t"||u==="T")this.curCommandType=X.SMOOTH_QUAD_TO,this.curCommandRelative=u==="t";else if(u==="a"||u==="A")this.curCommandType=X.ARC,this.curCommandRelative=u==="a";else throw new SyntaxError(`Unexpected character "${u}" at index ${a}.`)}}return e}transform(t){return Object.create(this,{parse:{value(n,a=[]){const u=Object.getPrototypeOf(this).parse.call(this,n);for(const l of u){const c=t(l);Array.isArray(c)?a.push(...c):a.push(c)}return a}}})}}const Ft=class Ft extends Lc{constructor(t){super(),typeof t=="string"?this.commands=Ft.parse(t):this.commands=t}encode(){return Ft.encode(this.commands)}getBounds(){const t=ce.CALCULATE_BOUNDS();return this.transform(t),t}transform(t){const e=[];for(const n of this.commands){const a=t(n);Array.isArray(a)?e.push(...a):e.push(a)}return this.commands=e,this}static encode(t){return L0(t)}static parse(t){const e=new F0,n=[];return e.parse(t,n),e.finish(n),n}};Ft.CLOSE_PATH=1,Ft.MOVE_TO=2,Ft.HORIZ_LINE_TO=4,Ft.VERT_LINE_TO=8,Ft.LINE_TO=16,Ft.CURVE_TO=32,Ft.SMOOTH_CURVE_TO=64,Ft.QUAD_TO=128,Ft.SMOOTH_QUAD_TO=256,Ft.ARC=512,Ft.LINE_COMMANDS=Ft.LINE_TO|Ft.HORIZ_LINE_TO|Ft.VERT_LINE_TO,Ft.DRAWING_COMMANDS=Ft.HORIZ_LINE_TO|Ft.VERT_LINE_TO|Ft.LINE_TO|Ft.CURVE_TO|Ft.SMOOTH_CURVE_TO|Ft.QUAD_TO|Ft.SMOOTH_QUAD_TO|Ft.ARC;let X=Ft;const k0={[X.MOVE_TO]:2,[X.LINE_TO]:2,[X.HORIZ_LINE_TO]:1,[X.VERT_LINE_TO]:1,[X.CLOSE_PATH]:0,[X.QUAD_TO]:4,[X.SMOOTH_QUAD_TO]:2,[X.CURVE_TO]:6,[X.SMOOTH_CURVE_TO]:4,[X.ARC]:7};function Co([r,t],e){return[r*Math.cos(e)-t*Math.sin(e),r*Math.sin(e)+t*Math.cos(e)]}function Fr(...r){for(let t=0;t<r.length;t++)if(typeof r[t]!="number")throw new Error(`assertNumbers arguments[${t}] is not a number. ${typeof r[t]} == typeof ${r[t]}`);return!0}const Hi=Math.PI;function Do(r,t,e){r.lArcFlag=r.lArcFlag===0?0:1,r.sweepFlag=r.sweepFlag===0?0:1;let{rX:n,rY:a}=r;const{x:u,y:l}=r;n=Math.abs(r.rX),a=Math.abs(r.rY);const[c,f]=Co([(t-u)/2,(e-l)/2],-r.xRot/180*Hi),d=Math.pow(c,2)/Math.pow(n,2)+Math.pow(f,2)/Math.pow(a,2);1<d&&(n*=Math.sqrt(d),a*=Math.sqrt(d)),r.rX=n,r.rY=a;const y=Math.pow(n,2)*Math.pow(f,2)+Math.pow(a,2)*Math.pow(c,2),A=(r.lArcFlag!==r.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(n,2)*Math.pow(a,2)-y)/y)),_=n*f/a*A,C=-a*c/n*A,F=Co([_,C],r.xRot/180*Hi);r.cX=F[0]+(t+u)/2,r.cY=F[1]+(e+l)/2,r.phi1=Math.atan2((f-C)/a,(c-_)/n),r.phi2=Math.atan2((-f-C)/a,(-c-_)/n),r.sweepFlag===0&&r.phi2>r.phi1&&(r.phi2-=2*Hi),r.sweepFlag===1&&r.phi2<r.phi1&&(r.phi2+=2*Hi),r.phi1*=180/Hi,r.phi2*=180/Hi}function Fc(r,t,e){Fr(r,t,e);const n=r*r+t*t-e*e;if(0>n)return[];if(n===0)return[[r*e/(r*r+t*t),t*e/(r*r+t*t)]];const a=Math.sqrt(n);return[[(r*e+t*a)/(r*r+t*t),(t*e-r*a)/(r*r+t*t)],[(r*e-t*a)/(r*r+t*t),(t*e+r*a)/(r*r+t*t)]]}const vi=Math.PI/180;function kc(r,t,e){return(1-e)*r+e*t}function Uc(r,t,e,n){return r+Math.cos(n/180*Hi)*t+Math.sin(n/180*Hi)*e}function Hc(r,t,e,n){const u=t-r,l=e-t,c=n-e,f=3*u+3*c-6*l,d=(l-u)*6,y=3*u;return Math.abs(f)<1e-6?[-y/d]:U0(d/f,y/f,1e-6)}function qc(r,t,e,n,a){const u=1-a,l=u*u*u,c=3*u*u*a,f=3*u*a*a,d=a*a*a;return r*l+t*c+e*f+n*d}function U0(r,t,e=1e-6){const n=r*r/4-t;if(n<-e)return[];if(n<=e)return[-r/2];const a=Math.sqrt(n);return[-(r/2)-a,-(r/2)+a]}function H0(r,t,e){r.cX||Do(r,t,e);const n=Math.min(r.phi1,r.phi2),a=Math.max(r.phi1,r.phi2),u=a-n,l=Math.ceil(u/90),c=new Array(l);let f=t,d=e;for(let y=0;y<l;y++){const A=kc(r.phi1,r.phi2,y/l),_=kc(r.phi1,r.phi2,(y+1)/l),C=_-A,F=4/3*Math.tan(C*vi/4),[N,M]=[Math.cos(A*vi)-F*Math.sin(A*vi),Math.sin(A*vi)+F*Math.cos(A*vi)],[R,q]=[Math.cos(_*vi),Math.sin(_*vi)],[z,w]=[R+F*Math.sin(_*vi),q-F*Math.cos(_*vi)],L={relative:r.relative,type:X.CURVE_TO},U=(j,tt)=>{const[Z,rt]=Co([j*r.rX,tt*r.rY],r.xRot);return[r.cX+Z,r.cY+rt]};[L.x1,L.y1]=U(N,M),[L.x2,L.y2]=U(z,w),[L.x,L.y]=U(R,q),r.relative&&(L.x1-=f,L.y1-=d,L.x2-=f,L.y2-=d,L.x-=f,L.y-=d),[f,d]=[L.x,L.y],c[y]=L}return c}function q0(r=1e13){Fr(r);function t(e){return Math.round(e*r)/r}return function(n){return"x1"in n&&typeof n.x1<"u"&&(n.x1=t(n.x1)),"y1"in n&&typeof n.y1<"u"&&(n.y1=t(n.y1)),"x2"in n&&typeof n.x2<"u"&&(n.x2=t(n.x2)),"y2"in n&&typeof n.y2<"u"&&(n.y2=t(n.y2)),"x"in n&&typeof n.x<"u"&&(n.x=t(n.x)),"y"in n&&typeof n.y<"u"&&(n.y=t(n.y)),"rX"in n&&typeof n.rX<"u"&&(n.rX=t(n.rX)),"rY"in n&&typeof n.rY<"u"&&(n.rY=t(n.rY)),n}}function Wc(){return kr((r,t,e)=>(r.relative&&(typeof r.x1<"u"&&(r.x1+=t),typeof r.y1<"u"&&(r.y1+=e),typeof r.x2<"u"&&(r.x2+=t),typeof r.y2<"u"&&(r.y2+=e),typeof r.x<"u"&&(r.x+=t),typeof r.y<"u"&&(r.y+=e),r.relative=!1),r))}function W0(){return kr((r,t,e)=>(r.relative||(typeof r.x1<"u"&&(r.x1-=t),typeof r.y1<"u"&&(r.y1-=e),typeof r.x2<"u"&&(r.x2-=t),typeof r.y2<"u"&&(r.y2-=e),typeof r.x<"u"&&(r.x-=t),typeof r.y<"u"&&(r.y-=e),r.relative=!0),r))}function V0(r=!0,t=!0,e=!0){return kr((n,a,u,l,c)=>{if(isNaN(l)&&!(n.type&X.MOVE_TO))throw new Error("path must start with moveto");return t&&n.type&X.HORIZ_LINE_TO&&(n.type=X.LINE_TO,n.y=n.relative?0:u),e&&n.type&X.VERT_LINE_TO&&(n.type=X.LINE_TO,n.x=n.relative?0:a),r&&n.type&X.CLOSE_PATH&&(n.type=X.LINE_TO,n.x=n.relative?l-a:l,n.y=n.relative?c-u:c),n.type&X.ARC&&(n.rX===0||n.rY===0)&&(n.type=X.LINE_TO,delete n.rX,delete n.rY,delete n.xRot,delete n.lArcFlag,delete n.sweepFlag),n})}function Vc(){let r=NaN,t=NaN,e=NaN,n=NaN;return kr((a,u,l)=>(a.type&X.SMOOTH_CURVE_TO&&(a.type=X.CURVE_TO,r=isNaN(r)?u:r,t=isNaN(t)?l:t,a.x1=a.relative?u-r:2*u-r,a.y1=a.relative?l-t:2*l-t),a.type&X.CURVE_TO?(r=a.relative?u+a.x2:a.x2,t=a.relative?l+a.y2:a.y2):(r=NaN,t=NaN),a.type&X.SMOOTH_QUAD_TO&&(a.type=X.QUAD_TO,e=isNaN(e)?u:e,n=isNaN(n)?l:n,a.x1=a.relative?u-e:2*u-e,a.y1=a.relative?l-n:2*l-n),a.type&X.QUAD_TO?(e=a.relative?u+a.x1:a.x1,n=a.relative?l+a.y1:a.y1):(e=NaN,n=NaN),a))}function $c(){let r=NaN,t=NaN;return kr((e,n,a)=>{if(e.type&X.SMOOTH_QUAD_TO&&(e.type=X.QUAD_TO,r=isNaN(r)?n:r,t=isNaN(t)?a:t,e.x1=e.relative?n-r:2*n-r,e.y1=e.relative?a-t:2*a-t),e.type&X.QUAD_TO){r=e.relative?n+e.x1:e.x1,t=e.relative?a+e.y1:e.y1;const u=e.x1,l=e.y1;e.type=X.CURVE_TO,e.x1=((e.relative?0:n)+u*2)/3,e.y1=((e.relative?0:a)+l*2)/3,e.x2=(e.x+u*2)/3,e.y2=(e.y+l*2)/3}else r=NaN,t=NaN;return e})}function kr(r){let t=0,e=0,n=NaN,a=NaN;return function(l){if(isNaN(n)&&!(l.type&X.MOVE_TO))throw new Error("path must start with moveto");const c=r(l,t,e,n,a);return l.type&X.CLOSE_PATH&&(t=n,e=a),"x"in l&&typeof l.x<"u"&&(t=l.relative?t+l.x:l.x),"y"in l&&typeof l.y<"u"&&(e=l.relative?e+l.y:l.y),l.type&X.MOVE_TO&&(n=t,a=e),c}}function $0(r=0){Fr(r);let t=NaN,e=NaN,n=NaN,a=NaN;return kr((u,l,c,f,d)=>{const y=Math.abs;let A=!1,_=0,C=0;if(u.type&X.SMOOTH_CURVE_TO&&(_=isNaN(t)?0:l-t,C=isNaN(e)?0:c-e),u.type&(X.CURVE_TO|X.SMOOTH_CURVE_TO)?(t=u.relative?l+u.x2:u.x2,e=u.relative?c+u.y2:u.y2):(t=NaN,e=NaN),u.type&X.SMOOTH_QUAD_TO?(n=isNaN(n)?l:2*l-n,a=isNaN(a)?c:2*c-a):u.type&X.QUAD_TO?(n=u.relative?l+u.x1:u.x1,a=u.relative?c+u.y1:u.y2):(n=NaN,a=NaN),u.type&X.LINE_COMMANDS||u.type&X.ARC&&(u.rX===0||u.rY===0||!u.lArcFlag)||u.type&X.CURVE_TO||u.type&X.SMOOTH_CURVE_TO||u.type&X.QUAD_TO||u.type&X.SMOOTH_QUAD_TO){const F=typeof u.x>"u"?0:u.relative?u.x:u.x-l,N=typeof u.y>"u"?0:u.relative?u.y:u.y-c;_=isNaN(n)?typeof u.x1>"u"?_:u.relative?u.x:u.x1-l:n-l,C=isNaN(a)?typeof u.y1>"u"?C:u.relative?u.y:u.y1-c:a-c;const M=typeof u.x2>"u"?0:u.relative?u.x:u.x2-l,R=typeof u.y2>"u"?0:u.relative?u.y:u.y2-c;y(F)<=r&&y(N)<=r&&y(_)<=r&&y(C)<=r&&y(M)<=r&&y(R)<=r&&(A=!0)}return u.type&X.CLOSE_PATH&&y(l-f)<=r&&y(c-d)<=r&&(A=!0),A?[]:u})}function qi(r,t,e,n,a,u){return Fr(r,t,e,n,a,u),kr((l,c,f,d)=>{const y=l.x1,A=l.x2,_=l.relative&&!isNaN(d),C=typeof l.x<"u"?l.x:_?0:c,F=typeof l.y<"u"?l.y:_?0:f;l.type&X.HORIZ_LINE_TO&&t!==0&&(l.type=X.LINE_TO,l.y=l.relative?0:f),l.type&X.VERT_LINE_TO&&e!==0&&(l.type=X.LINE_TO,l.x=l.relative?0:c),typeof l.x<"u"&&(l.x=l.x*r+F*e+(_?0:a)),typeof l.y<"u"&&(l.y=C*t+l.y*n+(_?0:u)),typeof l.x1<"u"&&(l.x1=l.x1*r+l.y1*e+(_?0:a)),typeof l.y1<"u"&&(l.y1=y*t+l.y1*n+(_?0:u)),typeof l.x2<"u"&&(l.x2=l.x2*r+l.y2*e+(_?0:a)),typeof l.y2<"u"&&(l.y2=A*t+l.y2*n+(_?0:u));function N(R){return R*R}const M=r*n-t*e;if(typeof l.xRot<"u"&&(r!==1||t!==0||e!==0||n!==1))if(M===0)delete l.rX,delete l.rY,delete l.xRot,delete l.lArcFlag,delete l.sweepFlag,l.type=X.LINE_TO;else{const R=l.xRot*Math.PI/180,q=Math.sin(R),z=Math.cos(R),w=1/N(l.rX),L=1/N(l.rY),U=N(z)*w+N(q)*L,j=2*q*z*(w-L),tt=N(q)*w+N(z)*L,Z=U*n*n-j*t*n+tt*t*t,rt=j*(r*n+t*e)-2*(U*e*n+tt*r*t),J=U*e*e-j*r*e+tt*r*r,st=(Math.atan2(rt,Z-J)+Math.PI)%Math.PI/2,ht=Math.sin(st),ct=Math.cos(st);l.rX=Math.abs(M)/Math.sqrt(Z*N(ct)+rt*ht*ct+J*N(ht)),l.rY=Math.abs(M)/Math.sqrt(Z*N(ht)-rt*ht*ct+J*N(ct)),l.xRot=st*180/Math.PI}return typeof l.sweepFlag<"u"&&0>M&&(l.sweepFlag=+!l.sweepFlag),l})}function z0(r,t=0,e=0){Fr(r,t,e);const n=Math.sin(r),a=Math.cos(r);return qi(a,n,-n,a,t-t*a+e*n,e-t*n-e*a)}function G0(r,t=0){return Fr(r,t),qi(1,0,0,1,r,t)}function Y0(r,t=r){return Fr(r,t),qi(r,0,0,t,0,0)}function X0(r){return Fr(r),qi(1,0,Math.atan(r),1,0,0)}function Z0(r){return Fr(r),qi(1,Math.atan(r),0,1,0,0)}function Q0(r=0){return Fr(r),qi(-1,0,0,1,r,0)}function j0(r=0){return Fr(r),qi(1,0,0,-1,0,r)}function K0(){return kr((r,t,e)=>X.ARC===r.type?H0(r,r.relative?0:t,r.relative?0:e):r)}function J0(){return kr((r,t,e)=>(r.relative&&(t=0,e=0),X.ARC===r.type&&Do(r,t,e),r))}function zc(){return r=>({...r})}function t2(){const r=zc(),t=Wc(),e=$c(),n=Vc(),a=kr((u,l,c)=>{const f=n(e(t(r(u))));function d(A){A>a.maxX&&(a.maxX=A),A<a.minX&&(a.minX=A)}function y(A){A>a.maxY&&(a.maxY=A),A<a.minY&&(a.minY=A)}if(f.type&X.DRAWING_COMMANDS&&(d(l),y(c)),f.type&X.HORIZ_LINE_TO&&d(f.x),f.type&X.VERT_LINE_TO&&y(f.y),f.type&X.LINE_TO&&(d(f.x),y(f.y)),f.type&X.CURVE_TO){d(f.x),y(f.y);const A=Hc(l,f.x1,f.x2,f.x);for(const C of A)0<C&&1>C&&d(qc(l,f.x1,f.x2,f.x,C));const _=Hc(c,f.y1,f.y2,f.y);for(const C of _)0<C&&1>C&&y(qc(c,f.y1,f.y2,f.y,C))}if(f.type&X.ARC){d(f.x),y(f.y),Do(f,l,c);const A=f.xRot/180*Math.PI,_=Math.cos(A)*f.rX,C=Math.sin(A)*f.rX,F=-Math.sin(A)*f.rY,N=Math.cos(A)*f.rY,[M,R]=f.phi1<f.phi2?[f.phi1,f.phi2]:-180>f.phi2?[f.phi2+360,f.phi1+360]:[f.phi2,f.phi1],q=([L,U])=>{const tt=Math.atan2(U,L)*180/Math.PI;return tt<M?tt+360:tt},z=Fc(F,-_,0).map(q);for(const L of z)L>M&&L<R&&d(Uc(f.cX,_,F,L));const w=Fc(N,-C,0).map(q);for(const L of w)L>M&&L<R&&y(Uc(f.cY,C,N,L))}return u});return a.minX=1/0,a.maxX=-1/0,a.minY=1/0,a.maxY=-1/0,a}const ce={ROUND:q0,TO_ABS:Wc,TO_REL:W0,NORMALIZE_HVZ:V0,NORMALIZE_ST:Vc,QT_TO_C:$c,INFO:kr,SANITIZE:$0,MATRIX:qi,ROTATE:z0,TRANSLATE:G0,SCALE:Y0,SKEW_X:X0,SKEW_Y:Z0,X_AXIS_SYMMETRY:Q0,Y_AXIS_SYMMETRY:j0,A_TO_C:K0,ANNOTATE_ARCS:J0,CLONE:zc,CALCULATE_BOUNDS:t2};class Ys extends H{name="Geo2";params;viewMatrix=new re;boundingBox=new St;constructor(t={}){super(t.commands),this.params=t,this.toAbs(),t.flipY&&this.matrix(1,0,0,-1,0,0)}_version=0;get version(){return this._version}set version(t){this._version=t}set needsUpdate(t){t&&this._version++}static render(t,e){if(!(!t||!(e!=null&&e.length))){Ot.identity();for(let n=0,a=(e==null?void 0:e.length)||0;n<a;n++){const u=e[n];switch(u.type){case H.MOVE_TO:t.moveTo(u.x,u.y),Ot.set(u.x,u.y);break;case H.LINE_TO:t.lineTo(u.x,u.y),Ot.set(u.x,u.y);break;case H.ARC:t.arc(u.x,u.y,u.rX,u.phi1||0,u.phi2||Math.PI*2,u.sweepFlag!==1),Ot.set(u.x,u.y);break;case H.HORIZ_LINE_TO:Ot.set(u.x,Ot.y);break;case H.VERT_LINE_TO:Ot.set(Ot.x,u.y);break;case H.CURVE_TO:Ot.set(u.x,u.y);break;case H.SMOOTH_CURVE_TO:Ot.set(u.x,u.y);break;case H.QUAD_TO:Ot.set(u.x,u.y);break;case H.SMOOTH_QUAD_TO:Ot.set(u.x,u.y);break}}}}setFromPoints(t){return t!=null&&t.length?(this.params.points=t,this.recomputePath(),this):this}recomputePath(){throw new Error("must be implemented in derived")}computeBoundingBox(){var t;this.boundingBox.makeEmpty(),Ot.identity();for(let e=0,n=((t=this.commands)==null?void 0:t.length)||0;e<n;e++){const a=this.commands[e];switch(a.type){case H.MOVE_TO:this.boundingBox.expandByXY(a.x,a.y),Ot.set(a.x,a.y);break;case H.LINE_TO:this.boundingBox.expandByXY(a.x,a.y),Ot.set(a.x,a.y);break;case H.ARC:typeof a.xRot>"u"?(this.boundingBox.expandByXY(a.x,a.y),Ur.set(a.x,a.y).addScalar(-a.rX),this.boundingBox.expandByPoint(Ur),Ur.set(a.x,a.y).addScalar(a.rX),this.boundingBox.expandByPoint(Ur)):this.boundingBox.expandByXY(a.x,a.y),Ot.set(a.x,a.y);break;case H.HORIZ_LINE_TO:this.boundingBox.expandByXY(a.x,Ot.y),Ot.set(a.x,Ot.y);break;case H.VERT_LINE_TO:this.boundingBox.expandByXY(Ot.x,a.y),Ot.set(Ot.x,a.y);break;case H.QUAD_TO:this.boundingBox.expandByXY(a.x,a.y),Ot.set(a.x,a.y);break}}return this.boundingBox}render(t){Ys.render(t,this.commands)}applyMatrix(t){return this.needsUpdate=!0,this.matrix(t.elements[0],t.elements[1],t.elements[3],t.elements[4],t.elements[6],t.elements[7]),this}getRenderCommands(t){var u;const e=[];for(let l=0,c=((u=this.commands)==null?void 0:u.length)||0;l<c;l++)e.push(Object.assign({},this.commands[l]));if(!t)return e;Ot.identity();const n=ce.MATRIX(t.elements[0],t.elements[1],t.elements[3],t.elements[4],t.elements[6],t.elements[7]),a=[];for(let l=0,c=e.length;l<c;l++){const f=e[l],d=n(f);if(d.type===H.ARC&&typeof d.xRot<"u"){const y=d0(Ot.x,Ot.y,d.x,d.y,d.lArcFlag,d.sweepFlag,d.rX,d.rY,0);d.x=y[0],d.y=y[1],d.rX=y[2]>y[3]?y[2]:y[3],d.phi1=y[4],d.phi2=y[4]+y[5],d.sweepFlag=y[7],d.phi2===0&&(d.phi2=d.phi1>0?1e-6:-1e-6)}else if(d.type===H.ARC&&(t.getScale(Ur),d.rX=d.rY*Math.abs(Ur.x),d.phi1!==0||d.phi2!==Math.PI*2)){t.getRotation(Ur),d.phi1+=Ur.x,d.phi2+=Ur.x;const y=a[a.length-1];y.x=(y.x||0)+Math.cos(Ur.x)*d.rX*2,y.y=(y.y||0)+Math.sin(Ur.x)*d.rX*2}Array.isArray(d)?a.push(...d):a.push(d),typeof d.x>"u"?Ot.set(Ot.x,d.y):typeof d.y>"u"?Ot.set(d.x,Ot.y):Ot.set(d.x,d.y)}return a}copy(t){return this.commands=Mt.cloneDeep(t.commands),this.version=0,this}clone(){const t=this.constructor;return new t(this.params).copy(this)}}const Ot=new Y,Ur=new Y;class e2 extends Ys{isCircle=!0;radius=1;start=0;end=Math.PI*2;constructor(t={}){t.commands||(t.commands=[]),super(t),typeof t.radius<"u"&&(this.radius=t.radius),typeof t.start<"u"&&(this.start=t.start),typeof t.end<"u"&&(this.end=t.end),this.recomputePath()}recomputePath(){var n,a;if(!((a=(n=this.params)==null?void 0:n.points)!=null&&a.length))return this;const t=this.params.points,e=[];for(let u=0,l=t.length;u<l;u++)e.push({type:H.MOVE_TO,x:t[u].x>0?t[u].x+this.radius:t[u].x-this.radius,y:t[u].y,relative:!1}),e.push({type:H.ARC,rX:this.radius,rY:this.radius,xRot:void 0,lArcFlag:0,sweepFlag:1,phi1:this.start,phi2:this.end,x:t[u].x,y:t[u].y,relative:!1});return this.commands=e,this}}class r2{params;constructor(t={}){this.params=t}destroy(){}static getInstanceByElement(t,e=!1){if(!t)return;let n;switch(t.nodeName){case"path":n=this.getInstanceByPath(t,e);break;case"circle":n=this.getInstanceByCircle(t,e);break}return n||console.error(`unsupported: ${t.nodeName}`),n}static getInstanceByPath(t,e=!1){if(!t)return;const n=t.getAttribute("d");if(!n)return;const a=n.replace(/([+\-.])\s+/gm,"$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,"");return new Ys({commands:a,flipY:e})}static getInstanceByCircle(t,e=!1){if(!t||t.nodeName!=="circle")return;Gc.set(wo(t,"cx",0),wo(t,"cy",0));const n=wo(t,"r",0);return new e2({points:[Gc.clone()],radius:n,flipY:e})}static getInstance(t,e=!1){if(t)return new Ys({commands:t,flipY:e})}}const Gc=new Y;class i2{svg;offset=new Y;svgRoot;layers=[];elementsMap={};boundingBoxMap={};boundingBox=new St;svgSkeletons=[];data;_exceptTypes=["view"];_exceptIds=["viewer","mirror"];_lvi=0;bindSvg(t){return this.svg=t,this.svgRoot=fc(this.svg),this.layers=this.getLayers(2),this.getElementsMap(this.svg,this.elementsMap),this}getLayers(t){var e;if(!this.svg)throw new Error("please bind svg first");return t===2&&((e=this.layers)!=null&&e.length)?this.layers:(this.layers=this._getSvgLayer(this.svg,t),this.layers)}_getSvgLayer(t,e=0,n=0,a=[]){var c;let u,l=t.id;if(this._exceptTypes.includes(t.tagName)||t.tagName==="defs")return this._lvi--,a;if(e&&this._lvi>e)return a;l&&!this._exceptIds.includes(l)&&(u={value:l,label:l,children:[]},a.push(u)),this._lvi++;for(let f=0,d=t.children.length;f<d;f++)u?this._getSvgLayer(t.children[f],e,this._lvi,u.children):this._getSvgLayer(t.children[f],e,this._lvi,a);return((c=u==null?void 0:u.children)==null?void 0:c.length)===0&&delete u.children,this._lvi=n,a}getElementsMap(t,e={}){return this.traverseSvg(t,n=>{n!==t&&n.id&&(e[n.id]=n)}),e}computeBoundingBoxMap(){var e;if(Object.keys(this.boundingBoxMap).length)return this.boundingBoxMap;let t=(e=this.svg)==null?void 0:e.getBoundingClientRect();return t&&this.offset.set(t.left,t.top),this.traverseSvg(this.svg,n=>{if(!n.id)return;if(n.tagName==="use"){const l=this.getUseSymbolId(n);if(!l)return;const c=this.boundingBoxMap[l];if(c&&!c.isEmpty()){mi.set(Number(n.getAttribute("x")||"0"),Number(n.getAttribute("y")||"0")),Xa.composeSvgTransform(mi.x,mi.y,n.getAttribute("transform"));const y=new St().copy(c).applyMatrix3(Xa);this.boundingBoxMap[n.id]=y;return}const f=this.getUseElementBoundingBoxWithSymbol(n);if(!f)return;this.boundingBoxMap[l]=f,mi.set(Number(n.getAttribute("x")||"0"),Number(n.getAttribute("y")||"0")),Xa.composeSvgTransform(mi.x,mi.y,n.getAttribute("transform"));const d=new St().copy(f).applyMatrix3(Xa);this.boundingBoxMap[n.id]=d,this.boundingBox.expandByBox(d);return}if(typeof n.getBBox!="function")return;const a=n.getBBox();if((!a.width||!a.height)&&n.tagName==="path"){const l=r2.getInstanceByPath(n),c=l==null?void 0:l.computeBoundingBox();if(!c||c.isEmpty())return;c.getSize(mi),a.x=c.min.x,a.y=c.max.y,a.width=mi.x,a.height=mi.y}if(!a.width||!a.height)return;const u=new St(new Y(a.x,a.y),new Y(a.x+a.width,a.y+a.height));this.boundingBoxMap[n.id]=u.round(),this.boundingBox.expandByBox(u)}),this.boundingBoxMap}updateLayersVisibility(t,e=!1){if(!this.elementsMap)throw new Error("please bind svg first");this._updateAllLayersVisibility(!e),t!=null&&t.length||(t=["background"]);for(let n=0,a=t.length;n<a;n++){const u=this.getElementById(t[n]);u&&this._updateLayersVisibility(u,e,!0,!0)}}_updateAllLayersVisibility(t=!1){Object.values(this.elementsMap).forEach(e=>{e.tagName==="svg"||e.tagName==="symbol"||!e.getAttribute("id")||(e.style.display=t?"block":"none")})}_updateLayersVisibility(t,e=!1,n=!1,a=!1){var u,l;if(!(!t||t.tagName==="svg"||!t.getAttribute("id"))){if(t.style.display=e?"block":"none",n&&e){let c=t.parentElement;for(;c&&c.tagName!=="svg";)c.style.display=e?"block":"none",c=c.parentElement}if(a&&((u=t.children)==null?void 0:u.length)>0)for(let c=0,f=(l=t.children)==null?void 0:l.length;c<f;c++)this._updateLayersVisibility(t.children[c],e,!1,!0)}}updateVisibilityByAssetType(t,e=!1,n){n||(n=p0[t]),this.updateLayersVisibility(n,!e)}updateVisibilityByAssetTypes(t,e=!1,n){if(Array.isArray(t)||(t=[t]),!!(t!=null&&t.length))for(let a=0,u=t.length;a<u;a++)this.updateVisibilityByAssetType(t[a],e,n)}getElementById(t){if(!this.elementsMap)throw new Error("please bind svg first");return this.elementsMap[t]}getElementBoundingBox(t){return this.boundingBoxMap[t]}findSkeletonByPath(t=[]){let e=0,n;const a=Object.keys(this.elementsMap);for(let u=0,l=a.length;u<l;u++){const c=this.elementsMap[a[u]];if(!c)continue;const f=c.getAttribute("d");f&&(f.length<e||(e=f.length,n=c.id?c:c.parent))}return n&&t.push(n),t}setTextInChildren2(t,e){var a;let n;((a=t==null?void 0:t.children)==null?void 0:a.length)<2?(n=vo("text"),n.setAttribute("dy","1em"),t.appendChild(n)):n=t.children[t.children.length-1],n.innerHTML=e}traverseSvg(t,e){var n;if(!this._exceptTypes.includes(t.tagName)&&!(t.tagName!=="svg"&&t.tagName!=="defs"&&!t.id)&&!(t.tagName==="g"&&((n=t.children)==null?void 0:n.length)===0)){this._exceptIds.includes(t.id)||e(t);for(let a=0,u=t.children.length;a<u;a++)this.traverseSvg(t.children[a],e)}}traverseSvgTLayers(t,e){var n;if(Array.isArray(t)){for(let a=0,u=t.length;a<u;a++)this.traverseSvgTLayers(t[a],e);return}if(e(t),!!((n=t.children)!=null&&n.length))for(let a=0,u=t.children.length;a<u;a++)this.traverseSvgTLayers(t.children[a],e)}getLabelElementsByType(t,e={}){const n=this.getElementById(Ya(t));return n&&this.getElementsMap(n,e),e}getLabelElementById(t,e="rm"){if(!t)return;const n=this.getElementById(t);if(!n)return;let a=n.getAttribute("aid");return a||(a="l-"+e+"-"+t),this.getElementById(a)}setLabelsById(t,e,n="rm"){var l,c;const a=this.getLabelElementById(t,n);if(!a)return;const u=((l=a.children)==null?void 0:l.length)||0;for(let f=0,d=((e==null?void 0:e.length)||0)-(u-1);f<d;f++){const y=vo("text");y.setAttribute("x","0"),y.setAttribute("y",u+f+"em"),a.appendChild(y)}for(let f=1,d=(c=a.children)==null?void 0:c.length;f<d;f++)a.children[f].textContent=e&&f<=e.length?e[f-1]:""}clearAssetLabelsByType(t="rm"){var a;const e=this.getLabelElementsByType(t),n=Mt.keys(e);for(let u=0,l=n.length;u<l;u++){const c=e[n[u]];for(let f=1,d=((a=c.children)==null?void 0:a.length)||0;f<d;f++)c.children[f].textContent=""}}getUseSymbolId(t){var e;if(!(!t||t.tagName!=="use"))return(e=t.getAttribute("xlink:href"))==null?void 0:e.substring(1)}getUseSymbol(t){if(!t||t.tagName!=="use")return;const e=this.getUseSymbolId(t);if(e)return this.getElementById(e)}setElementState2selected(t,e=!1){var a;if(!t)return;if(t.tagName==="use"){const u=this._getSymbolBox(t);if(!u)return;e?(a=t.parentNode)==null||a.insertBefore(u,t):t.parentNode&&t.parentNode.contains(u)&&t.parentNode.removeChild(u);return}let n=t.getAttribute("class");n||(n=""),e?n="danger":n=Mt.replace(n,"danger","").trim(),t.setAttribute("class",n)}_getSymbolBox(t){if(!t)return;const e=t.id+"-boundingBox";let n=this.getElementById(e);if(n)return n;const a=this.getUseSymbol(t);if(!a)return;let u=this.getElementBoundingBox(t.id);if(!u||u.isEmpty())return;n=document.createElementNS("http://www.w3.org/2000/svg","rect"),n.setAttribute("id",e),n.setAttribute("class","danger"),n.setAttribute("x",u.min.x.toString()),n.setAttribute("y",u.min.y.toString());const l=new Y;return u.getSize(l),n.setAttribute("width",l.x.toString()),n.setAttribute("height",l.y.toString()),a.getAttribute("transform")&&n.setAttribute("transform",a.getAttribute("transform")||""),a.getAttribute("style")&&n.setAttribute("style",a.getAttribute("style")||""),this.elementsMap[e]=n,n}getUseElementBoundingBoxWithSymbol(t){var f;if(!t)return;const e=(f=t.getAttribute("xlink:href"))==null?void 0:f.substring(1);if(!e)return;let n=this.getElementById(e);if(!n)return;const a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.style.position="absolute",a.style.top="-9999px",a.style.left="-9999px";let u;if(Mt.lowerCase(n.tagName)==="symbol"){u=document.createElementNS("http://www.w3.org/2000/svg","g");for(let d=0,y=n.childNodes.length;d<y;d++){const A=n.childNodes[d].cloneNode(!0);u.appendChild(A)}}else u=n.cloneNode(!0);a.appendChild(u),u.setAttribute("style","stroke: #333333;"),document.body.appendChild(a);const l=a.getBBox();if(document.body.removeChild(a),!l)return;const c=new St;return c.set(new Y(l.x,l.y),new Y(l.x+l.width,l.y+l.height)),c}fontZoom(t,e=1){const n=this.getElementById(t);if(!n)return;let a=n.getAttribute("font-size");a||(a="12");const u=/(\d+)([a-zA-Z%]+)/.exec(a),l=u&&(u==null?void 0:u.length)>2?u[2]:"";let c=Math.round(parseFloat(a)*e*100)/100;n.setAttribute("font-size",c+l)}getCentroid(t,e=new Y){const n=t.getAttribute("insX"),a=t.getAttribute("insY");return n||a?e.set(Number(n||"0"),Number(a||"0")):this.getCentroidByDom(t,e)}getCentroidByDom(t,e=new Y){const n=Number(t.getAttribute("x")||"0"),a=Number(t.getAttribute("y")||"0"),u=t.getBBox();let l=1,c=1,f=t.getAttribute("transform");if(!f)return e.set(n,a);const d=/scale\(\s*([^\s,)]+)[ ,]([^\s,)]+)/.exec(f);if(typeof d>"u"||d==null){const y=t.transform.baseVal;if(f&&y.numberOfItems>0){let A=y.getItem(0);A&&A.type===SVGTransform.SVG_TRANSFORM_SCALE&&(l=A.matrix.a!==0?A.matrix.a:1,c=A.matrix.d!==0?A.matrix.d:l)}else return e.set((u.x+u.width/2)*l,(u.y+u.height/2)*c)}else l=d[1]&&Number(d[1])>0?Number(d[1]):1,c=d[2]&&Number(d[2])>0?Number(d[2]):l;return n&&a?e.set(n*l,a*c):e.set((u.x+u.width/2)*l,(u.y+u.height/2)*c),e}_lastLinked=[];linkAssetsByTree(t,e){if(t||(t=er.RM),this.clearLinkedLines(t),!e||!e.value)return;const n=this.getLinesByTree(e);this.drawLinkedLines(t,n)}clearLinkedLines(t){var a;const e=Gs(t);if(this.getElementById(e)){for(let u=((a=this._lastLinked)==null?void 0:a.length)-1;u>=0;u--){const l=this._lastLinked[u];l.parentNode&&l.parentNode.removeChild(l),this._lastLinked.splice(u,1)}this._lastLinked.length=0}}drawLinkedLines(t,e){var u;if(!(e!=null&&e.length))return;const n=Gs(t),a=this.getElementById(n);if(a)for(let l=0,c=e.length;l<c;l++){const f=e[l][0],d=e[l][((u=e[l])==null?void 0:u.length)-1],y=vo("line");y.setAttribute("x1",f.x.toString()),y.setAttribute("y1",f.y.toString()),y.setAttribute("x2",d.x.toString()),y.setAttribute("y2",d.y.toString()),y.setAttribute("class","danger"),y.setAttribute("style","stroke-width: 2;"),a.appendChild(y),this._lastLinked.push(y)}}getLinesByTree(t,e=[]){var u;if(!(t!=null&&t.value))return e;const n=this.getElementBoundingBox(t.value);if(!n)return e;const a=n.getCenter();return(u=t.children)==null||u.forEach(l=>{var d;const c=this.getElementBoundingBox(l==null?void 0:l.value);if(!c)return;const f=c.getCenter();e.push([a,f]),(d=l.children)!=null&&d.length&&this.getLinesByTree(l,e)}),e}}const mi=new Y,Xa=new re;class n2{name="SvgPainter";params;chef;constructor(t={},e){this.params=t,this.chef=e}drawSocialDistanceCircles(t,e="http://www.w3.org/2000/svg"){var C,F,N;if(!t)return;const n=jg(t),a=cc(t),u=2*n,l=(F=(C=this.params.socialDistance)==null?void 0:C.colors)!=null&&F.length?(N=this.params.socialDistance)==null?void 0:N.colors:[he.green,he.red],c=this.getRadius(a),f=t.querySelector(`#${Ga}`),d=f==null?void 0:f.querySelectorAll("path");if(!f||!(d!=null&&d.length))return;let y,A;const _=new Array;for(let M=0,R=(d==null?void 0:d.length)||0;M<R;M++){if(y=d[M],A=y.getAttribute("id"),!A)continue;const q=this.chef.getElementBoundingBox(A);if(!q)continue;const z=new Y;q.getCenter(z),_.push({id:A,cp:z})}for(let M=0,R=_.length;M<R;M++){_[M].color=l[0];for(let q=0,z=R;q<z;q++)_[M]!==_[q]&&Y.getDistance(_[M].cp,_[q].cp)<c*2&&(_[M].color=l[1])}for(let M=0,R=_.length;M<R;M++){let q=this.createCircle(_[M],c,u,e);f.appendChild(q)}}clearSocialDistanceCircles(t){if(!t)return;const e=t.querySelector(`#${Ga}`),n=e==null?void 0:e.querySelectorAll("circle");if(!(!e||!(n!=null&&n.length)))for(let a=0,u=(n==null?void 0:n.length)||0;a<u;a++){const l=n[a].getAttribute("id");l&&(l==null?void 0:l.indexOf("_circle"))>-1&&e.removeChild(n[a])}}getRadius(t){var n,a,u;let e=((a=(n=this.params)==null?void 0:n.socialDistance)==null?void 0:a.radius)||3;return((u=this.params)==null?void 0:u.displayUnits)==="imperial"?t==="Metres"||t==="m"?e/=3.28084:t==="cm"?e=e/3.28084*100:t==="mm"?e=e/3.28084*1e3:(t==="INCH"||t==="inches")&&(e*=12):t==="INCH"||t==="inches"?e=e*3.28084*12:t==="cm"?e*=100:t==="mm"&&(e*=1e3),e}createCircle(t,e,n,a){const u=document.createElementNS(a,"circle");return u.setAttributeNS(null,"id",t.id+"_circle"),u.setAttributeNS(null,"cx",t.cp.x),u.setAttributeNS(null,"cy",t.cp.y),u.setAttributeNS(null,"r",String(e)),u.setAttributeNS(null,"style",`pointer-events:none;fill-opacity:0.1;stroke:${t.color};stroke-width:${n}px;`),u}}const s2=function(r){return(r||"").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,"")};function Za(r,t){if(!r||!t)return!1;if(t.indexOf(" ")!==-1)throw new Error("className should not contain space.");return r.classList?r.classList.contains(t):(" "+r.className+" ").indexOf(" "+t+" ")>-1}function Xs(r,t){if(!r)return;let e=r.className;const n=(t||"").split(" ");for(let a=0,u=n.length;a<u;a++){const l=n[a];l&&(r.classList?r.classList.add(l):Za(r,l)||(e+=" "+l))}r.classList||(r.className=e)}function Zs(r,t){if(!r||!t)return;const e=t.split(" ");let n=" "+r.className+" ";for(let a=0,u=e.length;a<u;a++){const l=e[a];l&&(r.classList?r.classList.remove(l):Za(r,l)&&(n=n.replace(" "+l+" "," ")))}r.classList||(r.className=s2(n))}class Yc extends o0{isSvgScene=!0;name="SvgScene";dynamically=!0;params;socialDistanceEnable=!1;container;svg;svgStr="";svgRoot;viewBox=new St;chef;defaultLayers=[];skeletonLayers=[];currentLayers=[];assetType;assetsMap={};legend=[];selectedList=[];painter;_lastHighlightType="";_lastHighlightIds=[];clickSvgElementHandler=this.handleClickSvgElement.bind(this);constructor(t={}){super(),this.params=t,this.assetType=t.assetType||er.RM,this.params.socialDistanceEnable&&(this.socialDistanceEnable=!0),this.container=this.params.containerId?document.getElementById(this.params.containerId):Zt.window.document.getElementsByTagName("body")[0],this.chef=new i2,this.painter=new n2(t,this.chef)}get isMounted(){var t;return((t=this.container.querySelectorAll("svg"))==null?void 0:t.length)>0}destroy(){var t;super.destroy(),this.unmount(),(t=this.camera)==null||t.destroy()}mount(){this.svg&&(this.container.contains(this.svg)||this.container.appendChild(this.svg),this.chef.computeBoundingBoxMap())}unmount(){this.svg&&this.svg.parentNode&&this.container.contains(this.svg)&&this.container.removeChild(this.svg)}computeBoundingBox(){return this.boundingBox.makeEmpty(),!this.chef||!this.svg?this.boundingBox:(this.chef.computeBoundingBoxMap(),this.boundingBox.copy(this.chef.boundingBox),console.warn("svgScene.computeBoundingBox: ",this.chef.boundingBox.toString()),this.boundingBox)}async load(t){return new Ac().loadAsync(t)}bind(t){if(this.svgStr=t,this.svg=new DOMParser().parseFromString(t,"image/svg+xml").documentElement,console.warn("bind: ",this.name),!this.svg)throw new Error("svg load failed");let e=this.svg.getAttribute("viewBox");e&&(Kg(e,this.viewBox),this.chef.bindSvg(this.svg),this.svgRoot=fc(this.svg),this.svg.setAttribute("viewBox",`0 0 ${this.params.width} ${this.params.height}`),this.svg.setAttribute("style","transform: translateZ(0);"),this.appendStyles(),console.log(this.name,"viewBox -> ",e,this.viewBox.toString()),this.setAssetsMap(this.assetType,this.assetsMap))}appendStyles(){var e;let t=(e=this.svg)==null?void 0:e.querySelector("style");t&&(t.appendChild(document.createTextNode(`.default { stroke: ${this.params.defaultStroke}; fill: ${this.params.defaultFill}; }`)),t.appendChild(document.createTextNode(`.info { stroke: ${this.params.infoStroke}; fill: ${this.params.infoFill}; }`)),t.appendChild(document.createTextNode(`.primary { stroke: ${this.params.primaryStroke}; fill: ${this.params.primaryFill}; }`)),t.appendChild(document.createTextNode(`.success { stroke: ${this.params.successStroke}; fill: ${this.params.successFill}; }`)),t.appendChild(document.createTextNode(`.warning { stroke: ${this.params.warningStroke}; fill: ${this.params.warningFill}; }`)),t.appendChild(document.createTextNode(`.danger { stroke: ${this.params.dangerStroke}; fill: ${this.params.dangerFill}; }`)),t.appendChild(document.createTextNode(`.active { stroke: ${this.params.activeStroke}; fill: ${this.params.activeFill}; }`)))}getLayers(t=2){return this.svg?this.chef.getLayers(t):[]}setDefaultLayers(t){t!=null&&t.length&&(this.defaultLayers=t)}setSkeletonLayers(t){t!=null&&t.length&&(this.skeletonLayers=t)}setCurrentLayers(t){t!=null&&t.length&&(this.currentLayers=t)}showDefaultLayers(t,e=!1){this.setDefaultLayers(t),this.chef.updateLayersVisibility(t,e)}updateLayersVisibility(t,e=!1){this.chef.updateLayersVisibility(t,e)}setAssetType(t,e){this.assetsMap={},this.assetType=t,this.setAssetsMap(this.assetType,this.assetsMap),e||(e=[Gs(t)],t!==er.RM&&e.unshift(Gs(er.RM))),this.setDefaultLayers(e),this.updateLayersVisibility(this.defaultLayers,!0)}isBelongsToAssetType(t,e){e||(e=this.assetType);const n=this.getAssetsByType(e);return n==null?void 0:n.hasOwnProperty(t)}setAssetsMap(t,e={}){const n=this.chef.getElementById(Gs(t));if(!n)return e;e[t]=this.chef.getElementsMap(n);const a=Ya(t),u=this.chef.getElementById(a);if(!u)return e;const l=this.chef.getElementsMap(u),c=Mt.keys(l);if(!(c!=null&&c.length))return e;if(Mt.startsWith(c[0],`l-${t}-`)){const f=`l-${t}-`.length;for(let d=0,y=c.length;d<y;d++){const A=c[d].slice(f);l[A]=l[c[d]],delete l[c[d]]}}return e[a]=l,e}getAssetsByType(t){return this.assetsMap.hasOwnProperty(t)||this.setAssetsMap(t,this.assetsMap),this.assetsMap[t]}getElementById(t){if(!t)return;const e=this.getAssetsByType(this.assetType);if(!(!e||!Object.hasOwnProperty.call(e,t)))return e[t]}getAssetIdsByType(t){const e=this.getAssetsByType(t),n=[];return e?Mt.keys(e):n}clearFillOrStroke(t="fill"){const e=this.getAssetsByType(this.assetType),n=Mt.keys(e);let a;for(let u=0,l=n.length;u<l;u++)a=e[n[u]],!(!a||!a.hasAttribute(t))&&(a.removeAttribute(t),t==="stroke"&&a.removeAttribute("stroke-width"));this.clearLegendBy(t)}clearFillOrStrokeByIds(t,e="fill"){const n=this.getAssetsByType(this.assetType),a=Mt.keys(n);let u;for(let l=0,c=a.length;l<c;l++)t!=null&&t.length&&!t.includes(a[l])||(u=n[a[l]],!(!u||!u.hasAttribute(e))&&(u.removeAttribute(e),e==="stroke"&&u.removeAttribute("stroke-width")));this.clearLegendBy(e)}setFillOrStrokeByIds(t,e,n="fill"){const a=this.getAssetsByType(this.assetType),u=Mt.keys(a);let l;for(let c=0,f=u.length;c<f;c++)t.includes(u[c])&&(l=a[u[c]],l&&(l.setAttribute(n,e),n==="stroke"&&l.setAttribute("stroke-width","7"),this.addLegend(n,e,u[c])))}addLegend(t,e,n){let a=this.legend.find(u=>u.color===e);a||(a={type:t,color:e,ids:[]},this.legend.push(a)),a.ids.push(n)}clearLegendBy(t){var e;t||(this.legend.length=0);for(let n=((e=this.legend)==null?void 0:e.length)-1;n>=0;n--)this.legend[n].type===t&&this.legend.splice(n,n)}getLegend(){return this.legend}showSkeleton(){var t;(t=this.skeletonLayers)!=null&&t.length&&(this.chef.updateLayersVisibility(this.defaultLayers,!1),this.chef.updateLayersVisibility(this.skeletonLayers,!0))}hideSkeleton(){var t;(t=this.skeletonLayers)!=null&&t.length&&(this.chef.updateLayersVisibility(this.skeletonLayers,!1),this.chef.updateLayersVisibility(this.defaultLayers,!0))}setAssetLabels(t,e){this.chef.setLabelsById(t,e,this.assetType)}getAssetLabelsMap(t){var a,u;if(!t)return;const e=Ya(t);let n=this.getAssetsByType(e);if(!n||!((a=Object.keys(n))!=null&&a.length)){let l=this.chef.getElementById(e);if(l||(l=this.chef.getElementById(t+"-txt-label")),!l)return;n=this.chef.getElementsMap(l),this.assetsMap[e]=n}if(!(!n||!((u=Object.keys(n))!=null&&u.length)))return n}getAssetLabelById(t,e){var l,c;const n=this.getAssetLabelsMap(t);if(!n)return;let a=n[e];if(a&&((l=a==null?void 0:a.childNodes)!=null&&l.length))return a.childNodes[0].textContent||"";const u="l-"+t+"-"+e;if(a=n[u],a&&((c=a==null?void 0:a.children)!=null&&c.length))return a.children[0].textContent||""}clearAssetLabels(){this.chef.clearAssetLabelsByType(this.assetType)}bindAssetsEvents(t){var a;const e=(a=this.svg)==null?void 0:a.querySelector("#"+t);if(!e)return;e.querySelectorAll("[id]").forEach(u=>{u instanceof SVGElement&&u.addEventListener("click",this.clickSvgElementHandler)})}handleClickSvgElement(t){var e;typeof t.preventDefault=="function"&&t.preventDefault(),console.warn("svgScene.handleClickSvgElement: ",(e=t==null?void 0:t.target)==null?void 0:e.id,t==null?void 0:t.target),this.dispatchEvent({type:"click",data:t})}socialDistanceEnableChanged(t){this.socialDistanceEnable=!!t,t?this.painter.drawSocialDistanceCircles(this.svg):this.painter.clearSocialDistanceCircles(this.svg)}highlightAssets(t,e){var a;this.resetHighlightAssets(t);const n=this.getAssetsByType(t);!n||!((a=Object.keys(n))!=null&&a.length)||(this._lastHighlightType=t,this._lastHighlightIds=Array.isArray(e)?e:[e],this._lastHighlightIds.forEach(u=>{u&&n[u]&&Xs(n[u],"active")}))}resetHighlightAssets(t){var n;const e=this.getAssetsByType(t||this._lastHighlightType);!e||!((n=Object.keys(e))!=null&&n.length)||(this._lastHighlightIds.forEach(a=>{a&&e[a]&&Zs(e[a],"active")}),this._lastHighlightIds.length=0)}getIntersectObjects(t,e=er.RM,n=[]){n.length=0;const a=[],u=this.getAssetsByType(e),l=Mt.keys(u);for(let f=0,d=l.length;f<d;f++){const y=this.chef.getElementBoundingBox(u[l[f]].id);y&&y.containsPoint(t.worldCoords)&&a.push(u[l[f]])}const c=Mt.sortBy(a,f=>{var d;return(d=this.chef.getElementBoundingBox(f.id))==null?void 0:d.getArea()});return n.push(...c),n}clearSelected(){var t,e;if((t=this.selectedList)!=null&&t.length)for(let n=((e=this.selectedList)==null?void 0:e.length)-1;n>=0;n--){let a=this.selectedList[n];this.selectedList.splice(n,1),this.chef.setElementState2selected(a,!1)}}clearSelectedById(t){var n,a;let e=(n=this.selectedList)==null?void 0:n.findIndex(u=>u.getAttribute("id")===t);e>-1&&(this.chef.setElementState2selected(this.selectedList[e],!1),(a=this.selectedList)==null||a.splice(e,1))}selectByIds(t,e=!1){Array.isArray(t)||(t=[t]),e||this.clearSelected();const n=Mt.uniq(Mt.map(this.selectedList,u=>u.getAttribute("id")||"")),a=this.getAssetsByType(this.assetType);for(let u=t.length-1;u>=0;u--)n.includes(t[u])?(this.clearSelectedById(t[u]),t.splice(u,1)):Object.hasOwnProperty.call(a,t[u])&&this.selectedList.push(a[t[u]]);this.selectedList.forEach(u=>{this.chef.setElementState2selected(u,!0)})}getSelectedIds(){var e;if(!((e=this.selectedList)!=null&&e.length))return;const t=[];for(let n=0,a=this.selectedList.length;n<a;n++)this.selectedList[n].id&&t.push(this.selectedList[n].id);return t}getSelectedBoundingBox(){var e;const t=new St;return(e=this.selectedList)!=null&&e.length?(this.selectedList.forEach(n=>{const a=this.chef.boundingBoxMap[n.id];a&&t.expandByBox(a)}),t):t.copy(this.boundingBox)}getElementsByBox(t){const e=[],n=Object.keys(this.chef.boundingBoxMap),a=this.getAssetsByType(this.assetType);for(let u=0,l=n.length;u<l;u++)if(a.hasOwnProperty(n[u])&&!(n[u].indexOf("-assets")>-1)&&t.intersectsBox(this.chef.boundingBoxMap[n[u]])){const c=a[n[u]];c&&e.push(c)}return e}getBoundingBoxById(t){if(this.chef.boundingBoxMap.hasOwnProperty(t))return new St().copy(this.chef.boundingBoxMap[t])}_lastLinkedIds=[];linkAssetsByTree(t){this.chef.linkAssetsByTree(this.assetType,t);const e=this.chef.getElementById(Vs.ASSET_LABELS);e&&(e.style.display="block");const n=Ya(this.assetType),a=this.chef.getElementById(n);a&&(a.style.display="block");const u=this.assetsMap[n];u&&(this._lastLinkedIds.forEach(l=>{u[l]&&(u[l].style.display="none")}),this._lastLinkedIds=hc(t),this._lastLinkedIds.forEach(l=>{u[l]&&(u[l].style.display="block")}))}onBeforeRender(){}fullscreen(t=1e3,e=!1){}update(){}}class a2 extends Yc{name="SvgLoadingScene";constructor(t){super(t),this.bind(`<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100">
31
+ }`;var xt=cg(function(){return Mt(v,nt+"return "+$).apply(e,A)});if(xt.source=$,yh(xt))throw xt;return xt}function Gw(n){return It(n).toLowerCase()}function Yw(n){return It(n).toUpperCase()}function Xw(n,s,o){if(n=It(n),n&&(o||s===e))return Ep(n);if(!n||!(s=hr(s)))return n;var h=Gr(n),p=Gr(s),v=Ap(h,p),A=wp(h,p)+1;return yn(h,v,A).join("")}function Zw(n,s,o){if(n=It(n),n&&(o||s===e))return n.slice(0,Tp(n)+1);if(!n||!(s=hr(s)))return n;var h=Gr(n),p=wp(h,Gr(s))+1;return yn(h,0,p).join("")}function Qw(n,s,o){if(n=It(n),n&&(o||s===e))return n.replace(xa,"");if(!n||!(s=hr(s)))return n;var h=Gr(n),p=Ap(h,Gr(s));return yn(h,p).join("")}function Kw(n,s){var o=rt,h=J;if(Qt(s)){var p="separator"in s?s.separator:p;o="length"in s?gt(s.length):o,h="omission"in s?hr(s.omission):h}n=It(n);var v=n.length;if(Ts(n)){var A=Gr(n);v=A.length}if(o>=v)return n;var _=o-_s(h);if(_<1)return h;var S=A?yn(A,0,_).join(""):n.slice(0,_);if(p===e)return S+h;if(A&&(_+=S.length-_),mh(p)){if(n.slice(_).search(p)){var V,z=S;for(p.global||(p=Il(p.source,It(Aa.exec(p))+"g")),p.lastIndex=0;V=p.exec(z);)var $=V.index;S=S.slice(0,$===e?_:$)}}else if(n.indexOf(hr(p),_)!=_){var Q=S.lastIndexOf(p);Q>-1&&(S=S.slice(0,Q))}return S+h}function jw(n){return n=It(n),n&&ar.test(n)?n.replace(Ar,Dv):n}var Jw=Bs(function(n,s,o){return n+(o?" ":"")+s.toUpperCase()}),Eh=fd("toUpperCase");function hg(n,s,o){return n=It(n),s=o?e:s,s===e?wv(n)?Nv(n):pv(n):n.match(s)||[]}var cg=Et(function(n,s){try{return or(n,e,s)}catch(o){return yh(o)?o:new pt(o)}}),tb=Pi(function(n,s){return _r(s,function(o){o=fi(o),Ri(n,o,dh(n[o],n))}),n});function eb(n){var s=n==null?0:n.length,o=ut();return n=s?Gt(n,function(h){if(typeof h[1]!="function")throw new Cr(l);return[o(h[0]),h[1]]}):[],Et(function(h){for(var p=-1;++p<s;){var v=n[p];if(or(v[0],this,h))return or(v[1],this,h)}})}function rb(n){return D1(Sr(n,E))}function Ah(n){return function(){return n}}function ib(n,s){return n==null||n!==n?s:n}var nb=dd(),sb=dd(!0);function Je(n){return n}function wh(n){return zp(typeof n=="function"?n:Sr(n,E))}function ab(n){return Gp(Sr(n,E))}function ub(n,s){return Yp(n,Sr(s,E))}var ob=Et(function(n,s){return function(o){return Ra(o,n,s)}}),lb=Et(function(n,s){return function(o){return Ra(n,o,s)}});function bh(n,s,o){var h=Ee(s),p=zu(s,h);o==null&&!(Qt(s)&&(p.length||!h.length))&&(o=s,s=n,n=this,p=zu(s,Ee(s)));var v=!(Qt(o)&&"chain"in o)||!!o.chain,A=Ui(n);return _r(p,function(_){var S=s[_];n[_]=S,A&&(n.prototype[_]=function(){var V=this.__chain__;if(v||V){var z=n(this.__wrapped__),$=z.__actions__=Qe(this.__actions__);return $.push({func:S,args:arguments,thisArg:n}),z.__chain__=V,z}return S.apply(n,hn([this.value()],arguments))})}),n}function hb(){return be._===this&&(be._=Pv),this}function Th(){}function cb(n){return n=gt(n),Et(function(s){return Xp(s,n)})}var fb=eh(Gt),pb=eh(gp),db=eh(Cl);function fg(n){return oh(n)?Dl(fi(n)):z1(n)}function gb(n){return function(s){return n==null?e:Vn(n,s)}}var yb=yd(),mb=yd(!0);function _h(){return[]}function Ch(){return!1}function vb(){return{}}function xb(){return""}function Eb(){return!0}function Ab(n,s){if(n=gt(n),n<1||n>Bt)return[];var o=ae,h=Be(n,ae);s=ut(s),n-=ae;for(var p=Nl(h,s);++o<n;)s(o);return p}function wb(n){return dt(n)?Gt(n,fi):cr(n)?[n]:Qe(Bd(It(n)))}function bb(n){var s=++Rv;return It(n)+s}var Tb=Qu(function(n,s){return n+s},0),_b=rh("ceil"),Cb=Qu(function(n,s){return n/s},1),Db=rh("floor");function Sb(n){return n&&n.length?Vu(n,Je,ql):e}function Ob(n,s){return n&&n.length?Vu(n,ut(s,2),ql):e}function Nb(n){return vp(n,Je)}function Mb(n,s){return vp(n,ut(s,2))}function Bb(n){return n&&n.length?Vu(n,Je,$l):e}function Ib(n,s){return n&&n.length?Vu(n,ut(s,2),$l):e}var Rb=Qu(function(n,s){return n*s},1),Lb=rh("round"),Pb=Qu(function(n,s){return n-s},0);function Fb(n){return n&&n.length?Ol(n,Je):0}function Ub(n,s){return n&&n.length?Ol(n,ut(s,2)):0}return m.after=aA,m.ary=Vd,m.assign=YA,m.assignIn=ig,m.assignInWith=lo,m.assignWith=XA,m.at=ZA,m.before=zd,m.bind=dh,m.bindAll=tb,m.bindKey=$d,m.castArray=vA,m.chain=Hd,m.chunk=Dx,m.compact=Sx,m.concat=Ox,m.cond=eb,m.conforms=rb,m.constant=Ah,m.countBy=FE,m.create=QA,m.curry=Gd,m.curryRight=Yd,m.debounce=Xd,m.defaults=KA,m.defaultsDeep=jA,m.defer=uA,m.delay=oA,m.difference=Nx,m.differenceBy=Mx,m.differenceWith=Bx,m.drop=Ix,m.dropRight=Rx,m.dropRightWhile=Lx,m.dropWhile=Px,m.fill=Fx,m.filter=kE,m.flatMap=WE,m.flatMapDeep=VE,m.flatMapDepth=zE,m.flatten=Pd,m.flattenDeep=Ux,m.flattenDepth=kx,m.flip=lA,m.flow=nb,m.flowRight=sb,m.fromPairs=Hx,m.functions=sw,m.functionsIn=aw,m.groupBy=$E,m.initial=Wx,m.intersection=Vx,m.intersectionBy=zx,m.intersectionWith=$x,m.invert=ow,m.invertBy=lw,m.invokeMap=YE,m.iteratee=wh,m.keyBy=XE,m.keys=Ee,m.keysIn=je,m.map=io,m.mapKeys=cw,m.mapValues=fw,m.matches=ab,m.matchesProperty=ub,m.memoize=so,m.merge=pw,m.mergeWith=ng,m.method=ob,m.methodOf=lb,m.mixin=bh,m.negate=ao,m.nthArg=cb,m.omit=dw,m.omitBy=gw,m.once=hA,m.orderBy=ZE,m.over=fb,m.overArgs=cA,m.overEvery=pb,m.overSome=db,m.partial=gh,m.partialRight=Zd,m.partition=QE,m.pick=yw,m.pickBy=sg,m.property=fg,m.propertyOf=gb,m.pull=Zx,m.pullAll=Ud,m.pullAllBy=Qx,m.pullAllWith=Kx,m.pullAt=jx,m.range=yb,m.rangeRight=mb,m.rearg=fA,m.reject=JE,m.remove=Jx,m.rest=pA,m.reverse=fh,m.sampleSize=eA,m.set=vw,m.setWith=xw,m.shuffle=rA,m.slice=tE,m.sortBy=sA,m.sortedUniq=uE,m.sortedUniqBy=oE,m.split=Ww,m.spread=dA,m.tail=lE,m.take=hE,m.takeRight=cE,m.takeRightWhile=fE,m.takeWhile=pE,m.tap=SE,m.throttle=gA,m.thru=ro,m.toArray=tg,m.toPairs=ag,m.toPairsIn=ug,m.toPath=wb,m.toPlainObject=rg,m.transform=Ew,m.unary=yA,m.union=dE,m.unionBy=gE,m.unionWith=yE,m.uniq=mE,m.uniqBy=vE,m.uniqWith=xE,m.unset=Aw,m.unzip=ph,m.unzipWith=kd,m.update=ww,m.updateWith=bw,m.values=Ls,m.valuesIn=Tw,m.without=EE,m.words=hg,m.wrap=mA,m.xor=AE,m.xorBy=wE,m.xorWith=bE,m.zip=TE,m.zipObject=_E,m.zipObjectDeep=CE,m.zipWith=DE,m.entries=ag,m.entriesIn=ug,m.extend=ig,m.extendWith=lo,bh(m,m),m.add=Tb,m.attempt=cg,m.camelCase=Sw,m.capitalize=og,m.ceil=_b,m.clamp=_w,m.clone=xA,m.cloneDeep=AA,m.cloneDeepWith=wA,m.cloneWith=EA,m.conformsTo=bA,m.deburr=lg,m.defaultTo=ib,m.divide=Cb,m.endsWith=Ow,m.eq=Xr,m.escape=Nw,m.escapeRegExp=Mw,m.every=UE,m.find=HE,m.findIndex=Rd,m.findKey=JA,m.findLast=qE,m.findLastIndex=Ld,m.findLastKey=tw,m.floor=Db,m.forEach=qd,m.forEachRight=Wd,m.forIn=ew,m.forInRight=rw,m.forOwn=iw,m.forOwnRight=nw,m.get=vh,m.gt=TA,m.gte=_A,m.has=uw,m.hasIn=xh,m.head=Fd,m.identity=Je,m.includes=GE,m.indexOf=qx,m.inRange=Cw,m.invoke=hw,m.isArguments=Gn,m.isArray=dt,m.isArrayBuffer=CA,m.isArrayLike=Ke,m.isArrayLikeObject=ee,m.isBoolean=DA,m.isBuffer=mn,m.isDate=SA,m.isElement=OA,m.isEmpty=NA,m.isEqual=MA,m.isEqualWith=BA,m.isError=yh,m.isFinite=IA,m.isFunction=Ui,m.isInteger=Qd,m.isLength=uo,m.isMap=Kd,m.isMatch=RA,m.isMatchWith=LA,m.isNaN=PA,m.isNative=FA,m.isNil=kA,m.isNull=UA,m.isNumber=jd,m.isObject=Qt,m.isObjectLike=jt,m.isPlainObject=Ha,m.isRegExp=mh,m.isSafeInteger=HA,m.isSet=Jd,m.isString=oo,m.isSymbol=cr,m.isTypedArray=Rs,m.isUndefined=qA,m.isWeakMap=WA,m.isWeakSet=VA,m.join=Gx,m.kebabCase=Bw,m.last=Nr,m.lastIndexOf=Yx,m.lowerCase=Iw,m.lowerFirst=Rw,m.lt=zA,m.lte=$A,m.max=Sb,m.maxBy=Ob,m.mean=Nb,m.meanBy=Mb,m.min=Bb,m.minBy=Ib,m.stubArray=_h,m.stubFalse=Ch,m.stubObject=vb,m.stubString=xb,m.stubTrue=Eb,m.multiply=Rb,m.nth=Xx,m.noConflict=hb,m.noop=Th,m.now=no,m.pad=Lw,m.padEnd=Pw,m.padStart=Fw,m.parseInt=Uw,m.random=Dw,m.reduce=KE,m.reduceRight=jE,m.repeat=kw,m.replace=Hw,m.result=mw,m.round=Lb,m.runInContext=D,m.sample=tA,m.size=iA,m.snakeCase=qw,m.some=nA,m.sortedIndex=eE,m.sortedIndexBy=rE,m.sortedIndexOf=iE,m.sortedLastIndex=nE,m.sortedLastIndexBy=sE,m.sortedLastIndexOf=aE,m.startCase=Vw,m.startsWith=zw,m.subtract=Pb,m.sum=Fb,m.sumBy=Ub,m.template=$w,m.times=Ab,m.toFinite=ki,m.toInteger=gt,m.toLength=eg,m.toLower=Gw,m.toNumber=Mr,m.toSafeInteger=GA,m.toString=It,m.toUpper=Yw,m.trim=Xw,m.trimEnd=Zw,m.trimStart=Qw,m.truncate=Kw,m.unescape=jw,m.uniqueId=bb,m.upperCase=Jw,m.upperFirst=Eh,m.each=qd,m.eachRight=Wd,m.first=Fd,bh(m,function(){var n={};return hi(m,function(s,o){Lt.call(m.prototype,o)||(n[o]=s)}),n}(),{chain:!1}),m.VERSION=i,_r(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){m[n].placeholder=m}),_r(["drop","take"],function(n,s){wt.prototype[n]=function(o){o=o===e?1:de(gt(o),0);var h=this.__filtered__&&!s?new wt(this):this.clone();return h.__filtered__?h.__takeCount__=Be(o,h.__takeCount__):h.__views__.push({size:Be(o,ae),type:n+(h.__dir__<0?"Right":"")}),h},wt.prototype[n+"Right"]=function(o){return this.reverse()[n](o).reverse()}}),_r(["filter","map","takeWhile"],function(n,s){var o=s+1,h=o==ct||o==O;wt.prototype[n]=function(p){var v=this.clone();return v.__iteratees__.push({iteratee:ut(p,3),type:o}),v.__filtered__=v.__filtered__||h,v}}),_r(["head","last"],function(n,s){var o="take"+(s?"Right":"");wt.prototype[n]=function(){return this[o](1).value()[0]}}),_r(["initial","tail"],function(n,s){var o="drop"+(s?"":"Right");wt.prototype[n]=function(){return this.__filtered__?new wt(this):this[o](1)}}),wt.prototype.compact=function(){return this.filter(Je)},wt.prototype.find=function(n){return this.filter(n).head()},wt.prototype.findLast=function(n){return this.reverse().find(n)},wt.prototype.invokeMap=Et(function(n,s){return typeof n=="function"?new wt(this):this.map(function(o){return Ra(o,n,s)})}),wt.prototype.reject=function(n){return this.filter(ao(ut(n)))},wt.prototype.slice=function(n,s){n=gt(n);var o=this;return o.__filtered__&&(n>0||s<0)?new wt(o):(n<0?o=o.takeRight(-n):n&&(o=o.drop(n)),s!==e&&(s=gt(s),o=s<0?o.dropRight(-s):o.take(s-n)),o)},wt.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},wt.prototype.toArray=function(){return this.take(ae)},hi(wt.prototype,function(n,s){var o=/^(?:filter|find|map|reject)|While$/.test(s),h=/^(?:head|last)$/.test(s),p=m[h?"take"+(s=="last"?"Right":""):s],v=h||/^find/.test(s);p&&(m.prototype[s]=function(){var A=this.__wrapped__,_=h?[1]:arguments,S=A instanceof wt,V=_[0],z=S||dt(A),$=function(At){var Tt=p.apply(m,hn([At],_));return h&&Q?Tt[0]:Tt};z&&o&&typeof V=="function"&&V.length!=1&&(S=z=!1);var Q=this.__chain__,nt=!!this.__actions__.length,ot=v&&!Q,xt=S&&!nt;if(!v&&z){A=xt?A:new wt(this);var lt=n.apply(A,_);return lt.__actions__.push({func:ro,args:[$],thisArg:e}),new Dr(lt,Q)}return ot&&xt?n.apply(this,_):(lt=this.thru($),ot?h?lt.value()[0]:lt.value():lt)})}),_r(["pop","push","shift","sort","splice","unshift"],function(n){var s=Su[n],o=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",h=/^(?:pop|shift)$/.test(n);m.prototype[n]=function(){var p=arguments;if(h&&!this.__chain__){var v=this.value();return s.apply(dt(v)?v:[],p)}return this[o](function(A){return s.apply(dt(A)?A:[],p)})}}),hi(wt.prototype,function(n,s){var o=m[s];if(o){var h=o.name+"";Lt.call(Os,h)||(Os[h]=[]),Os[h].push({name:s,func:o})}}),Os[Zu(e,R).name]=[{name:"wrapper",func:e}],wt.prototype.clone=jv,wt.prototype.reverse=Jv,wt.prototype.value=t1,m.prototype.at=OE,m.prototype.chain=NE,m.prototype.commit=ME,m.prototype.next=BE,m.prototype.plant=RE,m.prototype.reverse=LE,m.prototype.toJSON=m.prototype.valueOf=m.prototype.value=PE,m.prototype.first=m.prototype.head,Da&&(m.prototype[Da]=IE),m},Cs=Mv();Un?((Un.exports=Cs)._=Cs,wl._=Cs):be._=Cs}).call(Fs)}(ja,ja.exports);var r0=ja.exports;const St=Oh(r0);class Ot{isBox2=!0;min;max;constructor(t=new F(1/0,1/0),e=new F(-1/0,-1/0)){this.min=t,this.max=e}applyMatrix3(t){return this.isEmpty()?this:(Zs[0].set(this.min.x,this.min.y).applyMatrix3(t),Zs[1].set(this.min.x,this.max.y).applyMatrix3(t),Zs[3].set(this.max.x,this.max.y).applyMatrix3(t),Zs[2].set(this.max.x,this.min.y).applyMatrix3(t),this.setFromPoints(Zs),this)}clone(){return new Ot().copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}containsPoint(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y)}containsBox(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}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}ceil(){return this.min.ceilToZero(),this.max.ceilToZero(),this}distanceToPoint(t){return Rr.copy(t).clamp(this.min,this.max).sub(t).length()}expandByXY(t,e){return this.min.minXY(t,e),this.max.maxXY(t,e),this}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByPoints(t){if(!t||!t.length)return this;for(let e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}expandByObject(t){return t.updateWorldMatrix(!1,!1),t.geometry.boundingBox!==void 0?((!t.geometry.boundingBox||t.geometry.boundingBox.isEmpty())&&t.computeBoundingBox(),ns.copy(t.geometry.boundingBox),ns.applyMatrix3(t.matrixWorld),this.union(ns)):t.geometry.points&&t.geometry.points.length&&(ns.setFromPoints(t.geometry.points),ns.applyMatrix3(t.matrixWorld),this.union(ns)),this}expandByBox(t){this.expandByPoint(t.min),this.expandByPoint(t.max)}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}floor(){return this.min.floorToZero(),this.max.floorToZero(),this}getCenter(t=new F){return this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t=new F){return this.isEmpty()?t.set(0,0):t.subVectors(this.max,this.min)}getPoints(t=[]){return t.length=0,t[0]={x:this.min.x,y:this.min.y},t[1]={x:this.min.x,y:this.max.y},t[2]={x:this.max.x,y:this.max.y},t[3]={x:this.max.x,y:this.min.y},t}getArea(){return this.getSize(Rr),Rr.x*Rr.y}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}intersectsBox(t){return t?!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y):!1}intersectsObject(t){return!t||!t.geometry?!1:this.intersectsBox(t.geometry.boundingBox)}intersect(t){return this.min.max(t.min),this.max.min(t.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}round(){return this.min.roundToZero(),this.max.roundToZero(),this}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){this.makeEmpty();for(let e=0,i=t.length;e<i;e+=3)this.expandByPoint(Rr.fromArray(t,e));return this}setFromPoints(t){this.makeEmpty();for(let e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this}setFromCenterAndSize(t,e){const i=Rr.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(i),this.max.copy(t).add(i),this}setFromProjectionMatrix(t){return this.min.set(t.elements[6],t.elements[7]),this.max.set(t.elements[6],t.elements[7]),this}setFromObject(t){return this.makeEmpty(),this.expandByObject(t)}setFromMinMaxString(t,e=" "){if(this.makeEmpty(),!(t!=null&&t.length))return this;let i=t.split(e),a=St.map(i,u=>parseFloat(u));for(let u=0,l=a.length;u<l;u+=2)this.expandByPoint(Rr.fromArray(a,u));return this}translate(t){return this.min.add(t),this.max.add(t),this}toString(){return`{"min":${this.min.toString()},"max":${this.max.toString()}}`}fromString(t){return t?(this.copy(JSON.parse(t)),this):this}union(t){return t.validate()?(this.min.min(t.min),this.max.max(t.max),this):this}validate(){return this.min.validate()&&this.max.validate()}unproject(t){return this.applyMatrix3(t.projectionMatrixInverse).applyMatrix3(t.matrixWorld)}centralArrange(t=1,e=20,i=10){const a=e+i;this.getCenter(Rr),this.getSize(xn),xn.subScalar(e);const u=Math.floor(xn.x/a),l=Math.ceil(t/u),c=u*a,f=l*a;if(xn.x<a||xn.y<a||c>=xn.x||f>=xn.y)return Rr.clone();let g=[],E=0,T=0;for(let C=0;C<t;C++){const L=u>t?t*a:c,N=Rr.x-L/2+T*a+a/2,M=Rr.y-f/2+E*a+a/2;g.push(new F(N,M)),T++,T>=u&&(T=0,E++)}return g}}const ns=new Ot,Zs=[new F,new F,new F,new F],Rr=new F,xn=new F,i0=Object.freeze(Object.defineProperty({__proto__:null,default:Ot},Symbol.toStringTag,{value:"Module"})),n0=Pt.window.requestAnimationFrame,Qs=Pt.window.performance?()=>Pt.window.performance.now():()=>new Date().getTime(),Ec=n0;class Ft{static idCounter=0;static children=[];static isRunning=!1;static actived=!1;static duration=0;static lastTime=Qs();static messages=[];static maxLetters=20;id=Ft.idCounter++;timers=new Map;timersDuration=new Map;counters=new Map;countersAmount=new Map;out=[];constructor(){}static active(t){t?Ft.actived=!0:Ft.actived=!1,Ft.duration=t||0}static add(t){this.children.push(t),this.handleStart()}static remove(t){for(let e=0,i=Ft.children.length;e<i;e++)if(Ft.children[e].id===t.id){this.children.splice(e,1);break}}static handleStart(){this.isRunning||(this.isRunning=!0,Ec(this.runLoop))}static runLoop(){Ft.children.length?(Ft.runFrames(),Ec(Ft.runLoop)):Ft.isRunning=!1}static runFrames(){let t,e=Qs();if(!(e-Ft.lastTime<Ft.duration)){Ft.lastTime=e;for(let i=0,a=this.children.length;i<a;i++)t=this.children[i],t.calculateTimers(),t.calculateCounters(),Ft.messages=Ft.messages.concat(t.out),t.out.length=0;if(Ft.messages.length){if(Ft.actived){let i=[];i.push(s0),i.push(a0),i.push(u0),this.messages.forEach(a=>i.push(p0(a,this.maxLetters))),i.push(o0),console.log(i.join(`
32
+ `))}Ft.messages.length=0}}}destroy(){Ft.remove(this)}addTimer(t,e=Qs(),i=Qs()-(this.timersDuration.get(t)||Qs())){this.addTimerDuration(t,i),this.timersDuration.set(t,e)}addTimerDuration(t,e){var i;this.timers.has(t)||this.timers.set(t,[]),(i=this.timers.get(t))==null||i.push(e)}calculateTimers(){this.timers.forEach((t,e)=>{!t||!t.length||(this.out.push(this.calculateDurations(e,t)),t.length=0)})}addCounterAmount(t,e){var i;this.counters.has(t)||this.counters.set(t,[]),(i=this.counters.get(t))==null||i.push(e)}calculateCounters(){this.counters.forEach((t,e)=>{!t||!t.length||(this.out.push(this.calculateAmounts(e,t)),t.length=0)})}start(){return this.stop(),Ft.add(this),this}stop(){return Ft.remove(this),this}calculateDurations(t,e){const i={name:t,avg:0,min:0,max:0,stdDev:0,count:0,FPS:0};if(!e||!e.length)return i;const a=e.length,{min:u,max:l,avg:c}=this.minMaxAvg(e),f=parseFloat(this.stdDev(e,c).toFixed(2));return{name:t,avg:this.fd(c),min:this.fd(u),max:this.fd(l),stdDev:f,count:a,FPS:Math.ceil(a/Ft.duration*1e3)}}calculateAmounts(t,e){const i={name:t,avg:0,min:0,max:0,stdDev:0,count:0,FPS:0};if(!e||!e.length)return i;const a=e.length,{min:u,max:l,avg:c}=this.minMaxAvg(e),f=this.stdDev(e,c);return{name:t,avg:c,min:u,max:l,stdDev:f,count:a,FPS:Math.ceil(a/Ft.duration*1e3)}}minMaxAvg(t){let e=t[0],i=t[0],a=t.length,u=0;for(let c=0;c<t.length;c++){const f=t[c];u+=f,f<e&&(e=f),f>i&&(i=f)}const l=u/a;return{min:this.fx(e),max:this.fx(i),avg:this.fx(l)}}stdDev(t,e){let i=0;for(let u=0;u<t.length;u++){const l=t[u];i+=(l-e)*(l-e)}const a=t.length;return this.fx(Math.sqrt(i/a))}fd(t){return t>1e3?(t/1e3).toFixed(1)+"s":t.toFixed(1)+"ms"}fx(t,e=1){return e===1?Math.round(t*10)/10:e===2?Math.round(t*100)/100:e===3?Math.round(t*1e3)/1e3:t}}const Ja=20,tu=["avg","min","max","stdDev","count","FPS"],jr=h0(tu,1),s0=l0(tu,Ja),a0=c0(tu,Ja),u0=f0(tu,Ja),o0=d0(Ja);function l0(r,t=20){let e="┌";e+="─".repeat(t),e+="┬";for(let i=0,a=r.length;i<a;i++)e+="─".repeat(jr),i<a-1?e+="┬":e+="┐";return e}function h0(r,t=0){let e=0;for(let i=0,a=r.length;i<a;i++)e=Math.max(e,r[i].length);return e+t}function c0(r,t=20){let e="│";e+=" ".repeat(t),e+="│";for(let i=0,a=r.length;i<a;i++)e+=" ".repeat(Math.max(jr-r[i].length-1,0)),e+=r[i],e+=" │";return e}function f0(r,t=20){let e="├";e+="─".repeat(t),e+="┼";for(let i=0,a=r.length;i<a;i++)e+="─".repeat(jr),i<a-1?e+="┴":e+="┘";return e}function p0(r,t=20){let e="│";e+=" ".repeat(Math.max(t-r.name.length,0)),e+=r.name,e+="│";const i=typeof r.avg=="string"?jr-r.avg.length:jr-r.avg.toString().length;return e+=" ".repeat(Math.max(i,0)),e+=r.avg+" ",e+=" ".repeat(Math.max(jr-r.min.toString().length,0)),e+=r.min+" ",e+=" ".repeat(Math.max(jr-r.max.toString().length,0)),e+=r.max+" ",e+=" ".repeat(Math.max(jr-r.stdDev.toString().length,0)),e+=r.stdDev+" ",e+=" ".repeat(Math.max(jr-r.count.toString().length,0)),e+=r.count+" ",e+=" ".repeat(Math.max(jr-r.FPS.toString().length,0)),e+=r.FPS,e}function d0(r=20){let t="└";for(let e=0;e<r;e++)t+="─";return t+="┘",t}var er=(r=>(r.GROS="gros",r.RM="rm",r.WS="ws",r.SU="su",r.EQ="eq",r.FN="fn",r.GL="gl",r.IP="ip",r))(er||{}),Ks=(r=>(r.BACKGROUND="background",r.ASSETS="assets",r.ANNOTATIONS="annotations",r.TEXT="text",r.ASSET_LABELS="asset-labels",r.LABELS="labels",r))(Ks||{});class dr{_listeners=new Map;destroy(){this._listeners.clear()}addEventListener(t,e){let i=this._listeners.get(t);i||(i=[],this._listeners.set(t,i)),i.includes(e)||i.push(e)}addEventListeners(t,e){const i=t.split(","),a=i.length;for(let u=0;u<a;u++)this.addEventListener(i[u].trim(),e)}isListening(t){var e;return this._listeners.has(t)&&!!((e=this._listeners.get(t))!=null&&e.length)}hasEventListener(t,e){var i;return this._listeners.size===0?!1:this._listeners.has(t)&&!!((i=this._listeners.get(t))!=null&&i.includes(e))}removeEventListener(t,e){const i=this._listeners.get(t);if(i){const a=i.indexOf(e);a>-1&&i.splice(a,1)}}dispatchEvent(t){const e=this._listeners.get(t.type);if(e){t.target=this;const i=e.slice(0);for(let a=0,u=i.length;a<u;a++)i[a].call(this,t);t.target=void 0}}dispatchEventAsync(t){const e=this._listeners.get(t.type);e&&setTimeout(()=>{for(const i of e)i.call(this,t)})}}function Oo(r,t="http://www.w3.org/2000/svg"){var e,i;return(i=(e=Pt.window)==null?void 0:e.document)==null?void 0:i.createElementNS(t,r)}async function Ac(r=2e3){return new Promise(t=>setTimeout(t,(Math.random()+.5)*r))}function wc(r,t=[]){var e,i;return!r||!r.value||(t.push(r.value),(e=r.children)!=null&&e.length&&((i=r.children)==null||i.forEach(a=>wc(a,t)))),t}function bc(r){if(!r)return"inches";let t=r.querySelector("#defaultView"),e=t==null?void 0:t.getAttribute("units");return e||"inches"}function g0(r){if(!r)return 1;let t=bc(r),e=1;switch(t){case"mm":e=500/39.3701;break;case"cm":e=50/39.3701;break;case"Metres":e=.5/39.3701;break;case"m":e=.5/39.3701;break;default:e=1}return e}function y0(r,t=new Ot){if(!r)return t;let e=r.split(" "),i=St.map(e,a=>parseFloat(a));return(i==null?void 0:i.length)!==4||(t.min.set(i[0],i[1]),t.max.set(i[0]+i[2],i[1]+i[3])),t}function m0(r=new Ot){let t="";const e=[];return e.push(r.min.x),e.push(r.min.y),e.push(Math.abs(r.max.x-r.min.x)),e.push(Math.abs(r.max.y-r.min.y)),t=e.join(" "),t}function Tc(r){var t;if((t=r==null?void 0:r.children)!=null&&t.length){for(let e=0,i=r.children.length;e<i;e++)if(r.children[e].nodeName==="g")return r.children[e]}}const v0=new Ft().start();class x0{isSvgRenderer=!0;id;params;container=Pt.window.document.getElementsByTagName("body")[0];cameraVersion=-1;viewAreaLimit=-1;constructor(t){this.id="SvgRenderer@"+Date.now(),this.params=t,Pt.config=t,this.initSvg(),Ft.active(this.params.monitorDuration)}destroy(){Ft.active(0)}initSvg(){if(this.params.containerId&&(this.container=Pt.window.document.getElementById(this.params.containerId)),this.container||(this.container=Pt.window.document.getElementsByTagName("body")[0]),!this.params.width||!this.params.height){const t=this.container.getBoundingClientRect();this.params.width=t.width,this.params.height=t.height}this.container.style.overflow="hidden",this.container.style.transform="translateZ(0)",this.setSize(this.params.width,this.params.height)}resize(){var d,g,E,T;const t=(g=(d=this.container)==null?void 0:d.parentElement)==null?void 0:g.getBoundingClientRect();if(!t)return;const e=window.getComputedStyle((E=this.container)==null?void 0:E.parentElement),i=parseFloat(e.paddingLeft),a=parseFloat(e.paddingRight),u=t.width-i-a,l=parseFloat(e.paddingTop),c=parseFloat(e.paddingBottom),f=t.height-l-c;console.log("SvgRenderer.resize: ",(T=this.container)==null?void 0:T.parentElement),console.log("SvgRenderer.resize: ",t.width,t.height,u,f),this.setSize(u,f)}setSize(t,e){this.container.style.width=t+"px",this.container.style.height=e+"px",this.params.width=t,this.params.height=e,this.params.camera||(this.params.camera={}),this.params.camera.width=this.params.width,this.params.camera.height=this.params.height,this.params.aspect=this.params.width/this.params.height,this.params.camera.aspect=this.params.aspect,this.params.camera.left=this.params.width*-.5,this.params.camera.right=this.params.width*.5,this.params.camera.top=this.params.height*.5,this.params.camera.bottom=this.params.height*-.5}getSize(t){return t.set(this.params.width,this.params.height)}clean(){}async render(t,e){var a;if(!t||!e||this.cameraVersion===(e==null?void 0:e.version))return;e.updateMatrixWorld(),Cc.set(0,0).unproject(e),Dc.set(this.params.width,this.params.height).unproject(e),_c.setFromPoints([Cc,Dc]);let i=m0(_c);(a=t.svg)==null||a.setAttribute("viewBox",i),this.cameraVersion=e.version||-1,v0.addTimer("render cycle")}autoClear;getRenderTarget(){}setRenderTarget(t){}renderTexture(t){}}const _c=new Ot,Cc=new F,Dc=new F;class ie{isMatrix3=!0;elements=[1,0,0,0,1,0,0,0,1];constructor(){}static equals(t,e,i=1e-6){if(t.elements.length!=e.elements.length)return!1;for(let a=0,u=t.elements.length;a<u;a++){const l=t.elements[a]-e.elements[a];if(Math.abs(l)>i)return!1}return!0}copy(t){const e=this.elements,i=t.elements;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this}clone(){return new ie().fromArray(this.elements)}compose(t,e,i){const a=Math.sin(e.x),u=Math.cos(e.x);return this.set(i.x*u,i.y*a*-1,t.x,i.x*a,i.y*u,t.y,0,0,1)}composeWithCenter(t,e,i,a){return Lr.identity(),eu.makeTranslation(t.x,t.y),js.makeRotation(e.x),En.makeScale(i.x,i.y),Ae.copy(a).applyMatrix3(En),Lr.multiply(No.makeTranslation(-Ae.x,-Ae.y)).multiply(eu).multiply(No.makeTranslation(Ae.x,Ae.y)).multiply(js).multiply(No.makeTranslation(-Ae.x,-Ae.y)).multiply(En),this.copy(Lr)}decompose(t,e,i){const a=Lr.copy(this).elements,u=Math.sqrt(a[0]*a[0]+a[3]*a[3]),l=Math.sqrt(a[1]*a[1]+a[4]*a[4]),c=a[0]*a[4]-a[3]*a[1];a[0]||a[3]?i.set(u,c/u):a[1]||a[4]?i.set(c/l,l):i.set(0,0);let f=0;a[0]||a[3]?f=a[3]>0?-Math.acos(a[0]/u):Math.acos(a[0]/u):a[1]||a[4]?f=Math.PI/2-(a[4]>0?Math.acos(-a[1]/l):-Math.acos(a[1]/l)):f=0,f!==0&&i.y<0&&(f*=-1),e.set(f,f),t.set(a[6],a[7])}compose2(t,e,i){return this.identity().translate(t.x,t.y).rotate(e.x).scale(i.x,i.y),this}decompose2(t,e,i){const a=this.clone();a.scale(-1,1);const u=a.elements[0],l=a.elements[1],c=a.elements[3],f=a.elements[4];let d=0,g=0,E=0;if(u!==0||c!==0){const T=Math.hypot(u,c);d=T,g=(u*f-l*c)/T;const C=Math.acos(u/T);E=c>0?-C:C}else if(l!==0||f!==0){const T=Math.hypot(l,f);d=(u*f-l*c)/T,g=T;const C=Math.acos(l/T);E=Math.PI/2+(f>0?-C:C)}else d=0,g=0,E=0;d=-d,t.x=a.elements[6],t.y=a.elements[7],e.x=e.y=E/Math.PI/180,i.x=d,i.y=g}composeSvgTransform(t=0,e=0,i,a=!1){if(!i&&!t&&!e)return this;let u=i==null?void 0:i.split(") ").map(l=>l.trim()+")").filter(l=>l!==")");return u||(u=[]),(t||e)&&u.push(`translate(${t},${e})`),this.identity(),Lr.identity(),u.forEach(l=>{const c=/scale\(\s*([^\s,)]+)[ ,]([^\s,)]+)/.exec(l),f=/rotate\(\s*(-?\d*\.?\d+)(?:[ ,](-?\d*\.?\d+)(?:[ ,](-?\d*\.?\d+))?)?\s*\)/.exec(l),d=/translate\(\s*([^\s,)]+)[ ,]([^\s,)]+)/.exec(l);if(c){const g=Number(c[1])||1,E=Number(c[2])||g;Lr.multiply(En.makeScale(g,E))}else if(f){const g=Qg(Number(f[1])||0);Number(f[2])||Number(f[3])?(Ce.set(Number(f[2]||"0"),Number(f[3]||"0")),Lr.multiply(js.makeRotationByPoint(g,Ce))):Lr.multiply(js.makeRotation(g))}else d&&Lr.multiply(eu.makeTranslation(Number(d[1])||0,Number(d[2])||0))}),this.copy(Lr),a&&this.premultiply(En.makeScale(1,-1)),this}decomposeSvgMatrix(t,e,i){const a=Lr.copy(this).elements;Ce.set(a[0],a[1]),Ae.set(a[3],a[4]);let u=Ce.length();Ce.normalize();let l=Ce.dot(Ae);Sc.copy(Ce).multiplyScalar(-l),Ae.add(Sc);const c=Ae.length()||0;Ae.normalize(),Ce.x*Ae.y<Ae.x*Ce.y&&(Ce.x=-Ce.x,Ce.y=-Ce.y,u=-u,l=-l);const f=u?Math.atan2(Ce.y,Ce.x):Math.atan2(-Ce.x,Ae.y);t.set(a[6],a[7]),e.set(f,f),i.set(u,c)}determinant(){const t=this.elements,e=t[0],i=t[3],a=t[6],u=t[1],l=t[4],c=t[7],f=t[2],d=t[5],g=t[8];return e*l*g-e*d*c-u*i*g+u*d*a+f*i*c-f*l*a}equals(t,e=0){const i=this.elements,a=t.elements;for(let u=0;u<9;u++)if(Math.abs(i[u]-a[u])>e)return!1;return!0}extractBasis2(t,e){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),this}flipY(){return this.multiply(En.makeScale(1,-1))}fromArray(t,e=0){for(let i=0;i<9;i++)this.elements[i]=t[i+e];return this}getComponents(t=[1,0,0,1,0,0]){return t[0]=this.elements[0],t[1]=this.elements[1],t[2]=this.elements[3],t[3]=this.elements[4],t[4]=this.elements[6],t[5]=this.elements[7],t}getNormalMatrix(t){return this.setFromMatrix(t).invert().transpose()}getRotation(t){let e=this.elements;const i=Math.sqrt(e[0]*e[0]+e[3]*e[3]),a=Math.sqrt(e[1]*e[1]+e[4]*e[4]);let u=0;e[0]||e[3]?u=e[3]>0?-Math.acos(e[0]/i):Math.acos(e[0]/i):e[1]||e[4]?u=Math.PI/2-(e[4]>0?Math.acos(-e[1]/a):-Math.acos(e[1]/a)):u=0,this.getScale(Ae),u!==0&&Ae.x<0&&(u*=-1),t.set(u,u)}getScale(t){let e=this.elements,i=Math.sqrt(e[0]*e[0]+e[1]*e[1]),a=Math.sqrt(e[3]*e[3]+e[4]*e[4]),u=e[0]*e[4]-e[3]*e[1];e[0]||e[1]?t.set(u/a,a):e[3]||e[4]?t.set(i,u/i):t.set(0,0)}getTransition(t){t.set(this.elements[6],this.elements[7])}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}hasChange(){for(let t=0,e=this.elements.length;t<e;t++)if(Math.abs(this.elements[t]-E0[t])>Number.EPSILON)return!0;return!1}invert(){const t=this.elements,e=t[0],i=t[1],a=t[2],u=t[3],l=t[4],c=t[5],f=t[6],d=t[7],g=t[8],E=g*l-c*d,T=c*f-g*u,C=d*u-l*f,L=e*E+i*T+a*C;if(L===0)return this.set(0,0,0,0,0,0,0,0,0);const N=1/L;return t[0]=E*N,t[1]=(a*d-g*i)*N,t[2]=(c*i-a*l)*N,t[3]=T*N,t[4]=(g*e-a*f)*N,t[5]=(a*u-c*e)*N,t[6]=C*N,t[7]=(i*f-d*e)*N,t[8]=(l*e-i*u)*N,this}lookAt(t,e,i){return this.identity().rotate(e.angle()-t.angle()+i.angle())}makeProjection(t,e,i,a,u,l){const c=u/(e-t),f=l/(i-a),d=u/2-(e+t)*c,g=l/2+(i+a)*f;return this.elements[0]=c,this.elements[3]=0,this.elements[6]=d,this.elements[1]=0,this.elements[4]=-f,this.elements[7]=g,this.elements[2]=0,this.elements[5]=0,this.elements[8]=1,this}makeRotation(t){const e=Math.cos(t),i=Math.sin(t);return this.set(e,-i,0,i,e,0,0,0,1),this}makeRotationByPoint(t,e){const i=Math.cos(t),a=Math.sin(t),u=-e.x*i+e.y*a+e.x,l=-e.x*a-e.y*i+e.y;return this.set(i,-a,u,a,i,l,0,0,1),this}makeRotationFromQuaternion(t){return this.compose(A0,t,w0)}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}makeTranslation(t,e){return this.set(1,0,t,0,1,e,0,0,1),this}multiply(t){return this.multiplyMatrices(this,t)}multiplyMatrices(t,e){const i=t.elements,a=e.elements,u=this.elements,l=i[0],c=i[3],f=i[6],d=i[1],g=i[4],E=i[7],T=i[2],C=i[5],L=i[8],N=a[0],M=a[3],R=a[6],W=a[1],G=a[4],b=a[7],P=a[2],H=a[5],K=a[8];return u[0]=l*N+c*W+f*P,u[3]=l*M+c*G+f*H,u[6]=l*R+c*b+f*K,u[1]=d*N+g*W+E*P,u[4]=d*M+g*G+E*H,u[7]=d*R+g*b+E*K,u[2]=T*N+C*W+L*P,u[5]=T*M+C*G+L*H,u[8]=T*R+C*b+L*K,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}premultiply(t){return this.multiplyMatrices(t,this)}rotate(t){return this.premultiply(js.makeRotation(-t))}scale(t,e){return this.premultiply(En.makeScale(t,e))}set(t,e,i,a,u,l,c,f,d){return this.elements[0]=t,this.elements[3]=e,this.elements[6]=i,this.elements[1]=a,this.elements[4]=u,this.elements[7]=l,this.elements[2]=c,this.elements[5]=f,this.elements[8]=d,this}setFromDomMatrix(t){return typeof t.m11<"u"&&typeof t.m21<"u"&&typeof t.m41<"u"&&typeof t.m12<"u"&&typeof t.m22<"u"&&typeof t.m42<"u"&&typeof t.m14<"u"&&typeof t.m24<"u"&&typeof t.m44<"u"?this.set(t.m11,t.m21,t.m41,t.m12,t.m22,t.m42,t.m14,t.m24,t.m44):typeof t.a<"u"&&typeof t.b<"u"&&typeof t.c<"u"&&typeof t.d<"u"&&typeof t.e<"u"&&typeof t.f<"u"&&this.set(t.a,t.c,t.e,t.b,t.d,t.f,0,0,1),this}setFromMatrix(t){const e=t.elements;return this.set(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8]),this}setUvTransform(t,e,i,a,u,l,c){const f=Math.cos(u),d=Math.sin(u);return this.set(i*f,i*d,-i*(f*l+d*c)+l+t,-a*d,a*f,-a*(-d*l+f*c)+c+e,0,0,1),this}toArray(t=[],e=0){const i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t}toString(){return`[${this.elements[0]},${this.elements[1]}, ${this.elements[3]},${this.elements[4]}, ${this.elements[6]},${this.elements[7]}]`}translate(t,e){return this.premultiply(eu.makeTranslation(t,e))}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}transposeIntoArray(t){const e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}}const E0=[1,0,0,0,1,0,0,0,1],Ce=new F,Ae=new F,Sc=new F,Lr=new ie,eu=new ie,js=new ie,En=new ie,No=new ie,A0=new F(0,0,0),w0=new F(1,1,1),De=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"],Oc=()=>{const r=Math.random()*4294967295|0,t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(De[r&255]+De[r>>8&255]+De[r>>16&255]+De[r>>24&255]+"-"+De[t&255]+De[t>>8&255]+"-"+De[t>>16&15|64]+De[t>>24&255]+"-"+De[e&63|128]+De[e>>8&255]+"-"+De[e>>16&255]+De[e>>24&255]+De[i&255]+De[i>>8&255]+De[i>>16&255]+De[i>>24&255]).toLowerCase()};let b0=0;const Mo=new F,Jr=new ie,Nc=new F,Bo=new Ot,Js=new F,Io=new F,An=new F,T0=new F(0,1),_0={type:"added"},Ro={type:"removed"};class Mc extends dr{isObject2=!0;id=b0++;uuid=Oc();name;type="Object2";featureKey="Object2_"+this.id;parent;children=[];up=new F(0,1);position=new F;rotation=new F;scaled=new F(1,1);flipY=!1;selectable=!1;matrix=new ie;matrixWorld=new ie;matrixWorldInverse=new ie;modelViewMatrix=new ie;normalMatrix=new ie;fixed=!1;dynamically=!1;matrixAutoUpdate=!1;matrixWorldNeedsUpdate=!1;matrixWorldAutoUpdate=!1;composeNode=!1;isInComposeNode=!1;alignCenter=!1;boundingBox=new Ot;boundingBoxWorld=new Ot;boundingBoxNeedsUpdate=!1;centerPoint=new F;visible=!0;castShadow=!1;receiveShadow=!1;renderOrder=0;animations=[];finalSize;userData={};DefaultUp=new F(0,1);_autoSort=!0;constructor(t={}){super(),t.name!==void 0?this.name=t.name:this.name="Object2",t.flipY!==void 0&&(this.flipY=t.flipY),t.selectable!==void 0&&(this.selectable=t.selectable),t.finalSize!==void 0&&(this.finalSize=t.finalSize),this.setAttrs(t)}_version=0;get version(){return this._version}set version(t){this._version=t}set needsUpdate(t){t&&this._version++}destroy(){super.destroy(),this.clear(),this.parent=void 0,this.dispatchEvent(Ro)}setPosition(t){return this.position.set(t.x,t.y),this}translate(t,e){this.position.x+=t,this.position.y+=e}setScale(t,e){return this.scaled.set(t,e),this}setRotationFromMatrix(t){t.decompose(Js,this.rotation,Io)}setRotation(t){return this.rotation.set(t,t),this}rotate(t){this.rotation.x+=t}scale(t,e){e?(this.scaled.x*=t,this.scaled.y*=e):this.scaled.multiplyScalar(t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix3(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix3(Jr.copy(this.matrixWorld).invert())}lookAt(t){Nc.copy(t),this.updateWorldMatrix(!0,!1),this.matrixWorld.getTransition(Js),Jr.lookAt(Js,Nc,T0),Jr.getRotation(An),this.rotation.set(An.x,An.x),this.parent&&(this.parent.matrixWorld.getRotation(An),this.rotate(An.x))}applyMatrix3(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.rotation,this.scaled)}updateMatrix(){Mo.copy(this.scaled),this.flipY&&(Mo.y*=-1),this.matrix.compose(this.position,this.rotation,Mo),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.parent?this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix):this.matrixWorld.copy(this.matrix),this.matrixWorldInverse.copy(this.matrixWorld).invert(),this.matrixWorldNeedsUpdate=!1,t=!0,this.boundingBoxNeedsUpdate=!0);const e=this.children;for(let i=0,a=e.length;i<a;i++)e[i].updateMatrixWorld(t);this.boundingBoxNeedsUpdate&&(this.updateBoundingBox(),this.boundingBoxNeedsUpdate=!1)}updateWorldMatrix(t=!1,e=!1){const i=this.parent;if(t&&i&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.parent?this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix):this.matrixWorld.copy(this.matrix),this.matrixWorldInverse.copy(this.matrixWorld).invert(),e){const a=this.children;for(let u=0,l=a.length;u<l;u++)a[u].updateWorldMatrix(!1,!0)}}updateModelViewMatrix(t){Jr.copy(this.matrixWorld),this.isInComposeNode?this.modelViewMatrix.copy(this.matrix):t&&this.fixed?this.modelViewMatrix.copy(t.projectionMatrix):t?this.modelViewMatrix.multiplyMatrices(t.viewMatrix,Jr):this.modelViewMatrix.copy(Jr);for(let e=0,i=this.children.length;e<i;e++)this.children[e].updateModelViewMatrix(t)}computeBoundingBox(){this.boundingBox.makeEmpty(),this.centerPoint.set(0,0);for(let t=0,e=this.children.length;t<e;t++)this.children[t].updateMatrixWorld(),Bo.copy(this.children[t].computeBoundingBox()),Bo.applyMatrix3(Jr.copy(this.children[t].matrixWorld)),this.boundingBox.union(Bo);return this.boundingBox.applyMatrix3(this.matrixWorldInverse),this.boundingBox}updateBoundingBox(){this.boundingBox.isEmpty()||this.boundingBoxWorld.copy(this.boundingBox).applyMatrix3(this.matrixWorld)}setAttrs(t){if(!t)return this;for(const e in t)if(!(e==="children"||t[e]===void 0)){if(e==="userData"&&t[e]){Object.keys(t[e]).forEach(i=>this.userData[i]=t[e][i]);continue}this.userData[e]=t[e]}return this}add(t){return!t||!t.isObject2||t===this?this:(t.parent&&t.parent.remove(t),t.parent=this,this.children.push(t),t.isInComposeNode=this.composeNode||this.isInComposeNode,t.selectable&&t.parent.setSelectable(t.selectable),this._autoSort&&this.children.sort((e,i)=>e.renderOrder-i.renderOrder),t.dispatchEvent(_0),this.matrixAutoUpdate||(this.matrixWorldNeedsUpdate=!0),this)}adds(t){if(!t||!t.length)return this;this._autoSort=!1;for(let e=0,i=t.length;e<i;e++)e===t.length-1&&(this._autoSort=!0),this.add(t[e]);return this}remove(t){const e=this.children.indexOf(t);return e!==-1&&(t.parent=void 0,this.children.splice(e,1),t.dispatchEvent(Ro)),this}removes(t){for(let e=0,i=t.length;e<i;e++)this.remove(t[e]);return this}removeFromParent(){const t=this.parent;return t&&t.remove(this),this}moveToLast(){var e;if(!this.parent)return;let t=this.clone();this.removeFromParent(),(e=t.parent)==null||e.add(t)}clear(){for(let t=0;t<this.children.length;t++){const e=this.children[t];e.parent=void 0,e.destroy(),e.dispatchEvent(Ro)}return this.children.length=0,this}attach(t){return this.updateWorldMatrix(!0,!1),Jr.copy(this.matrixWorld).invert(),t.parent&&(t.parent.updateWorldMatrix(!0,!1),Jr.multiply(t.parent.matrixWorld)),t.applyMatrix3(Jr),this.add(t),t.updateWorldMatrix(!1,!0),this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,e){if(this[t]===e)return this;for(let i=0,a=this.children.length;i<a;i++){const l=this.children[i].getObjectByProperty(t,e);if(l!==void 0)return l}}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(t,An,Io),t}getWorldRotation(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Js,t,Io),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Js,An,t),t}getWorldDirection(t){return this.updateWorldMatrix(!0,!1),t.set(this.matrixWorld.elements[6],this.matrixWorld.elements[7]).normalize()}traverse(t){t(this);const e=this.children;for(let i=0,a=e.length;i<a;i++)e[i].traverse(t)}traverseVisible(t){if(this.visible)return;t(this);const e=this.children;for(let i=0,a=e.length;i<a;i++)e[i].traverseVisible(t)}traverseAncestors(t){const e=this.parent;e&&(t(e),e.traverseAncestors(t))}onBeforeRender(t,e,i){}render(t){}onAfterRender(t,e,i){}setSelectable(t){this.selectable=t,this.parent&&this.parent.setSelectable(t)}raycast(t,e=[]){}clone(t=!0){const e=this.constructor;return new e(this.userData).copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.type=t.type,this.featureKey=t.featureKey,this._version=0,this.parent=t.parent,this.up.copy(t.up),this.position.copy(t.position),this.rotation.copy(t.rotation),this.scaled.copy(t.scaled),this.flipY=t.flipY,this.selectable=t.selectable,this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.modelViewMatrix.copy(t.modelViewMatrix),this.normalMatrix.copy(t.normalMatrix),this.fixed=t.fixed,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.composeNode=t.composeNode,this.alignCenter=t.alignCenter,this.boundingBox.copy(t.boundingBox),this.boundingBoxWorld.copy(t.boundingBoxWorld),this.boundingBoxNeedsUpdate=t.boundingBoxNeedsUpdate,this.centerPoint.copy(t.centerPoint),this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),e)for(let i=0;i<t.children.length;i++){const a=t.children[i];this.add(a.clone())}return this}}class C0 extends Mc{name="Scene";type="Scene";isScene=!0;view;background;featureKey="Scene_"+this.id;matrixAutoUpdate=!1;constructor(){super()}destroy(){super.destroy(),this.boundingBox.makeEmpty()}setup(t){this.view=t}onBeforeRender(t,e,i){super.onBeforeRender(t,e,i),i&&this.cameraVersion!==i.version&&(this.matrixAutoUpdate||this.updateMatrix(),this.needsUpdate=!0,this.cameraVersion=i.version)}render(t){var e;this.visible&&((e=this.children)==null||e.forEach(function(i){i.isShape&&i.render(t)}))}getIntersectObjects(t,e=er.RM,i=[]){throw new Error("must be implemented in derived")}}class D0{isLoading=!1;itemsLoaded=0;itemsTotal=0;urlModifier;handlers=[];onStart;onLoad;onProgress;onError;constructor(t,e,i){this.onLoad=t,this.onProgress=e,this.onError=i}itemStart(t){this.itemsTotal++,this.isLoading||this.onStart!==void 0&&this.onStart(t,this.itemsLoaded,this.itemsTotal),this.isLoading=!0}itemEnd(t){this.itemsLoaded++,this.onProgress!==void 0&&this.onProgress(t,this.itemsLoaded,this.itemsTotal),this.itemsLoaded===this.itemsTotal&&(this.isLoading=!1,this.onLoad!==void 0&&this.onLoad())}itemError(t){this.onError!==void 0&&this.onError(t)}resolveURL(t){return this.urlModifier!==void 0?this.urlModifier(t):t}setURLModifier(t){return this.urlModifier=t,this}addHandler(t,e){return this.handlers.push(t,e),this}removeHandler(t){const e=this.handlers.indexOf(t);return e!==-1&&this.handlers.splice(e,2),this}getHandler(t){for(let e=0,i=this.handlers.length;e<i;e+=2){const a=this.handlers[e],u=this.handlers[e+1];if(a.global&&(a.lastIndex=0),a.test(t))return u}return null}}const Bc={enabled:!1,files:{},add:function(r,t){this.enabled&&(this.files[r]=t)},get:function(r){if(this.enabled)return this.files[r]},remove:function(r){delete this.files[r]},clear:function(){this.files={}}},S0=new D0;class Ic{manager;crossOrigin="anonymous";withCredentials=!1;path="";resourcePath="";requestHeader={};constructor(t=S0){this.manager=t}loadAsync(t,e){const i=this;return new Promise(function(a,u){i.load(t,a,e,u)})}setCrossOrigin(t){return this.crossOrigin=t,this}setWithCredentials(t){return this.withCredentials=t,this}setPath(t){return this.path=t,this}setResourcePath(t){return this.resourcePath=t,this}setRequestHeader(t){return this.requestHeader=t,this}}const vi={};class O0 extends Error{response;constructor(t,e){super(t),this.response=e}}class N0 extends Ic{mimeType;responseType;constructor(t){super(t)}load(t,e,i,a){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);const u=Bc.get(t);if(u!==void 0)return this.manager.itemStart(t),setTimeout(()=>{e&&e(u),this.manager.itemEnd(t)},0),u;if(vi[t]!==void 0){vi[t].push({onLoad:e,onProgress:i,onError:a});return}vi[t]=[],vi[t].push({onLoad:e,onProgress:i,onError:a});const l=new Pt.window.Request(t,{headers:new Pt.window.Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),c=this.mimeType,f=this.responseType;fetch(l).then(d=>{if(d.status===200||d.status===0){if(d.status===0&&console.warn("FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||d.body===void 0||d.body.getReader===void 0)return d;const g=vi[t],E=d.body.getReader(),T=d.headers.get("Content-Length")||d.headers.get("X-File-Size"),C=T?parseInt(T):0,L=C!==0;let N=0;const M=new ReadableStream({start(R){W();function W(){E.read().then(({done:G,value:b})=>{if(G)R.close();else{N+=b.byteLength;const P=new ProgressEvent("progress",{lengthComputable:L,loaded:N,total:C});for(let H=0,K=g.length;H<K;H++){const tt=g[H];tt.onProgress&&tt.onProgress(P)}R.enqueue(b),W()}})}}});return new Response(M)}else throw new O0(`fetch for "${d.url}" responded with ${d.status}: ${d.statusText}`,d)}).then(d=>{switch(f){case"arraybuffer":return d.arrayBuffer();case"blob":return d.blob();case"document":return d.text().then(g=>new DOMParser().parseFromString(g,c));case"json":return d.json();default:if(c===void 0)return d.text();{const E=/charset="?([^;"\s]*)"?/i.exec(c),T=E&&E[1]?E[1].toLowerCase():void 0,C=new TextDecoder(T);return d.arrayBuffer().then(L=>C.decode(L))}}}).then(d=>{Bc.add(t,d);const g=vi[t];delete vi[t];for(let E=0,T=g.length;E<T;E++){const C=g[E];C.onLoad&&C.onLoad(d)}}).catch(d=>{const g=vi[t];if(g===void 0)throw this.manager.itemError(t),d;delete vi[t];for(let E=0,T=g.length;E<T;E++){const C=g[E];C.onError&&C.onError(d)}this.manager.itemError(t)}).finally(()=>{this.manager.itemEnd(t)}),this.manager.itemStart(t)}setMimeType(t){return this.mimeType=t,this}setResponseType(t){return this.responseType=t,this}}class Rc extends Ic{constructor(t){super(t)}load(t,e,i,a){const u=this,l=new N0(u.manager);l.setPath(u.path),l.setRequestHeader(u.requestHeader),l.setWithCredentials(u.withCredentials),l.load(t,function(c){try{e&&e(c)}catch(f){a?a(f):console.error(f),u.manager.itemError(t)}},i,a)}}const ss="ae",Lc="-",ru="rm-assets",Pc="rm-labels";function ta(r){return r+Lc+Ks.ASSETS}function iu(r){return r+Lc+Ks.LABELS}const M0={rm:["su-assets","su-labels","eq-assets","eq-labels","fn-assets","fn-labels"],su:[ru,Pc,"eq-assets","eq-labels","fn-assets","fn-labels"],eq:[ru,Pc,"su-assets","su-labels","fn-assets","fn-labels"]};function Lo(r,t,e){const i=r==null?void 0:r.getAttribute(t);return i?Number(i):e}function B0(r,t,e,i,a,u,l,c,f){let d=f*(Math.PI/180),g=Math.cos(d)*(r-e)/2+Math.sin(d)*(t-i)/2,E=-1*Math.sin(d)*(r-e)/2+Math.cos(d)*(t-i)/2,T=g*g/(l*l)+E*E/(c*c);T>1&&(l*=Math.sqrt(T),c*=Math.sqrt(T));let C=Math.sqrt((l*l*(c*c)-l*l*(E*E)-c*c*(g*g))/(l*l*(E*E)+c*c*(g*g)));a===u&&(C*=-1),isNaN(C)&&(C=0);let L=C*l*E/c,N=C*-c*g/l,M=(r+e)/2+Math.cos(d)*L-Math.sin(d)*N,R=(t+i)/2+Math.sin(d)*L+Math.cos(d)*N,W=function(Z){return Math.sqrt(Z[0]*Z[0]+Z[1]*Z[1])},G=function(Z,rt){return(Z[0]*rt[0]+Z[1]*rt[1])/(W(Z)*W(rt))},b=function(Z,rt){return(Z[0]*rt[1]<Z[1]*rt[0]?-1:1)*Math.acos(G(Z,rt))},P=b([1,0],[(g-L)/l,(E-N)/c]),H=[(g-L)/l,(E-N)/c],K=[(-1*g-L)/l,(-1*E-N)/c],tt=b(H,K);return G(H,K)<=-1&&(tt=Math.PI),G(H,K)>=1&&(tt=0),u===0&&tt>0&&(tt=tt-2*Math.PI),u===1&&tt<0&&(tt=tt+2*Math.PI),[M,R,l,c,P,tt,d,u]}const ne=" ";function I0(r){let t="";Array.isArray(r)||(r=[r]);for(let e=0;e<r.length;e++){const i=r[e];if(i.type===q.CLOSE_PATH)t+="z";else if(i.type===q.HORIZ_LINE_TO)t+=(i.relative?"h":"H")+i.x;else if(i.type===q.VERT_LINE_TO)t+=(i.relative?"v":"V")+i.y;else if(i.type===q.MOVE_TO)t+=(i.relative?"m":"M")+i.x+ne+i.y;else if(i.type===q.LINE_TO)t+=(i.relative?"l":"L")+i.x+ne+i.y;else if(i.type===q.CURVE_TO)t+=(i.relative?"c":"C")+i.x1+ne+i.y1+ne+i.x2+ne+i.y2+ne+i.x+ne+i.y;else if(i.type===q.SMOOTH_CURVE_TO)t+=(i.relative?"s":"S")+i.x2+ne+i.y2+ne+i.x+ne+i.y;else if(i.type===q.QUAD_TO)t+=(i.relative?"q":"Q")+i.x1+ne+i.y1+ne+i.x+ne+i.y;else if(i.type===q.SMOOTH_QUAD_TO)t+=(i.relative?"t":"T")+i.x+ne+i.y;else if(i.type===q.ARC)t+=(i.relative?"a":"A")+i.rX+ne+i.rY+ne+i.xRot+ne+ +i.lArcFlag+ne+ +i.sweepFlag+ne+i.x+ne+i.y;else throw new Error(`Unexpected command type "${i==null?void 0:i.type}" at index ${e}.`)}return t}function Po([r,t],e){return[r*Math.cos(e)-t*Math.sin(e),r*Math.sin(e)+t*Math.cos(e)]}function Pr(...r){for(let t=0;t<r.length;t++)if(typeof r[t]!="number")throw new Error(`assertNumbers arguments[${t}] is not a number. ${typeof r[t]} == typeof ${r[t]}`);return!0}const Vi=Math.PI;function Fo(r,t,e){r.lArcFlag=r.lArcFlag===0?0:1,r.sweepFlag=r.sweepFlag===0?0:1;let{rX:i,rY:a}=r;const{x:u,y:l}=r;i=Math.abs(r.rX),a=Math.abs(r.rY);const[c,f]=Po([(t-u)/2,(e-l)/2],-r.xRot/180*Vi),d=Math.pow(c,2)/Math.pow(i,2)+Math.pow(f,2)/Math.pow(a,2);1<d&&(i*=Math.sqrt(d),a*=Math.sqrt(d)),r.rX=i,r.rY=a;const g=Math.pow(i,2)*Math.pow(f,2)+Math.pow(a,2)*Math.pow(c,2),E=(r.lArcFlag!==r.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(i,2)*Math.pow(a,2)-g)/g)),T=i*f/a*E,C=-a*c/i*E,L=Po([T,C],r.xRot/180*Vi);r.cX=L[0]+(t+u)/2,r.cY=L[1]+(e+l)/2,r.phi1=Math.atan2((f-C)/a,(c-T)/i),r.phi2=Math.atan2((-f-C)/a,(-c-T)/i),r.sweepFlag===0&&r.phi2>r.phi1&&(r.phi2-=2*Vi),r.sweepFlag===1&&r.phi2<r.phi1&&(r.phi2+=2*Vi),r.phi1*=180/Vi,r.phi2*=180/Vi}function Fc(r,t,e){Pr(r,t,e);const i=r*r+t*t-e*e;if(0>i)return[];if(i===0)return[[r*e/(r*r+t*t),t*e/(r*r+t*t)]];const a=Math.sqrt(i);return[[(r*e+t*a)/(r*r+t*t),(t*e-r*a)/(r*r+t*t)],[(r*e-t*a)/(r*r+t*t),(t*e+r*a)/(r*r+t*t)]]}const xi=Math.PI/180;function Uc(r,t,e){return(1-e)*r+e*t}function kc(r,t,e,i){return r+Math.cos(i/180*Vi)*t+Math.sin(i/180*Vi)*e}function Hc(r,t,e,i){const u=t-r,l=e-t,c=i-e,f=3*u+3*c-6*l,d=(l-u)*6,g=3*u;return Math.abs(f)<1e-6?[-g/d]:R0(d/f,g/f,1e-6)}function qc(r,t,e,i,a){const u=1-a,l=u*u*u,c=3*u*u*a,f=3*u*a*a,d=a*a*a;return r*l+t*c+e*f+i*d}function R0(r,t,e=1e-6){const i=r*r/4-t;if(i<-e)return[];if(i<=e)return[-r/2];const a=Math.sqrt(i);return[-(r/2)-a,-(r/2)+a]}function L0(r,t,e){r.cX||Fo(r,t,e);const i=Math.min(r.phi1,r.phi2),a=Math.max(r.phi1,r.phi2),u=a-i,l=Math.ceil(u/90),c=new Array(l);let f=t,d=e;for(let g=0;g<l;g++){const E=Uc(r.phi1,r.phi2,g/l),T=Uc(r.phi1,r.phi2,(g+1)/l),C=T-E,L=4/3*Math.tan(C*xi/4),[N,M]=[Math.cos(E*xi)-L*Math.sin(E*xi),Math.sin(E*xi)+L*Math.cos(E*xi)],[R,W]=[Math.cos(T*xi),Math.sin(T*xi)],[G,b]=[R+L*Math.sin(T*xi),W-L*Math.cos(T*xi)],P={relative:r.relative,type:q.CURVE_TO},H=(K,tt)=>{const[Z,rt]=Po([K*r.rX,tt*r.rY],r.xRot);return[r.cX+Z,r.cY+rt]};[P.x1,P.y1]=H(N,M),[P.x2,P.y2]=H(G,b),[P.x,P.y]=H(R,W),r.relative&&(P.x1-=f,P.y1-=d,P.x2-=f,P.y2-=d,P.x-=f,P.y-=d),[f,d]=[P.x,P.y],c[g]=P}return c}function P0(r=1e13){Pr(r);function t(e){return Math.round(e*r)/r}return function(i){return"x1"in i&&typeof i.x1<"u"&&(i.x1=t(i.x1)),"y1"in i&&typeof i.y1<"u"&&(i.y1=t(i.y1)),"x2"in i&&typeof i.x2<"u"&&(i.x2=t(i.x2)),"y2"in i&&typeof i.y2<"u"&&(i.y2=t(i.y2)),"x"in i&&typeof i.x<"u"&&(i.x=t(i.x)),"y"in i&&typeof i.y<"u"&&(i.y=t(i.y)),"rX"in i&&typeof i.rX<"u"&&(i.rX=t(i.rX)),"rY"in i&&typeof i.rY<"u"&&(i.rY=t(i.rY)),i}}function Wc(){return Fr((r,t,e)=>(r.relative&&(typeof r.x1<"u"&&(r.x1+=t),typeof r.y1<"u"&&(r.y1+=e),typeof r.x2<"u"&&(r.x2+=t),typeof r.y2<"u"&&(r.y2+=e),typeof r.x<"u"&&(r.x+=t),typeof r.y<"u"&&(r.y+=e),r.relative=!1),r))}function F0(){return Fr((r,t,e)=>(r.relative||(typeof r.x1<"u"&&(r.x1-=t),typeof r.y1<"u"&&(r.y1-=e),typeof r.x2<"u"&&(r.x2-=t),typeof r.y2<"u"&&(r.y2-=e),typeof r.x<"u"&&(r.x-=t),typeof r.y<"u"&&(r.y-=e),r.relative=!0),r))}function U0(r=!0,t=!0,e=!0){return Fr((i,a,u,l,c)=>{if(isNaN(l)&&!(i.type&q.MOVE_TO))throw new Error("path must start with moveto");return t&&i.type&q.HORIZ_LINE_TO&&(i.type=q.LINE_TO,i.y=i.relative?0:u),e&&i.type&q.VERT_LINE_TO&&(i.type=q.LINE_TO,i.x=i.relative?0:a),r&&i.type&q.CLOSE_PATH&&(i.type=q.LINE_TO,i.x=i.relative?l-a:l,i.y=i.relative?c-u:c),i.type&q.ARC&&(i.rX===0||i.rY===0)&&(i.type=q.LINE_TO,delete i.rX,delete i.rY,delete i.xRot,delete i.lArcFlag,delete i.sweepFlag),i})}function Vc(){let r=NaN,t=NaN,e=NaN,i=NaN;return Fr((a,u,l)=>(a.type&q.SMOOTH_CURVE_TO&&(a.type=q.CURVE_TO,r=isNaN(r)?u:r,t=isNaN(t)?l:t,a.x1=a.relative?u-r:2*u-r,a.y1=a.relative?l-t:2*l-t),a.type&q.CURVE_TO?(r=a.relative?u+a.x2:a.x2,t=a.relative?l+a.y2:a.y2):(r=NaN,t=NaN),a.type&q.SMOOTH_QUAD_TO&&(a.type=q.QUAD_TO,e=isNaN(e)?u:e,i=isNaN(i)?l:i,a.x1=a.relative?u-e:2*u-e,a.y1=a.relative?l-i:2*l-i),a.type&q.QUAD_TO?(e=a.relative?u+a.x1:a.x1,i=a.relative?l+a.y1:a.y1):(e=NaN,i=NaN),a))}function zc(){let r=NaN,t=NaN;return Fr((e,i,a)=>{if(e.type&q.SMOOTH_QUAD_TO&&(e.type=q.QUAD_TO,r=isNaN(r)?i:r,t=isNaN(t)?a:t,e.x1=e.relative?i-r:2*i-r,e.y1=e.relative?a-t:2*a-t),e.type&q.QUAD_TO){r=e.relative?i+e.x1:e.x1,t=e.relative?a+e.y1:e.y1;const u=e.x1,l=e.y1;e.type=q.CURVE_TO,e.x1=((e.relative?0:i)+u*2)/3,e.y1=((e.relative?0:a)+l*2)/3,e.x2=(e.x+u*2)/3,e.y2=(e.y+l*2)/3}else r=NaN,t=NaN;return e})}function Fr(r){let t=0,e=0,i=NaN,a=NaN;return function(l){if(isNaN(i)&&!(l.type&q.MOVE_TO))throw new Error("path must start with moveto");const c=r(l,t,e,i,a);return l.type&q.CLOSE_PATH&&(t=i,e=a),"x"in l&&typeof l.x<"u"&&(t=l.relative?t+l.x:l.x),"y"in l&&typeof l.y<"u"&&(e=l.relative?e+l.y:l.y),l.type&q.MOVE_TO&&(i=t,a=e),c}}function k0(r=0){Pr(r);let t=NaN,e=NaN,i=NaN,a=NaN;return Fr((u,l,c,f,d)=>{const g=Math.abs;let E=!1,T=0,C=0;if(u.type&q.SMOOTH_CURVE_TO&&(T=isNaN(t)?0:l-t,C=isNaN(e)?0:c-e),u.type&(q.CURVE_TO|q.SMOOTH_CURVE_TO)?(t=u.relative?l+u.x2:u.x2,e=u.relative?c+u.y2:u.y2):(t=NaN,e=NaN),u.type&q.SMOOTH_QUAD_TO?(i=isNaN(i)?l:2*l-i,a=isNaN(a)?c:2*c-a):u.type&q.QUAD_TO?(i=u.relative?l+u.x1:u.x1,a=u.relative?c+u.y1:u.y2):(i=NaN,a=NaN),u.type&q.LINE_COMMANDS||u.type&q.ARC&&(u.rX===0||u.rY===0||!u.lArcFlag)||u.type&q.CURVE_TO||u.type&q.SMOOTH_CURVE_TO||u.type&q.QUAD_TO||u.type&q.SMOOTH_QUAD_TO){const L=typeof u.x>"u"?0:u.relative?u.x:u.x-l,N=typeof u.y>"u"?0:u.relative?u.y:u.y-c;T=isNaN(i)?typeof u.x1>"u"?T:u.relative?u.x:u.x1-l:i-l,C=isNaN(a)?typeof u.y1>"u"?C:u.relative?u.y:u.y1-c:a-c;const M=typeof u.x2>"u"?0:u.relative?u.x:u.x2-l,R=typeof u.y2>"u"?0:u.relative?u.y:u.y2-c;g(L)<=r&&g(N)<=r&&g(T)<=r&&g(C)<=r&&g(M)<=r&&g(R)<=r&&(E=!0)}return u.type&q.CLOSE_PATH&&g(l-f)<=r&&g(c-d)<=r&&(E=!0),E?[]:u})}function zi(r,t,e,i,a,u){return Pr(r,t,e,i,a,u),Fr((l,c,f,d)=>{const g=l.x1,E=l.x2,T=l.relative&&!isNaN(d),C=typeof l.x<"u"?l.x:T?0:c,L=typeof l.y<"u"?l.y:T?0:f;l.type&q.HORIZ_LINE_TO&&t!==0&&(l.type=q.LINE_TO,l.y=l.relative?0:f),l.type&q.VERT_LINE_TO&&e!==0&&(l.type=q.LINE_TO,l.x=l.relative?0:c),typeof l.x<"u"&&(l.x=l.x*r+L*e+(T?0:a)),typeof l.y<"u"&&(l.y=C*t+l.y*i+(T?0:u)),typeof l.x1<"u"&&(l.x1=l.x1*r+l.y1*e+(T?0:a)),typeof l.y1<"u"&&(l.y1=g*t+l.y1*i+(T?0:u)),typeof l.x2<"u"&&(l.x2=l.x2*r+l.y2*e+(T?0:a)),typeof l.y2<"u"&&(l.y2=E*t+l.y2*i+(T?0:u));function N(R){return R*R}const M=r*i-t*e;if(typeof l.xRot<"u"&&(r!==1||t!==0||e!==0||i!==1))if(M===0)delete l.rX,delete l.rY,delete l.xRot,delete l.lArcFlag,delete l.sweepFlag,l.type=q.LINE_TO;else{const R=l.xRot*Math.PI/180,W=Math.sin(R),G=Math.cos(R),b=1/N(l.rX),P=1/N(l.rY),H=N(G)*b+N(W)*P,K=2*W*G*(b-P),tt=N(W)*b+N(G)*P,Z=H*i*i-K*t*i+tt*t*t,rt=K*(r*i+t*e)-2*(H*e*i+tt*r*t),J=H*e*e-K*r*e+tt*r*r,st=(Math.atan2(rt,Z-J)+Math.PI)%Math.PI/2,ht=Math.sin(st),ct=Math.cos(st);l.rX=Math.abs(M)/Math.sqrt(Z*N(ct)+rt*ht*ct+J*N(ht)),l.rY=Math.abs(M)/Math.sqrt(Z*N(ht)-rt*ht*ct+J*N(ct)),l.xRot=st*180/Math.PI}return typeof l.sweepFlag<"u"&&0>M&&(l.sweepFlag=+!l.sweepFlag),l})}function H0(r,t=0,e=0){Pr(r,t,e);const i=Math.sin(r),a=Math.cos(r);return zi(a,i,-i,a,t-t*a+e*i,e-t*i-e*a)}function q0(r,t=0){return Pr(r,t),zi(1,0,0,1,r,t)}function W0(r,t=r){return Pr(r,t),zi(r,0,0,t,0,0)}function V0(r){return Pr(r),zi(1,0,Math.atan(r),1,0,0)}function z0(r){return Pr(r),zi(1,Math.atan(r),0,1,0,0)}function $0(r=0){return Pr(r),zi(-1,0,0,1,r,0)}function G0(r=0){return Pr(r),zi(1,0,0,-1,0,r)}function Y0(){return Fr((r,t,e)=>q.ARC===r.type?L0(r,r.relative?0:t,r.relative?0:e):r)}function X0(){return Fr((r,t,e)=>(r.relative&&(t=0,e=0),q.ARC===r.type&&Fo(r,t,e),r))}function $c(){return r=>({...r})}function Z0(){const r=$c(),t=Wc(),e=zc(),i=Vc(),a=Fr((u,l,c)=>{const f=i(e(t(r(u))));function d(E){E>a.maxX&&(a.maxX=E),E<a.minX&&(a.minX=E)}function g(E){E>a.maxY&&(a.maxY=E),E<a.minY&&(a.minY=E)}if(f.type&q.DRAWING_COMMANDS&&(d(l),g(c)),f.type&q.HORIZ_LINE_TO&&d(f.x),f.type&q.VERT_LINE_TO&&g(f.y),f.type&q.LINE_TO&&(d(f.x),g(f.y)),f.type&q.CURVE_TO){d(f.x),g(f.y);const E=Hc(l,f.x1,f.x2,f.x);for(const C of E)0<C&&1>C&&d(qc(l,f.x1,f.x2,f.x,C));const T=Hc(c,f.y1,f.y2,f.y);for(const C of T)0<C&&1>C&&g(qc(c,f.y1,f.y2,f.y,C))}if(f.type&q.ARC){d(f.x),g(f.y),Fo(f,l,c);const E=f.xRot/180*Math.PI,T=Math.cos(E)*f.rX,C=Math.sin(E)*f.rX,L=-Math.sin(E)*f.rY,N=Math.cos(E)*f.rY,[M,R]=f.phi1<f.phi2?[f.phi1,f.phi2]:-180>f.phi2?[f.phi2+360,f.phi1+360]:[f.phi2,f.phi1],W=([P,H])=>{const tt=Math.atan2(H,P)*180/Math.PI;return tt<M?tt+360:tt},G=Fc(L,-T,0).map(W);for(const P of G)P>M&&P<R&&d(kc(f.cX,T,L,P));const b=Fc(N,-C,0).map(W);for(const P of b)P>M&&P<R&&g(kc(f.cY,C,N,P))}return u});return a.minX=1/0,a.maxX=-1/0,a.minY=1/0,a.maxY=-1/0,a}const ye={ROUND:P0,TO_ABS:Wc,TO_REL:F0,NORMALIZE_HVZ:U0,NORMALIZE_ST:Vc,QT_TO_C:zc,INFO:Fr,SANITIZE:k0,MATRIX:zi,ROTATE:H0,TRANSLATE:q0,SCALE:W0,SKEW_X:V0,SKEW_Y:z0,X_AXIS_SYMMETRY:$0,Y_AXIS_SYMMETRY:G0,A_TO_C:Y0,ANNOTATE_ARCS:X0,CLONE:$c,CALCULATE_BOUNDS:Z0};let Gc=class{round(t){return this.transform(ye.ROUND(t))}toAbs(){return this.transform(ye.TO_ABS())}toRel(){return this.transform(ye.TO_REL())}normalizeHVZ(t,e,i){return this.transform(ye.NORMALIZE_HVZ(t,e,i))}normalizeST(){return this.transform(ye.NORMALIZE_ST())}qtToC(){return this.transform(ye.QT_TO_C())}aToC(){return this.transform(ye.A_TO_C())}sanitize(t){return this.transform(ye.SANITIZE(t))}translate(t,e){return this.transform(ye.TRANSLATE(t,e))}scale(t,e){return this.transform(ye.SCALE(t,e))}rotate(t,e,i){return this.transform(ye.ROTATE(t,e,i))}matrix(t,e,i,a,u,l){return this.transform(ye.MATRIX(t,e,i,a,u,l))}skewX(t){return this.transform(ye.SKEW_X(t))}skewY(t){return this.transform(ye.SKEW_Y(t))}xSymmetry(t){return this.transform(ye.X_AXIS_SYMMETRY(t))}ySymmetry(t){return this.transform(ye.Y_AXIS_SYMMETRY(t))}annotateArcs(){return this.transform(ye.ANNOTATE_ARCS())}};const Q0=r=>r===" "||r===" "||r==="\r"||r===`
33
+ `,Yc=r=>48<=r.charCodeAt(0)&&r.charCodeAt(0)<=57;let K0=class extends Gc{curNumber="";curCommandType=-1;curCommandRelative=!1;canParseCommandOrComma=!0;curNumberHasExp=!1;curNumberHasExpDigits=!1;curNumberHasDecimal=!1;curArgs=[];constructor(){super()}finish(t=[]){if(this.parse(" ",t),this.curArgs.length!==0||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return t}parse(t,e=[]){const i=a=>{e.push(a),this.curArgs.length=0,this.canParseCommandOrComma=!0};for(let a=0;a<t.length;a++){const u=t[a],l=this.curCommandType===q.ARC&&(this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber.length===1&&(this.curNumber==="0"||this.curNumber==="1"),c=Yc(u)&&(this.curNumber==="0"&&u==="0"||l);if(Yc(u)&&!c){this.curNumber+=u,this.curNumberHasExpDigits=this.curNumberHasExp;continue}if(u==="e"||u==="E"){this.curNumber+=u,this.curNumberHasExp=!0;continue}if((u==="-"||u==="+")&&this.curNumberHasExp&&!this.curNumberHasExpDigits){this.curNumber+=u;continue}if(u==="."&&!this.curNumberHasExp&&!this.curNumberHasDecimal&&!l){this.curNumber+=u,this.curNumberHasDecimal=!0;continue}if(this.curNumber&&this.curCommandType!==-1){const f=Number(this.curNumber);if(isNaN(f))throw new SyntaxError(`Invalid number ending at ${a}`);if(this.curCommandType===q.ARC){if(this.curArgs.length===0||this.curArgs.length===1){if(0>f)throw new SyntaxError(`Expected positive number, got "${f}" at index "${a}"`)}else if((this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber!=="0"&&this.curNumber!=="1")throw new SyntaxError(`Expected a flag, got "${this.curNumber}" at index "${a}"`)}this.curArgs.push(f),this.curArgs.length===j0[this.curCommandType]&&(q.HORIZ_LINE_TO===this.curCommandType?i({type:q.HORIZ_LINE_TO,relative:this.curCommandRelative,x:f}):q.VERT_LINE_TO===this.curCommandType?i({type:q.VERT_LINE_TO,relative:this.curCommandRelative,y:f}):this.curCommandType===q.MOVE_TO||this.curCommandType===q.LINE_TO||this.curCommandType===q.SMOOTH_QUAD_TO?(i({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),q.MOVE_TO===this.curCommandType&&(this.curCommandType=q.LINE_TO)):this.curCommandType===q.CURVE_TO?i({type:q.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===q.SMOOTH_CURVE_TO?i({type:q.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===q.QUAD_TO?i({type:q.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===q.ARC&&i({type:q.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!Q0(u)){if(u===","&&this.canParseCommandOrComma){this.canParseCommandOrComma=!1;continue}if(u==="+"||u==="-"||u==="."){this.curNumber=u,this.curNumberHasDecimal=u===".";continue}if(c){this.curNumber=u,this.curNumberHasDecimal=!1;continue}if(this.curArgs.length!==0)throw new SyntaxError(`Unterminated command at index ${a}.`);if(!this.canParseCommandOrComma)throw new SyntaxError(`Unexpected character "${u}" at index ${a}. Command cannot follow comma`);if(this.canParseCommandOrComma=!1,u==="z"||u==="Z"){e.push({type:q.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1;continue}else if(u==="h"||u==="H")this.curCommandType=q.HORIZ_LINE_TO,this.curCommandRelative=u==="h";else if(u==="v"||u==="V")this.curCommandType=q.VERT_LINE_TO,this.curCommandRelative=u==="v";else if(u==="m"||u==="M")this.curCommandType=q.MOVE_TO,this.curCommandRelative=u==="m";else if(u==="l"||u==="L")this.curCommandType=q.LINE_TO,this.curCommandRelative=u==="l";else if(u==="c"||u==="C")this.curCommandType=q.CURVE_TO,this.curCommandRelative=u==="c";else if(u==="s"||u==="S")this.curCommandType=q.SMOOTH_CURVE_TO,this.curCommandRelative=u==="s";else if(u==="q"||u==="Q")this.curCommandType=q.QUAD_TO,this.curCommandRelative=u==="q";else if(u==="t"||u==="T")this.curCommandType=q.SMOOTH_QUAD_TO,this.curCommandRelative=u==="t";else if(u==="a"||u==="A")this.curCommandType=q.ARC,this.curCommandRelative=u==="a";else throw new SyntaxError(`Unexpected character "${u}" at index ${a}.`)}}return e}transform(t){return Object.create(this,{parse:{value(i,a=[]){const u=Object.getPrototypeOf(this).parse.call(this,i);for(const l of u){const c=t(l);Array.isArray(c)?a.push(...c):a.push(c)}return a}}})}},q=class tr extends Gc{commands;constructor(t){super(),typeof t=="string"?this.commands=tr.parse(t):this.commands=t}encode(){return tr.encode(this.commands)}getBounds(){const t=ye.CALCULATE_BOUNDS();return this.transform(t),t}transform(t){const e=[];for(const i of this.commands){const a=t(i);Array.isArray(a)?e.push(...a):e.push(a)}return this.commands=e,this}static encode(t){return I0(t)}static parse(t){const e=new K0,i=[];return e.parse(t,i),e.finish(i),i}static CLOSE_PATH=1;static MOVE_TO=2;static HORIZ_LINE_TO=4;static VERT_LINE_TO=8;static LINE_TO=16;static CURVE_TO=32;static SMOOTH_CURVE_TO=64;static QUAD_TO=128;static SMOOTH_QUAD_TO=256;static ARC=512;static LINE_COMMANDS=tr.LINE_TO|tr.HORIZ_LINE_TO|tr.VERT_LINE_TO;static DRAWING_COMMANDS=tr.HORIZ_LINE_TO|tr.VERT_LINE_TO|tr.LINE_TO|tr.CURVE_TO|tr.SMOOTH_CURVE_TO|tr.QUAD_TO|tr.SMOOTH_QUAD_TO|tr.ARC};const j0={[q.MOVE_TO]:2,[q.LINE_TO]:2,[q.HORIZ_LINE_TO]:1,[q.VERT_LINE_TO]:1,[q.CLOSE_PATH]:0,[q.QUAD_TO]:4,[q.SMOOTH_QUAD_TO]:2,[q.CURVE_TO]:6,[q.SMOOTH_CURVE_TO]:4,[q.ARC]:7},se=" ";function J0(r){let t="";Array.isArray(r)||(r=[r]);for(let e=0;e<r.length;e++){const i=r[e];if(i.type===X.CLOSE_PATH)t+="z";else if(i.type===X.HORIZ_LINE_TO)t+=(i.relative?"h":"H")+i.x;else if(i.type===X.VERT_LINE_TO)t+=(i.relative?"v":"V")+i.y;else if(i.type===X.MOVE_TO)t+=(i.relative?"m":"M")+i.x+se+i.y;else if(i.type===X.LINE_TO)t+=(i.relative?"l":"L")+i.x+se+i.y;else if(i.type===X.CURVE_TO)t+=(i.relative?"c":"C")+i.x1+se+i.y1+se+i.x2+se+i.y2+se+i.x+se+i.y;else if(i.type===X.SMOOTH_CURVE_TO)t+=(i.relative?"s":"S")+i.x2+se+i.y2+se+i.x+se+i.y;else if(i.type===X.QUAD_TO)t+=(i.relative?"q":"Q")+i.x1+se+i.y1+se+i.x+se+i.y;else if(i.type===X.SMOOTH_QUAD_TO)t+=(i.relative?"t":"T")+i.x+se+i.y;else if(i.type===X.ARC)t+=(i.relative?"a":"A")+i.rX+se+i.rY+se+i.xRot+se+ +i.lArcFlag+se+ +i.sweepFlag+se+i.x+se+i.y;else throw new Error(`Unexpected command type "${i==null?void 0:i.type}" at index ${e}.`)}return t}class Xc{round(t){return this.transform(ce.ROUND(t))}toAbs(){return this.transform(ce.TO_ABS())}toRel(){return this.transform(ce.TO_REL())}normalizeHVZ(t,e,i){return this.transform(ce.NORMALIZE_HVZ(t,e,i))}normalizeST(){return this.transform(ce.NORMALIZE_ST())}qtToC(){return this.transform(ce.QT_TO_C())}aToC(){return this.transform(ce.A_TO_C())}sanitize(t){return this.transform(ce.SANITIZE(t))}translate(t,e){return this.transform(ce.TRANSLATE(t,e))}scale(t,e){return this.transform(ce.SCALE(t,e))}rotate(t,e,i){return this.transform(ce.ROTATE(t,e,i))}matrix(t,e,i,a,u,l){return this.transform(ce.MATRIX(t,e,i,a,u,l))}skewX(t){return this.transform(ce.SKEW_X(t))}skewY(t){return this.transform(ce.SKEW_Y(t))}xSymmetry(t){return this.transform(ce.X_AXIS_SYMMETRY(t))}ySymmetry(t){return this.transform(ce.Y_AXIS_SYMMETRY(t))}annotateArcs(){return this.transform(ce.ANNOTATE_ARCS())}}const t2=r=>r===" "||r===" "||r==="\r"||r===`
34
+ `,Zc=r=>48<=r.charCodeAt(0)&&r.charCodeAt(0)<=57;class e2 extends Xc{constructor(){super(),this.curNumber="",this.curCommandType=-1,this.curCommandRelative=!1,this.canParseCommandOrComma=!0,this.curNumberHasExp=!1,this.curNumberHasExpDigits=!1,this.curNumberHasDecimal=!1,this.curArgs=[]}finish(t=[]){if(this.parse(" ",t),this.curArgs.length!==0||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return t}parse(t,e=[]){const i=a=>{e.push(a),this.curArgs.length=0,this.canParseCommandOrComma=!0};for(let a=0;a<t.length;a++){const u=t[a],l=this.curCommandType===X.ARC&&(this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber.length===1&&(this.curNumber==="0"||this.curNumber==="1"),c=Zc(u)&&(this.curNumber==="0"&&u==="0"||l);if(Zc(u)&&!c){this.curNumber+=u,this.curNumberHasExpDigits=this.curNumberHasExp;continue}if(u==="e"||u==="E"){this.curNumber+=u,this.curNumberHasExp=!0;continue}if((u==="-"||u==="+")&&this.curNumberHasExp&&!this.curNumberHasExpDigits){this.curNumber+=u;continue}if(u==="."&&!this.curNumberHasExp&&!this.curNumberHasDecimal&&!l){this.curNumber+=u,this.curNumberHasDecimal=!0;continue}if(this.curNumber&&this.curCommandType!==-1){const f=Number(this.curNumber);if(isNaN(f))throw new SyntaxError(`Invalid number ending at ${a}`);if(this.curCommandType===X.ARC){if(this.curArgs.length===0||this.curArgs.length===1){if(0>f)throw new SyntaxError(`Expected positive number, got "${f}" at index "${a}"`)}else if((this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber!=="0"&&this.curNumber!=="1")throw new SyntaxError(`Expected a flag, got "${this.curNumber}" at index "${a}"`)}this.curArgs.push(f),this.curArgs.length===r2[this.curCommandType]&&(X.HORIZ_LINE_TO===this.curCommandType?i({type:X.HORIZ_LINE_TO,relative:this.curCommandRelative,x:f}):X.VERT_LINE_TO===this.curCommandType?i({type:X.VERT_LINE_TO,relative:this.curCommandRelative,y:f}):this.curCommandType===X.MOVE_TO||this.curCommandType===X.LINE_TO||this.curCommandType===X.SMOOTH_QUAD_TO?(i({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),X.MOVE_TO===this.curCommandType&&(this.curCommandType=X.LINE_TO)):this.curCommandType===X.CURVE_TO?i({type:X.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===X.SMOOTH_CURVE_TO?i({type:X.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===X.QUAD_TO?i({type:X.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===X.ARC&&i({type:X.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!t2(u)){if(u===","&&this.canParseCommandOrComma){this.canParseCommandOrComma=!1;continue}if(u==="+"||u==="-"||u==="."){this.curNumber=u,this.curNumberHasDecimal=u===".";continue}if(c){this.curNumber=u,this.curNumberHasDecimal=!1;continue}if(this.curArgs.length!==0)throw new SyntaxError(`Unterminated command at index ${a}.`);if(!this.canParseCommandOrComma)throw new SyntaxError(`Unexpected character "${u}" at index ${a}. Command cannot follow comma`);if(this.canParseCommandOrComma=!1,u==="z"||u==="Z"){e.push({type:X.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1;continue}else if(u==="h"||u==="H")this.curCommandType=X.HORIZ_LINE_TO,this.curCommandRelative=u==="h";else if(u==="v"||u==="V")this.curCommandType=X.VERT_LINE_TO,this.curCommandRelative=u==="v";else if(u==="m"||u==="M")this.curCommandType=X.MOVE_TO,this.curCommandRelative=u==="m";else if(u==="l"||u==="L")this.curCommandType=X.LINE_TO,this.curCommandRelative=u==="l";else if(u==="c"||u==="C")this.curCommandType=X.CURVE_TO,this.curCommandRelative=u==="c";else if(u==="s"||u==="S")this.curCommandType=X.SMOOTH_CURVE_TO,this.curCommandRelative=u==="s";else if(u==="q"||u==="Q")this.curCommandType=X.QUAD_TO,this.curCommandRelative=u==="q";else if(u==="t"||u==="T")this.curCommandType=X.SMOOTH_QUAD_TO,this.curCommandRelative=u==="t";else if(u==="a"||u==="A")this.curCommandType=X.ARC,this.curCommandRelative=u==="a";else throw new SyntaxError(`Unexpected character "${u}" at index ${a}.`)}}return e}transform(t){return Object.create(this,{parse:{value(i,a=[]){const u=Object.getPrototypeOf(this).parse.call(this,i);for(const l of u){const c=t(l);Array.isArray(c)?a.push(...c):a.push(c)}return a}}})}}const Ut=class Ut extends Xc{constructor(t){super(),typeof t=="string"?this.commands=Ut.parse(t):this.commands=t}encode(){return Ut.encode(this.commands)}getBounds(){const t=ce.CALCULATE_BOUNDS();return this.transform(t),t}transform(t){const e=[];for(const i of this.commands){const a=t(i);Array.isArray(a)?e.push(...a):e.push(a)}return this.commands=e,this}static encode(t){return J0(t)}static parse(t){const e=new e2,i=[];return e.parse(t,i),e.finish(i),i}};Ut.CLOSE_PATH=1,Ut.MOVE_TO=2,Ut.HORIZ_LINE_TO=4,Ut.VERT_LINE_TO=8,Ut.LINE_TO=16,Ut.CURVE_TO=32,Ut.SMOOTH_CURVE_TO=64,Ut.QUAD_TO=128,Ut.SMOOTH_QUAD_TO=256,Ut.ARC=512,Ut.LINE_COMMANDS=Ut.LINE_TO|Ut.HORIZ_LINE_TO|Ut.VERT_LINE_TO,Ut.DRAWING_COMMANDS=Ut.HORIZ_LINE_TO|Ut.VERT_LINE_TO|Ut.LINE_TO|Ut.CURVE_TO|Ut.SMOOTH_CURVE_TO|Ut.QUAD_TO|Ut.SMOOTH_QUAD_TO|Ut.ARC;let X=Ut;const r2={[X.MOVE_TO]:2,[X.LINE_TO]:2,[X.HORIZ_LINE_TO]:1,[X.VERT_LINE_TO]:1,[X.CLOSE_PATH]:0,[X.QUAD_TO]:4,[X.SMOOTH_QUAD_TO]:2,[X.CURVE_TO]:6,[X.SMOOTH_CURVE_TO]:4,[X.ARC]:7};function Uo([r,t],e){return[r*Math.cos(e)-t*Math.sin(e),r*Math.sin(e)+t*Math.cos(e)]}function Ur(...r){for(let t=0;t<r.length;t++)if(typeof r[t]!="number")throw new Error(`assertNumbers arguments[${t}] is not a number. ${typeof r[t]} == typeof ${r[t]}`);return!0}const $i=Math.PI;function ko(r,t,e){r.lArcFlag=r.lArcFlag===0?0:1,r.sweepFlag=r.sweepFlag===0?0:1;let{rX:i,rY:a}=r;const{x:u,y:l}=r;i=Math.abs(r.rX),a=Math.abs(r.rY);const[c,f]=Uo([(t-u)/2,(e-l)/2],-r.xRot/180*$i),d=Math.pow(c,2)/Math.pow(i,2)+Math.pow(f,2)/Math.pow(a,2);1<d&&(i*=Math.sqrt(d),a*=Math.sqrt(d)),r.rX=i,r.rY=a;const g=Math.pow(i,2)*Math.pow(f,2)+Math.pow(a,2)*Math.pow(c,2),E=(r.lArcFlag!==r.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(i,2)*Math.pow(a,2)-g)/g)),T=i*f/a*E,C=-a*c/i*E,L=Uo([T,C],r.xRot/180*$i);r.cX=L[0]+(t+u)/2,r.cY=L[1]+(e+l)/2,r.phi1=Math.atan2((f-C)/a,(c-T)/i),r.phi2=Math.atan2((-f-C)/a,(-c-T)/i),r.sweepFlag===0&&r.phi2>r.phi1&&(r.phi2-=2*$i),r.sweepFlag===1&&r.phi2<r.phi1&&(r.phi2+=2*$i),r.phi1*=180/$i,r.phi2*=180/$i}function Qc(r,t,e){Ur(r,t,e);const i=r*r+t*t-e*e;if(0>i)return[];if(i===0)return[[r*e/(r*r+t*t),t*e/(r*r+t*t)]];const a=Math.sqrt(i);return[[(r*e+t*a)/(r*r+t*t),(t*e-r*a)/(r*r+t*t)],[(r*e-t*a)/(r*r+t*t),(t*e+r*a)/(r*r+t*t)]]}const Ei=Math.PI/180;function Kc(r,t,e){return(1-e)*r+e*t}function jc(r,t,e,i){return r+Math.cos(i/180*$i)*t+Math.sin(i/180*$i)*e}function Jc(r,t,e,i){const u=t-r,l=e-t,c=i-e,f=3*u+3*c-6*l,d=(l-u)*6,g=3*u;return Math.abs(f)<1e-6?[-g/d]:i2(d/f,g/f,1e-6)}function tf(r,t,e,i,a){const u=1-a,l=u*u*u,c=3*u*u*a,f=3*u*a*a,d=a*a*a;return r*l+t*c+e*f+i*d}function i2(r,t,e=1e-6){const i=r*r/4-t;if(i<-e)return[];if(i<=e)return[-r/2];const a=Math.sqrt(i);return[-(r/2)-a,-(r/2)+a]}function n2(r,t,e){r.cX||ko(r,t,e);const i=Math.min(r.phi1,r.phi2),a=Math.max(r.phi1,r.phi2),u=a-i,l=Math.ceil(u/90),c=new Array(l);let f=t,d=e;for(let g=0;g<l;g++){const E=Kc(r.phi1,r.phi2,g/l),T=Kc(r.phi1,r.phi2,(g+1)/l),C=T-E,L=4/3*Math.tan(C*Ei/4),[N,M]=[Math.cos(E*Ei)-L*Math.sin(E*Ei),Math.sin(E*Ei)+L*Math.cos(E*Ei)],[R,W]=[Math.cos(T*Ei),Math.sin(T*Ei)],[G,b]=[R+L*Math.sin(T*Ei),W-L*Math.cos(T*Ei)],P={relative:r.relative,type:X.CURVE_TO},H=(K,tt)=>{const[Z,rt]=Uo([K*r.rX,tt*r.rY],r.xRot);return[r.cX+Z,r.cY+rt]};[P.x1,P.y1]=H(N,M),[P.x2,P.y2]=H(G,b),[P.x,P.y]=H(R,W),r.relative&&(P.x1-=f,P.y1-=d,P.x2-=f,P.y2-=d,P.x-=f,P.y-=d),[f,d]=[P.x,P.y],c[g]=P}return c}function s2(r=1e13){Ur(r);function t(e){return Math.round(e*r)/r}return function(i){return"x1"in i&&typeof i.x1<"u"&&(i.x1=t(i.x1)),"y1"in i&&typeof i.y1<"u"&&(i.y1=t(i.y1)),"x2"in i&&typeof i.x2<"u"&&(i.x2=t(i.x2)),"y2"in i&&typeof i.y2<"u"&&(i.y2=t(i.y2)),"x"in i&&typeof i.x<"u"&&(i.x=t(i.x)),"y"in i&&typeof i.y<"u"&&(i.y=t(i.y)),"rX"in i&&typeof i.rX<"u"&&(i.rX=t(i.rX)),"rY"in i&&typeof i.rY<"u"&&(i.rY=t(i.rY)),i}}function ef(){return kr((r,t,e)=>(r.relative&&(typeof r.x1<"u"&&(r.x1+=t),typeof r.y1<"u"&&(r.y1+=e),typeof r.x2<"u"&&(r.x2+=t),typeof r.y2<"u"&&(r.y2+=e),typeof r.x<"u"&&(r.x+=t),typeof r.y<"u"&&(r.y+=e),r.relative=!1),r))}function a2(){return kr((r,t,e)=>(r.relative||(typeof r.x1<"u"&&(r.x1-=t),typeof r.y1<"u"&&(r.y1-=e),typeof r.x2<"u"&&(r.x2-=t),typeof r.y2<"u"&&(r.y2-=e),typeof r.x<"u"&&(r.x-=t),typeof r.y<"u"&&(r.y-=e),r.relative=!0),r))}function u2(r=!0,t=!0,e=!0){return kr((i,a,u,l,c)=>{if(isNaN(l)&&!(i.type&X.MOVE_TO))throw new Error("path must start with moveto");return t&&i.type&X.HORIZ_LINE_TO&&(i.type=X.LINE_TO,i.y=i.relative?0:u),e&&i.type&X.VERT_LINE_TO&&(i.type=X.LINE_TO,i.x=i.relative?0:a),r&&i.type&X.CLOSE_PATH&&(i.type=X.LINE_TO,i.x=i.relative?l-a:l,i.y=i.relative?c-u:c),i.type&X.ARC&&(i.rX===0||i.rY===0)&&(i.type=X.LINE_TO,delete i.rX,delete i.rY,delete i.xRot,delete i.lArcFlag,delete i.sweepFlag),i})}function rf(){let r=NaN,t=NaN,e=NaN,i=NaN;return kr((a,u,l)=>(a.type&X.SMOOTH_CURVE_TO&&(a.type=X.CURVE_TO,r=isNaN(r)?u:r,t=isNaN(t)?l:t,a.x1=a.relative?u-r:2*u-r,a.y1=a.relative?l-t:2*l-t),a.type&X.CURVE_TO?(r=a.relative?u+a.x2:a.x2,t=a.relative?l+a.y2:a.y2):(r=NaN,t=NaN),a.type&X.SMOOTH_QUAD_TO&&(a.type=X.QUAD_TO,e=isNaN(e)?u:e,i=isNaN(i)?l:i,a.x1=a.relative?u-e:2*u-e,a.y1=a.relative?l-i:2*l-i),a.type&X.QUAD_TO?(e=a.relative?u+a.x1:a.x1,i=a.relative?l+a.y1:a.y1):(e=NaN,i=NaN),a))}function nf(){let r=NaN,t=NaN;return kr((e,i,a)=>{if(e.type&X.SMOOTH_QUAD_TO&&(e.type=X.QUAD_TO,r=isNaN(r)?i:r,t=isNaN(t)?a:t,e.x1=e.relative?i-r:2*i-r,e.y1=e.relative?a-t:2*a-t),e.type&X.QUAD_TO){r=e.relative?i+e.x1:e.x1,t=e.relative?a+e.y1:e.y1;const u=e.x1,l=e.y1;e.type=X.CURVE_TO,e.x1=((e.relative?0:i)+u*2)/3,e.y1=((e.relative?0:a)+l*2)/3,e.x2=(e.x+u*2)/3,e.y2=(e.y+l*2)/3}else r=NaN,t=NaN;return e})}function kr(r){let t=0,e=0,i=NaN,a=NaN;return function(l){if(isNaN(i)&&!(l.type&X.MOVE_TO))throw new Error("path must start with moveto");const c=r(l,t,e,i,a);return l.type&X.CLOSE_PATH&&(t=i,e=a),"x"in l&&typeof l.x<"u"&&(t=l.relative?t+l.x:l.x),"y"in l&&typeof l.y<"u"&&(e=l.relative?e+l.y:l.y),l.type&X.MOVE_TO&&(i=t,a=e),c}}function o2(r=0){Ur(r);let t=NaN,e=NaN,i=NaN,a=NaN;return kr((u,l,c,f,d)=>{const g=Math.abs;let E=!1,T=0,C=0;if(u.type&X.SMOOTH_CURVE_TO&&(T=isNaN(t)?0:l-t,C=isNaN(e)?0:c-e),u.type&(X.CURVE_TO|X.SMOOTH_CURVE_TO)?(t=u.relative?l+u.x2:u.x2,e=u.relative?c+u.y2:u.y2):(t=NaN,e=NaN),u.type&X.SMOOTH_QUAD_TO?(i=isNaN(i)?l:2*l-i,a=isNaN(a)?c:2*c-a):u.type&X.QUAD_TO?(i=u.relative?l+u.x1:u.x1,a=u.relative?c+u.y1:u.y2):(i=NaN,a=NaN),u.type&X.LINE_COMMANDS||u.type&X.ARC&&(u.rX===0||u.rY===0||!u.lArcFlag)||u.type&X.CURVE_TO||u.type&X.SMOOTH_CURVE_TO||u.type&X.QUAD_TO||u.type&X.SMOOTH_QUAD_TO){const L=typeof u.x>"u"?0:u.relative?u.x:u.x-l,N=typeof u.y>"u"?0:u.relative?u.y:u.y-c;T=isNaN(i)?typeof u.x1>"u"?T:u.relative?u.x:u.x1-l:i-l,C=isNaN(a)?typeof u.y1>"u"?C:u.relative?u.y:u.y1-c:a-c;const M=typeof u.x2>"u"?0:u.relative?u.x:u.x2-l,R=typeof u.y2>"u"?0:u.relative?u.y:u.y2-c;g(L)<=r&&g(N)<=r&&g(T)<=r&&g(C)<=r&&g(M)<=r&&g(R)<=r&&(E=!0)}return u.type&X.CLOSE_PATH&&g(l-f)<=r&&g(c-d)<=r&&(E=!0),E?[]:u})}function Gi(r,t,e,i,a,u){return Ur(r,t,e,i,a,u),kr((l,c,f,d)=>{const g=l.x1,E=l.x2,T=l.relative&&!isNaN(d),C=typeof l.x<"u"?l.x:T?0:c,L=typeof l.y<"u"?l.y:T?0:f;l.type&X.HORIZ_LINE_TO&&t!==0&&(l.type=X.LINE_TO,l.y=l.relative?0:f),l.type&X.VERT_LINE_TO&&e!==0&&(l.type=X.LINE_TO,l.x=l.relative?0:c),typeof l.x<"u"&&(l.x=l.x*r+L*e+(T?0:a)),typeof l.y<"u"&&(l.y=C*t+l.y*i+(T?0:u)),typeof l.x1<"u"&&(l.x1=l.x1*r+l.y1*e+(T?0:a)),typeof l.y1<"u"&&(l.y1=g*t+l.y1*i+(T?0:u)),typeof l.x2<"u"&&(l.x2=l.x2*r+l.y2*e+(T?0:a)),typeof l.y2<"u"&&(l.y2=E*t+l.y2*i+(T?0:u));function N(R){return R*R}const M=r*i-t*e;if(typeof l.xRot<"u"&&(r!==1||t!==0||e!==0||i!==1))if(M===0)delete l.rX,delete l.rY,delete l.xRot,delete l.lArcFlag,delete l.sweepFlag,l.type=X.LINE_TO;else{const R=l.xRot*Math.PI/180,W=Math.sin(R),G=Math.cos(R),b=1/N(l.rX),P=1/N(l.rY),H=N(G)*b+N(W)*P,K=2*W*G*(b-P),tt=N(W)*b+N(G)*P,Z=H*i*i-K*t*i+tt*t*t,rt=K*(r*i+t*e)-2*(H*e*i+tt*r*t),J=H*e*e-K*r*e+tt*r*r,st=(Math.atan2(rt,Z-J)+Math.PI)%Math.PI/2,ht=Math.sin(st),ct=Math.cos(st);l.rX=Math.abs(M)/Math.sqrt(Z*N(ct)+rt*ht*ct+J*N(ht)),l.rY=Math.abs(M)/Math.sqrt(Z*N(ht)-rt*ht*ct+J*N(ct)),l.xRot=st*180/Math.PI}return typeof l.sweepFlag<"u"&&0>M&&(l.sweepFlag=+!l.sweepFlag),l})}function l2(r,t=0,e=0){Ur(r,t,e);const i=Math.sin(r),a=Math.cos(r);return Gi(a,i,-i,a,t-t*a+e*i,e-t*i-e*a)}function h2(r,t=0){return Ur(r,t),Gi(1,0,0,1,r,t)}function c2(r,t=r){return Ur(r,t),Gi(r,0,0,t,0,0)}function f2(r){return Ur(r),Gi(1,0,Math.atan(r),1,0,0)}function p2(r){return Ur(r),Gi(1,Math.atan(r),0,1,0,0)}function d2(r=0){return Ur(r),Gi(-1,0,0,1,r,0)}function g2(r=0){return Ur(r),Gi(1,0,0,-1,0,r)}function y2(){return kr((r,t,e)=>X.ARC===r.type?n2(r,r.relative?0:t,r.relative?0:e):r)}function m2(){return kr((r,t,e)=>(r.relative&&(t=0,e=0),X.ARC===r.type&&ko(r,t,e),r))}function sf(){return r=>({...r})}function v2(){const r=sf(),t=ef(),e=nf(),i=rf(),a=kr((u,l,c)=>{const f=i(e(t(r(u))));function d(E){E>a.maxX&&(a.maxX=E),E<a.minX&&(a.minX=E)}function g(E){E>a.maxY&&(a.maxY=E),E<a.minY&&(a.minY=E)}if(f.type&X.DRAWING_COMMANDS&&(d(l),g(c)),f.type&X.HORIZ_LINE_TO&&d(f.x),f.type&X.VERT_LINE_TO&&g(f.y),f.type&X.LINE_TO&&(d(f.x),g(f.y)),f.type&X.CURVE_TO){d(f.x),g(f.y);const E=Jc(l,f.x1,f.x2,f.x);for(const C of E)0<C&&1>C&&d(tf(l,f.x1,f.x2,f.x,C));const T=Jc(c,f.y1,f.y2,f.y);for(const C of T)0<C&&1>C&&g(tf(c,f.y1,f.y2,f.y,C))}if(f.type&X.ARC){d(f.x),g(f.y),ko(f,l,c);const E=f.xRot/180*Math.PI,T=Math.cos(E)*f.rX,C=Math.sin(E)*f.rX,L=-Math.sin(E)*f.rY,N=Math.cos(E)*f.rY,[M,R]=f.phi1<f.phi2?[f.phi1,f.phi2]:-180>f.phi2?[f.phi2+360,f.phi1+360]:[f.phi2,f.phi1],W=([P,H])=>{const tt=Math.atan2(H,P)*180/Math.PI;return tt<M?tt+360:tt},G=Qc(L,-T,0).map(W);for(const P of G)P>M&&P<R&&d(jc(f.cX,T,L,P));const b=Qc(N,-C,0).map(W);for(const P of b)P>M&&P<R&&g(jc(f.cY,C,N,P))}return u});return a.minX=1/0,a.maxX=-1/0,a.minY=1/0,a.maxY=-1/0,a}const ce={ROUND:s2,TO_ABS:ef,TO_REL:a2,NORMALIZE_HVZ:u2,NORMALIZE_ST:rf,QT_TO_C:nf,INFO:kr,SANITIZE:o2,MATRIX:Gi,ROTATE:l2,TRANSLATE:h2,SCALE:c2,SKEW_X:f2,SKEW_Y:p2,X_AXIS_SYMMETRY:d2,Y_AXIS_SYMMETRY:g2,A_TO_C:y2,ANNOTATE_ARCS:m2,CLONE:sf,CALCULATE_BOUNDS:v2};let x2=0;class as extends q{name="Geo2";id=++x2;params;viewMatrix=new ie;boundingBox=new Ot;flipY=!1;constructor(t={}){var e;super(t.commands),typeof t.flipY<"u"&&(this.flipY=!!t.flipY),this.params=t,(e=this.commands)!=null&&e.length&&this.toAbs(),t.flipY&&this.matrix(1,0,0,-1,0,0)}_version=0;get version(){return this._version}set version(t){this._version=t}set needsUpdate(t){t&&this._version++}static render(t,e){if(!(!t||!(e!=null&&e.length))){Nt.identity();for(let i=0,a=(e==null?void 0:e.length)||0;i<a;i++){const u=e[i];switch(u.type){case q.MOVE_TO:t.moveTo(u.x,u.y),Nt.set(u.x,u.y);break;case q.LINE_TO:t.lineTo(u.x,u.y),Nt.set(u.x,u.y);break;case q.ARC:t.arc(u.x,u.y,u.rX,u.phi1||0,u.phi2||Math.PI*2,u.sweepFlag!==1),Nt.set(u.x,u.y);break;case q.HORIZ_LINE_TO:Nt.set(u.x,Nt.y);break;case q.VERT_LINE_TO:Nt.set(Nt.x,u.y);break;case q.CURVE_TO:Nt.set(u.x,u.y);break;case q.SMOOTH_CURVE_TO:Nt.set(u.x,u.y);break;case q.QUAD_TO:Nt.set(u.x,u.y);break;case q.SMOOTH_QUAD_TO:Nt.set(u.x,u.y);break}}}}setFromPoints(t){return t!=null&&t.length?(this.params.points=t,this.recomputePath(),this):this}recomputePath(){throw new Error("must be implemented in derived")}computeBoundingBox(){var t;this.boundingBox.makeEmpty(),Nt.identity();for(let e=0,i=((t=this.commands)==null?void 0:t.length)||0;e<i;e++){const a=this.commands[e];switch(a.type){case q.MOVE_TO:this.boundingBox.expandByXY(a.x,a.y),Nt.set(a.x,a.y);break;case q.LINE_TO:this.boundingBox.expandByXY(a.x,a.y),Nt.set(a.x,a.y);break;case q.ARC:typeof a.xRot>"u"?(this.boundingBox.expandByXY(a.x,a.y),Hr.set(a.x,a.y).addScalar(-a.rX),this.boundingBox.expandByPoint(Hr),Hr.set(a.x,a.y).addScalar(a.rX),this.boundingBox.expandByPoint(Hr)):this.boundingBox.expandByXY(a.x,a.y),Nt.set(a.x,a.y);break;case q.HORIZ_LINE_TO:this.boundingBox.expandByXY(a.x,Nt.y),Nt.set(a.x,Nt.y);break;case q.VERT_LINE_TO:this.boundingBox.expandByXY(Nt.x,a.y),Nt.set(Nt.x,a.y);break;case q.QUAD_TO:this.boundingBox.expandByXY(a.x,a.y),Nt.set(a.x,a.y);break}}return this.boundingBox}render(t){as.render(t,this.commands)}applyMatrix(t){return this.needsUpdate=!0,this.matrix(t.elements[0],t.elements[1],t.elements[3],t.elements[4],t.elements[6],t.elements[7]),this}getRenderCommands(t){var u;const e=[];for(let l=0,c=((u=this.commands)==null?void 0:u.length)||0;l<c;l++)e.push(Object.assign({},this.commands[l]));if(!t)return e;Nt.identity();const i=ce.MATRIX(t.elements[0],t.elements[1],t.elements[3],t.elements[4],t.elements[6],t.elements[7]),a=[];for(let l=0,c=e.length;l<c;l++){const f=e[l],d=i(f);if(d.type===q.ARC&&typeof d.xRot<"u"){const g=B0(Nt.x,Nt.y,d.x,d.y,d.lArcFlag,d.sweepFlag,d.rX,d.rY,0);Nt.set(d.x,d.y),d.x=g[0],d.y=g[1],d.rX=g[2]>g[3]?g[2]:g[3],d.phi1=g[4],d.phi2=g[4]+g[5],d.sweepFlag=g[7],d.phi2===0&&(d.phi2=d.phi1>0?1e-6:-1e-6)}else if(d.type===q.ARC){if(Nt.set(d.x,d.y),t.getScale(Hr),d.rX=d.rY*Math.abs(Hr.x),d.phi1!==0||d.phi2!==Math.PI*2){t.getRotation(Hr),d.phi1+=Hr.x,d.phi2+=Hr.x;const g=a[a.length-1];g.x=(g.x||0)+Math.cos(Hr.x)*d.rX*2,g.y=(g.y||0)+Math.sin(Hr.x)*d.rX*2}}else Nt.set(d.x||Nt.x,d.y||Nt.y);Array.isArray(d)?a.push(...d):a.push(d)}return a}copy(t){return this.commands=St.cloneDeep(t.commands),this.version=0,this}clone(){const t=this.constructor;return new t(this.params).copy(this)}}const Nt=new F,Hr=new F;class E2 extends as{isCircle=!0;radius=1;start=0;end=Math.PI*2;constructor(t={}){t.commands||(t.commands=[]),super(t),typeof t.radius<"u"&&(this.radius=t.radius),typeof t.start<"u"&&(this.start=t.start),typeof t.end<"u"&&(this.end=t.end),this.recomputePath()}recomputePath(){var i,a;if(!((a=(i=this.params)==null?void 0:i.points)!=null&&a.length))return this;const t=this.params.points,e=[];for(let u=0,l=t.length;u<l;u++)e.push({type:q.MOVE_TO,x:t[u].x>0?t[u].x+this.radius:t[u].x-this.radius,y:t[u].y*(this.params.flipY?-1:1),relative:!1}),e.push({type:q.ARC,rX:this.radius,rY:this.radius,xRot:void 0,lArcFlag:0,sweepFlag:1,phi1:this.start,phi2:this.end,x:t[u].x,y:t[u].y*(this.params.flipY?-1:1),relative:!1});return this.commands=e,this}}class A2{params;static splitLimit=100;constructor(t={}){this.params=t}destroy(){}static getInstanceByElement(t,e=!1){if(!t)return;let i;switch(t.nodeName){case"path":i=this.getInstanceByPath(t,e);break;case"circle":i=this.getInstanceByCircle(t,e);break}return i||console.error(`unsupported: ${t.nodeName}`),i}static getInstanceByPath(t,e=!1){if(!t)return;const i=t.getAttribute("d");if(!i)return;const a=i.replace(/([+\-.])\s+/gm,"$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,""),u=a.match(/M[^M]*/g);if(!u||u.length<=this.splitLimit)return new as({commands:a,flipY:e});const l=[];for(let c=u.length;c>=0;c-=this.splitLimit){const d=u.slice(c,c+this.splitLimit).join(" ");l.push(new as({commands:d,flipY:e}))}return l}static getInstanceByCircle(t,e=!1){if(!t||t.nodeName!=="circle")return;af.set(Lo(t,"cx",0),Lo(t,"cy",0));const i=Lo(t,"r",0);return new E2({points:[af.clone()],radius:i,flipY:e})}static getInstance(t,e=!1){if(t)return new as({commands:t,flipY:e})}}const af=new F;class w2{svg;offset=new F;svgRoot;layers=[];elementsMap={};boundingBoxMap={};boundingBox=new Ot;svgSkeletons=[];data;_exceptTypes=["view"];_exceptIds=["viewer","mirror"];_lvi=0;bindSvg(t){return this.svg=t,this.svgRoot=Tc(this.svg),this.layers=this.getLayers(2),this.getElementsMap(this.svg,this.elementsMap),this}getLayers(t){var e;if(!this.svg)throw new Error("please bind svg first");return t===2&&((e=this.layers)!=null&&e.length)?this.layers:(this.layers=this._getSvgLayer(this.svg,t),this.layers)}_getSvgLayer(t,e=0,i=0,a=[]){var c;let u,l=t.id;if(this._exceptTypes.includes(t.tagName)||t.tagName==="defs")return this._lvi--,a;if(e&&this._lvi>e)return a;l&&!this._exceptIds.includes(l)&&(u={value:l,label:l,children:[]},a.push(u)),this._lvi++;for(let f=0,d=t.children.length;f<d;f++)u?this._getSvgLayer(t.children[f],e,this._lvi,u.children):this._getSvgLayer(t.children[f],e,this._lvi,a);return((c=u==null?void 0:u.children)==null?void 0:c.length)===0&&delete u.children,this._lvi=i,a}getElementsMap(t,e={}){return this.traverseSvg(t,i=>{i!==t&&i.id&&(e[i.id]=i)}),e}computeBoundingBoxMap(){var e;if(Object.keys(this.boundingBoxMap).length)return this.boundingBoxMap;let t=(e=this.svg)==null?void 0:e.getBoundingClientRect();return t&&this.offset.set(t.left,t.top),this.traverseSvg(this.svg,i=>{if(!i.id)return;if(i.tagName==="use"){const l=this.getUseSymbolId(i);if(!l)return;const c=this.boundingBoxMap[l];if(c&&!c.isEmpty()){Ai.set(Number(i.getAttribute("x")||"0"),Number(i.getAttribute("y")||"0")),nu.composeSvgTransform(Ai.x,Ai.y,i.getAttribute("transform"));const g=new Ot().copy(c).applyMatrix3(nu);this.boundingBoxMap[i.id]=g;return}const f=this.getUseElementBoundingBoxWithSymbol(i);if(!f)return;this.boundingBoxMap[l]=f,Ai.set(Number(i.getAttribute("x")||"0"),Number(i.getAttribute("y")||"0")),nu.composeSvgTransform(Ai.x,Ai.y,i.getAttribute("transform"));const d=new Ot().copy(f).applyMatrix3(nu);this.boundingBoxMap[i.id]=d,this.boundingBox.expandByBox(d);return}if(typeof i.getBBox!="function")return;const a=i.getBBox();if((!a.width||!a.height)&&i.tagName==="path"){const l=A2.getInstanceByPath(i);if(!Array.isArray(l)){const c=l==null?void 0:l.computeBoundingBox();if(!c||c.isEmpty())return;c.getSize(Ai),a.x=c.min.x,a.y=c.max.y,a.width=Ai.x,a.height=Ai.y}}if(!a.width||!a.height)return;const u=new Ot(new F(a.x,a.y),new F(a.x+a.width,a.y+a.height));this.boundingBoxMap[i.id]=u.round(),this.boundingBox.expandByBox(u)}),this.boundingBoxMap}updateLayersVisibility(t,e=!1){if(!this.elementsMap)throw new Error("please bind svg first");this._updateAllLayersVisibility(!e),t!=null&&t.length||(t=["background"]);for(let i=0,a=t.length;i<a;i++){const u=this.getElementById(t[i]);u&&this._updateLayersVisibility(u,e,!0,!0)}}_updateAllLayersVisibility(t=!1){Object.values(this.elementsMap).forEach(e=>{e.tagName==="svg"||e.tagName==="symbol"||!e.getAttribute("id")||(e.style.display=t?"block":"none")})}_updateLayersVisibility(t,e=!1,i=!1,a=!1){var u,l;if(!(!t||t.tagName==="svg"||!t.getAttribute("id"))){if(t.style.display=e?"block":"none",i&&e){let c=t.parentElement;for(;c&&c.tagName!=="svg";)c.style.display=e?"block":"none",c=c.parentElement}if(a&&((u=t.children)==null?void 0:u.length)>0)for(let c=0,f=(l=t.children)==null?void 0:l.length;c<f;c++)this._updateLayersVisibility(t.children[c],e,!1,!0)}}updateVisibilityByAssetType(t,e=!1,i){i||(i=M0[t]),this.updateLayersVisibility(i,!e)}updateVisibilityByAssetTypes(t,e=!1,i){if(Array.isArray(t)||(t=[t]),!!(t!=null&&t.length))for(let a=0,u=t.length;a<u;a++)this.updateVisibilityByAssetType(t[a],e,i)}getElementById(t){if(!this.elementsMap)throw new Error("please bind svg first");return this.elementsMap[t]}getElementBoundingBox(t){return this.boundingBoxMap[t]}findSkeletonByPath(t=[]){let e=0,i;const a=Object.keys(this.elementsMap);for(let u=0,l=a.length;u<l;u++){const c=this.elementsMap[a[u]];if(!c)continue;const f=c.getAttribute("d");f&&(f.length<e||(e=f.length,i=c.id?c:c.parent))}return i&&t.push(i),t}setTextInChildren2(t,e){var a;let i;((a=t==null?void 0:t.children)==null?void 0:a.length)<2?(i=Oo("text"),i.setAttribute("dy","1em"),t.appendChild(i)):i=t.children[t.children.length-1],i.innerHTML=e}traverseSvg(t,e){var i;if(!this._exceptTypes.includes(t.tagName)&&!(t.tagName!=="svg"&&t.tagName!=="defs"&&!t.id)&&!(t.tagName==="g"&&((i=t.children)==null?void 0:i.length)===0)){this._exceptIds.includes(t.id)||e(t);for(let a=0,u=t.children.length;a<u;a++)this.traverseSvg(t.children[a],e)}}traverseSvgTLayers(t,e){var i;if(Array.isArray(t)){for(let a=0,u=t.length;a<u;a++)this.traverseSvgTLayers(t[a],e);return}if(e(t),!!((i=t.children)!=null&&i.length))for(let a=0,u=t.children.length;a<u;a++)this.traverseSvgTLayers(t.children[a],e)}getLabelElementsByType(t,e={}){const i=this.getElementById(iu(t));return i&&this.getElementsMap(i,e),e}getLabelElementById(t,e="rm"){if(!t)return;const i=this.getElementById(t);if(!i)return;let a=i.getAttribute("aid");return a||(a="l-"+e+"-"+t),this.getElementById(a)}setLabelsById(t,e,i="rm"){var l,c;const a=this.getLabelElementById(t,i);if(!a)return;const u=((l=a.children)==null?void 0:l.length)||0;for(let f=0,d=((e==null?void 0:e.length)||0)-(u-1);f<d;f++){const g=Oo("text");g.setAttribute("x","0"),g.setAttribute("y",u+f+"em"),a.appendChild(g)}for(let f=1,d=(c=a.children)==null?void 0:c.length;f<d;f++)a.children[f].textContent=e&&f<=e.length?e[f-1]:""}clearAssetLabelsByType(t="rm"){var a;const e=this.getLabelElementsByType(t),i=St.keys(e);for(let u=0,l=i.length;u<l;u++){const c=e[i[u]];for(let f=1,d=((a=c.children)==null?void 0:a.length)||0;f<d;f++)c.children[f].textContent=""}}getUseSymbolId(t){var e;if(!(!t||t.tagName!=="use"))return(e=t.getAttribute("xlink:href"))==null?void 0:e.substring(1)}getUseSymbol(t){if(!t||t.tagName!=="use")return;const e=this.getUseSymbolId(t);if(e)return this.getElementById(e)}setElementState2selected(t,e=!1){var a;if(!t)return;if(t.tagName==="use"){const u=this._getSymbolBox(t);if(!u)return;e?(a=t.parentNode)==null||a.insertBefore(u,t):t.parentNode&&t.parentNode.contains(u)&&t.parentNode.removeChild(u);return}let i=t.getAttribute("class");i||(i=""),e?i="danger":i=St.replace(i,"danger","").trim(),t.setAttribute("class",i)}_getSymbolBox(t){if(!t)return;const e=t.id+"-boundingBox";let i=this.getElementById(e);if(i)return i;const a=this.getUseSymbol(t);if(!a)return;let u=this.getElementBoundingBox(t.id);if(!u||u.isEmpty())return;i=document.createElementNS("http://www.w3.org/2000/svg","rect"),i.setAttribute("id",e),i.setAttribute("class","danger"),i.setAttribute("x",u.min.x.toString()),i.setAttribute("y",u.min.y.toString());const l=new F;return u.getSize(l),i.setAttribute("width",l.x.toString()),i.setAttribute("height",l.y.toString()),a.getAttribute("transform")&&i.setAttribute("transform",a.getAttribute("transform")||""),a.getAttribute("style")&&i.setAttribute("style",a.getAttribute("style")||""),this.elementsMap[e]=i,i}getUseElementBoundingBoxWithSymbol(t){var f;if(!t)return;const e=(f=t.getAttribute("xlink:href"))==null?void 0:f.substring(1);if(!e)return;let i=this.getElementById(e);if(!i)return;const a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.style.position="absolute",a.style.top="-9999px",a.style.left="-9999px";let u;if(St.lowerCase(i.tagName)==="symbol"){u=document.createElementNS("http://www.w3.org/2000/svg","g");for(let d=0,g=i.childNodes.length;d<g;d++){const E=i.childNodes[d].cloneNode(!0);u.appendChild(E)}}else u=i.cloneNode(!0);a.appendChild(u),u.setAttribute("style","stroke: #333333;"),document.body.appendChild(a);const l=a.getBBox();if(document.body.removeChild(a),!l)return;const c=new Ot;return c.set(new F(l.x,l.y),new F(l.x+l.width,l.y+l.height)),c}fontZoom(t,e=1){const i=this.getElementById(t);if(!i)return;let a=i.getAttribute("font-size");a||(a="12");const u=/(\d+)([a-zA-Z%]+)/.exec(a),l=u&&(u==null?void 0:u.length)>2?u[2]:"";let c=Math.round(parseFloat(a)*e*100)/100;i.setAttribute("font-size",c+l)}getCentroid(t,e=new F){const i=t.getAttribute("insX"),a=t.getAttribute("insY");return i||a?e.set(Number(i||"0"),Number(a||"0")):this.getCentroidByDom(t,e)}getCentroidByDom(t,e=new F){const i=Number(t.getAttribute("x")||"0"),a=Number(t.getAttribute("y")||"0"),u=t.getBBox();let l=1,c=1,f=t.getAttribute("transform");if(!f)return e.set(i,a);const d=/scale\(\s*([^\s,)]+)[ ,]([^\s,)]+)/.exec(f);if(typeof d>"u"||d==null){const g=t.transform.baseVal;if(f&&g.numberOfItems>0){let E=g.getItem(0);E&&E.type===SVGTransform.SVG_TRANSFORM_SCALE&&(l=E.matrix.a!==0?E.matrix.a:1,c=E.matrix.d!==0?E.matrix.d:l)}else return e.set((u.x+u.width/2)*l,(u.y+u.height/2)*c)}else l=d[1]&&Number(d[1])>0?Number(d[1]):1,c=d[2]&&Number(d[2])>0?Number(d[2]):l;return i&&a?e.set(i*l,a*c):e.set((u.x+u.width/2)*l,(u.y+u.height/2)*c),e}_lastLinked=[];linkAssetsByTree(t,e){if(t||(t=er.RM),this.clearLinkedLines(t),!e||!e.value)return;const i=this.getLinesByTree(e);this.drawLinkedLines(t,i)}clearLinkedLines(t){var a;const e=ta(t);if(this.getElementById(e)){for(let u=((a=this._lastLinked)==null?void 0:a.length)-1;u>=0;u--){const l=this._lastLinked[u];l.parentNode&&l.parentNode.removeChild(l),this._lastLinked.splice(u,1)}this._lastLinked.length=0}}drawLinkedLines(t,e){var u;if(!(e!=null&&e.length))return;const i=ta(t),a=this.getElementById(i);if(a)for(let l=0,c=e.length;l<c;l++){const f=e[l][0],d=e[l][((u=e[l])==null?void 0:u.length)-1],g=Oo("line");g.setAttribute("x1",f.x.toString()),g.setAttribute("y1",f.y.toString()),g.setAttribute("x2",d.x.toString()),g.setAttribute("y2",d.y.toString()),g.setAttribute("class","danger"),g.setAttribute("style","stroke-width: 2;"),a.appendChild(g),this._lastLinked.push(g)}}getLinesByTree(t,e=[]){var u;if(!(t!=null&&t.value))return e;const i=this.getElementBoundingBox(t.value);if(!i)return e;const a=i.getCenter();return(u=t.children)==null||u.forEach(l=>{var d;const c=this.getElementBoundingBox(l==null?void 0:l.value);if(!c)return;const f=c.getCenter();e.push([a,f]),(d=l.children)!=null&&d.length&&this.getLinesByTree(l,e)}),e}}const Ai=new F,nu=new ie;class b2{name="SvgPainter";params;chef;constructor(t={},e){this.params=t,this.chef=e}drawSocialDistanceCircles(t,e="http://www.w3.org/2000/svg"){var C,L,N;if(!t)return;const i=g0(t),a=bc(t),u=2*i,l=(L=(C=this.params.socialDistance)==null?void 0:C.colors)!=null&&L.length?(N=this.params.socialDistance)==null?void 0:N.colors:[zt.green,zt.red],c=this.getRadius(a),f=t.querySelector(`#${ru}`),d=f==null?void 0:f.querySelectorAll("path");if(!f||!(d!=null&&d.length))return;let g,E;const T=new Array;for(let M=0,R=(d==null?void 0:d.length)||0;M<R;M++){if(g=d[M],E=g.getAttribute("id"),!E)continue;const W=this.chef.getElementBoundingBox(E);if(!W)continue;const G=new F;W.getCenter(G),T.push({id:E,cp:G})}for(let M=0,R=T.length;M<R;M++){T[M].color=l[0];for(let W=0,G=R;W<G;W++)T[M]!==T[W]&&F.getDistance(T[M].cp,T[W].cp)<c*2&&(T[M].color=l[1])}for(let M=0,R=T.length;M<R;M++){let W=this.createCircle(T[M],c,u,e);f.appendChild(W)}}clearSocialDistanceCircles(t){if(!t)return;const e=t.querySelector(`#${ru}`),i=e==null?void 0:e.querySelectorAll("circle");if(!(!e||!(i!=null&&i.length)))for(let a=0,u=(i==null?void 0:i.length)||0;a<u;a++){const l=i[a].getAttribute("id");l&&(l==null?void 0:l.indexOf("_circle"))>-1&&e.removeChild(i[a])}}getRadius(t){var i,a,u;let e=((a=(i=this.params)==null?void 0:i.socialDistance)==null?void 0:a.radius)||3;return((u=this.params)==null?void 0:u.displayUnits)==="imperial"?t==="Metres"||t==="m"?e/=3.28084:t==="cm"?e=e/3.28084*100:t==="mm"?e=e/3.28084*1e3:(t==="INCH"||t==="inches")&&(e*=12):t==="INCH"||t==="inches"?e=e*3.28084*12:t==="cm"?e*=100:t==="mm"&&(e*=1e3),e}createCircle(t,e,i,a){const u=document.createElementNS(a,"circle");return u.setAttributeNS(null,"id",t.id+"_circle"),u.setAttributeNS(null,"cx",t.cp.x),u.setAttributeNS(null,"cy",t.cp.y),u.setAttributeNS(null,"r",String(e)),u.setAttributeNS(null,"style",`pointer-events:none;fill-opacity:0.1;stroke:${t.color};stroke-width:${i}px;`),u}}const T2=function(r){return(r||"").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,"")};function su(r,t){if(!r||!t)return!1;if(t.indexOf(" ")!==-1)throw new Error("className should not contain space.");return r.classList?r.classList.contains(t):(" "+r.className+" ").indexOf(" "+t+" ")>-1}function ea(r,t){if(!r)return;let e=r.className;const i=(t||"").split(" ");for(let a=0,u=i.length;a<u;a++){const l=i[a];l&&(r.classList?r.classList.add(l):su(r,l)||(e+=" "+l))}r.classList||(r.className=e)}function ra(r,t){if(!r||!t)return;const e=t.split(" ");let i=" "+r.className+" ";for(let a=0,u=e.length;a<u;a++){const l=e[a];l&&(r.classList?r.classList.remove(l):su(r,l)&&(i=i.replace(" "+l+" "," ")))}r.classList||(r.className=T2(i))}class uf extends C0{isSvgScene=!0;name="SvgScene";dynamically=!0;params;socialDistanceEnable=!1;container;svg;svgStr="";svgRoot;viewBox=new Ot;chef;defaultLayers=[];skeletonLayers=[];currentLayers=[];assetType;assetsMap={};legend=[];selectedList=[];painter;_lastHighlightType="";_lastHighlightIds=[];clickSvgElementHandler=this.handleClickSvgElement.bind(this);constructor(t={}){super(),this.params=t,this.assetType=t.assetType||er.RM,this.params.socialDistanceEnable&&(this.socialDistanceEnable=!0),this.container=this.params.containerId?document.getElementById(this.params.containerId):Pt.window.document.getElementsByTagName("body")[0],this.chef=new w2,this.painter=new b2(t,this.chef)}get isMounted(){var t;return((t=this.container.querySelectorAll("svg"))==null?void 0:t.length)>0}destroy(){var t;super.destroy(),this.unmount(),(t=this.camera)==null||t.destroy()}mount(){this.svg&&(this.container.contains(this.svg)||this.container.appendChild(this.svg),this.chef.computeBoundingBoxMap())}unmount(){this.svg&&this.svg.parentNode&&this.container.contains(this.svg)&&this.container.removeChild(this.svg)}computeBoundingBox(){return this.boundingBox.makeEmpty(),!this.chef||!this.svg?this.boundingBox:(this.chef.computeBoundingBoxMap(),this.boundingBox.copy(this.chef.boundingBox),console.warn("svgScene.computeBoundingBox: ",this.chef.boundingBox.toString()),this.boundingBox)}async load(t){return new Rc().loadAsync(t)}bind(t){if(this.svgStr=t,this.svg=new DOMParser().parseFromString(t,"image/svg+xml").documentElement,console.warn("bind: ",this.name),!this.svg)throw new Error("svg load failed");let e=this.svg.getAttribute("viewBox");e&&(y0(e,this.viewBox),this.chef.bindSvg(this.svg),this.svgRoot=Tc(this.svg),this.svg.setAttribute("viewBox",`0 0 ${this.params.width} ${this.params.height}`),this.svg.setAttribute("style","transform: translateZ(0);"),this.appendStyles(),console.log(this.name,"viewBox -> ",e,this.viewBox.toString()),this.setAssetsMap(this.assetType,this.assetsMap))}appendStyles(){var e;let t=(e=this.svg)==null?void 0:e.querySelector("style");t&&(t.appendChild(document.createTextNode(`.default { stroke: ${this.params.defaultStroke}; fill: ${this.params.defaultFill}; }`)),t.appendChild(document.createTextNode(`.info { stroke: ${this.params.infoStroke}; fill: ${this.params.infoFill}; }`)),t.appendChild(document.createTextNode(`.primary { stroke: ${this.params.primaryStroke}; fill: ${this.params.primaryFill}; }`)),t.appendChild(document.createTextNode(`.success { stroke: ${this.params.successStroke}; fill: ${this.params.successFill}; }`)),t.appendChild(document.createTextNode(`.warning { stroke: ${this.params.warningStroke}; fill: ${this.params.warningFill}; }`)),t.appendChild(document.createTextNode(`.danger { stroke: ${this.params.dangerStroke}; fill: ${this.params.dangerFill}; }`)),t.appendChild(document.createTextNode(`.active { stroke: ${this.params.activeStroke}; fill: ${this.params.activeFill}; }`)))}getLayers(t=2){return this.svg?this.chef.getLayers(t):[]}setDefaultLayers(t){t!=null&&t.length&&(this.defaultLayers=t)}setSkeletonLayers(t){t!=null&&t.length&&(this.skeletonLayers=t)}setCurrentLayers(t){t!=null&&t.length&&(this.currentLayers=t)}showDefaultLayers(t,e=!1){this.setDefaultLayers(t),this.chef.updateLayersVisibility(t,e)}updateLayersVisibility(t,e=!1){this.chef.updateLayersVisibility(t,e)}setAssetType(t,e){this.assetsMap={},this.assetType=t,this.setAssetsMap(this.assetType,this.assetsMap),e||(e=[ta(t)],t!==er.RM&&e.unshift(ta(er.RM))),this.setDefaultLayers(e),this.updateLayersVisibility(this.defaultLayers,!0)}isBelongsToAssetType(t,e){e||(e=this.assetType);const i=this.getAssetsByType(e);return i==null?void 0:i.hasOwnProperty(t)}setAssetsMap(t,e={}){const i=this.chef.getElementById(ta(t));if(!i)return e;e[t]=this.chef.getElementsMap(i);const a=iu(t),u=this.chef.getElementById(a);if(!u)return e;const l=this.chef.getElementsMap(u),c=St.keys(l);if(!(c!=null&&c.length))return e;if(St.startsWith(c[0],`l-${t}-`)){const f=`l-${t}-`.length;for(let d=0,g=c.length;d<g;d++){const E=c[d].slice(f);l[E]=l[c[d]],delete l[c[d]]}}return e[a]=l,e}getAssetsByType(t){return this.assetsMap.hasOwnProperty(t)||this.setAssetsMap(t,this.assetsMap),this.assetsMap[t]}getElementById(t){if(!t)return;const e=this.getAssetsByType(this.assetType);if(!(!e||!Object.hasOwnProperty.call(e,t)))return e[t]}getAssetIdsByType(t){const e=this.getAssetsByType(t),i=[];return e?St.keys(e):i}clearFillOrStroke(t="fill"){const e=this.getAssetsByType(this.assetType),i=St.keys(e);let a;for(let u=0,l=i.length;u<l;u++)a=e[i[u]],!(!a||!a.hasAttribute(t))&&(a.removeAttribute(t),t==="stroke"&&a.removeAttribute("stroke-width"));this.clearLegendBy(t)}clearFillOrStrokeByIds(t,e="fill"){const i=this.getAssetsByType(this.assetType),a=St.keys(i);let u;for(let l=0,c=a.length;l<c;l++)t!=null&&t.length&&!t.includes(a[l])||(u=i[a[l]],!(!u||!u.hasAttribute(e))&&(u.removeAttribute(e),e==="stroke"&&u.removeAttribute("stroke-width")));this.clearLegendBy(e)}setFillOrStrokeByIds(t,e,i="fill"){const a=this.getAssetsByType(this.assetType),u=St.keys(a);let l;for(let c=0,f=u.length;c<f;c++)t.includes(u[c])&&(l=a[u[c]],l&&(l.setAttribute(i,e),i==="stroke"&&l.setAttribute("stroke-width","7"),this.addLegend(i,e,u[c])))}addLegend(t,e,i){let a=this.legend.find(u=>u.color===e);a||(a={type:t,color:e,ids:[]},this.legend.push(a)),a.ids.push(i)}clearLegendBy(t){var e;t||(this.legend.length=0);for(let i=((e=this.legend)==null?void 0:e.length)-1;i>=0;i--)this.legend[i].type===t&&this.legend.splice(i,i)}getLegend(){return this.legend}showSkeleton(){var t;(t=this.skeletonLayers)!=null&&t.length&&(this.chef.updateLayersVisibility(this.defaultLayers,!1),this.chef.updateLayersVisibility(this.skeletonLayers,!0))}hideSkeleton(){var t;(t=this.skeletonLayers)!=null&&t.length&&(this.chef.updateLayersVisibility(this.skeletonLayers,!1),this.chef.updateLayersVisibility(this.defaultLayers,!0))}setAssetLabels(t,e){this.chef.setLabelsById(t,e,this.assetType)}getAssetLabelsMap(t){var a,u;if(!t)return;const e=iu(t);let i=this.getAssetsByType(e);if(!i||!((a=Object.keys(i))!=null&&a.length)){let l=this.chef.getElementById(e);if(l||(l=this.chef.getElementById(t+"-txt-label")),!l)return;i=this.chef.getElementsMap(l),this.assetsMap[e]=i}if(!(!i||!((u=Object.keys(i))!=null&&u.length)))return i}getAssetLabelById(t,e){var l,c;const i=this.getAssetLabelsMap(t);if(!i)return;let a=i[e];if(a&&((l=a==null?void 0:a.childNodes)!=null&&l.length))return a.childNodes[0].textContent||"";const u="l-"+t+"-"+e;if(a=i[u],a&&((c=a==null?void 0:a.children)!=null&&c.length))return a.children[0].textContent||""}clearAssetLabels(){this.chef.clearAssetLabelsByType(this.assetType)}bindAssetsEvents(t){var a;const e=(a=this.svg)==null?void 0:a.querySelector("#"+t);if(!e)return;e.querySelectorAll("[id]").forEach(u=>{u instanceof SVGElement&&u.addEventListener("click",this.clickSvgElementHandler)})}handleClickSvgElement(t){var e;typeof t.preventDefault=="function"&&t.preventDefault(),console.warn("svgScene.handleClickSvgElement: ",(e=t==null?void 0:t.target)==null?void 0:e.id,t==null?void 0:t.target),this.dispatchEvent({type:"click",data:t})}socialDistanceEnableChanged(t){this.socialDistanceEnable=!!t,t?this.painter.drawSocialDistanceCircles(this.svg):this.painter.clearSocialDistanceCircles(this.svg)}highlightAssets(t,e){var a;this.resetHighlightAssets(t);const i=this.getAssetsByType(t);!i||!((a=Object.keys(i))!=null&&a.length)||(this._lastHighlightType=t,this._lastHighlightIds=Array.isArray(e)?e:[e],this._lastHighlightIds.forEach(u=>{u&&i[u]&&ea(i[u],"active")}))}resetHighlightAssets(t){var i;const e=this.getAssetsByType(t||this._lastHighlightType);!e||!((i=Object.keys(e))!=null&&i.length)||(this._lastHighlightIds.forEach(a=>{a&&e[a]&&ra(e[a],"active")}),this._lastHighlightIds.length=0)}getIntersectObjects(t,e=er.RM,i=[]){i.length=0;const a=[],u=this.getAssetsByType(e),l=St.keys(u);for(let f=0,d=l.length;f<d;f++){const g=this.chef.getElementBoundingBox(u[l[f]].id);g&&g.containsPoint(t.worldCoords)&&a.push(u[l[f]])}const c=St.sortBy(a,f=>{var d;return(d=this.chef.getElementBoundingBox(f.id))==null?void 0:d.getArea()});return i.push(...c),i}clearSelected(){var t,e;if((t=this.selectedList)!=null&&t.length)for(let i=((e=this.selectedList)==null?void 0:e.length)-1;i>=0;i--){let a=this.selectedList[i];this.selectedList.splice(i,1),this.chef.setElementState2selected(a,!1)}}clearSelectedById(t){var i,a;let e=(i=this.selectedList)==null?void 0:i.findIndex(u=>u.getAttribute("id")===t);e>-1&&(this.chef.setElementState2selected(this.selectedList[e],!1),(a=this.selectedList)==null||a.splice(e,1))}selectByIds(t,e=!1){Array.isArray(t)||(t=[t]),e||this.clearSelected();const i=St.uniq(St.map(this.selectedList,u=>u.getAttribute("id")||"")),a=this.getAssetsByType(this.assetType);for(let u=t.length-1;u>=0;u--)i.includes(t[u])?(this.clearSelectedById(t[u]),t.splice(u,1)):Object.hasOwnProperty.call(a,t[u])&&this.selectedList.push(a[t[u]]);this.selectedList.forEach(u=>{this.chef.setElementState2selected(u,!0)})}getSelectedIds(){var e;if(!((e=this.selectedList)!=null&&e.length))return;const t=[];for(let i=0,a=this.selectedList.length;i<a;i++)this.selectedList[i].id&&t.push(this.selectedList[i].id);return t}getSelectedBoundingBox(){var e;const t=new Ot;return(e=this.selectedList)!=null&&e.length?(this.selectedList.forEach(i=>{const a=this.chef.boundingBoxMap[i.id];a&&t.expandByBox(a)}),t):t.copy(this.boundingBox)}getElementsByBox(t){const e=[],i=Object.keys(this.chef.boundingBoxMap),a=this.getAssetsByType(this.assetType);for(let u=0,l=i.length;u<l;u++)if(a.hasOwnProperty(i[u])&&!(i[u].indexOf("-assets")>-1)&&t.intersectsBox(this.chef.boundingBoxMap[i[u]])){const c=a[i[u]];c&&e.push(c)}return e}getBoundingBoxById(t){if(this.chef.boundingBoxMap.hasOwnProperty(t))return new Ot().copy(this.chef.boundingBoxMap[t])}_lastLinkedIds=[];linkAssetsByTree(t){this.chef.linkAssetsByTree(this.assetType,t);const e=this.chef.getElementById(Ks.ASSET_LABELS);e&&(e.style.display="block");const i=iu(this.assetType),a=this.chef.getElementById(i);a&&(a.style.display="block");const u=this.assetsMap[i];u&&(this._lastLinkedIds.forEach(l=>{u[l]&&(u[l].style.display="none")}),this._lastLinkedIds=wc(t),this._lastLinkedIds.forEach(l=>{u[l]&&(u[l].style.display="block")}))}onBeforeRender(){}fullscreen(t=1e3,e=!1){}update(){}}class _2 extends uf{name="SvgLoadingScene";constructor(t){super(t),this.bind(`<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100">
35
35
  <view id="defaultView" viewBox="0 0 100 100" />
36
36
  <style> #svg-loading-fast circle {animation: svg-loading-fast 2s ease infinite;}
37
37
  @keyframes svg-loading-fast {
@@ -43,30 +43,30 @@ function print() { __p += __j.call(arguments, '') }
43
43
  <text x="50" y="55" style="text-anchor: middle; fill: #5CC9F5; font-size: 15px;">loading</text>
44
44
  <circle cx="50" cy="50" r="40" style="fill: none; stroke: #5CC9F5; stroke-width: 1px;" />
45
45
  </g>
46
- </svg>`)}}var Xc={exports:{}};/*! Hammer.JS - v2.0.7 - 2016-04-22
46
+ </svg>`)}}var of={exports:{}};/*! Hammer.JS - v2.0.7 - 2016-04-22
47
47
  * http://hammerjs.github.io/
48
48
  *
49
49
  * Copyright (c) 2016 Jorik Tangelder;
50
- * Licensed under the MIT license */(function(r){(function(t,e,n,a){var u=["","webkit","Moz","MS","ms","o"],l=e.createElement("div"),c="function",f=Math.round,d=Math.abs,y=Date.now;function A(g,x,b){return setTimeout(z(g,b),x)}function _(g,x,b){return Array.isArray(g)?(C(g,b[x],b),!0):!1}function C(g,x,b){var B;if(g)if(g.forEach)g.forEach(x,b);else if(g.length!==a)for(B=0;B<g.length;)x.call(b,g[B],B,g),B++;else for(B in g)g.hasOwnProperty(B)&&x.call(b,g[B],B,g)}function F(g,x,b){var B="DEPRECATED METHOD: "+x+`
51
- `+b+` AT
52
- `;return function(){var G=new Error("get-stack-trace"),K=G&&G.stack?G.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",mt=t.console&&(t.console.warn||t.console.log);return mt&&mt.call(t.console,B,K),g.apply(this,arguments)}}var N;typeof Object.assign!="function"?N=function(x){if(x===a||x===null)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(x),B=1;B<arguments.length;B++){var G=arguments[B];if(G!==a&&G!==null)for(var K in G)G.hasOwnProperty(K)&&(b[K]=G[K])}return b}:N=Object.assign;var M=F(function(x,b,B){for(var G=Object.keys(b),K=0;K<G.length;)(!B||B&&x[G[K]]===a)&&(x[G[K]]=b[G[K]]),K++;return x},"extend","Use `assign`."),R=F(function(x,b){return M(x,b,!0)},"merge","Use `assign`.");function q(g,x,b){var B=x.prototype,G;G=g.prototype=Object.create(B),G.constructor=g,G._super=B,b&&N(G,b)}function z(g,x){return function(){return g.apply(x,arguments)}}function w(g,x){return typeof g==c?g.apply(x&&x[0]||a,x):g}function L(g,x){return g===a?x:g}function U(g,x,b){C(rt(x),function(B){g.addEventListener(B,b,!1)})}function j(g,x,b){C(rt(x),function(B){g.removeEventListener(B,b,!1)})}function tt(g,x){for(;g;){if(g==x)return!0;g=g.parentNode}return!1}function Z(g,x){return g.indexOf(x)>-1}function rt(g){return g.trim().split(/\s+/g)}function J(g,x,b){if(g.indexOf&&!b)return g.indexOf(x);for(var B=0;B<g.length;){if(b&&g[B][b]==x||!b&&g[B]===x)return B;B++}return-1}function st(g){return Array.prototype.slice.call(g,0)}function ht(g,x,b){for(var B=[],G=[],K=0;K<g.length;){var mt=g[K][x];J(G,mt)<0&&B.push(g[K]),G[K]=mt,K++}return B=B.sort(function(oe,xe){return oe[x]>xe[x]}),B}function ct(g,x){for(var b,B,G=x[0].toUpperCase()+x.slice(1),K=0;K<u.length;){if(b=u[K],B=b?b+G:x,B in g)return B;K++}return a}var ft=1;function O(){return ft++}function yt(g){var x=g.ownerDocument||g;return x.defaultView||x.parentWindow||t}var Bt=/mobile|tablet|ip(ad|hone|od)|android/i,Re="ontouchstart"in t,be=ct(t,"PointerEvent")!==a,se=Re&&Bt.test(navigator.userAgent),ve="touch",qr="pen",Le="mouse",ae="kinect",Se=25,Vt=1,Gt=2,Ct=4,Ht=8,Oe=1,Pe=2,ze=4,Qt=8,Ne=16,me=Pe|ze,Yt=Qt|Ne,ii=me|Yt,Ai=["x","y"],ue=["clientX","clientY"];function Dt(g,x){var b=this;this.manager=g,this.callback=x,this.element=g.element,this.target=g.options.inputTarget,this.domHandler=function(B){w(g.options.enable,[g])&&b.handler(B)},this.init()}Dt.prototype={handler:function(){},init:function(){this.evEl&&U(this.element,this.evEl,this.domHandler),this.evTarget&&U(this.target,this.evTarget,this.domHandler),this.evWin&&U(yt(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&j(this.element,this.evEl,this.domHandler),this.evTarget&&j(this.target,this.evTarget,this.domHandler),this.evWin&&j(yt(this.element),this.evWin,this.domHandler)}};function nr(g){var x,b=g.options.inputClass;return b?x=b:be?x=ar:se?x=Ki:Re?x=ha:x=vt,new x(g,Ge)}function Ge(g,x,b){var B=b.pointers.length,G=b.changedPointers.length,K=x&Vt&&B-G===0,mt=x&(Ct|Ht)&&B-G===0;b.isFirst=!!K,b.isFinal=!!mt,K&&(g.session={}),b.eventType=x,bi(g,b),g.emit("hammer.input",b),g.recognize(b),g.session.prevInput=b}function bi(g,x){var b=g.session,B=x.pointers,G=B.length;b.firstInput||(b.firstInput=sr(x)),G>1&&!b.firstMultiple?b.firstMultiple=sr(x):G===1&&(b.firstMultiple=!1);var K=b.firstInput,mt=b.firstMultiple,Jt=mt?mt.center:K.center,oe=x.center=Ye(B);x.timeStamp=y(),x.deltaTime=x.timeStamp-K.timeStamp,x.angle=wi(Jt,oe),x.distance=ni(Jt,oe),mr(b,x),x.offsetDirection=Xi(x.deltaX,x.deltaY);var xe=Yi(x.deltaTime,x.deltaX,x.deltaY);x.overallVelocityX=xe.x,x.overallVelocityY=xe.y,x.overallVelocity=d(xe.x)>d(xe.y)?xe.x:xe.y,x.scale=mt?P(mt.pointers,B):1,x.rotation=mt?bn(mt.pointers,B):0,x.maxPointers=b.prevInput?x.pointers.length>b.prevInput.maxPointers?x.pointers.length:b.prevInput.maxPointers:x.pointers.length,Gi(b,x);var Ar=g.element;tt(x.srcEvent.target,Ar)&&(Ar=x.srcEvent.target),x.target=Ar}function mr(g,x){var b=x.center,B=g.offsetDelta||{},G=g.prevDelta||{},K=g.prevInput||{};(x.eventType===Vt||K.eventType===Ct)&&(G=g.prevDelta={x:K.deltaX||0,y:K.deltaY||0},B=g.offsetDelta={x:b.x,y:b.y}),x.deltaX=G.x+(b.x-B.x),x.deltaY=G.y+(b.y-B.y)}function Gi(g,x){var b=g.lastInterval||x,B=x.timeStamp-b.timeStamp,G,K,mt,Jt;if(x.eventType!=Ht&&(B>Se||b.velocity===a)){var oe=x.deltaX-b.deltaX,xe=x.deltaY-b.deltaY,Ar=Yi(B,oe,xe);K=Ar.x,mt=Ar.y,G=d(Ar.x)>d(Ar.y)?Ar.x:Ar.y,Jt=Xi(oe,xe),g.lastInterval=x}else G=b.velocity,K=b.velocityX,mt=b.velocityY,Jt=b.direction;x.velocity=G,x.velocityX=K,x.velocityY=mt,x.direction=Jt}function sr(g){for(var x=[],b=0;b<g.pointers.length;)x[b]={clientX:f(g.pointers[b].clientX),clientY:f(g.pointers[b].clientY)},b++;return{timeStamp:y(),pointers:x,center:Ye(x),deltaX:g.deltaX,deltaY:g.deltaY}}function Ye(g){var x=g.length;if(x===1)return{x:f(g[0].clientX),y:f(g[0].clientY)};for(var b=0,B=0,G=0;G<x;)b+=g[G].clientX,B+=g[G].clientY,G++;return{x:f(b/x),y:f(B/x)}}function Yi(g,x,b){return{x:x/g||0,y:b/g||0}}function Xi(g,x){return g===x?Oe:d(g)>=d(x)?g<0?Pe:ze:x<0?Qt:Ne}function ni(g,x,b){b||(b=Ai);var B=x[b[0]]-g[b[0]],G=x[b[1]]-g[b[1]];return Math.sqrt(B*B+G*G)}function wi(g,x,b){b||(b=Ai);var B=x[b[0]]-g[b[0]],G=x[b[1]]-g[b[1]];return Math.atan2(G,B)*180/Math.PI}function bn(g,x){return wi(x[1],x[0],ue)+wi(g[1],g[0],ue)}function P(g,x){return ni(x[0],x[1],ue)/ni(g[0],g[1],ue)}var it={mousedown:Vt,mousemove:Gt,mouseup:Ct},at="mousedown",wt="mousemove mouseup";function vt(){this.evEl=at,this.evWin=wt,this.pressed=!1,Dt.apply(this,arguments)}q(vt,Dt,{handler:function(x){var b=it[x.type];b&Vt&&x.button===0&&(this.pressed=!0),b&Gt&&x.which!==1&&(b=Ct),this.pressed&&(b&Ct&&(this.pressed=!1),this.callback(this.manager,b,{pointers:[x],changedPointers:[x],pointerType:Le,srcEvent:x}))}});var fe={pointerdown:Vt,pointermove:Gt,pointerup:Ct,pointercancel:Ht,pointerout:Ht},Me={2:ve,3:qr,4:Le,5:ae},xr="pointerdown",Zi="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(xr="MSPointerDown",Zi="MSPointerMove MSPointerUp MSPointerCancel");function ar(){this.evEl=xr,this.evWin=Zi,Dt.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}q(ar,Dt,{handler:function(x){var b=this.store,B=!1,G=x.type.toLowerCase().replace("ms",""),K=fe[G],mt=Me[x.pointerType]||x.pointerType,Jt=mt==ve,oe=J(b,x.pointerId,"pointerId");K&Vt&&(x.button===0||Jt)?oe<0&&(b.push(x),oe=b.length-1):K&(Ct|Ht)&&(B=!0),!(oe<0)&&(b[oe]=x,this.callback(this.manager,K,{pointers:b,changedPointers:[x],pointerType:mt,srcEvent:x}),B&&b.splice(oe,1))}});var wn={touchstart:Vt,touchmove:Gt,touchend:Ct,touchcancel:Ht},Qi="touchstart",si="touchstart touchmove touchend touchcancel";function Tn(){this.evTarget=Qi,this.evWin=si,this.started=!1,Dt.apply(this,arguments)}q(Tn,Dt,{handler:function(x){var b=wn[x.type];if(b===Vt&&(this.started=!0),!!this.started){var B=_n.call(this,x,b);b&(Ct|Ht)&&B[0].length-B[1].length===0&&(this.started=!1),this.callback(this.manager,b,{pointers:B[0],changedPointers:B[1],pointerType:ve,srcEvent:x})}}});function _n(g,x){var b=st(g.touches),B=st(g.changedTouches);return x&(Ct|Ht)&&(b=ht(b.concat(B),"identifier")),[b,B]}var ji={touchstart:Vt,touchmove:Gt,touchend:Ct,touchcancel:Ht},el="touchstart touchmove touchend touchcancel";function Ki(){this.evTarget=el,this.targetIds={},Dt.apply(this,arguments)}q(Ki,Dt,{handler:function(x){var b=ji[x.type],B=rl.call(this,x,b);B&&this.callback(this.manager,b,{pointers:B[0],changedPointers:B[1],pointerType:ve,srcEvent:x})}});function rl(g,x){var b=st(g.touches),B=this.targetIds;if(x&(Vt|Gt)&&b.length===1)return B[b[0].identifier]=!0,[b,b];var G,K,mt=st(g.changedTouches),Jt=[],oe=this.target;if(K=b.filter(function(xe){return tt(xe.target,oe)}),x===Vt)for(G=0;G<K.length;)B[K[G].identifier]=!0,G++;for(G=0;G<mt.length;)B[mt[G].identifier]&&Jt.push(mt[G]),x&(Ct|Ht)&&delete B[mt[G].identifier],G++;if(Jt.length)return[ht(K.concat(Jt),"identifier"),Jt]}var la=2500,su=25;function ha(){Dt.apply(this,arguments);var g=z(this.handler,this);this.touch=new Ki(this.manager,g),this.mouse=new vt(this.manager,g),this.primaryTouch=null,this.lastTouches=[]}q(ha,Dt,{handler:function(x,b,B){var G=B.pointerType==ve,K=B.pointerType==Le;if(!(K&&B.sourceCapabilities&&B.sourceCapabilities.firesTouchEvents)){if(G)il.call(this,b,B);else if(K&&nl.call(this,B))return;this.callback(x,b,B)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function il(g,x){g&Vt?(this.primaryTouch=x.changedPointers[0].identifier,au.call(this,x)):g&(Ct|Ht)&&au.call(this,x)}function au(g){var x=g.changedPointers[0];if(x.identifier===this.primaryTouch){var b={x:x.clientX,y:x.clientY};this.lastTouches.push(b);var B=this.lastTouches,G=function(){var K=B.indexOf(b);K>-1&&B.splice(K,1)};setTimeout(G,la)}}function nl(g){for(var x=g.srcEvent.clientX,b=g.srcEvent.clientY,B=0;B<this.lastTouches.length;B++){var G=this.lastTouches[B],K=Math.abs(x-G.x),mt=Math.abs(b-G.y);if(K<=su&&mt<=su)return!0}return!1}var uu=ct(l.style,"touchAction"),ou=uu!==a,lu="compute",ca="auto",fa="manipulation",Ti="none",Cn="pan-x",Dn="pan-y",os=sl();function pa(g,x){this.manager=g,this.set(x)}pa.prototype={set:function(g){g==lu&&(g=this.compute()),ou&&this.manager.element.style&&os[g]&&(this.manager.element.style[uu]=g),this.actions=g.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var g=[];return C(this.manager.recognizers,function(x){w(x.options.enable,[x])&&(g=g.concat(x.getTouchAction()))}),ls(g.join(" "))},preventDefaults:function(g){var x=g.srcEvent,b=g.offsetDirection;if(this.manager.session.prevented){x.preventDefault();return}var B=this.actions,G=Z(B,Ti)&&!os[Ti],K=Z(B,Dn)&&!os[Dn],mt=Z(B,Cn)&&!os[Cn];if(G){var Jt=g.pointers.length===1,oe=g.distance<2,xe=g.deltaTime<250;if(Jt&&oe&&xe)return}if(!(mt&&K)&&(G||K&&b&me||mt&&b&Yt))return this.preventSrc(x)},preventSrc:function(g){this.manager.session.prevented=!0,g.preventDefault()}};function ls(g){if(Z(g,Ti))return Ti;var x=Z(g,Cn),b=Z(g,Dn);return x&&b?Ti:x||b?x?Cn:Dn:Z(g,fa)?fa:ca}function sl(){if(!ou)return!1;var g={},x=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(b){g[b]=x?t.CSS.supports("touch-action",b):!0}),g}var _i=1,Xe=2,Ji=4,ai=8,Er=ai,tn=16,ur=32;function Wr(g){this.options=N({},this.defaults,g||{}),this.id=O(),this.manager=null,this.options.enable=L(this.options.enable,!0),this.state=_i,this.simultaneous={},this.requireFail=[]}Wr.prototype={defaults:{},set:function(g){return N(this.options,g),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(g){if(_(g,"recognizeWith",this))return this;var x=this.simultaneous;return g=hs(g,this),x[g.id]||(x[g.id]=g,g.recognizeWith(this)),this},dropRecognizeWith:function(g){return _(g,"dropRecognizeWith",this)?this:(g=hs(g,this),delete this.simultaneous[g.id],this)},requireFailure:function(g){if(_(g,"requireFailure",this))return this;var x=this.requireFail;return g=hs(g,this),J(x,g)===-1&&(x.push(g),g.requireFailure(this)),this},dropRequireFailure:function(g){if(_(g,"dropRequireFailure",this))return this;g=hs(g,this);var x=J(this.requireFail,g);return x>-1&&this.requireFail.splice(x,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(g){return!!this.simultaneous[g.id]},emit:function(g){var x=this,b=this.state;function B(G){x.manager.emit(G,g)}b<ai&&B(x.options.event+hu(b)),B(x.options.event),g.additionalEvent&&B(g.additionalEvent),b>=ai&&B(x.options.event+hu(b))},tryEmit:function(g){if(this.canEmit())return this.emit(g);this.state=ur},canEmit:function(){for(var g=0;g<this.requireFail.length;){if(!(this.requireFail[g].state&(ur|_i)))return!1;g++}return!0},recognize:function(g){var x=N({},g);if(!w(this.options.enable,[this,x])){this.reset(),this.state=ur;return}this.state&(Er|tn|ur)&&(this.state=_i),this.state=this.process(x),this.state&(Xe|Ji|ai|tn)&&this.tryEmit(x)},process:function(g){},getTouchAction:function(){},reset:function(){}};function hu(g){return g&tn?"cancel":g&ai?"end":g&Ji?"move":g&Xe?"start":""}function cu(g){return g==Ne?"down":g==Qt?"up":g==Pe?"left":g==ze?"right":""}function hs(g,x){var b=x.manager;return b?b.get(g):g}function Ze(){Wr.apply(this,arguments)}q(Ze,Wr,{defaults:{pointers:1},attrTest:function(g){var x=this.options.pointers;return x===0||g.pointers.length===x},process:function(g){var x=this.state,b=g.eventType,B=x&(Xe|Ji),G=this.attrTest(g);return B&&(b&Ht||!G)?x|tn:B||G?b&Ct?x|ai:x&Xe?x|Ji:Xe:ur}});function Sn(){Ze.apply(this,arguments),this.pX=null,this.pY=null}q(Sn,Ze,{defaults:{event:"pan",threshold:10,pointers:1,direction:ii},getTouchAction:function(){var g=this.options.direction,x=[];return g&me&&x.push(Dn),g&Yt&&x.push(Cn),x},directionTest:function(g){var x=this.options,b=!0,B=g.distance,G=g.direction,K=g.deltaX,mt=g.deltaY;return G&x.direction||(x.direction&me?(G=K===0?Oe:K<0?Pe:ze,b=K!=this.pX,B=Math.abs(g.deltaX)):(G=mt===0?Oe:mt<0?Qt:Ne,b=mt!=this.pY,B=Math.abs(g.deltaY))),g.direction=G,b&&B>x.threshold&&G&x.direction},attrTest:function(g){return Ze.prototype.attrTest.call(this,g)&&(this.state&Xe||!(this.state&Xe)&&this.directionTest(g))},emit:function(g){this.pX=g.deltaX,this.pY=g.deltaY;var x=cu(g.direction);x&&(g.additionalEvent=this.options.event+x),this._super.emit.call(this,g)}});function cs(){Ze.apply(this,arguments)}q(cs,Ze,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Ti]},attrTest:function(g){return this._super.attrTest.call(this,g)&&(Math.abs(g.scale-1)>this.options.threshold||this.state&Xe)},emit:function(g){if(g.scale!==1){var x=g.scale<1?"in":"out";g.additionalEvent=this.options.event+x}this._super.emit.call(this,g)}});function On(){Wr.apply(this,arguments),this._timer=null,this._input=null}q(On,Wr,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[ca]},process:function(g){var x=this.options,b=g.pointers.length===x.pointers,B=g.distance<x.threshold,G=g.deltaTime>x.time;if(this._input=g,!B||!b||g.eventType&(Ct|Ht)&&!G)this.reset();else if(g.eventType&Vt)this.reset(),this._timer=A(function(){this.state=Er,this.tryEmit()},x.time,this);else if(g.eventType&Ct)return Er;return ur},reset:function(){clearTimeout(this._timer)},emit:function(g){this.state===Er&&(g&&g.eventType&Ct?this.manager.emit(this.options.event+"up",g):(this._input.timeStamp=y(),this.manager.emit(this.options.event,this._input)))}});function da(){Ze.apply(this,arguments)}q(da,Ze,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Ti]},attrTest:function(g){return this._super.attrTest.call(this,g)&&(Math.abs(g.rotation)>this.options.threshold||this.state&Xe)}});function fs(){Ze.apply(this,arguments)}q(fs,Ze,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:me|Yt,pointers:1},getTouchAction:function(){return Sn.prototype.getTouchAction.call(this)},attrTest:function(g){var x=this.options.direction,b;return x&(me|Yt)?b=g.overallVelocity:x&me?b=g.overallVelocityX:x&Yt&&(b=g.overallVelocityY),this._super.attrTest.call(this,g)&&x&g.offsetDirection&&g.distance>this.options.threshold&&g.maxPointers==this.options.pointers&&d(b)>this.options.velocity&&g.eventType&Ct},emit:function(g){var x=cu(g.offsetDirection);x&&this.manager.emit(this.options.event+x,g),this.manager.emit(this.options.event,g)}});function Ci(){Wr.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}q(Ci,Wr,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[fa]},process:function(g){var x=this.options,b=g.pointers.length===x.pointers,B=g.distance<x.threshold,G=g.deltaTime<x.time;if(this.reset(),g.eventType&Vt&&this.count===0)return this.failTimeout();if(B&&G&&b){if(g.eventType!=Ct)return this.failTimeout();var K=this.pTime?g.timeStamp-this.pTime<x.interval:!0,mt=!this.pCenter||ni(this.pCenter,g.center)<x.posThreshold;this.pTime=g.timeStamp,this.pCenter=g.center,!mt||!K?this.count=1:this.count+=1,this._input=g;var Jt=this.count%x.taps;if(Jt===0)return this.hasRequireFailures()?(this._timer=A(function(){this.state=Er,this.tryEmit()},x.interval,this),Xe):Er}return ur},failTimeout:function(){return this._timer=A(function(){this.state=ur},this.options.interval,this),ur},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==Er&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function Vr(g,x){return x=x||{},x.recognizers=L(x.recognizers,Vr.defaults.preset),new ps(g,x)}Vr.VERSION="2.0.7",Vr.defaults={domEvents:!1,touchAction:lu,enable:!0,inputTarget:null,inputClass:null,preset:[[da,{enable:!1}],[cs,{enable:!1},["rotate"]],[fs,{direction:me}],[Sn,{direction:me},["swipe"]],[Ci],[Ci,{event:"doubletap",taps:2},["tap"]],[On]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var al=1,ga=2;function ps(g,x){this.options=N({},Vr.defaults,x||{}),this.options.inputTarget=this.options.inputTarget||g,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=g,this.input=nr(this),this.touchAction=new pa(this,this.options.touchAction),ds(this,!0),C(this.options.recognizers,function(b){var B=this.add(new b[0](b[1]));b[2]&&B.recognizeWith(b[2]),b[3]&&B.requireFailure(b[3])},this)}ps.prototype={set:function(g){return N(this.options,g),g.touchAction&&this.touchAction.update(),g.inputTarget&&(this.input.destroy(),this.input.target=g.inputTarget,this.input.init()),this},stop:function(g){this.session.stopped=g?ga:al},recognize:function(g){var x=this.session;if(!x.stopped){this.touchAction.preventDefaults(g);var b,B=this.recognizers,G=x.curRecognizer;(!G||G&&G.state&Er)&&(G=x.curRecognizer=null);for(var K=0;K<B.length;)b=B[K],x.stopped!==ga&&(!G||b==G||b.canRecognizeWith(G))?b.recognize(g):b.reset(),!G&&b.state&(Xe|Ji|ai)&&(G=x.curRecognizer=b),K++}},get:function(g){if(g instanceof Wr)return g;for(var x=this.recognizers,b=0;b<x.length;b++)if(x[b].options.event==g)return x[b];return null},add:function(g){if(_(g,"add",this))return this;var x=this.get(g.options.event);return x&&this.remove(x),this.recognizers.push(g),g.manager=this,this.touchAction.update(),g},remove:function(g){if(_(g,"remove",this))return this;if(g=this.get(g),g){var x=this.recognizers,b=J(x,g);b!==-1&&(x.splice(b,1),this.touchAction.update())}return this},on:function(g,x){if(g!==a&&x!==a){var b=this.handlers;return C(rt(g),function(B){b[B]=b[B]||[],b[B].push(x)}),this}},off:function(g,x){if(g!==a){var b=this.handlers;return C(rt(g),function(B){x?b[B]&&b[B].splice(J(b[B],x),1):delete b[B]}),this}},emit:function(g,x){this.options.domEvents&&ul(g,x);var b=this.handlers[g]&&this.handlers[g].slice();if(!(!b||!b.length)){x.type=g,x.preventDefault=function(){x.srcEvent.preventDefault()};for(var B=0;B<b.length;)b[B](x),B++}},destroy:function(){this.element&&ds(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function ds(g,x){var b=g.element;if(b.style){var B;C(g.options.cssProps,function(G,K){B=ct(b.style,K),x?(g.oldCssProps[B]=b.style[B],b.style[B]=G):b.style[B]=g.oldCssProps[B]||""}),x||(g.oldCssProps={})}}function ul(g,x){var b=e.createEvent("Event");b.initEvent(g,!0,!0),b.gesture=x,x.target.dispatchEvent(b)}N(Vr,{INPUT_START:Vt,INPUT_MOVE:Gt,INPUT_END:Ct,INPUT_CANCEL:Ht,STATE_POSSIBLE:_i,STATE_BEGAN:Xe,STATE_CHANGED:Ji,STATE_ENDED:ai,STATE_RECOGNIZED:Er,STATE_CANCELLED:tn,STATE_FAILED:ur,DIRECTION_NONE:Oe,DIRECTION_LEFT:Pe,DIRECTION_RIGHT:ze,DIRECTION_UP:Qt,DIRECTION_DOWN:Ne,DIRECTION_HORIZONTAL:me,DIRECTION_VERTICAL:Yt,DIRECTION_ALL:ii,Manager:ps,Input:Dt,TouchAction:pa,TouchInput:Ki,MouseInput:vt,PointerEventInput:ar,TouchMouseInput:ha,SingleTouchInput:Tn,Recognizer:Wr,AttrRecognizer:Ze,Tap:Ci,Pan:Sn,Swipe:fs,Pinch:cs,Rotate:da,Press:On,on:U,off:j,each:C,merge:R,extend:M,assign:N,inherit:q,bindFn:z,prefixed:ct});var fu=typeof t<"u"?t:typeof self<"u"?self:{};fu.Hammer=Vr,r.exports?r.exports=Vr:t[n]=Vr})(window,document,"Hammer")})(Xc);var u2=Xc.exports;const Wi=yh(u2),Zc=new Y,Hr=new Y;class Qc extends Ir{name="orbit-controller.ts";isSvg=!1;dom;domOffset=new Y;camera;hammer;enabled=!0;enablePan=!0;enableRotate=!0;rotateSpeed=1;enableZoom=!0;minZoom=0;maxZoom=1/0;zoomSpeed=1;zoomChanged=!1;distanceStart=1;distanceEnd=1;state=-1;EPS=1e-6;focus=new Y;target=new Y;scaled=1;rotateTheta=0;enableDamping=!1;dampingFactor=.05;mouseButtons={LEFT:2,MIDDLE:1,RIGHT:0};isWheeling=!1;finalTimer;rotateStart=new Y;rotateEnd=new Y;rotateDelta=new Y;panStart=new Y;panEnd=new Y;panOffset=new Y;dollyStart=0;dollyOffset=new Y;contextMenuHandler=this.handleContextMenu.bind(this);wheelHandler=this.handleWheel.bind(this);pointerDownHandler=this.handlePointerDown.bind(this);pointerUpHandler=this.handlePointerUp.bind(this);pointerMoveHandler=this.handlePointerMove.bind(this);pointerOverHandler=Mt.debounce(this.handlePointerOver.bind(this),100);pointerLeaveHandler=this.handlePointerLeave.bind(this);tapHandler=this.handleTap.bind(this);panHandler=this.handlePan.bind(this);pinchHandler=this.handlePinch.bind(this);pressHandler=this.handlePress.bind(this);swipeHandler=this.handleSwipe.bind(this);hammerInputHandler=this.handleHammerInput.bind(this);constructor(t,e,n=!1){super(),this.isSvg=n,this.dom=t,this.camera=e,this.scaled=e.scaled.x;let a=this.dom.getBoundingClientRect();this.domOffset.set(a.left,a.top),this.dom.style.touchAction="none",this.bindEvents()}destroy(){this.unbindEvents(),super.destroy()}update(){Zc.copy(this.camera.position).sub(this.target),this.target.add(this.panOffset),this.camera.position.copy(this.target).add(Zc),this.camera.position.add(this.dollyOffset),this.camera.scaled.set(this.scaled,this.scaled),this.camera.update(),this.panOffset.set(0,0),this.dollyOffset.set(0,0),this.scaled=this.camera.scaled.x,this.dispatchEvent({type:"cameraChanged",data:{t:this.camera.position,r:this.camera.rotation.x,s:this.camera.scaled.x}})}bindEvents(){this.unbindEvents(),this.hammer=new Wi.Manager(this.dom,{domEvents:!0});const t=new Wi.Pan({threshold:0,pointers:0}),e=new Wi.Pinch({threshold:0}),n=new Wi.Tap({event:"singletap",taps:1}),a=new Wi.Press({});this.hammer.add([t,n,a,e]),e.recognizeWith(t),this.hammer.on(["panstart","panmove","panend"].join(" "),this.panHandler),this.hammer.on(["pinchstart","pinchmove","pinchend"].join(" "),this.pinchHandler),this.hammer.on("singletap",this.tapHandler),this.hammer.on("press",this.pressHandler),this.hammer.on("swipe",this.swipeHandler),this.hammer.on("hammer.input",this.hammerInputHandler),this.dom.addEventListener("contextmenu",this.contextMenuHandler),this.dom.addEventListener("wheel",this.wheelHandler,{passive:!1}),this.dom.addEventListener("mousemove",this.pointerOverHandler),this.isSvg||(this.dom.addEventListener("pointerdown",this.pointerDownHandler),this.dom.addEventListener("pointerleave",this.pointerLeaveHandler))}unbindEvents(){var t,e,n,a,u,l,c,f;(t=this.hammer)==null||t.off(["panstart","panmove","panend"].join(" "),this.panHandler),(e=this.hammer)==null||e.off(["pinchstart","pinchmove","pinchend"].join(" "),this.pinchHandler),(n=this.hammer)==null||n.off("singletap",this.tapHandler),(a=this.hammer)==null||a.off("press",this.pressHandler),(u=this.hammer)==null||u.off("swipe",this.swipeHandler),(l=this.hammer)==null||l.off("hammer.input",this.hammerInputHandler),this.dom.removeEventListener("contextmenu",this.contextMenuHandler),this.dom.removeEventListener("wheel",this.wheelHandler),this.dom.removeEventListener("mousemove",this.pointerOverHandler),this.isSvg||(this.dom.removeEventListener("pointerdown",this.pointerDownHandler),this.dom.removeEventListener("pointerleave",this.pointerLeaveHandler)),(c=this.hammer)==null||c.stop(!0),(f=this.hammer)==null||f.destroy()}setFocus(t,e){this.focus.set(t,e).sub(this.domOffset).unproject(this.camera)}handleTap(t){typeof t.preventDefault=="function"&&t.preventDefault(),console.log("【orbitController】Tap: ",t),Hr.set(t.center.x,t.center.y).sub(this.domOffset),this.dispatchEvent({type:"tap",data:{screenCoords:{x:Hr.x,y:Hr.y}},e:t})}handleDoubleTap(t){typeof t.preventDefault=="function"&&t.preventDefault(),console.log("【orbitController】DoubleTap: ",t),Hr.set(t.center.x,t.center.y).sub(this.domOffset),this.dispatchEvent({type:"doubletap",data:{screenCoords:{x:Hr.x,y:Hr.y}}})}handlePress(t){typeof t.preventDefault=="function"&&t.preventDefault(),console.log("【orbitController】Press: ",t)}handlePan(t){var n;if(((n=t.pointers)==null?void 0:n.length)!==1)return;typeof t.preventDefault=="function"&&t.preventDefault();const e={type:"panmove",data:{}};(t.isFirst||t.type==="panstart")&&(this.state=2,this.panStart.set(t.center.x,t.center.y),e.type="panstart"),(t.isFinal||t.type==="panend")&&(this.state=-1,e.type="panend"),this.panEnd.set(t.center.x,t.center.y),this.panOffset.subVectors(this.panEnd,this.panStart).multiplyScalar(-this.camera.scaled.x,-this.camera.scaled.y*(this.camera.flipY?1:-1)),this.panStart.copy(this.panEnd),Hr.set(t.center.x,t.center.y).sub(this.domOffset),e.data.screenCoords=Hr.clone(),this.dispatchEvent(e),this.enablePan&&this.update()}handlePinch(t){typeof t.preventDefault=="function"&&t.preventDefault(),t.type==="pinchstart"&&(this.dollyStart=this.camera.scaled.x,this.state=1),(t.isFinal||t.type==="pinchend")&&(this.state=-1),this.scaled=this.dollyStart*(1/t.scale);let e=(this.scaled-this.camera.scaled.x)/this.camera.scaled.x;this.setFocus(t.center.x,t.center.y),this.dollyOffset.copy(this.camera.position).lerp(this.focus,-e).sub(this.camera.position),this.update()}handleRotate(t){typeof t.preventDefault=="function"&&t.preventDefault()}handleSwipe(t){typeof t.preventDefault=="function"&&t.preventDefault()}handleHammerInput(t){t.isFirst&&(this.state=9),t.isFinal&&(this.state=-1)}handleContextMenu(t){this.enabled&&typeof t.preventDefault=="function"&&t.preventDefault()}handleWheel(t){if(typeof t.preventDefault=="function"&&t.preventDefault(),!this.enabled||!this.enableZoom||this.state!==-1)return;this.isWheeling||(this.dispatchEvent({type:"wheelstart"}),this.isWheeling=!0),typeof t.preventDefault=="function"&&t.preventDefault(),typeof t.stopPropagation=="function"&&t.stopPropagation();let e=t.deltaY;(t==null?void 0:t.deltaMode)===1?e*=16:(t==null?void 0:t.deltaMode)===2&&(e*=100),t!=null&&t.ctrlKey&&(e*=10),this.setFocus(t.clientX,t.clientY);let n=this.getZoomScale(e);e<0?this.onDollyIn(n):e>0?this.onDollyOut(n):(this.scaled=this.camera.scaled.x,this.dollyOffset.set(0,0)),this.update(),clearTimeout(this.finalTimer),this.finalTimer=setTimeout(()=>{this.isWheeling&&(this.dispatchEvent({type:"wheelend"}),this.isWheeling=!1)},500)}onDollyIn(t){this.scaled=Math.max(this.minZoom,Math.min(this.maxZoom,this.camera.scaled.x*t)),this.dollyOffset.copy(this.camera.position).lerp(this.focus,1-t).sub(this.camera.position)}onDollyOut(t){this.scaled=Math.max(this.minZoom,Math.min(this.maxZoom,this.camera.scaled.x/t)),this.dollyOffset.copy(this.camera.position).lerp(this.focus,-1+t).sub(this.camera.position)}getZoomScale(t){return Math.pow(.95,this.zoomSpeed*Math.abs(t*.03))}handlePointerDown(t){if(!this.enabled||t.button!==2)return;this.dom.addEventListener("pointermove",this.pointerMoveHandler),this.dom.addEventListener("pointerup",this.pointerUpHandler);let e=-1;t.button===0?e=this.mouseButtons.LEFT:t.button===1?e=this.mouseButtons.MIDDLE:t.button===2&&(e=this.mouseButtons.RIGHT),e===0&&(this.rotateStart.set(t.clientX,t.clientY),this.setFocus(this.rotateStart.x,this.rotateStart.y),this.state=0)}handlePointerUp(){this.dom.removeEventListener("pointermove",this.pointerMoveHandler),this.dom.removeEventListener("pointerup",this.pointerUpHandler),this.state=-1}handlePointerLeave(){this.state=-1}handlePointerMove(t){if(this.enabled&&this.state===0){if(!this.enableRotate)return;this.onRotate(t.clientX,t.clientY)}}handlePointerOver(t){t.buttons>0||(Hr.set(t.clientX,t.clientY).sub(this.domOffset),this.dispatchEvent({type:"pointerover",data:{screenCoords:{x:Hr.x,y:Hr.y}},e:t}))}onRotate(t,e){this.rotateEnd.set(t,e),this.rotateDelta.subVectors(this.rotateEnd,this.rotateStart).multiplyScalar(this.rotateSpeed);const n=this.rotateDelta.x*Math.PI*2/this.dom.clientHeight;this.rotateTheta-=n,this.rotateStart.copy(this.rotateEnd),this.camera.rotation.x-=this.rotateTheta,this.target.rotateAround(this.focus,-this.rotateTheta),this.camera.position.copy(this.target),this.camera.update(),this.rotateTheta=0}}var _t=(r=>(r.CONTEXTMENU="contextmenu",r.LOSTPOINTERCAPTURE="lostpointercapture",r.MOUSEOVER="mouseover",r.MOUSEOUT="mouseout",r.MOUSELEAVE="mouseleave",r.MOUSEENTER="mouseenter",r.MOUSEMOVE="mousemove",r.MOUSEDOWN="mousedown",r.MOUSEUP="mouseup",r.POINTERMOVE="pointermove",r.POINTERDOWN="pointerdown",r.POINTERUP="pointerup",r.POINTERCANCEL="pointercancel",r.POINTEROUT="pointerout",r.POINTERLEAVE="pointerleave",r.POINTEROVER="pointerover",r.POINTERENTER="pointerenter",r.TOUCHSTART="touchstart",r.TOUCHEND="touchend",r.TOUCHMOVE="touchmove",r.TOUCHCANCEL="touchcancel",r.WHEEL="wheel",r.WHEEL_START="wheelstart",r.WHEEL_END="wheelend",r.MOUSEWHEEL="mousewheel",r.CLICK="click",r.DBLCLICK="dblclick",r.CONTEXT_LOST="contextlost",r.CONTEXT_RESTORED="contextrestored",r.CONTROLS_CHANGED="controlschanged",r.TAP="tap",r.SINGLE_TAP="singletap",r.DOUBLE_TAP="doubletap",r.PRESS="press",r.PAN="pan",r.PAN_START="panstart",r.PAN_MOVE="panmove",r.PAN_END="panend",r.ROTATE="rotate",r.ROTATE_START="rotatestart",r.ROTATE_MOVE="rotatemove",r.ROTATE_END="rotateend",r.PINCH="pinch",r.PINCH_START="pinchstart",r.PINCH_MOVE="pinchmove",r.PINCH_END="pinchend",r.PINCH_IN="pinchin",r.PINCH_OUT="pinchout",r.SWIPE="swipe",r.CHANGE_START="change_start",r.CHANGE_END="change_end",r.CAMERA_CHANGED="cameraChanged",r))(_t||{});const Qs=new Y;class jc extends mc{isCamera=!0;type="Camera2";name="Camera2";params;matrixAutoUpdate=!1;matrixWorldAutoUpdate=!1;projectionMatrix=new re;projectionMatrixInverse=new re;viewMatrix=new re;viewMatrixNeedsUpdate=!0;viewArea=0;left=-1;right=1;top=1;bottom=-1;width=2;height=2;aspect=1;view;constructor(t){super(),this.params=t,this.width=(t==null?void 0:t.width)!==void 0?t.width:2,this.height=(t==null?void 0:t.height)!==void 0?t.height:2,this.aspect=(t==null?void 0:t.aspect)!==void 0?t.aspect:1,(t==null?void 0:t.left)!==void 0&&(this.left=t.left),(t==null?void 0:t.right)!==void 0&&(this.right=t.right),(t==null?void 0:t.top)!==void 0&&(this.top=t.top),(t==null?void 0:t.bottom)!==void 0&&(this.bottom=t.bottom);const e=(this.right+this.left)/2,n=(this.top+this.bottom)/2;if(this.aspect>1){const a=Math.round((this.right-this.left)/2/this.aspect);this.top=n+a,this.bottom=n-a}else if(this.aspect<1){const a=Math.round((this.top-this.bottom)/2*this.aspect);this.left=e-a,this.right=e+a}this.flipY=(t==null?void 0:t.flipY)===!0,this.updateProjectionMatrix(),t!=null&&t.eye&&this.position.fromArray(t.eye),t!=null&&t.up&&this.up.fromArray(t.up),this.computeBoundingBox(),this.update()}destroy(){super.destroy()}get pixelWidth(){return this.scaled.x}set(t=-1,e=1,n=1,a=-1){Qs.set(t+e,a+n).multiplyScalar(.5);const u=Math.max((e-t)/this.width,(n-a)/this.height);this.setTRS(Qs,0,u)}setByBox(t){if(!t||t.isEmpty()){console.error(`setByBox: ${t==null?void 0:t.toString()}`);return}this.set(t.min.x,t.max.x,t.max.y,t.min.y)}setTRS(t={x:0,y:0},e=0,n=0){this.position.set(t.x||0,t.y||0),this.rotation.set(e,e),this.scaled.set(n,n),this.update()}resize(){this.setSize(this.params.width,this.params.height)}setSize(t,e){this.width=t||2,this.height=e||2,this.left=this.params.left||-1,this.right=this.params.right||1,this.top=this.params.top||1,this.bottom=this.params.bottom||-1,this.aspect=t/e;const n=(this.right+this.left)/2,a=(this.top+this.bottom)/2;if(this.aspect>1){const u=Math.round((this.right-this.left)/2/this.aspect);this.top=a+u,this.bottom=a-u}else if(this.aspect<1){const u=Math.round((this.top-this.bottom)/2*this.aspect);this.left=n-u,this.right=n+u}this.updateProjectionMatrix(),this.update()}getWorldDirection(t){this.updateWorldMatrix(!0,!1);const e=this.matrixWorld.elements;return t.set(-e[6],-e[7]).normalize()}getCameraPosition(){return{x:this.position.x,y:this.position.y,z:this.position.z,s:this.scaled.x,r:this.rotation.x}}updateMatrixWorld(t=!1){super.updateMatrixWorld(t),this.updateViewMatrix()}updateProjectionMatrix(){this.parent===void 0&&this.matrixWorldAutoUpdate&&this.updateMatrixWorld(),this.projectionMatrix.makeProjection(this.left,this.right,this.top,this.bottom,this.width,this.height),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}updateViewMatrix(){this.matrixWorldInverse.copy(this.matrixWorld).invert(),this.viewMatrix.multiplyMatrices(this.projectionMatrix,this.matrixWorldInverse)}update(){this.matrixAutoUpdate||this.updateMatrix(),this.updateMatrixWorld(),this.needsUpdate=!0,this.updateBoundingBox(),this.dispatchEvent({type:"update",data:{t:this.position,r:this.rotation.x,s:this.scaled.x}})}computeBoundingBox(){return Qs.set(this.width,this.height).multiplyScalar(.5).multiplyScalar(this.scaled.x),this.boundingBox.min.subVectors(this.position,Qs),this.boundingBox.max.addVectors(this.position,Qs),this.boundingBox}updateBoundingBox(){super.updateBoundingBox(),this.viewArea=this.boundingBoxWorld.getArea()}toJSON(){const t={};return t.left=this.left,t.right=this.right,t.top=this.top,t.bottom=this.bottom,t.width=this.width,t.height=this.height,t.aspect=this.aspect,t.position=this.position.toArray(),t.rotation=this.rotation.toArray(),t.scaled=this.scaled.toArray(),t}fromJSON(t){this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.width=t.width,this.height=t.height,this.aspect=t.aspect,this.position.fromArray(t.position),this.rotation.fromArray(t.rotation),this.scaled.fromArray(t.scaled),this.updateProjectionMatrix(),this.update()}clone(){return new this.constructor.prototype.constructor().copy(this)}copy(t,e=!0){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this.width=t.width,this.height=t.height,this.aspect=t.aspect,this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this}}var Qa=(r=>(r.UPDATE="update",r))(Qa||{});class Kc extends Ir{name="SvgSelectRect";container;el;constructor(t){super(),t?this.container=t:this.container=document.getElementsByTagName("body")[0],this.el=document.createElement("div"),this.el.setAttribute("id",Kn+"SvgSelectRect"),this.el.setAttribute("class",Kn+"-svg-select-rect"),this.el.style.display="none",this.container.appendChild(this.el)}destroy(){super.destroy(),this.el&&this.el.remove()}draw(t){Jc.copy(t).getSize(Oo),So.copy(Jc.min),this.el.style.display="none",this.el.style.position="absolute",this.el.style.left=So.x+"px",this.el.style.top=So.y+"px",this.el.style.width=Oo.x+"px",this.el.style.height=Oo.y+"px",this.el.style.display="block",this.el.style.background=new Wt(he.darkBlue).setA(.1).getStyle(),this.el.style.border=he.darkBlue+" 1px dashed"}hide(){this.el.style.display="none"}}const Jc=new St,So=new Y,Oo=new Y;class o2 extends Ir{name="SvgMultiSelector";controller;scene;container;p1=new Y;p2=new Y;graph;selectEnable=!1;multiSelectEnable=!1;controllerTapHandler=this.handleControllerTap.bind(this);controllerPanStartHandler=this.handleControllerPanStart.bind(this);controllerPanMoveHandler=this.handleControllerPanMove.bind(this);controllerPanEndHandler=this.handleControllerPanEnd.bind(this);constructor(t,e){super(),this.container=t,this.controller=e,this.graph=new Kc(t),this.bindControllerEvents()}destroy(){this.unbindControllerEvents(),super.destroy()}bindScene(t){this.scene=t}selectEnableChanged(t){var e;(e=this.scene)==null||e.clearSelected(),this.selectEnable=!!t}multiSelectEnableChanged(t){var e;(e=this.scene)==null||e.clearSelected(),this.multiSelectEnable=!!t,this.controller.enablePan=!this.multiSelectEnable}bindControllerEvents(){this.controller.addEventListener(_t.TAP,this.controllerTapHandler),this.controller.addEventListener(_t.PAN_START,this.controllerPanStartHandler),this.controller.addEventListener(_t.PAN_MOVE,this.controllerPanMoveHandler),this.controller.addEventListener(_t.PAN_END,this.controllerPanEndHandler)}unbindControllerEvents(){this.controller.removeEventListener(_t.TAP,this.controllerTapHandler),this.controller.removeEventListener(_t.PAN_START,this.controllerPanStartHandler),this.controller.removeEventListener(_t.PAN_MOVE,this.controllerPanMoveHandler),this.controller.removeEventListener(_t.PAN_END,this.controllerPanEndHandler)}handleControllerTap(t){var n,a,u,l,c,f;if((t==null?void 0:t.type)!==_t.TAP||!this.selectEnable&&!this.multiSelectEnable)return;const e=((n=t==null?void 0:t.e)==null?void 0:n.target)||((u=(a=t==null?void 0:t.e)==null?void 0:a.srcEvent)==null?void 0:u.target)||((c=(l=t==null?void 0:t.e)==null?void 0:l.srcEvent)==null?void 0:c.srcElement);e!=null&&e.id&&(f=this.scene)!=null&&f.isBelongsToAssetType(e==null?void 0:e.id)&&this.dispatchEvent({type:"SELECTED",data:{...t.data,target:[e],selected:[e==null?void 0:e.id]}})}handleControllerPanStart(t){(t==null?void 0:t.type)===_t.PAN_START&&this.multiSelectEnable&&(this.p1.copy(t.data.screenCoords),dn.makeEmpty().expandByPoint(this.p1),this.graph.draw(dn))}handleControllerPanMove(t){(t==null?void 0:t.type)===_t.PAN_MOVE&&this.multiSelectEnable&&(this.p2.copy(t.data.screenCoords),dn.makeEmpty().expandByPoint(this.p1).expandByPoint(this.p2),this.graph.draw(dn))}handleControllerPanEnd(t){var a;if((t==null?void 0:t.type)!==_t.PAN_END||!this.multiSelectEnable)return;this.p2.copy(t.data.screenCoords),dn.makeEmpty().expandByPoint(this.p1).expandByPoint(this.p2).unproject(this.controller.camera);const e=(a=this.scene)==null?void 0:a.getElementsByBox(dn),n=[];(e||[]).forEach(u=>n.push(u.id)),this.graph.hide(),dn.makeEmpty(),this.dispatchEvent({type:"SELECTED",data:{target:e,selected:n}})}}var No=(r=>(r.SELECTED="SELECTED",r))(No||{});const dn=new St;var gn=(r=>(r.DEFAULT="default",r.INFO="info",r.PRIMARY="primary",r.SUCCESS="success",r.WARNING="warning",r.DANGER="danger",r))(gn||{});class l2{camera;screenCoords=new Y;worldCoords=new Y;params={Shape:{},Line:{threshold:1},Points:{threshold:1},Sprite:{}};constructor(){}setFromCamera(t,e){return this.camera=e,this.screenCoords.set(t.x,t.y),this.worldCoords.copy(this.screenCoords).unproject(e),this}intersectObjects(t,e=!0,n=[]){for(let a=0,u=t.length;a<u;a++)this.intersectObject(t[a],e,n)}intersectObject(t,e=!1,n=[]){if(!t.selectable||(t.raycast(this,n),!e||t.composeNode))return n;for(let a=0,u=t.children.length;a<u;a++)this.intersectObject(t.children[a],e,n);return n}}var Ve="top",dr="bottom",gr="right",$e="left",Mo="auto",js=[Ve,dr,gr,$e],Jn="start",Ks="end",h2="clippingParents",tf="viewport",Js="popper",c2="reference",ef=js.reduce(function(r,t){return r.concat([t+"-"+Jn,t+"-"+Ks])},[]),rf=[].concat(js,[Mo]).reduce(function(r,t){return r.concat([t,t+"-"+Jn,t+"-"+Ks])},[]),f2="beforeRead",p2="read",d2="afterRead",g2="beforeMain",y2="main",v2="afterMain",m2="beforeWrite",x2="write",E2="afterWrite",A2=[f2,p2,d2,g2,y2,v2,m2,x2,E2];function Kr(r){return r?(r.nodeName||"").toLowerCase():null}function rr(r){if(r==null)return window;if(r.toString()!=="[object Window]"){var t=r.ownerDocument;return t&&t.defaultView||window}return r}function yn(r){var t=rr(r).Element;return r instanceof t||r instanceof Element}function yr(r){var t=rr(r).HTMLElement;return r instanceof t||r instanceof HTMLElement}function Bo(r){if(typeof ShadowRoot>"u")return!1;var t=rr(r).ShadowRoot;return r instanceof t||r instanceof ShadowRoot}function b2(r){var t=r.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},a=t.attributes[e]||{},u=t.elements[e];!yr(u)||!Kr(u)||(Object.assign(u.style,n),Object.keys(a).forEach(function(l){var c=a[l];c===!1?u.removeAttribute(l):u.setAttribute(l,c===!0?"":c)}))})}function w2(r){var t=r.state,e={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,e.popper),t.styles=e,t.elements.arrow&&Object.assign(t.elements.arrow.style,e.arrow),function(){Object.keys(t.elements).forEach(function(n){var a=t.elements[n],u=t.attributes[n]||{},l=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:e[n]),c=l.reduce(function(f,d){return f[d]="",f},{});!yr(a)||!Kr(a)||(Object.assign(a.style,c),Object.keys(u).forEach(function(f){a.removeAttribute(f)}))})}}const nf={name:"applyStyles",enabled:!0,phase:"write",fn:b2,effect:w2,requires:["computeStyles"]};function Jr(r){return r.split("-")[0]}var vn=Math.max,ja=Math.min,ts=Math.round;function Io(){var r=navigator.userAgentData;return r!=null&&r.brands&&Array.isArray(r.brands)?r.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function sf(){return!/^((?!chrome|android).)*safari/i.test(Io())}function es(r,t,e){t===void 0&&(t=!1),e===void 0&&(e=!1);var n=r.getBoundingClientRect(),a=1,u=1;t&&yr(r)&&(a=r.offsetWidth>0&&ts(n.width)/r.offsetWidth||1,u=r.offsetHeight>0&&ts(n.height)/r.offsetHeight||1);var l=yn(r)?rr(r):window,c=l.visualViewport,f=!sf()&&e,d=(n.left+(f&&c?c.offsetLeft:0))/a,y=(n.top+(f&&c?c.offsetTop:0))/u,A=n.width/a,_=n.height/u;return{width:A,height:_,top:y,right:d+A,bottom:y+_,left:d,x:d,y}}function Ro(r){var t=es(r),e=r.offsetWidth,n=r.offsetHeight;return Math.abs(t.width-e)<=1&&(e=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:r.offsetLeft,y:r.offsetTop,width:e,height:n}}function af(r,t){var e=t.getRootNode&&t.getRootNode();if(r.contains(t))return!0;if(e&&Bo(e)){var n=t;do{if(n&&r.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function xi(r){return rr(r).getComputedStyle(r)}function T2(r){return["table","td","th"].indexOf(Kr(r))>=0}function Vi(r){return((yn(r)?r.ownerDocument:r.document)||window.document).documentElement}function Ka(r){return Kr(r)==="html"?r:r.assignedSlot||r.parentNode||(Bo(r)?r.host:null)||Vi(r)}function uf(r){return!yr(r)||xi(r).position==="fixed"?null:r.offsetParent}function _2(r){var t=/firefox/i.test(Io()),e=/Trident/i.test(Io());if(e&&yr(r)){var n=xi(r);if(n.position==="fixed")return null}var a=Ka(r);for(Bo(a)&&(a=a.host);yr(a)&&["html","body"].indexOf(Kr(a))<0;){var u=xi(a);if(u.transform!=="none"||u.perspective!=="none"||u.contain==="paint"||["transform","perspective"].indexOf(u.willChange)!==-1||t&&u.willChange==="filter"||t&&u.filter&&u.filter!=="none")return a;a=a.parentNode}return null}function ta(r){for(var t=rr(r),e=uf(r);e&&T2(e)&&xi(e).position==="static";)e=uf(e);return e&&(Kr(e)==="html"||Kr(e)==="body"&&xi(e).position==="static")?t:e||_2(r)||t}function Lo(r){return["top","bottom"].indexOf(r)>=0?"x":"y"}function ea(r,t,e){return vn(r,ja(t,e))}function C2(r,t,e){var n=ea(r,t,e);return n>e?e:n}function of(){return{top:0,right:0,bottom:0,left:0}}function lf(r){return Object.assign({},of(),r)}function hf(r,t){return t.reduce(function(e,n){return e[n]=r,e},{})}var D2=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,lf(typeof t!="number"?t:hf(t,js))};function S2(r){var t,e=r.state,n=r.name,a=r.options,u=e.elements.arrow,l=e.modifiersData.popperOffsets,c=Jr(e.placement),f=Lo(c),d=[$e,gr].indexOf(c)>=0,y=d?"height":"width";if(!(!u||!l)){var A=D2(a.padding,e),_=Ro(u),C=f==="y"?Ve:$e,F=f==="y"?dr:gr,N=e.rects.reference[y]+e.rects.reference[f]-l[f]-e.rects.popper[y],M=l[f]-e.rects.reference[f],R=ta(u),q=R?f==="y"?R.clientHeight||0:R.clientWidth||0:0,z=N/2-M/2,w=A[C],L=q-_[y]-A[F],U=q/2-_[y]/2+z,j=ea(w,U,L),tt=f;e.modifiersData[n]=(t={},t[tt]=j,t.centerOffset=j-U,t)}}function O2(r){var t=r.state,e=r.options,n=e.element,a=n===void 0?"[data-popper-arrow]":n;a!=null&&(typeof a=="string"&&(a=t.elements.popper.querySelector(a),!a)||af(t.elements.popper,a)&&(t.elements.arrow=a))}const N2={name:"arrow",enabled:!0,phase:"main",fn:S2,effect:O2,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function rs(r){return r.split("-")[1]}var M2={top:"auto",right:"auto",bottom:"auto",left:"auto"};function B2(r,t){var e=r.x,n=r.y,a=t.devicePixelRatio||1;return{x:ts(e*a)/a||0,y:ts(n*a)/a||0}}function cf(r){var t,e=r.popper,n=r.popperRect,a=r.placement,u=r.variation,l=r.offsets,c=r.position,f=r.gpuAcceleration,d=r.adaptive,y=r.roundOffsets,A=r.isFixed,_=l.x,C=_===void 0?0:_,F=l.y,N=F===void 0?0:F,M=typeof y=="function"?y({x:C,y:N}):{x:C,y:N};C=M.x,N=M.y;var R=l.hasOwnProperty("x"),q=l.hasOwnProperty("y"),z=$e,w=Ve,L=window;if(d){var U=ta(e),j="clientHeight",tt="clientWidth";if(U===rr(e)&&(U=Vi(e),xi(U).position!=="static"&&c==="absolute"&&(j="scrollHeight",tt="scrollWidth")),U=U,a===Ve||(a===$e||a===gr)&&u===Ks){w=dr;var Z=A&&U===L&&L.visualViewport?L.visualViewport.height:U[j];N-=Z-n.height,N*=f?1:-1}if(a===$e||(a===Ve||a===dr)&&u===Ks){z=gr;var rt=A&&U===L&&L.visualViewport?L.visualViewport.width:U[tt];C-=rt-n.width,C*=f?1:-1}}var J=Object.assign({position:c},d&&M2),st=y===!0?B2({x:C,y:N},rr(e)):{x:C,y:N};if(C=st.x,N=st.y,f){var ht;return Object.assign({},J,(ht={},ht[w]=q?"0":"",ht[z]=R?"0":"",ht.transform=(L.devicePixelRatio||1)<=1?"translate("+C+"px, "+N+"px)":"translate3d("+C+"px, "+N+"px, 0)",ht))}return Object.assign({},J,(t={},t[w]=q?N+"px":"",t[z]=R?C+"px":"",t.transform="",t))}function I2(r){var t=r.state,e=r.options,n=e.gpuAcceleration,a=n===void 0?!0:n,u=e.adaptive,l=u===void 0?!0:u,c=e.roundOffsets,f=c===void 0?!0:c,d={placement:Jr(t.placement),variation:rs(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,cf(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:l,roundOffsets:f})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,cf(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const R2={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:I2,data:{}};var Ja={passive:!0};function L2(r){var t=r.state,e=r.instance,n=r.options,a=n.scroll,u=a===void 0?!0:a,l=n.resize,c=l===void 0?!0:l,f=rr(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return u&&d.forEach(function(y){y.addEventListener("scroll",e.update,Ja)}),c&&f.addEventListener("resize",e.update,Ja),function(){u&&d.forEach(function(y){y.removeEventListener("scroll",e.update,Ja)}),c&&f.removeEventListener("resize",e.update,Ja)}}const P2={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:L2,data:{}};var F2={left:"right",right:"left",bottom:"top",top:"bottom"};function tu(r){return r.replace(/left|right|bottom|top/g,function(t){return F2[t]})}var k2={start:"end",end:"start"};function ff(r){return r.replace(/start|end/g,function(t){return k2[t]})}function Po(r){var t=rr(r),e=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:e,scrollTop:n}}function Fo(r){return es(Vi(r)).left+Po(r).scrollLeft}function U2(r,t){var e=rr(r),n=Vi(r),a=e.visualViewport,u=n.clientWidth,l=n.clientHeight,c=0,f=0;if(a){u=a.width,l=a.height;var d=sf();(d||!d&&t==="fixed")&&(c=a.offsetLeft,f=a.offsetTop)}return{width:u,height:l,x:c+Fo(r),y:f}}function H2(r){var t,e=Vi(r),n=Po(r),a=(t=r.ownerDocument)==null?void 0:t.body,u=vn(e.scrollWidth,e.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),l=vn(e.scrollHeight,e.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),c=-n.scrollLeft+Fo(r),f=-n.scrollTop;return xi(a||e).direction==="rtl"&&(c+=vn(e.clientWidth,a?a.clientWidth:0)-u),{width:u,height:l,x:c,y:f}}function ko(r){var t=xi(r),e=t.overflow,n=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(e+a+n)}function pf(r){return["html","body","#document"].indexOf(Kr(r))>=0?r.ownerDocument.body:yr(r)&&ko(r)?r:pf(Ka(r))}function ra(r,t){var e;t===void 0&&(t=[]);var n=pf(r),a=n===((e=r.ownerDocument)==null?void 0:e.body),u=rr(n),l=a?[u].concat(u.visualViewport||[],ko(n)?n:[]):n,c=t.concat(l);return a?c:c.concat(ra(Ka(l)))}function Uo(r){return Object.assign({},r,{left:r.x,top:r.y,right:r.x+r.width,bottom:r.y+r.height})}function q2(r,t){var e=es(r,!1,t==="fixed");return e.top=e.top+r.clientTop,e.left=e.left+r.clientLeft,e.bottom=e.top+r.clientHeight,e.right=e.left+r.clientWidth,e.width=r.clientWidth,e.height=r.clientHeight,e.x=e.left,e.y=e.top,e}function df(r,t,e){return t===tf?Uo(U2(r,e)):yn(t)?q2(t,e):Uo(H2(Vi(r)))}function W2(r){var t=ra(Ka(r)),e=["absolute","fixed"].indexOf(xi(r).position)>=0,n=e&&yr(r)?ta(r):r;return yn(n)?t.filter(function(a){return yn(a)&&af(a,n)&&Kr(a)!=="body"}):[]}function V2(r,t,e,n){var a=t==="clippingParents"?W2(r):[].concat(t),u=[].concat(a,[e]),l=u[0],c=u.reduce(function(f,d){var y=df(r,d,n);return f.top=vn(y.top,f.top),f.right=ja(y.right,f.right),f.bottom=ja(y.bottom,f.bottom),f.left=vn(y.left,f.left),f},df(r,l,n));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function gf(r){var t=r.reference,e=r.element,n=r.placement,a=n?Jr(n):null,u=n?rs(n):null,l=t.x+t.width/2-e.width/2,c=t.y+t.height/2-e.height/2,f;switch(a){case Ve:f={x:l,y:t.y-e.height};break;case dr:f={x:l,y:t.y+t.height};break;case gr:f={x:t.x+t.width,y:c};break;case $e:f={x:t.x-e.width,y:c};break;default:f={x:t.x,y:t.y}}var d=a?Lo(a):null;if(d!=null){var y=d==="y"?"height":"width";switch(u){case Jn:f[d]=f[d]-(t[y]/2-e[y]/2);break;case Ks:f[d]=f[d]+(t[y]/2-e[y]/2);break}}return f}function ia(r,t){t===void 0&&(t={});var e=t,n=e.placement,a=n===void 0?r.placement:n,u=e.strategy,l=u===void 0?r.strategy:u,c=e.boundary,f=c===void 0?h2:c,d=e.rootBoundary,y=d===void 0?tf:d,A=e.elementContext,_=A===void 0?Js:A,C=e.altBoundary,F=C===void 0?!1:C,N=e.padding,M=N===void 0?0:N,R=lf(typeof M!="number"?M:hf(M,js)),q=_===Js?c2:Js,z=r.rects.popper,w=r.elements[F?q:_],L=V2(yn(w)?w:w.contextElement||Vi(r.elements.popper),f,y,l),U=es(r.elements.reference),j=gf({reference:U,element:z,strategy:"absolute",placement:a}),tt=Uo(Object.assign({},z,j)),Z=_===Js?tt:U,rt={top:L.top-Z.top+R.top,bottom:Z.bottom-L.bottom+R.bottom,left:L.left-Z.left+R.left,right:Z.right-L.right+R.right},J=r.modifiersData.offset;if(_===Js&&J){var st=J[a];Object.keys(rt).forEach(function(ht){var ct=[gr,dr].indexOf(ht)>=0?1:-1,ft=[Ve,dr].indexOf(ht)>=0?"y":"x";rt[ht]+=st[ft]*ct})}return rt}function $2(r,t){t===void 0&&(t={});var e=t,n=e.placement,a=e.boundary,u=e.rootBoundary,l=e.padding,c=e.flipVariations,f=e.allowedAutoPlacements,d=f===void 0?rf:f,y=rs(n),A=y?c?ef:ef.filter(function(F){return rs(F)===y}):js,_=A.filter(function(F){return d.indexOf(F)>=0});_.length===0&&(_=A);var C=_.reduce(function(F,N){return F[N]=ia(r,{placement:N,boundary:a,rootBoundary:u,padding:l})[Jr(N)],F},{});return Object.keys(C).sort(function(F,N){return C[F]-C[N]})}function z2(r){if(Jr(r)===Mo)return[];var t=tu(r);return[ff(r),t,ff(t)]}function G2(r){var t=r.state,e=r.options,n=r.name;if(!t.modifiersData[n]._skip){for(var a=e.mainAxis,u=a===void 0?!0:a,l=e.altAxis,c=l===void 0?!0:l,f=e.fallbackPlacements,d=e.padding,y=e.boundary,A=e.rootBoundary,_=e.altBoundary,C=e.flipVariations,F=C===void 0?!0:C,N=e.allowedAutoPlacements,M=t.options.placement,R=Jr(M),q=R===M,z=f||(q||!F?[tu(M)]:z2(M)),w=[M].concat(z).reduce(function(Le,ae){return Le.concat(Jr(ae)===Mo?$2(t,{placement:ae,boundary:y,rootBoundary:A,padding:d,flipVariations:F,allowedAutoPlacements:N}):ae)},[]),L=t.rects.reference,U=t.rects.popper,j=new Map,tt=!0,Z=w[0],rt=0;rt<w.length;rt++){var J=w[rt],st=Jr(J),ht=rs(J)===Jn,ct=[Ve,dr].indexOf(st)>=0,ft=ct?"width":"height",O=ia(t,{placement:J,boundary:y,rootBoundary:A,altBoundary:_,padding:d}),yt=ct?ht?gr:$e:ht?dr:Ve;L[ft]>U[ft]&&(yt=tu(yt));var Bt=tu(yt),Re=[];if(u&&Re.push(O[st]<=0),c&&Re.push(O[yt]<=0,O[Bt]<=0),Re.every(function(Le){return Le})){Z=J,tt=!1;break}j.set(J,Re)}if(tt)for(var be=F?3:1,se=function(ae){var Se=w.find(function(Vt){var Gt=j.get(Vt);if(Gt)return Gt.slice(0,ae).every(function(Ct){return Ct})});if(Se)return Z=Se,"break"},ve=be;ve>0;ve--){var qr=se(ve);if(qr==="break")break}t.placement!==Z&&(t.modifiersData[n]._skip=!0,t.placement=Z,t.reset=!0)}}const Y2={name:"flip",enabled:!0,phase:"main",fn:G2,requiresIfExists:["offset"],data:{_skip:!1}};function yf(r,t,e){return e===void 0&&(e={x:0,y:0}),{top:r.top-t.height-e.y,right:r.right-t.width+e.x,bottom:r.bottom-t.height+e.y,left:r.left-t.width-e.x}}function vf(r){return[Ve,gr,dr,$e].some(function(t){return r[t]>=0})}function X2(r){var t=r.state,e=r.name,n=t.rects.reference,a=t.rects.popper,u=t.modifiersData.preventOverflow,l=ia(t,{elementContext:"reference"}),c=ia(t,{altBoundary:!0}),f=yf(l,n),d=yf(c,a,u),y=vf(f),A=vf(d);t.modifiersData[e]={referenceClippingOffsets:f,popperEscapeOffsets:d,isReferenceHidden:y,hasPopperEscaped:A},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":y,"data-popper-escaped":A})}const Z2={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:X2};function Q2(r,t,e){var n=Jr(r),a=[$e,Ve].indexOf(n)>=0?-1:1,u=typeof e=="function"?e(Object.assign({},t,{placement:r})):e,l=u[0],c=u[1];return l=l||0,c=(c||0)*a,[$e,gr].indexOf(n)>=0?{x:c,y:l}:{x:l,y:c}}function j2(r){var t=r.state,e=r.options,n=r.name,a=e.offset,u=a===void 0?[0,0]:a,l=rf.reduce(function(y,A){return y[A]=Q2(A,t.rects,u),y},{}),c=l[t.placement],f=c.x,d=c.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=f,t.modifiersData.popperOffsets.y+=d),t.modifiersData[n]=l}const K2={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:j2};function J2(r){var t=r.state,e=r.name;t.modifiersData[e]=gf({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const ty={name:"popperOffsets",enabled:!0,phase:"read",fn:J2,data:{}};function ey(r){return r==="x"?"y":"x"}function ry(r){var t=r.state,e=r.options,n=r.name,a=e.mainAxis,u=a===void 0?!0:a,l=e.altAxis,c=l===void 0?!1:l,f=e.boundary,d=e.rootBoundary,y=e.altBoundary,A=e.padding,_=e.tether,C=_===void 0?!0:_,F=e.tetherOffset,N=F===void 0?0:F,M=ia(t,{boundary:f,rootBoundary:d,padding:A,altBoundary:y}),R=Jr(t.placement),q=rs(t.placement),z=!q,w=Lo(R),L=ey(w),U=t.modifiersData.popperOffsets,j=t.rects.reference,tt=t.rects.popper,Z=typeof N=="function"?N(Object.assign({},t.rects,{placement:t.placement})):N,rt=typeof Z=="number"?{mainAxis:Z,altAxis:Z}:Object.assign({mainAxis:0,altAxis:0},Z),J=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,st={x:0,y:0};if(U){if(u){var ht,ct=w==="y"?Ve:$e,ft=w==="y"?dr:gr,O=w==="y"?"height":"width",yt=U[w],Bt=yt+M[ct],Re=yt-M[ft],be=C?-tt[O]/2:0,se=q===Jn?j[O]:tt[O],ve=q===Jn?-tt[O]:-j[O],qr=t.elements.arrow,Le=C&&qr?Ro(qr):{width:0,height:0},ae=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:of(),Se=ae[ct],Vt=ae[ft],Gt=ea(0,j[O],Le[O]),Ct=z?j[O]/2-be-Gt-Se-rt.mainAxis:se-Gt-Se-rt.mainAxis,Ht=z?-j[O]/2+be+Gt+Vt+rt.mainAxis:ve+Gt+Vt+rt.mainAxis,Oe=t.elements.arrow&&ta(t.elements.arrow),Pe=Oe?w==="y"?Oe.clientTop||0:Oe.clientLeft||0:0,ze=(ht=J==null?void 0:J[w])!=null?ht:0,Qt=yt+Ct-ze-Pe,Ne=yt+Ht-ze,me=ea(C?ja(Bt,Qt):Bt,yt,C?vn(Re,Ne):Re);U[w]=me,st[w]=me-yt}if(c){var Yt,ii=w==="x"?Ve:$e,Ai=w==="x"?dr:gr,ue=U[L],Dt=L==="y"?"height":"width",nr=ue+M[ii],Ge=ue-M[Ai],bi=[Ve,$e].indexOf(R)!==-1,mr=(Yt=J==null?void 0:J[L])!=null?Yt:0,Gi=bi?nr:ue-j[Dt]-tt[Dt]-mr+rt.altAxis,sr=bi?ue+j[Dt]+tt[Dt]-mr-rt.altAxis:Ge,Ye=C&&bi?C2(Gi,ue,sr):ea(C?Gi:nr,ue,C?sr:Ge);U[L]=Ye,st[L]=Ye-ue}t.modifiersData[n]=st}}const iy={name:"preventOverflow",enabled:!0,phase:"main",fn:ry,requiresIfExists:["offset"]};function ny(r){return{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}}function sy(r){return r===rr(r)||!yr(r)?Po(r):ny(r)}function ay(r){var t=r.getBoundingClientRect(),e=ts(t.width)/r.offsetWidth||1,n=ts(t.height)/r.offsetHeight||1;return e!==1||n!==1}function uy(r,t,e){e===void 0&&(e=!1);var n=yr(t),a=yr(t)&&ay(t),u=Vi(t),l=es(r,a,e),c={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(n||!n&&!e)&&((Kr(t)!=="body"||ko(u))&&(c=sy(t)),yr(t)?(f=es(t,!0),f.x+=t.clientLeft,f.y+=t.clientTop):u&&(f.x=Fo(u))),{x:l.left+c.scrollLeft-f.x,y:l.top+c.scrollTop-f.y,width:l.width,height:l.height}}function oy(r){var t=new Map,e=new Set,n=[];r.forEach(function(u){t.set(u.name,u)});function a(u){e.add(u.name);var l=[].concat(u.requires||[],u.requiresIfExists||[]);l.forEach(function(c){if(!e.has(c)){var f=t.get(c);f&&a(f)}}),n.push(u)}return r.forEach(function(u){e.has(u.name)||a(u)}),n}function ly(r){var t=oy(r);return A2.reduce(function(e,n){return e.concat(t.filter(function(a){return a.phase===n}))},[])}function hy(r){var t;return function(){return t||(t=new Promise(function(e){Promise.resolve().then(function(){t=void 0,e(r())})})),t}}function cy(r){var t=r.reduce(function(e,n){var a=e[n.name];return e[n.name]=a?Object.assign({},a,n,{options:Object.assign({},a.options,n.options),data:Object.assign({},a.data,n.data)}):n,e},{});return Object.keys(t).map(function(e){return t[e]})}var mf={placement:"bottom",modifiers:[],strategy:"absolute"};function xf(){for(var r=arguments.length,t=new Array(r),e=0;e<r;e++)t[e]=arguments[e];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function fy(r){r===void 0&&(r={});var t=r,e=t.defaultModifiers,n=e===void 0?[]:e,a=t.defaultOptions,u=a===void 0?mf:a;return function(c,f,d){d===void 0&&(d=u);var y={placement:"bottom",orderedModifiers:[],options:Object.assign({},mf,u),modifiersData:{},elements:{reference:c,popper:f},attributes:{},styles:{}},A=[],_=!1,C={state:y,setOptions:function(R){var q=typeof R=="function"?R(y.options):R;N(),y.options=Object.assign({},u,y.options,q),y.scrollParents={reference:yn(c)?ra(c):c.contextElement?ra(c.contextElement):[],popper:ra(f)};var z=ly(cy([].concat(n,y.options.modifiers)));return y.orderedModifiers=z.filter(function(w){return w.enabled}),F(),C.update()},forceUpdate:function(){if(!_){var R=y.elements,q=R.reference,z=R.popper;if(xf(q,z)){y.rects={reference:uy(q,ta(z),y.options.strategy==="fixed"),popper:Ro(z)},y.reset=!1,y.placement=y.options.placement,y.orderedModifiers.forEach(function(rt){return y.modifiersData[rt.name]=Object.assign({},rt.data)});for(var w=0;w<y.orderedModifiers.length;w++){if(y.reset===!0){y.reset=!1,w=-1;continue}var L=y.orderedModifiers[w],U=L.fn,j=L.options,tt=j===void 0?{}:j,Z=L.name;typeof U=="function"&&(y=U({state:y,options:tt,name:Z,instance:C})||y)}}}},update:hy(function(){return new Promise(function(M){C.forceUpdate(),M(y)})}),destroy:function(){N(),_=!0}};if(!xf(c,f))return C;C.setOptions(d).then(function(M){!_&&d.onFirstUpdate&&d.onFirstUpdate(M)});function F(){y.orderedModifiers.forEach(function(M){var R=M.name,q=M.options,z=q===void 0?{}:q,w=M.effect;if(typeof w=="function"){var L=w({state:y,name:R,instance:C,options:z}),U=function(){};A.push(L||U)}})}function N(){A.forEach(function(M){return M()}),A=[]}return C}}var py=[P2,ty,R2,nf,K2,Y2,iy,N2,Z2],dy=fy({defaultModifiers:py}),gy="tippy-box",Ef="tippy-content",yy="tippy-backdrop",Af="tippy-arrow",bf="tippy-svg-arrow",mn={passive:!0,capture:!0},wf=function(){return document.body};function vy(r,t){return{}.hasOwnProperty.call(r,t)}function Ho(r,t,e){if(Array.isArray(r)){var n=r[t];return n??(Array.isArray(e)?e[t]:e)}return r}function qo(r,t){var e={}.toString.call(r);return e.indexOf("[object")===0&&e.indexOf(t+"]")>-1}function Tf(r,t){return typeof r=="function"?r.apply(void 0,t):r}function _f(r,t){if(t===0)return r;var e;return function(n){clearTimeout(e),e=setTimeout(function(){r(n)},t)}}function my(r,t){var e=Object.assign({},r);return t.forEach(function(n){delete e[n]}),e}function xy(r){return r.split(/\s+/).filter(Boolean)}function is(r){return[].concat(r)}function Cf(r,t){r.indexOf(t)===-1&&r.push(t)}function Ey(r){return r.filter(function(t,e){return r.indexOf(t)===e})}function Ay(r){return r.split("-")[0]}function eu(r){return[].slice.call(r)}function Df(r){return Object.keys(r).reduce(function(t,e){return r[e]!==void 0&&(t[e]=r[e]),t},{})}function na(){return document.createElement("div")}function sa(r){return["Element","Fragment"].some(function(t){return qo(r,t)})}function by(r){return qo(r,"NodeList")}function wy(r){return qo(r,"MouseEvent")}function Ty(r){return!!(r&&r._tippy&&r._tippy.reference===r)}function _y(r){return sa(r)?[r]:by(r)?eu(r):Array.isArray(r)?r:eu(document.querySelectorAll(r))}function Wo(r,t){r.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function Sf(r,t){r.forEach(function(e){e&&e.setAttribute("data-state",t)})}function Cy(r){var t,e=is(r),n=e[0];return n!=null&&(t=n.ownerDocument)!=null&&t.body?n.ownerDocument:document}function Dy(r,t){var e=t.clientX,n=t.clientY;return r.every(function(a){var u=a.popperRect,l=a.popperState,c=a.props,f=c.interactiveBorder,d=Ay(l.placement),y=l.modifiersData.offset;if(!y)return!0;var A=d==="bottom"?y.top.y:0,_=d==="top"?y.bottom.y:0,C=d==="right"?y.left.x:0,F=d==="left"?y.right.x:0,N=u.top-n+A>f,M=n-u.bottom-_>f,R=u.left-e+C>f,q=e-u.right-F>f;return N||M||R||q})}function Vo(r,t,e){var n=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(a){r[n](a,e)})}function Of(r,t){for(var e=t;e;){var n;if(r.contains(e))return!0;e=e.getRootNode==null||(n=e.getRootNode())==null?void 0:n.host}return!1}var ti={isTouch:!1},Nf=0;function Sy(){ti.isTouch||(ti.isTouch=!0,window.performance&&document.addEventListener("mousemove",Mf))}function Mf(){var r=performance.now();r-Nf<20&&(ti.isTouch=!1,document.removeEventListener("mousemove",Mf)),Nf=r}function Oy(){var r=document.activeElement;if(Ty(r)){var t=r._tippy;r.blur&&!t.state.isVisible&&r.blur()}}function Ny(){document.addEventListener("touchstart",Sy,mn),window.addEventListener("blur",Oy)}var My=typeof window<"u"&&typeof document<"u",By=My?!!window.msCrypto:!1;function ns(r){var t=r==="destroy"?"n already-":" ";return[r+"() was called on a"+t+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function Bf(r){var t=/[ \t]{2,}/g,e=/^[ \t]*/gm;return r.replace(t," ").replace(e,"").trim()}function Iy(r){return Bf(`
50
+ * Licensed under the MIT license */(function(r){(function(t,e,i,a){var u=["","webkit","Moz","MS","ms","o"],l=e.createElement("div"),c="function",f=Math.round,d=Math.abs,g=Date.now;function E(y,x,w){return setTimeout(G(y,w),x)}function T(y,x,w){return Array.isArray(y)?(C(y,w[x],w),!0):!1}function C(y,x,w){var B;if(y)if(y.forEach)y.forEach(x,w);else if(y.length!==a)for(B=0;B<y.length;)x.call(w,y[B],B,y),B++;else for(B in y)y.hasOwnProperty(B)&&x.call(w,y[B],B,y)}function L(y,x,w){var B="DEPRECATED METHOD: "+x+`
51
+ `+w+` AT
52
+ `;return function(){var Y=new Error("get-stack-trace"),j=Y&&Y.stack?Y.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",vt=t.console&&(t.console.warn||t.console.log);return vt&&vt.call(t.console,B,j),y.apply(this,arguments)}}var N;typeof Object.assign!="function"?N=function(x){if(x===a||x===null)throw new TypeError("Cannot convert undefined or null to object");for(var w=Object(x),B=1;B<arguments.length;B++){var Y=arguments[B];if(Y!==a&&Y!==null)for(var j in Y)Y.hasOwnProperty(j)&&(w[j]=Y[j])}return w}:N=Object.assign;var M=L(function(x,w,B){for(var Y=Object.keys(w),j=0;j<Y.length;)(!B||B&&x[Y[j]]===a)&&(x[Y[j]]=w[Y[j]]),j++;return x},"extend","Use `assign`."),R=L(function(x,w){return M(x,w,!0)},"merge","Use `assign`.");function W(y,x,w){var B=x.prototype,Y;Y=y.prototype=Object.create(B),Y.constructor=y,Y._super=B,w&&N(Y,w)}function G(y,x){return function(){return y.apply(x,arguments)}}function b(y,x){return typeof y==c?y.apply(x&&x[0]||a,x):y}function P(y,x){return y===a?x:y}function H(y,x,w){C(rt(x),function(B){y.addEventListener(B,w,!1)})}function K(y,x,w){C(rt(x),function(B){y.removeEventListener(B,w,!1)})}function tt(y,x){for(;y;){if(y==x)return!0;y=y.parentNode}return!1}function Z(y,x){return y.indexOf(x)>-1}function rt(y){return y.trim().split(/\s+/g)}function J(y,x,w){if(y.indexOf&&!w)return y.indexOf(x);for(var B=0;B<y.length;){if(w&&y[B][w]==x||!w&&y[B]===x)return B;B++}return-1}function st(y){return Array.prototype.slice.call(y,0)}function ht(y,x,w){for(var B=[],Y=[],j=0;j<y.length;){var vt=y[j][x];J(Y,vt)<0&&B.push(y[j]),Y[j]=vt,j++}return B=B.sort(function(le,xe){return le[x]>xe[x]}),B}function ct(y,x){for(var w,B,Y=x[0].toUpperCase()+x.slice(1),j=0;j<u.length;){if(w=u[j],B=w?w+Y:x,B in y)return B;j++}return a}var ft=1;function O(){return ft++}function yt(y){var x=y.ownerDocument||y;return x.defaultView||x.parentWindow||t}var Bt=/mobile|tablet|ip(ad|hone|od)|android/i,Re="ontouchstart"in t,we=ct(t,"PointerEvent")!==a,ae=Re&&Bt.test(navigator.userAgent),me="touch",Vr="pen",Le="mouse",ue="kinect",Se=25,$t=1,Xt=2,Ct=4,Wt=8,Oe=1,Pe=2,$e=4,Kt=8,Ne=16,ve=Pe|$e,Zt=Kt|Ne,ai=ve|Zt,Ci=["x","y"],oe=["clientX","clientY"];function Dt(y,x){var w=this;this.manager=y,this.callback=x,this.element=y.element,this.target=y.options.inputTarget,this.domHandler=function(B){b(y.options.enable,[y])&&w.handler(B)},this.init()}Dt.prototype={handler:function(){},init:function(){this.evEl&&H(this.element,this.evEl,this.domHandler),this.evTarget&&H(this.target,this.evTarget,this.domHandler),this.evWin&&H(yt(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&K(this.element,this.evEl,this.domHandler),this.evTarget&&K(this.target,this.evTarget,this.domHandler),this.evWin&&K(yt(this.element),this.evWin,this.domHandler)}};function nr(y){var x,w=y.options.inputClass;return w?x=w:we?x=ar:ae?x=an:Re?x=Ea:x=mt,new x(y,Ge)}function Ge(y,x,w){var B=w.pointers.length,Y=w.changedPointers.length,j=x&$t&&B-Y===0,vt=x&(Ct|Wt)&&B-Y===0;w.isFirst=!!j,w.isFinal=!!vt,j&&(y.session={}),w.eventType=x,Di(y,w),y.emit("hammer.input",w),y.recognize(w),y.session.prevInput=w}function Di(y,x){var w=y.session,B=x.pointers,Y=B.length;w.firstInput||(w.firstInput=sr(x)),Y>1&&!w.firstMultiple?w.firstMultiple=sr(x):Y===1&&(w.firstMultiple=!1);var j=w.firstInput,vt=w.firstMultiple,te=vt?vt.center:j.center,le=x.center=Ye(B);x.timeStamp=g(),x.deltaTime=x.timeStamp-j.timeStamp,x.angle=Si(te,le),x.distance=ui(te,le),Er(w,x),x.offsetDirection=en(x.deltaX,x.deltaY);var xe=tn(x.deltaTime,x.deltaX,x.deltaY);x.overallVelocityX=xe.x,x.overallVelocityY=xe.y,x.overallVelocity=d(xe.x)>d(xe.y)?xe.x:xe.y,x.scale=vt?U(vt.pointers,B):1,x.rotation=vt?Nn(vt.pointers,B):0,x.maxPointers=w.prevInput?x.pointers.length>w.prevInput.maxPointers?x.pointers.length:w.prevInput.maxPointers:x.pointers.length,Ji(w,x);var br=y.element;tt(x.srcEvent.target,br)&&(br=x.srcEvent.target),x.target=br}function Er(y,x){var w=x.center,B=y.offsetDelta||{},Y=y.prevDelta||{},j=y.prevInput||{};(x.eventType===$t||j.eventType===Ct)&&(Y=y.prevDelta={x:j.deltaX||0,y:j.deltaY||0},B=y.offsetDelta={x:w.x,y:w.y}),x.deltaX=Y.x+(w.x-B.x),x.deltaY=Y.y+(w.y-B.y)}function Ji(y,x){var w=y.lastInterval||x,B=x.timeStamp-w.timeStamp,Y,j,vt,te;if(x.eventType!=Wt&&(B>Se||w.velocity===a)){var le=x.deltaX-w.deltaX,xe=x.deltaY-w.deltaY,br=tn(B,le,xe);j=br.x,vt=br.y,Y=d(br.x)>d(br.y)?br.x:br.y,te=en(le,xe),y.lastInterval=x}else Y=w.velocity,j=w.velocityX,vt=w.velocityY,te=w.direction;x.velocity=Y,x.velocityX=j,x.velocityY=vt,x.direction=te}function sr(y){for(var x=[],w=0;w<y.pointers.length;)x[w]={clientX:f(y.pointers[w].clientX),clientY:f(y.pointers[w].clientY)},w++;return{timeStamp:g(),pointers:x,center:Ye(x),deltaX:y.deltaX,deltaY:y.deltaY}}function Ye(y){var x=y.length;if(x===1)return{x:f(y[0].clientX),y:f(y[0].clientY)};for(var w=0,B=0,Y=0;Y<x;)w+=y[Y].clientX,B+=y[Y].clientY,Y++;return{x:f(w/x),y:f(B/x)}}function tn(y,x,w){return{x:x/y||0,y:w/y||0}}function en(y,x){return y===x?Oe:d(y)>=d(x)?y<0?Pe:$e:x<0?Kt:Ne}function ui(y,x,w){w||(w=Ci);var B=x[w[0]]-y[w[0]],Y=x[w[1]]-y[w[1]];return Math.sqrt(B*B+Y*Y)}function Si(y,x,w){w||(w=Ci);var B=x[w[0]]-y[w[0]],Y=x[w[1]]-y[w[1]];return Math.atan2(Y,B)*180/Math.PI}function Nn(y,x){return Si(x[1],x[0],oe)+Si(y[1],y[0],oe)}function U(y,x){return ui(x[0],x[1],oe)/ui(y[0],y[1],oe)}var it={mousedown:$t,mousemove:Xt,mouseup:Ct},at="mousedown",bt="mousemove mouseup";function mt(){this.evEl=at,this.evWin=bt,this.pressed=!1,Dt.apply(this,arguments)}W(mt,Dt,{handler:function(x){var w=it[x.type];w&$t&&x.button===0&&(this.pressed=!0),w&Xt&&x.which!==1&&(w=Ct),this.pressed&&(w&Ct&&(this.pressed=!1),this.callback(this.manager,w,{pointers:[x],changedPointers:[x],pointerType:Le,srcEvent:x}))}});var fe={pointerdown:$t,pointermove:Xt,pointerup:Ct,pointercancel:Wt,pointerout:Wt},Me={2:me,3:Vr,4:Le,5:ue},Ar="pointerdown",rn="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(Ar="MSPointerDown",rn="MSPointerMove MSPointerUp MSPointerCancel");function ar(){this.evEl=Ar,this.evWin=rn,Dt.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}W(ar,Dt,{handler:function(x){var w=this.store,B=!1,Y=x.type.toLowerCase().replace("ms",""),j=fe[Y],vt=Me[x.pointerType]||x.pointerType,te=vt==me,le=J(w,x.pointerId,"pointerId");j&$t&&(x.button===0||te)?le<0&&(w.push(x),le=w.length-1):j&(Ct|Wt)&&(B=!0),!(le<0)&&(w[le]=x,this.callback(this.manager,j,{pointers:w,changedPointers:[x],pointerType:vt,srcEvent:x}),B&&w.splice(le,1))}});var Mn={touchstart:$t,touchmove:Xt,touchend:Ct,touchcancel:Wt},nn="touchstart",oi="touchstart touchmove touchend touchcancel";function Bn(){this.evTarget=nn,this.evWin=oi,this.started=!1,Dt.apply(this,arguments)}W(Bn,Dt,{handler:function(x){var w=Mn[x.type];if(w===$t&&(this.started=!0),!!this.started){var B=In.call(this,x,w);w&(Ct|Wt)&&B[0].length-B[1].length===0&&(this.started=!1),this.callback(this.manager,w,{pointers:B[0],changedPointers:B[1],pointerType:me,srcEvent:x})}}});function In(y,x){var w=st(y.touches),B=st(y.changedTouches);return x&(Ct|Wt)&&(w=ht(w.concat(B),"identifier")),[w,B]}var sn={touchstart:$t,touchmove:Xt,touchend:Ct,touchcancel:Wt},dl="touchstart touchmove touchend touchcancel";function an(){this.evTarget=dl,this.targetIds={},Dt.apply(this,arguments)}W(an,Dt,{handler:function(x){var w=sn[x.type],B=gl.call(this,x,w);B&&this.callback(this.manager,w,{pointers:B[0],changedPointers:B[1],pointerType:me,srcEvent:x})}});function gl(y,x){var w=st(y.touches),B=this.targetIds;if(x&($t|Xt)&&w.length===1)return B[w[0].identifier]=!0,[w,w];var Y,j,vt=st(y.changedTouches),te=[],le=this.target;if(j=w.filter(function(xe){return tt(xe.target,le)}),x===$t)for(Y=0;Y<j.length;)B[j[Y].identifier]=!0,Y++;for(Y=0;Y<vt.length;)B[vt[Y].identifier]&&te.push(vt[Y]),x&(Ct|Wt)&&delete B[vt[Y].identifier],Y++;if(te.length)return[ht(j.concat(te),"identifier"),te]}var xa=2500,mu=25;function Ea(){Dt.apply(this,arguments);var y=G(this.handler,this);this.touch=new an(this.manager,y),this.mouse=new mt(this.manager,y),this.primaryTouch=null,this.lastTouches=[]}W(Ea,Dt,{handler:function(x,w,B){var Y=B.pointerType==me,j=B.pointerType==Le;if(!(j&&B.sourceCapabilities&&B.sourceCapabilities.firesTouchEvents)){if(Y)yl.call(this,w,B);else if(j&&ml.call(this,B))return;this.callback(x,w,B)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function yl(y,x){y&$t?(this.primaryTouch=x.changedPointers[0].identifier,vu.call(this,x)):y&(Ct|Wt)&&vu.call(this,x)}function vu(y){var x=y.changedPointers[0];if(x.identifier===this.primaryTouch){var w={x:x.clientX,y:x.clientY};this.lastTouches.push(w);var B=this.lastTouches,Y=function(){var j=B.indexOf(w);j>-1&&B.splice(j,1)};setTimeout(Y,xa)}}function ml(y){for(var x=y.srcEvent.clientX,w=y.srcEvent.clientY,B=0;B<this.lastTouches.length;B++){var Y=this.lastTouches[B],j=Math.abs(x-Y.x),vt=Math.abs(w-Y.y);if(j<=mu&&vt<=mu)return!0}return!1}var xu=ct(l.style,"touchAction"),Eu=xu!==a,Au="compute",Aa="auto",wa="manipulation",Oi="none",Rn="pan-x",Ln="pan-y",ys=vl();function ba(y,x){this.manager=y,this.set(x)}ba.prototype={set:function(y){y==Au&&(y=this.compute()),Eu&&this.manager.element.style&&ys[y]&&(this.manager.element.style[xu]=y),this.actions=y.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var y=[];return C(this.manager.recognizers,function(x){b(x.options.enable,[x])&&(y=y.concat(x.getTouchAction()))}),ms(y.join(" "))},preventDefaults:function(y){var x=y.srcEvent,w=y.offsetDirection;if(this.manager.session.prevented){x.preventDefault();return}var B=this.actions,Y=Z(B,Oi)&&!ys[Oi],j=Z(B,Ln)&&!ys[Ln],vt=Z(B,Rn)&&!ys[Rn];if(Y){var te=y.pointers.length===1,le=y.distance<2,xe=y.deltaTime<250;if(te&&le&&xe)return}if(!(vt&&j)&&(Y||j&&w&ve||vt&&w&Zt))return this.preventSrc(x)},preventSrc:function(y){this.manager.session.prevented=!0,y.preventDefault()}};function ms(y){if(Z(y,Oi))return Oi;var x=Z(y,Rn),w=Z(y,Ln);return x&&w?Oi:x||w?x?Rn:Ln:Z(y,wa)?wa:Aa}function vl(){if(!Eu)return!1;var y={},x=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(w){y[w]=x?t.CSS.supports("touch-action",w):!0}),y}var Ni=1,Xe=2,un=4,li=8,wr=li,on=16,ur=32;function zr(y){this.options=N({},this.defaults,y||{}),this.id=O(),this.manager=null,this.options.enable=P(this.options.enable,!0),this.state=Ni,this.simultaneous={},this.requireFail=[]}zr.prototype={defaults:{},set:function(y){return N(this.options,y),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(y){if(T(y,"recognizeWith",this))return this;var x=this.simultaneous;return y=vs(y,this),x[y.id]||(x[y.id]=y,y.recognizeWith(this)),this},dropRecognizeWith:function(y){return T(y,"dropRecognizeWith",this)?this:(y=vs(y,this),delete this.simultaneous[y.id],this)},requireFailure:function(y){if(T(y,"requireFailure",this))return this;var x=this.requireFail;return y=vs(y,this),J(x,y)===-1&&(x.push(y),y.requireFailure(this)),this},dropRequireFailure:function(y){if(T(y,"dropRequireFailure",this))return this;y=vs(y,this);var x=J(this.requireFail,y);return x>-1&&this.requireFail.splice(x,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(y){return!!this.simultaneous[y.id]},emit:function(y){var x=this,w=this.state;function B(Y){x.manager.emit(Y,y)}w<li&&B(x.options.event+wu(w)),B(x.options.event),y.additionalEvent&&B(y.additionalEvent),w>=li&&B(x.options.event+wu(w))},tryEmit:function(y){if(this.canEmit())return this.emit(y);this.state=ur},canEmit:function(){for(var y=0;y<this.requireFail.length;){if(!(this.requireFail[y].state&(ur|Ni)))return!1;y++}return!0},recognize:function(y){var x=N({},y);if(!b(this.options.enable,[this,x])){this.reset(),this.state=ur;return}this.state&(wr|on|ur)&&(this.state=Ni),this.state=this.process(x),this.state&(Xe|un|li|on)&&this.tryEmit(x)},process:function(y){},getTouchAction:function(){},reset:function(){}};function wu(y){return y&on?"cancel":y&li?"end":y&un?"move":y&Xe?"start":""}function bu(y){return y==Ne?"down":y==Kt?"up":y==Pe?"left":y==$e?"right":""}function vs(y,x){var w=x.manager;return w?w.get(y):y}function Ze(){zr.apply(this,arguments)}W(Ze,zr,{defaults:{pointers:1},attrTest:function(y){var x=this.options.pointers;return x===0||y.pointers.length===x},process:function(y){var x=this.state,w=y.eventType,B=x&(Xe|un),Y=this.attrTest(y);return B&&(w&Wt||!Y)?x|on:B||Y?w&Ct?x|li:x&Xe?x|un:Xe:ur}});function Pn(){Ze.apply(this,arguments),this.pX=null,this.pY=null}W(Pn,Ze,{defaults:{event:"pan",threshold:10,pointers:1,direction:ai},getTouchAction:function(){var y=this.options.direction,x=[];return y&ve&&x.push(Ln),y&Zt&&x.push(Rn),x},directionTest:function(y){var x=this.options,w=!0,B=y.distance,Y=y.direction,j=y.deltaX,vt=y.deltaY;return Y&x.direction||(x.direction&ve?(Y=j===0?Oe:j<0?Pe:$e,w=j!=this.pX,B=Math.abs(y.deltaX)):(Y=vt===0?Oe:vt<0?Kt:Ne,w=vt!=this.pY,B=Math.abs(y.deltaY))),y.direction=Y,w&&B>x.threshold&&Y&x.direction},attrTest:function(y){return Ze.prototype.attrTest.call(this,y)&&(this.state&Xe||!(this.state&Xe)&&this.directionTest(y))},emit:function(y){this.pX=y.deltaX,this.pY=y.deltaY;var x=bu(y.direction);x&&(y.additionalEvent=this.options.event+x),this._super.emit.call(this,y)}});function xs(){Ze.apply(this,arguments)}W(xs,Ze,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Oi]},attrTest:function(y){return this._super.attrTest.call(this,y)&&(Math.abs(y.scale-1)>this.options.threshold||this.state&Xe)},emit:function(y){if(y.scale!==1){var x=y.scale<1?"in":"out";y.additionalEvent=this.options.event+x}this._super.emit.call(this,y)}});function Fn(){zr.apply(this,arguments),this._timer=null,this._input=null}W(Fn,zr,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Aa]},process:function(y){var x=this.options,w=y.pointers.length===x.pointers,B=y.distance<x.threshold,Y=y.deltaTime>x.time;if(this._input=y,!B||!w||y.eventType&(Ct|Wt)&&!Y)this.reset();else if(y.eventType&$t)this.reset(),this._timer=E(function(){this.state=wr,this.tryEmit()},x.time,this);else if(y.eventType&Ct)return wr;return ur},reset:function(){clearTimeout(this._timer)},emit:function(y){this.state===wr&&(y&&y.eventType&Ct?this.manager.emit(this.options.event+"up",y):(this._input.timeStamp=g(),this.manager.emit(this.options.event,this._input)))}});function Ta(){Ze.apply(this,arguments)}W(Ta,Ze,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Oi]},attrTest:function(y){return this._super.attrTest.call(this,y)&&(Math.abs(y.rotation)>this.options.threshold||this.state&Xe)}});function Es(){Ze.apply(this,arguments)}W(Es,Ze,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:ve|Zt,pointers:1},getTouchAction:function(){return Pn.prototype.getTouchAction.call(this)},attrTest:function(y){var x=this.options.direction,w;return x&(ve|Zt)?w=y.overallVelocity:x&ve?w=y.overallVelocityX:x&Zt&&(w=y.overallVelocityY),this._super.attrTest.call(this,y)&&x&y.offsetDirection&&y.distance>this.options.threshold&&y.maxPointers==this.options.pointers&&d(w)>this.options.velocity&&y.eventType&Ct},emit:function(y){var x=bu(y.offsetDirection);x&&this.manager.emit(this.options.event+x,y),this.manager.emit(this.options.event,y)}});function Mi(){zr.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}W(Mi,zr,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[wa]},process:function(y){var x=this.options,w=y.pointers.length===x.pointers,B=y.distance<x.threshold,Y=y.deltaTime<x.time;if(this.reset(),y.eventType&$t&&this.count===0)return this.failTimeout();if(B&&Y&&w){if(y.eventType!=Ct)return this.failTimeout();var j=this.pTime?y.timeStamp-this.pTime<x.interval:!0,vt=!this.pCenter||ui(this.pCenter,y.center)<x.posThreshold;this.pTime=y.timeStamp,this.pCenter=y.center,!vt||!j?this.count=1:this.count+=1,this._input=y;var te=this.count%x.taps;if(te===0)return this.hasRequireFailures()?(this._timer=E(function(){this.state=wr,this.tryEmit()},x.interval,this),Xe):wr}return ur},failTimeout:function(){return this._timer=E(function(){this.state=ur},this.options.interval,this),ur},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==wr&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function $r(y,x){return x=x||{},x.recognizers=P(x.recognizers,$r.defaults.preset),new As(y,x)}$r.VERSION="2.0.7",$r.defaults={domEvents:!1,touchAction:Au,enable:!0,inputTarget:null,inputClass:null,preset:[[Ta,{enable:!1}],[xs,{enable:!1},["rotate"]],[Es,{direction:ve}],[Pn,{direction:ve},["swipe"]],[Mi],[Mi,{event:"doubletap",taps:2},["tap"]],[Fn]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var xl=1,_a=2;function As(y,x){this.options=N({},$r.defaults,x||{}),this.options.inputTarget=this.options.inputTarget||y,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=y,this.input=nr(this),this.touchAction=new ba(this,this.options.touchAction),ws(this,!0),C(this.options.recognizers,function(w){var B=this.add(new w[0](w[1]));w[2]&&B.recognizeWith(w[2]),w[3]&&B.requireFailure(w[3])},this)}As.prototype={set:function(y){return N(this.options,y),y.touchAction&&this.touchAction.update(),y.inputTarget&&(this.input.destroy(),this.input.target=y.inputTarget,this.input.init()),this},stop:function(y){this.session.stopped=y?_a:xl},recognize:function(y){var x=this.session;if(!x.stopped){this.touchAction.preventDefaults(y);var w,B=this.recognizers,Y=x.curRecognizer;(!Y||Y&&Y.state&wr)&&(Y=x.curRecognizer=null);for(var j=0;j<B.length;)w=B[j],x.stopped!==_a&&(!Y||w==Y||w.canRecognizeWith(Y))?w.recognize(y):w.reset(),!Y&&w.state&(Xe|un|li)&&(Y=x.curRecognizer=w),j++}},get:function(y){if(y instanceof zr)return y;for(var x=this.recognizers,w=0;w<x.length;w++)if(x[w].options.event==y)return x[w];return null},add:function(y){if(T(y,"add",this))return this;var x=this.get(y.options.event);return x&&this.remove(x),this.recognizers.push(y),y.manager=this,this.touchAction.update(),y},remove:function(y){if(T(y,"remove",this))return this;if(y=this.get(y),y){var x=this.recognizers,w=J(x,y);w!==-1&&(x.splice(w,1),this.touchAction.update())}return this},on:function(y,x){if(y!==a&&x!==a){var w=this.handlers;return C(rt(y),function(B){w[B]=w[B]||[],w[B].push(x)}),this}},off:function(y,x){if(y!==a){var w=this.handlers;return C(rt(y),function(B){x?w[B]&&w[B].splice(J(w[B],x),1):delete w[B]}),this}},emit:function(y,x){this.options.domEvents&&El(y,x);var w=this.handlers[y]&&this.handlers[y].slice();if(!(!w||!w.length)){x.type=y,x.preventDefault=function(){x.srcEvent.preventDefault()};for(var B=0;B<w.length;)w[B](x),B++}},destroy:function(){this.element&&ws(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function ws(y,x){var w=y.element;if(w.style){var B;C(y.options.cssProps,function(Y,j){B=ct(w.style,j),x?(y.oldCssProps[B]=w.style[B],w.style[B]=Y):w.style[B]=y.oldCssProps[B]||""}),x||(y.oldCssProps={})}}function El(y,x){var w=e.createEvent("Event");w.initEvent(y,!0,!0),w.gesture=x,x.target.dispatchEvent(w)}N($r,{INPUT_START:$t,INPUT_MOVE:Xt,INPUT_END:Ct,INPUT_CANCEL:Wt,STATE_POSSIBLE:Ni,STATE_BEGAN:Xe,STATE_CHANGED:un,STATE_ENDED:li,STATE_RECOGNIZED:wr,STATE_CANCELLED:on,STATE_FAILED:ur,DIRECTION_NONE:Oe,DIRECTION_LEFT:Pe,DIRECTION_RIGHT:$e,DIRECTION_UP:Kt,DIRECTION_DOWN:Ne,DIRECTION_HORIZONTAL:ve,DIRECTION_VERTICAL:Zt,DIRECTION_ALL:ai,Manager:As,Input:Dt,TouchAction:ba,TouchInput:an,MouseInput:mt,PointerEventInput:ar,TouchMouseInput:Ea,SingleTouchInput:Bn,Recognizer:zr,AttrRecognizer:Ze,Tap:Mi,Pan:Pn,Swipe:Es,Pinch:xs,Rotate:Ta,Press:Fn,on:H,off:K,each:C,merge:R,extend:M,assign:N,inherit:W,bindFn:G,prefixed:ct});var Tu=typeof t<"u"?t:typeof self<"u"?self:{};Tu.Hammer=$r,r.exports?r.exports=$r:t[i]=$r})(window,document,"Hammer")})(of);var C2=of.exports;const Yi=Oh(C2),lf=new F,qr=new F;class hf extends dr{name="orbit-controller.ts";isSvg=!1;dom;domOffset=new F;camera;hammer;enabled=!0;enablePan=!0;enableRotate=!0;rotateSpeed=1;enableZoom=!0;minZoom=0;maxZoom=1/0;zoomSpeed=1;zoomChanged=!1;distanceStart=1;distanceEnd=1;state=-1;EPS=1e-6;focus=new F;target=new F;scaled=1;rotateTheta=0;enableDamping=!1;dampingFactor=.05;mouseButtons={LEFT:2,MIDDLE:1,RIGHT:0};isWheeling=!1;finalTimer;rotateStart=new F;rotateEnd=new F;rotateDelta=new F;panStart=new F;panEnd=new F;panOffset=new F;dollyStart=0;dollyOffset=new F;contextMenuHandler=this.handleContextMenu.bind(this);wheelHandler=this.handleWheel.bind(this);pointerDownHandler=this.handlePointerDown.bind(this);pointerUpHandler=this.handlePointerUp.bind(this);pointerMoveHandler=this.handlePointerMove.bind(this);pointerOverHandler=St.debounce(this.handlePointerOver.bind(this),100);pointerLeaveHandler=this.handlePointerLeave.bind(this);tapHandler=this.handleTap.bind(this);panHandler=this.handlePan.bind(this);pinchHandler=this.handlePinch.bind(this);pressHandler=this.handlePress.bind(this);swipeHandler=this.handleSwipe.bind(this);hammerInputHandler=this.handleHammerInput.bind(this);constructor(t,e,i=!1){super(),this.isSvg=i,this.dom=t,this.camera=e,this.scaled=e.scaled.x,this.resize(),this.dom.style.touchAction="none",this.bindEvents()}destroy(){this.unbindEvents(),super.destroy()}resize(){let t=this.dom.getBoundingClientRect();this.domOffset.set(t.left,t.top)}update(){lf.copy(this.camera.position).sub(this.target),this.target.add(this.panOffset),this.camera.position.copy(this.target).add(lf),this.camera.position.add(this.dollyOffset),this.camera.scaled.set(this.scaled,this.scaled),this.camera.update(),this.panOffset.set(0,0),this.dollyOffset.set(0,0),this.scaled=this.camera.scaled.x,this.dispatchEvent({type:"cameraChanged",data:{t:this.camera.position,r:this.camera.rotation.x,s:this.camera.scaled.x}})}bindEvents(){this.unbindEvents(),this.hammer=new Yi.Manager(this.dom,{domEvents:!0});const t=new Yi.Pan({threshold:0,pointers:0}),e=new Yi.Pinch({threshold:0}),i=new Yi.Tap({event:"singletap",taps:1}),a=new Yi.Press({});this.hammer.add([t,i,a,e]),e.recognizeWith(t),this.hammer.on(["panstart","panmove","panend"].join(" "),this.panHandler),this.hammer.on(["pinchstart","pinchmove","pinchend"].join(" "),this.pinchHandler),this.hammer.on("singletap",this.tapHandler),this.hammer.on("press",this.pressHandler),this.hammer.on("swipe",this.swipeHandler),this.hammer.on("hammer.input",this.hammerInputHandler),this.dom.addEventListener("contextmenu",this.contextMenuHandler),this.dom.addEventListener("wheel",this.wheelHandler,{passive:!1}),this.dom.addEventListener("mousemove",this.pointerOverHandler),this.isSvg||(this.dom.addEventListener("pointerdown",this.pointerDownHandler),this.dom.addEventListener("pointerleave",this.pointerLeaveHandler))}unbindEvents(){var t,e,i,a,u,l,c,f;(t=this.hammer)==null||t.off(["panstart","panmove","panend"].join(" "),this.panHandler),(e=this.hammer)==null||e.off(["pinchstart","pinchmove","pinchend"].join(" "),this.pinchHandler),(i=this.hammer)==null||i.off("singletap",this.tapHandler),(a=this.hammer)==null||a.off("press",this.pressHandler),(u=this.hammer)==null||u.off("swipe",this.swipeHandler),(l=this.hammer)==null||l.off("hammer.input",this.hammerInputHandler),this.dom.removeEventListener("contextmenu",this.contextMenuHandler),this.dom.removeEventListener("wheel",this.wheelHandler),this.dom.removeEventListener("mousemove",this.pointerOverHandler),this.isSvg||(this.dom.removeEventListener("pointerdown",this.pointerDownHandler),this.dom.removeEventListener("pointerleave",this.pointerLeaveHandler)),(c=this.hammer)==null||c.stop(!0),(f=this.hammer)==null||f.destroy()}setFocus(t,e){this.focus.set(t,e).sub(this.domOffset).unproject(this.camera)}handleTap(t){typeof t.preventDefault=="function"&&t.preventDefault(),console.log("【orbitController】Tap: ",t),qr.set(t.center.x,t.center.y).sub(this.domOffset),this.dispatchEvent({type:"tap",data:{screenCoords:{x:qr.x,y:qr.y}},e:t})}handleDoubleTap(t){typeof t.preventDefault=="function"&&t.preventDefault(),console.log("【orbitController】DoubleTap: ",t),qr.set(t.center.x,t.center.y).sub(this.domOffset),this.dispatchEvent({type:"doubletap",data:{screenCoords:{x:qr.x,y:qr.y}}})}handlePress(t){typeof t.preventDefault=="function"&&t.preventDefault(),console.log("【orbitController】Press: ",t)}handlePan(t){var i;if(((i=t.pointers)==null?void 0:i.length)!==1)return;typeof t.preventDefault=="function"&&t.preventDefault();const e={type:"panmove",data:{}};(t.isFirst||t.type==="panstart")&&(this.state=2,this.panStart.set(t.center.x,t.center.y),e.type="panstart"),(t.isFinal||t.type==="panend")&&(this.state=-1,e.type="panend"),this.panEnd.set(t.center.x,t.center.y),this.panOffset.subVectors(this.panEnd,this.panStart).multiplyScalar(-this.camera.scaled.x,-this.camera.scaled.y*(this.camera.flipY?1:-1)),this.panStart.copy(this.panEnd),qr.set(t.center.x,t.center.y).sub(this.domOffset),e.data.screenCoords=qr.clone(),this.dispatchEvent(e),this.enablePan&&this.update()}handlePinch(t){typeof t.preventDefault=="function"&&t.preventDefault(),t.type==="pinchstart"&&(this.dollyStart=this.camera.scaled.x,this.state=1),(t.isFinal||t.type==="pinchend")&&(this.state=-1),this.scaled=this.dollyStart*(1/t.scale);let e=(this.scaled-this.camera.scaled.x)/this.camera.scaled.x;this.setFocus(t.center.x,t.center.y),this.dollyOffset.copy(this.camera.position).lerp(this.focus,-e).sub(this.camera.position),this.update()}handleRotate(t){typeof t.preventDefault=="function"&&t.preventDefault()}handleSwipe(t){typeof t.preventDefault=="function"&&t.preventDefault()}handleHammerInput(t){t.isFirst&&(this.state=9),t.isFinal&&(this.state=-1)}handleContextMenu(t){this.enabled&&typeof t.preventDefault=="function"&&t.preventDefault()}handleWheel(t){if(typeof t.preventDefault=="function"&&t.preventDefault(),!this.enabled||!this.enableZoom||this.state!==-1)return;this.isWheeling||(this.dispatchEvent({type:"wheelstart"}),this.isWheeling=!0),typeof t.preventDefault=="function"&&t.preventDefault(),typeof t.stopPropagation=="function"&&t.stopPropagation();let e=t.deltaY;(t==null?void 0:t.deltaMode)===1?e*=16:(t==null?void 0:t.deltaMode)===2&&(e*=100),t!=null&&t.ctrlKey&&(e*=10),this.setFocus(t.clientX,t.clientY);let i=this.getZoomScale(e);e<0?this.onDollyIn(i):e>0?this.onDollyOut(i):(this.scaled=this.camera.scaled.x,this.dollyOffset.set(0,0)),this.update(),clearTimeout(this.finalTimer),this.finalTimer=setTimeout(()=>{this.isWheeling&&(this.dispatchEvent({type:"wheelend"}),this.isWheeling=!1)},500)}onDollyIn(t){this.scaled=Math.max(this.minZoom,Math.min(this.maxZoom,this.camera.scaled.x*t)),this.dollyOffset.copy(this.camera.position).lerp(this.focus,1-t).sub(this.camera.position)}onDollyOut(t){this.scaled=Math.max(this.minZoom,Math.min(this.maxZoom,this.camera.scaled.x/t)),this.dollyOffset.copy(this.camera.position).lerp(this.focus,-1+t).sub(this.camera.position)}getZoomScale(t){return Math.pow(.95,this.zoomSpeed*Math.abs(t*.03))}handlePointerDown(t){if(!this.enabled||t.button!==2)return;this.dom.addEventListener("pointermove",this.pointerMoveHandler),this.dom.addEventListener("pointerup",this.pointerUpHandler);let e=-1;t.button===0?e=this.mouseButtons.LEFT:t.button===1?e=this.mouseButtons.MIDDLE:t.button===2&&(e=this.mouseButtons.RIGHT),e===0&&(this.rotateStart.set(t.clientX,t.clientY),this.setFocus(this.rotateStart.x,this.rotateStart.y),this.state=0)}handlePointerUp(){this.dom.removeEventListener("pointermove",this.pointerMoveHandler),this.dom.removeEventListener("pointerup",this.pointerUpHandler),this.state=-1}handlePointerLeave(){this.state=-1}handlePointerMove(t){if(this.enabled&&this.state===0){if(!this.enableRotate)return;this.onRotate(t.clientX,t.clientY)}}handlePointerOver(t){t.buttons>0||(qr.set(t.clientX,t.clientY).sub(this.domOffset),this.dispatchEvent({type:"pointerover",data:{screenCoords:{x:qr.x,y:qr.y}},e:t}))}onRotate(t,e){this.rotateEnd.set(t,e),this.rotateDelta.subVectors(this.rotateEnd,this.rotateStart).multiplyScalar(this.rotateSpeed);const i=this.rotateDelta.x*Math.PI*2/this.dom.clientHeight;this.rotateTheta-=i,this.rotateStart.copy(this.rotateEnd),this.camera.rotation.x-=this.rotateTheta,this.target.rotateAround(this.focus,-this.rotateTheta),this.camera.position.copy(this.target),this.camera.update(),this.rotateTheta=0}}var _t=(r=>(r.CONTEXTMENU="contextmenu",r.LOSTPOINTERCAPTURE="lostpointercapture",r.MOUSEOVER="mouseover",r.MOUSEOUT="mouseout",r.MOUSELEAVE="mouseleave",r.MOUSEENTER="mouseenter",r.MOUSEMOVE="mousemove",r.MOUSEDOWN="mousedown",r.MOUSEUP="mouseup",r.POINTERMOVE="pointermove",r.POINTERDOWN="pointerdown",r.POINTERUP="pointerup",r.POINTERCANCEL="pointercancel",r.POINTEROUT="pointerout",r.POINTERLEAVE="pointerleave",r.POINTEROVER="pointerover",r.POINTERENTER="pointerenter",r.TOUCHSTART="touchstart",r.TOUCHEND="touchend",r.TOUCHMOVE="touchmove",r.TOUCHCANCEL="touchcancel",r.WHEEL="wheel",r.WHEEL_START="wheelstart",r.WHEEL_END="wheelend",r.MOUSEWHEEL="mousewheel",r.CLICK="click",r.DBLCLICK="dblclick",r.CONTEXT_LOST="contextlost",r.CONTEXT_RESTORED="contextrestored",r.CONTROLS_CHANGED="controlschanged",r.TAP="tap",r.SINGLE_TAP="singletap",r.DOUBLE_TAP="doubletap",r.PRESS="press",r.PAN="pan",r.PAN_START="panstart",r.PAN_MOVE="panmove",r.PAN_END="panend",r.ROTATE="rotate",r.ROTATE_START="rotatestart",r.ROTATE_MOVE="rotatemove",r.ROTATE_END="rotateend",r.PINCH="pinch",r.PINCH_START="pinchstart",r.PINCH_MOVE="pinchmove",r.PINCH_END="pinchend",r.PINCH_IN="pinchin",r.PINCH_OUT="pinchout",r.SWIPE="swipe",r.CHANGE_START="change_start",r.CHANGE_END="change_end",r.CAMERA_CHANGED="cameraChanged",r))(_t||{});const ia=new F;class cf extends Mc{isCamera=!0;type="Camera2";name="Camera2";params;matrixAutoUpdate=!1;matrixWorldAutoUpdate=!1;projectionMatrix=new ie;projectionMatrixInverse=new ie;viewMatrix=new ie;viewMatrixNeedsUpdate=!0;viewArea=0;left=-1;right=1;top=1;bottom=-1;width=2;height=2;aspect=1;view;constructor(t){super(),this.params=t,this.width=(t==null?void 0:t.width)!==void 0?t.width:2,this.height=(t==null?void 0:t.height)!==void 0?t.height:2,this.aspect=(t==null?void 0:t.aspect)!==void 0?t.aspect:1,(t==null?void 0:t.left)!==void 0&&(this.left=t.left),(t==null?void 0:t.right)!==void 0&&(this.right=t.right),(t==null?void 0:t.top)!==void 0&&(this.top=t.top),(t==null?void 0:t.bottom)!==void 0&&(this.bottom=t.bottom);const e=(this.right+this.left)/2,i=(this.top+this.bottom)/2;if(this.aspect>1){const a=Math.round((this.right-this.left)/2/this.aspect);this.top=i+a,this.bottom=i-a}else if(this.aspect<1){const a=Math.round((this.top-this.bottom)/2*this.aspect);this.left=e-a,this.right=e+a}this.flipY=(t==null?void 0:t.flipY)===!0,this.updateProjectionMatrix(),t!=null&&t.eye&&this.position.fromArray(t.eye),t!=null&&t.up&&this.up.fromArray(t.up),this.computeBoundingBox(),this.update()}destroy(){super.destroy()}get pixelWidth(){return this.scaled.x}set(t=-1,e=1,i=1,a=-1){ia.set(t+e,a+i).multiplyScalar(.5);const u=Math.max((e-t)/this.width,(i-a)/this.height);this.setTRS(ia,0,u)}setByBox(t){if(!t||t.isEmpty()){console.error(`setByBox: ${t==null?void 0:t.toString()}`);return}this.set(t.min.x,t.max.x,t.max.y,t.min.y)}setTRS(t={x:0,y:0},e=0,i=0){this.position.set(t.x||0,t.y||0),this.rotation.set(e,e),this.scaled.set(i,i),this.update()}resize(){this.setSize(this.params.width,this.params.height)}setSize(t,e){this.width=t||2,this.height=e||2,this.left=this.params.left||-1,this.right=this.params.right||1,this.top=this.params.top||1,this.bottom=this.params.bottom||-1,this.aspect=t/e;const i=(this.right+this.left)/2,a=(this.top+this.bottom)/2;if(this.aspect>1){const u=Math.round((this.right-this.left)/2/this.aspect);this.top=a+u,this.bottom=a-u}else if(this.aspect<1){const u=Math.round((this.top-this.bottom)/2*this.aspect);this.left=i-u,this.right=i+u}this.updateProjectionMatrix(),this.update(),this.matrix.decompose(this.position,this.rotation,this.scaled)}getWorldDirection(t){this.updateWorldMatrix(!0,!1);const e=this.matrixWorld.elements;return t.set(-e[6],-e[7]).normalize()}getCameraPosition(){return{x:this.position.x,y:this.position.y,z:this.position.z,s:this.scaled.x,r:this.rotation.x}}updateMatrixWorld(t=!1){super.updateMatrixWorld(t),this.updateViewMatrix()}updateProjectionMatrix(){this.parent===void 0&&this.matrixWorldAutoUpdate&&this.updateMatrixWorld(),this.projectionMatrix.makeProjection(this.left,this.right,this.top,this.bottom,this.width,this.height),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}updateViewMatrix(){this.matrixWorldInverse.copy(this.matrixWorld).invert(),this.viewMatrix.multiplyMatrices(this.projectionMatrix,this.matrixWorldInverse)}update(){this.matrixAutoUpdate||this.updateMatrix(),this.updateMatrixWorld(),this.needsUpdate=!0,this.updateBoundingBox(),this.dispatchEvent({type:"update",data:{t:this.position,r:this.rotation.x,s:this.scaled.x}})}computeBoundingBox(){return ia.set(this.width,this.height).multiplyScalar(.5).multiplyScalar(this.scaled.x),this.boundingBox.min.subVectors(this.position,ia),this.boundingBox.max.addVectors(this.position,ia),this.boundingBox}updateBoundingBox(){super.updateBoundingBox(),this.viewArea=this.boundingBoxWorld.getArea()}toJSON(){const t={};return t.left=this.left,t.right=this.right,t.top=this.top,t.bottom=this.bottom,t.width=this.width,t.height=this.height,t.aspect=this.aspect,t.position=this.position.toArray(),t.rotation=this.rotation.toArray(),t.scaled=this.scaled.toArray(),t}fromJSON(t){this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.width=t.width,this.height=t.height,this.aspect=t.aspect,this.position.fromArray(t.position),this.rotation.fromArray(t.rotation),this.scaled.fromArray(t.scaled),this.updateProjectionMatrix(),this.update()}clone(){return new this.constructor.prototype.constructor().copy(this)}copy(t,e=!0){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this.width=t.width,this.height=t.height,this.aspect=t.aspect,this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this}}var au=(r=>(r.UPDATE="update",r))(au||{});class ff extends dr{name="SvgSelectRect";container;el;constructor(t){super(),t?this.container=t:this.container=document.getElementsByTagName("body")[0],this.el=document.createElement("div"),this.el.setAttribute("id",ss+"SvgSelectRect"),this.el.setAttribute("class",ss+"-svg-select-rect"),this.el.style.display="none",this.container.appendChild(this.el)}destroy(){super.destroy(),this.el&&this.el.remove()}draw(t){pf.copy(t).getSize(qo),Ho.copy(pf.min),this.el.style.display="none",this.el.style.position="absolute",this.el.style.left=Ho.x+"px",this.el.style.top=Ho.y+"px",this.el.style.width=qo.x+"px",this.el.style.height=qo.y+"px",this.el.style.display="block",this.el.style.background=new qt(zt.darkBlue).setA(.1).getStyle(),this.el.style.border=zt.darkBlue+" 1px dashed"}hide(){this.el.style.display="none"}}const pf=new Ot,Ho=new F,qo=new F;class D2 extends dr{name="SvgMultiSelector";controller;scene;container;p1=new F;p2=new F;graph;selectEnable=!1;multiSelectEnable=!1;controllerTapHandler=this.handleControllerTap.bind(this);controllerPanStartHandler=this.handleControllerPanStart.bind(this);controllerPanMoveHandler=this.handleControllerPanMove.bind(this);controllerPanEndHandler=this.handleControllerPanEnd.bind(this);constructor(t,e){super(),this.container=t,this.controller=e,this.graph=new ff(t),this.bindControllerEvents()}destroy(){this.unbindControllerEvents(),super.destroy()}bindScene(t){this.scene=t}selectEnableChanged(t){var e;(e=this.scene)==null||e.clearSelected(),this.selectEnable=!!t}multiSelectEnableChanged(t){var e;(e=this.scene)==null||e.clearSelected(),this.multiSelectEnable=!!t,this.controller.enablePan=!this.multiSelectEnable}bindControllerEvents(){this.controller.addEventListener(_t.TAP,this.controllerTapHandler),this.controller.addEventListener(_t.PAN_START,this.controllerPanStartHandler),this.controller.addEventListener(_t.PAN_MOVE,this.controllerPanMoveHandler),this.controller.addEventListener(_t.PAN_END,this.controllerPanEndHandler)}unbindControllerEvents(){this.controller.removeEventListener(_t.TAP,this.controllerTapHandler),this.controller.removeEventListener(_t.PAN_START,this.controllerPanStartHandler),this.controller.removeEventListener(_t.PAN_MOVE,this.controllerPanMoveHandler),this.controller.removeEventListener(_t.PAN_END,this.controllerPanEndHandler)}handleControllerTap(t){var i,a,u,l,c,f;if((t==null?void 0:t.type)!==_t.TAP||!this.selectEnable&&!this.multiSelectEnable)return;const e=((i=t==null?void 0:t.e)==null?void 0:i.target)||((u=(a=t==null?void 0:t.e)==null?void 0:a.srcEvent)==null?void 0:u.target)||((c=(l=t==null?void 0:t.e)==null?void 0:l.srcEvent)==null?void 0:c.srcElement);e!=null&&e.id&&(f=this.scene)!=null&&f.isBelongsToAssetType(e==null?void 0:e.id)&&this.dispatchEvent({type:"SELECTED",data:{...t.data,target:[e],selected:[e==null?void 0:e.id]}})}handleControllerPanStart(t){(t==null?void 0:t.type)===_t.PAN_START&&this.multiSelectEnable&&(this.p1.copy(t.data.screenCoords),wn.makeEmpty().expandByPoint(this.p1),this.graph.draw(wn))}handleControllerPanMove(t){(t==null?void 0:t.type)===_t.PAN_MOVE&&this.multiSelectEnable&&(this.p2.copy(t.data.screenCoords),wn.makeEmpty().expandByPoint(this.p1).expandByPoint(this.p2),this.graph.draw(wn))}handleControllerPanEnd(t){var a;if((t==null?void 0:t.type)!==_t.PAN_END||!this.multiSelectEnable)return;this.p2.copy(t.data.screenCoords),wn.makeEmpty().expandByPoint(this.p1).expandByPoint(this.p2).unproject(this.controller.camera);const e=(a=this.scene)==null?void 0:a.getElementsByBox(wn),i=[];(e||[]).forEach(u=>i.push(u.id)),this.graph.hide(),wn.makeEmpty(),this.dispatchEvent({type:"SELECTED",data:{target:e,selected:i}})}}var Wo=(r=>(r.SELECTED="SELECTED",r))(Wo||{});const wn=new Ot;var bn=(r=>(r.DEFAULT="default",r.INFO="info",r.PRIMARY="primary",r.SUCCESS="success",r.WARNING="warning",r.DANGER="danger",r))(bn||{});class S2{camera;screenCoords=new F;worldCoords=new F;params={Shape:{},Line:{threshold:1},Points:{threshold:1},Sprite:{}};constructor(){}setFromCamera(t,e){return this.camera=e,this.screenCoords.set(t.x,t.y),this.worldCoords.copy(this.screenCoords).unproject(e),this}intersectObjects(t,e=!0,i=[]){for(let a=0,u=t.length;a<u;a++)this.intersectObject(t[a],e,i)}intersectObject(t,e=!1,i=[]){if(!t.selectable||(t.raycast(this,i),!e||t.composeNode))return i;for(let a=0,u=t.children.length;a<u;a++)this.intersectObject(t.children[a],e,i);return i}}var Ve="top",gr="bottom",yr="right",ze="left",Vo="auto",na=[Ve,gr,yr,ze],us="start",sa="end",O2="clippingParents",df="viewport",aa="popper",N2="reference",gf=na.reduce(function(r,t){return r.concat([t+"-"+us,t+"-"+sa])},[]),yf=[].concat(na,[Vo]).reduce(function(r,t){return r.concat([t,t+"-"+us,t+"-"+sa])},[]),M2="beforeRead",B2="read",I2="afterRead",R2="beforeMain",L2="main",P2="afterMain",F2="beforeWrite",U2="write",k2="afterWrite",H2=[M2,B2,I2,R2,L2,P2,F2,U2,k2];function ti(r){return r?(r.nodeName||"").toLowerCase():null}function rr(r){if(r==null)return window;if(r.toString()!=="[object Window]"){var t=r.ownerDocument;return t&&t.defaultView||window}return r}function Tn(r){var t=rr(r).Element;return r instanceof t||r instanceof Element}function mr(r){var t=rr(r).HTMLElement;return r instanceof t||r instanceof HTMLElement}function zo(r){if(typeof ShadowRoot>"u")return!1;var t=rr(r).ShadowRoot;return r instanceof t||r instanceof ShadowRoot}function q2(r){var t=r.state;Object.keys(t.elements).forEach(function(e){var i=t.styles[e]||{},a=t.attributes[e]||{},u=t.elements[e];!mr(u)||!ti(u)||(Object.assign(u.style,i),Object.keys(a).forEach(function(l){var c=a[l];c===!1?u.removeAttribute(l):u.setAttribute(l,c===!0?"":c)}))})}function W2(r){var t=r.state,e={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,e.popper),t.styles=e,t.elements.arrow&&Object.assign(t.elements.arrow.style,e.arrow),function(){Object.keys(t.elements).forEach(function(i){var a=t.elements[i],u=t.attributes[i]||{},l=Object.keys(t.styles.hasOwnProperty(i)?t.styles[i]:e[i]),c=l.reduce(function(f,d){return f[d]="",f},{});!mr(a)||!ti(a)||(Object.assign(a.style,c),Object.keys(u).forEach(function(f){a.removeAttribute(f)}))})}}const mf={name:"applyStyles",enabled:!0,phase:"write",fn:q2,effect:W2,requires:["computeStyles"]};function ei(r){return r.split("-")[0]}var _n=Math.max,uu=Math.min,os=Math.round;function $o(){var r=navigator.userAgentData;return r!=null&&r.brands&&Array.isArray(r.brands)?r.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function vf(){return!/^((?!chrome|android).)*safari/i.test($o())}function ls(r,t,e){t===void 0&&(t=!1),e===void 0&&(e=!1);var i=r.getBoundingClientRect(),a=1,u=1;t&&mr(r)&&(a=r.offsetWidth>0&&os(i.width)/r.offsetWidth||1,u=r.offsetHeight>0&&os(i.height)/r.offsetHeight||1);var l=Tn(r)?rr(r):window,c=l.visualViewport,f=!vf()&&e,d=(i.left+(f&&c?c.offsetLeft:0))/a,g=(i.top+(f&&c?c.offsetTop:0))/u,E=i.width/a,T=i.height/u;return{width:E,height:T,top:g,right:d+E,bottom:g+T,left:d,x:d,y:g}}function Go(r){var t=ls(r),e=r.offsetWidth,i=r.offsetHeight;return Math.abs(t.width-e)<=1&&(e=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:r.offsetLeft,y:r.offsetTop,width:e,height:i}}function xf(r,t){var e=t.getRootNode&&t.getRootNode();if(r.contains(t))return!0;if(e&&zo(e)){var i=t;do{if(i&&r.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function wi(r){return rr(r).getComputedStyle(r)}function V2(r){return["table","td","th"].indexOf(ti(r))>=0}function Xi(r){return((Tn(r)?r.ownerDocument:r.document)||window.document).documentElement}function ou(r){return ti(r)==="html"?r:r.assignedSlot||r.parentNode||(zo(r)?r.host:null)||Xi(r)}function Ef(r){return!mr(r)||wi(r).position==="fixed"?null:r.offsetParent}function z2(r){var t=/firefox/i.test($o()),e=/Trident/i.test($o());if(e&&mr(r)){var i=wi(r);if(i.position==="fixed")return null}var a=ou(r);for(zo(a)&&(a=a.host);mr(a)&&["html","body"].indexOf(ti(a))<0;){var u=wi(a);if(u.transform!=="none"||u.perspective!=="none"||u.contain==="paint"||["transform","perspective"].indexOf(u.willChange)!==-1||t&&u.willChange==="filter"||t&&u.filter&&u.filter!=="none")return a;a=a.parentNode}return null}function ua(r){for(var t=rr(r),e=Ef(r);e&&V2(e)&&wi(e).position==="static";)e=Ef(e);return e&&(ti(e)==="html"||ti(e)==="body"&&wi(e).position==="static")?t:e||z2(r)||t}function Yo(r){return["top","bottom"].indexOf(r)>=0?"x":"y"}function oa(r,t,e){return _n(r,uu(t,e))}function $2(r,t,e){var i=oa(r,t,e);return i>e?e:i}function Af(){return{top:0,right:0,bottom:0,left:0}}function wf(r){return Object.assign({},Af(),r)}function bf(r,t){return t.reduce(function(e,i){return e[i]=r,e},{})}var G2=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,wf(typeof t!="number"?t:bf(t,na))};function Y2(r){var t,e=r.state,i=r.name,a=r.options,u=e.elements.arrow,l=e.modifiersData.popperOffsets,c=ei(e.placement),f=Yo(c),d=[ze,yr].indexOf(c)>=0,g=d?"height":"width";if(!(!u||!l)){var E=G2(a.padding,e),T=Go(u),C=f==="y"?Ve:ze,L=f==="y"?gr:yr,N=e.rects.reference[g]+e.rects.reference[f]-l[f]-e.rects.popper[g],M=l[f]-e.rects.reference[f],R=ua(u),W=R?f==="y"?R.clientHeight||0:R.clientWidth||0:0,G=N/2-M/2,b=E[C],P=W-T[g]-E[L],H=W/2-T[g]/2+G,K=oa(b,H,P),tt=f;e.modifiersData[i]=(t={},t[tt]=K,t.centerOffset=K-H,t)}}function X2(r){var t=r.state,e=r.options,i=e.element,a=i===void 0?"[data-popper-arrow]":i;a!=null&&(typeof a=="string"&&(a=t.elements.popper.querySelector(a),!a)||xf(t.elements.popper,a)&&(t.elements.arrow=a))}const Z2={name:"arrow",enabled:!0,phase:"main",fn:Y2,effect:X2,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function hs(r){return r.split("-")[1]}var Q2={top:"auto",right:"auto",bottom:"auto",left:"auto"};function K2(r,t){var e=r.x,i=r.y,a=t.devicePixelRatio||1;return{x:os(e*a)/a||0,y:os(i*a)/a||0}}function Tf(r){var t,e=r.popper,i=r.popperRect,a=r.placement,u=r.variation,l=r.offsets,c=r.position,f=r.gpuAcceleration,d=r.adaptive,g=r.roundOffsets,E=r.isFixed,T=l.x,C=T===void 0?0:T,L=l.y,N=L===void 0?0:L,M=typeof g=="function"?g({x:C,y:N}):{x:C,y:N};C=M.x,N=M.y;var R=l.hasOwnProperty("x"),W=l.hasOwnProperty("y"),G=ze,b=Ve,P=window;if(d){var H=ua(e),K="clientHeight",tt="clientWidth";if(H===rr(e)&&(H=Xi(e),wi(H).position!=="static"&&c==="absolute"&&(K="scrollHeight",tt="scrollWidth")),H=H,a===Ve||(a===ze||a===yr)&&u===sa){b=gr;var Z=E&&H===P&&P.visualViewport?P.visualViewport.height:H[K];N-=Z-i.height,N*=f?1:-1}if(a===ze||(a===Ve||a===gr)&&u===sa){G=yr;var rt=E&&H===P&&P.visualViewport?P.visualViewport.width:H[tt];C-=rt-i.width,C*=f?1:-1}}var J=Object.assign({position:c},d&&Q2),st=g===!0?K2({x:C,y:N},rr(e)):{x:C,y:N};if(C=st.x,N=st.y,f){var ht;return Object.assign({},J,(ht={},ht[b]=W?"0":"",ht[G]=R?"0":"",ht.transform=(P.devicePixelRatio||1)<=1?"translate("+C+"px, "+N+"px)":"translate3d("+C+"px, "+N+"px, 0)",ht))}return Object.assign({},J,(t={},t[b]=W?N+"px":"",t[G]=R?C+"px":"",t.transform="",t))}function j2(r){var t=r.state,e=r.options,i=e.gpuAcceleration,a=i===void 0?!0:i,u=e.adaptive,l=u===void 0?!0:u,c=e.roundOffsets,f=c===void 0?!0:c,d={placement:ei(t.placement),variation:hs(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Tf(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:l,roundOffsets:f})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Tf(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const J2={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:j2,data:{}};var lu={passive:!0};function ty(r){var t=r.state,e=r.instance,i=r.options,a=i.scroll,u=a===void 0?!0:a,l=i.resize,c=l===void 0?!0:l,f=rr(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return u&&d.forEach(function(g){g.addEventListener("scroll",e.update,lu)}),c&&f.addEventListener("resize",e.update,lu),function(){u&&d.forEach(function(g){g.removeEventListener("scroll",e.update,lu)}),c&&f.removeEventListener("resize",e.update,lu)}}const ey={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:ty,data:{}};var ry={left:"right",right:"left",bottom:"top",top:"bottom"};function hu(r){return r.replace(/left|right|bottom|top/g,function(t){return ry[t]})}var iy={start:"end",end:"start"};function _f(r){return r.replace(/start|end/g,function(t){return iy[t]})}function Xo(r){var t=rr(r),e=t.pageXOffset,i=t.pageYOffset;return{scrollLeft:e,scrollTop:i}}function Zo(r){return ls(Xi(r)).left+Xo(r).scrollLeft}function ny(r,t){var e=rr(r),i=Xi(r),a=e.visualViewport,u=i.clientWidth,l=i.clientHeight,c=0,f=0;if(a){u=a.width,l=a.height;var d=vf();(d||!d&&t==="fixed")&&(c=a.offsetLeft,f=a.offsetTop)}return{width:u,height:l,x:c+Zo(r),y:f}}function sy(r){var t,e=Xi(r),i=Xo(r),a=(t=r.ownerDocument)==null?void 0:t.body,u=_n(e.scrollWidth,e.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),l=_n(e.scrollHeight,e.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),c=-i.scrollLeft+Zo(r),f=-i.scrollTop;return wi(a||e).direction==="rtl"&&(c+=_n(e.clientWidth,a?a.clientWidth:0)-u),{width:u,height:l,x:c,y:f}}function Qo(r){var t=wi(r),e=t.overflow,i=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(e+a+i)}function Cf(r){return["html","body","#document"].indexOf(ti(r))>=0?r.ownerDocument.body:mr(r)&&Qo(r)?r:Cf(ou(r))}function la(r,t){var e;t===void 0&&(t=[]);var i=Cf(r),a=i===((e=r.ownerDocument)==null?void 0:e.body),u=rr(i),l=a?[u].concat(u.visualViewport||[],Qo(i)?i:[]):i,c=t.concat(l);return a?c:c.concat(la(ou(l)))}function Ko(r){return Object.assign({},r,{left:r.x,top:r.y,right:r.x+r.width,bottom:r.y+r.height})}function ay(r,t){var e=ls(r,!1,t==="fixed");return e.top=e.top+r.clientTop,e.left=e.left+r.clientLeft,e.bottom=e.top+r.clientHeight,e.right=e.left+r.clientWidth,e.width=r.clientWidth,e.height=r.clientHeight,e.x=e.left,e.y=e.top,e}function Df(r,t,e){return t===df?Ko(ny(r,e)):Tn(t)?ay(t,e):Ko(sy(Xi(r)))}function uy(r){var t=la(ou(r)),e=["absolute","fixed"].indexOf(wi(r).position)>=0,i=e&&mr(r)?ua(r):r;return Tn(i)?t.filter(function(a){return Tn(a)&&xf(a,i)&&ti(a)!=="body"}):[]}function oy(r,t,e,i){var a=t==="clippingParents"?uy(r):[].concat(t),u=[].concat(a,[e]),l=u[0],c=u.reduce(function(f,d){var g=Df(r,d,i);return f.top=_n(g.top,f.top),f.right=uu(g.right,f.right),f.bottom=uu(g.bottom,f.bottom),f.left=_n(g.left,f.left),f},Df(r,l,i));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function Sf(r){var t=r.reference,e=r.element,i=r.placement,a=i?ei(i):null,u=i?hs(i):null,l=t.x+t.width/2-e.width/2,c=t.y+t.height/2-e.height/2,f;switch(a){case Ve:f={x:l,y:t.y-e.height};break;case gr:f={x:l,y:t.y+t.height};break;case yr:f={x:t.x+t.width,y:c};break;case ze:f={x:t.x-e.width,y:c};break;default:f={x:t.x,y:t.y}}var d=a?Yo(a):null;if(d!=null){var g=d==="y"?"height":"width";switch(u){case us:f[d]=f[d]-(t[g]/2-e[g]/2);break;case sa:f[d]=f[d]+(t[g]/2-e[g]/2);break}}return f}function ha(r,t){t===void 0&&(t={});var e=t,i=e.placement,a=i===void 0?r.placement:i,u=e.strategy,l=u===void 0?r.strategy:u,c=e.boundary,f=c===void 0?O2:c,d=e.rootBoundary,g=d===void 0?df:d,E=e.elementContext,T=E===void 0?aa:E,C=e.altBoundary,L=C===void 0?!1:C,N=e.padding,M=N===void 0?0:N,R=wf(typeof M!="number"?M:bf(M,na)),W=T===aa?N2:aa,G=r.rects.popper,b=r.elements[L?W:T],P=oy(Tn(b)?b:b.contextElement||Xi(r.elements.popper),f,g,l),H=ls(r.elements.reference),K=Sf({reference:H,element:G,strategy:"absolute",placement:a}),tt=Ko(Object.assign({},G,K)),Z=T===aa?tt:H,rt={top:P.top-Z.top+R.top,bottom:Z.bottom-P.bottom+R.bottom,left:P.left-Z.left+R.left,right:Z.right-P.right+R.right},J=r.modifiersData.offset;if(T===aa&&J){var st=J[a];Object.keys(rt).forEach(function(ht){var ct=[yr,gr].indexOf(ht)>=0?1:-1,ft=[Ve,gr].indexOf(ht)>=0?"y":"x";rt[ht]+=st[ft]*ct})}return rt}function ly(r,t){t===void 0&&(t={});var e=t,i=e.placement,a=e.boundary,u=e.rootBoundary,l=e.padding,c=e.flipVariations,f=e.allowedAutoPlacements,d=f===void 0?yf:f,g=hs(i),E=g?c?gf:gf.filter(function(L){return hs(L)===g}):na,T=E.filter(function(L){return d.indexOf(L)>=0});T.length===0&&(T=E);var C=T.reduce(function(L,N){return L[N]=ha(r,{placement:N,boundary:a,rootBoundary:u,padding:l})[ei(N)],L},{});return Object.keys(C).sort(function(L,N){return C[L]-C[N]})}function hy(r){if(ei(r)===Vo)return[];var t=hu(r);return[_f(r),t,_f(t)]}function cy(r){var t=r.state,e=r.options,i=r.name;if(!t.modifiersData[i]._skip){for(var a=e.mainAxis,u=a===void 0?!0:a,l=e.altAxis,c=l===void 0?!0:l,f=e.fallbackPlacements,d=e.padding,g=e.boundary,E=e.rootBoundary,T=e.altBoundary,C=e.flipVariations,L=C===void 0?!0:C,N=e.allowedAutoPlacements,M=t.options.placement,R=ei(M),W=R===M,G=f||(W||!L?[hu(M)]:hy(M)),b=[M].concat(G).reduce(function(Le,ue){return Le.concat(ei(ue)===Vo?ly(t,{placement:ue,boundary:g,rootBoundary:E,padding:d,flipVariations:L,allowedAutoPlacements:N}):ue)},[]),P=t.rects.reference,H=t.rects.popper,K=new Map,tt=!0,Z=b[0],rt=0;rt<b.length;rt++){var J=b[rt],st=ei(J),ht=hs(J)===us,ct=[Ve,gr].indexOf(st)>=0,ft=ct?"width":"height",O=ha(t,{placement:J,boundary:g,rootBoundary:E,altBoundary:T,padding:d}),yt=ct?ht?yr:ze:ht?gr:Ve;P[ft]>H[ft]&&(yt=hu(yt));var Bt=hu(yt),Re=[];if(u&&Re.push(O[st]<=0),c&&Re.push(O[yt]<=0,O[Bt]<=0),Re.every(function(Le){return Le})){Z=J,tt=!1;break}K.set(J,Re)}if(tt)for(var we=L?3:1,ae=function(ue){var Se=b.find(function($t){var Xt=K.get($t);if(Xt)return Xt.slice(0,ue).every(function(Ct){return Ct})});if(Se)return Z=Se,"break"},me=we;me>0;me--){var Vr=ae(me);if(Vr==="break")break}t.placement!==Z&&(t.modifiersData[i]._skip=!0,t.placement=Z,t.reset=!0)}}const fy={name:"flip",enabled:!0,phase:"main",fn:cy,requiresIfExists:["offset"],data:{_skip:!1}};function Of(r,t,e){return e===void 0&&(e={x:0,y:0}),{top:r.top-t.height-e.y,right:r.right-t.width+e.x,bottom:r.bottom-t.height+e.y,left:r.left-t.width-e.x}}function Nf(r){return[Ve,yr,gr,ze].some(function(t){return r[t]>=0})}function py(r){var t=r.state,e=r.name,i=t.rects.reference,a=t.rects.popper,u=t.modifiersData.preventOverflow,l=ha(t,{elementContext:"reference"}),c=ha(t,{altBoundary:!0}),f=Of(l,i),d=Of(c,a,u),g=Nf(f),E=Nf(d);t.modifiersData[e]={referenceClippingOffsets:f,popperEscapeOffsets:d,isReferenceHidden:g,hasPopperEscaped:E},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":g,"data-popper-escaped":E})}const dy={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:py};function gy(r,t,e){var i=ei(r),a=[ze,Ve].indexOf(i)>=0?-1:1,u=typeof e=="function"?e(Object.assign({},t,{placement:r})):e,l=u[0],c=u[1];return l=l||0,c=(c||0)*a,[ze,yr].indexOf(i)>=0?{x:c,y:l}:{x:l,y:c}}function yy(r){var t=r.state,e=r.options,i=r.name,a=e.offset,u=a===void 0?[0,0]:a,l=yf.reduce(function(g,E){return g[E]=gy(E,t.rects,u),g},{}),c=l[t.placement],f=c.x,d=c.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=f,t.modifiersData.popperOffsets.y+=d),t.modifiersData[i]=l}const my={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:yy};function vy(r){var t=r.state,e=r.name;t.modifiersData[e]=Sf({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const xy={name:"popperOffsets",enabled:!0,phase:"read",fn:vy,data:{}};function Ey(r){return r==="x"?"y":"x"}function Ay(r){var t=r.state,e=r.options,i=r.name,a=e.mainAxis,u=a===void 0?!0:a,l=e.altAxis,c=l===void 0?!1:l,f=e.boundary,d=e.rootBoundary,g=e.altBoundary,E=e.padding,T=e.tether,C=T===void 0?!0:T,L=e.tetherOffset,N=L===void 0?0:L,M=ha(t,{boundary:f,rootBoundary:d,padding:E,altBoundary:g}),R=ei(t.placement),W=hs(t.placement),G=!W,b=Yo(R),P=Ey(b),H=t.modifiersData.popperOffsets,K=t.rects.reference,tt=t.rects.popper,Z=typeof N=="function"?N(Object.assign({},t.rects,{placement:t.placement})):N,rt=typeof Z=="number"?{mainAxis:Z,altAxis:Z}:Object.assign({mainAxis:0,altAxis:0},Z),J=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,st={x:0,y:0};if(H){if(u){var ht,ct=b==="y"?Ve:ze,ft=b==="y"?gr:yr,O=b==="y"?"height":"width",yt=H[b],Bt=yt+M[ct],Re=yt-M[ft],we=C?-tt[O]/2:0,ae=W===us?K[O]:tt[O],me=W===us?-tt[O]:-K[O],Vr=t.elements.arrow,Le=C&&Vr?Go(Vr):{width:0,height:0},ue=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Af(),Se=ue[ct],$t=ue[ft],Xt=oa(0,K[O],Le[O]),Ct=G?K[O]/2-we-Xt-Se-rt.mainAxis:ae-Xt-Se-rt.mainAxis,Wt=G?-K[O]/2+we+Xt+$t+rt.mainAxis:me+Xt+$t+rt.mainAxis,Oe=t.elements.arrow&&ua(t.elements.arrow),Pe=Oe?b==="y"?Oe.clientTop||0:Oe.clientLeft||0:0,$e=(ht=J==null?void 0:J[b])!=null?ht:0,Kt=yt+Ct-$e-Pe,Ne=yt+Wt-$e,ve=oa(C?uu(Bt,Kt):Bt,yt,C?_n(Re,Ne):Re);H[b]=ve,st[b]=ve-yt}if(c){var Zt,ai=b==="x"?Ve:ze,Ci=b==="x"?gr:yr,oe=H[P],Dt=P==="y"?"height":"width",nr=oe+M[ai],Ge=oe-M[Ci],Di=[Ve,ze].indexOf(R)!==-1,Er=(Zt=J==null?void 0:J[P])!=null?Zt:0,Ji=Di?nr:oe-K[Dt]-tt[Dt]-Er+rt.altAxis,sr=Di?oe+K[Dt]+tt[Dt]-Er-rt.altAxis:Ge,Ye=C&&Di?$2(Ji,oe,sr):oa(C?Ji:nr,oe,C?sr:Ge);H[P]=Ye,st[P]=Ye-oe}t.modifiersData[i]=st}}const wy={name:"preventOverflow",enabled:!0,phase:"main",fn:Ay,requiresIfExists:["offset"]};function by(r){return{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}}function Ty(r){return r===rr(r)||!mr(r)?Xo(r):by(r)}function _y(r){var t=r.getBoundingClientRect(),e=os(t.width)/r.offsetWidth||1,i=os(t.height)/r.offsetHeight||1;return e!==1||i!==1}function Cy(r,t,e){e===void 0&&(e=!1);var i=mr(t),a=mr(t)&&_y(t),u=Xi(t),l=ls(r,a,e),c={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(i||!i&&!e)&&((ti(t)!=="body"||Qo(u))&&(c=Ty(t)),mr(t)?(f=ls(t,!0),f.x+=t.clientLeft,f.y+=t.clientTop):u&&(f.x=Zo(u))),{x:l.left+c.scrollLeft-f.x,y:l.top+c.scrollTop-f.y,width:l.width,height:l.height}}function Dy(r){var t=new Map,e=new Set,i=[];r.forEach(function(u){t.set(u.name,u)});function a(u){e.add(u.name);var l=[].concat(u.requires||[],u.requiresIfExists||[]);l.forEach(function(c){if(!e.has(c)){var f=t.get(c);f&&a(f)}}),i.push(u)}return r.forEach(function(u){e.has(u.name)||a(u)}),i}function Sy(r){var t=Dy(r);return H2.reduce(function(e,i){return e.concat(t.filter(function(a){return a.phase===i}))},[])}function Oy(r){var t;return function(){return t||(t=new Promise(function(e){Promise.resolve().then(function(){t=void 0,e(r())})})),t}}function Ny(r){var t=r.reduce(function(e,i){var a=e[i.name];return e[i.name]=a?Object.assign({},a,i,{options:Object.assign({},a.options,i.options),data:Object.assign({},a.data,i.data)}):i,e},{});return Object.keys(t).map(function(e){return t[e]})}var Mf={placement:"bottom",modifiers:[],strategy:"absolute"};function Bf(){for(var r=arguments.length,t=new Array(r),e=0;e<r;e++)t[e]=arguments[e];return!t.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function My(r){r===void 0&&(r={});var t=r,e=t.defaultModifiers,i=e===void 0?[]:e,a=t.defaultOptions,u=a===void 0?Mf:a;return function(c,f,d){d===void 0&&(d=u);var g={placement:"bottom",orderedModifiers:[],options:Object.assign({},Mf,u),modifiersData:{},elements:{reference:c,popper:f},attributes:{},styles:{}},E=[],T=!1,C={state:g,setOptions:function(R){var W=typeof R=="function"?R(g.options):R;N(),g.options=Object.assign({},u,g.options,W),g.scrollParents={reference:Tn(c)?la(c):c.contextElement?la(c.contextElement):[],popper:la(f)};var G=Sy(Ny([].concat(i,g.options.modifiers)));return g.orderedModifiers=G.filter(function(b){return b.enabled}),L(),C.update()},forceUpdate:function(){if(!T){var R=g.elements,W=R.reference,G=R.popper;if(Bf(W,G)){g.rects={reference:Cy(W,ua(G),g.options.strategy==="fixed"),popper:Go(G)},g.reset=!1,g.placement=g.options.placement,g.orderedModifiers.forEach(function(rt){return g.modifiersData[rt.name]=Object.assign({},rt.data)});for(var b=0;b<g.orderedModifiers.length;b++){if(g.reset===!0){g.reset=!1,b=-1;continue}var P=g.orderedModifiers[b],H=P.fn,K=P.options,tt=K===void 0?{}:K,Z=P.name;typeof H=="function"&&(g=H({state:g,options:tt,name:Z,instance:C})||g)}}}},update:Oy(function(){return new Promise(function(M){C.forceUpdate(),M(g)})}),destroy:function(){N(),T=!0}};if(!Bf(c,f))return C;C.setOptions(d).then(function(M){!T&&d.onFirstUpdate&&d.onFirstUpdate(M)});function L(){g.orderedModifiers.forEach(function(M){var R=M.name,W=M.options,G=W===void 0?{}:W,b=M.effect;if(typeof b=="function"){var P=b({state:g,name:R,instance:C,options:G}),H=function(){};E.push(P||H)}})}function N(){E.forEach(function(M){return M()}),E=[]}return C}}var By=[ey,xy,J2,mf,my,fy,wy,Z2,dy],Iy=My({defaultModifiers:By}),Ry="tippy-box",If="tippy-content",Ly="tippy-backdrop",Rf="tippy-arrow",Lf="tippy-svg-arrow",Cn={passive:!0,capture:!0},Pf=function(){return document.body};function Py(r,t){return{}.hasOwnProperty.call(r,t)}function jo(r,t,e){if(Array.isArray(r)){var i=r[t];return i??(Array.isArray(e)?e[t]:e)}return r}function Jo(r,t){var e={}.toString.call(r);return e.indexOf("[object")===0&&e.indexOf(t+"]")>-1}function Ff(r,t){return typeof r=="function"?r.apply(void 0,t):r}function Uf(r,t){if(t===0)return r;var e;return function(i){clearTimeout(e),e=setTimeout(function(){r(i)},t)}}function Fy(r,t){var e=Object.assign({},r);return t.forEach(function(i){delete e[i]}),e}function Uy(r){return r.split(/\s+/).filter(Boolean)}function cs(r){return[].concat(r)}function kf(r,t){r.indexOf(t)===-1&&r.push(t)}function ky(r){return r.filter(function(t,e){return r.indexOf(t)===e})}function Hy(r){return r.split("-")[0]}function cu(r){return[].slice.call(r)}function Hf(r){return Object.keys(r).reduce(function(t,e){return r[e]!==void 0&&(t[e]=r[e]),t},{})}function ca(){return document.createElement("div")}function fa(r){return["Element","Fragment"].some(function(t){return Jo(r,t)})}function qy(r){return Jo(r,"NodeList")}function Wy(r){return Jo(r,"MouseEvent")}function Vy(r){return!!(r&&r._tippy&&r._tippy.reference===r)}function zy(r){return fa(r)?[r]:qy(r)?cu(r):Array.isArray(r)?r:cu(document.querySelectorAll(r))}function tl(r,t){r.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function qf(r,t){r.forEach(function(e){e&&e.setAttribute("data-state",t)})}function $y(r){var t,e=cs(r),i=e[0];return i!=null&&(t=i.ownerDocument)!=null&&t.body?i.ownerDocument:document}function Gy(r,t){var e=t.clientX,i=t.clientY;return r.every(function(a){var u=a.popperRect,l=a.popperState,c=a.props,f=c.interactiveBorder,d=Hy(l.placement),g=l.modifiersData.offset;if(!g)return!0;var E=d==="bottom"?g.top.y:0,T=d==="top"?g.bottom.y:0,C=d==="right"?g.left.x:0,L=d==="left"?g.right.x:0,N=u.top-i+E>f,M=i-u.bottom-T>f,R=u.left-e+C>f,W=e-u.right-L>f;return N||M||R||W})}function el(r,t,e){var i=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(a){r[i](a,e)})}function Wf(r,t){for(var e=t;e;){var i;if(r.contains(e))return!0;e=e.getRootNode==null||(i=e.getRootNode())==null?void 0:i.host}return!1}var ri={isTouch:!1},Vf=0;function Yy(){ri.isTouch||(ri.isTouch=!0,window.performance&&document.addEventListener("mousemove",zf))}function zf(){var r=performance.now();r-Vf<20&&(ri.isTouch=!1,document.removeEventListener("mousemove",zf)),Vf=r}function Xy(){var r=document.activeElement;if(Vy(r)){var t=r._tippy;r.blur&&!t.state.isVisible&&r.blur()}}function Zy(){document.addEventListener("touchstart",Yy,Cn),window.addEventListener("blur",Xy)}var Qy=typeof window<"u"&&typeof document<"u",Ky=Qy?!!window.msCrypto:!1;function fs(r){var t=r==="destroy"?"n already-":" ";return[r+"() was called on a"+t+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function $f(r){var t=/[ \t]{2,}/g,e=/^[ \t]*/gm;return r.replace(t," ").replace(e,"").trim()}function jy(r){return $f(`
53
53
  %ctippy.js
54
54
 
55
- %c`+Bf(r)+`
55
+ %c`+$f(r)+`
56
56
 
57
57
  %c👷‍ This is a development-only message. It will be removed in production.
58
- `)}function If(r){return[Iy(r),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var aa;process.env.NODE_ENV!=="production"&&Ry();function Ry(){aa=new Set}function Ei(r,t){if(r&&!aa.has(t)){var e;aa.add(t),(e=console).warn.apply(e,If(t))}}function $o(r,t){if(r&&!aa.has(t)){var e;aa.add(t),(e=console).error.apply(e,If(t))}}function Ly(r){var t=!r,e=Object.prototype.toString.call(r)==="[object Object]"&&!r.addEventListener;$o(t,["tippy() was passed","`"+String(r)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),$o(e,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var Rf={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Py={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},ir=Object.assign({appendTo:wf,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Rf,Py),Fy=Object.keys(ir),ky=function(t){process.env.NODE_ENV!=="production"&&Ff(t,[]);var e=Object.keys(t);e.forEach(function(n){ir[n]=t[n]})};function Lf(r){var t=r.plugins||[],e=t.reduce(function(n,a){var u=a.name,l=a.defaultValue;if(u){var c;n[u]=r[u]!==void 0?r[u]:(c=ir[u])!=null?c:l}return n},{});return Object.assign({},r,e)}function Uy(r,t){var e=t?Object.keys(Lf(Object.assign({},ir,{plugins:t}))):Fy,n=e.reduce(function(a,u){var l=(r.getAttribute("data-tippy-"+u)||"").trim();if(!l)return a;if(u==="content")a[u]=l;else try{a[u]=JSON.parse(l)}catch{a[u]=l}return a},{});return n}function Pf(r,t){var e=Object.assign({},t,{content:Tf(t.content,[r])},t.ignoreAttributes?{}:Uy(r,t.plugins));return e.aria=Object.assign({},ir.aria,e.aria),e.aria={expanded:e.aria.expanded==="auto"?t.interactive:e.aria.expanded,content:e.aria.content==="auto"?t.interactive?null:"describedby":e.aria.content},e}function Ff(r,t){r===void 0&&(r={}),t===void 0&&(t=[]);var e=Object.keys(r);e.forEach(function(n){var a=my(ir,Object.keys(Rf)),u=!vy(a,n);u&&(u=t.filter(function(l){return l.name===n}).length===0),Ei(u,["`"+n+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
58
+ `)}function Gf(r){return[jy(r),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var pa;process.env.NODE_ENV!=="production"&&Jy();function Jy(){pa=new Set}function bi(r,t){if(r&&!pa.has(t)){var e;pa.add(t),(e=console).warn.apply(e,Gf(t))}}function rl(r,t){if(r&&!pa.has(t)){var e;pa.add(t),(e=console).error.apply(e,Gf(t))}}function tm(r){var t=!r,e=Object.prototype.toString.call(r)==="[object Object]"&&!r.addEventListener;rl(t,["tippy() was passed","`"+String(r)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),rl(e,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var Yf={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},em={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},ir=Object.assign({appendTo:Pf,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Yf,em),rm=Object.keys(ir),im=function(t){process.env.NODE_ENV!=="production"&&Qf(t,[]);var e=Object.keys(t);e.forEach(function(i){ir[i]=t[i]})};function Xf(r){var t=r.plugins||[],e=t.reduce(function(i,a){var u=a.name,l=a.defaultValue;if(u){var c;i[u]=r[u]!==void 0?r[u]:(c=ir[u])!=null?c:l}return i},{});return Object.assign({},r,e)}function nm(r,t){var e=t?Object.keys(Xf(Object.assign({},ir,{plugins:t}))):rm,i=e.reduce(function(a,u){var l=(r.getAttribute("data-tippy-"+u)||"").trim();if(!l)return a;if(u==="content")a[u]=l;else try{a[u]=JSON.parse(l)}catch{a[u]=l}return a},{});return i}function Zf(r,t){var e=Object.assign({},t,{content:Ff(t.content,[r])},t.ignoreAttributes?{}:nm(r,t.plugins));return e.aria=Object.assign({},ir.aria,e.aria),e.aria={expanded:e.aria.expanded==="auto"?t.interactive:e.aria.expanded,content:e.aria.content==="auto"?t.interactive?null:"describedby":e.aria.content},e}function Qf(r,t){r===void 0&&(r={}),t===void 0&&(t=[]);var e=Object.keys(r);e.forEach(function(i){var a=Fy(ir,Object.keys(Yf)),u=!Py(a,i);u&&(u=t.filter(function(l){return l.name===i}).length===0),bi(u,["`"+i+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
59
59
 
60
60
  `,`All props: https://atomiks.github.io/tippyjs/v6/all-props/
61
- `,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var Hy=function(){return"innerHTML"};function zo(r,t){r[Hy()]=t}function kf(r){var t=na();return r===!0?t.className=Af:(t.className=bf,sa(r)?t.appendChild(r):zo(t,r)),t}function Uf(r,t){sa(t.content)?(zo(r,""),r.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?zo(r,t.content):r.textContent=t.content)}function Go(r){var t=r.firstElementChild,e=eu(t.children);return{box:t,content:e.find(function(n){return n.classList.contains(Ef)}),arrow:e.find(function(n){return n.classList.contains(Af)||n.classList.contains(bf)}),backdrop:e.find(function(n){return n.classList.contains(yy)})}}function Hf(r){var t=na(),e=na();e.className=gy,e.setAttribute("data-state","hidden"),e.setAttribute("tabindex","-1");var n=na();n.className=Ef,n.setAttribute("data-state","hidden"),Uf(n,r.props),t.appendChild(e),e.appendChild(n),a(r.props,r.props);function a(u,l){var c=Go(t),f=c.box,d=c.content,y=c.arrow;l.theme?f.setAttribute("data-theme",l.theme):f.removeAttribute("data-theme"),typeof l.animation=="string"?f.setAttribute("data-animation",l.animation):f.removeAttribute("data-animation"),l.inertia?f.setAttribute("data-inertia",""):f.removeAttribute("data-inertia"),f.style.maxWidth=typeof l.maxWidth=="number"?l.maxWidth+"px":l.maxWidth,l.role?f.setAttribute("role",l.role):f.removeAttribute("role"),(u.content!==l.content||u.allowHTML!==l.allowHTML)&&Uf(d,r.props),l.arrow?y?u.arrow!==l.arrow&&(f.removeChild(y),f.appendChild(kf(l.arrow))):f.appendChild(kf(l.arrow)):y&&f.removeChild(y)}return{popper:t,onUpdate:a}}Hf.$$tippy=!0;var qy=1,ru=[],Yo=[];function Wy(r,t){var e=Pf(r,Object.assign({},ir,Lf(Df(t)))),n,a,u,l=!1,c=!1,f=!1,d=!1,y,A,_,C=[],F=_f(Qt,e.interactiveDebounce),N,M=qy++,R=null,q=Ey(e.plugins),z={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},w={id:M,reference:r,popper:na(),popperInstance:R,props:e,state:z,plugins:q,clearDelayTimeouts:Gi,setProps:sr,setContent:Ye,show:Yi,hide:Xi,hideWithInteractivity:ni,enable:bi,disable:mr,unmount:wi,destroy:bn};if(!e.render)return process.env.NODE_ENV!=="production"&&$o(!0,"render() function has not been supplied."),w;var L=e.render(w),U=L.popper,j=L.onUpdate;U.setAttribute("data-tippy-root",""),U.id="tippy-"+w.id,w.popper=U,r._tippy=w,U._tippy=w;var tt=q.map(function(P){return P.fn(w)}),Z=r.hasAttribute("aria-expanded");return Oe(),be(),yt(),Bt("onCreate",[w]),e.showOnCreate&&nr(),U.addEventListener("mouseenter",function(){w.props.interactive&&w.state.isVisible&&w.clearDelayTimeouts()}),U.addEventListener("mouseleave",function(){w.props.interactive&&w.props.trigger.indexOf("mouseenter")>=0&&ct().addEventListener("mousemove",F)}),w;function rt(){var P=w.props.touch;return Array.isArray(P)?P:[P,0]}function J(){return rt()[0]==="hold"}function st(){var P;return!!((P=w.props.render)!=null&&P.$$tippy)}function ht(){return N||r}function ct(){var P=ht().parentNode;return P?Cy(P):document}function ft(){return Go(U)}function O(P){return w.state.isMounted&&!w.state.isVisible||ti.isTouch||y&&y.type==="focus"?0:Ho(w.props.delay,P?0:1,ir.delay)}function yt(P){P===void 0&&(P=!1),U.style.pointerEvents=w.props.interactive&&!P?"":"none",U.style.zIndex=""+w.props.zIndex}function Bt(P,it,at){if(at===void 0&&(at=!0),tt.forEach(function(vt){vt[P]&&vt[P].apply(vt,it)}),at){var wt;(wt=w.props)[P].apply(wt,it)}}function Re(){var P=w.props.aria;if(P.content){var it="aria-"+P.content,at=U.id,wt=is(w.props.triggerTarget||r);wt.forEach(function(vt){var fe=vt.getAttribute(it);if(w.state.isVisible)vt.setAttribute(it,fe?fe+" "+at:at);else{var Me=fe&&fe.replace(at,"").trim();Me?vt.setAttribute(it,Me):vt.removeAttribute(it)}})}}function be(){if(!(Z||!w.props.aria.expanded)){var P=is(w.props.triggerTarget||r);P.forEach(function(it){w.props.interactive?it.setAttribute("aria-expanded",w.state.isVisible&&it===ht()?"true":"false"):it.removeAttribute("aria-expanded")})}}function se(){ct().removeEventListener("mousemove",F),ru=ru.filter(function(P){return P!==F})}function ve(P){if(!(ti.isTouch&&(f||P.type==="mousedown"))){var it=P.composedPath&&P.composedPath()[0]||P.target;if(!(w.props.interactive&&Of(U,it))){if(is(w.props.triggerTarget||r).some(function(at){return Of(at,it)})){if(ti.isTouch||w.state.isVisible&&w.props.trigger.indexOf("click")>=0)return}else Bt("onClickOutside",[w,P]);w.props.hideOnClick===!0&&(w.clearDelayTimeouts(),w.hide(),c=!0,setTimeout(function(){c=!1}),w.state.isMounted||Se())}}}function qr(){f=!0}function Le(){f=!1}function ae(){var P=ct();P.addEventListener("mousedown",ve,!0),P.addEventListener("touchend",ve,mn),P.addEventListener("touchstart",Le,mn),P.addEventListener("touchmove",qr,mn)}function Se(){var P=ct();P.removeEventListener("mousedown",ve,!0),P.removeEventListener("touchend",ve,mn),P.removeEventListener("touchstart",Le,mn),P.removeEventListener("touchmove",qr,mn)}function Vt(P,it){Ct(P,function(){!w.state.isVisible&&U.parentNode&&U.parentNode.contains(U)&&it()})}function Gt(P,it){Ct(P,it)}function Ct(P,it){var at=ft().box;function wt(vt){vt.target===at&&(Vo(at,"remove",wt),it())}if(P===0)return it();Vo(at,"remove",A),Vo(at,"add",wt),A=wt}function Ht(P,it,at){at===void 0&&(at=!1);var wt=is(w.props.triggerTarget||r);wt.forEach(function(vt){vt.addEventListener(P,it,at),C.push({node:vt,eventType:P,handler:it,options:at})})}function Oe(){J()&&(Ht("touchstart",ze,{passive:!0}),Ht("touchend",Ne,{passive:!0})),xy(w.props.trigger).forEach(function(P){if(P!=="manual")switch(Ht(P,ze),P){case"mouseenter":Ht("mouseleave",Ne);break;case"focus":Ht(By?"focusout":"blur",me);break;case"focusin":Ht("focusout",me);break}})}function Pe(){C.forEach(function(P){var it=P.node,at=P.eventType,wt=P.handler,vt=P.options;it.removeEventListener(at,wt,vt)}),C=[]}function ze(P){var it,at=!1;if(!(!w.state.isEnabled||Yt(P)||c)){var wt=((it=y)==null?void 0:it.type)==="focus";y=P,N=P.currentTarget,be(),!w.state.isVisible&&wy(P)&&ru.forEach(function(vt){return vt(P)}),P.type==="click"&&(w.props.trigger.indexOf("mouseenter")<0||l)&&w.props.hideOnClick!==!1&&w.state.isVisible?at=!0:nr(P),P.type==="click"&&(l=!at),at&&!wt&&Ge(P)}}function Qt(P){var it=P.target,at=ht().contains(it)||U.contains(it);if(!(P.type==="mousemove"&&at)){var wt=Dt().concat(U).map(function(vt){var fe,Me=vt._tippy,xr=(fe=Me.popperInstance)==null?void 0:fe.state;return xr?{popperRect:vt.getBoundingClientRect(),popperState:xr,props:e}:null}).filter(Boolean);Dy(wt,P)&&(se(),Ge(P))}}function Ne(P){var it=Yt(P)||w.props.trigger.indexOf("click")>=0&&l;if(!it){if(w.props.interactive){w.hideWithInteractivity(P);return}Ge(P)}}function me(P){w.props.trigger.indexOf("focusin")<0&&P.target!==ht()||w.props.interactive&&P.relatedTarget&&U.contains(P.relatedTarget)||Ge(P)}function Yt(P){return ti.isTouch?J()!==P.type.indexOf("touch")>=0:!1}function ii(){Ai();var P=w.props,it=P.popperOptions,at=P.placement,wt=P.offset,vt=P.getReferenceClientRect,fe=P.moveTransition,Me=st()?Go(U).arrow:null,xr=vt?{getBoundingClientRect:vt,contextElement:vt.contextElement||ht()}:r,Zi={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Qi){var si=Qi.state;if(st()){var Tn=ft(),_n=Tn.box;["placement","reference-hidden","escaped"].forEach(function(ji){ji==="placement"?_n.setAttribute("data-placement",si.placement):si.attributes.popper["data-popper-"+ji]?_n.setAttribute("data-"+ji,""):_n.removeAttribute("data-"+ji)}),si.attributes.popper={}}}},ar=[{name:"offset",options:{offset:wt}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!fe}},Zi];st()&&Me&&ar.push({name:"arrow",options:{element:Me,padding:3}}),ar.push.apply(ar,(it==null?void 0:it.modifiers)||[]),w.popperInstance=dy(xr,U,Object.assign({},it,{placement:at,onFirstUpdate:_,modifiers:ar}))}function Ai(){w.popperInstance&&(w.popperInstance.destroy(),w.popperInstance=null)}function ue(){var P=w.props.appendTo,it,at=ht();w.props.interactive&&P===wf||P==="parent"?it=at.parentNode:it=Tf(P,[at]),it.contains(U)||it.appendChild(U),w.state.isMounted=!0,ii(),process.env.NODE_ENV!=="production"&&Ei(w.props.interactive&&P===ir.appendTo&&at.nextElementSibling!==U,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
61
+ `,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var sm=function(){return"innerHTML"};function il(r,t){r[sm()]=t}function Kf(r){var t=ca();return r===!0?t.className=Rf:(t.className=Lf,fa(r)?t.appendChild(r):il(t,r)),t}function jf(r,t){fa(t.content)?(il(r,""),r.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?il(r,t.content):r.textContent=t.content)}function nl(r){var t=r.firstElementChild,e=cu(t.children);return{box:t,content:e.find(function(i){return i.classList.contains(If)}),arrow:e.find(function(i){return i.classList.contains(Rf)||i.classList.contains(Lf)}),backdrop:e.find(function(i){return i.classList.contains(Ly)})}}function Jf(r){var t=ca(),e=ca();e.className=Ry,e.setAttribute("data-state","hidden"),e.setAttribute("tabindex","-1");var i=ca();i.className=If,i.setAttribute("data-state","hidden"),jf(i,r.props),t.appendChild(e),e.appendChild(i),a(r.props,r.props);function a(u,l){var c=nl(t),f=c.box,d=c.content,g=c.arrow;l.theme?f.setAttribute("data-theme",l.theme):f.removeAttribute("data-theme"),typeof l.animation=="string"?f.setAttribute("data-animation",l.animation):f.removeAttribute("data-animation"),l.inertia?f.setAttribute("data-inertia",""):f.removeAttribute("data-inertia"),f.style.maxWidth=typeof l.maxWidth=="number"?l.maxWidth+"px":l.maxWidth,l.role?f.setAttribute("role",l.role):f.removeAttribute("role"),(u.content!==l.content||u.allowHTML!==l.allowHTML)&&jf(d,r.props),l.arrow?g?u.arrow!==l.arrow&&(f.removeChild(g),f.appendChild(Kf(l.arrow))):f.appendChild(Kf(l.arrow)):g&&f.removeChild(g)}return{popper:t,onUpdate:a}}Jf.$$tippy=!0;var am=1,fu=[],sl=[];function um(r,t){var e=Zf(r,Object.assign({},ir,Xf(Hf(t)))),i,a,u,l=!1,c=!1,f=!1,d=!1,g,E,T,C=[],L=Uf(Kt,e.interactiveDebounce),N,M=am++,R=null,W=ky(e.plugins),G={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},b={id:M,reference:r,popper:ca(),popperInstance:R,props:e,state:G,plugins:W,clearDelayTimeouts:Ji,setProps:sr,setContent:Ye,show:tn,hide:en,hideWithInteractivity:ui,enable:Di,disable:Er,unmount:Si,destroy:Nn};if(!e.render)return process.env.NODE_ENV!=="production"&&rl(!0,"render() function has not been supplied."),b;var P=e.render(b),H=P.popper,K=P.onUpdate;H.setAttribute("data-tippy-root",""),H.id="tippy-"+b.id,b.popper=H,r._tippy=b,H._tippy=b;var tt=W.map(function(U){return U.fn(b)}),Z=r.hasAttribute("aria-expanded");return Oe(),we(),yt(),Bt("onCreate",[b]),e.showOnCreate&&nr(),H.addEventListener("mouseenter",function(){b.props.interactive&&b.state.isVisible&&b.clearDelayTimeouts()}),H.addEventListener("mouseleave",function(){b.props.interactive&&b.props.trigger.indexOf("mouseenter")>=0&&ct().addEventListener("mousemove",L)}),b;function rt(){var U=b.props.touch;return Array.isArray(U)?U:[U,0]}function J(){return rt()[0]==="hold"}function st(){var U;return!!((U=b.props.render)!=null&&U.$$tippy)}function ht(){return N||r}function ct(){var U=ht().parentNode;return U?$y(U):document}function ft(){return nl(H)}function O(U){return b.state.isMounted&&!b.state.isVisible||ri.isTouch||g&&g.type==="focus"?0:jo(b.props.delay,U?0:1,ir.delay)}function yt(U){U===void 0&&(U=!1),H.style.pointerEvents=b.props.interactive&&!U?"":"none",H.style.zIndex=""+b.props.zIndex}function Bt(U,it,at){if(at===void 0&&(at=!0),tt.forEach(function(mt){mt[U]&&mt[U].apply(mt,it)}),at){var bt;(bt=b.props)[U].apply(bt,it)}}function Re(){var U=b.props.aria;if(U.content){var it="aria-"+U.content,at=H.id,bt=cs(b.props.triggerTarget||r);bt.forEach(function(mt){var fe=mt.getAttribute(it);if(b.state.isVisible)mt.setAttribute(it,fe?fe+" "+at:at);else{var Me=fe&&fe.replace(at,"").trim();Me?mt.setAttribute(it,Me):mt.removeAttribute(it)}})}}function we(){if(!(Z||!b.props.aria.expanded)){var U=cs(b.props.triggerTarget||r);U.forEach(function(it){b.props.interactive?it.setAttribute("aria-expanded",b.state.isVisible&&it===ht()?"true":"false"):it.removeAttribute("aria-expanded")})}}function ae(){ct().removeEventListener("mousemove",L),fu=fu.filter(function(U){return U!==L})}function me(U){if(!(ri.isTouch&&(f||U.type==="mousedown"))){var it=U.composedPath&&U.composedPath()[0]||U.target;if(!(b.props.interactive&&Wf(H,it))){if(cs(b.props.triggerTarget||r).some(function(at){return Wf(at,it)})){if(ri.isTouch||b.state.isVisible&&b.props.trigger.indexOf("click")>=0)return}else Bt("onClickOutside",[b,U]);b.props.hideOnClick===!0&&(b.clearDelayTimeouts(),b.hide(),c=!0,setTimeout(function(){c=!1}),b.state.isMounted||Se())}}}function Vr(){f=!0}function Le(){f=!1}function ue(){var U=ct();U.addEventListener("mousedown",me,!0),U.addEventListener("touchend",me,Cn),U.addEventListener("touchstart",Le,Cn),U.addEventListener("touchmove",Vr,Cn)}function Se(){var U=ct();U.removeEventListener("mousedown",me,!0),U.removeEventListener("touchend",me,Cn),U.removeEventListener("touchstart",Le,Cn),U.removeEventListener("touchmove",Vr,Cn)}function $t(U,it){Ct(U,function(){!b.state.isVisible&&H.parentNode&&H.parentNode.contains(H)&&it()})}function Xt(U,it){Ct(U,it)}function Ct(U,it){var at=ft().box;function bt(mt){mt.target===at&&(el(at,"remove",bt),it())}if(U===0)return it();el(at,"remove",E),el(at,"add",bt),E=bt}function Wt(U,it,at){at===void 0&&(at=!1);var bt=cs(b.props.triggerTarget||r);bt.forEach(function(mt){mt.addEventListener(U,it,at),C.push({node:mt,eventType:U,handler:it,options:at})})}function Oe(){J()&&(Wt("touchstart",$e,{passive:!0}),Wt("touchend",Ne,{passive:!0})),Uy(b.props.trigger).forEach(function(U){if(U!=="manual")switch(Wt(U,$e),U){case"mouseenter":Wt("mouseleave",Ne);break;case"focus":Wt(Ky?"focusout":"blur",ve);break;case"focusin":Wt("focusout",ve);break}})}function Pe(){C.forEach(function(U){var it=U.node,at=U.eventType,bt=U.handler,mt=U.options;it.removeEventListener(at,bt,mt)}),C=[]}function $e(U){var it,at=!1;if(!(!b.state.isEnabled||Zt(U)||c)){var bt=((it=g)==null?void 0:it.type)==="focus";g=U,N=U.currentTarget,we(),!b.state.isVisible&&Wy(U)&&fu.forEach(function(mt){return mt(U)}),U.type==="click"&&(b.props.trigger.indexOf("mouseenter")<0||l)&&b.props.hideOnClick!==!1&&b.state.isVisible?at=!0:nr(U),U.type==="click"&&(l=!at),at&&!bt&&Ge(U)}}function Kt(U){var it=U.target,at=ht().contains(it)||H.contains(it);if(!(U.type==="mousemove"&&at)){var bt=Dt().concat(H).map(function(mt){var fe,Me=mt._tippy,Ar=(fe=Me.popperInstance)==null?void 0:fe.state;return Ar?{popperRect:mt.getBoundingClientRect(),popperState:Ar,props:e}:null}).filter(Boolean);Gy(bt,U)&&(ae(),Ge(U))}}function Ne(U){var it=Zt(U)||b.props.trigger.indexOf("click")>=0&&l;if(!it){if(b.props.interactive){b.hideWithInteractivity(U);return}Ge(U)}}function ve(U){b.props.trigger.indexOf("focusin")<0&&U.target!==ht()||b.props.interactive&&U.relatedTarget&&H.contains(U.relatedTarget)||Ge(U)}function Zt(U){return ri.isTouch?J()!==U.type.indexOf("touch")>=0:!1}function ai(){Ci();var U=b.props,it=U.popperOptions,at=U.placement,bt=U.offset,mt=U.getReferenceClientRect,fe=U.moveTransition,Me=st()?nl(H).arrow:null,Ar=mt?{getBoundingClientRect:mt,contextElement:mt.contextElement||ht()}:r,rn={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(nn){var oi=nn.state;if(st()){var Bn=ft(),In=Bn.box;["placement","reference-hidden","escaped"].forEach(function(sn){sn==="placement"?In.setAttribute("data-placement",oi.placement):oi.attributes.popper["data-popper-"+sn]?In.setAttribute("data-"+sn,""):In.removeAttribute("data-"+sn)}),oi.attributes.popper={}}}},ar=[{name:"offset",options:{offset:bt}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!fe}},rn];st()&&Me&&ar.push({name:"arrow",options:{element:Me,padding:3}}),ar.push.apply(ar,(it==null?void 0:it.modifiers)||[]),b.popperInstance=Iy(Ar,H,Object.assign({},it,{placement:at,onFirstUpdate:T,modifiers:ar}))}function Ci(){b.popperInstance&&(b.popperInstance.destroy(),b.popperInstance=null)}function oe(){var U=b.props.appendTo,it,at=ht();b.props.interactive&&U===Pf||U==="parent"?it=at.parentNode:it=Ff(U,[at]),it.contains(H)||it.appendChild(H),b.state.isMounted=!0,ai(),process.env.NODE_ENV!=="production"&&bi(b.props.interactive&&U===ir.appendTo&&at.nextElementSibling!==H,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
62
62
 
63
63
  `,"Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.",`
64
64
 
65
65
  `,"Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.",`
66
66
 
67
- `,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function Dt(){return eu(U.querySelectorAll("[data-tippy-root]"))}function nr(P){w.clearDelayTimeouts(),P&&Bt("onTrigger",[w,P]),ae();var it=O(!0),at=rt(),wt=at[0],vt=at[1];ti.isTouch&&wt==="hold"&&vt&&(it=vt),it?n=setTimeout(function(){w.show()},it):w.show()}function Ge(P){if(w.clearDelayTimeouts(),Bt("onUntrigger",[w,P]),!w.state.isVisible){Se();return}if(!(w.props.trigger.indexOf("mouseenter")>=0&&w.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(P.type)>=0&&l)){var it=O(!1);it?a=setTimeout(function(){w.state.isVisible&&w.hide()},it):u=requestAnimationFrame(function(){w.hide()})}}function bi(){w.state.isEnabled=!0}function mr(){w.hide(),w.state.isEnabled=!1}function Gi(){clearTimeout(n),clearTimeout(a),cancelAnimationFrame(u)}function sr(P){if(process.env.NODE_ENV!=="production"&&Ei(w.state.isDestroyed,ns("setProps")),!w.state.isDestroyed){Bt("onBeforeUpdate",[w,P]),Pe();var it=w.props,at=Pf(r,Object.assign({},it,Df(P),{ignoreAttributes:!0}));w.props=at,Oe(),it.interactiveDebounce!==at.interactiveDebounce&&(se(),F=_f(Qt,at.interactiveDebounce)),it.triggerTarget&&!at.triggerTarget?is(it.triggerTarget).forEach(function(wt){wt.removeAttribute("aria-expanded")}):at.triggerTarget&&r.removeAttribute("aria-expanded"),be(),yt(),j&&j(it,at),w.popperInstance&&(ii(),Dt().forEach(function(wt){requestAnimationFrame(wt._tippy.popperInstance.forceUpdate)})),Bt("onAfterUpdate",[w,P])}}function Ye(P){w.setProps({content:P})}function Yi(){process.env.NODE_ENV!=="production"&&Ei(w.state.isDestroyed,ns("show"));var P=w.state.isVisible,it=w.state.isDestroyed,at=!w.state.isEnabled,wt=ti.isTouch&&!w.props.touch,vt=Ho(w.props.duration,0,ir.duration);if(!(P||it||at||wt)&&!ht().hasAttribute("disabled")&&(Bt("onShow",[w],!1),w.props.onShow(w)!==!1)){if(w.state.isVisible=!0,st()&&(U.style.visibility="visible"),yt(),ae(),w.state.isMounted||(U.style.transition="none"),st()){var fe=ft(),Me=fe.box,xr=fe.content;Wo([Me,xr],0)}_=function(){var ar;if(!(!w.state.isVisible||d)){if(d=!0,U.offsetHeight,U.style.transition=w.props.moveTransition,st()&&w.props.animation){var wn=ft(),Qi=wn.box,si=wn.content;Wo([Qi,si],vt),Sf([Qi,si],"visible")}Re(),be(),Cf(Yo,w),(ar=w.popperInstance)==null||ar.forceUpdate(),Bt("onMount",[w]),w.props.animation&&st()&&Gt(vt,function(){w.state.isShown=!0,Bt("onShown",[w])})}},ue()}}function Xi(){process.env.NODE_ENV!=="production"&&Ei(w.state.isDestroyed,ns("hide"));var P=!w.state.isVisible,it=w.state.isDestroyed,at=!w.state.isEnabled,wt=Ho(w.props.duration,1,ir.duration);if(!(P||it||at)&&(Bt("onHide",[w],!1),w.props.onHide(w)!==!1)){if(w.state.isVisible=!1,w.state.isShown=!1,d=!1,l=!1,st()&&(U.style.visibility="hidden"),se(),Se(),yt(!0),st()){var vt=ft(),fe=vt.box,Me=vt.content;w.props.animation&&(Wo([fe,Me],wt),Sf([fe,Me],"hidden"))}Re(),be(),w.props.animation?st()&&Vt(wt,w.unmount):w.unmount()}}function ni(P){process.env.NODE_ENV!=="production"&&Ei(w.state.isDestroyed,ns("hideWithInteractivity")),ct().addEventListener("mousemove",F),Cf(ru,F),F(P)}function wi(){process.env.NODE_ENV!=="production"&&Ei(w.state.isDestroyed,ns("unmount")),w.state.isVisible&&w.hide(),w.state.isMounted&&(Ai(),Dt().forEach(function(P){P._tippy.unmount()}),U.parentNode&&U.parentNode.removeChild(U),Yo=Yo.filter(function(P){return P!==w}),w.state.isMounted=!1,Bt("onHidden",[w]))}function bn(){process.env.NODE_ENV!=="production"&&Ei(w.state.isDestroyed,ns("destroy")),!w.state.isDestroyed&&(w.clearDelayTimeouts(),w.unmount(),Pe(),delete r._tippy,w.state.isDestroyed=!0,Bt("onDestroy",[w]))}}function ua(r,t){t===void 0&&(t={});var e=ir.plugins.concat(t.plugins||[]);process.env.NODE_ENV!=="production"&&(Ly(r),Ff(t,e)),Ny();var n=Object.assign({},t,{plugins:e}),a=_y(r);if(process.env.NODE_ENV!=="production"){var u=sa(n.content),l=a.length>1;Ei(u&&l,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.",`
67
+ `,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function Dt(){return cu(H.querySelectorAll("[data-tippy-root]"))}function nr(U){b.clearDelayTimeouts(),U&&Bt("onTrigger",[b,U]),ue();var it=O(!0),at=rt(),bt=at[0],mt=at[1];ri.isTouch&&bt==="hold"&&mt&&(it=mt),it?i=setTimeout(function(){b.show()},it):b.show()}function Ge(U){if(b.clearDelayTimeouts(),Bt("onUntrigger",[b,U]),!b.state.isVisible){Se();return}if(!(b.props.trigger.indexOf("mouseenter")>=0&&b.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(U.type)>=0&&l)){var it=O(!1);it?a=setTimeout(function(){b.state.isVisible&&b.hide()},it):u=requestAnimationFrame(function(){b.hide()})}}function Di(){b.state.isEnabled=!0}function Er(){b.hide(),b.state.isEnabled=!1}function Ji(){clearTimeout(i),clearTimeout(a),cancelAnimationFrame(u)}function sr(U){if(process.env.NODE_ENV!=="production"&&bi(b.state.isDestroyed,fs("setProps")),!b.state.isDestroyed){Bt("onBeforeUpdate",[b,U]),Pe();var it=b.props,at=Zf(r,Object.assign({},it,Hf(U),{ignoreAttributes:!0}));b.props=at,Oe(),it.interactiveDebounce!==at.interactiveDebounce&&(ae(),L=Uf(Kt,at.interactiveDebounce)),it.triggerTarget&&!at.triggerTarget?cs(it.triggerTarget).forEach(function(bt){bt.removeAttribute("aria-expanded")}):at.triggerTarget&&r.removeAttribute("aria-expanded"),we(),yt(),K&&K(it,at),b.popperInstance&&(ai(),Dt().forEach(function(bt){requestAnimationFrame(bt._tippy.popperInstance.forceUpdate)})),Bt("onAfterUpdate",[b,U])}}function Ye(U){b.setProps({content:U})}function tn(){process.env.NODE_ENV!=="production"&&bi(b.state.isDestroyed,fs("show"));var U=b.state.isVisible,it=b.state.isDestroyed,at=!b.state.isEnabled,bt=ri.isTouch&&!b.props.touch,mt=jo(b.props.duration,0,ir.duration);if(!(U||it||at||bt)&&!ht().hasAttribute("disabled")&&(Bt("onShow",[b],!1),b.props.onShow(b)!==!1)){if(b.state.isVisible=!0,st()&&(H.style.visibility="visible"),yt(),ue(),b.state.isMounted||(H.style.transition="none"),st()){var fe=ft(),Me=fe.box,Ar=fe.content;tl([Me,Ar],0)}T=function(){var ar;if(!(!b.state.isVisible||d)){if(d=!0,H.offsetHeight,H.style.transition=b.props.moveTransition,st()&&b.props.animation){var Mn=ft(),nn=Mn.box,oi=Mn.content;tl([nn,oi],mt),qf([nn,oi],"visible")}Re(),we(),kf(sl,b),(ar=b.popperInstance)==null||ar.forceUpdate(),Bt("onMount",[b]),b.props.animation&&st()&&Xt(mt,function(){b.state.isShown=!0,Bt("onShown",[b])})}},oe()}}function en(){process.env.NODE_ENV!=="production"&&bi(b.state.isDestroyed,fs("hide"));var U=!b.state.isVisible,it=b.state.isDestroyed,at=!b.state.isEnabled,bt=jo(b.props.duration,1,ir.duration);if(!(U||it||at)&&(Bt("onHide",[b],!1),b.props.onHide(b)!==!1)){if(b.state.isVisible=!1,b.state.isShown=!1,d=!1,l=!1,st()&&(H.style.visibility="hidden"),ae(),Se(),yt(!0),st()){var mt=ft(),fe=mt.box,Me=mt.content;b.props.animation&&(tl([fe,Me],bt),qf([fe,Me],"hidden"))}Re(),we(),b.props.animation?st()&&$t(bt,b.unmount):b.unmount()}}function ui(U){process.env.NODE_ENV!=="production"&&bi(b.state.isDestroyed,fs("hideWithInteractivity")),ct().addEventListener("mousemove",L),kf(fu,L),L(U)}function Si(){process.env.NODE_ENV!=="production"&&bi(b.state.isDestroyed,fs("unmount")),b.state.isVisible&&b.hide(),b.state.isMounted&&(Ci(),Dt().forEach(function(U){U._tippy.unmount()}),H.parentNode&&H.parentNode.removeChild(H),sl=sl.filter(function(U){return U!==b}),b.state.isMounted=!1,Bt("onHidden",[b]))}function Nn(){process.env.NODE_ENV!=="production"&&bi(b.state.isDestroyed,fs("destroy")),!b.state.isDestroyed&&(b.clearDelayTimeouts(),b.unmount(),Pe(),delete r._tippy,b.state.isDestroyed=!0,Bt("onDestroy",[b]))}}function da(r,t){t===void 0&&(t={});var e=ir.plugins.concat(t.plugins||[]);process.env.NODE_ENV!=="production"&&(tm(r),Qf(t,e)),Zy();var i=Object.assign({},t,{plugins:e}),a=zy(r);if(process.env.NODE_ENV!=="production"){var u=fa(i.content),l=a.length>1;bi(u&&l,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.",`
68
68
 
69
69
  `,"Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.",`
70
70
 
71
71
  `,`1) content: element.innerHTML
72
- `,"2) content: () => element.cloneNode(true)"].join(" "))}var c=a.reduce(function(f,d){var y=d&&Wy(d,n);return y&&f.push(y),f},[]);return sa(r)?c[0]:c}ua.defaultProps=ir,ua.setDefaultProps=ky,ua.currentInput=ti,Object.assign({},nf,{effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow)}}),ua.setDefaultProps({render:Hf});let Vy=0;const $i=ua(document.body,{theme:"translucent",animation:"scale",inertia:!0,delay:[200,100],content:"",allowHTML:!0,placement:"left-start",trigger:"manual",arrow:!0});class Xo{constructor(t,e){this.container=t,this.text=e,t?this.container=t:this.container=document.getElementsByTagName("body")[0],this.text=e}name="Label";id="Label"+Vy++;el;position=new Y;get isMounted(){return $i.state.isMounted}get isShown(){return $i.state.isShown}destroy(){this.text="",this.position.identity()}setHtml(t=""){return this.text=t,this}update(t){t&&(this.position.copy(t),$i.show())}async show(t){if(t)return await this.hide(),this.position.copy(t),$i.setContent(this.text),$i.setProps({getReferenceClientRect:()=>({width:0,height:0,right:this.position.x,left:this.position.x,bottom:this.position.y,top:this.position.y,x:this.position.x,y:this.position.y,toJSON(){}})}),$i.clearDelayTimeouts(),$i.show(),new Promise(e=>{Mt.delay(function(){e()},300)})}async hide(){return $i.hide(),new Promise(t=>{Mt.delay(function(){t()},100)})}}let $y=0;class zy extends Ir{name="DummyPoint";id="dummyPoint"+$y++;container;offset=new Y;el;label;radius=10;position=new Y;worldPosition=new Y;userData;constructor(t,e){var a,u;super(),t?this.container=t:this.container=document.getElementsByTagName("body")[0];let n=this.container.getBoundingClientRect();this.offset.set(n.left,n.top),this.userData=e,(a=this.userData)!=null&&a.type||Mt.set(this,"userData.type",gn.DEFAULT),this.initDom(),this.setType((u=this.userData)==null?void 0:u.type),this.mount(),this.initLabel()}destroy(){var t;super.destroy(),this.unmount(),(t=this.label)==null||t.destroy()}get isMounted(){var t;return!!((t=this.el)!=null&&t.parentNode)}mount(){var t;this.el&&((t=this.el)!=null&&t.parentNode||this.container.appendChild(this.el))}unmount(){var t,e,n,a;(e=(t=this.el)==null?void 0:t.parentNode)==null||e.removeChild(this.el),(n=this.el)==null||n.remove(),(a=this.label)==null||a.hide()}setText(t=""){return this.el?(this.el.innerText=t,this):this}initDom(){var t;this.el=document.createElement("div"),this.el.setAttribute("id",this.id),this.el.setAttribute("class","dummy-point"),this.el.setAttribute(Kn+"-id",(t=this.userData)==null?void 0:t.value)}initLabel(){var t;(t=this.userData)!=null&&t.label&&(this.label=new Xo(this.container,this.userData.label))}setActive(t){return t?(Xs(this.el,"active"),this.showLabel()):(Zs(this.el,"active"),this.hideLabel()),this}showLabel(){var t;(t=this.label)==null||t.show(Gy.copy(this.position).add(this.offset).subScalar(this.radius))}hideLabel(){var t;(t=this.label)==null||t.hide()}setType(t){var n;if(!this.userData)return this;const e=(n=this.userData)==null?void 0:n.type;return t||(t=gn.DEFAULT),e&&Za(this.el,e)&&Zs(this.el,e),this.userData.type=t,Xs(this.el,this.userData.type),this}update(t,e=!1){!t||!this.isMounted||(e||t.subScalar(this.radius).round(),this.position.copy(t),this.el.style.transform=`translate3D(${this.position.x}px, ${this.position.y}px, 0)`)}}const Gy=new Y;let Yy=0;class Xy extends Ir{name="DummyRect";id="dummyRect"+Yy++;container;offset=new Y;el;radius=10;position=new Y;worldPosition=new Y;label;userData;constructor(t,e){super(),t?this.container=t:this.container=document.getElementsByTagName("body")[0];let n=this.container.getBoundingClientRect();this.offset.set(n.left,n.top),this.userData=e,this.initDom(),this.mount(),this.initLabel()}destroy(){var t;super.destroy(),this.unmount(),(t=this.label)==null||t.destroy()}get isMounted(){var t;return!!((t=this.el)!=null&&t.parentNode)}mount(){this.container.appendChild(this.el)}unmount(){var t,e,n,a;this.setText(""),(e=(t=this.el)==null?void 0:t.parentNode)==null||e.removeChild(this.el),(n=this.el)==null||n.remove(),(a=this.label)==null||a.hide()}initDom(){var t;this.el=document.createElement("div"),this.el.setAttribute("id",this.id),this.el.setAttribute("class","dummy-rect"),this.el.setAttribute(Kn+"-id",((t=this.userData)==null?void 0:t.rmId)||"undefined")}initLabel(){this.label=new Xo(this.container,"")}setText(t=""){return this.el.innerText=t,this}setActive(t){return t?Xs(this.el,"active"):Zs(this.el,"active"),this}showLabel(){var t;(t=this.label)==null||t.show(Zy.copy(this.position).add(this.offset).subScalar(this.radius))}hideLabel(){var t;(t=this.label)==null||t.hide()}setType(t){var n;if(!this.userData)return this;const e=(n=this.userData)==null?void 0:n.type;return t=gn.DEFAULT,e&&Za(this.el,e)&&Zs(this.el,e),this.userData.type=t,Xs(this.el,this.userData.type),this}update(t,e=!1){!t||!this.isMounted||(e||t.subScalar(this.radius).round(),this.position.copy(t),this.el.style.transform=`translate3D(${this.position.x}px, ${this.position.y}px, 0)`)}}const Zy=new Y;class Qy extends Ir{name="Dummies";container;controller;scene;viewMatrix=new re;dummies=[];rmMap=new Map;mergedMap=new Map;cameraUpdateHandler=this.handleCameraUpdate.bind(this);controllerTapHandler=this.handleControllerTap.bind(this);constructor(t,e){super(),this.container=t,this.controller=e,this.bindEvents()}destroy(){this.unbindEvents(),super.destroy(),this.clearDummies()}bindEvents(){this.controller.camera.addEventListener(Qa.UPDATE,this.cameraUpdateHandler),this.controller.addEventListener(_t.TAP,this.controllerTapHandler)}unbindEvents(){this.controller.camera.removeEventListener(Qa.UPDATE,this.cameraUpdateHandler),this.controller.removeEventListener(_t.TAP,this.controllerTapHandler)}bindScene(t){this.scene=t}update(t){var e,n,a;if(t){this.viewMatrix.copy(t);for(let u=0,l=(this.dummies||[]).length;u<l;u++){const c=this.dummies[u],f=(n=this.scene)==null?void 0:n.getElementById((e=c.userData)==null?void 0:e.rmId);if(f){const d=(a=this.scene)==null?void 0:a.chef.getElementBoundingBox(f.id);d==null||d.getCenter(zi),zi.applyMatrix3(this.viewMatrix).round(),c.position.copy(zi)}else zi.copy(c.worldPosition).applyMatrix3(this.viewMatrix).round(),c.update(zi)}this.mergeDummies()}}setDummies(t){this.clearDummies();for(let e=0,n=(t||[]).length;e<n;e++)this.addDummy(t[e])}addDummy(t){var a,u;const e=new zy(this.container,t);this.dummies.push(e);const n=(a=e.userData)==null?void 0:a.rmId;return n&&(this.rmMap.has(n)||this.rmMap.set(n,[]),(u=this.rmMap.get(n))==null||u.push(e)),e}removeDummy(t){var a;const e=this.dummies.indexOf(t);e>-1&&this.dummies.splice(e,1);const n=(a=t.userData)==null?void 0:a.rmId;if(n){const u=this.mergedMap.get(n);u==null||u.destroy(),this.mergedMap.delete(n);const l=this.rmMap.get(n);if(!l)return;if(l.length===1)this.rmMap.delete(n);else{const c=l.indexOf(t);c>-1&&(l.splice(c,1),this.rmMap.set(n,l))}}t.destroy()}clearDummies(t){var e,n,a;for(let u=(((e=this.dummies)==null?void 0:e.length)||0)-1;u>=0;u--){const l=this.dummies[u];(!t||(n=l==null?void 0:l.userData)!=null&&n.type&&(t!=null&&t.includes((a=l.userData)==null?void 0:a.type)))&&this.removeDummy(l)}t||(this.dummies.length=0,this.mergedMap.clear(),this.rmMap.clear())}mergeDummies(){this.rmMap.forEach((t,e)=>{var a,u,l,c;if((a=this.scene)==null?void 0:a.getElementById(e)){const f=(u=this.scene)==null?void 0:u.chef.getElementBoundingBox(e);if(!f)return;Zo.copy(f).applyMatrix3(this.viewMatrix).round(),Zo.getSize(zi);const d=t[0].radius,y=Zo.centralArrange(t.length,d*2,d*2);if(zi.x<d*3||zi.y<d*3){t.forEach(_=>_.unmount());const A=this.mergedMap.get(e);A==null||A.unmount()}else if(Array.isArray(y))this.mergedMap.has(e)&&((l=this.mergedMap.get(e))==null||l.unmount()),t.forEach((A,_)=>{A.isMounted||A.mount(),A.update(y[_])});else{t.forEach(C=>C.unmount());let A=this.mergedMap.get(e);if(A)A.isMounted||A.mount();else{const C=Mt.cloneDeep(t[0].userData)||{},F=Mt.reduce(t,(M,R)=>{var q,z;return(q=R.userData)!=null&&q.label&&M.push((z=R.userData)==null?void 0:z.label),M},[]);C.label=F.join(", ");const N=Mt.reduce(t,(M,R)=>{var q,z;return(q=R.userData)!=null&&q.value&&M.push((z=R.userData)==null?void 0:z.value),M},[]);C.value=N.join(","),C.rmId=e,A=new Xy(this.container,C),this.mergedMap.set(e,A)}A.setText(t.length.toString());const _=Mt.reduce(t,(C,F)=>{var N,M;return(N=F.userData)!=null&&N.label&&C.push((M=F.userData)==null?void 0:M.label),C},[]);(c=A.label)==null||c.setHtml(_.join(", <br />")),A.update(t[0].position)}}})}getDummyById(t){return this.dummies.find(e=>{var n;return((n=e.userData)==null?void 0:n.value)===t})}setActiveByIds(t){var e,n;if(this.resetActives(),!!t&&(Array.isArray(t)||(t=[t]),!!(t!=null&&t.length)))for(let a=0,u=t.length;a<u;a++){const l=this.getDummyById(t[a]);if(l&&l.setActive(!0),l&&((e=l.userData)!=null&&e.rmId)){const c=this.mergedMap.get((n=l.userData)==null?void 0:n.rmId);c&&c.setActive(!0)}}}resetActives(){this.dummies.forEach(t=>t.setActive(!1)),this.mergedMap.forEach(t=>t.setActive(!1))}showDummyLabel(t){if(!t)return;const e=this.getDummyById(t);e&&e.showLabel();const n=this.mergedMap.get(t);n&&n.showLabel()}async hideDummyLabel(){this.dummies.forEach(t=>t.hideLabel()),this.mergedMap.forEach(t=>t.hideLabel())}handleCameraUpdate(){this.update(this.controller.camera.viewMatrix)}handleControllerTap(t){var a,u,l,c,f;if((t==null?void 0:t.type)!==_t.TAP)return;const e=((a=t==null?void 0:t.e)==null?void 0:a.target)||((l=(u=t==null?void 0:t.e)==null?void 0:u.srcEvent)==null?void 0:l.target)||((f=(c=t==null?void 0:t.e)==null?void 0:c.srcEvent)==null?void 0:f.srcElement),n=e==null?void 0:e.getAttribute(Kn+"-id");n&&console.warn("【TODO】handleControllerTap: ",n)}}const zi=new Y,Zo=new St;(function(){return window[Wi.prefixed(window,"requestAnimationFrame")]||function(r){window.setTimeout(r,1e3/60)}})();class jy extends Ir{name="DragController";dragFake=!1;container;offset=new Y;controller;scene;raycaster;dummies;_els=[];_hms=new Map;_vos=new Map;_elMap=new Map;_panType=gn.SUCCESS;onPanHandler=this.handleOnPan.bind(this);panEndHandler=Mt.debounce(this.handlePanEnd.bind(this),500);constructor(t,e,n=!0){super(),this.container=t;let a=this.container.getBoundingClientRect();this.offset.set(a.left,a.top),this.controller=e,this.dummies=new Qy(t,e),this.raycaster=new l2,this.dragFake=n}destroy(){var t;super.destroy();for(let e=(((t=this._els)==null?void 0:t.length)||0)-1;e>=0;e--)this.drop(this._els[e]);this.dummies.destroy()}bindScene(t){var e;this.scene=t,(e=this.dummies)==null||e.bindScene(t)}drag(t,e){t&&(this._els.includes(t)||(this.bindEvent(t),this._els.push(t),this._vos.set(t,e)))}drop(t){if(!t)return;this.unbindEvent(t),this._vos.delete(t),this._elMap.delete(t);const e=this._els.findIndex(n=>n===t);e>-1&&this._els.splice(e,1)}bindEvent(t){if(!t)return;const e=new Wi.Manager(t,{domEvents:!0});e.add(new Wi.Pan({threshold:0,pointers:0})),e.on(["panstart","panmove","panend"].join(" "),this.onPanHandler),this._hms.set(t,e)}unbindEvent(t){if(!t)return;const e=this._hms.get(t);e&&(e.off(["panstart","panmove","panend"].join(" "),this.onPanHandler),e.destroy(),this._hms.delete(t))}handleOnPan(t){if(typeof t.preventDefault=="function"&&t.preventDefault(),typeof t.srcEvent.stopPropagation=="function"&&t.srcEvent.stopPropagation(),typeof t.srcEvent.stopImmediatePropagation=="function"&&t.srcEvent.stopImmediatePropagation(),!this.controller)return;t.type==="panstart"||t.isFirst?this.controller.enablePan=!1:t.type==="panmove"||t.type==="panend"&&(this.controller.enablePan=!0);const e=this._vos.get(t.target);if(!e)return;const n=Mt.cloneDeep(e);n.type=this._panType;const a=this._getDummy(t.target,n);oa.set(t.center.x,t.center.y).sub(this.offset),a.worldPosition.copy(oa).unproject(this.controller.camera),a.update(oa),this.panEndHandler({type:"panend",e:t})}handlePanEnd(t){if((t==null?void 0:t.type)!=="panend")return;const e=this.getDummies(!0);this.dispatchEvent({type:"panend",data:e})}getDummies(t=!0){const e=[];return this._els.forEach(n=>{var u;let a=this._vos.get(n);if(!(!a||a.type!==gn.SUCCESS)){if(t){const l=this._elMap.get(n);if(!l||!this.controller.camera)return;oa.copy(l.position),this.raycaster.setFromCamera(oa,this.controller.camera);const c=[];if((u=this.scene)==null||u.getIntersectObjects(this.raycaster,er.RM,c),!(c!=null&&c.length))return;a=Mt.cloneDeep(a),a.rmId=c[0].id}e.push(a)}}),e}setDummiesByVos(t){var e,n;for(let a=0,u=(t||[]).length;a<u;a++){const l=(e=this.dummies)==null?void 0:e.addDummy(t[a]);if(!l)continue;const c=Mt.cloneDeep(t[a]);delete c.rmId,delete c.wsId,this.drag(l.el,c)}(n=this.dummies)==null||n.update(this.controller.camera.viewMatrix)}clearDummies(t){var e,n;for(let a=(((e=this._els)==null?void 0:e.length)||0)-1;a>=0;a--){const u=this._vos.get(this._els[a]);(!t||t&&(u!=null&&u.type)&&t.includes(u.type))&&this.drop(this._els[a])}(n=this.dummies)==null||n.clearDummies(t)}getDummyById(t){return this.dummies.getDummyById(t)}highlightDummies(t){var e;(e=this.dummies)==null||e.setActiveByIds(t)}resetHighlightDummies(){var t;(t=this.dummies)==null||t.resetActives()}showDummyLabel(t){var e;(e=this.dummies)==null||e.showDummyLabel(t)}start(){}_getDummy(t,e){let n=this._elMap.get(t);if(n||(n=this.dummies.addDummy(e).setType(gn.SUCCESS),this._elMap.set(t,n)),n.isMounted||n.mount(),this.dummies.dummies.includes(n)||this.dummies.dummies.push(n),!this._elMap.get(n.el)){this._elMap.set(n.el,n);const u=Mt.cloneDeep(e);delete u.rmId,delete u.wsId,this.drag(n.el,u)}return n}}const oa=new Y;var ss=Object.freeze({Linear:Object.freeze({None:function(r){return r},In:function(r){return r},Out:function(r){return r},InOut:function(r){return r}}),Quadratic:Object.freeze({In:function(r){return r*r},Out:function(r){return r*(2-r)},InOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)}}),Cubic:Object.freeze({In:function(r){return r*r*r},Out:function(r){return--r*r*r+1},InOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)}}),Quartic:Object.freeze({In:function(r){return r*r*r*r},Out:function(r){return 1- --r*r*r*r},InOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)}}),Quintic:Object.freeze({In:function(r){return r*r*r*r*r},Out:function(r){return--r*r*r*r*r+1},InOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)}}),Sinusoidal:Object.freeze({In:function(r){return 1-Math.sin((1-r)*Math.PI/2)},Out:function(r){return Math.sin(r*Math.PI/2)},InOut:function(r){return .5*(1-Math.sin(Math.PI*(.5-r)))}}),Exponential:Object.freeze({In:function(r){return r===0?0:Math.pow(1024,r-1)},Out:function(r){return r===1?1:1-Math.pow(2,-10*r)},InOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)}}),Circular:Object.freeze({In:function(r){return 1-Math.sqrt(1-r*r)},Out:function(r){return Math.sqrt(1- --r*r)},InOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)}}),Elastic:Object.freeze({In:function(r){return r===0?0:r===1?1:-Math.pow(2,10*(r-1))*Math.sin((r-1.1)*5*Math.PI)},Out:function(r){return r===0?0:r===1?1:Math.pow(2,-10*r)*Math.sin((r-.1)*5*Math.PI)+1},InOut:function(r){return r===0?0:r===1?1:(r*=2,r<1?-.5*Math.pow(2,10*(r-1))*Math.sin((r-1.1)*5*Math.PI):.5*Math.pow(2,-10*(r-1))*Math.sin((r-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(r){var t=1.70158;return r===1?1:r*r*((t+1)*r-t)},Out:function(r){var t=1.70158;return r===0?0:--r*r*((t+1)*r+t)+1},InOut:function(r){var t=2.5949095;return(r*=2)<1?.5*(r*r*((t+1)*r-t)):.5*((r-=2)*r*((t+1)*r+t)+2)}}),Bounce:Object.freeze({In:function(r){return 1-ss.Bounce.Out(1-r)},Out:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},InOut:function(r){return r<.5?ss.Bounce.In(r*2)*.5:ss.Bounce.Out(r*2-1)*.5+.5}}),generatePow:function(r){return r===void 0&&(r=4),r=r<Number.EPSILON?Number.EPSILON:r,r=r>1e4?1e4:r,{In:function(t){return Math.pow(t,r)},Out:function(t){return 1-Math.pow(1-t,r)},InOut:function(t){return t<.5?Math.pow(t*2,r)/2:(1-Math.pow(2-t*2,r))/2+.5}}}}),as=function(){return performance.now()},qf=function(){function r(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,t)}return r.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map(function(e){return t._tweens[e]})},r.prototype.removeAll=function(){this._tweens={}},r.prototype.add=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];for(var a=0,u=e;a<u.length;a++){var l=u[a];(t=l._group)===null||t===void 0||t.remove(l),l._group=this,this._tweens[l.getId()]=l,this._tweensAddedDuringUpdate[l.getId()]=l}},r.prototype.remove=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=0,a=t;n<a.length;n++){var u=a[n];u._group=void 0,delete this._tweens[u.getId()],delete this._tweensAddedDuringUpdate[u.getId()]}},r.prototype.allStopped=function(){return this.getAll().every(function(t){return!t.isPlaying()})},r.prototype.update=function(t,e){t===void 0&&(t=as()),e===void 0&&(e=!0);var n=Object.keys(this._tweens);if(n.length!==0)for(;n.length>0;){this._tweensAddedDuringUpdate={};for(var a=0;a<n.length;a++){var u=this._tweens[n[a]],l=!e;u&&u.update(t,l)===!1&&!e&&this.remove(u)}n=Object.keys(this._tweensAddedDuringUpdate)}},r}(),xn={Linear:function(r,t){var e=r.length-1,n=e*t,a=Math.floor(n),u=xn.Utils.Linear;return t<0?u(r[0],r[1],n):t>1?u(r[e],r[e-1],e-n):u(r[a],r[a+1>e?e:a+1],n-a)},Bezier:function(r,t){for(var e=0,n=r.length-1,a=Math.pow,u=xn.Utils.Bernstein,l=0;l<=n;l++)e+=a(1-t,n-l)*a(t,l)*r[l]*u(n,l);return e},CatmullRom:function(r,t){var e=r.length-1,n=e*t,a=Math.floor(n),u=xn.Utils.CatmullRom;return r[0]===r[e]?(t<0&&(a=Math.floor(n=e*(1+t))),u(r[(a-1+e)%e],r[a],r[(a+1)%e],r[(a+2)%e],n-a)):t<0?r[0]-(u(r[0],r[0],r[1],r[1],-n)-r[0]):t>1?r[e]-(u(r[e],r[e],r[e-1],r[e-1],n-e)-r[e]):u(r[a?a-1:0],r[a],r[e<a+1?e:a+1],r[e<a+2?e:a+2],n-a)},Utils:{Linear:function(r,t,e){return(t-r)*e+r},Bernstein:function(r,t){var e=xn.Utils.Factorial;return e(r)/e(t)/e(r-t)},Factorial:function(){var r=[1];return function(t){var e=1;if(r[t])return r[t];for(var n=t;n>1;n--)e*=n;return r[t]=e,e}}(),CatmullRom:function(r,t,e,n,a){var u=(e-r)*.5,l=(n-t)*.5,c=a*a,f=a*c;return(2*t-2*e+u+l)*f+(-3*t+3*e-2*u-l)*c+u*a+t}}},Qo=function(){function r(){}return r.nextId=function(){return r._nextId++},r._nextId=0,r}(),jo=new qf,Ky=function(){function r(t,e){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=ss.Linear.None,this._interpolationFunction=xn.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=Qo.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=t,typeof e=="object"?(this._group=e,e.add(this)):e===!0&&(this._group=jo,jo.add(this))}return r.prototype.getId=function(){return this._id},r.prototype.isPlaying=function(){return this._isPlaying},r.prototype.isPaused=function(){return this._isPaused},r.prototype.getDuration=function(){return this._duration},r.prototype.to=function(t,e){if(e===void 0&&(e=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=t,this._propertiesAreSetUp=!1,this._duration=e<0?0:e,this},r.prototype.duration=function(t){return t===void 0&&(t=1e3),this._duration=t<0?0:t,this},r.prototype.dynamic=function(t){return t===void 0&&(t=!1),this._isDynamic=t,this},r.prototype.start=function(t,e){if(t===void 0&&(t=as()),e===void 0&&(e=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var n in this._valuesStartRepeat)this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,!this._propertiesAreSetUp||e){if(this._propertiesAreSetUp=!0,!this._isDynamic){var a={};for(var u in this._valuesEnd)a[u]=this._valuesEnd[u];this._valuesEnd=a}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,e)}return this},r.prototype.startFromCurrentValues=function(t){return this.start(t,!0)},r.prototype._setupProperties=function(t,e,n,a,u){for(var l in n){var c=t[l],f=Array.isArray(c),d=f?"array":typeof c,y=!f&&Array.isArray(n[l]);if(!(d==="undefined"||d==="function")){if(y){var A=n[l];if(A.length===0)continue;for(var _=[c],C=0,F=A.length;C<F;C+=1){var N=this._handleRelativeValue(c,A[C]);if(isNaN(N)){y=!1,console.warn("Found invalid interpolation list. Skipping.");break}_.push(N)}y&&(n[l]=_)}if((d==="object"||f)&&c&&!y){e[l]=f?[]:{};var M=c;for(var R in M)e[l][R]=M[R];a[l]=f?[]:{};var A=n[l];if(!this._isDynamic){var q={};for(var R in A)q[R]=A[R];n[l]=A=q}this._setupProperties(M,e[l],A,a[l],u)}else(typeof e[l]>"u"||u)&&(e[l]=c),f||(e[l]*=1),y?a[l]=n[l].slice().reverse():a[l]=e[l]||0}}},r.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},r.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},r.prototype.pause=function(t){return t===void 0&&(t=as()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=t,this)},r.prototype.resume=function(t){return t===void 0&&(t=as()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStart,this._pauseStart=0,this)},r.prototype.stopChainedTweens=function(){for(var t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop();return this},r.prototype.group=function(t){return t?(t.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},r.prototype.remove=function(){var t;return(t=this._group)===null||t===void 0||t.remove(this),this},r.prototype.delay=function(t){return t===void 0&&(t=0),this._delayTime=t,this},r.prototype.repeat=function(t){return t===void 0&&(t=0),this._initialRepeat=t,this._repeat=t,this},r.prototype.repeatDelay=function(t){return this._repeatDelayTime=t,this},r.prototype.yoyo=function(t){return t===void 0&&(t=!1),this._yoyo=t,this},r.prototype.easing=function(t){return t===void 0&&(t=ss.Linear.None),this._easingFunction=t,this},r.prototype.interpolation=function(t){return t===void 0&&(t=xn.Linear),this._interpolationFunction=t,this},r.prototype.chain=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._chainedTweens=t,this},r.prototype.onStart=function(t){return this._onStartCallback=t,this},r.prototype.onEveryStart=function(t){return this._onEveryStartCallback=t,this},r.prototype.onUpdate=function(t){return this._onUpdateCallback=t,this},r.prototype.onRepeat=function(t){return this._onRepeatCallback=t,this},r.prototype.onComplete=function(t){return this._onCompleteCallback=t,this},r.prototype.onStop=function(t){return this._onStopCallback=t,this},r.prototype.update=function(t,e){var n=this,a;if(t===void 0&&(t=as()),e===void 0&&(e=r.autoStartOnUpdate),this._isPaused)return!0;var u;if(!this._goToEnd&&!this._isPlaying)if(e)this.start(t,!0);else return!1;if(this._goToEnd=!1,t<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var l=t-this._startTime,c=this._duration+((a=this._repeatDelayTime)!==null&&a!==void 0?a:this._delayTime),f=this._duration+this._repeat*c,d=function(){if(n._duration===0||l>f)return 1;var N=Math.trunc(l/c),M=l-N*c,R=Math.min(M/n._duration,1);return R===0&&l===n._duration?1:R},y=d(),A=this._easingFunction(y);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,A),this._onUpdateCallback&&this._onUpdateCallback(this._object,y),this._duration===0||l>=this._duration)if(this._repeat>0){var _=Math.min(Math.trunc((l-this._duration)/c)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=_);for(u in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[u]=="string"&&(this._valuesStartRepeat[u]=this._valuesStartRepeat[u]+parseFloat(this._valuesEnd[u])),this._yoyo&&this._swapEndStartRepeatValues(u),this._valuesStart[u]=this._valuesStartRepeat[u];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=c*_,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var C=0,F=this._chainedTweens.length;C<F;C++)this._chainedTweens[C].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},r.prototype._updateProperties=function(t,e,n,a){for(var u in n)if(e[u]!==void 0){var l=e[u]||0,c=n[u],f=Array.isArray(t[u]),d=Array.isArray(c),y=!f&&d;y?t[u]=this._interpolationFunction(c,a):typeof c=="object"&&c?this._updateProperties(t[u],l,c,a):(c=this._handleRelativeValue(l,c),typeof c=="number"&&(t[u]=l+(c-l)*a))}},r.prototype._handleRelativeValue=function(t,e){return typeof e!="string"?e:e.charAt(0)==="+"||e.charAt(0)==="-"?t+parseFloat(e):parseFloat(e)},r.prototype._swapEndStartRepeatValues=function(t){var e=this._valuesStartRepeat[t],n=this._valuesEnd[t];typeof n=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(n):this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=e},r.autoStartOnUpdate=!1,r}(),Jy="25.0.0",tv=Qo.nextId,ei=jo,ev=ei.getAll.bind(ei),rv=ei.removeAll.bind(ei),iv=ei.add.bind(ei),nv=ei.remove.bind(ei),sv=ei.update.bind(ei),iu={Easing:ss,Group:qf,Interpolation:xn,now:as,Sequence:Qo,nextId:tv,Tween:Ky,VERSION:Jy,getAll:ev,removeAll:rv,add:iv,remove:nv,update:sv};class av{name="View";params;visible=!0;cvs;scene;scenes=[];camera;controller;tween;animateDuration;constructor(t={}){this.params=t,this.animateDuration=this.params.animateDuration||300,this.cvs=t.cvs,this.camera=new jc(t.camera||{})}destroy(){this.controller&&this.controller.destroy(),this.camera&&this.camera.destroy(),this.scene&&this.scene.destroy(),this.scenes.forEach(t=>t.destroy()),this.scenes.length=0}bindScene(t){this.scenes.push(t),this.reset(),this.scene=t,t.isStatic}saveCameraPosition(t){us.copy(this.camera.boundingBoxWorld);const e=t?vr+t:vr;sessionStorage.setItem(e,JSON.stringify(us))}clearCameraPosition(t){const e=t?vr+t:vr;sessionStorage.setItem(e,"")}restoreCameraPosition(t){const e=t?vr+t:vr,n=sessionStorage.getItem(e);n&&(us.copy(JSON.parse(n)),this.resetCameraByBoundingBox(us,!0))}fullscreen(t=10,e=!1){this.scene&&(this.scene.boundingBox.isEmpty()&&this.scene.computeBoundingBox(),us.copy(this.scene.boundingBox).expandByVector(nu.set(t,t)),this.resetCameraByBoundingBox(us,e))}handleCameraChanged(t){console.warn("handleCameraChanged: ",t.target.camera.position.z,t.target.camera.scaled.x)}reset(){}async resetCameraByBoundingBox(t,e=!1){if(!this.camera)return;if(!t||t.isEmpty())throw new Error("BoundingBox empty");if(!e)return this.camera.setByBox(t),Promise.resolve();const n=this.camera.getCameraPosition();t.getCenter(nu),t.getSize(Ko);const a=Math.max(Ko.x/this.camera.width,Ko.y/this.camera.height),u={x:nu.x,y:nu.y,z:0,s:a,r:0};await this.animateCamera(n,u)}async animateCamera(t,e){return this.controller&&(this.controller.enabled=!1),this.tween&&this.tween.stop(),new Promise(n=>{this.tween=new iu.Tween(t).to(e,this.animateDuration).easing(iu.Easing.Exponential.Out).onUpdate(a=>{this.camera.position.set(a.x,a.y),this.camera.scaled.set(a.s,a.s),this.camera.rotation.set(a.r,a.r),this.camera.update()}).onComplete(()=>{this.controller&&(this.controller.enabled=!0),n()}).start()})}computeBoundingBox(t,e=new St){return!t||!t.length||(e.makeEmpty(),t.forEach(n=>e.union(n.computeBoundingBox()))),e}expandScenesBoundingBox(t,e=new St){t.forEach(n=>n.boundingBox.union(e))}update(t){this.tween&&this.tween.update(t)}}const vr="camera_position_",nu=new Y,Ko=new Y,us=new St;class uv extends Ir{name="SvgView";params;container;offset=new Y;camera;controller;scene;p1=new Y;p2=new Y;graph;multiSelector;dummiesController;zoomToSelectEnable=!1;zoomBox=new St;selectEnable=!1;multiSelectEnable=!1;tween;animateDuration;label;controllerPanStartHandler=this.handlePanStart.bind(this);controllerPanEndHandler=this.handlePanEnd.bind(this);controllerWheelStartHandler=this.handlePanStart.bind(this);controllerWheelEndHandler=this.handlePanEnd.bind(this);controllerPanMoveHandler=this.handleControllerPanMove.bind(this);controllerPointerOverHandler=this.handleControllerPointerOver.bind(this);multiSelectorSelectedHandler=this.handleMultiSelectorSelected.bind(this);_currentAssetId;constructor(t={}){super(),this.params=t,this.params.zoomToSelectEnable&&(this.zoomToSelectEnable=!0),this.params.selectEnable&&(this.selectEnable=!0),this.params.multiSelectEnable&&(this.multiSelectEnable=!0),this.params.camera||(this.params.camera={}),this.params.camera.flipY=!0,this.animateDuration=this.params.animateDuration||300,this.camera=new jc(this.params.camera),this.container=this.params.containerId?document.getElementById(this.params.containerId):Zt.window.document.getElementsByTagName("body")[0];let e=this.container.getBoundingClientRect();this.offset.set(e.left,e.top),this.controller=new Qc(this.container,this.camera,!0),this.graph=new Kc(this.container),this.multiSelector=new o2(this.container,this.controller),this.dummiesController=new jy(this.container,this.controller),this.bindControllerEvents(),this.initLabel()}destroy(){var t;this.unbindControllerEvents(),super.destroy(),(t=this.label)==null||t.destroy()}initLabel(){this.label=new Xo(this.container,"")}showAssetsLabel(t,e,n){var u,l,c,f,d;if(!e)return;t||(t=(u=this.scene)==null?void 0:u.assetType);const a=(l=this.scene)==null?void 0:l.chef.getElementBoundingBox(e);a&&!a.isEmpty()&&(n||(n=(c=this.scene)==null?void 0:c.getAssetLabelById(t,e),n||(n=e)),(f=this.label)==null||f.setHtml(n),En.copy(a.min).applyMatrix3(this.camera.viewMatrix).add(this.offset).round(),(d=this.label)==null||d.show(En))}async hideAssetsLabel(){var t;return(t=this.label)==null?void 0:t.hide()}bindScene(t){var e;this.scene=t,this.multiSelector.bindScene(this.scene),(e=this.dummiesController)==null||e.bindScene(this.scene)}resize(){var t;(t=this.camera)==null||t.resize(),console.log("【svgView】resize: ",this.params.width,this.params.height)}async setByBox(t,e=!0){await this.resetCameraByBoundingBox(t,e)}zoomIn(){this.controller.scaled=this.camera.scaled.x*.9,this.controller.update()}zoomOut(){this.controller.scaled=this.camera.scaled.x*1.1,this.controller.update()}zoomToSelectEnableChanged(t){console.log("TODO: zoomToSelectEnableChanged: ",t),this.zoomToSelectEnable=t,this.controller.enablePan=!this.zoomToSelectEnable}selectEnableChanged(t){this.selectEnable=!!t,this.multiSelector.selectEnableChanged(t)}multiSelectEnableChanged(t){this.multiSelectEnable=!!t,this.multiSelector.multiSelectEnableChanged(t)}getIntersectObjects(t,e,n=[]){return this.scene?this.scene.getIntersectObjects(t,e,n):n}async focusAt(t,e=500){return this.camera?(zt.setFromCenterAndSize(t,En.set(e*2,e*2)),this.resetCameraByBoundingBox(zt,!0)):Promise.resolve()}async focusAtById(t,e=500){var a;const n=(a=this.scene)==null?void 0:a.getBoundingBoxById(t);if(console.log("focusAtById: ",t,n==null?void 0:n.toString()),n){n.expandByScalar(e),zt.copy(this.camera.boundingBoxWorld),zt.containsBox(n)||await this.resetCameraByBoundingBox(n,!0);return}}async focusAtDummy(t,e=500){var u,l;const n=this.dummiesController.getDummyById(t),a=(u=n==null?void 0:n.userData)==null?void 0:u.rmId;if(a){const c=(l=this.scene)==null?void 0:l.getBoundingBoxById(a);if(c){c.expandByScalar(e),zt.copy(this.camera.boundingBoxWorld),zt.containsBox(c)||await this.resetCameraByBoundingBox(c,!0);return}}if(n!=null&&n.position&&!(n!=null&&n.position.isEmpty())){zt.setFromCenterAndSize(n.worldPosition,En.set(e*2,e*2)),this.camera.boundingBoxWorld.containsBox(zt)||await this.resetCameraByBoundingBox(zt,!0);return}}async resetCameraByBoundingBox(t,e=!1){if(!this.camera)return Promise.resolve();if(!t||t.isEmpty())throw new Error("BoundingBox empty");if(!e)return this.camera.setByBox(t),Promise.resolve();const n=this.camera.getCameraPosition();t.getCenter(En),t.getSize(Jo);const a=Math.max(Jo.x/this.camera.width,Jo.y/this.camera.height),u={x:En.x,y:En.y,z:0,s:a,r:0};await this.animateCamera(n,u)}async animateCamera(t,e){return this.controller&&(this.controller.enabled=!1),this.tween&&this.tween.stop(),new Promise(n=>{this.tween=new iu.Tween(t).to(e,this.animateDuration).easing(iu.Easing.Exponential.Out).onUpdate(a=>{this.camera.position.set(a.x,a.y),this.camera.scaled.set(a.s,a.s),this.camera.rotation.set(a.r,a.r),this.camera.update()}).onComplete(()=>{this.controller&&(this.controller.enabled=!0),n()}).start()})}fullscreen(){this.scene&&(this.scene&&!this.scene.viewBox.isEmpty()?zt.copy(this.scene.viewBox):(this.scene.updateMatrixWorld(!0),this.scene.computeBoundingBox(),zt.copy(this.scene.boundingBox)),this.resetCameraByBoundingBox(zt,!0))}saveCameraPosition(t){zt.copy(this.camera.boundingBoxWorld);const e=t?vr+t:vr;sessionStorage.setItem(e,JSON.stringify(zt))}restoreCameraPosition(t){const e=t?vr+t:vr,n=sessionStorage.getItem(e);if(!n)return this.fullscreen();zt.copy(JSON.parse(n)),this.resetCameraByBoundingBox(zt,!0)}clearCameraPosition(t){const e=t?vr+t:vr;sessionStorage.setItem(e,"")}bindControllerEvents(){this.controller.addEventListener(_t.PAN_START,this.controllerPanStartHandler),this.controller.addEventListener(_t.PAN_END,this.controllerPanEndHandler),this.controller.addEventListener(_t.WHEEL_START,this.controllerWheelStartHandler),this.controller.addEventListener(_t.WHEEL_END,this.controllerWheelEndHandler),this.controller.addEventListener(_t.PAN_MOVE,this.controllerPanMoveHandler),this.controller.addEventListener(_t.POINTEROVER,this.controllerPointerOverHandler),this.multiSelector.addEventListener(No.SELECTED,this.multiSelectorSelectedHandler)}unbindControllerEvents(){this.controller.removeEventListener(_t.PAN_START,this.controllerPanStartHandler),this.controller.removeEventListener(_t.PAN_END,this.controllerPanEndHandler),this.controller.removeEventListener(_t.WHEEL_START,this.controllerWheelStartHandler),this.controller.removeEventListener(_t.WHEEL_END,this.controllerWheelEndHandler),this.controller.removeEventListener(_t.PAN_MOVE,this.controllerPanMoveHandler),this.controller.removeEventListener(_t.POINTEROVER,this.controllerPointerOverHandler),this.multiSelector.removeEventListener(No.SELECTED,this.multiSelectorSelectedHandler)}handlePanStart(t){if(!((t==null?void 0:t.type)!==_t.PAN_START&&(t==null?void 0:t.type)!==_t.WHEEL_START)&&this.zoomToSelectEnable){this.p1.copy(t.data.screenCoords),zt.makeEmpty().expandByPoint(this.p1),this.graph.draw(zt);return}}handlePanEnd(t){if(!((t==null?void 0:t.type)!==_t.PAN_END&&(t==null?void 0:t.type)!==_t.WHEEL_END)&&this.zoomToSelectEnable){this.p2.copy(t.data.screenCoords),zt.makeEmpty().expandByPoint(this.p1).expandByPoint(this.p2).unproject(this.controller.camera),this.setByBox(zt),this.graph.hide(),zt.makeEmpty();return}}handleControllerPanMove(t){(t==null?void 0:t.type)===_t.PAN_MOVE&&this.zoomToSelectEnable&&(this.p2.copy(t.data.screenCoords),zt.makeEmpty().expandByPoint(this.p1).expandByPoint(this.p2),this.graph.draw(zt))}handleControllerPointerOver(t){var a,u,l,c,f;const e=((a=t==null?void 0:t.e)==null?void 0:a.target)||((l=(u=t==null?void 0:t.e)==null?void 0:u.srcEvent)==null?void 0:l.target);let n=e==null?void 0:e.id;(n==null?void 0:n.indexOf("dummy"))>-1?(n=e.getAttribute(Kn+"-id"),n&&this._currentAssetId!==n&&this.dispatchEvent({type:"POINTEROVER",data:{id:n,assetType:"dummy"},e:t.e})):n&&((c=this.scene)!=null&&c.isBelongsToAssetType(n,er.WS))?this._currentAssetId!==n&&this.dispatchEvent({type:"POINTEROVER",data:{id:n,assetType:er.WS},e:t.e}):n&&((f=this.scene)!=null&&f.isBelongsToAssetType(n,er.RM))?this._currentAssetId!==n&&this.dispatchEvent({type:"POINTEROVER",data:{id:n,assetType:er.RM},e:t.e}):(this._currentAssetId=void 0,this.dispatchEvent({type:"POINTERLEAVE",e:t.e})),this._currentAssetId=n}handleMultiSelectorSelected(t){console.warn("handleMultiSelectorSelected:",t.data),this.dispatchEvent({type:"SELECTED",data:t.data})}setDummies(t){this.dummiesController.setDummiesByVos(t)}clearDummies(t){this.dummiesController.clearDummies(t)}update(t){this.tween&&this.tween.update(t)}}const zt=new St,En=new Y,Jo=new Y;var An=(r=>(r.SELECTED="SELECTED",r.POINTEROVER="POINTEROVER",r.POINTERLEAVE="POINTERLEAVE",r))(An||{});class ov extends Ir{name="SvgApp";params;renderer;view;scene;loadingScene;mainScene;zoomToSelectEnable=!1;zoomBox=new St;selectEnable=!1;multiSelectEnable=!1;runningHandler=this.running.bind(this);pointerOverHandler=this.handlePointerOver.bind(this);pointerLeaveHandler=this.handlePointerLeave.bind(this);multiSelectorSelectedHandler=this.handleMultiSelectorSelected.bind(this);dragEndHandler=this.handleDragEnd.bind(this);constructor(t={}){super(),this.params=t,this.params.zoomToSelectEnable&&(this.zoomToSelectEnable=!0),this.params.selectEnable&&(this.selectEnable=!0),this.params.multiSelectEnable&&(this.multiSelectEnable=!0),this.params.defaultFill||(this.params.defaultFill=Wt.getMoreTransparent(he.white,.3)),this.params.defaultStroke||(this.params.defaultStroke=Wt.getMoreTransparent(he.darkWhite,.8)),this.params.infoFill||(this.params.infoFill=Wt.getMoreTransparent(he.gray,.3)),this.params.infoStroke||(this.params.infoStroke=Wt.getMoreTransparent(he.darkGray,.8)),this.params.primaryFill||(this.params.primaryFill=Wt.getMoreTransparent(he.blue,.3)),this.params.primaryStroke||(this.params.primaryStroke=Wt.getMoreTransparent(he.darkBlue,.8)),this.params.successFill||(this.params.successFill=Wt.getMoreTransparent(he.green,.3)),this.params.successStroke||(this.params.successStroke=Wt.getMoreTransparent(he.darkGreen,.8)),this.params.warningFill||(this.params.warningFill=Wt.getMoreTransparent(he.yellow,.3)),this.params.warningStroke||(this.params.warningStroke=Wt.getMoreTransparent(he.darkYellow,.8)),this.params.dangerFill||(this.params.dangerFill=Wt.getMoreTransparent(he.red,.3)),this.params.dangerStroke||(this.params.dangerStroke=Wt.getMoreTransparent(he.darkRed,.8)),this.params.activeFill||(this.params.activeFill=Wt.getMoreTransparent(he.brown,.3)),this.params.activeStroke||(this.params.activeStroke=Wt.getMoreTransparent(he.darkBrown,.8)),this.renderer=new e0(t),this.view=new uv(t),this.trans2LoadingScene()}get isLoadingScene(){var t;return((t=this.scene)==null?void 0:t.name)==="SvgLoadingScene"}destroy(){var t,e;this.unbindAssetsEvents(),super.destroy(),(t=this.view)==null||t.destroy(),(e=this.renderer)==null||e.destroy()}resize(){var t,e;(t=this.renderer)==null||t.resize(),(e=this.view)==null||e.resize()}isScene(t){var e;return((e=this.scene)==null?void 0:e.uuid)===t.uuid}removeScene(t){this.scene=void 0,t==null||t.destroy()}trans2MainScene(){var t,e;(t=this.scene)==null||t.unmount(),this.scene=this.mainScene,this.scene.isMounted||this.scene.mount(),this.view.bindScene(this.scene),(e=this.loadingScene)==null||e.destroy()}trans2LoadingScene(){var e,n;console.log("trans2LoadingScene: ",this.params),this.loadingScene=new a2(this.params),(e=this.scene)==null||e.unmount(),this.scene=this.loadingScene,this.scene.isMounted||this.scene.mount();const t=new St().copy(this.loadingScene.viewBox).expandByVector(new Y(1,1).multiplyScalar(360));this.view.setByBox(t,!1),(n=this.mainScene)==null||n.destroy()}start(){requestAnimationFrame(this.runningHandler)}running(t){this.scene&&(this.scene.update(),this.renderer.render(this.scene,this.view.camera),this.view.update(t),requestAnimationFrame(this.runningHandler))}async load(t,e,n=2,a){this.isLoadingScene||this.trans2LoadingScene(),await lc(this.params.syncDelay);const u=await new Ac().loadAsync(t);return this.loadByString(u,e,n)}loadByString(t,e,n=2){this.mainScene=new Yc(this.params),this.mainScene.bind(t),this.view.setByBox(this.mainScene.viewBox);const a=this.mainScene.getLayers(n);return e!=null&&e.length||(e=Mt.map(a,"label")),this.mainScene.showDefaultLayers(e,!0),this.trans2MainScene(),this.bindAssetsEvents(),console.log("svgApp.loadByString: ",a),a}setSkeletons(t){var e;(e=this.scene)==null||e.setSkeletonLayers(t)}getLayers(t=2){var e;return(e=this.scene)==null?void 0:e.getLayers(t)}updateLayersVisibility(t,e=!1){var n;(n=this.scene)==null||n.updateLayersVisibility(t,e)}selectByIds(t){var e;(e=this.scene)==null||e.selectByIds(t,this.multiSelectEnable)}clearSelectedById(t){var e;Array.isArray(t)?t.forEach(n=>{var a;return(a=this.scene)==null?void 0:a.clearSelectedById(n)}):(e=this.scene)==null||e.clearSelectedById(t)}clearSelected(){var t;(t=this.scene)==null||t.clearSelected()}getSelectedIds(){var t;return(t=this.scene)==null?void 0:t.getSelectedIds()}async targetByIds(t){var e;this.scene&&((e=this.scene)==null||e.selectByIds(t,!1),tl.copy(this.scene.getSelectedBoundingBox()).expandByVector(new Y(1,1).multiplyScalar(100)),await lc(100),tl.isEmpty()||await this.view.setByBox(tl))}linkAssetsByTree(t){var e;(e=this.scene)==null||e.linkAssetsByTree(t)}setViewAreaLimit(t){this.renderer.viewAreaLimit=t}setAssetType(t,e){var n;(n=this.scene)==null||n.setAssetType(t,e)}getAssetIdsByType(t){var e;return(e=this.scene)==null?void 0:e.getAssetIdsByType(t)}clearFill(){var t;(t=this.scene)==null||t.clearFillOrStroke("fill")}clearFillByIds(t){var e;(e=this.scene)==null||e.clearFillOrStrokeByIds(t,"fill")}setFillByIds(t,e){var n;(n=this.scene)==null||n.setFillOrStrokeByIds(t,e,"fill")}clearStroke(){var t;(t=this.scene)==null||t.clearFillOrStroke("stroke")}clearStrokeByIds(t){var e;(e=this.scene)==null||e.clearFillOrStrokeByIds(t,"stroke")}setStrokeByIds(t,e){var n;(n=this.scene)==null||n.setFillOrStrokeByIds(t,e,"stroke")}getLegend(){var t;return(t=this.scene)==null?void 0:t.getLegend()}setAssetLabels(t,e){var n;(n=this.scene)==null||n.setAssetLabels(t,e)}clearAssetLabels(){var t;(t=this.scene)==null||t.clearAssetLabels()}fullscreen(){this.view.fullscreen()}saveCameraPosition(t){this.view.saveCameraPosition(t)}restoreCameraPosition(t){this.view.restoreCameraPosition(t)}clearCameraPosition(t){this.view.clearCameraPosition(t)}zoomIn(){this.view.zoomIn()}zoomOut(){this.view.zoomOut()}focusAt(t,e=1e3){var n;(n=this.view)==null||n.focusAt(t,e)}async focusAtById(t,e=1e3){var n;return(n=this.view)==null?void 0:n.focusAtById(t,e)}async focusAtDummy(t,e=1e3){var n;return(n=this.view)==null?void 0:n.focusAtDummy(t,e)}showAssetsLabel(t,e,n){var a,u,l,c;e?t==="dummy"?(l=(u=(a=this.view)==null?void 0:a.dummiesController)==null?void 0:u.dummies)==null||l.showDummyLabel(e):(c=this.view)==null||c.showAssetsLabel(t,e,n):this.hideAssetsLabel()}hideAssetsLabel(){var t,e,n,a;(n=(e=(t=this.view)==null?void 0:t.dummiesController)==null?void 0:e.dummies)==null||n.hideDummyLabel(),(a=this.view)==null||a.hideAssetsLabel()}highlightAssets(t,e){var n;(n=this.scene)==null||n.highlightAssets(t,e)}resetHighlightAssets(t){var e;(e=this.scene)==null||e.resetHighlightAssets(t)}fontZoomIn(){var t;(t=this.scene)==null||t.chef.fontZoom("asset-labels",1.1)}fontZoomOut(){var t;(t=this.scene)==null||t.chef.fontZoom("asset-labels",.9)}zoomToSelectEnableChanged(t){this.view.zoomToSelectEnableChanged(t)}selectEnableChanged(t){this.selectEnable=!!t,this.view.selectEnableChanged(t)}multiSelectEnableChanged(t){this.multiSelectEnable=!!t,this.view.multiSelectEnableChanged(t)}socialDistanceEnableChanged(t){var e;(e=this.scene)==null||e.socialDistanceEnableChanged(t)}getBoundingBoxById(t,e=!0){var a;if(!t)return;const n=(a=this.scene)==null?void 0:a.getBoundingBoxById(t);return n&&e&&n.applyMatrix3(this.view.camera.viewMatrix).round(),n}setDummies(t){var e;(e=this.view)==null||e.setDummies(t)}clearDummies(t){var e;(e=this.view)==null||e.clearDummies(t)}highlightDummies(t){var e,n;(n=(e=this.view)==null?void 0:e.dummiesController)==null||n.highlightDummies(t)}resetHighlightDummies(){var t,e;(e=(t=this.view)==null?void 0:t.dummiesController)==null||e.resetHighlightDummies()}bindAssetsEvents(){var t,e;this.view.addEventListener(An.POINTEROVER,this.pointerOverHandler),this.view.addEventListener(An.POINTERLEAVE,this.pointerLeaveHandler),this.view.addEventListener(An.SELECTED,this.multiSelectorSelectedHandler),(e=(t=this.view)==null?void 0:t.dummiesController)==null||e.addEventListener("panend",this.dragEndHandler)}unbindAssetsEvents(){var t,e;this.view.removeEventListener(An.POINTEROVER,this.pointerOverHandler),this.view.removeEventListener(An.POINTERLEAVE,this.pointerLeaveHandler),this.view.removeEventListener(An.SELECTED,this.multiSelectorSelectedHandler),(e=(t=this.view)==null?void 0:t.dummiesController)==null||e.removeEventListener("panend",this.dragEndHandler)}handleMultiSelectorSelected(t){this.dispatchEvent({type:"SELECTED",data:t.data})}handlePointerOver(t){this.dispatchEvent({type:"pointerover",data:t.data,e:t.e})}handlePointerLeave(t){this.dispatchEvent({type:"pointerleave",data:t.data,e:t.e})}handleInitializeStart(){console.log("App.initializeStart ...")}async handleInitializeComplete(t){console.log("App.initializeComplete ...",t),t!=null&&t.data&&this.launch()}handleDragEnd(t){this.dispatchEvent(t)}launch(){console.log("App.launch ...")}}const tl=new St;var Wf=(r=>(r.SELECTED="SELECTED",r.POINTEROVER="pointerover",r.POINTERLEAVE="pointerleave",r.DRAG_END="panend",r))(Wf||{});class lv{static cached=new Map;static cachedCanvas=new Map;static destroy(){this.cached.clear(),this.cachedCanvas.clear()}static createCanvas(t){var a;if(!((a=Zt.window)!=null&&a.document))throw new Error("environment not support");let e;t.containerId&&(e=Zt.window.document.getElementById(t.containerId)),e||(e=Zt.window.document.getElementsByTagName("body")[0]);let n;if(t.canvasId&&(n=Zt.window.document.getElementById(t.canvasId)||void 0),t.width||(t.width=e==null?void 0:e.offsetWidth),t.height||(t.height=e==null?void 0:e.offsetHeight),t.dpr||(t.dpr=Zt.dpr),n)this.resizeCanvas(n,t.width,t.height,t.dpr);else{if(n=this.createHtmlCanvas(t.width,t.height,t.dpr),!n)throw new Error("error environment");t.canvasId&&n.setAttribute("id",t.canvasId),e==null||e.appendChild(n)}return n.style.background=t.background||"transparent",n}static getContext2D(t,e={}){const n={alpha:!0,willReadFrequently:!!e.willReadFrequently},a=t.getContext("2d",n);if(!a)throw new Error("getContext2D error");return a.scale(e.dpr||1,e.dpr||1),a}static resizeCanvas(t,e,n,a=1){t instanceof OffscreenCanvas?(t.width=e,t.height=n):t instanceof HTMLCanvasElement&&(t.setAttribute("width",(e*a).toString()),t.setAttribute("height",(n*a).toString()),t.style.width=e+"px",t.style.height=n+"px",t.style.padding="0",t.style.margin="0",t.style.border="0",t.style.imageRendering="pixelated",t.style.transform="translateZ(0)")}static async getImageBitmapByCanvasAsync(t){if(t)return t instanceof OffscreenCanvas?t.transferToImageBitmap():t instanceof HTMLCanvasElement?await createImageBitmap(t):void 0}static get(t,e,n,a=1){let u=this.cached.get(t);return u||(u=this.create(e,n,a),this.set(t,u)),this.resizeCanvas(u,e,n,a),u}static set(t,e){if(!t||!e)throw new Error("error input");return this.cached.set(t,e)}static remove(t){this.cached.has(t)&&this.cached.delete(t)}static create(t,e,n=1){var a;if((a=Zt.window)!=null&&a.OffscreenCanvas)return new OffscreenCanvas(t,e);throw new Error("environment does not support")}static createHtmlCanvas(t,e,n=1){if(!Zt.window.document)throw new Error("environment does not support");const a=Zt.window.document.createElement("canvas");return this.resizeCanvas(a,t,e,n),a}static measureText(t,e,n=new Y){if(!t)throw new Error("input error");const u=this.get("measureText",1,1).getContext("2d");if(!u)throw new Error("bufferCtx not found");e.render(u);const l=u.measureText(t);if(!l)throw new Error("measureText error");const c=l.actualBoundingBoxRight+l.actualBoundingBoxLeft,f=l.actualBoundingBoxAscent+l.actualBoundingBoxDescent;return n.set(c,f),n}}class hv extends av{name="OpeView";constructor(t={}){super(t),this.initController(this.camera)}destroy(){this.controller&&this.controller.destroy(),super.destroy()}initController(t){let e=this.params.cvs;!e&&this.params.canvasId&&(e=document.getElementById(this.params.canvasId)),!(!this.params.controls||!t||!e)&&(this.controller&&this.controller.destroy(),this.controller=new Qc(e,t))}handleCameraChanged(t){console.warn("handleCameraChanged: ",t.target.camera.position.z,t.target.camera.scaled.x)}}var ri=(r=>(r.INIT="init",r.LOAD="load",r.LOADED="loaded",r.GET_LAYERS="getLayers",r.TERMINATE="terminate",r.CAMERA_SYNC="cameraSync",r.CAMERA_CHANGED="cameraChanged",r.SCENES_CHANGED="scenesChanged",r.UPDATE_LAYERS_VISIBILITY="updateLayersVisibility",r))(ri||{});class cv extends Ir{cvs;worker;view;boundingBox=new St;workerMessageHandler=this.handleWorkerMessage.bind(this);cameraHandler=this.handleCameraChanged.bind(this);runningHandler=this.running.bind(this);constructor(t={},e){super(),t.workerRender=!0,this.params=t,Zt.config=t;const n=lv.createCanvas(t);if(!n.transferControlToOffscreen)throw new Error("not support transferControlToOffscreen");this.cvs=n.transferControlToOffscreen(),this.view=new hv(t),this.view.camera.name="mainCamera",this.view.camera.resize(),this.worker=e,this.bindEvents()}destroy(){super.destroy(),this.unbindEvents(),this.worker.postMessage({task:ri.TERMINATE}),this.worker.terminate()}bindEvents(){var t,e;(e=(t=this.view)==null?void 0:t.camera)==null||e.addEventListener(Qa.UPDATE,this.cameraHandler),this.worker.addEventListener("message",this.workerMessageHandler)}unbindEvents(){var t,e;(e=(t=this.view)==null?void 0:t.controller)==null||e.removeEventListener(_t.CAMERA_CHANGED,this.cameraHandler),this.worker.removeEventListener("message",this.workerMessageHandler)}handleWorkerMessage(t){var e,n,a,u,l;switch(t.data.task){case ri.CAMERA_SYNC:if(!((e=t==null?void 0:t.data)!=null&&e.data))break;const c=JSON.parse(t.data.data);(a=(n=this.view)==null?void 0:n.camera)==null||a.fromJSON(c),this.view.camera.computeBoundingBox(),console.log("CAMERA_SYNC: ",c);break;case ri.CAMERA_CHANGED:const{t:f,r:d,s:y}=t.data.data;console.log("CAMERA_CHANGED: ",this.view.camera.width,f,d,y),(l=(u=this.view)==null?void 0:u.camera)==null||l.setTRS(f,d,y);break;case ri.SCENES_CHANGED:const{box:A}=t.data.data;if(!A)return;this.boundingBox.fromString(A);break;case"pong":console.log("response: pong");break}}handleCameraChanged(t){this.worker.postMessage({task:ri.CAMERA_CHANGED,data:t.data})}promiseWorkerResponse(t,e){return new Promise((n,a)=>{const u=c=>{var f,d,y;((f=c==null?void 0:c.data)==null?void 0:f.task)===t&&(this.worker.removeEventListener("message",u),this.worker.removeEventListener("error",l),console.log("AppOffscreen::response: ",(d=c==null?void 0:c.data)==null?void 0:d.task,(y=c==null?void 0:c.data)==null?void 0:y.data),n(c.data.data))},l=c=>{this.worker.removeEventListener("message",u),this.worker.removeEventListener("error",l),a(c.error)};this.worker.addEventListener("message",u),this.worker.addEventListener("error",l),this.worker.postMessage({task:t,data:e})})}resize(){var t;(t=this.view.camera)==null||t.resize()}async load(t,e){return this.promiseWorkerResponse(ri.LOAD,{url:t,layers:e})}async getLayers(t=2){return this.promiseWorkerResponse(ri.GET_LAYERS,{lv:t})}async fullscreen(){await this.view.resetCameraByBoundingBox(this.boundingBox,!0)}saveCameraPosition(t){this.view.saveCameraPosition(t)}restoreCameraPosition(t){this.view.restoreCameraPosition(t)}clearCameraPosition(t){this.view.clearCameraPosition(t)}updateLayersVisibility(t,e=!1){this.worker.postMessage({task:ri.UPDATE_LAYERS_VISIBILITY,data:{ids:t,visible:e}})}start(){const t=this.cvs,e=JSON.stringify(this.params);this.worker.postMessage({task:ri.INIT,data:{cvs:t,config:e}},[t]),requestAnimationFrame(this.runningHandler)}running(t){var e;(e=this.view)==null||e.update(t),requestAnimationFrame(this.runningHandler)}stop(){}}function fv(r){return new Worker("/environment.worker.js",{type:"module",name:r==null?void 0:r.name})}function pv(r){return new Worker("/renderer.worker.js",{type:"module",name:r==null?void 0:r.name})}le.AppEnum=Wf,le.AppOffscreen=cv,le.AssetTypeEnum=er,le.Box2=Ug,le.Color=Wt,le.ColorsEnum=he,le.EnvironmentWorker=fv,le.GLOB=Zt,le.LayerTypeEnum=Vs,le.Monitor=Pt,le.RendererWorker=pv,le.SvgApp=ov,le.Vector2=Fg,le.defaultConfig=Un,Object.defineProperty(le,Symbol.toStringTag,{value:"Module"})});
72
+ `,"2) content: () => element.cloneNode(true)"].join(" "))}var c=a.reduce(function(f,d){var g=d&&um(d,i);return g&&f.push(g),f},[]);return fa(r)?c[0]:c}da.defaultProps=ir,da.setDefaultProps=im,da.currentInput=ri,Object.assign({},mf,{effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow)}}),da.setDefaultProps({render:Jf});let om=0;const Zi=da(document.body,{theme:"translucent",animation:"scale",inertia:!0,delay:[200,100],content:"",allowHTML:!0,placement:"left-start",trigger:"manual",arrow:!0});class al{constructor(t,e){this.container=t,this.text=e,t?this.container=t:this.container=document.getElementsByTagName("body")[0],this.text=e}name="Label";id="Label"+om++;el;position=new F;get isMounted(){return Zi.state.isMounted}get isShown(){return Zi.state.isShown}destroy(){this.text="",this.position.identity()}setHtml(t=""){return this.text=t,this}update(t){t&&(this.position.copy(t),Zi.show())}async show(t){if(t)return await this.hide(),this.position.copy(t),Zi.setContent(this.text),Zi.setProps({getReferenceClientRect:()=>({width:0,height:0,right:this.position.x,left:this.position.x,bottom:this.position.y,top:this.position.y,x:this.position.x,y:this.position.y,toJSON(){}})}),Zi.clearDelayTimeouts(),Zi.show(),new Promise(e=>{St.delay(function(){e()},300)})}async hide(){return Zi.hide(),new Promise(t=>{St.delay(function(){t()},100)})}}let lm=0;class hm extends dr{name="DummyPoint";id="dummyPoint"+lm++;container;offset=new F;el;label;radius=10;position=new F;worldPosition=new F;userData;constructor(t,e){var a,u;super(),t?this.container=t:this.container=document.getElementsByTagName("body")[0];let i=this.container.getBoundingClientRect();this.offset.set(i.left,i.top),this.userData=e,(a=this.userData)!=null&&a.type||St.set(this,"userData.type",bn.DEFAULT),this.initDom(),this.setType((u=this.userData)==null?void 0:u.type),this.mount(),this.initLabel()}destroy(){var t;super.destroy(),this.unmount(),(t=this.label)==null||t.destroy()}get isMounted(){var t;return!!((t=this.el)!=null&&t.parentNode)}mount(){var t;this.el&&((t=this.el)!=null&&t.parentNode||this.container.appendChild(this.el))}unmount(){var t,e,i,a;(e=(t=this.el)==null?void 0:t.parentNode)==null||e.removeChild(this.el),(i=this.el)==null||i.remove(),(a=this.label)==null||a.hide()}setText(t=""){return this.el?(this.el.innerText=t,this):this}initDom(){var t;this.el=document.createElement("div"),this.el.setAttribute("id",this.id),this.el.setAttribute("class","dummy-point"),this.el.setAttribute(ss+"-id",(t=this.userData)==null?void 0:t.value)}initLabel(){var t;(t=this.userData)!=null&&t.label&&(this.label=new al(this.container,this.userData.label))}setActive(t){return t?(ea(this.el,"active"),this.showLabel()):(ra(this.el,"active"),this.hideLabel()),this}showLabel(){var t;(t=this.label)==null||t.show(cm.copy(this.position).add(this.offset).subScalar(this.radius))}hideLabel(){var t;(t=this.label)==null||t.hide()}setType(t){var i;if(!this.userData)return this;const e=(i=this.userData)==null?void 0:i.type;return t||(t=bn.DEFAULT),e&&su(this.el,e)&&ra(this.el,e),this.userData.type=t,ea(this.el,this.userData.type),this}update(t,e=!1){!t||!this.isMounted||(e||t.subScalar(this.radius).round(),this.position.copy(t),this.el.style.transform=`translate3D(${this.position.x}px, ${this.position.y}px, 0)`)}}const cm=new F;let fm=0;class pm extends dr{name="DummyRect";id="dummyRect"+fm++;container;offset=new F;el;radius=10;position=new F;worldPosition=new F;label;userData;constructor(t,e){super(),t?this.container=t:this.container=document.getElementsByTagName("body")[0];let i=this.container.getBoundingClientRect();this.offset.set(i.left,i.top),this.userData=e,this.initDom(),this.mount(),this.initLabel()}destroy(){var t;super.destroy(),this.unmount(),(t=this.label)==null||t.destroy()}get isMounted(){var t;return!!((t=this.el)!=null&&t.parentNode)}mount(){this.container.appendChild(this.el)}unmount(){var t,e,i,a;this.setText(""),(e=(t=this.el)==null?void 0:t.parentNode)==null||e.removeChild(this.el),(i=this.el)==null||i.remove(),(a=this.label)==null||a.hide()}initDom(){var t;this.el=document.createElement("div"),this.el.setAttribute("id",this.id),this.el.setAttribute("class","dummy-rect"),this.el.setAttribute(ss+"-id",((t=this.userData)==null?void 0:t.rmId)||"undefined")}initLabel(){this.label=new al(this.container,"")}setText(t=""){return this.el.innerText=t,this}setActive(t){return t?ea(this.el,"active"):ra(this.el,"active"),this}showLabel(){var t;(t=this.label)==null||t.show(dm.copy(this.position).add(this.offset).subScalar(this.radius))}hideLabel(){var t;(t=this.label)==null||t.hide()}setType(t){var i;if(!this.userData)return this;const e=(i=this.userData)==null?void 0:i.type;return t=bn.DEFAULT,e&&su(this.el,e)&&ra(this.el,e),this.userData.type=t,ea(this.el,this.userData.type),this}update(t,e=!1){!t||!this.isMounted||(e||t.subScalar(this.radius).round(),this.position.copy(t),this.el.style.transform=`translate3D(${this.position.x}px, ${this.position.y}px, 0)`)}}const dm=new F;class gm extends dr{name="Dummies";container;controller;scene;viewMatrix=new ie;dummies=[];rmMap=new Map;mergedMap=new Map;cameraUpdateHandler=this.handleCameraUpdate.bind(this);controllerTapHandler=this.handleControllerTap.bind(this);constructor(t,e){super(),this.container=t,this.controller=e,this.bindEvents()}destroy(){this.unbindEvents(),super.destroy(),this.clearDummies()}bindEvents(){this.controller.camera.addEventListener(au.UPDATE,this.cameraUpdateHandler),this.controller.addEventListener(_t.TAP,this.controllerTapHandler)}unbindEvents(){this.controller.camera.removeEventListener(au.UPDATE,this.cameraUpdateHandler),this.controller.removeEventListener(_t.TAP,this.controllerTapHandler)}bindScene(t){this.scene=t}update(t){var e,i,a;if(t){this.viewMatrix.copy(t);for(let u=0,l=(this.dummies||[]).length;u<l;u++){const c=this.dummies[u],f=(i=this.scene)==null?void 0:i.getElementById((e=c.userData)==null?void 0:e.rmId);if(f){const d=(a=this.scene)==null?void 0:a.chef.getElementBoundingBox(f.id);d==null||d.getCenter(Qi),Qi.applyMatrix3(this.viewMatrix).round(),c.position.copy(Qi)}else Qi.copy(c.worldPosition).applyMatrix3(this.viewMatrix).round(),c.update(Qi)}this.mergeDummies()}}setDummies(t){this.clearDummies();for(let e=0,i=(t||[]).length;e<i;e++)this.addDummy(t[e])}addDummy(t){var a,u;const e=new hm(this.container,t);this.dummies.push(e);const i=(a=e.userData)==null?void 0:a.rmId;return i&&(this.rmMap.has(i)||this.rmMap.set(i,[]),(u=this.rmMap.get(i))==null||u.push(e)),e}removeDummy(t){var a;const e=this.dummies.indexOf(t);e>-1&&this.dummies.splice(e,1);const i=(a=t.userData)==null?void 0:a.rmId;if(i){const u=this.mergedMap.get(i);u==null||u.destroy(),this.mergedMap.delete(i);const l=this.rmMap.get(i);if(!l)return;if(l.length===1)this.rmMap.delete(i);else{const c=l.indexOf(t);c>-1&&(l.splice(c,1),this.rmMap.set(i,l))}}t.destroy()}clearDummies(t){var e,i,a;for(let u=(((e=this.dummies)==null?void 0:e.length)||0)-1;u>=0;u--){const l=this.dummies[u];(!t||(i=l==null?void 0:l.userData)!=null&&i.type&&(t!=null&&t.includes((a=l.userData)==null?void 0:a.type)))&&this.removeDummy(l)}t||(this.dummies.length=0,this.mergedMap.clear(),this.rmMap.clear())}mergeDummies(){this.rmMap.forEach((t,e)=>{var a,u,l,c;if((a=this.scene)==null?void 0:a.getElementById(e)){const f=(u=this.scene)==null?void 0:u.chef.getElementBoundingBox(e);if(!f)return;ul.copy(f).applyMatrix3(this.viewMatrix).round(),ul.getSize(Qi);const d=t[0].radius,g=ul.centralArrange(t.length,d*2,d*2);if(Qi.x<d*3||Qi.y<d*3){t.forEach(T=>T.unmount());const E=this.mergedMap.get(e);E==null||E.unmount()}else if(Array.isArray(g))this.mergedMap.has(e)&&((l=this.mergedMap.get(e))==null||l.unmount()),t.forEach((E,T)=>{E.isMounted||E.mount(),E.update(g[T])});else{t.forEach(C=>C.unmount());let E=this.mergedMap.get(e);if(E)E.isMounted||E.mount();else{const C=St.cloneDeep(t[0].userData)||{},L=St.reduce(t,(M,R)=>{var W,G;return(W=R.userData)!=null&&W.label&&M.push((G=R.userData)==null?void 0:G.label),M},[]);C.label=L.join(", ");const N=St.reduce(t,(M,R)=>{var W,G;return(W=R.userData)!=null&&W.value&&M.push((G=R.userData)==null?void 0:G.value),M},[]);C.value=N.join(","),C.rmId=e,E=new pm(this.container,C),this.mergedMap.set(e,E)}E.setText(t.length.toString());const T=St.reduce(t,(C,L)=>{var N,M;return(N=L.userData)!=null&&N.label&&C.push((M=L.userData)==null?void 0:M.label),C},[]);(c=E.label)==null||c.setHtml(T.join(", <br />")),E.update(t[0].position)}}})}getDummyById(t){return this.dummies.find(e=>{var i;return((i=e.userData)==null?void 0:i.value)===t})}setActiveByIds(t){var e,i;if(this.resetActives(),!!t&&(Array.isArray(t)||(t=[t]),!!(t!=null&&t.length)))for(let a=0,u=t.length;a<u;a++){const l=this.getDummyById(t[a]);if(l&&l.setActive(!0),l&&((e=l.userData)!=null&&e.rmId)){const c=this.mergedMap.get((i=l.userData)==null?void 0:i.rmId);c&&c.setActive(!0)}}}resetActives(){this.dummies.forEach(t=>t.setActive(!1)),this.mergedMap.forEach(t=>t.setActive(!1))}showDummyLabel(t){if(!t)return;const e=this.getDummyById(t);e&&e.showLabel();const i=this.mergedMap.get(t);i&&i.showLabel()}async hideDummyLabel(){this.dummies.forEach(t=>t.hideLabel()),this.mergedMap.forEach(t=>t.hideLabel())}handleCameraUpdate(){this.update(this.controller.camera.viewMatrix)}handleControllerTap(t){var a,u,l,c,f;if((t==null?void 0:t.type)!==_t.TAP)return;const e=((a=t==null?void 0:t.e)==null?void 0:a.target)||((l=(u=t==null?void 0:t.e)==null?void 0:u.srcEvent)==null?void 0:l.target)||((f=(c=t==null?void 0:t.e)==null?void 0:c.srcEvent)==null?void 0:f.srcElement),i=e==null?void 0:e.getAttribute(ss+"-id");i&&console.warn("【TODO】handleControllerTap: ",i)}}const Qi=new F,ul=new Ot;(function(){return window[Yi.prefixed(window,"requestAnimationFrame")]||function(r){window.setTimeout(r,1e3/60)}})();class ym extends dr{name="DragController";dragFake=!1;container;offset=new F;controller;scene;raycaster;dummies;_els=[];_hms=new Map;_vos=new Map;_elMap=new Map;_panType=bn.SUCCESS;onPanHandler=this.handleOnPan.bind(this);panEndHandler=St.debounce(this.handlePanEnd.bind(this),500);constructor(t,e,i=!0){super(),this.container=t;let a=this.container.getBoundingClientRect();this.offset.set(a.left,a.top),this.controller=e,this.dummies=new gm(t,e),this.raycaster=new S2,this.dragFake=i}destroy(){var t;super.destroy();for(let e=(((t=this._els)==null?void 0:t.length)||0)-1;e>=0;e--)this.drop(this._els[e]);this.dummies.destroy()}bindScene(t){var e;this.scene=t,(e=this.dummies)==null||e.bindScene(t)}drag(t,e){t&&(this._els.includes(t)||(this.bindEvent(t),this._els.push(t),this._vos.set(t,e)))}drop(t){if(!t)return;this.unbindEvent(t),this._vos.delete(t),this._elMap.delete(t);const e=this._els.findIndex(i=>i===t);e>-1&&this._els.splice(e,1)}bindEvent(t){if(!t)return;const e=new Yi.Manager(t,{domEvents:!0});e.add(new Yi.Pan({threshold:0,pointers:0})),e.on(["panstart","panmove","panend"].join(" "),this.onPanHandler),this._hms.set(t,e)}unbindEvent(t){if(!t)return;const e=this._hms.get(t);e&&(e.off(["panstart","panmove","panend"].join(" "),this.onPanHandler),e.destroy(),this._hms.delete(t))}handleOnPan(t){if(typeof t.preventDefault=="function"&&t.preventDefault(),typeof t.srcEvent.stopPropagation=="function"&&t.srcEvent.stopPropagation(),typeof t.srcEvent.stopImmediatePropagation=="function"&&t.srcEvent.stopImmediatePropagation(),!this.controller)return;t.type==="panstart"||t.isFirst?this.controller.enablePan=!1:t.type==="panmove"||t.type==="panend"&&(this.controller.enablePan=!0);const e=this._vos.get(t.target);if(!e)return;const i=St.cloneDeep(e);i.type=this._panType;const a=this._getDummy(t.target,i);ga.set(t.center.x,t.center.y).sub(this.offset),a.worldPosition.copy(ga).unproject(this.controller.camera),a.update(ga),this.panEndHandler({type:"panend",e:t})}handlePanEnd(t){if((t==null?void 0:t.type)!=="panend")return;const e=this.getDummies(!0);this.dispatchEvent({type:"panend",data:e})}getDummies(t=!0){const e=[];return this._els.forEach(i=>{var u;let a=this._vos.get(i);if(!(!a||a.type!==bn.SUCCESS)){if(t){const l=this._elMap.get(i);if(!l||!this.controller.camera)return;ga.copy(l.position),this.raycaster.setFromCamera(ga,this.controller.camera);const c=[];if((u=this.scene)==null||u.getIntersectObjects(this.raycaster,er.RM,c),!(c!=null&&c.length))return;a=St.cloneDeep(a),a.rmId=c[0].id}e.push(a)}}),e}setDummiesByVos(t){var e,i;for(let a=0,u=(t||[]).length;a<u;a++){const l=(e=this.dummies)==null?void 0:e.addDummy(t[a]);if(!l)continue;const c=St.cloneDeep(t[a]);delete c.rmId,delete c.wsId,this.drag(l.el,c)}(i=this.dummies)==null||i.update(this.controller.camera.viewMatrix)}clearDummies(t){var e,i;for(let a=(((e=this._els)==null?void 0:e.length)||0)-1;a>=0;a--){const u=this._vos.get(this._els[a]);(!t||t&&(u!=null&&u.type)&&t.includes(u.type))&&this.drop(this._els[a])}(i=this.dummies)==null||i.clearDummies(t)}getDummyById(t){return this.dummies.getDummyById(t)}highlightDummies(t){var e;(e=this.dummies)==null||e.setActiveByIds(t)}resetHighlightDummies(){var t;(t=this.dummies)==null||t.resetActives()}showDummyLabel(t){var e;(e=this.dummies)==null||e.showDummyLabel(t)}start(){}_getDummy(t,e){let i=this._elMap.get(t);if(i||(i=this.dummies.addDummy(e).setType(bn.SUCCESS),this._elMap.set(t,i)),i.isMounted||i.mount(),this.dummies.dummies.includes(i)||this.dummies.dummies.push(i),!this._elMap.get(i.el)){this._elMap.set(i.el,i);const u=St.cloneDeep(e);delete u.rmId,delete u.wsId,this.drag(i.el,u)}return i}}const ga=new F;var ps=Object.freeze({Linear:Object.freeze({None:function(r){return r},In:function(r){return r},Out:function(r){return r},InOut:function(r){return r}}),Quadratic:Object.freeze({In:function(r){return r*r},Out:function(r){return r*(2-r)},InOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)}}),Cubic:Object.freeze({In:function(r){return r*r*r},Out:function(r){return--r*r*r+1},InOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)}}),Quartic:Object.freeze({In:function(r){return r*r*r*r},Out:function(r){return 1- --r*r*r*r},InOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)}}),Quintic:Object.freeze({In:function(r){return r*r*r*r*r},Out:function(r){return--r*r*r*r*r+1},InOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)}}),Sinusoidal:Object.freeze({In:function(r){return 1-Math.sin((1-r)*Math.PI/2)},Out:function(r){return Math.sin(r*Math.PI/2)},InOut:function(r){return .5*(1-Math.sin(Math.PI*(.5-r)))}}),Exponential:Object.freeze({In:function(r){return r===0?0:Math.pow(1024,r-1)},Out:function(r){return r===1?1:1-Math.pow(2,-10*r)},InOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)}}),Circular:Object.freeze({In:function(r){return 1-Math.sqrt(1-r*r)},Out:function(r){return Math.sqrt(1- --r*r)},InOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)}}),Elastic:Object.freeze({In:function(r){return r===0?0:r===1?1:-Math.pow(2,10*(r-1))*Math.sin((r-1.1)*5*Math.PI)},Out:function(r){return r===0?0:r===1?1:Math.pow(2,-10*r)*Math.sin((r-.1)*5*Math.PI)+1},InOut:function(r){return r===0?0:r===1?1:(r*=2,r<1?-.5*Math.pow(2,10*(r-1))*Math.sin((r-1.1)*5*Math.PI):.5*Math.pow(2,-10*(r-1))*Math.sin((r-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(r){var t=1.70158;return r===1?1:r*r*((t+1)*r-t)},Out:function(r){var t=1.70158;return r===0?0:--r*r*((t+1)*r+t)+1},InOut:function(r){var t=2.5949095;return(r*=2)<1?.5*(r*r*((t+1)*r-t)):.5*((r-=2)*r*((t+1)*r+t)+2)}}),Bounce:Object.freeze({In:function(r){return 1-ps.Bounce.Out(1-r)},Out:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},InOut:function(r){return r<.5?ps.Bounce.In(r*2)*.5:ps.Bounce.Out(r*2-1)*.5+.5}}),generatePow:function(r){return r===void 0&&(r=4),r=r<Number.EPSILON?Number.EPSILON:r,r=r>1e4?1e4:r,{In:function(t){return Math.pow(t,r)},Out:function(t){return 1-Math.pow(1-t,r)},InOut:function(t){return t<.5?Math.pow(t*2,r)/2:(1-Math.pow(2-t*2,r))/2+.5}}}}),ds=function(){return performance.now()},tp=function(){function r(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,t)}return r.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map(function(e){return t._tweens[e]})},r.prototype.removeAll=function(){this._tweens={}},r.prototype.add=function(){for(var t,e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];for(var a=0,u=e;a<u.length;a++){var l=u[a];(t=l._group)===null||t===void 0||t.remove(l),l._group=this,this._tweens[l.getId()]=l,this._tweensAddedDuringUpdate[l.getId()]=l}},r.prototype.remove=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var i=0,a=t;i<a.length;i++){var u=a[i];u._group=void 0,delete this._tweens[u.getId()],delete this._tweensAddedDuringUpdate[u.getId()]}},r.prototype.allStopped=function(){return this.getAll().every(function(t){return!t.isPlaying()})},r.prototype.update=function(t,e){t===void 0&&(t=ds()),e===void 0&&(e=!0);var i=Object.keys(this._tweens);if(i.length!==0)for(;i.length>0;){this._tweensAddedDuringUpdate={};for(var a=0;a<i.length;a++){var u=this._tweens[i[a]],l=!e;u&&u.update(t,l)===!1&&!e&&this.remove(u)}i=Object.keys(this._tweensAddedDuringUpdate)}},r}(),Dn={Linear:function(r,t){var e=r.length-1,i=e*t,a=Math.floor(i),u=Dn.Utils.Linear;return t<0?u(r[0],r[1],i):t>1?u(r[e],r[e-1],e-i):u(r[a],r[a+1>e?e:a+1],i-a)},Bezier:function(r,t){for(var e=0,i=r.length-1,a=Math.pow,u=Dn.Utils.Bernstein,l=0;l<=i;l++)e+=a(1-t,i-l)*a(t,l)*r[l]*u(i,l);return e},CatmullRom:function(r,t){var e=r.length-1,i=e*t,a=Math.floor(i),u=Dn.Utils.CatmullRom;return r[0]===r[e]?(t<0&&(a=Math.floor(i=e*(1+t))),u(r[(a-1+e)%e],r[a],r[(a+1)%e],r[(a+2)%e],i-a)):t<0?r[0]-(u(r[0],r[0],r[1],r[1],-i)-r[0]):t>1?r[e]-(u(r[e],r[e],r[e-1],r[e-1],i-e)-r[e]):u(r[a?a-1:0],r[a],r[e<a+1?e:a+1],r[e<a+2?e:a+2],i-a)},Utils:{Linear:function(r,t,e){return(t-r)*e+r},Bernstein:function(r,t){var e=Dn.Utils.Factorial;return e(r)/e(t)/e(r-t)},Factorial:function(){var r=[1];return function(t){var e=1;if(r[t])return r[t];for(var i=t;i>1;i--)e*=i;return r[t]=e,e}}(),CatmullRom:function(r,t,e,i,a){var u=(e-r)*.5,l=(i-t)*.5,c=a*a,f=a*c;return(2*t-2*e+u+l)*f+(-3*t+3*e-2*u-l)*c+u*a+t}}},ol=function(){function r(){}return r.nextId=function(){return r._nextId++},r._nextId=0,r}(),ll=new tp,mm=function(){function r(t,e){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=ps.Linear.None,this._interpolationFunction=Dn.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=ol.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=t,typeof e=="object"?(this._group=e,e.add(this)):e===!0&&(this._group=ll,ll.add(this))}return r.prototype.getId=function(){return this._id},r.prototype.isPlaying=function(){return this._isPlaying},r.prototype.isPaused=function(){return this._isPaused},r.prototype.getDuration=function(){return this._duration},r.prototype.to=function(t,e){if(e===void 0&&(e=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=t,this._propertiesAreSetUp=!1,this._duration=e<0?0:e,this},r.prototype.duration=function(t){return t===void 0&&(t=1e3),this._duration=t<0?0:t,this},r.prototype.dynamic=function(t){return t===void 0&&(t=!1),this._isDynamic=t,this},r.prototype.start=function(t,e){if(t===void 0&&(t=ds()),e===void 0&&(e=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var i in this._valuesStartRepeat)this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,!this._propertiesAreSetUp||e){if(this._propertiesAreSetUp=!0,!this._isDynamic){var a={};for(var u in this._valuesEnd)a[u]=this._valuesEnd[u];this._valuesEnd=a}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,e)}return this},r.prototype.startFromCurrentValues=function(t){return this.start(t,!0)},r.prototype._setupProperties=function(t,e,i,a,u){for(var l in i){var c=t[l],f=Array.isArray(c),d=f?"array":typeof c,g=!f&&Array.isArray(i[l]);if(!(d==="undefined"||d==="function")){if(g){var E=i[l];if(E.length===0)continue;for(var T=[c],C=0,L=E.length;C<L;C+=1){var N=this._handleRelativeValue(c,E[C]);if(isNaN(N)){g=!1,console.warn("Found invalid interpolation list. Skipping.");break}T.push(N)}g&&(i[l]=T)}if((d==="object"||f)&&c&&!g){e[l]=f?[]:{};var M=c;for(var R in M)e[l][R]=M[R];a[l]=f?[]:{};var E=i[l];if(!this._isDynamic){var W={};for(var R in E)W[R]=E[R];i[l]=E=W}this._setupProperties(M,e[l],E,a[l],u)}else(typeof e[l]>"u"||u)&&(e[l]=c),f||(e[l]*=1),g?a[l]=i[l].slice().reverse():a[l]=e[l]||0}}},r.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},r.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},r.prototype.pause=function(t){return t===void 0&&(t=ds()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=t,this)},r.prototype.resume=function(t){return t===void 0&&(t=ds()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStart,this._pauseStart=0,this)},r.prototype.stopChainedTweens=function(){for(var t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop();return this},r.prototype.group=function(t){return t?(t.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},r.prototype.remove=function(){var t;return(t=this._group)===null||t===void 0||t.remove(this),this},r.prototype.delay=function(t){return t===void 0&&(t=0),this._delayTime=t,this},r.prototype.repeat=function(t){return t===void 0&&(t=0),this._initialRepeat=t,this._repeat=t,this},r.prototype.repeatDelay=function(t){return this._repeatDelayTime=t,this},r.prototype.yoyo=function(t){return t===void 0&&(t=!1),this._yoyo=t,this},r.prototype.easing=function(t){return t===void 0&&(t=ps.Linear.None),this._easingFunction=t,this},r.prototype.interpolation=function(t){return t===void 0&&(t=Dn.Linear),this._interpolationFunction=t,this},r.prototype.chain=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._chainedTweens=t,this},r.prototype.onStart=function(t){return this._onStartCallback=t,this},r.prototype.onEveryStart=function(t){return this._onEveryStartCallback=t,this},r.prototype.onUpdate=function(t){return this._onUpdateCallback=t,this},r.prototype.onRepeat=function(t){return this._onRepeatCallback=t,this},r.prototype.onComplete=function(t){return this._onCompleteCallback=t,this},r.prototype.onStop=function(t){return this._onStopCallback=t,this},r.prototype.update=function(t,e){var i=this,a;if(t===void 0&&(t=ds()),e===void 0&&(e=r.autoStartOnUpdate),this._isPaused)return!0;var u;if(!this._goToEnd&&!this._isPlaying)if(e)this.start(t,!0);else return!1;if(this._goToEnd=!1,t<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var l=t-this._startTime,c=this._duration+((a=this._repeatDelayTime)!==null&&a!==void 0?a:this._delayTime),f=this._duration+this._repeat*c,d=function(){if(i._duration===0||l>f)return 1;var N=Math.trunc(l/c),M=l-N*c,R=Math.min(M/i._duration,1);return R===0&&l===i._duration?1:R},g=d(),E=this._easingFunction(g);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,E),this._onUpdateCallback&&this._onUpdateCallback(this._object,g),this._duration===0||l>=this._duration)if(this._repeat>0){var T=Math.min(Math.trunc((l-this._duration)/c)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=T);for(u in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[u]=="string"&&(this._valuesStartRepeat[u]=this._valuesStartRepeat[u]+parseFloat(this._valuesEnd[u])),this._yoyo&&this._swapEndStartRepeatValues(u),this._valuesStart[u]=this._valuesStartRepeat[u];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=c*T,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var C=0,L=this._chainedTweens.length;C<L;C++)this._chainedTweens[C].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},r.prototype._updateProperties=function(t,e,i,a){for(var u in i)if(e[u]!==void 0){var l=e[u]||0,c=i[u],f=Array.isArray(t[u]),d=Array.isArray(c),g=!f&&d;g?t[u]=this._interpolationFunction(c,a):typeof c=="object"&&c?this._updateProperties(t[u],l,c,a):(c=this._handleRelativeValue(l,c),typeof c=="number"&&(t[u]=l+(c-l)*a))}},r.prototype._handleRelativeValue=function(t,e){return typeof e!="string"?e:e.charAt(0)==="+"||e.charAt(0)==="-"?t+parseFloat(e):parseFloat(e)},r.prototype._swapEndStartRepeatValues=function(t){var e=this._valuesStartRepeat[t],i=this._valuesEnd[t];typeof i=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(i):this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=e},r.autoStartOnUpdate=!1,r}(),vm="25.0.0",xm=ol.nextId,ii=ll,Em=ii.getAll.bind(ii),Am=ii.removeAll.bind(ii),wm=ii.add.bind(ii),bm=ii.remove.bind(ii),Tm=ii.update.bind(ii),pu={Easing:ps,Group:tp,Interpolation:Dn,now:ds,Sequence:ol,nextId:xm,Tween:mm,VERSION:vm,getAll:Em,removeAll:Am,add:wm,remove:bm,update:Tm};class _m{name="View";params;visible=!0;cvs;scene;scenes=[];camera;controller;tween;animateDuration;constructor(t={}){this.params=t,this.animateDuration=this.params.animateDuration||300,this.cvs=t.cvs,this.camera=new cf(t.camera||{})}destroy(){this.controller&&this.controller.destroy(),this.camera&&this.camera.destroy(),this.scene&&this.scene.destroy(),this.scenes.forEach(t=>t.destroy()),this.scenes.length=0}bindScene(t){this.scenes.push(t),this.reset(),this.scene=t,t.isStatic}saveCameraPosition(t){gs.copy(this.camera.boundingBoxWorld);const e=t?vr+t:vr;sessionStorage.setItem(e,JSON.stringify(gs))}clearCameraPosition(t){const e=t?vr+t:vr;sessionStorage.setItem(e,"")}restoreCameraPosition(t){const e=t?vr+t:vr,i=sessionStorage.getItem(e);i&&(gs.copy(JSON.parse(i)),this.resetCameraByBoundingBox(gs,!0))}fullscreen(t=10,e=!1){this.scene&&(this.scene.boundingBox.isEmpty()&&this.scene.computeBoundingBox(),gs.copy(this.scene.boundingBox).expandByVector(du.set(t,t)),console.log("View.fullscreen: ",this.scene.name,this.scene.boundingBox.isEmpty(),this.scene.boundingBox.round().toString()),this.resetCameraByBoundingBox(gs,e))}handleCameraChanged(t){console.warn("handleCameraChanged: ",t.target.camera.position.z,t.target.camera.scaled.x)}reset(){}async resetCameraByBoundingBox(t,e=!1){if(!this.camera)return;if(!t||t.isEmpty())throw new Error("BoundingBox empty");if(!e)return this.camera.setByBox(t),Promise.resolve();const i=this.camera.getCameraPosition();t.getCenter(du),t.getSize(hl);const a=Math.max(hl.x/this.camera.width,hl.y/this.camera.height),u={x:du.x,y:du.y,z:0,s:a,r:0};await this.animateCamera(i,u)}async animateCamera(t,e){return this.controller&&(this.controller.enabled=!1),this.tween&&this.tween.stop(),new Promise(i=>{this.tween=new pu.Tween(t).to(e,this.animateDuration).easing(pu.Easing.Exponential.Out).onUpdate(a=>{this.camera.position.set(a.x,a.y),this.camera.scaled.set(a.s,a.s),this.camera.rotation.set(a.r,a.r),this.camera.update()}).onComplete(()=>{this.controller&&(this.controller.enabled=!0),i()}).start()})}computeBoundingBox(t,e=new Ot){return!t||!t.length||(e.makeEmpty(),t.forEach(i=>e.union(i.computeBoundingBox()))),e}expandScenesBoundingBox(t,e=new Ot){t.forEach(i=>i.boundingBox.union(e))}update(t){this.tween&&this.tween.update(t)}}const vr="camera_position_",du=new F,hl=new F,gs=new Ot;class Cm extends dr{name="SvgView";params;container;offset=new F;camera;controller;scene;p1=new F;p2=new F;graph;multiSelector;dummiesController;zoomToSelectEnable=!1;zoomBox=new Ot;selectEnable=!1;multiSelectEnable=!1;tween;animateDuration;label;controllerPanStartHandler=this.handlePanStart.bind(this);controllerPanEndHandler=this.handlePanEnd.bind(this);controllerWheelStartHandler=this.handlePanStart.bind(this);controllerWheelEndHandler=this.handlePanEnd.bind(this);controllerPanMoveHandler=this.handleControllerPanMove.bind(this);controllerPointerOverHandler=this.handleControllerPointerOver.bind(this);multiSelectorSelectedHandler=this.handleMultiSelectorSelected.bind(this);_currentAssetId;constructor(t={}){super(),this.params=t,this.params.zoomToSelectEnable&&(this.zoomToSelectEnable=!0),this.params.selectEnable&&(this.selectEnable=!0),this.params.multiSelectEnable&&(this.multiSelectEnable=!0),this.params.camera||(this.params.camera={}),this.params.camera.flipY=!0,this.animateDuration=this.params.animateDuration||300,this.camera=new cf(this.params.camera),this.container=this.params.containerId?document.getElementById(this.params.containerId):Pt.window.document.getElementsByTagName("body")[0];let e=this.container.getBoundingClientRect();this.offset.set(e.left,e.top),this.controller=new hf(this.container,this.camera,!0),this.graph=new ff(this.container),this.multiSelector=new D2(this.container,this.controller),this.dummiesController=new ym(this.container,this.controller),this.bindControllerEvents(),this.initLabel()}destroy(){var t;this.unbindControllerEvents(),super.destroy(),(t=this.label)==null||t.destroy()}initLabel(){this.label=new al(this.container,"")}showAssetsLabel(t,e,i){var u,l,c,f,d;if(!e)return;t||(t=(u=this.scene)==null?void 0:u.assetType);const a=(l=this.scene)==null?void 0:l.chef.getElementBoundingBox(e);a&&!a.isEmpty()&&(i||(i=(c=this.scene)==null?void 0:c.getAssetLabelById(t,e),i||(i=e)),(f=this.label)==null||f.setHtml(i),Sn.copy(a.min).applyMatrix3(this.camera.viewMatrix).add(this.offset).round(),(d=this.label)==null||d.show(Sn))}async hideAssetsLabel(){var t;return(t=this.label)==null?void 0:t.hide()}bindScene(t){var e;this.scene=t,this.multiSelector.bindScene(this.scene),(e=this.dummiesController)==null||e.bindScene(this.scene)}resize(){var t,e;(t=this.camera)==null||t.resize(),(e=this.controller)==null||e.resize(),console.log("【svgView】resize: ",this.params.width,this.params.height)}async setByBox(t,e=!0){await this.resetCameraByBoundingBox(t,e)}zoomIn(){this.controller.scaled=this.camera.scaled.x*.9,this.controller.update()}zoomOut(){this.controller.scaled=this.camera.scaled.x*1.1,this.controller.update()}zoomToSelectEnableChanged(t){console.log("TODO: zoomToSelectEnableChanged: ",t),this.zoomToSelectEnable=t,this.controller.enablePan=!this.zoomToSelectEnable}selectEnableChanged(t){this.selectEnable=!!t,this.multiSelector.selectEnableChanged(t)}multiSelectEnableChanged(t){this.multiSelectEnable=!!t,this.multiSelector.multiSelectEnableChanged(t)}getIntersectObjects(t,e,i=[]){return this.scene?this.scene.getIntersectObjects(t,e,i):i}async focusAt(t,e=500){return this.camera?(Yt.setFromCenterAndSize(t,Sn.set(e*2,e*2)),this.resetCameraByBoundingBox(Yt,!0)):Promise.resolve()}async focusAtById(t,e=500){var a;const i=(a=this.scene)==null?void 0:a.getBoundingBoxById(t);if(console.log("focusAtById: ",t,i==null?void 0:i.toString()),i){i.expandByScalar(e),Yt.copy(this.camera.boundingBoxWorld),Yt.containsBox(i)||await this.resetCameraByBoundingBox(i,!0);return}}async focusAtDummy(t,e=500){var u,l;const i=this.dummiesController.getDummyById(t),a=(u=i==null?void 0:i.userData)==null?void 0:u.rmId;if(a){const c=(l=this.scene)==null?void 0:l.getBoundingBoxById(a);if(c){c.expandByScalar(e),Yt.copy(this.camera.boundingBoxWorld),Yt.containsBox(c)||await this.resetCameraByBoundingBox(c,!0);return}}if(i!=null&&i.position&&!(i!=null&&i.position.isEmpty())){Yt.setFromCenterAndSize(i.worldPosition,Sn.set(e*2,e*2)),this.camera.boundingBoxWorld.containsBox(Yt)||await this.resetCameraByBoundingBox(Yt,!0);return}}async resetCameraByBoundingBox(t,e=!1){if(!this.camera)return Promise.resolve();if(!t||t.isEmpty())throw new Error("BoundingBox empty");if(!e)return this.camera.setByBox(t),Promise.resolve();const i=this.camera.getCameraPosition();t.getCenter(Sn),t.getSize(cl);const a=Math.max(cl.x/this.camera.width,cl.y/this.camera.height),u={x:Sn.x,y:Sn.y,z:0,s:a,r:0};await this.animateCamera(i,u)}async animateCamera(t,e){return this.controller&&(this.controller.enabled=!1),this.tween&&this.tween.stop(),new Promise(i=>{this.tween=new pu.Tween(t).to(e,this.animateDuration).easing(pu.Easing.Exponential.Out).onUpdate(a=>{this.camera.position.set(a.x,a.y),this.camera.scaled.set(a.s,a.s),this.camera.rotation.set(a.r,a.r),this.camera.update()}).onComplete(()=>{this.controller&&(this.controller.enabled=!0),i()}).start()})}fullscreen(){this.scene&&(this.scene&&!this.scene.viewBox.isEmpty()?Yt.copy(this.scene.viewBox):(this.scene.updateMatrixWorld(!0),this.scene.computeBoundingBox(),Yt.copy(this.scene.boundingBox)),this.resetCameraByBoundingBox(Yt,!0))}saveCameraPosition(t){Yt.copy(this.camera.boundingBoxWorld);const e=t?vr+t:vr;sessionStorage.setItem(e,JSON.stringify(Yt))}restoreCameraPosition(t){const e=t?vr+t:vr,i=sessionStorage.getItem(e);if(!i)return this.fullscreen();Yt.copy(JSON.parse(i)),this.resetCameraByBoundingBox(Yt,!0)}clearCameraPosition(t){const e=t?vr+t:vr;sessionStorage.setItem(e,"")}bindControllerEvents(){this.controller.addEventListener(_t.PAN_START,this.controllerPanStartHandler),this.controller.addEventListener(_t.PAN_END,this.controllerPanEndHandler),this.controller.addEventListener(_t.WHEEL_START,this.controllerWheelStartHandler),this.controller.addEventListener(_t.WHEEL_END,this.controllerWheelEndHandler),this.controller.addEventListener(_t.PAN_MOVE,this.controllerPanMoveHandler),this.controller.addEventListener(_t.POINTEROVER,this.controllerPointerOverHandler),this.multiSelector.addEventListener(Wo.SELECTED,this.multiSelectorSelectedHandler)}unbindControllerEvents(){this.controller.removeEventListener(_t.PAN_START,this.controllerPanStartHandler),this.controller.removeEventListener(_t.PAN_END,this.controllerPanEndHandler),this.controller.removeEventListener(_t.WHEEL_START,this.controllerWheelStartHandler),this.controller.removeEventListener(_t.WHEEL_END,this.controllerWheelEndHandler),this.controller.removeEventListener(_t.PAN_MOVE,this.controllerPanMoveHandler),this.controller.removeEventListener(_t.POINTEROVER,this.controllerPointerOverHandler),this.multiSelector.removeEventListener(Wo.SELECTED,this.multiSelectorSelectedHandler)}handlePanStart(t){if(!((t==null?void 0:t.type)!==_t.PAN_START&&(t==null?void 0:t.type)!==_t.WHEEL_START)&&this.zoomToSelectEnable){this.p1.copy(t.data.screenCoords),Yt.makeEmpty().expandByPoint(this.p1),this.graph.draw(Yt);return}}handlePanEnd(t){if(!((t==null?void 0:t.type)!==_t.PAN_END&&(t==null?void 0:t.type)!==_t.WHEEL_END)&&this.zoomToSelectEnable){this.p2.copy(t.data.screenCoords),Yt.makeEmpty().expandByPoint(this.p1).expandByPoint(this.p2).unproject(this.controller.camera),this.setByBox(Yt),this.graph.hide(),Yt.makeEmpty();return}}handleControllerPanMove(t){(t==null?void 0:t.type)===_t.PAN_MOVE&&this.zoomToSelectEnable&&(this.p2.copy(t.data.screenCoords),Yt.makeEmpty().expandByPoint(this.p1).expandByPoint(this.p2),this.graph.draw(Yt))}handleControllerPointerOver(t){var a,u,l,c,f;const e=((a=t==null?void 0:t.e)==null?void 0:a.target)||((l=(u=t==null?void 0:t.e)==null?void 0:u.srcEvent)==null?void 0:l.target);let i=e==null?void 0:e.id;(i==null?void 0:i.indexOf("dummy"))>-1?(i=e.getAttribute(ss+"-id"),i&&this._currentAssetId!==i&&this.dispatchEvent({type:"POINTEROVER",data:{id:i,assetType:"dummy"},e:t.e})):i&&((c=this.scene)!=null&&c.isBelongsToAssetType(i,er.WS))?this._currentAssetId!==i&&this.dispatchEvent({type:"POINTEROVER",data:{id:i,assetType:er.WS},e:t.e}):i&&((f=this.scene)!=null&&f.isBelongsToAssetType(i,er.RM))?this._currentAssetId!==i&&this.dispatchEvent({type:"POINTEROVER",data:{id:i,assetType:er.RM},e:t.e}):(this._currentAssetId=void 0,this.dispatchEvent({type:"POINTERLEAVE",e:t.e})),this._currentAssetId=i}handleMultiSelectorSelected(t){console.warn("handleMultiSelectorSelected:",t.data),this.dispatchEvent({type:"SELECTED",data:t.data})}setDummies(t){this.dummiesController.setDummiesByVos(t)}clearDummies(t){this.dummiesController.clearDummies(t)}update(t){this.tween&&this.tween.update(t)}}const Yt=new Ot,Sn=new F,cl=new F;var On=(r=>(r.SELECTED="SELECTED",r.POINTEROVER="POINTEROVER",r.POINTERLEAVE="POINTERLEAVE",r))(On||{});class Dm extends dr{name="SvgApp";params;renderer;view;scene;loadingScene;mainScene;zoomToSelectEnable=!1;zoomBox=new Ot;selectEnable=!1;multiSelectEnable=!1;runningHandler=this.running.bind(this);pointerOverHandler=this.handlePointerOver.bind(this);pointerLeaveHandler=this.handlePointerLeave.bind(this);multiSelectorSelectedHandler=this.handleMultiSelectorSelected.bind(this);dragEndHandler=this.handleDragEnd.bind(this);constructor(t={}){super(),this.params=t,this.params.zoomToSelectEnable&&(this.zoomToSelectEnable=!0),this.params.selectEnable&&(this.selectEnable=!0),this.params.multiSelectEnable&&(this.multiSelectEnable=!0),this.params.defaultFill||(this.params.defaultFill=qt.getMoreTransparent(zt.white,.3)),this.params.defaultStroke||(this.params.defaultStroke=qt.getMoreTransparent(zt.darkWhite,.8)),this.params.infoFill||(this.params.infoFill=qt.getMoreTransparent(zt.gray,.3)),this.params.infoStroke||(this.params.infoStroke=qt.getMoreTransparent(zt.darkGray,.8)),this.params.primaryFill||(this.params.primaryFill=qt.getMoreTransparent(zt.blue,.3)),this.params.primaryStroke||(this.params.primaryStroke=qt.getMoreTransparent(zt.darkBlue,.8)),this.params.successFill||(this.params.successFill=qt.getMoreTransparent(zt.green,.3)),this.params.successStroke||(this.params.successStroke=qt.getMoreTransparent(zt.darkGreen,.8)),this.params.warningFill||(this.params.warningFill=qt.getMoreTransparent(zt.yellow,.3)),this.params.warningStroke||(this.params.warningStroke=qt.getMoreTransparent(zt.darkYellow,.8)),this.params.dangerFill||(this.params.dangerFill=qt.getMoreTransparent(zt.red,.3)),this.params.dangerStroke||(this.params.dangerStroke=qt.getMoreTransparent(zt.darkRed,.8)),this.params.activeFill||(this.params.activeFill=qt.getMoreTransparent(zt.brown,.3)),this.params.activeStroke||(this.params.activeStroke=qt.getMoreTransparent(zt.darkBrown,.8)),this.renderer=new x0(t),this.view=new Cm(t),this.trans2LoadingScene()}get isLoadingScene(){var t;return((t=this.scene)==null?void 0:t.name)==="SvgLoadingScene"}destroy(){var t,e;this.unbindAssetsEvents(),super.destroy(),(t=this.view)==null||t.destroy(),(e=this.renderer)==null||e.destroy()}resize(){var t,e;(t=this.renderer)==null||t.resize(),(e=this.view)==null||e.resize()}isScene(t){var e;return((e=this.scene)==null?void 0:e.uuid)===t.uuid}removeScene(t){this.scene=void 0,t==null||t.destroy()}trans2MainScene(){var t,e;(t=this.scene)==null||t.unmount(),this.scene=this.mainScene,this.scene.isMounted||this.scene.mount(),this.view.bindScene(this.scene),(e=this.loadingScene)==null||e.destroy()}trans2LoadingScene(){var e,i;console.log("trans2LoadingScene: ",this.params),this.loadingScene=new _2(this.params),(e=this.scene)==null||e.unmount(),this.scene=this.loadingScene,this.scene.isMounted||this.scene.mount();const t=new Ot().copy(this.loadingScene.viewBox).expandByVector(new F(1,1).multiplyScalar(100));console.log("trans2LoadingScene: ",t.toString()),this.view.setByBox(t,!1),(i=this.mainScene)==null||i.destroy()}start(){requestAnimationFrame(this.runningHandler)}running(t){this.scene&&(this.scene.update(),this.renderer.render(this.scene,this.view.camera),this.view.update(t),requestAnimationFrame(this.runningHandler))}async load(t,e,i=2,a){this.isLoadingScene||this.trans2LoadingScene(),await Ac(this.params.syncDelay);const u=await new Rc().loadAsync(t);return this.loadByString(u,e,i)}loadByString(t,e,i=2){this.mainScene=new uf(this.params),this.mainScene.bind(t),this.view.setByBox(this.mainScene.viewBox);const a=this.mainScene.getLayers(i);return e!=null&&e.length||(e=St.map(a,"label")),this.mainScene.showDefaultLayers(e,!0),this.trans2MainScene(),this.bindAssetsEvents(),console.log("svgApp.loadByString: ",a),a}setSkeletons(t){var e;(e=this.scene)==null||e.setSkeletonLayers(t)}getLayers(t=2){var e;return(e=this.scene)==null?void 0:e.getLayers(t)}updateLayersVisibility(t,e=!1){var i;(i=this.scene)==null||i.updateLayersVisibility(t,e)}selectByIds(t){var e;(e=this.scene)==null||e.selectByIds(t,this.multiSelectEnable)}clearSelectedByIds(t){var e;Array.isArray(t)?t.forEach(i=>{var a;return(a=this.scene)==null?void 0:a.clearSelectedById(i)}):(e=this.scene)==null||e.clearSelectedById(t)}clearSelected(){var t;(t=this.scene)==null||t.clearSelected()}getSelectedIds(){var t;return(t=this.scene)==null?void 0:t.getSelectedIds()}async targetByIds(t){var e;this.scene&&((e=this.scene)==null||e.selectByIds(t,!1),fl.copy(this.scene.getSelectedBoundingBox()).expandByVector(new F(1,1).multiplyScalar(100)),await Ac(100),fl.isEmpty()||await this.view.setByBox(fl))}linkAssetsByTree(t){var e;(e=this.scene)==null||e.linkAssetsByTree(t)}setViewAreaLimit(t){this.renderer.viewAreaLimit=t}setAssetType(t,e){var i;(i=this.scene)==null||i.setAssetType(t,e)}getAssetIdsByType(t){var e;return(e=this.scene)==null?void 0:e.getAssetIdsByType(t)}clearFill(){var t;(t=this.scene)==null||t.clearFillOrStroke("fill")}clearFillByIds(t){var e;(e=this.scene)==null||e.clearFillOrStrokeByIds(t,"fill")}setFillByIds(t,e){var i;(i=this.scene)==null||i.setFillOrStrokeByIds(t,e,"fill")}clearStroke(){var t;(t=this.scene)==null||t.clearFillOrStroke("stroke")}clearStrokeByIds(t){var e;(e=this.scene)==null||e.clearFillOrStrokeByIds(t,"stroke")}setStrokeByIds(t,e){var i;(i=this.scene)==null||i.setFillOrStrokeByIds(t,e,"stroke")}getLegend(){var t;return(t=this.scene)==null?void 0:t.getLegend()}setAssetLabels(t,e){var i;(i=this.scene)==null||i.setAssetLabels(t,e)}clearAssetLabels(){var t;(t=this.scene)==null||t.clearAssetLabels()}fullscreen(){this.view.fullscreen()}saveCameraPosition(t){this.view.saveCameraPosition(t)}restoreCameraPosition(t){this.view.restoreCameraPosition(t)}clearCameraPosition(t){this.view.clearCameraPosition(t)}zoomIn(){this.view.zoomIn()}zoomOut(){this.view.zoomOut()}focusAt(t,e=1e3){var i;(i=this.view)==null||i.focusAt(t,e)}async focusAtById(t,e=1e3){var i;return(i=this.view)==null?void 0:i.focusAtById(t,e)}async focusAtDummy(t,e=1e3){var i;return(i=this.view)==null?void 0:i.focusAtDummy(t,e)}showAssetsLabel(t,e,i){var a,u,l,c;e?t==="dummy"?(l=(u=(a=this.view)==null?void 0:a.dummiesController)==null?void 0:u.dummies)==null||l.showDummyLabel(e):(c=this.view)==null||c.showAssetsLabel(t,e,i):this.hideAssetsLabel()}hideAssetsLabel(){var t,e,i,a;(i=(e=(t=this.view)==null?void 0:t.dummiesController)==null?void 0:e.dummies)==null||i.hideDummyLabel(),(a=this.view)==null||a.hideAssetsLabel()}highlightAssets(t,e){var i;(i=this.scene)==null||i.highlightAssets(t,e)}resetHighlightAssets(t){var e;(e=this.scene)==null||e.resetHighlightAssets(t)}fontZoomIn(){var t;(t=this.scene)==null||t.chef.fontZoom("asset-labels",1.1)}fontZoomOut(){var t;(t=this.scene)==null||t.chef.fontZoom("asset-labels",.9)}zoomToSelectEnableChanged(t){this.view.zoomToSelectEnableChanged(t)}selectEnableChanged(t){this.selectEnable=!!t,this.view.selectEnableChanged(t)}multiSelectEnableChanged(t){this.multiSelectEnable=!!t,this.view.multiSelectEnableChanged(t)}socialDistanceEnableChanged(t){var e;(e=this.scene)==null||e.socialDistanceEnableChanged(t)}getBoundingBoxById(t,e=!0){var a;if(!t)return;const i=(a=this.scene)==null?void 0:a.getBoundingBoxById(t);return i&&e&&i.applyMatrix3(this.view.camera.viewMatrix).round(),i}setDummies(t){var e;(e=this.view)==null||e.setDummies(t)}clearDummies(t){var e;(e=this.view)==null||e.clearDummies(t)}highlightDummies(t){var e,i;(i=(e=this.view)==null?void 0:e.dummiesController)==null||i.highlightDummies(t)}resetHighlightDummies(){var t,e;(e=(t=this.view)==null?void 0:t.dummiesController)==null||e.resetHighlightDummies()}bindAssetsEvents(){var t,e;this.view.addEventListener(On.POINTEROVER,this.pointerOverHandler),this.view.addEventListener(On.POINTERLEAVE,this.pointerLeaveHandler),this.view.addEventListener(On.SELECTED,this.multiSelectorSelectedHandler),(e=(t=this.view)==null?void 0:t.dummiesController)==null||e.addEventListener("panend",this.dragEndHandler)}unbindAssetsEvents(){var t,e;this.view.removeEventListener(On.POINTEROVER,this.pointerOverHandler),this.view.removeEventListener(On.POINTERLEAVE,this.pointerLeaveHandler),this.view.removeEventListener(On.SELECTED,this.multiSelectorSelectedHandler),(e=(t=this.view)==null?void 0:t.dummiesController)==null||e.removeEventListener("panend",this.dragEndHandler)}handleMultiSelectorSelected(t){this.dispatchEvent({type:"SELECTED",data:t.data})}handlePointerOver(t){this.dispatchEvent({type:"pointerover",data:t.data,e:t.e})}handlePointerLeave(t){this.dispatchEvent({type:"pointerleave",data:t.data,e:t.e})}handleInitializeStart(){console.log("App.initializeStart ...")}async handleInitializeComplete(t){console.log("App.initializeComplete ...",t),t!=null&&t.data&&this.launch()}handleDragEnd(t){this.dispatchEvent(t)}launch(){console.log("App.launch ...")}}const fl=new Ot;var ep=(r=>(r.SELECTED="SELECTED",r.POINTEROVER="pointerover",r.POINTERLEAVE="pointerleave",r.DRAG_END="panend",r))(ep||{});class Ki{static cached=new Map;static cachedCanvas=new Map;static destroy(){this.cached.clear(),this.cachedCanvas.clear()}static createCanvas(t){var a;if(!((a=Pt.window)!=null&&a.document))throw new Error("environment not support");let e;t.containerId&&(e=Pt.window.document.getElementById(t.containerId)),e||(e=Pt.window.document.getElementsByTagName("body")[0]);let i;if(t.canvasId&&(i=Pt.window.document.getElementById(t.canvasId)||void 0),t.width||(t.width=(e==null?void 0:e.offsetWidth)||100),t.height||(t.height=(e==null?void 0:e.offsetHeight)||100),t.dpr||(t.dpr=Pt.dpr),i)this.resizeCanvas(i,t.width,t.height,t.dpr);else{if(i=this.createHtmlCanvas(t.width,t.height,t.dpr),!i)throw new Error("error environment");t.canvasId&&i.setAttribute("id",t.canvasId),e==null||e.appendChild(i)}return i.style.background=t.background||"transparent",i}static getContext2D(t,e={}){const i={alpha:!0,willReadFrequently:!!e.willReadFrequently},a=t.getContext("2d",i);if(!a)throw new Error("getContext2D error");return a.scale(e.dpr||1,e.dpr||1),a}static resizeCanvas(t,e,i,a=1){t instanceof OffscreenCanvas?(t.width=e,t.height=i):t instanceof HTMLCanvasElement&&(t.setAttribute("width",(e*a).toString()),t.setAttribute("height",(i*a).toString()),t.style.width=e+"px",t.style.height=i+"px",t.style.padding="0",t.style.margin="0",t.style.border="0",t.style.imageRendering="pixelated",t.style.transform="translateZ(0)")}static async getImageBitmapByCanvasAsync(t){if(t)return t instanceof OffscreenCanvas?t.transferToImageBitmap():t instanceof HTMLCanvasElement?await createImageBitmap(t):void 0}static get(t,e,i,a=1){let u=this.cached.get(t);return u||(u=this.create(e,i,a),this.set(t,u)),this.resizeCanvas(u,e,i,a),u}static set(t,e){if(!t||!e)throw new Error("error input");return this.cached.set(t,e)}static remove(t){this.cached.has(t)&&this.cached.delete(t)}static create(t,e,i=1){var a;if((a=Pt.window)!=null&&a.OffscreenCanvas)return new OffscreenCanvas(t,e);throw new Error("environment does not support")}static createHtmlCanvas(t,e,i=1){if(!Pt.window.document)throw new Error("environment does not support");const a=Pt.window.document.createElement("canvas");return this.resizeCanvas(a,t,e,i),a}static measureText(t,e,i=new F){if(!t)throw new Error("input error");const u=this.get("measureText",1,1).getContext("2d");if(!u)throw new Error("bufferCtx not found");e.render(u);const l=u.measureText(t);if(!l)throw new Error("measureText error");const c=l.actualBoundingBoxRight+l.actualBoundingBoxLeft,f=l.actualBoundingBoxAscent+l.actualBoundingBoxDescent;return i.set(c,f),i}}class Sm extends _m{name="OpeView";constructor(t={}){super(t),this.initController(this.camera)}destroy(){this.controller&&this.controller.destroy(),super.destroy()}initController(t){let e=this.params.cvs;!e&&this.params.canvasId&&(e=document.getElementById(this.params.canvasId)),!(!this.params.controls||!t||!e)&&(this.controller&&this.controller.destroy(),this.controller=new hf(e,t))}handleCameraChanged(t){console.warn("handleCameraChanged: ",t.target.camera.position.z,t.target.camera.scaled.x)}}var xr=(r=>(r.INIT="init",r.LOAD="load",r.LOADED="loaded",r.GET_LAYERS="getLayers",r.TERMINATE="terminate",r.CAMERA_SYNC="cameraSync",r.USED_CACHE_CHANGED="usedCacheChanged",r.WIREFRAME_CHANGED="wireframeChanged",r.CAMERA_CHANGED="cameraChanged",r.SCENES_CHANGED="scenesChanged",r.UPDATE_LAYERS_VISIBILITY="updateLayersVisibility",r))(xr||{});function rp(r){return!!(r&&r.constructor&&r.call&&r.apply)}const Om="children",Nm="get",Mm="set",pl="Changed";class Bm extends dr{name="Node2";userData={};_cache=new Map;_attachedDepsListeners=new Map;constructor(t){super(),this.setAttrs(t)}destroy(){super.destroy(),this._clearCache()}setAttrs(t){if(!t)return this;let e;for(const i in t)i!==Om&&(e=Mm+i,rp(this[e])?this[e](t[i]):this.setAttr(i,t[i]));return this}setAttr(t,e){Object.hasOwnProperty.call(this,t)&&(this.userData[t]=e,this[t]=e)}getAttrs(){return this.userData||{}}getAttr(t){const e=Nm+St.capitalize(t);return rp(this[e])?this[e]():this.userData[t]}getAttrKey(){return Object.values(this.userData).filter(t=>!(t instanceof Array||t instanceof Object)).join("_")}_getCache(t,e){let i=this._cache.get(t);return(i===void 0||i.dirty===!0)&&(i=e.call(this),this._cache.set(t,i)),i}_clearCache(t){t===void 0?this._cache.clear():this._cache.has(t)&&this._cache.get(t).isMatrix3?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_setProperty(t){Object.hasOwnProperty.call(this,t)&&delete this[t],Object.defineProperty(this,t,{get(){return this.userData[t]},set(e){const i=this.userData[t];this.userData[t]=e,i!==e&&this.dispatchEvent({type:t+pl,data:{oldVal:i,newVal:e}})},enumerable:!0,configurable:!0})}computed(t,e,i){if(!this._attachedDepsListeners.get(t)){const a=e.map(u=>u+pl).join(",");this.addEventListeners(a,()=>this._clearCache(t)),e.forEach(u=>this._setProperty(u)),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,i)}watch(t,e){(t||[]).forEach(i=>{this._setProperty(i),this.addEventListener(i+pl,e)})}}const Wr=new F;class Im extends Bm{isTexture=!0;isRenderTargetTexture=!1;type="Texture";name="Texture";uuid=Oc();originSize=new F;originCenter=new F;size=new F;matrix=new ie;matrixAutoUpdate=!0;userData={};version=0;_needsUpdate=!1;image;offset=new F;repeat=new F(1,1);center=new F;rotate=0;scale=1;flipY=!0;constructor(t={}){super(t),this.setAttrs(t)}destroy(){super.destroy()}set needsUpdate(t){t&&(this.version++,this._needsUpdate=!0)}get needsUpdate(){return this._needsUpdate}updateSize(t,e,i,a){return this.originSize.copy(t),this.originCenter.copy(e),this.flipY&&this.originCenter.multiplyScalar(1,-1),this.updateFinalSize(i,a)}updateFinalSize(t,e){t&&!F.isZero(t)&&!F.isEmpty(t)?Wr.copy(t):Wr.copy(this.originSize),Wr.maxXY(1,1);const i=Math.sqrt(Wr.x*Wr.x+Wr.y*Wr.y)/Math.sqrt(e.x*e.x+e.y*e.y);return i>1&&Wr.multiplyScalar(1/i),this.scale=Wr.length()/this.originSize.length(),this.repeat.multiplyScalar(this.originSize.length()/Wr.length()),this.size.copy(Wr),this.offset.copy(this.originSize).multiplyScalar(-.5).add(this.originCenter),this.updateMatrix(),this}reset(t,e){t&&this.originSize.copy(t),e&&this.size.copy(e),this.scale=this.size.x/this.originSize.x,this.repeat.set(1,1),this.center.set(0,0),this.rotate=0,this.offset.copy(this.originSize).multiplyScalar(.5).sub(this.originCenter).multiplyScalar(this.scale),this.updateMatrix()}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotate,this.center.x,this.center.y)}clone(){const t=this.constructor;return new t(this.attrs).copy(this)}copy(t){return this.name=t.name,this.originSize.copy(t.originSize),this.originCenter.copy(t.originCenter),this.size.copy(t.size),this.matrix.copy(t.matrix),this.matrixAutoUpdate=t.matrixAutoUpdate,this.userData=JSON.parse(JSON.stringify(t.userData)),this.image=t.image,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotate=t.rotate,this.scale=t.scale,this.flipY=t.flipY,this}}class ji{static cached=new Map;static precisionOptimized=!0;static precisionOptimizeLevels=[.5,.25,1e-4];static initialized=!1;static textureMaxSize=new F;static DEBUG_DisplayCachedTexture=St.throttle((t=80,e=.8)=>{let i=Lm();if(i||(i=Pm(t,e)),!i)throw new Error("dom not found");Fm(i,this.cached)},5e3);static destroy(){Object.values(this.cached).forEach(t=>{t.destroy()}),this.cached=new Map}static has(t){return this.cached.has(t)}static get(t,e){if(t)return!this.precisionOptimized||!e?this.cached.get(t):e&&e<this.precisionOptimizeLevels[2]?this.get(t+"_3"):e&&e<this.precisionOptimizeLevels[1]?this.get(t+"_2"):e&&e<this.precisionOptimizeLevels[0]?this.get(t+"_1"):this.get(t)}static set(t,e){if(!t||!e)throw new Error("error input");return this.cached.set(t,e),e}static remove(t){if(!t||!this.cached.has(t))return;const e=this.cached.get(t);if(e&&e.destroy(),this.cached.delete(t),this.precisionOptimized)for(let i=1,a=this.precisionOptimizeLevels.length;i<=a;i++){const u=t+"_"+i;let l;this.cached.has(u)&&(l=this.cached.get(u),l&&l.destroy(),this.cached.delete(u))}}static clear(){this.destroy()}static setTextureMaxSize(){this.initialized||(this.textureMaxSize.set(Pt.config.width,Pt.config.height).multiplyScalar(.5).round(),this.initialized=!0)}static getTextureMaxSize(){return this.initialized||this.setTextureMaxSize(),this.textureMaxSize}static getTextureByShape(t,e,i,a){var l;const u=new Im;if(this.setTextureMaxSize(),u.scale=1,u.repeat.set(1,1),u.rotate=0,u.image=void 0,u.version=0,e&&!F.isZero(e)&&!F.isEmpty(e))ya.copy(e),t.alignCenter?t.boundingBox.getCenter(ma):ma.set(0,0);else{if(t.isShape&&((l=t.geometry)!=null&&l.boundingBox))yu.copy(t.geometry.boundingBox);else if(t.isGroup&&t.boundingBox)yu.copy(t.boundingBox);else throw new Error("get boundingBox error");yu.getSize(ya),t.alignCenter?t.boundingBox.getCenter(ma):yu.getCenter(ma)}return i&&!F.isZero(i)&&!F.isEmpty(i)?Ti.copy(i):Ti.copy(ya),(Ti.x<ip.x||Ti.y<ip.y)&&Ti.normalize().multiplyScalar(10).round(),si.copy(this.getTextureMaxSize()),a&&(va.set((a==null?void 0:a.shadowBlur)||0,(a==null?void 0:a.shadowBlur)||0),Ti.add(va.clone().multiplyScalar(2)),ya.multiplyScalar(3),si.multiplyScalar(.3)),u.updateSize(ya,ma,Ti,si),u}static setPrecisionOptimizeTextures(t,e,i,a,u){if(!this.precisionOptimized)return;let l;for(let c=0,f=this.precisionOptimizeLevels.length;c<f;c++){si.copy(i.size).multiplyScalar(this.precisionOptimizeLevels[c]);const d=this.getTextureByShape(e,a,si,u);this.renderShapeTexture(e,d,u),l=t+"_"+(c+1),d.userData.textureKey=l,ji.set(l,d)}}static renderShapeTexture(t,e,i){i?(va.set(i.shadowBlur||0,i.shadowBlur||0),ni.copy(e.originSize).multiplyScalar(-.5).sub(e.originCenter).multiplyScalar(e.scale),t.alignCenter?gu.copy(e.originSize).multiplyScalar(e.scale):gu.copy(e.originSize).add(va.clone().multiplyScalar(1)).multiplyScalar(e.scale)):ni.copy(e.offset).negate().multiplyScalar(e.scale);const a=Ki.create(e.size.x,e.size.y),u=Ki.getContext2D(a,{alpha:!0});if(t.isText||!t.matrix.hasChange())u.clearRect(0,0,a.width,a.height),u.translate(ni.x,ni.y),u.scale(e.scale,-e.scale);else{t.matrix.decompose(np,Rm,sp);const l=1/sp.x;ni.sub(np.multiplyScalar(l,-l)),u.clearRect(0,0,a.width,a.height),u.translate(ni.x,ni.y),u.scale(l,-l)}i&&(u.shadowColor=zt.black,u.shadowOffsetX=gu.x,u.shadowOffsetY=gu.y,u.shadowBlur=va.x),t.render(u),e.image=a}static setByShape(t,e,i,a){const u=this.getTextureByShape(e,i,a);return u.userData.textureKey=t,this.renderShapeTexture(e,u),ji.set(t,u),e.featureKey=t,u}static setShadowByShape(t,e,i){const a=this.getTextureByShape(e,void 0,void 0,i);return a.userData.textureKey=t,this.renderShapeTexture(e,a,i),ji.set(t,a),a}static setPointsByShape(t,e){var d,g,E,T,C;const i=[];e.isGroup?e.traverse(L=>L.isShape?i.push(...L.geometry.points):void 0):e.isShape&&e.geometry.points?i.push(...e.geometry.points):e.boundingBox&&i.push(e.boundingBox.min,e.boundingBox.max);const a=this.getTextureByShape(e),u=((d=e.material)==null?void 0:d.lineWidth)*2||3;_i.set(1,1).multiplyScalar(u),a.size.copy(_i).multiplyScalar(a.scale).multiplyScalar(2).add(Ti),a.offset.sub(_i),a.updateMatrix();const l=Ki.create(a.size.x,a.size.y),c=Ki.getContext2D(l,{alpha:!0});ni.subVectors(a.originSize.clone().multiplyScalar(.5),a.originCenter).add(_i),c.clearRect(0,0,l.width,l.height),c.scale(a.scale,a.scale),c.translate(ni.x,ni.y);let f=zt.black;e.material?f=((g=e.material)==null?void 0:g.stroke)||((E=e.material)==null?void 0:E.fill):e.isGroup&&e.children.length&&e.children[0].isShape&&(f=((T=e.children[0].material)==null?void 0:T.stroke)||((C=e.children[0].material)==null?void 0:C.fill)),c.fillStyle=qt.getDarken(f);for(let L=0,N=i.length||0;L<N;L++)si.copy(i[L]),c.moveTo(si.x,si.y),c.arc(si.x,si.y,_i.x,0,Math.PI*2);return c.fill(),a.image=l,ji.set(t,a),a}static setWireframeByShape(t,e){var c;const i=this.getTextureByShape(e);_i.set(1,1).multiplyScalar(((c=e.mat)==null?void 0:c.lineWidth)||1),i.size.copy(_i).multiplyScalar(i.scale).multiplyScalar(2).add(Ti),i.offset.sub(_i),i.updateMatrix();const a=Ki.create(i.size.x,i.size.y),u=Ki.getContext2D(a,{alpha:!0}),l=_i.x*i.scale*5;return u.clearRect(0,0,a.width,a.height),u.strokeStyle=zt.darkGray,u.lineWidth=l,u.setLineDash([l*3,l]),u.strokeRect(0,0,i.size.x,i.size.y),i.image=a,ji.set(t,i),i}}const ip=new F(10,10),ya=new F,ma=new F,Ti=new F,ni=new F,gu=new F,va=new F,si=new F,_i=new F,yu=new Ot,np=new F,Rm=new F,sp=new F;function Lm(){return window.document.getElementById("DEBUG_Displaycached")}function Pm(r=80,t=.8){const e=document.createElement("div");function i(){e.style.opacity="1"}function a(){e.style.opacity=t.toString()}return e.setAttribute("id","DEBUG_Displaycached"),e.style.position="absolute",e.style.width=r+"px",e.style.height="92vh",e.style.background=`rgba(255, 255, 255, ${t})`,e.style.left="20px",e.style.top="20px",e.style.overflow="auto",e.style.padding="6px",e.style.opacity=t.toString(),e.addEventListener("mouseenter",i),e.addEventListener("mouseleave",a),document.body.appendChild(e),e}function Fm(r,t){t.forEach((e,i)=>{!e||!e.image||Um(r,i,e)})}function Um(r,t,e){let i;for(let a=0,u=r.childNodes.length;a<u;a++)if(r.childNodes[a].getAttribute("id")===t){i=r.childNodes[a];break}i?Hm(i,e):km(r,t,e)}function km(r,t,e){if(!e.image)return;const i=Pt.document.createElement("div");i.setAttribute("id",t),i.style.display="flex",i.style.flexDirection="column";const a=Ki.createCanvas({containerId:r.id,width:e.image.width,height:e.image.height,dpr:window.devicePixelRatio});a.style.border=`${zt.yellow} 1px solid`,a.style.maxWidth=parseInt(r.style.width)-2+"px",a.style.maxHeight=parseInt(a.style.maxWidth)/(e.image.width/e.image.height)+"px";const u=a.getContext("2d",{alpha:!0});if(!u)throw new Error("getContext error");u.save(),u.scale(window.devicePixelRatio,window.devicePixelRatio),u.drawImage(e.image,0,0),u.restore(),i.appendChild(a);const l=Pt.document.createElement("p");l.innerHTML=e.image.width+" * "+e.image.height,l.innerHTML+="<br/>"+t,l.style.margin="0",l.style.padding="0",l.style.lineHeight="1.2",l.style.fontSize="10px",l.style.padding="3px 0 6px 0",l.style.color=zt.black,i.appendChild(l),r.appendChild(i);function c(){const f=a.toDataURL("image/png",.6),d=document.createElement("a"),g=new MouseEvent("click");d.download=`thumb.${Date.now()}.png`,d.href=f,d.dispatchEvent(g)}i.addEventListener("click",c)}function Hm(r,t){if(!t.image)return;const e=r.querySelector("canvas");if(!e)return;const i=e.getContext("2d",{alpha:!0});if(!i)throw new Error("getContext error");i.clearRect(0,0,e.width,e.height),i.save(),i.scale(window.devicePixelRatio,window.devicePixelRatio),i.drawImage(t.image,0,0),i.restore()}class qm extends dr{cvs;worker;view;boundingBox=new Ot;workerMessageHandler=this.handleWorkerMessage.bind(this);cameraHandler=this.handleCameraChanged.bind(this);runningHandler=this.running.bind(this);constructor(t={},e){super(),t.workerRender=!0,this.params=t,Pt.config=t;const i=Ki.createCanvas(t);if(!i.transferControlToOffscreen)throw new Error("not support transferControlToOffscreen");this.cvs=i.transferControlToOffscreen(),this.view=new Sm(t),this.view.camera.name="mainCamera",this.view.camera.resize(),this.worker=e,this.bindEvents()}destroy(){super.destroy(),this.unbindEvents(),this.worker.postMessage({task:xr.TERMINATE}),this.worker.terminate()}bindEvents(){var t,e;(e=(t=this.view)==null?void 0:t.camera)==null||e.addEventListener(au.UPDATE,this.cameraHandler),this.worker.addEventListener("message",this.workerMessageHandler)}unbindEvents(){var t,e;(e=(t=this.view)==null?void 0:t.controller)==null||e.removeEventListener(_t.CAMERA_CHANGED,this.cameraHandler),this.worker.removeEventListener("message",this.workerMessageHandler)}handleWorkerMessage(t){var e,i,a,u,l,c;switch(t.data.task){case xr.CAMERA_SYNC:if(!((e=t==null?void 0:t.data)!=null&&e.data))break;const f=JSON.parse(t.data.data);(a=(i=this.view)==null?void 0:i.camera)==null||a.fromJSON(f),this.view.camera.computeBoundingBox(),console.log("CAMERA_SYNC: ",f);break;case xr.CAMERA_CHANGED:const{t:d,r:g,s:E}=t.data.data;console.log("CAMERA_CHANGED: ",this.view.camera.width,d,g,E),(l=(u=this.view)==null?void 0:u.camera)==null||l.setTRS(d,g,E);break;case xr.SCENES_CHANGED:const{box:T}=t.data.data;if(!T)return;this.boundingBox.fromString(T);break;case"syncTextureHelperCached":(((c=t.data)==null?void 0:c.data)||[]).forEach((C,L)=>ji.set(L,C));break;case"pong":console.log("response: pong");break}}handleCameraChanged(t){this.worker.postMessage({task:xr.CAMERA_CHANGED,data:t.data})}promiseWorkerResponse(t,e){return new Promise((i,a)=>{const u=c=>{var f,d,g;((f=c==null?void 0:c.data)==null?void 0:f.task)===t&&(this.worker.removeEventListener("message",u),this.worker.removeEventListener("error",l),console.log("AppOffscreen::response: ",(d=c==null?void 0:c.data)==null?void 0:d.task,(g=c==null?void 0:c.data)==null?void 0:g.data),i(c.data.data))},l=c=>{this.worker.removeEventListener("message",u),this.worker.removeEventListener("error",l),a(c.error)};this.worker.addEventListener("message",u),this.worker.addEventListener("error",l),this.worker.postMessage({task:t,data:e})})}resize(){var t;(t=this.view.camera)==null||t.resize()}async load(t,e){return this.promiseWorkerResponse(xr.LOAD,{url:t,layers:e})}async getLayers(t=2){return this.promiseWorkerResponse(xr.GET_LAYERS,{lv:t})}usedCacheChanged(t=!1){this.params.usedCache=t,this.worker.postMessage({task:xr.USED_CACHE_CHANGED,data:t})}wireframeChanged(t=!1){this.params.wireframe=t,this.worker.postMessage({task:xr.WIREFRAME_CHANGED,data:t})}async fullscreen(){await this.view.resetCameraByBoundingBox(this.boundingBox,!0)}saveCameraPosition(t){this.view.saveCameraPosition(t)}restoreCameraPosition(t){this.view.restoreCameraPosition(t)}clearCameraPosition(t){this.view.clearCameraPosition(t)}updateLayersVisibility(t,e=!1){this.worker.postMessage({task:xr.UPDATE_LAYERS_VISIBILITY,data:{ids:t,visible:e}})}start(){const t=this.cvs,e=JSON.stringify(this.params);this.worker.postMessage({task:xr.INIT,data:{cvs:t,config:e}},[t]),requestAnimationFrame(this.runningHandler)}running(t){var e;(e=this.view)==null||e.update(t),requestAnimationFrame(this.runningHandler),(Pt.config.usedCache||Pt.config.separateCache)&&ji.DEBUG_DisplayCachedTexture()}stop(){}}function Wm(r){return new Worker("/environment.worker.js",{type:"module",name:r==null?void 0:r.name})}function Vm(r){return new Worker("/renderer.worker.js",{type:"module",name:r==null?void 0:r.name})}he.AppEnum=ep,he.AppOffscreen=qm,he.AssetTypeEnum=er,he.Box2=i0,he.Color=qt,he.ColorsEnum=zt,he.EnvironmentWorker=Wm,he.GLOB=Pt,he.LayerTypeEnum=Ks,he.Monitor=Ft,he.RendererWorker=Vm,he.SvgApp=Dm,he.Vector2=e0,he.defaultConfig=Yn,Object.defineProperty(he,Symbol.toStringTag,{value:"Module"})});