-
Notifications
You must be signed in to change notification settings - Fork 868
/
main.min.js
77 lines (65 loc) · 304 KB
/
main.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
(()=>{var ic=Object.create;var Xs=Object.defineProperty;var nc=Object.getOwnPropertyDescriptor;var rc=Object.getOwnPropertyNames;var sc=Object.getPrototypeOf,ac=Object.prototype.hasOwnProperty;var oc=(t,e,i)=>e in t?Xs(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var lc=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var hc=(t,e,i,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of rc(e))!ac.call(t,a)&&a!==i&&Xs(t,a,{get:()=>e[a],enumerable:!(r=nc(e,a))||r.enumerable});return t};var Jo=(t,e,i)=>(i=t!=null?ic(sc(t)):{},hc(e||!t||!t.__esModule?Xs(i,"default",{value:t,enumerable:!0}):i,t));var ui=(t,e,i)=>(oc(t,typeof e!="symbol"?e+"":e,i),i),Ys=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)};var _e=(t,e,i)=>(Ys(t,e,"read from private field"),i?i.call(t):e.get(t)),Ri=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Je=(t,e,i,r)=>(Ys(t,e,"write to private field"),r?r.call(t,i):e.set(t,i),i);var Zo=(t,e,i)=>(Ys(t,e,"access private method"),i);var Gs=lc((tl,Zn)=>{(function(t,e){"use strict";typeof Zn=="object"&&typeof Zn.exports=="object"?Zn.exports=t.document?e(t,!0):function(i){if(!i.document)throw new Error("jQuery requires a window with a document");return e(i)}:e(t)})(typeof window<"u"?window:tl,function(t,e){"use strict";var i=[],r=Object.getPrototypeOf,a=i.slice,f=i.flat?function(n){return i.flat.call(n)}:function(n){return i.concat.apply([],n)},l=i.push,d=i.indexOf,m={},g=m.toString,x=m.hasOwnProperty,T=x.toString,S=T.call(Object),v={},E=function(s){return typeof s=="function"&&typeof s.nodeType!="number"&&typeof s.item!="function"},L=function(s){return s!=null&&s===s.window},R=t.document,M={type:!0,src:!0,nonce:!0,noModule:!0};function F(n,s,o){o=o||R;var c,u,p=o.createElement("script");if(p.text=n,s)for(c in M)u=s[c]||s.getAttribute&&s.getAttribute(c),u&&p.setAttribute(c,u);o.head.appendChild(p).parentNode.removeChild(p)}function B(n){return n==null?n+"":typeof n=="object"||typeof n=="function"?m[g.call(n)]||"object":typeof n}var q="3.7.1",W=/HTML$/i,h=function(n,s){return new h.fn.init(n,s)};h.fn=h.prototype={jquery:q,constructor:h,length:0,toArray:function(){return a.call(this)},get:function(n){return n==null?a.call(this):n<0?this[n+this.length]:this[n]},pushStack:function(n){var s=h.merge(this.constructor(),n);return s.prevObject=this,s},each:function(n){return h.each(this,n)},map:function(n){return this.pushStack(h.map(this,function(s,o){return n.call(s,o,s)}))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(h.grep(this,function(n,s){return(s+1)%2}))},odd:function(){return this.pushStack(h.grep(this,function(n,s){return s%2}))},eq:function(n){var s=this.length,o=+n+(n<0?s:0);return this.pushStack(o>=0&&o<s?[this[o]]:[])},end:function(){return this.prevObject||this.constructor()},push:l,sort:i.sort,splice:i.splice},h.extend=h.fn.extend=function(){var n,s,o,c,u,p,_=arguments[0]||{},k=1,w=arguments.length,C=!1;for(typeof _=="boolean"&&(C=_,_=arguments[k]||{},k++),typeof _!="object"&&!E(_)&&(_={}),k===w&&(_=this,k--);k<w;k++)if((n=arguments[k])!=null)for(s in n)c=n[s],!(s==="__proto__"||_===c)&&(C&&c&&(h.isPlainObject(c)||(u=Array.isArray(c)))?(o=_[s],u&&!Array.isArray(o)?p=[]:!u&&!h.isPlainObject(o)?p={}:p=o,u=!1,_[s]=h.extend(C,p,c)):c!==void 0&&(_[s]=c));return _},h.extend({expando:"jQuery"+(q+Math.random()).replace(/\D/g,""),isReady:!0,error:function(n){throw new Error(n)},noop:function(){},isPlainObject:function(n){var s,o;return!n||g.call(n)!=="[object Object]"?!1:(s=r(n),s?(o=x.call(s,"constructor")&&s.constructor,typeof o=="function"&&T.call(o)===S):!0)},isEmptyObject:function(n){var s;for(s in n)return!1;return!0},globalEval:function(n,s,o){F(n,{nonce:s&&s.nonce},o)},each:function(n,s){var o,c=0;if(G(n))for(o=n.length;c<o&&s.call(n[c],c,n[c])!==!1;c++);else for(c in n)if(s.call(n[c],c,n[c])===!1)break;return n},text:function(n){var s,o="",c=0,u=n.nodeType;if(!u)for(;s=n[c++];)o+=h.text(s);return u===1||u===11?n.textContent:u===9?n.documentElement.textContent:u===3||u===4?n.nodeValue:o},makeArray:function(n,s){var o=s||[];return n!=null&&(G(Object(n))?h.merge(o,typeof n=="string"?[n]:n):l.call(o,n)),o},inArray:function(n,s,o){return s==null?-1:d.call(s,n,o)},isXMLDoc:function(n){var s=n&&n.namespaceURI,o=n&&(n.ownerDocument||n).documentElement;return!W.test(s||o&&o.nodeName||"HTML")},merge:function(n,s){for(var o=+s.length,c=0,u=n.length;c<o;c++)n[u++]=s[c];return n.length=u,n},grep:function(n,s,o){for(var c,u=[],p=0,_=n.length,k=!o;p<_;p++)c=!s(n[p],p),c!==k&&u.push(n[p]);return u},map:function(n,s,o){var c,u,p=0,_=[];if(G(n))for(c=n.length;p<c;p++)u=s(n[p],p,o),u!=null&&_.push(u);else for(p in n)u=s(n[p],p,o),u!=null&&_.push(u);return f(_)},guid:1,support:v}),typeof Symbol=="function"&&(h.fn[Symbol.iterator]=i[Symbol.iterator]),h.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(n,s){m["[object "+s+"]"]=s.toLowerCase()});function G(n){var s=!!n&&"length"in n&&n.length,o=B(n);return E(n)||L(n)?!1:o==="array"||s===0||typeof s=="number"&&s>0&&s-1 in n}function J(n,s){return n.nodeName&&n.nodeName.toLowerCase()===s.toLowerCase()}var Z=i.pop,tt=i.sort,ut=i.splice,nt="[\\x20\\t\\r\\n\\f]",Ft=new RegExp("^"+nt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+nt+"+$","g");h.contains=function(n,s){var o=s&&s.parentNode;return n===o||!!(o&&o.nodeType===1&&(n.contains?n.contains(o):n.compareDocumentPosition&&n.compareDocumentPosition(o)&16))};var xt=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function Gt(n,s){return s?n==="\0"?"\uFFFD":n.slice(0,-1)+"\\"+n.charCodeAt(n.length-1).toString(16)+" ":"\\"+n}h.escapeSelector=function(n){return(n+"").replace(xt,Gt)};var Nt=R,pt=l;(function(){var n,s,o,c,u,p=pt,_,k,w,C,I,D=h.expando,P=0,$=0,bt=Gn(),Lt=Gn(),Et=Gn(),ce=Gn(),se=function(b,A){return b===A&&(u=!0),0},Xe="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",Ye="(?:\\\\[\\da-fA-F]{1,6}"+nt+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",Ot="\\["+nt+"*("+Ye+")(?:"+nt+"*([*^$|!~]?=)"+nt+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+Ye+"))|)"+nt+"*\\]",Ci=":("+Ye+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+Ot+")*)|.*)\\)|)",jt=new RegExp(nt+"+","g"),Qt=new RegExp("^"+nt+"*,"+nt+"*"),yn=new RegExp("^"+nt+"*([>+~]|"+nt+")"+nt+"*"),zs=new RegExp(nt+"|>"),Ge=new RegExp(Ci),bn=new RegExp("^"+Ye+"$"),Ke={ID:new RegExp("^#("+Ye+")"),CLASS:new RegExp("^\\.("+Ye+")"),TAG:new RegExp("^("+Ye+"|[*])"),ATTR:new RegExp("^"+Ot),PSEUDO:new RegExp("^"+Ci),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+nt+"*(even|odd|(([+-]|)(\\d*)n|)"+nt+"*(?:([+-]|)"+nt+"*(\\d+)|))"+nt+"*\\)|)","i"),bool:new RegExp("^(?:"+Xe+")$","i"),needsContext:new RegExp("^"+nt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+nt+"*((?:-\\d)?\\d*)"+nt+"*\\)|)(?=[^-]|$)","i")},pi=/^(?:input|select|textarea|button)$/i,gi=/^h\d$/i,Ie=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Ws=/[+~]/,fi=new RegExp("\\\\[\\da-fA-F]{1,6}"+nt+"?|\\\\([^\\r\\n\\f])","g"),ci=function(b,A){var O="0x"+b.slice(1)-65536;return A||(O<0?String.fromCharCode(O+65536):String.fromCharCode(O>>10|55296,O&1023|56320))},Gf=function(){_i()},Kf=Qn(function(b){return b.disabled===!0&&J(b,"fieldset")},{dir:"parentNode",next:"legend"});function Qf(){try{return _.activeElement}catch{}}try{p.apply(i=a.call(Nt.childNodes),Nt.childNodes),i[Nt.childNodes.length].nodeType}catch{p={apply:function(A,O){pt.apply(A,a.call(O))},call:function(A){pt.apply(A,a.call(arguments,1))}}}function zt(b,A,O,N){var j,Y,et,at,it,Mt,mt,wt=A&&A.ownerDocument,Rt=A?A.nodeType:9;if(O=O||[],typeof b!="string"||!b||Rt!==1&&Rt!==9&&Rt!==11)return O;if(!N&&(_i(A),A=A||_,w)){if(Rt!==11&&(it=Ie.exec(b)))if(j=it[1]){if(Rt===9)if(et=A.getElementById(j)){if(et.id===j)return p.call(O,et),O}else return O;else if(wt&&(et=wt.getElementById(j))&&zt.contains(A,et)&&et.id===j)return p.call(O,et),O}else{if(it[2])return p.apply(O,A.getElementsByTagName(b)),O;if((j=it[3])&&A.getElementsByClassName)return p.apply(O,A.getElementsByClassName(j)),O}if(!ce[b+" "]&&(!C||!C.test(b))){if(mt=b,wt=A,Rt===1&&(zs.test(b)||yn.test(b))){for(wt=Ws.test(b)&&qs(A.parentNode)||A,(wt!=A||!v.scope)&&((at=A.getAttribute("id"))?at=h.escapeSelector(at):A.setAttribute("id",at=D)),Mt=vn(b),Y=Mt.length;Y--;)Mt[Y]=(at?"#"+at:":scope")+" "+Kn(Mt[Y]);mt=Mt.join(",")}try{return p.apply(O,wt.querySelectorAll(mt)),O}catch{ce(b,!0)}finally{at===D&&A.removeAttribute("id")}}}return Qo(b.replace(Ft,"$1"),A,O,N)}function Gn(){var b=[];function A(O,N){return b.push(O+" ")>s.cacheLength&&delete A[b.shift()],A[O+" "]=N}return A}function We(b){return b[D]=!0,b}function Xi(b){var A=_.createElement("fieldset");try{return!!b(A)}catch{return!1}finally{A.parentNode&&A.parentNode.removeChild(A),A=null}}function Jf(b){return function(A){return J(A,"input")&&A.type===b}}function Zf(b){return function(A){return(J(A,"input")||J(A,"button"))&&A.type===b}}function Go(b){return function(A){return"form"in A?A.parentNode&&A.disabled===!1?"label"in A?"label"in A.parentNode?A.parentNode.disabled===b:A.disabled===b:A.isDisabled===b||A.isDisabled!==!b&&Kf(A)===b:A.disabled===b:"label"in A?A.disabled===b:!1}}function Mi(b){return We(function(A){return A=+A,We(function(O,N){for(var j,Y=b([],O.length,A),et=Y.length;et--;)O[j=Y[et]]&&(O[j]=!(N[j]=O[j]))})})}function qs(b){return b&&typeof b.getElementsByTagName<"u"&&b}function _i(b){var A,O=b?b.ownerDocument||b:Nt;return O==_||O.nodeType!==9||!O.documentElement||(_=O,k=_.documentElement,w=!h.isXMLDoc(_),I=k.matches||k.webkitMatchesSelector||k.msMatchesSelector,k.msMatchesSelector&&Nt!=_&&(A=_.defaultView)&&A.top!==A&&A.addEventListener("unload",Gf),v.getById=Xi(function(N){return k.appendChild(N).id=h.expando,!_.getElementsByName||!_.getElementsByName(h.expando).length}),v.disconnectedMatch=Xi(function(N){return I.call(N,"*")}),v.scope=Xi(function(){return _.querySelectorAll(":scope")}),v.cssHas=Xi(function(){try{return _.querySelector(":has(*,:jqfake)"),!1}catch{return!0}}),v.getById?(s.filter.ID=function(N){var j=N.replace(fi,ci);return function(Y){return Y.getAttribute("id")===j}},s.find.ID=function(N,j){if(typeof j.getElementById<"u"&&w){var Y=j.getElementById(N);return Y?[Y]:[]}}):(s.filter.ID=function(N){var j=N.replace(fi,ci);return function(Y){var et=typeof Y.getAttributeNode<"u"&&Y.getAttributeNode("id");return et&&et.value===j}},s.find.ID=function(N,j){if(typeof j.getElementById<"u"&&w){var Y,et,at,it=j.getElementById(N);if(it){if(Y=it.getAttributeNode("id"),Y&&Y.value===N)return[it];for(at=j.getElementsByName(N),et=0;it=at[et++];)if(Y=it.getAttributeNode("id"),Y&&Y.value===N)return[it]}return[]}}),s.find.TAG=function(N,j){return typeof j.getElementsByTagName<"u"?j.getElementsByTagName(N):j.querySelectorAll(N)},s.find.CLASS=function(N,j){if(typeof j.getElementsByClassName<"u"&&w)return j.getElementsByClassName(N)},C=[],Xi(function(N){var j;k.appendChild(N).innerHTML="<a id='"+D+"' href='' disabled='disabled'></a><select id='"+D+"-\r\\' disabled='disabled'><option selected=''></option></select>",N.querySelectorAll("[selected]").length||C.push("\\["+nt+"*(?:value|"+Xe+")"),N.querySelectorAll("[id~="+D+"-]").length||C.push("~="),N.querySelectorAll("a#"+D+"+*").length||C.push(".#.+[+~]"),N.querySelectorAll(":checked").length||C.push(":checked"),j=_.createElement("input"),j.setAttribute("type","hidden"),N.appendChild(j).setAttribute("name","D"),k.appendChild(N).disabled=!0,N.querySelectorAll(":disabled").length!==2&&C.push(":enabled",":disabled"),j=_.createElement("input"),j.setAttribute("name",""),N.appendChild(j),N.querySelectorAll("[name='']").length||C.push("\\["+nt+"*name"+nt+"*="+nt+`*(?:''|"")`)}),v.cssHas||C.push(":has"),C=C.length&&new RegExp(C.join("|")),se=function(N,j){if(N===j)return u=!0,0;var Y=!N.compareDocumentPosition-!j.compareDocumentPosition;return Y||(Y=(N.ownerDocument||N)==(j.ownerDocument||j)?N.compareDocumentPosition(j):1,Y&1||!v.sortDetached&&j.compareDocumentPosition(N)===Y?N===_||N.ownerDocument==Nt&&zt.contains(Nt,N)?-1:j===_||j.ownerDocument==Nt&&zt.contains(Nt,j)?1:c?d.call(c,N)-d.call(c,j):0:Y&4?-1:1)}),_}zt.matches=function(b,A){return zt(b,null,null,A)},zt.matchesSelector=function(b,A){if(_i(b),w&&!ce[A+" "]&&(!C||!C.test(A)))try{var O=I.call(b,A);if(O||v.disconnectedMatch||b.document&&b.document.nodeType!==11)return O}catch{ce(A,!0)}return zt(A,_,null,[b]).length>0},zt.contains=function(b,A){return(b.ownerDocument||b)!=_&&_i(b),h.contains(b,A)},zt.attr=function(b,A){(b.ownerDocument||b)!=_&&_i(b);var O=s.attrHandle[A.toLowerCase()],N=O&&x.call(s.attrHandle,A.toLowerCase())?O(b,A,!w):void 0;return N!==void 0?N:b.getAttribute(A)},zt.error=function(b){throw new Error("Syntax error, unrecognized expression: "+b)},h.uniqueSort=function(b){var A,O=[],N=0,j=0;if(u=!v.sortStable,c=!v.sortStable&&a.call(b,0),tt.call(b,se),u){for(;A=b[j++];)A===b[j]&&(N=O.push(j));for(;N--;)ut.call(b,O[N],1)}return c=null,b},h.fn.uniqueSort=function(){return this.pushStack(h.uniqueSort(a.apply(this)))},s=h.expr={cacheLength:50,createPseudo:We,match:Ke,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(b){return b[1]=b[1].replace(fi,ci),b[3]=(b[3]||b[4]||b[5]||"").replace(fi,ci),b[2]==="~="&&(b[3]=" "+b[3]+" "),b.slice(0,4)},CHILD:function(b){return b[1]=b[1].toLowerCase(),b[1].slice(0,3)==="nth"?(b[3]||zt.error(b[0]),b[4]=+(b[4]?b[5]+(b[6]||1):2*(b[3]==="even"||b[3]==="odd")),b[5]=+(b[7]+b[8]||b[3]==="odd")):b[3]&&zt.error(b[0]),b},PSEUDO:function(b){var A,O=!b[6]&&b[2];return Ke.CHILD.test(b[0])?null:(b[3]?b[2]=b[4]||b[5]||"":O&&Ge.test(O)&&(A=vn(O,!0))&&(A=O.indexOf(")",O.length-A)-O.length)&&(b[0]=b[0].slice(0,A),b[2]=O.slice(0,A)),b.slice(0,3))}},filter:{TAG:function(b){var A=b.replace(fi,ci).toLowerCase();return b==="*"?function(){return!0}:function(O){return J(O,A)}},CLASS:function(b){var A=bt[b+" "];return A||(A=new RegExp("(^|"+nt+")"+b+"("+nt+"|$)"))&&bt(b,function(O){return A.test(typeof O.className=="string"&&O.className||typeof O.getAttribute<"u"&&O.getAttribute("class")||"")})},ATTR:function(b,A,O){return function(N){var j=zt.attr(N,b);return j==null?A==="!=":A?(j+="",A==="="?j===O:A==="!="?j!==O:A==="^="?O&&j.indexOf(O)===0:A==="*="?O&&j.indexOf(O)>-1:A==="$="?O&&j.slice(-O.length)===O:A==="~="?(" "+j.replace(jt," ")+" ").indexOf(O)>-1:A==="|="?j===O||j.slice(0,O.length+1)===O+"-":!1):!0}},CHILD:function(b,A,O,N,j){var Y=b.slice(0,3)!=="nth",et=b.slice(-4)!=="last",at=A==="of-type";return N===1&&j===0?function(it){return!!it.parentNode}:function(it,Mt,mt){var wt,Rt,ct,qt,Ee,ge=Y!==et?"nextSibling":"previousSibling",Le=it.parentNode,Qe=at&&it.nodeName.toLowerCase(),Yi=!mt&&!at,be=!1;if(Le){if(Y){for(;ge;){for(ct=it;ct=ct[ge];)if(at?J(ct,Qe):ct.nodeType===1)return!1;Ee=ge=b==="only"&&!Ee&&"nextSibling"}return!0}if(Ee=[et?Le.firstChild:Le.lastChild],et&&Yi){for(Rt=Le[D]||(Le[D]={}),wt=Rt[b]||[],qt=wt[0]===P&&wt[1],be=qt&&wt[2],ct=qt&&Le.childNodes[qt];ct=++qt&&ct&&ct[ge]||(be=qt=0)||Ee.pop();)if(ct.nodeType===1&&++be&&ct===it){Rt[b]=[P,qt,be];break}}else if(Yi&&(Rt=it[D]||(it[D]={}),wt=Rt[b]||[],qt=wt[0]===P&&wt[1],be=qt),be===!1)for(;(ct=++qt&&ct&&ct[ge]||(be=qt=0)||Ee.pop())&&!((at?J(ct,Qe):ct.nodeType===1)&&++be&&(Yi&&(Rt=ct[D]||(ct[D]={}),Rt[b]=[P,be]),ct===it)););return be-=j,be===N||be%N===0&&be/N>=0}}},PSEUDO:function(b,A){var O,N=s.pseudos[b]||s.setFilters[b.toLowerCase()]||zt.error("unsupported pseudo: "+b);return N[D]?N(A):N.length>1?(O=[b,b,"",A],s.setFilters.hasOwnProperty(b.toLowerCase())?We(function(j,Y){for(var et,at=N(j,A),it=at.length;it--;)et=d.call(j,at[it]),j[et]=!(Y[et]=at[it])}):function(j){return N(j,0,O)}):N}},pseudos:{not:We(function(b){var A=[],O=[],N=$s(b.replace(Ft,"$1"));return N[D]?We(function(j,Y,et,at){for(var it,Mt=N(j,null,at,[]),mt=j.length;mt--;)(it=Mt[mt])&&(j[mt]=!(Y[mt]=it))}):function(j,Y,et){return A[0]=j,N(A,null,et,O),A[0]=null,!O.pop()}}),has:We(function(b){return function(A){return zt(b,A).length>0}}),contains:We(function(b){return b=b.replace(fi,ci),function(A){return(A.textContent||h.text(A)).indexOf(b)>-1}}),lang:We(function(b){return bn.test(b||"")||zt.error("unsupported lang: "+b),b=b.replace(fi,ci).toLowerCase(),function(A){var O;do if(O=w?A.lang:A.getAttribute("xml:lang")||A.getAttribute("lang"))return O=O.toLowerCase(),O===b||O.indexOf(b+"-")===0;while((A=A.parentNode)&&A.nodeType===1);return!1}}),target:function(b){var A=t.location&&t.location.hash;return A&&A.slice(1)===b.id},root:function(b){return b===k},focus:function(b){return b===Qf()&&_.hasFocus()&&!!(b.type||b.href||~b.tabIndex)},enabled:Go(!1),disabled:Go(!0),checked:function(b){return J(b,"input")&&!!b.checked||J(b,"option")&&!!b.selected},selected:function(b){return b.parentNode&&b.parentNode.selectedIndex,b.selected===!0},empty:function(b){for(b=b.firstChild;b;b=b.nextSibling)if(b.nodeType<6)return!1;return!0},parent:function(b){return!s.pseudos.empty(b)},header:function(b){return gi.test(b.nodeName)},input:function(b){return pi.test(b.nodeName)},button:function(b){return J(b,"input")&&b.type==="button"||J(b,"button")},text:function(b){var A;return J(b,"input")&&b.type==="text"&&((A=b.getAttribute("type"))==null||A.toLowerCase()==="text")},first:Mi(function(){return[0]}),last:Mi(function(b,A){return[A-1]}),eq:Mi(function(b,A,O){return[O<0?O+A:O]}),even:Mi(function(b,A){for(var O=0;O<A;O+=2)b.push(O);return b}),odd:Mi(function(b,A){for(var O=1;O<A;O+=2)b.push(O);return b}),lt:Mi(function(b,A,O){var N;for(O<0?N=O+A:O>A?N=A:N=O;--N>=0;)b.push(N);return b}),gt:Mi(function(b,A,O){for(var N=O<0?O+A:O;++N<A;)b.push(N);return b})}},s.pseudos.nth=s.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})s.pseudos[n]=Jf(n);for(n in{submit:!0,reset:!0})s.pseudos[n]=Zf(n);function Ko(){}Ko.prototype=s.filters=s.pseudos,s.setFilters=new Ko;function vn(b,A){var O,N,j,Y,et,at,it,Mt=Lt[b+" "];if(Mt)return A?0:Mt.slice(0);for(et=b,at=[],it=s.preFilter;et;){(!O||(N=Qt.exec(et)))&&(N&&(et=et.slice(N[0].length)||et),at.push(j=[])),O=!1,(N=yn.exec(et))&&(O=N.shift(),j.push({value:O,type:N[0].replace(Ft," ")}),et=et.slice(O.length));for(Y in s.filter)(N=Ke[Y].exec(et))&&(!it[Y]||(N=it[Y](N)))&&(O=N.shift(),j.push({value:O,type:Y,matches:N}),et=et.slice(O.length));if(!O)break}return A?et.length:et?zt.error(b):Lt(b,at).slice(0)}function Kn(b){for(var A=0,O=b.length,N="";A<O;A++)N+=b[A].value;return N}function Qn(b,A,O){var N=A.dir,j=A.next,Y=j||N,et=O&&Y==="parentNode",at=$++;return A.first?function(it,Mt,mt){for(;it=it[N];)if(it.nodeType===1||et)return b(it,Mt,mt);return!1}:function(it,Mt,mt){var wt,Rt,ct=[P,at];if(mt){for(;it=it[N];)if((it.nodeType===1||et)&&b(it,Mt,mt))return!0}else for(;it=it[N];)if(it.nodeType===1||et)if(Rt=it[D]||(it[D]={}),j&&J(it,j))it=it[N]||it;else{if((wt=Rt[Y])&&wt[0]===P&&wt[1]===at)return ct[2]=wt[2];if(Rt[Y]=ct,ct[2]=b(it,Mt,mt))return!0}return!1}}function Hs(b){return b.length>1?function(A,O,N){for(var j=b.length;j--;)if(!b[j](A,O,N))return!1;return!0}:b[0]}function tc(b,A,O){for(var N=0,j=A.length;N<j;N++)zt(b,A[N],O);return O}function Jn(b,A,O,N,j){for(var Y,et=[],at=0,it=b.length,Mt=A!=null;at<it;at++)(Y=b[at])&&(!O||O(Y,N,j))&&(et.push(Y),Mt&&A.push(at));return et}function Us(b,A,O,N,j,Y){return N&&!N[D]&&(N=Us(N)),j&&!j[D]&&(j=Us(j,Y)),We(function(et,at,it,Mt){var mt,wt,Rt,ct,qt=[],Ee=[],ge=at.length,Le=et||tc(A||"*",it.nodeType?[it]:it,[]),Qe=b&&(et||!A)?Jn(Le,qt,b,it,Mt):Le;if(O?(ct=j||(et?b:ge||N)?[]:at,O(Qe,ct,it,Mt)):ct=Qe,N)for(mt=Jn(ct,Ee),N(mt,[],it,Mt),wt=mt.length;wt--;)(Rt=mt[wt])&&(ct[Ee[wt]]=!(Qe[Ee[wt]]=Rt));if(et){if(j||b){if(j){for(mt=[],wt=ct.length;wt--;)(Rt=ct[wt])&&mt.push(Qe[wt]=Rt);j(null,ct=[],mt,Mt)}for(wt=ct.length;wt--;)(Rt=ct[wt])&&(mt=j?d.call(et,Rt):qt[wt])>-1&&(et[mt]=!(at[mt]=Rt))}}else ct=Jn(ct===at?ct.splice(ge,ct.length):ct),j?j(null,at,ct,Mt):p.apply(at,ct)})}function Vs(b){for(var A,O,N,j=b.length,Y=s.relative[b[0].type],et=Y||s.relative[" "],at=Y?1:0,it=Qn(function(wt){return wt===A},et,!0),Mt=Qn(function(wt){return d.call(A,wt)>-1},et,!0),mt=[function(wt,Rt,ct){var qt=!Y&&(ct||Rt!=o)||((A=Rt).nodeType?it(wt,Rt,ct):Mt(wt,Rt,ct));return A=null,qt}];at<j;at++)if(O=s.relative[b[at].type])mt=[Qn(Hs(mt),O)];else{if(O=s.filter[b[at].type].apply(null,b[at].matches),O[D]){for(N=++at;N<j&&!s.relative[b[N].type];N++);return Us(at>1&&Hs(mt),at>1&&Kn(b.slice(0,at-1).concat({value:b[at-2].type===" "?"*":""})).replace(Ft,"$1"),O,at<N&&Vs(b.slice(at,N)),N<j&&Vs(b=b.slice(N)),N<j&&Kn(b))}mt.push(O)}return Hs(mt)}function ec(b,A){var O=A.length>0,N=b.length>0,j=function(Y,et,at,it,Mt){var mt,wt,Rt,ct=0,qt="0",Ee=Y&&[],ge=[],Le=o,Qe=Y||N&&s.find.TAG("*",Mt),Yi=P+=Le==null?1:Math.random()||.1,be=Qe.length;for(Mt&&(o=et==_||et||Mt);qt!==be&&(mt=Qe[qt])!=null;qt++){if(N&&mt){for(wt=0,!et&&mt.ownerDocument!=_&&(_i(mt),at=!w);Rt=b[wt++];)if(Rt(mt,et||_,at)){p.call(it,mt);break}Mt&&(P=Yi)}O&&((mt=!Rt&&mt)&&ct--,Y&&Ee.push(mt))}if(ct+=qt,O&&qt!==ct){for(wt=0;Rt=A[wt++];)Rt(Ee,ge,et,at);if(Y){if(ct>0)for(;qt--;)Ee[qt]||ge[qt]||(ge[qt]=Z.call(it));ge=Jn(ge)}p.apply(it,ge),Mt&&!Y&&ge.length>0&&ct+A.length>1&&h.uniqueSort(it)}return Mt&&(P=Yi,o=Le),Ee};return O?We(j):j}function $s(b,A){var O,N=[],j=[],Y=Et[b+" "];if(!Y){for(A||(A=vn(b)),O=A.length;O--;)Y=Vs(A[O]),Y[D]?N.push(Y):j.push(Y);Y=Et(b,ec(j,N)),Y.selector=b}return Y}function Qo(b,A,O,N){var j,Y,et,at,it,Mt=typeof b=="function"&&b,mt=!N&&vn(b=Mt.selector||b);if(O=O||[],mt.length===1){if(Y=mt[0]=mt[0].slice(0),Y.length>2&&(et=Y[0]).type==="ID"&&A.nodeType===9&&w&&s.relative[Y[1].type]){if(A=(s.find.ID(et.matches[0].replace(fi,ci),A)||[])[0],A)Mt&&(A=A.parentNode);else return O;b=b.slice(Y.shift().value.length)}for(j=Ke.needsContext.test(b)?0:Y.length;j--&&(et=Y[j],!s.relative[at=et.type]);)if((it=s.find[at])&&(N=it(et.matches[0].replace(fi,ci),Ws.test(Y[0].type)&&qs(A.parentNode)||A))){if(Y.splice(j,1),b=N.length&&Kn(Y),!b)return p.apply(O,N),O;break}}return(Mt||$s(b,mt))(N,A,!w,O,!A||Ws.test(b)&&qs(A.parentNode)||A),O}v.sortStable=D.split("").sort(se).join("")===D,_i(),v.sortDetached=Xi(function(b){return b.compareDocumentPosition(_.createElement("fieldset"))&1}),h.find=zt,h.expr[":"]=h.expr.pseudos,h.unique=h.uniqueSort,zt.compile=$s,zt.select=Qo,zt.setDocument=_i,zt.tokenize=vn,zt.escape=h.escapeSelector,zt.getText=h.text,zt.isXML=h.isXMLDoc,zt.selectors=h.expr,zt.support=h.support,zt.uniqueSort=h.uniqueSort})();var ot=function(n,s,o){for(var c=[],u=o!==void 0;(n=n[s])&&n.nodeType!==9;)if(n.nodeType===1){if(u&&h(n).is(o))break;c.push(n)}return c},yt=function(n,s){for(var o=[];n;n=n.nextSibling)n.nodeType===1&&n!==s&&o.push(n);return o},Tt=h.expr.match.needsContext,rt=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function Kt(n,s,o){return E(s)?h.grep(n,function(c,u){return!!s.call(c,u,c)!==o}):s.nodeType?h.grep(n,function(c){return c===s!==o}):typeof s!="string"?h.grep(n,function(c){return d.call(s,c)>-1!==o}):h.filter(s,n,o)}h.filter=function(n,s,o){var c=s[0];return o&&(n=":not("+n+")"),s.length===1&&c.nodeType===1?h.find.matchesSelector(c,n)?[c]:[]:h.find.matches(n,h.grep(s,function(u){return u.nodeType===1}))},h.fn.extend({find:function(n){var s,o,c=this.length,u=this;if(typeof n!="string")return this.pushStack(h(n).filter(function(){for(s=0;s<c;s++)if(h.contains(u[s],this))return!0}));for(o=this.pushStack([]),s=0;s<c;s++)h.find(n,u[s],o);return c>1?h.uniqueSort(o):o},filter:function(n){return this.pushStack(Kt(this,n||[],!1))},not:function(n){return this.pushStack(Kt(this,n||[],!0))},is:function(n){return!!Kt(this,typeof n=="string"&&Tt.test(n)?h(n):n||[],!1).length}});var le,Ht=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,Ut=h.fn.init=function(n,s,o){var c,u;if(!n)return this;if(o=o||le,typeof n=="string")if(n[0]==="<"&&n[n.length-1]===">"&&n.length>=3?c=[null,n,null]:c=Ht.exec(n),c&&(c[1]||!s))if(c[1]){if(s=s instanceof h?s[0]:s,h.merge(this,h.parseHTML(c[1],s&&s.nodeType?s.ownerDocument||s:R,!0)),rt.test(c[1])&&h.isPlainObject(s))for(c in s)E(this[c])?this[c](s[c]):this.attr(c,s[c]);return this}else return u=R.getElementById(c[2]),u&&(this[0]=u,this.length=1),this;else return!s||s.jquery?(s||o).find(n):this.constructor(s).find(n);else{if(n.nodeType)return this[0]=n,this.length=1,this;if(E(n))return o.ready!==void 0?o.ready(n):n(h)}return h.makeArray(n,this)};Ut.prototype=h.fn,le=h(R);var It=/^(?:parents|prev(?:Until|All))/,Ve={children:!0,contents:!0,next:!0,prev:!0};h.fn.extend({has:function(n){var s=h(n,this),o=s.length;return this.filter(function(){for(var c=0;c<o;c++)if(h.contains(this,s[c]))return!0})},closest:function(n,s){var o,c=0,u=this.length,p=[],_=typeof n!="string"&&h(n);if(!Tt.test(n)){for(;c<u;c++)for(o=this[c];o&&o!==s;o=o.parentNode)if(o.nodeType<11&&(_?_.index(o)>-1:o.nodeType===1&&h.find.matchesSelector(o,n))){p.push(o);break}}return this.pushStack(p.length>1?h.uniqueSort(p):p)},index:function(n){return n?typeof n=="string"?d.call(h(n),this[0]):d.call(this,n.jquery?n[0]:n):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(n,s){return this.pushStack(h.uniqueSort(h.merge(this.get(),h(n,s))))},addBack:function(n){return this.add(n==null?this.prevObject:this.prevObject.filter(n))}});function de(n,s){for(;(n=n[s])&&n.nodeType!==1;);return n}h.each({parent:function(n){var s=n.parentNode;return s&&s.nodeType!==11?s:null},parents:function(n){return ot(n,"parentNode")},parentsUntil:function(n,s,o){return ot(n,"parentNode",o)},next:function(n){return de(n,"nextSibling")},prev:function(n){return de(n,"previousSibling")},nextAll:function(n){return ot(n,"nextSibling")},prevAll:function(n){return ot(n,"previousSibling")},nextUntil:function(n,s,o){return ot(n,"nextSibling",o)},prevUntil:function(n,s,o){return ot(n,"previousSibling",o)},siblings:function(n){return yt((n.parentNode||{}).firstChild,n)},children:function(n){return yt(n.firstChild)},contents:function(n){return n.contentDocument!=null&&r(n.contentDocument)?n.contentDocument:(J(n,"template")&&(n=n.content||n),h.merge([],n.childNodes))}},function(n,s){h.fn[n]=function(o,c){var u=h.map(this,s,o);return n.slice(-5)!=="Until"&&(c=o),c&&typeof c=="string"&&(u=h.filter(c,u)),this.length>1&&(Ve[n]||h.uniqueSort(u),It.test(n)&&u.reverse()),this.pushStack(u)}});var Wt=/[^\x20\t\r\n\f]+/g;function ye(n){var s={};return h.each(n.match(Wt)||[],function(o,c){s[c]=!0}),s}h.Callbacks=function(n){n=typeof n=="string"?ye(n):h.extend({},n);var s,o,c,u,p=[],_=[],k=-1,w=function(){for(u=u||n.once,c=s=!0;_.length;k=-1)for(o=_.shift();++k<p.length;)p[k].apply(o[0],o[1])===!1&&n.stopOnFalse&&(k=p.length,o=!1);n.memory||(o=!1),s=!1,u&&(o?p=[]:p="")},C={add:function(){return p&&(o&&!s&&(k=p.length-1,_.push(o)),function I(D){h.each(D,function(P,$){E($)?(!n.unique||!C.has($))&&p.push($):$&&$.length&&B($)!=="string"&&I($)})}(arguments),o&&!s&&w()),this},remove:function(){return h.each(arguments,function(I,D){for(var P;(P=h.inArray(D,p,P))>-1;)p.splice(P,1),P<=k&&k--}),this},has:function(I){return I?h.inArray(I,p)>-1:p.length>0},empty:function(){return p&&(p=[]),this},disable:function(){return u=_=[],p=o="",this},disabled:function(){return!p},lock:function(){return u=_=[],!o&&!s&&(p=o=""),this},locked:function(){return!!u},fireWith:function(I,D){return u||(D=D||[],D=[I,D.slice?D.slice():D],_.push(D),s||w()),this},fire:function(){return C.fireWith(this,arguments),this},fired:function(){return!!c}};return C};function te(n){return n}function lt(n){throw n}function pe(n,s,o,c){var u;try{n&&E(u=n.promise)?u.call(n).done(s).fail(o):n&&E(u=n.then)?u.call(n,s,o):s.apply(void 0,[n].slice(c))}catch(p){o.apply(void 0,[p])}}h.extend({Deferred:function(n){var s=[["notify","progress",h.Callbacks("memory"),h.Callbacks("memory"),2],["resolve","done",h.Callbacks("once memory"),h.Callbacks("once memory"),0,"resolved"],["reject","fail",h.Callbacks("once memory"),h.Callbacks("once memory"),1,"rejected"]],o="pending",c={state:function(){return o},always:function(){return u.done(arguments).fail(arguments),this},catch:function(p){return c.then(null,p)},pipe:function(){var p=arguments;return h.Deferred(function(_){h.each(s,function(k,w){var C=E(p[w[4]])&&p[w[4]];u[w[1]](function(){var I=C&&C.apply(this,arguments);I&&E(I.promise)?I.promise().progress(_.notify).done(_.resolve).fail(_.reject):_[w[0]+"With"](this,C?[I]:arguments)})}),p=null}).promise()},then:function(p,_,k){var w=0;function C(I,D,P,$){return function(){var bt=this,Lt=arguments,Et=function(){var se,Xe;if(!(I<w)){if(se=P.apply(bt,Lt),se===D.promise())throw new TypeError("Thenable self-resolution");Xe=se&&(typeof se=="object"||typeof se=="function")&&se.then,E(Xe)?$?Xe.call(se,C(w,D,te,$),C(w,D,lt,$)):(w++,Xe.call(se,C(w,D,te,$),C(w,D,lt,$),C(w,D,te,D.notifyWith))):(P!==te&&(bt=void 0,Lt=[se]),($||D.resolveWith)(bt,Lt))}},ce=$?Et:function(){try{Et()}catch(se){h.Deferred.exceptionHook&&h.Deferred.exceptionHook(se,ce.error),I+1>=w&&(P!==lt&&(bt=void 0,Lt=[se]),D.rejectWith(bt,Lt))}};I?ce():(h.Deferred.getErrorHook?ce.error=h.Deferred.getErrorHook():h.Deferred.getStackHook&&(ce.error=h.Deferred.getStackHook()),t.setTimeout(ce))}}return h.Deferred(function(I){s[0][3].add(C(0,I,E(k)?k:te,I.notifyWith)),s[1][3].add(C(0,I,E(p)?p:te)),s[2][3].add(C(0,I,E(_)?_:lt))}).promise()},promise:function(p){return p!=null?h.extend(p,c):c}},u={};return h.each(s,function(p,_){var k=_[2],w=_[5];c[_[1]]=k.add,w&&k.add(function(){o=w},s[3-p][2].disable,s[3-p][3].disable,s[0][2].lock,s[0][3].lock),k.add(_[3].fire),u[_[0]]=function(){return u[_[0]+"With"](this===u?void 0:this,arguments),this},u[_[0]+"With"]=k.fireWith}),c.promise(u),n&&n.call(u,u),u},when:function(n){var s=arguments.length,o=s,c=Array(o),u=a.call(arguments),p=h.Deferred(),_=function(k){return function(w){c[k]=this,u[k]=arguments.length>1?a.call(arguments):w,--s||p.resolveWith(c,u)}};if(s<=1&&(pe(n,p.done(_(o)).resolve,p.reject,!s),p.state()==="pending"||E(u[o]&&u[o].then)))return p.then();for(;o--;)pe(u[o],_(o),p.reject);return p.promise()}});var zi=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;h.Deferred.exceptionHook=function(n,s){t.console&&t.console.warn&&n&&zi.test(n.name)&&t.console.warn("jQuery.Deferred exception: "+n.message,n.stack,s)},h.readyException=function(n){t.setTimeout(function(){throw n})};var ai=h.Deferred();h.fn.ready=function(n){return ai.then(n).catch(function(s){h.readyException(s)}),this},h.extend({isReady:!1,readyWait:1,ready:function(n){(n===!0?--h.readyWait:h.isReady)||(h.isReady=!0,!(n!==!0&&--h.readyWait>0)&&ai.resolveWith(R,[h]))}}),h.ready.then=ai.then;function oi(){R.removeEventListener("DOMContentLoaded",oi),t.removeEventListener("load",oi),h.ready()}R.readyState==="complete"||R.readyState!=="loading"&&!R.documentElement.doScroll?t.setTimeout(h.ready):(R.addEventListener("DOMContentLoaded",oi),t.addEventListener("load",oi));var li=function(n,s,o,c,u,p,_){var k=0,w=n.length,C=o==null;if(B(o)==="object"){u=!0;for(k in o)li(n,s,k,o[k],!0,p,_)}else if(c!==void 0&&(u=!0,E(c)||(_=!0),C&&(_?(s.call(n,c),s=null):(C=s,s=function(I,D,P){return C.call(h(I),P)})),s))for(;k<w;k++)s(n[k],o,_?c:c.call(n[k],k,s(n[k],o)));return u?n:C?s.call(n):w?s(n[0],o):p},of=/^-ms-/,lf=/-([a-z])/g;function hf(n,s){return s.toUpperCase()}function $e(n){return n.replace(of,"ms-").replace(lf,hf)}var fn=function(n){return n.nodeType===1||n.nodeType===9||!+n.nodeType};function cn(){this.expando=h.expando+cn.uid++}cn.uid=1,cn.prototype={cache:function(n){var s=n[this.expando];return s||(s={},fn(n)&&(n.nodeType?n[this.expando]=s:Object.defineProperty(n,this.expando,{value:s,configurable:!0}))),s},set:function(n,s,o){var c,u=this.cache(n);if(typeof s=="string")u[$e(s)]=o;else for(c in s)u[$e(c)]=s[c];return u},get:function(n,s){return s===void 0?this.cache(n):n[this.expando]&&n[this.expando][$e(s)]},access:function(n,s,o){return s===void 0||s&&typeof s=="string"&&o===void 0?this.get(n,s):(this.set(n,s,o),o!==void 0?o:s)},remove:function(n,s){var o,c=n[this.expando];if(c!==void 0){if(s!==void 0)for(Array.isArray(s)?s=s.map($e):(s=$e(s),s=s in c?[s]:s.match(Wt)||[]),o=s.length;o--;)delete c[s[o]];(s===void 0||h.isEmptyObject(c))&&(n.nodeType?n[this.expando]=void 0:delete n[this.expando])}},hasData:function(n){var s=n[this.expando];return s!==void 0&&!h.isEmptyObject(s)}};var ht=new cn,we=new cn,ff=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,cf=/[A-Z]/g;function uf(n){return n==="true"?!0:n==="false"?!1:n==="null"?null:n===+n+""?+n:ff.test(n)?JSON.parse(n):n}function yo(n,s,o){var c;if(o===void 0&&n.nodeType===1)if(c="data-"+s.replace(cf,"-$&").toLowerCase(),o=n.getAttribute(c),typeof o=="string"){try{o=uf(o)}catch{}we.set(n,s,o)}else o=void 0;return o}h.extend({hasData:function(n){return we.hasData(n)||ht.hasData(n)},data:function(n,s,o){return we.access(n,s,o)},removeData:function(n,s){we.remove(n,s)},_data:function(n,s,o){return ht.access(n,s,o)},_removeData:function(n,s){ht.remove(n,s)}}),h.fn.extend({data:function(n,s){var o,c,u,p=this[0],_=p&&p.attributes;if(n===void 0){if(this.length&&(u=we.get(p),p.nodeType===1&&!ht.get(p,"hasDataAttrs"))){for(o=_.length;o--;)_[o]&&(c=_[o].name,c.indexOf("data-")===0&&(c=$e(c.slice(5)),yo(p,c,u[c])));ht.set(p,"hasDataAttrs",!0)}return u}return typeof n=="object"?this.each(function(){we.set(this,n)}):li(this,function(k){var w;if(p&&k===void 0)return w=we.get(p,n),w!==void 0||(w=yo(p,n),w!==void 0)?w:void 0;this.each(function(){we.set(this,n,k)})},null,s,arguments.length>1,null,!0)},removeData:function(n){return this.each(function(){we.remove(this,n)})}}),h.extend({queue:function(n,s,o){var c;if(n)return s=(s||"fx")+"queue",c=ht.get(n,s),o&&(!c||Array.isArray(o)?c=ht.access(n,s,h.makeArray(o)):c.push(o)),c||[]},dequeue:function(n,s){s=s||"fx";var o=h.queue(n,s),c=o.length,u=o.shift(),p=h._queueHooks(n,s),_=function(){h.dequeue(n,s)};u==="inprogress"&&(u=o.shift(),c--),u&&(s==="fx"&&o.unshift("inprogress"),delete p.stop,u.call(n,_,p)),!c&&p&&p.empty.fire()},_queueHooks:function(n,s){var o=s+"queueHooks";return ht.get(n,o)||ht.access(n,o,{empty:h.Callbacks("once memory").add(function(){ht.remove(n,[s+"queue",o])})})}}),h.fn.extend({queue:function(n,s){var o=2;return typeof n!="string"&&(s=n,n="fx",o--),arguments.length<o?h.queue(this[0],n):s===void 0?this:this.each(function(){var c=h.queue(this,n,s);h._queueHooks(this,n),n==="fx"&&c[0]!=="inprogress"&&h.dequeue(this,n)})},dequeue:function(n){return this.each(function(){h.dequeue(this,n)})},clearQueue:function(n){return this.queue(n||"fx",[])},promise:function(n,s){var o,c=1,u=h.Deferred(),p=this,_=this.length,k=function(){--c||u.resolveWith(p,[p])};for(typeof n!="string"&&(s=n,n=void 0),n=n||"fx";_--;)o=ht.get(p[_],n+"queueHooks"),o&&o.empty&&(c++,o.empty.add(k));return k(),u.promise(s)}});var bo=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,un=new RegExp("^(?:([+-])=|)("+bo+")([a-z%]*)$","i"),hi=["Top","Right","Bottom","Left"],Ei=R.documentElement,Wi=function(n){return h.contains(n.ownerDocument,n)},df={composed:!0};Ei.getRootNode&&(Wi=function(n){return h.contains(n.ownerDocument,n)||n.getRootNode(df)===n.ownerDocument});var Un=function(n,s){return n=s||n,n.style.display==="none"||n.style.display===""&&Wi(n)&&h.css(n,"display")==="none"};function vo(n,s,o,c){var u,p,_=20,k=c?function(){return c.cur()}:function(){return h.css(n,s,"")},w=k(),C=o&&o[3]||(h.cssNumber[s]?"":"px"),I=n.nodeType&&(h.cssNumber[s]||C!=="px"&&+w)&&un.exec(h.css(n,s));if(I&&I[3]!==C){for(w=w/2,C=C||I[3],I=+w||1;_--;)h.style(n,s,I+C),(1-p)*(1-(p=k()/w||.5))<=0&&(_=0),I=I/p;I=I*2,h.style(n,s,I+C),o=o||[]}return o&&(I=+I||+w||0,u=o[1]?I+(o[1]+1)*o[2]:+o[2],c&&(c.unit=C,c.start=I,c.end=u)),u}var xo={};function pf(n){var s,o=n.ownerDocument,c=n.nodeName,u=xo[c];return u||(s=o.body.appendChild(o.createElement(c)),u=h.css(s,"display"),s.parentNode.removeChild(s),u==="none"&&(u="block"),xo[c]=u,u)}function qi(n,s){for(var o,c,u=[],p=0,_=n.length;p<_;p++)c=n[p],c.style&&(o=c.style.display,s?(o==="none"&&(u[p]=ht.get(c,"display")||null,u[p]||(c.style.display="")),c.style.display===""&&Un(c)&&(u[p]=pf(c))):o!=="none"&&(u[p]="none",ht.set(c,"display",o)));for(p=0;p<_;p++)u[p]!=null&&(n[p].style.display=u[p]);return n}h.fn.extend({show:function(){return qi(this,!0)},hide:function(){return qi(this)},toggle:function(n){return typeof n=="boolean"?n?this.show():this.hide():this.each(function(){Un(this)?h(this).show():h(this).hide()})}});var dn=/^(?:checkbox|radio)$/i,wo=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,ko=/^$|^module$|\/(?:java|ecma)script/i;(function(){var n=R.createDocumentFragment(),s=n.appendChild(R.createElement("div")),o=R.createElement("input");o.setAttribute("type","radio"),o.setAttribute("checked","checked"),o.setAttribute("name","t"),s.appendChild(o),v.checkClone=s.cloneNode(!0).cloneNode(!0).lastChild.checked,s.innerHTML="<textarea>x</textarea>",v.noCloneChecked=!!s.cloneNode(!0).lastChild.defaultValue,s.innerHTML="<option></option>",v.option=!!s.lastChild})();var Ne={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Ne.tbody=Ne.tfoot=Ne.colgroup=Ne.caption=Ne.thead,Ne.th=Ne.td,v.option||(Ne.optgroup=Ne.option=[1,"<select multiple='multiple'>","</select>"]);function ke(n,s){var o;return typeof n.getElementsByTagName<"u"?o=n.getElementsByTagName(s||"*"):typeof n.querySelectorAll<"u"?o=n.querySelectorAll(s||"*"):o=[],s===void 0||s&&J(n,s)?h.merge([n],o):o}function Ss(n,s){for(var o=0,c=n.length;o<c;o++)ht.set(n[o],"globalEval",!s||ht.get(s[o],"globalEval"))}var gf=/<|&#?\w+;/;function To(n,s,o,c,u){for(var p,_,k,w,C,I,D=s.createDocumentFragment(),P=[],$=0,bt=n.length;$<bt;$++)if(p=n[$],p||p===0)if(B(p)==="object")h.merge(P,p.nodeType?[p]:p);else if(!gf.test(p))P.push(s.createTextNode(p));else{for(_=_||D.appendChild(s.createElement("div")),k=(wo.exec(p)||["",""])[1].toLowerCase(),w=Ne[k]||Ne._default,_.innerHTML=w[1]+h.htmlPrefilter(p)+w[2],I=w[0];I--;)_=_.lastChild;h.merge(P,_.childNodes),_=D.firstChild,_.textContent=""}for(D.textContent="",$=0;p=P[$++];){if(c&&h.inArray(p,c)>-1){u&&u.push(p);continue}if(C=Wi(p),_=ke(D.appendChild(p),"script"),C&&Ss(_),o)for(I=0;p=_[I++];)ko.test(p.type||"")&&o.push(p)}return D}var Eo=/^([^.]*)(?:\.(.+)|)/;function Hi(){return!0}function Ui(){return!1}function As(n,s,o,c,u,p){var _,k;if(typeof s=="object"){typeof o!="string"&&(c=c||o,o=void 0);for(k in s)As(n,k,o,c,s[k],p);return n}if(c==null&&u==null?(u=o,c=o=void 0):u==null&&(typeof o=="string"?(u=c,c=void 0):(u=c,c=o,o=void 0)),u===!1)u=Ui;else if(!u)return n;return p===1&&(_=u,u=function(w){return h().off(w),_.apply(this,arguments)},u.guid=_.guid||(_.guid=h.guid++)),n.each(function(){h.event.add(this,s,u,c,o)})}h.event={global:{},add:function(n,s,o,c,u){var p,_,k,w,C,I,D,P,$,bt,Lt,Et=ht.get(n);if(!!fn(n))for(o.handler&&(p=o,o=p.handler,u=p.selector),u&&h.find.matchesSelector(Ei,u),o.guid||(o.guid=h.guid++),(w=Et.events)||(w=Et.events=Object.create(null)),(_=Et.handle)||(_=Et.handle=function(ce){return typeof h<"u"&&h.event.triggered!==ce.type?h.event.dispatch.apply(n,arguments):void 0}),s=(s||"").match(Wt)||[""],C=s.length;C--;)k=Eo.exec(s[C])||[],$=Lt=k[1],bt=(k[2]||"").split(".").sort(),$&&(D=h.event.special[$]||{},$=(u?D.delegateType:D.bindType)||$,D=h.event.special[$]||{},I=h.extend({type:$,origType:Lt,data:c,handler:o,guid:o.guid,selector:u,needsContext:u&&h.expr.match.needsContext.test(u),namespace:bt.join(".")},p),(P=w[$])||(P=w[$]=[],P.delegateCount=0,(!D.setup||D.setup.call(n,c,bt,_)===!1)&&n.addEventListener&&n.addEventListener($,_)),D.add&&(D.add.call(n,I),I.handler.guid||(I.handler.guid=o.guid)),u?P.splice(P.delegateCount++,0,I):P.push(I),h.event.global[$]=!0)},remove:function(n,s,o,c,u){var p,_,k,w,C,I,D,P,$,bt,Lt,Et=ht.hasData(n)&&ht.get(n);if(!(!Et||!(w=Et.events))){for(s=(s||"").match(Wt)||[""],C=s.length;C--;){if(k=Eo.exec(s[C])||[],$=Lt=k[1],bt=(k[2]||"").split(".").sort(),!$){for($ in w)h.event.remove(n,$+s[C],o,c,!0);continue}for(D=h.event.special[$]||{},$=(c?D.delegateType:D.bindType)||$,P=w[$]||[],k=k[2]&&new RegExp("(^|\\.)"+bt.join("\\.(?:.*\\.|)")+"(\\.|$)"),_=p=P.length;p--;)I=P[p],(u||Lt===I.origType)&&(!o||o.guid===I.guid)&&(!k||k.test(I.namespace))&&(!c||c===I.selector||c==="**"&&I.selector)&&(P.splice(p,1),I.selector&&P.delegateCount--,D.remove&&D.remove.call(n,I));_&&!P.length&&((!D.teardown||D.teardown.call(n,bt,Et.handle)===!1)&&h.removeEvent(n,$,Et.handle),delete w[$])}h.isEmptyObject(w)&&ht.remove(n,"handle events")}},dispatch:function(n){var s,o,c,u,p,_,k=new Array(arguments.length),w=h.event.fix(n),C=(ht.get(this,"events")||Object.create(null))[w.type]||[],I=h.event.special[w.type]||{};for(k[0]=w,s=1;s<arguments.length;s++)k[s]=arguments[s];if(w.delegateTarget=this,!(I.preDispatch&&I.preDispatch.call(this,w)===!1)){for(_=h.event.handlers.call(this,w,C),s=0;(u=_[s++])&&!w.isPropagationStopped();)for(w.currentTarget=u.elem,o=0;(p=u.handlers[o++])&&!w.isImmediatePropagationStopped();)(!w.rnamespace||p.namespace===!1||w.rnamespace.test(p.namespace))&&(w.handleObj=p,w.data=p.data,c=((h.event.special[p.origType]||{}).handle||p.handler).apply(u.elem,k),c!==void 0&&(w.result=c)===!1&&(w.preventDefault(),w.stopPropagation()));return I.postDispatch&&I.postDispatch.call(this,w),w.result}},handlers:function(n,s){var o,c,u,p,_,k=[],w=s.delegateCount,C=n.target;if(w&&C.nodeType&&!(n.type==="click"&&n.button>=1)){for(;C!==this;C=C.parentNode||this)if(C.nodeType===1&&!(n.type==="click"&&C.disabled===!0)){for(p=[],_={},o=0;o<w;o++)c=s[o],u=c.selector+" ",_[u]===void 0&&(_[u]=c.needsContext?h(u,this).index(C)>-1:h.find(u,this,null,[C]).length),_[u]&&p.push(c);p.length&&k.push({elem:C,handlers:p})}}return C=this,w<s.length&&k.push({elem:C,handlers:s.slice(w)}),k},addProp:function(n,s){Object.defineProperty(h.Event.prototype,n,{enumerable:!0,configurable:!0,get:E(s)?function(){if(this.originalEvent)return s(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[n]},set:function(o){Object.defineProperty(this,n,{enumerable:!0,configurable:!0,writable:!0,value:o})}})},fix:function(n){return n[h.expando]?n:new h.Event(n)},special:{load:{noBubble:!0},click:{setup:function(n){var s=this||n;return dn.test(s.type)&&s.click&&J(s,"input")&&Vn(s,"click",!0),!1},trigger:function(n){var s=this||n;return dn.test(s.type)&&s.click&&J(s,"input")&&Vn(s,"click"),!0},_default:function(n){var s=n.target;return dn.test(s.type)&&s.click&&J(s,"input")&&ht.get(s,"click")||J(s,"a")}},beforeunload:{postDispatch:function(n){n.result!==void 0&&n.originalEvent&&(n.originalEvent.returnValue=n.result)}}}};function Vn(n,s,o){if(!o){ht.get(n,s)===void 0&&h.event.add(n,s,Hi);return}ht.set(n,s,!1),h.event.add(n,s,{namespace:!1,handler:function(c){var u,p=ht.get(this,s);if(c.isTrigger&1&&this[s]){if(p)(h.event.special[s]||{}).delegateType&&c.stopPropagation();else if(p=a.call(arguments),ht.set(this,s,p),this[s](),u=ht.get(this,s),ht.set(this,s,!1),p!==u)return c.stopImmediatePropagation(),c.preventDefault(),u}else p&&(ht.set(this,s,h.event.trigger(p[0],p.slice(1),this)),c.stopPropagation(),c.isImmediatePropagationStopped=Hi)}})}h.removeEvent=function(n,s,o){n.removeEventListener&&n.removeEventListener(s,o)},h.Event=function(n,s){if(!(this instanceof h.Event))return new h.Event(n,s);n&&n.type?(this.originalEvent=n,this.type=n.type,this.isDefaultPrevented=n.defaultPrevented||n.defaultPrevented===void 0&&n.returnValue===!1?Hi:Ui,this.target=n.target&&n.target.nodeType===3?n.target.parentNode:n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget):this.type=n,s&&h.extend(this,s),this.timeStamp=n&&n.timeStamp||Date.now(),this[h.expando]=!0},h.Event.prototype={constructor:h.Event,isDefaultPrevented:Ui,isPropagationStopped:Ui,isImmediatePropagationStopped:Ui,isSimulated:!1,preventDefault:function(){var n=this.originalEvent;this.isDefaultPrevented=Hi,n&&!this.isSimulated&&n.preventDefault()},stopPropagation:function(){var n=this.originalEvent;this.isPropagationStopped=Hi,n&&!this.isSimulated&&n.stopPropagation()},stopImmediatePropagation:function(){var n=this.originalEvent;this.isImmediatePropagationStopped=Hi,n&&!this.isSimulated&&n.stopImmediatePropagation(),this.stopPropagation()}},h.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},h.event.addProp),h.each({focus:"focusin",blur:"focusout"},function(n,s){function o(c){if(R.documentMode){var u=ht.get(this,"handle"),p=h.event.fix(c);p.type=c.type==="focusin"?"focus":"blur",p.isSimulated=!0,u(c),p.target===p.currentTarget&&u(p)}else h.event.simulate(s,c.target,h.event.fix(c))}h.event.special[n]={setup:function(){var c;if(Vn(this,n,!0),R.documentMode)c=ht.get(this,s),c||this.addEventListener(s,o),ht.set(this,s,(c||0)+1);else return!1},trigger:function(){return Vn(this,n),!0},teardown:function(){var c;if(R.documentMode)c=ht.get(this,s)-1,c?ht.set(this,s,c):(this.removeEventListener(s,o),ht.remove(this,s));else return!1},_default:function(c){return ht.get(c.target,n)},delegateType:s},h.event.special[s]={setup:function(){var c=this.ownerDocument||this.document||this,u=R.documentMode?this:c,p=ht.get(u,s);p||(R.documentMode?this.addEventListener(s,o):c.addEventListener(n,o,!0)),ht.set(u,s,(p||0)+1)},teardown:function(){var c=this.ownerDocument||this.document||this,u=R.documentMode?this:c,p=ht.get(u,s)-1;p?ht.set(u,s,p):(R.documentMode?this.removeEventListener(s,o):c.removeEventListener(n,o,!0),ht.remove(u,s))}}}),h.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(n,s){h.event.special[n]={delegateType:s,bindType:s,handle:function(o){var c,u=this,p=o.relatedTarget,_=o.handleObj;return(!p||p!==u&&!h.contains(u,p))&&(o.type=_.origType,c=_.handler.apply(this,arguments),o.type=s),c}}}),h.fn.extend({on:function(n,s,o,c){return As(this,n,s,o,c)},one:function(n,s,o,c){return As(this,n,s,o,c,1)},off:function(n,s,o){var c,u;if(n&&n.preventDefault&&n.handleObj)return c=n.handleObj,h(n.delegateTarget).off(c.namespace?c.origType+"."+c.namespace:c.origType,c.selector,c.handler),this;if(typeof n=="object"){for(u in n)this.off(u,s,n[u]);return this}return(s===!1||typeof s=="function")&&(o=s,s=void 0),o===!1&&(o=Ui),this.each(function(){h.event.remove(this,n,o,s)})}});var _f=/<script|<style|<link/i,mf=/checked\s*(?:[^=]|=\s*.checked.)/i,yf=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function So(n,s){return J(n,"table")&&J(s.nodeType!==11?s:s.firstChild,"tr")&&h(n).children("tbody")[0]||n}function bf(n){return n.type=(n.getAttribute("type")!==null)+"/"+n.type,n}function vf(n){return(n.type||"").slice(0,5)==="true/"?n.type=n.type.slice(5):n.removeAttribute("type"),n}function Ao(n,s){var o,c,u,p,_,k,w;if(s.nodeType===1){if(ht.hasData(n)&&(p=ht.get(n),w=p.events,w)){ht.remove(s,"handle events");for(u in w)for(o=0,c=w[u].length;o<c;o++)h.event.add(s,u,w[u][o])}we.hasData(n)&&(_=we.access(n),k=h.extend({},_),we.set(s,k))}}function xf(n,s){var o=s.nodeName.toLowerCase();o==="input"&&dn.test(n.type)?s.checked=n.checked:(o==="input"||o==="textarea")&&(s.defaultValue=n.defaultValue)}function Vi(n,s,o,c){s=f(s);var u,p,_,k,w,C,I=0,D=n.length,P=D-1,$=s[0],bt=E($);if(bt||D>1&&typeof $=="string"&&!v.checkClone&&mf.test($))return n.each(function(Lt){var Et=n.eq(Lt);bt&&(s[0]=$.call(this,Lt,Et.html())),Vi(Et,s,o,c)});if(D&&(u=To(s,n[0].ownerDocument,!1,n,c),p=u.firstChild,u.childNodes.length===1&&(u=p),p||c)){for(_=h.map(ke(u,"script"),bf),k=_.length;I<D;I++)w=u,I!==P&&(w=h.clone(w,!0,!0),k&&h.merge(_,ke(w,"script"))),o.call(n[I],w,I);if(k)for(C=_[_.length-1].ownerDocument,h.map(_,vf),I=0;I<k;I++)w=_[I],ko.test(w.type||"")&&!ht.access(w,"globalEval")&&h.contains(C,w)&&(w.src&&(w.type||"").toLowerCase()!=="module"?h._evalUrl&&!w.noModule&&h._evalUrl(w.src,{nonce:w.nonce||w.getAttribute("nonce")},C):F(w.textContent.replace(yf,""),w,C))}return n}function Co(n,s,o){for(var c,u=s?h.filter(s,n):n,p=0;(c=u[p])!=null;p++)!o&&c.nodeType===1&&h.cleanData(ke(c)),c.parentNode&&(o&&Wi(c)&&Ss(ke(c,"script")),c.parentNode.removeChild(c));return n}h.extend({htmlPrefilter:function(n){return n},clone:function(n,s,o){var c,u,p,_,k=n.cloneNode(!0),w=Wi(n);if(!v.noCloneChecked&&(n.nodeType===1||n.nodeType===11)&&!h.isXMLDoc(n))for(_=ke(k),p=ke(n),c=0,u=p.length;c<u;c++)xf(p[c],_[c]);if(s)if(o)for(p=p||ke(n),_=_||ke(k),c=0,u=p.length;c<u;c++)Ao(p[c],_[c]);else Ao(n,k);return _=ke(k,"script"),_.length>0&&Ss(_,!w&&ke(n,"script")),k},cleanData:function(n){for(var s,o,c,u=h.event.special,p=0;(o=n[p])!==void 0;p++)if(fn(o)){if(s=o[ht.expando]){if(s.events)for(c in s.events)u[c]?h.event.remove(o,c):h.removeEvent(o,c,s.handle);o[ht.expando]=void 0}o[we.expando]&&(o[we.expando]=void 0)}}}),h.fn.extend({detach:function(n){return Co(this,n,!0)},remove:function(n){return Co(this,n)},text:function(n){return li(this,function(s){return s===void 0?h.text(this):this.empty().each(function(){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&(this.textContent=s)})},null,n,arguments.length)},append:function(){return Vi(this,arguments,function(n){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var s=So(this,n);s.appendChild(n)}})},prepend:function(){return Vi(this,arguments,function(n){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var s=So(this,n);s.insertBefore(n,s.firstChild)}})},before:function(){return Vi(this,arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this)})},after:function(){return Vi(this,arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling)})},empty:function(){for(var n,s=0;(n=this[s])!=null;s++)n.nodeType===1&&(h.cleanData(ke(n,!1)),n.textContent="");return this},clone:function(n,s){return n=n??!1,s=s??n,this.map(function(){return h.clone(this,n,s)})},html:function(n){return li(this,function(s){var o=this[0]||{},c=0,u=this.length;if(s===void 0&&o.nodeType===1)return o.innerHTML;if(typeof s=="string"&&!_f.test(s)&&!Ne[(wo.exec(s)||["",""])[1].toLowerCase()]){s=h.htmlPrefilter(s);try{for(;c<u;c++)o=this[c]||{},o.nodeType===1&&(h.cleanData(ke(o,!1)),o.innerHTML=s);o=0}catch{}}o&&this.empty().append(s)},null,n,arguments.length)},replaceWith:function(){var n=[];return Vi(this,arguments,function(s){var o=this.parentNode;h.inArray(this,n)<0&&(h.cleanData(ke(this)),o&&o.replaceChild(s,this))},n)}}),h.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(n,s){h.fn[n]=function(o){for(var c,u=[],p=h(o),_=p.length-1,k=0;k<=_;k++)c=k===_?this:this.clone(!0),h(p[k])[s](c),l.apply(u,c.get());return this.pushStack(u)}});var Cs=new RegExp("^("+bo+")(?!px)[a-z%]+$","i"),Ms=/^--/,$n=function(n){var s=n.ownerDocument.defaultView;return(!s||!s.opener)&&(s=t),s.getComputedStyle(n)},Mo=function(n,s,o){var c,u,p={};for(u in s)p[u]=n.style[u],n.style[u]=s[u];c=o.call(n);for(u in s)n.style[u]=p[u];return c},wf=new RegExp(hi.join("|"),"i");(function(){function n(){if(!!C){w.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",C.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",Ei.appendChild(w).appendChild(C);var I=t.getComputedStyle(C);o=I.top!=="1%",k=s(I.marginLeft)===12,C.style.right="60%",p=s(I.right)===36,c=s(I.width)===36,C.style.position="absolute",u=s(C.offsetWidth/3)===12,Ei.removeChild(w),C=null}}function s(I){return Math.round(parseFloat(I))}var o,c,u,p,_,k,w=R.createElement("div"),C=R.createElement("div");!C.style||(C.style.backgroundClip="content-box",C.cloneNode(!0).style.backgroundClip="",v.clearCloneStyle=C.style.backgroundClip==="content-box",h.extend(v,{boxSizingReliable:function(){return n(),c},pixelBoxStyles:function(){return n(),p},pixelPosition:function(){return n(),o},reliableMarginLeft:function(){return n(),k},scrollboxSize:function(){return n(),u},reliableTrDimensions:function(){var I,D,P,$;return _==null&&(I=R.createElement("table"),D=R.createElement("tr"),P=R.createElement("div"),I.style.cssText="position:absolute;left:-11111px;border-collapse:separate",D.style.cssText="box-sizing:content-box;border:1px solid",D.style.height="1px",P.style.height="9px",P.style.display="block",Ei.appendChild(I).appendChild(D).appendChild(P),$=t.getComputedStyle(D),_=parseInt($.height,10)+parseInt($.borderTopWidth,10)+parseInt($.borderBottomWidth,10)===D.offsetHeight,Ei.removeChild(I)),_}}))})();function pn(n,s,o){var c,u,p,_,k=Ms.test(s),w=n.style;return o=o||$n(n),o&&(_=o.getPropertyValue(s)||o[s],k&&_&&(_=_.replace(Ft,"$1")||void 0),_===""&&!Wi(n)&&(_=h.style(n,s)),!v.pixelBoxStyles()&&Cs.test(_)&&wf.test(s)&&(c=w.width,u=w.minWidth,p=w.maxWidth,w.minWidth=w.maxWidth=w.width=_,_=o.width,w.width=c,w.minWidth=u,w.maxWidth=p)),_!==void 0?_+"":_}function Ro(n,s){return{get:function(){if(n()){delete this.get;return}return(this.get=s).apply(this,arguments)}}}var Oo=["Webkit","Moz","ms"],Po=R.createElement("div").style,Fo={};function kf(n){for(var s=n[0].toUpperCase()+n.slice(1),o=Oo.length;o--;)if(n=Oo[o]+s,n in Po)return n}function Rs(n){var s=h.cssProps[n]||Fo[n];return s||(n in Po?n:Fo[n]=kf(n)||n)}var Tf=/^(none|table(?!-c[ea]).+)/,Ef={position:"absolute",visibility:"hidden",display:"block"},No={letterSpacing:"0",fontWeight:"400"};function Io(n,s,o){var c=un.exec(s);return c?Math.max(0,c[2]-(o||0))+(c[3]||"px"):s}function Os(n,s,o,c,u,p){var _=s==="width"?1:0,k=0,w=0,C=0;if(o===(c?"border":"content"))return 0;for(;_<4;_+=2)o==="margin"&&(C+=h.css(n,o+hi[_],!0,u)),c?(o==="content"&&(w-=h.css(n,"padding"+hi[_],!0,u)),o!=="margin"&&(w-=h.css(n,"border"+hi[_]+"Width",!0,u))):(w+=h.css(n,"padding"+hi[_],!0,u),o!=="padding"?w+=h.css(n,"border"+hi[_]+"Width",!0,u):k+=h.css(n,"border"+hi[_]+"Width",!0,u));return!c&&p>=0&&(w+=Math.max(0,Math.ceil(n["offset"+s[0].toUpperCase()+s.slice(1)]-p-w-k-.5))||0),w+C}function Lo(n,s,o){var c=$n(n),u=!v.boxSizingReliable()||o,p=u&&h.css(n,"boxSizing",!1,c)==="border-box",_=p,k=pn(n,s,c),w="offset"+s[0].toUpperCase()+s.slice(1);if(Cs.test(k)){if(!o)return k;k="auto"}return(!v.boxSizingReliable()&&p||!v.reliableTrDimensions()&&J(n,"tr")||k==="auto"||!parseFloat(k)&&h.css(n,"display",!1,c)==="inline")&&n.getClientRects().length&&(p=h.css(n,"boxSizing",!1,c)==="border-box",_=w in n,_&&(k=n[w])),k=parseFloat(k)||0,k+Os(n,s,o||(p?"border":"content"),_,c,k)+"px"}h.extend({cssHooks:{opacity:{get:function(n,s){if(s){var o=pn(n,"opacity");return o===""?"1":o}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(n,s,o,c){if(!(!n||n.nodeType===3||n.nodeType===8||!n.style)){var u,p,_,k=$e(s),w=Ms.test(s),C=n.style;if(w||(s=Rs(k)),_=h.cssHooks[s]||h.cssHooks[k],o!==void 0){if(p=typeof o,p==="string"&&(u=un.exec(o))&&u[1]&&(o=vo(n,s,u),p="number"),o==null||o!==o)return;p==="number"&&!w&&(o+=u&&u[3]||(h.cssNumber[k]?"":"px")),!v.clearCloneStyle&&o===""&&s.indexOf("background")===0&&(C[s]="inherit"),(!_||!("set"in _)||(o=_.set(n,o,c))!==void 0)&&(w?C.setProperty(s,o):C[s]=o)}else return _&&"get"in _&&(u=_.get(n,!1,c))!==void 0?u:C[s]}},css:function(n,s,o,c){var u,p,_,k=$e(s),w=Ms.test(s);return w||(s=Rs(k)),_=h.cssHooks[s]||h.cssHooks[k],_&&"get"in _&&(u=_.get(n,!0,o)),u===void 0&&(u=pn(n,s,c)),u==="normal"&&s in No&&(u=No[s]),o===""||o?(p=parseFloat(u),o===!0||isFinite(p)?p||0:u):u}}),h.each(["height","width"],function(n,s){h.cssHooks[s]={get:function(o,c,u){if(c)return Tf.test(h.css(o,"display"))&&(!o.getClientRects().length||!o.getBoundingClientRect().width)?Mo(o,Ef,function(){return Lo(o,s,u)}):Lo(o,s,u)},set:function(o,c,u){var p,_=$n(o),k=!v.scrollboxSize()&&_.position==="absolute",w=k||u,C=w&&h.css(o,"boxSizing",!1,_)==="border-box",I=u?Os(o,s,u,C,_):0;return C&&k&&(I-=Math.ceil(o["offset"+s[0].toUpperCase()+s.slice(1)]-parseFloat(_[s])-Os(o,s,"border",!1,_)-.5)),I&&(p=un.exec(c))&&(p[3]||"px")!=="px"&&(o.style[s]=c,c=h.css(o,s)),Io(o,c,I)}}}),h.cssHooks.marginLeft=Ro(v.reliableMarginLeft,function(n,s){if(s)return(parseFloat(pn(n,"marginLeft"))||n.getBoundingClientRect().left-Mo(n,{marginLeft:0},function(){return n.getBoundingClientRect().left}))+"px"}),h.each({margin:"",padding:"",border:"Width"},function(n,s){h.cssHooks[n+s]={expand:function(o){for(var c=0,u={},p=typeof o=="string"?o.split(" "):[o];c<4;c++)u[n+hi[c]+s]=p[c]||p[c-2]||p[0];return u}},n!=="margin"&&(h.cssHooks[n+s].set=Io)}),h.fn.extend({css:function(n,s){return li(this,function(o,c,u){var p,_,k={},w=0;if(Array.isArray(c)){for(p=$n(o),_=c.length;w<_;w++)k[c[w]]=h.css(o,c[w],!1,p);return k}return u!==void 0?h.style(o,c,u):h.css(o,c)},n,s,arguments.length>1)}});function Te(n,s,o,c,u){return new Te.prototype.init(n,s,o,c,u)}h.Tween=Te,Te.prototype={constructor:Te,init:function(n,s,o,c,u,p){this.elem=n,this.prop=o,this.easing=u||h.easing._default,this.options=s,this.start=this.now=this.cur(),this.end=c,this.unit=p||(h.cssNumber[o]?"":"px")},cur:function(){var n=Te.propHooks[this.prop];return n&&n.get?n.get(this):Te.propHooks._default.get(this)},run:function(n){var s,o=Te.propHooks[this.prop];return this.options.duration?this.pos=s=h.easing[this.easing](n,this.options.duration*n,0,1,this.options.duration):this.pos=s=n,this.now=(this.end-this.start)*s+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),o&&o.set?o.set(this):Te.propHooks._default.set(this),this}},Te.prototype.init.prototype=Te.prototype,Te.propHooks={_default:{get:function(n){var s;return n.elem.nodeType!==1||n.elem[n.prop]!=null&&n.elem.style[n.prop]==null?n.elem[n.prop]:(s=h.css(n.elem,n.prop,""),!s||s==="auto"?0:s)},set:function(n){h.fx.step[n.prop]?h.fx.step[n.prop](n):n.elem.nodeType===1&&(h.cssHooks[n.prop]||n.elem.style[Rs(n.prop)]!=null)?h.style(n.elem,n.prop,n.now+n.unit):n.elem[n.prop]=n.now}}},Te.propHooks.scrollTop=Te.propHooks.scrollLeft={set:function(n){n.elem.nodeType&&n.elem.parentNode&&(n.elem[n.prop]=n.now)}},h.easing={linear:function(n){return n},swing:function(n){return .5-Math.cos(n*Math.PI)/2},_default:"swing"},h.fx=Te.prototype.init,h.fx.step={};var $i,Xn,Sf=/^(?:toggle|show|hide)$/,Af=/queueHooks$/;function Ps(){Xn&&(R.hidden===!1&&t.requestAnimationFrame?t.requestAnimationFrame(Ps):t.setTimeout(Ps,h.fx.interval),h.fx.tick())}function jo(){return t.setTimeout(function(){$i=void 0}),$i=Date.now()}function Yn(n,s){var o,c=0,u={height:n};for(s=s?1:0;c<4;c+=2-s)o=hi[c],u["margin"+o]=u["padding"+o]=n;return s&&(u.opacity=u.width=n),u}function Do(n,s,o){for(var c,u=(ze.tweeners[s]||[]).concat(ze.tweeners["*"]),p=0,_=u.length;p<_;p++)if(c=u[p].call(o,s,n))return c}function Cf(n,s,o){var c,u,p,_,k,w,C,I,D="width"in s||"height"in s,P=this,$={},bt=n.style,Lt=n.nodeType&&Un(n),Et=ht.get(n,"fxshow");o.queue||(_=h._queueHooks(n,"fx"),_.unqueued==null&&(_.unqueued=0,k=_.empty.fire,_.empty.fire=function(){_.unqueued||k()}),_.unqueued++,P.always(function(){P.always(function(){_.unqueued--,h.queue(n,"fx").length||_.empty.fire()})}));for(c in s)if(u=s[c],Sf.test(u)){if(delete s[c],p=p||u==="toggle",u===(Lt?"hide":"show"))if(u==="show"&&Et&&Et[c]!==void 0)Lt=!0;else continue;$[c]=Et&&Et[c]||h.style(n,c)}if(w=!h.isEmptyObject(s),!(!w&&h.isEmptyObject($))){D&&n.nodeType===1&&(o.overflow=[bt.overflow,bt.overflowX,bt.overflowY],C=Et&&Et.display,C==null&&(C=ht.get(n,"display")),I=h.css(n,"display"),I==="none"&&(C?I=C:(qi([n],!0),C=n.style.display||C,I=h.css(n,"display"),qi([n]))),(I==="inline"||I==="inline-block"&&C!=null)&&h.css(n,"float")==="none"&&(w||(P.done(function(){bt.display=C}),C==null&&(I=bt.display,C=I==="none"?"":I)),bt.display="inline-block")),o.overflow&&(bt.overflow="hidden",P.always(function(){bt.overflow=o.overflow[0],bt.overflowX=o.overflow[1],bt.overflowY=o.overflow[2]})),w=!1;for(c in $)w||(Et?"hidden"in Et&&(Lt=Et.hidden):Et=ht.access(n,"fxshow",{display:C}),p&&(Et.hidden=!Lt),Lt&&qi([n],!0),P.done(function(){Lt||qi([n]),ht.remove(n,"fxshow");for(c in $)h.style(n,c,$[c])})),w=Do(Lt?Et[c]:0,c,P),c in Et||(Et[c]=w.start,Lt&&(w.end=w.start,w.start=0))}}function Mf(n,s){var o,c,u,p,_;for(o in n)if(c=$e(o),u=s[c],p=n[o],Array.isArray(p)&&(u=p[1],p=n[o]=p[0]),o!==c&&(n[c]=p,delete n[o]),_=h.cssHooks[c],_&&"expand"in _){p=_.expand(p),delete n[c];for(o in p)o in n||(n[o]=p[o],s[o]=u)}else s[c]=u}function ze(n,s,o){var c,u,p=0,_=ze.prefilters.length,k=h.Deferred().always(function(){delete w.elem}),w=function(){if(u)return!1;for(var D=$i||jo(),P=Math.max(0,C.startTime+C.duration-D),$=P/C.duration||0,bt=1-$,Lt=0,Et=C.tweens.length;Lt<Et;Lt++)C.tweens[Lt].run(bt);return k.notifyWith(n,[C,bt,P]),bt<1&&Et?P:(Et||k.notifyWith(n,[C,1,0]),k.resolveWith(n,[C]),!1)},C=k.promise({elem:n,props:h.extend({},s),opts:h.extend(!0,{specialEasing:{},easing:h.easing._default},o),originalProperties:s,originalOptions:o,startTime:$i||jo(),duration:o.duration,tweens:[],createTween:function(D,P){var $=h.Tween(n,C.opts,D,P,C.opts.specialEasing[D]||C.opts.easing);return C.tweens.push($),$},stop:function(D){var P=0,$=D?C.tweens.length:0;if(u)return this;for(u=!0;P<$;P++)C.tweens[P].run(1);return D?(k.notifyWith(n,[C,1,0]),k.resolveWith(n,[C,D])):k.rejectWith(n,[C,D]),this}}),I=C.props;for(Mf(I,C.opts.specialEasing);p<_;p++)if(c=ze.prefilters[p].call(C,n,I,C.opts),c)return E(c.stop)&&(h._queueHooks(C.elem,C.opts.queue).stop=c.stop.bind(c)),c;return h.map(I,Do,C),E(C.opts.start)&&C.opts.start.call(n,C),C.progress(C.opts.progress).done(C.opts.done,C.opts.complete).fail(C.opts.fail).always(C.opts.always),h.fx.timer(h.extend(w,{elem:n,anim:C,queue:C.opts.queue})),C}h.Animation=h.extend(ze,{tweeners:{"*":[function(n,s){var o=this.createTween(n,s);return vo(o.elem,n,un.exec(s),o),o}]},tweener:function(n,s){E(n)?(s=n,n=["*"]):n=n.match(Wt);for(var o,c=0,u=n.length;c<u;c++)o=n[c],ze.tweeners[o]=ze.tweeners[o]||[],ze.tweeners[o].unshift(s)},prefilters:[Cf],prefilter:function(n,s){s?ze.prefilters.unshift(n):ze.prefilters.push(n)}}),h.speed=function(n,s,o){var c=n&&typeof n=="object"?h.extend({},n):{complete:o||!o&&s||E(n)&&n,duration:n,easing:o&&s||s&&!E(s)&&s};return h.fx.off?c.duration=0:typeof c.duration!="number"&&(c.duration in h.fx.speeds?c.duration=h.fx.speeds[c.duration]:c.duration=h.fx.speeds._default),(c.queue==null||c.queue===!0)&&(c.queue="fx"),c.old=c.complete,c.complete=function(){E(c.old)&&c.old.call(this),c.queue&&h.dequeue(this,c.queue)},c},h.fn.extend({fadeTo:function(n,s,o,c){return this.filter(Un).css("opacity",0).show().end().animate({opacity:s},n,o,c)},animate:function(n,s,o,c){var u=h.isEmptyObject(n),p=h.speed(s,o,c),_=function(){var k=ze(this,h.extend({},n),p);(u||ht.get(this,"finish"))&&k.stop(!0)};return _.finish=_,u||p.queue===!1?this.each(_):this.queue(p.queue,_)},stop:function(n,s,o){var c=function(u){var p=u.stop;delete u.stop,p(o)};return typeof n!="string"&&(o=s,s=n,n=void 0),s&&this.queue(n||"fx",[]),this.each(function(){var u=!0,p=n!=null&&n+"queueHooks",_=h.timers,k=ht.get(this);if(p)k[p]&&k[p].stop&&c(k[p]);else for(p in k)k[p]&&k[p].stop&&Af.test(p)&&c(k[p]);for(p=_.length;p--;)_[p].elem===this&&(n==null||_[p].queue===n)&&(_[p].anim.stop(o),u=!1,_.splice(p,1));(u||!o)&&h.dequeue(this,n)})},finish:function(n){return n!==!1&&(n=n||"fx"),this.each(function(){var s,o=ht.get(this),c=o[n+"queue"],u=o[n+"queueHooks"],p=h.timers,_=c?c.length:0;for(o.finish=!0,h.queue(this,n,[]),u&&u.stop&&u.stop.call(this,!0),s=p.length;s--;)p[s].elem===this&&p[s].queue===n&&(p[s].anim.stop(!0),p.splice(s,1));for(s=0;s<_;s++)c[s]&&c[s].finish&&c[s].finish.call(this);delete o.finish})}}),h.each(["toggle","show","hide"],function(n,s){var o=h.fn[s];h.fn[s]=function(c,u,p){return c==null||typeof c=="boolean"?o.apply(this,arguments):this.animate(Yn(s,!0),c,u,p)}}),h.each({slideDown:Yn("show"),slideUp:Yn("hide"),slideToggle:Yn("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(n,s){h.fn[n]=function(o,c,u){return this.animate(s,o,c,u)}}),h.timers=[],h.fx.tick=function(){var n,s=0,o=h.timers;for($i=Date.now();s<o.length;s++)n=o[s],!n()&&o[s]===n&&o.splice(s--,1);o.length||h.fx.stop(),$i=void 0},h.fx.timer=function(n){h.timers.push(n),h.fx.start()},h.fx.interval=13,h.fx.start=function(){Xn||(Xn=!0,Ps())},h.fx.stop=function(){Xn=null},h.fx.speeds={slow:600,fast:200,_default:400},h.fn.delay=function(n,s){return n=h.fx&&h.fx.speeds[n]||n,s=s||"fx",this.queue(s,function(o,c){var u=t.setTimeout(o,n);c.stop=function(){t.clearTimeout(u)}})},function(){var n=R.createElement("input"),s=R.createElement("select"),o=s.appendChild(R.createElement("option"));n.type="checkbox",v.checkOn=n.value!=="",v.optSelected=o.selected,n=R.createElement("input"),n.value="t",n.type="radio",v.radioValue=n.value==="t"}();var Bo,gn=h.expr.attrHandle;h.fn.extend({attr:function(n,s){return li(this,h.attr,n,s,arguments.length>1)},removeAttr:function(n){return this.each(function(){h.removeAttr(this,n)})}}),h.extend({attr:function(n,s,o){var c,u,p=n.nodeType;if(!(p===3||p===8||p===2)){if(typeof n.getAttribute>"u")return h.prop(n,s,o);if((p!==1||!h.isXMLDoc(n))&&(u=h.attrHooks[s.toLowerCase()]||(h.expr.match.bool.test(s)?Bo:void 0)),o!==void 0){if(o===null){h.removeAttr(n,s);return}return u&&"set"in u&&(c=u.set(n,o,s))!==void 0?c:(n.setAttribute(s,o+""),o)}return u&&"get"in u&&(c=u.get(n,s))!==null?c:(c=h.find.attr(n,s),c??void 0)}},attrHooks:{type:{set:function(n,s){if(!v.radioValue&&s==="radio"&&J(n,"input")){var o=n.value;return n.setAttribute("type",s),o&&(n.value=o),s}}}},removeAttr:function(n,s){var o,c=0,u=s&&s.match(Wt);if(u&&n.nodeType===1)for(;o=u[c++];)n.removeAttribute(o)}}),Bo={set:function(n,s,o){return s===!1?h.removeAttr(n,o):n.setAttribute(o,o),o}},h.each(h.expr.match.bool.source.match(/\w+/g),function(n,s){var o=gn[s]||h.find.attr;gn[s]=function(c,u,p){var _,k,w=u.toLowerCase();return p||(k=gn[w],gn[w]=_,_=o(c,u,p)!=null?w:null,gn[w]=k),_}});var Rf=/^(?:input|select|textarea|button)$/i,Of=/^(?:a|area)$/i;h.fn.extend({prop:function(n,s){return li(this,h.prop,n,s,arguments.length>1)},removeProp:function(n){return this.each(function(){delete this[h.propFix[n]||n]})}}),h.extend({prop:function(n,s,o){var c,u,p=n.nodeType;if(!(p===3||p===8||p===2))return(p!==1||!h.isXMLDoc(n))&&(s=h.propFix[s]||s,u=h.propHooks[s]),o!==void 0?u&&"set"in u&&(c=u.set(n,o,s))!==void 0?c:n[s]=o:u&&"get"in u&&(c=u.get(n,s))!==null?c:n[s]},propHooks:{tabIndex:{get:function(n){var s=h.find.attr(n,"tabindex");return s?parseInt(s,10):Rf.test(n.nodeName)||Of.test(n.nodeName)&&n.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(h.propHooks.selected={get:function(n){var s=n.parentNode;return s&&s.parentNode&&s.parentNode.selectedIndex,null},set:function(n){var s=n.parentNode;s&&(s.selectedIndex,s.parentNode&&s.parentNode.selectedIndex)}}),h.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){h.propFix[this.toLowerCase()]=this});function Si(n){var s=n.match(Wt)||[];return s.join(" ")}function Ai(n){return n.getAttribute&&n.getAttribute("class")||""}function Fs(n){return Array.isArray(n)?n:typeof n=="string"?n.match(Wt)||[]:[]}h.fn.extend({addClass:function(n){var s,o,c,u,p,_;return E(n)?this.each(function(k){h(this).addClass(n.call(this,k,Ai(this)))}):(s=Fs(n),s.length?this.each(function(){if(c=Ai(this),o=this.nodeType===1&&" "+Si(c)+" ",o){for(p=0;p<s.length;p++)u=s[p],o.indexOf(" "+u+" ")<0&&(o+=u+" ");_=Si(o),c!==_&&this.setAttribute("class",_)}}):this)},removeClass:function(n){var s,o,c,u,p,_;return E(n)?this.each(function(k){h(this).removeClass(n.call(this,k,Ai(this)))}):arguments.length?(s=Fs(n),s.length?this.each(function(){if(c=Ai(this),o=this.nodeType===1&&" "+Si(c)+" ",o){for(p=0;p<s.length;p++)for(u=s[p];o.indexOf(" "+u+" ")>-1;)o=o.replace(" "+u+" "," ");_=Si(o),c!==_&&this.setAttribute("class",_)}}):this):this.attr("class","")},toggleClass:function(n,s){var o,c,u,p,_=typeof n,k=_==="string"||Array.isArray(n);return E(n)?this.each(function(w){h(this).toggleClass(n.call(this,w,Ai(this),s),s)}):typeof s=="boolean"&&k?s?this.addClass(n):this.removeClass(n):(o=Fs(n),this.each(function(){if(k)for(p=h(this),u=0;u<o.length;u++)c=o[u],p.hasClass(c)?p.removeClass(c):p.addClass(c);else(n===void 0||_==="boolean")&&(c=Ai(this),c&&ht.set(this,"__className__",c),this.setAttribute&&this.setAttribute("class",c||n===!1?"":ht.get(this,"__className__")||""))}))},hasClass:function(n){var s,o,c=0;for(s=" "+n+" ";o=this[c++];)if(o.nodeType===1&&(" "+Si(Ai(o))+" ").indexOf(s)>-1)return!0;return!1}});var Pf=/\r/g;h.fn.extend({val:function(n){var s,o,c,u=this[0];return arguments.length?(c=E(n),this.each(function(p){var _;this.nodeType===1&&(c?_=n.call(this,p,h(this).val()):_=n,_==null?_="":typeof _=="number"?_+="":Array.isArray(_)&&(_=h.map(_,function(k){return k==null?"":k+""})),s=h.valHooks[this.type]||h.valHooks[this.nodeName.toLowerCase()],(!s||!("set"in s)||s.set(this,_,"value")===void 0)&&(this.value=_))})):u?(s=h.valHooks[u.type]||h.valHooks[u.nodeName.toLowerCase()],s&&"get"in s&&(o=s.get(u,"value"))!==void 0?o:(o=u.value,typeof o=="string"?o.replace(Pf,""):o??"")):void 0}}),h.extend({valHooks:{option:{get:function(n){var s=h.find.attr(n,"value");return s??Si(h.text(n))}},select:{get:function(n){var s,o,c,u=n.options,p=n.selectedIndex,_=n.type==="select-one",k=_?null:[],w=_?p+1:u.length;for(p<0?c=w:c=_?p:0;c<w;c++)if(o=u[c],(o.selected||c===p)&&!o.disabled&&(!o.parentNode.disabled||!J(o.parentNode,"optgroup"))){if(s=h(o).val(),_)return s;k.push(s)}return k},set:function(n,s){for(var o,c,u=n.options,p=h.makeArray(s),_=u.length;_--;)c=u[_],(c.selected=h.inArray(h.valHooks.option.get(c),p)>-1)&&(o=!0);return o||(n.selectedIndex=-1),p}}}}),h.each(["radio","checkbox"],function(){h.valHooks[this]={set:function(n,s){if(Array.isArray(s))return n.checked=h.inArray(h(n).val(),s)>-1}},v.checkOn||(h.valHooks[this].get=function(n){return n.getAttribute("value")===null?"on":n.value})});var _n=t.location,zo={guid:Date.now()},Ns=/\?/;h.parseXML=function(n){var s,o;if(!n||typeof n!="string")return null;try{s=new t.DOMParser().parseFromString(n,"text/xml")}catch{}return o=s&&s.getElementsByTagName("parsererror")[0],(!s||o)&&h.error("Invalid XML: "+(o?h.map(o.childNodes,function(c){return c.textContent}).join(`
`):n)),s};var Wo=/^(?:focusinfocus|focusoutblur)$/,qo=function(n){n.stopPropagation()};h.extend(h.event,{trigger:function(n,s,o,c){var u,p,_,k,w,C,I,D,P=[o||R],$=x.call(n,"type")?n.type:n,bt=x.call(n,"namespace")?n.namespace.split("."):[];if(p=D=_=o=o||R,!(o.nodeType===3||o.nodeType===8)&&!Wo.test($+h.event.triggered)&&($.indexOf(".")>-1&&(bt=$.split("."),$=bt.shift(),bt.sort()),w=$.indexOf(":")<0&&"on"+$,n=n[h.expando]?n:new h.Event($,typeof n=="object"&&n),n.isTrigger=c?2:3,n.namespace=bt.join("."),n.rnamespace=n.namespace?new RegExp("(^|\\.)"+bt.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=void 0,n.target||(n.target=o),s=s==null?[n]:h.makeArray(s,[n]),I=h.event.special[$]||{},!(!c&&I.trigger&&I.trigger.apply(o,s)===!1))){if(!c&&!I.noBubble&&!L(o)){for(k=I.delegateType||$,Wo.test(k+$)||(p=p.parentNode);p;p=p.parentNode)P.push(p),_=p;_===(o.ownerDocument||R)&&P.push(_.defaultView||_.parentWindow||t)}for(u=0;(p=P[u++])&&!n.isPropagationStopped();)D=p,n.type=u>1?k:I.bindType||$,C=(ht.get(p,"events")||Object.create(null))[n.type]&&ht.get(p,"handle"),C&&C.apply(p,s),C=w&&p[w],C&&C.apply&&fn(p)&&(n.result=C.apply(p,s),n.result===!1&&n.preventDefault());return n.type=$,!c&&!n.isDefaultPrevented()&&(!I._default||I._default.apply(P.pop(),s)===!1)&&fn(o)&&w&&E(o[$])&&!L(o)&&(_=o[w],_&&(o[w]=null),h.event.triggered=$,n.isPropagationStopped()&&D.addEventListener($,qo),o[$](),n.isPropagationStopped()&&D.removeEventListener($,qo),h.event.triggered=void 0,_&&(o[w]=_)),n.result}},simulate:function(n,s,o){var c=h.extend(new h.Event,o,{type:n,isSimulated:!0});h.event.trigger(c,null,s)}}),h.fn.extend({trigger:function(n,s){return this.each(function(){h.event.trigger(n,s,this)})},triggerHandler:function(n,s){var o=this[0];if(o)return h.event.trigger(n,s,o,!0)}});var Ff=/\[\]$/,Ho=/\r?\n/g,Nf=/^(?:submit|button|image|reset|file)$/i,If=/^(?:input|select|textarea|keygen)/i;function Is(n,s,o,c){var u;if(Array.isArray(s))h.each(s,function(p,_){o||Ff.test(n)?c(n,_):Is(n+"["+(typeof _=="object"&&_!=null?p:"")+"]",_,o,c)});else if(!o&&B(s)==="object")for(u in s)Is(n+"["+u+"]",s[u],o,c);else c(n,s)}h.param=function(n,s){var o,c=[],u=function(p,_){var k=E(_)?_():_;c[c.length]=encodeURIComponent(p)+"="+encodeURIComponent(k??"")};if(n==null)return"";if(Array.isArray(n)||n.jquery&&!h.isPlainObject(n))h.each(n,function(){u(this.name,this.value)});else for(o in n)Is(o,n[o],s,u);return c.join("&")},h.fn.extend({serialize:function(){return h.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var n=h.prop(this,"elements");return n?h.makeArray(n):this}).filter(function(){var n=this.type;return this.name&&!h(this).is(":disabled")&&If.test(this.nodeName)&&!Nf.test(n)&&(this.checked||!dn.test(n))}).map(function(n,s){var o=h(this).val();return o==null?null:Array.isArray(o)?h.map(o,function(c){return{name:s.name,value:c.replace(Ho,`\r
`)}}):{name:s.name,value:o.replace(Ho,`\r
`)}}).get()}});var Lf=/%20/g,jf=/#.*$/,Df=/([?&])_=[^&]*/,Bf=/^(.*?):[ \t]*([^\r\n]*)$/mg,zf=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Wf=/^(?:GET|HEAD)$/,qf=/^\/\//,Uo={},Ls={},Vo="*/".concat("*"),js=R.createElement("a");js.href=_n.href;function $o(n){return function(s,o){typeof s!="string"&&(o=s,s="*");var c,u=0,p=s.toLowerCase().match(Wt)||[];if(E(o))for(;c=p[u++];)c[0]==="+"?(c=c.slice(1)||"*",(n[c]=n[c]||[]).unshift(o)):(n[c]=n[c]||[]).push(o)}}function Xo(n,s,o,c){var u={},p=n===Ls;function _(k){var w;return u[k]=!0,h.each(n[k]||[],function(C,I){var D=I(s,o,c);if(typeof D=="string"&&!p&&!u[D])return s.dataTypes.unshift(D),_(D),!1;if(p)return!(w=D)}),w}return _(s.dataTypes[0])||!u["*"]&&_("*")}function Ds(n,s){var o,c,u=h.ajaxSettings.flatOptions||{};for(o in s)s[o]!==void 0&&((u[o]?n:c||(c={}))[o]=s[o]);return c&&h.extend(!0,n,c),n}function Hf(n,s,o){for(var c,u,p,_,k=n.contents,w=n.dataTypes;w[0]==="*";)w.shift(),c===void 0&&(c=n.mimeType||s.getResponseHeader("Content-Type"));if(c){for(u in k)if(k[u]&&k[u].test(c)){w.unshift(u);break}}if(w[0]in o)p=w[0];else{for(u in o){if(!w[0]||n.converters[u+" "+w[0]]){p=u;break}_||(_=u)}p=p||_}if(p)return p!==w[0]&&w.unshift(p),o[p]}function Uf(n,s,o,c){var u,p,_,k,w,C={},I=n.dataTypes.slice();if(I[1])for(_ in n.converters)C[_.toLowerCase()]=n.converters[_];for(p=I.shift();p;)if(n.responseFields[p]&&(o[n.responseFields[p]]=s),!w&&c&&n.dataFilter&&(s=n.dataFilter(s,n.dataType)),w=p,p=I.shift(),p){if(p==="*")p=w;else if(w!=="*"&&w!==p){if(_=C[w+" "+p]||C["* "+p],!_){for(u in C)if(k=u.split(" "),k[1]===p&&(_=C[w+" "+k[0]]||C["* "+k[0]],_)){_===!0?_=C[u]:C[u]!==!0&&(p=k[0],I.unshift(k[1]));break}}if(_!==!0)if(_&&n.throws)s=_(s);else try{s=_(s)}catch(D){return{state:"parsererror",error:_?D:"No conversion from "+w+" to "+p}}}}return{state:"success",data:s}}h.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:_n.href,type:"GET",isLocal:zf.test(_n.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Vo,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":h.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(n,s){return s?Ds(Ds(n,h.ajaxSettings),s):Ds(h.ajaxSettings,n)},ajaxPrefilter:$o(Uo),ajaxTransport:$o(Ls),ajax:function(n,s){typeof n=="object"&&(s=n,n=void 0),s=s||{};var o,c,u,p,_,k,w,C,I,D,P=h.ajaxSetup({},s),$=P.context||P,bt=P.context&&($.nodeType||$.jquery)?h($):h.event,Lt=h.Deferred(),Et=h.Callbacks("once memory"),ce=P.statusCode||{},se={},Xe={},Ye="canceled",Ot={readyState:0,getResponseHeader:function(jt){var Qt;if(w){if(!p)for(p={};Qt=Bf.exec(u);)p[Qt[1].toLowerCase()+" "]=(p[Qt[1].toLowerCase()+" "]||[]).concat(Qt[2]);Qt=p[jt.toLowerCase()+" "]}return Qt==null?null:Qt.join(", ")},getAllResponseHeaders:function(){return w?u:null},setRequestHeader:function(jt,Qt){return w==null&&(jt=Xe[jt.toLowerCase()]=Xe[jt.toLowerCase()]||jt,se[jt]=Qt),this},overrideMimeType:function(jt){return w==null&&(P.mimeType=jt),this},statusCode:function(jt){var Qt;if(jt)if(w)Ot.always(jt[Ot.status]);else for(Qt in jt)ce[Qt]=[ce[Qt],jt[Qt]];return this},abort:function(jt){var Qt=jt||Ye;return o&&o.abort(Qt),Ci(0,Qt),this}};if(Lt.promise(Ot),P.url=((n||P.url||_n.href)+"").replace(qf,_n.protocol+"//"),P.type=s.method||s.type||P.method||P.type,P.dataTypes=(P.dataType||"*").toLowerCase().match(Wt)||[""],P.crossDomain==null){k=R.createElement("a");try{k.href=P.url,k.href=k.href,P.crossDomain=js.protocol+"//"+js.host!=k.protocol+"//"+k.host}catch{P.crossDomain=!0}}if(P.data&&P.processData&&typeof P.data!="string"&&(P.data=h.param(P.data,P.traditional)),Xo(Uo,P,s,Ot),w)return Ot;C=h.event&&P.global,C&&h.active++===0&&h.event.trigger("ajaxStart"),P.type=P.type.toUpperCase(),P.hasContent=!Wf.test(P.type),c=P.url.replace(jf,""),P.hasContent?P.data&&P.processData&&(P.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&(P.data=P.data.replace(Lf,"+")):(D=P.url.slice(c.length),P.data&&(P.processData||typeof P.data=="string")&&(c+=(Ns.test(c)?"&":"?")+P.data,delete P.data),P.cache===!1&&(c=c.replace(Df,"$1"),D=(Ns.test(c)?"&":"?")+"_="+zo.guid+++D),P.url=c+D),P.ifModified&&(h.lastModified[c]&&Ot.setRequestHeader("If-Modified-Since",h.lastModified[c]),h.etag[c]&&Ot.setRequestHeader("If-None-Match",h.etag[c])),(P.data&&P.hasContent&&P.contentType!==!1||s.contentType)&&Ot.setRequestHeader("Content-Type",P.contentType),Ot.setRequestHeader("Accept",P.dataTypes[0]&&P.accepts[P.dataTypes[0]]?P.accepts[P.dataTypes[0]]+(P.dataTypes[0]!=="*"?", "+Vo+"; q=0.01":""):P.accepts["*"]);for(I in P.headers)Ot.setRequestHeader(I,P.headers[I]);if(P.beforeSend&&(P.beforeSend.call($,Ot,P)===!1||w))return Ot.abort();if(Ye="abort",Et.add(P.complete),Ot.done(P.success),Ot.fail(P.error),o=Xo(Ls,P,s,Ot),!o)Ci(-1,"No Transport");else{if(Ot.readyState=1,C&&bt.trigger("ajaxSend",[Ot,P]),w)return Ot;P.async&&P.timeout>0&&(_=t.setTimeout(function(){Ot.abort("timeout")},P.timeout));try{w=!1,o.send(se,Ci)}catch(jt){if(w)throw jt;Ci(-1,jt)}}function Ci(jt,Qt,yn,zs){var Ge,bn,Ke,pi,gi,Ie=Qt;w||(w=!0,_&&t.clearTimeout(_),o=void 0,u=zs||"",Ot.readyState=jt>0?4:0,Ge=jt>=200&&jt<300||jt===304,yn&&(pi=Hf(P,Ot,yn)),!Ge&&h.inArray("script",P.dataTypes)>-1&&h.inArray("json",P.dataTypes)<0&&(P.converters["text script"]=function(){}),pi=Uf(P,pi,Ot,Ge),Ge?(P.ifModified&&(gi=Ot.getResponseHeader("Last-Modified"),gi&&(h.lastModified[c]=gi),gi=Ot.getResponseHeader("etag"),gi&&(h.etag[c]=gi)),jt===204||P.type==="HEAD"?Ie="nocontent":jt===304?Ie="notmodified":(Ie=pi.state,bn=pi.data,Ke=pi.error,Ge=!Ke)):(Ke=Ie,(jt||!Ie)&&(Ie="error",jt<0&&(jt=0))),Ot.status=jt,Ot.statusText=(Qt||Ie)+"",Ge?Lt.resolveWith($,[bn,Ie,Ot]):Lt.rejectWith($,[Ot,Ie,Ke]),Ot.statusCode(ce),ce=void 0,C&&bt.trigger(Ge?"ajaxSuccess":"ajaxError",[Ot,P,Ge?bn:Ke]),Et.fireWith($,[Ot,Ie]),C&&(bt.trigger("ajaxComplete",[Ot,P]),--h.active||h.event.trigger("ajaxStop")))}return Ot},getJSON:function(n,s,o){return h.get(n,s,o,"json")},getScript:function(n,s){return h.get(n,void 0,s,"script")}}),h.each(["get","post"],function(n,s){h[s]=function(o,c,u,p){return E(c)&&(p=p||u,u=c,c=void 0),h.ajax(h.extend({url:o,type:s,dataType:p,data:c,success:u},h.isPlainObject(o)&&o))}}),h.ajaxPrefilter(function(n){var s;for(s in n.headers)s.toLowerCase()==="content-type"&&(n.contentType=n.headers[s]||"")}),h._evalUrl=function(n,s,o){return h.ajax({url:n,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(c){h.globalEval(c,s,o)}})},h.fn.extend({wrapAll:function(n){var s;return this[0]&&(E(n)&&(n=n.call(this[0])),s=h(n,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&s.insertBefore(this[0]),s.map(function(){for(var o=this;o.firstElementChild;)o=o.firstElementChild;return o}).append(this)),this},wrapInner:function(n){return E(n)?this.each(function(s){h(this).wrapInner(n.call(this,s))}):this.each(function(){var s=h(this),o=s.contents();o.length?o.wrapAll(n):s.append(n)})},wrap:function(n){var s=E(n);return this.each(function(o){h(this).wrapAll(s?n.call(this,o):n)})},unwrap:function(n){return this.parent(n).not("body").each(function(){h(this).replaceWith(this.childNodes)}),this}}),h.expr.pseudos.hidden=function(n){return!h.expr.pseudos.visible(n)},h.expr.pseudos.visible=function(n){return!!(n.offsetWidth||n.offsetHeight||n.getClientRects().length)},h.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch{}};var Vf={0:200,1223:204},mn=h.ajaxSettings.xhr();v.cors=!!mn&&"withCredentials"in mn,v.ajax=mn=!!mn,h.ajaxTransport(function(n){var s,o;if(v.cors||mn&&!n.crossDomain)return{send:function(c,u){var p,_=n.xhr();if(_.open(n.type,n.url,n.async,n.username,n.password),n.xhrFields)for(p in n.xhrFields)_[p]=n.xhrFields[p];n.mimeType&&_.overrideMimeType&&_.overrideMimeType(n.mimeType),!n.crossDomain&&!c["X-Requested-With"]&&(c["X-Requested-With"]="XMLHttpRequest");for(p in c)_.setRequestHeader(p,c[p]);s=function(k){return function(){s&&(s=o=_.onload=_.onerror=_.onabort=_.ontimeout=_.onreadystatechange=null,k==="abort"?_.abort():k==="error"?typeof _.status!="number"?u(0,"error"):u(_.status,_.statusText):u(Vf[_.status]||_.status,_.statusText,(_.responseType||"text")!=="text"||typeof _.responseText!="string"?{binary:_.response}:{text:_.responseText},_.getAllResponseHeaders()))}},_.onload=s(),o=_.onerror=_.ontimeout=s("error"),_.onabort!==void 0?_.onabort=o:_.onreadystatechange=function(){_.readyState===4&&t.setTimeout(function(){s&&o()})},s=s("abort");try{_.send(n.hasContent&&n.data||null)}catch(k){if(s)throw k}},abort:function(){s&&s()}}}),h.ajaxPrefilter(function(n){n.crossDomain&&(n.contents.script=!1)}),h.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(n){return h.globalEval(n),n}}}),h.ajaxPrefilter("script",function(n){n.cache===void 0&&(n.cache=!1),n.crossDomain&&(n.type="GET")}),h.ajaxTransport("script",function(n){if(n.crossDomain||n.scriptAttrs){var s,o;return{send:function(c,u){s=h("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",o=function(p){s.remove(),o=null,p&&u(p.type==="error"?404:200,p.type)}),R.head.appendChild(s[0])},abort:function(){o&&o()}}}});var Yo=[],Bs=/(=)\?(?=&|$)|\?\?/;h.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var n=Yo.pop()||h.expando+"_"+zo.guid++;return this[n]=!0,n}}),h.ajaxPrefilter("json jsonp",function(n,s,o){var c,u,p,_=n.jsonp!==!1&&(Bs.test(n.url)?"url":typeof n.data=="string"&&(n.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&Bs.test(n.data)&&"data");if(_||n.dataTypes[0]==="jsonp")return c=n.jsonpCallback=E(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,_?n[_]=n[_].replace(Bs,"$1"+c):n.jsonp!==!1&&(n.url+=(Ns.test(n.url)?"&":"?")+n.jsonp+"="+c),n.converters["script json"]=function(){return p||h.error(c+" was not called"),p[0]},n.dataTypes[0]="json",u=t[c],t[c]=function(){p=arguments},o.always(function(){u===void 0?h(t).removeProp(c):t[c]=u,n[c]&&(n.jsonpCallback=s.jsonpCallback,Yo.push(c)),p&&E(u)&&u(p[0]),p=u=void 0}),"script"}),v.createHTMLDocument=function(){var n=R.implementation.createHTMLDocument("").body;return n.innerHTML="<form></form><form></form>",n.childNodes.length===2}(),h.parseHTML=function(n,s,o){if(typeof n!="string")return[];typeof s=="boolean"&&(o=s,s=!1);var c,u,p;return s||(v.createHTMLDocument?(s=R.implementation.createHTMLDocument(""),c=s.createElement("base"),c.href=R.location.href,s.head.appendChild(c)):s=R),u=rt.exec(n),p=!o&&[],u?[s.createElement(u[1])]:(u=To([n],s,p),p&&p.length&&h(p).remove(),h.merge([],u.childNodes))},h.fn.load=function(n,s,o){var c,u,p,_=this,k=n.indexOf(" ");return k>-1&&(c=Si(n.slice(k)),n=n.slice(0,k)),E(s)?(o=s,s=void 0):s&&typeof s=="object"&&(u="POST"),_.length>0&&h.ajax({url:n,type:u||"GET",dataType:"html",data:s}).done(function(w){p=arguments,_.html(c?h("<div>").append(h.parseHTML(w)).find(c):w)}).always(o&&function(w,C){_.each(function(){o.apply(this,p||[w.responseText,C,w])})}),this},h.expr.pseudos.animated=function(n){return h.grep(h.timers,function(s){return n===s.elem}).length},h.offset={setOffset:function(n,s,o){var c,u,p,_,k,w,C,I=h.css(n,"position"),D=h(n),P={};I==="static"&&(n.style.position="relative"),k=D.offset(),p=h.css(n,"top"),w=h.css(n,"left"),C=(I==="absolute"||I==="fixed")&&(p+w).indexOf("auto")>-1,C?(c=D.position(),_=c.top,u=c.left):(_=parseFloat(p)||0,u=parseFloat(w)||0),E(s)&&(s=s.call(n,o,h.extend({},k))),s.top!=null&&(P.top=s.top-k.top+_),s.left!=null&&(P.left=s.left-k.left+u),"using"in s?s.using.call(n,P):D.css(P)}},h.fn.extend({offset:function(n){if(arguments.length)return n===void 0?this:this.each(function(u){h.offset.setOffset(this,n,u)});var s,o,c=this[0];if(!!c)return c.getClientRects().length?(s=c.getBoundingClientRect(),o=c.ownerDocument.defaultView,{top:s.top+o.pageYOffset,left:s.left+o.pageXOffset}):{top:0,left:0}},position:function(){if(!!this[0]){var n,s,o,c=this[0],u={top:0,left:0};if(h.css(c,"position")==="fixed")s=c.getBoundingClientRect();else{for(s=this.offset(),o=c.ownerDocument,n=c.offsetParent||o.documentElement;n&&(n===o.body||n===o.documentElement)&&h.css(n,"position")==="static";)n=n.parentNode;n&&n!==c&&n.nodeType===1&&(u=h(n).offset(),u.top+=h.css(n,"borderTopWidth",!0),u.left+=h.css(n,"borderLeftWidth",!0))}return{top:s.top-u.top-h.css(c,"marginTop",!0),left:s.left-u.left-h.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var n=this.offsetParent;n&&h.css(n,"position")==="static";)n=n.offsetParent;return n||Ei})}}),h.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(n,s){var o=s==="pageYOffset";h.fn[n]=function(c){return li(this,function(u,p,_){var k;if(L(u)?k=u:u.nodeType===9&&(k=u.defaultView),_===void 0)return k?k[s]:u[p];k?k.scrollTo(o?k.pageXOffset:_,o?_:k.pageYOffset):u[p]=_},n,c,arguments.length)}}),h.each(["top","left"],function(n,s){h.cssHooks[s]=Ro(v.pixelPosition,function(o,c){if(c)return c=pn(o,s),Cs.test(c)?h(o).position()[s]+"px":c})}),h.each({Height:"height",Width:"width"},function(n,s){h.each({padding:"inner"+n,content:s,"":"outer"+n},function(o,c){h.fn[c]=function(u,p){var _=arguments.length&&(o||typeof u!="boolean"),k=o||(u===!0||p===!0?"margin":"border");return li(this,function(w,C,I){var D;return L(w)?c.indexOf("outer")===0?w["inner"+n]:w.document.documentElement["client"+n]:w.nodeType===9?(D=w.documentElement,Math.max(w.body["scroll"+n],D["scroll"+n],w.body["offset"+n],D["offset"+n],D["client"+n])):I===void 0?h.css(w,C,k):h.style(w,C,I,k)},s,_?u:void 0,_)}})}),h.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(n,s){h.fn[s]=function(o){return this.on(s,o)}}),h.fn.extend({bind:function(n,s,o){return this.on(n,null,s,o)},unbind:function(n,s){return this.off(n,null,s)},delegate:function(n,s,o,c){return this.on(s,n,o,c)},undelegate:function(n,s,o){return arguments.length===1?this.off(n,"**"):this.off(s,n||"**",o)},hover:function(n,s){return this.on("mouseenter",n).on("mouseleave",s||n)}}),h.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(n,s){h.fn[s]=function(o,c){return arguments.length>0?this.on(s,null,o,c):this.trigger(s)}});var $f=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;h.proxy=function(n,s){var o,c,u;if(typeof s=="string"&&(o=n[s],s=n,n=o),!!E(n))return c=a.call(arguments,2),u=function(){return n.apply(s||this,c.concat(a.call(arguments)))},u.guid=n.guid=n.guid||h.guid++,u},h.holdReady=function(n){n?h.readyWait++:h.ready(!0)},h.isArray=Array.isArray,h.parseJSON=JSON.parse,h.nodeName=J,h.isFunction=E,h.isWindow=L,h.camelCase=$e,h.type=B,h.now=Date.now,h.isNumeric=function(n){var s=h.type(n);return(s==="number"||s==="string")&&!isNaN(n-parseFloat(n))},h.trim=function(n){return n==null?"":(n+"").replace($f,"$1")},typeof define=="function"&&define.amd&&define("jquery",[],function(){return h});var Xf=t.jQuery,Yf=t.$;return h.noConflict=function(n){return t.$===h&&(t.$=Yf),n&&t.jQuery===h&&(t.jQuery=Xf),h},typeof e>"u"&&(t.jQuery=t.$=h),h})});var fe=Jo(Gs());function Ks(t,e){return Array.prototype.forEach.call(t,e)}function Oi(t,e,i){return Math.min(Math.max(t,e),i)}function ve(t,e,i,r,a){return(t-e)/(i-e)*(a-r)+r}function St(t){return[...Array(t).keys()]}function tr(t){if(arguments.length<2)return t;for(let e=1;e<arguments.length;e++){let i=arguments[e];for(let r in i)typeof t[r]>"u"&&(t[r]=i[r])}return t}function er(t,e){let i;return()=>{i&&clearTimeout(i);let r=this,a=arguments;i=setTimeout(()=>{i=null,t.apply(r,a)},e)}}function el(t){let e=!1;return()=>{e||(t.apply(this,arguments),e=!0)}}function il(t,e){let i=0;return()=>{i++<=t-1&&e.apply(this,arguments)}}var jl=Object.defineProperty,fc=(t,e,i)=>e in t?jl(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Dl=(t,e)=>{for(var i in e)jl(t,i,{get:e[i],enumerable:!0})},y=(t,e,i)=>(fc(t,typeof e!="symbol"?e+"":e,i),i),X={move:"M",line:"L",curve:"C",arc:"A",close:"Z"},Bl={};Dl(Bl,{HALF_PI:()=>ae,NumArray:()=>ei,TWO_PI:()=>me,decomposeMatrix:()=>Ji,getComputedMatrix:()=>ql,getPoT:()=>Hl,lerp:()=>Se,mod:()=>Re,setMatrix:()=>Wl,toFixed:()=>Jt});var Yt;typeof window<"u"?Yt=window:typeof global<"u"?Yt=global:typeof self<"u"&&(Yt=self);var zl,me=Math.PI*2,ae=Math.PI*.5;function Ji(t,e,i,r,a,f){let l;return arguments.length<=1?(l=t.a,e=t.b,i=t.c,r=t.d,a=t.e,f=t.f):l=t,{translateX:a,translateY:f,scaleX:Math.sqrt(l*l+e*e),scaleY:Math.sqrt(i*i+r*r),rotation:180*Math.atan2(e,l)/Math.PI}}function Wl(t){zl=t}function ql(t,e){e=e&&e.identity()||new zl;let i=t,r=[];for(;i&&i._matrix;)r.push(i._matrix),i=i.parent;r.reverse();for(let a=0;a<r.length;a++){let l=r[a].elements;e.multiply(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],l[8],l[9])}return e}function Se(t,e,i){return i*(e-t)+t}var Qs=[2,4,8,16,32,64,128,256,512,1024,2048,4096];function Hl(t){let e=0;for(;Qs[e]&&Qs[e]<t;)e++;return Qs[e]}function Re(t,e){for(;t<0;)t+=e;return t%e}var ei=Yt.Float32Array||Array,cc=Math.floor;function Jt(t){return cc(t*1e6)/1e6}var Ul={};Dl(Ul,{Curve:()=>Zi,getAnchorsFromArcData:()=>dc,getComponentOnCubicBezier:()=>Tn,getControlPoints:()=>Gl,getCurveBoundingBox:()=>$l,getCurveFromPoints:()=>Yl,getCurveLength:()=>Vl,getReflection:()=>ra,integrate:()=>Xl,subdivide:()=>fa});var z=class{constructor(){y(this,"_events",{}),y(this,"_bound",!1)}addEventListener(t,e){return(this._events[t]||(this._events[t]=[])).push(e),this._bound=!0,this}on(){return this.addEventListener.apply(this,arguments)}bind(){return this.addEventListener.apply(this,arguments)}removeEventListener(t,e){if(!this._events)return this;if(!t&&!e)return this._events={},this._bound=!1,this;let i=t?[t]:Object.keys(this._events);for(let r=0,a=i.length;r<a;r++){t=i[r];let f=this._events[t];if(f){let l=[];if(e)for(let d=0,m=f.length;d<m;d++){let g=f[d];g=g.handler?g.handler:g,e!==g&&l.push(g)}this._events[t]=l}}return this}off(){return this.removeEventListener.apply(this,arguments)}unbind(){return this.removeEventListener.apply(this,arguments)}dispatchEvent(t){if(!this._events)return this;let e=Array.prototype.slice.call(arguments,1),i=this._events[t];if(i)for(let r=0;r<i.length;r++)i[r].call(this,...e);return this}trigger(){return this.dispatchEvent.apply(this,arguments)}listen(t,e,i){let r=this;t&&(a.obj=t,a.name=e,a.handler=i,t.on(e,a));function a(){i.apply(r,arguments)}return r}ignore(t,e,i){return t.off(e,i),this}};y(z,"Types",{play:"play",pause:"pause",update:"update",render:"render",resize:"resize",change:"change",remove:"remove",insert:"insert",order:"order",load:"load"});y(z,"Methods",["addEventListener","on","removeEventListener","off","unbind","dispatchEvent","trigger","listen","ignore"]);var nl={x:{enumerable:!0,get:function(){return this._x},set:function(t){this._x!==t&&(this._x=t,this._bound&&this.dispatchEvent(z.Types.change))}},y:{enumerable:!0,get:function(){return this._y},set:function(t){this._y!==t&&(this._y=t,this._bound&&this.dispatchEvent(z.Types.change))}}},He=class extends z{constructor(t=0,e=0){super(),y(this,"_x",0),y(this,"_y",0);for(let i in nl)Object.defineProperty(this,i,nl[i]);this.x=t,this.y=e}static add(t,e){return new He(t.x+e.x,t.y+e.y)}static sub(t,e){return new He(t.x-e.x,t.y-e.y)}static subtract(t,e){return He.sub(t,e)}static ratioBetween(t,e){return(t.x*e.x+t.y*e.y)/(t.length()*e.length())}static angleBetween(t,e){if(arguments.length>=4){let a=arguments[0]-arguments[2],f=arguments[1]-arguments[3];return Math.atan2(f,a)}let i=t.x-e.x,r=t.y-e.y;return Math.atan2(r,i)}static distanceBetween(t,e){return Math.sqrt(He.distanceBetweenSquared(t,e))}static distanceBetweenSquared(t,e){let i=t.x-e.x,r=t.y-e.y;return i*i+r*r}set(t,e){return this.x=t,this.y=e,this}copy(t){return this.x=t.x,this.y=t.y,this}clear(){return this.x=0,this.y=0,this}clone(){return new He(this.x,this.y)}add(t,e){return arguments.length<=0?this:(arguments.length<=1?typeof t=="number"?(this.x+=t,this.y+=t):t&&typeof t.x=="number"&&typeof t.y=="number"&&(this.x+=t.x,this.y+=t.y):(this.x+=t,this.y+=e),this)}addSelf(t){return this.add.apply(this,arguments)}sub(t,e){return arguments.length<=0?this:(arguments.length<=1?typeof t=="number"?(this.x-=t,this.y-=t):t&&typeof t.x=="number"&&typeof t.y=="number"&&(this.x-=t.x,this.y-=t.y):(this.x-=t,this.y-=e),this)}subtract(){return this.sub.apply(this,arguments)}subSelf(t){return this.sub.apply(this,arguments)}subtractSelf(t){return this.sub.apply(this,arguments)}multiply(t,e){return arguments.length<=0?this:(arguments.length<=1?typeof t=="number"?(this.x*=t,this.y*=t):t&&typeof t.x=="number"&&typeof t.y=="number"&&(this.x*=t.x,this.y*=t.y):(this.x*=t,this.y*=e),this)}multiplySelf(t){return this.multiply.apply(this,arguments)}multiplyScalar(t){return this.multiply(t)}divide(t,e){return arguments.length<=0?this:(arguments.length<=1?typeof t=="number"?(this.x/=t,this.y/=t):t&&typeof t.x=="number"&&typeof t.y=="number"&&(this.x/=t.x,this.y/=t.y):(this.x/=t,this.y/=e),isNaN(this.x)&&(this.x=0),isNaN(this.y)&&(this.y=0),this)}divideSelf(t){return this.divide.apply(this,arguments)}divideScalar(t){return this.divide(t)}negate(){return this.multiply(-1)}dot(t){return this.x*t.x+this.y*t.y}length(){return Math.sqrt(this.lengthSquared())}lengthSquared(){return this.x*this.x+this.y*this.y}normalize(){return this.divideScalar(this.length())}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){let e=this.x-t.x,i=this.y-t.y;return e*e+i*i}setLength(t){return this.normalize().multiplyScalar(t)}equals(t,e){return e=typeof e>"u"?1e-4:e,this.distanceTo(t)<e}lerp(t,e){let i=(t.x-this.x)*e+this.x,r=(t.y-this.y)*e+this.y;return this.set(i,r)}isZero(t){return t=typeof t>"u"?1e-4:t,this.length()<t}toString(){return this.x+", "+this.y}toObject(){return{x:this.x,y:this.y}}rotate(t){let e=this.x,i=this.y,r=Math.cos(t),a=Math.sin(t);return this.x=e*r-i*a,this.y=e*a+i*r,this}},K=He;y(K,"zero",new He);y(K,"left",new He(-1,0));y(K,"right",new He(1,0));y(K,"up",new He(0,-1));y(K,"down",new He(0,1));var At=class extends K{constructor(t=0,e=0,i=0,r=0,a=0,f=0,l=X.move){super(t,e),y(this,"controls",{left:new K,right:new K}),y(this,"_command",X.move),y(this,"_relative",!0),y(this,"_rx",0),y(this,"_ry",0),y(this,"_xAxisRotation",0),y(this,"_largeArcFlag",0),y(this,"_sweepFlag",1);for(let m in rl)Object.defineProperty(this,m,rl[m]);this.command=l,this.relative=!0;let d=At.makeBroadcast(this);this.controls.left.set(i,r).addEventListener(z.Types.change,d),this.controls.right.set(a,f).addEventListener(z.Types.change,d)}static makeBroadcast(t){return e;function e(){t._bound&&t.dispatchEvent(z.Types.change)}}copy(t){return this.x=t.x,this.y=t.y,typeof t.command=="string"&&(this.command=t.command),t.controls&&(t.controls.left&&this.controls.left.copy(t.controls.left),t.controls.right&&this.controls.right.copy(t.controls.right)),typeof t.relative=="boolean"&&(this.relative=t.relative),typeof t.rx=="number"&&(this.rx=t.rx),typeof t.ry=="number"&&(this.ry=t.ry),typeof t.xAxisRotation=="number"&&(this.xAxisRotation=t.xAxisRotation),typeof t.largeArcFlag=="number"&&(this.largeArcFlag=t.largeArcFlag),typeof t.sweepFlag=="number"&&(this.sweepFlag=t.sweepFlag),this}clone(){return new At().copy(this)}toObject(){return{x:this.x,y:this.y,command:this.command,relative:this.relative,controls:{left:this.controls.left.toObject(),right:this.controls.right.toObject()},rx:this.rx,ry:this.ry,xAxisRotation:this.xAxisRotation,largeArcFlag:this.largeArcFlag,sweepFlag:this.sweepFlag}}toString(){return JSON.stringify(this.toObject())}},rl={command:{enumerable:!0,get:function(){return this._command},set:function(t){this._command!==t&&(this._command=t,this._bound&&this.dispatchEvent(z.Types.change))}},relative:{enumerable:!0,get:function(){return this._relative},set:function(t){this._relative!==!!t&&(this._relative=!!t,this._bound&&this.dispatchEvent(z.Types.change))}},rx:{enumerable:!0,get:function(){return this._rx},set:function(t){this._rx!==t&&(this._rx=t,this._bound&&this.dispatchEvent(z.Types.change))}},ry:{enumerable:!0,get:function(){return this._ry},set:function(t){this._ry!==t&&(this._ry=t,this._bound&&this.dispatchEvent(z.Types.change))}},xAxisRotation:{enumerable:!0,get:function(){return this._xAxisRotation},set:function(t){this._xAxisRotation!==t&&(this._xAxisRotation=t,this._bound&&this.dispatchEvent(z.Types.change))}},largeArcFlag:{enumerable:!0,get:function(){return this._largeArcFlag},set:function(t){this._largeArcFlag!==t&&(this._largeArcFlag=t,this._bound&&this.dispatchEvent(z.Types.change))}},sweepFlag:{get:function(){return this._sweepFlag},set:function(t){this._sweepFlag!==t&&(this._sweepFlag=t,this._bound&&this.dispatchEvent(z.Types.change))}}},uc=0,ne={nextFrameID:null,Types:{webgl:"WebGLRenderer",svg:"SVGRenderer",canvas:"CanvasRenderer"},Version:"v0.8.12",PublishDate:"2023-10-16T17:55:26.551Z",Identifier:"two-",Resolution:12,AutoCalculateImportedMatrices:!0,Instances:[],uniqueId:function(){return uc++}},Zi={CollinearityEpsilon:Math.pow(10,-30),RecursionLimit:16,CuspLimit:0,Tolerance:{distance:.25,angle:0,epsilon:Number.EPSILON},abscissas:[[.5773502691896257],[0,.7745966692414834],[.33998104358485626,.8611363115940526],[0,.5384693101056831,.906179845938664],[.2386191860831969,.6612093864662645,.932469514203152],[0,.4058451513773972,.7415311855993945,.9491079123427585],[.1834346424956498,.525532409916329,.7966664774136267,.9602898564975363],[0,.3242534234038089,.6133714327005904,.8360311073266358,.9681602395076261],[.14887433898163122,.4333953941292472,.6794095682990244,.8650633666889845,.9739065285171717],[0,.26954315595234496,.5190961292068118,.7301520055740494,.8870625997680953,.978228658146057],[.1252334085114689,.3678314989981802,.5873179542866175,.7699026741943047,.9041172563704749,.9815606342467192],[0,.2304583159551348,.44849275103644687,.6423493394403402,.8015780907333099,.9175983992229779,.9841830547185881],[.10805494870734367,.31911236892788974,.5152486363581541,.6872929048116855,.827201315069765,.9284348836635735,.9862838086968123],[0,.20119409399743451,.3941513470775634,.5709721726085388,.7244177313601701,.8482065834104272,.937273392400706,.9879925180204854],[.09501250983763744,.2816035507792589,.45801677765722737,.6178762444026438,.755404408355003,.8656312023878318,.9445750230732326,.9894009349916499]],weights:[[1],[.8888888888888888,.5555555555555556],[.6521451548625461,.34785484513745385],[.5688888888888889,.47862867049936647,.23692688505618908],[.46791393457269104,.3607615730481386,.17132449237917036],[.4179591836734694,.3818300505051189,.27970539148927664,.1294849661688697],[.362683783378362,.31370664587788727,.22238103445337448,.10122853629037626],[.3302393550012598,.31234707704000286,.26061069640293544,.1806481606948574,.08127438836157441],[.29552422471475287,.26926671930999635,.21908636251598204,.1494513491505806,.06667134430868814],[.2729250867779006,.26280454451024665,.23319376459199048,.18629021092773426,.1255803694649046,.05566856711617366],[.24914704581340277,.2334925365383548,.20316742672306592,.16007832854334622,.10693932599531843,.04717533638651183],[.2325515532308739,.22628318026289723,.2078160475368885,.17814598076194574,.13887351021978725,.09212149983772845,.04048400476531588],[.2152638534631578,.2051984637212956,.18553839747793782,.15720316715819355,.12151857068790319,.08015808715976021,.03511946033175186],[.2025782419255613,.19843148532711158,.1861610000155622,.16626920581699392,.13957067792615432,.10715922046717194,.07036604748810812,.03075324199611727],[.1894506104550685,.18260341504492358,.16915651939500254,.14959598881657674,.12462897125553388,.09515851168249279,.062253523938647894,.027152459411754096]]};function Tn(t,e,i,r,a){let f=1-t;return f*f*f*e+3*f*f*t*i+3*f*t*t*r+t*t*t*a}function fa(t,e,i,r,a,f,l,d,m){m=m||Zi.RecursionLimit;let g=m+1;if(Math.abs(t-l)<.001&&Math.abs(e-d)<.001)return[new At(l,d)];let x=[];for(let T=0;T<g;T++){let S=T/g,v=Tn(S,t,i,a,l),E=Tn(S,e,r,f,d);x.push(new At(v,E))}return x}function Vl(t,e,i,r,a,f,l,d,m){if(t===i&&e===r&&a===l&&f===d){let R=l-t,M=d-e;return Math.sqrt(R*R+M*M)}let g=9*(i-a)+3*(l-t),x=6*(t+a)-12*i,T=3*(i-t),S=9*(r-f)+3*(d-e),v=6*(e+f)-12*r,E=3*(r-e);function L(R){let M=(g*R+x)*R+T,F=(S*R+v)*R+E;return Math.sqrt(M*M+F*F)}return Xl(L,0,1,m||Zi.RecursionLimit)}function $l(t,e,i,r,a,f,l,d){let m=[],g=[[],[]],x,T,S,v,E,L,R,M;for(let W=0;W<2;++W){if(W==0?(T=6*t-12*i+6*a,x=-3*t+9*i-9*a+3*l,S=3*i-3*t):(T=6*e-12*r+6*f,x=-3*e+9*r-9*f+3*d,S=3*r-3*e),Math.abs(x)<1e-12){if(Math.abs(T)<1e-12)continue;v=-S/T,0<v&&v<1&&m.push(v);continue}R=T*T-4*S*x,M=Math.sqrt(R),!(R<0)&&(E=(-T+M)/(2*x),0<E&&E<1&&m.push(E),L=(-T-M)/(2*x),0<L&&L<1&&m.push(L))}let F=m.length,B=F,q;for(;F--;)v=m[F],q=1-v,g[0][F]=q*q*q*t+3*q*q*v*i+3*q*v*v*a+v*v*v*l,g[1][F]=q*q*q*e+3*q*q*v*r+3*q*v*v*f+v*v*v*d;return g[0][B]=t,g[1][B]=e,g[0][B+1]=l,g[1][B+1]=d,g[0].length=g[1].length=B+2,{min:{x:Math.min.apply(0,g[0]),y:Math.min.apply(0,g[1])},max:{x:Math.max.apply(0,g[0]),y:Math.max.apply(0,g[1])}}}function Xl(t,e,i,r){let a=Zi.abscissas[r-2],f=Zi.weights[r-2],l=.5*(i-e),d=l+e,m=0,g=r+1>>1,x=r&1?f[m++]*t(d):0;for(;m<g;){let T=l*a[m];x+=f[m++]*(t(d+T)+t(d-T))}return l*x}function Yl(t,e){let i=t.length,r=i-1;for(let a=0;a<i;a++){let f=t[a],l=e?Re(a-1,i):Math.max(a-1,0),d=e?Re(a+1,i):Math.min(a+1,r),m=t[l],g=f,x=t[d];Gl(m,g,x),g.command=a===0?X.move:X.curve}}function Gl(t,e,i){let r=K.angleBetween(t,e),a=K.angleBetween(i,e),f=K.distanceBetween(t,e),l=K.distanceBetween(i,e),d=(r+a)/2;return f<1e-4||l<1e-4?(typeof e.relative=="boolean"&&!e.relative&&(e.controls.left.copy(e),e.controls.right.copy(e)),e):(f*=.33,l*=.33,a<r?d+=ae:d-=ae,e.controls.left.x=Math.cos(d)*f,e.controls.left.y=Math.sin(d)*f,d-=Math.PI,e.controls.right.x=Math.cos(d)*l,e.controls.right.y=Math.sin(d)*l,typeof e.relative=="boolean"&&!e.relative&&(e.controls.left.x+=e.x,e.controls.left.y+=e.y,e.controls.right.x+=e.x,e.controls.right.y+=e.y),e)}function ra(t,e,i){return new K(2*t.x-(e.x+t.x)-(i?t.x:0),2*t.y-(e.y+t.y)-(i?t.y:0))}function dc(t,e,i,r,a,f,l){let d=ne.Resolution,m=[];for(let g=0;g<d;g++){let x=(g+1)/d;l&&(x=1-x);let T=x*f+a,S=i*Math.cos(T),v=r*Math.sin(T),E=new At(S,v);E.command=X.line,m.push(E)}}var pc=Yt.devicePixelRatio||1;function gc(t){return t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1}function ca(t){return pc/gc(t)}var sl=Array.prototype.slice;function _c(t){if(t==null)return!1;let e=t.length;return typeof e=="number"&&e>=0&&e<4294967296}var st={isNaN:function(t){return typeof t=="number"&&t!==+t},isElement:function(t){return!!(t&&t.nodeType===1)},isObject:function(t){let e=typeof t;return e==="function"||e==="object"&&!!t},extend:function(t){let e=sl.call(arguments,1);for(let i=0;i<e.length;i++){let r=e[i];for(let a in r)t[a]=r[a]}return t},defaults:function(t){let e=sl.call(arguments,1);for(let i=0;i<e.length;i++){let r=e[i];for(let a in r)t[a]===void 0&&(t[a]=r[a])}return t},each:function(t,e,i){let r=i||this,a=!_c(t)&&Object.keys(t),f=(a||t).length;for(let l=0;l<f;l++){let d=a?a[l]:l;e.call(r,t[d],d,t)}return t},performance:Yt.performance&&Yt.performance.now?Yt.performance:Date},vr=class extends z{constructor(){super(),y(this,"_flagId",!1),y(this,"_flagClassName",!1),y(this,"_renderer",{}),y(this,"_id",""),y(this,"_className",""),y(this,"classList",[]);for(let t in al)Object.defineProperty(this,t,al[t])}flagReset(){this._flagId=this._flagClassName=!1}},al={renderer:{enumerable:!1,get:function(){return this._renderer}},id:{enumerable:!0,get:function(){return this._id},set:function(t){let e=this._id;t!==this._id&&(this._id=t,this._flagId=!0,this.parent&&(delete this.parent.children.ids[e],this.parent.children.ids[this._id]=this))}},className:{enumerable:!0,get:function(){return this._className},set:function(t){this._className!==t&&(this._flagClassName=!0,this.classList=t.split(/\s+?/),this._className=t)}}},mc=Math.cos,yc=Math.sin,ol=Math.tan,Js=[],Be=class extends z{constructor(t,e,i,r,a,f){super(),y(this,"elements",new ei(9)),y(this,"manual",!1);let l=t;Array.isArray(l)||(l=Array.prototype.slice.call(arguments)),this.identity(),l.length>0&&this.set(l)}static Multiply(t,e,i){if(e.length<=3){let W=t,h,G,J,Z=e[0]||0,tt=e[1]||0,ut=e[2]||0;return h=W[0]*Z+W[1]*tt+W[2]*ut,G=W[3]*Z+W[4]*tt+W[5]*ut,J=W[6]*Z+W[7]*tt+W[8]*ut,[h,G,J]}let r=t[0],a=t[1],f=t[2],l=t[3],d=t[4],m=t[5],g=t[6],x=t[7],T=t[8],S=e[0],v=e[1],E=e[2],L=e[3],R=e[4],M=e[5],F=e[6],B=e[7],q=e[8];return i=i||new ei(9),i[0]=r*S+a*L+f*F,i[1]=r*v+a*R+f*B,i[2]=r*E+a*M+f*q,i[3]=l*S+d*L+m*F,i[4]=l*v+d*R+m*B,i[5]=l*E+d*M+m*q,i[6]=g*S+x*L+T*F,i[7]=g*v+x*R+T*B,i[8]=g*E+x*M+T*q,i}set(t,e,i,r,a,f,l,d,m){if(typeof e>"u"){let g=t;t=g[0],e=g[1],i=g[2],r=g[3],a=g[4],f=g[5],l=g[6],d=g[7],m=g[8]}return this.elements[0]=t,this.elements[1]=e,this.elements[2]=i,this.elements[3]=r,this.elements[4]=a,this.elements[5]=f,this.elements[6]=l,this.elements[7]=d,this.elements[8]=m,this.trigger(z.Types.change)}copy(t){return this.elements[0]=t.elements[0],this.elements[1]=t.elements[1],this.elements[2]=t.elements[2],this.elements[3]=t.elements[3],this.elements[4]=t.elements[4],this.elements[5]=t.elements[5],this.elements[6]=t.elements[6],this.elements[7]=t.elements[7],this.elements[8]=t.elements[8],this.manual=t.manual,this.trigger(z.Types.change)}identity(){return this.elements[0]=Be.Identity[0],this.elements[1]=Be.Identity[1],this.elements[2]=Be.Identity[2],this.elements[3]=Be.Identity[3],this.elements[4]=Be.Identity[4],this.elements[5]=Be.Identity[5],this.elements[6]=Be.Identity[6],this.elements[7]=Be.Identity[7],this.elements[8]=Be.Identity[8],this.trigger(z.Types.change)}multiply(t,e,i,r,a,f,l,d,m){if(typeof e>"u")return this.elements[0]*=t,this.elements[1]*=t,this.elements[2]*=t,this.elements[3]*=t,this.elements[4]*=t,this.elements[5]*=t,this.elements[6]*=t,this.elements[7]*=t,this.elements[8]*=t,this.trigger(z.Types.change);if(typeof i>"u"&&(i=1),typeof r>"u"){t=t||0,e=e||0,i=i||0,a=this.elements;let Ft=a[0]*t+a[1]*e+a[2]*i,xt=a[3]*t+a[4]*e+a[5]*i,Gt=a[6]*t+a[7]*e+a[8]*i;return[Ft,xt,Gt]}let g=this.elements,x=[t,e,i,r,a,f,l,d,m],T=g[0],S=g[1],v=g[2],E=g[3],L=g[4],R=g[5],M=g[6],F=g[7],B=g[8],q=x[0],W=x[1],h=x[2],G=x[3],J=x[4],Z=x[5],tt=x[6],ut=x[7],nt=x[8];return this.elements[0]=T*q+S*G+v*tt,this.elements[1]=T*W+S*J+v*ut,this.elements[2]=T*h+S*Z+v*nt,this.elements[3]=E*q+L*G+R*tt,this.elements[4]=E*W+L*J+R*ut,this.elements[5]=E*h+L*Z+R*nt,this.elements[6]=M*q+F*G+B*tt,this.elements[7]=M*W+F*J+B*ut,this.elements[8]=M*h+F*Z+B*nt,this.trigger(z.Types.change)}inverse(t){let e=this.elements;t=t||new Be;let i=e[0],r=e[1],a=e[2],f=e[3],l=e[4],d=e[5],m=e[6],g=e[7],x=e[8],T=x*l-d*g,S=-x*f+d*m,v=g*f-l*m,E=i*T+r*S+a*v;return E?(E=1/E,t.elements[0]=T*E,t.elements[1]=(-x*r+a*g)*E,t.elements[2]=(d*r-a*l)*E,t.elements[3]=S*E,t.elements[4]=(x*i-a*m)*E,t.elements[5]=(-d*i+a*f)*E,t.elements[6]=v*E,t.elements[7]=(-g*i+r*m)*E,t.elements[8]=(l*i-r*f)*E,t):null}scale(t,e){return arguments.length<=1&&(e=t),this.multiply(t,0,0,0,e,0,0,0,1)}rotate(t){let e=mc(t),i=yc(t);return this.multiply(e,-i,0,i,e,0,0,0,1)}translate(t,e){return this.multiply(1,0,t,0,1,e,0,0,1)}skewX(t){let e=ol(t);return this.multiply(1,e,0,0,1,0,0,0,1)}skewY(t){let e=ol(t);return this.multiply(1,0,0,e,1,0,0,0,1)}toString(t){return Js.length=0,this.toTransformArray(t,Js),Js.map(Jt).join(" ")}toTransformArray(t,e){let i=this.elements,r=!!e,a=i[0],f=i[1],l=i[2],d=i[3],m=i[4],g=i[5];if(t){let x=i[6],T=i[7],S=i[8];if(r){e[0]=a,e[1]=d,e[2]=x,e[3]=f,e[4]=m,e[5]=T,e[6]=l,e[7]=g,e[8]=S;return}return[a,d,x,f,m,T,l,g,S]}if(r){e[0]=a,e[1]=d,e[2]=f,e[3]=m,e[4]=l,e[5]=g;return}return[a,d,f,m,l,g]}toArray(t,e){let i=this.elements,r=!!e,a=i[0],f=i[1],l=i[2],d=i[3],m=i[4],g=i[5];if(t){let x=i[6],T=i[7],S=i[8];if(r){e[0]=a,e[1]=f,e[2]=l,e[3]=d,e[4]=m,e[5]=g,e[6]=x,e[7]=T,e[8]=S;return}return[a,f,l,d,m,g,x,T,S]}if(r){e[0]=a,e[1]=f,e[2]=l,e[3]=d,e[4]=m,e[5]=g;return}return[a,f,l,d,m,g]}toObject(){return{elements:this.toArray(!0),manual:!!this.manual}}clone(){return new Be().copy(this)}},Pi=Be;y(Pi,"Identity",[1,0,0,0,1,0,0,0,1]);Wl(Pi);var bi=class extends vr{constructor(){super(),y(this,"_flagMatrix",!0),y(this,"_flagScale",!1),y(this,"_matrix",null),y(this,"_worldMatrix",null),y(this,"_position",null),y(this,"_rotation",0),y(this,"_scale",1),y(this,"_skewX",0),y(this,"_skewY",0);for(let t in ir)Object.defineProperty(this,t,ir[t]);this._renderer.flagMatrix=Kl.bind(this),this.isShape=!0,this.id=ne.Identifier+ne.uniqueId(),this.matrix=new Pi,this.worldMatrix=new Pi,this.position=new K,this.rotation=0,this.scale=1,this.skewX=0,this.skewY=0}get renderer(){return this._renderer}set renderer(t){this._renderer=t}get translation(){return ir.position.get.apply(this,arguments)}set translation(t){ir.position.set.apply(this,arguments)}addTo(t){return t.add(this),this}remove(){return this.parent?(this.parent.remove(this),this):this}clone(t){let e=new bi;return e.position.copy(this.position),e.rotation=this.rotation,e.scale=this.scale,e.skewX=this.skewX,e.skewY=this.skewY,this.matrix.manual&&e.matrix.copy(this.matrix),t&&t.add(e),e._update()}_update(t){return!this._matrix.manual&&this._flagMatrix&&(this._matrix.identity().translate(this.position.x,this.position.y),this._scale instanceof K?this._matrix.scale(this._scale.x,this._scale.y):this._matrix.scale(this._scale),this._matrix.rotate(this.rotation),this._matrix.skewX(this.skewX),this._matrix.skewY(this.skewY)),t&&this.parent&&this.parent._update&&this.parent._update(),this}flagReset(){return this._flagMatrix=this._flagScale=!1,super.flagReset.call(this),this}},ir={position:{enumerable:!0,get:function(){return this._position},set:function(t){this._position&&this._position.unbind(z.Types.change,this._renderer.flagMatrix),this._position=t,this._position.bind(z.Types.change,this._renderer.flagMatrix),Kl.call(this)}},rotation:{enumerable:!0,get:function(){return this._rotation},set:function(t){this._rotation=t,this._flagMatrix=!0}},scale:{enumerable:!0,get:function(){return this._scale},set:function(t){this._scale instanceof K&&this._scale.unbind(z.Types.change,this._renderer.flagMatrix),this._scale=t,this._scale instanceof K&&this._scale.bind(z.Types.change,this._renderer.flagMatrix),this._flagMatrix=!0,this._flagScale=!0}},skewX:{enumerable:!0,get:function(){return this._skewX},set:function(t){this._skewX=t,this._flagMatrix=!0}},skewY:{enumerable:!0,get:function(){return this._skewY},set:function(t){this._skewY=t,this._flagMatrix=!0}},matrix:{enumerable:!0,get:function(){return this._matrix},set:function(t){this._matrix=t,this._flagMatrix=!0}},worldMatrix:{enumerable:!0,get:function(){return ql(this,this._worldMatrix),this._worldMatrix},set:function(t){this._worldMatrix=t}}};function Kl(){this._flagMatrix=!0}var vi=class extends Array{constructor(){super(),y(this,"_events",new z),arguments[0]&&Array.isArray(arguments[0])?arguments[0].length>0&&this.push.apply(this,arguments[0]):arguments.length>0&&this.push.apply(this,arguments)}get _bound(){return this._events._bound}set _bound(t){this._events._bound=t}addEventListener(){return this._events.addEventListener.apply(this,arguments)}on(){return this._events.on.apply(this,arguments)}bind(){return this._events.bind.apply(this,arguments)}removeEventListener(){return this._events.removeEventListener.apply(this,arguments)}off(){return this._events.off.apply(this,arguments)}unbind(){return this._events.unbind.apply(this,arguments)}dispatchEvent(){return this._events.dispatchEvent.apply(this,arguments)}trigger(){return this._events.trigger.apply(this,arguments)}listen(){return this._events.listen.apply(this,arguments)}ignore(){return this._events.ignore.apply(this,arguments)}pop(){let t=super.pop.apply(this,arguments);return this.trigger(z.Types.remove,[t]),t}shift(){let t=super.shift.apply(this,arguments);return this.trigger(z.Types.remove,[t]),t}push(){let t=super.push.apply(this,arguments);return this.trigger(z.Types.insert,arguments),t}unshift(){let t=super.unshift.apply(this,arguments);return this.trigger(z.Types.insert,arguments),t}splice(){let t=super.splice.apply(this,arguments);if(this.trigger(z.Types.remove,t),arguments.length>2){let e=this.slice(arguments[0],arguments[0]+arguments.length-2);this.trigger(z.Types.insert,e),this.trigger(z.Types.order)}return t}sort(){return super.sort.apply(this,arguments),this.trigger(z.Types.order),this}reverse(){return super.reverse.apply(this,arguments),this.trigger(z.Types.order),this}indexOf(){return super.indexOf.apply(this,arguments)}map(t,e){let i=[];for(let r=0;r<this.length;r++){let a=this[r],f;e?f=t.call(e,a,r):f=t(a,r),i.push(f)}return i}},Ql=class extends vi{constructor(t){t=Array.isArray(t)?t:Array.prototype.slice.call(arguments),super(t),y(this,"ids",{}),this.attach(t),this.on(z.Types.insert,this.attach),this.on(z.Types.remove,this.detach)}attach(t){for(let e=0;e<t.length;e++){let i=t[e];i&&i.id&&(this.ids[i.id]=i)}return this}detach(t){for(let e=0;e<t.length;e++)delete this.ids[t[e].id];return this}},nr=Math.min,rr=Math.max,Jl=class extends bi{constructor(t){super(),y(this,"_flagAdditions",!1),y(this,"_flagSubtractions",!1),y(this,"_flagOrder",!1),y(this,"_flagOpacity",!0),y(this,"_flagBeginning",!1),y(this,"_flagEnding",!1),y(this,"_flagLength",!1),y(this,"_flagMask",!1),y(this,"_fill","#fff"),y(this,"_stroke","#000"),y(this,"_linewidth",1),y(this,"_opacity",1),y(this,"_visible",!0),y(this,"_cap","round"),y(this,"_join","round"),y(this,"_miter",4),y(this,"_closed",!0),y(this,"_curved",!1),y(this,"_automatic",!0),y(this,"_beginning",0),y(this,"_ending",1),y(this,"_length",0),y(this,"_mask",null);for(let e in ll)Object.defineProperty(this,e,ll[e]);this._renderer.type="group",this.additions=[],this.subtractions=[],this.children=Array.isArray(t)?t:Array.prototype.slice.call(arguments)}static InsertChildren(t){for(let e=0;e<t.length;e++)hl.call(this,t[e],this)}static RemoveChildren(t){for(let e=0;e<t.length;e++)hl.call(this,t[e])}static OrderChildren(t){this._flagOrder=!0}clone(t){let e=new Jl,i=this.children.map(function(r){return r.clone()});return e.add(i),e.opacity=this.opacity,this.mask&&(e.mask=this.mask),e.translation.copy(this.translation),e.rotation=this.rotation,e.scale=this.scale,e.className=this.className,this.matrix.manual&&e.matrix.copy(this.matrix),t&&t.add(e),e._update()}toObject(){let t={children:[],translation:this.translation.toObject(),rotation:this.rotation,scale:this.scale instanceof K?this.scale.toObject():this.scale,opacity:this.opacity,className:this.className,mask:this.mask?this.mask.toObject():null};return this.matrix.manual&&(t.matrix=this.matrix.toObject()),st.each(this.children,function(e,i){t.children[i]=e.toObject()},this),t}corner(){let t=this.getBoundingClientRect(!0);for(let e=0;e<this.children.length;e++){let i=this.children[e];i.translation.x-=t.left,i.translation.y-=t.top}return this.mask&&(this.mask.translation.x-=t.left,this.mask.translation.y-=t.top),this}center(){let t=this.getBoundingClientRect(!0),e=t.left+t.width/2-this.translation.x,i=t.top+t.height/2-this.translation.y;for(let r=0;r<this.children.length;r++){let a=this.children[r];a.isShape&&(a.translation.x-=e,a.translation.y-=i)}return this.mask&&(this.mask.translation.x-=e,this.mask.translation.y-=i),this}getById(t){let e=null;function i(r){if(r.id===t)return r;if(r.children){for(let a=0;a<r.children.length;a++)if(e=i(r.children[a]),e)return e}return null}return i(this)}getByClassName(t){let e=[];function i(r){if(Array.prototype.indexOf.call(r.classList,t)>=0&&e.push(r),r.children)for(let a=0;a<r.children.length;a++){let f=r.children[a];i(f)}return e}return i(this)}getByType(t){let e=[];function i(r){if(r instanceof t&&e.push(r),r.children)for(let a=0;a<r.children.length;a++){let f=r.children[a];i(f)}return e}return i(this)}add(t){t instanceof Array?t=t.slice():t=Array.prototype.slice.call(arguments);for(let e=0;e<t.length;e++){let i=t[e];if(!(i&&i.id))continue;let r=Array.prototype.indexOf.call(this.children,i);r>=0&&this.children.splice(r,1),this.children.push(i)}return this}remove(t){let e=arguments.length,i=this.parent;if(e<=0&&i)return i.remove(this),this;t instanceof Array?t=t.slice():t=Array.prototype.slice.call(arguments);for(let r=0;r<t.length;r++){let a=t[r];if(!a||!this.children.ids[a.id])continue;let f=this.children.indexOf(a);f>=0&&this.children.splice(f,1)}return this}getBoundingClientRect(t){let e,i,r,a,f,l;this._update(!0);let d=1/0,m=-1/0,g=1/0,x=-1/0,T=/texture|gradient/i;i=t?this.matrix:this.worldMatrix;for(let S=0;S<this.children.length;S++){let v=this.children[S];if(!(!v.visible||T.test(v._renderer.type))&&(e=v.getBoundingClientRect(t),r=typeof e.top!="number"||st.isNaN(e.top)||!isFinite(e.top),a=typeof e.left!="number"||st.isNaN(e.left)||!isFinite(e.left),f=typeof e.right!="number"||st.isNaN(e.right)||!isFinite(e.right),l=typeof e.bottom!="number"||st.isNaN(e.bottom)||!isFinite(e.bottom),!(r||a||f||l)))if(t){let[E,L]=i.multiply(e.left,e.top),[R,M]=i.multiply(e.right,e.top),[F,B]=i.multiply(e.left,e.bottom),[q,W]=i.multiply(e.right,e.bottom);g=nr(L,M,B,W),d=nr(E,R,F,q),m=rr(E,R,F,q),x=rr(L,M,B,W)}else g=nr(e.top,g),d=nr(e.left,d),m=rr(e.right,m),x=rr(e.bottom,x)}return{top:g,left:d,right:m,bottom:x,width:m-d,height:x-g}}noFill(){return this.children.forEach(function(t){t.noFill()}),this}noStroke(){return this.children.forEach(function(t){t.noStroke()}),this}subdivide(){let t=arguments;return this.children.forEach(function(e){e.subdivide.apply(e,t)}),this}_update(){let t,e,i;if(this._flagBeginning||this._flagEnding){let r=Math.min(this._beginning,this._ending),a=Math.max(this._beginning,this._ending),f=this.length,l=0,d=r*f,m=a*f;for(t=0;t<this.children.length;t++)i=this.children[t],e=i.length,d>l+e?(i.beginning=1,i.ending=1):m<l?(i.beginning=0,i.ending=0):d>l&&d<l+e?(i.beginning=(d-l)/e,i.ending=1):m>l&&m<l+e?(i.beginning=0,i.ending=(m-l)/e):(i.beginning=0,i.ending=1),l+=e}return super._update.apply(this,arguments)}flagReset(){return this._flagAdditions&&(this.additions.length=0,this._flagAdditions=!1),this._flagSubtractions&&(this.subtractions.length=0,this._flagSubtractions=!1),this._flagOrder=this._flagMask=this._flagOpacity=this._flagBeginning=this._flagEnding=!1,super.flagReset.call(this),this}},ee=Jl;y(ee,"Children",Ql);y(ee,"Properties",["fill","stroke","linewidth","cap","join","miter","closed","curved","automatic"]);var ll={visible:{enumerable:!0,get:function(){return this._visible},set:function(t){this._flagVisible=this._visible!==t||this._flagVisible,this._visible=t}},opacity:{enumerable:!0,get:function(){return this._opacity},set:function(t){this._flagOpacity=this._opacity!==t||this._flagOpacity,this._opacity=t}},beginning:{enumerable:!0,get:function(){return this._beginning},set:function(t){this._flagBeginning=this._beginning!==t||this._flagBeginning,this._beginning=t}},ending:{enumerable:!0,get:function(){return this._ending},set:function(t){this._flagEnding=this._ending!==t||this._flagEnding,this._ending=t}},length:{enumerable:!0,get:function(){if(this._flagLength||this._length<=0){if(this._length=0,!this.children)return this._length;for(let t=0;t<this.children.length;t++){let e=this.children[t];this._length+=e.length}}return this._length}},fill:{enumerable:!0,get:function(){return this._fill},set:function(t){this._fill=t;for(let e=0;e<this.children.length;e++){let i=this.children[e];i.fill=t}}},stroke:{enumerable:!0,get:function(){return this._stroke},set:function(t){this._stroke=t;for(let e=0;e<this.children.length;e++){let i=this.children[e];i.stroke=t}}},linewidth:{enumerable:!0,get:function(){return this._linewidth},set:function(t){this._linewidth=t;for(let e=0;e<this.children.length;e++){let i=this.children[e];i.linewidth=t}}},join:{enumerable:!0,get:function(){return this._join},set:function(t){this._join=t;for(let e=0;e<this.children.length;e++){let i=this.children[e];i.join=t}}},miter:{enumerable:!0,get:function(){return this._miter},set:function(t){this._miter=t;for(let e=0;e<this.children.length;e++){let i=this.children[e];i.miter=t}}},cap:{enumerable:!0,get:function(){return this._cap},set:function(t){this._cap=t;for(let e=0;e<this.children.length;e++){let i=this.children[e];i.cap=t}}},closed:{enumerable:!0,get:function(){return this._closed},set:function(t){this._closed=t;for(let e=0;e<this.children.length;e++){let i=this.children[e];i.closed=t}}},curved:{enumerable:!0,get:function(){return this._curved},set:function(t){this._curved=t;for(let e=0;e<this.children.length;e++){let i=this.children[e];i.curved=t}}},automatic:{enumerable:!0,get:function(){return this._automatic},set:function(t){this._automatic=t;for(let e=0;e<this.children.length;e++){let i=this.children[e];i.automatic=t}}},children:{enumerable:!0,get:function(){return this._children},set:function(t){let e=ee.InsertChildren.bind(this),i=ee.RemoveChildren.bind(this),r=ee.OrderChildren.bind(this);this._children&&(this._children.unbind(),this._children.length>0&&i(this._children)),this._children=new Ql(t),this._children.bind(z.Types.insert,e),this._children.bind(z.Types.remove,i),this._children.bind(z.Types.order,r),t.length>0&&e(t)}},mask:{enumerable:!0,get:function(){return this._mask},set:function(t){this._mask=t,this._flagMask=!0,st.isObject(t)&&!t.clip&&(t.clip=!0)}}};function hl(t,e){let i=t.parent,r;if(i===e){a();return}if(i&&i.children.ids[t.id]&&(r=Array.prototype.indexOf.call(i.children,t),i.children.splice(r,1),f()),e){a();return}f(),i._flagAdditions&&i.additions.length===0&&(i._flagAdditions=!1),i._flagSubtractions&&i.subtractions.length===0&&(i._flagSubtractions=!1),delete t.parent;function a(){e.subtractions.length>0&&(r=Array.prototype.indexOf.call(e.subtractions,t),r>=0&&e.subtractions.splice(r,1)),e.additions.length>0&&(r=Array.prototype.indexOf.call(e.additions,t),r>=0&&e.additions.splice(r,1)),t.parent=e,e.additions.push(t),e._flagAdditions=!0}function f(){r=Array.prototype.indexOf.call(i.additions,t),r>=0&&i.additions.splice(r,1),r=Array.prototype.indexOf.call(i.subtractions,t),r<0&&(i.subtractions.push(t),i._flagSubtractions=!0)}}var Zs=[],sa=Math.max,bc=Math.min,fl=Math.abs,sr=Math.sin,ar=Math.cos,vc=Math.acos,yr=Math.sqrt,Zt={isHidden:/(undefined|none|transparent)/i,alignments:{left:"start",middle:"center",right:"end"},shim:function(t,e){return t.tagName=t.nodeName=e||"canvas",t.nodeType=1,t.getAttribute=function(i){return this[i]},t.setAttribute=function(i,r){return this[i]=r,this},t},group:{renderChild:function(t){Zt[t._renderer.type].render.call(t,this.ctx,!0,this.clip)},render:function(t){if(!this._visible)return this;this._update();let e=this._matrix.elements,i=this.parent;this._renderer.opacity=this._opacity*(i&&i._renderer?i._renderer.opacity:1);let r=this._mask,a=or(e),f=!a||!!r;if(this._renderer.context||(this._renderer.context={}),this._renderer.context.ctx=t,f&&(t.save(),a||t.transform(e[0],e[3],e[1],e[4],e[2],e[5])),r&&Zt[r._renderer.type].render.call(r,t,!0),this._opacity>0&&this._scale!==0)for(let l=0;l<this.children.length;l++){let d=this.children[l];Zt[d._renderer.type].render.call(d,t)}return f&&t.restore(),this.flagReset()}},path:{render:function(t,e,i){let r,a,f,l,d,m,g,x,T,S,v,E,L,R,M,F,B,q,W,h,G,J,Z,tt,ut,nt,Ft,xt,Gt,Nt,pt,ot,yt,Tt;if(Tt=this.parent&&this.parent._renderer?this.parent._renderer.opacity:1,Gt=this._mask,Nt=this._clip,d=this._opacity*(Tt||1),m=this._visible,!e&&(!m||Nt||d===0))return this;this._update(),r=this._matrix.elements,a=this._stroke,f=this._linewidth,l=this._fill,g=this._cap,x=this._join,T=this._miter,S=this._closed,v=this._renderer.vertices,E=v.length,L=E-1,pt=or(r),yt=this.dashes,pt||(t.save(),t.transform(r[0],r[3],r[1],r[4],r[2],r[5])),Gt&&Zt[Gt._renderer.type].render.call(Gt,t,!0),l&&(typeof l=="string"?t.fillStyle=l:(Zt[l._renderer.type].render.call(l,t,this),t.fillStyle=l._renderer.effect)),a&&(typeof a=="string"?t.strokeStyle=a:(Zt[a._renderer.type].render.call(a,t,this),t.strokeStyle=a._renderer.effect),f&&(t.lineWidth=f),T&&(t.miterLimit=T),x&&(t.lineJoin=x),!S&&g&&(t.lineCap=g)),typeof d=="number"&&(t.globalAlpha=d),yt&&yt.length>0&&(t.lineDashOffset=yt.offset||0,t.setLineDash(yt)),t.beginPath();let rt,Kt,le,Ht,Ut,It,Ve;for(let de=0;de<E;de++)switch(F=v[de],Ft=F.x,xt=F.y,F.command){case X.close:t.closePath();break;case X.arc:rt=F.rx,Kt=F.ry,le=F.xAxisRotation,Ht=F.largeArcFlag,Ut=F.sweepFlag,R=S?Re(de-1,E):sa(de-1,0),M=v[R],It=M.x,Ve=M.y,Zt.renderSvgArcCommand(t,It,Ve,rt,Kt,Ht,Ut,le,Ft,xt);break;case X.curve:R=S?Re(de-1,E):Math.max(de-1,0),M=v[R],Z=M.controls&&M.controls.right||K.zero,tt=F.controls&&F.controls.left||K.zero,M._relative?(G=Z.x+M.x,J=Z.y+M.y):(G=Z.x,J=Z.y),F._relative?(W=tt.x+F.x,h=tt.y+F.y):(W=tt.x,h=tt.y),t.bezierCurveTo(G,J,W,h,Ft,xt),de>=L&&S&&(B=q,ut=F.controls&&F.controls.right||K.zero,nt=B.controls&&B.controls.left||K.zero,F._relative?(G=ut.x+F.x,J=ut.y+F.y):(G=ut.x,J=ut.y),B._relative?(W=nt.x+B.x,h=nt.y+B.y):(W=nt.x,h=nt.y),Ft=B.x,xt=B.y,t.bezierCurveTo(G,J,W,h,Ft,xt));break;case X.line:t.lineTo(Ft,xt);break;case X.move:q=F,t.moveTo(Ft,xt);break}return S&&t.closePath(),!Nt&&!i&&(Zt.isHidden.test(l)||(ot=l._renderer&&l._renderer.offset,ot&&(t.save(),t.translate(-l._renderer.offset.x,-l._renderer.offset.y),t.scale(l._renderer.scale.x,l._renderer.scale.y)),t.fill(),ot&&t.restore()),Zt.isHidden.test(a)||(ot=a._renderer&&a._renderer.offset,ot&&(t.save(),t.translate(-a._renderer.offset.x,-a._renderer.offset.y),t.scale(a._renderer.scale.x,a._renderer.scale.y),t.lineWidth=f/a._renderer.scale.x),t.stroke(),ot&&t.restore())),pt||t.restore(),Nt&&!i&&t.clip(),yt&&yt.length>0&&t.setLineDash(Zs),this.flagReset()}},points:{render:function(t,e,i){let r,a,f,l,d,m,g,x,T,S,v,E,L,R,M,F;if(F=this.parent&&this.parent._renderer?this.parent._renderer.opacity:1,d=this._opacity*(F||1),m=this._visible,!e&&(!m||d===0))return this;this._update(),r=this._matrix.elements,a=this._stroke,f=this._linewidth,l=this._fill,x=this._renderer.collection,T=x.length,L=or(r),M=this.dashes,g=this._size,L||(t.save(),t.transform(r[0],r[3],r[1],r[4],r[2],r[5])),l&&(typeof l=="string"?t.fillStyle=l:(Zt[l._renderer.type].render.call(l,t,this),t.fillStyle=l._renderer.effect)),a&&(typeof a=="string"?t.strokeStyle=a:(Zt[a._renderer.type].render.call(a,t,this),t.strokeStyle=a._renderer.effect),f&&(t.lineWidth=f)),typeof d=="number"&&(t.globalAlpha=d),M&&M.length>0&&(t.lineDashOffset=M.offset||0,t.setLineDash(M)),t.beginPath();let B=g*.5,q;this._sizeAttenuation||(q=this.worldMatrix.elements,q=Ji(q[0],q[3],q[1],q[4],q[2],q[5]),B/=Math.max(q.scaleX,q.scaleY));for(let W=0;W<T;W++)S=x[W],v=S.x,E=S.y,t.moveTo(v+B,E),t.arc(v,E,B,0,me);return i||(Zt.isHidden.test(l)||(R=l._renderer&&l._renderer.offset,R&&(t.save(),t.translate(-l._renderer.offset.x,-l._renderer.offset.y),t.scale(l._renderer.scale.x,l._renderer.scale.y)),t.fill(),R&&t.restore()),Zt.isHidden.test(a)||(R=a._renderer&&a._renderer.offset,R&&(t.save(),t.translate(-a._renderer.offset.x,-a._renderer.offset.y),t.scale(a._renderer.scale.x,a._renderer.scale.y),t.lineWidth=f/a._renderer.scale.x),t.stroke(),R&&t.restore())),L||t.restore(),M&&M.length>0&&t.setLineDash(Zs),this.flagReset()}},text:{render:function(t,e,i){let r=this.parent&&this.parent._renderer?this.parent._renderer.opacity:1,a=this._opacity*r,f=this._visible,l=this._mask,d=this._clip;if(!e&&(!f||d||a===0))return this;this._update();let m=this._matrix.elements,g=this._stroke,x=this._linewidth,T=this._fill,S=this._decoration,v=or(m),E=T._renderer&&T._renderer.offset&&g._renderer&&g._renderer.offset,L=this.dashes,R=Zt.alignments[this._alignment]||this._alignment,M=this._baseline,F,B,q,W,h,G,J,Z,tt,ut,nt;if(v||(t.save(),t.transform(m[0],m[3],m[1],m[4],m[2],m[5])),l&&Zt[l._renderer.type].render.call(l,t,!0),E||(t.font=[this._style,this._weight,this._size+"px/"+this._leading+"px",this._family].join(" ")),t.textAlign=R,t.textBaseline=M,T&&(typeof T=="string"?t.fillStyle=T:(Zt[T._renderer.type].render.call(T,t,this),t.fillStyle=T._renderer.effect)),g&&(typeof g=="string"?t.strokeStyle=g:(Zt[g._renderer.type].render.call(g,t,this),t.strokeStyle=g._renderer.effect),x&&(t.lineWidth=x)),typeof a=="number"&&(t.globalAlpha=a),L&&L.length>0&&(t.lineDashOffset=L.offset||0,t.setLineDash(L)),!d&&!i&&(Zt.isHidden.test(T)||(T._renderer&&T._renderer.offset?(G=T._renderer.scale.x,J=T._renderer.scale.y,t.save(),t.translate(-T._renderer.offset.x,-T._renderer.offset.y),t.scale(G,J),F=this._size/T._renderer.scale.y,B=this._leading/T._renderer.scale.y,t.font=[this._style,this._weight,F+"px/",B+"px",this._family].join(" "),q=T._renderer.offset.x/T._renderer.scale.x,W=T._renderer.offset.y/T._renderer.scale.y,t.fillText(this.value,q,W),t.restore()):t.fillText(this.value,0,0)),Zt.isHidden.test(g)||(g._renderer&&g._renderer.offset?(G=g._renderer.scale.x,J=g._renderer.scale.y,t.save(),t.translate(-g._renderer.offset.x,-g._renderer.offset.y),t.scale(G,J),F=this._size/g._renderer.scale.y,B=this._leading/g._renderer.scale.y,t.font=[this._style,this._weight,F+"px/",B+"px",this._family].join(" "),q=g._renderer.offset.x/g._renderer.scale.x,W=g._renderer.offset.y/g._renderer.scale.y,h=x/g._renderer.scale.x,t.lineWidth=h,t.strokeText(this.value,q,W),t.restore()):t.strokeText(this.value,0,0))),/(underline|strikethrough)/i.test(S)){let Ft=t.measureText(this.value),xt=1;switch(S){case"underline":tt=Ft.actualBoundingBoxAscent,nt=Ft.actualBoundingBoxAscent;break;case"strikethrough":tt=0,nt=0,xt=.5;break}switch(M){case"top":tt+=this._size*xt,nt+=this._size*xt;break;case"baseline":case"bottom":tt-=this._size*xt,nt-=this._size*xt;break}switch(R){case"left":case"start":Z=0,ut=Ft.width;break;case"right":case"end":Z=-Ft.width,ut=0;break;default:Z=-Ft.width/2,ut=Ft.width/2}t.lineWidth=Math.max(Math.floor(this._size/15),1),t.strokeStyle=t.fillStyle,t.beginPath(),t.moveTo(Z,tt),t.lineTo(ut,nt),t.stroke()}return v||t.restore(),d&&!i&&t.clip(),L&&L.length>0&&t.setLineDash(Zs),this.flagReset()}},"linear-gradient":{render:function(t,e){if(!!e){if(this._update(),!this._renderer.effect||this._flagEndPoints||this._flagStops||this._flagUnits){let i,r=this.left._x,a=this.left._y,f=this.right._x,l=this.right._y;/objectBoundingBox/i.test(this._units)&&(i=e.getBoundingClientRect(!0),r=(r-.5)*i.width,a=(a-.5)*i.height,f=(f-.5)*i.width,l=(l-.5)*i.height),this._renderer.effect=t.createLinearGradient(r,a,f,l);for(let d=0;d<this.stops.length;d++){let m=this.stops[d];this._renderer.effect.addColorStop(m._offset,m._color)}}return this.flagReset()}}},"radial-gradient":{render:function(t,e){if(!!e){if(this._update(),!this._renderer.effect||this._flagCenter||this._flagFocal||this._flagRadius||this._flagStops||this._flagUnits){let i,r=this.center._x,a=this.center._y,f=this.focal._x,l=this.focal._y,d=this._radius;/objectBoundingBox/i.test(this._units)&&(i=e.getBoundingClientRect(!0),r=r*i.width*.5,a=a*i.height*.5,f=f*i.width*.5,l=l*i.height*.5,d*=Math.min(i.width,i.height)*.5),this._renderer.effect=t.createRadialGradient(r,a,0,f,l,d);for(let m=0;m<this.stops.length;m++){let g=this.stops[m];this._renderer.effect.addColorStop(g._offset,g._color)}}return this.flagReset()}}},texture:{render:function(t){this._update();let e=this.image;return(!this._renderer.effect||(this._flagLoaded||this._flagImage||this._flagVideo||this._flagRepeat)&&this.loaded)&&(this._renderer.effect=t.createPattern(this.image,this._repeat)),(this._flagOffset||this._flagLoaded||this._flagScale)&&(this._renderer.offset instanceof K||(this._renderer.offset=new K),this._renderer.offset.x=-this._offset.x,this._renderer.offset.y=-this._offset.y,e&&(this._renderer.offset.x+=e.width/2,this._renderer.offset.y+=e.height/2,this._scale instanceof K?(this._renderer.offset.x*=this._scale.x,this._renderer.offset.y*=this._scale.y):(this._renderer.offset.x*=this._scale,this._renderer.offset.y*=this._scale))),(this._flagScale||this._flagLoaded)&&(this._renderer.scale instanceof K||(this._renderer.scale=new K),this._scale instanceof K?this._renderer.scale.copy(this._scale):this._renderer.scale.set(this._scale,this._scale)),this.flagReset()}},renderSvgArcCommand:function(t,e,i,r,a,f,l,d,m,g){d=d*Math.PI/180,r=fl(r),a=fl(a);let x=(e-m)/2,T=(i-g)/2,S=ar(d)*x+sr(d)*T,v=-sr(d)*x+ar(d)*T,E=S*S,L=v*v,R=r*r,M=a*a,F=E/R+L/M;if(F>1){let xt=yr(F);r=xt*r,a=xt*a,R=r*r,M=a*a}let B=R*L+M*E,q=(R*M-B)/B,W=yr(sa(0,q));f===l&&(W=-W);let h=W*r*v/a,G=-W*a*S/r,J=ar(d)*h-sr(d)*G+(e+m)/2,Z=sr(d)*h+ar(d)*G+(i+g)/2,tt=cl(1,0,(S-h)/r,(v-G)/a),ut=cl((S-h)/r,(v-G)/a,(-S-h)/r,(-v-G)/a)%me,nt=tt+ut;xc(t,J,Z,r,a,tt,nt,l===0,d)}},An=class extends z{constructor(t){super();let e=t.smoothing!==!1;this.domElement=t.domElement||document.createElement("canvas"),this.ctx=this.domElement.getContext("2d"),this.overdraw=t.overdraw||!1,typeof this.ctx.imageSmoothingEnabled<"u"&&(this.ctx.imageSmoothingEnabled=e),this.scene=new ee,this.scene.parent=this}setSize(t,e,i){return this.width=t,this.height=e,this.ratio=typeof i>"u"?ca(this.ctx):i,this.domElement.width=t*this.ratio,this.domElement.height=e*this.ratio,this.domElement.style&&st.extend(this.domElement.style,{width:t+"px",height:e+"px"}),this.trigger(z.Types.resize,t,e,i)}render(){let t=this.ratio===1;return t||(this.ctx.save(),this.ctx.scale(this.ratio,this.ratio)),this.overdraw||this.ctx.clearRect(0,0,this.width,this.height),Zt.group.render.call(this.scene,this.ctx),t||this.ctx.restore(),this}};y(An,"Utils",Zt);function xc(t,e,i,r,a,f,l,d,m){let g=l-f,x=Zi.Tolerance.epsilon,T=Math.abs(g)<x,S=Re(g,me);S<x&&(T?S=0:S=me),d===!0&&!T&&(S===me?S=-me:S=S-me);for(let v=0;v<ne.Resolution;v++){let E=v/(ne.Resolution-1),L=f+E*S,R=e+r*Math.cos(L),M=i+a*Math.sin(L);if(m!==0){let F=Math.cos(m),B=Math.sin(m),q=R-e,W=M-i;R=q*F-W*B+e,M=q*B+W*F+i}t.lineTo(R,M)}}function cl(t,e,i,r){let a=t*i+e*r,f=yr(t*t+e*e)*yr(i*i+r*r),l=vc(sa(-1,bc(1,a/f)));return t*r-e*i<0&&(l=-l),l}function or(t){return t[0]==1&&t[3]==0&&t[1]==0&&t[4]==1&&t[2]==0&&t[5]==0}var Ce={Image:null,isHeadless:!1,shim:function(t,e){return An.Utils.shim(t),typeof e<"u"&&(Ce.Image=e),Ce.isHeadless=!0,t}},Ae={hasEventListeners:typeof Yt.addEventListener=="function",bind:function(t,e,i,r){return this.hasEventListeners?t.addEventListener(e,i,!!r):t.attachEvent("on"+e,i),Ae},unbind:function(t,e,i,r){return Ae.hasEventListeners?t.removeEventListeners(e,i,!!r):t.detachEvent("on"+e,i),Ae},getRequestAnimationFrame:function(){let t=["ms","moz","webkit","o"],e=0,i=Yt.requestAnimationFrame;if(!i){for(let a=0;a<t.length;a++)i=Yt[t[a]+"RequestAnimationFrame"]||i;i=i||r}function r(a,f){let l=new Date().getTime(),d=Math.max(0,16-(l-e)),m=Yt.setTimeout(g,d);e=l+d;function g(){a(l+d)}return m}return i}},Qi=Yt.document?Yt.document.createElement("div"):{};Qi.id="help-two-load";Object.defineProperty(Ae,"temp",{enumerable:!0,get:function(){return st.isElement(Qi)&&!Yt.document.head.contains(Qi)&&(Qi.style.display="none",Yt.document.head.appendChild(Qi)),Qi}});var Me=class extends Error{constructor(t){super(),y(this,"name","Two.js"),y(this,"message"),this.message=t}},xr=class{constructor(){y(this,"map",{})}add(t,e){return this.map[t]=e,this}remove(t){return delete this.map[t],this}get(t){return this.map[t]}contains(t){return t in this.map}};function ul(t,e){if(e===0||e===1)return!0;let r=t._length*e,a=0;for(let f=0;f<t._lengths.length;f++){let l=t._lengths[f];if(a>=r)return r-a>=0;a+=l}return!1}function br(t,e){let i=t._length;if(e<=0)return 0;if(e>=i)return t._lengths.length-1;for(let r=0,a=0;r<t._lengths.length;r++){if(a+t._lengths[r]>=e)return e-=a,Math.max(r-1,0)+e/t._lengths[r];a+=t._lengths[r]}return-1}function aa(t,e,i){let r,a,f,l,d,m,g,x,T=e.controls&&e.controls.right,S=t.controls&&t.controls.left;return r=e.x,d=e.y,a=(T||e).x,m=(T||e).y,f=(S||t).x,g=(S||t).y,l=t.x,x=t.y,T&&e._relative&&(a+=e.x,m+=e.y),S&&t._relative&&(f+=t.x,g+=t.y),Vl(r,d,a,m,f,g,l,x,i)}function dl(t,e,i){let r,a,f,l,d,m,g,x,T=e.controls&&e.controls.right,S=t.controls&&t.controls.left;return r=e.x,d=e.y,a=(T||e).x,m=(T||e).y,f=(S||t).x,g=(S||t).y,l=t.x,x=t.y,T&&e._relative&&(a+=e.x,m+=e.y),S&&t._relative&&(f+=t.x,g+=t.y),fa(r,d,a,m,f,g,l,x,i)}var yi=class extends vr{constructor(t,e,i){super(),y(this,"_flagOffset",!0),y(this,"_flagOpacity",!0),y(this,"_flagColor",!0),y(this,"_offset",0),y(this,"_opacity",1),y(this,"_color","#fff");for(let r in pl)Object.defineProperty(this,r,pl[r]);this._renderer.type="stop",this.offset=typeof t=="number"?t:yi.Index<=0?0:1,this.opacity=typeof i=="number"?i:1,this.color=typeof e=="string"?e:yi.Index<=0?"#fff":"#000",yi.Index=(yi.Index+1)%2}clone(t){let e=new yi;return st.each(yi.Properties,function(i){e[i]=this[i]},this),t&&t.stops&&t.stops.push(e),e}toObject(){let t={};return st.each(yi.Properties,function(e){t[e]=this[e]},this),t}flagReset(){return this._flagOffset=this._flagColor=this._flagOpacity=!1,super.flagReset.call(this),this}},xi=yi;y(xi,"Index",0);y(xi,"Properties",["offset","opacity","color"]);var pl={offset:{enumerable:!0,get:function(){return this._offset},set:function(t){this._offset=t,this._flagOffset=!0,this.parent&&(this.parent._flagStops=!0)}},opacity:{enumerable:!0,get:function(){return this._opacity},set:function(t){this._opacity=t,this._flagOpacity=!0,this.parent&&(this.parent._flagStops=!0)}},color:{enumerable:!0,get:function(){return this._color},set:function(t){this._color=t,this._flagColor=!0,this.parent&&(this.parent._flagStops=!0)}}},hr=class extends vr{constructor(t){super(),y(this,"_flagStops",!1),y(this,"_flagSpread",!1),y(this,"_flagUnits",!1),y(this,"_spread",""),y(this,"_units","");for(let e in gl)Object.defineProperty(this,e,gl[e]);this._renderer.type="gradient",this.id=ne.Identifier+ne.uniqueId(),this.classList=[],this._renderer.flagStops=wc.bind(this),this._renderer.bindStops=kc.bind(this),this._renderer.unbindStops=Tc.bind(this),this.spread="pad",this.units="objectBoundingBox",t&&(this.stops=t)}clone(t){let e=this.stops.map(function(r){return r.clone()}),i=new hr(e);return st.each(hr.Properties,function(r){i[r]=this[r]},this),t&&t.add(i),i}toObject(){let t={stops:this.stops.map(function(e){return e.toObject()})};return st.each(hr.Properties,function(e){t[e]=this[e]},this),t}_update(){return(this._flagSpread||this._flagStops)&&this.trigger(z.Types.change),this}flagReset(){return this._flagSpread=this._flagUnits=this._flagStops=!1,super.flagReset.call(this),this}},ie=hr;y(ie,"Stop",xi);y(ie,"Properties",["spread","stops","renderer","units"]);var gl={spread:{enumerable:!0,get:function(){return this._spread},set:function(t){this._spread=t,this._flagSpread=!0}},units:{enumerable:!0,get:function(){return this._units},set:function(t){this._units=t,this._flagUnits=!0}},stops:{enumerable:!0,get:function(){return this._stops},set:function(t){let e=this._renderer.bindStops,i=this._renderer.unbindStops;this._stops&&this._stops.unbind(z.Types.insert,e).unbind(z.Types.remove,i),this._stops=new vi((t||[]).slice(0)),this._stops.bind(z.Types.insert,e).bind(z.Types.remove,i),e(this._stops)}}};function wc(){this._flagStops=!0}function kc(t){let e=t.length;for(;e--;)t[e].bind(z.Types.change,this._renderer.flagStops),t[e].parent=this;this._renderer.flagStops()}function Tc(t){let e=t.length;for(;e--;)t[e].unbind(z.Types.change,this._renderer.flagStops),delete t[e].parent;this._renderer.flagStops()}var Zl=class extends ie{constructor(t,e,i,r,a){super(a),y(this,"_flagEndPoints",!1),y(this,"_left",null),y(this,"_right",null);for(let f in _l)Object.defineProperty(this,f,_l[f]);this._renderer.type="linear-gradient",this._renderer.flagEndPoints=Ec.bind(this),this.left=new K,this.right=new K,typeof t=="number"&&(this.left.x=t),typeof e=="number"&&(this.left.y=e),typeof i=="number"&&(this.right.x=i),typeof r=="number"&&(this.right.y=r)}clone(t){let e=this.stops.map(function(r){return r.clone()}),i=new Zl(this.left._x,this.left._y,this.right._x,this.right._y,e);return st.each(ie.Properties,function(r){i[r]=this[r]},this),t&&t.add(i),i}toObject(){let t=super.toObject.call(this);return t.left=this.left.toObject(),t.right=this.right.toObject(),t}_update(){return(this._flagEndPoints||this._flagSpread||this._flagStops)&&this.trigger(z.Types.change),this}flagReset(){return this._flagEndPoints=!1,super.flagReset.call(this),this}},$t=Zl;y($t,"Properties",["left","right"]);y($t,"Stop",xi);var _l={left:{enumerable:!0,get:function(){return this._left},set:function(t){this._left instanceof K&&this._left.unbind(z.Types.change,this._renderer.flagEndPoints),this._left=t,this._left.bind(z.Types.change,this._renderer.flagEndPoints),this._flagEndPoints=!0}},right:{enumerable:!0,get:function(){return this._right},set:function(t){this._right instanceof K&&this._right.unbind(z.Types.change,this._renderer.flagEndPoints),this._right=t,this._right.bind(z.Types.change,this._renderer.flagEndPoints),this._flagEndPoints=!0}}};function Ec(){this._flagEndPoints=!0}var fr=class extends ie{constructor(t,e,i,r,a,f){super(r),y(this,"_flagRadius",!1),y(this,"_flagCenter",!1),y(this,"_flagFocal",!1),y(this,"_radius",0),y(this,"_center",null),y(this,"_focal",null);for(let l in ml)Object.defineProperty(this,l,ml[l]);this._renderer.type="radial-gradient",this._renderer.flagCenter=Sc.bind(this),this._renderer.flagFocal=Ac.bind(this),this.center=new K,this.radius=typeof i=="number"?i:1,this.focal=new K,typeof t=="number"&&(this.center.x=t),typeof e=="number"&&(this.center.y=e),this.focal.copy(this.center),typeof a=="number"&&(this.focal.x=a),typeof f=="number"&&(this.focal.y=f)}clone(t){let e=this.stops.map(function(r){return r.clone()}),i=new fr(this.center._x,this.center._y,this._radius,e,this.focal._x,this.focal._y);return st.each(ie.Properties.concat(fr.Properties),function(r){i[r]=this[r]},this),t&&t.add(i),i}toObject(){let t=super.toObject.call(this);return st.each(fr.Properties,function(e){t[e]=this[e]},this),t.center=this.center.toObject(),t.focal=this.focal.toObject(),t}_update(){return(this._flagRadius||this._flatCenter||this._flagFocal||this._flagSpread||this._flagStops)&&this.trigger(z.Types.change),this}flagReset(){return this._flagRadius=this._flagCenter=this._flagFocal=!1,super.flagReset.call(this),this}},Xt=fr;y(Xt,"Stop",xi);y(Xt,"Properties",["center","radius","focal"]);var ml={radius:{enumerable:!0,get:function(){return this._radius},set:function(t){this._radius=t,this._flagRadius=!0}},center:{enumerable:!0,get:function(){return this._center},set:function(t){this._center&&this._center.unbind(z.Types.change,this._renderer.flagCenter),this._center=t,this._center.bind(z.Types.change,this._renderer.flagCenter),this._flagCenter=!0}},focal:{enumerable:!0,get:function(){return this._focal},set:function(t){this._focal&&this._focal.unbind(z.Types.change,this._renderer.flagFocal),this._focal=t,this._focal.bind(z.Types.change,this._renderer.flagFocal),this._flagFocal=!0}}};function Sc(){this._flagCenter=!0}function Ac(){this._flagFocal=!0}var cr,th={video:/\.(mp4|webm|ogg)$/i,image:/\.(jpe?g|png|gif|tiff|webp)$/i,effect:/texture|gradient/i};Yt.document&&(cr=document.createElement("a"));var he=class extends vr{constructor(t,e){super(),y(this,"_flagSrc",!1),y(this,"_flagImage",!1),y(this,"_flagVideo",!1),y(this,"_flagLoaded",!1),y(this,"_flagRepeat",!1),y(this,"_flagOffset",!1),y(this,"_flagScale",!1),y(this,"_src",""),y(this,"_image",null),y(this,"_loaded",!1),y(this,"_repeat","no-repeat"),y(this,"_scale",1),y(this,"_offset",null),this._renderer={};for(let i in yl)Object.defineProperty(this,i,yl[i]);if(this._renderer.type="texture",this._renderer.flagOffset=Cc.bind(this),this._renderer.flagScale=Mc.bind(this),this.id=ne.Identifier+ne.uniqueId(),this.classList=[],this.loaded=!1,this.repeat="no-repeat",this.offset=new K,typeof e=="function"){let i=function(){this.unbind(z.Types.load,i),typeof e=="function"&&e()}.bind(this);this.bind(z.Types.load,i)}if(typeof t=="string")this.src=t;else if(typeof t=="object"){let i=Object.prototype.toString.call(t);(i==="[object HTMLImageElement]"||i==="[object HTMLCanvasElement]"||i==="[object HTMLVideoElement]"||i==="[object Image]")&&(this.image=t)}this._update()}static getAbsoluteURL(t){return cr?(cr.href=t,cr.href):t}static loadHeadlessBuffer(t,e){t.image.onload=e,t.image.src=t.src}static getTag(t){return t&&t.nodeName&&t.nodeName.toLowerCase()||"img"}static getImage(t){let e=he.getAbsoluteURL(t);if(he.ImageRegistry.contains(e))return he.ImageRegistry.get(e);let i;return Ce.Image?(i=new Ce.Image,An.Utils.shim(i,"img")):Yt.document?th.video.test(e)?i=document.createElement("video"):i=document.createElement("img"):console.warn("Two.js: no prototypical image defined for Two.Texture"),i.crossOrigin="anonymous",i.referrerPolicy="no-referrer",i}static load(t,e){let i=t.image,r=he.getTag(i);t._flagImage&&(/canvas/i.test(r)?he.Register.canvas(t,e):(t._src=!Ce.isHeadless&&i.getAttribute("two-src")||i.src,he.Register[r](t,e))),t._flagSrc&&(i||(i=he.getImage(t.src),t.image=i),r=he.getTag(i),he.Register[r](t,e))}clone(){let t=new he(this.src);return t.repeat=this.repeat,t.offset.copy(this.origin),t.scale=this.scale,t}toObject(){return{src:this.src,repeat:this.repeat,origin:this.origin.toObject(),scale:typeof this.scale=="number"?this.scale:this.scale.toObject()}}_update(){return(this._flagSrc||this._flagImage)&&(this.trigger(z.Types.change),(this._flagSrc||this._flagImage)&&(this.loaded=!1,he.load(this,function(){this.loaded=!0,this.trigger(z.Types.change).trigger(z.Types.load)}.bind(this)))),this._image&&this._image.readyState>=4&&(this._flagVideo=!0),this}flagReset(){return this._flagSrc=this._flagImage=this._flagLoaded=this._flagRepeat=this._flagVideo=this._flagScale=this._flagOffset=!1,super.flagReset.call(this),this}},Dt=he;y(Dt,"Properties",["src","loaded","repeat","scale","offset","image"]);y(Dt,"RegularExpressions",th);y(Dt,"ImageRegistry",new xr);y(Dt,"Register",{canvas:function(t,e){t._src="#"+t.id,he.ImageRegistry.add(t.src,t.image),typeof e=="function"&&e()},img:function(t,e){let i=t.image,r=function(f){!Ce.isHeadless&&i.removeEventListener&&typeof i.removeEventListener=="function"&&(i.removeEventListener("load",r,!1),i.removeEventListener("error",a,!1)),typeof e=="function"&&e()},a=function(f){throw!Ce.isHeadless&&typeof i.removeEventListener=="function"&&(i.removeEventListener("load",r,!1),i.removeEventListener("error",a,!1)),new Me("unable to load "+t.src)};typeof i.width=="number"&&i.width>0&&typeof i.height=="number"&&i.height>0?r():!Ce.isHeadless&&typeof i.addEventListener=="function"&&(i.addEventListener("load",r,!1),i.addEventListener("error",a,!1)),t._src=he.getAbsoluteURL(t._src),!(!Ce.isHeadless&&i&&i.getAttribute("two-src"))&&(Ce.isHeadless||i.setAttribute("two-src",t.src),he.ImageRegistry.add(t.src,i),Ce.isHeadless?he.loadHeadlessBuffer(t,r):t.image.src=t.src)},video:function(t,e){if(Ce.isHeadless)throw new Me("video textures are not implemented in headless environments.");let i=function(a){t.image.removeEventListener("canplaythrough",i,!1),t.image.removeEventListener("error",r,!1),t.image.width=t.image.videoWidth,t.image.height=t.image.videoHeight,typeof e=="function"&&e()},r=function(a){throw t.image.removeEventListener("canplaythrough",i,!1),t.image.removeEventListener("error",r,!1),new Me("unable to load "+t.src)};t._src=he.getAbsoluteURL(t._src),t.image.getAttribute("two-src")||(t.image.setAttribute("two-src",t.src),he.ImageRegistry.add(t.src,t.image)),t.image.readyState>=4?i():(t.image.addEventListener("canplaythrough",i,!1),t.image.addEventListener("error",r,!1),t.image.src=t.src,t.image.load())}});var yl={src:{enumerable:!0,get:function(){return this._src},set:function(t){this._src=t,this._flagSrc=!0}},loaded:{enumerable:!0,get:function(){return this._loaded},set:function(t){this._loaded=t,this._flagLoaded=!0}},repeat:{enumerable:!0,get:function(){return this._repeat},set:function(t){this._repeat=t,this._flagRepeat=!0}},image:{enumerable:!0,get:function(){return this._image},set:function(t){let e=Dt.getTag(t),i;switch(e){case"canvas":i="#"+t.id;break;default:i=t.src}Dt.ImageRegistry.contains(i)?this._image=Dt.ImageRegistry.get(t.src):this._image=t,this._flagImage=!0}},offset:{enumerable:!0,get:function(){return this._offset},set:function(t){this._offset&&this._offset.unbind(z.Types.change,this._renderer.flagOffset),this._offset=t,this._offset.bind(z.Types.change,this._renderer.flagOffset),this._flagOffset=!0}},scale:{enumerable:!0,get:function(){return this._scale},set:function(t){this._scale instanceof K&&this._scale.unbind(z.Types.change,this._renderer.flagScale),this._scale=t,this._scale instanceof K&&this._scale.bind(z.Types.change,this._renderer.flagScale),this._flagScale=!0}}};function Cc(){this._flagOffset=!0}function Mc(){this._flagScale=!0}var Gi=Math.min,Ki=Math.max,Rc=Math.ceil,Oc=Math.floor,Pc=new K,xn=class extends bi{constructor(t,e,i,r){super(),y(this,"_flagVertices",!0),y(this,"_flagLength",!0),y(this,"_flagFill",!0),y(this,"_flagStroke",!0),y(this,"_flagLinewidth",!0),y(this,"_flagOpacity",!0),y(this,"_flagVisible",!0),y(this,"_flagCap",!0),y(this,"_flagJoin",!0),y(this,"_flagMiter",!0),y(this,"_flagMask",!1),y(this,"_flagClip",!1),y(this,"_length",0),y(this,"_fill","#fff"),y(this,"_stroke","#000"),y(this,"_linewidth",1),y(this,"_opacity",1),y(this,"_visible",!0),y(this,"_cap","round"),y(this,"_join","round"),y(this,"_miter",4),y(this,"_closed",!0),y(this,"_curved",!1),y(this,"_automatic",!0),y(this,"_beginning",0),y(this,"_ending",1),y(this,"_mask",null),y(this,"_clip",!1),y(this,"_dashes",null);for(let a in bl)Object.defineProperty(this,a,bl[a]);this._renderer.type="path",this._renderer.flagVertices=eh.bind(this),this._renderer.bindVertices=ih.bind(this),this._renderer.unbindVertices=nh.bind(this),this._renderer.flagFill=rh.bind(this),this._renderer.flagStroke=sh.bind(this),this._renderer.vertices=[],this._renderer.collection=[],this.closed=!!e,this.curved=!!i,this.beginning=0,this.ending=1,this.fill="#fff",this.stroke="#000",this.linewidth=1,this.opacity=1,this.className="",this.visible=!0,this.cap="butt",this.join="miter",this.miter=4,this.vertices=t,this.automatic=!r,this.dashes=[],this.dashes.offset=0}clone(t){let e=new xn;for(let i=0;i<this.vertices.length;i++)e.vertices.push(this.vertices[i].clone());for(let i=0;i<xn.Properties.length;i++){let r=xn.Properties[i];e[r]=this[r]}return e.className=this.className,e.translation.copy(this.translation),e.rotation=this.rotation,e.scale=this.scale,e.skewX=this.skewX,e.skewY=this.skewY,this.matrix.manual&&e.matrix.copy(this.matrix),t&&t.add(e),e._update()}toObject(){let t={vertices:this.vertices.map(function(e){return e.toObject()})};return st.each(xn.Properties,function(e){typeof this[e]<"u"&&(this[e].toObject?t[e]=this[e].toObject():t[e]=this[e])},this),t.className=this.className,t.translation=this.translation.toObject(),t.rotation=this.rotation,t.scale=this.scale instanceof K?this.scale.toObject():this.scale,t.skewX=this.skewX,t.skewY=this.skewY,this.matrix.manual&&(t.matrix=this.matrix.toObject()),t}noFill(){return this.fill="none",this}noStroke(){return this.stroke="none",this}corner(){let t=this.getBoundingClientRect(!0),e=t.width/2,i=t.height/2,r=t.left+t.width/2,a=t.top+t.height/2;for(let f=0;f<this.vertices.length;f++){let l=this.vertices[f];l.x-=r,l.y-=a,l.x+=e,l.y+=i}return this.mask&&(this.mask.translation.x-=r,this.mask.translation.x+=e,this.mask.translation.y-=a,this.mask.translation.y+=i),this}center(){let t=this.getBoundingClientRect(!0),e=t.left+t.width/2-this.translation.x,i=t.top+t.height/2-this.translation.y;for(let r=0;r<this.vertices.length;r++){let a=this.vertices[r];a.x-=e,a.y-=i}return this.mask&&(this.mask.translation.x-=e,this.mask.translation.y-=i),this}getBoundingClientRect(t){let e,i,r,a,f,l,d=1/0,m=-1/0,g=1/0,x=-1/0;if(this._update(!0),e=t?this.matrix:this.worldMatrix,i=(this.linewidth||0)/2,r=this._renderer.vertices.length,this.linewidth>0||this.stroke&&!/(transparent|none)/i.test(this.stroke))if(this.matrix.manual){let{scaleX:T,scaleY:S}=Ji(e.elements[0],e.elements[3],e.elements[1],e.elements[4],e.elements[2],e.elements[5]);typeof T=="number"&&typeof S=="number"&&(i=Math.max(T,S)*(this.linewidth||0)/2)}else i*=typeof this.scale=="number"?this.scale:Math.max(this.scale.x,this.scale.y);if(r<=0)return{width:0,height:0};for(a=0;a<r;a++){l=this._renderer.vertices[a],f=this._renderer.vertices[(a+r-1)%r];let[T,S]=e.multiply(f.x,f.y),[v,E]=e.multiply(l.x,l.y);if(f.controls&&l.controls){let L=f.controls.right.x,R=f.controls.right.y;f.relative&&(L+=f.x,R+=f.y);let[M,F]=e.multiply(L,R),B=l.controls.left.x,q=l.controls.left.y;l.relative&&(B+=l.x,q+=l.y);let[W,h]=e.multiply(B,q),G=$l(T,S,M,F,W,h,v,E);g=Gi(G.min.y-i,g),d=Gi(G.min.x-i,d),m=Ki(G.max.x+i,m),x=Ki(G.max.y+i,x)}else a<=1&&(g=Gi(S-i,g),d=Gi(T-i,d),m=Ki(T+i,m),x=Ki(S+i,x)),g=Gi(E-i,g),d=Gi(v-i,d),m=Ki(v+i,m),x=Ki(E+i,x)}return{top:g,left:d,right:m,bottom:x,width:m-d,height:x-g}}getPointAt(t,e){let i,r,a,f,l,d,m,g,x,T,S,v,E,L,R,M=this.length*Math.min(Math.max(t,0),1),F=this.vertices.length,B=F-1,q=null,W=null;for(let Nt=0,pt=this._lengths.length,ot=0;Nt<pt;Nt++){if(ot+this._lengths[Nt]>=M){this._closed?(i=Re(Nt,F),r=Re(Nt-1,F),Nt===0&&(i=r,r=Nt)):(i=Nt,r=Math.min(Math.max(Nt-1,0),B)),q=this.vertices[i],W=this.vertices[r],M-=ot,this._lengths[Nt]!==0?t=M/this._lengths[Nt]:t=0;break}ot+=this._lengths[Nt]}if(q===null||W===null)return null;if(q){if(!W)return q}else return W;R=W.controls&&W.controls.right,L=q.controls&&q.controls.left,l=W.x,T=W.y,d=(R||W).x,S=(R||W).y,m=(L||q).x,v=(L||q).y,g=q.x,E=q.y,R&&W.relative&&(d+=W.x,S+=W.y),L&&q.relative&&(m+=q.x,v+=q.y),f=Tn(t,l,d,m,g),x=Tn(t,T,S,v,E);let h=Se(l,d,t),G=Se(T,S,t),J=Se(d,m,t),Z=Se(S,v,t),tt=Se(m,g,t),ut=Se(v,E,t),nt=Se(h,J,t),Ft=Se(G,Z,t),xt=Se(J,tt,t),Gt=Se(Z,ut,t);return st.isObject(e)?(e.x=f,e.y=x,e instanceof At&&(e.controls.left.x=nt,e.controls.left.y=Ft,e.controls.right.x=xt,e.controls.right.y=Gt,(typeof e.relative!="boolean"||e.relative)&&(e.controls.left.x-=f,e.controls.left.y-=x,e.controls.right.x-=f,e.controls.right.y-=x)),e.t=t,e):(a=new At(f,x,nt-f,Ft-x,xt-f,Gt-x,this._curved?X.curve:X.line),a.t=t,a)}plot(){if(this.curved)return Yl(this._collection,this.closed),this;for(let t=0;t<this._collection.length;t++)this._collection[t].command=t===0?X.move:X.line;return this}subdivide(t){this._update();let e=this.vertices.length-1,i=this._closed||this.vertices[e]._command===X.close,r=this.vertices[e],a=[],f;return st.each(this.vertices,function(l,d){if(d<=0&&!i){r=l;return}if(l.command===X.move){a.push(new At(r.x,r.y)),d>0&&(a[a.length-1].command=X.line),r=l;return}f=dl(l,r,t),a=a.concat(f),st.each(f,function(m,g){g<=0&&r.command===X.move?m.command=X.move:m.command=X.line}),d>=e&&(this._closed&&this._automatic?(r=l,f=dl(l,r,t),a=a.concat(f),st.each(f,function(m,g){g<=0&&r.command===X.move?m.command=X.move:m.command=X.line})):i&&a.push(new At(l.x,l.y)),a[a.length-1].command=i?X.close:X.line),r=l},this),this._automatic=!1,this._curved=!1,this.vertices=a,this}_updateLength(t,e){e||this._update();let i=this.vertices.length,r=i-1,a=!1,f=this.vertices[r],l=0;return typeof this._lengths>"u"&&(this._lengths=[]),st.each(this.vertices,function(d,m){if(m<=0&&!a||d.command===X.move){f=d,this._lengths[m]=0;return}this._lengths[m]=aa(d,f,t),l+=this._lengths[m],m>=r&&a&&(f=this.vertices[(m+1)%i],this._lengths[m+1]=aa(d,f,t),l+=this._lengths[m+1]),f=d},this),this._length=l,this._flagLength=!1,this}_update(){if(this._flagVertices){this._automatic&&this.plot(),this._flagLength&&this._updateLength(void 0,!0);let t=this._collection.length,e=this._closed,i=Math.min(this._beginning,this._ending),r=Math.max(this._beginning,this._ending),a=br(this,i*this._length),f=br(this,r*this._length),l=Rc(a),d=Oc(f),m,g,x,T,S,v;for(this._renderer.vertices.length=0,v=0;v<t;v++)this._renderer.collection.length<=v&&this._renderer.collection.push(new At),v>d&&!g?(S=this._renderer.collection[v].copy(this._collection[v]),this.getPointAt(r,S),S.command=this._renderer.collection[v].command,this._renderer.vertices.push(S),g=S,x=this._collection[v-1],x&&x.controls&&(S.relative?S.controls.right.clear():S.controls.right.copy(S),x.relative?this._renderer.collection[v-1].controls.right.copy(x.controls.right).lerp(K.zero,1-S.t):this._renderer.collection[v-1].controls.right.copy(x.controls.right).lerp(x,1-S.t))):v>=l&&v<=d&&(S=this._renderer.collection[v].copy(this._collection[v]),this._renderer.vertices.push(S),v===d&&ul(this,r)?(g=S,!e&&g.controls&&(g.relative?g.controls.right.clear():g.controls.right.copy(g))):v===l&&ul(this,i)&&(m=S,m.command=X.move,!e&&m.controls&&(m.relative?m.controls.left.clear():m.controls.left.copy(m))));l>0&&!m&&(v=l-1,S=this._renderer.collection[v].copy(this._collection[v]),this.getPointAt(i,S),S.command=X.move,this._renderer.vertices.unshift(S),T=this._collection[v+1],T&&T.controls&&(S.controls.left.clear(),T.relative?this._renderer.collection[v+1].controls.left.copy(T.controls.left).lerp(K.zero,S.t):(Pc.copy(T),this._renderer.collection[v+1].controls.left.copy(T.controls.left).lerp(T,S.t))))}return bi.prototype._update.apply(this,arguments),this}flagReset(){return this._flagVertices=this._flagLength=this._flagFill=this._flagStroke=this._flagLinewidth=this._flagOpacity=this._flagVisible=this._flagCap=this._flagJoin=this._flagMiter=this._flagClip=!1,bi.prototype.flagReset.call(this),this}},Pt=xn;y(Pt,"Properties",["fill","stroke","linewidth","opacity","visible","cap","join","miter","closed","curved","automatic","beginning","ending"]);y(Pt,"Utils",{getCurveLength:aa});var bl={linewidth:{enumerable:!0,get:function(){return this._linewidth},set:function(t){this._linewidth=t,this._flagLinewidth=!0}},opacity:{enumerable:!0,get:function(){return this._opacity},set:function(t){this._opacity=t,this._flagOpacity=!0}},visible:{enumerable:!0,get:function(){return this._visible},set:function(t){this._visible=t,this._flagVisible=!0}},cap:{enumerable:!0,get:function(){return this._cap},set:function(t){this._cap=t,this._flagCap=!0}},join:{enumerable:!0,get:function(){return this._join},set:function(t){this._join=t,this._flagJoin=!0}},miter:{enumerable:!0,get:function(){return this._miter},set:function(t){this._miter=t,this._flagMiter=!0}},fill:{enumerable:!0,get:function(){return this._fill},set:function(t){(this._fill instanceof ie||this._fill instanceof $t||this._fill instanceof Xt||this._fill instanceof Dt)&&this._fill.unbind(z.Types.change,this._renderer.flagFill),this._fill=t,this._flagFill=!0,(this._fill instanceof ie||this._fill instanceof $t||this._fill instanceof Xt||this._fill instanceof Dt)&&this._fill.bind(z.Types.change,this._renderer.flagFill)}},stroke:{enumerable:!0,get:function(){return this._stroke},set:function(t){(this._stroke instanceof ie||this._stroke instanceof $t||this._stroke instanceof Xt||this._stroke instanceof Dt)&&this._stroke.unbind(z.Types.change,this._renderer.flagStroke),this._stroke=t,this._flagStroke=!0,(this._stroke instanceof ie||this._stroke instanceof $t||this._stroke instanceof Xt||this._stroke instanceof Dt)&&this._stroke.bind(z.Types.change,this._renderer.flagStroke)}},length:{get:function(){return this._flagLength&&this._updateLength(),this._length}},closed:{enumerable:!0,get:function(){return this._closed},set:function(t){this._closed=!!t,this._flagVertices=!0}},curved:{enumerable:!0,get:function(){return this._curved},set:function(t){this._curved=!!t,this._flagVertices=!0}},automatic:{enumerable:!0,get:function(){return this._automatic},set:function(t){if(t===this._automatic)return;this._automatic=!!t;let e=this._automatic?"ignore":"listen";st.each(this.vertices,function(i){i[e]()})}},beginning:{enumerable:!0,get:function(){return this._beginning},set:function(t){this._beginning=t,this._flagVertices=!0}},ending:{enumerable:!0,get:function(){return this._ending},set:function(t){this._ending=t,this._flagVertices=!0}},vertices:{enumerable:!0,get:function(){return this._collection},set:function(t){let e=this._renderer.bindVertices,i=this._renderer.unbindVertices;this._collection&&this._collection.unbind(z.Types.insert,e).unbind(z.Types.remove,i),t instanceof vi?this._collection=t:this._collection=new vi(t||[]),this._collection.bind(z.Types.insert,e).bind(z.Types.remove,i),e(this._collection)}},mask:{enumerable:!0,get:function(){return this._mask},set:function(t){this._mask=t,this._flagMask=!0,st.isObject(t)&&!t.clip&&(t.clip=!0)}},clip:{enumerable:!0,get:function(){return this._clip},set:function(t){this._clip=t,this._flagClip=!0}},dashes:{enumerable:!0,get:function(){return this._dashes},set:function(t){typeof t.offset!="number"&&(t.offset=this.dashes&&this._dashes.offset||0),this._dashes=t}}};function eh(){this._flagVertices=!0,this._flagLength=!0,this.parent&&(this.parent._flagLength=!0)}function ih(t){let e=t.length;for(;e--;)t[e].bind(z.Types.change,this._renderer.flagVertices);this._renderer.flagVertices()}function nh(t){let e=t.length;for(;e--;)t[e].unbind(z.Types.change,this._renderer.flagVertices);this._renderer.flagVertices()}function rh(){this._flagFill=!0}function sh(){this._flagStroke=!0}var ah=class extends Pt{constructor(t,e,i,r){let a=[new At,new At,new At,new At];super(a,!0,!1,!0),y(this,"_flagWidth",0),y(this,"_flagHeight",0),y(this,"_width",0),y(this,"_height",0),y(this,"_origin",null);for(let f in vl)Object.defineProperty(this,f,vl[f]);this.width=typeof i=="number"?i:1,this.height=typeof r=="number"?r:1,this.origin=new K,typeof t=="number"&&(this.translation.x=t),typeof e=="number"&&(this.translation.y=e),this._update()}_update(){if(this._flagVertices||this._flagWidth||this._flagHeight){let t=this._width/2,e=this._height/2;!this._closed&&this.vertices.length===4&&this.vertices.push(new At),this.vertices[0].set(-t,-e).sub(this._origin).command=X.move,this.vertices[1].set(t,-e).sub(this._origin).command=X.line,this.vertices[2].set(t,e).sub(this._origin).command=X.line,this.vertices[3].set(-t,e).sub(this._origin).command=X.line,this.vertices[4]&&(this.vertices[4].set(-t,-e).sub(this._origin).command=X.line)}return super._update.call(this),this}flagReset(){return this._flagWidth=this._flagHeight=!1,super.flagReset.call(this),this}clone(t){let e=new ah(0,0,this.width,this.height);e.translation.copy(this.translation),e.rotation=this.rotation,e.scale=this.scale,e.skewX=this.skewX,e.skewY=this.skewY,this.matrix.manual&&e.matrix.copy(this.matrix);for(let i=0;i<Pt.Properties.length;i++){let r=Pt.Properties[i];e[r]=this[r]}return t&&t.add(e),e}toObject(){let t=super.toObject.call(this);return t.width=this.width,t.height=this.height,t.origin=this.origin.toObject(),t}},Fi=ah;y(Fi,"Properties",["width","height"]);var vl={width:{enumerable:!0,get:function(){return this._width},set:function(t){this._width=t,this._flagWidth=!0}},height:{enumerable:!0,get:function(){return this._height},set:function(t){this._height=t,this._flagHeight=!0}},origin:{enumerable:!0,get:function(){return this._origin},set:function(t){this._origin&&this._origin.unbind(z.Types.change,this._renderer.flagVertices),this._origin=t,this._origin.bind(z.Types.change,this._renderer.flagVertices),this._renderer.flagVertices()}}},oh=class extends Fi{constructor(t,e,i,r,a,f){super(e,i,0,0),y(this,"_flagTexture",!1),y(this,"_flagColumns",!1),y(this,"_flagRows",!1),y(this,"_flagFrameRate",!1),y(this,"_flagIndex",!1),y(this,"_amount",1),y(this,"_duration",0),y(this,"_startTime",0),y(this,"_playing",!1),y(this,"_firstFrame",0),y(this,"_lastFrame",0),y(this,"_loop",!0),y(this,"_texture",null),y(this,"_columns",1),y(this,"_rows",1),y(this,"_frameRate",0),y(this,"_index",0),y(this,"_origin",null);for(let l in xl)Object.defineProperty(this,l,xl[l]);this.noStroke(),this.noFill(),t instanceof Dt?this.texture=t:typeof t=="string"&&(this.texture=new Dt(t)),this.origin=new K,this._update(),typeof r=="number"&&(this.columns=r),typeof a=="number"&&(this.rows=a),typeof f=="number"&&(this.frameRate=f),this.index=0}play(t,e,i){return this._playing=!0,this._firstFrame=0,this._lastFrame=this.amount-1,this._startTime=st.performance.now(),typeof t=="number"&&(this._firstFrame=t),typeof e=="number"&&(this._lastFrame=e),typeof i=="function"?this._onLastFrame=i:delete this._onLastFrame,this._index!==this._firstFrame&&(this._startTime-=1e3*Math.abs(this._index-this._firstFrame)/this._frameRate),this}pause(){return this._playing=!1,this}stop(){return this._playing=!1,this._index=0,this}clone(t){let e=new oh(this.texture,this.translation.x,this.translation.y,this.columns,this.rows,this.frameRate);return this.playing&&(e.play(this._firstFrame,this._lastFrame),e._loop=this._loop),t&&t.add(e),e}toObject(){let t=super.toObject.call(this);return t.texture=this.texture.toObject(),t.columns=this.columns,t.rows=this.rows,t.frameRate=this.frameRate,t.index=this.index,t._firstFrame=this._firstFrame,t._lastFrame=this._lastFrame,t._loop=this._loop,t}_update(){let t=this._texture,e=this._columns,i=this._rows,r,a,f,l,d,m,g,x,T;if(t&&((this._flagColumns||this._flagRows)&&(this._amount=this._columns*this._rows),this._flagFrameRate&&(this._duration=1e3*this._amount/this._frameRate),this._flagTexture&&(this.fill=t),t.loaded)){g=t.image.width,x=t.image.height,r=g/e,a=x/i,l=this._amount,this.width!==r&&(this.width=r),this.height!==a&&(this.height=a),this._playing&&this._frameRate>0&&(st.isNaN(this._lastFrame)&&(this._lastFrame=l-1),f=st.performance.now()-this._startTime,T=this._lastFrame+1,d=1e3*(T-this._firstFrame)/this._frameRate,this._loop?f=f%d:f=Math.min(f,d),m=Se(this._firstFrame,T,f/d),m=Math.floor(m),m!==this._index&&(this._index=m,m>=this._lastFrame-1&&this._onLastFrame&&this._onLastFrame()));let S=this._index%e,v=Math.floor(this._index/e),E=-r*S+(g-r)/2,L=-a*v+(x-a)/2;E!==t.offset.x&&(t.offset.x=E),L!==t.offset.y&&(t.offset.y=L)}return super._update.call(this),this}flagReset(){return this._flagTexture=this._flagColumns=this._flagRows=this._flagFrameRate=!1,super.flagReset.call(this),this}},wr=oh;y(wr,"Properties",["texture","columns","rows","frameRate","index"]);var xl={texture:{enumerable:!0,get:function(){return this._texture},set:function(t){this._texture=t,this._flagTexture=!0}},columns:{enumerable:!0,get:function(){return this._columns},set:function(t){this._columns=t,this._flagColumns=!0}},rows:{enumerable:!0,get:function(){return this._rows},set:function(t){this._rows=t,this._flagRows=!0}},frameRate:{enumerable:!0,get:function(){return this._frameRate},set:function(t){this._frameRate=t,this._flagFrameRate=!0}},index:{enumerable:!0,get:function(){return this._index},set:function(t){this._index=t,this._flagIndex=!0}}},ta=Math.cos,ea=Math.sin,ur=class extends Pt{constructor(t,e,i,r){let a=r?Math.max(r,2):4,f=[];for(let l=0;l<a;l++)f.push(new At(0,0,0,0,0,0));super(f,!0,!0,!0),y(this,"_flagRadius",!1),y(this,"_radius",0);for(let l in wl)Object.defineProperty(this,l,wl[l]);typeof i=="number"&&(this.radius=i),this._update(),typeof t=="number"&&(this.translation.x=t),typeof e=="number"&&(this.translation.y=e)}_update(){if(this._flagVertices||this._flagRadius){let t=this.vertices.length;!this._closed&&t>2&&(t-=1);let e=4/3*Math.tan(Math.PI/(t*2)),i=this._radius,r=i*e;for(let a=0;a<this.vertices.length;a++){let l=a/t*me,d=i*ta(l),m=i*ea(l),g=r*ta(l-ae),x=r*ea(l-ae),T=r*ta(l+ae),S=r*ea(l+ae),v=this.vertices[a];v.command=a===0?X.move:X.curve,v.set(d,m),v.controls.left.set(g,x),v.controls.right.set(T,S)}}return super._update.call(this),this}flagReset(){return this._flagRadius=!1,super.flagReset.call(this),this}clone(t){let e=new ur(0,0,this.radius,this.vertices.length);e.translation.copy(this.translation),e.rotation=this.rotation,e.scale=this.scale,e.skewX=this.skewX,e.skewY=this.skewY,this.matrix.manual&&e.matrix.copy(this.matrix);for(let i=0;i<Pt.Properties.length;i++){let r=Pt.Properties[i];e[r]=this[r]}return t&&t.add(e),e}toObject(){let t=super.toObject.call(this);for(let e=0;e<ur.Properties.length;e++){let i=ur.Properties[e];t[i]=this[i]}return t}},kr=ur;y(kr,"Properties",["radius"]);var wl={radius:{enumerable:!0,get:function(){return this._radius},set:function(t){this._radius=t,this._flagRadius=!0}}},ia=Math.cos,na=Math.sin,dr=class extends Pt{constructor(t,e,i,r,a){typeof r!="number"&&typeof i=="number"&&(r=i);let f=a?Math.max(a,2):4,l=[];for(let d=0;d<f;d++)l.push(new At);super(l,!0,!0,!0),y(this,"_flagWidth",!1),y(this,"_flagHeight",!1),y(this,"_width",0),y(this,"_height",0);for(let d in kl)Object.defineProperty(this,d,kl[d]);typeof i=="number"&&(this.width=i*2),typeof r=="number"&&(this.height=r*2),this._update(),typeof t=="number"&&(this.translation.x=t),typeof e=="number"&&(this.translation.y=e)}_update(){if(this._flagVertices||this._flagWidth||this._flagHeight){let t=this.vertices.length;!this._closed&&t>2&&(t-=1);let e=4/3*Math.tan(Math.PI/(this.vertices.length*2)),i=this._width/2,r=this._height/2;for(let a=0;a<this.vertices.length;a++){let l=a/t*me,d=i*ia(l),m=r*na(l),g=i*e*ia(l-ae),x=r*e*na(l-ae),T=i*e*ia(l+ae),S=r*e*na(l+ae),v=this.vertices[a];v.command=a===0?X.move:X.curve,v.set(d,m),v.controls.left.set(g,x),v.controls.right.set(T,S)}}return super._update.call(this),this}flagReset(){return this._flagWidth=this._flagHeight=!1,super.flagReset.call(this),this}clone(t){let e=this.width/2,i=this.height/2,r=this.vertices.length,a=new dr(0,0,e,i,r);a.translation.copy(this.translation),a.rotation=this.rotation,a.scale=this.scale,a.skewX=this.skewX,a.skewY=this.skewY,this.matrix.manual&&a.matrix.copy(this.matrix);for(let f=0;f<Pt.Properties.length;f++){let l=Pt.Properties[f];a[l]=this[l]}return t&&t.add(a),a}toObject(){let t=super.toObject.call(this);for(let e=0;e<dr.Properties.length;e++){let i=dr.Properties[e];t[i]=this[i]}return t}},Tr=dr;y(Tr,"Properties",["width","height"]);var kl={width:{enumerable:!0,get:function(){return this._width},set:function(t){this._width=t,this._flagWidth=!0}},height:{enumerable:!0,get:function(){return this._height},set:function(t){this._height=t,this._flagHeight=!0}}},ua=class extends Pt{constructor(t,e,i,r){let a=[new At(t,e),new At(i,r)];super(a);for(let f in Tl)Object.defineProperty(this,f,Tl[f]);this.vertices[0].command=X.move,this.vertices[1].command=X.line,this.automatic=!1}},Tl={left:{enumerable:!0,get:function(){return this.vertices[0]},set:function(t){if(st.isObject(t))this.vertices.splice(0,1,t);else{let e=new Me("Two.Line.x argument is not an object.");console.warn(e.name,e.message)}}},right:{enumerable:!0,get:function(){return this.vertices[1]},set:function(t){if(st.isObject(t))this.vertices.splice(1,1,t);else{let e=new Me("Two.Line.y argument is not an object.");console.warn(e.name,e.message)}}}},pr=class extends Pt{constructor(t,e,i,r,a){typeof a>"u"&&typeof i=="number"&&typeof r=="number"&&(a=Math.floor(Math.min(i,r)/12));let f=[];for(let l=0;l<10;l++)f.push(new At(0,0,0,0,0,0,l===0?X.move:X.curve));super(f),y(this,"_flagWidth",!1),y(this,"_flagHeight",!1),y(this,"_flagRadius",!1),y(this,"_width",0),y(this,"_height",0),y(this,"_radius",12);for(let l in El)Object.defineProperty(this,l,El[l]);this.closed=!0,this.automatic=!1,this._renderer.flagRadius=Fc.bind(this),typeof i=="number"&&(this.width=i),typeof r=="number"&&(this.height=r),typeof a=="number"&&(this.radius=a),this._update(),typeof t=="number"&&(this.translation.x=t),typeof e=="number"&&(this.translation.y=e)}_update(){if(this._flagVertices||this._flagWidth||this._flagHeight||this._flagRadius){let t=this._width,e=this._height,i,r;this._radius instanceof K?(i=this._radius.x,r=this._radius.y):(i=this._radius,r=this._radius);let a,f=t/2,l=e/2;a=this.vertices[0],a.x=-(f-i),a.y=-l,a=this.vertices[1],a.x=f-i,a.y=-l,a.controls.left.clear(),a.controls.right.x=i,a.controls.right.y=0,a=this.vertices[2],a.x=f,a.y=-(l-r),a.controls.right.clear(),a.controls.left.clear(),a=this.vertices[3],a.x=f,a.y=l-r,a.controls.left.clear(),a.controls.right.x=0,a.controls.right.y=r,a=this.vertices[4],a.x=f-i,a.y=l,a.controls.right.clear(),a.controls.left.clear(),a=this.vertices[5],a.x=-(f-i),a.y=l,a.controls.left.clear(),a.controls.right.x=-i,a.controls.right.y=0,a=this.vertices[6],a.x=-f,a.y=l-r,a.controls.left.clear(),a.controls.right.clear(),a=this.vertices[7],a.x=-f,a.y=-(l-r),a.controls.left.clear(),a.controls.right.x=0,a.controls.right.y=-r,a=this.vertices[8],a.x=-(f-i),a.y=-l,a.controls.left.clear(),a.controls.right.clear(),a=this.vertices[9],a.copy(this.vertices[8])}return super._update.call(this),this}flagReset(){return this._flagWidth=this._flagHeight=this._flagRadius=!1,super.flagReset.call(this),this}clone(t){let e=this.width,i=this.height,r=this.radius,a=new pr(0,0,e,i,r);a.translation.copy(this.translation),a.rotation=this.rotation,a.scale=this.scale,a.skewX=this.skewX,a.skewY=this.skewY,this.matrix.manual&&a.matrix.copy(this.matrix);for(let f=0;f<Pt.Properties.length;f++){let l=Pt.Properties[f];a[l]=this[l]}return t&&t.add(a),a}toObject(){let t=super.toObject.call(this);for(let e=0;e<pr.Properties.length;e++){let i=pr.Properties[e];t[i]=this[i]}return t.radius=typeof this.radius=="number"?this.radius:this.radius.toObject(),t}},Er=pr;y(Er,"Properties",["width","height","radius"]);var El={width:{enumerable:!0,get:function(){return this._width},set:function(t){this._width=t,this._flagWidth=!0}},height:{enumerable:!0,get:function(){return this._height},set:function(t){this._height=t,this._flagHeight=!0}},radius:{enumerable:!0,get:function(){return this._radius},set:function(t){this._radius instanceof K&&this._radius.unbind(z.Types.change,this._renderer.flagRadius),this._radius=t,this._radius instanceof K&&this._radius.bind(z.Types.change,this._renderer.flagRadius),this._flagRadius=!0}}};function Fc(){this._flagRadius=!0}var oa,Sl=Math.min,Al=Math.max;Yt.document&&(oa=document.createElement("canvas"));var Ze=class extends bi{constructor(t,e,i,r){super(),y(this,"_flagValue",!0),y(this,"_flagFamily",!0),y(this,"_flagSize",!0),y(this,"_flagLeading",!0),y(this,"_flagAlignment",!0),y(this,"_flagBaseline",!0),y(this,"_flagStyle",!0),y(this,"_flagWeight",!0),y(this,"_flagDecoration",!0),y(this,"_flagFill",!0),y(this,"_flagStroke",!0),y(this,"_flagLinewidth",!0),y(this,"_flagOpacity",!0),y(this,"_flagVisible",!0),y(this,"_flagMask",!1),y(this,"_flagClip",!1),y(this,"_value",""),y(this,"_family","sans-serif"),y(this,"_size",13),y(this,"_leading",17),y(this,"_alignment","center"),y(this,"_baseline","middle"),y(this,"_style","normal"),y(this,"_weight",500),y(this,"_decoration","none"),y(this,"_fill","#000"),y(this,"_stroke","none"),y(this,"_linewidth",1),y(this,"_opacity",1),y(this,"_visible",!0),y(this,"_mask",null),y(this,"_clip",!1),y(this,"_dashes",null);for(let a in Cl)Object.defineProperty(this,a,Cl[a]);if(this._renderer.type="text",this._renderer.flagFill=Nc.bind(this),this._renderer.flagStroke=Ic.bind(this),this.value=t,typeof e=="number"&&(this.translation.x=e),typeof i=="number"&&(this.translation.y=i),this.dashes=[],this.dashes.offset=0,!st.isObject(r))return this;for(let a=0;a<Ze.Properties.length;a++){let f=Ze.Properties[a];f in r&&(this[f]=r[f])}}static Measure(t){if(oa){let e=oa.getContext("2d");e.font=[t._style,t._weight,`${t._size}px/${t._leading}px`,t._family].join(" ");let i=e.measureText(t.value,0,0),r=i.actualBoundingBoxDescent+i.actualBoundingBoxAscent;return{width:i.width,height:r}}else{let e=this.value.length*this.size*Ze.Ratio,i=this.leading;return console.warn("Two.Text: unable to accurately measure text, so using an approximation."),{width:e,height:i}}}clone(t){let e=new Ze(this.value);e.translation.copy(this.translation),e.rotation=this.rotation,e.scale=this.scale;for(let i=0;i<Ze.Properties.length;i++){let r=Ze.Properties[i];e[r]=this[r]}return this.matrix.manual&&e.matrix.copy(this.matrix),t&&t.add(e),e._update()}toObject(){let t={translation:this.translation.toObject(),rotation:this.rotation,scale:this.scale};this.matrix.manual&&(t.matrix=this.matrix.toObject());for(let e=0;e<Ze.Properties.length;e++){let i=Ze.Properties[e];t[i]=this[i]}return t}noFill(){return this.fill="none",this}noStroke(){return this.stroke="none",this.linewidth=0,this}getBoundingClientRect(t){let e,i,r,a,f;this._update(!0),e=t?this.matrix:this.worldMatrix;let{width:l,height:d}=Ze.Measure(this),m=(this._linewidth||0)/2;switch(this.alignment){case"left":i=-m,r=l+m;break;case"right":i=-(l+m),r=m;break;default:i=-(l/2+m),r=l/2+m}switch(this.baseline){case"middle":a=-(d/2+m),f=d/2+m;break;default:a=-(d+m),f=m}let[g,x]=e.multiply(i,a),[T,S]=e.multiply(i,f),[v,E]=e.multiply(r,a),[L,R]=e.multiply(r,f);return a=Sl(x,S,E,R),i=Sl(g,T,v,L),r=Al(g,T,v,L),f=Al(x,S,E,R),{top:a,left:i,right:r,bottom:f,width:r-i,height:f-a}}flagReset(){return super.flagReset.call(this),this._flagValue=this._flagFamily=this._flagSize=this._flagLeading=this._flagAlignment=this._flagFill=this._flagStroke=this._flagLinewidth=this._flagOpacity=this._flagVisible=this._flagClip=this._flagDecoration=this._flagClassName=this._flagBaseline=this._flagWeight=this._flagStyle=!1,this}},qe=Ze;y(qe,"Ratio",.6);y(qe,"Properties",["value","family","size","leading","alignment","linewidth","style","weight","decoration","baseline","opacity","visible","fill","stroke"]);var Cl={value:{enumerable:!0,get:function(){return this._value},set:function(t){this._value=t,this._flagValue=!0}},family:{enumerable:!0,get:function(){return this._family},set:function(t){this._family=t,this._flagFamily=!0}},size:{enumerable:!0,get:function(){return this._size},set:function(t){this._size=t,this._flagSize=!0}},leading:{enumerable:!0,get:function(){return this._leading},set:function(t){this._leading=t,this._flagLeading=!0}},alignment:{enumerable:!0,get:function(){return this._alignment},set:function(t){this._alignment=t,this._flagAlignment=!0}},linewidth:{enumerable:!0,get:function(){return this._linewidth},set:function(t){this._linewidth=t,this._flagLinewidth=!0}},style:{enumerable:!0,get:function(){return this._style},set:function(t){this._style=t,this._flagStyle=!0}},weight:{enumerable:!0,get:function(){return this._weight},set:function(t){this._weight=t,this._flagWeight=!0}},decoration:{enumerable:!0,get:function(){return this._decoration},set:function(t){this._decoration=t,this._flagDecoration=!0}},baseline:{enumerable:!0,get:function(){return this._baseline},set:function(t){this._baseline=t,this._flagBaseline=!0}},opacity:{enumerable:!0,get:function(){return this._opacity},set:function(t){this._opacity=t,this._flagOpacity=!0}},visible:{enumerable:!0,get:function(){return this._visible},set:function(t){this._visible=t,this._flagVisible=!0}},fill:{enumerable:!0,get:function(){return this._fill},set:function(t){(this._fill instanceof ie||this._fill instanceof $t||this._fill instanceof Xt||this._fill instanceof Dt)&&this._fill.unbind(z.Types.change,this._renderer.flagFill),this._fill=t,this._flagFill=!0,(this._fill instanceof ie||this._fill instanceof $t||this._fill instanceof Xt||this._fill instanceof Dt)&&this._fill.bind(z.Types.change,this._renderer.flagFill)}},stroke:{enumerable:!0,get:function(){return this._stroke},set:function(t){(this._stroke instanceof ie||this._stroke instanceof $t||this._stroke instanceof Xt||this._stroke instanceof Dt)&&this._stroke.unbind(z.Types.change,this._renderer.flagStroke),this._stroke=t,this._flagStroke=!0,(this._stroke instanceof ie||this._stroke instanceof $t||this._stroke instanceof Xt||this._stroke instanceof Dt)&&this._stroke.bind(z.Types.change,this._renderer.flagStroke)}},mask:{enumerable:!0,get:function(){return this._mask},set:function(t){this._mask=t,this._flagMask=!0,st.isObject(t)&&!t.clip&&(t.clip=!0)}},clip:{enumerable:!0,get:function(){return this._clip},set:function(t){this._clip=t,this._flagClip=!0}},dashes:{enumerable:!0,get:function(){return this._dashes},set:function(t){typeof t.offset!="number"&&(t.offset=this.dashes&&this._dashes.offset||0),this._dashes=t}}};function Nc(){this._flagFill=!0}function Ic(){this._flagStroke=!0}var ti={path:/[+-]?(?:\d*\.\d+|\d+)(?:[eE][+-]\d+)?/g,cssBackgroundImage:/url\(['"]?#([\w\d-_]*)['"]?\)/i,unitSuffix:/[a-zA-Z%]*/i},Lc={start:"left",middle:"center",end:"right"},Ml=["id","class","transform","xmlns","viewBox"],jc=["x","y","width","height","href","xlink:href"];function Dc(t){return Lc[t]}function Bc(t){let e=t.getAttribute("dominant-baseline"),i=t.getAttribute("alignment-baseline");return e||i}function En(t){return t.replace(/svg:/ig,"").toLowerCase()}function Rl(t,e){if(e.x+=t.translateX,e.y+=t.translateY,e.x*=t.scaleX,e.y*=t.scaleY,t.rotation!==0){let i=e.length();e.x=i*Math.cos(t.rotation),e.y=i*Math.sin(t.rotation)}}function zc(t,e){e||(e={});let i=t.split(";");for(let r=0;r<i.length;r++){let a=i[r].split(":"),f=a[0],l=a[1];typeof f>"u"||typeof l>"u"||(e[f]=l.replace(/\s/,""))}return e}function Wc(t){let e={},i=qc(t),r=Math.max(i.length,t.style.length);for(let a=0;a<r;a++){let f=t.style[a],l=i[a];f&&(e[f]=t.style[f]),l&&(e[l]=t.getAttribute(l))}return e}function qc(t){let e=t.getAttributeNames();for(let i=0;i<Ml.length;i++){let r=Ml[i],a=Array.prototype.indexOf.call(e,r);a>=0&&e.splice(a,1)}return e}function Hc(t,e){let i=e.split(/[\s,]/),r=-parseFloat(i[0]),a=-parseFloat(i[1]),f=parseFloat(i[2]),l=parseFloat(i[3]);if(r&&a)for(let T=0;T<t.children.length;T++){let S=t.children[T];"translation"in S?S.translation.add(r,a):"x"in S?S.x=r:"y"in S&&(S.y=a)}let d=typeof t.x=="number",m=typeof t.y=="number",g=typeof t.width=="number",x=typeof t.height=="number";return d&&(t.translation.x+=t.x),m&&(t.translation.y+=t.y),(g||x)&&(t.scale=new K(1,1)),g&&(t.scale.x=t.width/f),x&&(t.scale.y=t.height/l),t.mask=new Fi(0,0,f,l),t.mask.origin.set(-f/2,-l/2),t}function je(t,e,i){let r={},a={},f={},l,d,m,g,x,T,S,v,E,L,R,M,F,B,q,W,h;if(t===null)return r;if(Yt.getComputedStyle){let G=Yt.getComputedStyle(t);for(l=G.length;l--;)m=G[l],g=G[m],typeof g<"u"&&(r[m]=g)}for(l=0;l<t.attributes.length;l++)T=t.attributes[l],/style/i.test(T.nodeName)?zc(T.value,f):a[T.nodeName]=T.value;typeof r.opacity<"u"&&(r["stroke-opacity"]=r.opacity,r["fill-opacity"]=r.opacity,delete r.opacity),i&&st.defaults(r,i),st.extend(r,f,a),r.visible=!(typeof r.display>"u"&&/none/i.test(r.display))||typeof r.visibility>"u"&&/hidden/i.test(r.visibility);for(m in r)switch(g=r[m],m){case"gradientTransform":if(/none/i.test(g)||(d=t.gradientTransform&&t.gradientTransform.baseVal&&t.gradientTransform.baseVal.length>0?t.gradientTransform.baseVal[0].matrix:t.getCTM?t.getCTM():null,d===null))break;switch(S=Ji(d),e._renderer.type){case"linear-gradient":Rl(S,e.left),Rl(S,e.right);break;case"radial-gradient":e.center.x+=S.translateX,e.center.y+=S.translateY,e.focal.x+=S.translateX,e.focal.y+=S.translateY,e.radius*=Math.max(S.scaleX,S.scaleY);break}break;case"transform":if(/none/i.test(g)||(d=t.transform&&t.transform.baseVal&&t.transform.baseVal.length>0?t.transform.baseVal[0].matrix:t.getCTM?t.getCTM():null,d===null))break;ne.AutoCalculateImportedMatrices?(S=Ji(d),e.translation.set(S.translateX,S.translateY),e.rotation=Math.PI*(S.rotation/180),e.scale=new K(S.scaleX,S.scaleY),v=parseFloat((r.x+"").replace("px")),E=parseFloat((r.y+"").replace("px")),v&&(e.translation.x=v),E&&(e.translation.y=E)):(d=t.getCTM(),e._matrix.manual=!0,e._matrix.set(d.a,d.b,d.c,d.d,d.e,d.f));break;case"visible":if(e instanceof ee){e._visible=g;break}e.visible=g;break;case"stroke-linecap":if(e instanceof ee){e._cap=g;break}e.cap=g;break;case"stroke-linejoin":if(e instanceof ee){e._join=g;break}e.join=g;break;case"stroke-miterlimit":if(e instanceof ee){e._miter=g;break}e.miter=g;break;case"stroke-width":if(e instanceof ee){e._linewidth=parseFloat(g);break}e.linewidth=parseFloat(g);break;case"opacity":case"stroke-opacity":case"fill-opacity":if(e instanceof ee){e._opacity=parseFloat(g);break}e.opacity=parseFloat(g);break;case"clip-path":if(ti.cssBackgroundImage.test(g)&&(L=g.replace(ti.cssBackgroundImage,"$1"),Vt.defs.current&&Vt.defs.current.contains(L)&&(M=Vt.defs.current.get(L),M&&M.childNodes.length>0)))switch(M=M.childNodes[0],F=En(M.nodeName),e.mask=Vt[F].call(this,M,{}),e._renderer.type){case"text":case"path":e.position.add(e.mask.position),e.mask.position.clear();break}break;case"fill":case"stroke":x=(e instanceof ee?"_":"")+m,ti.cssBackgroundImage.test(g)?(L=g.replace(ti.cssBackgroundImage,"$1"),Vt.defs.current&&Vt.defs.current.contains(L)?(M=Vt.defs.current.get(L),M.object||(F=En(M.nodeName),M.object=Vt[F].call(this,M,{})),M=M.object):(R=Vc(this),M=R.getById(L)),e[x]=M):e[x]=g;break;case"id":e.id=g;break;case"class":case"className":e.classList=g.split(" "),e._flagClassName=!0;break;case"x":case"y":if(B=e instanceof ie,q=e instanceof $t,W=e instanceof Xt,B||q||W)break;g.match("[a-z%]$")&&!g.endsWith("px")&&(h=new Me("only pixel values are supported with the "+m+" attribute."),console.warn(h.name,h.message)),e.translation[m]=parseFloat(g);break;case"font-family":e instanceof qe&&(e.family=g);break;case"font-size":e instanceof qe&&(e.size=g);break;case"font-weight":e instanceof qe&&(e.weight=g);break;case"font-style":e instanceof qe&&(e.style=g);break;case"text-decoration":e instanceof qe&&(e.decoration=g);break;case"line-height":e instanceof qe&&(e.leading=g);break}return Object.keys(t.dataset).length&&(e.dataset=t.dataset),r}function Uc(t,e){for(let i=0,r=t.childNodes.length;i<r;i++){let a=t.childNodes[i];!a.id||En(t.nodeName)==="#text"||e.add(a.id,a)}}function Vc(t){for(;t.parent;)t=t.parent;return t.scene}var Vt={svg:function(t){let e=Vt.defs.current=new xr,i=t.getElementsByTagName("defs");for(let E=0;E<i.length;E++)Uc(i[E],e);let r=Vt.g.call(this,t),a=t.getAttribute("viewBox"),f=t.getAttribute("x"),l=t.getAttribute("y"),d=t.getAttribute("width"),m=t.getAttribute("height");r.defs=e;let g=a!==null,x=f!==null,T=l!==null,S=d!==null,v=m!==null;return x&&(r.x=parseFloat(f.replace(ti.unitSuffix,""))),T&&(r.y=parseFloat(l.replace(ti.unitSuffix,""))),S&&(r.width=parseFloat(d.replace(ti.unitSuffix,""))),v&&(r.height=parseFloat(m.replace(ti.unitSuffix,""))),g&&Hc(r,a),delete Vt.defs.current,r},defs:function(t){return null},use:function(t,e){let i,r=t.getAttribute("href")||t.getAttribute("xlink:href");if(!r)return i=new Me("encountered <use /> with no href."),console.warn(i.name,i.message),null;let a=r.slice(1);if(!Vt.defs.current.contains(a))return i=new Me("unable to find element for reference "+r+"."),console.warn(i.name,i.message),null;let l=Vt.defs.current.get(a).cloneNode(!0);for(let m=0;m<t.attributes.length;m++){let g=t.attributes[m],x=jc.includes(g.nodeName),T=!l.hasAttribute(g.nodeName);(x||T)&&l.setAttribute(g.nodeName,g.value)}let d=En(l.nodeName);return Vt[d].call(this,l,e)},g:function(t,e){let i=new ee;je.call(this,t,i,e),this.add(i);let r=Wc.call(this,t);for(let a=0,f=t.childNodes.length;a<f;a++){let l=t.childNodes[a],d=l.nodeName;if(!d)return;let m=En(d);if(m in Vt){let g=Vt[m].call(i,l,r);!!g&&!g.parent&&i.add(g)}}return i},polygon:function(t,e){let i;typeof t=="string"?i=t:i=t.getAttribute("points");let r=[];i.replace(/(-?[\d.eE-]+)[,|\s](-?[\d.eE-]+)/g,function(f,l,d){r.push(new At(parseFloat(l),parseFloat(d)))});let a=new Pt(r,!0).noStroke();return a.fill="black",je.call(this,t,a,e),a},polyline:function(t,e){let i=Vt.polygon.call(this,t,e);return i.closed=!1,i},path:function(t,e){let i;typeof t=="string"?(i=t,t=null):i=t.getAttribute("d");let r=[],a=!1,f=!1;if(i){let d=new At,m,g,x=i.match(/[a-df-z][^a-df-z]*/ig),T=x.length-1;st.each(x.slice(0),function(S,v){let E=S.slice(1).trim().match(ti.path),L=S[0],R=L.toLowerCase(),M,F,B,q,W,h=[];switch(v===0&&(x=[]),R){case"h":case"v":E.length>1&&(M=1);break;case"m":case"l":case"t":E.length>2&&(M=2);break;case"s":case"q":E.length>4&&(M=4);break;case"c":E.length>6&&(M=6);break;case"a":E.length>7&&(M=7);break}if(M){for(F=0,B=E.length,W=0;F<B;F+=M){if(q=L,W>0)switch(L){case"m":q="l";break;case"M":q="L";break}h.push(q+E.slice(F,F+M).join(" ")),W++}x=Array.prototype.concat.apply(x,h)}else x.push(S)}),st.each(x,function(S,v){let E,L,R,M=S[0],F=M.toLowerCase();g=S.slice(1).trim().match(ti.path),f=M===F;let B,q,W,h,G,J,Z,tt,ut,nt,Ft,xt,Gt,Nt,pt,ot,yt;switch(F){case"z":if(v>=T)a=!0;else{L=d.x,R=d.y,E=new At(L,R,void 0,void 0,void 0,void 0,X.close);for(let Tt=r.length-1;Tt>=0;Tt--){let rt=r[Tt];if(/m/i.test(rt.command)){d=rt;break}}}break;case"m":case"l":m=void 0,L=parseFloat(g[0]),R=parseFloat(g[1]),E=new At(L,R,void 0,void 0,void 0,void 0,/m/i.test(F)?X.move:X.line),f&&E.addSelf(d),d=E;break;case"h":case"v":nt=/h/i.test(F)?"x":"y",Ft=/x/i.test(nt)?"y":"x",E=new At(void 0,void 0,void 0,void 0,void 0,void 0,X.line),E[nt]=parseFloat(g[0]),E[Ft]=d[Ft],f&&(E[nt]+=d[nt]),d=E;break;case"c":case"s":B=d.x,q=d.y,m||(m=new K),/c/i.test(F)?(W=parseFloat(g[0]),h=parseFloat(g[1]),G=parseFloat(g[2]),J=parseFloat(g[3]),Z=parseFloat(g[4]),tt=parseFloat(g[5])):(ut=ra(d,m,f),W=ut.x,h=ut.y,G=parseFloat(g[0]),J=parseFloat(g[1]),Z=parseFloat(g[2]),tt=parseFloat(g[3])),f&&(W+=B,h+=q,G+=B,J+=q,Z+=B,tt+=q),d.controls.right.set(W-d.x,h-d.y),E=new At(Z,tt,G-Z,J-tt,void 0,void 0,X.curve),d=E,m=E.controls.left;break;case"t":case"q":B=d.x,q=d.y,m||(m=new K),/q/i.test(F)?(W=parseFloat(g[0]),h=parseFloat(g[1]),G=parseFloat(g[0]),J=parseFloat(g[1]),Z=parseFloat(g[2]),tt=parseFloat(g[3])):(ut=ra(d,m,f),W=ut.x,h=ut.y,G=ut.x,J=ut.y,Z=parseFloat(g[0]),tt=parseFloat(g[1])),f&&(W+=B,h+=q,G+=B,J+=q,Z+=B,tt+=q),d.controls.right.set((W-d.x)*.33,(h-d.y)*.33),E=new At(Z,tt,G-Z,J-tt,void 0,void 0,X.curve),d=E,m=E.controls.left;break;case"a":B=d.x,q=d.y,Gt=parseFloat(g[0]),Nt=parseFloat(g[1]),pt=parseFloat(g[2]),ot=parseFloat(g[3]),yt=parseFloat(g[4]),Z=parseFloat(g[5]),tt=parseFloat(g[6]),f&&(Z+=B,tt+=q),xt=new At(Z,tt),xt.command=X.arc,xt.rx=Gt,xt.ry=Nt,xt.xAxisRotation=pt,xt.largeArcFlag=ot,xt.sweepFlag=yt,E=xt,d=xt,m=void 0;break}E&&(Array.isArray(E)?r=r.concat(E):r.push(E))})}i=new Pt(r,a,void 0,!0).noStroke(),i.fill="black";let l=i.getBoundingClientRect(!0);return l.centroid={x:l.left+l.width/2,y:l.top+l.height/2},st.each(i.vertices,function(d){d.subSelf(l.centroid)}),je.call(this,t,i,e),i.translation.addSelf(l.centroid),i},circle:function(t,e){let i=parseFloat(t.getAttribute("cx")),r=parseFloat(t.getAttribute("cy")),a=parseFloat(t.getAttribute("r")),f=new kr(0,0,a).noStroke();return f.fill="black",je.call(this,t,f,e),f.translation.x=i,f.translation.y=r,f},ellipse:function(t,e){let i=parseFloat(t.getAttribute("cx")),r=parseFloat(t.getAttribute("cy")),a=parseFloat(t.getAttribute("rx")),f=parseFloat(t.getAttribute("ry")),l=new Tr(0,0,a,f).noStroke();return l.fill="black",je.call(this,t,l,e),l.translation.x=i,l.translation.y=r,l},rect:function(t,e){let i=parseFloat(t.getAttribute("rx")),r=parseFloat(t.getAttribute("ry"));if(!st.isNaN(i)||!st.isNaN(r))return Vt["rounded-rect"](t);let a=parseFloat(t.getAttribute("width")),f=parseFloat(t.getAttribute("height")),l=a/2,d=f/2,m=new Fi(0,0,a,f).noStroke();return m.fill="black",je.call(this,t,m,e),m.translation.x+=l,m.translation.y+=d,m},"rounded-rect":function(t,e){let i=parseFloat(t.getAttribute("rx"))||0,r=parseFloat(t.getAttribute("ry"))||0,a=parseFloat(t.getAttribute("width")),f=parseFloat(t.getAttribute("height")),l=a/2,d=f/2,m=new K(i,r),g=new Er(0,0,a,f,m).noStroke();return g.fill="black",je.call(this,t,g,e),g.translation.x+=l,g.translation.y+=d,g},line:function(t,e){let i=parseFloat(t.getAttribute("x1")),r=parseFloat(t.getAttribute("y1")),a=parseFloat(t.getAttribute("x2")),f=parseFloat(t.getAttribute("y2")),l=new ua(i,r,a,f).noFill();return je.call(this,t,l,e),l},lineargradient:function(t,e){let i=t.getAttribute("gradientUnits"),r=t.getAttribute("spreadMethod");i||(i="objectBoundingBox"),r||(r="pad");let a=parseFloat(t.getAttribute("x1")||0),f=parseFloat(t.getAttribute("y1")||0),l=parseFloat(t.getAttribute("x2")||0),d=parseFloat(t.getAttribute("y2")||0),m=(l+a)/2,g=(d+f)/2;/userSpaceOnUse/i.test(i)&&(a-=m,f-=g,l-=m,d-=g);let x=[];for(let S=0;S<t.children.length;S++){let v=t.children[S],E=v.getAttribute("offset");/%/ig.test(E)&&(E=parseFloat(E.replace(/%/ig,""))/100),E=parseFloat(E);let L=v.getAttribute("stop-color"),R=v.getAttribute("stop-opacity"),M=v.getAttribute("style"),F;L===null&&(F=M?M.match(/stop-color:\s?([#a-fA-F0-9]*)/):!1,L=F&&F.length>1?F[1]:void 0),R===null?(F=M?M.match(/stop-opacity:\s?([0-9.-]*)/):!1,R=F&&F.length>1?parseFloat(F[1]):1):R=parseFloat(R),x.push(new xi(E,L,R))}let T=new $t(a,f,l,d,x);return T.spread=r,T.units=i,je.call(this,t,T,e),T},radialgradient:function(t,e){let i=t.getAttribute("gradientUnits"),r=t.getAttribute("spreadMethod");i||(i="objectBoundingBox"),r||(r="pad");let a=parseFloat(t.getAttribute("cx"))||0,f=parseFloat(t.getAttribute("cy"))||0,l=parseFloat(t.getAttribute("r")),d=parseFloat(t.getAttribute("fx")),m=parseFloat(t.getAttribute("fy"));st.isNaN(d)&&(d=a),st.isNaN(m)&&(m=f);let g=Math.abs(a+d)/2,x=Math.abs(f+m)/2;/userSpaceOnUse/i.test(i)&&(a-=g,f-=x,d-=g,m-=x);let T=[];for(let v=0;v<t.children.length;v++){let E=t.children[v],L=E.getAttribute("offset");/%/ig.test(L)&&(L=parseFloat(L.replace(/%/ig,""))/100),L=parseFloat(L);let R=E.getAttribute("stop-color"),M=E.getAttribute("stop-opacity"),F=E.getAttribute("style"),B;R===null&&(B=F?F.match(/stop-color:\s?([#a-fA-F0-9]*)/):!1,R=B&&B.length>1?B[1]:void 0),M===null?(B=F?F.match(/stop-opacity:\s?([0-9.-]*)/):!1,M=B&&B.length>1?parseFloat(B[1]):1):M=parseFloat(M),T.push(new xi(L,R,M))}let S=new Xt(a,f,l,T,d,m);return S.spread=r,S.units=i,je.call(this,t,S,e),S},text:function(t,e){let i=Dc(t.getAttribute("text-anchor"))||"left",r=Bc(t)||"baseline",a=t.textContent,f=new qe(a);return je.call(this,t,f,e),f.alignment=i,f.baseline=r,f},clippath:function(t,e){return Vt.defs.current&&!Vt.defs.current.contains(t.id)&&Vt.defs.current.add(t.id,t),null},image:function(t,e){let i,r=t.getAttribute("href")||t.getAttribute("xlink:href");if(!r)return i=new Me("encountered <image /> with no href."),console.warn(i.name,i.message),null;let a=parseFloat(t.getAttribute("x"))||0,f=parseFloat(t.getAttribute("y"))||0,l=parseFloat(t.getAttribute("width")),d=parseFloat(t.getAttribute("height")),m=new wr(r,a,f);return st.isNaN(l)||(m.width=l),st.isNaN(d)||(m.height=d),je.call(this,t,m,e),m}};function lh(t,e){let i=new XMLHttpRequest;return i.open("GET",t),i.onreadystatechange=function(){i.readyState===4&&i.status===200&&e(i.responseText)},i.send(),i}var la=class extends Fi{constructor(t,e,i,r){super(e,i,0,0),y(this,"_flagTextures",!1),y(this,"_flagFrameRate",!1),y(this,"_flagIndex",!1),y(this,"_amount",1),y(this,"_duration",0),y(this,"_index",0),y(this,"_startTime",0),y(this,"_playing",!1),y(this,"_firstFrame",0),y(this,"_lastFrame",0),y(this,"_loop",!0),y(this,"_textures",null),y(this,"_frameRate",0),y(this,"_origin",null);for(let a in Ol)Object.defineProperty(this,a,Ol[a]);this._renderer.flagTextures=$c.bind(this),this._renderer.bindTextures=Xc.bind(this),this._renderer.unbindTextures=Yc.bind(this),this.noStroke(),this.noFill(),Array.isArray(t)?this.textures=t.map(Pl.bind(this)):this.textures=[Pl(t)],this.origin=new K,this._update(),typeof r=="number"?this.frameRate=r:this.frameRate=la.DefaultFrameRate,this.index=0}play(t,e,i){return this._playing=!0,this._firstFrame=0,this._lastFrame=this.amount-1,this._startTime=st.performance.now(),typeof t=="number"&&(this._firstFrame=t),typeof e=="number"&&(this._lastFrame=e),typeof i=="function"?this._onLastFrame=i:delete this._onLastFrame,this._index!==this._firstFrame&&(this._startTime-=1e3*Math.abs(this._index-this._firstFrame)/this._frameRate),this}pause(){return this._playing=!1,this}stop(){return this._playing=!1,this._index=this._firstFrame,this}clone(t){let e=new la(this.textures,this.translation.x,this.translation.y,this.frameRate);return e._loop=this._loop,this._playing&&e.play(),t&&t.add(e),e}toObject(){let t=super.toObject.call(this);return t.textures=this.textures.map(function(e){return e.toObject()}),t.frameRate=this.frameRate,t.index=this.index,t._firstFrame=this._firstFrame,t._lastFrame=this._lastFrame,t._loop=this._loop,t}_update(){let t=this._textures,e,i,r,a,f,l,d,m;return t&&(this._flagTextures&&(this._amount=t.length),this._flagFrameRate&&(this._duration=1e3*this._amount/this._frameRate),this._playing&&this._frameRate>0?(a=this._amount,st.isNaN(this._lastFrame)&&(this._lastFrame=a-1),r=st.performance.now()-this._startTime,m=this._lastFrame+1,f=1e3*(m-this._firstFrame)/this._frameRate,this._loop?r=r%f:r=Math.min(r,f),d=Se(this._firstFrame,m,r/f),d=Math.floor(d),d!==this._index&&(this._index=d,l=t[this._index],l.loaded&&(e=l.image.width,i=l.image.height,this.width!==e&&(this.width=e),this.height!==i&&(this.height=i),this.fill=l,d>=this._lastFrame-1&&this._onLastFrame&&this._onLastFrame()))):(this._flagIndex||!(this.fill instanceof Dt))&&(l=t[this._index],l.loaded&&(e=l.image.width,i=l.image.height,this.width!==e&&(this.width=e),this.height!==i&&(this.height=i)),this.fill=l)),super._update.call(this),this}flagReset(){return this._flagTextures=this._flagFrameRate=!1,super.flagReset.call(this),this}},Sr=la;y(Sr,"Properties",["textures","frameRate","index"]);y(Sr,"DefaultFrameRate",30);var Ol={frameRate:{enumerable:!0,get:function(){return this._frameRate},set:function(t){this._frameRate=t,this._flagFrameRate=!0}},index:{enumerable:!0,get:function(){return this._index},set:function(t){this._index=t,this._flagIndex=!0}},textures:{enumerable:!0,get:function(){return this._textures},set:function(t){let e=this._renderer.bindTextures,i=this._renderer.unbindTextures;this._textures&&this._textures.unbind(z.Types.insert,e).unbind(z.Types.remove,i),this._textures=new vi((t||[]).slice(0)),this._textures.bind(z.Types.insert,e).bind(z.Types.remove,i),e(this._textures)}}};function $c(){this._flagTextures=!0}function Xc(t){let e=t.length;for(;e--;)t[e].bind(z.Types.change,this._renderer.flagTextures);this._renderer.flagTextures()}function Yc(t){let e=t.length;for(;e--;)t[e].unbind(z.Types.change,this._renderer.flagTextures);this._renderer.flagTextures()}function Pl(t){if(t instanceof Dt)return t;if(typeof t=="string")return new Dt(t)}var gr=class extends Pt{constructor(t,e,i,r,a,f,l){let d=l||ne.Resolution*3,m=[];for(let g=0;g<d;g++)m.push(new At);super(m,!0,!1,!0),y(this,"_flagStartAngle",!1),y(this,"_flagEndAngle",!1),y(this,"_flagInnerRadius",!1),y(this,"_flagOuterRadius",!1),y(this,"_startAngle",0),y(this,"_endAngle",me),y(this,"_innerRadius",0),y(this,"_outerRadius",0);for(let g in Fl)Object.defineProperty(this,g,Fl[g]);typeof i=="number"&&(this.innerRadius=i),typeof r=="number"&&(this.outerRadius=r),typeof a=="number"&&(this.startAngle=a),typeof f=="number"&&(this.endAngle=f),this._update(),typeof t=="number"&&(this.translation.x=t),typeof e=="number"&&(this.translation.y=e)}_update(){if(this._flagVertices||this._flagStartAngle||this._flagEndAngle||this._flagInnerRadius||this._flagOuterRadius){let t=this._startAngle,e=this._endAngle,i=this._innerRadius,r=this._outerRadius,a=Re(t,me)===Re(e,me),f=i>0,l=this.vertices,d=f?l.length/2:l.length,m,g=0,x,T,S,v,E,L,R,M,F;for(a?d--:f||(d-=2),x=0,T=d-1;x<d;x++){switch(S=x/T,v=l[g],E=S*(e-t)+t,L=(e-t)/d,R=r*Math.cos(E),M=r*Math.sin(E),x){case 0:m=X.move;break;default:m=X.curve}v.command=m,v.x=R,v.y=M,v.controls.left.clear(),v.controls.right.clear(),v.command===X.curve&&(F=r*L/Math.PI,v.controls.left.x=F*Math.cos(E-ae),v.controls.left.y=F*Math.sin(E-ae),v.controls.right.x=F*Math.cos(E+ae),v.controls.right.y=F*Math.sin(E+ae),x===1&&v.controls.left.multiplyScalar(2),x===T&&v.controls.right.multiplyScalar(2)),g++}if(f){for(a?(l[g].command=X.close,g++):(d--,T=d-1),x=0;x<d;x++)S=x/T,v=l[g],E=(1-S)*(e-t)+t,L=(e-t)/d,R=i*Math.cos(E),M=i*Math.sin(E),m=X.curve,x<=0&&(m=a?X.move:X.line),v.command=m,v.x=R,v.y=M,v.controls.left.clear(),v.controls.right.clear(),v.command===X.curve&&(F=i*L/Math.PI,v.controls.left.x=F*Math.cos(E+ae),v.controls.left.y=F*Math.sin(E+ae),v.controls.right.x=F*Math.cos(E-ae),v.controls.right.y=F*Math.sin(E-ae),x===1&&v.controls.left.multiplyScalar(2),x===T&&v.controls.right.multiplyScalar(2)),g++;l[g].copy(l[0]),l[g].command=X.line}else a||(l[g].command=X.line,l[g].x=0,l[g].y=0,g++,l[g].copy(l[0]),l[g].command=X.line)}return super._update.call(this),this}flagReset(){return super.flagReset.call(this),this._flagStartAngle=this._flagEndAngle=this._flagInnerRadius=this._flagOuterRadius=!1,this}clone(t){let e=this.innerRadius,i=this.outerRadius,r=this.startAngle,a=this.endAngle,f=this.vertices.length,l=new gr(0,0,e,i,r,a,f);l.translation.copy(this.translation),l.rotation=this.rotation,l.scale=this.scale,l.skewX=this.skewX,l.skewY=this.skewY,this.matrix.manual&&l.matrix.copy(this.matrix);for(let d=0;d<Pt.Properties.length;d++){let m=Pt.Properties[d];l[m]=this[m]}return t&&t.add(l),l}toObject(){let t=super.toObject.call(this);for(let e=0;e<gr.Properties.length;e++){let i=gr.Properties[e];t[i]=this[i]}return t}},da=gr;y(da,"Properties",["startAngle","endAngle","innerRadius","outerRadius"]);var Fl={startAngle:{enumerable:!0,get:function(){return this._startAngle},set:function(t){this._startAngle=t,this._flagStartAngle=!0}},endAngle:{enumerable:!0,get:function(){return this._endAngle},set:function(t){this._endAngle=t,this._flagEndAngle=!0}},innerRadius:{enumerable:!0,get:function(){return this._innerRadius},set:function(t){this._innerRadius=t,this._flagInnerRadius=!0}},outerRadius:{enumerable:!0,get:function(){return this._outerRadius},set:function(t){this._outerRadius=t,this._flagOuterRadius=!0}}},Gc=Math.ceil,Kc=Math.floor,wn=class extends bi{constructor(t){super(),y(this,"_flagVertices",!0),y(this,"_flagLength",!0),y(this,"_flagFill",!0),y(this,"_flagStroke",!0),y(this,"_flagLinewidth",!0),y(this,"_flagOpacity",!0),y(this,"_flagVisible",!0),y(this,"_flagSize",!0),y(this,"_flagSizeAttenuation",!0),y(this,"_length",0),y(this,"_fill","#fff"),y(this,"_stroke","#000"),y(this,"_linewidth",1),y(this,"_opacity",1),y(this,"_visible",!0),y(this,"_size",1),y(this,"_sizeAttenuation",!1),y(this,"_beginning",0),y(this,"_ending",1),y(this,"_dashes",null),y(this,"noFill",Pt.prototype.noFill),y(this,"noStroke",Pt.prototype.noStroke),y(this,"corner",Pt.prototype.corner),y(this,"center",Pt.prototype.center),y(this,"getBoundingClientRect",Pt.prototype.getBoundingClientRect),y(this,"_updateLength",Pt.prototype._updateLength);for(let e in Nl)Object.defineProperty(this,e,Nl[e]);this._renderer.type="points",this._renderer.flagVertices=eh.bind(this),this._renderer.bindVertices=ih.bind(this),this._renderer.unbindVertices=nh.bind(this),this._renderer.flagFill=rh.bind(this),this._renderer.flagStroke=sh.bind(this),this._renderer.vertices=null,this._renderer.collection=null,this.sizeAttenuation=!1,this.beginning=0,this.ending=1,this.fill="#fff",this.stroke="#000",this.className="",this.visible=!0,this.vertices=t,this.dashes=[],this.dashes.offset=0}clone(t){let e=new wn;for(let i=0;i<this.vertices.length;i++)e.vertices.push(this.vertices[i].clone());for(let i=0;i<wn.Properties.length;i++){let r=wn.Properties[i];e[r]=this[r]}return e.className=this.className,e.translation.copy(this.translation),e.rotation=this.rotation,e.scale=this.scale,e.skewX=this.skewX,e.skewY=this.skewY,this.matrix.manual&&e.matrix.copy(this.matrix),t&&t.add(e),e._update()}toObject(){let t={vertices:this.vertices.map(function(e){return e.toObject()})};return st.each(wn.Properties,function(e){t[e]=this[e]},this),t.className=this.className,t.translation=this.translation.toObject(),t.rotation=this.rotation,t.scale=this.scale instanceof K?this.scale.toObject():this.scale,t.skewX=this.skewX,t.skewY=this.skewY,this.matrix.manual&&(t.matrix=this.matrix.toObject()),t}subdivide(t){this._update();let e=[];for(let i=0;i<this.vertices.length;i++){let r=this.vertices[i],a=this.vertices[i-1];if(!a)continue;let f=r.x,l=r.y,d=a.x,m=a.y,g=fa(f,l,f,l,d,m,d,m,t);e=e.concat(g)}return this.vertices=e,this}_update(){if(this._flagVertices){this._flagLength&&this._updateLength(void 0,!0);let t=Math.min(this._beginning,this._ending),e=Math.max(this._beginning,this._ending),i=br(this,t*this._length),r=br(this,e*this._length),a=Gc(i),f=Kc(r),l=0,d;this._renderer.vertices=[],this._renderer.collection=[];for(let m=0;m<this._collection.length;m++)m>=a&&m<=f&&(d=this._collection[m],this._renderer.collection.push(d),this._renderer.vertices[l*2+0]=d.x,this._renderer.vertices[l*2+1]=d.y,l++)}return super._update.apply(this,arguments),this}flagReset(){return this._flagVertices=this._flagLength=this._flagFill=this._flagStroke=this._flagLinewidth=this._flagOpacity=this._flagVisible=this._flagSize=this._flagSizeAttenuation=!1,super.flagReset.call(this),this}},pa=wn;y(pa,"Properties",["fill","stroke","linewidth","opacity","visible","size","sizeAttenuation","beginning","ending"]);var Nl={linewidth:{enumerable:!0,get:function(){return this._linewidth},set:function(t){this._linewidth=t,this._flagLinewidth=!0}},opacity:{enumerable:!0,get:function(){return this._opacity},set:function(t){this._opacity=t,this._flagOpacity=!0}},visible:{enumerable:!0,get:function(){return this._visible},set:function(t){this._visible=t,this._flagVisible=!0}},size:{enumerable:!0,get:function(){return this._size},set:function(t){this._size=t,this._flagSize=!0}},sizeAttenuation:{enumerable:!0,get:function(){return this._sizeAttenuation},set:function(t){this._sizeAttenuation=t,this._flagSizeAttenuation=!0}},fill:{enumerable:!0,get:function(){return this._fill},set:function(t){(this._fill instanceof ie||this._fill instanceof $t||this._fill instanceof Xt||this._fill instanceof Dt)&&this._fill.unbind(z.Types.change,this._renderer.flagFill),this._fill=t,this._flagFill=!0,(this._fill instanceof ie||this._fill instanceof $t||this._fill instanceof Xt||this._fill instanceof Dt)&&this._fill.bind(z.Types.change,this._renderer.flagFill)}},stroke:{enumerable:!0,get:function(){return this._stroke},set:function(t){(this._stroke instanceof ie||this._stroke instanceof $t||this._stroke instanceof Xt||this._stroke instanceof Dt)&&this._stroke.unbind(z.Types.change,this._renderer.flagStroke),this._stroke=t,this._flagStroke=!0,(this._stroke instanceof ie||this._stroke instanceof $t||this._stroke instanceof Xt||this._stroke instanceof Dt)&&this._stroke.bind(z.Types.change,this._renderer.flagStroke)}},length:{get:function(){return this._flagLength&&this._updateLength(),this._length}},beginning:{enumerable:!0,get:function(){return this._beginning},set:function(t){this._beginning=t,this._flagVertices=!0}},ending:{enumerable:!0,get:function(){return this._ending},set:function(t){this._ending=t,this._flagVertices=!0}},vertices:{enumerable:!0,get:function(){return this._collection},set:function(t){let e=this._renderer.bindVertices,i=this._renderer.unbindVertices;this._collection&&this._collection.unbind(z.Types.insert,e).unbind(z.Types.remove,i),t instanceof vi?this._collection=t:this._collection=new vi(t||[]),this._collection.bind(z.Types.insert,e).bind(z.Types.remove,i),e(this._collection)}},dashes:{enumerable:!0,get:function(){return this._dashes},set:function(t){typeof t.offset!="number"&&(t.offset=this.dashes&&this._dashes.offset||0),this._dashes=t}}},Qc=Math.cos,Jc=Math.sin,_r=class extends Pt{constructor(t,e,i,r){r=Math.max(r||0,3),super(),y(this,"_flagWidth",!1),y(this,"_flagHeight",!1),y(this,"_flagSides",!1),y(this,"_radius",0),y(this,"_width",0),y(this,"_height",0),y(this,"_sides",0);for(let a in Il)Object.defineProperty(this,a,Il[a]);this.closed=!0,this.automatic=!1,typeof i=="number"&&(this.radius=i),typeof r=="number"&&(this.sides=r),this._update(),typeof t=="number"&&(this.translation.x=t),typeof e=="number"&&(this.translation.y=e)}_update(){if(this._flagVertices||this._flagWidth||this._flagHeight||this._flagSides){let t=this._sides,e=t+1,i=this.vertices.length;i>t&&(this.vertices.splice(t-1,i-t),i=t);for(let r=0;r<e;r++){let a=(r+.5)/t,f=me*a+Math.PI/2,l=this._width*Qc(f)/2,d=this._height*Jc(f)/2;r>=i?this.vertices.push(new At(l,d)):this.vertices[r].set(l,d),this.vertices[r].command=r===0?X.move:X.line}}return super._update.call(this),this}flagReset(){return this._flagWidth=this._flagHeight=this._flagSides=!1,super.flagReset.call(this),this}clone(t){let e=new _r(0,0,0,this.sides);e.translation.copy(this.translation),e.rotation=this.rotation,e.scale=this.scale,e.skewX=this.skewX,e.skewY=this.skewY,e.width=this.width,e.height=this.height,this.matrix.manual&&e.matrix.copy(this.matrix);for(let i=0;i<Pt.Properties.length;i++){let r=Pt.Properties[i];e[r]=this[r]}return t&&t.add(e),e}toObject(){let t=super.toObject.call(this);for(let e=0;e<_r.Properties.length;e++){let i=_r.Properties[e];t[i]=this[i]}return t}},ga=_r;y(ga,"Properties",["width","height","sides"]);var Il={radius:{enumerable:!0,get:function(){return this._radius},set:function(t){this._radius=t,this.width=t*2,this.height=t*2}},width:{enumerable:!0,get:function(){return this._width},set:function(t){this._width=t,this._flagWidth=!0,this._radius=Math.max(this.width,this.height)/2}},height:{enumerable:!0,get:function(){return this._height},set:function(t){this._height=t,this._flagHeight=!0,this._radius=Math.max(this.width,this.height)/2}},sides:{enumerable:!0,get:function(){return this._sides},set:function(t){this._sides=t,this._flagSides=!0}}},Zc=Math.cos,tu=Math.sin,mr=class extends Pt{constructor(t,e,i,r,a){arguments.length<=3&&(r=i,i=r/2),(typeof a!="number"||a<=0)&&(a=5),super(),y(this,"_flagInnerRadius",!1),y(this,"_flagOuterRadius",!1),y(this,"_flagSides",!1),y(this,"_innerRadius",0),y(this,"_outerRadius",0),y(this,"_sides",0);for(let f in Ll)Object.defineProperty(this,f,Ll[f]);this.closed=!0,this.automatic=!1,typeof i=="number"&&(this.innerRadius=i),typeof r=="number"&&(this.outerRadius=r),typeof a=="number"&&(this.sides=a),this._update(),typeof t=="number"&&(this.translation.x=t),typeof e=="number"&&(this.translation.y=e)}_update(){if(this._flagVertices||this._flagInnerRadius||this._flagOuterRadius||this._flagSides){let t=this._sides*2,e=t+1,i=this.vertices.length;i>t&&(this.vertices.splice(t-1,i-t),i=t);for(let r=0;r<e;r++){let a=(r+.5)/t,f=me*a,l=(r%2?this._outerRadius:this._innerRadius)/2,d=l*Zc(f),m=l*tu(f);r>=i?this.vertices.push(new At(d,m)):this.vertices[r].set(d,m),this.vertices[r].command=r===0?X.move:X.line}}return super._update.call(this),this}flagReset(){return this._flagInnerRadius=this._flagOuterRadius=this._flagSides=!1,super.flagReset.call(this),this}clone(t){let e=this.innerRadius,i=this.outerRadius,r=this.sides,a=new mr(0,0,e,i,r);a.translation.copy(this.translation),a.rotation=this.rotation,a.scale=this.scale,a.skewX=this.skewX,a.skewY=this.skewY,this.matrix.manual&&a.matrix.copy(this.matrix);for(let f=0;f<Pt.Properties.length;f++){let l=Pt.Properties[f];a[l]=this[l]}return t&&t.add(a),a}toObject(){let t=super.toObject.call(this);for(let e=0;e<mr.Properties.length;e++){let i=mr.Properties[e];t[i]=this[i]}return t}},_a=mr;y(_a,"Properties",["innerRadius","outerRadius","sides"]);var Ll={innerRadius:{enumerable:!0,get:function(){return this._innerRadius},set:function(t){this._innerRadius=t,this._flagInnerRadius=!0}},outerRadius:{enumerable:!0,get:function(){return this._outerRadius},set:function(t){this._outerRadius=t,this._flagOuterRadius=!0}},sides:{enumerable:!0,get:function(){return this._sides},set:function(t){this._sides=t,this._flagSides=!0}}},_t={version:1.1,ns:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",alignments:{left:"start",center:"middle",right:"end"},createElement:function(t,e){let i=t,r=document.createElementNS(_t.ns,i);return i==="svg"&&(e=st.defaults(e||{},{version:_t.version})),e&&Object.keys(e).length>0&&_t.setAttributes(r,e),r},setAttributes:function(t,e){let i=Object.keys(e);for(let r=0;r<i.length;r++)/href/.test(i[r])?t.setAttributeNS(_t.xlink,i[r],e[i[r]]):t.setAttribute(i[r],e[i[r]]);return this},removeAttributes:function(t,e){for(let i in e)t.removeAttribute(i);return this},toString:function(t,e){let i=t.length,r=i-1,a,f="";for(let l=0;l<i;l++){let d=t[l],m=e?Re(l-1,i):Math.max(l-1,0),g=t[m],x,T,S,v,E,L,R,M,F,B,q,W,h,G,J,Z=Jt(d.x),tt=Jt(d.y);switch(d.command){case X.close:x=X.close;break;case X.arc:q=d.rx,W=d.ry,h=d.xAxisRotation,G=d.largeArcFlag,J=d.sweepFlag,x=X.arc+" "+q+" "+W+" "+h+" "+G+" "+J+" "+Z+" "+tt;break;case X.curve:R=g.controls&&g.controls.right||K.zero,M=d.controls&&d.controls.left||K.zero,g.relative?(S=Jt(R.x+g.x),v=Jt(R.y+g.y)):(S=Jt(R.x),v=Jt(R.y)),d.relative?(E=Jt(M.x+d.x),L=Jt(M.y+d.y)):(E=Jt(M.x),L=Jt(M.y)),x=(l===0?X.move:X.curve)+" "+S+" "+v+" "+E+" "+L+" "+Z+" "+tt;break;case X.move:a=d,x=X.move+" "+Z+" "+tt;break;default:x=d.command+" "+Z+" "+tt}l>=r&&e&&(d.command===X.curve&&(T=a,F=d.controls&&d.controls.right||d,B=T.controls&&T.controls.left||T,d.relative?(S=Jt(F.x+d.x),v=Jt(F.y+d.y)):(S=Jt(F.x),v=Jt(F.y)),T.relative?(E=Jt(B.x+T.x),L=Jt(B.y+T.y)):(E=Jt(B.x),L=Jt(B.y)),Z=Jt(T.x),tt=Jt(T.y),x+=" C "+S+" "+v+" "+E+" "+L+" "+Z+" "+tt),d.command!==X.close&&(x+=" Z")),f+=x+" "}return f},pointsToString:function(t,e){let i="",r=e*.5;for(let a=0;a<t.length;a++){let f=t[a].x,l=t[a].y-r;i+=X.move+" "+f+" "+l+" ",i+="a "+r+" "+r+" 0 1 0 0.001 0 Z"}return i},getClip:function(t,e){let i=t._renderer.clip;return i||(i=t._renderer.clip=_t.createElement("clipPath",{"clip-rule":"nonzero"})),i.parentNode===null&&e.defs.appendChild(i),i},defs:{update:function(t){let{defs:e}=t;if(e._flagUpdate){let i=Array.prototype.slice.call(e.children,0);for(let r=0;r<i.length;r++){let a=i[r],f=a.id,l=`[fill="url(#${f})"],[stroke="url(#${f})"],[clip-path="url(#${f})"]`;t.querySelector(l)||e.removeChild(a)}e._flagUpdate=!1}}},group:{appendChild:function(t){let e=t._renderer.elem;if(!e)return;let i=e.nodeName;!i||/(radial|linear)gradient/i.test(i)||t._clip||this.elem.appendChild(e)},removeChild:function(t){let e=t._renderer.elem;!e||e.parentNode!=this.elem||!e.nodeName||t._clip||this.elem.removeChild(e)},orderChild:function(t){this.elem.appendChild(t._renderer.elem)},renderChild:function(t){_t[t._renderer.type].render.call(t,this)},render:function(t){if(!this._visible&&!this._flagVisible||this._opacity===0&&!this._flagOpacity)return this;this._update(),this._renderer.elem||(this._renderer.elem=_t.createElement("g",{id:this.id}),t.appendChild(this._renderer.elem));let e=this._matrix.manual||this._flagMatrix,i={domElement:t,elem:this._renderer.elem};e&&this._renderer.elem.setAttribute("transform","matrix("+this._matrix.toString()+")");for(let r=0;r<this.children.length;r++){let a=this.children[r];_t[a._renderer.type].render.call(a,t)}return this._flagId&&this._renderer.elem.setAttribute("id",this._id),this._flagOpacity&&this._renderer.elem.setAttribute("opacity",this._opacity),this._flagVisible&&this._renderer.elem.setAttribute("display",this._visible?"inline":"none"),this._flagClassName&&this._renderer.elem.setAttribute("class",this.classList.join(" ")),this._flagAdditions&&this.additions.forEach(_t.group.appendChild,i),this._flagSubtractions&&this.subtractions.forEach(_t.group.removeChild,i),this._flagOrder&&this.children.forEach(_t.group.orderChild,i),this._flagMask&&(this._mask?(_t[this._mask._renderer.type].render.call(this._mask,t),this._renderer.elem.setAttribute("clip-path","url(#"+this._mask.id+")")):this._renderer.elem.removeAttribute("clip-path")),this.dataset&&Object.assign(this._renderer.elem.dataset,this.dataset),this.flagReset()}},path:{render:function(t){if(this._opacity===0&&!this._flagOpacity)return this;this._update();let e={};if((this._matrix.manual||this._flagMatrix)&&(e.transform="matrix("+this._matrix.toString()+")"),this._flagId&&(e.id=this._id),this._flagVertices){let r=_t.toString(this._renderer.vertices,this._closed);e.d=r}if(this._fill&&this._fill._renderer&&(this._renderer.hasFillEffect=!0,this._fill._update(),_t[this._fill._renderer.type].render.call(this._fill,t,!0)),this._flagFill&&(e.fill=this._fill&&this._fill.id?"url(#"+this._fill.id+")":this._fill,this._renderer.hasFillEffect&&typeof this._fill.id>"u"&&(t.defs._flagUpdate=!0,delete this._renderer.hasFillEffect)),this._stroke&&this._stroke._renderer&&(this._renderer.hasStrokeEffect=!0,this._stroke._update(),_t[this._stroke._renderer.type].render.call(this._stroke,t,!0)),this._flagStroke&&(e.stroke=this._stroke&&this._stroke.id?"url(#"+this._stroke.id+")":this._stroke,this._renderer.hasStrokeEffect&&typeof this._stroke.id>"u"&&(t.defs._flagUpdate=!0,delete this._renderer.hasStrokeEffect)),this._flagLinewidth&&(e["stroke-width"]=this._linewidth),this._flagOpacity&&(e["stroke-opacity"]=this._opacity,e["fill-opacity"]=this._opacity),this._flagClassName&&(e.class=this.classList.join(" ")),this._flagVisible&&(e.visibility=this._visible?"visible":"hidden"),this._flagCap&&(e["stroke-linecap"]=this._cap),this._flagJoin&&(e["stroke-linejoin"]=this._join),this._flagMiter&&(e["stroke-miterlimit"]=this._miter),this.dashes&&this.dashes.length>0&&(e["stroke-dasharray"]=this.dashes.join(" "),e["stroke-dashoffset"]=this.dashes.offset||0),this._renderer.elem?_t.setAttributes(this._renderer.elem,e):(e.id=this._id,this._renderer.elem=_t.createElement("path",e),t.appendChild(this._renderer.elem)),this._flagClip){let r=_t.getClip(this,t),a=this._renderer.elem;this._clip?(a.removeAttribute("id"),r.setAttribute("id",this.id),r.appendChild(a)):(r.removeAttribute("id"),a.setAttribute("id",this.id),this.parent._renderer.elem.appendChild(a))}return this._flagMask&&(this._mask?(_t[this._mask._renderer.type].render.call(this._mask,t),this._renderer.elem.setAttribute("clip-path","url(#"+this._mask.id+")")):this._renderer.elem.removeAttribute("clip-path")),this.flagReset()}},points:{render:function(t){if(this._opacity===0&&!this._flagOpacity)return this;this._update();let e={};if((this._matrix.manual||this._flagMatrix)&&(e.transform="matrix("+this._matrix.toString()+")"),this._flagId&&(e.id=this._id),this._flagVertices||this._flagSize||this._flagSizeAttenuation){let r=this._size;if(!this._sizeAttenuation){let f=this.worldMatrix.elements,l=Ji(f[0],f[3],f[1],f[4],f[2],f[5]);r/=Math.max(l.scaleX,l.scaleY)}let a=_t.pointsToString(this._renderer.collection,r);e.d=a}return this._fill&&this._fill._renderer&&(this._renderer.hasFillEffect=!0,this._fill._update(),_t[this._fill._renderer.type].render.call(this._fill,t,!0)),this._flagFill&&(e.fill=this._fill&&this._fill.id?"url(#"+this._fill.id+")":this._fill,this._renderer.hasFillEffect&&typeof this._fill.id>"u"&&(t.defs._flagUpdate=!0,delete this._renderer.hasFillEffect)),this._stroke&&this._stroke._renderer&&(this._renderer.hasStrokeEffect=!0,this._stroke._update(),_t[this._stroke._renderer.type].render.call(this._stroke,t,!0)),this._flagStroke&&(e.stroke=this._stroke&&this._stroke.id?"url(#"+this._stroke.id+")":this._stroke,this._renderer.hasStrokeEffect&&typeof this._stroke.id>"u"&&(t.defs._flagUpdate=!0,delete this._renderer.hasStrokeEffect)),this._flagLinewidth&&(e["stroke-width"]=this._linewidth),this._flagOpacity&&(e["stroke-opacity"]=this._opacity,e["fill-opacity"]=this._opacity),this._flagClassName&&(e.class=this.classList.join(" ")),this._flagVisible&&(e.visibility=this._visible?"visible":"hidden"),this.dashes&&this.dashes.length>0&&(e["stroke-dasharray"]=this.dashes.join(" "),e["stroke-dashoffset"]=this.dashes.offset||0),this._renderer.elem?_t.setAttributes(this._renderer.elem,e):(e.id=this._id,this._renderer.elem=_t.createElement("path",e),t.appendChild(this._renderer.elem)),this.flagReset()}},text:{render:function(t){this._update();let e={};if((this._matrix.manual||this._flagMatrix)&&(e.transform="matrix("+this._matrix.toString()+")"),this._flagId&&(e.id=this._id),this._flagFamily&&(e["font-family"]=this._family),this._flagSize&&(e["font-size"]=this._size),this._flagLeading&&(e["line-height"]=this._leading),this._flagAlignment&&(e["text-anchor"]=_t.alignments[this._alignment]||this._alignment),this._flagBaseline&&(e["alignment-baseline"]=e["dominant-baseline"]=this._baseline),this._flagStyle&&(e["font-style"]=this._style),this._flagWeight&&(e["font-weight"]=this._weight),this._flagDecoration&&(e["text-decoration"]=this._decoration),this._fill&&this._fill._renderer&&(this._renderer.hasFillEffect=!0,this._fill._update(),_t[this._fill._renderer.type].render.call(this._fill,t,!0)),this._flagFill&&(e.fill=this._fill&&this._fill.id?"url(#"+this._fill.id+")":this._fill,this._renderer.hasFillEffect&&typeof this._fill.id>"u"&&(t.defs._flagUpdate=!0,delete this._renderer.hasFillEffect)),this._stroke&&this._stroke._renderer&&(this._renderer.hasStrokeEffect=!0,this._stroke._update(),_t[this._stroke._renderer.type].render.call(this._stroke,t,!0)),this._flagStroke&&(e.stroke=this._stroke&&this._stroke.id?"url(#"+this._stroke.id+")":this._stroke,this._renderer.hasStrokeEffect&&typeof this._stroke.id>"u"&&(t.defs._flagUpdate=!0,delete this._renderer.hasStrokeEffect)),this._flagLinewidth&&(e["stroke-width"]=this._linewidth),this._flagOpacity&&(e.opacity=this._opacity),this._flagClassName&&(e.class=this.classList.join(" ")),this._flagVisible&&(e.visibility=this._visible?"visible":"hidden"),this.dashes&&this.dashes.length>0&&(e["stroke-dasharray"]=this.dashes.join(" "),e["stroke-dashoffset"]=this.dashes.offset||0),this._renderer.elem?_t.setAttributes(this._renderer.elem,e):(e.id=this._id,this._renderer.elem=_t.createElement("text",e),t.appendChild(this._renderer.elem)),this._flagClip){let r=_t.getClip(this,t),a=this._renderer.elem;this._clip?(a.removeAttribute("id"),r.setAttribute("id",this.id),r.appendChild(a)):(r.removeAttribute("id"),a.setAttribute("id",this.id),this.parent._renderer.elem.appendChild(a))}return this._flagMask&&(this._mask?(_t[this._mask._renderer.type].render.call(this._mask,t),this._renderer.elem.setAttribute("clip-path","url(#"+this._mask.id+")")):this._renderer.elem.removeAttribute("clip-path")),this._flagValue&&(this._renderer.elem.textContent=this._value),this.flagReset()}},"linear-gradient":{render:function(t,e){e||this._update();let i={};if(this._flagId&&(i.id=this._id),this._flagEndPoints&&(i.x1=this.left._x,i.y1=this.left._y,i.x2=this.right._x,i.y2=this.right._y),this._flagSpread&&(i.spreadMethod=this._spread),this._flagUnits&&(i.gradientUnits=this._units),this._renderer.elem?_t.setAttributes(this._renderer.elem,i):(i.id=this._id,this._renderer.elem=_t.createElement("linearGradient",i)),this._renderer.elem.parentNode===null&&t.defs.appendChild(this._renderer.elem),this._flagStops){let r=this._renderer.elem.childNodes.length!==this.stops.length;if(r)for(;this._renderer.elem.lastChild;)this._renderer.elem.removeChild(this._renderer.elem.lastChild);for(let a=0;a<this.stops.length;a++){let f=this.stops[a],l={};f._flagOffset&&(l.offset=100*f._offset+"%"),f._flagColor&&(l["stop-color"]=f._color),f._flagOpacity&&(l["stop-opacity"]=f._opacity),f._renderer.elem?_t.setAttributes(f._renderer.elem,l):f._renderer.elem=_t.createElement("stop",l),r&&this._renderer.elem.appendChild(f._renderer.elem),f.flagReset()}}return this.flagReset()}},"radial-gradient":{render:function(t,e){e||this._update();let i={};if(this._flagId&&(i.id=this._id),this._flagCenter&&(i.cx=this.center._x,i.cy=this.center._y),this._flagFocal&&(i.fx=this.focal._x,i.fy=this.focal._y),this._flagRadius&&(i.r=this._radius),this._flagSpread&&(i.spreadMethod=this._spread),this._flagUnits&&(i.gradientUnits=this._units),this._renderer.elem?_t.setAttributes(this._renderer.elem,i):(i.id=this._id,this._renderer.elem=_t.createElement("radialGradient",i)),this._renderer.elem.parentNode===null&&t.defs.appendChild(this._renderer.elem),this._flagStops){let r=this._renderer.elem.childNodes.length!==this.stops.length;if(r)for(;this._renderer.elem.lastChild;)this._renderer.elem.removeChild(this._renderer.elem.lastChild);for(let a=0;a<this.stops.length;a++){let f=this.stops[a],l={};f._flagOffset&&(l.offset=100*f._offset+"%"),f._flagColor&&(l["stop-color"]=f._color),f._flagOpacity&&(l["stop-opacity"]=f._opacity),f._renderer.elem?_t.setAttributes(f._renderer.elem,l):f._renderer.elem=_t.createElement("stop",l),r&&this._renderer.elem.appendChild(f._renderer.elem),f.flagReset()}}return this.flagReset()}},texture:{render:function(t,e){e||this._update();let i={},r={x:0,y:0},a=this.image;if(this._flagId&&(i.id=this._id),this._flagLoaded&&this.loaded)switch(a.nodeName.toLowerCase()){case"canvas":r.href=r["xlink:href"]=a.toDataURL("image/png");break;case"img":case"image":r.href=r["xlink:href"]=this.src;break}if((this._flagOffset||this._flagLoaded||this._flagScale)&&(i.x=this._offset.x,i.y=this._offset.y,a&&(i.x-=a.width/2,i.y-=a.height/2,this._scale instanceof K?(i.x*=this._scale.x,i.y*=this._scale.y):(i.x*=this._scale,i.y*=this._scale)),i.x>0&&(i.x*=-1),i.y>0&&(i.y*=-1)),(this._flagScale||this._flagLoaded||this._flagRepeat)&&(i.width=0,i.height=0,a)){switch(r.width=i.width=a.width,r.height=i.height=a.height,this._repeat){case"no-repeat":i.width+=1,i.height+=1;break}this._scale instanceof K?(i.width*=this._scale.x,i.height*=this._scale.y):(i.width*=this._scale,i.height*=this._scale)}return(this._flagScale||this._flagLoaded)&&(this._renderer.image?_t.setAttributes(this._renderer.image,r):this._renderer.image=_t.createElement("image",r)),this._renderer.elem?Object.keys(i).length!==0&&_t.setAttributes(this._renderer.elem,i):(i.id=this._id,i.patternUnits="userSpaceOnUse",this._renderer.elem=_t.createElement("pattern",i)),this._renderer.elem.parentNode===null&&t.defs.appendChild(this._renderer.elem),this._renderer.elem&&this._renderer.image&&!this._renderer.appended&&(this._renderer.elem.appendChild(this._renderer.image),this._renderer.appended=!0),this.flagReset()}}},hh=class extends z{constructor(t){super(),this.domElement=t.domElement||_t.createElement("svg"),this.scene=new ee,this.scene.parent=this,this.defs=_t.createElement("defs"),this.defs._flagUpdate=!1,this.domElement.appendChild(this.defs),this.domElement.defs=this.defs,this.domElement.style.overflow="hidden"}setSize(t,e){return this.width=t,this.height=e,_t.setAttributes(this.domElement,{width:t,height:e}),this.trigger(z.Types.resize,t,e)}render(){return _t.group.render.call(this.scene,this.domElement),_t.defs.update(this.domElement),this}};y(hh,"Utils",_t);var De={create:function(t,e,i){let r=t.createShader(t[i]);if(t.shaderSource(r,e),t.compileShader(r),!t.getShaderParameter(r,t.COMPILE_STATUS)){let f=t.getShaderInfoLog(r);throw t.deleteShader(r),new Me("unable to compile shader "+r+": "+f)}return r},types:{vertex:"VERTEX_SHADER",fragment:"FRAGMENT_SHADER"},path:{vertex:`
precision mediump float;
attribute vec2 a_position;
uniform mat3 u_matrix;
uniform vec2 u_resolution;
uniform vec4 u_rect;
varying vec2 v_textureCoords;
void main() {
vec2 rectCoords = (a_position * (u_rect.zw - u_rect.xy)) + u_rect.xy;
vec2 projected = (u_matrix * vec3(rectCoords, 1.0)).xy;
vec2 normal = projected / u_resolution;
vec2 clipspace = (normal * 2.0) - 1.0;
gl_Position = vec4(clipspace * vec2(1.0, -1.0), 0.0, 1.0);
v_textureCoords = a_position;
}
`,fragment:`
precision mediump float;
uniform sampler2D u_image;
varying vec2 v_textureCoords;
void main() {
vec4 texel = texture2D(u_image, v_textureCoords);
if (texel.a == 0.0) {
discard;
}
gl_FragColor = texel;
}
`},points:{vertex:`
precision mediump float;
attribute vec2 a_position;
uniform float u_size;
uniform mat3 u_matrix;
uniform vec2 u_resolution;
varying vec2 v_textureCoords;
void main() {
vec2 projected = (u_matrix * vec3(a_position, 1.0)).xy;
vec2 normal = projected / u_resolution;
vec2 clipspace = (normal * 2.0) - 1.0;
gl_PointSize = u_size;
gl_Position = vec4(clipspace * vec2(1.0, -1.0), 0.0, 1.0);
v_textureCoords = a_position;
}
`,fragment:`
precision mediump float;
uniform sampler2D u_image;
void main() {
vec4 texel = texture2D(u_image, gl_PointCoord);
if (texel.a == 0.0) {
discard;
}
gl_FragColor = texel;
}
`}},lr=Pi.Multiply,eu=[1,0,0,0,1,0,0,0,1],mi=new ei(9),iu=An.Utils,ha=new ei([0,0,1,0,0,1,0,1,1,0,1,1]),vt={precision:.9,isHidden:/(undefined|none|transparent)/i,canvas:Yt.document?Yt.document.createElement("canvas"):{getContext:function(){}},alignments:{left:"start",middle:"center",right:"end"},matrix:new Pi,group:{removeChild:function(t,e){if(t.children)for(let i=0;i<t.children.length;i++)vt.group.removeChild(t.children[i],e);t._renderer.texture&&(e.deleteTexture(t._renderer.texture),delete t._renderer.texture),t._renderer.positionBuffer&&(e.deleteBuffer(t._renderer.positionBuffer),delete t._renderer.positionBuffer)},render:function(t,e){if(!this._visible)return;this._update();let i=this.parent,r=i._matrix&&i._matrix.manual||i._flagMatrix,a=this._matrix.manual||this._flagMatrix;(r||a)&&(this._renderer.matrix||(this._renderer.matrix=new ei(9)),this._matrix.toTransformArray(!0,mi),lr(mi,i._renderer.matrix,this._renderer.matrix),this._renderer.scale instanceof K||(this._renderer.scale=new K),this._scale instanceof K?(this._renderer.scale.x=this._scale.x,this._renderer.scale.y=this._scale.y):(this._renderer.scale.x=this._scale,this._renderer.scale.y=this._scale),/renderer/i.test(i._renderer.type)||(this._renderer.scale.x*=i._renderer.scale.x,this._renderer.scale.y*=i._renderer.scale.y),r&&(this._flagMatrix=!0)),this._mask&&(t.clear(t.STENCIL_BUFFER_BIT),t.enable(t.STENCIL_TEST),t.stencilFunc(t.ALWAYS,1,0),t.stencilOp(t.KEEP,t.KEEP,t.REPLACE),t.colorMask(!1,!1,!1,!1),vt[this._mask._renderer.type].render.call(this._mask,t,e,this),t.stencilFunc(t.EQUAL,1,255),t.stencilOp(t.KEEP,t.KEEP,t.KEEP),t.colorMask(!0,!0,!0,!0)),this._flagOpacity=i._flagOpacity||this._flagOpacity,this._renderer.opacity=this._opacity*(i&&i._renderer?i._renderer.opacity:1);let f;if(this._flagSubtractions)for(f=0;f<this.subtractions.length;f++)vt.group.removeChild(this.subtractions[f],t);for(f=0;f<this.children.length;f++){let l=this.children[f];vt[l._renderer.type].render.call(l,t,e)}return this._mask&&t.disable(t.STENCIL_TEST),this.flagReset()}},path:{updateCanvas:function(t){let e,i,r,a,f,l,d,m,g,x,T,S,v,E,L=t._renderer.vertices,R=this.canvas,M=this.ctx,F=t._renderer.scale,B=t._stroke,q=t._linewidth,W=t._fill,h=t._renderer.opacity||t._opacity,G=t._cap,J=t._join,Z=t._miter,tt=t._closed,ut=t.dashes,nt=L.length,Ft=nt-1;R.width=Math.max(Math.ceil(t._renderer.rect.width*F.x),1),R.height=Math.max(Math.ceil(t._renderer.rect.height*F.y),1);let xt=t._renderer.rect.centroid,Gt=xt.x,Nt=xt.y;M.clearRect(0,0,R.width,R.height),W&&(typeof W=="string"?M.fillStyle=W:(vt[W._renderer.type].render.call(W,M,t),M.fillStyle=W._renderer.effect)),B&&(typeof B=="string"?M.strokeStyle=B:(vt[B._renderer.type].render.call(B,M,t),M.strokeStyle=B._renderer.effect),q&&(M.lineWidth=q),Z&&(M.miterLimit=Z),J&&(M.lineJoin=J),!tt&&G&&(M.lineCap=G)),typeof h=="number"&&(M.globalAlpha=h),ut&&ut.length>0&&(M.lineDashOffset=ut.offset||0,M.setLineDash(ut));let pt,ot,yt,Tt,rt,Kt,le,Ht;M.save(),M.scale(F.x,F.y),M.translate(Gt,Nt),M.beginPath();for(let Ut=0;Ut<L.length;Ut++){let It=L[Ut];switch(S=It.x,v=It.y,It.command){case X.close:M.closePath();break;case X.arc:ot=It.rx,yt=It.ry,Tt=It.xAxisRotation,rt=It.largeArcFlag,Kt=It.sweepFlag,e=tt?Re(Ut-1,nt):Math.max(Ut-1,0),i=L[e],le=i.x,Ht=i.y,iu.renderSvgArcCommand(M,le,Ht,ot,yt,rt,Kt,Tt,S,v);break;case X.curve:e=tt?Re(Ut-1,nt):Math.max(Ut-1,0),i=L[e],m=i.controls&&i.controls.right||K.zero,g=It.controls&&It.controls.left||K.zero,i._relative?(l=m.x+i.x,d=m.y+i.y):(l=m.x,d=m.y),It._relative?(a=g.x+It.x,f=g.y+It.y):(a=g.x,f=g.y),M.bezierCurveTo(l,d,a,f,S,v),Ut>=Ft&&tt&&(r=pt,x=It.controls&&It.controls.right||K.zero,T=r.controls&&r.controls.left||K.zero,It._relative?(l=x.x+It.x,d=x.y+It.y):(l=x.x,d=x.y),r._relative?(a=T.x+r.x,f=T.y+r.y):(a=T.x,f=T.y),S=r.x,v=r.y,M.bezierCurveTo(l,d,a,f,S,v));break;case X.line:M.lineTo(S,v);break;case X.move:pt=It,M.moveTo(S,v);break}}tt&&M.closePath(),vt.isHidden.test(W)||(E=W._renderer&&W._renderer.offset,E&&(M.save(),M.translate(-W._renderer.offset.x,-W._renderer.offset.y),M.scale(W._renderer.scale.x,W._renderer.scale.y)),M.fill(),E&&M.restore()),vt.isHidden.test(B)||(E=B._renderer&&B._renderer.offset,E&&(M.save(),M.translate(-B._renderer.offset.x,-B._renderer.offset.y),M.scale(B._renderer.scale.x,B._renderer.scale.y),M.lineWidth=q/B._renderer.scale.x),M.stroke(),E&&M.restore()),M.restore()},getBoundingClientRect:function(t,e,i){let r=1/0,a=-1/0,f=1/0,l=-1/0,d,m;t.forEach(function(g){let x=g.x,T=g.y,S=g.controls,v,E,L,R,M,F;f=Math.min(T,f),r=Math.min(x,r),a=Math.max(x,a),l=Math.max(T,l),g.controls&&(M=S.left,F=S.right,!(!M||!F)&&(v=g._relative?M.x+x:M.x,E=g._relative?M.y+T:M.y,L=g._relative?F.x+x:F.x,R=g._relative?F.y+T:F.y,!(!v||!E||!L||!R)&&(f=Math.min(E,R,f),r=Math.min(v,L,r),a=Math.max(v,L,a),l=Math.max(E,R,l))))}),typeof e=="number"&&(f-=e,r-=e,a+=e,l+=e),d=a-r,m=l-f,i.top=f,i.left=r,i.right=a,i.bottom=l,i.width=d,i.height=m,i.centroid||(i.centroid={}),i.centroid.x=-r,i.centroid.y=-f},render:function(t,e,i){if(!this._visible||!this._opacity)return this;this._update();let r=i||this.parent,a=e[this._renderer.type],f=r._matrix.manual||r._flagMatrix,l=this._matrix.manual||this._flagMatrix,d=this._renderer.parent!==r,m=this._flagVertices||this._flagFill||this._fill instanceof $t&&(this._fill._flagSpread||this._fill._flagStops||this._fill._flagEndPoints)||this._fill instanceof Xt&&(this._fill._flagSpread||this._fill._flagStops||this._fill._flagRadius||this._fill._flagCenter||this._fill._flagFocal)||this._fill instanceof Dt&&(this._fill._flagLoaded&&this._fill.loaded||this._fill._flagImage||this._fill._flagVideo||this._fill._flagRepeat||this._fill._flagOffset||this._fill._flagScale)||this._stroke instanceof $t&&(this._stroke._flagSpread||this._stroke._flagStops||this._stroke._flagEndPoints)||this._stroke instanceof Xt&&(this._stroke._flagSpread||this._stroke._flagStops||this._stroke._flagRadius||this._stroke._flagCenter||this._stroke._flagFocal)||this._stroke instanceof Dt&&(this._stroke._flagLoaded&&this._stroke.loaded||this._stroke._flagImage||this._stroke._flagVideo||this._stroke._flagRepeat||this._stroke._flagOffset||this._fill._flagScale)||this._flagStroke||this._flagLinewidth||this._flagOpacity||r._flagOpacity||this._flagVisible||this._flagCap||this._flagJoin||this._flagMiter||this._flagScale||this.dashes&&this.dashes.length>0||!this._renderer.texture;if((f||l||d)&&(this._renderer.matrix||(this._renderer.matrix=new ei(9)),this._matrix.toTransformArray(!0,mi),lr(mi,r._renderer.matrix,this._renderer.matrix),this._renderer.scale instanceof K||(this._renderer.scale=new K),this._scale instanceof K?(this._renderer.scale.x=this._scale.x*r._renderer.scale.x,this._renderer.scale.y=this._scale.y*r._renderer.scale.y):(this._renderer.scale.x=this._scale*r._renderer.scale.x,this._renderer.scale.y=this._scale*r._renderer.scale.y),d&&(this._renderer.parent=r)),this._mask&&(t.clear(t.STENCIL_BUFFER_BIT),t.enable(t.STENCIL_TEST),t.stencilFunc(t.ALWAYS,1,0),t.stencilOp(t.KEEP,t.KEEP,t.REPLACE),t.colorMask(!1,!1,!1,!1),vt[this._mask._renderer.type].render.call(this._mask,t,e,this),t.stencilFunc(t.EQUAL,1,255),t.stencilOp(t.KEEP,t.KEEP,t.KEEP),t.colorMask(!0,!0,!0,!0)),m?(this._renderer.rect||(this._renderer.rect={}),this._renderer.opacity=this._opacity*r._renderer.opacity,vt.path.getBoundingClientRect(this._renderer.vertices,this._linewidth,this._renderer.rect),vt.updateTexture.call(vt,t,this)):(this._fill&&this._fill._update&&this._fill._update(),this._stroke&&this._stroke._update&&this._stroke._update()),this._clip&&!i||!this._renderer.texture)return this;e.current!==a&&(t.useProgram(a),t.bindBuffer(t.ARRAY_BUFFER,e.buffers.position),t.vertexAttribPointer(a.position,2,t.FLOAT,!1,0,0),t.enableVertexAttribArray(a.position),t.bufferData(t.ARRAY_BUFFER,ha,t.STATIC_DRAW),e.resolution.flagged||t.uniform2f(t.getUniformLocation(a,"u_resolution"),e.resolution.width,e.resolution.height),e.current=a),e.resolution.flagged&&t.uniform2f(t.getUniformLocation(a,"u_resolution"),e.resolution.width,e.resolution.height),t.bindTexture(t.TEXTURE_2D,this._renderer.texture);let g=this._renderer.rect;return t.uniformMatrix3fv(a.matrix,!1,this._renderer.matrix),t.uniform4f(a.rect,g.left,g.top,g.right,g.bottom),t.drawArrays(t.TRIANGLES,0,6),this._mask&&t.disable(t.STENCIL_TEST),this.flagReset()}},points:{updateCanvas:function(t){let e,i=this.canvas,r=this.ctx,a=t._stroke,f=t._linewidth,l=t._fill,d=t._renderer.opacity||t._opacity,m=t.dashes,g=t._size,x=g;vt.isHidden.test(a)||(x+=f),i.width=Hl(x),i.height=i.width;let T=x/i.width,S=i.width/2,v=i.height/2;r.clearRect(0,0,i.width,i.height),l&&(typeof l=="string"?r.fillStyle=l:(vt[l._renderer.type].render.call(l,r,t),r.fillStyle=l._renderer.effect)),a&&(typeof a=="string"?r.strokeStyle=a:(vt[a._renderer.type].render.call(a,r,t),r.strokeStyle=a._renderer.effect),f&&(r.lineWidth=f/T)),typeof d=="number"&&(r.globalAlpha=d),m&&m.length>0&&(r.lineDashOffset=m.offset||0,r.setLineDash(m)),r.save(),r.translate(S,v),r.scale(vt.precision,vt.precision),r.beginPath(),r.arc(0,0,g/T*.5,0,me),r.restore(),closed&&r.closePath(),vt.isHidden.test(l)||(e=l._renderer&&l._renderer.offset,e&&(r.save(),r.translate(-l._renderer.offset.x,-l._renderer.offset.y),r.scale(l._renderer.scale.x,l._renderer.scale.y)),r.fill(),e&&r.restore()),vt.isHidden.test(a)||(e=a._renderer&&a._renderer.offset,e&&(r.save(),r.translate(-a._renderer.offset.x,-a._renderer.offset.y),r.scale(a._renderer.scale.x,a._renderer.scale.y),r.lineWidth=f/a._renderer.scale.x),r.stroke(),e&&r.restore())},render:function(t,e,i){if(!this._visible||!this._opacity)return this;this._update();let r=this._size,a=i||this.parent,f=e[this._renderer.type],l=this._sizeAttenuation,d=this._stroke,m=this._linewidth,g=a._matrix.manual||a._flagMatrix,x=this._matrix.manual||this._flagMatrix,T=this._renderer.parent!==a,S=this._renderer.vertices,v=this._renderer.collection.length,E=this._flagVertices,L=this._flagFill||this._fill instanceof $t&&(this._fill._flagSpread||this._fill._flagStops||this._fill._flagEndPoints)||this._fill instanceof Xt&&(this._fill._flagSpread||this._fill._flagStops||this._fill._flagRadius||this._fill._flagCenter||this._fill._flagFocal)||this._fill instanceof Dt&&(this._fill._flagLoaded&&this._fill.loaded||this._fill._flagImage||this._fill._flagVideo||this._fill._flagRepeat||this._fill._flagOffset||this._fill._flagScale)||this._stroke instanceof $t&&(this._stroke._flagSpread||this._stroke._flagStops||this._stroke._flagEndPoints)||this._stroke instanceof Xt&&(this._stroke._flagSpread||this._stroke._flagStops||this._stroke._flagRadius||this._stroke._flagCenter||this._stroke._flagFocal)||this._stroke instanceof Dt&&(this._stroke._flagLoaded&&this._stroke.loaded||this._stroke._flagImage||this._stroke._flagVideo||this._stroke._flagRepeat||this._stroke._flagOffset||this._fill._flagScale)||this._flagStroke||this._flagLinewidth||this._flagOpacity||a._flagOpacity||this._flagVisible||this._flagScale||this.dashes&&this.dashes.length>0||!this._renderer.texture;if((g||x||T)&&(this._renderer.matrix||(this._renderer.matrix=new ei(9)),this._matrix.toTransformArray(!0,mi),lr(mi,a._renderer.matrix,this._renderer.matrix),this._renderer.scale instanceof K||(this._renderer.scale=new K),this._scale instanceof K?(this._renderer.scale.x=this._scale.x*a._renderer.scale.x,this._renderer.scale.y=this._scale.y*a._renderer.scale.y):(this._renderer.scale.x=this._scale*a._renderer.scale.x,this._renderer.scale.y=this._scale*a._renderer.scale.y),T&&(this._renderer.parent=a)),E){let R=this._renderer.positionBuffer;R&&t.deleteBuffer(R),this._renderer.positionBuffer=t.createBuffer(),t.bindBuffer(t.ARRAY_BUFFER,this._renderer.positionBuffer),t.vertexAttribPointer(f.position,2,t.FLOAT,!1,0,0),t.enableVertexAttribArray(f.position),t.bufferData(t.ARRAY_BUFFER,S,t.STATIC_DRAW)}return L?(this._renderer.opacity=this._opacity*a._renderer.opacity,vt.updateTexture.call(vt,t,this)):(this._fill&&this._fill._update&&this._fill._update(),this._stroke&&this._stroke._update&&this._stroke._update()),this._clip&&!i||!this._renderer.texture?this:(vt.isHidden.test(d)||(r+=m),r/=vt.precision,l&&(r*=Math.max(this._renderer.scale.x,this._renderer.scale.y)),e.current!==f&&(t.useProgram(f),e.resolution.flagged||t.uniform2f(t.getUniformLocation(f,"u_resolution"),e.resolution.width,e.resolution.height),e.current=f),e.resolution.flagged&&t.uniform2f(t.getUniformLocation(f,"u_resolution"),e.resolution.width,e.resolution.height),t.bindTexture(t.TEXTURE_2D,this._renderer.texture),t.uniformMatrix3fv(f.matrix,!1,this._renderer.matrix),t.uniform1f(f.size,r*e.resolution.ratio),t.drawArrays(t.POINTS,0,v),this.flagReset())}},text:{updateCanvas:function(t){let e=this.canvas,i=this.ctx,r=t._renderer.scale,a=t._stroke,f=t._linewidth*r,l=t._fill,d=t._renderer.opacity||t._opacity,m=t.dashes,g=t._decoration;e.width=Math.max(Math.ceil(t._renderer.rect.width*r.x),1),e.height=Math.max(Math.ceil(t._renderer.rect.height*r.y),1);let x=t._renderer.rect.centroid,T=x.x,S=x.y,v,E,L,R,M,F,B,q,W,h,G,J=l._renderer&&l._renderer.offset&&a._renderer&&a._renderer.offset;if(i.clearRect(0,0,e.width,e.height),J||(i.font=[t._style,t._weight,t._size+"px/"+t._leading+"px",t._family].join(" ")),i.textAlign="center",i.textBaseline="middle",l&&(typeof l=="string"?i.fillStyle=l:(vt[l._renderer.type].render.call(l,i,t),i.fillStyle=l._renderer.effect)),a&&(typeof a=="string"?i.strokeStyle=a:(vt[a._renderer.type].render.call(a,i,t),i.strokeStyle=a._renderer.effect),f&&(i.lineWidth=f)),typeof d=="number"&&(i.globalAlpha=d),m&&m.length>0&&(i.lineDashOffset=m.offset||0,i.setLineDash(m)),i.save(),i.scale(r.x,r.y),i.translate(T,S),vt.isHidden.test(l)||(l._renderer&&l._renderer.offset?(F=l._renderer.scale.x,B=l._renderer.scale.y,i.save(),i.translate(-l._renderer.offset.x,-l._renderer.offset.y),i.scale(F,B),v=t._size/l._renderer.scale.y,E=t._leading/l._renderer.scale.y,i.font=[t._style,t._weight,v+"px/",E+"px",t._family].join(" "),L=l._renderer.offset.x/l._renderer.scale.x,R=l._renderer.offset.y/l._renderer.scale.y,i.fillText(t.value,L,R),i.restore()):i.fillText(t.value,0,0)),vt.isHidden.test(a)||(a._renderer&&a._renderer.offset?(F=a._renderer.scale.x,B=a._renderer.scale.y,i.save(),i.translate(-a._renderer.offset.x,-a._renderer.offset.y),i.scale(F,B),v=t._size/a._renderer.scale.y,E=t._leading/a._renderer.scale.y,i.font=[t._style,t._weight,v+"px/",E+"px",t._family].join(" "),L=a._renderer.offset.x/a._renderer.scale.x,R=a._renderer.offset.y/a._renderer.scale.y,M=f/a._renderer.scale.x,i.lineWidth=M,i.strokeText(t.value,L,R),i.restore()):i.strokeText(t.value,0,0)),/(underline|strikethrough)/i.test(g)){let Z=i.measureText(t.value);switch(g){case"underline":W=Z.actualBoundingBoxAscent,G=Z.actualBoundingBoxAscent;break;case"strikethrough":W=0,G=0;break}q=-Z.width/2,h=Z.width/2,i.lineWidth=Math.max(Math.floor(t._size/15),1),i.strokeStyle=i.fillStyle,i.beginPath(),i.moveTo(q,W),i.lineTo(h,G),i.stroke()}i.restore()},getBoundingClientRect:function(t,e){let i=vt.ctx;i.font=[t._style,t._weight,t._size+"px/"+t._leading+"px",t._family].join(" "),i.textAlign="center",i.textBaseline=t._baseline;let r=i.measureText(t._value).width*1.25,a=Math.max(t._size,t._leading)*1.25;this._linewidth&&!vt.isHidden.test(this._stroke)&&(r+=this._linewidth*2,a+=this._linewidth*2);let f=r/2,l=a/2;switch(vt.alignments[t._alignment]||t._alignment){case vt.alignments.left:e.left=0,e.right=r;break;case vt.alignments.right:e.left=-r,e.right=0;break;default:e.left=-f,e.right=f}switch(t._baseline){case"bottom":e.top=-a,e.bottom=0;break;case"top":e.top=0,e.bottom=a;break;default:e.top=-l,e.bottom=l}e.width=r,e.height=a,e.centroid||(e.centroid={}),e.centroid.x=f,e.centroid.y=l},render:function(t,e,i){if(!this._visible||!this._opacity)return this;this._update();let r=i||this.parent,a=e[this._renderer.type],f=r._matrix.manual||r._flagMatrix,l=this._matrix.manual||this._flagMatrix,d=this._renderer.parent!==r,m=this._flagVertices||this._flagFill||this._fill instanceof $t&&(this._fill._flagSpread||this._fill._flagStops||this._fill._flagEndPoints)||this._fill instanceof Xt&&(this._fill._flagSpread||this._fill._flagStops||this._fill._flagRadius||this._fill._flagCenter||this._fill._flagFocal)||this._fill instanceof Dt&&(this._fill._flagLoaded&&this._fill.loaded||this._fill._flagImage||this._fill._flagVideo||this._fill._flagRepeat||this._fill._flagOffset||this._fill._flagScale)||this._stroke instanceof $t&&(this._stroke._flagSpread||this._stroke._flagStops||this._stroke._flagEndPoints)||this._stroke instanceof Xt&&(this._stroke._flagSpread||this._stroke._flagStops||this._stroke._flagRadius||this._stroke._flagCenter||this._stroke._flagFocal)||this._stroke instanceof Dt&&(this._stroke._flagLoaded&&this._stroke.loaded||this._stroke._flagImage||this._stroke._flagVideo||this._stroke._flagRepeat||this._stroke._flagOffset||this._fill._flagScale)||this._flagStroke||this._flagLinewidth||this._flagOpacity||r._flagOpacity||this._flagVisible||this._flagScale||this._flagValue||this._flagFamily||this._flagSize||this._flagLeading||this._flagAlignment||this._flagBaseline||this._flagStyle||this._flagWeight||this._flagDecoration||this.dashes&&this.dashes.length>0||!this._renderer.texture;if((f||l||d)&&(this._renderer.matrix||(this._renderer.matrix=new ei(9)),this._matrix.toTransformArray(!0,mi),lr(mi,r._renderer.matrix,this._renderer.matrix),this._renderer.scale instanceof K||(this._renderer.scale=new K),this._scale instanceof K?(this._renderer.scale.x=this._scale.x*r._renderer.scale.x,this._renderer.scale.y=this._scale.y*r._renderer.scale.y):(this._renderer.scale.x=this._scale*r._renderer.scale.x,this._renderer.scale.y=this._scale*r._renderer.scale.y),d&&(this._renderer.parent=r)),this._mask&&(t.clear(t.STENCIL_BUFFER_BIT),t.enable(t.STENCIL_TEST),t.stencilFunc(t.ALWAYS,1,0),t.stencilOp(t.KEEP,t.KEEP,t.REPLACE),t.colorMask(!1,!1,!1,!1),vt[this._mask._renderer.type].render.call(this._mask,t,e,this),t.stencilFunc(t.EQUAL,1,255),t.stencilOp(t.KEEP,t.KEEP,t.KEEP),t.colorMask(!0,!0,!0,!0)),m?(this._renderer.rect||(this._renderer.rect={}),this._renderer.opacity=this._opacity*r._renderer.opacity,vt.text.getBoundingClientRect(this,this._renderer.rect),vt.updateTexture.call(vt,t,this)):(this._fill&&this._fill._update&&this._fill._update(),this._stroke&&this._stroke._update&&this._stroke._update()),this._clip&&!i||!this._renderer.texture)return this;e.current!==a&&(t.useProgram(a),t.bindBuffer(t.ARRAY_BUFFER,e.buffers.position),t.vertexAttribPointer(a.position,2,t.FLOAT,!1,0,0),t.enableVertexAttribArray(a.position),t.bufferData(t.ARRAY_BUFFER,ha,t.STATIC_DRAW),e.resolution.flagged||t.uniform2f(t.getUniformLocation(a,"u_resolution"),e.resolution.width,e.resolution.height),e.current=a),e.resolution.flagged&&t.uniform2f(t.getUniformLocation(a,"u_resolution"),e.resolution.width,e.resolution.height),t.bindTexture(t.TEXTURE_2D,this._renderer.texture);let g=this._renderer.rect;return t.uniformMatrix3fv(a.matrix,!1,this._renderer.matrix),t.uniform4f(a.rect,g.left,g.top,g.right,g.bottom),t.drawArrays(t.TRIANGLES,0,6),this._mask&&t.disable(t.STENCIL_TEST),this.flagReset()}},"linear-gradient":{render:function(t,e){if(!(!t.canvas.getContext("2d")||!e)){if(this._update(),!this._renderer.effect||this._flagEndPoints||this._flagStops||this._flagUnits){let i,r=this.left._x,a=this.left._y,f=this.right._x,l=this.right._y;/objectBoundingBox/i.test(this._units)&&(i=e.getBoundingClientRect(!0),r=(r-.5)*i.width,a=(a-.5)*i.height,f=(f-.5)*i.width,l=(l-.5)*i.height),this._renderer.effect=t.createLinearGradient(r,a,f,l);for(let d=0;d<this.stops.length;d++){let m=this.stops[d];this._renderer.effect.addColorStop(m._offset,m._color)}}return this.flagReset()}}},"radial-gradient":{render:function(t,e){if(!(!t.canvas.getContext("2d")||!e)){if(this._update(),!this._renderer.effect||this._flagCenter||this._flagFocal||this._flagRadius||this._flagStops||this._flagUnits){let i,r=this.center._x,a=this.center._y,f=this.focal._x,l=this.focal._y,d=this._radius;/objectBoundingBox/i.test(this._units)&&(i=e.getBoundingClientRect(!0),r=r*i.width*.5,a=a*i.height*.5,f=f*i.width*.5,l=l*i.height*.5,d*=Math.min(i.width,i.height)*.5),this._renderer.effect=t.createRadialGradient(r,a,0,f,l,d);for(let m=0;m<this.stops.length;m++){let g=this.stops[m];this._renderer.effect.addColorStop(g._offset,g._color)}}return this.flagReset()}}},texture:{render:function(t,e){if(!t.canvas.getContext("2d"))return;this._update();let i=this.image;if((this._flagLoaded||this._flagImage||this._flagVideo||this._flagRepeat)&&this.loaded)this._renderer.effect=t.createPattern(i,this._repeat);else if(!this._renderer.effect)return this.flagReset();return(this._flagOffset||this._flagLoaded||this._flagScale)&&(this._renderer.offset instanceof K||(this._renderer.offset=new K),this._renderer.offset.x=-this._offset.x,this._renderer.offset.y=-this._offset.y,i&&(this._renderer.offset.x+=i.width/2,this._renderer.offset.y+=i.height/2,this._scale instanceof K?(this._renderer.offset.x*=this._scale.x,this._renderer.offset.y*=this._scale.y):(this._renderer.offset.x*=this._scale,this._renderer.offset.y*=this._scale))),(this._flagScale||this._flagLoaded)&&(this._renderer.scale instanceof K||(this._renderer.scale=new K),this._scale instanceof K?this._renderer.scale.copy(this._scale):this._renderer.scale.set(this._scale,this._scale)),this.flagReset()}},updateTexture:function(t,e){if(this[e._renderer.type].updateCanvas.call(vt,e),this.canvas.width<=0||this.canvas.height<=0){e._renderer.texture&&t.deleteTexture(e._renderer.texture),delete e._renderer.texture;return}e._renderer.texture||(e._renderer.texture=t.createTexture()),t.bindTexture(t.TEXTURE_2D,e._renderer.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,this.canvas)},program:{create:function(t,e){let i,r,a;if(i=t.createProgram(),st.each(e,function(f){t.attachShader(i,f)}),t.linkProgram(i),r=t.getProgramParameter(i,t.LINK_STATUS),!r)throw a=t.getProgramInfoLog(i),t.deleteProgram(i),new Me("unable to link program: "+a);return i}},TextureRegistry:new xr};vt.ctx=vt.canvas.getContext("2d");var fh=class extends z{constructor(t){super();let e,i,r,a;if(this.domElement=t.domElement||document.createElement("canvas"),typeof t.offscreenElement<"u"&&(vt.canvas=t.offscreenElement,vt.ctx=vt.canvas.getContext("2d")),this.scene=new ee,this.scene.parent=this,this._renderer={type:"renderer",matrix:new ei(eu),scale:1,opacity:1},this._flagMatrix=!0,t=st.defaults(t||{},{antialias:!1,alpha:!0,premultipliedAlpha:!0,stencil:!0,preserveDrawingBuffer:!0,overdraw:!1}),this.overdraw=t.overdraw,e=this.ctx=this.domElement.getContext("webgl",t)||this.domElement.getContext("experimental-webgl",t),!this.ctx)throw new Me("unable to create a webgl context. Try using another renderer.");r=De.create(e,De.path.vertex,De.types.vertex),a=De.create(e,De.path.fragment,De.types.fragment),this.programs={current:null,buffers:{position:e.createBuffer()},resolution:{width:0,height:0,ratio:1,flagged:!1}},i=this.programs.path=vt.program.create(e,[r,a]),this.programs.text=this.programs.path,i.position=e.getAttribLocation(i,"a_position"),i.matrix=e.getUniformLocation(i,"u_matrix"),i.rect=e.getUniformLocation(i,"u_rect");let f=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,f),e.vertexAttribPointer(i.position,2,e.FLOAT,!1,0,0),e.enableVertexAttribArray(i.position),e.bufferData(e.ARRAY_BUFFER,ha,e.STATIC_DRAW),r=De.create(e,De.points.vertex,De.types.vertex),a=De.create(e,De.points.fragment,De.types.fragment),i=this.programs.points=vt.program.create(e,[r,a]),i.position=e.getAttribLocation(i,"a_position"),i.matrix=e.getUniformLocation(i,"u_matrix"),i.size=e.getUniformLocation(i,"u_size"),e.enable(e.BLEND),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA)}setSize(t,e,i){let r,a,f=this.ctx;return this.width=t,this.height=e,this.ratio=typeof i>"u"?ca(f):i,this.domElement.width=t*this.ratio,this.domElement.height=e*this.ratio,st.isObject(this.domElement.style)&&st.extend(this.domElement.style,{width:t+"px",height:e+"px"}),this._renderer.matrix[0]=this._renderer.matrix[4]=this._renderer.scale=this.ratio,this._flagMatrix=!0,r=t*this.ratio,a=e*this.ratio,f.viewport(0,0,r,a),this.programs.resolution.width=r,this.programs.resolution.height=a,this.programs.resolution.ratio=this.ratio,this.programs.resolution.flagged=!0,this.trigger(z.Types.resize,t,e,i)}render(){let t=this.ctx;return this.overdraw||t.clear(t.COLOR_BUFFER_BIT),vt.group.render.call(this.scene,t,this.programs),this._flagMatrix=!1,this.programs.resolution.flagged=!0,this}};y(fh,"Utils",vt);var nu=st.extend({Error:Me,getRatio:ca,read:Vt,xhr:lh},st,Ce,Ul,Bl),kn=class{constructor(t){y(this,"_events",new z),y(this,"type",""),y(this,"renderer",null),y(this,"scene",null),y(this,"width",0),y(this,"height",0),y(this,"frameCount",0),y(this,"timeDelta",0),y(this,"playing",!1);let e=st.defaults(t||{},{fullscreen:!1,fitted:!1,width:640,height:480,type:kn.Types.svg,autostart:!1});if(st.each(e,function(i,r){/fullscreen/i.test(r)||/autostart/i.test(r)||(this[r]=i)},this),st.isElement(e.domElement)){let i=e.domElement.tagName.toLowerCase();/^(CanvasRenderer-canvas|WebGLRenderer-canvas|SVGRenderer-svg)$/.test(this.type+"-"+i)||(this.type=kn.Types[i])}this.renderer=new kn[this.type](this),this.setPlaying(e.autostart),this.frameCount=0,e.fullscreen?(this.fit=ru.bind(this),this.fit.domElement=window,this.fit.attached=!0,st.extend(document.body.style,{overflow:"hidden",margin:0,padding:0,top:0,left:0,right:0,bottom:0,position:"fixed"}),st.extend(this.renderer.domElement.style,{display:"block",top:0,left:0,right:0,bottom:0,position:"fixed"}),Ae.bind(this.fit.domElement,"resize",this.fit),this.fit()):e.fitted?(this.fit=su.bind(this),st.extend(this.renderer.domElement.style,{display:"block"})):st.isElement(e.domElement)||(this.renderer.setSize(e.width,e.height,this.ratio),this.width=e.width,this.height=e.height),this.renderer.bind(z.Types.resize,au.bind(this)),this.scene=this.renderer.scene,kn.Instances.push(this),e.autostart&&Sn.init()}get _bound(){return this._events._bound}set _bound(t){this._events._bound=t}addEventListener(){return this._events.addEventListener.apply(this,arguments)}on(){return this._events.addEventListener.apply(this,arguments)}bind(){return this._events.addEventListener.apply(this,arguments)}removeEventListener(){return this._events.removeEventListener.apply(this,arguments)}off(){return this._events.removeEventListener.apply(this,arguments)}unbind(){return this._events.removeEventListener.apply(this,arguments)}dispatchEvent(){return this._events.dispatchEvent.apply(this,arguments)}trigger(){return this._events.dispatchEvent.apply(this,arguments)}listen(){return this._events.listen.apply(this,arguments)}ignore(){return this._events.ignore.apply(this,arguments)}appendTo(t){return t.appendChild(this.renderer.domElement),this.fit&&(this.fit.domElement!==window&&(this.fit.domElement=t,this.fit.attached=!1),this.update()),this}play(){return this.playing=!0,Sn.init(),this.trigger(z.Types.play)}pause(){return this.playing=!1,this.trigger(z.Types.pause)}setPlaying(t){this.playing=t}release(t){let e,i,r;if(!st.isObject(t))return this.release(this.scene);if(typeof t.unbind=="function"&&t.unbind(),t.vertices)for(typeof t.vertices.unbind=="function"&&t.vertices.unbind(),e=0;e<t.vertices.length;e++)i=t.vertices[e],typeof i.unbind=="function"&&i.unbind(),i.controls&&(i.controls.left&&typeof i.controls.left.unbind=="function"&&i.controls.left.unbind(),i.controls.right&&typeof i.controls.right.unbind=="function"&&i.controls.right.unbind());if(t.children){for(e=0;e<t.children.length;e++)r=t.children[e],this.release(r);typeof t.children.unbind=="function"&&t.children.unbind()}return t}update(){let t=!!this._lastFrame,e=st.performance.now();t&&(this.timeDelta=parseFloat((e-this._lastFrame).toFixed(3))),this._lastFrame=e,this.fit&&this.fit.domElement&&!this.fit.attached&&(Ae.bind(this.fit.domElement,"resize",this.fit),this.fit.attached=!0,this.fit());let i=this.width,r=this.height,a=this.renderer;return(i!==a.width||r!==a.height)&&a.setSize(i,r,this.ratio),this.trigger(z.Types.update,this.frameCount,this.timeDelta),this.render()}render(){return this.renderer.render(),this.trigger(z.Types.render,this.frameCount++)}add(t){return t instanceof Array||(t=Array.prototype.slice.call(arguments)),this.scene.add(t),this}remove(t){return t instanceof Array||(t=Array.prototype.slice.call(arguments)),this.scene.remove(t),this}clear(){return this.scene.remove(this.scene.children),this}makeLine(t,e,i,r){let a=new ua(t,e,i,r);return this.scene.add(a),a}makeArrow(t,e,i,r,a){let f=typeof a=="number"?a:10,l=Math.atan2(r-e,i-t),d=[new At(t,e,void 0,void 0,void 0,void 0,X.move),new At(i,r,void 0,void 0,void 0,void 0,X.line),new At(i-f*Math.cos(l-Math.PI/4),r-f*Math.sin(l-Math.PI/4),void 0,void 0,void 0,void 0,X.line),new At(i,r,void 0,void 0,void 0,void 0,X.move),new At(i-f*Math.cos(l+Math.PI/4),r-f*Math.sin(l+Math.PI/4),void 0,void 0,void 0,void 0,X.line)],m=new Pt(d,!1,!1,!0);return m.noFill(),m.cap="round",m.join="round",this.scene.add(m),m}makeRectangle(t,e,i,r){let a=new Fi(t,e,i,r);return this.scene.add(a),a}makeRoundedRectangle(t,e,i,r,a){let f=new Er(t,e,i,r,a);return this.scene.add(f),f}makeCircle(t,e,i,r){let a=new kr(t,e,i,r);return this.scene.add(a),a}makeEllipse(t,e,i,r,a){let f=new Tr(t,e,i,r,a);return this.scene.add(f),f}makeStar(t,e,i,r,a){let f=new _a(t,e,i,r,a);return this.scene.add(f),f}makeCurve(t){let e=arguments.length;if(!Array.isArray(t)){t=[];for(let f=0;f<e;f+=2){let l=arguments[f];if(typeof l!="number")break;let d=arguments[f+1];t.push(new At(l,d))}}let i=arguments[e-1],r=new Pt(t,!(typeof i=="boolean"&&i),!0),a=r.getBoundingClientRect();return r.center().translation.set(a.left+a.width/2,a.top+a.height/2),this.scene.add(r),r}makePolygon(t,e,i,r){let a=new ga(t,e,i,r);return this.scene.add(a),a}makeArcSegment(t,e,i,r,a,f,l){let d=new da(t,e,i,r,a,f,l);return this.scene.add(d),d}makePoints(t){let e=arguments.length,i=t;if(!Array.isArray(t)){i=[];for(let a=0;a<e;a+=2){let f=arguments[a];if(typeof f!="number")break;let l=arguments[a+1];i.push(new K(f,l))}}let r=new pa(i);return this.scene.add(r),r}makePath(t){let e=arguments.length,i=t;if(!Array.isArray(t)){i=[];for(let l=0;l<e;l+=2){let d=arguments[l];if(typeof d!="number")break;let m=arguments[l+1];i.push(new At(d,m))}}let r=arguments[e-1],a=new Pt(i,!(typeof r=="boolean"&&r)),f=a.getBoundingClientRect();return typeof f.top=="number"&&typeof f.left=="number"&&typeof f.right=="number"&&typeof f.bottom=="number"&&a.center().translation.set(f.left+f.width/2,f.top+f.height/2),this.scene.add(a),a}makeText(t,e,i,r){let a=new qe(t,e,i,r);return this.add(a),a}makeLinearGradient(t,e,i,r){let a=Array.prototype.slice.call(arguments,4),f=new $t(t,e,i,r,a);return this.add(f),f}makeRadialGradient(t,e,i){let r=Array.prototype.slice.call(arguments,3),a=new Xt(t,e,i,r);return this.add(a),a}makeSprite(t,e,i,r,a,f,l){let d=new wr(t,e,i,r,a,f);return l&&d.play(),this.add(d),d}makeImageSequence(t,e,i,r,a){let f=new Sr(t,e,i,r);return a&&f.play(),this.add(f),f}makeTexture(t,e){return new Dt(t,e)}makeGroup(t){t instanceof Array||(t=Array.prototype.slice.call(arguments));let e=new ee;return this.scene.add(e),e.add(t),e}interpret(t,e,i){let r=t.tagName.toLowerCase();if(i=typeof i<"u"?i:!0,!(r in Vt))return null;let a=Vt[r].call(this,t);return i?this.add(e&&a instanceof ee?a.children:a):a.parent&&a.remove(),a}load(t,e){let i=new ee,r,a,f,l=function(d){for(Ae.temp.innerHTML=d,a=0;a<Ae.temp.children.length;a++)r=Ae.temp.children[a],f=this.interpret(r,!1,!1),f!==null&&i.add(f);if(typeof e=="function"){let m=Ae.temp.children.length<=1?Ae.temp.children[0]:Ae.temp.children;e(i,m)}}.bind(this);return/\.svg$/i.test(t)?(lh(t,l),i):(l(t),i)}},U=kn;y(U,"nextFrameID",ne.nextFrameID);y(U,"Types",ne.Types);y(U,"Version",ne.Version);y(U,"PublishDate",ne.PublishDate);y(U,"Identifier",ne.Identifier);y(U,"Resolution",ne.Resolution);y(U,"AutoCalculateImportedMatrices",ne.AutoCalculateImportedMatrices);y(U,"Instances",ne.Instances);y(U,"uniqueId",ne.uniqueId);y(U,"Anchor",At);y(U,"Collection",vi);y(U,"Events",z);y(U,"Group",ee);y(U,"Matrix",Pi);y(U,"Path",Pt);y(U,"Registry",xr);y(U,"Shape",bi);y(U,"Text",qe);y(U,"Vector",K);y(U,"Gradient",ie);y(U,"ImageSequence",Sr);y(U,"LinearGradient",$t);y(U,"RadialGradient",Xt);y(U,"Sprite",wr);y(U,"Stop",xi);y(U,"Texture",Dt);y(U,"ArcSegment",da);y(U,"Circle",kr);y(U,"Ellipse",Tr);y(U,"Line",ua);y(U,"Points",pa);y(U,"Polygon",ga);y(U,"Rectangle",Fi);y(U,"RoundedRectangle",Er);y(U,"Star",_a);y(U,"CanvasRenderer",An);y(U,"SVGRenderer",hh);y(U,"WebGLRenderer",fh);y(U,"Commands",X);y(U,"Utils",nu);function ru(){let t=document.body.getBoundingClientRect(),e=this.width=t.width,i=this.height=t.height;this.renderer.setSize(e,i,this.ratio)}function su(){let t=this.renderer.domElement.parentElement;if(!t){console.warn("Two.js: Attempting to fit to parent, but no parent found.");return}let e=t.getBoundingClientRect(),i=this.width=e.width,r=this.height=e.height;this.renderer.setSize(i,r,this.ratio)}function au(t,e){this.width=t,this.height=e,this.trigger(z.Types.resize,t,e)}var Sn=Ae.getRequestAnimationFrame();function ch(){for(let t=0;t<U.Instances.length;t++){let e=U.Instances[t];e.playing&&e.update()}U.nextFrameID=Sn(ch)}Sn.init=function(){ch(),Sn.init=function(){}};var gt=Object.freeze({Linear:Object.freeze({None:function(t){return t},In:function(t){return this.None(t)},Out:function(t){return this.None(t)},InOut:function(t){return this.None(t)}}),Quadratic:Object.freeze({In:function(t){return t*t},Out:function(t){return t*(2-t)},InOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}}),Cubic:Object.freeze({In:function(t){return t*t*t},Out:function(t){return--t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}}),Quartic:Object.freeze({In:function(t){return t*t*t*t},Out:function(t){return 1- --t*t*t*t},InOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}}),Quintic:Object.freeze({In:function(t){return t*t*t*t*t},Out:function(t){return--t*t*t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}}),Sinusoidal:Object.freeze({In:function(t){return 1-Math.sin((1-t)*Math.PI/2)},Out:function(t){return Math.sin(t*Math.PI/2)},InOut:function(t){return .5*(1-Math.sin(Math.PI*(.5-t)))}}),Exponential:Object.freeze({In:function(t){return t===0?0:Math.pow(1024,t-1)},Out:function(t){return t===1?1:1-Math.pow(2,-10*t)},InOut:function(t){return t===0?0:t===1?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)}}),Circular:Object.freeze({In:function(t){return 1-Math.sqrt(1-t*t)},Out:function(t){return Math.sqrt(1- --t*t)},InOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}}),Elastic:Object.freeze({In:function(t){return t===0?0:t===1?1:-Math.pow(2,10*(t-1))*Math.sin((t-1.1)*5*Math.PI)},Out:function(t){return t===0?0:t===1?1:Math.pow(2,-10*t)*Math.sin((t-.1)*5*Math.PI)+1},InOut:function(t){return t===0?0:t===1?1:(t*=2,t<1?-.5*Math.pow(2,10*(t-1))*Math.sin((t-1.1)*5*Math.PI):.5*Math.pow(2,-10*(t-1))*Math.sin((t-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(t){var e=1.70158;return t===1?1:t*t*((e+1)*t-e)},Out:function(t){var e=1.70158;return t===0?0:--t*t*((e+1)*t+e)+1},InOut:function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)}}),Bounce:Object.freeze({In:function(t){return 1-gt.Bounce.Out(1-t)},Out:function(t){return t<.36363636363636365?7.5625*t*t:t<.7272727272727273?7.5625*(t-=.5454545454545454)*t+.75:t<.9090909090909091?7.5625*(t-=.8181818181818182)*t+.9375:7.5625*(t-=.9545454545454546)*t+.984375},InOut:function(t){return t<.5?gt.Bounce.In(t*2)*.5:gt.Bounce.Out(t*2-1)*.5+.5}}),generatePow:function(t){return t===void 0&&(t=4),t=t<Number.EPSILON?Number.EPSILON:t,t=t>1e4?1e4:t,{In:function(e){return Math.pow(e,t)},Out:function(e){return 1-Math.pow(1-e,t)},InOut:function(e){return e<.5?Math.pow(e*2,t)/2:(1-Math.pow(2-e*2,t))/2+.5}}}}),Cn=function(){return performance.now()},ou=function(){function t(){this._tweens={},this._tweensAddedDuringUpdate={}}return t.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map(function(i){return e._tweens[i]})},t.prototype.removeAll=function(){this._tweens={}},t.prototype.add=function(e){this._tweens[e.getId()]=e,this._tweensAddedDuringUpdate[e.getId()]=e},t.prototype.remove=function(e){delete this._tweens[e.getId()],delete this._tweensAddedDuringUpdate[e.getId()]},t.prototype.update=function(e,i){e===void 0&&(e=Cn()),i===void 0&&(i=!1);var r=Object.keys(this._tweens);if(r.length===0)return!1;for(;r.length>0;){this._tweensAddedDuringUpdate={};for(var a=0;a<r.length;a++){var f=this._tweens[r[a]],l=!i;f&&f.update(e,l)===!1&&!i&&delete this._tweens[r[a]]}r=Object.keys(this._tweensAddedDuringUpdate)}return!0},t}(),tn={Linear:function(t,e){var i=t.length-1,r=i*e,a=Math.floor(r),f=tn.Utils.Linear;return e<0?f(t[0],t[1],r):e>1?f(t[i],t[i-1],i-r):f(t[a],t[a+1>i?i:a+1],r-a)},Bezier:function(t,e){for(var i=0,r=t.length-1,a=Math.pow,f=tn.Utils.Bernstein,l=0;l<=r;l++)i+=a(1-e,r-l)*a(e,l)*t[l]*f(r,l);return i},CatmullRom:function(t,e){var i=t.length-1,r=i*e,a=Math.floor(r),f=tn.Utils.CatmullRom;return t[0]===t[i]?(e<0&&(a=Math.floor(r=i*(1+e))),f(t[(a-1+i)%i],t[a],t[(a+1)%i],t[(a+2)%i],r-a)):e<0?t[0]-(f(t[0],t[0],t[1],t[1],-r)-t[0]):e>1?t[i]-(f(t[i],t[i],t[i-1],t[i-1],r-i)-t[i]):f(t[a?a-1:0],t[a],t[i<a+1?i:a+1],t[i<a+2?i:a+2],r-a)},Utils:{Linear:function(t,e,i){return(e-t)*i+t},Bernstein:function(t,e){var i=tn.Utils.Factorial;return i(t)/i(e)/i(t-e)},Factorial:function(){var t=[1];return function(e){var i=1;if(t[e])return t[e];for(var r=e;r>1;r--)i*=r;return t[e]=i,i}}(),CatmullRom:function(t,e,i,r,a){var f=(i-t)*.5,l=(r-e)*.5,d=a*a,m=a*d;return(2*e-2*i+f+l)*m+(-3*e+3*i-2*f-l)*d+f*a+e}}},uh=function(){function t(){}return t.nextId=function(){return t._nextId++},t._nextId=0,t}(),ma=new ou,dt=function(){function t(e,i){i===void 0&&(i=ma),this._object=e,this._group=i,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=gt.Linear.None,this._interpolationFunction=tn.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=uh.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1}return t.prototype.getId=function(){return this._id},t.prototype.isPlaying=function(){return this._isPlaying},t.prototype.isPaused=function(){return this._isPaused},t.prototype.to=function(e,i){if(i===void 0&&(i=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=e,this._propertiesAreSetUp=!1,this._duration=i,this},t.prototype.duration=function(e){return e===void 0&&(e=1e3),this._duration=e,this},t.prototype.dynamic=function(e){return e===void 0&&(e=!1),this._isDynamic=e,this},t.prototype.start=function(e,i){if(e===void 0&&(e=Cn()),i===void 0&&(i=!1),this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var r in this._valuesStartRepeat)this._swapEndStartRepeatValues(r),this._valuesStart[r]=this._valuesStartRepeat[r]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=e,this._startTime+=this._delayTime,!this._propertiesAreSetUp||i){if(this._propertiesAreSetUp=!0,!this._isDynamic){var a={};for(var f in this._valuesEnd)a[f]=this._valuesEnd[f];this._valuesEnd=a}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,i)}return this},t.prototype.startFromCurrentValues=function(e){return this.start(e,!0)},t.prototype._setupProperties=function(e,i,r,a,f){for(var l in r){var d=e[l],m=Array.isArray(d),g=m?"array":typeof d,x=!m&&Array.isArray(r[l]);if(!(g==="undefined"||g==="function")){if(x){var T=r[l];if(T.length===0)continue;for(var S=[d],v=0,E=T.length;v<E;v+=1){var L=this._handleRelativeValue(d,T[v]);if(isNaN(L)){x=!1,console.warn("Found invalid interpolation list. Skipping.");break}S.push(L)}x&&(r[l]=S)}if((g==="object"||m)&&d&&!x){i[l]=m?[]:{};var R=d;for(var M in R)i[l][M]=R[M];a[l]=m?[]:{};var T=r[l];if(!this._isDynamic){var F={};for(var M in T)F[M]=T[M];r[l]=T=F}this._setupProperties(R,i[l],T,a[l],f)}else(typeof i[l]>"u"||f)&&(i[l]=d),m||(i[l]*=1),x?a[l]=r[l].slice().reverse():a[l]=i[l]||0}}},t.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},t.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},t.prototype.pause=function(e){return e===void 0&&(e=Cn()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=e,this._group&&this._group.remove(this),this)},t.prototype.resume=function(e){return e===void 0&&(e=Cn()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this)},t.prototype.stopChainedTweens=function(){for(var e=0,i=this._chainedTweens.length;e<i;e++)this._chainedTweens[e].stop();return this},t.prototype.group=function(e){return e===void 0&&(e=ma),this._group=e,this},t.prototype.delay=function(e){return e===void 0&&(e=0),this._delayTime=e,this},t.prototype.repeat=function(e){return e===void 0&&(e=0),this._initialRepeat=e,this._repeat=e,this},t.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},t.prototype.yoyo=function(e){return e===void 0&&(e=!1),this._yoyo=e,this},t.prototype.easing=function(e){return e===void 0&&(e=gt.Linear.None),this._easingFunction=e,this},t.prototype.interpolation=function(e){return e===void 0&&(e=tn.Linear),this._interpolationFunction=e,this},t.prototype.chain=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return this._chainedTweens=e,this},t.prototype.onStart=function(e){return this._onStartCallback=e,this},t.prototype.onEveryStart=function(e){return this._onEveryStartCallback=e,this},t.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},t.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},t.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},t.prototype.onStop=function(e){return this._onStopCallback=e,this},t.prototype.update=function(e,i){if(e===void 0&&(e=Cn()),i===void 0&&(i=!0),this._isPaused)return!0;var r,a,f=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(e>f)return!1;i&&this.start(e,!0)}if(this._goToEnd=!1,e<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),a=(e-this._startTime)/this._duration,a=this._duration===0||a>1?1:a;var l=this._easingFunction(a);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,l),this._onUpdateCallback&&this._onUpdateCallback(this._object,a),a===1)if(this._repeat>0){isFinite(this._repeat)&&this._repeat--;for(r in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[r]=="string"&&(this._valuesStartRepeat[r]=this._valuesStartRepeat[r]+parseFloat(this._valuesEnd[r])),this._yoyo&&this._swapEndStartRepeatValues(r),this._valuesStart[r]=this._valuesStartRepeat[r];return this._yoyo&&(this._reversed=!this._reversed),this._repeatDelayTime!==void 0?this._startTime=e+this._repeatDelayTime:this._startTime=e+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var d=0,m=this._chainedTweens.length;d<m;d++)this._chainedTweens[d].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},t.prototype._updateProperties=function(e,i,r,a){for(var f in r)if(i[f]!==void 0){var l=i[f]||0,d=r[f],m=Array.isArray(e[f]),g=Array.isArray(d),x=!m&&g;x?e[f]=this._interpolationFunction(d,a):typeof d=="object"&&d?this._updateProperties(e[f],l,d,a):(d=this._handleRelativeValue(l,d),typeof d=="number"&&(e[f]=l+(d-l)*a))}},t.prototype._handleRelativeValue=function(e,i){return typeof i!="string"?i:i.charAt(0)==="+"||i.charAt(0)==="-"?e+parseFloat(i):parseFloat(i)},t.prototype._swapEndStartRepeatValues=function(e){var i=this._valuesStartRepeat[e],r=this._valuesEnd[e];typeof r=="string"?this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(r):this._valuesStartRepeat[e]=this._valuesEnd[e],this._valuesEnd[e]=i},t}();var lp=uh.nextId,ii=ma,hp=ii.getAll.bind(ii),fp=ii.removeAll.bind(ii),cp=ii.add.bind(ii),up=ii.remove.bind(ii),dh=ii.update.bind(ii);var V=new U({type:U.Types.canvas,fullscreen:!0,ratio:1});V.renderer.domElement.style.position="absolute";V.renderer.domElement.id="stage";var Ct=Math.PI*2,ft=1e3,Ar=.125,ya=new U.Vector,pp=document.querySelector("#container"),lu=url.boolean("local")||window.location.href.match(/localhost/i),Cr=lu?"assets/":"//storage.googleapis.com/cdn.patatap.com/";var Rn=["background","middleground","foreground","highlight","accent","white","black"],On=[{background:{r:181,g:181,b:181},middleground:{r:141,g:164,b:170},foreground:{r:227,g:79,b:12},highlight:{r:163,g:141,b:116},accent:{r:255,g:197,b:215},white:{r:255,g:255,b:255},black:{r:0,g:0,b:0},isDark:!1},{background:{r:255,g:230,b:255},middleground:{r:151,g:41,b:164},foreground:{r:1,g:120,b:186},highlight:{r:255,g:255,b:0},accent:{r:255,g:51,b:148},white:{r:255,g:255,b:255},black:{r:255,g:255,b:255},isDark:!1},{background:{r:217,g:82,b:31},middleground:{r:143,g:74,b:45},foreground:{r:255,g:108,b:87},highlight:{r:255,g:126,b:138},accent:{r:227,g:190,b:141},white:{r:255,g:255,b:255},black:{r:0,g:0,b:0},isDark:!1},{background:{r:57,g:109,b:193},middleground:{r:186,g:60,b:223},foreground:{r:213,g:255,b:93},highlight:{r:213,g:160,b:255},accent:{r:36,g:221,b:165},white:{r:215,g:236,b:255},black:{r:0,g:0,b:0},isDark:!0},{background:{r:255,g:244,b:211},middleground:{r:207,g:145,b:79},foreground:{r:38,g:83,b:122},highlight:{r:178,g:87,b:53},accent:{r:235,g:192,b:92},white:{r:226,g:82,b:87},black:{r:0,g:0,b:0},isDark:!1},{background:{r:39,g:6,b:54},middleground:{r:69,g:26,b:87},foreground:{r:252,g:25,b:246},highlight:{r:52,g:255,b:253},accent:{r:133,g:102,b:193},white:{r:253,g:228,b:252},black:{r:255,g:255,b:255},isDark:!0}],Ni=url.int("palette",0),Mn=!1,va,xa,wa,Pn={},Mr={};Rn.forEach(t=>{Pn[t]={r:0,g:0,b:0},Mr[t]={r:0,g:0,b:0}});ph(On[Ni]);function hu(){return Rn[Math.floor(Math.random()*Rn.length)]}function fu(){return On[Ni]}function ph(t){amount=0;for(let e in Pn){let i=Pn[e],r=t[e];i.r=r.r,i.g=r.g,i.b=r.b,amount++,Mr[e]=mh(i)}return amount}function gh(t){let e=0;for(let i in Pn){let r=Pn[i],a=t[i];_h(r,a)&&e++,r.r=ba(r.r,a.r,Ar),r.g=ba(r.g,a.g,Ar),r.b=ba(r.b,a.b,Ar),Mr[i]=mh(r)}return e}function ba(t,e,i){let r=e-t;return Math.abs(r)<=1e-4?e:t+r*i}function _h(t,e,i){let r=i||.25;return Math.abs(t.r-e.r)<r&&Math.abs(t.g-e.g)<r&&Math.abs(t.b-e.b)<r}function mh({r:t,g:e,b:i}){return`rgb(${Math.round(t)},${Math.round(e)},${Math.round(i)})`}function cu(t){va=t}function uu(t){xa=t}function du(t){wa=t}function pu(){if(!Mn)return;let t=gh(On[Ni]);xa&&xa(),t>=Rn.length&&Mn&&(Mn=!1,wa&&wa(Ni))}var Q={keys:Rn,list:On,colors:Mr,get current(){return Ni},set current(t){Ni=t%On.length,Mn=!0,va&&va(Ni)},get changing(){return Mn},equals:_h,getRandomKey:hu,get:fu,onStart:cu,onUpdate:uu,onComplete:du,set:ph,tween:gh,update:pu};var xh=Jo(Gs());var yh=t=>t,ka;try{ka=!!AudioContext}catch{ka=!1}function gu({context:t,uri:e,callback:i}){return new Promise((r,a)=>{let f=new XMLHttpRequest;f.open("GET",e,!0),f.responseType="arraybuffer",f.onerror=a,f.onload=()=>{r({context:t,data:f.response,callback:i})},f.send()})}function bh({context:t,data:e,callback:i}){return new Promise((r,a)=>{let f=l=>{r(l,e),i&&i(l,e)};t.decodeAudioData(e,f,a)})}var en,Ii,Li,nn,Oe,Rr,vh,Fn=class{constructor(e,i,r){Ri(this,Rr);Ri(this,en,!1);Ri(this,Ii,1);Ri(this,Li,1);Ri(this,nn,0);Ri(this,Oe,0);ui(this,"playing",!1);ui(this,"filter",null);ui(this,"buffer",null);ui(this,"data",null);ui(this,"gain",null);ui(this,"src",null);ui(this,"ctx",null);let a=this;switch(this.ctx=e,typeof i){case"string":this.src=i,gu({context:e,uri:i,callback:f}).then(bh);break;case"object":bh({context:e,data:i,callback:f});break}function f(l,d){a.buffer=l,a.data=d,a.gain=a.filter=e.createGain(),a.gain.connect(e.destination),a.gain.gain.value=Math.max(Math.min(_e(a,Ii),1),0),r&&r(this)}}applyFilter(e){return this.filter&&this.filter!==this.gain&&this.filter.disconnect(this.gain),this.filter=e,this.filter.connect(this.gain),this}play(e){if(!this.buffer)return this;let i=tr(e||{},{time:this.ctx.currentTime,loop:this._loop,offset:this._offset,duration:this.buffer.duration-this._offset});return this.ctx&&/suspended/i.test(this.ctx.state)&&this.ctx.resume(),this.source&&this.stop(),Je(this,nn,i.time),Je(this,en,i.loop),this.playing=!0,this.source=this.ctx.createBufferSource(),this.source.onended=Zo(this,Rr,vh),this.source.buffer=this.buffer,this.source.loop=i.loop,this.source.playbackRate.value=_e(this,Li),this.source.connect(this.filter),this.source.start?this.source.start(i.time,i.offset):this.source.noteOn&&this.source.noteOn(i.time,i.offset),this}pause(e){if(!this.source||!this.playing)return this;let i=tr(e||{},{time:this.ctx.currentTime});this.source.onended=yh,this.source.stop?this.source.stop(i.time):this.source.noteOff&&this.source.noteOff(i.time),this.playing=!1;let r=this.ctx.currentTime;return i.time!="undefined"&&(r=i.time),Je(this,Oe,r-_e(this,nn)+(_e(this,Oe)||0)),_e(this,en)?Je(this,Oe,Math.max(_e(this,Oe),0)%this.buffer.duration):Je(this,Oe,Math.min(Math.max(_e(this,Oe),0),this.buffer.duration)),this}stop(e){if(!this.source||!this.playing)return this;let i=tr(e||{},{time:this.ctx.currentTime});return this.source.onended=yh,this.source.stop?this.source.stop(i.time):this.source.noteOff&&this.source.noteOff(i.time),this.playing=!1,Je(this,Oe,0),this}get volume(){return _e(this,Ii)}set volume(e){Je(this,Ii,e),this.gain&&(this.gain.gain.value=Math.max(Math.min(_e(this,Ii),1),0))}get speed(){return _e(this,Li)}set speed(e){Je(this,Li,e),this.playing&&this.play()}get currentTime(){return this.playing?(this.ctx.currentTime-_e(this,nn)+_e(this,Oe))*_e(this,Li):_e(this,Oe)}set currentTime(e){let i;!this.buffer||(_e(this,en)?i=Math.max(e,0)%this.buffer.duration:i=Math.min(Math.max(e,0),this.buffer.duration),Je(this,Oe,i),this.playing&&this.play())}get millis(){return Math.floor(this.currentTime*1e3)}get duration(){return this.buffer?this.buffer.duration:0}};en=new WeakMap,Ii=new WeakMap,Li=new WeakMap,nn=new WeakMap,Oe=new WeakMap,Rr=new WeakSet,vh=function(){this.playing=!1},ui(Fn,"has",ka);var Ta,Ea={},Nn=[],_u=["start","update","clear","resize","playing","hash","name"],H=new U.Vector(V.width/2,V.height/2),wh=V.renderer.domElement,kh=Math.min(V.width,V.height);wh.style.background=Q.colors.background;V.bind("resize",()=>{H.x=V.width/2,H.y=V.height/2,kh=Math.min(V.width,V.height),Nn.forEach(t=>t.resize())});Q.onStart(Th);Q.onUpdate(()=>{Nn.forEach(({update:t})=>t()),wh.style.background=Q.colors.background});function kt(t,e){let i=e.name||t;if(t in Ea){let r=`Animation ${i} already exists.`;throw new Error(r)}_u.forEach(r=>{if(!(r in e)){let a=`Animation ${i}, does not have "${r}"`;throw new Error(a)}}),Ea[t]=e,Nn.push(e)}function Th(){let t=Q.current,e=["A","B","C","D","E","F"],i=".mp3",r=Nn.filter(({sounds:x})=>Array.isArray(x)),a=e[t],f=(0,xh.default)("#lobby"),l=f.find("#loaded").html(0),d=f.find("#total-assets"),m=el(()=>{l.index=0,l.html(l.index),d.html(r.length),f.fadeIn()});return new Promise(x=>{let T=()=>{g(),S()},S=il(r.length,()=>{x(),f.fadeOut()});r.forEach(v=>{Ta||(Ta=new AudioContext);let E=v.sounds[t];if(!E){m();let L=`${Cr}${a}/${v.name}${i}`;E=new Fn(Ta,L,T),v.sounds.push(E)}v.sound=E})});function g(){l.index++,l.html(l.index)}}var Bt={updateAudio:Th,map:Ea,get min_dimension(){return kh},list:Nn};var mu="change-colors",Eh="3,",Sh=!1;function yu(){Q.current=Q.current+1,Sh=!0}function bu(){}function vu(){}function xu(){}var Ah={start:yu,update:bu,clear:xu,resize:vu,get playing(){return Sh},hash:Eh,name:mu};St(8).forEach(t=>{kt(`${Eh}${t}`,Ah)});kt("2,7",Ah);var Aa=!1,Pr,Or,In=[new U.Anchor(-H.x,-H.y),new U.Anchor(H.x,-H.y),new U.Anchor(H.x,H.y),new U.Anchor(-H.x,H.y)],ni=V.makePath(In);ni.closed=!0;ni.fill=Q.colors.middleground;ni.noStroke();var Ch={x:H.x},Sa={x:V.width*1.5};Ca();function wu(t){Aa=!0,ni.visible=!0,Pr.start(),!t&&Fr.sound&&Fr.sound.stop().play()}function ku(){ni.fill=Q.colors.middleground}function Tu(){In[0].set(-H.x,-H.y),In[1].set(H.x,-H.y),In[2].set(H.x,H.y),In[3].set(-H.x,H.y)}function Ca(){Pr&&Pr.stop(),Or&&Or.stop(),ni.visible=!1,Aa=!1,Math.random()>.5?(ni.translation.set(-H.x,H.y),Sa.x=V.width*1.5):(ni.translation.set(V.width*1.5,H.y),Sa.x=-H.x),Ch.x=H.x,Pr=new dt(ni.translation).to(Ch,ft*.5).easing(gt.Exponential.Out).onComplete(()=>Or.start()),Or=new dt(ni.translation).to(Sa,ft*.5).easing(gt.Exponential.In).onComplete(Ca)}var Fr={start:wu,update:ku,resize:Tu,clear:Ca,get playing(){return Aa},hash:"2,1",name:"wipe",sounds:[]};kt(Fr.hash,Fr);var Ra=!1,Ir,Nr,Ln=[new U.Anchor(-H.x,-H.y),new U.Anchor(H.x,-H.y),new U.Anchor(H.x,H.y),new U.Anchor(-H.x,H.y)],ri=V.makePath(Ln);ri.closed=!0;ri.fill=Q.colors.highlight;ri.noStroke();var Mh={y:H.y},Ma={y:0};Rh();function Eu(t){Ra=!0,ri.visible=!0,Ir.start(),!t&&Lr.sound&&Lr.sound.stop().play()}function Su(){ri.fill=Q.colors.highlight}function Au(){Ln[0].set(-H.x,-H.y),Ln[1].set(H.x,-H.y),Ln[2].set(H.x,H.y),Ln[3].set(-H.x,H.y)}function Rh(){Ir&&Ir.stop(),Nr&&Nr.stop(),ri.visible=!1,Ra=!1,Math.random()>.5?(ri.translation.set(H.x,-H.y),Ma.y=V.height*1.5):(ri.translation.set(H.x,V.height*1.5),Ma.y=-H.y),Mh.y=H.y,Ir=new dt(ri.translation).to(Mh,ft*.5).easing(gt.Exponential.Out).onComplete(()=>Nr.start()),Nr=new dt(ri.translation).to(Ma,ft*.5).easing(gt.Exponential.In)}var Lr={start:Eu,update:Su,resize:Au,clear:Rh,get playing(){return Ra},hash:"1,1",name:"veil",sounds:[]};kt(Lr.hash,Lr);var Vp=St(3).map(t=>{let e=Math.floor(t*1.5)+3,i=10,r,a=100,f=2,l=!1,d=[],m=St(e).map(M=>{let F=M/e,B=Ct*F,q=a*Math.cos(B),W=a*Math.sin(B),h=V.makeCircle(q,W,f);return h.fill=Q.colors.black,h.noStroke(),d.push(h),new U.Anchor(q,W)}),g=V.makePath(m);g.closed=!0,g.stroke=Q.colors.black,g.noFill(),g.linewidth=.5;let x=V.makeGroup(g).add(d);x.translation.copy(H);let T={ending:0};L();function S(M){l=!0,x.visible=!0,r.start(),!M&&R.sound&&R.sound.stop().play()}function v(){g.stroke=Q.colors.black;for(let M=0;M<d.length;M++){let F=d[M];F.fill=Q.colors.black}}function E(){x.translation.copy(H)}function L(){r&&r.stop(),x.visible=!1,x.rotation=Math.floor(Math.random()*4)*Ct/4,T.ending=x.scale=0,l=!1,r=new dt(x).to({scale:i},ft*.75).easing(gt.Circular.In).onComplete(L)}let R={start:S,update:v,clear:L,resize:E,get playing(){return l},hash:`${t},6`,name:`prism-${t+1}`,sounds:[]};return kt(R.hash,R),R});var Dr,Pa=!1,Br=Math.floor(Math.random())*8+8,Oa=new U.Vector,jr=V.height,Fa=[],Na=St(Br).map(t=>(Fa.push(new U.Vector),new U.Anchor)),ji=V.makeCurve(Na);ji.fill=Q.colors.middleground;ji.closed=!0;ji.noStroke();var Oh={ending:0},Cu={ending:1};Ia();function Mu(t){ji.visible=!0,Pa=!0,Dr.start(),!t&&zr.sound&&zr.sound.stop().play()}function Ru(){ji.fill=Q.colors.middleground}function Ou(){}function Ia(){Dr&&Dr.stop();let t=Math.floor(Math.random()*8),e,i;switch(ji.visible=!1,Oa.set(Math.random()*V.width,Math.random()*V.height),t){case 7:e=H.x,i=0;break;case 6:e=0,i=0;break;case 5:e=0,i=H.y;break;case 4:e=0,i=V.height;break;case 3:e=H.x,i=V.height;break;case 2:e=V.width,i=V.height;break;case 1:e=V.width,i=H.y;break;default:e=V.width,i=0}ji.position.set(e,i),Oh.ending=0,jr=V.height;for(let r=0;r<Br;r++){let a=Na[r],l=r/Br*Ct;a.set(jr*Math.cos(l),jr*Math.sin(l));let d=U.Vector.angleBetween(a,Oa)-l,m=a.distanceTo(Oa),g=10*jr/Math.sqrt(m),x=g*Math.cos(d)+a.x,T=g*Math.sin(d)+a.y;Fa[r].set(x,T)}Pa=!1,Dr=new dt(Oh).to(Cu,ft*.75).easing(gt.Circular.In).onUpdate(Pu).onComplete(Ia)}function Pu({ending:t}){for(let e=0;e<Br;e++){let i=Na[e],r=Fa[e];i.lerp(r,t)}}var zr={start:Mu,update:Ru,clear:Ia,resize:Ou,get playing(){return Pa},hash:"0,1",name:"clay",sounds:[]};kt(zr.hash,zr);var rg=St(3).map(t=>{let e=!1,i,r,a=t*4+1,f=V.width*.75,l=H.y,d,m,g=V.makeGroup();g.translation.copy(H);let x=St(a).map(G=>{let J=l/a-l/(a*3),Z=0,tt=-l/2+(G+1)*(l/(a+1)),ut=E(Z,tt,f,J);return ut.fill=Q.colors.white,ut.noStroke(),g.add(ut),ut}),T={ending:0,beginning:0},S={ending:1},v={beginning:1};B();function E(G,J,Z,tt){let ut=[new U.Anchor(-Z/2,-tt/2),new U.Anchor(Z/2,-tt/2),new U.Anchor(Z/2,tt/2),new U.Anchor(-Z/2,tt/2)],nt=new U.Path(ut,!0);return nt.position.set(G,J),nt}function L(G){G.visible=!0}function R(G){e=!0,x.forEach(L),i.start(),!G&&h.sound&&h.sound.stop().play()}function M(){g.fill=Q.colors.white}function F(){g.translation.copy(H)}function B(){let G=V.width*.75;i&&i.stop(),r&&r.stop(),T.beginning=T.ending=0,Math.random()>.5?(d=-G/2,m=G/2):(d=G/2,m=-G/2);for(let Z=0;Z<a;Z++){let tt=x[Z];tt.visible=!1;for(let ut=0;ut<tt.vertices.length;ut++){let nt=tt.vertices[ut];nt.x=d}}i=new dt(T).to(S,ft*.125).easing(gt.Sinusoidal.Out).onUpdate(q).onComplete(()=>r.start()),r=new dt(T).to(v,ft*.125).easing(gt.Sinusoidal.Out).onUpdate(W).onComplete(B),e=!1}function q(){for(let G=0;G<a;G++){let Z=x[G].vertices;Z[0].x=Z[3].x=m*T.ending}}function W(){for(let G=0;G<a;G++){let Z=x[G].vertices;Z[1].x=Z[2].x=m*T.beginning}}let h={start:R,update:M,clear:B,resize:F,get playing(){return e},hash:`${t},3`,name:`piston-${t+1}`,sounds:[]};return kt(h.hash,h),h});var fg=St(3).map(t=>{let e=!1,i,r=V.makeRectangle(H.x,H.y,V.width,V.height);r.noStroke(),r.visible=!1,f(),d();function a(x){typeof i<"u"&&clearTimeout(i),e=!0,!x&&g.sound&&g.sound.stop().play(),V.bind("update",m),setTimeout(d,ft*.25)}function f(){let x=Q.keys.length-1-t%Q.keys.length,T=Q.keys[x];r.fill=Q.colors[T]}function l(){r.width=V.width,r.height=V.height,r.translation.copy(H)}function d(){e=!1,r.visible=!1,V.unbind("update",m)}function m(){e&&(r.visible=Math.random()>.5)}let g={start:a,update:f,clear:d,resize:l,get playing(){return e},hash:`${t},0`,name:`flash-${t+1}`,sounds:[]};kt(g.hash,g)});var La=!1,jn=120,Ph=4,qr,Fh,Wr,wi=V.makeGroup(),Hr=St(jn).map(()=>{let t=new U.Line;return t.noFill(),t.cap=t.join="round",wi.add(t),t});Nh();ja();function Fu(t){wi.visible=!0,La=!0,Wr.start(),!t&&Ur.sound&&Ur.sound.stop().play()}function Nu(){wi.stroke=Q.colors.black}function Nh(){wi.translation.copy(H),qr=Bt.min_dimension/2,Fh=qr/jn,Hr.forEach(Lu),Hr.reverse()}function ja(){wi.visible=!1,wi.rotation=Math.PI-Math.random()*Ct,wi.scale=1,Wr&&Wr.stop(),Wr=new dt(wi).easing(gt.Circular.In).to({rotation:Math.PI/8,scale:8},ft*2).onUpdate(Iu).onComplete(ja),La=!1}function Iu(t,e){let i=Oi(ve(e,0,.25,0,1),0,1),r=Math.floor(i*jn);for(let a=0;a<Hr.length;a++)Hr[a].visible=a<=r}function Lu(t,e){let i=e/jn,r=qr*i,a=i*Math.PI*Ph,f=r*Math.cos(a),l=r*Math.sin(a);i=(e+.25)/jn,r=qr*i,a=i*Math.PI*Ph;let d=r*Math.cos(a),m=r*Math.sin(a);t.vertices[0].set(f,l),t.vertices[1].set(d,m),t.linewidth=(1-Math.sqrt(1-i))*Fh}var Ur={start:Fu,update:Nu,clear:ja,resize:Nh,get playing(){return La},hash:"0,9",name:"dotted-spiral",sounds:[]};kt(Ur.hash,Ur);var Da=!1,ju=Bt.min_dimension*12/900,Du=Bt.min_dimension*20/900,Vr,Ba=[],Dn=St(16).map(()=>{let t=Math.round(ve(Math.random(),0,1,ju,Du)),e=new U.Circle(0,0,t);return e.fill=Q.colors.white,e.noStroke(),Ba.push(new U.Vector),e}),rn=V.makeGroup(Dn);rn.visible=!1;rn.translation.copy(H);var Ih={ending:0},Bu={ending:1};Lh();za();function zu(t){Da=!0,rn.visible=!0,Vr.start(),!t&&$r.sound&&$r.sound.stop().play()}function Wu(){rn.fill=Q.colors.white}function Lh(){rn.translation.copy(H)}function za(){Vr&&Vr.stop();let t=V.height,e=Math.random()*Ct,i=ve(Math.random(),0,1,Math.PI/4,Math.PI/2);Ih.ending=0;for(let r=0;r<Dn.length;r++){let a=Dn[r],f=e+(2*Math.random()-1)*i,l=Math.random()*t,d=l*Math.cos(f),m=l*Math.sin(f);Ba[r].set(d,m),a.translation.clear()}Vr=new dt(Ih).to(Bu,ft*.5).easing(gt.Sinusoidal.Out).onUpdate(qu).onComplete(za),Da=!1,rn.visible=!1}function qu({ending:t}){for(let e=0;e<Dn.length;e++){let i=Dn[e],r=Ba[e];i.translation.lerp(r,t)}}var $r={start:zu,update:Wu,clear:za,resize:Lh,get playing(){return Da},hash:"0,5",name:"suspension",sounds:[]};kt($r.hash,$r);var qa=!1,Xr,Ha=[],Di=St(32).map(t=>{let e=new U.Circle,i=Math.floor(Math.random()*Q.keys.length);return e.property=Q.keys[i],e.fill=Q.colors[e.property],e.noStroke(),Ha.push(new U.Vector),e}),jh={ending:0},Hu={ending:1},Wa=V.makeGroup(Di);Ua();function Uu(t){qa=!0,Wa.visible=!0,Xr.start(),!t&&Yr.sound&&Yr.sound.stop().play()}function Vu(){}function $u(){for(let t=0;t<Di.length;t++){let e=Di[t];e.fill=Q.colors[e.property]}}function Ua(){let t,e,i=Math.floor(Math.random()*4);switch(Xr&&Xr.stop(),i){case 3:t=-V.width/8,e=H.y;break;case 2:t=V.width*1.125,e=H.y;break;case 1:t=H.x,e=-V.height/8;break;default:t=H.x,e=V.height*1.125}Wa.position.set(t,e);let r=Math.atan2(H.y-e,H.x-t),a=Math.PI/2,f=V.width,l=Bt.min_dimension*12/900,d=Bt.min_dimension*20/900;for(let m=0;m<Di.length;m++){let g=Di[m],x=r+(2*Math.random()-1)*a,T=Math.random()*f,S=T*Math.cos(x),v=T*Math.sin(x);Ha[m].set(S,v),g.position.clear(),g.radius=Math.round(ve(Math.random(),0,1,l,d))}jh.ending=0,Xr=new dt(jh).to(Hu,ft*.5).easing(gt.Sinusoidal.Out).onUpdate(Xu).onComplete(Ua),Wa.visible=!1,qa=!1}function Xu({ending:t}){for(let e=0;e<Di.length;e++){let i=Di[e],r=Ha[e];i.position.lerp(r,t)}}var Yr={start:Uu,update:$u,clear:Ua,resize:Vu,get playing(){return qa},hash:"2,5",name:"confetti",sounds:[]};kt(Yr.hash,Yr);var Va=!1,Kr,Gr,ue=V.makeCircle();ue.stroke=Q.colors.highlight;ue.closed=!1;ue.scale=new U.Vector(1,1);ue.cap="butt";ue.noFill();var Dh={in:{ending:1},out:{beginning:1}};$a();Bh();function Yu(t){Va=!0,ue.visible=!0,Kr.start(),!t&&Qr.sound&&Qr.sound.stop().play()}function Bh(){ue.radius=Bt.min_dimension/3,ue.linewidth=Bt.min_dimension/10,ue.translation.copy(H)}function Gu(){ue.stroke=Q.colors.highlight}function $a(){Kr&&Kr.stop(),Gr&&Gr.stop(),ue.visible=!1,ue.rotation=Ct*Math.random(),ue.beginning=ue.ending=0,Math.random()>.5&&(ue.scale.x*=-1),Kr=new dt(ue).to(Dh.in,ft/3).easing(gt.Sinusoidal.Out).onComplete(()=>Gr.start()),Gr=new dt(ue).to(Dh.out,ft/3).easing(gt.Sinusoidal.In).onComplete($a),Va=!1}var Qr={start:Yu,update:Gu,clear:$a,resize:Bh,get playing(){return Va},hash:"0,4",name:"timer",sounds:[]};kt(Qr.hash,Qr);var Xa=!1,Zr,Jr,si=V.makeCircle(0,0,Bt.min_dimension*.25);si.noStroke().fill=Q.colors.accent;zh();Ya();function Ku(t){Xa=!0,Zr.start(),si.visible=!0,!t&&ts.sound&&ts.sound.stop().play()}function zh(){si.radius=Bt.min_dimension*.25}function Qu(){si.fill=Q.colors.accent}function Ya(){Zr&&Zr.stop(),Jr&&Jr.stop();let t=Math.random()>.5,e=Math.random()>.5;si.translation.x=V.width*(t?.75:.25),si.translation.y=V.height*(e?-.5:1.5),si.scale=1,Zr=new dt(si.translation).to({y:H.y},ft/2).easing(gt.Circular.Out).onComplete(()=>Jr.start()),Jr=new dt(si).to({scale:0},ft/2).easing(gt.Circular.Out).onComplete(Ya),si.visible=!1,Xa=!1}var ts={resize:zh,update:Qu,clear:Ya,start:Ku,get playing(){return Xa},hash:"1,2",name:"ufo",sounds:[]};kt(ts.hash,ts);var Wh=25,Ga=!1,es,is,Ka=Hh(),rs=Hh(),Pe=V.makeGroup(Ka,rs),Bi={in:0,out:0};rs.rotation=Math.PI;qh();Qa();function Ju(t){Ga=!0,es.start(),Pe.visible=!0,!t&&ns.sound&&ns.sound.stop().play()}function qh(){Pe.scale=Bt.min_dimension*.33,Pe.linewidth=1/Pe.scale,Pe.translation.copy(H)}function Zu(){Pe.fill=Pe.stroke=Q.colors.foreground}function Qa(){es&&es.stop(),is&&is.stop(),Bi.in=0,Bi.out=0,Pe.visible=!1,Pe.opacity=1,Pe.rotation=Math.random()*Ct,Ka.translation.clear(),rs.translation.clear(),es=new dt(Bi).to({in:1},ft*.5).easing(gt.Circular.In).onUpdate(()=>Pe.visible=Math.random()<Bi.in).onComplete(td),is=new dt(Bi).to({out:1},ft*.5).easing(gt.Circular.Out).delay(ft*.35).onUpdate(ed).onComplete(Qa),Ga=!1}function td(){Pe.visible=!0,is.start()}function ed(){let t=Math.pow(Bi.out,.5)*.5;Ka.translation.y=t,rs.translation.y=-t,Pe.opacity=1-Bi.out}function Hh(){let t=St(Wh).map(i=>{let a=i/(Wh-1)*Math.PI,f=Math.cos(a),l=Math.sin(a);return new U.Anchor(f,l)}),e=new U.Path(t);return e.fill=e.stroke=Q.colors.foreground,e.closed=!0,e}var ns={resize:qh,update:Zu,clear:Qa,start:Ju,get playing(){return Ga},hash:"2,2",name:"splits",sounds:[]};kt(ns.hash,ns);var to=!1,ss,as,os=64,Ja=os/2,Bn=[],Za=St(os).map(()=>(Bn.push(new U.Vector),new U.Anchor)),ki=V.makePath(Za),sn={in:0,out:0};ki.fill=Q.colors.foreground;ki.noStroke();Uh();eo();function id(t){to=!0,ki.visible=!0,ss.start(),!t&&ls.sound&&ls.sound.stop().play()}function nd(){ki.fill=Q.colors.foreground}function Uh(){ki.translation.copy(H)}function eo(){ss&&ss.stop(),as&&as.stop(),sn.in=0,sn.out=0,ki.visible=!1,ki.rotation=Math.random()*Ct;let t=Bt.min_dimension*.33;ki.vertices.map((e,i)=>{let a=i/(os-1)*Ct,f=t*Math.cos(a),l=t*Math.sin(a);Bn[i].set(f,l),i<Ja&&(Bn[i].y*=-1),e.set(f,Math.abs(l))}),ss=new dt(sn).to({in:1},ft*.5).easing(gt.Sinusoidal.Out).onUpdate(()=>{for(let e=Ja;e<os;e++)Za[e].lerp(Bn[e],sn.in)}).onComplete(rd),as=new dt(sn).to({out:1},ft*.5).easing(gt.Sinusoidal.Out).onUpdate(()=>{for(let e=0;e<Ja;e++)Za[e].lerp(Bn[e],sn.out)}).onComplete(eo),to=!1}function rd(){as.start()}var ls={start:id,update:nd,clear:eo,resize:Uh,get playing(){return to},hash:"0,2",name:"moon",sounds:[]};kt(ls.hash,ls);var io=!1,hs,fs,Fe=V.makeLine();Fe.stroke=Q.colors.black;Fe.cap="round";Vh();no();function sd(t){io=!0,Fe.visible=!0,hs.start(),!t&&cs.sound&&cs.sound.stop().play()}function Vh(){Fe.translation.copy(H)}function ad(){Fe.noFill().stroke=Q.colors.black}function no(){hs&&hs.stop(),fs&&fs.stop();let t=Math.random(),e=Math.round(ve(t,0,1,V.height*.5,V.width)),i=Math.random()*Ct;Fe.vertices[0].set(e*Math.cos(i),e*Math.sin(i)),i+=Math.PI,Fe.vertices[1].set(e*Math.cos(i),e*Math.sin(i)),Fe.linewidth=Math.round(t*7)+3,Fe.ending=Fe.beginning=0,Fe.visible=!1,hs=new dt(Fe).to({ending:1},ft*.1).easing(gt.Circular.In).onComplete(od),fs=new dt(Fe).to({beginning:1},ft*.35).easing(gt.Circular.Out).onComplete(no),io=!1}function od(){fs.start()}var cs={start:sd,update:ad,clear:no,resize:Vh,get playing(){return io},hash:"1,5",name:"strike",sounds:[]};kt(cs.hash,cs);var ro=!1,us,ds,$h=120;var ld=St($h).map(()=>new U.Anchor),oe=V.makePath(ld);oe.closed=!1;oe.noFill();oe.join="miter";oe.miter=4;oe.cap="butt";Xh();so();function hd(t){ro=!0,oe.visible=!0,us.start(),!t&&ps.sound&&ps.sound.stop().play()}function fd(){oe.stroke=Q.colors.black}function Xh(){oe.linewidth=Bt.min_dimension/30,oe.position.copy(H)}function so(){us&&us.stop(),ds&&ds.stop();let t=Math.PI/2,e=Math.random()*4,i=5;e>3?i=5:e>2?i=4:e>1?i=2:i=1,oe.rotation=Math.random()>.5?Math.PI:0,oe.visible=!1,oe.beginning=oe.ending=0,Math.random()>.5?oe.translation.set(V.width*.85,H.y):oe.translation.set(V.width*.15,H.y);let r=V.width/16,a=V.height*.66;for(let f=0;f<oe.vertices.length;f++){let l=oe.vertices[f],d=f/$h,g=(Math.abs((2*(d*Ct*i+t)/Math.PI-1)%4-2)-1)*r/2,x=ve(d,0,1,-a/2,a/2);l.set(g,x)}us=new dt(oe).to({ending:1},ft*.25).easing(gt.Sinusoidal.Out).onComplete(cd),ds=new dt(oe).to({beginning:1},ft*.25).easing(gt.Sinusoidal.Out).onComplete(so),ro=!1}function cd(){ds.start()}var ps={start:hd,update:fd,clear:so,resize:Xh,get playing(){return ro},hash:"1,8",name:"zig-zag",sounds:[]};kt(ps.hash,ps);var ao=!1,gs,_s,Yh=200,ud=St(Yh).map(()=>new U.Anchor),xe=V.makePath(ud,!0);xe.noFill().stroke=Q.colors.accent;xe.cap=xe.join="round";Gh();oo();function dd(t){ao=!0,xe.visible=!0,gs.start(),!t&&ms.sound&&ms.sound.stop().play()}function pd(){xe.stroke=Q.colors.accent}function Gh(){xe.linewidth=Bt.min_dimension/40,xe.translation.copy(H)}function oo(){gs&&gs.stop(),_s&&_s.stop();let t=Math.round(Math.random()*6)+1,e=Math.PI/2,i=H.x,r=V.height/3;xe.rotation=Math.random()>.5?Math.PI:0,xe.beginning=xe.ending=0,xe.visible=!1;for(let a=0;a<xe.vertices.length;a++){let f=xe.vertices[a],l=a/Yh,d=Ct*t*l+e,m=ve(l,0,1,-i/2,i/2),g=r*Math.sin(d);f.set(m,g)}gs=new dt(xe).to({ending:1},ft*.5).easing(gt.Sinusoidal.Out).onComplete(gd),_s=new dt(xe).to({beginning:1},ft*.5).easing(gt.Sinusoidal.In).onComplete(oo),ao=!1}function gd(){_s.start()}var ms={start:dd,update:pd,clear:oo,resize:Gh,get playing(){return ao},hash:"0,7",name:"squiggle",sounds:[]};kt(ms.hash,ms);var ho=!1,lo=!0,on=[],an=[];var zn=24,Kh=zn-1,ys=St(zn).map(t=>{let e=new U.Circle;return e.theta=0,e.destination=0,e}),vs=V.makeGroup(ys);vs.noStroke().fill=Q.colors.black;Jh();fo();function _d(t){ho=!0,on[0].start(),!t&&bs.sound&&bs.sound.stop().play()}function md(){vs.fill=Q.colors.black}function Jh(){vs.translation.copy(H)}function fo(){on.length>0&&(on.forEach(Qh),on.length=0),an.length>0&&(an.forEach(Qh),an.length=0),lo=Math.random()>.5,vs.rotation=Math.random()*Ct;let t=Bt.min_dimension/3,e=Bt.min_dimension/90;for(let i=0;i<ys.length;i++){let r=i/zn,a=(i+1)/zn,f=ys[i];f.visible=!1,f.radius=e,f.destination=Ct*r,f.theta=0,f.translation.set(t,0);let l=new dt(f).to({theta:f.destination},.2*ft/(i+1)).onStart(()=>f.visible=!0).onUpdate(()=>{let g=f.theta*(lo?1:-1),x=t*Math.cos(g),T=t*Math.sin(g);f.translation.set(x,T)}).onComplete(()=>{if(i>=Kh){an[0].start();return}let g=ys[i+1],x=on[i+1];g.theta=f.theta,g.translation.copy(f.translation),x.start()});on.push(l);let d=Math.min(a*Ct,Ct),m=new dt(f).to({theta:d},.2*ft/(zn-(i+1))).onUpdate(()=>{let g=f.theta*(lo?1:-1),x=t*Math.cos(g),T=t*Math.sin(g);f.translation.set(x,T)}).onComplete(()=>{f.visible=!1,i>=Kh-1?fo():an[i+1].start()});an.push(m)}ho=!1}function Qh(t){t.stop()}var bs={start:_d,update:md,clear:fo,resize:Jh,get playing(){return ho},hash:"1,4",name:"bubbles",sounds:[]};kt(bs.hash,bs);var uo=!1,co=!0,hn=[],ln=[];var Wn=32,Zh=Wn-1,xs=St(Wn).map(t=>{let e=new U.Polygon(0,0,0,3);return e.theta=0,e.destination=0,e}),qn=V.makeGroup(xs);qn.noStroke().fill=Q.colors.white;qn.join="miter";ef();po();function yd(t){uo=!0,hn[0].start(),!t&&ws.sound&&ws.sound.stop().play()}function bd(){qn.fill=Q.colors.white}function ef(){qn.translation.copy(H)}function po(){hn.length>0&&(hn.forEach(tf),hn.length=0),ln.length>0&&(ln.forEach(tf),ln.length=0),co=Math.random()>.5,qn.rotation=Math.random()*Ct;let t=Bt.min_dimension*.45,e=V.height*1.2/90,i=-Math.PI/6;for(let r=0;r<xs.length;r++){let a=r/Wn,f=(r+1)/Wn,l=xs[r];l.visible=!1,l.radius=e,l.destination=Ct*a,l.theta=0,l.translation.set(t,0);let d=new dt(l).to({theta:l.destination},.1*ft/(r+1)).onStart(()=>l.visible=!0).onUpdate(()=>{let x=l.theta*(co?1:-1),T=t*Math.cos(x),S=t*Math.sin(x);l.translation.set(T,S),l.rotation=x+i}).onComplete(()=>{if(r>=Zh){ln[0].start();return}let x=xs[r+1],T=hn[r+1];x.theta=l.theta,x.translation.copy(l.translation),T.start()});hn.push(d);let m=Math.min(f*Ct,Ct),g=new dt(l).to({theta:m},.1*ft/(Wn-(r+1))).onUpdate(()=>{let x=l.theta*(co?1:-1),T=t*Math.cos(x),S=t*Math.sin(x);l.translation.set(T,S),l.rotation=x+i}).onComplete(()=>{l.visible=!1,r>=Zh-1?po():ln[r+1].start()});ln.push(g)}uo=!1}function tf(t){t.stop()}var ws={start:yd,update:bd,clear:po,resize:ef,get playing(){return uo},hash:"2,4",name:"corona",sounds:[]};kt(ws.hash,ws);var go=!1,ks,Hn=8,vd=St(8).map(()=>new U.Anchor),Ue=V.makePath(vd),di=[];Ue.closed=!0;Ue.noStroke().fill=Q.colors.highlight;nf();_o();function xd(t){if(go=!0,Ue.visible=!0,di.length>0)for(let e=0;e<di[0].length;e++)di[0][e].start();!t&&Ts.sound&&Ts.sound.stop().play()}function wd(){Ue.fill=Q.colors.highlight}function nf(){Ue.translation.copy(H)}function _o(){if(di.length>0){for(let a=0;a<di.length;a++){let f=di[a];for(let l=0;l<f.length;l++)f[l].stop()}di.length=0}ks&&ks.stop(),Ue.visible=0,Ue.scale=1,Ue.rotation=Math.random()*Ct;let t=0,e=Ct,i=Math.random()*Ct,r=V.height/6;Ue.vertices.forEach((a,f)=>{let l=f/Hn,d=t,m=r*Math.cos(d),g=r*Math.sin(d);a.set(m,g);let x=f+1,T=Math.PI*(x/Hn),S=St(Hn).map(v=>{let L=Math.min(v/x,1)*(e-t)+t+T+i,R=Ue.vertices[v],M=r*Math.cos(L),F=r*Math.sin(L);return new dt(R).to({x:M,y:F},ft/(Hn+2)).easing(gt.Sinusoidal.Out)});di.push(S),S[0].onComplete(()=>{let v=di[x];if(v&&v.length>0){v.forEach(E=>E.start());return}ks.start()})}),ks=new dt(Ue).to({scale:0},ft/(Hn+2)).easing(gt.Sinusoidal.Out).onComplete(_o),go=!1}var Ts={start:xd,update:wd,clear:_o,resize:nf,get playing(){return go},hash:"1,7",name:"pinwheel",sounds:[]};kt(Ts.hash,Ts);var rf=!1,kd=12,Ti=St(kd).map(t=>{let e=new U.Circle;return e.key=Q.getRandomKey(),e.stroke=Q.colors[e.key],e.noFill(),e}),sf=V.makeGroup(Ti);af();mo();function Td(t){rf=!0,sf.visible=!0;for(let e=0;e<Ti.length;e++)Ti[e].tween.start();!t&&Es.sound&&Es.sound.stop().play()}function Ed(){for(let t=0;t<Ti.length;t++){let e=Ti[t];e.stroke=Q.colors[e.key]}}function af(){sf.translation.copy(H)}function mo(){let t,e=0,i=V.height*2/90,r=V.height*4/90;Ti.forEach((a,f)=>{let l=Ct*Math.random(),d=Math.random()*H.y*Math.cos(l),m=Math.random()*H.y*Math.sin(l),g=Math.random()*ft*.5;a.translation.set(d,m),a.visible=!1,a.scale=0,a.radius=Math.round(ve(Math.random(),0,1,i,r)),a.linewidth=Math.random()*20+40,a.tween&&a.tween.stop(),a.tween=new dt(a).to({scale:1,linewidth:0},.2*ft).easing(gt.Sinusoidal.Out).delay(g).onStart(()=>a.visible=!0).onComplete(()=>a.visible=!1),e<g&&(e=g,t=f)}),Ti[t].tween.onComplete(()=>{Ti[t].visible=!1,mo()})}var Es={start:Td,update:Ed,clear:mo,resize:af,get playing(){return rf},hash:"0,8",name:"glimmer",sounds:[]};kt(Es.hash,Es);(0,fe.default)(()=>{let t=(0,fe.default)("#content"),e=(0,fe.default)("#hint"),i=(0,fe.default)("#credits"),r=(0,fe.default)("#embed"),a=(0,fe.default)("#merchandise"),f=(0,fe.default)(window),l,d,m,g,x,T=!1,S=!1,v=!1,E=er(()=>{if(T){E();return}e.fadeIn()},2e4),L=er(()=>{if(ya.y>g-64){L();return}t.css("top",0)},1e3),R=document.createElement("audio");R.addEventListener("canplay",M,!1),R.src=`${Cr}silent.mp3`,R.preload="auto",R.load();function M(){t.bind("click",F).bind("visibilitychange",B),R.removeEventListener("canplay",M,!1),q()}function F(){S=!0,R.play(),t.unbind("click",F)}function B(){/hidden/i.test(document.visibilityState)&&S&&(S=!1,t.unbind("click",F).bind("click",F))}function q(){V.appendTo(t[0]),Bt.updateAudio(),(0,fe.default)("#embed-button").click(ot=>{ot.preventDefault(),e.fadeOut(),a.fadeOut(),r.fadeIn(h)});let pt=!0;(0,fe.default)("#merchandise-button").click(ot=>{ot.preventDefault(),pt&&(a.css({opacity:1,display:"none",zIndex:0}),pt=!1),e.fadeOut(),r.fadeOut(),a.fadeIn(()=>{T=!0,v=!0})}),(0,fe.default)("#close-merchandise").click(ot=>{ot.preventDefault(),T=!1,v=!1,a.fadeOut()}),f.bind("resize",()=>{m=f.width(),g=f.height(),G()}).bind("mousemove",ot=>{T||url.boolean("kiosk")||(ya.set(ot.clientX,ot.clientY),Nt())}).bind("keydown",(ot,yt)=>{if(ot.metaKey||ot.ctrlKey)return;ot.preventDefault();let Tt=ot.which||yt,rt;switch(Tt){case 81:rt="0,0";break;case 87:rt="0,1";break;case 69:rt="0,2";break;case 82:rt="0,3";break;case 84:rt="0,4";break;case 89:rt="0,5";break;case 85:rt="0,6";break;case 73:rt="0,7";break;case 79:rt="0,8";break;case 80:rt="0,9";break;case 65:rt="1,0";break;case 83:rt="1,1";break;case 68:rt="1,2";break;case 70:rt="1,3";break;case 71:rt="1,4";break;case 72:rt="1,5";break;case 74:rt="1,6";break;case 75:rt="1,7";break;case 76:rt="1,8";break;case 90:rt="2,0";break;case 88:rt="2,1";break;case 67:rt="2,2";break;case 86:rt="2,3";break;case 66:rt="2,4";break;case 78:rt="2,5";break;case 77:rt="2,6";break}xt(rt),Gt()}).bind("keyup",ot=>{switch(ot.which){case 32:index="2,7",xt(index),Gt();break;case 27:v&&(0,fe.default)("#close-merchandise").click();break}}),Ft(),navigator.maxTouchPoints>0?e.find(".message").html("Press anywhere on the screen and turn up speakers"):(url.boolean("kiosk")||i.css("display","block"),e.find(".message").html("Press any key, A to Z or spacebar, and turn up speakers")),V.bind("update",()=>{if(dh(),Q.update(),!!l)for(let ot in d.needsUpdate){let yt=d.needsUpdate[ot];yt&&J(yt)}}).play(),f.trigger("resize"),navigator.requestMIDIAccess&&navigator.requestMIDIAccess().then(tt,ut),setTimeout(()=>{if((0,fe.default)("#lobby").fadeOut(Z),url.boolean("kiosk")){(0,fe.default)(document.body).addClass("kiosk"),Gt(),e.fadeIn();return}else if(/merchandise/gi.test(window.location.pathname)){(0,fe.default)("#merchandise-button").trigger("click");return}e.fadeIn()},1e3)}function W(pt){r.has(pt.target).length||(r.fadeOut(()=>{T=!1}),f.unbind("click",W))}function h(){T=!0,r.find("textarea").select(),f.bind("click",W)}function G(){if(!l)return;m=f.width(),g=f.height(),x=m>=g;let pt=d.length;d.forEach((ot,yt)=>{let Tt=ot.length,rt,Kt,le,Ht;x?(rt=m/Tt,Kt=g/pt):(rt=m/pt,Kt=g/Tt),ot.width=rt,ot.height=Kt,ot.forEach((Ut,It)=>{x?(le=m*(It+.5)/Tt,Ht=g*(yt+.5)/pt):(le=m*(yt+.5)/pt,Ht=g*(It+.5)/Tt),Ut.width=rt,Ut.height=Kt,Ut.translation.set(le,Ht),Ut.visible=!0})})}function J(pt){pt.opacity+=-pt.opacity*.2,pt.opacity<=.1&&(pt.opacity=0,delete d.needsUpdate[pt.id])}function Z(){window.localStorage&&window.localStorage.getItem("visited")||(xt("0,9"),xt("2,6"),xt("1,7"),xt("2,1"),window.localStorage&&window.localStorage.setItem("visited",!0))}function tt(pt){let ot=[],yt=[],Tt=[],rt=(0,fe.default)(".midi-connections"),Kt=()=>{e.find(".message").animate({opacity:0},()=>{e.css({display:"block",opacity:1}),rt.fadeIn()}),le()},le=er(()=>{rt.fadeOut(()=>{e.fadeOut(()=>{e.find(".message").css({opacity:1})}),E()})},5e3),Ht={21:"2,0",23:"2,1",24:"2,2",26:"2,3",28:"2,4",29:"2,5",31:"2,6",33:"1,0",35:"1,1",36:"1,2",38:"1,3",40:"1,4",41:"1,5",43:"1,6",45:"1,7",47:"1,8",48:"0,0",50:"0,1",52:"0,2",53:"0,3",55:"0,4",57:"0,5",59:"0,6",60:"0,7",62:"0,8",64:"0,9",65:"2,0",67:"2,1",69:"2,2",71:"2,3",72:"2,4",74:"2,5",76:"2,6",77:"1,0",79:"1,1",81:"1,2",83:"1,3",84:"1,4",86:"1,5",88:"1,6",89:"1,7",91:"1,8",93:"0,0",95:"0,1",96:"0,2",98:"0,3",100:"0,4",101:"0,5",103:"0,6",105:"0,7",107:"0,8",108:"0,9",22:"3,0",106:"3,0"},Ut={};for(let Wt in Ht){let ye=Ht[Wt];Ut[ye]=Wt}window.onmidistatechange=It,window.onmidimessage=Ve,pt.addEventListener("statechange",It),It({target:pt}),tt.dispatch=Wt=>{let te=Ut[Wt],lt=100;if(!te)return;let pe=[144,te,lt],zi=[128,te,0];for(let ai=0;ai<yt.length;ai++){let oi=yt[ai];oi.send(pe),oi.send(zi,Date.now()+100)}window.webkit&&(window.webkit.messageHandlers.midi.postMessage(pe),setTimeout(()=>{window.webkit.messageHandlers.midi.postMessage(zi)},100))};function It(Wt){let ye=Wt.target,te;ot.length=Tt.length=0;for(let lt of ye.inputs.values())nt(ot,lt)||(ot.push(lt),Tt.push(lt.name)),lt.onmidimessage=Ve;for(let lt of ye.outputs.values())nt(yt,lt)||yt.push(lt);if(Tt.length<=0){rt.html("Disconnected from all MIDI devices");return}else if(Tt.length<=1)te=Tt[0];else if(Tt.length<=2)te=Tt[0]+" and "+Tt[1];else{let lt=Tt.pop();te=`${Tt.join(", ")}, and ${lt}`,Tt.push(lt)}rt.html(`Connected to these MIDI devices:, ${te}`),Kt()}function Ve(Wt){let ye=Wt.data[0],te=Wt.data[1],lt=Wt.data.length>2?Wt.data[2]:0;switch(ye){case 144:lt>0&&de(te,lt);break}}function de(Wt){let ye=Ht[Wt];ye&&(tt.receiving=!0,xt(ye),Gt(),tt.receiving=!1)}}function ut(){window.console&&window.console.log&&window.console.log("Unable to connect to MIDI")}function nt(pt,ot){for(let yt=0;yt<pt.length;yt++)if(pt[yt].id===ot.id)return!0;return!1}function Ft(){l=V.makeGroup(),d=new Array(3),d.width=d.height=32,d.needsUpdate={},d.map={},d[0]=St(10).map(Ut),d[1]=St(9).map(Ut),d[2]=St(8).map(Ut);let pt=[],ot,yt,Tt,rt,Kt,le,Ht;t.bind("touchstart",lt=>{ot=lt.originalEvent,Ks(ot.touches,Ve)}).bind("mousedown",lt=>{Ve(lt.originalEvent),(0,fe.default)(window).bind("mousemove",ye).bind("mouseup",te)}).bind("touchmove",lt=>{ot=lt.originalEvent,Ks(ot.touches,de)}).bind("touchstart touchmove touchend touchcancel",lt=>{if(S&&!(v||t.hasClass("ios-app-store")))return lt.preventDefault(),!1}),d.forEach((lt,pe)=>{lt.forEach((zi,ai)=>{let oi=`${pe},${ai}`;d.map[oi]=zi})});function Ut(){let lt=new U.Rectangle(0,0,d.width,d.height);return lt.noFill().noStroke(),lt.opacity=0,lt.visible=!1,l.add(lt),lt}function It(lt,pe){return rt=d.length,x?(Kt=Oi(Math.floor(rt*pe/g),0,rt-1),rt=d[Kt].length,le=Oi(Math.floor(rt*lt/m),0,rt-1)):(Kt=Oi(Math.floor(rt*lt/m),0,rt-1),rt=d[Kt].length,le=Oi(Math.floor(rt*pe/g),0,rt-1)),`${Kt},${le}`}function Ve(lt){yt=lt.clientX,Tt=lt.clientY,Ht=It(yt,Tt,yt,Tt),pt[lt.identifier]={id:Ht,x:yt,y:Tt},Wt(Ht,d.map[Ht])}function de(lt){yt=lt.clientX,Tt=lt.clientY,Ht=It(yt,Tt,pt[lt.identifier].x,pt[lt.identifier].y),pt[lt.identifier]&&pt[lt.identifier].id!==Ht&&(Wt(Ht,d.map[Ht]),pt[lt.identifier].id=Ht),pt[lt.identifier].x=yt,pt[lt.identifier].y=Tt}function Wt(lt,pe){xt(lt),Gt(),Q.get().isDark?pe.fill="rgba(255, 255, 255, 0.3)":pe.fill="rgba(0, 0, 0, 0.3)",pe.opacity=1,d.needsUpdate[pe.id]=pe}function ye(lt){de(lt.originalEvent)}function te(lt){(0,fe.default)(window).unbind("mousemove",ye).unbind("mouseup",te)}}function xt(pt,ot){let yt=Bt.map[pt];yt&&(yt.playing&&yt.clear(),yt.start(ot),window.gtag&&window.gtag("event","animation",{trigger:pt})),!tt.receiving&&tt.dispatch&&tt.dispatch(pt)}function Gt(){e.fadeOut(),E()}function Nt(){t.css("top",`${-64}px`),L()}});window.console&&window.console.log&&window.console.log("Check out the code at http://github.com/jonobr1/Patatap");})();
/*!
* jQuery JavaScript Library v3.7.1
* https://jquery.com/
*
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2023-08-28T13:37Z
*/