reacthub-pixitweenjs 0.2.100 → 0.2.101

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -10,12 +10,12 @@
10
10
  `)>=0)return!1;return!0}function Bb(e,t){var r;if(e.indent===" ")r=" ";else if(typeof e.indent=="number"&&e.indent>0)r=Br.call(Array(e.indent+1)," ");else return null;return{base:r,prev:Br.call(Array(t+1),r)}}function Cl(e,t){if(e.length===0)return"";var r=`
11
11
  `+t.prev+t.base;return r+Br.call(e,","+r)+`
12
12
  `+t.prev}function ro(e,t){var r=Al(e),n=[];if(r){n.length=e.length;for(var i=0;i<e.length;i++)n[i]=fn(e,i)?t(e[i],e):""}var o=typeof Tl=="function"?Tl(e):[],a;if(hi){a={};for(var u=0;u<o.length;u++)a["$"+o[u]]=o[u]}for(var f in e)fn(e,f)&&(r&&String(Number(f))===f&&f<e.length||hi&&a["$"+f]instanceof Symbol||(hh.call(/[^\w$]/,f)?n.push(t(f,e)+": "+t(e[f],e)):n.push(f+": "+t(e[f],e))));if(typeof Tl=="function")for(var h=0;h<o.length;h++)vh.call(e,o[h])&&n.push("["+t(o[h])+"]: "+t(e[o[h]],e));return n}var Rl=gl,di=lb,Db=_b,Ub=Rl("%TypeError%"),no=Rl("%WeakMap%",!0),io=Rl("%Map%",!0),$b=di("WeakMap.prototype.get",!0),Gb=di("WeakMap.prototype.set",!0),jb=di("WeakMap.prototype.has",!0),qb=di("Map.prototype.get",!0),zb=di("Map.prototype.set",!0),Hb=di("Map.prototype.has",!0),Il=function(e,t){for(var r=e,n;(n=r.next)!==null;r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n},Vb=function(e,t){var r=Il(e,t);return r&&r.value},Wb=function(e,t,r){var n=Il(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},Xb=function(e,t){return!!Il(e,t)},Kb=function(){var t,r,n,i={assert:function(o){if(!i.has(o))throw new Ub("Side channel does not contain "+Db(o))},get:function(o){if(no&&o&&(typeof o=="object"||typeof o=="function")){if(t)return $b(t,o)}else if(io){if(r)return qb(r,o)}else if(n)return Vb(n,o)},has:function(o){if(no&&o&&(typeof o=="object"||typeof o=="function")){if(t)return jb(t,o)}else if(io){if(r)return Hb(r,o)}else if(n)return Xb(n,o);return!1},set:function(o,a){no&&o&&(typeof o=="object"||typeof o=="function")?(t||(t=new no),Gb(t,o,a)):io?(r||(r=new io),zb(r,o,a)):(n||(n={key:{},next:null}),Wb(n,o,a))}};return i},Yb=String.prototype.replace,Zb=/%20/g,Pl={RFC1738:"RFC1738",RFC3986:"RFC3986"},Nl={default:Pl.RFC3986,formatters:{RFC1738:function(e){return Yb.call(e,Zb,"+")},RFC3986:function(e){return String(e)}},RFC1738:Pl.RFC1738,RFC3986:Pl.RFC3986},Qb=Nl,Ml=Object.prototype.hasOwnProperty,kn=Array.isArray,Dr=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Jb=function(t){for(;t.length>1;){var r=t.pop(),n=r.obj[r.prop];if(kn(n)){for(var i=[],o=0;o<n.length;++o)typeof n[o]<"u"&&i.push(n[o]);r.obj[r.prop]=i}}},Ah=function(t,r){for(var n=r&&r.plainObjects?Object.create(null):{},i=0;i<t.length;++i)typeof t[i]<"u"&&(n[i]=t[i]);return n},tx=function e(t,r,n){if(!r)return t;if(typeof r!="object"){if(kn(t))t.push(r);else if(t&&typeof t=="object")(n&&(n.plainObjects||n.allowPrototypes)||!Ml.call(Object.prototype,r))&&(t[r]=!0);else return[t,r];return t}if(!t||typeof t!="object")return[t].concat(r);var i=t;return kn(t)&&!kn(r)&&(i=Ah(t,n)),kn(t)&&kn(r)?(r.forEach(function(o,a){if(Ml.call(t,a)){var u=t[a];u&&typeof u=="object"&&o&&typeof o=="object"?t[a]=e(u,o,n):t.push(o)}else t[a]=o}),t):Object.keys(r).reduce(function(o,a){var u=r[a];return Ml.call(o,a)?o[a]=e(o[a],u,n):o[a]=u,o},i)},ex=function(t,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},t)},rx=function(e,t,r){var n=e.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},nx=function(t,r,n,i,o){if(t.length===0)return t;var a=t;if(typeof t=="symbol"?a=Symbol.prototype.toString.call(t):typeof t!="string"&&(a=String(t)),n==="iso-8859-1")return escape(a).replace(/%u[0-9a-f]{4}/gi,function(d){return"%26%23"+parseInt(d.slice(2),16)+"%3B"});for(var u="",f=0;f<a.length;++f){var h=a.charCodeAt(f);if(h===45||h===46||h===95||h===126||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||o===Qb.RFC1738&&(h===40||h===41)){u+=a.charAt(f);continue}if(h<128){u=u+Dr[h];continue}if(h<2048){u=u+(Dr[192|h>>6]+Dr[128|h&63]);continue}if(h<55296||h>=57344){u=u+(Dr[224|h>>12]+Dr[128|h>>6&63]+Dr[128|h&63]);continue}f+=1,h=65536+((h&1023)<<10|a.charCodeAt(f)&1023),u+=Dr[240|h>>18]+Dr[128|h>>12&63]+Dr[128|h>>6&63]+Dr[128|h&63]}return u},ix=function(t){for(var r=[{obj:{o:t},prop:"o"}],n=[],i=0;i<r.length;++i)for(var o=r[i],a=o.obj[o.prop],u=Object.keys(a),f=0;f<u.length;++f){var h=u[f],d=a[h];typeof d=="object"&&d!==null&&n.indexOf(d)===-1&&(r.push({obj:a,prop:h}),n.push(d))}return Jb(r),t},sx=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},ox=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},ax=function(t,r){return[].concat(t,r)},lx=function(t,r){if(kn(t)){for(var n=[],i=0;i<t.length;i+=1)n.push(r(t[i]));return n}return r(t)},Oh={arrayToObject:Ah,assign:ex,combine:ax,compact:ix,decode:rx,encode:nx,isBuffer:ox,isRegExp:sx,maybeMap:lx,merge:tx},Ch=Kb,so=Oh,os=Nl,ux=Object.prototype.hasOwnProperty,Rh={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,r){return t+"["+r+"]"},repeat:function(t){return t}},Vr=Array.isArray,fx=Array.prototype.push,Ih=function(e,t){fx.apply(e,Vr(t)?t:[t])},cx=Date.prototype.toISOString,Ph=os.default,Fe={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:so.encode,encodeValuesOnly:!1,format:Ph,formatter:os.formatters[Ph],indices:!1,serializeDate:function(t){return cx.call(t)},skipNulls:!1,strictNullHandling:!1},hx=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},kl={},dx=function e(t,r,n,i,o,a,u,f,h,d,p,c,v,y,b,_){for(var m=t,w=_,T=0,x=!1;(w=w.get(kl))!==void 0&&!x;){var E=w.get(t);if(T+=1,typeof E<"u"){if(E===T)throw new RangeError("Cyclic object value");x=!0}typeof w.get(kl)>"u"&&(T=0)}if(typeof f=="function"?m=f(r,m):m instanceof Date?m=p(m):n==="comma"&&Vr(m)&&(m=so.maybeMap(m,function(Z){return Z instanceof Date?p(Z):Z})),m===null){if(o)return u&&!y?u(r,Fe.encoder,b,"key",c):r;m=""}if(hx(m)||so.isBuffer(m)){if(u){var I=y?r:u(r,Fe.encoder,b,"key",c);return[v(I)+"="+v(u(m,Fe.encoder,b,"value",c))]}return[v(r)+"="+v(String(m))]}var A=[];if(typeof m>"u")return A;var O;if(n==="comma"&&Vr(m))y&&u&&(m=so.maybeMap(m,u)),O=[{value:m.length>0?m.join(",")||null:void 0}];else if(Vr(f))O=f;else{var L=Object.keys(m);O=h?L.sort(h):L}for(var R=i&&Vr(m)&&m.length===1?r+"[]":r,C=0;C<O.length;++C){var P=O[C],M=typeof P=="object"&&typeof P.value<"u"?P.value:m[P];if(!(a&&M===null)){var F=Vr(m)?typeof n=="function"?n(R,P):R:R+(d?"."+P:"["+P+"]");_.set(t,T);var q=Ch();q.set(kl,_),Ih(A,e(M,F,n,i,o,a,n==="comma"&&y&&Vr(m)?null:u,f,h,d,p,c,v,y,b,q))}}return A},px=function(t){if(!t)return Fe;if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=t.charset||Fe.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=os.default;if(typeof t.format<"u"){if(!ux.call(os.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var i=os.formatters[n],o=Fe.filter;return(typeof t.filter=="function"||Vr(t.filter))&&(o=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Fe.addQueryPrefix,allowDots:typeof t.allowDots>"u"?Fe.allowDots:!!t.allowDots,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Fe.charsetSentinel,delimiter:typeof t.delimiter>"u"?Fe.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Fe.encode,encoder:typeof t.encoder=="function"?t.encoder:Fe.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Fe.encodeValuesOnly,filter:o,format:n,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Fe.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Fe.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Fe.strictNullHandling}},vx=function(e,t){var r=e,n=px(t),i,o;typeof n.filter=="function"?(o=n.filter,r=o("",r)):Vr(n.filter)&&(o=n.filter,i=o);var a=[];if(typeof r!="object"||r===null)return"";var u;t&&t.arrayFormat in Rh?u=t.arrayFormat:t&&"indices"in t?u=t.indices?"indices":"repeat":u="indices";var f=Rh[u];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var h=f==="comma"&&t&&t.commaRoundTrip;i||(i=Object.keys(r)),n.sort&&i.sort(n.sort);for(var d=Ch(),p=0;p<i.length;++p){var c=i[p];n.skipNulls&&r[c]===null||Ih(a,dx(r[c],c,f,h,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,d))}var v=a.join(n.delimiter),y=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?y+="utf8=%26%2310003%3B&":y+="utf8=%E2%9C%93&"),v.length>0?y+v:""},pi=Oh,Ll=Object.prototype.hasOwnProperty,gx=Array.isArray,Re={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:pi.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},mx=function(e){return e.replace(/&#(\d+);/g,function(t,r){return String.fromCharCode(parseInt(r,10))})},Nh=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},yx="utf8=%26%2310003%3B",_x="utf8=%E2%9C%93",bx=function(t,r){var n={__proto__:null},i=r.ignoreQueryPrefix?t.replace(/^\?/,""):t,o=r.parameterLimit===1/0?void 0:r.parameterLimit,a=i.split(r.delimiter,o),u=-1,f,h=r.charset;if(r.charsetSentinel)for(f=0;f<a.length;++f)a[f].indexOf("utf8=")===0&&(a[f]===_x?h="utf-8":a[f]===yx&&(h="iso-8859-1"),u=f,f=a.length);for(f=0;f<a.length;++f)if(f!==u){var d=a[f],p=d.indexOf("]="),c=p===-1?d.indexOf("="):p+1,v,y;c===-1?(v=r.decoder(d,Re.decoder,h,"key"),y=r.strictNullHandling?null:""):(v=r.decoder(d.slice(0,c),Re.decoder,h,"key"),y=pi.maybeMap(Nh(d.slice(c+1),r),function(b){return r.decoder(b,Re.decoder,h,"value")})),y&&r.interpretNumericEntities&&h==="iso-8859-1"&&(y=mx(y)),d.indexOf("[]=")>-1&&(y=gx(y)?[y]:y),Ll.call(n,v)?n[v]=pi.combine(n[v],y):n[v]=y}return n},xx=function(e,t,r,n){for(var i=n?t:Nh(t,r),o=e.length-1;o>=0;--o){var a,u=e[o];if(u==="[]"&&r.parseArrays)a=[].concat(i);else{a=r.plainObjects?Object.create(null):{};var f=u.charAt(0)==="["&&u.charAt(u.length-1)==="]"?u.slice(1,-1):u,h=parseInt(f,10);!r.parseArrays&&f===""?a={0:i}:!isNaN(h)&&u!==f&&String(h)===f&&h>=0&&r.parseArrays&&h<=r.arrayLimit?(a=[],a[h]=i):f!=="__proto__"&&(a[f]=i)}i=a}return i},wx=function(t,r,n,i){if(t){var o=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/,u=/(\[[^[\]]*])/g,f=n.depth>0&&a.exec(o),h=f?o.slice(0,f.index):o,d=[];if(h){if(!n.plainObjects&&Ll.call(Object.prototype,h)&&!n.allowPrototypes)return;d.push(h)}for(var p=0;n.depth>0&&(f=u.exec(o))!==null&&p<n.depth;){if(p+=1,!n.plainObjects&&Ll.call(Object.prototype,f[1].slice(1,-1))&&!n.allowPrototypes)return;d.push(f[1])}return f&&d.push("["+o.slice(f.index)+"]"),xx(d,r,n,i)}},Tx=function(t){if(!t)return Re;if(t.decoder!==null&&t.decoder!==void 0&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=typeof t.charset>"u"?Re.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?Re.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Re.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Re.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Re.arrayLimit,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Re.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Re.comma,decoder:typeof t.decoder=="function"?t.decoder:Re.decoder,delimiter:typeof t.delimiter=="string"||pi.isRegExp(t.delimiter)?t.delimiter:Re.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Re.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Re.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Re.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Re.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Re.strictNullHandling}},Ex=function(e,t){var r=Tx(t);if(e===""||e===null||typeof e>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof e=="string"?bx(e,r):e,i=r.plainObjects?Object.create(null):{},o=Object.keys(n),a=0;a<o.length;++a){var u=o[a],f=wx(u,n[u],r,typeof e=="string");i=pi.merge(i,f,r)}return r.allowSparse===!0?i:pi.compact(i)},Sx=vx,Ax=Ex,Ox=Nl,Cx={formats:Ox,parse:Ax,stringify:Sx},Rx=L_;function yr(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var Ix=/^([a-z0-9.+-]+:)/i,Px=/:[0-9]*$/,Nx=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,Mx=["<",">",'"',"`"," ","\r",`
13
- `," "],kx=["{","}","|","\\","^","`"].concat(Mx),Fl=["'"].concat(kx),Mh=["%","/","?",";","#"].concat(Fl),kh=["/","?","#"],Lx=255,Lh=/^[+a-z0-9A-Z_-]{0,63}$/,Fx=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Bx={javascript:!0,"javascript:":!0},Bl={javascript:!0,"javascript:":!0},vi={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Dl=Cx;function oo(e,t,r){if(e&&typeof e=="object"&&e instanceof yr)return e;var n=new yr;return n.parse(e,t,r),n}yr.prototype.parse=function(e,t,r){if(typeof e!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e.indexOf("?"),i=n!==-1&&n<e.indexOf("#")?"?":"#",o=e.split(i),a=/\\/g;o[0]=o[0].replace(a,"/"),e=o.join(i);var u=e;if(u=u.trim(),!r&&e.split("#").length===1){var f=Nx.exec(u);if(f)return this.path=u,this.href=u,this.pathname=f[1],f[2]?(this.search=f[2],t?this.query=Dl.parse(this.search.substr(1)):this.query=this.search.substr(1)):t&&(this.search="",this.query={}),this}var h=Ix.exec(u);if(h){h=h[0];var d=h.toLowerCase();this.protocol=d,u=u.substr(h.length)}if(r||h||u.match(/^\/\/[^@/]+@[^@/]+/)){var p=u.substr(0,2)==="//";p&&!(h&&Bl[h])&&(u=u.substr(2),this.slashes=!0)}if(!Bl[h]&&(p||h&&!vi[h])){for(var c=-1,v=0;v<kh.length;v++){var y=u.indexOf(kh[v]);y!==-1&&(c===-1||y<c)&&(c=y)}var b,_;c===-1?_=u.lastIndexOf("@"):_=u.lastIndexOf("@",c),_!==-1&&(b=u.slice(0,_),u=u.slice(_+1),this.auth=decodeURIComponent(b)),c=-1;for(var v=0;v<Mh.length;v++){var y=u.indexOf(Mh[v]);y!==-1&&(c===-1||y<c)&&(c=y)}c===-1&&(c=u.length),this.host=u.slice(0,c),u=u.slice(c),this.parseHost(),this.hostname=this.hostname||"";var m=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!m)for(var w=this.hostname.split(/\./),v=0,T=w.length;v<T;v++){var x=w[v];if(x&&!x.match(Lh)){for(var E="",I=0,A=x.length;I<A;I++)x.charCodeAt(I)>127?E+="x":E+=x[I];if(!E.match(Lh)){var O=w.slice(0,v),L=w.slice(v+1),R=x.match(Fx);R&&(O.push(R[1]),L.unshift(R[2])),L.length&&(u="/"+L.join(".")+u),this.hostname=O.join(".");break}}}this.hostname.length>Lx?this.hostname="":this.hostname=this.hostname.toLowerCase(),m||(this.hostname=Rx.toASCII(this.hostname));var C=this.port?":"+this.port:"",P=this.hostname||"";this.host=P+C,this.href+=this.host,m&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),u[0]!=="/"&&(u="/"+u))}if(!Bx[d])for(var v=0,T=Fl.length;v<T;v++){var M=Fl[v];if(u.indexOf(M)!==-1){var F=encodeURIComponent(M);F===M&&(F=escape(M)),u=u.split(M).join(F)}}var q=u.indexOf("#");q!==-1&&(this.hash=u.substr(q),u=u.slice(0,q));var Z=u.indexOf("?");if(Z!==-1?(this.search=u.substr(Z),this.query=u.substr(Z+1),t&&(this.query=Dl.parse(this.query)),u=u.slice(0,Z)):t&&(this.search="",this.query={}),u&&(this.pathname=u),vi[d]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var C=this.pathname||"",z=this.search||"";this.path=C+z}return this.href=this.format(),this};function Dx(e){return typeof e=="string"&&(e=oo(e)),e instanceof yr?e.format():yr.prototype.format.call(e)}yr.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,o="";this.host?i=e+this.host:this.hostname&&(i=e+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(o=Dl.stringify(this.query));var a=this.search||o&&"?"+o||"";return t&&t.substr(-1)!==":"&&(t+=":"),this.slashes||(!t||vi[t])&&i!==!1?(i="//"+(i||""),r&&r.charAt(0)!=="/"&&(r="/"+r)):i||(i=""),n&&n.charAt(0)!=="#"&&(n="#"+n),a&&a.charAt(0)!=="?"&&(a="?"+a),r=r.replace(/[?#]/g,function(u){return encodeURIComponent(u)}),a=a.replace("#","%23"),t+i+r+a+n};function Ux(e,t){return oo(e,!1,!0).resolve(t)}yr.prototype.resolve=function(e){return this.resolveObject(oo(e,!1,!0)).format()},yr.prototype.resolveObject=function(e){if(typeof e=="string"){var t=new yr;t.parse(e,!1,!0),e=t}for(var r=new yr,n=Object.keys(this),i=0;i<n.length;i++){var o=n[i];r[o]=this[o]}if(r.hash=e.hash,e.href==="")return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var a=Object.keys(e),u=0;u<a.length;u++){var f=a[u];f!=="protocol"&&(r[f]=e[f])}return vi[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname="/",r.path=r.pathname),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!vi[e.protocol]){for(var h=Object.keys(e),d=0;d<h.length;d++){var p=h[d];r[p]=e[p]}return r.href=r.format(),r}if(r.protocol=e.protocol,!e.host&&!Bl[e.protocol]){for(var T=(e.pathname||"").split("/");T.length&&!(e.host=T.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),T[0]!==""&&T.unshift(""),T.length<2&&T.unshift(""),r.pathname=T.join("/")}else r.pathname=e.pathname;if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var c=r.pathname||"",v=r.search||"";r.path=c+v}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var y=r.pathname&&r.pathname.charAt(0)==="/",b=e.host||e.pathname&&e.pathname.charAt(0)==="/",_=b||y||r.host&&e.pathname,m=_,w=r.pathname&&r.pathname.split("/")||[],T=e.pathname&&e.pathname.split("/")||[],x=r.protocol&&!vi[r.protocol];if(x&&(r.hostname="",r.port=null,r.host&&(w[0]===""?w[0]=r.host:w.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(T[0]===""?T[0]=e.host:T.unshift(e.host)),e.host=null),_=_&&(T[0]===""||w[0]==="")),b)r.host=e.host||e.host===""?e.host:r.host,r.hostname=e.hostname||e.hostname===""?e.hostname:r.hostname,r.search=e.search,r.query=e.query,w=T;else if(T.length)w||(w=[]),w.pop(),w=w.concat(T),r.search=e.search,r.query=e.query;else if(e.search!=null){if(x){r.host=w.shift(),r.hostname=r.host;var E=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;E&&(r.auth=E.shift(),r.hostname=E.shift(),r.host=r.hostname)}return r.search=e.search,r.query=e.query,(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!w.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var I=w.slice(-1)[0],A=(r.host||e.host||w.length>1)&&(I==="."||I==="..")||I==="",O=0,L=w.length;L>=0;L--)I=w[L],I==="."?w.splice(L,1):I===".."?(w.splice(L,1),O++):O&&(w.splice(L,1),O--);if(!_&&!m)for(;O--;O)w.unshift("..");_&&w[0]!==""&&(!w[0]||w[0].charAt(0)!=="/")&&w.unshift(""),A&&w.join("/").substr(-1)!=="/"&&w.push("");var R=w[0]===""||w[0]&&w[0].charAt(0)==="/";if(x){r.hostname=R?"":w.length?w.shift():"",r.host=r.hostname;var E=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;E&&(r.auth=E.shift(),r.hostname=E.shift(),r.host=r.hostname)}return _=_||r.host&&w.length,_&&!R&&w.unshift(""),w.length>0?r.pathname=w.join("/"):(r.pathname=null,r.path=null),(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},yr.prototype.parseHost=function(){var e=this.host,t=Px.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var $x=oo,Gx=Ux,jx=Dx;const qx={parse:$x,format:jx,resolve:Gx},Fh={};function Ht(e,t,r=3){if(Fh[t])return;let n=new Error().stack;typeof n>"u"?console.warn("PixiJS Deprecation Warning: ",`${t}
13
+ `," "],kx=["{","}","|","\\","^","`"].concat(Mx),Fl=["'"].concat(kx),Mh=["%","/","?",";","#"].concat(Fl),kh=["/","?","#"],Lx=255,Lh=/^[+a-z0-9A-Z_-]{0,63}$/,Fx=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Bx={javascript:!0,"javascript:":!0},Bl={javascript:!0,"javascript:":!0},vi={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Dl=Cx;function oo(e,t,r){if(e&&typeof e=="object"&&e instanceof yr)return e;var n=new yr;return n.parse(e,t,r),n}yr.prototype.parse=function(e,t,r){if(typeof e!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e.indexOf("?"),i=n!==-1&&n<e.indexOf("#")?"?":"#",o=e.split(i),a=/\\/g;o[0]=o[0].replace(a,"/"),e=o.join(i);var u=e;if(u=u.trim(),!r&&e.split("#").length===1){var f=Nx.exec(u);if(f)return this.path=u,this.href=u,this.pathname=f[1],f[2]?(this.search=f[2],t?this.query=Dl.parse(this.search.substr(1)):this.query=this.search.substr(1)):t&&(this.search="",this.query={}),this}var h=Ix.exec(u);if(h){h=h[0];var d=h.toLowerCase();this.protocol=d,u=u.substr(h.length)}if(r||h||u.match(/^\/\/[^@/]+@[^@/]+/)){var p=u.substr(0,2)==="//";p&&!(h&&Bl[h])&&(u=u.substr(2),this.slashes=!0)}if(!Bl[h]&&(p||h&&!vi[h])){for(var c=-1,v=0;v<kh.length;v++){var y=u.indexOf(kh[v]);y!==-1&&(c===-1||y<c)&&(c=y)}var b,_;c===-1?_=u.lastIndexOf("@"):_=u.lastIndexOf("@",c),_!==-1&&(b=u.slice(0,_),u=u.slice(_+1),this.auth=decodeURIComponent(b)),c=-1;for(var v=0;v<Mh.length;v++){var y=u.indexOf(Mh[v]);y!==-1&&(c===-1||y<c)&&(c=y)}c===-1&&(c=u.length),this.host=u.slice(0,c),u=u.slice(c),this.parseHost(),this.hostname=this.hostname||"";var m=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!m)for(var w=this.hostname.split(/\./),v=0,T=w.length;v<T;v++){var x=w[v];if(x&&!x.match(Lh)){for(var E="",I=0,A=x.length;I<A;I++)x.charCodeAt(I)>127?E+="x":E+=x[I];if(!E.match(Lh)){var O=w.slice(0,v),L=w.slice(v+1),R=x.match(Fx);R&&(O.push(R[1]),L.unshift(R[2])),L.length&&(u="/"+L.join(".")+u),this.hostname=O.join(".");break}}}this.hostname.length>Lx?this.hostname="":this.hostname=this.hostname.toLowerCase(),m||(this.hostname=Rx.toASCII(this.hostname));var C=this.port?":"+this.port:"",P=this.hostname||"";this.host=P+C,this.href+=this.host,m&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),u[0]!=="/"&&(u="/"+u))}if(!Bx[d])for(var v=0,T=Fl.length;v<T;v++){var M=Fl[v];if(u.indexOf(M)!==-1){var F=encodeURIComponent(M);F===M&&(F=escape(M)),u=u.split(M).join(F)}}var q=u.indexOf("#");q!==-1&&(this.hash=u.substr(q),u=u.slice(0,q));var Z=u.indexOf("?");if(Z!==-1?(this.search=u.substr(Z),this.query=u.substr(Z+1),t&&(this.query=Dl.parse(this.query)),u=u.slice(0,Z)):t&&(this.search="",this.query={}),u&&(this.pathname=u),vi[d]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var C=this.pathname||"",z=this.search||"";this.path=C+z}return this.href=this.format(),this};function Dx(e){return typeof e=="string"&&(e=oo(e)),e instanceof yr?e.format():yr.prototype.format.call(e)}yr.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,o="";this.host?i=e+this.host:this.hostname&&(i=e+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(o=Dl.stringify(this.query));var a=this.search||o&&"?"+o||"";return t&&t.substr(-1)!==":"&&(t+=":"),this.slashes||(!t||vi[t])&&i!==!1?(i="//"+(i||""),r&&r.charAt(0)!=="/"&&(r="/"+r)):i||(i=""),n&&n.charAt(0)!=="#"&&(n="#"+n),a&&a.charAt(0)!=="?"&&(a="?"+a),r=r.replace(/[?#]/g,function(u){return encodeURIComponent(u)}),a=a.replace("#","%23"),t+i+r+a+n};function Ux(e,t){return oo(e,!1,!0).resolve(t)}yr.prototype.resolve=function(e){return this.resolveObject(oo(e,!1,!0)).format()},yr.prototype.resolveObject=function(e){if(typeof e=="string"){var t=new yr;t.parse(e,!1,!0),e=t}for(var r=new yr,n=Object.keys(this),i=0;i<n.length;i++){var o=n[i];r[o]=this[o]}if(r.hash=e.hash,e.href==="")return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var a=Object.keys(e),u=0;u<a.length;u++){var f=a[u];f!=="protocol"&&(r[f]=e[f])}return vi[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname="/",r.path=r.pathname),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!vi[e.protocol]){for(var h=Object.keys(e),d=0;d<h.length;d++){var p=h[d];r[p]=e[p]}return r.href=r.format(),r}if(r.protocol=e.protocol,!e.host&&!Bl[e.protocol]){for(var T=(e.pathname||"").split("/");T.length&&!(e.host=T.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),T[0]!==""&&T.unshift(""),T.length<2&&T.unshift(""),r.pathname=T.join("/")}else r.pathname=e.pathname;if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var c=r.pathname||"",v=r.search||"";r.path=c+v}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var y=r.pathname&&r.pathname.charAt(0)==="/",b=e.host||e.pathname&&e.pathname.charAt(0)==="/",_=b||y||r.host&&e.pathname,m=_,w=r.pathname&&r.pathname.split("/")||[],T=e.pathname&&e.pathname.split("/")||[],x=r.protocol&&!vi[r.protocol];if(x&&(r.hostname="",r.port=null,r.host&&(w[0]===""?w[0]=r.host:w.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(T[0]===""?T[0]=e.host:T.unshift(e.host)),e.host=null),_=_&&(T[0]===""||w[0]==="")),b)r.host=e.host||e.host===""?e.host:r.host,r.hostname=e.hostname||e.hostname===""?e.hostname:r.hostname,r.search=e.search,r.query=e.query,w=T;else if(T.length)w||(w=[]),w.pop(),w=w.concat(T),r.search=e.search,r.query=e.query;else if(e.search!=null){if(x){r.host=w.shift(),r.hostname=r.host;var E=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;E&&(r.auth=E.shift(),r.hostname=E.shift(),r.host=r.hostname)}return r.search=e.search,r.query=e.query,(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!w.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var I=w.slice(-1)[0],A=(r.host||e.host||w.length>1)&&(I==="."||I==="..")||I==="",O=0,L=w.length;L>=0;L--)I=w[L],I==="."?w.splice(L,1):I===".."?(w.splice(L,1),O++):O&&(w.splice(L,1),O--);if(!_&&!m)for(;O--;O)w.unshift("..");_&&w[0]!==""&&(!w[0]||w[0].charAt(0)!=="/")&&w.unshift(""),A&&w.join("/").substr(-1)!=="/"&&w.push("");var R=w[0]===""||w[0]&&w[0].charAt(0)==="/";if(x){r.hostname=R?"":w.length?w.shift():"",r.host=r.hostname;var E=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;E&&(r.auth=E.shift(),r.hostname=E.shift(),r.host=r.hostname)}return _=_||r.host&&w.length,_&&!R&&w.unshift(""),w.length>0?r.pathname=w.join("/"):(r.pathname=null,r.path=null),(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},yr.prototype.parseHost=function(){var e=this.host,t=Px.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var $x=oo,Gx=Ux,jx=Dx;const qx={parse:$x,format:jx,resolve:Gx},Fh={};function zt(e,t,r=3){if(Fh[t])return;let n=new Error().stack;typeof n>"u"?console.warn("PixiJS Deprecation Warning: ",`${t}
14
14
  Deprecated since v${e}`):(n=n.split(`
15
15
  `).splice(r).join(`
16
16
  `),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",`${t}
17
17
  Deprecated since v${e}`),console.warn(n),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",`${t}
18
- Deprecated since v${e}`),console.warn(n))),Fh[t]=!0}let Ul;function zx(){return typeof Ul>"u"&&(Ul=function(){var r;const t={stencil:!0,failIfMajorPerformanceCaveat:Dt.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!Dt.ADAPTER.getWebGLRenderingContext())return!1;const n=Dt.ADAPTER.createCanvas();let i=n.getContext("webgl",t)||n.getContext("experimental-webgl",t);const o=!!((r=i==null?void 0:i.getContextAttributes())!=null&&r.stencil);if(i){const a=i.getExtension("WEBGL_lose_context");a&&a.loseContext()}return i=null,o}catch{return!1}}()),Ul}var Hx={grad:.9,turn:360,rad:360/(2*Math.PI)},Wr=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},Ie=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},lr=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},Bh=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Dh=function(e){return{r:lr(e.r,0,255),g:lr(e.g,0,255),b:lr(e.b,0,255),a:lr(e.a)}},$l=function(e){return{r:Ie(e.r),g:Ie(e.g),b:Ie(e.b),a:Ie(e.a,3)}},Vx=/^#([0-9a-f]{3,8})$/i,ao=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Uh=function(e){var t=e.r,r=e.g,n=e.b,i=e.a,o=Math.max(t,r,n),a=o-Math.min(t,r,n),u=a?o===t?(r-n)/a:o===r?2+(n-t)/a:4+(t-r)/a:0;return{h:60*(u<0?u+6:u),s:o?a/o*100:0,v:o/255*100,a:i}},$h=function(e){var t=e.h,r=e.s,n=e.v,i=e.a;t=t/360*6,r/=100,n/=100;var o=Math.floor(t),a=n*(1-r),u=n*(1-(t-o)*r),f=n*(1-(1-t+o)*r),h=o%6;return{r:255*[n,u,a,a,f,n][h],g:255*[f,n,n,u,a,a][h],b:255*[a,a,f,n,n,u][h],a:i}},Gh=function(e){return{h:Bh(e.h),s:lr(e.s,0,100),l:lr(e.l,0,100),a:lr(e.a)}},jh=function(e){return{h:Ie(e.h),s:Ie(e.s),l:Ie(e.l),a:Ie(e.a,3)}},qh=function(e){return $h((r=(t=e).s,{h:t.h,s:(r*=((n=t.l)<50?n:100-n)/100)>0?2*r/(n+r)*100:0,v:n+r,a:t.a}));var t,r,n},as=function(e){return{h:(t=Uh(e)).h,s:(i=(200-(r=t.s))*(n=t.v)/100)>0&&i<200?r*n/100/(i<=100?i:200-i)*100:0,l:i/2,a:t.a};var t,r,n,i},Wx=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Xx=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Kx=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Yx=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Gl={string:[[function(e){var t=Vx.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Ie(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?Ie(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Kx.exec(e)||Yx.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Dh({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Wx.exec(e)||Xx.exec(e);if(!t)return null;var r,n,i=Gh({h:(r=t[1],n=t[2],n===void 0&&(n="deg"),Number(r)*(Hx[n]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return qh(i)},"hsl"]],object:[[function(e){var t=e.r,r=e.g,n=e.b,i=e.a,o=i===void 0?1:i;return Wr(t)&&Wr(r)&&Wr(n)?Dh({r:Number(t),g:Number(r),b:Number(n),a:Number(o)}):null},"rgb"],[function(e){var t=e.h,r=e.s,n=e.l,i=e.a,o=i===void 0?1:i;if(!Wr(t)||!Wr(r)||!Wr(n))return null;var a=Gh({h:Number(t),s:Number(r),l:Number(n),a:Number(o)});return qh(a)},"hsl"],[function(e){var t=e.h,r=e.s,n=e.v,i=e.a,o=i===void 0?1:i;if(!Wr(t)||!Wr(r)||!Wr(n))return null;var a=function(u){return{h:Bh(u.h),s:lr(u.s,0,100),v:lr(u.v,0,100),a:lr(u.a)}}({h:Number(t),s:Number(r),v:Number(n),a:Number(o)});return $h(a)},"hsv"]]},zh=function(e,t){for(var r=0;r<t.length;r++){var n=t[r][0](e);if(n)return[n,t[r][1]]}return[null,void 0]},Zx=function(e){return typeof e=="string"?zh(e.trim(),Gl.string):typeof e=="object"&&e!==null?zh(e,Gl.object):[null,void 0]},jl=function(e,t){var r=as(e);return{h:r.h,s:lr(r.s+100*t,0,100),l:r.l,a:r.a}},ql=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Hh=function(e,t){var r=as(e);return{h:r.h,s:r.s,l:lr(r.l+100*t,0,100),a:r.a}},zl=function(){function e(t){this.parsed=Zx(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return Ie(ql(this.rgba),2)},e.prototype.isDark=function(){return ql(this.rgba)<.5},e.prototype.isLight=function(){return ql(this.rgba)>=.5},e.prototype.toHex=function(){return t=$l(this.rgba),r=t.r,n=t.g,i=t.b,a=(o=t.a)<1?ao(Ie(255*o)):"","#"+ao(r)+ao(n)+ao(i)+a;var t,r,n,i,o,a},e.prototype.toRgb=function(){return $l(this.rgba)},e.prototype.toRgbString=function(){return t=$l(this.rgba),r=t.r,n=t.g,i=t.b,(o=t.a)<1?"rgba("+r+", "+n+", "+i+", "+o+")":"rgb("+r+", "+n+", "+i+")";var t,r,n,i,o},e.prototype.toHsl=function(){return jh(as(this.rgba))},e.prototype.toHslString=function(){return t=jh(as(this.rgba)),r=t.h,n=t.s,i=t.l,(o=t.a)<1?"hsla("+r+", "+n+"%, "+i+"%, "+o+")":"hsl("+r+", "+n+"%, "+i+"%)";var t,r,n,i,o},e.prototype.toHsv=function(){return t=Uh(this.rgba),{h:Ie(t.h),s:Ie(t.s),v:Ie(t.v),a:Ie(t.a,3)};var t},e.prototype.invert=function(){return Ur({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),Ur(jl(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Ur(jl(this.rgba,-t))},e.prototype.grayscale=function(){return Ur(jl(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Ur(Hh(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Ur(Hh(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?Ur({r:(r=this.rgba).r,g:r.g,b:r.b,a:t}):Ie(this.rgba.a,3);var r},e.prototype.hue=function(t){var r=as(this.rgba);return typeof t=="number"?Ur({h:t,s:r.s,l:r.l,a:r.a}):Ie(r.h)},e.prototype.isEqual=function(t){return this.toHex()===Ur(t).toHex()},e}(),Ur=function(e){return e instanceof zl?e:new zl(e)},Vh=[],Qx=function(e){e.forEach(function(t){Vh.indexOf(t)<0&&(t(zl,Gl),Vh.push(t))})};function Jx(e,t){var r={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},n={};for(var i in r)n[r[i]]=i;var o={};e.prototype.toName=function(a){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var u,f,h=n[this.toHex()];if(h)return h;if(a!=null&&a.closest){var d=this.toRgb(),p=1/0,c="black";if(!o.length)for(var v in r)o[v]=new e(r[v]).toRgb();for(var y in r){var b=(u=d,f=o[y],Math.pow(u.r-f.r,2)+Math.pow(u.g-f.g,2)+Math.pow(u.b-f.b,2));b<p&&(p=b,c=y)}return c}},t.string.push([function(a){var u=a.toLowerCase(),f=u==="transparent"?"#0000":r[u];return f?new e(f).toRgb():null},"name"])}Qx([Jx]);const gi=class{constructor(e=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=e}get red(){return this._components[0]}get green(){return this._components[1]}get blue(){return this._components[2]}get alpha(){return this._components[3]}setValue(e){return this.value=e,this}set value(e){if(e instanceof gi)this._value=this.cloneSource(e._value),this._int=e._int,this._components.set(e._components);else{if(e===null)throw new Error("Cannot set PIXI.Color#value to null");(this._value===null||!this.isSourceEqual(this._value,e))&&(this.normalize(e),this._value=this.cloneSource(e))}}get value(){return this._value}cloneSource(e){return typeof e=="string"||typeof e=="number"||e instanceof Number||e===null?e:Array.isArray(e)||ArrayBuffer.isView(e)?e.slice(0):typeof e=="object"&&e!==null?{...e}:e}isSourceEqual(e,t){const r=typeof e;if(r!==typeof t)return!1;if(r==="number"||r==="string"||e instanceof Number)return e===t;if(Array.isArray(e)&&Array.isArray(t)||ArrayBuffer.isView(e)&&ArrayBuffer.isView(t))return e.length!==t.length?!1:e.every((i,o)=>i===t[o]);if(e!==null&&t!==null){const i=Object.keys(e),o=Object.keys(t);return i.length!==o.length?!1:i.every(a=>e[a]===t[a])}return e===t}toRgba(){const[e,t,r,n]=this._components;return{r:e,g:t,b:r,a:n}}toRgb(){const[e,t,r]=this._components;return{r:e,g:t,b:r}}toRgbaString(){const[e,t,r]=this.toUint8RgbArray();return`rgba(${e},${t},${r},${this.alpha})`}toUint8RgbArray(e){const[t,r,n]=this._components;return e=e??[],e[0]=Math.round(t*255),e[1]=Math.round(r*255),e[2]=Math.round(n*255),e}toRgbArray(e){e=e??[];const[t,r,n]=this._components;return e[0]=t,e[1]=r,e[2]=n,e}toNumber(){return this._int}toLittleEndianNumber(){const e=this._int;return(e>>16)+(e&65280)+((e&255)<<16)}multiply(e){const[t,r,n,i]=gi.temp.setValue(e)._components;return this._components[0]*=t,this._components[1]*=r,this._components[2]*=n,this._components[3]*=i,this.refreshInt(),this._value=null,this}premultiply(e,t=!0){return t&&(this._components[0]*=e,this._components[1]*=e,this._components[2]*=e),this._components[3]=e,this.refreshInt(),this._value=null,this}toPremultiplied(e){if(e===1)return(e*255<<24)+this._int;if(e===0)return 0;let t=this._int>>16&255,r=this._int>>8&255,n=this._int&255;return t=t*e+.5|0,r=r*e+.5|0,n=n*e+.5|0,(e*255<<24)+(t<<16)+(r<<8)+n}toHex(){const e=this._int.toString(16);return`#${"000000".substring(0,6-e.length)+e}`}toHexa(){const t=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-t.length)+t}setAlpha(e){return this._components[3]=this._clamp(e),this}round(e){const[t,r,n]=this._components;return this._components[0]=Math.round(t*e)/e,this._components[1]=Math.round(r*e)/e,this._components[2]=Math.round(n*e)/e,this.refreshInt(),this._value=null,this}toArray(e){e=e??[];const[t,r,n,i]=this._components;return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}normalize(e){let t;if((typeof e=="number"||e instanceof Number)&&e>=0&&e<=16777215){const r=e;t=[(r>>16&255)/255,(r>>8&255)/255,(r&255)/255,1]}else if((Array.isArray(e)||e instanceof Float32Array)&&e.length>=3&&e.length<=4){e=this._clamp(e);const[r,n,i,o=1]=e;t=[r,n,i,o]}else if((e instanceof Uint8Array||e instanceof Uint8ClampedArray)&&e.length>=3&&e.length<=4){e=this._clamp(e,0,255);const[r,n,i,o=255]=e;t=[r/255,n/255,i/255,o/255]}else if(typeof e=="string"||typeof e=="object"){if(typeof e=="string"){const n=gi.HEX_PATTERN.exec(e);n&&(e=`#${n[2]}`)}const r=Ur(e);if(r.isValid()){const{r:n,g:i,b:o,a}=r.rgba;t=[n/255,i/255,o/255,a]}}if(t)this._components.set(t),this.refreshInt();else throw new Error(`Unable to convert color ${e}`)}refreshInt(){this._clamp(this._components);const[e,t,r]=this._components;this._int=(e*255<<16)+(t*255<<8)+(r*255|0)}_clamp(e,t=0,r=1){return typeof e=="number"?Math.min(Math.max(e,t),r):(e.forEach((n,i)=>{e[i]=Math.min(Math.max(n,t),r)}),e)}};let Be=gi;Be.shared=new gi,Be.temp=new gi,Be.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;function lo(e,t=[]){return Ht("7.2.0","utils.hex2rgb is deprecated, use Color#toRgbArray instead"),Be.shared.setValue(e).toRgbArray(t)}function Hl(e){return Ht("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),Be.shared.setValue(e).toNumber()}function tw(){const e=[],t=[];for(let n=0;n<32;n++)e[n]=n,t[n]=n;e[Rt.NORMAL_NPM]=Rt.NORMAL,e[Rt.ADD_NPM]=Rt.ADD,e[Rt.SCREEN_NPM]=Rt.SCREEN,t[Rt.NORMAL]=Rt.NORMAL_NPM,t[Rt.ADD]=Rt.ADD_NPM,t[Rt.SCREEN]=Rt.SCREEN_NPM;const r=[];return r.push(t),r.push(e),r}const ew=tw();function Wh(e){if(e.BYTES_PER_ELEMENT===4)return e instanceof Float32Array?"Float32Array":e instanceof Uint32Array?"Uint32Array":"Int32Array";if(e.BYTES_PER_ELEMENT===2){if(e instanceof Uint16Array)return"Uint16Array"}else if(e.BYTES_PER_ELEMENT===1&&e instanceof Uint8Array)return"Uint8Array";return null}function uo(e){return e+=e===0?1:0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1}function Xh(e){return!(e&e-1)&&!!e}function Kh(e){let t=(e>65535?1:0)<<4;e>>>=t;let r=(e>255?1:0)<<3;return e>>>=r,t|=r,r=(e>15?1:0)<<2,e>>>=r,t|=r,r=(e>3?1:0)<<1,e>>>=r,t|=r,t|e>>1}function fo(e,t,r){const n=e.length;let i;if(t>=n||r===0)return;r=t+r>n?n-t:r;const o=n-r;for(i=t;i<o;++i)e[i]=e[i+r];e.length=o}let rw=0;function ls(){return++rw}const Yh={},$r=Object.create(null),hn=Object.create(null);let co;function nw(e,t=globalThis.location){if(e.startsWith("data:"))return"";t=t||globalThis.location,co||(co=document.createElement("a")),co.href=e;const r=qx.parse(co.href),n=!r.port&&t.port===""||r.port===t.port;return r.hostname!==t.hostname||!n||r.protocol!==t.protocol?"anonymous":""}function Zh(e,t=1){var n;const r=(n=Dt.RETINA_PREFIX)==null?void 0:n.exec(e);return r?parseFloat(r[1]):t}var jt=(e=>(e.Renderer="renderer",e.Application="application",e.RendererSystem="renderer-webgl-system",e.RendererPlugin="renderer-webgl-plugin",e.CanvasRendererSystem="renderer-canvas-system",e.CanvasRendererPlugin="renderer-canvas-plugin",e.Asset="asset",e.LoadParser="load-parser",e.ResolveParser="resolve-parser",e.CacheParser="cache-parser",e.DetectionParser="detection-parser",e))(jt||{});const Vl=e=>{if(typeof e=="function"||typeof e=="object"&&e.extension){if(!e.extension)throw new Error("Extension class must have an extension object");e={...typeof e.extension!="object"?{type:e.extension}:e.extension,ref:e}}if(typeof e=="object")e={...e};else throw new Error("Invalid extension type");return typeof e.type=="string"&&(e.type=[e.type]),e},Qh=(e,t)=>Vl(e).priority??t,te={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...e){return e.map(Vl).forEach(t=>{t.type.forEach(r=>{var n,i;return(i=(n=this._removeHandlers)[r])==null?void 0:i.call(n,t)})}),this},add(...e){return e.map(Vl).forEach(t=>{t.type.forEach(r=>{const n=this._addHandlers,i=this._queue;n[r]?n[r](t):(i[r]=i[r]||[],i[r].push(t))})}),this},handle(e,t,r){const n=this._addHandlers,i=this._removeHandlers;if(n[e]||i[e])throw new Error(`Extension type ${e} already has a handler`);n[e]=t,i[e]=r;const o=this._queue;return o[e]&&(o[e].forEach(a=>t(a)),delete o[e]),this},handleByMap(e,t){return this.handle(e,r=>{t[r.name]=r.ref},r=>{delete t[r.name]})},handleByList(e,t,r=-1){return this.handle(e,n=>{t.includes(n.ref)||(t.push(n.ref),t.sort((i,o)=>Qh(o,r)-Qh(i,r)))},n=>{const i=t.indexOf(n.ref);i!==-1&&t.splice(i,1)})}};class iw{constructor(t){typeof t=="number"?this.rawBinaryData=new ArrayBuffer(t):t instanceof Uint8Array?this.rawBinaryData=t.buffer:this.rawBinaryData=t,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get uint16View(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}view(t){return this[`${t}View`]}destroy(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null}static sizeOf(t){switch(t){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${t} isn't a valid view type`)}}}const sw=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
18
+ Deprecated since v${e}`),console.warn(n))),Fh[t]=!0}let Ul;function zx(){return typeof Ul>"u"&&(Ul=function(){var r;const t={stencil:!0,failIfMajorPerformanceCaveat:Dt.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!Dt.ADAPTER.getWebGLRenderingContext())return!1;const n=Dt.ADAPTER.createCanvas();let i=n.getContext("webgl",t)||n.getContext("experimental-webgl",t);const o=!!((r=i==null?void 0:i.getContextAttributes())!=null&&r.stencil);if(i){const a=i.getExtension("WEBGL_lose_context");a&&a.loseContext()}return i=null,o}catch{return!1}}()),Ul}var Hx={grad:.9,turn:360,rad:360/(2*Math.PI)},Wr=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},Ie=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},lr=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},Bh=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Dh=function(e){return{r:lr(e.r,0,255),g:lr(e.g,0,255),b:lr(e.b,0,255),a:lr(e.a)}},$l=function(e){return{r:Ie(e.r),g:Ie(e.g),b:Ie(e.b),a:Ie(e.a,3)}},Vx=/^#([0-9a-f]{3,8})$/i,ao=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Uh=function(e){var t=e.r,r=e.g,n=e.b,i=e.a,o=Math.max(t,r,n),a=o-Math.min(t,r,n),u=a?o===t?(r-n)/a:o===r?2+(n-t)/a:4+(t-r)/a:0;return{h:60*(u<0?u+6:u),s:o?a/o*100:0,v:o/255*100,a:i}},$h=function(e){var t=e.h,r=e.s,n=e.v,i=e.a;t=t/360*6,r/=100,n/=100;var o=Math.floor(t),a=n*(1-r),u=n*(1-(t-o)*r),f=n*(1-(1-t+o)*r),h=o%6;return{r:255*[n,u,a,a,f,n][h],g:255*[f,n,n,u,a,a][h],b:255*[a,a,f,n,n,u][h],a:i}},Gh=function(e){return{h:Bh(e.h),s:lr(e.s,0,100),l:lr(e.l,0,100),a:lr(e.a)}},jh=function(e){return{h:Ie(e.h),s:Ie(e.s),l:Ie(e.l),a:Ie(e.a,3)}},qh=function(e){return $h((r=(t=e).s,{h:t.h,s:(r*=((n=t.l)<50?n:100-n)/100)>0?2*r/(n+r)*100:0,v:n+r,a:t.a}));var t,r,n},as=function(e){return{h:(t=Uh(e)).h,s:(i=(200-(r=t.s))*(n=t.v)/100)>0&&i<200?r*n/100/(i<=100?i:200-i)*100:0,l:i/2,a:t.a};var t,r,n,i},Wx=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Xx=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Kx=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Yx=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Gl={string:[[function(e){var t=Vx.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Ie(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?Ie(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Kx.exec(e)||Yx.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Dh({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Wx.exec(e)||Xx.exec(e);if(!t)return null;var r,n,i=Gh({h:(r=t[1],n=t[2],n===void 0&&(n="deg"),Number(r)*(Hx[n]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return qh(i)},"hsl"]],object:[[function(e){var t=e.r,r=e.g,n=e.b,i=e.a,o=i===void 0?1:i;return Wr(t)&&Wr(r)&&Wr(n)?Dh({r:Number(t),g:Number(r),b:Number(n),a:Number(o)}):null},"rgb"],[function(e){var t=e.h,r=e.s,n=e.l,i=e.a,o=i===void 0?1:i;if(!Wr(t)||!Wr(r)||!Wr(n))return null;var a=Gh({h:Number(t),s:Number(r),l:Number(n),a:Number(o)});return qh(a)},"hsl"],[function(e){var t=e.h,r=e.s,n=e.v,i=e.a,o=i===void 0?1:i;if(!Wr(t)||!Wr(r)||!Wr(n))return null;var a=function(u){return{h:Bh(u.h),s:lr(u.s,0,100),v:lr(u.v,0,100),a:lr(u.a)}}({h:Number(t),s:Number(r),v:Number(n),a:Number(o)});return $h(a)},"hsv"]]},zh=function(e,t){for(var r=0;r<t.length;r++){var n=t[r][0](e);if(n)return[n,t[r][1]]}return[null,void 0]},Zx=function(e){return typeof e=="string"?zh(e.trim(),Gl.string):typeof e=="object"&&e!==null?zh(e,Gl.object):[null,void 0]},jl=function(e,t){var r=as(e);return{h:r.h,s:lr(r.s+100*t,0,100),l:r.l,a:r.a}},ql=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Hh=function(e,t){var r=as(e);return{h:r.h,s:r.s,l:lr(r.l+100*t,0,100),a:r.a}},zl=function(){function e(t){this.parsed=Zx(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return Ie(ql(this.rgba),2)},e.prototype.isDark=function(){return ql(this.rgba)<.5},e.prototype.isLight=function(){return ql(this.rgba)>=.5},e.prototype.toHex=function(){return t=$l(this.rgba),r=t.r,n=t.g,i=t.b,a=(o=t.a)<1?ao(Ie(255*o)):"","#"+ao(r)+ao(n)+ao(i)+a;var t,r,n,i,o,a},e.prototype.toRgb=function(){return $l(this.rgba)},e.prototype.toRgbString=function(){return t=$l(this.rgba),r=t.r,n=t.g,i=t.b,(o=t.a)<1?"rgba("+r+", "+n+", "+i+", "+o+")":"rgb("+r+", "+n+", "+i+")";var t,r,n,i,o},e.prototype.toHsl=function(){return jh(as(this.rgba))},e.prototype.toHslString=function(){return t=jh(as(this.rgba)),r=t.h,n=t.s,i=t.l,(o=t.a)<1?"hsla("+r+", "+n+"%, "+i+"%, "+o+")":"hsl("+r+", "+n+"%, "+i+"%)";var t,r,n,i,o},e.prototype.toHsv=function(){return t=Uh(this.rgba),{h:Ie(t.h),s:Ie(t.s),v:Ie(t.v),a:Ie(t.a,3)};var t},e.prototype.invert=function(){return Ur({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),Ur(jl(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Ur(jl(this.rgba,-t))},e.prototype.grayscale=function(){return Ur(jl(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Ur(Hh(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Ur(Hh(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?Ur({r:(r=this.rgba).r,g:r.g,b:r.b,a:t}):Ie(this.rgba.a,3);var r},e.prototype.hue=function(t){var r=as(this.rgba);return typeof t=="number"?Ur({h:t,s:r.s,l:r.l,a:r.a}):Ie(r.h)},e.prototype.isEqual=function(t){return this.toHex()===Ur(t).toHex()},e}(),Ur=function(e){return e instanceof zl?e:new zl(e)},Vh=[],Qx=function(e){e.forEach(function(t){Vh.indexOf(t)<0&&(t(zl,Gl),Vh.push(t))})};function Jx(e,t){var r={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},n={};for(var i in r)n[r[i]]=i;var o={};e.prototype.toName=function(a){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var u,f,h=n[this.toHex()];if(h)return h;if(a!=null&&a.closest){var d=this.toRgb(),p=1/0,c="black";if(!o.length)for(var v in r)o[v]=new e(r[v]).toRgb();for(var y in r){var b=(u=d,f=o[y],Math.pow(u.r-f.r,2)+Math.pow(u.g-f.g,2)+Math.pow(u.b-f.b,2));b<p&&(p=b,c=y)}return c}},t.string.push([function(a){var u=a.toLowerCase(),f=u==="transparent"?"#0000":r[u];return f?new e(f).toRgb():null},"name"])}Qx([Jx]);const gi=class{constructor(e=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=e}get red(){return this._components[0]}get green(){return this._components[1]}get blue(){return this._components[2]}get alpha(){return this._components[3]}setValue(e){return this.value=e,this}set value(e){if(e instanceof gi)this._value=this.cloneSource(e._value),this._int=e._int,this._components.set(e._components);else{if(e===null)throw new Error("Cannot set PIXI.Color#value to null");(this._value===null||!this.isSourceEqual(this._value,e))&&(this.normalize(e),this._value=this.cloneSource(e))}}get value(){return this._value}cloneSource(e){return typeof e=="string"||typeof e=="number"||e instanceof Number||e===null?e:Array.isArray(e)||ArrayBuffer.isView(e)?e.slice(0):typeof e=="object"&&e!==null?{...e}:e}isSourceEqual(e,t){const r=typeof e;if(r!==typeof t)return!1;if(r==="number"||r==="string"||e instanceof Number)return e===t;if(Array.isArray(e)&&Array.isArray(t)||ArrayBuffer.isView(e)&&ArrayBuffer.isView(t))return e.length!==t.length?!1:e.every((i,o)=>i===t[o]);if(e!==null&&t!==null){const i=Object.keys(e),o=Object.keys(t);return i.length!==o.length?!1:i.every(a=>e[a]===t[a])}return e===t}toRgba(){const[e,t,r,n]=this._components;return{r:e,g:t,b:r,a:n}}toRgb(){const[e,t,r]=this._components;return{r:e,g:t,b:r}}toRgbaString(){const[e,t,r]=this.toUint8RgbArray();return`rgba(${e},${t},${r},${this.alpha})`}toUint8RgbArray(e){const[t,r,n]=this._components;return e=e??[],e[0]=Math.round(t*255),e[1]=Math.round(r*255),e[2]=Math.round(n*255),e}toRgbArray(e){e=e??[];const[t,r,n]=this._components;return e[0]=t,e[1]=r,e[2]=n,e}toNumber(){return this._int}toLittleEndianNumber(){const e=this._int;return(e>>16)+(e&65280)+((e&255)<<16)}multiply(e){const[t,r,n,i]=gi.temp.setValue(e)._components;return this._components[0]*=t,this._components[1]*=r,this._components[2]*=n,this._components[3]*=i,this.refreshInt(),this._value=null,this}premultiply(e,t=!0){return t&&(this._components[0]*=e,this._components[1]*=e,this._components[2]*=e),this._components[3]=e,this.refreshInt(),this._value=null,this}toPremultiplied(e){if(e===1)return(e*255<<24)+this._int;if(e===0)return 0;let t=this._int>>16&255,r=this._int>>8&255,n=this._int&255;return t=t*e+.5|0,r=r*e+.5|0,n=n*e+.5|0,(e*255<<24)+(t<<16)+(r<<8)+n}toHex(){const e=this._int.toString(16);return`#${"000000".substring(0,6-e.length)+e}`}toHexa(){const t=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-t.length)+t}setAlpha(e){return this._components[3]=this._clamp(e),this}round(e){const[t,r,n]=this._components;return this._components[0]=Math.round(t*e)/e,this._components[1]=Math.round(r*e)/e,this._components[2]=Math.round(n*e)/e,this.refreshInt(),this._value=null,this}toArray(e){e=e??[];const[t,r,n,i]=this._components;return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}normalize(e){let t;if((typeof e=="number"||e instanceof Number)&&e>=0&&e<=16777215){const r=e;t=[(r>>16&255)/255,(r>>8&255)/255,(r&255)/255,1]}else if((Array.isArray(e)||e instanceof Float32Array)&&e.length>=3&&e.length<=4){e=this._clamp(e);const[r,n,i,o=1]=e;t=[r,n,i,o]}else if((e instanceof Uint8Array||e instanceof Uint8ClampedArray)&&e.length>=3&&e.length<=4){e=this._clamp(e,0,255);const[r,n,i,o=255]=e;t=[r/255,n/255,i/255,o/255]}else if(typeof e=="string"||typeof e=="object"){if(typeof e=="string"){const n=gi.HEX_PATTERN.exec(e);n&&(e=`#${n[2]}`)}const r=Ur(e);if(r.isValid()){const{r:n,g:i,b:o,a}=r.rgba;t=[n/255,i/255,o/255,a]}}if(t)this._components.set(t),this.refreshInt();else throw new Error(`Unable to convert color ${e}`)}refreshInt(){this._clamp(this._components);const[e,t,r]=this._components;this._int=(e*255<<16)+(t*255<<8)+(r*255|0)}_clamp(e,t=0,r=1){return typeof e=="number"?Math.min(Math.max(e,t),r):(e.forEach((n,i)=>{e[i]=Math.min(Math.max(n,t),r)}),e)}};let Be=gi;Be.shared=new gi,Be.temp=new gi,Be.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;function lo(e,t=[]){return zt("7.2.0","utils.hex2rgb is deprecated, use Color#toRgbArray instead"),Be.shared.setValue(e).toRgbArray(t)}function Hl(e){return zt("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),Be.shared.setValue(e).toNumber()}function tw(){const e=[],t=[];for(let n=0;n<32;n++)e[n]=n,t[n]=n;e[Rt.NORMAL_NPM]=Rt.NORMAL,e[Rt.ADD_NPM]=Rt.ADD,e[Rt.SCREEN_NPM]=Rt.SCREEN,t[Rt.NORMAL]=Rt.NORMAL_NPM,t[Rt.ADD]=Rt.ADD_NPM,t[Rt.SCREEN]=Rt.SCREEN_NPM;const r=[];return r.push(t),r.push(e),r}const ew=tw();function Wh(e){if(e.BYTES_PER_ELEMENT===4)return e instanceof Float32Array?"Float32Array":e instanceof Uint32Array?"Uint32Array":"Int32Array";if(e.BYTES_PER_ELEMENT===2){if(e instanceof Uint16Array)return"Uint16Array"}else if(e.BYTES_PER_ELEMENT===1&&e instanceof Uint8Array)return"Uint8Array";return null}function uo(e){return e+=e===0?1:0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1}function Xh(e){return!(e&e-1)&&!!e}function Kh(e){let t=(e>65535?1:0)<<4;e>>>=t;let r=(e>255?1:0)<<3;return e>>>=r,t|=r,r=(e>15?1:0)<<2,e>>>=r,t|=r,r=(e>3?1:0)<<1,e>>>=r,t|=r,t|e>>1}function fo(e,t,r){const n=e.length;let i;if(t>=n||r===0)return;r=t+r>n?n-t:r;const o=n-r;for(i=t;i<o;++i)e[i]=e[i+r];e.length=o}let rw=0;function ls(){return++rw}const Yh={},$r=Object.create(null),hn=Object.create(null);let co;function nw(e,t=globalThis.location){if(e.startsWith("data:"))return"";t=t||globalThis.location,co||(co=document.createElement("a")),co.href=e;const r=qx.parse(co.href),n=!r.port&&t.port===""||r.port===t.port;return r.hostname!==t.hostname||!n||r.protocol!==t.protocol?"anonymous":""}function Zh(e,t=1){var n;const r=(n=Dt.RETINA_PREFIX)==null?void 0:n.exec(e);return r?parseFloat(r[1]):t}var jt=(e=>(e.Renderer="renderer",e.Application="application",e.RendererSystem="renderer-webgl-system",e.RendererPlugin="renderer-webgl-plugin",e.CanvasRendererSystem="renderer-canvas-system",e.CanvasRendererPlugin="renderer-canvas-plugin",e.Asset="asset",e.LoadParser="load-parser",e.ResolveParser="resolve-parser",e.CacheParser="cache-parser",e.DetectionParser="detection-parser",e))(jt||{});const Vl=e=>{if(typeof e=="function"||typeof e=="object"&&e.extension){if(!e.extension)throw new Error("Extension class must have an extension object");e={...typeof e.extension!="object"?{type:e.extension}:e.extension,ref:e}}if(typeof e=="object")e={...e};else throw new Error("Invalid extension type");return typeof e.type=="string"&&(e.type=[e.type]),e},Qh=(e,t)=>Vl(e).priority??t,te={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...e){return e.map(Vl).forEach(t=>{t.type.forEach(r=>{var n,i;return(i=(n=this._removeHandlers)[r])==null?void 0:i.call(n,t)})}),this},add(...e){return e.map(Vl).forEach(t=>{t.type.forEach(r=>{const n=this._addHandlers,i=this._queue;n[r]?n[r](t):(i[r]=i[r]||[],i[r].push(t))})}),this},handle(e,t,r){const n=this._addHandlers,i=this._removeHandlers;if(n[e]||i[e])throw new Error(`Extension type ${e} already has a handler`);n[e]=t,i[e]=r;const o=this._queue;return o[e]&&(o[e].forEach(a=>t(a)),delete o[e]),this},handleByMap(e,t){return this.handle(e,r=>{t[r.name]=r.ref},r=>{delete t[r.name]})},handleByList(e,t,r=-1){return this.handle(e,n=>{t.includes(n.ref)||(t.push(n.ref),t.sort((i,o)=>Qh(o,r)-Qh(i,r)))},n=>{const i=t.indexOf(n.ref);i!==-1&&t.splice(i,1)})}};class iw{constructor(t){typeof t=="number"?this.rawBinaryData=new ArrayBuffer(t):t instanceof Uint8Array?this.rawBinaryData=t.buffer:this.rawBinaryData=t,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get uint16View(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}view(t){return this[`${t}View`]}destroy(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null}static sizeOf(t){switch(t){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${t} isn't a valid view type`)}}}const sw=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
19
19
  `);function ow(e){let t="";for(let r=0;r<e;++r)r>0&&(t+=`
20
20
  else `),r<e-1&&(t+=`if(test == ${r}.0){}`);return t}function aw(e,t){if(e===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const r=t.createShader(t.FRAGMENT_SHADER);for(;;){const n=sw.replace(/%forloop%/gi,ow(e));if(t.shaderSource(r,n),t.compileShader(r),!t.getShaderParameter(r,t.COMPILE_STATUS))e=e/2|0;else break}return e}const Wl=0,Xl=1,Kl=2,Yl=3,Zl=4,Ql=5;let ho=class ny{constructor(){this.data=0,this.blendMode=Rt.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<Wl)}set blend(t){!!(this.data&1<<Wl)!==t&&(this.data^=1<<Wl)}get offsets(){return!!(this.data&1<<Xl)}set offsets(t){!!(this.data&1<<Xl)!==t&&(this.data^=1<<Xl)}get culling(){return!!(this.data&1<<Kl)}set culling(t){!!(this.data&1<<Kl)!==t&&(this.data^=1<<Kl)}get depthTest(){return!!(this.data&1<<Yl)}set depthTest(t){!!(this.data&1<<Yl)!==t&&(this.data^=1<<Yl)}get depthMask(){return!!(this.data&1<<Ql)}set depthMask(t){!!(this.data&1<<Ql)!==t&&(this.data^=1<<Ql)}get clockwiseFrontFace(){return!!(this.data&1<<Zl)}set clockwiseFrontFace(t){!!(this.data&1<<Zl)!==t&&(this.data^=1<<Zl)}get blendMode(){return this._blendMode}set blendMode(t){this.blend=t!==Rt.NONE,this._blendMode=t}get polygonOffset(){return this._polygonOffset}set polygonOffset(t){this.offsets=!!t,this._polygonOffset=t}toString(){return`[@pixi/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`}static for2d(){const t=new ny;return t.depthTest=!1,t.blend=!0,t}};const Jl=[];function Jh(e,t){if(!e)return null;let r="";if(typeof e=="string"){const n=/\.(\w{3,4})(?:$|\?|#)/i.exec(e);n&&(r=n[1].toLowerCase())}for(let n=Jl.length-1;n>=0;--n){const i=Jl[n];if(i.test&&i.test(e,r))return new i(e,t)}throw new Error("Unrecognized source type to auto-detect Resource")}class _r{constructor(t){this.items=[],this._name=t,this._aliasCount=0}emit(t,r,n,i,o,a,u,f){if(arguments.length>8)throw new Error("max arguments reached");const{name:h,items:d}=this;this._aliasCount++;for(let p=0,c=d.length;p<c;p++)d[p][h](t,r,n,i,o,a,u,f);return d===this.items&&this._aliasCount--,this}ensureNonAliasedItems(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this}remove(t){const r=this.items.indexOf(t);return r!==-1&&(this.ensureNonAliasedItems(),this.items.splice(r,1)),this}contains(t){return this.items.includes(t)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items=null,this._name=null}get empty(){return this.items.length===0}get name(){return this._name}}Object.defineProperties(_r.prototype,{dispatch:{value:_r.prototype.emit},run:{value:_r.prototype.emit}});class us{constructor(t=0,r=0){this._width=t,this._height=r,this.destroyed=!1,this.internal=!1,this.onResize=new _r("setRealSize"),this.onUpdate=new _r("update"),this.onError=new _r("onError")}bind(t){this.onResize.add(t),this.onUpdate.add(t),this.onError.add(t),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(t){this.onResize.remove(t),this.onUpdate.remove(t),this.onError.remove(t)}resize(t,r){(t!==this._width||r!==this._height)&&(this._width=t,this._height=r,this.onResize.emit(t,r))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(t,r,n){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(t,r){return!1}}class tu extends us{constructor(t,r){const{width:n,height:i}=r||{};if(!n||!i)throw new Error("BufferResource width or height invalid");super(n,i),this.data=t}upload(t,r,n){const i=t.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===ln.UNPACK);const o=r.realWidth,a=r.realHeight;return n.width===o&&n.height===a?i.texSubImage2D(r.target,0,0,0,o,a,r.format,n.type,this.data):(n.width=o,n.height=a,i.texImage2D(r.target,0,n.internalFormat,o,a,0,r.format,n.type,this.data)),!0}dispose(){this.data=null}static test(t){return t instanceof Float32Array||t instanceof Uint8Array||t instanceof Uint32Array}}const lw={scaleMode:Lr.NEAREST,format:_t.RGBA,alphaMode:ln.NPM},mi=class extends Vs{constructor(e=null,t=null){super(),t=Object.assign({},mi.defaultOptions,t);const{alphaMode:r,mipmap:n,anisotropicLevel:i,scaleMode:o,width:a,height:u,wrapMode:f,format:h,type:d,target:p,resolution:c,resourceOptions:v}=t;e&&!(e instanceof us)&&(e=Jh(e,v),e.internal=!0),this.resolution=c||Dt.RESOLUTION,this.width=Math.round((a||0)*this.resolution)/this.resolution,this.height=Math.round((u||0)*this.resolution)/this.resolution,this._mipmap=n,this.anisotropicLevel=i,this._wrapMode=f,this._scaleMode=o,this.format=h,this.type=d,this.target=p,this.alphaMode=r,this.uid=ls(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=a>0&&u>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(e)}get realWidth(){return Math.round(this.width*this.resolution)}get realHeight(){return Math.round(this.height*this.resolution)}get mipmap(){return this._mipmap}set mipmap(e){this._mipmap!==e&&(this._mipmap=e,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(e){this._scaleMode!==e&&(this._scaleMode=e,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(e){this._wrapMode!==e&&(this._wrapMode=e,this.dirtyStyleId++)}setStyle(e,t){let r;return e!==void 0&&e!==this.scaleMode&&(this.scaleMode=e,r=!0),t!==void 0&&t!==this.mipmap&&(this.mipmap=t,r=!0),r&&this.dirtyStyleId++,this}setSize(e,t,r){return r=r||this.resolution,this.setRealSize(e*r,t*r,r)}setRealSize(e,t,r){return this.resolution=r||this.resolution,this.width=Math.round(e)/this.resolution,this.height=Math.round(t)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=Xh(this.realWidth)&&Xh(this.realHeight)}setResolution(e){const t=this.resolution;return t===e?this:(this.resolution=e,this.valid&&(this.width=Math.round(this.width*t)/e,this.height=Math.round(this.height*t)/e,this.emit("update",this)),this._refreshPOT(),this)}setResource(e){if(this.resource===e)return this;if(this.resource)throw new Error("Resource can be set only once");return e.bind(this),this.resource=e,this}update(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))}onError(e){this.emit("error",this,e)}destroy(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete hn[this.cacheId],delete $r[this.cacheId],this.cacheId=null),this.dispose(),mi.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(e,t,r=Dt.STRICT_TEXTURE_CACHE){const n=typeof e=="string";let i=null;if(n)i=e;else{if(!e._pixiId){const a=(t==null?void 0:t.pixiIdPrefix)||"pixiid";e._pixiId=`${a}_${ls()}`}i=e._pixiId}let o=hn[i];if(n&&r&&!o)throw new Error(`The cacheId "${i}" does not exist in BaseTextureCache.`);return o||(o=new mi(e,t),o.cacheId=i,mi.addToCache(o,i)),o}static fromBuffer(e,t,r,n){e=e||new Float32Array(t*r*4);const i=new tu(e,{width:t,height:r}),o=e instanceof Float32Array?Xt.FLOAT:Xt.UNSIGNED_BYTE;return new mi(i,Object.assign({},lw,n||{width:t,height:r,type:o}))}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),hn[t]&&hn[t]!==e&&console.warn(`BaseTexture added to the cache with an id [${t}] that already had an entry`),hn[t]=e)}static removeFromCache(e){if(typeof e=="string"){const t=hn[e];if(t){const r=t.textureCacheIds.indexOf(e);return r>-1&&t.textureCacheIds.splice(r,1),delete hn[e],t}}else if(e!=null&&e.textureCacheIds){for(let t=0;t<e.textureCacheIds.length;++t)delete hn[e.textureCacheIds[t]];return e.textureCacheIds.length=0,e}return null}};let Kt=mi;Kt.defaultOptions={mipmap:Rn.POW2,anisotropicLevel:0,scaleMode:Lr.LINEAR,wrapMode:Qi.CLAMP,alphaMode:ln.UNPACK,target:ii.TEXTURE_2D,format:_t.RGBA,type:Xt.UNSIGNED_BYTE},Kt._globalBatch=0;class eu{constructor(){this.texArray=null,this.blend=0,this.type=an.TRIANGLES,this.start=0,this.size=0,this.data=null}}let uw=0,Qe=class iy{constructor(t,r=!0,n=!1){this.data=t||new Float32Array(1),this._glBuffers={},this._updateID=0,this.index=n,this.static=r,this.id=uw++,this.disposeRunner=new _r("disposeBuffer")}update(t){t instanceof Array&&(t=new Float32Array(t)),this.data=t||this.data,this._updateID++}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.data=null}set index(t){this.type=t?Fr.ELEMENT_ARRAY_BUFFER:Fr.ARRAY_BUFFER}get index(){return this.type===Fr.ELEMENT_ARRAY_BUFFER}static from(t){return t instanceof Array&&(t=new Float32Array(t)),new iy(t)}};class po{constructor(t,r=0,n=!1,i=Xt.FLOAT,o,a,u,f=1){this.buffer=t,this.size=r,this.normalized=n,this.type=i,this.stride=o,this.start=a,this.instance=u,this.divisor=f}destroy(){this.buffer=null}static from(t,r,n,i,o){return new po(t,r,n,i,o)}}const fw={Float32Array,Uint32Array,Int32Array,Uint8Array};function cw(e,t){let r=0,n=0;const i={};for(let f=0;f<e.length;f++)n+=t[f],r+=e[f].length;const o=new ArrayBuffer(r*4);let a=null,u=0;for(let f=0;f<e.length;f++){const h=t[f],d=e[f],p=Wh(d);i[p]||(i[p]=new fw[p](o)),a=i[p];for(let c=0;c<d.length;c++){const v=(c/h|0)*n+u,y=c%h;a[v+y]=d[c]}u+=h}return new Float32Array(o)}const td={5126:4,5123:2,5121:1};let hw=0;const dw={Float32Array,Uint32Array,Int32Array,Uint8Array,Uint16Array};class yi{constructor(t=[],r={}){this.buffers=t,this.indexBuffer=null,this.attributes=r,this.glVertexArrayObjects={},this.id=hw++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new _r("disposeGeometry"),this.refCount=0}addAttribute(t,r,n=0,i=!1,o,a,u,f=!1){if(!r)throw new Error("You must pass a buffer when creating an attribute");r instanceof Qe||(r instanceof Array&&(r=new Float32Array(r)),r=new Qe(r));const h=t.split("|");if(h.length>1){for(let p=0;p<h.length;p++)this.addAttribute(h[p],r,n,i,o);return this}let d=this.buffers.indexOf(r);return d===-1&&(this.buffers.push(r),d=this.buffers.length-1),this.attributes[t]=new po(d,n,i,o,a,u,f),this.instanced=this.instanced||f,this}getAttribute(t){return this.attributes[t]}getBuffer(t){return this.buffers[this.getAttribute(t).buffer]}addIndex(t){return t instanceof Qe||(t instanceof Array&&(t=new Uint16Array(t)),t=new Qe(t)),t.type=Fr.ELEMENT_ARRAY_BUFFER,this.indexBuffer=t,this.buffers.includes(t)||this.buffers.push(t),this}getIndex(){return this.indexBuffer}interleave(){if(this.buffers.length===1||this.buffers.length===2&&this.indexBuffer)return this;const t=[],r=[],n=new Qe;let i;for(i in this.attributes){const o=this.attributes[i],a=this.buffers[o.buffer];t.push(a.data),r.push(o.size*td[o.type]/4),o.buffer=0}for(n.data=cw(t,r),i=0;i<this.buffers.length;i++)this.buffers[i]!==this.indexBuffer&&this.buffers[i].destroy();return this.buffers=[n],this.indexBuffer&&this.buffers.push(this.indexBuffer),this}getSize(){for(const t in this.attributes){const r=this.attributes[t];return this.buffers[r.buffer].data.length/(r.stride/4||r.size)}return 0}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.buffers=null,this.indexBuffer=null,this.attributes=null}clone(){const t=new yi;for(let r=0;r<this.buffers.length;r++)t.buffers[r]=new Qe(this.buffers[r].data.slice(0));for(const r in this.attributes){const n=this.attributes[r];t.attributes[r]=new po(n.buffer,n.size,n.normalized,n.type,n.stride,n.start,n.instance)}return this.indexBuffer&&(t.indexBuffer=t.buffers[this.buffers.indexOf(this.indexBuffer)],t.indexBuffer.type=Fr.ELEMENT_ARRAY_BUFFER),t}static merge(t){const r=new yi,n=[],i=[],o=[];let a;for(let u=0;u<t.length;u++){a=t[u];for(let f=0;f<a.buffers.length;f++)i[f]=i[f]||0,i[f]+=a.buffers[f].data.length,o[f]=0}for(let u=0;u<a.buffers.length;u++)n[u]=new dw[Wh(a.buffers[u].data)](i[u]),r.buffers[u]=new Qe(n[u]);for(let u=0;u<t.length;u++){a=t[u];for(let f=0;f<a.buffers.length;f++)n[f].set(a.buffers[f].data,o[f]),o[f]+=a.buffers[f].data.length}if(r.attributes=a.attributes,a.indexBuffer){r.indexBuffer=r.buffers[a.buffers.indexOf(a.indexBuffer)],r.indexBuffer.type=Fr.ELEMENT_ARRAY_BUFFER;let u=0,f=0,h=0,d=0;for(let p=0;p<a.buffers.length;p++)if(a.buffers[p]!==a.indexBuffer){d=p;break}for(const p in a.attributes){const c=a.attributes[p];(c.buffer|0)===d&&(f+=c.size*td[c.type]/4)}for(let p=0;p<t.length;p++){const c=t[p].indexBuffer.data;for(let v=0;v<c.length;v++)r.indexBuffer.data[v+h]+=u;u+=t[p].buffers[d].data.length/f,h+=c.length}}return r}}class ed extends yi{constructor(t=!1){super(),this._buffer=new Qe(null,t,!1),this._indexBuffer=new Qe(null,t,!0),this.addAttribute("aVertexPosition",this._buffer,2,!1,Xt.FLOAT).addAttribute("aTextureCoord",this._buffer,2,!1,Xt.FLOAT).addAttribute("aColor",this._buffer,4,!0,Xt.UNSIGNED_BYTE).addAttribute("aTextureId",this._buffer,1,!0,Xt.FLOAT).addIndex(this._indexBuffer)}}const vo=Math.PI*2,pw=180/Math.PI,fs=Math.PI/180;var Ne=(e=>(e[e.POLY=0]="POLY",e[e.RECT=1]="RECT",e[e.CIRC=2]="CIRC",e[e.ELIP=3]="ELIP",e[e.RREC=4]="RREC",e))(Ne||{});class se{constructor(t=0,r=0){this.x=0,this.y=0,this.x=t,this.y=r}clone(){return new se(this.x,this.y)}copyFrom(t){return this.set(t.x,t.y),this}copyTo(t){return t.set(this.x,this.y),t}equals(t){return t.x===this.x&&t.y===this.y}set(t=0,r=t){return this.x=t,this.y=r,this}toString(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`}}const go=[new se,new se,new se,new se];class ne{constructor(t=0,r=0,n=0,i=0){this.x=Number(t),this.y=Number(r),this.width=Number(n),this.height=Number(i),this.type=Ne.RECT}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}static get EMPTY(){return new ne(0,0,0,0)}clone(){return new ne(this.x,this.y,this.width,this.height)}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t}contains(t,r){return this.width<=0||this.height<=0?!1:t>=this.x&&t<this.x+this.width&&r>=this.y&&r<this.y+this.height}intersects(t,r){if(!r){const O=this.x<t.x?t.x:this.x;if((this.right>t.right?t.right:this.right)<=O)return!1;const R=this.y<t.y?t.y:this.y;return(this.bottom>t.bottom?t.bottom:this.bottom)>R}const n=this.left,i=this.right,o=this.top,a=this.bottom;if(i<=n||a<=o)return!1;const u=go[0].set(t.left,t.top),f=go[1].set(t.left,t.bottom),h=go[2].set(t.right,t.top),d=go[3].set(t.right,t.bottom);if(h.x<=u.x||f.y<=u.y)return!1;const p=Math.sign(r.a*r.d-r.b*r.c);if(p===0||(r.apply(u,u),r.apply(f,f),r.apply(h,h),r.apply(d,d),Math.max(u.x,f.x,h.x,d.x)<=n||Math.min(u.x,f.x,h.x,d.x)>=i||Math.max(u.y,f.y,h.y,d.y)<=o||Math.min(u.y,f.y,h.y,d.y)>=a))return!1;const c=p*(f.y-u.y),v=p*(u.x-f.x),y=c*n+v*o,b=c*i+v*o,_=c*n+v*a,m=c*i+v*a;if(Math.max(y,b,_,m)<=c*u.x+v*u.y||Math.min(y,b,_,m)>=c*d.x+v*d.y)return!1;const w=p*(u.y-h.y),T=p*(h.x-u.x),x=w*n+T*o,E=w*i+T*o,I=w*n+T*a,A=w*i+T*a;return!(Math.max(x,E,I,A)<=w*u.x+T*u.y||Math.min(x,E,I,A)>=w*d.x+T*d.y)}pad(t=0,r=t){return this.x-=t,this.y-=r,this.width+=t*2,this.height+=r*2,this}fit(t){const r=Math.max(this.x,t.x),n=Math.min(this.x+this.width,t.x+t.width),i=Math.max(this.y,t.y),o=Math.min(this.y+this.height,t.y+t.height);return this.x=r,this.width=Math.max(n-r,0),this.y=i,this.height=Math.max(o-i,0),this}ceil(t=1,r=.001){const n=Math.ceil((this.x+this.width-r)*t)/t,i=Math.ceil((this.y+this.height-r)*t)/t;return this.x=Math.floor((this.x+r)*t)/t,this.y=Math.floor((this.y+r)*t)/t,this.width=n-this.x,this.height=i-this.y,this}enlarge(t){const r=Math.min(this.x,t.x),n=Math.max(this.x+this.width,t.x+t.width),i=Math.min(this.y,t.y),o=Math.max(this.y+this.height,t.y+t.height);return this.x=r,this.width=n-r,this.y=i,this.height=o-i,this}toString(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}class ru{constructor(t=0,r=0,n=0){this.x=t,this.y=r,this.radius=n,this.type=Ne.CIRC}clone(){return new ru(this.x,this.y,this.radius)}contains(t,r){if(this.radius<=0)return!1;const n=this.radius*this.radius;let i=this.x-t,o=this.y-r;return i*=i,o*=o,i+o<=n}getBounds(){return new ne(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)}toString(){return`[@pixi/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`}}let vw=class sy{constructor(t=0,r=0,n=0,i=0){this.x=t,this.y=r,this.width=n,this.height=i,this.type=Ne.ELIP}clone(){return new sy(this.x,this.y,this.width,this.height)}contains(t,r){if(this.width<=0||this.height<=0)return!1;let n=(t-this.x)/this.width,i=(r-this.y)/this.height;return n*=n,i*=i,n+i<=1}getBounds(){return new ne(this.x-this.width,this.y-this.height,this.width,this.height)}toString(){return`[@pixi/math:Ellipse x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}};class cs{constructor(...t){let r=Array.isArray(t[0])?t[0]:t;if(typeof r[0]!="number"){const n=[];for(let i=0,o=r.length;i<o;i++)n.push(r[i].x,r[i].y);r=n}this.points=r,this.type=Ne.POLY,this.closeStroke=!0}clone(){const t=this.points.slice(),r=new cs(t);return r.closeStroke=this.closeStroke,r}contains(t,r){let n=!1;const i=this.points.length/2;for(let o=0,a=i-1;o<i;a=o++){const u=this.points[o*2],f=this.points[o*2+1],h=this.points[a*2],d=this.points[a*2+1];f>r!=d>r&&t<(h-u)*((r-f)/(d-f))+u&&(n=!n)}return n}toString(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((t,r)=>`${t}, ${r}`,"")}]`}}class nu{constructor(t=0,r=0,n=0,i=0,o=20){this.x=t,this.y=r,this.width=n,this.height=i,this.radius=o,this.type=Ne.RREC}clone(){return new nu(this.x,this.y,this.width,this.height,this.radius)}contains(t,r){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&r>=this.y&&r<=this.y+this.height){const n=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(r>=this.y+n&&r<=this.y+this.height-n||t>=this.x+n&&t<=this.x+this.width-n)return!0;let i=t-(this.x+n),o=r-(this.y+n);const a=n*n;if(i*i+o*o<=a||(i=t-(this.x+this.width-n),i*i+o*o<=a)||(o=r-(this.y+this.height-n),i*i+o*o<=a)||(i=t-(this.x+n),i*i+o*o<=a))return!0}return!1}toString(){return`[@pixi/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}}let $e=class qa{constructor(t=1,r=0,n=0,i=1,o=0,a=0){this.array=null,this.a=t,this.b=r,this.c=n,this.d=i,this.tx=o,this.ty=a}fromArray(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]}set(t,r,n,i,o,a){return this.a=t,this.b=r,this.c=n,this.d=i,this.tx=o,this.ty=a,this}toArray(t,r){this.array||(this.array=new Float32Array(9));const n=r||this.array;return t?(n[0]=this.a,n[1]=this.b,n[2]=0,n[3]=this.c,n[4]=this.d,n[5]=0,n[6]=this.tx,n[7]=this.ty,n[8]=1):(n[0]=this.a,n[1]=this.c,n[2]=this.tx,n[3]=this.b,n[4]=this.d,n[5]=this.ty,n[6]=0,n[7]=0,n[8]=1),n}apply(t,r){r=r||new se;const n=t.x,i=t.y;return r.x=this.a*n+this.c*i+this.tx,r.y=this.b*n+this.d*i+this.ty,r}applyInverse(t,r){r=r||new se;const n=1/(this.a*this.d+this.c*-this.b),i=t.x,o=t.y;return r.x=this.d*n*i+-this.c*n*o+(this.ty*this.c-this.tx*this.d)*n,r.y=this.a*n*o+-this.b*n*i+(-this.ty*this.a+this.tx*this.b)*n,r}translate(t,r){return this.tx+=t,this.ty+=r,this}scale(t,r){return this.a*=t,this.d*=r,this.c*=t,this.b*=r,this.tx*=t,this.ty*=r,this}rotate(t){const r=Math.cos(t),n=Math.sin(t),i=this.a,o=this.c,a=this.tx;return this.a=i*r-this.b*n,this.b=i*n+this.b*r,this.c=o*r-this.d*n,this.d=o*n+this.d*r,this.tx=a*r-this.ty*n,this.ty=a*n+this.ty*r,this}append(t){const r=this.a,n=this.b,i=this.c,o=this.d;return this.a=t.a*r+t.b*i,this.b=t.a*n+t.b*o,this.c=t.c*r+t.d*i,this.d=t.c*n+t.d*o,this.tx=t.tx*r+t.ty*i+this.tx,this.ty=t.tx*n+t.ty*o+this.ty,this}setTransform(t,r,n,i,o,a,u,f,h){return this.a=Math.cos(u+h)*o,this.b=Math.sin(u+h)*o,this.c=-Math.sin(u-f)*a,this.d=Math.cos(u-f)*a,this.tx=t-(n*this.a+i*this.c),this.ty=r-(n*this.b+i*this.d),this}prepend(t){const r=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){const n=this.a,i=this.c;this.a=n*t.a+this.b*t.c,this.b=n*t.b+this.b*t.d,this.c=i*t.a+this.d*t.c,this.d=i*t.b+this.d*t.d}return this.tx=r*t.a+this.ty*t.c+t.tx,this.ty=r*t.b+this.ty*t.d+t.ty,this}decompose(t){const r=this.a,n=this.b,i=this.c,o=this.d,a=t.pivot,u=-Math.atan2(-i,o),f=Math.atan2(n,r),h=Math.abs(u+f);return h<1e-5||Math.abs(vo-h)<1e-5?(t.rotation=f,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=u,t.skew.y=f),t.scale.x=Math.sqrt(r*r+n*n),t.scale.y=Math.sqrt(i*i+o*o),t.position.x=this.tx+(a.x*r+a.y*i),t.position.y=this.ty+(a.x*n+a.y*o),t}invert(){const t=this.a,r=this.b,n=this.c,i=this.d,o=this.tx,a=t*i-r*n;return this.a=i/a,this.b=-r/a,this.c=-n/a,this.d=t/a,this.tx=(n*this.ty-i*o)/a,this.ty=-(t*this.ty-r*o)/a,this}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const t=new qa;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyTo(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyFrom(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this}toString(){return`[@pixi/math:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return new qa}static get TEMP_MATRIX(){return new qa}};const Ln=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Fn=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Bn=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Dn=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],iu=[],rd=[],mo=Math.sign;function gw(){for(let e=0;e<16;e++){const t=[];iu.push(t);for(let r=0;r<16;r++){const n=mo(Ln[e]*Ln[r]+Bn[e]*Fn[r]),i=mo(Fn[e]*Ln[r]+Dn[e]*Fn[r]),o=mo(Ln[e]*Bn[r]+Bn[e]*Dn[r]),a=mo(Fn[e]*Bn[r]+Dn[e]*Dn[r]);for(let u=0;u<16;u++)if(Ln[u]===n&&Fn[u]===i&&Bn[u]===o&&Dn[u]===a){t.push(u);break}}}for(let e=0;e<16;e++){const t=new $e;t.set(Ln[e],Fn[e],Bn[e],Dn[e],0,0),rd.push(t)}}gw();const ve={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:e=>Ln[e],uY:e=>Fn[e],vX:e=>Bn[e],vY:e=>Dn[e],inv:e=>e&8?e&15:-e&7,add:(e,t)=>iu[e][t],sub:(e,t)=>iu[e][ve.inv(t)],rotate180:e=>e^4,isVertical:e=>(e&3)===2,byDirection:(e,t)=>Math.abs(e)*2<=Math.abs(t)?t>=0?ve.S:ve.N:Math.abs(t)*2<=Math.abs(e)?e>0?ve.E:ve.W:t>0?e>0?ve.SE:ve.SW:e>0?ve.NE:ve.NW,matrixAppendRotationInv:(e,t,r=0,n=0)=>{const i=rd[ve.inv(t)];i.tx=r,i.ty=n,e.append(i)}};class Un{constructor(t,r,n=0,i=0){this._x=n,this._y=i,this.cb=t,this.scope=r}clone(t=this.cb,r=this.scope){return new Un(t,r,this._x,this._y)}set(t=0,r=t){return(this._x!==t||this._y!==r)&&(this._x=t,this._y=r,this.cb.call(this.scope)),this}copyFrom(t){return(this._x!==t.x||this._y!==t.y)&&(this._x=t.x,this._y=t.y,this.cb.call(this.scope)),this}copyTo(t){return t.set(this._x,this._y),t}equals(t){return t.x===this._x&&t.y===this._y}toString(){return`[@pixi/math:ObservablePoint x=0 y=0 scope=${this.scope}]`}get x(){return this._x}set x(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))}get y(){return this._y}set y(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))}}const nd=class{constructor(){this.worldTransform=new $e,this.localTransform=new $e,this.position=new Un(this.onChange,this,0,0),this.scale=new Un(this.onChange,this,1,1),this.pivot=new Un(this.onChange,this,0,0),this.skew=new Un(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}onChange(){this._localID++}updateSkew(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++}toString(){return`[@pixi/math:Transform position=(${this.position.x}, ${this.position.y}) rotation=${this.rotation} scale=(${this.scale.x}, ${this.scale.y}) skew=(${this.skew.x}, ${this.skew.y}) ]`}updateLocalTransform(){const e=this.localTransform;this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1)}updateTransform(e){const t=this.localTransform;if(this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==e._worldID){const r=e.worldTransform,n=this.worldTransform;n.a=t.a*r.a+t.b*r.c,n.b=t.a*r.b+t.b*r.d,n.c=t.c*r.a+t.d*r.c,n.d=t.c*r.b+t.d*r.d,n.tx=t.tx*r.a+t.ty*r.c+r.tx,n.ty=t.tx*r.b+t.ty*r.d+r.ty,this._parentID=e._worldID,this._worldID++}}setFromMatrix(e){e.decompose(this),this._localID++}get rotation(){return this._rotation}set rotation(e){this._rotation!==e&&(this._rotation=e,this.updateSkew())}};let su=nd;su.IDENTITY=new nd;var mw=`varying vec2 vTextureCoord;
21
21
 
@@ -350,7 +350,7 @@ void main(void){
350
350
  vTextureId = aTextureId;
351
351
  vColor = aColor * tint;
352
352
  }
353
- `;const xr=class extends hd{constructor(e){super(e),this.setShaderGenerator(),this.geometryClass=ed,this.vertexSize=6,this.state=ho.for2d(),this.size=xr.defaultBatchSize*4,this._vertexCount=0,this._indexCount=0,this._bufferedElements=[],this._bufferedTextures=[],this._bufferSize=0,this._shader=null,this._packedGeometries=[],this._packedGeometryPoolSize=2,this._flushId=0,this._aBuffers={},this._iBuffers={},this.maxTextures=1,this.renderer.on("prerender",this.onPrerender,this),e.runners.contextChange.add(this),this._dcIndex=0,this._aIndex=0,this._iIndex=0,this._attributeBuffer=null,this._indexBuffer=null,this._tempBoundTextures=[]}static get defaultMaxTextures(){return this._defaultMaxTextures=this._defaultMaxTextures??Pw(32),this._defaultMaxTextures}static set defaultMaxTextures(e){this._defaultMaxTextures=e}static get canUploadSameBuffer(){return this._canUploadSameBuffer=this._canUploadSameBuffer??Iw(),this._canUploadSameBuffer}static set canUploadSameBuffer(e){this._canUploadSameBuffer=e}get MAX_TEXTURES(){return Ht("7.1.0","BatchRenderer#MAX_TEXTURES renamed to BatchRenderer#maxTextures"),this.maxTextures}static get defaultVertexSrc(){return Mw}static get defaultFragmentTemplate(){return Nw}setShaderGenerator({vertex:e=xr.defaultVertexSrc,fragment:t=xr.defaultFragmentTemplate}={}){this.shaderGenerator=new Rw(e,t)}contextChange(){const e=this.renderer.gl;Dt.PREFER_ENV===Cn.WEBGL_LEGACY?this.maxTextures=1:(this.maxTextures=Math.min(e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),xr.defaultMaxTextures),this.maxTextures=aw(this.maxTextures,e)),this._shader=this.shaderGenerator.generateShader(this.maxTextures);for(let t=0;t<this._packedGeometryPoolSize;t++)this._packedGeometries[t]=new this.geometryClass;this.initFlushBuffers()}initFlushBuffers(){const{_drawCallPool:e,_textureArrayPool:t}=xr,r=this.size/4,n=Math.floor(r/this.maxTextures)+1;for(;e.length<r;)e.push(new eu);for(;t.length<n;)t.push(new au);for(let i=0;i<this.maxTextures;i++)this._tempBoundTextures[i]=null}onPrerender(){this._flushId=0}render(e){e._texture.valid&&(this._vertexCount+e.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)}buildTexturesAndDrawCalls(){const{_bufferedTextures:e,maxTextures:t}=this,r=xr._textureArrayPool,n=this.renderer.batch,i=this._tempBoundTextures,o=this.renderer.textureGC.count;let a=++Kt._globalBatch,u=0,f=r[0],h=0;n.copyBoundTextures(i,t);for(let d=0;d<this._bufferSize;++d){const p=e[d];e[d]=null,p._batchEnabled!==a&&(f.count>=t&&(n.boundArray(f,i,a,t),this.buildDrawCalls(f,h,d),h=d,f=r[++u],++a),p._batchEnabled=a,p.touched=o,f.elements[f.count++]=p)}f.count>0&&(n.boundArray(f,i,a,t),this.buildDrawCalls(f,h,this._bufferSize),++u,++a);for(let d=0;d<i.length;d++)i[d]=null;Kt._globalBatch=a}buildDrawCalls(e,t,r){const{_bufferedElements:n,_attributeBuffer:i,_indexBuffer:o,vertexSize:a}=this,u=xr._drawCallPool;let f=this._dcIndex,h=this._aIndex,d=this._iIndex,p=u[f];p.start=this._iIndex,p.texArray=e;for(let c=t;c<r;++c){const v=n[c],y=v._texture.baseTexture,b=ew[y.alphaMode?1:0][v.blendMode];n[c]=null,t<c&&p.blend!==b&&(p.size=d-p.start,t=c,p=u[++f],p.texArray=e,p.start=d),this.packInterleavedGeometry(v,i,o,h,d),h+=v.vertexData.length/2*a,d+=v.indices.length,p.blend=b}t<r&&(p.size=d-p.start,++f),this._dcIndex=f,this._aIndex=h,this._iIndex=d}bindAndClearTexArray(e){const t=this.renderer.texture;for(let r=0;r<e.count;r++)t.bind(e.elements[r],e.ids[r]),e.elements[r]=null;e.count=0}updateGeometry(){const{_packedGeometries:e,_attributeBuffer:t,_indexBuffer:r}=this;xr.canUploadSameBuffer?(e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(r),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,e[this._flushId]=new this.geometryClass),e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(r),this.renderer.geometry.bind(e[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)}drawBatches(){const e=this._dcIndex,{gl:t,state:r}=this.renderer,n=xr._drawCallPool;let i=null;for(let o=0;o<e;o++){const{texArray:a,type:u,size:f,start:h,blend:d}=n[o];i!==a&&(i=a,this.bindAndClearTexArray(a)),this.state.blendMode=d,r.set(this.state),t.drawElements(u,f,t.UNSIGNED_SHORT,h*2)}}flush(){this._vertexCount!==0&&(this._attributeBuffer=this.getAttributeBuffer(this._vertexCount),this._indexBuffer=this.getIndexBuffer(this._indexCount),this._aIndex=0,this._iIndex=0,this._dcIndex=0,this.buildTexturesAndDrawCalls(),this.updateGeometry(),this.drawBatches(),this._bufferSize=0,this._vertexCount=0,this._indexCount=0)}start(){this.renderer.state.set(this.state),this.renderer.texture.ensureSamplerType(this.maxTextures),this.renderer.shader.bind(this._shader),xr.canUploadSameBuffer&&this.renderer.geometry.bind(this._packedGeometries[this._flushId])}stop(){this.flush()}destroy(){for(let e=0;e<this._packedGeometryPoolSize;e++)this._packedGeometries[e]&&this._packedGeometries[e].destroy();this.renderer.off("prerender",this.onPrerender,this),this._aBuffers=null,this._iBuffers=null,this._packedGeometries=null,this._attributeBuffer=null,this._indexBuffer=null,this._shader&&(this._shader.destroy(),this._shader=null),super.destroy()}getAttributeBuffer(e){const t=uo(Math.ceil(e/8)),r=Kh(t),n=t*8;this._aBuffers.length<=r&&(this._iBuffers.length=r+1);let i=this._aBuffers[n];return i||(this._aBuffers[n]=i=new iw(n*this.vertexSize*4)),i}getIndexBuffer(e){const t=uo(Math.ceil(e/12)),r=Kh(t),n=t*12;this._iBuffers.length<=r&&(this._iBuffers.length=r+1);let i=this._iBuffers[r];return i||(this._iBuffers[r]=i=new Uint16Array(n)),i}packInterleavedGeometry(e,t,r,n,i){const{uint32View:o,float32View:a}=t,u=n/this.vertexSize,f=e.uvs,h=e.indices,d=e.vertexData,p=e._texture.baseTexture._batchLocation,c=Math.min(e.worldAlpha,1),v=Be.shared.setValue(e._tintRGB).toPremultiplied(c);for(let y=0;y<d.length;y+=2)a[n++]=d[y],a[n++]=d[y+1],a[n++]=f[y],a[n++]=f[y+1],o[n++]=v,a[n++]=p;for(let y=0;y<h.length;y++)r[i++]=u+h[y]}};let wr=xr;wr.defaultBatchSize=4096,wr.extension={name:"batch",type:jt.RendererPlugin},wr._drawCallPool=[],wr._textureArrayPool=[],te.add(wr);var kw=`varying vec2 vTextureCoord;
353
+ `;const xr=class extends hd{constructor(e){super(e),this.setShaderGenerator(),this.geometryClass=ed,this.vertexSize=6,this.state=ho.for2d(),this.size=xr.defaultBatchSize*4,this._vertexCount=0,this._indexCount=0,this._bufferedElements=[],this._bufferedTextures=[],this._bufferSize=0,this._shader=null,this._packedGeometries=[],this._packedGeometryPoolSize=2,this._flushId=0,this._aBuffers={},this._iBuffers={},this.maxTextures=1,this.renderer.on("prerender",this.onPrerender,this),e.runners.contextChange.add(this),this._dcIndex=0,this._aIndex=0,this._iIndex=0,this._attributeBuffer=null,this._indexBuffer=null,this._tempBoundTextures=[]}static get defaultMaxTextures(){return this._defaultMaxTextures=this._defaultMaxTextures??Pw(32),this._defaultMaxTextures}static set defaultMaxTextures(e){this._defaultMaxTextures=e}static get canUploadSameBuffer(){return this._canUploadSameBuffer=this._canUploadSameBuffer??Iw(),this._canUploadSameBuffer}static set canUploadSameBuffer(e){this._canUploadSameBuffer=e}get MAX_TEXTURES(){return zt("7.1.0","BatchRenderer#MAX_TEXTURES renamed to BatchRenderer#maxTextures"),this.maxTextures}static get defaultVertexSrc(){return Mw}static get defaultFragmentTemplate(){return Nw}setShaderGenerator({vertex:e=xr.defaultVertexSrc,fragment:t=xr.defaultFragmentTemplate}={}){this.shaderGenerator=new Rw(e,t)}contextChange(){const e=this.renderer.gl;Dt.PREFER_ENV===Cn.WEBGL_LEGACY?this.maxTextures=1:(this.maxTextures=Math.min(e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),xr.defaultMaxTextures),this.maxTextures=aw(this.maxTextures,e)),this._shader=this.shaderGenerator.generateShader(this.maxTextures);for(let t=0;t<this._packedGeometryPoolSize;t++)this._packedGeometries[t]=new this.geometryClass;this.initFlushBuffers()}initFlushBuffers(){const{_drawCallPool:e,_textureArrayPool:t}=xr,r=this.size/4,n=Math.floor(r/this.maxTextures)+1;for(;e.length<r;)e.push(new eu);for(;t.length<n;)t.push(new au);for(let i=0;i<this.maxTextures;i++)this._tempBoundTextures[i]=null}onPrerender(){this._flushId=0}render(e){e._texture.valid&&(this._vertexCount+e.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)}buildTexturesAndDrawCalls(){const{_bufferedTextures:e,maxTextures:t}=this,r=xr._textureArrayPool,n=this.renderer.batch,i=this._tempBoundTextures,o=this.renderer.textureGC.count;let a=++Kt._globalBatch,u=0,f=r[0],h=0;n.copyBoundTextures(i,t);for(let d=0;d<this._bufferSize;++d){const p=e[d];e[d]=null,p._batchEnabled!==a&&(f.count>=t&&(n.boundArray(f,i,a,t),this.buildDrawCalls(f,h,d),h=d,f=r[++u],++a),p._batchEnabled=a,p.touched=o,f.elements[f.count++]=p)}f.count>0&&(n.boundArray(f,i,a,t),this.buildDrawCalls(f,h,this._bufferSize),++u,++a);for(let d=0;d<i.length;d++)i[d]=null;Kt._globalBatch=a}buildDrawCalls(e,t,r){const{_bufferedElements:n,_attributeBuffer:i,_indexBuffer:o,vertexSize:a}=this,u=xr._drawCallPool;let f=this._dcIndex,h=this._aIndex,d=this._iIndex,p=u[f];p.start=this._iIndex,p.texArray=e;for(let c=t;c<r;++c){const v=n[c],y=v._texture.baseTexture,b=ew[y.alphaMode?1:0][v.blendMode];n[c]=null,t<c&&p.blend!==b&&(p.size=d-p.start,t=c,p=u[++f],p.texArray=e,p.start=d),this.packInterleavedGeometry(v,i,o,h,d),h+=v.vertexData.length/2*a,d+=v.indices.length,p.blend=b}t<r&&(p.size=d-p.start,++f),this._dcIndex=f,this._aIndex=h,this._iIndex=d}bindAndClearTexArray(e){const t=this.renderer.texture;for(let r=0;r<e.count;r++)t.bind(e.elements[r],e.ids[r]),e.elements[r]=null;e.count=0}updateGeometry(){const{_packedGeometries:e,_attributeBuffer:t,_indexBuffer:r}=this;xr.canUploadSameBuffer?(e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(r),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,e[this._flushId]=new this.geometryClass),e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(r),this.renderer.geometry.bind(e[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)}drawBatches(){const e=this._dcIndex,{gl:t,state:r}=this.renderer,n=xr._drawCallPool;let i=null;for(let o=0;o<e;o++){const{texArray:a,type:u,size:f,start:h,blend:d}=n[o];i!==a&&(i=a,this.bindAndClearTexArray(a)),this.state.blendMode=d,r.set(this.state),t.drawElements(u,f,t.UNSIGNED_SHORT,h*2)}}flush(){this._vertexCount!==0&&(this._attributeBuffer=this.getAttributeBuffer(this._vertexCount),this._indexBuffer=this.getIndexBuffer(this._indexCount),this._aIndex=0,this._iIndex=0,this._dcIndex=0,this.buildTexturesAndDrawCalls(),this.updateGeometry(),this.drawBatches(),this._bufferSize=0,this._vertexCount=0,this._indexCount=0)}start(){this.renderer.state.set(this.state),this.renderer.texture.ensureSamplerType(this.maxTextures),this.renderer.shader.bind(this._shader),xr.canUploadSameBuffer&&this.renderer.geometry.bind(this._packedGeometries[this._flushId])}stop(){this.flush()}destroy(){for(let e=0;e<this._packedGeometryPoolSize;e++)this._packedGeometries[e]&&this._packedGeometries[e].destroy();this.renderer.off("prerender",this.onPrerender,this),this._aBuffers=null,this._iBuffers=null,this._packedGeometries=null,this._attributeBuffer=null,this._indexBuffer=null,this._shader&&(this._shader.destroy(),this._shader=null),super.destroy()}getAttributeBuffer(e){const t=uo(Math.ceil(e/8)),r=Kh(t),n=t*8;this._aBuffers.length<=r&&(this._iBuffers.length=r+1);let i=this._aBuffers[n];return i||(this._aBuffers[n]=i=new iw(n*this.vertexSize*4)),i}getIndexBuffer(e){const t=uo(Math.ceil(e/12)),r=Kh(t),n=t*12;this._iBuffers.length<=r&&(this._iBuffers.length=r+1);let i=this._iBuffers[r];return i||(this._iBuffers[r]=i=new Uint16Array(n)),i}packInterleavedGeometry(e,t,r,n,i){const{uint32View:o,float32View:a}=t,u=n/this.vertexSize,f=e.uvs,h=e.indices,d=e.vertexData,p=e._texture.baseTexture._batchLocation,c=Math.min(e.worldAlpha,1),v=Be.shared.setValue(e._tintRGB).toPremultiplied(c);for(let y=0;y<d.length;y+=2)a[n++]=d[y],a[n++]=d[y+1],a[n++]=f[y],a[n++]=f[y+1],o[n++]=v,a[n++]=p;for(let y=0;y<h.length;y++)r[i++]=u+h[y]}};let wr=xr;wr.defaultBatchSize=4096,wr.extension={name:"batch",type:jt.RendererPlugin},wr._drawCallPool=[],wr._textureArrayPool=[],te.add(wr);var kw=`varying vec2 vTextureCoord;
354
354
 
355
355
  uniform sampler2D uSampler;
356
356
 
@@ -424,7 +424,7 @@ void main(void)
424
424
  vTextureCoord = aTextureCoord;
425
425
  vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;
426
426
  }
427
- `;class Hw extends Zt{constructor(t,r,n){let i=null;typeof t!="string"&&r===void 0&&n===void 0&&(i=t,t=void 0,r=void 0,n=void 0),super(t||zw,r||qw,n),this.maskSprite=i,this.maskMatrix=new $e}get maskSprite(){return this._maskSprite}set maskSprite(t){this._maskSprite=t,this._maskSprite&&(this._maskSprite.renderable=!1)}apply(t,r,n,i){const o=this._maskSprite,a=o._texture;a.valid&&(a.uvMatrix||(a.uvMatrix=new jw(a,0)),a.uvMatrix.update(),this.uniforms.npmAlpha=a.baseTexture.alphaMode?0:1,this.uniforms.mask=a,this.uniforms.otherMatrix=t.calculateSpriteMatrix(this.maskMatrix,o).prepend(a.uvMatrix.mapCoord),this.uniforms.alpha=o.worldAlpha,this.uniforms.maskClamp=a.uvMatrix.uClampFrame,t.applyFilter(this,r,n,i))}}class Vw{constructor(t=null){this.type=Ee.NONE,this.autoDetect=!0,this.maskObject=t||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=Zt.defaultMultisample,this.enabled=!0,this.colorMask=15,this._filters=null,this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null,this._scissorRectLocal=null,this._colorMask=15,this._target=null}get filter(){return this._filters?this._filters[0]:null}set filter(t){t?this._filters?this._filters[0]=t:this._filters=[t]:this._filters=null}reset(){this.pooled&&(this.maskObject=null,this.type=Ee.NONE,this.autoDetect=!0),this._target=null,this._scissorRectLocal=null}copyCountersOrReset(t){t?(this._stencilCounter=t._stencilCounter,this._scissorCounter=t._scissorCounter,this._scissorRect=t._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)}}class Ed{constructor(t){this.renderer=t,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}setMaskStack(t){this.maskStack=t,this.renderer.scissor.setMaskStack(t),this.renderer.stencil.setMaskStack(t)}push(t,r){let n=r;if(!n.isMaskData){const o=this.maskDataPool.pop()||new Vw;o.pooled=!0,o.maskObject=r,n=o}const i=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null;if(n.copyCountersOrReset(i),n._colorMask=i?i._colorMask:15,n.autoDetect&&this.detect(n),n._target=t,n.type!==Ee.SPRITE&&this.maskStack.push(n),n.enabled)switch(n.type){case Ee.SCISSOR:this.renderer.scissor.push(n);break;case Ee.STENCIL:this.renderer.stencil.push(n);break;case Ee.SPRITE:n.copyCountersOrReset(null),this.pushSpriteMask(n);break;case Ee.COLOR:this.pushColorMask(n);break}n.type===Ee.SPRITE&&this.maskStack.push(n)}pop(t){const r=this.maskStack.pop();if(!(!r||r._target!==t)){if(r.enabled)switch(r.type){case Ee.SCISSOR:this.renderer.scissor.pop(r);break;case Ee.STENCIL:this.renderer.stencil.pop(r.maskObject);break;case Ee.SPRITE:this.popSpriteMask(r);break;case Ee.COLOR:this.popColorMask(r);break}if(r.reset(),r.pooled&&this.maskDataPool.push(r),this.maskStack.length!==0){const n=this.maskStack[this.maskStack.length-1];n.type===Ee.SPRITE&&n._filters&&(n._filters[0].maskSprite=n.maskObject)}}}detect(t){const r=t.maskObject;r?r.isSprite?t.type=Ee.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(t)?t.type=Ee.SCISSOR:t.type=Ee.STENCIL:t.type=Ee.COLOR}pushSpriteMask(t){const{maskObject:r}=t,n=t._target;let i=t._filters;i||(i=this.alphaMaskPool[this.alphaMaskIndex],i||(i=this.alphaMaskPool[this.alphaMaskIndex]=[new Hw]));const o=this.renderer,a=o.renderTexture;let u,f;if(a.current){const d=a.current;u=t.resolution||d.resolution,f=t.multisample??d.multisample}else u=t.resolution||o.resolution,f=t.multisample??o.multisample;i[0].resolution=u,i[0].multisample=f,i[0].maskSprite=r;const h=n.filterArea;n.filterArea=r.getBounds(!0),o.filter.push(n,i),n.filterArea=h,t._filters||this.alphaMaskIndex++}popSpriteMask(t){this.renderer.filter.pop(),t._filters?t._filters[0].maskSprite=null:(this.alphaMaskIndex--,this.alphaMaskPool[this.alphaMaskIndex][0].maskSprite=null)}pushColorMask(t){const r=t._colorMask,n=t._colorMask=r&t.colorMask;n!==r&&this.renderer.gl.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)}popColorMask(t){const r=t._colorMask,n=this.maskStack.length>0?this.maskStack[this.maskStack.length-1]._colorMask:15;n!==r&&this.renderer.gl.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)}destroy(){this.renderer=null}}Ed.extension={type:jt.RendererSystem,name:"mask"},te.add(Ed);class Sd{constructor(t){this.renderer=t,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(t){const{gl:r}=this.renderer,n=this.getStackLength();this.maskStack=t;const i=this.getStackLength();i!==n&&(i===0?r.disable(this.glConst):(r.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const Ad=new $e,Od=[],Ao=class extends Sd{constructor(e){super(e),this.glConst=Dt.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._scissorCounter:0}calcScissorRect(e){if(e._scissorRectLocal)return;const t=e._scissorRect,{maskObject:r}=e,{renderer:n}=this,i=n.renderTexture,o=r.getBounds(!0,Od.pop()??new ne);this.roundFrameToPixels(o,i.current?i.current.resolution:n.resolution,i.sourceFrame,i.destinationFrame,n.projection.transform),t&&o.fit(t),e._scissorRectLocal=o}static isMatrixRotated(e){if(!e)return!1;const{a:t,b:r,c:n,d:i}=e;return(Math.abs(r)>1e-4||Math.abs(n)>1e-4)&&(Math.abs(t)>1e-4||Math.abs(i)>1e-4)}testScissor(e){const{maskObject:t}=e;if(!t.isFastRect||!t.isFastRect()||Ao.isMatrixRotated(t.worldTransform)||Ao.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(e);const r=e._scissorRectLocal;return r.width>0&&r.height>0}roundFrameToPixels(e,t,r,n,i){Ao.isMatrixRotated(i)||(i=i?Ad.copyFrom(i):Ad.identity(),i.translate(-r.x,-r.y).scale(n.width/r.width,n.height/r.height).translate(n.x,n.y),this.renderer.filter.transformAABB(i,e),e.fit(n),e.x=Math.round(e.x*t),e.y=Math.round(e.y*t),e.width=Math.round(e.width*t),e.height=Math.round(e.height*t))}push(e){e._scissorRectLocal||this.calcScissorRect(e);const{gl:t}=this.renderer;e._scissorRect||t.enable(t.SCISSOR_TEST),e._scissorCounter++,e._scissorRect=e._scissorRectLocal,this._useCurrent()}pop(e){const{gl:t}=this.renderer;e&&Od.push(e._scissorRectLocal),this.getStackLength()>0?this._useCurrent():t.disable(t.SCISSOR_TEST)}_useCurrent(){const e=this.maskStack[this.maskStack.length-1]._scissorRect;let t;this.renderer.renderTexture.current?t=e.y:t=this.renderer.height-e.height-e.y,this.renderer.gl.scissor(e.x,t,e.width,e.height)}};let Cd=Ao;Cd.extension={type:jt.RendererSystem,name:"scissor"},te.add(Cd);class Rd extends Sd{constructor(t){super(t),this.glConst=Dt.ADAPTER.getWebGLRenderingContext().STENCIL_TEST}getStackLength(){const t=this.maskStack[this.maskStack.length-1];return t?t._stencilCounter:0}push(t){const r=t.maskObject,{gl:n}=this.renderer,i=t._stencilCounter;i===0&&(this.renderer.framebuffer.forceStencil(),n.clearStencil(0),n.clear(n.STENCIL_BUFFER_BIT),n.enable(n.STENCIL_TEST)),t._stencilCounter++;const o=t._colorMask;o!==0&&(t._colorMask=0,n.colorMask(!1,!1,!1,!1)),n.stencilFunc(n.EQUAL,i,4294967295),n.stencilOp(n.KEEP,n.KEEP,n.INCR),r.renderable=!0,r.render(this.renderer),this.renderer.batch.flush(),r.renderable=!1,o!==0&&(t._colorMask=o,n.colorMask((o&1)!==0,(o&2)!==0,(o&4)!==0,(o&8)!==0)),this._useCurrent()}pop(t){const r=this.renderer.gl;if(this.getStackLength()===0)r.disable(r.STENCIL_TEST);else{const n=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null,i=n?n._colorMask:15;i!==0&&(n._colorMask=0,r.colorMask(!1,!1,!1,!1)),r.stencilOp(r.KEEP,r.KEEP,r.DECR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,i!==0&&(n._colorMask=i,r.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)),this._useCurrent()}}_useCurrent(){const t=this.renderer.gl;t.stencilFunc(t.EQUAL,this.getStackLength(),4294967295),t.stencilOp(t.KEEP,t.KEEP,t.KEEP)}}Rd.extension={type:jt.RendererSystem,name:"stencil"},te.add(Rd);class Id{constructor(t){this.renderer=t,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get(){return Ht("7.0.0","renderer.plugins.extract has moved to renderer.extract"),t.extract}},prepare:{enumerable:!1,get(){return Ht("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),t.prepare}},interaction:{enumerable:!1,get(){return Ht("7.0.0","renderer.plugins.interaction has been deprecated, use renderer.events"),t.events}}})}init(){const t=this.rendererPlugins;for(const r in t)this.plugins[r]=new t[r](this.renderer)}destroy(){for(const t in this.plugins)this.plugins[t].destroy(),this.plugins[t]=null}}Id.extension={type:[jt.RendererSystem,jt.CanvasRendererSystem],name:"_plugin"},te.add(Id);class Pd{constructor(t){this.renderer=t,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new $e,this.transform=null}update(t,r,n,i){this.destinationFrame=t||this.destinationFrame||this.defaultFrame,this.sourceFrame=r||this.sourceFrame||t,this.calculateProjection(this.destinationFrame,this.sourceFrame,n,i),this.transform&&this.projectionMatrix.append(this.transform);const o=this.renderer;o.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,o.globalUniforms.update(),o.shader.shader&&o.shader.syncUniformGroup(o.shader.shader.uniforms.globals)}calculateProjection(t,r,n,i){const o=this.projectionMatrix,a=i?-1:1;o.identity(),o.a=1/r.width*2,o.d=a*(1/r.height*2),o.tx=-1-r.x*o.a,o.ty=-a-r.y*o.d}setTransform(t){}destroy(){this.renderer=null}}Pd.extension={type:jt.RendererSystem,name:"projection"},te.add(Pd);const Ww=new su;class Nd{constructor(t){this.renderer=t,this._tempMatrix=new $e}generateTexture(t,r){const{region:n,...i}=r||{},o=n||t.getLocalBounds(null,!0);o.width===0&&(o.width=1),o.height===0&&(o.height=1);const a=Eo.create({width:o.width,height:o.height,...i});this._tempMatrix.tx=-o.x,this._tempMatrix.ty=-o.y;const u=t.transform;return t.transform=Ww,this.renderer.render(t,{renderTexture:a,transform:this._tempMatrix,skipUpdateTransform:!!t.parent,blit:!0}),t.transform=u,a}destroy(){}}Nd.extension={type:[jt.RendererSystem,jt.CanvasRendererSystem],name:"textureGenerator"},te.add(Nd);const $n=new ne,vs=new ne;class Md{constructor(t){this.renderer=t,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new ne,this.destinationFrame=new ne,this.viewportFrame=new ne}bind(t=null,r,n){const i=this.renderer;this.current=t;let o,a,u;t?(o=t.baseTexture,u=o.resolution,r||($n.width=t.frame.width,$n.height=t.frame.height,r=$n),n||(vs.x=t.frame.x,vs.y=t.frame.y,vs.width=r.width,vs.height=r.height,n=vs),a=o.framebuffer):(u=i.resolution,r||($n.width=i._view.screen.width,$n.height=i._view.screen.height,r=$n),n||(n=$n,n.width=r.width,n.height=r.height));const f=this.viewportFrame;f.x=n.x*u,f.y=n.y*u,f.width=n.width*u,f.height=n.height*u,t||(f.y=i.view.height-(f.y+f.height)),f.ceil(),this.renderer.framebuffer.bind(a,f),this.renderer.projection.update(n,r,u,!a),t?this.renderer.mask.setMaskStack(o.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(r),this.destinationFrame.copyFrom(n)}clear(t,r){const n=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,i=t?Be.shared.setValue(t):n,o=this.destinationFrame,a=this.current?this.current.baseTexture:this.renderer._view.screen,u=o.width!==a.width||o.height!==a.height;if(u){let{x:f,y:h,width:d,height:p}=this.viewportFrame;f=Math.round(f),h=Math.round(h),d=Math.round(d),p=Math.round(p),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(f,h,d,p)}this.renderer.framebuffer.clear(i.red,i.green,i.blue,i.alpha,r),u&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}Md.extension={type:jt.RendererSystem,name:"renderTexture"},te.add(Md);class Xw{constructor(t,r){this.program=t,this.uniformData=r,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null}}function Kw(e,t){const r={},n=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let i=0;i<n;i++){const o=t.getActiveAttrib(e,i);if(o.name.startsWith("gl_"))continue;const a=fd(t,o.type),u={type:a,name:o.name,size:ld(a),location:t.getAttribLocation(e,o.name)};r[o.name]=u}return r}function Yw(e,t){const r={},n=t.getProgramParameter(e,t.ACTIVE_UNIFORMS);for(let i=0;i<n;i++){const o=t.getActiveUniform(e,i),a=o.name.replace(/\[.*?\]$/,""),u=!!o.name.match(/\[.*?\]$/),f=fd(t,o.type);r[a]={name:a,index:i,type:f,size:o.size,isArray:u,value:sd(f,o.size)}}return r}function Zw(e,t){var f;const r=id(e,e.VERTEX_SHADER,t.vertexSrc),n=id(e,e.FRAGMENT_SHADER,t.fragmentSrc),i=e.createProgram();e.attachShader(i,r),e.attachShader(i,n);const o=(f=t.extra)==null?void 0:f.transformFeedbackVaryings;if(o&&(typeof e.transformFeedbackVaryings!="function"?console.warn("TransformFeedback is not supported but TransformFeedbackVaryings are given."):e.transformFeedbackVaryings(i,o.names,o.bufferMode==="separate"?e.SEPARATE_ATTRIBS:e.INTERLEAVED_ATTRIBS)),e.linkProgram(i),e.getProgramParameter(i,e.LINK_STATUS)||Ew(e,i,r,n),t.attributeData=Kw(i,e),t.uniformData=Yw(i,e),!/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(t.vertexSrc)){const h=Object.keys(t.attributeData);h.sort((d,p)=>d>p?1:-1);for(let d=0;d<h.length;d++)t.attributeData[h[d]].location=d,e.bindAttribLocation(i,d,h[d]);e.linkProgram(i)}e.deleteShader(r),e.deleteShader(n);const a={};for(const h in t.uniformData){const d=t.uniformData[h];a[h]={location:e.getUniformLocation(i,h),value:sd(d.type,d.size)}}return new Xw(i,a)}function Qw(e,t,r,n,i){r.buffer.update(i)}const Jw={float:`
427
+ `;class Hw extends Zt{constructor(t,r,n){let i=null;typeof t!="string"&&r===void 0&&n===void 0&&(i=t,t=void 0,r=void 0,n=void 0),super(t||zw,r||qw,n),this.maskSprite=i,this.maskMatrix=new $e}get maskSprite(){return this._maskSprite}set maskSprite(t){this._maskSprite=t,this._maskSprite&&(this._maskSprite.renderable=!1)}apply(t,r,n,i){const o=this._maskSprite,a=o._texture;a.valid&&(a.uvMatrix||(a.uvMatrix=new jw(a,0)),a.uvMatrix.update(),this.uniforms.npmAlpha=a.baseTexture.alphaMode?0:1,this.uniforms.mask=a,this.uniforms.otherMatrix=t.calculateSpriteMatrix(this.maskMatrix,o).prepend(a.uvMatrix.mapCoord),this.uniforms.alpha=o.worldAlpha,this.uniforms.maskClamp=a.uvMatrix.uClampFrame,t.applyFilter(this,r,n,i))}}class Vw{constructor(t=null){this.type=Ee.NONE,this.autoDetect=!0,this.maskObject=t||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=Zt.defaultMultisample,this.enabled=!0,this.colorMask=15,this._filters=null,this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null,this._scissorRectLocal=null,this._colorMask=15,this._target=null}get filter(){return this._filters?this._filters[0]:null}set filter(t){t?this._filters?this._filters[0]=t:this._filters=[t]:this._filters=null}reset(){this.pooled&&(this.maskObject=null,this.type=Ee.NONE,this.autoDetect=!0),this._target=null,this._scissorRectLocal=null}copyCountersOrReset(t){t?(this._stencilCounter=t._stencilCounter,this._scissorCounter=t._scissorCounter,this._scissorRect=t._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)}}class Ed{constructor(t){this.renderer=t,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}setMaskStack(t){this.maskStack=t,this.renderer.scissor.setMaskStack(t),this.renderer.stencil.setMaskStack(t)}push(t,r){let n=r;if(!n.isMaskData){const o=this.maskDataPool.pop()||new Vw;o.pooled=!0,o.maskObject=r,n=o}const i=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null;if(n.copyCountersOrReset(i),n._colorMask=i?i._colorMask:15,n.autoDetect&&this.detect(n),n._target=t,n.type!==Ee.SPRITE&&this.maskStack.push(n),n.enabled)switch(n.type){case Ee.SCISSOR:this.renderer.scissor.push(n);break;case Ee.STENCIL:this.renderer.stencil.push(n);break;case Ee.SPRITE:n.copyCountersOrReset(null),this.pushSpriteMask(n);break;case Ee.COLOR:this.pushColorMask(n);break}n.type===Ee.SPRITE&&this.maskStack.push(n)}pop(t){const r=this.maskStack.pop();if(!(!r||r._target!==t)){if(r.enabled)switch(r.type){case Ee.SCISSOR:this.renderer.scissor.pop(r);break;case Ee.STENCIL:this.renderer.stencil.pop(r.maskObject);break;case Ee.SPRITE:this.popSpriteMask(r);break;case Ee.COLOR:this.popColorMask(r);break}if(r.reset(),r.pooled&&this.maskDataPool.push(r),this.maskStack.length!==0){const n=this.maskStack[this.maskStack.length-1];n.type===Ee.SPRITE&&n._filters&&(n._filters[0].maskSprite=n.maskObject)}}}detect(t){const r=t.maskObject;r?r.isSprite?t.type=Ee.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(t)?t.type=Ee.SCISSOR:t.type=Ee.STENCIL:t.type=Ee.COLOR}pushSpriteMask(t){const{maskObject:r}=t,n=t._target;let i=t._filters;i||(i=this.alphaMaskPool[this.alphaMaskIndex],i||(i=this.alphaMaskPool[this.alphaMaskIndex]=[new Hw]));const o=this.renderer,a=o.renderTexture;let u,f;if(a.current){const d=a.current;u=t.resolution||d.resolution,f=t.multisample??d.multisample}else u=t.resolution||o.resolution,f=t.multisample??o.multisample;i[0].resolution=u,i[0].multisample=f,i[0].maskSprite=r;const h=n.filterArea;n.filterArea=r.getBounds(!0),o.filter.push(n,i),n.filterArea=h,t._filters||this.alphaMaskIndex++}popSpriteMask(t){this.renderer.filter.pop(),t._filters?t._filters[0].maskSprite=null:(this.alphaMaskIndex--,this.alphaMaskPool[this.alphaMaskIndex][0].maskSprite=null)}pushColorMask(t){const r=t._colorMask,n=t._colorMask=r&t.colorMask;n!==r&&this.renderer.gl.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)}popColorMask(t){const r=t._colorMask,n=this.maskStack.length>0?this.maskStack[this.maskStack.length-1]._colorMask:15;n!==r&&this.renderer.gl.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)}destroy(){this.renderer=null}}Ed.extension={type:jt.RendererSystem,name:"mask"},te.add(Ed);class Sd{constructor(t){this.renderer=t,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(t){const{gl:r}=this.renderer,n=this.getStackLength();this.maskStack=t;const i=this.getStackLength();i!==n&&(i===0?r.disable(this.glConst):(r.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const Ad=new $e,Od=[],Ao=class extends Sd{constructor(e){super(e),this.glConst=Dt.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._scissorCounter:0}calcScissorRect(e){if(e._scissorRectLocal)return;const t=e._scissorRect,{maskObject:r}=e,{renderer:n}=this,i=n.renderTexture,o=r.getBounds(!0,Od.pop()??new ne);this.roundFrameToPixels(o,i.current?i.current.resolution:n.resolution,i.sourceFrame,i.destinationFrame,n.projection.transform),t&&o.fit(t),e._scissorRectLocal=o}static isMatrixRotated(e){if(!e)return!1;const{a:t,b:r,c:n,d:i}=e;return(Math.abs(r)>1e-4||Math.abs(n)>1e-4)&&(Math.abs(t)>1e-4||Math.abs(i)>1e-4)}testScissor(e){const{maskObject:t}=e;if(!t.isFastRect||!t.isFastRect()||Ao.isMatrixRotated(t.worldTransform)||Ao.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(e);const r=e._scissorRectLocal;return r.width>0&&r.height>0}roundFrameToPixels(e,t,r,n,i){Ao.isMatrixRotated(i)||(i=i?Ad.copyFrom(i):Ad.identity(),i.translate(-r.x,-r.y).scale(n.width/r.width,n.height/r.height).translate(n.x,n.y),this.renderer.filter.transformAABB(i,e),e.fit(n),e.x=Math.round(e.x*t),e.y=Math.round(e.y*t),e.width=Math.round(e.width*t),e.height=Math.round(e.height*t))}push(e){e._scissorRectLocal||this.calcScissorRect(e);const{gl:t}=this.renderer;e._scissorRect||t.enable(t.SCISSOR_TEST),e._scissorCounter++,e._scissorRect=e._scissorRectLocal,this._useCurrent()}pop(e){const{gl:t}=this.renderer;e&&Od.push(e._scissorRectLocal),this.getStackLength()>0?this._useCurrent():t.disable(t.SCISSOR_TEST)}_useCurrent(){const e=this.maskStack[this.maskStack.length-1]._scissorRect;let t;this.renderer.renderTexture.current?t=e.y:t=this.renderer.height-e.height-e.y,this.renderer.gl.scissor(e.x,t,e.width,e.height)}};let Cd=Ao;Cd.extension={type:jt.RendererSystem,name:"scissor"},te.add(Cd);class Rd extends Sd{constructor(t){super(t),this.glConst=Dt.ADAPTER.getWebGLRenderingContext().STENCIL_TEST}getStackLength(){const t=this.maskStack[this.maskStack.length-1];return t?t._stencilCounter:0}push(t){const r=t.maskObject,{gl:n}=this.renderer,i=t._stencilCounter;i===0&&(this.renderer.framebuffer.forceStencil(),n.clearStencil(0),n.clear(n.STENCIL_BUFFER_BIT),n.enable(n.STENCIL_TEST)),t._stencilCounter++;const o=t._colorMask;o!==0&&(t._colorMask=0,n.colorMask(!1,!1,!1,!1)),n.stencilFunc(n.EQUAL,i,4294967295),n.stencilOp(n.KEEP,n.KEEP,n.INCR),r.renderable=!0,r.render(this.renderer),this.renderer.batch.flush(),r.renderable=!1,o!==0&&(t._colorMask=o,n.colorMask((o&1)!==0,(o&2)!==0,(o&4)!==0,(o&8)!==0)),this._useCurrent()}pop(t){const r=this.renderer.gl;if(this.getStackLength()===0)r.disable(r.STENCIL_TEST);else{const n=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null,i=n?n._colorMask:15;i!==0&&(n._colorMask=0,r.colorMask(!1,!1,!1,!1)),r.stencilOp(r.KEEP,r.KEEP,r.DECR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,i!==0&&(n._colorMask=i,r.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)),this._useCurrent()}}_useCurrent(){const t=this.renderer.gl;t.stencilFunc(t.EQUAL,this.getStackLength(),4294967295),t.stencilOp(t.KEEP,t.KEEP,t.KEEP)}}Rd.extension={type:jt.RendererSystem,name:"stencil"},te.add(Rd);class Id{constructor(t){this.renderer=t,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get(){return zt("7.0.0","renderer.plugins.extract has moved to renderer.extract"),t.extract}},prepare:{enumerable:!1,get(){return zt("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),t.prepare}},interaction:{enumerable:!1,get(){return zt("7.0.0","renderer.plugins.interaction has been deprecated, use renderer.events"),t.events}}})}init(){const t=this.rendererPlugins;for(const r in t)this.plugins[r]=new t[r](this.renderer)}destroy(){for(const t in this.plugins)this.plugins[t].destroy(),this.plugins[t]=null}}Id.extension={type:[jt.RendererSystem,jt.CanvasRendererSystem],name:"_plugin"},te.add(Id);class Pd{constructor(t){this.renderer=t,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new $e,this.transform=null}update(t,r,n,i){this.destinationFrame=t||this.destinationFrame||this.defaultFrame,this.sourceFrame=r||this.sourceFrame||t,this.calculateProjection(this.destinationFrame,this.sourceFrame,n,i),this.transform&&this.projectionMatrix.append(this.transform);const o=this.renderer;o.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,o.globalUniforms.update(),o.shader.shader&&o.shader.syncUniformGroup(o.shader.shader.uniforms.globals)}calculateProjection(t,r,n,i){const o=this.projectionMatrix,a=i?-1:1;o.identity(),o.a=1/r.width*2,o.d=a*(1/r.height*2),o.tx=-1-r.x*o.a,o.ty=-a-r.y*o.d}setTransform(t){}destroy(){this.renderer=null}}Pd.extension={type:jt.RendererSystem,name:"projection"},te.add(Pd);const Ww=new su;class Nd{constructor(t){this.renderer=t,this._tempMatrix=new $e}generateTexture(t,r){const{region:n,...i}=r||{},o=n||t.getLocalBounds(null,!0);o.width===0&&(o.width=1),o.height===0&&(o.height=1);const a=Eo.create({width:o.width,height:o.height,...i});this._tempMatrix.tx=-o.x,this._tempMatrix.ty=-o.y;const u=t.transform;return t.transform=Ww,this.renderer.render(t,{renderTexture:a,transform:this._tempMatrix,skipUpdateTransform:!!t.parent,blit:!0}),t.transform=u,a}destroy(){}}Nd.extension={type:[jt.RendererSystem,jt.CanvasRendererSystem],name:"textureGenerator"},te.add(Nd);const $n=new ne,vs=new ne;class Md{constructor(t){this.renderer=t,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new ne,this.destinationFrame=new ne,this.viewportFrame=new ne}bind(t=null,r,n){const i=this.renderer;this.current=t;let o,a,u;t?(o=t.baseTexture,u=o.resolution,r||($n.width=t.frame.width,$n.height=t.frame.height,r=$n),n||(vs.x=t.frame.x,vs.y=t.frame.y,vs.width=r.width,vs.height=r.height,n=vs),a=o.framebuffer):(u=i.resolution,r||($n.width=i._view.screen.width,$n.height=i._view.screen.height,r=$n),n||(n=$n,n.width=r.width,n.height=r.height));const f=this.viewportFrame;f.x=n.x*u,f.y=n.y*u,f.width=n.width*u,f.height=n.height*u,t||(f.y=i.view.height-(f.y+f.height)),f.ceil(),this.renderer.framebuffer.bind(a,f),this.renderer.projection.update(n,r,u,!a),t?this.renderer.mask.setMaskStack(o.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(r),this.destinationFrame.copyFrom(n)}clear(t,r){const n=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,i=t?Be.shared.setValue(t):n,o=this.destinationFrame,a=this.current?this.current.baseTexture:this.renderer._view.screen,u=o.width!==a.width||o.height!==a.height;if(u){let{x:f,y:h,width:d,height:p}=this.viewportFrame;f=Math.round(f),h=Math.round(h),d=Math.round(d),p=Math.round(p),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(f,h,d,p)}this.renderer.framebuffer.clear(i.red,i.green,i.blue,i.alpha,r),u&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}Md.extension={type:jt.RendererSystem,name:"renderTexture"},te.add(Md);class Xw{constructor(t,r){this.program=t,this.uniformData=r,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null}}function Kw(e,t){const r={},n=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let i=0;i<n;i++){const o=t.getActiveAttrib(e,i);if(o.name.startsWith("gl_"))continue;const a=fd(t,o.type),u={type:a,name:o.name,size:ld(a),location:t.getAttribLocation(e,o.name)};r[o.name]=u}return r}function Yw(e,t){const r={},n=t.getProgramParameter(e,t.ACTIVE_UNIFORMS);for(let i=0;i<n;i++){const o=t.getActiveUniform(e,i),a=o.name.replace(/\[.*?\]$/,""),u=!!o.name.match(/\[.*?\]$/),f=fd(t,o.type);r[a]={name:a,index:i,type:f,size:o.size,isArray:u,value:sd(f,o.size)}}return r}function Zw(e,t){var f;const r=id(e,e.VERTEX_SHADER,t.vertexSrc),n=id(e,e.FRAGMENT_SHADER,t.fragmentSrc),i=e.createProgram();e.attachShader(i,r),e.attachShader(i,n);const o=(f=t.extra)==null?void 0:f.transformFeedbackVaryings;if(o&&(typeof e.transformFeedbackVaryings!="function"?console.warn("TransformFeedback is not supported but TransformFeedbackVaryings are given."):e.transformFeedbackVaryings(i,o.names,o.bufferMode==="separate"?e.SEPARATE_ATTRIBS:e.INTERLEAVED_ATTRIBS)),e.linkProgram(i),e.getProgramParameter(i,e.LINK_STATUS)||Ew(e,i,r,n),t.attributeData=Kw(i,e),t.uniformData=Yw(i,e),!/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(t.vertexSrc)){const h=Object.keys(t.attributeData);h.sort((d,p)=>d>p?1:-1);for(let d=0;d<h.length;d++)t.attributeData[h[d]].location=d,e.bindAttribLocation(i,d,h[d]);e.linkProgram(i)}e.deleteShader(r),e.deleteShader(n);const a={};for(const h in t.uniformData){const d=t.uniformData[h];a[h]={location:e.getUniformLocation(i,h),value:sd(d.type,d.size)}}return new Xw(i,a)}function Qw(e,t,r,n,i){r.buffer.update(i)}const Jw={float:`
428
428
  data[offset] = v;
429
429
  `,vec2:`
430
430
  data[offset] = v[0];
@@ -494,7 +494,7 @@ void main(void)
494
494
  `)}}return o.push(`
495
495
  renderer.buffer.update(buffer);
496
496
  `),{size:i,syncFunc:new Function("ud","uv","renderer","syncData","buffer",o.join(`
497
- `))}}let nT=0;const Oo={textureCount:0,uboCount:0};class Ld{constructor(t){this.destroyed=!1,this.renderer=t,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=nT++}systemCheck(){if(!Aw())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(t){this.gl=t,this.reset()}bind(t,r){t.disposeRunner.add(this),t.uniforms.globals=this.renderer.globalUniforms;const n=t.program,i=n.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(t);return this.shader=t,this.program!==n&&(this.program=n,this.gl.useProgram(i.program)),r||(Oo.textureCount=0,Oo.uboCount=0,this.syncUniformGroup(t.uniformGroup,Oo)),i}setUniforms(t){const r=this.shader.program,n=r.glPrograms[this.renderer.CONTEXT_UID];r.syncUniforms(n.uniformData,t,this.renderer)}syncUniformGroup(t,r){const n=this.getGlProgram();(!t.static||t.dirtyId!==n.uniformDirtyGroups[t.id])&&(n.uniformDirtyGroups[t.id]=t.dirtyId,this.syncUniforms(t,n,r))}syncUniforms(t,r,n){(t.syncUniforms[this.shader.program.id]||this.createSyncGroups(t))(r.uniformData,t.uniforms,this.renderer,n)}createSyncGroups(t){const r=this.getSignature(t,this.shader.program.uniformData,"u");return this.cache[r]||(this.cache[r]=xw(t,this.shader.program.uniformData)),t.syncUniforms[this.shader.program.id]=this.cache[r],t.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(t,r){const n=this.getGlProgram();if(!t.static||t.dirtyId!==0||!n.uniformGroups[t.id]){t.dirtyId=0;const i=n.uniformGroups[t.id]||this.createSyncBufferGroup(t,n,r);t.buffer.update(),i(n.uniformData,t.uniforms,this.renderer,Oo,t.buffer)}this.renderer.buffer.bindBufferBase(t.buffer,n.uniformBufferBindings[r])}createSyncBufferGroup(t,r,n){const{gl:i}=this.renderer;this.renderer.buffer.bind(t.buffer);const o=this.gl.getUniformBlockIndex(r.program,n);r.uniformBufferBindings[n]=this.shader.uniformBindCount,i.uniformBlockBinding(r.program,o,this.shader.uniformBindCount),this.shader.uniformBindCount++;const a=this.getSignature(t,this.shader.program.uniformData,"ubo");let u=this._uboCache[a];if(u||(u=this._uboCache[a]=rT(t,this.shader.program.uniformData)),t.autoManage){const f=new Float32Array(u.size/4);t.buffer.update(f)}return r.uniformGroups[t.id]=u.syncFunc,r.uniformGroups[t.id]}getSignature(t,r,n){const i=t.uniforms,o=[`${n}-`];for(const a in i)o.push(a),r[a]&&o.push(r[a].type);return o.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(t){const r=this.gl,n=t.program,i=Zw(r,n);return n.glPrograms[this.renderer.CONTEXT_UID]=i,i}reset(){this.program=null,this.shader=null}disposeShader(t){this.shader===t&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}Ld.extension={type:jt.RendererSystem,name:"shader"},te.add(Ld);class Co{constructor(t){this.renderer=t}run(t){const{renderer:r}=this;r.runners.init.emit(r.options),t.hello&&console.log(`PixiJS 7.2.3 - ${r.rendererLogId} - https://pixijs.com`),r.resize(r.screen.width,r.screen.height)}destroy(){}}Co.defaultOptions={hello:!1},Co.extension={type:[jt.RendererSystem,jt.CanvasRendererSystem],name:"startup"},te.add(Co);function iT(e,t=[]){return t[Rt.NORMAL]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.ADD]=[e.ONE,e.ONE],t[Rt.MULTIPLY]=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.SCREEN]=[e.ONE,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.OVERLAY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.DARKEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.LIGHTEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.COLOR_DODGE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.COLOR_BURN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.HARD_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.SOFT_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.DIFFERENCE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.EXCLUSION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.HUE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.SATURATION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.COLOR]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.LUMINOSITY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.NONE]=[0,0],t[Rt.NORMAL_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.ADD_NPM]=[e.SRC_ALPHA,e.ONE,e.ONE,e.ONE],t[Rt.SCREEN_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.SRC_IN]=[e.DST_ALPHA,e.ZERO],t[Rt.SRC_OUT]=[e.ONE_MINUS_DST_ALPHA,e.ZERO],t[Rt.SRC_ATOP]=[e.DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[Rt.DST_OVER]=[e.ONE_MINUS_DST_ALPHA,e.ONE],t[Rt.DST_IN]=[e.ZERO,e.SRC_ALPHA],t[Rt.DST_OUT]=[e.ZERO,e.ONE_MINUS_SRC_ALPHA],t[Rt.DST_ATOP]=[e.ONE_MINUS_DST_ALPHA,e.SRC_ALPHA],t[Rt.XOR]=[e.ONE_MINUS_DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[Rt.SUBTRACT]=[e.ONE,e.ONE,e.ONE,e.ONE,e.FUNC_REVERSE_SUBTRACT,e.FUNC_ADD],t}const sT=0,oT=1,aT=2,lT=3,uT=4,fT=5,cu=class{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=Rt.NONE,this._blendEq=!1,this.map=[],this.map[sT]=this.setBlend,this.map[oT]=this.setOffset,this.map[aT]=this.setCullFace,this.map[lT]=this.setDepthTest,this.map[uT]=this.setFrontFace,this.map[fT]=this.setDepthMask,this.checks=[],this.defaultState=new ho,this.defaultState.blend=!0}contextChange(e){this.gl=e,this.blendModes=iT(e),this.set(this.defaultState),this.reset()}set(e){if(e=e||this.defaultState,this.stateId!==e.data){let t=this.stateId^e.data,r=0;for(;t;)t&1&&this.map[r].call(this,!!(e.data&1<<r)),t=t>>1,r++;this.stateId=e.data}for(let t=0;t<this.checks.length;t++)this.checks[t](this,e)}forceState(e){e=e||this.defaultState;for(let t=0;t<this.map.length;t++)this.map[t].call(this,!!(e.data&1<<t));for(let t=0;t<this.checks.length;t++)this.checks[t](this,e);this.stateId=e.data}setBlend(e){this.updateCheck(cu.checkBlendMode,e),this.gl[e?"enable":"disable"](this.gl.BLEND)}setOffset(e){this.updateCheck(cu.checkPolygonOffset,e),this.gl[e?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)}setDepthTest(e){this.gl[e?"enable":"disable"](this.gl.DEPTH_TEST)}setDepthMask(e){this.gl.depthMask(e)}setCullFace(e){this.gl[e?"enable":"disable"](this.gl.CULL_FACE)}setFrontFace(e){this.gl.frontFace(this.gl[e?"CW":"CCW"])}setBlendMode(e){if(e===this.blendMode)return;this.blendMode=e;const t=this.blendModes[e],r=this.gl;t.length===2?r.blendFunc(t[0],t[1]):r.blendFuncSeparate(t[0],t[1],t[2],t[3]),t.length===6?(this._blendEq=!0,r.blendEquationSeparate(t[4],t[5])):this._blendEq&&(this._blendEq=!1,r.blendEquationSeparate(r.FUNC_ADD,r.FUNC_ADD))}setPolygonOffset(e,t){this.gl.polygonOffset(e,t)}reset(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(this.defaultState),this._blendEq=!0,this.blendMode=-1,this.setBlendMode(0)}updateCheck(e,t){const r=this.checks.indexOf(e);t&&r===-1?this.checks.push(e):!t&&r!==-1&&this.checks.splice(r,1)}static checkBlendMode(e,t){e.setBlendMode(t.blendMode)}static checkPolygonOffset(e,t){e.setPolygonOffset(1,t.polygonOffset)}destroy(){this.gl=null}};let Fd=cu;Fd.extension={type:jt.RendererSystem,name:"state"},te.add(Fd);class cT extends Vs{constructor(){super(...arguments),this.runners={},this._systemsHash={}}setup(t){this.addRunners(...t.runners);const r=(t.priority??[]).filter(i=>t.systems[i]),n=[...r,...Object.keys(t.systems).filter(i=>!r.includes(i))];for(const i of n)this.addSystem(t.systems[i],i)}addRunners(...t){t.forEach(r=>{this.runners[r]=new _r(r)})}addSystem(t,r){const n=new t(this);if(this[r])throw new Error(`Whoops! The name "${r}" is already in use`);this[r]=n,this._systemsHash[r]=n;for(const i in this.runners)this.runners[i].add(n);return this}emitWithCustomOptions(t,r){const n=Object.keys(this._systemsHash);t.items.forEach(i=>{const o=n.find(a=>this._systemsHash[a]===i);i[t.name](r[o])})}destroy(){Object.values(this.runners).forEach(t=>{t.destroy()}),this._systemsHash={}}}const Ro=class{constructor(e){this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=Ro.defaultMaxIdle,this.checkCountMax=Ro.defaultCheckCountMax,this.mode=Ro.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==sl.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const e=this.renderer.texture,t=e.managedTextures;let r=!1;for(let n=0;n<t.length;n++){const i=t[n];!i.framebuffer&&this.count-i.touched>this.maxIdle&&(e.destroyTexture(i,!0),t[n]=null,r=!0)}if(r){let n=0;for(let i=0;i<t.length;i++)t[i]!==null&&(t[n++]=t[i]);t.length=n}}unload(e){const t=this.renderer.texture,r=e._texture;r&&!r.framebuffer&&t.destroyTexture(r);for(let n=e.children.length-1;n>=0;n--)this.unload(e.children[n])}destroy(){this.renderer=null}};let Tr=Ro;Tr.defaultMode=sl.AUTO,Tr.defaultMaxIdle=60*60,Tr.defaultCheckCountMax=60*10,Tr.extension={type:jt.RendererSystem,name:"textureGC"},te.add(Tr);class hu{constructor(t){this.texture=t,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=Xt.UNSIGNED_BYTE,this.internalFormat=_t.RGBA,this.samplerType=0}}function hT(e){let t;return"WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext?t={[Xt.UNSIGNED_BYTE]:{[_t.RGBA]:e.RGBA8,[_t.RGB]:e.RGB8,[_t.RG]:e.RG8,[_t.RED]:e.R8,[_t.RGBA_INTEGER]:e.RGBA8UI,[_t.RGB_INTEGER]:e.RGB8UI,[_t.RG_INTEGER]:e.RG8UI,[_t.RED_INTEGER]:e.R8UI,[_t.ALPHA]:e.ALPHA,[_t.LUMINANCE]:e.LUMINANCE,[_t.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[Xt.BYTE]:{[_t.RGBA]:e.RGBA8_SNORM,[_t.RGB]:e.RGB8_SNORM,[_t.RG]:e.RG8_SNORM,[_t.RED]:e.R8_SNORM,[_t.RGBA_INTEGER]:e.RGBA8I,[_t.RGB_INTEGER]:e.RGB8I,[_t.RG_INTEGER]:e.RG8I,[_t.RED_INTEGER]:e.R8I},[Xt.UNSIGNED_SHORT]:{[_t.RGBA_INTEGER]:e.RGBA16UI,[_t.RGB_INTEGER]:e.RGB16UI,[_t.RG_INTEGER]:e.RG16UI,[_t.RED_INTEGER]:e.R16UI,[_t.DEPTH_COMPONENT]:e.DEPTH_COMPONENT16},[Xt.SHORT]:{[_t.RGBA_INTEGER]:e.RGBA16I,[_t.RGB_INTEGER]:e.RGB16I,[_t.RG_INTEGER]:e.RG16I,[_t.RED_INTEGER]:e.R16I},[Xt.UNSIGNED_INT]:{[_t.RGBA_INTEGER]:e.RGBA32UI,[_t.RGB_INTEGER]:e.RGB32UI,[_t.RG_INTEGER]:e.RG32UI,[_t.RED_INTEGER]:e.R32UI,[_t.DEPTH_COMPONENT]:e.DEPTH_COMPONENT24},[Xt.INT]:{[_t.RGBA_INTEGER]:e.RGBA32I,[_t.RGB_INTEGER]:e.RGB32I,[_t.RG_INTEGER]:e.RG32I,[_t.RED_INTEGER]:e.R32I},[Xt.FLOAT]:{[_t.RGBA]:e.RGBA32F,[_t.RGB]:e.RGB32F,[_t.RG]:e.RG32F,[_t.RED]:e.R32F,[_t.DEPTH_COMPONENT]:e.DEPTH_COMPONENT32F},[Xt.HALF_FLOAT]:{[_t.RGBA]:e.RGBA16F,[_t.RGB]:e.RGB16F,[_t.RG]:e.RG16F,[_t.RED]:e.R16F},[Xt.UNSIGNED_SHORT_5_6_5]:{[_t.RGB]:e.RGB565},[Xt.UNSIGNED_SHORT_4_4_4_4]:{[_t.RGBA]:e.RGBA4},[Xt.UNSIGNED_SHORT_5_5_5_1]:{[_t.RGBA]:e.RGB5_A1},[Xt.UNSIGNED_INT_2_10_10_10_REV]:{[_t.RGBA]:e.RGB10_A2,[_t.RGBA_INTEGER]:e.RGB10_A2UI},[Xt.UNSIGNED_INT_10F_11F_11F_REV]:{[_t.RGB]:e.R11F_G11F_B10F},[Xt.UNSIGNED_INT_5_9_9_9_REV]:{[_t.RGB]:e.RGB9_E5},[Xt.UNSIGNED_INT_24_8]:{[_t.DEPTH_STENCIL]:e.DEPTH24_STENCIL8},[Xt.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[_t.DEPTH_STENCIL]:e.DEPTH32F_STENCIL8}}:t={[Xt.UNSIGNED_BYTE]:{[_t.RGBA]:e.RGBA,[_t.RGB]:e.RGB,[_t.ALPHA]:e.ALPHA,[_t.LUMINANCE]:e.LUMINANCE,[_t.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[Xt.UNSIGNED_SHORT_5_6_5]:{[_t.RGB]:e.RGB},[Xt.UNSIGNED_SHORT_4_4_4_4]:{[_t.RGBA]:e.RGBA},[Xt.UNSIGNED_SHORT_5_5_5_1]:{[_t.RGBA]:e.RGBA}},t}class Bd{constructor(t){this.renderer=t,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new Kt,this.hasIntegerTextures=!1}contextChange(){const t=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=hT(t);const r=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=r;for(let i=0;i<r;i++)this.boundTextures[i]=null;this.emptyTextures={};const n=new hu(t.createTexture());t.bindTexture(t.TEXTURE_2D,n.texture),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array(4)),this.emptyTextures[t.TEXTURE_2D]=n,this.emptyTextures[t.TEXTURE_CUBE_MAP]=new hu(t.createTexture()),t.bindTexture(t.TEXTURE_CUBE_MAP,this.emptyTextures[t.TEXTURE_CUBE_MAP].texture);for(let i=0;i<6;i++)t.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,null);t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MIN_FILTER,t.LINEAR);for(let i=0;i<this.boundTextures.length;i++)this.bind(null,i)}bind(t,r=0){const{gl:n}=this;if(t=t==null?void 0:t.castToBaseTexture(),t!=null&&t.valid&&!t.parentTextureArray){t.touched=this.renderer.textureGC.count;const i=t._glTextures[this.CONTEXT_UID]||this.initTexture(t);this.boundTextures[r]!==t&&(this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),n.bindTexture(t.target,i.texture)),i.dirtyId!==t.dirtyId?(this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),this.updateTexture(t)):i.dirtyStyleId!==t.dirtyStyleId&&this.updateTextureStyle(t),this.boundTextures[r]=t}else this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),n.bindTexture(n.TEXTURE_2D,this.emptyTextures[n.TEXTURE_2D].texture),this.boundTextures[r]=null}reset(){this._unknownBoundTextures=!0,this.hasIntegerTextures=!1,this.currentLocation=-1;for(let t=0;t<this.boundTextures.length;t++)this.boundTextures[t]=this.unknownTexture}unbind(t){const{gl:r,boundTextures:n}=this;if(this._unknownBoundTextures){this._unknownBoundTextures=!1;for(let i=0;i<n.length;i++)n[i]===this.unknownTexture&&this.bind(null,i)}for(let i=0;i<n.length;i++)n[i]===t&&(this.currentLocation!==i&&(r.activeTexture(r.TEXTURE0+i),this.currentLocation=i),r.bindTexture(t.target,this.emptyTextures[t.target].texture),n[i]=null)}ensureSamplerType(t){const{boundTextures:r,hasIntegerTextures:n,CONTEXT_UID:i}=this;if(n)for(let o=t-1;o>=0;--o){const a=r[o];a&&a._glTextures[i].samplerType!==il.FLOAT&&this.renderer.texture.unbind(a)}}initTexture(t){const r=new hu(this.gl.createTexture());return r.dirtyId=-1,t._glTextures[this.CONTEXT_UID]=r,this.managedTextures.push(t),t.on("dispose",this.destroyTexture,this),r}initTextureType(t,r){var n;r.internalFormat=((n=this.internalFormats[t.type])==null?void 0:n[t.format])??t.format,this.webGLVersion===2&&t.type===Xt.HALF_FLOAT?r.type=this.gl.HALF_FLOAT:r.type=t.type}updateTexture(t){var i;const r=t._glTextures[this.CONTEXT_UID];if(!r)return;const n=this.renderer;if(this.initTextureType(t,r),(i=t.resource)!=null&&i.upload(n,t,r))r.samplerType!==il.FLOAT&&(this.hasIntegerTextures=!0);else{const o=t.realWidth,a=t.realHeight,u=n.gl;(r.width!==o||r.height!==a||r.dirtyId<0)&&(r.width=o,r.height=a,u.texImage2D(t.target,0,r.internalFormat,o,a,0,t.format,r.type,null))}t.dirtyStyleId!==r.dirtyStyleId&&this.updateTextureStyle(t),r.dirtyId=t.dirtyId}destroyTexture(t,r){const{gl:n}=this;if(t=t.castToBaseTexture(),t._glTextures[this.CONTEXT_UID]&&(this.unbind(t),n.deleteTexture(t._glTextures[this.CONTEXT_UID].texture),t.off("dispose",this.destroyTexture,this),delete t._glTextures[this.CONTEXT_UID],!r)){const i=this.managedTextures.indexOf(t);i!==-1&&fo(this.managedTextures,i,1)}}updateTextureStyle(t){var n;const r=t._glTextures[this.CONTEXT_UID];r&&((t.mipmap===Rn.POW2||this.webGLVersion!==2)&&!t.isPowerOfTwo?r.mipmap=!1:r.mipmap=t.mipmap>=1,this.webGLVersion!==2&&!t.isPowerOfTwo?r.wrapMode=Qi.CLAMP:r.wrapMode=t.wrapMode,(n=t.resource)!=null&&n.style(this.renderer,t,r)||this.setStyle(t,r),r.dirtyStyleId=t.dirtyStyleId)}setStyle(t,r){const n=this.gl;if(r.mipmap&&t.mipmap!==Rn.ON_MANUAL&&n.generateMipmap(t.target),n.texParameteri(t.target,n.TEXTURE_WRAP_S,r.wrapMode),n.texParameteri(t.target,n.TEXTURE_WRAP_T,r.wrapMode),r.mipmap){n.texParameteri(t.target,n.TEXTURE_MIN_FILTER,t.scaleMode===Lr.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);const i=this.renderer.context.extensions.anisotropicFiltering;if(i&&t.anisotropicLevel>0&&t.scaleMode===Lr.LINEAR){const o=Math.min(t.anisotropicLevel,n.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT));n.texParameterf(t.target,i.TEXTURE_MAX_ANISOTROPY_EXT,o)}}else n.texParameteri(t.target,n.TEXTURE_MIN_FILTER,t.scaleMode===Lr.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(t.target,n.TEXTURE_MAG_FILTER,t.scaleMode===Lr.LINEAR?n.LINEAR:n.NEAREST)}destroy(){this.renderer=null}}Bd.extension={type:jt.RendererSystem,name:"texture"},te.add(Bd);class Dd{constructor(t){this.renderer=t}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(t){const{gl:r,CONTEXT_UID:n}=this,i=t._glTransformFeedbacks[n]||this.createGLTransformFeedback(t);r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,i)}unbind(){const{gl:t}=this;t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(t,r){const{gl:n,renderer:i}=this;r&&i.shader.bind(r),n.beginTransformFeedback(t)}endTransformFeedback(){const{gl:t}=this;t.endTransformFeedback()}createGLTransformFeedback(t){const{gl:r,renderer:n,CONTEXT_UID:i}=this,o=r.createTransformFeedback();t._glTransformFeedbacks[i]=o,r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,o);for(let a=0;a<t.buffers.length;a++){const u=t.buffers[a];u&&(n.buffer.update(u),u._glBuffers[i].refCount++,r.bindBufferBase(r.TRANSFORM_FEEDBACK_BUFFER,a,u._glBuffers[i].buffer||null))}return r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,null),t.disposeRunner.add(this),o}disposeTransformFeedback(t,r){const n=t._glTransformFeedbacks[this.CONTEXT_UID],i=this.gl;t.disposeRunner.remove(this);const o=this.renderer.buffer;if(o)for(let a=0;a<t.buffers.length;a++){const u=t.buffers[a];if(!u)continue;const f=u._glBuffers[this.CONTEXT_UID];f&&(f.refCount--,f.refCount===0&&!r&&o.dispose(u,r))}n&&(r||i.deleteTransformFeedback(n),delete t._glTransformFeedbacks[this.CONTEXT_UID])}destroy(){this.renderer=null}}Dd.extension={type:jt.RendererSystem,name:"transformFeedback"},te.add(Dd);class Io{constructor(t){this.renderer=t}init(t){this.screen=new ne(0,0,t.width,t.height),this.element=t.view||Dt.ADAPTER.createCanvas(),this.resolution=t.resolution||Dt.RESOLUTION,this.autoDensity=!!t.autoDensity}resizeView(t,r){this.element.width=Math.round(t*this.resolution),this.element.height=Math.round(r*this.resolution);const n=this.element.width/this.resolution,i=this.element.height/this.resolution;this.screen.width=n,this.screen.height=i,this.autoDensity&&(this.element.style.width=`${n}px`,this.element.style.height=`${i}px`),this.renderer.emit("resize",n,i),this.renderer.runners.resize.emit(this.screen.width,this.screen.height)}destroy(t){var r;t&&((r=this.element.parentNode)==null||r.removeChild(this.element)),this.renderer=null,this.element=null,this.screen=null}}Io.defaultOptions={width:800,height:600,resolution:Dt.RESOLUTION,autoDensity:!1},Io.extension={type:[jt.RendererSystem,jt.CanvasRendererSystem],name:"_view"},te.add(Io),Dt.PREFER_ENV=Cn.WEBGL2,Dt.STRICT_TEXTURE_CACHE=!1,Dt.RENDER_OPTIONS={...wo.defaultOptions,...xo.defaultOptions,...Io.defaultOptions,...Co.defaultOptions},Object.defineProperties(Dt,{WRAP_MODE:{get(){return Kt.defaultOptions.wrapMode},set(e){Ht("7.1.0","settings.WRAP_MODE is deprecated, use BaseTexture.defaultOptions.wrapMode"),Kt.defaultOptions.wrapMode=e}},SCALE_MODE:{get(){return Kt.defaultOptions.scaleMode},set(e){Ht("7.1.0","settings.SCALE_MODE is deprecated, use BaseTexture.defaultOptions.scaleMode"),Kt.defaultOptions.scaleMode=e}},MIPMAP_TEXTURES:{get(){return Kt.defaultOptions.mipmap},set(e){Ht("7.1.0","settings.MIPMAP_TEXTURES is deprecated, use BaseTexture.defaultOptions.mipmap"),Kt.defaultOptions.mipmap=e}},ANISOTROPIC_LEVEL:{get(){return Kt.defaultOptions.anisotropicLevel},set(e){Ht("7.1.0","settings.ANISOTROPIC_LEVEL is deprecated, use BaseTexture.defaultOptions.anisotropicLevel"),Kt.defaultOptions.anisotropicLevel=e}},FILTER_RESOLUTION:{get(){return Ht("7.1.0","settings.FILTER_RESOLUTION is deprecated, use Filter.defaultResolution"),Zt.defaultResolution},set(e){Zt.defaultResolution=e}},FILTER_MULTISAMPLE:{get(){return Ht("7.1.0","settings.FILTER_MULTISAMPLE is deprecated, use Filter.defaultMultisample"),Zt.defaultMultisample},set(e){Zt.defaultMultisample=e}},SPRITE_MAX_TEXTURES:{get(){return wr.defaultMaxTextures},set(e){Ht("7.1.0","settings.SPRITE_MAX_TEXTURES is deprecated, use BatchRenderer.defaultMaxTextures"),wr.defaultMaxTextures=e}},SPRITE_BATCH_SIZE:{get(){return wr.defaultBatchSize},set(e){Ht("7.1.0","settings.SPRITE_BATCH_SIZE is deprecated, use BatchRenderer.defaultBatchSize"),wr.defaultBatchSize=e}},CAN_UPLOAD_SAME_BUFFER:{get(){return wr.canUploadSameBuffer},set(e){Ht("7.1.0","settings.CAN_UPLOAD_SAME_BUFFER is deprecated, use BatchRenderer.canUploadSameBuffer"),wr.canUploadSameBuffer=e}},GC_MODE:{get(){return Tr.defaultMode},set(e){Ht("7.1.0","settings.GC_MODE is deprecated, use TextureGCSystem.defaultMode"),Tr.defaultMode=e}},GC_MAX_IDLE:{get(){return Tr.defaultMaxIdle},set(e){Ht("7.1.0","settings.GC_MAX_IDLE is deprecated, use TextureGCSystem.defaultMaxIdle"),Tr.defaultMaxIdle=e}},GC_MAX_CHECK_COUNT:{get(){return Tr.defaultCheckCountMax},set(e){Ht("7.1.0","settings.GC_MAX_CHECK_COUNT is deprecated, use TextureGCSystem.defaultCheckCountMax"),Tr.defaultCheckCountMax=e}},PRECISION_VERTEX:{get(){return Xr.defaultVertexPrecision},set(e){Ht("7.1.0","settings.PRECISION_VERTEX is deprecated, use Program.defaultVertexPrecision"),Xr.defaultVertexPrecision=e}},PRECISION_FRAGMENT:{get(){return Xr.defaultFragmentPrecision},set(e){Ht("7.1.0","settings.PRECISION_FRAGMENT is deprecated, use Program.defaultFragmentPrecision"),Xr.defaultFragmentPrecision=e}}});var Po=(e=>(e[e.INTERACTION=50]="INTERACTION",e[e.HIGH=25]="HIGH",e[e.NORMAL=0]="NORMAL",e[e.LOW=-25]="LOW",e[e.UTILITY=-50]="UTILITY",e))(Po||{});class du{constructor(t,r=null,n=0,i=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=t,this.context=r,this.priority=n,this.once=i}match(t,r=null){return this.fn===t&&this.context===r}emit(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));const r=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),r}connect(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this}destroy(t=!1){this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const r=this.next;return this.next=t?null:r,this.previous=null,r}}const Je=class{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new du(null,null,1/0),this.deltaMS=1/Je.targetFPMS,this.elapsedMS=1/Je.targetFPMS,this._tick=e=>{this._requestId=null,this.started&&(this.update(e),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(e,t,r=Po.NORMAL){return this._addListener(new du(e,t,r))}addOnce(e,t,r=Po.NORMAL){return this._addListener(new du(e,t,r,!0))}_addListener(e){let t=this._head.next,r=this._head;if(!t)e.connect(r);else{for(;t;){if(e.priority>t.priority){e.connect(r);break}r=t,t=t.next}e.previous||e.connect(r)}return this._startIfPossible(),this}remove(e,t){let r=this._head.next;for(;r;)r.match(e,t)?r=r.destroy():r=r.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let e=0,t=this._head;for(;t=t.next;)e++;return e}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let e=this._head.next;for(;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}}update(e=performance.now()){let t;if(e>this.lastTime){if(t=this.elapsedMS=e-this.lastTime,t>this._maxElapsedMS&&(t=this._maxElapsedMS),t*=this.speed,this._minElapsedMS){const i=e-this._lastFrame|0;if(i<this._minElapsedMS)return;this._lastFrame=e-i%this._minElapsedMS}this.deltaMS=t,this.deltaTime=this.deltaMS*Je.targetFPMS;const r=this._head;let n=r.next;for(;n;)n=n.emit(this.deltaTime);r.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=e}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(e){const t=Math.min(this.maxFPS,e),r=Math.min(Math.max(0,t)/1e3,Je.targetFPMS);this._maxElapsedMS=1/r}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(e){if(e===0)this._minElapsedMS=0;else{const t=Math.max(this.minFPS,e);this._minElapsedMS=1/(t/1e3)}}static get shared(){if(!Je._shared){const e=Je._shared=new Je;e.autoStart=!0,e._protected=!0}return Je._shared}static get system(){if(!Je._system){const e=Je._system=new Je;e.autoStart=!0,e._protected=!0}return Je._system}};let Er=Je;Er.targetFPMS=.06,Object.defineProperties(Dt,{TARGET_FPMS:{get(){return Er.targetFPMS},set(e){Ht("7.1.0","settings.TARGET_FPMS is deprecated, use Ticker.targetFPMS"),Er.targetFPMS=e}}});class Ud{static init(t){t=Object.assign({autoStart:!0,sharedTicker:!1},t),Object.defineProperty(this,"ticker",{set(r){this._ticker&&this._ticker.remove(this.render,this),this._ticker=r,r&&r.add(this.render,this,Po.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=t.sharedTicker?Er.shared:new Er,t.autoStart&&this.start()}static destroy(){if(this._ticker){const t=this._ticker;this.ticker=null,t.destroy()}}}Ud.extension=jt.Application,te.add(Ud);const dT=[];te.handleByList(jt.Renderer,dT);class $d{constructor(t){this.renderer=t}contextChange(t){let r;if(this.renderer.context.webGLVersion===1){const n=t.getParameter(t.FRAMEBUFFER_BINDING);t.bindFramebuffer(t.FRAMEBUFFER,null),r=t.getParameter(t.SAMPLES),t.bindFramebuffer(t.FRAMEBUFFER,n)}else{const n=t.getParameter(t.DRAW_FRAMEBUFFER_BINDING);t.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),r=t.getParameter(t.SAMPLES),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,n)}r>=Te.HIGH?this.multisample=Te.HIGH:r>=Te.MEDIUM?this.multisample=Te.MEDIUM:r>=Te.LOW?this.multisample=Te.LOW:this.multisample=Te.NONE}destroy(){}}$d.extension={type:jt.RendererSystem,name:"_multisample"},te.add($d);class pT{constructor(t){this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class Gd{constructor(t){this.renderer=t,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(t){const{gl:r,CONTEXT_UID:n}=this,i=t._glBuffers[n]||this.createGLBuffer(t);r.bindBuffer(t.type,i.buffer)}unbind(t){const{gl:r}=this;r.bindBuffer(t,null)}bindBufferBase(t,r){const{gl:n,CONTEXT_UID:i}=this;if(this.boundBufferBases[r]!==t){const o=t._glBuffers[i]||this.createGLBuffer(t);this.boundBufferBases[r]=t,n.bindBufferBase(n.UNIFORM_BUFFER,r,o.buffer)}}bindBufferRange(t,r,n){const{gl:i,CONTEXT_UID:o}=this;n=n||0;const a=t._glBuffers[o]||this.createGLBuffer(t);i.bindBufferRange(i.UNIFORM_BUFFER,r||0,a.buffer,n*256,256)}update(t){const{gl:r,CONTEXT_UID:n}=this,i=t._glBuffers[n]||this.createGLBuffer(t);if(t._updateID!==i.updateID)if(i.updateID=t._updateID,r.bindBuffer(t.type,i.buffer),i.byteLength>=t.data.byteLength)r.bufferSubData(t.type,0,t.data);else{const o=t.static?r.STATIC_DRAW:r.DYNAMIC_DRAW;i.byteLength=t.data.byteLength,r.bufferData(t.type,t.data,o)}}dispose(t,r){if(!this.managedBuffers[t.id])return;delete this.managedBuffers[t.id];const n=t._glBuffers[this.CONTEXT_UID],i=this.gl;t.disposeRunner.remove(this),n&&(r||i.deleteBuffer(n.buffer),delete t._glBuffers[this.CONTEXT_UID])}disposeAll(t){const r=Object.keys(this.managedBuffers);for(let n=0;n<r.length;n++)this.dispose(this.managedBuffers[r[n]],t)}createGLBuffer(t){const{CONTEXT_UID:r,gl:n}=this;return t._glBuffers[r]=new pT(n.createBuffer()),this.managedBuffers[t.id]=t,t.disposeRunner.add(this),t._glBuffers[r]}}Gd.extension={type:jt.RendererSystem,name:"buffer"},te.add(Gd);class jd{constructor(t){this.renderer=t}render(t,r){const n=this.renderer;let i,o,a,u;if(r&&(i=r.renderTexture,o=r.clear,a=r.transform,u=r.skipUpdateTransform),this.renderingToScreen=!i,n.runners.prerender.emit(),n.emit("prerender"),n.projection.transform=a,!n.context.isLost){if(i||(this.lastObjectRendered=t),!u){const f=t.enableTempParent();t.updateTransform(),t.disableTempParent(f)}n.renderTexture.bind(i),n.batch.currentRenderer.start(),(o??n.background.clearBeforeRender)&&n.renderTexture.clear(),t.render(n),n.batch.currentRenderer.flush(),i&&(r.blit&&n.framebuffer.blit(),i.baseTexture.update()),n.runners.postrender.emit(),n.projection.transform=null,n.emit("postrender")}}destroy(){this.renderer=null,this.lastObjectRendered=null}}jd.extension={type:jt.RendererSystem,name:"objectRenderer"},te.add(jd);const pu=class extends cT{constructor(e){super(),this.type=Fc.WEBGL,e=Object.assign({},Dt.RENDER_OPTIONS,e),this.gl=null,this.CONTEXT_UID=0,this.globalUniforms=new br({projectionMatrix:new $e},!0);const t={runners:["init","destroy","contextChange","resolutionChange","reset","update","postrender","prerender","resize"],systems:pu.__systems,priority:["_view","textureGenerator","background","_plugin","startup","context","state","texture","buffer","geometry","framebuffer","transformFeedback","mask","scissor","stencil","projection","textureGC","filter","renderTexture","batch","objectRenderer","_multisample"]};this.setup(t),"useContextAlpha"in e&&(Ht("7.0.0","options.useContextAlpha is deprecated, use options.premultipliedAlpha and options.backgroundAlpha instead"),e.premultipliedAlpha=e.useContextAlpha&&e.useContextAlpha!=="notMultiplied",e.backgroundAlpha=e.useContextAlpha===!1?1:e.backgroundAlpha),this._plugin.rendererPlugins=pu.__plugins,this.options=e,this.startup.run(this.options)}static test(e){return e!=null&&e.forceCanvas?!1:zx()}render(e,t){this.objectRenderer.render(e,t)}resize(e,t){this._view.resizeView(e,t)}reset(){return this.runners.reset.emit(),this}clear(){this.renderTexture.bind(),this.renderTexture.clear()}destroy(e=!1){this.runners.destroy.items.reverse(),this.emitWithCustomOptions(this.runners.destroy,{_view:e}),super.destroy()}get plugins(){return this._plugin.plugins}get multisample(){return this._multisample.multisample}get width(){return this._view.element.width}get height(){return this._view.element.height}get resolution(){return this._view.resolution}set resolution(e){this._view.resolution=e,this.runners.resolutionChange.emit(e)}get autoDensity(){return this._view.autoDensity}get view(){return this._view.element}get screen(){return this._view.screen}get lastObjectRendered(){return this.objectRenderer.lastObjectRendered}get renderingToScreen(){return this.objectRenderer.renderingToScreen}get rendererLogId(){return`WebGL ${this.context.webGLVersion}`}get clearBeforeRender(){return Ht("7.0.0","renderer.clearBeforeRender has been deprecated, please use renderer.background.clearBeforeRender instead."),this.background.clearBeforeRender}get useContextAlpha(){return Ht("7.0.0","renderer.useContextAlpha has been deprecated, please use renderer.context.premultipliedAlpha instead."),this.context.useContextAlpha}get preserveDrawingBuffer(){return Ht("7.0.0","renderer.preserveDrawingBuffer has been deprecated, we cannot truly know this unless pixi created the context"),this.context.preserveDrawingBuffer}get backgroundColor(){return Ht("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color}set backgroundColor(e){Ht("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color=e}get backgroundAlpha(){return Ht("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha}set backgroundAlpha(e){Ht("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha=e}get powerPreference(){return Ht("7.0.0","renderer.powerPreference has been deprecated, we can only know this if pixi creates the context"),this.context.powerPreference}generateTexture(e,t){return this.textureGenerator.generateTexture(e,t)}};let wi=pu;wi.extension={type:jt.Renderer,priority:1},wi.__plugins={},wi.__systems={},te.handleByMap(jt.RendererPlugin,wi.__plugins),te.handleByMap(jt.RendererSystem,wi.__systems),te.add(wi);class qd extends us{constructor(t,r){const{width:n,height:i}=r||{};super(n,i),this.items=[],this.itemDirtyIds=[];for(let o=0;o<t;o++){const a=new Kt;this.items.push(a),this.itemDirtyIds.push(-2)}this.length=t,this._load=null,this.baseTexture=null}initFromArray(t,r){for(let n=0;n<this.length;n++)t[n]&&(t[n].castToBaseTexture?this.addBaseTextureAt(t[n].castToBaseTexture(),n):t[n]instanceof us?this.addResourceAt(t[n],n):this.addResourceAt(Jh(t[n],r),n))}dispose(){for(let t=0,r=this.length;t<r;t++)this.items[t].destroy();this.items=null,this.itemDirtyIds=null,this._load=null}addResourceAt(t,r){if(!this.items[r])throw new Error(`Index ${r} is out of bounds`);return t.valid&&!this.valid&&this.resize(t.width,t.height),this.items[r].setResource(t),this}bind(t){if(this.baseTexture!==null)throw new Error("Only one base texture per TextureArray is allowed");super.bind(t);for(let r=0;r<this.length;r++)this.items[r].parentTextureArray=t,this.items[r].on("update",t.update,t)}unbind(t){super.unbind(t);for(let r=0;r<this.length;r++)this.items[r].parentTextureArray=null,this.items[r].off("update",t.update,t)}load(){if(this._load)return this._load;const r=this.items.map(n=>n.resource).filter(n=>n).map(n=>n.load());return this._load=Promise.all(r).then(()=>{const{realWidth:n,realHeight:i}=this.items[0];return this.resize(n,i),Promise.resolve(this)}),this._load}}class vT extends qd{constructor(t,r){const{width:n,height:i}=r||{};let o,a;Array.isArray(t)?(o=t,a=t.length):a=t,super(a,{width:n,height:i}),o&&this.initFromArray(o,r)}addBaseTextureAt(t,r){if(t.resource)this.addResourceAt(t.resource,r);else throw new Error("ArrayResource does not support RenderTexture");return this}bind(t){super.bind(t),t.target=ii.TEXTURE_2D_ARRAY}upload(t,r,n){const{length:i,itemDirtyIds:o,items:a}=this,{gl:u}=t;n.dirtyId<0&&u.texImage3D(u.TEXTURE_2D_ARRAY,0,n.internalFormat,this._width,this._height,i,0,r.format,n.type,null);for(let f=0;f<i;f++){const h=a[f];o[f]<h.dirtyId&&(o[f]=h.dirtyId,h.valid&&u.texSubImage3D(u.TEXTURE_2D_ARRAY,0,0,0,f,h.resource.width,h.resource.height,1,r.format,n.type,h.resource.source))}return!0}}class gT extends dn{constructor(t){super(t)}static test(t){const{OffscreenCanvas:r}=globalThis;return r&&t instanceof r?!0:globalThis.HTMLCanvasElement&&t instanceof HTMLCanvasElement}}const gs=class extends qd{constructor(e,t){const{width:r,height:n,autoLoad:i,linkBaseTexture:o}=t||{};if(e&&e.length!==gs.SIDES)throw new Error(`Invalid length. Got ${e.length}, expected 6`);super(6,{width:r,height:n});for(let a=0;a<gs.SIDES;a++)this.items[a].target=ii.TEXTURE_CUBE_MAP_POSITIVE_X+a;this.linkBaseTexture=o!==!1,e&&this.initFromArray(e,t),i!==!1&&this.load()}bind(e){super.bind(e),e.target=ii.TEXTURE_CUBE_MAP}addBaseTextureAt(e,t,r){if(r===void 0&&(r=this.linkBaseTexture),!this.items[t])throw new Error(`Index ${t} is out of bounds`);if(!this.linkBaseTexture||e.parentTextureArray||Object.keys(e._glTextures).length>0)if(e.resource)this.addResourceAt(e.resource,t);else throw new Error("CubeResource does not support copying of renderTexture.");else e.target=ii.TEXTURE_CUBE_MAP_POSITIVE_X+t,e.parentTextureArray=this.baseTexture,this.items[t]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[t]=e,this}upload(e,t,r){const n=this.itemDirtyIds;for(let i=0;i<gs.SIDES;i++){const o=this.items[i];(n[i]<o.dirtyId||r.dirtyId<t.dirtyId)&&(o.valid&&o.resource?(o.resource.upload(e,o,r),n[i]=o.dirtyId):n[i]<-1&&(e.gl.texImage2D(o.target,0,r.internalFormat,t.realWidth,t.realHeight,0,t.format,r.type,null),n[i]=-1))}return!0}static test(e){return Array.isArray(e)&&e.length===gs.SIDES}};let zd=gs;zd.SIDES=6;class Ti extends dn{constructor(t,r){r=r||{};let n,i;typeof t=="string"?(n=Ti.EMPTY,i=t):(n=t,i=null),super(n),this.url=i,this.crossOrigin=r.crossOrigin??!0,this.alphaMode=typeof r.alphaMode=="number"?r.alphaMode:null,this._load=null,r.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(async(t,r)=>{if(this.url===null){t(this);return}try{const n=await Dt.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;const i=await n.blob();if(this.destroyed)return;const o=await createImageBitmap(i,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===ln.UNPACK?"premultiply":"none"});if(this.destroyed)return;this.source=o,this.update(),t(this)}catch(n){if(this.destroyed)return;r(n),this.onError.emit(n)}}),this._load)}upload(t,r,n){return this.source instanceof ImageBitmap?(typeof this.alphaMode=="number"&&(r.alphaMode=this.alphaMode),super.upload(t,r,n)):(this.load(),!1)}dispose(){this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(t){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&(typeof t=="string"||t instanceof ImageBitmap)}static get EMPTY(){return Ti._EMPTY=Ti._EMPTY??Dt.ADAPTER.createCanvas(0,0),Ti._EMPTY}}const No=class extends dn{constructor(e,t){t=t||{},super(Dt.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=e,this.scale=t.scale||1,this._overrideWidth=t.width,this._overrideHeight=t.height,this._resolve=null,this._crossorigin=t.crossorigin,this._load=null,t.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(e=>{if(this._resolve=()=>{this.resize(this.source.width,this.source.height),e(this)},No.SVG_XML.test(this.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");this.svg=`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`}this._loadSvg()}),this._load)}_loadSvg(){const e=new Image;dn.crossOrigin(e,this.svg,this._crossorigin),e.src=this.svg,e.onerror=t=>{this._resolve&&(e.onerror=null,this.onError.emit(t))},e.onload=()=>{if(!this._resolve)return;const t=e.width,r=e.height;if(!t||!r)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let n=t*this.scale,i=r*this.scale;(this._overrideWidth||this._overrideHeight)&&(n=this._overrideWidth||this._overrideHeight/r*t,i=this._overrideHeight||this._overrideWidth/t*r),n=Math.round(n),i=Math.round(i);const o=this.source;o.width=n,o.height=i,o._pixiId=`canvas_${ls()}`,o.getContext("2d").drawImage(e,0,0,t,r,0,0,n,i),this._resolve(),this._resolve=null}}static getSize(e){const t=No.SVG_SIZE.exec(e),r={};return t&&(r[t[1]]=Math.round(parseFloat(t[3])),r[t[5]]=Math.round(parseFloat(t[7]))),r}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(e,t){return t==="svg"||typeof e=="string"&&e.startsWith("data:image/svg+xml")||typeof e=="string"&&No.SVG_XML.test(e)}};let vu=No;vu.SVG_XML=/^(<\?xml[^?]+\?>)?\s*(<!--[^(-->)]*-->)?\s*\<svg/m,vu.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;const gu=class extends dn{constructor(e,t){if(t=t||{},!(e instanceof HTMLVideoElement)){const r=document.createElement("video");r.setAttribute("preload","auto"),r.setAttribute("webkit-playsinline",""),r.setAttribute("playsinline",""),typeof e=="string"&&(e=[e]);const n=e[0].src||e[0];dn.crossOrigin(r,n,t.crossorigin);for(let i=0;i<e.length;++i){const o=document.createElement("source");let{src:a,mime:u}=e[i];a=a||e[i];const f=a.split("?").shift().toLowerCase(),h=f.slice(f.lastIndexOf(".")+1);u=u||gu.MIME_TYPES[h]||`video/${h}`,o.src=a,o.type=u,r.appendChild(o)}e=r}super(e),this.noSubImage=!0,this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=t.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=t.autoPlay!==!1,this._load=null,this._resolve=null,this._onCanPlay=this._onCanPlay.bind(this),this._onError=this._onError.bind(this),t.autoLoad!==!1&&this.load()}update(e=0){if(!this.destroyed){const t=Er.shared.elapsedMS*this.source.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-t),(!this._updateFPS||this._msToNextUpdate<=0)&&(super.update(),this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0)}}load(){if(this._load)return this._load;const e=this.source;return(e.readyState===e.HAVE_ENOUGH_DATA||e.readyState===e.HAVE_FUTURE_DATA)&&e.width&&e.height&&(e.complete=!0),e.addEventListener("play",this._onPlayStart.bind(this)),e.addEventListener("pause",this._onPlayStop.bind(this)),this._isSourceReady()?this._onCanPlay():(e.addEventListener("canplay",this._onCanPlay),e.addEventListener("canplaythrough",this._onCanPlay),e.addEventListener("error",this._onError,!0)),this._load=new Promise(t=>{this.valid?t(this):(this._resolve=t,e.load())}),this._load}_onError(e){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(e)}_isSourcePlaying(){const e=this.source;return!e.paused&&!e.ended&&this._isSourceReady()}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(Er.shared.add(this.update,this),this._isConnectedToTicker=!0)}_onPlayStop(){this._isConnectedToTicker&&(Er.shared.remove(this.update,this),this._isConnectedToTicker=!1)}_onCanPlay(){const e=this.source;e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay);const t=this.valid;this.resize(e.videoWidth,e.videoHeight),!t&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&e.play()}dispose(){this._isConnectedToTicker&&(Er.shared.remove(this.update,this),this._isConnectedToTicker=!1);const e=this.source;e&&(e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,!this._autoUpdate&&this._isConnectedToTicker?(Er.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(Er.shared.add(this.update,this),this._isConnectedToTicker=!0))}get updateFPS(){return this._updateFPS}set updateFPS(e){e!==this._updateFPS&&(this._updateFPS=e)}static test(e,t){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement||gu.TYPES.includes(t)}};let mu=gu;mu.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],mu.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},Jl.push(Ti,gd,gT,mu,vu,tu,zd,vT);var mT=`attribute vec2 aVertexPosition;
497
+ `))}}let nT=0;const Oo={textureCount:0,uboCount:0};class Ld{constructor(t){this.destroyed=!1,this.renderer=t,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=nT++}systemCheck(){if(!Aw())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(t){this.gl=t,this.reset()}bind(t,r){t.disposeRunner.add(this),t.uniforms.globals=this.renderer.globalUniforms;const n=t.program,i=n.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(t);return this.shader=t,this.program!==n&&(this.program=n,this.gl.useProgram(i.program)),r||(Oo.textureCount=0,Oo.uboCount=0,this.syncUniformGroup(t.uniformGroup,Oo)),i}setUniforms(t){const r=this.shader.program,n=r.glPrograms[this.renderer.CONTEXT_UID];r.syncUniforms(n.uniformData,t,this.renderer)}syncUniformGroup(t,r){const n=this.getGlProgram();(!t.static||t.dirtyId!==n.uniformDirtyGroups[t.id])&&(n.uniformDirtyGroups[t.id]=t.dirtyId,this.syncUniforms(t,n,r))}syncUniforms(t,r,n){(t.syncUniforms[this.shader.program.id]||this.createSyncGroups(t))(r.uniformData,t.uniforms,this.renderer,n)}createSyncGroups(t){const r=this.getSignature(t,this.shader.program.uniformData,"u");return this.cache[r]||(this.cache[r]=xw(t,this.shader.program.uniformData)),t.syncUniforms[this.shader.program.id]=this.cache[r],t.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(t,r){const n=this.getGlProgram();if(!t.static||t.dirtyId!==0||!n.uniformGroups[t.id]){t.dirtyId=0;const i=n.uniformGroups[t.id]||this.createSyncBufferGroup(t,n,r);t.buffer.update(),i(n.uniformData,t.uniforms,this.renderer,Oo,t.buffer)}this.renderer.buffer.bindBufferBase(t.buffer,n.uniformBufferBindings[r])}createSyncBufferGroup(t,r,n){const{gl:i}=this.renderer;this.renderer.buffer.bind(t.buffer);const o=this.gl.getUniformBlockIndex(r.program,n);r.uniformBufferBindings[n]=this.shader.uniformBindCount,i.uniformBlockBinding(r.program,o,this.shader.uniformBindCount),this.shader.uniformBindCount++;const a=this.getSignature(t,this.shader.program.uniformData,"ubo");let u=this._uboCache[a];if(u||(u=this._uboCache[a]=rT(t,this.shader.program.uniformData)),t.autoManage){const f=new Float32Array(u.size/4);t.buffer.update(f)}return r.uniformGroups[t.id]=u.syncFunc,r.uniformGroups[t.id]}getSignature(t,r,n){const i=t.uniforms,o=[`${n}-`];for(const a in i)o.push(a),r[a]&&o.push(r[a].type);return o.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(t){const r=this.gl,n=t.program,i=Zw(r,n);return n.glPrograms[this.renderer.CONTEXT_UID]=i,i}reset(){this.program=null,this.shader=null}disposeShader(t){this.shader===t&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}Ld.extension={type:jt.RendererSystem,name:"shader"},te.add(Ld);class Co{constructor(t){this.renderer=t}run(t){const{renderer:r}=this;r.runners.init.emit(r.options),t.hello&&console.log(`PixiJS 7.2.3 - ${r.rendererLogId} - https://pixijs.com`),r.resize(r.screen.width,r.screen.height)}destroy(){}}Co.defaultOptions={hello:!1},Co.extension={type:[jt.RendererSystem,jt.CanvasRendererSystem],name:"startup"},te.add(Co);function iT(e,t=[]){return t[Rt.NORMAL]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.ADD]=[e.ONE,e.ONE],t[Rt.MULTIPLY]=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.SCREEN]=[e.ONE,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.OVERLAY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.DARKEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.LIGHTEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.COLOR_DODGE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.COLOR_BURN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.HARD_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.SOFT_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.DIFFERENCE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.EXCLUSION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.HUE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.SATURATION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.COLOR]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.LUMINOSITY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.NONE]=[0,0],t[Rt.NORMAL_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.ADD_NPM]=[e.SRC_ALPHA,e.ONE,e.ONE,e.ONE],t[Rt.SCREEN_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.SRC_IN]=[e.DST_ALPHA,e.ZERO],t[Rt.SRC_OUT]=[e.ONE_MINUS_DST_ALPHA,e.ZERO],t[Rt.SRC_ATOP]=[e.DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[Rt.DST_OVER]=[e.ONE_MINUS_DST_ALPHA,e.ONE],t[Rt.DST_IN]=[e.ZERO,e.SRC_ALPHA],t[Rt.DST_OUT]=[e.ZERO,e.ONE_MINUS_SRC_ALPHA],t[Rt.DST_ATOP]=[e.ONE_MINUS_DST_ALPHA,e.SRC_ALPHA],t[Rt.XOR]=[e.ONE_MINUS_DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[Rt.SUBTRACT]=[e.ONE,e.ONE,e.ONE,e.ONE,e.FUNC_REVERSE_SUBTRACT,e.FUNC_ADD],t}const sT=0,oT=1,aT=2,lT=3,uT=4,fT=5,cu=class{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=Rt.NONE,this._blendEq=!1,this.map=[],this.map[sT]=this.setBlend,this.map[oT]=this.setOffset,this.map[aT]=this.setCullFace,this.map[lT]=this.setDepthTest,this.map[uT]=this.setFrontFace,this.map[fT]=this.setDepthMask,this.checks=[],this.defaultState=new ho,this.defaultState.blend=!0}contextChange(e){this.gl=e,this.blendModes=iT(e),this.set(this.defaultState),this.reset()}set(e){if(e=e||this.defaultState,this.stateId!==e.data){let t=this.stateId^e.data,r=0;for(;t;)t&1&&this.map[r].call(this,!!(e.data&1<<r)),t=t>>1,r++;this.stateId=e.data}for(let t=0;t<this.checks.length;t++)this.checks[t](this,e)}forceState(e){e=e||this.defaultState;for(let t=0;t<this.map.length;t++)this.map[t].call(this,!!(e.data&1<<t));for(let t=0;t<this.checks.length;t++)this.checks[t](this,e);this.stateId=e.data}setBlend(e){this.updateCheck(cu.checkBlendMode,e),this.gl[e?"enable":"disable"](this.gl.BLEND)}setOffset(e){this.updateCheck(cu.checkPolygonOffset,e),this.gl[e?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)}setDepthTest(e){this.gl[e?"enable":"disable"](this.gl.DEPTH_TEST)}setDepthMask(e){this.gl.depthMask(e)}setCullFace(e){this.gl[e?"enable":"disable"](this.gl.CULL_FACE)}setFrontFace(e){this.gl.frontFace(this.gl[e?"CW":"CCW"])}setBlendMode(e){if(e===this.blendMode)return;this.blendMode=e;const t=this.blendModes[e],r=this.gl;t.length===2?r.blendFunc(t[0],t[1]):r.blendFuncSeparate(t[0],t[1],t[2],t[3]),t.length===6?(this._blendEq=!0,r.blendEquationSeparate(t[4],t[5])):this._blendEq&&(this._blendEq=!1,r.blendEquationSeparate(r.FUNC_ADD,r.FUNC_ADD))}setPolygonOffset(e,t){this.gl.polygonOffset(e,t)}reset(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(this.defaultState),this._blendEq=!0,this.blendMode=-1,this.setBlendMode(0)}updateCheck(e,t){const r=this.checks.indexOf(e);t&&r===-1?this.checks.push(e):!t&&r!==-1&&this.checks.splice(r,1)}static checkBlendMode(e,t){e.setBlendMode(t.blendMode)}static checkPolygonOffset(e,t){e.setPolygonOffset(1,t.polygonOffset)}destroy(){this.gl=null}};let Fd=cu;Fd.extension={type:jt.RendererSystem,name:"state"},te.add(Fd);class cT extends Vs{constructor(){super(...arguments),this.runners={},this._systemsHash={}}setup(t){this.addRunners(...t.runners);const r=(t.priority??[]).filter(i=>t.systems[i]),n=[...r,...Object.keys(t.systems).filter(i=>!r.includes(i))];for(const i of n)this.addSystem(t.systems[i],i)}addRunners(...t){t.forEach(r=>{this.runners[r]=new _r(r)})}addSystem(t,r){const n=new t(this);if(this[r])throw new Error(`Whoops! The name "${r}" is already in use`);this[r]=n,this._systemsHash[r]=n;for(const i in this.runners)this.runners[i].add(n);return this}emitWithCustomOptions(t,r){const n=Object.keys(this._systemsHash);t.items.forEach(i=>{const o=n.find(a=>this._systemsHash[a]===i);i[t.name](r[o])})}destroy(){Object.values(this.runners).forEach(t=>{t.destroy()}),this._systemsHash={}}}const Ro=class{constructor(e){this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=Ro.defaultMaxIdle,this.checkCountMax=Ro.defaultCheckCountMax,this.mode=Ro.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==sl.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const e=this.renderer.texture,t=e.managedTextures;let r=!1;for(let n=0;n<t.length;n++){const i=t[n];!i.framebuffer&&this.count-i.touched>this.maxIdle&&(e.destroyTexture(i,!0),t[n]=null,r=!0)}if(r){let n=0;for(let i=0;i<t.length;i++)t[i]!==null&&(t[n++]=t[i]);t.length=n}}unload(e){const t=this.renderer.texture,r=e._texture;r&&!r.framebuffer&&t.destroyTexture(r);for(let n=e.children.length-1;n>=0;n--)this.unload(e.children[n])}destroy(){this.renderer=null}};let Tr=Ro;Tr.defaultMode=sl.AUTO,Tr.defaultMaxIdle=60*60,Tr.defaultCheckCountMax=60*10,Tr.extension={type:jt.RendererSystem,name:"textureGC"},te.add(Tr);class hu{constructor(t){this.texture=t,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=Xt.UNSIGNED_BYTE,this.internalFormat=_t.RGBA,this.samplerType=0}}function hT(e){let t;return"WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext?t={[Xt.UNSIGNED_BYTE]:{[_t.RGBA]:e.RGBA8,[_t.RGB]:e.RGB8,[_t.RG]:e.RG8,[_t.RED]:e.R8,[_t.RGBA_INTEGER]:e.RGBA8UI,[_t.RGB_INTEGER]:e.RGB8UI,[_t.RG_INTEGER]:e.RG8UI,[_t.RED_INTEGER]:e.R8UI,[_t.ALPHA]:e.ALPHA,[_t.LUMINANCE]:e.LUMINANCE,[_t.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[Xt.BYTE]:{[_t.RGBA]:e.RGBA8_SNORM,[_t.RGB]:e.RGB8_SNORM,[_t.RG]:e.RG8_SNORM,[_t.RED]:e.R8_SNORM,[_t.RGBA_INTEGER]:e.RGBA8I,[_t.RGB_INTEGER]:e.RGB8I,[_t.RG_INTEGER]:e.RG8I,[_t.RED_INTEGER]:e.R8I},[Xt.UNSIGNED_SHORT]:{[_t.RGBA_INTEGER]:e.RGBA16UI,[_t.RGB_INTEGER]:e.RGB16UI,[_t.RG_INTEGER]:e.RG16UI,[_t.RED_INTEGER]:e.R16UI,[_t.DEPTH_COMPONENT]:e.DEPTH_COMPONENT16},[Xt.SHORT]:{[_t.RGBA_INTEGER]:e.RGBA16I,[_t.RGB_INTEGER]:e.RGB16I,[_t.RG_INTEGER]:e.RG16I,[_t.RED_INTEGER]:e.R16I},[Xt.UNSIGNED_INT]:{[_t.RGBA_INTEGER]:e.RGBA32UI,[_t.RGB_INTEGER]:e.RGB32UI,[_t.RG_INTEGER]:e.RG32UI,[_t.RED_INTEGER]:e.R32UI,[_t.DEPTH_COMPONENT]:e.DEPTH_COMPONENT24},[Xt.INT]:{[_t.RGBA_INTEGER]:e.RGBA32I,[_t.RGB_INTEGER]:e.RGB32I,[_t.RG_INTEGER]:e.RG32I,[_t.RED_INTEGER]:e.R32I},[Xt.FLOAT]:{[_t.RGBA]:e.RGBA32F,[_t.RGB]:e.RGB32F,[_t.RG]:e.RG32F,[_t.RED]:e.R32F,[_t.DEPTH_COMPONENT]:e.DEPTH_COMPONENT32F},[Xt.HALF_FLOAT]:{[_t.RGBA]:e.RGBA16F,[_t.RGB]:e.RGB16F,[_t.RG]:e.RG16F,[_t.RED]:e.R16F},[Xt.UNSIGNED_SHORT_5_6_5]:{[_t.RGB]:e.RGB565},[Xt.UNSIGNED_SHORT_4_4_4_4]:{[_t.RGBA]:e.RGBA4},[Xt.UNSIGNED_SHORT_5_5_5_1]:{[_t.RGBA]:e.RGB5_A1},[Xt.UNSIGNED_INT_2_10_10_10_REV]:{[_t.RGBA]:e.RGB10_A2,[_t.RGBA_INTEGER]:e.RGB10_A2UI},[Xt.UNSIGNED_INT_10F_11F_11F_REV]:{[_t.RGB]:e.R11F_G11F_B10F},[Xt.UNSIGNED_INT_5_9_9_9_REV]:{[_t.RGB]:e.RGB9_E5},[Xt.UNSIGNED_INT_24_8]:{[_t.DEPTH_STENCIL]:e.DEPTH24_STENCIL8},[Xt.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[_t.DEPTH_STENCIL]:e.DEPTH32F_STENCIL8}}:t={[Xt.UNSIGNED_BYTE]:{[_t.RGBA]:e.RGBA,[_t.RGB]:e.RGB,[_t.ALPHA]:e.ALPHA,[_t.LUMINANCE]:e.LUMINANCE,[_t.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[Xt.UNSIGNED_SHORT_5_6_5]:{[_t.RGB]:e.RGB},[Xt.UNSIGNED_SHORT_4_4_4_4]:{[_t.RGBA]:e.RGBA},[Xt.UNSIGNED_SHORT_5_5_5_1]:{[_t.RGBA]:e.RGBA}},t}class Bd{constructor(t){this.renderer=t,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new Kt,this.hasIntegerTextures=!1}contextChange(){const t=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=hT(t);const r=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=r;for(let i=0;i<r;i++)this.boundTextures[i]=null;this.emptyTextures={};const n=new hu(t.createTexture());t.bindTexture(t.TEXTURE_2D,n.texture),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array(4)),this.emptyTextures[t.TEXTURE_2D]=n,this.emptyTextures[t.TEXTURE_CUBE_MAP]=new hu(t.createTexture()),t.bindTexture(t.TEXTURE_CUBE_MAP,this.emptyTextures[t.TEXTURE_CUBE_MAP].texture);for(let i=0;i<6;i++)t.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,null);t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MIN_FILTER,t.LINEAR);for(let i=0;i<this.boundTextures.length;i++)this.bind(null,i)}bind(t,r=0){const{gl:n}=this;if(t=t==null?void 0:t.castToBaseTexture(),t!=null&&t.valid&&!t.parentTextureArray){t.touched=this.renderer.textureGC.count;const i=t._glTextures[this.CONTEXT_UID]||this.initTexture(t);this.boundTextures[r]!==t&&(this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),n.bindTexture(t.target,i.texture)),i.dirtyId!==t.dirtyId?(this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),this.updateTexture(t)):i.dirtyStyleId!==t.dirtyStyleId&&this.updateTextureStyle(t),this.boundTextures[r]=t}else this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),n.bindTexture(n.TEXTURE_2D,this.emptyTextures[n.TEXTURE_2D].texture),this.boundTextures[r]=null}reset(){this._unknownBoundTextures=!0,this.hasIntegerTextures=!1,this.currentLocation=-1;for(let t=0;t<this.boundTextures.length;t++)this.boundTextures[t]=this.unknownTexture}unbind(t){const{gl:r,boundTextures:n}=this;if(this._unknownBoundTextures){this._unknownBoundTextures=!1;for(let i=0;i<n.length;i++)n[i]===this.unknownTexture&&this.bind(null,i)}for(let i=0;i<n.length;i++)n[i]===t&&(this.currentLocation!==i&&(r.activeTexture(r.TEXTURE0+i),this.currentLocation=i),r.bindTexture(t.target,this.emptyTextures[t.target].texture),n[i]=null)}ensureSamplerType(t){const{boundTextures:r,hasIntegerTextures:n,CONTEXT_UID:i}=this;if(n)for(let o=t-1;o>=0;--o){const a=r[o];a&&a._glTextures[i].samplerType!==il.FLOAT&&this.renderer.texture.unbind(a)}}initTexture(t){const r=new hu(this.gl.createTexture());return r.dirtyId=-1,t._glTextures[this.CONTEXT_UID]=r,this.managedTextures.push(t),t.on("dispose",this.destroyTexture,this),r}initTextureType(t,r){var n;r.internalFormat=((n=this.internalFormats[t.type])==null?void 0:n[t.format])??t.format,this.webGLVersion===2&&t.type===Xt.HALF_FLOAT?r.type=this.gl.HALF_FLOAT:r.type=t.type}updateTexture(t){var i;const r=t._glTextures[this.CONTEXT_UID];if(!r)return;const n=this.renderer;if(this.initTextureType(t,r),(i=t.resource)!=null&&i.upload(n,t,r))r.samplerType!==il.FLOAT&&(this.hasIntegerTextures=!0);else{const o=t.realWidth,a=t.realHeight,u=n.gl;(r.width!==o||r.height!==a||r.dirtyId<0)&&(r.width=o,r.height=a,u.texImage2D(t.target,0,r.internalFormat,o,a,0,t.format,r.type,null))}t.dirtyStyleId!==r.dirtyStyleId&&this.updateTextureStyle(t),r.dirtyId=t.dirtyId}destroyTexture(t,r){const{gl:n}=this;if(t=t.castToBaseTexture(),t._glTextures[this.CONTEXT_UID]&&(this.unbind(t),n.deleteTexture(t._glTextures[this.CONTEXT_UID].texture),t.off("dispose",this.destroyTexture,this),delete t._glTextures[this.CONTEXT_UID],!r)){const i=this.managedTextures.indexOf(t);i!==-1&&fo(this.managedTextures,i,1)}}updateTextureStyle(t){var n;const r=t._glTextures[this.CONTEXT_UID];r&&((t.mipmap===Rn.POW2||this.webGLVersion!==2)&&!t.isPowerOfTwo?r.mipmap=!1:r.mipmap=t.mipmap>=1,this.webGLVersion!==2&&!t.isPowerOfTwo?r.wrapMode=Qi.CLAMP:r.wrapMode=t.wrapMode,(n=t.resource)!=null&&n.style(this.renderer,t,r)||this.setStyle(t,r),r.dirtyStyleId=t.dirtyStyleId)}setStyle(t,r){const n=this.gl;if(r.mipmap&&t.mipmap!==Rn.ON_MANUAL&&n.generateMipmap(t.target),n.texParameteri(t.target,n.TEXTURE_WRAP_S,r.wrapMode),n.texParameteri(t.target,n.TEXTURE_WRAP_T,r.wrapMode),r.mipmap){n.texParameteri(t.target,n.TEXTURE_MIN_FILTER,t.scaleMode===Lr.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);const i=this.renderer.context.extensions.anisotropicFiltering;if(i&&t.anisotropicLevel>0&&t.scaleMode===Lr.LINEAR){const o=Math.min(t.anisotropicLevel,n.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT));n.texParameterf(t.target,i.TEXTURE_MAX_ANISOTROPY_EXT,o)}}else n.texParameteri(t.target,n.TEXTURE_MIN_FILTER,t.scaleMode===Lr.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(t.target,n.TEXTURE_MAG_FILTER,t.scaleMode===Lr.LINEAR?n.LINEAR:n.NEAREST)}destroy(){this.renderer=null}}Bd.extension={type:jt.RendererSystem,name:"texture"},te.add(Bd);class Dd{constructor(t){this.renderer=t}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(t){const{gl:r,CONTEXT_UID:n}=this,i=t._glTransformFeedbacks[n]||this.createGLTransformFeedback(t);r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,i)}unbind(){const{gl:t}=this;t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(t,r){const{gl:n,renderer:i}=this;r&&i.shader.bind(r),n.beginTransformFeedback(t)}endTransformFeedback(){const{gl:t}=this;t.endTransformFeedback()}createGLTransformFeedback(t){const{gl:r,renderer:n,CONTEXT_UID:i}=this,o=r.createTransformFeedback();t._glTransformFeedbacks[i]=o,r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,o);for(let a=0;a<t.buffers.length;a++){const u=t.buffers[a];u&&(n.buffer.update(u),u._glBuffers[i].refCount++,r.bindBufferBase(r.TRANSFORM_FEEDBACK_BUFFER,a,u._glBuffers[i].buffer||null))}return r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,null),t.disposeRunner.add(this),o}disposeTransformFeedback(t,r){const n=t._glTransformFeedbacks[this.CONTEXT_UID],i=this.gl;t.disposeRunner.remove(this);const o=this.renderer.buffer;if(o)for(let a=0;a<t.buffers.length;a++){const u=t.buffers[a];if(!u)continue;const f=u._glBuffers[this.CONTEXT_UID];f&&(f.refCount--,f.refCount===0&&!r&&o.dispose(u,r))}n&&(r||i.deleteTransformFeedback(n),delete t._glTransformFeedbacks[this.CONTEXT_UID])}destroy(){this.renderer=null}}Dd.extension={type:jt.RendererSystem,name:"transformFeedback"},te.add(Dd);class Io{constructor(t){this.renderer=t}init(t){this.screen=new ne(0,0,t.width,t.height),this.element=t.view||Dt.ADAPTER.createCanvas(),this.resolution=t.resolution||Dt.RESOLUTION,this.autoDensity=!!t.autoDensity}resizeView(t,r){this.element.width=Math.round(t*this.resolution),this.element.height=Math.round(r*this.resolution);const n=this.element.width/this.resolution,i=this.element.height/this.resolution;this.screen.width=n,this.screen.height=i,this.autoDensity&&(this.element.style.width=`${n}px`,this.element.style.height=`${i}px`),this.renderer.emit("resize",n,i),this.renderer.runners.resize.emit(this.screen.width,this.screen.height)}destroy(t){var r;t&&((r=this.element.parentNode)==null||r.removeChild(this.element)),this.renderer=null,this.element=null,this.screen=null}}Io.defaultOptions={width:800,height:600,resolution:Dt.RESOLUTION,autoDensity:!1},Io.extension={type:[jt.RendererSystem,jt.CanvasRendererSystem],name:"_view"},te.add(Io),Dt.PREFER_ENV=Cn.WEBGL2,Dt.STRICT_TEXTURE_CACHE=!1,Dt.RENDER_OPTIONS={...wo.defaultOptions,...xo.defaultOptions,...Io.defaultOptions,...Co.defaultOptions},Object.defineProperties(Dt,{WRAP_MODE:{get(){return Kt.defaultOptions.wrapMode},set(e){zt("7.1.0","settings.WRAP_MODE is deprecated, use BaseTexture.defaultOptions.wrapMode"),Kt.defaultOptions.wrapMode=e}},SCALE_MODE:{get(){return Kt.defaultOptions.scaleMode},set(e){zt("7.1.0","settings.SCALE_MODE is deprecated, use BaseTexture.defaultOptions.scaleMode"),Kt.defaultOptions.scaleMode=e}},MIPMAP_TEXTURES:{get(){return Kt.defaultOptions.mipmap},set(e){zt("7.1.0","settings.MIPMAP_TEXTURES is deprecated, use BaseTexture.defaultOptions.mipmap"),Kt.defaultOptions.mipmap=e}},ANISOTROPIC_LEVEL:{get(){return Kt.defaultOptions.anisotropicLevel},set(e){zt("7.1.0","settings.ANISOTROPIC_LEVEL is deprecated, use BaseTexture.defaultOptions.anisotropicLevel"),Kt.defaultOptions.anisotropicLevel=e}},FILTER_RESOLUTION:{get(){return zt("7.1.0","settings.FILTER_RESOLUTION is deprecated, use Filter.defaultResolution"),Zt.defaultResolution},set(e){Zt.defaultResolution=e}},FILTER_MULTISAMPLE:{get(){return zt("7.1.0","settings.FILTER_MULTISAMPLE is deprecated, use Filter.defaultMultisample"),Zt.defaultMultisample},set(e){Zt.defaultMultisample=e}},SPRITE_MAX_TEXTURES:{get(){return wr.defaultMaxTextures},set(e){zt("7.1.0","settings.SPRITE_MAX_TEXTURES is deprecated, use BatchRenderer.defaultMaxTextures"),wr.defaultMaxTextures=e}},SPRITE_BATCH_SIZE:{get(){return wr.defaultBatchSize},set(e){zt("7.1.0","settings.SPRITE_BATCH_SIZE is deprecated, use BatchRenderer.defaultBatchSize"),wr.defaultBatchSize=e}},CAN_UPLOAD_SAME_BUFFER:{get(){return wr.canUploadSameBuffer},set(e){zt("7.1.0","settings.CAN_UPLOAD_SAME_BUFFER is deprecated, use BatchRenderer.canUploadSameBuffer"),wr.canUploadSameBuffer=e}},GC_MODE:{get(){return Tr.defaultMode},set(e){zt("7.1.0","settings.GC_MODE is deprecated, use TextureGCSystem.defaultMode"),Tr.defaultMode=e}},GC_MAX_IDLE:{get(){return Tr.defaultMaxIdle},set(e){zt("7.1.0","settings.GC_MAX_IDLE is deprecated, use TextureGCSystem.defaultMaxIdle"),Tr.defaultMaxIdle=e}},GC_MAX_CHECK_COUNT:{get(){return Tr.defaultCheckCountMax},set(e){zt("7.1.0","settings.GC_MAX_CHECK_COUNT is deprecated, use TextureGCSystem.defaultCheckCountMax"),Tr.defaultCheckCountMax=e}},PRECISION_VERTEX:{get(){return Xr.defaultVertexPrecision},set(e){zt("7.1.0","settings.PRECISION_VERTEX is deprecated, use Program.defaultVertexPrecision"),Xr.defaultVertexPrecision=e}},PRECISION_FRAGMENT:{get(){return Xr.defaultFragmentPrecision},set(e){zt("7.1.0","settings.PRECISION_FRAGMENT is deprecated, use Program.defaultFragmentPrecision"),Xr.defaultFragmentPrecision=e}}});var Po=(e=>(e[e.INTERACTION=50]="INTERACTION",e[e.HIGH=25]="HIGH",e[e.NORMAL=0]="NORMAL",e[e.LOW=-25]="LOW",e[e.UTILITY=-50]="UTILITY",e))(Po||{});class du{constructor(t,r=null,n=0,i=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=t,this.context=r,this.priority=n,this.once=i}match(t,r=null){return this.fn===t&&this.context===r}emit(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));const r=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),r}connect(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this}destroy(t=!1){this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const r=this.next;return this.next=t?null:r,this.previous=null,r}}const Je=class{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new du(null,null,1/0),this.deltaMS=1/Je.targetFPMS,this.elapsedMS=1/Je.targetFPMS,this._tick=e=>{this._requestId=null,this.started&&(this.update(e),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(e,t,r=Po.NORMAL){return this._addListener(new du(e,t,r))}addOnce(e,t,r=Po.NORMAL){return this._addListener(new du(e,t,r,!0))}_addListener(e){let t=this._head.next,r=this._head;if(!t)e.connect(r);else{for(;t;){if(e.priority>t.priority){e.connect(r);break}r=t,t=t.next}e.previous||e.connect(r)}return this._startIfPossible(),this}remove(e,t){let r=this._head.next;for(;r;)r.match(e,t)?r=r.destroy():r=r.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let e=0,t=this._head;for(;t=t.next;)e++;return e}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let e=this._head.next;for(;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}}update(e=performance.now()){let t;if(e>this.lastTime){if(t=this.elapsedMS=e-this.lastTime,t>this._maxElapsedMS&&(t=this._maxElapsedMS),t*=this.speed,this._minElapsedMS){const i=e-this._lastFrame|0;if(i<this._minElapsedMS)return;this._lastFrame=e-i%this._minElapsedMS}this.deltaMS=t,this.deltaTime=this.deltaMS*Je.targetFPMS;const r=this._head;let n=r.next;for(;n;)n=n.emit(this.deltaTime);r.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=e}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(e){const t=Math.min(this.maxFPS,e),r=Math.min(Math.max(0,t)/1e3,Je.targetFPMS);this._maxElapsedMS=1/r}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(e){if(e===0)this._minElapsedMS=0;else{const t=Math.max(this.minFPS,e);this._minElapsedMS=1/(t/1e3)}}static get shared(){if(!Je._shared){const e=Je._shared=new Je;e.autoStart=!0,e._protected=!0}return Je._shared}static get system(){if(!Je._system){const e=Je._system=new Je;e.autoStart=!0,e._protected=!0}return Je._system}};let Er=Je;Er.targetFPMS=.06,Object.defineProperties(Dt,{TARGET_FPMS:{get(){return Er.targetFPMS},set(e){zt("7.1.0","settings.TARGET_FPMS is deprecated, use Ticker.targetFPMS"),Er.targetFPMS=e}}});class Ud{static init(t){t=Object.assign({autoStart:!0,sharedTicker:!1},t),Object.defineProperty(this,"ticker",{set(r){this._ticker&&this._ticker.remove(this.render,this),this._ticker=r,r&&r.add(this.render,this,Po.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=t.sharedTicker?Er.shared:new Er,t.autoStart&&this.start()}static destroy(){if(this._ticker){const t=this._ticker;this.ticker=null,t.destroy()}}}Ud.extension=jt.Application,te.add(Ud);const dT=[];te.handleByList(jt.Renderer,dT);class $d{constructor(t){this.renderer=t}contextChange(t){let r;if(this.renderer.context.webGLVersion===1){const n=t.getParameter(t.FRAMEBUFFER_BINDING);t.bindFramebuffer(t.FRAMEBUFFER,null),r=t.getParameter(t.SAMPLES),t.bindFramebuffer(t.FRAMEBUFFER,n)}else{const n=t.getParameter(t.DRAW_FRAMEBUFFER_BINDING);t.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),r=t.getParameter(t.SAMPLES),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,n)}r>=Te.HIGH?this.multisample=Te.HIGH:r>=Te.MEDIUM?this.multisample=Te.MEDIUM:r>=Te.LOW?this.multisample=Te.LOW:this.multisample=Te.NONE}destroy(){}}$d.extension={type:jt.RendererSystem,name:"_multisample"},te.add($d);class pT{constructor(t){this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class Gd{constructor(t){this.renderer=t,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(t){const{gl:r,CONTEXT_UID:n}=this,i=t._glBuffers[n]||this.createGLBuffer(t);r.bindBuffer(t.type,i.buffer)}unbind(t){const{gl:r}=this;r.bindBuffer(t,null)}bindBufferBase(t,r){const{gl:n,CONTEXT_UID:i}=this;if(this.boundBufferBases[r]!==t){const o=t._glBuffers[i]||this.createGLBuffer(t);this.boundBufferBases[r]=t,n.bindBufferBase(n.UNIFORM_BUFFER,r,o.buffer)}}bindBufferRange(t,r,n){const{gl:i,CONTEXT_UID:o}=this;n=n||0;const a=t._glBuffers[o]||this.createGLBuffer(t);i.bindBufferRange(i.UNIFORM_BUFFER,r||0,a.buffer,n*256,256)}update(t){const{gl:r,CONTEXT_UID:n}=this,i=t._glBuffers[n]||this.createGLBuffer(t);if(t._updateID!==i.updateID)if(i.updateID=t._updateID,r.bindBuffer(t.type,i.buffer),i.byteLength>=t.data.byteLength)r.bufferSubData(t.type,0,t.data);else{const o=t.static?r.STATIC_DRAW:r.DYNAMIC_DRAW;i.byteLength=t.data.byteLength,r.bufferData(t.type,t.data,o)}}dispose(t,r){if(!this.managedBuffers[t.id])return;delete this.managedBuffers[t.id];const n=t._glBuffers[this.CONTEXT_UID],i=this.gl;t.disposeRunner.remove(this),n&&(r||i.deleteBuffer(n.buffer),delete t._glBuffers[this.CONTEXT_UID])}disposeAll(t){const r=Object.keys(this.managedBuffers);for(let n=0;n<r.length;n++)this.dispose(this.managedBuffers[r[n]],t)}createGLBuffer(t){const{CONTEXT_UID:r,gl:n}=this;return t._glBuffers[r]=new pT(n.createBuffer()),this.managedBuffers[t.id]=t,t.disposeRunner.add(this),t._glBuffers[r]}}Gd.extension={type:jt.RendererSystem,name:"buffer"},te.add(Gd);class jd{constructor(t){this.renderer=t}render(t,r){const n=this.renderer;let i,o,a,u;if(r&&(i=r.renderTexture,o=r.clear,a=r.transform,u=r.skipUpdateTransform),this.renderingToScreen=!i,n.runners.prerender.emit(),n.emit("prerender"),n.projection.transform=a,!n.context.isLost){if(i||(this.lastObjectRendered=t),!u){const f=t.enableTempParent();t.updateTransform(),t.disableTempParent(f)}n.renderTexture.bind(i),n.batch.currentRenderer.start(),(o??n.background.clearBeforeRender)&&n.renderTexture.clear(),t.render(n),n.batch.currentRenderer.flush(),i&&(r.blit&&n.framebuffer.blit(),i.baseTexture.update()),n.runners.postrender.emit(),n.projection.transform=null,n.emit("postrender")}}destroy(){this.renderer=null,this.lastObjectRendered=null}}jd.extension={type:jt.RendererSystem,name:"objectRenderer"},te.add(jd);const pu=class extends cT{constructor(e){super(),this.type=Fc.WEBGL,e=Object.assign({},Dt.RENDER_OPTIONS,e),this.gl=null,this.CONTEXT_UID=0,this.globalUniforms=new br({projectionMatrix:new $e},!0);const t={runners:["init","destroy","contextChange","resolutionChange","reset","update","postrender","prerender","resize"],systems:pu.__systems,priority:["_view","textureGenerator","background","_plugin","startup","context","state","texture","buffer","geometry","framebuffer","transformFeedback","mask","scissor","stencil","projection","textureGC","filter","renderTexture","batch","objectRenderer","_multisample"]};this.setup(t),"useContextAlpha"in e&&(zt("7.0.0","options.useContextAlpha is deprecated, use options.premultipliedAlpha and options.backgroundAlpha instead"),e.premultipliedAlpha=e.useContextAlpha&&e.useContextAlpha!=="notMultiplied",e.backgroundAlpha=e.useContextAlpha===!1?1:e.backgroundAlpha),this._plugin.rendererPlugins=pu.__plugins,this.options=e,this.startup.run(this.options)}static test(e){return e!=null&&e.forceCanvas?!1:zx()}render(e,t){this.objectRenderer.render(e,t)}resize(e,t){this._view.resizeView(e,t)}reset(){return this.runners.reset.emit(),this}clear(){this.renderTexture.bind(),this.renderTexture.clear()}destroy(e=!1){this.runners.destroy.items.reverse(),this.emitWithCustomOptions(this.runners.destroy,{_view:e}),super.destroy()}get plugins(){return this._plugin.plugins}get multisample(){return this._multisample.multisample}get width(){return this._view.element.width}get height(){return this._view.element.height}get resolution(){return this._view.resolution}set resolution(e){this._view.resolution=e,this.runners.resolutionChange.emit(e)}get autoDensity(){return this._view.autoDensity}get view(){return this._view.element}get screen(){return this._view.screen}get lastObjectRendered(){return this.objectRenderer.lastObjectRendered}get renderingToScreen(){return this.objectRenderer.renderingToScreen}get rendererLogId(){return`WebGL ${this.context.webGLVersion}`}get clearBeforeRender(){return zt("7.0.0","renderer.clearBeforeRender has been deprecated, please use renderer.background.clearBeforeRender instead."),this.background.clearBeforeRender}get useContextAlpha(){return zt("7.0.0","renderer.useContextAlpha has been deprecated, please use renderer.context.premultipliedAlpha instead."),this.context.useContextAlpha}get preserveDrawingBuffer(){return zt("7.0.0","renderer.preserveDrawingBuffer has been deprecated, we cannot truly know this unless pixi created the context"),this.context.preserveDrawingBuffer}get backgroundColor(){return zt("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color}set backgroundColor(e){zt("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color=e}get backgroundAlpha(){return zt("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha}set backgroundAlpha(e){zt("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha=e}get powerPreference(){return zt("7.0.0","renderer.powerPreference has been deprecated, we can only know this if pixi creates the context"),this.context.powerPreference}generateTexture(e,t){return this.textureGenerator.generateTexture(e,t)}};let wi=pu;wi.extension={type:jt.Renderer,priority:1},wi.__plugins={},wi.__systems={},te.handleByMap(jt.RendererPlugin,wi.__plugins),te.handleByMap(jt.RendererSystem,wi.__systems),te.add(wi);class qd extends us{constructor(t,r){const{width:n,height:i}=r||{};super(n,i),this.items=[],this.itemDirtyIds=[];for(let o=0;o<t;o++){const a=new Kt;this.items.push(a),this.itemDirtyIds.push(-2)}this.length=t,this._load=null,this.baseTexture=null}initFromArray(t,r){for(let n=0;n<this.length;n++)t[n]&&(t[n].castToBaseTexture?this.addBaseTextureAt(t[n].castToBaseTexture(),n):t[n]instanceof us?this.addResourceAt(t[n],n):this.addResourceAt(Jh(t[n],r),n))}dispose(){for(let t=0,r=this.length;t<r;t++)this.items[t].destroy();this.items=null,this.itemDirtyIds=null,this._load=null}addResourceAt(t,r){if(!this.items[r])throw new Error(`Index ${r} is out of bounds`);return t.valid&&!this.valid&&this.resize(t.width,t.height),this.items[r].setResource(t),this}bind(t){if(this.baseTexture!==null)throw new Error("Only one base texture per TextureArray is allowed");super.bind(t);for(let r=0;r<this.length;r++)this.items[r].parentTextureArray=t,this.items[r].on("update",t.update,t)}unbind(t){super.unbind(t);for(let r=0;r<this.length;r++)this.items[r].parentTextureArray=null,this.items[r].off("update",t.update,t)}load(){if(this._load)return this._load;const r=this.items.map(n=>n.resource).filter(n=>n).map(n=>n.load());return this._load=Promise.all(r).then(()=>{const{realWidth:n,realHeight:i}=this.items[0];return this.resize(n,i),Promise.resolve(this)}),this._load}}class vT extends qd{constructor(t,r){const{width:n,height:i}=r||{};let o,a;Array.isArray(t)?(o=t,a=t.length):a=t,super(a,{width:n,height:i}),o&&this.initFromArray(o,r)}addBaseTextureAt(t,r){if(t.resource)this.addResourceAt(t.resource,r);else throw new Error("ArrayResource does not support RenderTexture");return this}bind(t){super.bind(t),t.target=ii.TEXTURE_2D_ARRAY}upload(t,r,n){const{length:i,itemDirtyIds:o,items:a}=this,{gl:u}=t;n.dirtyId<0&&u.texImage3D(u.TEXTURE_2D_ARRAY,0,n.internalFormat,this._width,this._height,i,0,r.format,n.type,null);for(let f=0;f<i;f++){const h=a[f];o[f]<h.dirtyId&&(o[f]=h.dirtyId,h.valid&&u.texSubImage3D(u.TEXTURE_2D_ARRAY,0,0,0,f,h.resource.width,h.resource.height,1,r.format,n.type,h.resource.source))}return!0}}class gT extends dn{constructor(t){super(t)}static test(t){const{OffscreenCanvas:r}=globalThis;return r&&t instanceof r?!0:globalThis.HTMLCanvasElement&&t instanceof HTMLCanvasElement}}const gs=class extends qd{constructor(e,t){const{width:r,height:n,autoLoad:i,linkBaseTexture:o}=t||{};if(e&&e.length!==gs.SIDES)throw new Error(`Invalid length. Got ${e.length}, expected 6`);super(6,{width:r,height:n});for(let a=0;a<gs.SIDES;a++)this.items[a].target=ii.TEXTURE_CUBE_MAP_POSITIVE_X+a;this.linkBaseTexture=o!==!1,e&&this.initFromArray(e,t),i!==!1&&this.load()}bind(e){super.bind(e),e.target=ii.TEXTURE_CUBE_MAP}addBaseTextureAt(e,t,r){if(r===void 0&&(r=this.linkBaseTexture),!this.items[t])throw new Error(`Index ${t} is out of bounds`);if(!this.linkBaseTexture||e.parentTextureArray||Object.keys(e._glTextures).length>0)if(e.resource)this.addResourceAt(e.resource,t);else throw new Error("CubeResource does not support copying of renderTexture.");else e.target=ii.TEXTURE_CUBE_MAP_POSITIVE_X+t,e.parentTextureArray=this.baseTexture,this.items[t]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[t]=e,this}upload(e,t,r){const n=this.itemDirtyIds;for(let i=0;i<gs.SIDES;i++){const o=this.items[i];(n[i]<o.dirtyId||r.dirtyId<t.dirtyId)&&(o.valid&&o.resource?(o.resource.upload(e,o,r),n[i]=o.dirtyId):n[i]<-1&&(e.gl.texImage2D(o.target,0,r.internalFormat,t.realWidth,t.realHeight,0,t.format,r.type,null),n[i]=-1))}return!0}static test(e){return Array.isArray(e)&&e.length===gs.SIDES}};let zd=gs;zd.SIDES=6;class Ti extends dn{constructor(t,r){r=r||{};let n,i;typeof t=="string"?(n=Ti.EMPTY,i=t):(n=t,i=null),super(n),this.url=i,this.crossOrigin=r.crossOrigin??!0,this.alphaMode=typeof r.alphaMode=="number"?r.alphaMode:null,this._load=null,r.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(async(t,r)=>{if(this.url===null){t(this);return}try{const n=await Dt.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;const i=await n.blob();if(this.destroyed)return;const o=await createImageBitmap(i,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===ln.UNPACK?"premultiply":"none"});if(this.destroyed)return;this.source=o,this.update(),t(this)}catch(n){if(this.destroyed)return;r(n),this.onError.emit(n)}}),this._load)}upload(t,r,n){return this.source instanceof ImageBitmap?(typeof this.alphaMode=="number"&&(r.alphaMode=this.alphaMode),super.upload(t,r,n)):(this.load(),!1)}dispose(){this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(t){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&(typeof t=="string"||t instanceof ImageBitmap)}static get EMPTY(){return Ti._EMPTY=Ti._EMPTY??Dt.ADAPTER.createCanvas(0,0),Ti._EMPTY}}const No=class extends dn{constructor(e,t){t=t||{},super(Dt.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=e,this.scale=t.scale||1,this._overrideWidth=t.width,this._overrideHeight=t.height,this._resolve=null,this._crossorigin=t.crossorigin,this._load=null,t.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(e=>{if(this._resolve=()=>{this.resize(this.source.width,this.source.height),e(this)},No.SVG_XML.test(this.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");this.svg=`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`}this._loadSvg()}),this._load)}_loadSvg(){const e=new Image;dn.crossOrigin(e,this.svg,this._crossorigin),e.src=this.svg,e.onerror=t=>{this._resolve&&(e.onerror=null,this.onError.emit(t))},e.onload=()=>{if(!this._resolve)return;const t=e.width,r=e.height;if(!t||!r)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let n=t*this.scale,i=r*this.scale;(this._overrideWidth||this._overrideHeight)&&(n=this._overrideWidth||this._overrideHeight/r*t,i=this._overrideHeight||this._overrideWidth/t*r),n=Math.round(n),i=Math.round(i);const o=this.source;o.width=n,o.height=i,o._pixiId=`canvas_${ls()}`,o.getContext("2d").drawImage(e,0,0,t,r,0,0,n,i),this._resolve(),this._resolve=null}}static getSize(e){const t=No.SVG_SIZE.exec(e),r={};return t&&(r[t[1]]=Math.round(parseFloat(t[3])),r[t[5]]=Math.round(parseFloat(t[7]))),r}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(e,t){return t==="svg"||typeof e=="string"&&e.startsWith("data:image/svg+xml")||typeof e=="string"&&No.SVG_XML.test(e)}};let vu=No;vu.SVG_XML=/^(<\?xml[^?]+\?>)?\s*(<!--[^(-->)]*-->)?\s*\<svg/m,vu.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;const gu=class extends dn{constructor(e,t){if(t=t||{},!(e instanceof HTMLVideoElement)){const r=document.createElement("video");r.setAttribute("preload","auto"),r.setAttribute("webkit-playsinline",""),r.setAttribute("playsinline",""),typeof e=="string"&&(e=[e]);const n=e[0].src||e[0];dn.crossOrigin(r,n,t.crossorigin);for(let i=0;i<e.length;++i){const o=document.createElement("source");let{src:a,mime:u}=e[i];a=a||e[i];const f=a.split("?").shift().toLowerCase(),h=f.slice(f.lastIndexOf(".")+1);u=u||gu.MIME_TYPES[h]||`video/${h}`,o.src=a,o.type=u,r.appendChild(o)}e=r}super(e),this.noSubImage=!0,this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=t.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=t.autoPlay!==!1,this._load=null,this._resolve=null,this._onCanPlay=this._onCanPlay.bind(this),this._onError=this._onError.bind(this),t.autoLoad!==!1&&this.load()}update(e=0){if(!this.destroyed){const t=Er.shared.elapsedMS*this.source.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-t),(!this._updateFPS||this._msToNextUpdate<=0)&&(super.update(),this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0)}}load(){if(this._load)return this._load;const e=this.source;return(e.readyState===e.HAVE_ENOUGH_DATA||e.readyState===e.HAVE_FUTURE_DATA)&&e.width&&e.height&&(e.complete=!0),e.addEventListener("play",this._onPlayStart.bind(this)),e.addEventListener("pause",this._onPlayStop.bind(this)),this._isSourceReady()?this._onCanPlay():(e.addEventListener("canplay",this._onCanPlay),e.addEventListener("canplaythrough",this._onCanPlay),e.addEventListener("error",this._onError,!0)),this._load=new Promise(t=>{this.valid?t(this):(this._resolve=t,e.load())}),this._load}_onError(e){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(e)}_isSourcePlaying(){const e=this.source;return!e.paused&&!e.ended&&this._isSourceReady()}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(Er.shared.add(this.update,this),this._isConnectedToTicker=!0)}_onPlayStop(){this._isConnectedToTicker&&(Er.shared.remove(this.update,this),this._isConnectedToTicker=!1)}_onCanPlay(){const e=this.source;e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay);const t=this.valid;this.resize(e.videoWidth,e.videoHeight),!t&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&e.play()}dispose(){this._isConnectedToTicker&&(Er.shared.remove(this.update,this),this._isConnectedToTicker=!1);const e=this.source;e&&(e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,!this._autoUpdate&&this._isConnectedToTicker?(Er.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(Er.shared.add(this.update,this),this._isConnectedToTicker=!0))}get updateFPS(){return this._updateFPS}set updateFPS(e){e!==this._updateFPS&&(this._updateFPS=e)}static test(e,t){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement||gu.TYPES.includes(t)}};let mu=gu;mu.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],mu.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},Jl.push(Ti,gd,gT,mu,vu,tu,zd,vT);var mT=`attribute vec2 aVertexPosition;
498
498
  attribute vec2 aTextureCoord;
499
499
 
500
500
  uniform mat3 projectionMatrix;
@@ -980,7 +980,7 @@ void main(void){
980
980
  sample *= alpha;
981
981
 
982
982
  gl_FragColor = sample;
983
- }`,aE=Object.defineProperty,ep=Object.getOwnPropertySymbols,lE=Object.prototype.hasOwnProperty,uE=Object.prototype.propertyIsEnumerable,rp=(e,t,r)=>t in e?aE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,np=(e,t)=>{for(var r in t||(t={}))lE.call(t,r)&&rp(e,r,t[r]);if(ep)for(var r of ep(t))uE.call(t,r)&&rp(e,r,t[r]);return e};const wu=class extends Zt{constructor(t){super(),this.angle=45,this._distance=5,this._resolution=Dt.FILTER_RESOLUTION;const r=t?np(np({},wu.defaults),t):wu.defaults,{kernels:n,blur:i,quality:o,pixelSize:a,resolution:u}=r;this._offset=new Un(this._updatePadding,this),this._tintFilter=new Zt(sE,oE),this._tintFilter.uniforms.color=new Float32Array(4),this._tintFilter.uniforms.shift=this._offset,this._tintFilter.resolution=u,this._blurFilter=n?new ms(n):new ms(i,o),this.pixelSize=a,this.resolution=u;const{shadowOnly:f,rotation:h,distance:d,offset:p,alpha:c,color:v}=r;this.shadowOnly=f,h!==void 0&&d!==void 0?(this.rotation=h,this.distance=d):this.offset=p,this.alpha=c,this.color=v}apply(t,r,n,i){const o=t.getFilterTexture();this._tintFilter.apply(t,r,o,1),this._blurFilter.apply(t,o,n,i),this.shadowOnly!==!0&&t.applyFilter(this,r,n,0),t.returnFilterTexture(o)}_updatePadding(){const t=Math.max(Math.abs(this._offset.x),Math.abs(this._offset.y));this.padding=t+this.blur*2}_updateShift(){this._tintFilter.uniforms.shift.set(this.distance*Math.cos(this.angle),this.distance*Math.sin(this.angle))}set offset(t){this._offset.copyFrom(t),this._updatePadding()}get offset(){return this._offset}get resolution(){return this._resolution}set resolution(t){this._resolution=t,this._tintFilter&&(this._tintFilter.resolution=t),this._blurFilter&&(this._blurFilter.resolution=t)}get distance(){return this._distance}set distance(t){Ht("5.3.0","DropShadowFilter distance is deprecated, use offset"),this._distance=t,this._updatePadding(),this._updateShift()}get rotation(){return this.angle/fs}set rotation(t){Ht("5.3.0","DropShadowFilter rotation is deprecated, use offset"),this.angle=t*fs,this._updateShift()}get alpha(){return this._tintFilter.uniforms.alpha}set alpha(t){this._tintFilter.uniforms.alpha=t}get color(){return Hl(this._tintFilter.uniforms.color)}set color(t){lo(t,this._tintFilter.uniforms.color)}get kernels(){return this._blurFilter.kernels}set kernels(t){this._blurFilter.kernels=t}get blur(){return this._blurFilter.blur}set blur(t){this._blurFilter.blur=t,this._updatePadding()}get quality(){return this._blurFilter.quality}set quality(t){this._blurFilter.quality=t}get pixelSize(){return this._blurFilter.pixelSize}set pixelSize(t){this._blurFilter.pixelSize=t}};let fE=wu;fE.defaults={offset:{x:4,y:4},color:0,alpha:.5,shadowOnly:!1,kernels:null,blur:2,quality:3,pixelSize:1,resolution:Dt.FILTER_RESOLUTION};var cE=`attribute vec2 aVertexPosition;
983
+ }`,aE=Object.defineProperty,ep=Object.getOwnPropertySymbols,lE=Object.prototype.hasOwnProperty,uE=Object.prototype.propertyIsEnumerable,rp=(e,t,r)=>t in e?aE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,np=(e,t)=>{for(var r in t||(t={}))lE.call(t,r)&&rp(e,r,t[r]);if(ep)for(var r of ep(t))uE.call(t,r)&&rp(e,r,t[r]);return e};const wu=class extends Zt{constructor(t){super(),this.angle=45,this._distance=5,this._resolution=Dt.FILTER_RESOLUTION;const r=t?np(np({},wu.defaults),t):wu.defaults,{kernels:n,blur:i,quality:o,pixelSize:a,resolution:u}=r;this._offset=new Un(this._updatePadding,this),this._tintFilter=new Zt(sE,oE),this._tintFilter.uniforms.color=new Float32Array(4),this._tintFilter.uniforms.shift=this._offset,this._tintFilter.resolution=u,this._blurFilter=n?new ms(n):new ms(i,o),this.pixelSize=a,this.resolution=u;const{shadowOnly:f,rotation:h,distance:d,offset:p,alpha:c,color:v}=r;this.shadowOnly=f,h!==void 0&&d!==void 0?(this.rotation=h,this.distance=d):this.offset=p,this.alpha=c,this.color=v}apply(t,r,n,i){const o=t.getFilterTexture();this._tintFilter.apply(t,r,o,1),this._blurFilter.apply(t,o,n,i),this.shadowOnly!==!0&&t.applyFilter(this,r,n,0),t.returnFilterTexture(o)}_updatePadding(){const t=Math.max(Math.abs(this._offset.x),Math.abs(this._offset.y));this.padding=t+this.blur*2}_updateShift(){this._tintFilter.uniforms.shift.set(this.distance*Math.cos(this.angle),this.distance*Math.sin(this.angle))}set offset(t){this._offset.copyFrom(t),this._updatePadding()}get offset(){return this._offset}get resolution(){return this._resolution}set resolution(t){this._resolution=t,this._tintFilter&&(this._tintFilter.resolution=t),this._blurFilter&&(this._blurFilter.resolution=t)}get distance(){return this._distance}set distance(t){zt("5.3.0","DropShadowFilter distance is deprecated, use offset"),this._distance=t,this._updatePadding(),this._updateShift()}get rotation(){return this.angle/fs}set rotation(t){zt("5.3.0","DropShadowFilter rotation is deprecated, use offset"),this.angle=t*fs,this._updateShift()}get alpha(){return this._tintFilter.uniforms.alpha}set alpha(t){this._tintFilter.uniforms.alpha=t}get color(){return Hl(this._tintFilter.uniforms.color)}set color(t){lo(t,this._tintFilter.uniforms.color)}get kernels(){return this._blurFilter.kernels}set kernels(t){this._blurFilter.kernels=t}get blur(){return this._blurFilter.blur}set blur(t){this._blurFilter.blur=t,this._updatePadding()}get quality(){return this._blurFilter.quality}set quality(t){this._blurFilter.quality=t}get pixelSize(){return this._blurFilter.pixelSize}set pixelSize(t){this._blurFilter.pixelSize=t}};let fE=wu;fE.defaults={offset:{x:4,y:4},color:0,alpha:.5,shadowOnly:!1,kernels:null,blur:2,quality:3,pixelSize:1,resolution:Dt.FILTER_RESOLUTION};var cE=`attribute vec2 aVertexPosition;
984
984
  attribute vec2 aTextureCoord;
985
985
 
986
986
  uniform mat3 projectionMatrix;
@@ -1733,7 +1733,7 @@ void main(void)
1733
1733
 
1734
1734
  gl_FragColor = color;
1735
1735
  }
1736
- `;let cp=class extends Zt{constructor(t){var r,n;super(kE,LE),this.uniforms.blur=t.blur,this.uniforms.gradientBlur=t.gradientBlur,this.uniforms.start=(r=t.start)!=null?r:new se(0,window.innerHeight/2),this.uniforms.end=(n=t.end)!=null?n:new se(600,window.innerHeight/2),this.uniforms.delta=new se(30,30),this.uniforms.texSize=new se(window.innerWidth,window.innerHeight),this.updateDelta()}updateDelta(){this.uniforms.delta.x=0,this.uniforms.delta.y=0}get blur(){return this.uniforms.blur}set blur(t){this.uniforms.blur=t}get gradientBlur(){return this.uniforms.gradientBlur}set gradientBlur(t){this.uniforms.gradientBlur=t}get start(){return this.uniforms.start}set start(t){this.uniforms.start=t,this.updateDelta()}get end(){return this.uniforms.end}set end(t){this.uniforms.end=t,this.updateDelta()}},FE=class extends cp{updateDelta(){const t=this.uniforms.end.x-this.uniforms.start.x,r=this.uniforms.end.y-this.uniforms.start.y,n=Math.sqrt(t*t+r*r);this.uniforms.delta.x=t/n,this.uniforms.delta.y=r/n}},BE=class extends cp{updateDelta(){const t=this.uniforms.end.x-this.uniforms.start.x,r=this.uniforms.end.y-this.uniforms.start.y,n=Math.sqrt(t*t+r*r);this.uniforms.delta.x=-r/n,this.uniforms.delta.y=t/n}};const hp=class extends Zt{constructor(t,r,n,i){super(),typeof t=="number"&&(Ht("5.3.0","TiltShiftFilter constructor arguments is deprecated, use options."),t={blur:t,gradientBlur:r,start:n,end:i}),t=Object.assign({},hp.defaults,t),this.tiltShiftXFilter=new FE(t),this.tiltShiftYFilter=new BE(t)}apply(t,r,n,i){const o=t.getFilterTexture();this.tiltShiftXFilter.apply(t,r,o,1),this.tiltShiftYFilter.apply(t,o,n,i),t.returnFilterTexture(o)}get blur(){return this.tiltShiftXFilter.blur}set blur(t){this.tiltShiftXFilter.blur=this.tiltShiftYFilter.blur=t}get gradientBlur(){return this.tiltShiftXFilter.gradientBlur}set gradientBlur(t){this.tiltShiftXFilter.gradientBlur=this.tiltShiftYFilter.gradientBlur=t}get start(){return this.tiltShiftXFilter.start}set start(t){this.tiltShiftXFilter.start=this.tiltShiftYFilter.start=t}get end(){return this.tiltShiftXFilter.end}set end(t){this.tiltShiftXFilter.end=this.tiltShiftYFilter.end=t}};let DE=hp;DE.defaults={blur:100,gradientBlur:600,start:void 0,end:void 0};var UE=`attribute vec2 aVertexPosition;
1736
+ `;let cp=class extends Zt{constructor(t){var r,n;super(kE,LE),this.uniforms.blur=t.blur,this.uniforms.gradientBlur=t.gradientBlur,this.uniforms.start=(r=t.start)!=null?r:new se(0,window.innerHeight/2),this.uniforms.end=(n=t.end)!=null?n:new se(600,window.innerHeight/2),this.uniforms.delta=new se(30,30),this.uniforms.texSize=new se(window.innerWidth,window.innerHeight),this.updateDelta()}updateDelta(){this.uniforms.delta.x=0,this.uniforms.delta.y=0}get blur(){return this.uniforms.blur}set blur(t){this.uniforms.blur=t}get gradientBlur(){return this.uniforms.gradientBlur}set gradientBlur(t){this.uniforms.gradientBlur=t}get start(){return this.uniforms.start}set start(t){this.uniforms.start=t,this.updateDelta()}get end(){return this.uniforms.end}set end(t){this.uniforms.end=t,this.updateDelta()}},FE=class extends cp{updateDelta(){const t=this.uniforms.end.x-this.uniforms.start.x,r=this.uniforms.end.y-this.uniforms.start.y,n=Math.sqrt(t*t+r*r);this.uniforms.delta.x=t/n,this.uniforms.delta.y=r/n}},BE=class extends cp{updateDelta(){const t=this.uniforms.end.x-this.uniforms.start.x,r=this.uniforms.end.y-this.uniforms.start.y,n=Math.sqrt(t*t+r*r);this.uniforms.delta.x=-r/n,this.uniforms.delta.y=t/n}};const hp=class extends Zt{constructor(t,r,n,i){super(),typeof t=="number"&&(zt("5.3.0","TiltShiftFilter constructor arguments is deprecated, use options."),t={blur:t,gradientBlur:r,start:n,end:i}),t=Object.assign({},hp.defaults,t),this.tiltShiftXFilter=new FE(t),this.tiltShiftYFilter=new BE(t)}apply(t,r,n,i){const o=t.getFilterTexture();this.tiltShiftXFilter.apply(t,r,o,1),this.tiltShiftYFilter.apply(t,o,n,i),t.returnFilterTexture(o)}get blur(){return this.tiltShiftXFilter.blur}set blur(t){this.tiltShiftXFilter.blur=this.tiltShiftYFilter.blur=t}get gradientBlur(){return this.tiltShiftXFilter.gradientBlur}set gradientBlur(t){this.tiltShiftXFilter.gradientBlur=this.tiltShiftYFilter.gradientBlur=t}get start(){return this.tiltShiftXFilter.start}set start(t){this.tiltShiftXFilter.start=this.tiltShiftYFilter.start=t}get end(){return this.tiltShiftXFilter.end}set end(t){this.tiltShiftXFilter.end=this.tiltShiftYFilter.end=t}};let DE=hp;DE.defaults={blur:100,gradientBlur:600,start:void 0,end:void 0};var UE=`attribute vec2 aVertexPosition;
1737
1737
  attribute vec2 aTextureCoord;
1738
1738
 
1739
1739
  uniform mat3 projectionMatrix;
@@ -1920,7 +1920,7 @@ void main() {
1920
1920
  vec3 color = texColor.rgb;
1921
1921
  gl_FragColor = vec4(uNightVisionMatrix * vec3(color), texColor.a);
1922
1922
  }
1923
- `),t=[.393,.769,.189,.349,.686,.168,.272,.534,.131];return e.uniforms.uNightVisionMatrix=t,{nightVisionFilter:e}},gp=Et.forwardRef((e,t)=>{const r=mt.useRef(null),n=mt.useRef(null),{src:i,transformation:{x:o,y:a,width:u,height:f,anchor:h,colorCorrection:d={},effect:p},pointerdown:c}=e;console.log("PixiImageSprite props",e);const{blurRadius:v=0}=d,{temperatureFilter:y,sharpnessFilter:b,hueFilter:_,blurFilter:m,adjustmentFilter:w}=ys(d),{nightVisionFilter:T}=XE();return Et.useEffect(()=>()=>{console.log("PixiImageSprite unmounting")},[]),Vt.jsx(ni,{...e,ref:t,children:Vt.jsx(le.Container,{ref:n,children:Vt.jsx(le.Sprite,{image:i,width:u,height:f,anchor:h,ref:r,x:o,y:a,interactive:!0,pointerdown:c,filters:[y,b,_,w,...v>0?[m]:[],...p===Sn.NightVision?[T]:[]]})})})});gp.whyDidYouRender={logOnDifferentValues:!0,customName:"ImageSprite"};const Lo={build(e){const t=e.points;let r,n,i,o,a,u;if(e.type===Ne.CIRC){const y=e.shape;r=y.x,n=y.y,a=u=y.radius,i=o=0}else if(e.type===Ne.ELIP){const y=e.shape;r=y.x,n=y.y,a=y.width,u=y.height,i=o=0}else{const y=e.shape,b=y.width/2,_=y.height/2;r=y.x+b,n=y.y+_,a=u=Math.max(0,Math.min(y.radius,Math.min(b,_))),i=b-a,o=_-u}if(!(a>=0&&u>=0&&i>=0&&o>=0)){t.length=0;return}const f=Math.ceil(2.3*Math.sqrt(a+u)),h=f*8+(i?4:0)+(o?4:0);if(t.length=h,h===0)return;if(f===0){t.length=8,t[0]=t[6]=r+i,t[1]=t[3]=n+o,t[2]=t[4]=r-i,t[5]=t[7]=n-o;return}let d=0,p=f*4+(i?2:0)+2,c=p,v=h;{const y=i+a,b=o,_=r+y,m=r-y,w=n+b;if(t[d++]=_,t[d++]=w,t[--p]=w,t[--p]=m,o){const T=n-b;t[c++]=m,t[c++]=T,t[--v]=T,t[--v]=_}}for(let y=1;y<f;y++){const b=Math.PI/2*(y/f),_=i+Math.cos(b)*a,m=o+Math.sin(b)*u,w=r+_,T=r-_,x=n+m,E=n-m;t[d++]=w,t[d++]=x,t[--p]=x,t[--p]=T,t[c++]=T,t[c++]=E,t[--v]=E,t[--v]=w}{const y=i,b=o+u,_=r+y,m=r-y,w=n+b,T=n-b;t[d++]=_,t[d++]=w,t[--v]=T,t[--v]=_,i&&(t[d++]=m,t[d++]=w,t[--v]=T,t[--v]=m)}},triangulate(e,t){const r=e.points,n=t.points,i=t.indices;if(r.length===0)return;let o=n.length/2;const a=o;let u,f;if(e.type!==Ne.RREC){const d=e.shape;u=d.x,f=d.y}else{const d=e.shape;u=d.x+d.width/2,f=d.y+d.height/2}const h=e.matrix;n.push(e.matrix?h.a*u+h.c*f+h.tx:u,e.matrix?h.b*u+h.d*f+h.ty:f),o++,n.push(r[0],r[1]);for(let d=2;d<r.length;d+=2)n.push(r[d],r[d+1]),i.push(o++,a,o);i.push(a+1,a,o)}};function mp(e,t=!1){const r=e.length;if(r<6)return;let n=0;for(let i=0,o=e[r-2],a=e[r-1];i<r;i+=2){const u=e[i],f=e[i+1];n+=(u-o)*(f+a),o=u,a=f}if(!t&&n>0||t&&n<=0){const i=r/2;for(let o=i+i%2;o<r;o+=2){const a=r-o-2,u=r-o-1,f=o,h=o+1;[e[a],e[f]]=[e[f],e[a]],[e[u],e[h]]=[e[h],e[u]]}}}const yp={build(e){e.points=e.shape.points.slice()},triangulate(e,t){let r=e.points;const n=e.holes,i=t.points,o=t.indices;if(r.length>=6){mp(r,!1);const a=[];for(let h=0;h<n.length;h++){const d=n[h];mp(d.points,!0),a.push(r.length/2),r=r.concat(d.points)}const u=k_(r,a,2);if(!u)return;const f=i.length/2;for(let h=0;h<u.length;h+=3)o.push(u[h]+f),o.push(u[h+1]+f),o.push(u[h+2]+f);for(let h=0;h<r.length;h++)i.push(r[h])}}},KE={build(e){const t=e.shape,r=t.x,n=t.y,i=t.width,o=t.height,a=e.points;a.length=0,i>=0&&o>=0&&a.push(r,n,r+i,n,r+i,n+o,r,n+o)},triangulate(e,t){const r=e.points,n=t.points;if(r.length===0)return;const i=n.length/2;n.push(r[0],r[1],r[2],r[3],r[6],r[7],r[4],r[5]),t.indices.push(i,i+1,i+2,i+1,i+2,i+3)}},YE={build(e){Lo.build(e)},triangulate(e,t){Lo.triangulate(e,t)}};var Sr=(e=>(e.MITER="miter",e.BEVEL="bevel",e.ROUND="round",e))(Sr||{}),jn=(e=>(e.BUTT="butt",e.ROUND="round",e.SQUARE="square",e))(jn||{});const Si={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(e,t=20){if(!this.adaptive||!e||isNaN(e))return t;let r=Math.ceil(e/this.maxLength);return r<this.minSegments?r=this.minSegments:r>this.maxSegments&&(r=this.maxSegments),r}};class _p{static curveTo(t,r,n,i,o,a){const u=a[a.length-2],h=a[a.length-1]-r,d=u-t,p=i-r,c=n-t,v=Math.abs(h*c-d*p);if(v<1e-8||o===0)return(a[a.length-2]!==t||a[a.length-1]!==r)&&a.push(t,r),null;const y=h*h+d*d,b=p*p+c*c,_=h*p+d*c,m=o*Math.sqrt(y)/v,w=o*Math.sqrt(b)/v,T=m*_/y,x=w*_/b,E=m*c+w*d,I=m*p+w*h,A=d*(w+T),O=h*(w+T),L=c*(m+x),R=p*(m+x),C=Math.atan2(O-I,A-E),P=Math.atan2(R-I,L-E);return{cx:E+t,cy:I+r,radius:o,startAngle:C,endAngle:P,anticlockwise:d*p>c*h}}static arc(t,r,n,i,o,a,u,f,h){const d=u-a,p=Si._segmentsCount(Math.abs(d)*o,Math.ceil(Math.abs(d)/vo)*40),c=d/(p*2),v=c*2,y=Math.cos(c),b=Math.sin(c),_=p-1,m=_%1/_;for(let w=0;w<=_;++w){const T=w+m*w,x=c+a+v*T,E=Math.cos(x),I=-Math.sin(x);h.push((y*E+b*I)*o+n,(y*-I+b*E)*o+i)}}}class ZE{constructor(){this.reset()}begin(t,r,n){this.reset(),this.style=t,this.start=r,this.attribStart=n}end(t,r){this.attribSize=r-this.attribStart,this.size=t-this.start}reset(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0}}class Eu{static curveLength(t,r,n,i,o,a,u,f){let d=0,p=0,c=0,v=0,y=0,b=0,_=0,m=0,w=0,T=0,x=0,E=t,I=r;for(let A=1;A<=10;++A)p=A/10,c=p*p,v=c*p,y=1-p,b=y*y,_=b*y,m=_*t+3*b*p*n+3*y*c*o+v*u,w=_*r+3*b*p*i+3*y*c*a+v*f,T=E-m,x=I-w,E=m,I=w,d+=Math.sqrt(T*T+x*x);return d}static curveTo(t,r,n,i,o,a,u){const f=u[u.length-2],h=u[u.length-1];u.length-=2;const d=Si._segmentsCount(Eu.curveLength(f,h,t,r,n,i,o,a));let p=0,c=0,v=0,y=0,b=0;u.push(f,h);for(let _=1,m=0;_<=d;++_)m=_/d,p=1-m,c=p*p,v=c*p,y=m*m,b=y*m,u.push(v*f+3*c*m*t+3*p*y*n+b*o,v*h+3*c*m*r+3*p*y*i+b*a)}}function bp(e,t,r,n,i,o,a,u){const f=e-r*i,h=t-n*i,d=e+r*o,p=t+n*o;let c,v;a?(c=n,v=-r):(c=-n,v=r);const y=f+c,b=h+v,_=d+c,m=p+v;return u.push(y,b,_,m),2}function qn(e,t,r,n,i,o,a,u){const f=r-e,h=n-t;let d=Math.atan2(f,h),p=Math.atan2(i-e,o-t);u&&d<p?d+=Math.PI*2:!u&&d>p&&(p+=Math.PI*2);let c=d;const v=p-d,y=Math.abs(v),b=Math.sqrt(f*f+h*h),_=(15*y*Math.sqrt(b)/Math.PI>>0)+1,m=v/_;if(c+=m,u){a.push(e,t,r,n);for(let w=1,T=c;w<_;w++,T+=m)a.push(e,t,e+Math.sin(T)*b,t+Math.cos(T)*b);a.push(e,t,i,o)}else{a.push(r,n,e,t);for(let w=1,T=c;w<_;w++,T+=m)a.push(e+Math.sin(T)*b,t+Math.cos(T)*b,e,t);a.push(i,o,e,t)}return _*2}function QE(e,t){const r=e.shape;let n=e.points||r.points.slice();const i=t.closePointEps;if(n.length===0)return;const o=e.lineStyle,a=new se(n[0],n[1]),u=new se(n[n.length-2],n[n.length-1]),f=r.type!==Ne.POLY||r.closeStroke,h=Math.abs(a.x-u.x)<i&&Math.abs(a.y-u.y)<i;if(f){n=n.slice(),h&&(n.pop(),n.pop(),u.set(n[n.length-2],n[n.length-1]));const z=(a.x+u.x)*.5,nt=(u.y+a.y)*.5;n.unshift(z,nt),n.push(z,nt)}const d=t.points,p=n.length/2;let c=n.length;const v=d.length/2,y=o.width/2,b=y*y,_=o.miterLimit*o.miterLimit;let m=n[0],w=n[1],T=n[2],x=n[3],E=0,I=0,A=-(w-x),O=m-T,L=0,R=0,C=Math.sqrt(A*A+O*O);A/=C,O/=C,A*=y,O*=y;const P=o.alignment,M=(1-P)*2,F=P*2;f||(o.cap===jn.ROUND?c+=qn(m-A*(M-F)*.5,w-O*(M-F)*.5,m-A*M,w-O*M,m+A*F,w+O*F,d,!0)+2:o.cap===jn.SQUARE&&(c+=bp(m,w,A,O,M,F,!0,d))),d.push(m-A*M,w-O*M,m+A*F,w+O*F);for(let z=1;z<p-1;++z){m=n[(z-1)*2],w=n[(z-1)*2+1],T=n[z*2],x=n[z*2+1],E=n[(z+1)*2],I=n[(z+1)*2+1],A=-(w-x),O=m-T,C=Math.sqrt(A*A+O*O),A/=C,O/=C,A*=y,O*=y,L=-(x-I),R=T-E,C=Math.sqrt(L*L+R*R),L/=C,R/=C,L*=y,R*=y;const nt=T-m,V=w-x,U=T-E,k=I-x,j=nt*U+V*k,G=V*U-k*nt,X=G<0;if(Math.abs(G)<.001*Math.abs(j)){d.push(T-A*M,x-O*M,T+A*F,x+O*F),j>=0&&(o.join===Sr.ROUND?c+=qn(T,x,T-A*M,x-O*M,T-L*M,x-R*M,d,!1)+4:c+=2,d.push(T-L*F,x-R*F,T+L*M,x+R*M));continue}const Y=(-A+m)*(-O+x)-(-A+T)*(-O+w),$=(-L+E)*(-R+x)-(-L+T)*(-R+I),W=(nt*$-U*Y)/G,et=(k*Y-V*$)/G,J=(W-T)*(W-T)+(et-x)*(et-x),it=T+(W-T)*M,lt=x+(et-x)*M,pt=T-(W-T)*F,yt=x-(et-x)*F,xt=Math.min(nt*nt+V*V,U*U+k*k),At=X?M:F,oe=xt+At*At*b,qt=J<=oe;let rt=o.join;if(rt===Sr.MITER&&J/b>_&&(rt=Sr.BEVEL),qt)switch(rt){case Sr.MITER:{d.push(it,lt,pt,yt);break}case Sr.BEVEL:{X?d.push(it,lt,T+A*F,x+O*F,it,lt,T+L*F,x+R*F):d.push(T-A*M,x-O*M,pt,yt,T-L*M,x-R*M,pt,yt),c+=2;break}case Sr.ROUND:{X?(d.push(it,lt,T+A*F,x+O*F),c+=qn(T,x,T+A*F,x+O*F,T+L*F,x+R*F,d,!0)+4,d.push(it,lt,T+L*F,x+R*F)):(d.push(T-A*M,x-O*M,pt,yt),c+=qn(T,x,T-A*M,x-O*M,T-L*M,x-R*M,d,!1)+4,d.push(T-L*M,x-R*M,pt,yt));break}}else{switch(d.push(T-A*M,x-O*M,T+A*F,x+O*F),rt){case Sr.MITER:{X?d.push(pt,yt,pt,yt):d.push(it,lt,it,lt),c+=2;break}case Sr.ROUND:{X?c+=qn(T,x,T+A*F,x+O*F,T+L*F,x+R*F,d,!0)+2:c+=qn(T,x,T-A*M,x-O*M,T-L*M,x-R*M,d,!1)+2;break}}d.push(T-L*M,x-R*M,T+L*F,x+R*F),c+=2}}m=n[(p-2)*2],w=n[(p-2)*2+1],T=n[(p-1)*2],x=n[(p-1)*2+1],A=-(w-x),O=m-T,C=Math.sqrt(A*A+O*O),A/=C,O/=C,A*=y,O*=y,d.push(T-A*M,x-O*M,T+A*F,x+O*F),f||(o.cap===jn.ROUND?c+=qn(T-A*(M-F)*.5,x-O*(M-F)*.5,T-A*M,x-O*M,T+A*F,x+O*F,d,!1)+2:o.cap===jn.SQUARE&&(c+=bp(T,x,A,O,M,F,!1,d)));const q=t.indices,Z=Si.epsilon*Si.epsilon;for(let z=v;z<c+v-2;++z)m=d[z*2],w=d[z*2+1],T=d[(z+1)*2],x=d[(z+1)*2+1],E=d[(z+2)*2],I=d[(z+2)*2+1],!(Math.abs(m*(x-I)+T*(I-w)+E*(w-x))<Z)&&q.push(z,z+1,z+2)}function JE(e,t){let r=0;const n=e.shape,i=e.points||n.points,o=n.type!==Ne.POLY||n.closeStroke;if(i.length===0)return;const a=t.points,u=t.indices,f=i.length/2,h=a.length/2;let d=h;for(a.push(i[0],i[1]),r=1;r<f;r++)a.push(i[r*2],i[r*2+1]),u.push(d,d+1),d++;o&&u.push(d,h)}function xp(e,t){e.lineStyle.native?JE(e,t):QE(e,t)}class Su{static curveLength(t,r,n,i,o,a){const u=t-2*n+o,f=r-2*i+a,h=2*n-2*t,d=2*i-2*r,p=4*(u*u+f*f),c=4*(u*h+f*d),v=h*h+d*d,y=2*Math.sqrt(p+c+v),b=Math.sqrt(p),_=2*p*b,m=2*Math.sqrt(v),w=c/b;return(_*y+b*c*(y-m)+(4*v*p-c*c)*Math.log((2*b+w+y)/(w+m)))/(4*_)}static curveTo(t,r,n,i,o){const a=o[o.length-2],u=o[o.length-1],f=Si._segmentsCount(Su.curveLength(a,u,t,r,n,i));let h=0,d=0;for(let p=1;p<=f;++p){const c=p/f;h=a+(t-a)*c,d=u+(r-u)*c,o.push(h+(t+(n-t)*c-h)*c,d+(r+(i-r)*c-d)*c)}}}const Au={[Ne.POLY]:yp,[Ne.CIRC]:Lo,[Ne.ELIP]:Lo,[Ne.RECT]:KE,[Ne.RREC]:YE},wp=[],Fo=[];class Ou{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}clear(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}getRectangle(t){return this.minX>this.maxX||this.minY>this.maxY?ne.EMPTY:(t=t||new ne(0,0,1,1),t.x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)}addPoint(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)}addPointMatrix(t,r){const{a:n,b:i,c:o,d:a,tx:u,ty:f}=t,h=n*r.x+o*r.y+u,d=i*r.x+a*r.y+f;this.minX=Math.min(this.minX,h),this.maxX=Math.max(this.maxX,h),this.minY=Math.min(this.minY,d),this.maxY=Math.max(this.maxY,d)}addQuad(t){let r=this.minX,n=this.minY,i=this.maxX,o=this.maxY,a=t[0],u=t[1];r=a<r?a:r,n=u<n?u:n,i=a>i?a:i,o=u>o?u:o,a=t[2],u=t[3],r=a<r?a:r,n=u<n?u:n,i=a>i?a:i,o=u>o?u:o,a=t[4],u=t[5],r=a<r?a:r,n=u<n?u:n,i=a>i?a:i,o=u>o?u:o,a=t[6],u=t[7],r=a<r?a:r,n=u<n?u:n,i=a>i?a:i,o=u>o?u:o,this.minX=r,this.minY=n,this.maxX=i,this.maxY=o}addFrame(t,r,n,i,o){this.addFrameMatrix(t.worldTransform,r,n,i,o)}addFrameMatrix(t,r,n,i,o){const a=t.a,u=t.b,f=t.c,h=t.d,d=t.tx,p=t.ty;let c=this.minX,v=this.minY,y=this.maxX,b=this.maxY,_=a*r+f*n+d,m=u*r+h*n+p;c=_<c?_:c,v=m<v?m:v,y=_>y?_:y,b=m>b?m:b,_=a*i+f*n+d,m=u*i+h*n+p,c=_<c?_:c,v=m<v?m:v,y=_>y?_:y,b=m>b?m:b,_=a*r+f*o+d,m=u*r+h*o+p,c=_<c?_:c,v=m<v?m:v,y=_>y?_:y,b=m>b?m:b,_=a*i+f*o+d,m=u*i+h*o+p,c=_<c?_:c,v=m<v?m:v,y=_>y?_:y,b=m>b?m:b,this.minX=c,this.minY=v,this.maxX=y,this.maxY=b}addVertexData(t,r,n){let i=this.minX,o=this.minY,a=this.maxX,u=this.maxY;for(let f=r;f<n;f+=2){const h=t[f],d=t[f+1];i=h<i?h:i,o=d<o?d:o,a=h>a?h:a,u=d>u?d:u}this.minX=i,this.minY=o,this.maxX=a,this.maxY=u}addVertices(t,r,n,i){this.addVerticesMatrix(t.worldTransform,r,n,i)}addVerticesMatrix(t,r,n,i,o=0,a=o){const u=t.a,f=t.b,h=t.c,d=t.d,p=t.tx,c=t.ty;let v=this.minX,y=this.minY,b=this.maxX,_=this.maxY;for(let m=n;m<i;m+=2){const w=r[m],T=r[m+1],x=u*w+h*T+p,E=d*T+f*w+c;v=Math.min(v,x-o),b=Math.max(b,x+o),y=Math.min(y,E-a),_=Math.max(_,E+a)}this.minX=v,this.minY=y,this.maxX=b,this.maxY=_}addBounds(t){const r=this.minX,n=this.minY,i=this.maxX,o=this.maxY;this.minX=t.minX<r?t.minX:r,this.minY=t.minY<n?t.minY:n,this.maxX=t.maxX>i?t.maxX:i,this.maxY=t.maxY>o?t.maxY:o}addBoundsMask(t,r){const n=t.minX>r.minX?t.minX:r.minX,i=t.minY>r.minY?t.minY:r.minY,o=t.maxX<r.maxX?t.maxX:r.maxX,a=t.maxY<r.maxY?t.maxY:r.maxY;if(n<=o&&i<=a){const u=this.minX,f=this.minY,h=this.maxX,d=this.maxY;this.minX=n<u?n:u,this.minY=i<f?i:f,this.maxX=o>h?o:h,this.maxY=a>d?a:d}}addBoundsMatrix(t,r){this.addFrameMatrix(r,t.minX,t.minY,t.maxX,t.maxY)}addBoundsArea(t,r){const n=t.minX>r.x?t.minX:r.x,i=t.minY>r.y?t.minY:r.y,o=t.maxX<r.x+r.width?t.maxX:r.x+r.width,a=t.maxY<r.y+r.height?t.maxY:r.y+r.height;if(n<=o&&i<=a){const u=this.minX,f=this.minY,h=this.maxX,d=this.maxY;this.minX=n<u?n:u,this.minY=i<f?i:f,this.maxX=o>h?o:h,this.maxY=a>d?a:d}}pad(t=0,r=t){this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=r,this.maxY+=r)}addFramePad(t,r,n,i,o,a){t-=o,r-=a,n+=o,i+=a,this.minX=this.minX<t?this.minX:t,this.maxX=this.maxX>n?this.maxX:n,this.minY=this.minY<r?this.minY:r,this.maxY=this.maxY>i?this.maxY:i}}class Ai extends Vs{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new su,this.alpha=1,this.visible=!0,this.renderable=!0,this.cullable=!1,this.cullArea=null,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new Ou,this._localBounds=null,this._boundsID=0,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._maskRefCount=0,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}static mixin(t){const r=Object.keys(t);for(let n=0;n<r.length;++n){const i=r[n];Object.defineProperty(Ai.prototype,i,Object.getOwnPropertyDescriptor(t,i))}}get destroyed(){return this._destroyed}_recursivePostUpdateTransform(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)}updateTransform(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha}getBounds(t,r){return t||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._bounds.updateID!==this._boundsID&&(this.calculateBounds(),this._bounds.updateID=this._boundsID),r||(this._boundsRect||(this._boundsRect=new ne),r=this._boundsRect),this._bounds.getRectangle(r)}getLocalBounds(t){t||(this._localBoundsRect||(this._localBoundsRect=new ne),t=this._localBoundsRect),this._localBounds||(this._localBounds=new Ou);const r=this.transform,n=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;const i=this._bounds,o=this._boundsID;this._bounds=this._localBounds;const a=this.getBounds(!1,t);return this.parent=n,this.transform=r,this._bounds=i,this._bounds.updateID+=this._boundsID-o,a}toGlobal(t,r,n=!1){return n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(t,r)}toLocal(t,r,n,i){return r&&(t=r.toGlobal(t,n,i)),i||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,n)}setParent(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t}removeFromParent(){var t;(t=this.parent)==null||t.removeChild(this)}setTransform(t=0,r=0,n=1,i=1,o=0,a=0,u=0,f=0,h=0){return this.position.x=t,this.position.y=r,this.scale.x=n||1,this.scale.y=i||1,this.rotation=o,this.skew.x=a,this.skew.y=u,this.pivot.x=f,this.pivot.y=h,this}destroy(t){this.removeFromParent(),this._destroyed=!0,this.transform=null,this.parent=null,this._bounds=null,this.mask=null,this.cullArea=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.eventMode="auto",this.interactiveChildren=!1,this.emit("destroyed"),this.removeAllListeners()}get _tempDisplayObjectParent(){return this.tempDisplayObjectParent===null&&(this.tempDisplayObjectParent=new t2),this.tempDisplayObjectParent}enableTempParent(){const t=this.parent;return this.parent=this._tempDisplayObjectParent,t}disableTempParent(t){this.parent=t}get x(){return this.position.x}set x(t){this.transform.position.x=t}get y(){return this.position.y}set y(t){this.transform.position.y=t}get worldTransform(){return this.transform.worldTransform}get localTransform(){return this.transform.localTransform}get position(){return this.transform.position}set position(t){this.transform.position.copyFrom(t)}get scale(){return this.transform.scale}set scale(t){this.transform.scale.copyFrom(t)}get pivot(){return this.transform.pivot}set pivot(t){this.transform.pivot.copyFrom(t)}get skew(){return this.transform.skew}set skew(t){this.transform.skew.copyFrom(t)}get rotation(){return this.transform.rotation}set rotation(t){this.transform.rotation=t}get angle(){return this.transform.rotation*pw}set angle(t){this.transform.rotation=t*fs}get zIndex(){return this._zIndex}set zIndex(t){this._zIndex=t,this.parent&&(this.parent.sortDirty=!0)}get worldVisible(){let t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0}get mask(){return this._mask}set mask(t){if(this._mask!==t){if(this._mask){const r=this._mask.isMaskData?this._mask.maskObject:this._mask;r&&(r._maskRefCount--,r._maskRefCount===0&&(r.renderable=!0,r.isMask=!1))}if(this._mask=t,this._mask){const r=this._mask.isMaskData?this._mask.maskObject:this._mask;r&&(r._maskRefCount===0&&(r.renderable=!1,r.isMask=!0),r._maskRefCount++)}}}}class t2 extends Ai{constructor(){super(...arguments),this.sortDirty=null}}Ai.prototype.displayObjectUpdateTransform=Ai.prototype.updateTransform;const e2=new $e;function r2(e,t){return e.zIndex===t.zIndex?e._lastSortedIndex-t._lastSortedIndex:e.zIndex-t.zIndex}const Cu=class extends Ai{constructor(){super(),this.children=[],this.sortableChildren=Cu.defaultSortableChildren,this.sortDirty=!1}onChildrenChange(e){}addChild(...e){if(e.length>1)for(let t=0;t<e.length;t++)this.addChild(e[t]);else{const t=e[0];t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.push(t),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",t,this,this.children.length-1),t.emit("added",this)}return e[0]}addChildAt(e,t){if(t<0||t>this.children.length)throw new Error(`${e}addChildAt: The index ${t} supplied is out of bounds ${this.children.length}`);return e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.splice(t,0,e),this._boundsID++,this.onChildrenChange(t),e.emit("added",this),this.emit("childAdded",e,this,t),e}swapChildren(e,t){if(e===t)return;const r=this.getChildIndex(e),n=this.getChildIndex(t);this.children[r]=t,this.children[n]=e,this.onChildrenChange(r<n?r:n)}getChildIndex(e){const t=this.children.indexOf(e);if(t===-1)throw new Error("The supplied DisplayObject must be a child of the caller");return t}setChildIndex(e,t){if(t<0||t>=this.children.length)throw new Error(`The index ${t} supplied is out of bounds ${this.children.length}`);const r=this.getChildIndex(e);fo(this.children,r,1),this.children.splice(t,0,e),this.onChildrenChange(t)}getChildAt(e){if(e<0||e>=this.children.length)throw new Error(`getChildAt: Index (${e}) does not exist.`);return this.children[e]}removeChild(...e){if(e.length>1)for(let t=0;t<e.length;t++)this.removeChild(e[t]);else{const t=e[0],r=this.children.indexOf(t);if(r===-1)return null;t.parent=null,t.transform._parentID=-1,fo(this.children,r,1),this._boundsID++,this.onChildrenChange(r),t.emit("removed",this),this.emit("childRemoved",t,this,r)}return e[0]}removeChildAt(e){const t=this.getChildAt(e);return t.parent=null,t.transform._parentID=-1,fo(this.children,e,1),this._boundsID++,this.onChildrenChange(e),t.emit("removed",this),this.emit("childRemoved",t,this,e),t}removeChildren(e=0,t=this.children.length){const r=e,n=t,i=n-r;let o;if(i>0&&i<=n){o=this.children.splice(r,i);for(let a=0;a<o.length;++a)o[a].parent=null,o[a].transform&&(o[a].transform._parentID=-1);this._boundsID++,this.onChildrenChange(e);for(let a=0;a<o.length;++a)o[a].emit("removed",this),this.emit("childRemoved",o[a],this,a);return o}else if(i===0&&this.children.length===0)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")}sortChildren(){let e=!1;for(let t=0,r=this.children.length;t<r;++t){const n=this.children[t];n._lastSortedIndex=t,!e&&n.zIndex!==0&&(e=!0)}e&&this.children.length>1&&this.children.sort(r2),this.sortDirty=!1}updateTransform(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(let e=0,t=this.children.length;e<t;++e){const r=this.children[e];r.visible&&r.updateTransform()}}calculateBounds(){this._bounds.clear(),this._calculateBounds();for(let e=0;e<this.children.length;e++){const t=this.children[e];if(!(!t.visible||!t.renderable))if(t.calculateBounds(),t._mask){const r=t._mask.isMaskData?t._mask.maskObject:t._mask;r?(r.calculateBounds(),this._bounds.addBoundsMask(t._bounds,r._bounds)):this._bounds.addBounds(t._bounds)}else t.filterArea?this._bounds.addBoundsArea(t._bounds,t.filterArea):this._bounds.addBounds(t._bounds)}this._bounds.updateID=this._boundsID}getLocalBounds(e,t=!1){const r=super.getLocalBounds(e);if(!t)for(let n=0,i=this.children.length;n<i;++n){const o=this.children[n];o.visible&&o.updateTransform()}return r}_calculateBounds(){}_renderWithCulling(e){const t=e.renderTexture.sourceFrame;if(!(t.width>0&&t.height>0))return;let r,n;this.cullArea?(r=this.cullArea,n=this.worldTransform):this._render!==Cu.prototype._render&&(r=this.getBounds(!0));const i=e.projection.transform;if(i&&(n?(n=e2.copyFrom(n),n.prepend(i)):n=i),r&&t.intersects(r,n))this._render(e);else if(this.cullArea)return;for(let o=0,a=this.children.length;o<a;++o){const u=this.children[o],f=u.cullable;u.cullable=f||!this.cullArea,u.render(e),u.cullable=f}}render(e){var t;if(!(!this.visible||this.worldAlpha<=0||!this.renderable))if(this._mask||(t=this.filters)!=null&&t.length)this.renderAdvanced(e);else if(this.cullable)this._renderWithCulling(e);else{this._render(e);for(let r=0,n=this.children.length;r<n;++r)this.children[r].render(e)}}renderAdvanced(e){var i,o,a;const t=this.filters,r=this._mask;if(t){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(let u=0;u<t.length;u++)t[u].enabled&&this._enabledFilters.push(t[u])}const n=t&&((i=this._enabledFilters)==null?void 0:i.length)||r&&(!r.isMaskData||r.enabled&&(r.autoDetect||r.type!==Ee.NONE));if(n&&e.batch.flush(),t&&((o=this._enabledFilters)!=null&&o.length)&&e.filter.push(this,this._enabledFilters),r&&e.mask.push(this,this._mask),this.cullable)this._renderWithCulling(e);else{this._render(e);for(let u=0,f=this.children.length;u<f;++u)this.children[u].render(e)}n&&e.batch.flush(),r&&e.mask.pop(this),t&&((a=this._enabledFilters)!=null&&a.length)&&e.filter.pop()}_render(e){}destroy(e){super.destroy(),this.sortDirty=!1;const t=typeof e=="boolean"?e:e==null?void 0:e.children,r=this.removeChildren(0,this.children.length);if(t)for(let n=0;n<r.length;++n)r[n].destroy(e)}get width(){return this.scale.x*this.getLocalBounds().width}set width(e){const t=this.getLocalBounds().width;t!==0?this.scale.x=e/t:this.scale.x=1,this._width=e}get height(){return this.scale.y*this.getLocalBounds().height}set height(e){const t=this.getLocalBounds().height;t!==0?this.scale.y=e/t:this.scale.y=1,this._height=e}};let Oi=Cu;Oi.defaultSortableChildren=!1,Oi.prototype.containerUpdateTransform=Oi.prototype.updateTransform,Object.defineProperties(Dt,{SORTABLE_CHILDREN:{get(){return Oi.defaultSortableChildren},set(e){Ht("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),Oi.defaultSortableChildren=e}}});class Bo{constructor(t,r=null,n=null,i=null){this.points=[],this.holes=[],this.shape=t,this.lineStyle=n,this.fillStyle=r,this.matrix=i,this.type=t.type}clone(){return new Bo(this.shape,this.fillStyle,this.lineStyle,this.matrix)}destroy(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null}}const Ci=new se,Tp=class extends ed{constructor(){super(),this.closePointEps=1e-4,this.boundsPadding=0,this.uvsFloat32=null,this.indicesUint16=null,this.batchable=!1,this.points=[],this.colors=[],this.uvs=[],this.indices=[],this.textureIds=[],this.graphicsData=[],this.drawCalls=[],this.batchDirty=-1,this.batches=[],this.dirty=0,this.cacheDirty=-1,this.clearDirty=0,this.shapeIndex=0,this._bounds=new Ou,this.boundsDirty=-1}get bounds(){return this.updateBatches(),this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds}invalidate(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(let e=0;e<this.drawCalls.length;e++)this.drawCalls[e].texArray.clear(),Fo.push(this.drawCalls[e]);this.drawCalls.length=0;for(let e=0;e<this.batches.length;e++){const t=this.batches[e];t.reset(),wp.push(t)}this.batches.length=0}clear(){return this.graphicsData.length>0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(e,t=null,r=null,n=null){const i=new Bo(e,t,r,n);return this.graphicsData.push(i),this.dirty++,this}drawHole(e,t=null){if(!this.graphicsData.length)return null;const r=new Bo(e,null,null,t),n=this.graphicsData[this.graphicsData.length-1];return r.lineStyle=n.lineStyle,n.holes.push(r),this.dirty++,this}destroy(){super.destroy();for(let e=0;e<this.graphicsData.length;++e)this.graphicsData[e].destroy();this.points.length=0,this.points=null,this.colors.length=0,this.colors=null,this.uvs.length=0,this.uvs=null,this.indices.length=0,this.indices=null,this.indexBuffer.destroy(),this.indexBuffer=null,this.graphicsData.length=0,this.graphicsData=null,this.drawCalls.length=0,this.drawCalls=null,this.batches.length=0,this.batches=null,this._bounds=null}containsPoint(e){const t=this.graphicsData;for(let r=0;r<t.length;++r){const n=t[r];if(n.fillStyle.visible&&n.shape&&(n.matrix?n.matrix.applyInverse(e,Ci):Ci.copyFrom(e),n.shape.contains(Ci.x,Ci.y))){let i=!1;if(n.holes){for(let o=0;o<n.holes.length;o++)if(n.holes[o].shape.contains(Ci.x,Ci.y)){i=!0;break}}if(!i)return!0}}return!1}updateBatches(){if(!this.graphicsData.length){this.batchable=!0;return}if(!this.validateBatching())return;this.cacheDirty=this.dirty;const e=this.uvs,t=this.graphicsData;let r=null,n=null;this.batches.length>0&&(r=this.batches[this.batches.length-1],n=r.style);for(let u=this.shapeIndex;u<t.length;u++){this.shapeIndex++;const f=t[u],h=f.fillStyle,d=f.lineStyle;Au[f.type].build(f),f.matrix&&this.transformPoints(f.points,f.matrix),(h.visible||d.visible)&&this.processHoles(f.holes);for(let c=0;c<2;c++){const v=c===0?h:d;if(!v.visible)continue;const y=v.texture.baseTexture,b=this.indices.length,_=this.points.length/2;y.wrapMode=Qi.REPEAT,c===0?this.processFill(f):this.processLine(f);const m=this.points.length/2-_;m!==0&&(r&&!this._compareStyles(n,v)&&(r.end(b,_),r=null),r||(r=wp.pop()||new ZE,r.begin(v,b,_),this.batches.push(r),n=v),this.addUvs(this.points,e,v.texture,_,m,v.matrix))}}const i=this.indices.length,o=this.points.length/2;if(r&&r.end(i,o),this.batches.length===0){this.batchable=!0;return}const a=o>65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&a===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=a?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(e,t){return!(!e||!t||e.texture.baseTexture!==t.texture.baseTexture||e.color+e.alpha!==t.color+t.alpha||!!e.native!=!!t.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let e=0,t=this.graphicsData.length;e<t;e++){const r=this.graphicsData[e],n=r.fillStyle,i=r.lineStyle;if(n&&!n.texture.baseTexture.valid||i&&!i.texture.baseTexture.valid)return!1}return!0}packBatches(){this.batchDirty++,this.uvsFloat32=new Float32Array(this.uvs);const e=this.batches;for(let t=0,r=e.length;t<r;t++){const n=e[t];for(let i=0;i<n.size;i++){const o=n.start+i;this.indicesUint16[o]=this.indicesUint16[o]-n.attribStart}}}isBatchable(){if(this.points.length>65535*2)return!1;const e=this.batches;for(let t=0;t<e.length;t++)if(e[t].style.native)return!1;return this.points.length<Tp.BATCHABLE_SIZE*2}buildDrawCalls(){let e=++Kt._globalBatch;for(let d=0;d<this.drawCalls.length;d++)this.drawCalls[d].texArray.clear(),Fo.push(this.drawCalls[d]);this.drawCalls.length=0;const t=this.colors,r=this.textureIds;let n=Fo.pop();n||(n=new eu,n.texArray=new au),n.texArray.count=0,n.start=0,n.size=0,n.type=an.TRIANGLES;let i=0,o=null,a=0,u=!1,f=an.TRIANGLES,h=0;this.drawCalls.push(n);for(let d=0;d<this.batches.length;d++){const p=this.batches[d],c=8,v=p.style,y=v.texture.baseTexture;u!==!!v.native&&(u=!!v.native,f=u?an.LINES:an.TRIANGLES,o=null,i=c,e++),o!==y&&(o=y,y._batchEnabled!==e&&(i===c&&(e++,i=0,n.size>0&&(n=Fo.pop(),n||(n=new eu,n.texArray=new au),this.drawCalls.push(n)),n.start=h,n.size=0,n.texArray.count=0,n.type=f),y.touched=1,y._batchEnabled=e,y._batchLocation=i,y.wrapMode=Qi.REPEAT,n.texArray.elements[n.texArray.count++]=y,i++)),n.size+=p.size,h+=p.size,a=y._batchLocation,this.addColors(t,v.color,v.alpha,p.attribSize,p.attribStart),this.addTextureIds(r,a,p.attribSize,p.attribStart)}Kt._globalBatch=e,this.packAttributes()}packAttributes(){const e=this.points,t=this.uvs,r=this.colors,n=this.textureIds,i=new ArrayBuffer(e.length*3*4),o=new Float32Array(i),a=new Uint32Array(i);let u=0;for(let f=0;f<e.length/2;f++)o[u++]=e[f*2],o[u++]=e[f*2+1],o[u++]=t[f*2],o[u++]=t[f*2+1],a[u++]=r[f],o[u++]=n[f];this._buffer.update(i),this._indexBuffer.update(this.indicesUint16)}processFill(e){e.holes.length?yp.triangulate(e,this):Au[e.type].triangulate(e,this)}processLine(e){xp(e,this);for(let t=0;t<e.holes.length;t++)xp(e.holes[t],this)}processHoles(e){for(let t=0;t<e.length;t++){const r=e[t];Au[r.type].build(r),r.matrix&&this.transformPoints(r.points,r.matrix)}}calculateBounds(){const e=this._bounds;e.clear(),e.addVertexData(this.points,0,this.points.length),e.pad(this.boundsPadding,this.boundsPadding)}transformPoints(e,t){for(let r=0;r<e.length/2;r++){const n=e[r*2],i=e[r*2+1];e[r*2]=t.a*n+t.c*i+t.tx,e[r*2+1]=t.b*n+t.d*i+t.ty}}addColors(e,t,r,n,i=0){const o=Be.shared.setValue(t).toLittleEndianNumber(),a=Be.shared.setValue(o).toPremultiplied(r);e.length=Math.max(e.length,i+n);for(let u=0;u<n;u++)e[i+u]=a}addTextureIds(e,t,r,n=0){e.length=Math.max(e.length,n+r);for(let i=0;i<r;i++)e[n+i]=t}addUvs(e,t,r,n,i,o=null){let a=0;const u=t.length,f=r.frame;for(;a<i;){let d=e[(n+a)*2],p=e[(n+a)*2+1];if(o){const c=o.a*d+o.c*p+o.tx;p=o.b*d+o.d*p+o.ty,d=c}a++,t.push(d/f.width,p/f.height)}const h=r.baseTexture;(f.width<h.width||f.height<h.height)&&this.adjustUvs(t,r,u,i)}adjustUvs(e,t,r,n){const i=t.baseTexture,o=1e-6,a=r+n*2,u=t.frame,f=u.width/i.width,h=u.height/i.height;let d=u.x/u.width,p=u.y/u.height,c=Math.floor(e[r]+o),v=Math.floor(e[r+1]+o);for(let y=r+2;y<a;y+=2)c=Math.min(c,Math.floor(e[y]+o)),v=Math.min(v,Math.floor(e[y+1]+o));d-=c,p-=v;for(let y=r;y<a;y+=2)e[y]=(e[y]+d)*f,e[y+1]=(e[y+1]+p)*h}};let Ep=Tp;Ep.BATCHABLE_SIZE=100;class Do{constructor(){this.color=16777215,this.alpha=1,this.texture=Wt.WHITE,this.matrix=null,this.visible=!1,this.reset()}clone(){const t=new Do;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t}reset(){this.color=16777215,this.alpha=1,this.texture=Wt.WHITE,this.matrix=null,this.visible=!1}destroy(){this.texture=null,this.matrix=null}}class Ru extends Do{constructor(){super(...arguments),this.width=0,this.alignment=.5,this.native=!1,this.cap=jn.BUTT,this.join=Sr.MITER,this.miterLimit=10}clone(){const t=new Ru;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t.width=this.width,t.alignment=this.alignment,t.native=this.native,t.cap=this.cap,t.join=this.join,t.miterLimit=this.miterLimit,t}reset(){super.reset(),this.color=0,this.alignment=.5,this.width=0,this.native=!1}}const Iu={},Uo=class extends Oi{constructor(e=null){super(),this.shader=null,this.pluginName="batch",this.currentPath=null,this.batches=[],this.batchTint=-1,this.batchDirty=-1,this.vertexData=null,this._fillStyle=new Do,this._lineStyle=new Ru,this._matrix=null,this._holeMode=!1,this.state=ho.for2d(),this._geometry=e||new Ep,this._geometry.refCount++,this._transformID=-1,this._tintColor=new Be(16777215),this.blendMode=Rt.NORMAL}get geometry(){return this._geometry}clone(){return this.finishPoly(),new Uo(this._geometry)}set blendMode(e){this.state.blendMode=e}get blendMode(){return this.state.blendMode}get tint(){return this._tintColor.value}set tint(e){this._tintColor.setValue(e)}get fill(){return this._fillStyle}get line(){return this._lineStyle}lineStyle(e=null,t=0,r,n=.5,i=!1){return typeof e=="number"&&(e={width:e,color:t,alpha:r,alignment:n,native:i}),this.lineTextureStyle(e)}lineTextureStyle(e){const t={width:0,texture:Wt.WHITE,color:e!=null&&e.texture?16777215:0,matrix:null,alignment:.5,native:!1,cap:jn.BUTT,join:Sr.MITER,miterLimit:10};e=Object.assign(t,e),this.normalizeColor(e),this.currentPath&&this.startPoly();const r=e.width>0&&e.alpha>0;return r?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._lineStyle,{visible:r},e)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const e=this.currentPath.points,t=this.currentPath.points.length;t>2&&(this.drawShape(this.currentPath),this.currentPath=new cs,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[t-2],e[t-1]))}else this.currentPath=new cs,this.currentPath.closeStroke=!1}finishPoly(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)}moveTo(e,t){return this.startPoly(),this.currentPath.points[0]=e,this.currentPath.points[1]=t,this}lineTo(e,t){this.currentPath||this.moveTo(0,0);const r=this.currentPath.points,n=r[r.length-2],i=r[r.length-1];return(n!==e||i!==t)&&r.push(e,t),this}_initCurve(e=0,t=0){this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[e,t]):this.moveTo(e,t)}quadraticCurveTo(e,t,r,n){this._initCurve();const i=this.currentPath.points;return i.length===0&&this.moveTo(0,0),Su.curveTo(e,t,r,n,i),this}bezierCurveTo(e,t,r,n,i,o){return this._initCurve(),Eu.curveTo(e,t,r,n,i,o,this.currentPath.points),this}arcTo(e,t,r,n,i){this._initCurve(e,t);const o=this.currentPath.points,a=_p.curveTo(e,t,r,n,i,o);if(a){const{cx:u,cy:f,radius:h,startAngle:d,endAngle:p,anticlockwise:c}=a;this.arc(u,f,h,d,p,c)}return this}arc(e,t,r,n,i,o=!1){if(n===i)return this;if(!o&&i<=n?i+=vo:o&&n<=i&&(n+=vo),i-n===0)return this;const u=e+Math.cos(n)*r,f=t+Math.sin(n)*r,h=this._geometry.closePointEps;let d=this.currentPath?this.currentPath.points:null;if(d){const p=Math.abs(d[d.length-2]-u),c=Math.abs(d[d.length-1]-f);p<h&&c<h||d.push(u,f)}else this.moveTo(u,f),d=this.currentPath.points;return _p.arc(u,f,e,t,r,n,i,o,d),this}beginFill(e=0,t){return this.beginTextureFill({texture:Wt.WHITE,color:e,alpha:t})}normalizeColor(e){const t=Be.shared.setValue(e.color??0);e.color=t.toNumber(),e.alpha??(e.alpha=t.alpha)}beginTextureFill(e){const t={texture:Wt.WHITE,color:16777215,matrix:null};e=Object.assign(t,e),this.normalizeColor(e),this.currentPath&&this.startPoly();const r=e.alpha>0;return r?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._fillStyle,{visible:r},e)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(e,t,r,n){return this.drawShape(new ne(e,t,r,n))}drawRoundedRect(e,t,r,n,i){return this.drawShape(new nu(e,t,r,n,i))}drawCircle(e,t,r){return this.drawShape(new ru(e,t,r))}drawEllipse(e,t,r,n){return this.drawShape(new vw(e,t,r,n))}drawPolygon(...e){let t,r=!0;const n=e[0];n.points?(r=n.closeStroke,t=n.points):Array.isArray(e[0])?t=e[0]:t=e;const i=new cs(t);return i.closeStroke=r,this.drawShape(i),this}drawShape(e){return this._holeMode?this._geometry.drawHole(e,this._matrix):this._geometry.drawShape(e,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this}clear(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this}isFastRect(){const e=this._geometry.graphicsData;return e.length===1&&e[0].shape.type===Ne.RECT&&!e[0].matrix&&!e[0].holes.length&&!(e[0].lineStyle.visible&&e[0].lineStyle.width)}_render(e){this.finishPoly();const t=this._geometry;t.updateBatches(),t.batchable?(this.batchDirty!==t.batchDirty&&this._populateBatches(),this._renderBatched(e)):(e.batch.flush(),this._renderDirect(e))}_populateBatches(){const e=this._geometry,t=this.blendMode,r=e.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=e.batchDirty,this.batches.length=r,this.vertexData=new Float32Array(e.points);for(let n=0;n<r;n++){const i=e.batches[n],o=i.style.color,a=new Float32Array(this.vertexData.buffer,i.attribStart*4*2,i.attribSize*2),u=new Float32Array(e.uvsFloat32.buffer,i.attribStart*4*2,i.attribSize*2),f=new Uint16Array(e.indicesUint16.buffer,i.start*2,i.size),h={vertexData:a,blendMode:t,indices:f,uvs:u,_batchRGB:Be.shared.setValue(o).toRgbArray(),_tintRGB:o,_texture:i.style.texture,alpha:i.style.alpha,worldAlpha:1};this.batches[n]=h}}_renderBatched(e){if(this.batches.length){e.batch.setObjectRenderer(e.plugins[this.pluginName]),this.calculateVertices(),this.calculateTints();for(let t=0,r=this.batches.length;t<r;t++){const n=this.batches[t];n.worldAlpha=this.worldAlpha*n.alpha,e.plugins[this.pluginName].render(n)}}}_renderDirect(e){const t=this._resolveDirectShader(e),r=this._geometry,n=this.worldAlpha,i=t.uniforms,o=r.drawCalls;i.translationMatrix=this.transform.worldTransform,Be.shared.setValue(this._tintColor).premultiply(n).toArray(i.tint),e.shader.bind(t),e.geometry.bind(r,t),e.state.set(this.state);for(let a=0,u=o.length;a<u;a++)this._renderDrawCallDirect(e,r.drawCalls[a])}_renderDrawCallDirect(e,t){const{texArray:r,type:n,size:i,start:o}=t,a=r.count;for(let u=0;u<a;u++)e.texture.bind(r.elements[u],u);e.geometry.draw(n,i,o)}_resolveDirectShader(e){let t=this.shader;const r=this.pluginName;if(!t){if(!Iu[r]){const{maxTextures:n}=e.plugins[r],i=new Int32Array(n);for(let u=0;u<n;u++)i[u]=u;const o={tint:new Float32Array([1,1,1,1]),translationMatrix:new $e,default:br.from({uSamplers:i},!0)},a=e.plugins[r]._shader.program;Iu[r]=new ds(a,o)}t=Iu[r]}return t}_calculateBounds(){this.finishPoly();const e=this._geometry;if(!e.graphicsData.length)return;const{minX:t,minY:r,maxX:n,maxY:i}=e.bounds;this._bounds.addFrame(this.transform,t,r,n,i)}containsPoint(e){return this.worldTransform.applyInverse(e,Uo._TEMP_POINT),this._geometry.containsPoint(Uo._TEMP_POINT)}calculateTints(){if(this.batchTint!==this.tint){this.batchTint=this._tintColor.toNumber();for(let e=0;e<this.batches.length;e++){const t=this.batches[e];t._tintRGB=Be.shared.setValue(this._tintColor).multiply(t._batchRGB).toLittleEndianNumber()}}}calculateVertices(){const e=this.transform._worldID;if(this._transformID===e)return;this._transformID=e;const t=this.transform.worldTransform,r=t.a,n=t.b,i=t.c,o=t.d,a=t.tx,u=t.ty,f=this._geometry.points,h=this.vertexData;let d=0;for(let p=0;p<f.length;p+=2){const c=f[p],v=f[p+1];h[d++]=r*c+i*v+a,h[d++]=o*v+n*c+u}}closePath(){const e=this.currentPath;return e&&(e.closeStroke=!0,this.finishPoly()),this}setMatrix(e){return this._matrix=e,this}beginHole(){return this.finishPoly(),this._holeMode=!0,this}endHole(){return this.finishPoly(),this._holeMode=!1,this}destroy(e){this._geometry.refCount--,this._geometry.refCount===0&&this._geometry.dispose(),this._matrix=null,this.currentPath=null,this._lineStyle.destroy(),this._lineStyle=null,this._fillStyle.destroy(),this._fillStyle=null,this._geometry=null,this.shader=null,this.vertexData=null,this.batches.length=0,this.batches=null,super.destroy(e)}};let Pu=Uo;Pu.curves=Si,Pu._TEMP_POINT=new se;var n2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Nu={},i2={get exports(){return Nu},set exports(e){Nu=e}};/*!
1923
+ `),t=[.393,.769,.189,.349,.686,.168,.272,.534,.131];return e.uniforms.uNightVisionMatrix=t,{nightVisionFilter:e}},gp=Et.forwardRef((e,t)=>{const r=mt.useRef(null),n=mt.useRef(null),{src:i,transformation:{x:o,y:a,width:u,height:f,anchor:h,colorCorrection:d={},effect:p},pointerdown:c}=e;console.log("PixiImageSprite props",e);const{blurRadius:v=0}=d,{temperatureFilter:y,sharpnessFilter:b,hueFilter:_,blurFilter:m,adjustmentFilter:w}=ys(d),{nightVisionFilter:T}=XE();return Et.useEffect(()=>()=>{console.log("PixiImageSprite unmounting")},[]),Vt.jsx(ni,{...e,ref:t,children:Vt.jsx(le.Container,{ref:n,children:Vt.jsx(le.Sprite,{image:i,width:u,height:f,anchor:h,ref:r,x:o,y:a,interactive:!0,pointerdown:c,filters:[y,b,_,w,...v>0?[m]:[],...p===Sn.NightVision?[T]:[]]})})})});gp.whyDidYouRender={logOnDifferentValues:!0,customName:"ImageSprite"};const Lo={build(e){const t=e.points;let r,n,i,o,a,u;if(e.type===Ne.CIRC){const y=e.shape;r=y.x,n=y.y,a=u=y.radius,i=o=0}else if(e.type===Ne.ELIP){const y=e.shape;r=y.x,n=y.y,a=y.width,u=y.height,i=o=0}else{const y=e.shape,b=y.width/2,_=y.height/2;r=y.x+b,n=y.y+_,a=u=Math.max(0,Math.min(y.radius,Math.min(b,_))),i=b-a,o=_-u}if(!(a>=0&&u>=0&&i>=0&&o>=0)){t.length=0;return}const f=Math.ceil(2.3*Math.sqrt(a+u)),h=f*8+(i?4:0)+(o?4:0);if(t.length=h,h===0)return;if(f===0){t.length=8,t[0]=t[6]=r+i,t[1]=t[3]=n+o,t[2]=t[4]=r-i,t[5]=t[7]=n-o;return}let d=0,p=f*4+(i?2:0)+2,c=p,v=h;{const y=i+a,b=o,_=r+y,m=r-y,w=n+b;if(t[d++]=_,t[d++]=w,t[--p]=w,t[--p]=m,o){const T=n-b;t[c++]=m,t[c++]=T,t[--v]=T,t[--v]=_}}for(let y=1;y<f;y++){const b=Math.PI/2*(y/f),_=i+Math.cos(b)*a,m=o+Math.sin(b)*u,w=r+_,T=r-_,x=n+m,E=n-m;t[d++]=w,t[d++]=x,t[--p]=x,t[--p]=T,t[c++]=T,t[c++]=E,t[--v]=E,t[--v]=w}{const y=i,b=o+u,_=r+y,m=r-y,w=n+b,T=n-b;t[d++]=_,t[d++]=w,t[--v]=T,t[--v]=_,i&&(t[d++]=m,t[d++]=w,t[--v]=T,t[--v]=m)}},triangulate(e,t){const r=e.points,n=t.points,i=t.indices;if(r.length===0)return;let o=n.length/2;const a=o;let u,f;if(e.type!==Ne.RREC){const d=e.shape;u=d.x,f=d.y}else{const d=e.shape;u=d.x+d.width/2,f=d.y+d.height/2}const h=e.matrix;n.push(e.matrix?h.a*u+h.c*f+h.tx:u,e.matrix?h.b*u+h.d*f+h.ty:f),o++,n.push(r[0],r[1]);for(let d=2;d<r.length;d+=2)n.push(r[d],r[d+1]),i.push(o++,a,o);i.push(a+1,a,o)}};function mp(e,t=!1){const r=e.length;if(r<6)return;let n=0;for(let i=0,o=e[r-2],a=e[r-1];i<r;i+=2){const u=e[i],f=e[i+1];n+=(u-o)*(f+a),o=u,a=f}if(!t&&n>0||t&&n<=0){const i=r/2;for(let o=i+i%2;o<r;o+=2){const a=r-o-2,u=r-o-1,f=o,h=o+1;[e[a],e[f]]=[e[f],e[a]],[e[u],e[h]]=[e[h],e[u]]}}}const yp={build(e){e.points=e.shape.points.slice()},triangulate(e,t){let r=e.points;const n=e.holes,i=t.points,o=t.indices;if(r.length>=6){mp(r,!1);const a=[];for(let h=0;h<n.length;h++){const d=n[h];mp(d.points,!0),a.push(r.length/2),r=r.concat(d.points)}const u=k_(r,a,2);if(!u)return;const f=i.length/2;for(let h=0;h<u.length;h+=3)o.push(u[h]+f),o.push(u[h+1]+f),o.push(u[h+2]+f);for(let h=0;h<r.length;h++)i.push(r[h])}}},KE={build(e){const t=e.shape,r=t.x,n=t.y,i=t.width,o=t.height,a=e.points;a.length=0,i>=0&&o>=0&&a.push(r,n,r+i,n,r+i,n+o,r,n+o)},triangulate(e,t){const r=e.points,n=t.points;if(r.length===0)return;const i=n.length/2;n.push(r[0],r[1],r[2],r[3],r[6],r[7],r[4],r[5]),t.indices.push(i,i+1,i+2,i+1,i+2,i+3)}},YE={build(e){Lo.build(e)},triangulate(e,t){Lo.triangulate(e,t)}};var Sr=(e=>(e.MITER="miter",e.BEVEL="bevel",e.ROUND="round",e))(Sr||{}),jn=(e=>(e.BUTT="butt",e.ROUND="round",e.SQUARE="square",e))(jn||{});const Si={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(e,t=20){if(!this.adaptive||!e||isNaN(e))return t;let r=Math.ceil(e/this.maxLength);return r<this.minSegments?r=this.minSegments:r>this.maxSegments&&(r=this.maxSegments),r}};class _p{static curveTo(t,r,n,i,o,a){const u=a[a.length-2],h=a[a.length-1]-r,d=u-t,p=i-r,c=n-t,v=Math.abs(h*c-d*p);if(v<1e-8||o===0)return(a[a.length-2]!==t||a[a.length-1]!==r)&&a.push(t,r),null;const y=h*h+d*d,b=p*p+c*c,_=h*p+d*c,m=o*Math.sqrt(y)/v,w=o*Math.sqrt(b)/v,T=m*_/y,x=w*_/b,E=m*c+w*d,I=m*p+w*h,A=d*(w+T),O=h*(w+T),L=c*(m+x),R=p*(m+x),C=Math.atan2(O-I,A-E),P=Math.atan2(R-I,L-E);return{cx:E+t,cy:I+r,radius:o,startAngle:C,endAngle:P,anticlockwise:d*p>c*h}}static arc(t,r,n,i,o,a,u,f,h){const d=u-a,p=Si._segmentsCount(Math.abs(d)*o,Math.ceil(Math.abs(d)/vo)*40),c=d/(p*2),v=c*2,y=Math.cos(c),b=Math.sin(c),_=p-1,m=_%1/_;for(let w=0;w<=_;++w){const T=w+m*w,x=c+a+v*T,E=Math.cos(x),I=-Math.sin(x);h.push((y*E+b*I)*o+n,(y*-I+b*E)*o+i)}}}class ZE{constructor(){this.reset()}begin(t,r,n){this.reset(),this.style=t,this.start=r,this.attribStart=n}end(t,r){this.attribSize=r-this.attribStart,this.size=t-this.start}reset(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0}}class Eu{static curveLength(t,r,n,i,o,a,u,f){let d=0,p=0,c=0,v=0,y=0,b=0,_=0,m=0,w=0,T=0,x=0,E=t,I=r;for(let A=1;A<=10;++A)p=A/10,c=p*p,v=c*p,y=1-p,b=y*y,_=b*y,m=_*t+3*b*p*n+3*y*c*o+v*u,w=_*r+3*b*p*i+3*y*c*a+v*f,T=E-m,x=I-w,E=m,I=w,d+=Math.sqrt(T*T+x*x);return d}static curveTo(t,r,n,i,o,a,u){const f=u[u.length-2],h=u[u.length-1];u.length-=2;const d=Si._segmentsCount(Eu.curveLength(f,h,t,r,n,i,o,a));let p=0,c=0,v=0,y=0,b=0;u.push(f,h);for(let _=1,m=0;_<=d;++_)m=_/d,p=1-m,c=p*p,v=c*p,y=m*m,b=y*m,u.push(v*f+3*c*m*t+3*p*y*n+b*o,v*h+3*c*m*r+3*p*y*i+b*a)}}function bp(e,t,r,n,i,o,a,u){const f=e-r*i,h=t-n*i,d=e+r*o,p=t+n*o;let c,v;a?(c=n,v=-r):(c=-n,v=r);const y=f+c,b=h+v,_=d+c,m=p+v;return u.push(y,b,_,m),2}function qn(e,t,r,n,i,o,a,u){const f=r-e,h=n-t;let d=Math.atan2(f,h),p=Math.atan2(i-e,o-t);u&&d<p?d+=Math.PI*2:!u&&d>p&&(p+=Math.PI*2);let c=d;const v=p-d,y=Math.abs(v),b=Math.sqrt(f*f+h*h),_=(15*y*Math.sqrt(b)/Math.PI>>0)+1,m=v/_;if(c+=m,u){a.push(e,t,r,n);for(let w=1,T=c;w<_;w++,T+=m)a.push(e,t,e+Math.sin(T)*b,t+Math.cos(T)*b);a.push(e,t,i,o)}else{a.push(r,n,e,t);for(let w=1,T=c;w<_;w++,T+=m)a.push(e+Math.sin(T)*b,t+Math.cos(T)*b,e,t);a.push(i,o,e,t)}return _*2}function QE(e,t){const r=e.shape;let n=e.points||r.points.slice();const i=t.closePointEps;if(n.length===0)return;const o=e.lineStyle,a=new se(n[0],n[1]),u=new se(n[n.length-2],n[n.length-1]),f=r.type!==Ne.POLY||r.closeStroke,h=Math.abs(a.x-u.x)<i&&Math.abs(a.y-u.y)<i;if(f){n=n.slice(),h&&(n.pop(),n.pop(),u.set(n[n.length-2],n[n.length-1]));const z=(a.x+u.x)*.5,nt=(u.y+a.y)*.5;n.unshift(z,nt),n.push(z,nt)}const d=t.points,p=n.length/2;let c=n.length;const v=d.length/2,y=o.width/2,b=y*y,_=o.miterLimit*o.miterLimit;let m=n[0],w=n[1],T=n[2],x=n[3],E=0,I=0,A=-(w-x),O=m-T,L=0,R=0,C=Math.sqrt(A*A+O*O);A/=C,O/=C,A*=y,O*=y;const P=o.alignment,M=(1-P)*2,F=P*2;f||(o.cap===jn.ROUND?c+=qn(m-A*(M-F)*.5,w-O*(M-F)*.5,m-A*M,w-O*M,m+A*F,w+O*F,d,!0)+2:o.cap===jn.SQUARE&&(c+=bp(m,w,A,O,M,F,!0,d))),d.push(m-A*M,w-O*M,m+A*F,w+O*F);for(let z=1;z<p-1;++z){m=n[(z-1)*2],w=n[(z-1)*2+1],T=n[z*2],x=n[z*2+1],E=n[(z+1)*2],I=n[(z+1)*2+1],A=-(w-x),O=m-T,C=Math.sqrt(A*A+O*O),A/=C,O/=C,A*=y,O*=y,L=-(x-I),R=T-E,C=Math.sqrt(L*L+R*R),L/=C,R/=C,L*=y,R*=y;const nt=T-m,V=w-x,U=T-E,k=I-x,j=nt*U+V*k,G=V*U-k*nt,X=G<0;if(Math.abs(G)<.001*Math.abs(j)){d.push(T-A*M,x-O*M,T+A*F,x+O*F),j>=0&&(o.join===Sr.ROUND?c+=qn(T,x,T-A*M,x-O*M,T-L*M,x-R*M,d,!1)+4:c+=2,d.push(T-L*F,x-R*F,T+L*M,x+R*M));continue}const Y=(-A+m)*(-O+x)-(-A+T)*(-O+w),$=(-L+E)*(-R+x)-(-L+T)*(-R+I),W=(nt*$-U*Y)/G,et=(k*Y-V*$)/G,J=(W-T)*(W-T)+(et-x)*(et-x),it=T+(W-T)*M,lt=x+(et-x)*M,pt=T-(W-T)*F,yt=x-(et-x)*F,xt=Math.min(nt*nt+V*V,U*U+k*k),At=X?M:F,oe=xt+At*At*b,Ht=J<=oe;let rt=o.join;if(rt===Sr.MITER&&J/b>_&&(rt=Sr.BEVEL),Ht)switch(rt){case Sr.MITER:{d.push(it,lt,pt,yt);break}case Sr.BEVEL:{X?d.push(it,lt,T+A*F,x+O*F,it,lt,T+L*F,x+R*F):d.push(T-A*M,x-O*M,pt,yt,T-L*M,x-R*M,pt,yt),c+=2;break}case Sr.ROUND:{X?(d.push(it,lt,T+A*F,x+O*F),c+=qn(T,x,T+A*F,x+O*F,T+L*F,x+R*F,d,!0)+4,d.push(it,lt,T+L*F,x+R*F)):(d.push(T-A*M,x-O*M,pt,yt),c+=qn(T,x,T-A*M,x-O*M,T-L*M,x-R*M,d,!1)+4,d.push(T-L*M,x-R*M,pt,yt));break}}else{switch(d.push(T-A*M,x-O*M,T+A*F,x+O*F),rt){case Sr.MITER:{X?d.push(pt,yt,pt,yt):d.push(it,lt,it,lt),c+=2;break}case Sr.ROUND:{X?c+=qn(T,x,T+A*F,x+O*F,T+L*F,x+R*F,d,!0)+2:c+=qn(T,x,T-A*M,x-O*M,T-L*M,x-R*M,d,!1)+2;break}}d.push(T-L*M,x-R*M,T+L*F,x+R*F),c+=2}}m=n[(p-2)*2],w=n[(p-2)*2+1],T=n[(p-1)*2],x=n[(p-1)*2+1],A=-(w-x),O=m-T,C=Math.sqrt(A*A+O*O),A/=C,O/=C,A*=y,O*=y,d.push(T-A*M,x-O*M,T+A*F,x+O*F),f||(o.cap===jn.ROUND?c+=qn(T-A*(M-F)*.5,x-O*(M-F)*.5,T-A*M,x-O*M,T+A*F,x+O*F,d,!1)+2:o.cap===jn.SQUARE&&(c+=bp(T,x,A,O,M,F,!1,d)));const q=t.indices,Z=Si.epsilon*Si.epsilon;for(let z=v;z<c+v-2;++z)m=d[z*2],w=d[z*2+1],T=d[(z+1)*2],x=d[(z+1)*2+1],E=d[(z+2)*2],I=d[(z+2)*2+1],!(Math.abs(m*(x-I)+T*(I-w)+E*(w-x))<Z)&&q.push(z,z+1,z+2)}function JE(e,t){let r=0;const n=e.shape,i=e.points||n.points,o=n.type!==Ne.POLY||n.closeStroke;if(i.length===0)return;const a=t.points,u=t.indices,f=i.length/2,h=a.length/2;let d=h;for(a.push(i[0],i[1]),r=1;r<f;r++)a.push(i[r*2],i[r*2+1]),u.push(d,d+1),d++;o&&u.push(d,h)}function xp(e,t){e.lineStyle.native?JE(e,t):QE(e,t)}class Su{static curveLength(t,r,n,i,o,a){const u=t-2*n+o,f=r-2*i+a,h=2*n-2*t,d=2*i-2*r,p=4*(u*u+f*f),c=4*(u*h+f*d),v=h*h+d*d,y=2*Math.sqrt(p+c+v),b=Math.sqrt(p),_=2*p*b,m=2*Math.sqrt(v),w=c/b;return(_*y+b*c*(y-m)+(4*v*p-c*c)*Math.log((2*b+w+y)/(w+m)))/(4*_)}static curveTo(t,r,n,i,o){const a=o[o.length-2],u=o[o.length-1],f=Si._segmentsCount(Su.curveLength(a,u,t,r,n,i));let h=0,d=0;for(let p=1;p<=f;++p){const c=p/f;h=a+(t-a)*c,d=u+(r-u)*c,o.push(h+(t+(n-t)*c-h)*c,d+(r+(i-r)*c-d)*c)}}}const Au={[Ne.POLY]:yp,[Ne.CIRC]:Lo,[Ne.ELIP]:Lo,[Ne.RECT]:KE,[Ne.RREC]:YE},wp=[],Fo=[];class Ou{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}clear(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}getRectangle(t){return this.minX>this.maxX||this.minY>this.maxY?ne.EMPTY:(t=t||new ne(0,0,1,1),t.x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)}addPoint(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)}addPointMatrix(t,r){const{a:n,b:i,c:o,d:a,tx:u,ty:f}=t,h=n*r.x+o*r.y+u,d=i*r.x+a*r.y+f;this.minX=Math.min(this.minX,h),this.maxX=Math.max(this.maxX,h),this.minY=Math.min(this.minY,d),this.maxY=Math.max(this.maxY,d)}addQuad(t){let r=this.minX,n=this.minY,i=this.maxX,o=this.maxY,a=t[0],u=t[1];r=a<r?a:r,n=u<n?u:n,i=a>i?a:i,o=u>o?u:o,a=t[2],u=t[3],r=a<r?a:r,n=u<n?u:n,i=a>i?a:i,o=u>o?u:o,a=t[4],u=t[5],r=a<r?a:r,n=u<n?u:n,i=a>i?a:i,o=u>o?u:o,a=t[6],u=t[7],r=a<r?a:r,n=u<n?u:n,i=a>i?a:i,o=u>o?u:o,this.minX=r,this.minY=n,this.maxX=i,this.maxY=o}addFrame(t,r,n,i,o){this.addFrameMatrix(t.worldTransform,r,n,i,o)}addFrameMatrix(t,r,n,i,o){const a=t.a,u=t.b,f=t.c,h=t.d,d=t.tx,p=t.ty;let c=this.minX,v=this.minY,y=this.maxX,b=this.maxY,_=a*r+f*n+d,m=u*r+h*n+p;c=_<c?_:c,v=m<v?m:v,y=_>y?_:y,b=m>b?m:b,_=a*i+f*n+d,m=u*i+h*n+p,c=_<c?_:c,v=m<v?m:v,y=_>y?_:y,b=m>b?m:b,_=a*r+f*o+d,m=u*r+h*o+p,c=_<c?_:c,v=m<v?m:v,y=_>y?_:y,b=m>b?m:b,_=a*i+f*o+d,m=u*i+h*o+p,c=_<c?_:c,v=m<v?m:v,y=_>y?_:y,b=m>b?m:b,this.minX=c,this.minY=v,this.maxX=y,this.maxY=b}addVertexData(t,r,n){let i=this.minX,o=this.minY,a=this.maxX,u=this.maxY;for(let f=r;f<n;f+=2){const h=t[f],d=t[f+1];i=h<i?h:i,o=d<o?d:o,a=h>a?h:a,u=d>u?d:u}this.minX=i,this.minY=o,this.maxX=a,this.maxY=u}addVertices(t,r,n,i){this.addVerticesMatrix(t.worldTransform,r,n,i)}addVerticesMatrix(t,r,n,i,o=0,a=o){const u=t.a,f=t.b,h=t.c,d=t.d,p=t.tx,c=t.ty;let v=this.minX,y=this.minY,b=this.maxX,_=this.maxY;for(let m=n;m<i;m+=2){const w=r[m],T=r[m+1],x=u*w+h*T+p,E=d*T+f*w+c;v=Math.min(v,x-o),b=Math.max(b,x+o),y=Math.min(y,E-a),_=Math.max(_,E+a)}this.minX=v,this.minY=y,this.maxX=b,this.maxY=_}addBounds(t){const r=this.minX,n=this.minY,i=this.maxX,o=this.maxY;this.minX=t.minX<r?t.minX:r,this.minY=t.minY<n?t.minY:n,this.maxX=t.maxX>i?t.maxX:i,this.maxY=t.maxY>o?t.maxY:o}addBoundsMask(t,r){const n=t.minX>r.minX?t.minX:r.minX,i=t.minY>r.minY?t.minY:r.minY,o=t.maxX<r.maxX?t.maxX:r.maxX,a=t.maxY<r.maxY?t.maxY:r.maxY;if(n<=o&&i<=a){const u=this.minX,f=this.minY,h=this.maxX,d=this.maxY;this.minX=n<u?n:u,this.minY=i<f?i:f,this.maxX=o>h?o:h,this.maxY=a>d?a:d}}addBoundsMatrix(t,r){this.addFrameMatrix(r,t.minX,t.minY,t.maxX,t.maxY)}addBoundsArea(t,r){const n=t.minX>r.x?t.minX:r.x,i=t.minY>r.y?t.minY:r.y,o=t.maxX<r.x+r.width?t.maxX:r.x+r.width,a=t.maxY<r.y+r.height?t.maxY:r.y+r.height;if(n<=o&&i<=a){const u=this.minX,f=this.minY,h=this.maxX,d=this.maxY;this.minX=n<u?n:u,this.minY=i<f?i:f,this.maxX=o>h?o:h,this.maxY=a>d?a:d}}pad(t=0,r=t){this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=r,this.maxY+=r)}addFramePad(t,r,n,i,o,a){t-=o,r-=a,n+=o,i+=a,this.minX=this.minX<t?this.minX:t,this.maxX=this.maxX>n?this.maxX:n,this.minY=this.minY<r?this.minY:r,this.maxY=this.maxY>i?this.maxY:i}}class Ai extends Vs{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new su,this.alpha=1,this.visible=!0,this.renderable=!0,this.cullable=!1,this.cullArea=null,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new Ou,this._localBounds=null,this._boundsID=0,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._maskRefCount=0,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}static mixin(t){const r=Object.keys(t);for(let n=0;n<r.length;++n){const i=r[n];Object.defineProperty(Ai.prototype,i,Object.getOwnPropertyDescriptor(t,i))}}get destroyed(){return this._destroyed}_recursivePostUpdateTransform(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)}updateTransform(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha}getBounds(t,r){return t||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._bounds.updateID!==this._boundsID&&(this.calculateBounds(),this._bounds.updateID=this._boundsID),r||(this._boundsRect||(this._boundsRect=new ne),r=this._boundsRect),this._bounds.getRectangle(r)}getLocalBounds(t){t||(this._localBoundsRect||(this._localBoundsRect=new ne),t=this._localBoundsRect),this._localBounds||(this._localBounds=new Ou);const r=this.transform,n=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;const i=this._bounds,o=this._boundsID;this._bounds=this._localBounds;const a=this.getBounds(!1,t);return this.parent=n,this.transform=r,this._bounds=i,this._bounds.updateID+=this._boundsID-o,a}toGlobal(t,r,n=!1){return n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(t,r)}toLocal(t,r,n,i){return r&&(t=r.toGlobal(t,n,i)),i||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,n)}setParent(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t}removeFromParent(){var t;(t=this.parent)==null||t.removeChild(this)}setTransform(t=0,r=0,n=1,i=1,o=0,a=0,u=0,f=0,h=0){return this.position.x=t,this.position.y=r,this.scale.x=n||1,this.scale.y=i||1,this.rotation=o,this.skew.x=a,this.skew.y=u,this.pivot.x=f,this.pivot.y=h,this}destroy(t){this.removeFromParent(),this._destroyed=!0,this.transform=null,this.parent=null,this._bounds=null,this.mask=null,this.cullArea=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.eventMode="auto",this.interactiveChildren=!1,this.emit("destroyed"),this.removeAllListeners()}get _tempDisplayObjectParent(){return this.tempDisplayObjectParent===null&&(this.tempDisplayObjectParent=new t2),this.tempDisplayObjectParent}enableTempParent(){const t=this.parent;return this.parent=this._tempDisplayObjectParent,t}disableTempParent(t){this.parent=t}get x(){return this.position.x}set x(t){this.transform.position.x=t}get y(){return this.position.y}set y(t){this.transform.position.y=t}get worldTransform(){return this.transform.worldTransform}get localTransform(){return this.transform.localTransform}get position(){return this.transform.position}set position(t){this.transform.position.copyFrom(t)}get scale(){return this.transform.scale}set scale(t){this.transform.scale.copyFrom(t)}get pivot(){return this.transform.pivot}set pivot(t){this.transform.pivot.copyFrom(t)}get skew(){return this.transform.skew}set skew(t){this.transform.skew.copyFrom(t)}get rotation(){return this.transform.rotation}set rotation(t){this.transform.rotation=t}get angle(){return this.transform.rotation*pw}set angle(t){this.transform.rotation=t*fs}get zIndex(){return this._zIndex}set zIndex(t){this._zIndex=t,this.parent&&(this.parent.sortDirty=!0)}get worldVisible(){let t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0}get mask(){return this._mask}set mask(t){if(this._mask!==t){if(this._mask){const r=this._mask.isMaskData?this._mask.maskObject:this._mask;r&&(r._maskRefCount--,r._maskRefCount===0&&(r.renderable=!0,r.isMask=!1))}if(this._mask=t,this._mask){const r=this._mask.isMaskData?this._mask.maskObject:this._mask;r&&(r._maskRefCount===0&&(r.renderable=!1,r.isMask=!0),r._maskRefCount++)}}}}class t2 extends Ai{constructor(){super(...arguments),this.sortDirty=null}}Ai.prototype.displayObjectUpdateTransform=Ai.prototype.updateTransform;const e2=new $e;function r2(e,t){return e.zIndex===t.zIndex?e._lastSortedIndex-t._lastSortedIndex:e.zIndex-t.zIndex}const Cu=class extends Ai{constructor(){super(),this.children=[],this.sortableChildren=Cu.defaultSortableChildren,this.sortDirty=!1}onChildrenChange(e){}addChild(...e){if(e.length>1)for(let t=0;t<e.length;t++)this.addChild(e[t]);else{const t=e[0];t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.push(t),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",t,this,this.children.length-1),t.emit("added",this)}return e[0]}addChildAt(e,t){if(t<0||t>this.children.length)throw new Error(`${e}addChildAt: The index ${t} supplied is out of bounds ${this.children.length}`);return e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.splice(t,0,e),this._boundsID++,this.onChildrenChange(t),e.emit("added",this),this.emit("childAdded",e,this,t),e}swapChildren(e,t){if(e===t)return;const r=this.getChildIndex(e),n=this.getChildIndex(t);this.children[r]=t,this.children[n]=e,this.onChildrenChange(r<n?r:n)}getChildIndex(e){const t=this.children.indexOf(e);if(t===-1)throw new Error("The supplied DisplayObject must be a child of the caller");return t}setChildIndex(e,t){if(t<0||t>=this.children.length)throw new Error(`The index ${t} supplied is out of bounds ${this.children.length}`);const r=this.getChildIndex(e);fo(this.children,r,1),this.children.splice(t,0,e),this.onChildrenChange(t)}getChildAt(e){if(e<0||e>=this.children.length)throw new Error(`getChildAt: Index (${e}) does not exist.`);return this.children[e]}removeChild(...e){if(e.length>1)for(let t=0;t<e.length;t++)this.removeChild(e[t]);else{const t=e[0],r=this.children.indexOf(t);if(r===-1)return null;t.parent=null,t.transform._parentID=-1,fo(this.children,r,1),this._boundsID++,this.onChildrenChange(r),t.emit("removed",this),this.emit("childRemoved",t,this,r)}return e[0]}removeChildAt(e){const t=this.getChildAt(e);return t.parent=null,t.transform._parentID=-1,fo(this.children,e,1),this._boundsID++,this.onChildrenChange(e),t.emit("removed",this),this.emit("childRemoved",t,this,e),t}removeChildren(e=0,t=this.children.length){const r=e,n=t,i=n-r;let o;if(i>0&&i<=n){o=this.children.splice(r,i);for(let a=0;a<o.length;++a)o[a].parent=null,o[a].transform&&(o[a].transform._parentID=-1);this._boundsID++,this.onChildrenChange(e);for(let a=0;a<o.length;++a)o[a].emit("removed",this),this.emit("childRemoved",o[a],this,a);return o}else if(i===0&&this.children.length===0)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")}sortChildren(){let e=!1;for(let t=0,r=this.children.length;t<r;++t){const n=this.children[t];n._lastSortedIndex=t,!e&&n.zIndex!==0&&(e=!0)}e&&this.children.length>1&&this.children.sort(r2),this.sortDirty=!1}updateTransform(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(let e=0,t=this.children.length;e<t;++e){const r=this.children[e];r.visible&&r.updateTransform()}}calculateBounds(){this._bounds.clear(),this._calculateBounds();for(let e=0;e<this.children.length;e++){const t=this.children[e];if(!(!t.visible||!t.renderable))if(t.calculateBounds(),t._mask){const r=t._mask.isMaskData?t._mask.maskObject:t._mask;r?(r.calculateBounds(),this._bounds.addBoundsMask(t._bounds,r._bounds)):this._bounds.addBounds(t._bounds)}else t.filterArea?this._bounds.addBoundsArea(t._bounds,t.filterArea):this._bounds.addBounds(t._bounds)}this._bounds.updateID=this._boundsID}getLocalBounds(e,t=!1){const r=super.getLocalBounds(e);if(!t)for(let n=0,i=this.children.length;n<i;++n){const o=this.children[n];o.visible&&o.updateTransform()}return r}_calculateBounds(){}_renderWithCulling(e){const t=e.renderTexture.sourceFrame;if(!(t.width>0&&t.height>0))return;let r,n;this.cullArea?(r=this.cullArea,n=this.worldTransform):this._render!==Cu.prototype._render&&(r=this.getBounds(!0));const i=e.projection.transform;if(i&&(n?(n=e2.copyFrom(n),n.prepend(i)):n=i),r&&t.intersects(r,n))this._render(e);else if(this.cullArea)return;for(let o=0,a=this.children.length;o<a;++o){const u=this.children[o],f=u.cullable;u.cullable=f||!this.cullArea,u.render(e),u.cullable=f}}render(e){var t;if(!(!this.visible||this.worldAlpha<=0||!this.renderable))if(this._mask||(t=this.filters)!=null&&t.length)this.renderAdvanced(e);else if(this.cullable)this._renderWithCulling(e);else{this._render(e);for(let r=0,n=this.children.length;r<n;++r)this.children[r].render(e)}}renderAdvanced(e){var i,o,a;const t=this.filters,r=this._mask;if(t){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(let u=0;u<t.length;u++)t[u].enabled&&this._enabledFilters.push(t[u])}const n=t&&((i=this._enabledFilters)==null?void 0:i.length)||r&&(!r.isMaskData||r.enabled&&(r.autoDetect||r.type!==Ee.NONE));if(n&&e.batch.flush(),t&&((o=this._enabledFilters)!=null&&o.length)&&e.filter.push(this,this._enabledFilters),r&&e.mask.push(this,this._mask),this.cullable)this._renderWithCulling(e);else{this._render(e);for(let u=0,f=this.children.length;u<f;++u)this.children[u].render(e)}n&&e.batch.flush(),r&&e.mask.pop(this),t&&((a=this._enabledFilters)!=null&&a.length)&&e.filter.pop()}_render(e){}destroy(e){super.destroy(),this.sortDirty=!1;const t=typeof e=="boolean"?e:e==null?void 0:e.children,r=this.removeChildren(0,this.children.length);if(t)for(let n=0;n<r.length;++n)r[n].destroy(e)}get width(){return this.scale.x*this.getLocalBounds().width}set width(e){const t=this.getLocalBounds().width;t!==0?this.scale.x=e/t:this.scale.x=1,this._width=e}get height(){return this.scale.y*this.getLocalBounds().height}set height(e){const t=this.getLocalBounds().height;t!==0?this.scale.y=e/t:this.scale.y=1,this._height=e}};let Oi=Cu;Oi.defaultSortableChildren=!1,Oi.prototype.containerUpdateTransform=Oi.prototype.updateTransform,Object.defineProperties(Dt,{SORTABLE_CHILDREN:{get(){return Oi.defaultSortableChildren},set(e){zt("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),Oi.defaultSortableChildren=e}}});class Bo{constructor(t,r=null,n=null,i=null){this.points=[],this.holes=[],this.shape=t,this.lineStyle=n,this.fillStyle=r,this.matrix=i,this.type=t.type}clone(){return new Bo(this.shape,this.fillStyle,this.lineStyle,this.matrix)}destroy(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null}}const Ci=new se,Tp=class extends ed{constructor(){super(),this.closePointEps=1e-4,this.boundsPadding=0,this.uvsFloat32=null,this.indicesUint16=null,this.batchable=!1,this.points=[],this.colors=[],this.uvs=[],this.indices=[],this.textureIds=[],this.graphicsData=[],this.drawCalls=[],this.batchDirty=-1,this.batches=[],this.dirty=0,this.cacheDirty=-1,this.clearDirty=0,this.shapeIndex=0,this._bounds=new Ou,this.boundsDirty=-1}get bounds(){return this.updateBatches(),this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds}invalidate(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(let e=0;e<this.drawCalls.length;e++)this.drawCalls[e].texArray.clear(),Fo.push(this.drawCalls[e]);this.drawCalls.length=0;for(let e=0;e<this.batches.length;e++){const t=this.batches[e];t.reset(),wp.push(t)}this.batches.length=0}clear(){return this.graphicsData.length>0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(e,t=null,r=null,n=null){const i=new Bo(e,t,r,n);return this.graphicsData.push(i),this.dirty++,this}drawHole(e,t=null){if(!this.graphicsData.length)return null;const r=new Bo(e,null,null,t),n=this.graphicsData[this.graphicsData.length-1];return r.lineStyle=n.lineStyle,n.holes.push(r),this.dirty++,this}destroy(){super.destroy();for(let e=0;e<this.graphicsData.length;++e)this.graphicsData[e].destroy();this.points.length=0,this.points=null,this.colors.length=0,this.colors=null,this.uvs.length=0,this.uvs=null,this.indices.length=0,this.indices=null,this.indexBuffer.destroy(),this.indexBuffer=null,this.graphicsData.length=0,this.graphicsData=null,this.drawCalls.length=0,this.drawCalls=null,this.batches.length=0,this.batches=null,this._bounds=null}containsPoint(e){const t=this.graphicsData;for(let r=0;r<t.length;++r){const n=t[r];if(n.fillStyle.visible&&n.shape&&(n.matrix?n.matrix.applyInverse(e,Ci):Ci.copyFrom(e),n.shape.contains(Ci.x,Ci.y))){let i=!1;if(n.holes){for(let o=0;o<n.holes.length;o++)if(n.holes[o].shape.contains(Ci.x,Ci.y)){i=!0;break}}if(!i)return!0}}return!1}updateBatches(){if(!this.graphicsData.length){this.batchable=!0;return}if(!this.validateBatching())return;this.cacheDirty=this.dirty;const e=this.uvs,t=this.graphicsData;let r=null,n=null;this.batches.length>0&&(r=this.batches[this.batches.length-1],n=r.style);for(let u=this.shapeIndex;u<t.length;u++){this.shapeIndex++;const f=t[u],h=f.fillStyle,d=f.lineStyle;Au[f.type].build(f),f.matrix&&this.transformPoints(f.points,f.matrix),(h.visible||d.visible)&&this.processHoles(f.holes);for(let c=0;c<2;c++){const v=c===0?h:d;if(!v.visible)continue;const y=v.texture.baseTexture,b=this.indices.length,_=this.points.length/2;y.wrapMode=Qi.REPEAT,c===0?this.processFill(f):this.processLine(f);const m=this.points.length/2-_;m!==0&&(r&&!this._compareStyles(n,v)&&(r.end(b,_),r=null),r||(r=wp.pop()||new ZE,r.begin(v,b,_),this.batches.push(r),n=v),this.addUvs(this.points,e,v.texture,_,m,v.matrix))}}const i=this.indices.length,o=this.points.length/2;if(r&&r.end(i,o),this.batches.length===0){this.batchable=!0;return}const a=o>65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&a===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=a?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(e,t){return!(!e||!t||e.texture.baseTexture!==t.texture.baseTexture||e.color+e.alpha!==t.color+t.alpha||!!e.native!=!!t.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let e=0,t=this.graphicsData.length;e<t;e++){const r=this.graphicsData[e],n=r.fillStyle,i=r.lineStyle;if(n&&!n.texture.baseTexture.valid||i&&!i.texture.baseTexture.valid)return!1}return!0}packBatches(){this.batchDirty++,this.uvsFloat32=new Float32Array(this.uvs);const e=this.batches;for(let t=0,r=e.length;t<r;t++){const n=e[t];for(let i=0;i<n.size;i++){const o=n.start+i;this.indicesUint16[o]=this.indicesUint16[o]-n.attribStart}}}isBatchable(){if(this.points.length>65535*2)return!1;const e=this.batches;for(let t=0;t<e.length;t++)if(e[t].style.native)return!1;return this.points.length<Tp.BATCHABLE_SIZE*2}buildDrawCalls(){let e=++Kt._globalBatch;for(let d=0;d<this.drawCalls.length;d++)this.drawCalls[d].texArray.clear(),Fo.push(this.drawCalls[d]);this.drawCalls.length=0;const t=this.colors,r=this.textureIds;let n=Fo.pop();n||(n=new eu,n.texArray=new au),n.texArray.count=0,n.start=0,n.size=0,n.type=an.TRIANGLES;let i=0,o=null,a=0,u=!1,f=an.TRIANGLES,h=0;this.drawCalls.push(n);for(let d=0;d<this.batches.length;d++){const p=this.batches[d],c=8,v=p.style,y=v.texture.baseTexture;u!==!!v.native&&(u=!!v.native,f=u?an.LINES:an.TRIANGLES,o=null,i=c,e++),o!==y&&(o=y,y._batchEnabled!==e&&(i===c&&(e++,i=0,n.size>0&&(n=Fo.pop(),n||(n=new eu,n.texArray=new au),this.drawCalls.push(n)),n.start=h,n.size=0,n.texArray.count=0,n.type=f),y.touched=1,y._batchEnabled=e,y._batchLocation=i,y.wrapMode=Qi.REPEAT,n.texArray.elements[n.texArray.count++]=y,i++)),n.size+=p.size,h+=p.size,a=y._batchLocation,this.addColors(t,v.color,v.alpha,p.attribSize,p.attribStart),this.addTextureIds(r,a,p.attribSize,p.attribStart)}Kt._globalBatch=e,this.packAttributes()}packAttributes(){const e=this.points,t=this.uvs,r=this.colors,n=this.textureIds,i=new ArrayBuffer(e.length*3*4),o=new Float32Array(i),a=new Uint32Array(i);let u=0;for(let f=0;f<e.length/2;f++)o[u++]=e[f*2],o[u++]=e[f*2+1],o[u++]=t[f*2],o[u++]=t[f*2+1],a[u++]=r[f],o[u++]=n[f];this._buffer.update(i),this._indexBuffer.update(this.indicesUint16)}processFill(e){e.holes.length?yp.triangulate(e,this):Au[e.type].triangulate(e,this)}processLine(e){xp(e,this);for(let t=0;t<e.holes.length;t++)xp(e.holes[t],this)}processHoles(e){for(let t=0;t<e.length;t++){const r=e[t];Au[r.type].build(r),r.matrix&&this.transformPoints(r.points,r.matrix)}}calculateBounds(){const e=this._bounds;e.clear(),e.addVertexData(this.points,0,this.points.length),e.pad(this.boundsPadding,this.boundsPadding)}transformPoints(e,t){for(let r=0;r<e.length/2;r++){const n=e[r*2],i=e[r*2+1];e[r*2]=t.a*n+t.c*i+t.tx,e[r*2+1]=t.b*n+t.d*i+t.ty}}addColors(e,t,r,n,i=0){const o=Be.shared.setValue(t).toLittleEndianNumber(),a=Be.shared.setValue(o).toPremultiplied(r);e.length=Math.max(e.length,i+n);for(let u=0;u<n;u++)e[i+u]=a}addTextureIds(e,t,r,n=0){e.length=Math.max(e.length,n+r);for(let i=0;i<r;i++)e[n+i]=t}addUvs(e,t,r,n,i,o=null){let a=0;const u=t.length,f=r.frame;for(;a<i;){let d=e[(n+a)*2],p=e[(n+a)*2+1];if(o){const c=o.a*d+o.c*p+o.tx;p=o.b*d+o.d*p+o.ty,d=c}a++,t.push(d/f.width,p/f.height)}const h=r.baseTexture;(f.width<h.width||f.height<h.height)&&this.adjustUvs(t,r,u,i)}adjustUvs(e,t,r,n){const i=t.baseTexture,o=1e-6,a=r+n*2,u=t.frame,f=u.width/i.width,h=u.height/i.height;let d=u.x/u.width,p=u.y/u.height,c=Math.floor(e[r]+o),v=Math.floor(e[r+1]+o);for(let y=r+2;y<a;y+=2)c=Math.min(c,Math.floor(e[y]+o)),v=Math.min(v,Math.floor(e[y+1]+o));d-=c,p-=v;for(let y=r;y<a;y+=2)e[y]=(e[y]+d)*f,e[y+1]=(e[y+1]+p)*h}};let Ep=Tp;Ep.BATCHABLE_SIZE=100;class Do{constructor(){this.color=16777215,this.alpha=1,this.texture=Wt.WHITE,this.matrix=null,this.visible=!1,this.reset()}clone(){const t=new Do;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t}reset(){this.color=16777215,this.alpha=1,this.texture=Wt.WHITE,this.matrix=null,this.visible=!1}destroy(){this.texture=null,this.matrix=null}}class Ru extends Do{constructor(){super(...arguments),this.width=0,this.alignment=.5,this.native=!1,this.cap=jn.BUTT,this.join=Sr.MITER,this.miterLimit=10}clone(){const t=new Ru;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t.width=this.width,t.alignment=this.alignment,t.native=this.native,t.cap=this.cap,t.join=this.join,t.miterLimit=this.miterLimit,t}reset(){super.reset(),this.color=0,this.alignment=.5,this.width=0,this.native=!1}}const Iu={},Uo=class extends Oi{constructor(e=null){super(),this.shader=null,this.pluginName="batch",this.currentPath=null,this.batches=[],this.batchTint=-1,this.batchDirty=-1,this.vertexData=null,this._fillStyle=new Do,this._lineStyle=new Ru,this._matrix=null,this._holeMode=!1,this.state=ho.for2d(),this._geometry=e||new Ep,this._geometry.refCount++,this._transformID=-1,this._tintColor=new Be(16777215),this.blendMode=Rt.NORMAL}get geometry(){return this._geometry}clone(){return this.finishPoly(),new Uo(this._geometry)}set blendMode(e){this.state.blendMode=e}get blendMode(){return this.state.blendMode}get tint(){return this._tintColor.value}set tint(e){this._tintColor.setValue(e)}get fill(){return this._fillStyle}get line(){return this._lineStyle}lineStyle(e=null,t=0,r,n=.5,i=!1){return typeof e=="number"&&(e={width:e,color:t,alpha:r,alignment:n,native:i}),this.lineTextureStyle(e)}lineTextureStyle(e){const t={width:0,texture:Wt.WHITE,color:e!=null&&e.texture?16777215:0,matrix:null,alignment:.5,native:!1,cap:jn.BUTT,join:Sr.MITER,miterLimit:10};e=Object.assign(t,e),this.normalizeColor(e),this.currentPath&&this.startPoly();const r=e.width>0&&e.alpha>0;return r?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._lineStyle,{visible:r},e)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const e=this.currentPath.points,t=this.currentPath.points.length;t>2&&(this.drawShape(this.currentPath),this.currentPath=new cs,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[t-2],e[t-1]))}else this.currentPath=new cs,this.currentPath.closeStroke=!1}finishPoly(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)}moveTo(e,t){return this.startPoly(),this.currentPath.points[0]=e,this.currentPath.points[1]=t,this}lineTo(e,t){this.currentPath||this.moveTo(0,0);const r=this.currentPath.points,n=r[r.length-2],i=r[r.length-1];return(n!==e||i!==t)&&r.push(e,t),this}_initCurve(e=0,t=0){this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[e,t]):this.moveTo(e,t)}quadraticCurveTo(e,t,r,n){this._initCurve();const i=this.currentPath.points;return i.length===0&&this.moveTo(0,0),Su.curveTo(e,t,r,n,i),this}bezierCurveTo(e,t,r,n,i,o){return this._initCurve(),Eu.curveTo(e,t,r,n,i,o,this.currentPath.points),this}arcTo(e,t,r,n,i){this._initCurve(e,t);const o=this.currentPath.points,a=_p.curveTo(e,t,r,n,i,o);if(a){const{cx:u,cy:f,radius:h,startAngle:d,endAngle:p,anticlockwise:c}=a;this.arc(u,f,h,d,p,c)}return this}arc(e,t,r,n,i,o=!1){if(n===i)return this;if(!o&&i<=n?i+=vo:o&&n<=i&&(n+=vo),i-n===0)return this;const u=e+Math.cos(n)*r,f=t+Math.sin(n)*r,h=this._geometry.closePointEps;let d=this.currentPath?this.currentPath.points:null;if(d){const p=Math.abs(d[d.length-2]-u),c=Math.abs(d[d.length-1]-f);p<h&&c<h||d.push(u,f)}else this.moveTo(u,f),d=this.currentPath.points;return _p.arc(u,f,e,t,r,n,i,o,d),this}beginFill(e=0,t){return this.beginTextureFill({texture:Wt.WHITE,color:e,alpha:t})}normalizeColor(e){const t=Be.shared.setValue(e.color??0);e.color=t.toNumber(),e.alpha??(e.alpha=t.alpha)}beginTextureFill(e){const t={texture:Wt.WHITE,color:16777215,matrix:null};e=Object.assign(t,e),this.normalizeColor(e),this.currentPath&&this.startPoly();const r=e.alpha>0;return r?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._fillStyle,{visible:r},e)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(e,t,r,n){return this.drawShape(new ne(e,t,r,n))}drawRoundedRect(e,t,r,n,i){return this.drawShape(new nu(e,t,r,n,i))}drawCircle(e,t,r){return this.drawShape(new ru(e,t,r))}drawEllipse(e,t,r,n){return this.drawShape(new vw(e,t,r,n))}drawPolygon(...e){let t,r=!0;const n=e[0];n.points?(r=n.closeStroke,t=n.points):Array.isArray(e[0])?t=e[0]:t=e;const i=new cs(t);return i.closeStroke=r,this.drawShape(i),this}drawShape(e){return this._holeMode?this._geometry.drawHole(e,this._matrix):this._geometry.drawShape(e,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this}clear(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this}isFastRect(){const e=this._geometry.graphicsData;return e.length===1&&e[0].shape.type===Ne.RECT&&!e[0].matrix&&!e[0].holes.length&&!(e[0].lineStyle.visible&&e[0].lineStyle.width)}_render(e){this.finishPoly();const t=this._geometry;t.updateBatches(),t.batchable?(this.batchDirty!==t.batchDirty&&this._populateBatches(),this._renderBatched(e)):(e.batch.flush(),this._renderDirect(e))}_populateBatches(){const e=this._geometry,t=this.blendMode,r=e.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=e.batchDirty,this.batches.length=r,this.vertexData=new Float32Array(e.points);for(let n=0;n<r;n++){const i=e.batches[n],o=i.style.color,a=new Float32Array(this.vertexData.buffer,i.attribStart*4*2,i.attribSize*2),u=new Float32Array(e.uvsFloat32.buffer,i.attribStart*4*2,i.attribSize*2),f=new Uint16Array(e.indicesUint16.buffer,i.start*2,i.size),h={vertexData:a,blendMode:t,indices:f,uvs:u,_batchRGB:Be.shared.setValue(o).toRgbArray(),_tintRGB:o,_texture:i.style.texture,alpha:i.style.alpha,worldAlpha:1};this.batches[n]=h}}_renderBatched(e){if(this.batches.length){e.batch.setObjectRenderer(e.plugins[this.pluginName]),this.calculateVertices(),this.calculateTints();for(let t=0,r=this.batches.length;t<r;t++){const n=this.batches[t];n.worldAlpha=this.worldAlpha*n.alpha,e.plugins[this.pluginName].render(n)}}}_renderDirect(e){const t=this._resolveDirectShader(e),r=this._geometry,n=this.worldAlpha,i=t.uniforms,o=r.drawCalls;i.translationMatrix=this.transform.worldTransform,Be.shared.setValue(this._tintColor).premultiply(n).toArray(i.tint),e.shader.bind(t),e.geometry.bind(r,t),e.state.set(this.state);for(let a=0,u=o.length;a<u;a++)this._renderDrawCallDirect(e,r.drawCalls[a])}_renderDrawCallDirect(e,t){const{texArray:r,type:n,size:i,start:o}=t,a=r.count;for(let u=0;u<a;u++)e.texture.bind(r.elements[u],u);e.geometry.draw(n,i,o)}_resolveDirectShader(e){let t=this.shader;const r=this.pluginName;if(!t){if(!Iu[r]){const{maxTextures:n}=e.plugins[r],i=new Int32Array(n);for(let u=0;u<n;u++)i[u]=u;const o={tint:new Float32Array([1,1,1,1]),translationMatrix:new $e,default:br.from({uSamplers:i},!0)},a=e.plugins[r]._shader.program;Iu[r]=new ds(a,o)}t=Iu[r]}return t}_calculateBounds(){this.finishPoly();const e=this._geometry;if(!e.graphicsData.length)return;const{minX:t,minY:r,maxX:n,maxY:i}=e.bounds;this._bounds.addFrame(this.transform,t,r,n,i)}containsPoint(e){return this.worldTransform.applyInverse(e,Uo._TEMP_POINT),this._geometry.containsPoint(Uo._TEMP_POINT)}calculateTints(){if(this.batchTint!==this.tint){this.batchTint=this._tintColor.toNumber();for(let e=0;e<this.batches.length;e++){const t=this.batches[e];t._tintRGB=Be.shared.setValue(this._tintColor).multiply(t._batchRGB).toLittleEndianNumber()}}}calculateVertices(){const e=this.transform._worldID;if(this._transformID===e)return;this._transformID=e;const t=this.transform.worldTransform,r=t.a,n=t.b,i=t.c,o=t.d,a=t.tx,u=t.ty,f=this._geometry.points,h=this.vertexData;let d=0;for(let p=0;p<f.length;p+=2){const c=f[p],v=f[p+1];h[d++]=r*c+i*v+a,h[d++]=o*v+n*c+u}}closePath(){const e=this.currentPath;return e&&(e.closeStroke=!0,this.finishPoly()),this}setMatrix(e){return this._matrix=e,this}beginHole(){return this.finishPoly(),this._holeMode=!0,this}endHole(){return this.finishPoly(),this._holeMode=!1,this}destroy(e){this._geometry.refCount--,this._geometry.refCount===0&&this._geometry.dispose(),this._matrix=null,this.currentPath=null,this._lineStyle.destroy(),this._lineStyle=null,this._fillStyle.destroy(),this._fillStyle=null,this._geometry=null,this.shader=null,this.vertexData=null,this.batches.length=0,this.batches=null,super.destroy(e)}};let Pu=Uo;Pu.curves=Si,Pu._TEMP_POINT=new se;var n2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Nu={},i2={get exports(){return Nu},set exports(e){Nu=e}};/*!
1924
1924
  * d-path-parser - v1.0.0
1925
1925
  * by Massimo Artizzu (MaxArt2501)
1926
1926
  *
@@ -1938,15 +1938,15 @@ void main() {
1938
1938
  * Released under MIT license <https://lodash.com/license>
1939
1939
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
1940
1940
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1941
- */ta.exports,function(e,t){(function(){var r,n="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",u="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",h=500,d="__lodash_placeholder__",p=1,c=2,v=4,y=1,b=2,_=1,m=2,w=4,T=8,x=16,E=32,I=64,A=128,O=256,L=512,R=30,C="...",P=800,M=16,F=1,q=2,Z=3,z=1/0,nt=9007199254740991,V=17976931348623157e292,U=0/0,k=4294967295,j=k-1,G=k>>>1,X=[["ary",A],["bind",_],["bindKey",m],["curry",T],["curryRight",x],["flip",L],["partial",E],["partialRight",I],["rearg",O]],Y="[object Arguments]",$="[object Array]",W="[object AsyncFunction]",et="[object Boolean]",J="[object Date]",it="[object DOMException]",lt="[object Error]",pt="[object Function]",yt="[object GeneratorFunction]",xt="[object Map]",At="[object Number]",oe="[object Null]",qt="[object Object]",rt="[object Promise]",at="[object Proxy]",dt="[object RegExp]",vt="[object Set]",ct="[object String]",Pt="[object Symbol]",Lt="[object Undefined]",Nt="[object WeakMap]",He="[object WeakSet]",Ge="[object ArrayBuffer]",Qt="[object DataView]",Es="[object Float32Array]",he="[object Float64Array]",ur="[object Int8Array]",zu="[object Int16Array]",Hu="[object Int32Array]",Vu="[object Uint8Array]",Wu="[object Uint8ClampedArray]",Xu="[object Uint16Array]",Ku="[object Uint32Array]",TN=/\b__p \+= '';/g,EN=/\b(__p \+=) '' \+/g,SN=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Cv=/&(?:amp|lt|gt|quot|#39);/g,Rv=/[&<>"']/g,AN=RegExp(Cv.source),ON=RegExp(Rv.source),CN=/<%-([\s\S]+?)%>/g,RN=/<%([\s\S]+?)%>/g,Iv=/<%=([\s\S]+?)%>/g,IN=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,PN=/^\w*$/,NN=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yu=/[\\^$.*+?()[\]{}|]/g,MN=RegExp(Yu.source),Zu=/^\s+/,kN=/\s/,LN=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,FN=/\{\n\/\* \[wrapped with (.+)\] \*/,BN=/,? & /,DN=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,UN=/[()=,{}\[\]\/\s]/,$N=/\\(\\)?/g,GN=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Pv=/\w*$/,jN=/^[-+]0x[0-9a-f]+$/i,qN=/^0b[01]+$/i,zN=/^\[object .+?Constructor\]$/,HN=/^0o[0-7]+$/i,VN=/^(?:0|[1-9]\d*)$/,WN=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ea=/($^)/,XN=/['\n\r\u2028\u2029\\]/g,ra="\\ud800-\\udfff",KN="\\u0300-\\u036f",YN="\\ufe20-\\ufe2f",ZN="\\u20d0-\\u20ff",Nv=KN+YN+ZN,Mv="\\u2700-\\u27bf",kv="a-z\\xdf-\\xf6\\xf8-\\xff",QN="\\xac\\xb1\\xd7\\xf7",JN="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",tM="\\u2000-\\u206f",eM=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Lv="A-Z\\xc0-\\xd6\\xd8-\\xde",Fv="\\ufe0e\\ufe0f",Bv=QN+JN+tM+eM,Qu="['’]",rM="["+ra+"]",Dv="["+Bv+"]",na="["+Nv+"]",Uv="\\d+",nM="["+Mv+"]",$v="["+kv+"]",Gv="[^"+ra+Bv+Uv+Mv+kv+Lv+"]",Ju="\\ud83c[\\udffb-\\udfff]",iM="(?:"+na+"|"+Ju+")",jv="[^"+ra+"]",tf="(?:\\ud83c[\\udde6-\\uddff]){2}",ef="[\\ud800-\\udbff][\\udc00-\\udfff]",ki="["+Lv+"]",qv="\\u200d",zv="(?:"+$v+"|"+Gv+")",sM="(?:"+ki+"|"+Gv+")",Hv="(?:"+Qu+"(?:d|ll|m|re|s|t|ve))?",Vv="(?:"+Qu+"(?:D|LL|M|RE|S|T|VE))?",Wv=iM+"?",Xv="["+Fv+"]?",oM="(?:"+qv+"(?:"+[jv,tf,ef].join("|")+")"+Xv+Wv+")*",aM="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",lM="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Kv=Xv+Wv+oM,uM="(?:"+[nM,tf,ef].join("|")+")"+Kv,fM="(?:"+[jv+na+"?",na,tf,ef,rM].join("|")+")",cM=RegExp(Qu,"g"),hM=RegExp(na,"g"),rf=RegExp(Ju+"(?="+Ju+")|"+fM+Kv,"g"),dM=RegExp([ki+"?"+$v+"+"+Hv+"(?="+[Dv,ki,"$"].join("|")+")",sM+"+"+Vv+"(?="+[Dv,ki+zv,"$"].join("|")+")",ki+"?"+zv+"+"+Hv,ki+"+"+Vv,lM,aM,Uv,uM].join("|"),"g"),pM=RegExp("["+qv+ra+Nv+Fv+"]"),vM=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,gM=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],mM=-1,fe={};fe[Es]=fe[he]=fe[ur]=fe[zu]=fe[Hu]=fe[Vu]=fe[Wu]=fe[Xu]=fe[Ku]=!0,fe[Y]=fe[$]=fe[Ge]=fe[et]=fe[Qt]=fe[J]=fe[lt]=fe[pt]=fe[xt]=fe[At]=fe[qt]=fe[dt]=fe[vt]=fe[ct]=fe[Nt]=!1;var ae={};ae[Y]=ae[$]=ae[Ge]=ae[Qt]=ae[et]=ae[J]=ae[Es]=ae[he]=ae[ur]=ae[zu]=ae[Hu]=ae[xt]=ae[At]=ae[qt]=ae[dt]=ae[vt]=ae[ct]=ae[Pt]=ae[Vu]=ae[Wu]=ae[Xu]=ae[Ku]=!0,ae[lt]=ae[pt]=ae[Nt]=!1;var yM={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},_M={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},bM={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},xM={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},wM=parseFloat,TM=parseInt,Yv=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,EM=typeof self=="object"&&self&&self.Object===Object&&self,Me=Yv||EM||Function("return this")(),nf=t&&!t.nodeType&&t,Hn=nf&&!0&&e&&!e.nodeType&&e,Zv=Hn&&Hn.exports===nf,sf=Zv&&Yv.process,fr=function(){try{var Q=Hn&&Hn.require&&Hn.require("util").types;return Q||sf&&sf.binding&&sf.binding("util")}catch{}}(),Qv=fr&&fr.isArrayBuffer,Jv=fr&&fr.isDate,tg=fr&&fr.isMap,eg=fr&&fr.isRegExp,rg=fr&&fr.isSet,ng=fr&&fr.isTypedArray;function er(Q,ot,st){switch(st.length){case 0:return Q.call(ot);case 1:return Q.call(ot,st[0]);case 2:return Q.call(ot,st[0],st[1]);case 3:return Q.call(ot,st[0],st[1],st[2])}return Q.apply(ot,st)}function SM(Q,ot,st,bt){for(var It=-1,Yt=Q==null?0:Q.length;++It<Yt;){var Se=Q[It];ot(bt,Se,st(Se),Q)}return bt}function cr(Q,ot){for(var st=-1,bt=Q==null?0:Q.length;++st<bt&&ot(Q[st],st,Q)!==!1;);return Q}function AM(Q,ot){for(var st=Q==null?0:Q.length;st--&&ot(Q[st],st,Q)!==!1;);return Q}function ig(Q,ot){for(var st=-1,bt=Q==null?0:Q.length;++st<bt;)if(!ot(Q[st],st,Q))return!1;return!0}function vn(Q,ot){for(var st=-1,bt=Q==null?0:Q.length,It=0,Yt=[];++st<bt;){var Se=Q[st];ot(Se,st,Q)&&(Yt[It++]=Se)}return Yt}function ia(Q,ot){var st=Q==null?0:Q.length;return!!st&&Li(Q,ot,0)>-1}function of(Q,ot,st){for(var bt=-1,It=Q==null?0:Q.length;++bt<It;)if(st(ot,Q[bt]))return!0;return!1}function de(Q,ot){for(var st=-1,bt=Q==null?0:Q.length,It=Array(bt);++st<bt;)It[st]=ot(Q[st],st,Q);return It}function gn(Q,ot){for(var st=-1,bt=ot.length,It=Q.length;++st<bt;)Q[It+st]=ot[st];return Q}function af(Q,ot,st,bt){var It=-1,Yt=Q==null?0:Q.length;for(bt&&Yt&&(st=Q[++It]);++It<Yt;)st=ot(st,Q[It],It,Q);return st}function OM(Q,ot,st,bt){var It=Q==null?0:Q.length;for(bt&&It&&(st=Q[--It]);It--;)st=ot(st,Q[It],It,Q);return st}function lf(Q,ot){for(var st=-1,bt=Q==null?0:Q.length;++st<bt;)if(ot(Q[st],st,Q))return!0;return!1}var CM=uf("length");function RM(Q){return Q.split("")}function IM(Q){return Q.match(DN)||[]}function sg(Q,ot,st){var bt;return st(Q,function(It,Yt,Se){if(ot(It,Yt,Se))return bt=Yt,!1}),bt}function sa(Q,ot,st,bt){for(var It=Q.length,Yt=st+(bt?1:-1);bt?Yt--:++Yt<It;)if(ot(Q[Yt],Yt,Q))return Yt;return-1}function Li(Q,ot,st){return ot===ot?jM(Q,ot,st):sa(Q,og,st)}function PM(Q,ot,st,bt){for(var It=st-1,Yt=Q.length;++It<Yt;)if(bt(Q[It],ot))return It;return-1}function og(Q){return Q!==Q}function ag(Q,ot){var st=Q==null?0:Q.length;return st?cf(Q,ot)/st:U}function uf(Q){return function(ot){return ot==null?r:ot[Q]}}function ff(Q){return function(ot){return Q==null?r:Q[ot]}}function lg(Q,ot,st,bt,It){return It(Q,function(Yt,Se,ie){st=bt?(bt=!1,Yt):ot(st,Yt,Se,ie)}),st}function NM(Q,ot){var st=Q.length;for(Q.sort(ot);st--;)Q[st]=Q[st].value;return Q}function cf(Q,ot){for(var st,bt=-1,It=Q.length;++bt<It;){var Yt=ot(Q[bt]);Yt!==r&&(st=st===r?Yt:st+Yt)}return st}function hf(Q,ot){for(var st=-1,bt=Array(Q);++st<Q;)bt[st]=ot(st);return bt}function MM(Q,ot){return de(ot,function(st){return[st,Q[st]]})}function ug(Q){return Q&&Q.slice(0,dg(Q)+1).replace(Zu,"")}function rr(Q){return function(ot){return Q(ot)}}function df(Q,ot){return de(ot,function(st){return Q[st]})}function Ss(Q,ot){return Q.has(ot)}function fg(Q,ot){for(var st=-1,bt=Q.length;++st<bt&&Li(ot,Q[st],0)>-1;);return st}function cg(Q,ot){for(var st=Q.length;st--&&Li(ot,Q[st],0)>-1;);return st}function kM(Q,ot){for(var st=Q.length,bt=0;st--;)Q[st]===ot&&++bt;return bt}var LM=ff(yM),FM=ff(_M);function BM(Q){return"\\"+xM[Q]}function DM(Q,ot){return Q==null?r:Q[ot]}function Fi(Q){return pM.test(Q)}function UM(Q){return vM.test(Q)}function $M(Q){for(var ot,st=[];!(ot=Q.next()).done;)st.push(ot.value);return st}function pf(Q){var ot=-1,st=Array(Q.size);return Q.forEach(function(bt,It){st[++ot]=[It,bt]}),st}function hg(Q,ot){return function(st){return Q(ot(st))}}function mn(Q,ot){for(var st=-1,bt=Q.length,It=0,Yt=[];++st<bt;){var Se=Q[st];(Se===ot||Se===d)&&(Q[st]=d,Yt[It++]=st)}return Yt}function oa(Q){var ot=-1,st=Array(Q.size);return Q.forEach(function(bt){st[++ot]=bt}),st}function GM(Q){var ot=-1,st=Array(Q.size);return Q.forEach(function(bt){st[++ot]=[bt,bt]}),st}function jM(Q,ot,st){for(var bt=st-1,It=Q.length;++bt<It;)if(Q[bt]===ot)return bt;return-1}function qM(Q,ot,st){for(var bt=st+1;bt--;)if(Q[bt]===ot)return bt;return bt}function Bi(Q){return Fi(Q)?HM(Q):CM(Q)}function Rr(Q){return Fi(Q)?VM(Q):RM(Q)}function dg(Q){for(var ot=Q.length;ot--&&kN.test(Q.charAt(ot)););return ot}var zM=ff(bM);function HM(Q){for(var ot=rf.lastIndex=0;rf.test(Q);)++ot;return ot}function VM(Q){return Q.match(rf)||[]}function WM(Q){return Q.match(dM)||[]}var XM=function Q(ot){ot=ot==null?Me:Di.defaults(Me.Object(),ot,Di.pick(Me,gM));var st=ot.Array,bt=ot.Date,It=ot.Error,Yt=ot.Function,Se=ot.Math,ie=ot.Object,vf=ot.RegExp,KM=ot.String,hr=ot.TypeError,aa=st.prototype,YM=Yt.prototype,Ui=ie.prototype,la=ot["__core-js_shared__"],ua=YM.toString,ee=Ui.hasOwnProperty,ZM=0,pg=function(){var s=/[^.]+$/.exec(la&&la.keys&&la.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),fa=Ui.toString,QM=ua.call(ie),JM=Me._,t3=vf("^"+ua.call(ee).replace(Yu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ca=Zv?ot.Buffer:r,yn=ot.Symbol,ha=ot.Uint8Array,vg=ca?ca.allocUnsafe:r,da=hg(ie.getPrototypeOf,ie),gg=ie.create,mg=Ui.propertyIsEnumerable,pa=aa.splice,yg=yn?yn.isConcatSpreadable:r,As=yn?yn.iterator:r,Vn=yn?yn.toStringTag:r,va=function(){try{var s=Zn(ie,"defineProperty");return s({},"",{}),s}catch{}}(),e3=ot.clearTimeout!==Me.clearTimeout&&ot.clearTimeout,r3=bt&&bt.now!==Me.Date.now&&bt.now,n3=ot.setTimeout!==Me.setTimeout&&ot.setTimeout,ga=Se.ceil,ma=Se.floor,gf=ie.getOwnPropertySymbols,i3=ca?ca.isBuffer:r,_g=ot.isFinite,s3=aa.join,o3=hg(ie.keys,ie),Ae=Se.max,De=Se.min,a3=bt.now,l3=ot.parseInt,bg=Se.random,u3=aa.reverse,mf=Zn(ot,"DataView"),Os=Zn(ot,"Map"),yf=Zn(ot,"Promise"),$i=Zn(ot,"Set"),Cs=Zn(ot,"WeakMap"),Rs=Zn(ie,"create"),ya=Cs&&new Cs,Gi={},f3=Qn(mf),c3=Qn(Os),h3=Qn(yf),d3=Qn($i),p3=Qn(Cs),_a=yn?yn.prototype:r,Is=_a?_a.valueOf:r,xg=_a?_a.toString:r;function B(s){if(ye(s)&&!Mt(s)&&!(s instanceof Gt)){if(s instanceof dr)return s;if(ee.call(s,"__wrapped__"))return wm(s)}return new dr(s)}var ji=function(){function s(){}return function(l){if(!me(l))return{};if(gg)return gg(l);s.prototype=l;var g=new s;return s.prototype=r,g}}();function ba(){}function dr(s,l){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!l,this.__index__=0,this.__values__=r}B.templateSettings={escape:CN,evaluate:RN,interpolate:Iv,variable:"",imports:{_:B}},B.prototype=ba.prototype,B.prototype.constructor=B,dr.prototype=ji(ba.prototype),dr.prototype.constructor=dr;function Gt(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=k,this.__views__=[]}function v3(){var s=new Gt(this.__wrapped__);return s.__actions__=Ve(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=Ve(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=Ve(this.__views__),s}function g3(){if(this.__filtered__){var s=new Gt(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function m3(){var s=this.__wrapped__.value(),l=this.__dir__,g=Mt(s),S=l<0,N=g?s.length:0,D=Rk(0,N,this.__views__),H=D.start,K=D.end,tt=K-H,ut=S?K:H-1,ft=this.__iteratees__,ht=ft.length,gt=0,wt=De(tt,this.__takeCount__);if(!g||!S&&N==tt&&wt==tt)return Hg(s,this.__actions__);var Ot=[];t:for(;tt--&&gt<wt;){ut+=l;for(var Ft=-1,Ct=s[ut];++Ft<ht;){var Ut=ft[Ft],zt=Ut.iteratee,sr=Ut.type,ze=zt(Ct);if(sr==q)Ct=ze;else if(!ze){if(sr==F)continue t;break t}}Ot[gt++]=Ct}return Ot}Gt.prototype=ji(ba.prototype),Gt.prototype.constructor=Gt;function Wn(s){var l=-1,g=s==null?0:s.length;for(this.clear();++l<g;){var S=s[l];this.set(S[0],S[1])}}function y3(){this.__data__=Rs?Rs(null):{},this.size=0}function _3(s){var l=this.has(s)&&delete this.__data__[s];return this.size-=l?1:0,l}function b3(s){var l=this.__data__;if(Rs){var g=l[s];return g===f?r:g}return ee.call(l,s)?l[s]:r}function x3(s){var l=this.__data__;return Rs?l[s]!==r:ee.call(l,s)}function w3(s,l){var g=this.__data__;return this.size+=this.has(s)?0:1,g[s]=Rs&&l===r?f:l,this}Wn.prototype.clear=y3,Wn.prototype.delete=_3,Wn.prototype.get=b3,Wn.prototype.has=x3,Wn.prototype.set=w3;function Zr(s){var l=-1,g=s==null?0:s.length;for(this.clear();++l<g;){var S=s[l];this.set(S[0],S[1])}}function T3(){this.__data__=[],this.size=0}function E3(s){var l=this.__data__,g=xa(l,s);if(g<0)return!1;var S=l.length-1;return g==S?l.pop():pa.call(l,g,1),--this.size,!0}function S3(s){var l=this.__data__,g=xa(l,s);return g<0?r:l[g][1]}function A3(s){return xa(this.__data__,s)>-1}function O3(s,l){var g=this.__data__,S=xa(g,s);return S<0?(++this.size,g.push([s,l])):g[S][1]=l,this}Zr.prototype.clear=T3,Zr.prototype.delete=E3,Zr.prototype.get=S3,Zr.prototype.has=A3,Zr.prototype.set=O3;function Qr(s){var l=-1,g=s==null?0:s.length;for(this.clear();++l<g;){var S=s[l];this.set(S[0],S[1])}}function C3(){this.size=0,this.__data__={hash:new Wn,map:new(Os||Zr),string:new Wn}}function R3(s){var l=Ma(this,s).delete(s);return this.size-=l?1:0,l}function I3(s){return Ma(this,s).get(s)}function P3(s){return Ma(this,s).has(s)}function N3(s,l){var g=Ma(this,s),S=g.size;return g.set(s,l),this.size+=g.size==S?0:1,this}Qr.prototype.clear=C3,Qr.prototype.delete=R3,Qr.prototype.get=I3,Qr.prototype.has=P3,Qr.prototype.set=N3;function Xn(s){var l=-1,g=s==null?0:s.length;for(this.__data__=new Qr;++l<g;)this.add(s[l])}function M3(s){return this.__data__.set(s,f),this}function k3(s){return this.__data__.has(s)}Xn.prototype.add=Xn.prototype.push=M3,Xn.prototype.has=k3;function Ir(s){var l=this.__data__=new Zr(s);this.size=l.size}function L3(){this.__data__=new Zr,this.size=0}function F3(s){var l=this.__data__,g=l.delete(s);return this.size=l.size,g}function B3(s){return this.__data__.get(s)}function D3(s){return this.__data__.has(s)}function U3(s,l){var g=this.__data__;if(g instanceof Zr){var S=g.__data__;if(!Os||S.length<i-1)return S.push([s,l]),this.size=++g.size,this;g=this.__data__=new Qr(S)}return g.set(s,l),this.size=g.size,this}Ir.prototype.clear=L3,Ir.prototype.delete=F3,Ir.prototype.get=B3,Ir.prototype.has=D3,Ir.prototype.set=U3;function wg(s,l){var g=Mt(s),S=!g&&Jn(s),N=!g&&!S&&Tn(s),D=!g&&!S&&!N&&Vi(s),H=g||S||N||D,K=H?hf(s.length,KM):[],tt=K.length;for(var ut in s)(l||ee.call(s,ut))&&!(H&&(ut=="length"||N&&(ut=="offset"||ut=="parent")||D&&(ut=="buffer"||ut=="byteLength"||ut=="byteOffset")||rn(ut,tt)))&&K.push(ut);return K}function Tg(s){var l=s.length;return l?s[Rf(0,l-1)]:r}function $3(s,l){return ka(Ve(s),Kn(l,0,s.length))}function G3(s){return ka(Ve(s))}function _f(s,l,g){(g!==r&&!Pr(s[l],g)||g===r&&!(l in s))&&Jr(s,l,g)}function Ps(s,l,g){var S=s[l];(!(ee.call(s,l)&&Pr(S,g))||g===r&&!(l in s))&&Jr(s,l,g)}function xa(s,l){for(var g=s.length;g--;)if(Pr(s[g][0],l))return g;return-1}function j3(s,l,g,S){return _n(s,function(N,D,H){l(S,N,g(N),H)}),S}function Eg(s,l){return s&&jr(l,Pe(l),s)}function q3(s,l){return s&&jr(l,Xe(l),s)}function Jr(s,l,g){l=="__proto__"&&va?va(s,l,{configurable:!0,enumerable:!0,value:g,writable:!0}):s[l]=g}function bf(s,l){for(var g=-1,S=l.length,N=st(S),D=s==null;++g<S;)N[g]=D?r:tc(s,l[g]);return N}function Kn(s,l,g){return s===s&&(g!==r&&(s=s<=g?s:g),l!==r&&(s=s>=l?s:l)),s}function pr(s,l,g,S,N,D){var H,K=l&p,tt=l&c,ut=l&v;if(g&&(H=N?g(s,S,N,D):g(s)),H!==r)return H;if(!me(s))return s;var ft=Mt(s);if(ft){if(H=Pk(s),!K)return Ve(s,H)}else{var ht=Ue(s),gt=ht==pt||ht==yt;if(Tn(s))return Xg(s,K);if(ht==qt||ht==Y||gt&&!N){if(H=tt||gt?{}:dm(s),!K)return tt?bk(s,q3(H,s)):_k(s,Eg(H,s))}else{if(!ae[ht])return N?s:{};H=Nk(s,ht,K)}}D||(D=new Ir);var wt=D.get(s);if(wt)return wt;D.set(s,H),jm(s)?s.forEach(function(Ct){H.add(pr(Ct,l,g,Ct,s,D))}):$m(s)&&s.forEach(function(Ct,Ut){H.set(Ut,pr(Ct,l,g,Ut,s,D))});var Ot=ut?tt?$f:Uf:tt?Xe:Pe,Ft=ft?r:Ot(s);return cr(Ft||s,function(Ct,Ut){Ft&&(Ut=Ct,Ct=s[Ut]),Ps(H,Ut,pr(Ct,l,g,Ut,s,D))}),H}function z3(s){var l=Pe(s);return function(g){return Sg(g,s,l)}}function Sg(s,l,g){var S=g.length;if(s==null)return!S;for(s=ie(s);S--;){var N=g[S],D=l[N],H=s[N];if(H===r&&!(N in s)||!D(H))return!1}return!0}function Ag(s,l,g){if(typeof s!="function")throw new hr(a);return Ds(function(){s.apply(r,g)},l)}function Ns(s,l,g,S){var N=-1,D=ia,H=!0,K=s.length,tt=[],ut=l.length;if(!K)return tt;g&&(l=de(l,rr(g))),S?(D=of,H=!1):l.length>=i&&(D=Ss,H=!1,l=new Xn(l));t:for(;++N<K;){var ft=s[N],ht=g==null?ft:g(ft);if(ft=S||ft!==0?ft:0,H&&ht===ht){for(var gt=ut;gt--;)if(l[gt]===ht)continue t;tt.push(ft)}else D(l,ht,S)||tt.push(ft)}return tt}var _n=Jg(Gr),Og=Jg(wf,!0);function H3(s,l){var g=!0;return _n(s,function(S,N,D){return g=!!l(S,N,D),g}),g}function wa(s,l,g){for(var S=-1,N=s.length;++S<N;){var D=s[S],H=l(D);if(H!=null&&(K===r?H===H&&!ir(H):g(H,K)))var K=H,tt=D}return tt}function V3(s,l,g,S){var N=s.length;for(g=kt(g),g<0&&(g=-g>N?0:N+g),S=S===r||S>N?N:kt(S),S<0&&(S+=N),S=g>S?0:zm(S);g<S;)s[g++]=l;return s}function Cg(s,l){var g=[];return _n(s,function(S,N,D){l(S,N,D)&&g.push(S)}),g}function ke(s,l,g,S,N){var D=-1,H=s.length;for(g||(g=kk),N||(N=[]);++D<H;){var K=s[D];l>0&&g(K)?l>1?ke(K,l-1,g,S,N):gn(N,K):S||(N[N.length]=K)}return N}var xf=tm(),Rg=tm(!0);function Gr(s,l){return s&&xf(s,l,Pe)}function wf(s,l){return s&&Rg(s,l,Pe)}function Ta(s,l){return vn(l,function(g){return nn(s[g])})}function Yn(s,l){l=xn(l,s);for(var g=0,S=l.length;s!=null&&g<S;)s=s[qr(l[g++])];return g&&g==S?s:r}function Ig(s,l,g){var S=l(s);return Mt(s)?S:gn(S,g(s))}function je(s){return s==null?s===r?Lt:oe:Vn&&Vn in ie(s)?Ck(s):Gk(s)}function Tf(s,l){return s>l}function W3(s,l){return s!=null&&ee.call(s,l)}function X3(s,l){return s!=null&&l in ie(s)}function K3(s,l,g){return s>=De(l,g)&&s<Ae(l,g)}function Ef(s,l,g){for(var S=g?of:ia,N=s[0].length,D=s.length,H=D,K=st(D),tt=1/0,ut=[];H--;){var ft=s[H];H&&l&&(ft=de(ft,rr(l))),tt=De(ft.length,tt),K[H]=!g&&(l||N>=120&&ft.length>=120)?new Xn(H&&ft):r}ft=s[0];var ht=-1,gt=K[0];t:for(;++ht<N&&ut.length<tt;){var wt=ft[ht],Ot=l?l(wt):wt;if(wt=g||wt!==0?wt:0,!(gt?Ss(gt,Ot):S(ut,Ot,g))){for(H=D;--H;){var Ft=K[H];if(!(Ft?Ss(Ft,Ot):S(s[H],Ot,g)))continue t}gt&&gt.push(Ot),ut.push(wt)}}return ut}function Y3(s,l,g,S){return Gr(s,function(N,D,H){l(S,g(N),D,H)}),S}function Ms(s,l,g){l=xn(l,s),s=mm(s,l);var S=s==null?s:s[qr(gr(l))];return S==null?r:er(S,s,g)}function Pg(s){return ye(s)&&je(s)==Y}function Z3(s){return ye(s)&&je(s)==Ge}function Q3(s){return ye(s)&&je(s)==J}function ks(s,l,g,S,N){return s===l?!0:s==null||l==null||!ye(s)&&!ye(l)?s!==s&&l!==l:J3(s,l,g,S,ks,N)}function J3(s,l,g,S,N,D){var H=Mt(s),K=Mt(l),tt=H?$:Ue(s),ut=K?$:Ue(l);tt=tt==Y?qt:tt,ut=ut==Y?qt:ut;var ft=tt==qt,ht=ut==qt,gt=tt==ut;if(gt&&Tn(s)){if(!Tn(l))return!1;H=!0,ft=!1}if(gt&&!ft)return D||(D=new Ir),H||Vi(s)?fm(s,l,g,S,N,D):Ak(s,l,tt,g,S,N,D);if(!(g&y)){var wt=ft&&ee.call(s,"__wrapped__"),Ot=ht&&ee.call(l,"__wrapped__");if(wt||Ot){var Ft=wt?s.value():s,Ct=Ot?l.value():l;return D||(D=new Ir),N(Ft,Ct,g,S,D)}}return gt?(D||(D=new Ir),Ok(s,l,g,S,N,D)):!1}function tk(s){return ye(s)&&Ue(s)==xt}function Sf(s,l,g,S){var N=g.length,D=N,H=!S;if(s==null)return!D;for(s=ie(s);N--;){var K=g[N];if(H&&K[2]?K[1]!==s[K[0]]:!(K[0]in s))return!1}for(;++N<D;){K=g[N];var tt=K[0],ut=s[tt],ft=K[1];if(H&&K[2]){if(ut===r&&!(tt in s))return!1}else{var ht=new Ir;if(S)var gt=S(ut,ft,tt,s,l,ht);if(!(gt===r?ks(ft,ut,y|b,S,ht):gt))return!1}}return!0}function Ng(s){if(!me(s)||Fk(s))return!1;var l=nn(s)?t3:zN;return l.test(Qn(s))}function ek(s){return ye(s)&&je(s)==dt}function rk(s){return ye(s)&&Ue(s)==vt}function nk(s){return ye(s)&&$a(s.length)&&!!fe[je(s)]}function Mg(s){return typeof s=="function"?s:s==null?Ke:typeof s=="object"?Mt(s)?Fg(s[0],s[1]):Lg(s):ey(s)}function Af(s){if(!Bs(s))return o3(s);var l=[];for(var g in ie(s))ee.call(s,g)&&g!="constructor"&&l.push(g);return l}function ik(s){if(!me(s))return $k(s);var l=Bs(s),g=[];for(var S in s)S=="constructor"&&(l||!ee.call(s,S))||g.push(S);return g}function Of(s,l){return s<l}function kg(s,l){var g=-1,S=We(s)?st(s.length):[];return _n(s,function(N,D,H){S[++g]=l(N,D,H)}),S}function Lg(s){var l=jf(s);return l.length==1&&l[0][2]?vm(l[0][0],l[0][1]):function(g){return g===s||Sf(g,s,l)}}function Fg(s,l){return zf(s)&&pm(l)?vm(qr(s),l):function(g){var S=tc(g,s);return S===r&&S===l?ec(g,s):ks(l,S,y|b)}}function Ea(s,l,g,S,N){s!==l&&xf(l,function(D,H){if(N||(N=new Ir),me(D))sk(s,l,H,g,Ea,S,N);else{var K=S?S(Vf(s,H),D,H+"",s,l,N):r;K===r&&(K=D),_f(s,H,K)}},Xe)}function sk(s,l,g,S,N,D,H){var K=Vf(s,g),tt=Vf(l,g),ut=H.get(tt);if(ut){_f(s,g,ut);return}var ft=D?D(K,tt,g+"",s,l,H):r,ht=ft===r;if(ht){var gt=Mt(tt),wt=!gt&&Tn(tt),Ot=!gt&&!wt&&Vi(tt);ft=tt,gt||wt||Ot?Mt(K)?ft=K:xe(K)?ft=Ve(K):wt?(ht=!1,ft=Xg(tt,!0)):Ot?(ht=!1,ft=Kg(tt,!0)):ft=[]:Us(tt)||Jn(tt)?(ft=K,Jn(K)?ft=Hm(K):(!me(K)||nn(K))&&(ft=dm(tt))):ht=!1}ht&&(H.set(tt,ft),N(ft,tt,S,D,H),H.delete(tt)),_f(s,g,ft)}function Bg(s,l){var g=s.length;if(g)return l+=l<0?g:0,rn(l,g)?s[l]:r}function Dg(s,l,g){l.length?l=de(l,function(D){return Mt(D)?function(H){return Yn(H,D.length===1?D[0]:D)}:D}):l=[Ke];var S=-1;l=de(l,rr(St()));var N=kg(s,function(D,H,K){var tt=de(l,function(ut){return ut(D)});return{criteria:tt,index:++S,value:D}});return NM(N,function(D,H){return yk(D,H,g)})}function ok(s,l){return Ug(s,l,function(g,S){return ec(s,S)})}function Ug(s,l,g){for(var S=-1,N=l.length,D={};++S<N;){var H=l[S],K=Yn(s,H);g(K,H)&&Ls(D,xn(H,s),K)}return D}function ak(s){return function(l){return Yn(l,s)}}function Cf(s,l,g,S){var N=S?PM:Li,D=-1,H=l.length,K=s;for(s===l&&(l=Ve(l)),g&&(K=de(s,rr(g)));++D<H;)for(var tt=0,ut=l[D],ft=g?g(ut):ut;(tt=N(K,ft,tt,S))>-1;)K!==s&&pa.call(K,tt,1),pa.call(s,tt,1);return s}function $g(s,l){for(var g=s?l.length:0,S=g-1;g--;){var N=l[g];if(g==S||N!==D){var D=N;rn(N)?pa.call(s,N,1):Nf(s,N)}}return s}function Rf(s,l){return s+ma(bg()*(l-s+1))}function lk(s,l,g,S){for(var N=-1,D=Ae(ga((l-s)/(g||1)),0),H=st(D);D--;)H[S?D:++N]=s,s+=g;return H}function If(s,l){var g="";if(!s||l<1||l>nt)return g;do l%2&&(g+=s),l=ma(l/2),l&&(s+=s);while(l);return g}function Bt(s,l){return Wf(gm(s,l,Ke),s+"")}function uk(s){return Tg(Wi(s))}function fk(s,l){var g=Wi(s);return ka(g,Kn(l,0,g.length))}function Ls(s,l,g,S){if(!me(s))return s;l=xn(l,s);for(var N=-1,D=l.length,H=D-1,K=s;K!=null&&++N<D;){var tt=qr(l[N]),ut=g;if(tt==="__proto__"||tt==="constructor"||tt==="prototype")return s;if(N!=H){var ft=K[tt];ut=S?S(ft,tt,K):r,ut===r&&(ut=me(ft)?ft:rn(l[N+1])?[]:{})}Ps(K,tt,ut),K=K[tt]}return s}var Gg=ya?function(s,l){return ya.set(s,l),s}:Ke,ck=va?function(s,l){return va(s,"toString",{configurable:!0,enumerable:!1,value:nc(l),writable:!0})}:Ke;function hk(s){return ka(Wi(s))}function vr(s,l,g){var S=-1,N=s.length;l<0&&(l=-l>N?0:N+l),g=g>N?N:g,g<0&&(g+=N),N=l>g?0:g-l>>>0,l>>>=0;for(var D=st(N);++S<N;)D[S]=s[S+l];return D}function dk(s,l){var g;return _n(s,function(S,N,D){return g=l(S,N,D),!g}),!!g}function Sa(s,l,g){var S=0,N=s==null?S:s.length;if(typeof l=="number"&&l===l&&N<=G){for(;S<N;){var D=S+N>>>1,H=s[D];H!==null&&!ir(H)&&(g?H<=l:H<l)?S=D+1:N=D}return N}return Pf(s,l,Ke,g)}function Pf(s,l,g,S){var N=0,D=s==null?0:s.length;if(D===0)return 0;l=g(l);for(var H=l!==l,K=l===null,tt=ir(l),ut=l===r;N<D;){var ft=ma((N+D)/2),ht=g(s[ft]),gt=ht!==r,wt=ht===null,Ot=ht===ht,Ft=ir(ht);if(H)var Ct=S||Ot;else ut?Ct=Ot&&(S||gt):K?Ct=Ot&&gt&&(S||!wt):tt?Ct=Ot&&gt&&!wt&&(S||!Ft):wt||Ft?Ct=!1:Ct=S?ht<=l:ht<l;Ct?N=ft+1:D=ft}return De(D,j)}function jg(s,l){for(var g=-1,S=s.length,N=0,D=[];++g<S;){var H=s[g],K=l?l(H):H;if(!g||!Pr(K,tt)){var tt=K;D[N++]=H===0?0:H}}return D}function qg(s){return typeof s=="number"?s:ir(s)?U:+s}function nr(s){if(typeof s=="string")return s;if(Mt(s))return de(s,nr)+"";if(ir(s))return xg?xg.call(s):"";var l=s+"";return l=="0"&&1/s==-z?"-0":l}function bn(s,l,g){var S=-1,N=ia,D=s.length,H=!0,K=[],tt=K;if(g)H=!1,N=of;else if(D>=i){var ut=l?null:Ek(s);if(ut)return oa(ut);H=!1,N=Ss,tt=new Xn}else tt=l?[]:K;t:for(;++S<D;){var ft=s[S],ht=l?l(ft):ft;if(ft=g||ft!==0?ft:0,H&&ht===ht){for(var gt=tt.length;gt--;)if(tt[gt]===ht)continue t;l&&tt.push(ht),K.push(ft)}else N(tt,ht,g)||(tt!==K&&tt.push(ht),K.push(ft))}return K}function Nf(s,l){return l=xn(l,s),s=mm(s,l),s==null||delete s[qr(gr(l))]}function zg(s,l,g,S){return Ls(s,l,g(Yn(s,l)),S)}function Aa(s,l,g,S){for(var N=s.length,D=S?N:-1;(S?D--:++D<N)&&l(s[D],D,s););return g?vr(s,S?0:D,S?D+1:N):vr(s,S?D+1:0,S?N:D)}function Hg(s,l){var g=s;return g instanceof Gt&&(g=g.value()),af(l,function(S,N){return N.func.apply(N.thisArg,gn([S],N.args))},g)}function Mf(s,l,g){var S=s.length;if(S<2)return S?bn(s[0]):[];for(var N=-1,D=st(S);++N<S;)for(var H=s[N],K=-1;++K<S;)K!=N&&(D[N]=Ns(D[N]||H,s[K],l,g));return bn(ke(D,1),l,g)}function Vg(s,l,g){for(var S=-1,N=s.length,D=l.length,H={};++S<N;){var K=S<D?l[S]:r;g(H,s[S],K)}return H}function kf(s){return xe(s)?s:[]}function Lf(s){return typeof s=="function"?s:Ke}function xn(s,l){return Mt(s)?s:zf(s,l)?[s]:xm(Jt(s))}var pk=Bt;function wn(s,l,g){var S=s.length;return g=g===r?S:g,!l&&g>=S?s:vr(s,l,g)}var Wg=e3||function(s){return Me.clearTimeout(s)};function Xg(s,l){if(l)return s.slice();var g=s.length,S=vg?vg(g):new s.constructor(g);return s.copy(S),S}function Ff(s){var l=new s.constructor(s.byteLength);return new ha(l).set(new ha(s)),l}function vk(s,l){var g=l?Ff(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.byteLength)}function gk(s){var l=new s.constructor(s.source,Pv.exec(s));return l.lastIndex=s.lastIndex,l}function mk(s){return Is?ie(Is.call(s)):{}}function Kg(s,l){var g=l?Ff(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.length)}function Yg(s,l){if(s!==l){var g=s!==r,S=s===null,N=s===s,D=ir(s),H=l!==r,K=l===null,tt=l===l,ut=ir(l);if(!K&&!ut&&!D&&s>l||D&&H&&tt&&!K&&!ut||S&&H&&tt||!g&&tt||!N)return 1;if(!S&&!D&&!ut&&s<l||ut&&g&&N&&!S&&!D||K&&g&&N||!H&&N||!tt)return-1}return 0}function yk(s,l,g){for(var S=-1,N=s.criteria,D=l.criteria,H=N.length,K=g.length;++S<H;){var tt=Yg(N[S],D[S]);if(tt){if(S>=K)return tt;var ut=g[S];return tt*(ut=="desc"?-1:1)}}return s.index-l.index}function Zg(s,l,g,S){for(var N=-1,D=s.length,H=g.length,K=-1,tt=l.length,ut=Ae(D-H,0),ft=st(tt+ut),ht=!S;++K<tt;)ft[K]=l[K];for(;++N<H;)(ht||N<D)&&(ft[g[N]]=s[N]);for(;ut--;)ft[K++]=s[N++];return ft}function Qg(s,l,g,S){for(var N=-1,D=s.length,H=-1,K=g.length,tt=-1,ut=l.length,ft=Ae(D-K,0),ht=st(ft+ut),gt=!S;++N<ft;)ht[N]=s[N];for(var wt=N;++tt<ut;)ht[wt+tt]=l[tt];for(;++H<K;)(gt||N<D)&&(ht[wt+g[H]]=s[N++]);return ht}function Ve(s,l){var g=-1,S=s.length;for(l||(l=st(S));++g<S;)l[g]=s[g];return l}function jr(s,l,g,S){var N=!g;g||(g={});for(var D=-1,H=l.length;++D<H;){var K=l[D],tt=S?S(g[K],s[K],K,g,s):r;tt===r&&(tt=s[K]),N?Jr(g,K,tt):Ps(g,K,tt)}return g}function _k(s,l){return jr(s,qf(s),l)}function bk(s,l){return jr(s,cm(s),l)}function Oa(s,l){return function(g,S){var N=Mt(g)?SM:j3,D=l?l():{};return N(g,s,St(S,2),D)}}function qi(s){return Bt(function(l,g){var S=-1,N=g.length,D=N>1?g[N-1]:r,H=N>2?g[2]:r;for(D=s.length>3&&typeof D=="function"?(N--,D):r,H&&qe(g[0],g[1],H)&&(D=N<3?r:D,N=1),l=ie(l);++S<N;){var K=g[S];K&&s(l,K,S,D)}return l})}function Jg(s,l){return function(g,S){if(g==null)return g;if(!We(g))return s(g,S);for(var N=g.length,D=l?N:-1,H=ie(g);(l?D--:++D<N)&&S(H[D],D,H)!==!1;);return g}}function tm(s){return function(l,g,S){for(var N=-1,D=ie(l),H=S(l),K=H.length;K--;){var tt=H[s?K:++N];if(g(D[tt],tt,D)===!1)break}return l}}function xk(s,l,g){var S=l&_,N=Fs(s);function D(){var H=this&&this!==Me&&this instanceof D?N:s;return H.apply(S?g:this,arguments)}return D}function em(s){return function(l){l=Jt(l);var g=Fi(l)?Rr(l):r,S=g?g[0]:l.charAt(0),N=g?wn(g,1).join(""):l.slice(1);return S[s]()+N}}function zi(s){return function(l){return af(Jm(Qm(l).replace(cM,"")),s,"")}}function Fs(s){return function(){var l=arguments;switch(l.length){case 0:return new s;case 1:return new s(l[0]);case 2:return new s(l[0],l[1]);case 3:return new s(l[0],l[1],l[2]);case 4:return new s(l[0],l[1],l[2],l[3]);case 5:return new s(l[0],l[1],l[2],l[3],l[4]);case 6:return new s(l[0],l[1],l[2],l[3],l[4],l[5]);case 7:return new s(l[0],l[1],l[2],l[3],l[4],l[5],l[6])}var g=ji(s.prototype),S=s.apply(g,l);return me(S)?S:g}}function wk(s,l,g){var S=Fs(s);function N(){for(var D=arguments.length,H=st(D),K=D,tt=Hi(N);K--;)H[K]=arguments[K];var ut=D<3&&H[0]!==tt&&H[D-1]!==tt?[]:mn(H,tt);if(D-=ut.length,D<g)return om(s,l,Ca,N.placeholder,r,H,ut,r,r,g-D);var ft=this&&this!==Me&&this instanceof N?S:s;return er(ft,this,H)}return N}function rm(s){return function(l,g,S){var N=ie(l);if(!We(l)){var D=St(g,3);l=Pe(l),g=function(K){return D(N[K],K,N)}}var H=s(l,g,S);return H>-1?N[D?l[H]:H]:r}}function nm(s){return en(function(l){var g=l.length,S=g,N=dr.prototype.thru;for(s&&l.reverse();S--;){var D=l[S];if(typeof D!="function")throw new hr(a);if(N&&!H&&Na(D)=="wrapper")var H=new dr([],!0)}for(S=H?S:g;++S<g;){D=l[S];var K=Na(D),tt=K=="wrapper"?Gf(D):r;tt&&Hf(tt[0])&&tt[1]==(A|T|E|O)&&!tt[4].length&&tt[9]==1?H=H[Na(tt[0])].apply(H,tt[3]):H=D.length==1&&Hf(D)?H[K]():H.thru(D)}return function(){var ut=arguments,ft=ut[0];if(H&&ut.length==1&&Mt(ft))return H.plant(ft).value();for(var ht=0,gt=g?l[ht].apply(this,ut):ft;++ht<g;)gt=l[ht].call(this,gt);return gt}})}function Ca(s,l,g,S,N,D,H,K,tt,ut){var ft=l&A,ht=l&_,gt=l&m,wt=l&(T|x),Ot=l&L,Ft=gt?r:Fs(s);function Ct(){for(var Ut=arguments.length,zt=st(Ut),sr=Ut;sr--;)zt[sr]=arguments[sr];if(wt)var ze=Hi(Ct),or=kM(zt,ze);if(S&&(zt=Zg(zt,S,N,wt)),D&&(zt=Qg(zt,D,H,wt)),Ut-=or,wt&&Ut<ut){var we=mn(zt,ze);return om(s,l,Ca,Ct.placeholder,g,zt,we,K,tt,ut-Ut)}var Nr=ht?g:this,on=gt?Nr[s]:s;return Ut=zt.length,K?zt=jk(zt,K):Ot&&Ut>1&&zt.reverse(),ft&&tt<Ut&&(zt.length=tt),this&&this!==Me&&this instanceof Ct&&(on=Ft||Fs(on)),on.apply(Nr,zt)}return Ct}function im(s,l){return function(g,S){return Y3(g,s,l(S),{})}}function Ra(s,l){return function(g,S){var N;if(g===r&&S===r)return l;if(g!==r&&(N=g),S!==r){if(N===r)return S;typeof g=="string"||typeof S=="string"?(g=nr(g),S=nr(S)):(g=qg(g),S=qg(S)),N=s(g,S)}return N}}function Bf(s){return en(function(l){return l=de(l,rr(St())),Bt(function(g){var S=this;return s(l,function(N){return er(N,S,g)})})})}function Ia(s,l){l=l===r?" ":nr(l);var g=l.length;if(g<2)return g?If(l,s):l;var S=If(l,ga(s/Bi(l)));return Fi(l)?wn(Rr(S),0,s).join(""):S.slice(0,s)}function Tk(s,l,g,S){var N=l&_,D=Fs(s);function H(){for(var K=-1,tt=arguments.length,ut=-1,ft=S.length,ht=st(ft+tt),gt=this&&this!==Me&&this instanceof H?D:s;++ut<ft;)ht[ut]=S[ut];for(;tt--;)ht[ut++]=arguments[++K];return er(gt,N?g:this,ht)}return H}function sm(s){return function(l,g,S){return S&&typeof S!="number"&&qe(l,g,S)&&(g=S=r),l=sn(l),g===r?(g=l,l=0):g=sn(g),S=S===r?l<g?1:-1:sn(S),lk(l,g,S,s)}}function Pa(s){return function(l,g){return typeof l=="string"&&typeof g=="string"||(l=mr(l),g=mr(g)),s(l,g)}}function om(s,l,g,S,N,D,H,K,tt,ut){var ft=l&T,ht=ft?H:r,gt=ft?r:H,wt=ft?D:r,Ot=ft?r:D;l|=ft?E:I,l&=~(ft?I:E),l&w||(l&=~(_|m));var Ft=[s,l,N,wt,ht,Ot,gt,K,tt,ut],Ct=g.apply(r,Ft);return Hf(s)&&ym(Ct,Ft),Ct.placeholder=S,_m(Ct,s,l)}function Df(s){var l=Se[s];return function(g,S){if(g=mr(g),S=S==null?0:De(kt(S),292),S&&_g(g)){var N=(Jt(g)+"e").split("e"),D=l(N[0]+"e"+(+N[1]+S));return N=(Jt(D)+"e").split("e"),+(N[0]+"e"+(+N[1]-S))}return l(g)}}var Ek=$i&&1/oa(new $i([,-0]))[1]==z?function(s){return new $i(s)}:oc;function am(s){return function(l){var g=Ue(l);return g==xt?pf(l):g==vt?GM(l):MM(l,s(l))}}function tn(s,l,g,S,N,D,H,K){var tt=l&m;if(!tt&&typeof s!="function")throw new hr(a);var ut=S?S.length:0;if(ut||(l&=~(E|I),S=N=r),H=H===r?H:Ae(kt(H),0),K=K===r?K:kt(K),ut-=N?N.length:0,l&I){var ft=S,ht=N;S=N=r}var gt=tt?r:Gf(s),wt=[s,l,g,S,N,ft,ht,D,H,K];if(gt&&Uk(wt,gt),s=wt[0],l=wt[1],g=wt[2],S=wt[3],N=wt[4],K=wt[9]=wt[9]===r?tt?0:s.length:Ae(wt[9]-ut,0),!K&&l&(T|x)&&(l&=~(T|x)),!l||l==_)var Ot=xk(s,l,g);else l==T||l==x?Ot=wk(s,l,K):(l==E||l==(_|E))&&!N.length?Ot=Tk(s,l,g,S):Ot=Ca.apply(r,wt);var Ft=gt?Gg:ym;return _m(Ft(Ot,wt),s,l)}function lm(s,l,g,S){return s===r||Pr(s,Ui[g])&&!ee.call(S,g)?l:s}function um(s,l,g,S,N,D){return me(s)&&me(l)&&(D.set(l,s),Ea(s,l,r,um,D),D.delete(l)),s}function Sk(s){return Us(s)?r:s}function fm(s,l,g,S,N,D){var H=g&y,K=s.length,tt=l.length;if(K!=tt&&!(H&&tt>K))return!1;var ut=D.get(s),ft=D.get(l);if(ut&&ft)return ut==l&&ft==s;var ht=-1,gt=!0,wt=g&b?new Xn:r;for(D.set(s,l),D.set(l,s);++ht<K;){var Ot=s[ht],Ft=l[ht];if(S)var Ct=H?S(Ft,Ot,ht,l,s,D):S(Ot,Ft,ht,s,l,D);if(Ct!==r){if(Ct)continue;gt=!1;break}if(wt){if(!lf(l,function(Ut,zt){if(!Ss(wt,zt)&&(Ot===Ut||N(Ot,Ut,g,S,D)))return wt.push(zt)})){gt=!1;break}}else if(!(Ot===Ft||N(Ot,Ft,g,S,D))){gt=!1;break}}return D.delete(s),D.delete(l),gt}function Ak(s,l,g,S,N,D,H){switch(g){case Qt:if(s.byteLength!=l.byteLength||s.byteOffset!=l.byteOffset)return!1;s=s.buffer,l=l.buffer;case Ge:return!(s.byteLength!=l.byteLength||!D(new ha(s),new ha(l)));case et:case J:case At:return Pr(+s,+l);case lt:return s.name==l.name&&s.message==l.message;case dt:case ct:return s==l+"";case xt:var K=pf;case vt:var tt=S&y;if(K||(K=oa),s.size!=l.size&&!tt)return!1;var ut=H.get(s);if(ut)return ut==l;S|=b,H.set(s,l);var ft=fm(K(s),K(l),S,N,D,H);return H.delete(s),ft;case Pt:if(Is)return Is.call(s)==Is.call(l)}return!1}function Ok(s,l,g,S,N,D){var H=g&y,K=Uf(s),tt=K.length,ut=Uf(l),ft=ut.length;if(tt!=ft&&!H)return!1;for(var ht=tt;ht--;){var gt=K[ht];if(!(H?gt in l:ee.call(l,gt)))return!1}var wt=D.get(s),Ot=D.get(l);if(wt&&Ot)return wt==l&&Ot==s;var Ft=!0;D.set(s,l),D.set(l,s);for(var Ct=H;++ht<tt;){gt=K[ht];var Ut=s[gt],zt=l[gt];if(S)var sr=H?S(zt,Ut,gt,l,s,D):S(Ut,zt,gt,s,l,D);if(!(sr===r?Ut===zt||N(Ut,zt,g,S,D):sr)){Ft=!1;break}Ct||(Ct=gt=="constructor")}if(Ft&&!Ct){var ze=s.constructor,or=l.constructor;ze!=or&&"constructor"in s&&"constructor"in l&&!(typeof ze=="function"&&ze instanceof ze&&typeof or=="function"&&or instanceof or)&&(Ft=!1)}return D.delete(s),D.delete(l),Ft}function en(s){return Wf(gm(s,r,Sm),s+"")}function Uf(s){return Ig(s,Pe,qf)}function $f(s){return Ig(s,Xe,cm)}var Gf=ya?function(s){return ya.get(s)}:oc;function Na(s){for(var l=s.name+"",g=Gi[l],S=ee.call(Gi,l)?g.length:0;S--;){var N=g[S],D=N.func;if(D==null||D==s)return N.name}return l}function Hi(s){var l=ee.call(B,"placeholder")?B:s;return l.placeholder}function St(){var s=B.iteratee||ic;return s=s===ic?Mg:s,arguments.length?s(arguments[0],arguments[1]):s}function Ma(s,l){var g=s.__data__;return Lk(l)?g[typeof l=="string"?"string":"hash"]:g.map}function jf(s){for(var l=Pe(s),g=l.length;g--;){var S=l[g],N=s[S];l[g]=[S,N,pm(N)]}return l}function Zn(s,l){var g=DM(s,l);return Ng(g)?g:r}function Ck(s){var l=ee.call(s,Vn),g=s[Vn];try{s[Vn]=r;var S=!0}catch{}var N=fa.call(s);return S&&(l?s[Vn]=g:delete s[Vn]),N}var qf=gf?function(s){return s==null?[]:(s=ie(s),vn(gf(s),function(l){return mg.call(s,l)}))}:ac,cm=gf?function(s){for(var l=[];s;)gn(l,qf(s)),s=da(s);return l}:ac,Ue=je;(mf&&Ue(new mf(new ArrayBuffer(1)))!=Qt||Os&&Ue(new Os)!=xt||yf&&Ue(yf.resolve())!=rt||$i&&Ue(new $i)!=vt||Cs&&Ue(new Cs)!=Nt)&&(Ue=function(s){var l=je(s),g=l==qt?s.constructor:r,S=g?Qn(g):"";if(S)switch(S){case f3:return Qt;case c3:return xt;case h3:return rt;case d3:return vt;case p3:return Nt}return l});function Rk(s,l,g){for(var S=-1,N=g.length;++S<N;){var D=g[S],H=D.size;switch(D.type){case"drop":s+=H;break;case"dropRight":l-=H;break;case"take":l=De(l,s+H);break;case"takeRight":s=Ae(s,l-H);break}}return{start:s,end:l}}function Ik(s){var l=s.match(FN);return l?l[1].split(BN):[]}function hm(s,l,g){l=xn(l,s);for(var S=-1,N=l.length,D=!1;++S<N;){var H=qr(l[S]);if(!(D=s!=null&&g(s,H)))break;s=s[H]}return D||++S!=N?D:(N=s==null?0:s.length,!!N&&$a(N)&&rn(H,N)&&(Mt(s)||Jn(s)))}function Pk(s){var l=s.length,g=new s.constructor(l);return l&&typeof s[0]=="string"&&ee.call(s,"index")&&(g.index=s.index,g.input=s.input),g}function dm(s){return typeof s.constructor=="function"&&!Bs(s)?ji(da(s)):{}}function Nk(s,l,g){var S=s.constructor;switch(l){case Ge:return Ff(s);case et:case J:return new S(+s);case Qt:return vk(s,g);case Es:case he:case ur:case zu:case Hu:case Vu:case Wu:case Xu:case Ku:return Kg(s,g);case xt:return new S;case At:case ct:return new S(s);case dt:return gk(s);case vt:return new S;case Pt:return mk(s)}}function Mk(s,l){var g=l.length;if(!g)return s;var S=g-1;return l[S]=(g>1?"& ":"")+l[S],l=l.join(g>2?", ":" "),s.replace(LN,`{
1941
+ */ta.exports,function(e,t){(function(){var r,n="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",u="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",h=500,d="__lodash_placeholder__",p=1,c=2,v=4,y=1,b=2,_=1,m=2,w=4,T=8,x=16,E=32,I=64,A=128,O=256,L=512,R=30,C="...",P=800,M=16,F=1,q=2,Z=3,z=1/0,nt=9007199254740991,V=17976931348623157e292,U=0/0,k=4294967295,j=k-1,G=k>>>1,X=[["ary",A],["bind",_],["bindKey",m],["curry",T],["curryRight",x],["flip",L],["partial",E],["partialRight",I],["rearg",O]],Y="[object Arguments]",$="[object Array]",W="[object AsyncFunction]",et="[object Boolean]",J="[object Date]",it="[object DOMException]",lt="[object Error]",pt="[object Function]",yt="[object GeneratorFunction]",xt="[object Map]",At="[object Number]",oe="[object Null]",Ht="[object Object]",rt="[object Promise]",at="[object Proxy]",dt="[object RegExp]",vt="[object Set]",ct="[object String]",Pt="[object Symbol]",Lt="[object Undefined]",Nt="[object WeakMap]",He="[object WeakSet]",Ge="[object ArrayBuffer]",Qt="[object DataView]",Es="[object Float32Array]",he="[object Float64Array]",ur="[object Int8Array]",zu="[object Int16Array]",Hu="[object Int32Array]",Vu="[object Uint8Array]",Wu="[object Uint8ClampedArray]",Xu="[object Uint16Array]",Ku="[object Uint32Array]",TN=/\b__p \+= '';/g,EN=/\b(__p \+=) '' \+/g,SN=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Cv=/&(?:amp|lt|gt|quot|#39);/g,Rv=/[&<>"']/g,AN=RegExp(Cv.source),ON=RegExp(Rv.source),CN=/<%-([\s\S]+?)%>/g,RN=/<%([\s\S]+?)%>/g,Iv=/<%=([\s\S]+?)%>/g,IN=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,PN=/^\w*$/,NN=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yu=/[\\^$.*+?()[\]{}|]/g,MN=RegExp(Yu.source),Zu=/^\s+/,kN=/\s/,LN=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,FN=/\{\n\/\* \[wrapped with (.+)\] \*/,BN=/,? & /,DN=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,UN=/[()=,{}\[\]\/\s]/,$N=/\\(\\)?/g,GN=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Pv=/\w*$/,jN=/^[-+]0x[0-9a-f]+$/i,qN=/^0b[01]+$/i,zN=/^\[object .+?Constructor\]$/,HN=/^0o[0-7]+$/i,VN=/^(?:0|[1-9]\d*)$/,WN=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ea=/($^)/,XN=/['\n\r\u2028\u2029\\]/g,ra="\\ud800-\\udfff",KN="\\u0300-\\u036f",YN="\\ufe20-\\ufe2f",ZN="\\u20d0-\\u20ff",Nv=KN+YN+ZN,Mv="\\u2700-\\u27bf",kv="a-z\\xdf-\\xf6\\xf8-\\xff",QN="\\xac\\xb1\\xd7\\xf7",JN="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",tM="\\u2000-\\u206f",eM=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Lv="A-Z\\xc0-\\xd6\\xd8-\\xde",Fv="\\ufe0e\\ufe0f",Bv=QN+JN+tM+eM,Qu="['’]",rM="["+ra+"]",Dv="["+Bv+"]",na="["+Nv+"]",Uv="\\d+",nM="["+Mv+"]",$v="["+kv+"]",Gv="[^"+ra+Bv+Uv+Mv+kv+Lv+"]",Ju="\\ud83c[\\udffb-\\udfff]",iM="(?:"+na+"|"+Ju+")",jv="[^"+ra+"]",tf="(?:\\ud83c[\\udde6-\\uddff]){2}",ef="[\\ud800-\\udbff][\\udc00-\\udfff]",ki="["+Lv+"]",qv="\\u200d",zv="(?:"+$v+"|"+Gv+")",sM="(?:"+ki+"|"+Gv+")",Hv="(?:"+Qu+"(?:d|ll|m|re|s|t|ve))?",Vv="(?:"+Qu+"(?:D|LL|M|RE|S|T|VE))?",Wv=iM+"?",Xv="["+Fv+"]?",oM="(?:"+qv+"(?:"+[jv,tf,ef].join("|")+")"+Xv+Wv+")*",aM="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",lM="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Kv=Xv+Wv+oM,uM="(?:"+[nM,tf,ef].join("|")+")"+Kv,fM="(?:"+[jv+na+"?",na,tf,ef,rM].join("|")+")",cM=RegExp(Qu,"g"),hM=RegExp(na,"g"),rf=RegExp(Ju+"(?="+Ju+")|"+fM+Kv,"g"),dM=RegExp([ki+"?"+$v+"+"+Hv+"(?="+[Dv,ki,"$"].join("|")+")",sM+"+"+Vv+"(?="+[Dv,ki+zv,"$"].join("|")+")",ki+"?"+zv+"+"+Hv,ki+"+"+Vv,lM,aM,Uv,uM].join("|"),"g"),pM=RegExp("["+qv+ra+Nv+Fv+"]"),vM=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,gM=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],mM=-1,fe={};fe[Es]=fe[he]=fe[ur]=fe[zu]=fe[Hu]=fe[Vu]=fe[Wu]=fe[Xu]=fe[Ku]=!0,fe[Y]=fe[$]=fe[Ge]=fe[et]=fe[Qt]=fe[J]=fe[lt]=fe[pt]=fe[xt]=fe[At]=fe[Ht]=fe[dt]=fe[vt]=fe[ct]=fe[Nt]=!1;var ae={};ae[Y]=ae[$]=ae[Ge]=ae[Qt]=ae[et]=ae[J]=ae[Es]=ae[he]=ae[ur]=ae[zu]=ae[Hu]=ae[xt]=ae[At]=ae[Ht]=ae[dt]=ae[vt]=ae[ct]=ae[Pt]=ae[Vu]=ae[Wu]=ae[Xu]=ae[Ku]=!0,ae[lt]=ae[pt]=ae[Nt]=!1;var yM={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},_M={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},bM={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},xM={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},wM=parseFloat,TM=parseInt,Yv=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,EM=typeof self=="object"&&self&&self.Object===Object&&self,Me=Yv||EM||Function("return this")(),nf=t&&!t.nodeType&&t,Hn=nf&&!0&&e&&!e.nodeType&&e,Zv=Hn&&Hn.exports===nf,sf=Zv&&Yv.process,fr=function(){try{var Q=Hn&&Hn.require&&Hn.require("util").types;return Q||sf&&sf.binding&&sf.binding("util")}catch{}}(),Qv=fr&&fr.isArrayBuffer,Jv=fr&&fr.isDate,tg=fr&&fr.isMap,eg=fr&&fr.isRegExp,rg=fr&&fr.isSet,ng=fr&&fr.isTypedArray;function er(Q,ot,st){switch(st.length){case 0:return Q.call(ot);case 1:return Q.call(ot,st[0]);case 2:return Q.call(ot,st[0],st[1]);case 3:return Q.call(ot,st[0],st[1],st[2])}return Q.apply(ot,st)}function SM(Q,ot,st,bt){for(var It=-1,Yt=Q==null?0:Q.length;++It<Yt;){var Se=Q[It];ot(bt,Se,st(Se),Q)}return bt}function cr(Q,ot){for(var st=-1,bt=Q==null?0:Q.length;++st<bt&&ot(Q[st],st,Q)!==!1;);return Q}function AM(Q,ot){for(var st=Q==null?0:Q.length;st--&&ot(Q[st],st,Q)!==!1;);return Q}function ig(Q,ot){for(var st=-1,bt=Q==null?0:Q.length;++st<bt;)if(!ot(Q[st],st,Q))return!1;return!0}function vn(Q,ot){for(var st=-1,bt=Q==null?0:Q.length,It=0,Yt=[];++st<bt;){var Se=Q[st];ot(Se,st,Q)&&(Yt[It++]=Se)}return Yt}function ia(Q,ot){var st=Q==null?0:Q.length;return!!st&&Li(Q,ot,0)>-1}function of(Q,ot,st){for(var bt=-1,It=Q==null?0:Q.length;++bt<It;)if(st(ot,Q[bt]))return!0;return!1}function de(Q,ot){for(var st=-1,bt=Q==null?0:Q.length,It=Array(bt);++st<bt;)It[st]=ot(Q[st],st,Q);return It}function gn(Q,ot){for(var st=-1,bt=ot.length,It=Q.length;++st<bt;)Q[It+st]=ot[st];return Q}function af(Q,ot,st,bt){var It=-1,Yt=Q==null?0:Q.length;for(bt&&Yt&&(st=Q[++It]);++It<Yt;)st=ot(st,Q[It],It,Q);return st}function OM(Q,ot,st,bt){var It=Q==null?0:Q.length;for(bt&&It&&(st=Q[--It]);It--;)st=ot(st,Q[It],It,Q);return st}function lf(Q,ot){for(var st=-1,bt=Q==null?0:Q.length;++st<bt;)if(ot(Q[st],st,Q))return!0;return!1}var CM=uf("length");function RM(Q){return Q.split("")}function IM(Q){return Q.match(DN)||[]}function sg(Q,ot,st){var bt;return st(Q,function(It,Yt,Se){if(ot(It,Yt,Se))return bt=Yt,!1}),bt}function sa(Q,ot,st,bt){for(var It=Q.length,Yt=st+(bt?1:-1);bt?Yt--:++Yt<It;)if(ot(Q[Yt],Yt,Q))return Yt;return-1}function Li(Q,ot,st){return ot===ot?jM(Q,ot,st):sa(Q,og,st)}function PM(Q,ot,st,bt){for(var It=st-1,Yt=Q.length;++It<Yt;)if(bt(Q[It],ot))return It;return-1}function og(Q){return Q!==Q}function ag(Q,ot){var st=Q==null?0:Q.length;return st?cf(Q,ot)/st:U}function uf(Q){return function(ot){return ot==null?r:ot[Q]}}function ff(Q){return function(ot){return Q==null?r:Q[ot]}}function lg(Q,ot,st,bt,It){return It(Q,function(Yt,Se,ie){st=bt?(bt=!1,Yt):ot(st,Yt,Se,ie)}),st}function NM(Q,ot){var st=Q.length;for(Q.sort(ot);st--;)Q[st]=Q[st].value;return Q}function cf(Q,ot){for(var st,bt=-1,It=Q.length;++bt<It;){var Yt=ot(Q[bt]);Yt!==r&&(st=st===r?Yt:st+Yt)}return st}function hf(Q,ot){for(var st=-1,bt=Array(Q);++st<Q;)bt[st]=ot(st);return bt}function MM(Q,ot){return de(ot,function(st){return[st,Q[st]]})}function ug(Q){return Q&&Q.slice(0,dg(Q)+1).replace(Zu,"")}function rr(Q){return function(ot){return Q(ot)}}function df(Q,ot){return de(ot,function(st){return Q[st]})}function Ss(Q,ot){return Q.has(ot)}function fg(Q,ot){for(var st=-1,bt=Q.length;++st<bt&&Li(ot,Q[st],0)>-1;);return st}function cg(Q,ot){for(var st=Q.length;st--&&Li(ot,Q[st],0)>-1;);return st}function kM(Q,ot){for(var st=Q.length,bt=0;st--;)Q[st]===ot&&++bt;return bt}var LM=ff(yM),FM=ff(_M);function BM(Q){return"\\"+xM[Q]}function DM(Q,ot){return Q==null?r:Q[ot]}function Fi(Q){return pM.test(Q)}function UM(Q){return vM.test(Q)}function $M(Q){for(var ot,st=[];!(ot=Q.next()).done;)st.push(ot.value);return st}function pf(Q){var ot=-1,st=Array(Q.size);return Q.forEach(function(bt,It){st[++ot]=[It,bt]}),st}function hg(Q,ot){return function(st){return Q(ot(st))}}function mn(Q,ot){for(var st=-1,bt=Q.length,It=0,Yt=[];++st<bt;){var Se=Q[st];(Se===ot||Se===d)&&(Q[st]=d,Yt[It++]=st)}return Yt}function oa(Q){var ot=-1,st=Array(Q.size);return Q.forEach(function(bt){st[++ot]=bt}),st}function GM(Q){var ot=-1,st=Array(Q.size);return Q.forEach(function(bt){st[++ot]=[bt,bt]}),st}function jM(Q,ot,st){for(var bt=st-1,It=Q.length;++bt<It;)if(Q[bt]===ot)return bt;return-1}function qM(Q,ot,st){for(var bt=st+1;bt--;)if(Q[bt]===ot)return bt;return bt}function Bi(Q){return Fi(Q)?HM(Q):CM(Q)}function Rr(Q){return Fi(Q)?VM(Q):RM(Q)}function dg(Q){for(var ot=Q.length;ot--&&kN.test(Q.charAt(ot)););return ot}var zM=ff(bM);function HM(Q){for(var ot=rf.lastIndex=0;rf.test(Q);)++ot;return ot}function VM(Q){return Q.match(rf)||[]}function WM(Q){return Q.match(dM)||[]}var XM=function Q(ot){ot=ot==null?Me:Di.defaults(Me.Object(),ot,Di.pick(Me,gM));var st=ot.Array,bt=ot.Date,It=ot.Error,Yt=ot.Function,Se=ot.Math,ie=ot.Object,vf=ot.RegExp,KM=ot.String,hr=ot.TypeError,aa=st.prototype,YM=Yt.prototype,Ui=ie.prototype,la=ot["__core-js_shared__"],ua=YM.toString,ee=Ui.hasOwnProperty,ZM=0,pg=function(){var s=/[^.]+$/.exec(la&&la.keys&&la.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),fa=Ui.toString,QM=ua.call(ie),JM=Me._,t3=vf("^"+ua.call(ee).replace(Yu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ca=Zv?ot.Buffer:r,yn=ot.Symbol,ha=ot.Uint8Array,vg=ca?ca.allocUnsafe:r,da=hg(ie.getPrototypeOf,ie),gg=ie.create,mg=Ui.propertyIsEnumerable,pa=aa.splice,yg=yn?yn.isConcatSpreadable:r,As=yn?yn.iterator:r,Vn=yn?yn.toStringTag:r,va=function(){try{var s=Zn(ie,"defineProperty");return s({},"",{}),s}catch{}}(),e3=ot.clearTimeout!==Me.clearTimeout&&ot.clearTimeout,r3=bt&&bt.now!==Me.Date.now&&bt.now,n3=ot.setTimeout!==Me.setTimeout&&ot.setTimeout,ga=Se.ceil,ma=Se.floor,gf=ie.getOwnPropertySymbols,i3=ca?ca.isBuffer:r,_g=ot.isFinite,s3=aa.join,o3=hg(ie.keys,ie),Ae=Se.max,De=Se.min,a3=bt.now,l3=ot.parseInt,bg=Se.random,u3=aa.reverse,mf=Zn(ot,"DataView"),Os=Zn(ot,"Map"),yf=Zn(ot,"Promise"),$i=Zn(ot,"Set"),Cs=Zn(ot,"WeakMap"),Rs=Zn(ie,"create"),ya=Cs&&new Cs,Gi={},f3=Qn(mf),c3=Qn(Os),h3=Qn(yf),d3=Qn($i),p3=Qn(Cs),_a=yn?yn.prototype:r,Is=_a?_a.valueOf:r,xg=_a?_a.toString:r;function B(s){if(ye(s)&&!Mt(s)&&!(s instanceof Gt)){if(s instanceof dr)return s;if(ee.call(s,"__wrapped__"))return wm(s)}return new dr(s)}var ji=function(){function s(){}return function(l){if(!me(l))return{};if(gg)return gg(l);s.prototype=l;var g=new s;return s.prototype=r,g}}();function ba(){}function dr(s,l){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!l,this.__index__=0,this.__values__=r}B.templateSettings={escape:CN,evaluate:RN,interpolate:Iv,variable:"",imports:{_:B}},B.prototype=ba.prototype,B.prototype.constructor=B,dr.prototype=ji(ba.prototype),dr.prototype.constructor=dr;function Gt(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=k,this.__views__=[]}function v3(){var s=new Gt(this.__wrapped__);return s.__actions__=Ve(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=Ve(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=Ve(this.__views__),s}function g3(){if(this.__filtered__){var s=new Gt(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function m3(){var s=this.__wrapped__.value(),l=this.__dir__,g=Mt(s),S=l<0,N=g?s.length:0,D=Rk(0,N,this.__views__),H=D.start,K=D.end,tt=K-H,ut=S?K:H-1,ft=this.__iteratees__,ht=ft.length,gt=0,wt=De(tt,this.__takeCount__);if(!g||!S&&N==tt&&wt==tt)return Hg(s,this.__actions__);var Ot=[];t:for(;tt--&&gt<wt;){ut+=l;for(var Ft=-1,Ct=s[ut];++Ft<ht;){var Ut=ft[Ft],qt=Ut.iteratee,sr=Ut.type,ze=qt(Ct);if(sr==q)Ct=ze;else if(!ze){if(sr==F)continue t;break t}}Ot[gt++]=Ct}return Ot}Gt.prototype=ji(ba.prototype),Gt.prototype.constructor=Gt;function Wn(s){var l=-1,g=s==null?0:s.length;for(this.clear();++l<g;){var S=s[l];this.set(S[0],S[1])}}function y3(){this.__data__=Rs?Rs(null):{},this.size=0}function _3(s){var l=this.has(s)&&delete this.__data__[s];return this.size-=l?1:0,l}function b3(s){var l=this.__data__;if(Rs){var g=l[s];return g===f?r:g}return ee.call(l,s)?l[s]:r}function x3(s){var l=this.__data__;return Rs?l[s]!==r:ee.call(l,s)}function w3(s,l){var g=this.__data__;return this.size+=this.has(s)?0:1,g[s]=Rs&&l===r?f:l,this}Wn.prototype.clear=y3,Wn.prototype.delete=_3,Wn.prototype.get=b3,Wn.prototype.has=x3,Wn.prototype.set=w3;function Zr(s){var l=-1,g=s==null?0:s.length;for(this.clear();++l<g;){var S=s[l];this.set(S[0],S[1])}}function T3(){this.__data__=[],this.size=0}function E3(s){var l=this.__data__,g=xa(l,s);if(g<0)return!1;var S=l.length-1;return g==S?l.pop():pa.call(l,g,1),--this.size,!0}function S3(s){var l=this.__data__,g=xa(l,s);return g<0?r:l[g][1]}function A3(s){return xa(this.__data__,s)>-1}function O3(s,l){var g=this.__data__,S=xa(g,s);return S<0?(++this.size,g.push([s,l])):g[S][1]=l,this}Zr.prototype.clear=T3,Zr.prototype.delete=E3,Zr.prototype.get=S3,Zr.prototype.has=A3,Zr.prototype.set=O3;function Qr(s){var l=-1,g=s==null?0:s.length;for(this.clear();++l<g;){var S=s[l];this.set(S[0],S[1])}}function C3(){this.size=0,this.__data__={hash:new Wn,map:new(Os||Zr),string:new Wn}}function R3(s){var l=Ma(this,s).delete(s);return this.size-=l?1:0,l}function I3(s){return Ma(this,s).get(s)}function P3(s){return Ma(this,s).has(s)}function N3(s,l){var g=Ma(this,s),S=g.size;return g.set(s,l),this.size+=g.size==S?0:1,this}Qr.prototype.clear=C3,Qr.prototype.delete=R3,Qr.prototype.get=I3,Qr.prototype.has=P3,Qr.prototype.set=N3;function Xn(s){var l=-1,g=s==null?0:s.length;for(this.__data__=new Qr;++l<g;)this.add(s[l])}function M3(s){return this.__data__.set(s,f),this}function k3(s){return this.__data__.has(s)}Xn.prototype.add=Xn.prototype.push=M3,Xn.prototype.has=k3;function Ir(s){var l=this.__data__=new Zr(s);this.size=l.size}function L3(){this.__data__=new Zr,this.size=0}function F3(s){var l=this.__data__,g=l.delete(s);return this.size=l.size,g}function B3(s){return this.__data__.get(s)}function D3(s){return this.__data__.has(s)}function U3(s,l){var g=this.__data__;if(g instanceof Zr){var S=g.__data__;if(!Os||S.length<i-1)return S.push([s,l]),this.size=++g.size,this;g=this.__data__=new Qr(S)}return g.set(s,l),this.size=g.size,this}Ir.prototype.clear=L3,Ir.prototype.delete=F3,Ir.prototype.get=B3,Ir.prototype.has=D3,Ir.prototype.set=U3;function wg(s,l){var g=Mt(s),S=!g&&Jn(s),N=!g&&!S&&Tn(s),D=!g&&!S&&!N&&Vi(s),H=g||S||N||D,K=H?hf(s.length,KM):[],tt=K.length;for(var ut in s)(l||ee.call(s,ut))&&!(H&&(ut=="length"||N&&(ut=="offset"||ut=="parent")||D&&(ut=="buffer"||ut=="byteLength"||ut=="byteOffset")||rn(ut,tt)))&&K.push(ut);return K}function Tg(s){var l=s.length;return l?s[Rf(0,l-1)]:r}function $3(s,l){return ka(Ve(s),Kn(l,0,s.length))}function G3(s){return ka(Ve(s))}function _f(s,l,g){(g!==r&&!Pr(s[l],g)||g===r&&!(l in s))&&Jr(s,l,g)}function Ps(s,l,g){var S=s[l];(!(ee.call(s,l)&&Pr(S,g))||g===r&&!(l in s))&&Jr(s,l,g)}function xa(s,l){for(var g=s.length;g--;)if(Pr(s[g][0],l))return g;return-1}function j3(s,l,g,S){return _n(s,function(N,D,H){l(S,N,g(N),H)}),S}function Eg(s,l){return s&&jr(l,Pe(l),s)}function q3(s,l){return s&&jr(l,Xe(l),s)}function Jr(s,l,g){l=="__proto__"&&va?va(s,l,{configurable:!0,enumerable:!0,value:g,writable:!0}):s[l]=g}function bf(s,l){for(var g=-1,S=l.length,N=st(S),D=s==null;++g<S;)N[g]=D?r:tc(s,l[g]);return N}function Kn(s,l,g){return s===s&&(g!==r&&(s=s<=g?s:g),l!==r&&(s=s>=l?s:l)),s}function pr(s,l,g,S,N,D){var H,K=l&p,tt=l&c,ut=l&v;if(g&&(H=N?g(s,S,N,D):g(s)),H!==r)return H;if(!me(s))return s;var ft=Mt(s);if(ft){if(H=Pk(s),!K)return Ve(s,H)}else{var ht=Ue(s),gt=ht==pt||ht==yt;if(Tn(s))return Xg(s,K);if(ht==Ht||ht==Y||gt&&!N){if(H=tt||gt?{}:dm(s),!K)return tt?bk(s,q3(H,s)):_k(s,Eg(H,s))}else{if(!ae[ht])return N?s:{};H=Nk(s,ht,K)}}D||(D=new Ir);var wt=D.get(s);if(wt)return wt;D.set(s,H),jm(s)?s.forEach(function(Ct){H.add(pr(Ct,l,g,Ct,s,D))}):$m(s)&&s.forEach(function(Ct,Ut){H.set(Ut,pr(Ct,l,g,Ut,s,D))});var Ot=ut?tt?$f:Uf:tt?Xe:Pe,Ft=ft?r:Ot(s);return cr(Ft||s,function(Ct,Ut){Ft&&(Ut=Ct,Ct=s[Ut]),Ps(H,Ut,pr(Ct,l,g,Ut,s,D))}),H}function z3(s){var l=Pe(s);return function(g){return Sg(g,s,l)}}function Sg(s,l,g){var S=g.length;if(s==null)return!S;for(s=ie(s);S--;){var N=g[S],D=l[N],H=s[N];if(H===r&&!(N in s)||!D(H))return!1}return!0}function Ag(s,l,g){if(typeof s!="function")throw new hr(a);return Ds(function(){s.apply(r,g)},l)}function Ns(s,l,g,S){var N=-1,D=ia,H=!0,K=s.length,tt=[],ut=l.length;if(!K)return tt;g&&(l=de(l,rr(g))),S?(D=of,H=!1):l.length>=i&&(D=Ss,H=!1,l=new Xn(l));t:for(;++N<K;){var ft=s[N],ht=g==null?ft:g(ft);if(ft=S||ft!==0?ft:0,H&&ht===ht){for(var gt=ut;gt--;)if(l[gt]===ht)continue t;tt.push(ft)}else D(l,ht,S)||tt.push(ft)}return tt}var _n=Jg(Gr),Og=Jg(wf,!0);function H3(s,l){var g=!0;return _n(s,function(S,N,D){return g=!!l(S,N,D),g}),g}function wa(s,l,g){for(var S=-1,N=s.length;++S<N;){var D=s[S],H=l(D);if(H!=null&&(K===r?H===H&&!ir(H):g(H,K)))var K=H,tt=D}return tt}function V3(s,l,g,S){var N=s.length;for(g=kt(g),g<0&&(g=-g>N?0:N+g),S=S===r||S>N?N:kt(S),S<0&&(S+=N),S=g>S?0:zm(S);g<S;)s[g++]=l;return s}function Cg(s,l){var g=[];return _n(s,function(S,N,D){l(S,N,D)&&g.push(S)}),g}function ke(s,l,g,S,N){var D=-1,H=s.length;for(g||(g=kk),N||(N=[]);++D<H;){var K=s[D];l>0&&g(K)?l>1?ke(K,l-1,g,S,N):gn(N,K):S||(N[N.length]=K)}return N}var xf=tm(),Rg=tm(!0);function Gr(s,l){return s&&xf(s,l,Pe)}function wf(s,l){return s&&Rg(s,l,Pe)}function Ta(s,l){return vn(l,function(g){return nn(s[g])})}function Yn(s,l){l=xn(l,s);for(var g=0,S=l.length;s!=null&&g<S;)s=s[qr(l[g++])];return g&&g==S?s:r}function Ig(s,l,g){var S=l(s);return Mt(s)?S:gn(S,g(s))}function je(s){return s==null?s===r?Lt:oe:Vn&&Vn in ie(s)?Ck(s):Gk(s)}function Tf(s,l){return s>l}function W3(s,l){return s!=null&&ee.call(s,l)}function X3(s,l){return s!=null&&l in ie(s)}function K3(s,l,g){return s>=De(l,g)&&s<Ae(l,g)}function Ef(s,l,g){for(var S=g?of:ia,N=s[0].length,D=s.length,H=D,K=st(D),tt=1/0,ut=[];H--;){var ft=s[H];H&&l&&(ft=de(ft,rr(l))),tt=De(ft.length,tt),K[H]=!g&&(l||N>=120&&ft.length>=120)?new Xn(H&&ft):r}ft=s[0];var ht=-1,gt=K[0];t:for(;++ht<N&&ut.length<tt;){var wt=ft[ht],Ot=l?l(wt):wt;if(wt=g||wt!==0?wt:0,!(gt?Ss(gt,Ot):S(ut,Ot,g))){for(H=D;--H;){var Ft=K[H];if(!(Ft?Ss(Ft,Ot):S(s[H],Ot,g)))continue t}gt&&gt.push(Ot),ut.push(wt)}}return ut}function Y3(s,l,g,S){return Gr(s,function(N,D,H){l(S,g(N),D,H)}),S}function Ms(s,l,g){l=xn(l,s),s=mm(s,l);var S=s==null?s:s[qr(gr(l))];return S==null?r:er(S,s,g)}function Pg(s){return ye(s)&&je(s)==Y}function Z3(s){return ye(s)&&je(s)==Ge}function Q3(s){return ye(s)&&je(s)==J}function ks(s,l,g,S,N){return s===l?!0:s==null||l==null||!ye(s)&&!ye(l)?s!==s&&l!==l:J3(s,l,g,S,ks,N)}function J3(s,l,g,S,N,D){var H=Mt(s),K=Mt(l),tt=H?$:Ue(s),ut=K?$:Ue(l);tt=tt==Y?Ht:tt,ut=ut==Y?Ht:ut;var ft=tt==Ht,ht=ut==Ht,gt=tt==ut;if(gt&&Tn(s)){if(!Tn(l))return!1;H=!0,ft=!1}if(gt&&!ft)return D||(D=new Ir),H||Vi(s)?fm(s,l,g,S,N,D):Ak(s,l,tt,g,S,N,D);if(!(g&y)){var wt=ft&&ee.call(s,"__wrapped__"),Ot=ht&&ee.call(l,"__wrapped__");if(wt||Ot){var Ft=wt?s.value():s,Ct=Ot?l.value():l;return D||(D=new Ir),N(Ft,Ct,g,S,D)}}return gt?(D||(D=new Ir),Ok(s,l,g,S,N,D)):!1}function tk(s){return ye(s)&&Ue(s)==xt}function Sf(s,l,g,S){var N=g.length,D=N,H=!S;if(s==null)return!D;for(s=ie(s);N--;){var K=g[N];if(H&&K[2]?K[1]!==s[K[0]]:!(K[0]in s))return!1}for(;++N<D;){K=g[N];var tt=K[0],ut=s[tt],ft=K[1];if(H&&K[2]){if(ut===r&&!(tt in s))return!1}else{var ht=new Ir;if(S)var gt=S(ut,ft,tt,s,l,ht);if(!(gt===r?ks(ft,ut,y|b,S,ht):gt))return!1}}return!0}function Ng(s){if(!me(s)||Fk(s))return!1;var l=nn(s)?t3:zN;return l.test(Qn(s))}function ek(s){return ye(s)&&je(s)==dt}function rk(s){return ye(s)&&Ue(s)==vt}function nk(s){return ye(s)&&$a(s.length)&&!!fe[je(s)]}function Mg(s){return typeof s=="function"?s:s==null?Ke:typeof s=="object"?Mt(s)?Fg(s[0],s[1]):Lg(s):ey(s)}function Af(s){if(!Bs(s))return o3(s);var l=[];for(var g in ie(s))ee.call(s,g)&&g!="constructor"&&l.push(g);return l}function ik(s){if(!me(s))return $k(s);var l=Bs(s),g=[];for(var S in s)S=="constructor"&&(l||!ee.call(s,S))||g.push(S);return g}function Of(s,l){return s<l}function kg(s,l){var g=-1,S=We(s)?st(s.length):[];return _n(s,function(N,D,H){S[++g]=l(N,D,H)}),S}function Lg(s){var l=jf(s);return l.length==1&&l[0][2]?vm(l[0][0],l[0][1]):function(g){return g===s||Sf(g,s,l)}}function Fg(s,l){return zf(s)&&pm(l)?vm(qr(s),l):function(g){var S=tc(g,s);return S===r&&S===l?ec(g,s):ks(l,S,y|b)}}function Ea(s,l,g,S,N){s!==l&&xf(l,function(D,H){if(N||(N=new Ir),me(D))sk(s,l,H,g,Ea,S,N);else{var K=S?S(Vf(s,H),D,H+"",s,l,N):r;K===r&&(K=D),_f(s,H,K)}},Xe)}function sk(s,l,g,S,N,D,H){var K=Vf(s,g),tt=Vf(l,g),ut=H.get(tt);if(ut){_f(s,g,ut);return}var ft=D?D(K,tt,g+"",s,l,H):r,ht=ft===r;if(ht){var gt=Mt(tt),wt=!gt&&Tn(tt),Ot=!gt&&!wt&&Vi(tt);ft=tt,gt||wt||Ot?Mt(K)?ft=K:xe(K)?ft=Ve(K):wt?(ht=!1,ft=Xg(tt,!0)):Ot?(ht=!1,ft=Kg(tt,!0)):ft=[]:Us(tt)||Jn(tt)?(ft=K,Jn(K)?ft=Hm(K):(!me(K)||nn(K))&&(ft=dm(tt))):ht=!1}ht&&(H.set(tt,ft),N(ft,tt,S,D,H),H.delete(tt)),_f(s,g,ft)}function Bg(s,l){var g=s.length;if(g)return l+=l<0?g:0,rn(l,g)?s[l]:r}function Dg(s,l,g){l.length?l=de(l,function(D){return Mt(D)?function(H){return Yn(H,D.length===1?D[0]:D)}:D}):l=[Ke];var S=-1;l=de(l,rr(St()));var N=kg(s,function(D,H,K){var tt=de(l,function(ut){return ut(D)});return{criteria:tt,index:++S,value:D}});return NM(N,function(D,H){return yk(D,H,g)})}function ok(s,l){return Ug(s,l,function(g,S){return ec(s,S)})}function Ug(s,l,g){for(var S=-1,N=l.length,D={};++S<N;){var H=l[S],K=Yn(s,H);g(K,H)&&Ls(D,xn(H,s),K)}return D}function ak(s){return function(l){return Yn(l,s)}}function Cf(s,l,g,S){var N=S?PM:Li,D=-1,H=l.length,K=s;for(s===l&&(l=Ve(l)),g&&(K=de(s,rr(g)));++D<H;)for(var tt=0,ut=l[D],ft=g?g(ut):ut;(tt=N(K,ft,tt,S))>-1;)K!==s&&pa.call(K,tt,1),pa.call(s,tt,1);return s}function $g(s,l){for(var g=s?l.length:0,S=g-1;g--;){var N=l[g];if(g==S||N!==D){var D=N;rn(N)?pa.call(s,N,1):Nf(s,N)}}return s}function Rf(s,l){return s+ma(bg()*(l-s+1))}function lk(s,l,g,S){for(var N=-1,D=Ae(ga((l-s)/(g||1)),0),H=st(D);D--;)H[S?D:++N]=s,s+=g;return H}function If(s,l){var g="";if(!s||l<1||l>nt)return g;do l%2&&(g+=s),l=ma(l/2),l&&(s+=s);while(l);return g}function Bt(s,l){return Wf(gm(s,l,Ke),s+"")}function uk(s){return Tg(Wi(s))}function fk(s,l){var g=Wi(s);return ka(g,Kn(l,0,g.length))}function Ls(s,l,g,S){if(!me(s))return s;l=xn(l,s);for(var N=-1,D=l.length,H=D-1,K=s;K!=null&&++N<D;){var tt=qr(l[N]),ut=g;if(tt==="__proto__"||tt==="constructor"||tt==="prototype")return s;if(N!=H){var ft=K[tt];ut=S?S(ft,tt,K):r,ut===r&&(ut=me(ft)?ft:rn(l[N+1])?[]:{})}Ps(K,tt,ut),K=K[tt]}return s}var Gg=ya?function(s,l){return ya.set(s,l),s}:Ke,ck=va?function(s,l){return va(s,"toString",{configurable:!0,enumerable:!1,value:nc(l),writable:!0})}:Ke;function hk(s){return ka(Wi(s))}function vr(s,l,g){var S=-1,N=s.length;l<0&&(l=-l>N?0:N+l),g=g>N?N:g,g<0&&(g+=N),N=l>g?0:g-l>>>0,l>>>=0;for(var D=st(N);++S<N;)D[S]=s[S+l];return D}function dk(s,l){var g;return _n(s,function(S,N,D){return g=l(S,N,D),!g}),!!g}function Sa(s,l,g){var S=0,N=s==null?S:s.length;if(typeof l=="number"&&l===l&&N<=G){for(;S<N;){var D=S+N>>>1,H=s[D];H!==null&&!ir(H)&&(g?H<=l:H<l)?S=D+1:N=D}return N}return Pf(s,l,Ke,g)}function Pf(s,l,g,S){var N=0,D=s==null?0:s.length;if(D===0)return 0;l=g(l);for(var H=l!==l,K=l===null,tt=ir(l),ut=l===r;N<D;){var ft=ma((N+D)/2),ht=g(s[ft]),gt=ht!==r,wt=ht===null,Ot=ht===ht,Ft=ir(ht);if(H)var Ct=S||Ot;else ut?Ct=Ot&&(S||gt):K?Ct=Ot&&gt&&(S||!wt):tt?Ct=Ot&&gt&&!wt&&(S||!Ft):wt||Ft?Ct=!1:Ct=S?ht<=l:ht<l;Ct?N=ft+1:D=ft}return De(D,j)}function jg(s,l){for(var g=-1,S=s.length,N=0,D=[];++g<S;){var H=s[g],K=l?l(H):H;if(!g||!Pr(K,tt)){var tt=K;D[N++]=H===0?0:H}}return D}function qg(s){return typeof s=="number"?s:ir(s)?U:+s}function nr(s){if(typeof s=="string")return s;if(Mt(s))return de(s,nr)+"";if(ir(s))return xg?xg.call(s):"";var l=s+"";return l=="0"&&1/s==-z?"-0":l}function bn(s,l,g){var S=-1,N=ia,D=s.length,H=!0,K=[],tt=K;if(g)H=!1,N=of;else if(D>=i){var ut=l?null:Ek(s);if(ut)return oa(ut);H=!1,N=Ss,tt=new Xn}else tt=l?[]:K;t:for(;++S<D;){var ft=s[S],ht=l?l(ft):ft;if(ft=g||ft!==0?ft:0,H&&ht===ht){for(var gt=tt.length;gt--;)if(tt[gt]===ht)continue t;l&&tt.push(ht),K.push(ft)}else N(tt,ht,g)||(tt!==K&&tt.push(ht),K.push(ft))}return K}function Nf(s,l){return l=xn(l,s),s=mm(s,l),s==null||delete s[qr(gr(l))]}function zg(s,l,g,S){return Ls(s,l,g(Yn(s,l)),S)}function Aa(s,l,g,S){for(var N=s.length,D=S?N:-1;(S?D--:++D<N)&&l(s[D],D,s););return g?vr(s,S?0:D,S?D+1:N):vr(s,S?D+1:0,S?N:D)}function Hg(s,l){var g=s;return g instanceof Gt&&(g=g.value()),af(l,function(S,N){return N.func.apply(N.thisArg,gn([S],N.args))},g)}function Mf(s,l,g){var S=s.length;if(S<2)return S?bn(s[0]):[];for(var N=-1,D=st(S);++N<S;)for(var H=s[N],K=-1;++K<S;)K!=N&&(D[N]=Ns(D[N]||H,s[K],l,g));return bn(ke(D,1),l,g)}function Vg(s,l,g){for(var S=-1,N=s.length,D=l.length,H={};++S<N;){var K=S<D?l[S]:r;g(H,s[S],K)}return H}function kf(s){return xe(s)?s:[]}function Lf(s){return typeof s=="function"?s:Ke}function xn(s,l){return Mt(s)?s:zf(s,l)?[s]:xm(Jt(s))}var pk=Bt;function wn(s,l,g){var S=s.length;return g=g===r?S:g,!l&&g>=S?s:vr(s,l,g)}var Wg=e3||function(s){return Me.clearTimeout(s)};function Xg(s,l){if(l)return s.slice();var g=s.length,S=vg?vg(g):new s.constructor(g);return s.copy(S),S}function Ff(s){var l=new s.constructor(s.byteLength);return new ha(l).set(new ha(s)),l}function vk(s,l){var g=l?Ff(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.byteLength)}function gk(s){var l=new s.constructor(s.source,Pv.exec(s));return l.lastIndex=s.lastIndex,l}function mk(s){return Is?ie(Is.call(s)):{}}function Kg(s,l){var g=l?Ff(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.length)}function Yg(s,l){if(s!==l){var g=s!==r,S=s===null,N=s===s,D=ir(s),H=l!==r,K=l===null,tt=l===l,ut=ir(l);if(!K&&!ut&&!D&&s>l||D&&H&&tt&&!K&&!ut||S&&H&&tt||!g&&tt||!N)return 1;if(!S&&!D&&!ut&&s<l||ut&&g&&N&&!S&&!D||K&&g&&N||!H&&N||!tt)return-1}return 0}function yk(s,l,g){for(var S=-1,N=s.criteria,D=l.criteria,H=N.length,K=g.length;++S<H;){var tt=Yg(N[S],D[S]);if(tt){if(S>=K)return tt;var ut=g[S];return tt*(ut=="desc"?-1:1)}}return s.index-l.index}function Zg(s,l,g,S){for(var N=-1,D=s.length,H=g.length,K=-1,tt=l.length,ut=Ae(D-H,0),ft=st(tt+ut),ht=!S;++K<tt;)ft[K]=l[K];for(;++N<H;)(ht||N<D)&&(ft[g[N]]=s[N]);for(;ut--;)ft[K++]=s[N++];return ft}function Qg(s,l,g,S){for(var N=-1,D=s.length,H=-1,K=g.length,tt=-1,ut=l.length,ft=Ae(D-K,0),ht=st(ft+ut),gt=!S;++N<ft;)ht[N]=s[N];for(var wt=N;++tt<ut;)ht[wt+tt]=l[tt];for(;++H<K;)(gt||N<D)&&(ht[wt+g[H]]=s[N++]);return ht}function Ve(s,l){var g=-1,S=s.length;for(l||(l=st(S));++g<S;)l[g]=s[g];return l}function jr(s,l,g,S){var N=!g;g||(g={});for(var D=-1,H=l.length;++D<H;){var K=l[D],tt=S?S(g[K],s[K],K,g,s):r;tt===r&&(tt=s[K]),N?Jr(g,K,tt):Ps(g,K,tt)}return g}function _k(s,l){return jr(s,qf(s),l)}function bk(s,l){return jr(s,cm(s),l)}function Oa(s,l){return function(g,S){var N=Mt(g)?SM:j3,D=l?l():{};return N(g,s,St(S,2),D)}}function qi(s){return Bt(function(l,g){var S=-1,N=g.length,D=N>1?g[N-1]:r,H=N>2?g[2]:r;for(D=s.length>3&&typeof D=="function"?(N--,D):r,H&&qe(g[0],g[1],H)&&(D=N<3?r:D,N=1),l=ie(l);++S<N;){var K=g[S];K&&s(l,K,S,D)}return l})}function Jg(s,l){return function(g,S){if(g==null)return g;if(!We(g))return s(g,S);for(var N=g.length,D=l?N:-1,H=ie(g);(l?D--:++D<N)&&S(H[D],D,H)!==!1;);return g}}function tm(s){return function(l,g,S){for(var N=-1,D=ie(l),H=S(l),K=H.length;K--;){var tt=H[s?K:++N];if(g(D[tt],tt,D)===!1)break}return l}}function xk(s,l,g){var S=l&_,N=Fs(s);function D(){var H=this&&this!==Me&&this instanceof D?N:s;return H.apply(S?g:this,arguments)}return D}function em(s){return function(l){l=Jt(l);var g=Fi(l)?Rr(l):r,S=g?g[0]:l.charAt(0),N=g?wn(g,1).join(""):l.slice(1);return S[s]()+N}}function zi(s){return function(l){return af(Jm(Qm(l).replace(cM,"")),s,"")}}function Fs(s){return function(){var l=arguments;switch(l.length){case 0:return new s;case 1:return new s(l[0]);case 2:return new s(l[0],l[1]);case 3:return new s(l[0],l[1],l[2]);case 4:return new s(l[0],l[1],l[2],l[3]);case 5:return new s(l[0],l[1],l[2],l[3],l[4]);case 6:return new s(l[0],l[1],l[2],l[3],l[4],l[5]);case 7:return new s(l[0],l[1],l[2],l[3],l[4],l[5],l[6])}var g=ji(s.prototype),S=s.apply(g,l);return me(S)?S:g}}function wk(s,l,g){var S=Fs(s);function N(){for(var D=arguments.length,H=st(D),K=D,tt=Hi(N);K--;)H[K]=arguments[K];var ut=D<3&&H[0]!==tt&&H[D-1]!==tt?[]:mn(H,tt);if(D-=ut.length,D<g)return om(s,l,Ca,N.placeholder,r,H,ut,r,r,g-D);var ft=this&&this!==Me&&this instanceof N?S:s;return er(ft,this,H)}return N}function rm(s){return function(l,g,S){var N=ie(l);if(!We(l)){var D=St(g,3);l=Pe(l),g=function(K){return D(N[K],K,N)}}var H=s(l,g,S);return H>-1?N[D?l[H]:H]:r}}function nm(s){return en(function(l){var g=l.length,S=g,N=dr.prototype.thru;for(s&&l.reverse();S--;){var D=l[S];if(typeof D!="function")throw new hr(a);if(N&&!H&&Na(D)=="wrapper")var H=new dr([],!0)}for(S=H?S:g;++S<g;){D=l[S];var K=Na(D),tt=K=="wrapper"?Gf(D):r;tt&&Hf(tt[0])&&tt[1]==(A|T|E|O)&&!tt[4].length&&tt[9]==1?H=H[Na(tt[0])].apply(H,tt[3]):H=D.length==1&&Hf(D)?H[K]():H.thru(D)}return function(){var ut=arguments,ft=ut[0];if(H&&ut.length==1&&Mt(ft))return H.plant(ft).value();for(var ht=0,gt=g?l[ht].apply(this,ut):ft;++ht<g;)gt=l[ht].call(this,gt);return gt}})}function Ca(s,l,g,S,N,D,H,K,tt,ut){var ft=l&A,ht=l&_,gt=l&m,wt=l&(T|x),Ot=l&L,Ft=gt?r:Fs(s);function Ct(){for(var Ut=arguments.length,qt=st(Ut),sr=Ut;sr--;)qt[sr]=arguments[sr];if(wt)var ze=Hi(Ct),or=kM(qt,ze);if(S&&(qt=Zg(qt,S,N,wt)),D&&(qt=Qg(qt,D,H,wt)),Ut-=or,wt&&Ut<ut){var we=mn(qt,ze);return om(s,l,Ca,Ct.placeholder,g,qt,we,K,tt,ut-Ut)}var Nr=ht?g:this,on=gt?Nr[s]:s;return Ut=qt.length,K?qt=jk(qt,K):Ot&&Ut>1&&qt.reverse(),ft&&tt<Ut&&(qt.length=tt),this&&this!==Me&&this instanceof Ct&&(on=Ft||Fs(on)),on.apply(Nr,qt)}return Ct}function im(s,l){return function(g,S){return Y3(g,s,l(S),{})}}function Ra(s,l){return function(g,S){var N;if(g===r&&S===r)return l;if(g!==r&&(N=g),S!==r){if(N===r)return S;typeof g=="string"||typeof S=="string"?(g=nr(g),S=nr(S)):(g=qg(g),S=qg(S)),N=s(g,S)}return N}}function Bf(s){return en(function(l){return l=de(l,rr(St())),Bt(function(g){var S=this;return s(l,function(N){return er(N,S,g)})})})}function Ia(s,l){l=l===r?" ":nr(l);var g=l.length;if(g<2)return g?If(l,s):l;var S=If(l,ga(s/Bi(l)));return Fi(l)?wn(Rr(S),0,s).join(""):S.slice(0,s)}function Tk(s,l,g,S){var N=l&_,D=Fs(s);function H(){for(var K=-1,tt=arguments.length,ut=-1,ft=S.length,ht=st(ft+tt),gt=this&&this!==Me&&this instanceof H?D:s;++ut<ft;)ht[ut]=S[ut];for(;tt--;)ht[ut++]=arguments[++K];return er(gt,N?g:this,ht)}return H}function sm(s){return function(l,g,S){return S&&typeof S!="number"&&qe(l,g,S)&&(g=S=r),l=sn(l),g===r?(g=l,l=0):g=sn(g),S=S===r?l<g?1:-1:sn(S),lk(l,g,S,s)}}function Pa(s){return function(l,g){return typeof l=="string"&&typeof g=="string"||(l=mr(l),g=mr(g)),s(l,g)}}function om(s,l,g,S,N,D,H,K,tt,ut){var ft=l&T,ht=ft?H:r,gt=ft?r:H,wt=ft?D:r,Ot=ft?r:D;l|=ft?E:I,l&=~(ft?I:E),l&w||(l&=~(_|m));var Ft=[s,l,N,wt,ht,Ot,gt,K,tt,ut],Ct=g.apply(r,Ft);return Hf(s)&&ym(Ct,Ft),Ct.placeholder=S,_m(Ct,s,l)}function Df(s){var l=Se[s];return function(g,S){if(g=mr(g),S=S==null?0:De(kt(S),292),S&&_g(g)){var N=(Jt(g)+"e").split("e"),D=l(N[0]+"e"+(+N[1]+S));return N=(Jt(D)+"e").split("e"),+(N[0]+"e"+(+N[1]-S))}return l(g)}}var Ek=$i&&1/oa(new $i([,-0]))[1]==z?function(s){return new $i(s)}:oc;function am(s){return function(l){var g=Ue(l);return g==xt?pf(l):g==vt?GM(l):MM(l,s(l))}}function tn(s,l,g,S,N,D,H,K){var tt=l&m;if(!tt&&typeof s!="function")throw new hr(a);var ut=S?S.length:0;if(ut||(l&=~(E|I),S=N=r),H=H===r?H:Ae(kt(H),0),K=K===r?K:kt(K),ut-=N?N.length:0,l&I){var ft=S,ht=N;S=N=r}var gt=tt?r:Gf(s),wt=[s,l,g,S,N,ft,ht,D,H,K];if(gt&&Uk(wt,gt),s=wt[0],l=wt[1],g=wt[2],S=wt[3],N=wt[4],K=wt[9]=wt[9]===r?tt?0:s.length:Ae(wt[9]-ut,0),!K&&l&(T|x)&&(l&=~(T|x)),!l||l==_)var Ot=xk(s,l,g);else l==T||l==x?Ot=wk(s,l,K):(l==E||l==(_|E))&&!N.length?Ot=Tk(s,l,g,S):Ot=Ca.apply(r,wt);var Ft=gt?Gg:ym;return _m(Ft(Ot,wt),s,l)}function lm(s,l,g,S){return s===r||Pr(s,Ui[g])&&!ee.call(S,g)?l:s}function um(s,l,g,S,N,D){return me(s)&&me(l)&&(D.set(l,s),Ea(s,l,r,um,D),D.delete(l)),s}function Sk(s){return Us(s)?r:s}function fm(s,l,g,S,N,D){var H=g&y,K=s.length,tt=l.length;if(K!=tt&&!(H&&tt>K))return!1;var ut=D.get(s),ft=D.get(l);if(ut&&ft)return ut==l&&ft==s;var ht=-1,gt=!0,wt=g&b?new Xn:r;for(D.set(s,l),D.set(l,s);++ht<K;){var Ot=s[ht],Ft=l[ht];if(S)var Ct=H?S(Ft,Ot,ht,l,s,D):S(Ot,Ft,ht,s,l,D);if(Ct!==r){if(Ct)continue;gt=!1;break}if(wt){if(!lf(l,function(Ut,qt){if(!Ss(wt,qt)&&(Ot===Ut||N(Ot,Ut,g,S,D)))return wt.push(qt)})){gt=!1;break}}else if(!(Ot===Ft||N(Ot,Ft,g,S,D))){gt=!1;break}}return D.delete(s),D.delete(l),gt}function Ak(s,l,g,S,N,D,H){switch(g){case Qt:if(s.byteLength!=l.byteLength||s.byteOffset!=l.byteOffset)return!1;s=s.buffer,l=l.buffer;case Ge:return!(s.byteLength!=l.byteLength||!D(new ha(s),new ha(l)));case et:case J:case At:return Pr(+s,+l);case lt:return s.name==l.name&&s.message==l.message;case dt:case ct:return s==l+"";case xt:var K=pf;case vt:var tt=S&y;if(K||(K=oa),s.size!=l.size&&!tt)return!1;var ut=H.get(s);if(ut)return ut==l;S|=b,H.set(s,l);var ft=fm(K(s),K(l),S,N,D,H);return H.delete(s),ft;case Pt:if(Is)return Is.call(s)==Is.call(l)}return!1}function Ok(s,l,g,S,N,D){var H=g&y,K=Uf(s),tt=K.length,ut=Uf(l),ft=ut.length;if(tt!=ft&&!H)return!1;for(var ht=tt;ht--;){var gt=K[ht];if(!(H?gt in l:ee.call(l,gt)))return!1}var wt=D.get(s),Ot=D.get(l);if(wt&&Ot)return wt==l&&Ot==s;var Ft=!0;D.set(s,l),D.set(l,s);for(var Ct=H;++ht<tt;){gt=K[ht];var Ut=s[gt],qt=l[gt];if(S)var sr=H?S(qt,Ut,gt,l,s,D):S(Ut,qt,gt,s,l,D);if(!(sr===r?Ut===qt||N(Ut,qt,g,S,D):sr)){Ft=!1;break}Ct||(Ct=gt=="constructor")}if(Ft&&!Ct){var ze=s.constructor,or=l.constructor;ze!=or&&"constructor"in s&&"constructor"in l&&!(typeof ze=="function"&&ze instanceof ze&&typeof or=="function"&&or instanceof or)&&(Ft=!1)}return D.delete(s),D.delete(l),Ft}function en(s){return Wf(gm(s,r,Sm),s+"")}function Uf(s){return Ig(s,Pe,qf)}function $f(s){return Ig(s,Xe,cm)}var Gf=ya?function(s){return ya.get(s)}:oc;function Na(s){for(var l=s.name+"",g=Gi[l],S=ee.call(Gi,l)?g.length:0;S--;){var N=g[S],D=N.func;if(D==null||D==s)return N.name}return l}function Hi(s){var l=ee.call(B,"placeholder")?B:s;return l.placeholder}function St(){var s=B.iteratee||ic;return s=s===ic?Mg:s,arguments.length?s(arguments[0],arguments[1]):s}function Ma(s,l){var g=s.__data__;return Lk(l)?g[typeof l=="string"?"string":"hash"]:g.map}function jf(s){for(var l=Pe(s),g=l.length;g--;){var S=l[g],N=s[S];l[g]=[S,N,pm(N)]}return l}function Zn(s,l){var g=DM(s,l);return Ng(g)?g:r}function Ck(s){var l=ee.call(s,Vn),g=s[Vn];try{s[Vn]=r;var S=!0}catch{}var N=fa.call(s);return S&&(l?s[Vn]=g:delete s[Vn]),N}var qf=gf?function(s){return s==null?[]:(s=ie(s),vn(gf(s),function(l){return mg.call(s,l)}))}:ac,cm=gf?function(s){for(var l=[];s;)gn(l,qf(s)),s=da(s);return l}:ac,Ue=je;(mf&&Ue(new mf(new ArrayBuffer(1)))!=Qt||Os&&Ue(new Os)!=xt||yf&&Ue(yf.resolve())!=rt||$i&&Ue(new $i)!=vt||Cs&&Ue(new Cs)!=Nt)&&(Ue=function(s){var l=je(s),g=l==Ht?s.constructor:r,S=g?Qn(g):"";if(S)switch(S){case f3:return Qt;case c3:return xt;case h3:return rt;case d3:return vt;case p3:return Nt}return l});function Rk(s,l,g){for(var S=-1,N=g.length;++S<N;){var D=g[S],H=D.size;switch(D.type){case"drop":s+=H;break;case"dropRight":l-=H;break;case"take":l=De(l,s+H);break;case"takeRight":s=Ae(s,l-H);break}}return{start:s,end:l}}function Ik(s){var l=s.match(FN);return l?l[1].split(BN):[]}function hm(s,l,g){l=xn(l,s);for(var S=-1,N=l.length,D=!1;++S<N;){var H=qr(l[S]);if(!(D=s!=null&&g(s,H)))break;s=s[H]}return D||++S!=N?D:(N=s==null?0:s.length,!!N&&$a(N)&&rn(H,N)&&(Mt(s)||Jn(s)))}function Pk(s){var l=s.length,g=new s.constructor(l);return l&&typeof s[0]=="string"&&ee.call(s,"index")&&(g.index=s.index,g.input=s.input),g}function dm(s){return typeof s.constructor=="function"&&!Bs(s)?ji(da(s)):{}}function Nk(s,l,g){var S=s.constructor;switch(l){case Ge:return Ff(s);case et:case J:return new S(+s);case Qt:return vk(s,g);case Es:case he:case ur:case zu:case Hu:case Vu:case Wu:case Xu:case Ku:return Kg(s,g);case xt:return new S;case At:case ct:return new S(s);case dt:return gk(s);case vt:return new S;case Pt:return mk(s)}}function Mk(s,l){var g=l.length;if(!g)return s;var S=g-1;return l[S]=(g>1?"& ":"")+l[S],l=l.join(g>2?", ":" "),s.replace(LN,`{
1942
1942
  /* [wrapped with `+l+`] */
1943
- `)}function kk(s){return Mt(s)||Jn(s)||!!(yg&&s&&s[yg])}function rn(s,l){var g=typeof s;return l=l??nt,!!l&&(g=="number"||g!="symbol"&&VN.test(s))&&s>-1&&s%1==0&&s<l}function qe(s,l,g){if(!me(g))return!1;var S=typeof l;return(S=="number"?We(g)&&rn(l,g.length):S=="string"&&l in g)?Pr(g[l],s):!1}function zf(s,l){if(Mt(s))return!1;var g=typeof s;return g=="number"||g=="symbol"||g=="boolean"||s==null||ir(s)?!0:PN.test(s)||!IN.test(s)||l!=null&&s in ie(l)}function Lk(s){var l=typeof s;return l=="string"||l=="number"||l=="symbol"||l=="boolean"?s!=="__proto__":s===null}function Hf(s){var l=Na(s),g=B[l];if(typeof g!="function"||!(l in Gt.prototype))return!1;if(s===g)return!0;var S=Gf(g);return!!S&&s===S[0]}function Fk(s){return!!pg&&pg in s}var Bk=la?nn:lc;function Bs(s){var l=s&&s.constructor,g=typeof l=="function"&&l.prototype||Ui;return s===g}function pm(s){return s===s&&!me(s)}function vm(s,l){return function(g){return g==null?!1:g[s]===l&&(l!==r||s in ie(g))}}function Dk(s){var l=Da(s,function(S){return g.size===h&&g.clear(),S}),g=l.cache;return l}function Uk(s,l){var g=s[1],S=l[1],N=g|S,D=N<(_|m|A),H=S==A&&g==T||S==A&&g==O&&s[7].length<=l[8]||S==(A|O)&&l[7].length<=l[8]&&g==T;if(!(D||H))return s;S&_&&(s[2]=l[2],N|=g&_?0:w);var K=l[3];if(K){var tt=s[3];s[3]=tt?Zg(tt,K,l[4]):K,s[4]=tt?mn(s[3],d):l[4]}return K=l[5],K&&(tt=s[5],s[5]=tt?Qg(tt,K,l[6]):K,s[6]=tt?mn(s[5],d):l[6]),K=l[7],K&&(s[7]=K),S&A&&(s[8]=s[8]==null?l[8]:De(s[8],l[8])),s[9]==null&&(s[9]=l[9]),s[0]=l[0],s[1]=N,s}function $k(s){var l=[];if(s!=null)for(var g in ie(s))l.push(g);return l}function Gk(s){return fa.call(s)}function gm(s,l,g){return l=Ae(l===r?s.length-1:l,0),function(){for(var S=arguments,N=-1,D=Ae(S.length-l,0),H=st(D);++N<D;)H[N]=S[l+N];N=-1;for(var K=st(l+1);++N<l;)K[N]=S[N];return K[l]=g(H),er(s,this,K)}}function mm(s,l){return l.length<2?s:Yn(s,vr(l,0,-1))}function jk(s,l){for(var g=s.length,S=De(l.length,g),N=Ve(s);S--;){var D=l[S];s[S]=rn(D,g)?N[D]:r}return s}function Vf(s,l){if(!(l==="constructor"&&typeof s[l]=="function")&&l!="__proto__")return s[l]}var ym=bm(Gg),Ds=n3||function(s,l){return Me.setTimeout(s,l)},Wf=bm(ck);function _m(s,l,g){var S=l+"";return Wf(s,Mk(S,qk(Ik(S),g)))}function bm(s){var l=0,g=0;return function(){var S=a3(),N=M-(S-g);if(g=S,N>0){if(++l>=P)return arguments[0]}else l=0;return s.apply(r,arguments)}}function ka(s,l){var g=-1,S=s.length,N=S-1;for(l=l===r?S:l;++g<l;){var D=Rf(g,N),H=s[D];s[D]=s[g],s[g]=H}return s.length=l,s}var xm=Dk(function(s){var l=[];return s.charCodeAt(0)===46&&l.push(""),s.replace(NN,function(g,S,N,D){l.push(N?D.replace($N,"$1"):S||g)}),l});function qr(s){if(typeof s=="string"||ir(s))return s;var l=s+"";return l=="0"&&1/s==-z?"-0":l}function Qn(s){if(s!=null){try{return ua.call(s)}catch{}try{return s+""}catch{}}return""}function qk(s,l){return cr(X,function(g){var S="_."+g[0];l&g[1]&&!ia(s,S)&&s.push(S)}),s.sort()}function wm(s){if(s instanceof Gt)return s.clone();var l=new dr(s.__wrapped__,s.__chain__);return l.__actions__=Ve(s.__actions__),l.__index__=s.__index__,l.__values__=s.__values__,l}function zk(s,l,g){(g?qe(s,l,g):l===r)?l=1:l=Ae(kt(l),0);var S=s==null?0:s.length;if(!S||l<1)return[];for(var N=0,D=0,H=st(ga(S/l));N<S;)H[D++]=vr(s,N,N+=l);return H}function Hk(s){for(var l=-1,g=s==null?0:s.length,S=0,N=[];++l<g;){var D=s[l];D&&(N[S++]=D)}return N}function Vk(){var s=arguments.length;if(!s)return[];for(var l=st(s-1),g=arguments[0],S=s;S--;)l[S-1]=arguments[S];return gn(Mt(g)?Ve(g):[g],ke(l,1))}var Wk=Bt(function(s,l){return xe(s)?Ns(s,ke(l,1,xe,!0)):[]}),Xk=Bt(function(s,l){var g=gr(l);return xe(g)&&(g=r),xe(s)?Ns(s,ke(l,1,xe,!0),St(g,2)):[]}),Kk=Bt(function(s,l){var g=gr(l);return xe(g)&&(g=r),xe(s)?Ns(s,ke(l,1,xe,!0),r,g):[]});function Yk(s,l,g){var S=s==null?0:s.length;return S?(l=g||l===r?1:kt(l),vr(s,l<0?0:l,S)):[]}function Zk(s,l,g){var S=s==null?0:s.length;return S?(l=g||l===r?1:kt(l),l=S-l,vr(s,0,l<0?0:l)):[]}function Qk(s,l){return s&&s.length?Aa(s,St(l,3),!0,!0):[]}function Jk(s,l){return s&&s.length?Aa(s,St(l,3),!0):[]}function t5(s,l,g,S){var N=s==null?0:s.length;return N?(g&&typeof g!="number"&&qe(s,l,g)&&(g=0,S=N),V3(s,l,g,S)):[]}function Tm(s,l,g){var S=s==null?0:s.length;if(!S)return-1;var N=g==null?0:kt(g);return N<0&&(N=Ae(S+N,0)),sa(s,St(l,3),N)}function Em(s,l,g){var S=s==null?0:s.length;if(!S)return-1;var N=S-1;return g!==r&&(N=kt(g),N=g<0?Ae(S+N,0):De(N,S-1)),sa(s,St(l,3),N,!0)}function Sm(s){var l=s==null?0:s.length;return l?ke(s,1):[]}function e5(s){var l=s==null?0:s.length;return l?ke(s,z):[]}function r5(s,l){var g=s==null?0:s.length;return g?(l=l===r?1:kt(l),ke(s,l)):[]}function n5(s){for(var l=-1,g=s==null?0:s.length,S={};++l<g;){var N=s[l];S[N[0]]=N[1]}return S}function Am(s){return s&&s.length?s[0]:r}function i5(s,l,g){var S=s==null?0:s.length;if(!S)return-1;var N=g==null?0:kt(g);return N<0&&(N=Ae(S+N,0)),Li(s,l,N)}function s5(s){var l=s==null?0:s.length;return l?vr(s,0,-1):[]}var o5=Bt(function(s){var l=de(s,kf);return l.length&&l[0]===s[0]?Ef(l):[]}),a5=Bt(function(s){var l=gr(s),g=de(s,kf);return l===gr(g)?l=r:g.pop(),g.length&&g[0]===s[0]?Ef(g,St(l,2)):[]}),l5=Bt(function(s){var l=gr(s),g=de(s,kf);return l=typeof l=="function"?l:r,l&&g.pop(),g.length&&g[0]===s[0]?Ef(g,r,l):[]});function u5(s,l){return s==null?"":s3.call(s,l)}function gr(s){var l=s==null?0:s.length;return l?s[l-1]:r}function f5(s,l,g){var S=s==null?0:s.length;if(!S)return-1;var N=S;return g!==r&&(N=kt(g),N=N<0?Ae(S+N,0):De(N,S-1)),l===l?qM(s,l,N):sa(s,og,N,!0)}function c5(s,l){return s&&s.length?Bg(s,kt(l)):r}var h5=Bt(Om);function Om(s,l){return s&&s.length&&l&&l.length?Cf(s,l):s}function d5(s,l,g){return s&&s.length&&l&&l.length?Cf(s,l,St(g,2)):s}function p5(s,l,g){return s&&s.length&&l&&l.length?Cf(s,l,r,g):s}var v5=en(function(s,l){var g=s==null?0:s.length,S=bf(s,l);return $g(s,de(l,function(N){return rn(N,g)?+N:N}).sort(Yg)),S});function g5(s,l){var g=[];if(!(s&&s.length))return g;var S=-1,N=[],D=s.length;for(l=St(l,3);++S<D;){var H=s[S];l(H,S,s)&&(g.push(H),N.push(S))}return $g(s,N),g}function Xf(s){return s==null?s:u3.call(s)}function m5(s,l,g){var S=s==null?0:s.length;return S?(g&&typeof g!="number"&&qe(s,l,g)?(l=0,g=S):(l=l==null?0:kt(l),g=g===r?S:kt(g)),vr(s,l,g)):[]}function y5(s,l){return Sa(s,l)}function _5(s,l,g){return Pf(s,l,St(g,2))}function b5(s,l){var g=s==null?0:s.length;if(g){var S=Sa(s,l);if(S<g&&Pr(s[S],l))return S}return-1}function x5(s,l){return Sa(s,l,!0)}function w5(s,l,g){return Pf(s,l,St(g,2),!0)}function T5(s,l){var g=s==null?0:s.length;if(g){var S=Sa(s,l,!0)-1;if(Pr(s[S],l))return S}return-1}function E5(s){return s&&s.length?jg(s):[]}function S5(s,l){return s&&s.length?jg(s,St(l,2)):[]}function A5(s){var l=s==null?0:s.length;return l?vr(s,1,l):[]}function O5(s,l,g){return s&&s.length?(l=g||l===r?1:kt(l),vr(s,0,l<0?0:l)):[]}function C5(s,l,g){var S=s==null?0:s.length;return S?(l=g||l===r?1:kt(l),l=S-l,vr(s,l<0?0:l,S)):[]}function R5(s,l){return s&&s.length?Aa(s,St(l,3),!1,!0):[]}function I5(s,l){return s&&s.length?Aa(s,St(l,3)):[]}var P5=Bt(function(s){return bn(ke(s,1,xe,!0))}),N5=Bt(function(s){var l=gr(s);return xe(l)&&(l=r),bn(ke(s,1,xe,!0),St(l,2))}),M5=Bt(function(s){var l=gr(s);return l=typeof l=="function"?l:r,bn(ke(s,1,xe,!0),r,l)});function k5(s){return s&&s.length?bn(s):[]}function L5(s,l){return s&&s.length?bn(s,St(l,2)):[]}function F5(s,l){return l=typeof l=="function"?l:r,s&&s.length?bn(s,r,l):[]}function Kf(s){if(!(s&&s.length))return[];var l=0;return s=vn(s,function(g){if(xe(g))return l=Ae(g.length,l),!0}),hf(l,function(g){return de(s,uf(g))})}function Cm(s,l){if(!(s&&s.length))return[];var g=Kf(s);return l==null?g:de(g,function(S){return er(l,r,S)})}var B5=Bt(function(s,l){return xe(s)?Ns(s,l):[]}),D5=Bt(function(s){return Mf(vn(s,xe))}),U5=Bt(function(s){var l=gr(s);return xe(l)&&(l=r),Mf(vn(s,xe),St(l,2))}),$5=Bt(function(s){var l=gr(s);return l=typeof l=="function"?l:r,Mf(vn(s,xe),r,l)}),G5=Bt(Kf);function j5(s,l){return Vg(s||[],l||[],Ps)}function q5(s,l){return Vg(s||[],l||[],Ls)}var z5=Bt(function(s){var l=s.length,g=l>1?s[l-1]:r;return g=typeof g=="function"?(s.pop(),g):r,Cm(s,g)});function Rm(s){var l=B(s);return l.__chain__=!0,l}function H5(s,l){return l(s),s}function La(s,l){return l(s)}var V5=en(function(s){var l=s.length,g=l?s[0]:0,S=this.__wrapped__,N=function(D){return bf(D,s)};return l>1||this.__actions__.length||!(S instanceof Gt)||!rn(g)?this.thru(N):(S=S.slice(g,+g+(l?1:0)),S.__actions__.push({func:La,args:[N],thisArg:r}),new dr(S,this.__chain__).thru(function(D){return l&&!D.length&&D.push(r),D}))});function W5(){return Rm(this)}function X5(){return new dr(this.value(),this.__chain__)}function K5(){this.__values__===r&&(this.__values__=qm(this.value()));var s=this.__index__>=this.__values__.length,l=s?r:this.__values__[this.__index__++];return{done:s,value:l}}function Y5(){return this}function Z5(s){for(var l,g=this;g instanceof ba;){var S=wm(g);S.__index__=0,S.__values__=r,l?N.__wrapped__=S:l=S;var N=S;g=g.__wrapped__}return N.__wrapped__=s,l}function Q5(){var s=this.__wrapped__;if(s instanceof Gt){var l=s;return this.__actions__.length&&(l=new Gt(this)),l=l.reverse(),l.__actions__.push({func:La,args:[Xf],thisArg:r}),new dr(l,this.__chain__)}return this.thru(Xf)}function J5(){return Hg(this.__wrapped__,this.__actions__)}var tL=Oa(function(s,l,g){ee.call(s,g)?++s[g]:Jr(s,g,1)});function eL(s,l,g){var S=Mt(s)?ig:H3;return g&&qe(s,l,g)&&(l=r),S(s,St(l,3))}function rL(s,l){var g=Mt(s)?vn:Cg;return g(s,St(l,3))}var nL=rm(Tm),iL=rm(Em);function sL(s,l){return ke(Fa(s,l),1)}function oL(s,l){return ke(Fa(s,l),z)}function aL(s,l,g){return g=g===r?1:kt(g),ke(Fa(s,l),g)}function Im(s,l){var g=Mt(s)?cr:_n;return g(s,St(l,3))}function Pm(s,l){var g=Mt(s)?AM:Og;return g(s,St(l,3))}var lL=Oa(function(s,l,g){ee.call(s,g)?s[g].push(l):Jr(s,g,[l])});function uL(s,l,g,S){s=We(s)?s:Wi(s),g=g&&!S?kt(g):0;var N=s.length;return g<0&&(g=Ae(N+g,0)),Ga(s)?g<=N&&s.indexOf(l,g)>-1:!!N&&Li(s,l,g)>-1}var fL=Bt(function(s,l,g){var S=-1,N=typeof l=="function",D=We(s)?st(s.length):[];return _n(s,function(H){D[++S]=N?er(l,H,g):Ms(H,l,g)}),D}),cL=Oa(function(s,l,g){Jr(s,g,l)});function Fa(s,l){var g=Mt(s)?de:kg;return g(s,St(l,3))}function hL(s,l,g,S){return s==null?[]:(Mt(l)||(l=l==null?[]:[l]),g=S?r:g,Mt(g)||(g=g==null?[]:[g]),Dg(s,l,g))}var dL=Oa(function(s,l,g){s[g?0:1].push(l)},function(){return[[],[]]});function pL(s,l,g){var S=Mt(s)?af:lg,N=arguments.length<3;return S(s,St(l,4),g,N,_n)}function vL(s,l,g){var S=Mt(s)?OM:lg,N=arguments.length<3;return S(s,St(l,4),g,N,Og)}function gL(s,l){var g=Mt(s)?vn:Cg;return g(s,Ua(St(l,3)))}function mL(s){var l=Mt(s)?Tg:uk;return l(s)}function yL(s,l,g){(g?qe(s,l,g):l===r)?l=1:l=kt(l);var S=Mt(s)?$3:fk;return S(s,l)}function _L(s){var l=Mt(s)?G3:hk;return l(s)}function bL(s){if(s==null)return 0;if(We(s))return Ga(s)?Bi(s):s.length;var l=Ue(s);return l==xt||l==vt?s.size:Af(s).length}function xL(s,l,g){var S=Mt(s)?lf:dk;return g&&qe(s,l,g)&&(l=r),S(s,St(l,3))}var wL=Bt(function(s,l){if(s==null)return[];var g=l.length;return g>1&&qe(s,l[0],l[1])?l=[]:g>2&&qe(l[0],l[1],l[2])&&(l=[l[0]]),Dg(s,ke(l,1),[])}),Ba=r3||function(){return Me.Date.now()};function TL(s,l){if(typeof l!="function")throw new hr(a);return s=kt(s),function(){if(--s<1)return l.apply(this,arguments)}}function Nm(s,l,g){return l=g?r:l,l=s&&l==null?s.length:l,tn(s,A,r,r,r,r,l)}function Mm(s,l){var g;if(typeof l!="function")throw new hr(a);return s=kt(s),function(){return--s>0&&(g=l.apply(this,arguments)),s<=1&&(l=r),g}}var Yf=Bt(function(s,l,g){var S=_;if(g.length){var N=mn(g,Hi(Yf));S|=E}return tn(s,S,l,g,N)}),km=Bt(function(s,l,g){var S=_|m;if(g.length){var N=mn(g,Hi(km));S|=E}return tn(l,S,s,g,N)});function Lm(s,l,g){l=g?r:l;var S=tn(s,T,r,r,r,r,r,l);return S.placeholder=Lm.placeholder,S}function Fm(s,l,g){l=g?r:l;var S=tn(s,x,r,r,r,r,r,l);return S.placeholder=Fm.placeholder,S}function Bm(s,l,g){var S,N,D,H,K,tt,ut=0,ft=!1,ht=!1,gt=!0;if(typeof s!="function")throw new hr(a);l=mr(l)||0,me(g)&&(ft=!!g.leading,ht="maxWait"in g,D=ht?Ae(mr(g.maxWait)||0,l):D,gt="trailing"in g?!!g.trailing:gt);function wt(we){var Nr=S,on=N;return S=N=r,ut=we,H=s.apply(on,Nr),H}function Ot(we){return ut=we,K=Ds(Ut,l),ft?wt(we):H}function Ft(we){var Nr=we-tt,on=we-ut,ry=l-Nr;return ht?De(ry,D-on):ry}function Ct(we){var Nr=we-tt,on=we-ut;return tt===r||Nr>=l||Nr<0||ht&&on>=D}function Ut(){var we=Ba();if(Ct(we))return zt(we);K=Ds(Ut,Ft(we))}function zt(we){return K=r,gt&&S?wt(we):(S=N=r,H)}function sr(){K!==r&&Wg(K),ut=0,S=tt=N=K=r}function ze(){return K===r?H:zt(Ba())}function or(){var we=Ba(),Nr=Ct(we);if(S=arguments,N=this,tt=we,Nr){if(K===r)return Ot(tt);if(ht)return Wg(K),K=Ds(Ut,l),wt(tt)}return K===r&&(K=Ds(Ut,l)),H}return or.cancel=sr,or.flush=ze,or}var EL=Bt(function(s,l){return Ag(s,1,l)}),SL=Bt(function(s,l,g){return Ag(s,mr(l)||0,g)});function AL(s){return tn(s,L)}function Da(s,l){if(typeof s!="function"||l!=null&&typeof l!="function")throw new hr(a);var g=function(){var S=arguments,N=l?l.apply(this,S):S[0],D=g.cache;if(D.has(N))return D.get(N);var H=s.apply(this,S);return g.cache=D.set(N,H)||D,H};return g.cache=new(Da.Cache||Qr),g}Da.Cache=Qr;function Ua(s){if(typeof s!="function")throw new hr(a);return function(){var l=arguments;switch(l.length){case 0:return!s.call(this);case 1:return!s.call(this,l[0]);case 2:return!s.call(this,l[0],l[1]);case 3:return!s.call(this,l[0],l[1],l[2])}return!s.apply(this,l)}}function OL(s){return Mm(2,s)}var CL=pk(function(s,l){l=l.length==1&&Mt(l[0])?de(l[0],rr(St())):de(ke(l,1),rr(St()));var g=l.length;return Bt(function(S){for(var N=-1,D=De(S.length,g);++N<D;)S[N]=l[N].call(this,S[N]);return er(s,this,S)})}),Zf=Bt(function(s,l){var g=mn(l,Hi(Zf));return tn(s,E,r,l,g)}),Dm=Bt(function(s,l){var g=mn(l,Hi(Dm));return tn(s,I,r,l,g)}),RL=en(function(s,l){return tn(s,O,r,r,r,l)});function IL(s,l){if(typeof s!="function")throw new hr(a);return l=l===r?l:kt(l),Bt(s,l)}function PL(s,l){if(typeof s!="function")throw new hr(a);return l=l==null?0:Ae(kt(l),0),Bt(function(g){var S=g[l],N=wn(g,0,l);return S&&gn(N,S),er(s,this,N)})}function NL(s,l,g){var S=!0,N=!0;if(typeof s!="function")throw new hr(a);return me(g)&&(S="leading"in g?!!g.leading:S,N="trailing"in g?!!g.trailing:N),Bm(s,l,{leading:S,maxWait:l,trailing:N})}function ML(s){return Nm(s,1)}function kL(s,l){return Zf(Lf(l),s)}function LL(){if(!arguments.length)return[];var s=arguments[0];return Mt(s)?s:[s]}function FL(s){return pr(s,v)}function BL(s,l){return l=typeof l=="function"?l:r,pr(s,v,l)}function DL(s){return pr(s,p|v)}function UL(s,l){return l=typeof l=="function"?l:r,pr(s,p|v,l)}function $L(s,l){return l==null||Sg(s,l,Pe(l))}function Pr(s,l){return s===l||s!==s&&l!==l}var GL=Pa(Tf),jL=Pa(function(s,l){return s>=l}),Jn=Pg(function(){return arguments}())?Pg:function(s){return ye(s)&&ee.call(s,"callee")&&!mg.call(s,"callee")},Mt=st.isArray,qL=Qv?rr(Qv):Z3;function We(s){return s!=null&&$a(s.length)&&!nn(s)}function xe(s){return ye(s)&&We(s)}function zL(s){return s===!0||s===!1||ye(s)&&je(s)==et}var Tn=i3||lc,HL=Jv?rr(Jv):Q3;function VL(s){return ye(s)&&s.nodeType===1&&!Us(s)}function WL(s){if(s==null)return!0;if(We(s)&&(Mt(s)||typeof s=="string"||typeof s.splice=="function"||Tn(s)||Vi(s)||Jn(s)))return!s.length;var l=Ue(s);if(l==xt||l==vt)return!s.size;if(Bs(s))return!Af(s).length;for(var g in s)if(ee.call(s,g))return!1;return!0}function XL(s,l){return ks(s,l)}function KL(s,l,g){g=typeof g=="function"?g:r;var S=g?g(s,l):r;return S===r?ks(s,l,r,g):!!S}function Qf(s){if(!ye(s))return!1;var l=je(s);return l==lt||l==it||typeof s.message=="string"&&typeof s.name=="string"&&!Us(s)}function YL(s){return typeof s=="number"&&_g(s)}function nn(s){if(!me(s))return!1;var l=je(s);return l==pt||l==yt||l==W||l==at}function Um(s){return typeof s=="number"&&s==kt(s)}function $a(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=nt}function me(s){var l=typeof s;return s!=null&&(l=="object"||l=="function")}function ye(s){return s!=null&&typeof s=="object"}var $m=tg?rr(tg):tk;function ZL(s,l){return s===l||Sf(s,l,jf(l))}function QL(s,l,g){return g=typeof g=="function"?g:r,Sf(s,l,jf(l),g)}function JL(s){return Gm(s)&&s!=+s}function tF(s){if(Bk(s))throw new It(o);return Ng(s)}function eF(s){return s===null}function rF(s){return s==null}function Gm(s){return typeof s=="number"||ye(s)&&je(s)==At}function Us(s){if(!ye(s)||je(s)!=qt)return!1;var l=da(s);if(l===null)return!0;var g=ee.call(l,"constructor")&&l.constructor;return typeof g=="function"&&g instanceof g&&ua.call(g)==QM}var Jf=eg?rr(eg):ek;function nF(s){return Um(s)&&s>=-nt&&s<=nt}var jm=rg?rr(rg):rk;function Ga(s){return typeof s=="string"||!Mt(s)&&ye(s)&&je(s)==ct}function ir(s){return typeof s=="symbol"||ye(s)&&je(s)==Pt}var Vi=ng?rr(ng):nk;function iF(s){return s===r}function sF(s){return ye(s)&&Ue(s)==Nt}function oF(s){return ye(s)&&je(s)==He}var aF=Pa(Of),lF=Pa(function(s,l){return s<=l});function qm(s){if(!s)return[];if(We(s))return Ga(s)?Rr(s):Ve(s);if(As&&s[As])return $M(s[As]());var l=Ue(s),g=l==xt?pf:l==vt?oa:Wi;return g(s)}function sn(s){if(!s)return s===0?s:0;if(s=mr(s),s===z||s===-z){var l=s<0?-1:1;return l*V}return s===s?s:0}function kt(s){var l=sn(s),g=l%1;return l===l?g?l-g:l:0}function zm(s){return s?Kn(kt(s),0,k):0}function mr(s){if(typeof s=="number")return s;if(ir(s))return U;if(me(s)){var l=typeof s.valueOf=="function"?s.valueOf():s;s=me(l)?l+"":l}if(typeof s!="string")return s===0?s:+s;s=ug(s);var g=qN.test(s);return g||HN.test(s)?TM(s.slice(2),g?2:8):jN.test(s)?U:+s}function Hm(s){return jr(s,Xe(s))}function uF(s){return s?Kn(kt(s),-nt,nt):s===0?s:0}function Jt(s){return s==null?"":nr(s)}var fF=qi(function(s,l){if(Bs(l)||We(l)){jr(l,Pe(l),s);return}for(var g in l)ee.call(l,g)&&Ps(s,g,l[g])}),Vm=qi(function(s,l){jr(l,Xe(l),s)}),ja=qi(function(s,l,g,S){jr(l,Xe(l),s,S)}),cF=qi(function(s,l,g,S){jr(l,Pe(l),s,S)}),hF=en(bf);function dF(s,l){var g=ji(s);return l==null?g:Eg(g,l)}var pF=Bt(function(s,l){s=ie(s);var g=-1,S=l.length,N=S>2?l[2]:r;for(N&&qe(l[0],l[1],N)&&(S=1);++g<S;)for(var D=l[g],H=Xe(D),K=-1,tt=H.length;++K<tt;){var ut=H[K],ft=s[ut];(ft===r||Pr(ft,Ui[ut])&&!ee.call(s,ut))&&(s[ut]=D[ut])}return s}),vF=Bt(function(s){return s.push(r,um),er(Wm,r,s)});function gF(s,l){return sg(s,St(l,3),Gr)}function mF(s,l){return sg(s,St(l,3),wf)}function yF(s,l){return s==null?s:xf(s,St(l,3),Xe)}function _F(s,l){return s==null?s:Rg(s,St(l,3),Xe)}function bF(s,l){return s&&Gr(s,St(l,3))}function xF(s,l){return s&&wf(s,St(l,3))}function wF(s){return s==null?[]:Ta(s,Pe(s))}function TF(s){return s==null?[]:Ta(s,Xe(s))}function tc(s,l,g){var S=s==null?r:Yn(s,l);return S===r?g:S}function EF(s,l){return s!=null&&hm(s,l,W3)}function ec(s,l){return s!=null&&hm(s,l,X3)}var SF=im(function(s,l,g){l!=null&&typeof l.toString!="function"&&(l=fa.call(l)),s[l]=g},nc(Ke)),AF=im(function(s,l,g){l!=null&&typeof l.toString!="function"&&(l=fa.call(l)),ee.call(s,l)?s[l].push(g):s[l]=[g]},St),OF=Bt(Ms);function Pe(s){return We(s)?wg(s):Af(s)}function Xe(s){return We(s)?wg(s,!0):ik(s)}function CF(s,l){var g={};return l=St(l,3),Gr(s,function(S,N,D){Jr(g,l(S,N,D),S)}),g}function RF(s,l){var g={};return l=St(l,3),Gr(s,function(S,N,D){Jr(g,N,l(S,N,D))}),g}var IF=qi(function(s,l,g){Ea(s,l,g)}),Wm=qi(function(s,l,g,S){Ea(s,l,g,S)}),PF=en(function(s,l){var g={};if(s==null)return g;var S=!1;l=de(l,function(D){return D=xn(D,s),S||(S=D.length>1),D}),jr(s,$f(s),g),S&&(g=pr(g,p|c|v,Sk));for(var N=l.length;N--;)Nf(g,l[N]);return g});function NF(s,l){return Xm(s,Ua(St(l)))}var MF=en(function(s,l){return s==null?{}:ok(s,l)});function Xm(s,l){if(s==null)return{};var g=de($f(s),function(S){return[S]});return l=St(l),Ug(s,g,function(S,N){return l(S,N[0])})}function kF(s,l,g){l=xn(l,s);var S=-1,N=l.length;for(N||(N=1,s=r);++S<N;){var D=s==null?r:s[qr(l[S])];D===r&&(S=N,D=g),s=nn(D)?D.call(s):D}return s}function LF(s,l,g){return s==null?s:Ls(s,l,g)}function FF(s,l,g,S){return S=typeof S=="function"?S:r,s==null?s:Ls(s,l,g,S)}var Km=am(Pe),Ym=am(Xe);function BF(s,l,g){var S=Mt(s),N=S||Tn(s)||Vi(s);if(l=St(l,4),g==null){var D=s&&s.constructor;N?g=S?new D:[]:me(s)?g=nn(D)?ji(da(s)):{}:g={}}return(N?cr:Gr)(s,function(H,K,tt){return l(g,H,K,tt)}),g}function DF(s,l){return s==null?!0:Nf(s,l)}function UF(s,l,g){return s==null?s:zg(s,l,Lf(g))}function $F(s,l,g,S){return S=typeof S=="function"?S:r,s==null?s:zg(s,l,Lf(g),S)}function Wi(s){return s==null?[]:df(s,Pe(s))}function GF(s){return s==null?[]:df(s,Xe(s))}function jF(s,l,g){return g===r&&(g=l,l=r),g!==r&&(g=mr(g),g=g===g?g:0),l!==r&&(l=mr(l),l=l===l?l:0),Kn(mr(s),l,g)}function qF(s,l,g){return l=sn(l),g===r?(g=l,l=0):g=sn(g),s=mr(s),K3(s,l,g)}function zF(s,l,g){if(g&&typeof g!="boolean"&&qe(s,l,g)&&(l=g=r),g===r&&(typeof l=="boolean"?(g=l,l=r):typeof s=="boolean"&&(g=s,s=r)),s===r&&l===r?(s=0,l=1):(s=sn(s),l===r?(l=s,s=0):l=sn(l)),s>l){var S=s;s=l,l=S}if(g||s%1||l%1){var N=bg();return De(s+N*(l-s+wM("1e-"+((N+"").length-1))),l)}return Rf(s,l)}var HF=zi(function(s,l,g){return l=l.toLowerCase(),s+(g?Zm(l):l)});function Zm(s){return rc(Jt(s).toLowerCase())}function Qm(s){return s=Jt(s),s&&s.replace(WN,LM).replace(hM,"")}function VF(s,l,g){s=Jt(s),l=nr(l);var S=s.length;g=g===r?S:Kn(kt(g),0,S);var N=g;return g-=l.length,g>=0&&s.slice(g,N)==l}function WF(s){return s=Jt(s),s&&ON.test(s)?s.replace(Rv,FM):s}function XF(s){return s=Jt(s),s&&MN.test(s)?s.replace(Yu,"\\$&"):s}var KF=zi(function(s,l,g){return s+(g?"-":"")+l.toLowerCase()}),YF=zi(function(s,l,g){return s+(g?" ":"")+l.toLowerCase()}),ZF=em("toLowerCase");function QF(s,l,g){s=Jt(s),l=kt(l);var S=l?Bi(s):0;if(!l||S>=l)return s;var N=(l-S)/2;return Ia(ma(N),g)+s+Ia(ga(N),g)}function JF(s,l,g){s=Jt(s),l=kt(l);var S=l?Bi(s):0;return l&&S<l?s+Ia(l-S,g):s}function t4(s,l,g){s=Jt(s),l=kt(l);var S=l?Bi(s):0;return l&&S<l?Ia(l-S,g)+s:s}function e4(s,l,g){return g||l==null?l=0:l&&(l=+l),l3(Jt(s).replace(Zu,""),l||0)}function r4(s,l,g){return(g?qe(s,l,g):l===r)?l=1:l=kt(l),If(Jt(s),l)}function n4(){var s=arguments,l=Jt(s[0]);return s.length<3?l:l.replace(s[1],s[2])}var i4=zi(function(s,l,g){return s+(g?"_":"")+l.toLowerCase()});function s4(s,l,g){return g&&typeof g!="number"&&qe(s,l,g)&&(l=g=r),g=g===r?k:g>>>0,g?(s=Jt(s),s&&(typeof l=="string"||l!=null&&!Jf(l))&&(l=nr(l),!l&&Fi(s))?wn(Rr(s),0,g):s.split(l,g)):[]}var o4=zi(function(s,l,g){return s+(g?" ":"")+rc(l)});function a4(s,l,g){return s=Jt(s),g=g==null?0:Kn(kt(g),0,s.length),l=nr(l),s.slice(g,g+l.length)==l}function l4(s,l,g){var S=B.templateSettings;g&&qe(s,l,g)&&(l=r),s=Jt(s),l=ja({},l,S,lm);var N=ja({},l.imports,S.imports,lm),D=Pe(N),H=df(N,D),K,tt,ut=0,ft=l.interpolate||ea,ht="__p += '",gt=vf((l.escape||ea).source+"|"+ft.source+"|"+(ft===Iv?GN:ea).source+"|"+(l.evaluate||ea).source+"|$","g"),wt="//# sourceURL="+(ee.call(l,"sourceURL")?(l.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++mM+"]")+`
1944
- `;s.replace(gt,function(Ct,Ut,zt,sr,ze,or){return zt||(zt=sr),ht+=s.slice(ut,or).replace(XN,BM),Ut&&(K=!0,ht+=`' +
1943
+ `)}function kk(s){return Mt(s)||Jn(s)||!!(yg&&s&&s[yg])}function rn(s,l){var g=typeof s;return l=l??nt,!!l&&(g=="number"||g!="symbol"&&VN.test(s))&&s>-1&&s%1==0&&s<l}function qe(s,l,g){if(!me(g))return!1;var S=typeof l;return(S=="number"?We(g)&&rn(l,g.length):S=="string"&&l in g)?Pr(g[l],s):!1}function zf(s,l){if(Mt(s))return!1;var g=typeof s;return g=="number"||g=="symbol"||g=="boolean"||s==null||ir(s)?!0:PN.test(s)||!IN.test(s)||l!=null&&s in ie(l)}function Lk(s){var l=typeof s;return l=="string"||l=="number"||l=="symbol"||l=="boolean"?s!=="__proto__":s===null}function Hf(s){var l=Na(s),g=B[l];if(typeof g!="function"||!(l in Gt.prototype))return!1;if(s===g)return!0;var S=Gf(g);return!!S&&s===S[0]}function Fk(s){return!!pg&&pg in s}var Bk=la?nn:lc;function Bs(s){var l=s&&s.constructor,g=typeof l=="function"&&l.prototype||Ui;return s===g}function pm(s){return s===s&&!me(s)}function vm(s,l){return function(g){return g==null?!1:g[s]===l&&(l!==r||s in ie(g))}}function Dk(s){var l=Da(s,function(S){return g.size===h&&g.clear(),S}),g=l.cache;return l}function Uk(s,l){var g=s[1],S=l[1],N=g|S,D=N<(_|m|A),H=S==A&&g==T||S==A&&g==O&&s[7].length<=l[8]||S==(A|O)&&l[7].length<=l[8]&&g==T;if(!(D||H))return s;S&_&&(s[2]=l[2],N|=g&_?0:w);var K=l[3];if(K){var tt=s[3];s[3]=tt?Zg(tt,K,l[4]):K,s[4]=tt?mn(s[3],d):l[4]}return K=l[5],K&&(tt=s[5],s[5]=tt?Qg(tt,K,l[6]):K,s[6]=tt?mn(s[5],d):l[6]),K=l[7],K&&(s[7]=K),S&A&&(s[8]=s[8]==null?l[8]:De(s[8],l[8])),s[9]==null&&(s[9]=l[9]),s[0]=l[0],s[1]=N,s}function $k(s){var l=[];if(s!=null)for(var g in ie(s))l.push(g);return l}function Gk(s){return fa.call(s)}function gm(s,l,g){return l=Ae(l===r?s.length-1:l,0),function(){for(var S=arguments,N=-1,D=Ae(S.length-l,0),H=st(D);++N<D;)H[N]=S[l+N];N=-1;for(var K=st(l+1);++N<l;)K[N]=S[N];return K[l]=g(H),er(s,this,K)}}function mm(s,l){return l.length<2?s:Yn(s,vr(l,0,-1))}function jk(s,l){for(var g=s.length,S=De(l.length,g),N=Ve(s);S--;){var D=l[S];s[S]=rn(D,g)?N[D]:r}return s}function Vf(s,l){if(!(l==="constructor"&&typeof s[l]=="function")&&l!="__proto__")return s[l]}var ym=bm(Gg),Ds=n3||function(s,l){return Me.setTimeout(s,l)},Wf=bm(ck);function _m(s,l,g){var S=l+"";return Wf(s,Mk(S,qk(Ik(S),g)))}function bm(s){var l=0,g=0;return function(){var S=a3(),N=M-(S-g);if(g=S,N>0){if(++l>=P)return arguments[0]}else l=0;return s.apply(r,arguments)}}function ka(s,l){var g=-1,S=s.length,N=S-1;for(l=l===r?S:l;++g<l;){var D=Rf(g,N),H=s[D];s[D]=s[g],s[g]=H}return s.length=l,s}var xm=Dk(function(s){var l=[];return s.charCodeAt(0)===46&&l.push(""),s.replace(NN,function(g,S,N,D){l.push(N?D.replace($N,"$1"):S||g)}),l});function qr(s){if(typeof s=="string"||ir(s))return s;var l=s+"";return l=="0"&&1/s==-z?"-0":l}function Qn(s){if(s!=null){try{return ua.call(s)}catch{}try{return s+""}catch{}}return""}function qk(s,l){return cr(X,function(g){var S="_."+g[0];l&g[1]&&!ia(s,S)&&s.push(S)}),s.sort()}function wm(s){if(s instanceof Gt)return s.clone();var l=new dr(s.__wrapped__,s.__chain__);return l.__actions__=Ve(s.__actions__),l.__index__=s.__index__,l.__values__=s.__values__,l}function zk(s,l,g){(g?qe(s,l,g):l===r)?l=1:l=Ae(kt(l),0);var S=s==null?0:s.length;if(!S||l<1)return[];for(var N=0,D=0,H=st(ga(S/l));N<S;)H[D++]=vr(s,N,N+=l);return H}function Hk(s){for(var l=-1,g=s==null?0:s.length,S=0,N=[];++l<g;){var D=s[l];D&&(N[S++]=D)}return N}function Vk(){var s=arguments.length;if(!s)return[];for(var l=st(s-1),g=arguments[0],S=s;S--;)l[S-1]=arguments[S];return gn(Mt(g)?Ve(g):[g],ke(l,1))}var Wk=Bt(function(s,l){return xe(s)?Ns(s,ke(l,1,xe,!0)):[]}),Xk=Bt(function(s,l){var g=gr(l);return xe(g)&&(g=r),xe(s)?Ns(s,ke(l,1,xe,!0),St(g,2)):[]}),Kk=Bt(function(s,l){var g=gr(l);return xe(g)&&(g=r),xe(s)?Ns(s,ke(l,1,xe,!0),r,g):[]});function Yk(s,l,g){var S=s==null?0:s.length;return S?(l=g||l===r?1:kt(l),vr(s,l<0?0:l,S)):[]}function Zk(s,l,g){var S=s==null?0:s.length;return S?(l=g||l===r?1:kt(l),l=S-l,vr(s,0,l<0?0:l)):[]}function Qk(s,l){return s&&s.length?Aa(s,St(l,3),!0,!0):[]}function Jk(s,l){return s&&s.length?Aa(s,St(l,3),!0):[]}function t5(s,l,g,S){var N=s==null?0:s.length;return N?(g&&typeof g!="number"&&qe(s,l,g)&&(g=0,S=N),V3(s,l,g,S)):[]}function Tm(s,l,g){var S=s==null?0:s.length;if(!S)return-1;var N=g==null?0:kt(g);return N<0&&(N=Ae(S+N,0)),sa(s,St(l,3),N)}function Em(s,l,g){var S=s==null?0:s.length;if(!S)return-1;var N=S-1;return g!==r&&(N=kt(g),N=g<0?Ae(S+N,0):De(N,S-1)),sa(s,St(l,3),N,!0)}function Sm(s){var l=s==null?0:s.length;return l?ke(s,1):[]}function e5(s){var l=s==null?0:s.length;return l?ke(s,z):[]}function r5(s,l){var g=s==null?0:s.length;return g?(l=l===r?1:kt(l),ke(s,l)):[]}function n5(s){for(var l=-1,g=s==null?0:s.length,S={};++l<g;){var N=s[l];S[N[0]]=N[1]}return S}function Am(s){return s&&s.length?s[0]:r}function i5(s,l,g){var S=s==null?0:s.length;if(!S)return-1;var N=g==null?0:kt(g);return N<0&&(N=Ae(S+N,0)),Li(s,l,N)}function s5(s){var l=s==null?0:s.length;return l?vr(s,0,-1):[]}var o5=Bt(function(s){var l=de(s,kf);return l.length&&l[0]===s[0]?Ef(l):[]}),a5=Bt(function(s){var l=gr(s),g=de(s,kf);return l===gr(g)?l=r:g.pop(),g.length&&g[0]===s[0]?Ef(g,St(l,2)):[]}),l5=Bt(function(s){var l=gr(s),g=de(s,kf);return l=typeof l=="function"?l:r,l&&g.pop(),g.length&&g[0]===s[0]?Ef(g,r,l):[]});function u5(s,l){return s==null?"":s3.call(s,l)}function gr(s){var l=s==null?0:s.length;return l?s[l-1]:r}function f5(s,l,g){var S=s==null?0:s.length;if(!S)return-1;var N=S;return g!==r&&(N=kt(g),N=N<0?Ae(S+N,0):De(N,S-1)),l===l?qM(s,l,N):sa(s,og,N,!0)}function c5(s,l){return s&&s.length?Bg(s,kt(l)):r}var h5=Bt(Om);function Om(s,l){return s&&s.length&&l&&l.length?Cf(s,l):s}function d5(s,l,g){return s&&s.length&&l&&l.length?Cf(s,l,St(g,2)):s}function p5(s,l,g){return s&&s.length&&l&&l.length?Cf(s,l,r,g):s}var v5=en(function(s,l){var g=s==null?0:s.length,S=bf(s,l);return $g(s,de(l,function(N){return rn(N,g)?+N:N}).sort(Yg)),S});function g5(s,l){var g=[];if(!(s&&s.length))return g;var S=-1,N=[],D=s.length;for(l=St(l,3);++S<D;){var H=s[S];l(H,S,s)&&(g.push(H),N.push(S))}return $g(s,N),g}function Xf(s){return s==null?s:u3.call(s)}function m5(s,l,g){var S=s==null?0:s.length;return S?(g&&typeof g!="number"&&qe(s,l,g)?(l=0,g=S):(l=l==null?0:kt(l),g=g===r?S:kt(g)),vr(s,l,g)):[]}function y5(s,l){return Sa(s,l)}function _5(s,l,g){return Pf(s,l,St(g,2))}function b5(s,l){var g=s==null?0:s.length;if(g){var S=Sa(s,l);if(S<g&&Pr(s[S],l))return S}return-1}function x5(s,l){return Sa(s,l,!0)}function w5(s,l,g){return Pf(s,l,St(g,2),!0)}function T5(s,l){var g=s==null?0:s.length;if(g){var S=Sa(s,l,!0)-1;if(Pr(s[S],l))return S}return-1}function E5(s){return s&&s.length?jg(s):[]}function S5(s,l){return s&&s.length?jg(s,St(l,2)):[]}function A5(s){var l=s==null?0:s.length;return l?vr(s,1,l):[]}function O5(s,l,g){return s&&s.length?(l=g||l===r?1:kt(l),vr(s,0,l<0?0:l)):[]}function C5(s,l,g){var S=s==null?0:s.length;return S?(l=g||l===r?1:kt(l),l=S-l,vr(s,l<0?0:l,S)):[]}function R5(s,l){return s&&s.length?Aa(s,St(l,3),!1,!0):[]}function I5(s,l){return s&&s.length?Aa(s,St(l,3)):[]}var P5=Bt(function(s){return bn(ke(s,1,xe,!0))}),N5=Bt(function(s){var l=gr(s);return xe(l)&&(l=r),bn(ke(s,1,xe,!0),St(l,2))}),M5=Bt(function(s){var l=gr(s);return l=typeof l=="function"?l:r,bn(ke(s,1,xe,!0),r,l)});function k5(s){return s&&s.length?bn(s):[]}function L5(s,l){return s&&s.length?bn(s,St(l,2)):[]}function F5(s,l){return l=typeof l=="function"?l:r,s&&s.length?bn(s,r,l):[]}function Kf(s){if(!(s&&s.length))return[];var l=0;return s=vn(s,function(g){if(xe(g))return l=Ae(g.length,l),!0}),hf(l,function(g){return de(s,uf(g))})}function Cm(s,l){if(!(s&&s.length))return[];var g=Kf(s);return l==null?g:de(g,function(S){return er(l,r,S)})}var B5=Bt(function(s,l){return xe(s)?Ns(s,l):[]}),D5=Bt(function(s){return Mf(vn(s,xe))}),U5=Bt(function(s){var l=gr(s);return xe(l)&&(l=r),Mf(vn(s,xe),St(l,2))}),$5=Bt(function(s){var l=gr(s);return l=typeof l=="function"?l:r,Mf(vn(s,xe),r,l)}),G5=Bt(Kf);function j5(s,l){return Vg(s||[],l||[],Ps)}function q5(s,l){return Vg(s||[],l||[],Ls)}var z5=Bt(function(s){var l=s.length,g=l>1?s[l-1]:r;return g=typeof g=="function"?(s.pop(),g):r,Cm(s,g)});function Rm(s){var l=B(s);return l.__chain__=!0,l}function H5(s,l){return l(s),s}function La(s,l){return l(s)}var V5=en(function(s){var l=s.length,g=l?s[0]:0,S=this.__wrapped__,N=function(D){return bf(D,s)};return l>1||this.__actions__.length||!(S instanceof Gt)||!rn(g)?this.thru(N):(S=S.slice(g,+g+(l?1:0)),S.__actions__.push({func:La,args:[N],thisArg:r}),new dr(S,this.__chain__).thru(function(D){return l&&!D.length&&D.push(r),D}))});function W5(){return Rm(this)}function X5(){return new dr(this.value(),this.__chain__)}function K5(){this.__values__===r&&(this.__values__=qm(this.value()));var s=this.__index__>=this.__values__.length,l=s?r:this.__values__[this.__index__++];return{done:s,value:l}}function Y5(){return this}function Z5(s){for(var l,g=this;g instanceof ba;){var S=wm(g);S.__index__=0,S.__values__=r,l?N.__wrapped__=S:l=S;var N=S;g=g.__wrapped__}return N.__wrapped__=s,l}function Q5(){var s=this.__wrapped__;if(s instanceof Gt){var l=s;return this.__actions__.length&&(l=new Gt(this)),l=l.reverse(),l.__actions__.push({func:La,args:[Xf],thisArg:r}),new dr(l,this.__chain__)}return this.thru(Xf)}function J5(){return Hg(this.__wrapped__,this.__actions__)}var tL=Oa(function(s,l,g){ee.call(s,g)?++s[g]:Jr(s,g,1)});function eL(s,l,g){var S=Mt(s)?ig:H3;return g&&qe(s,l,g)&&(l=r),S(s,St(l,3))}function rL(s,l){var g=Mt(s)?vn:Cg;return g(s,St(l,3))}var nL=rm(Tm),iL=rm(Em);function sL(s,l){return ke(Fa(s,l),1)}function oL(s,l){return ke(Fa(s,l),z)}function aL(s,l,g){return g=g===r?1:kt(g),ke(Fa(s,l),g)}function Im(s,l){var g=Mt(s)?cr:_n;return g(s,St(l,3))}function Pm(s,l){var g=Mt(s)?AM:Og;return g(s,St(l,3))}var lL=Oa(function(s,l,g){ee.call(s,g)?s[g].push(l):Jr(s,g,[l])});function uL(s,l,g,S){s=We(s)?s:Wi(s),g=g&&!S?kt(g):0;var N=s.length;return g<0&&(g=Ae(N+g,0)),Ga(s)?g<=N&&s.indexOf(l,g)>-1:!!N&&Li(s,l,g)>-1}var fL=Bt(function(s,l,g){var S=-1,N=typeof l=="function",D=We(s)?st(s.length):[];return _n(s,function(H){D[++S]=N?er(l,H,g):Ms(H,l,g)}),D}),cL=Oa(function(s,l,g){Jr(s,g,l)});function Fa(s,l){var g=Mt(s)?de:kg;return g(s,St(l,3))}function hL(s,l,g,S){return s==null?[]:(Mt(l)||(l=l==null?[]:[l]),g=S?r:g,Mt(g)||(g=g==null?[]:[g]),Dg(s,l,g))}var dL=Oa(function(s,l,g){s[g?0:1].push(l)},function(){return[[],[]]});function pL(s,l,g){var S=Mt(s)?af:lg,N=arguments.length<3;return S(s,St(l,4),g,N,_n)}function vL(s,l,g){var S=Mt(s)?OM:lg,N=arguments.length<3;return S(s,St(l,4),g,N,Og)}function gL(s,l){var g=Mt(s)?vn:Cg;return g(s,Ua(St(l,3)))}function mL(s){var l=Mt(s)?Tg:uk;return l(s)}function yL(s,l,g){(g?qe(s,l,g):l===r)?l=1:l=kt(l);var S=Mt(s)?$3:fk;return S(s,l)}function _L(s){var l=Mt(s)?G3:hk;return l(s)}function bL(s){if(s==null)return 0;if(We(s))return Ga(s)?Bi(s):s.length;var l=Ue(s);return l==xt||l==vt?s.size:Af(s).length}function xL(s,l,g){var S=Mt(s)?lf:dk;return g&&qe(s,l,g)&&(l=r),S(s,St(l,3))}var wL=Bt(function(s,l){if(s==null)return[];var g=l.length;return g>1&&qe(s,l[0],l[1])?l=[]:g>2&&qe(l[0],l[1],l[2])&&(l=[l[0]]),Dg(s,ke(l,1),[])}),Ba=r3||function(){return Me.Date.now()};function TL(s,l){if(typeof l!="function")throw new hr(a);return s=kt(s),function(){if(--s<1)return l.apply(this,arguments)}}function Nm(s,l,g){return l=g?r:l,l=s&&l==null?s.length:l,tn(s,A,r,r,r,r,l)}function Mm(s,l){var g;if(typeof l!="function")throw new hr(a);return s=kt(s),function(){return--s>0&&(g=l.apply(this,arguments)),s<=1&&(l=r),g}}var Yf=Bt(function(s,l,g){var S=_;if(g.length){var N=mn(g,Hi(Yf));S|=E}return tn(s,S,l,g,N)}),km=Bt(function(s,l,g){var S=_|m;if(g.length){var N=mn(g,Hi(km));S|=E}return tn(l,S,s,g,N)});function Lm(s,l,g){l=g?r:l;var S=tn(s,T,r,r,r,r,r,l);return S.placeholder=Lm.placeholder,S}function Fm(s,l,g){l=g?r:l;var S=tn(s,x,r,r,r,r,r,l);return S.placeholder=Fm.placeholder,S}function Bm(s,l,g){var S,N,D,H,K,tt,ut=0,ft=!1,ht=!1,gt=!0;if(typeof s!="function")throw new hr(a);l=mr(l)||0,me(g)&&(ft=!!g.leading,ht="maxWait"in g,D=ht?Ae(mr(g.maxWait)||0,l):D,gt="trailing"in g?!!g.trailing:gt);function wt(we){var Nr=S,on=N;return S=N=r,ut=we,H=s.apply(on,Nr),H}function Ot(we){return ut=we,K=Ds(Ut,l),ft?wt(we):H}function Ft(we){var Nr=we-tt,on=we-ut,ry=l-Nr;return ht?De(ry,D-on):ry}function Ct(we){var Nr=we-tt,on=we-ut;return tt===r||Nr>=l||Nr<0||ht&&on>=D}function Ut(){var we=Ba();if(Ct(we))return qt(we);K=Ds(Ut,Ft(we))}function qt(we){return K=r,gt&&S?wt(we):(S=N=r,H)}function sr(){K!==r&&Wg(K),ut=0,S=tt=N=K=r}function ze(){return K===r?H:qt(Ba())}function or(){var we=Ba(),Nr=Ct(we);if(S=arguments,N=this,tt=we,Nr){if(K===r)return Ot(tt);if(ht)return Wg(K),K=Ds(Ut,l),wt(tt)}return K===r&&(K=Ds(Ut,l)),H}return or.cancel=sr,or.flush=ze,or}var EL=Bt(function(s,l){return Ag(s,1,l)}),SL=Bt(function(s,l,g){return Ag(s,mr(l)||0,g)});function AL(s){return tn(s,L)}function Da(s,l){if(typeof s!="function"||l!=null&&typeof l!="function")throw new hr(a);var g=function(){var S=arguments,N=l?l.apply(this,S):S[0],D=g.cache;if(D.has(N))return D.get(N);var H=s.apply(this,S);return g.cache=D.set(N,H)||D,H};return g.cache=new(Da.Cache||Qr),g}Da.Cache=Qr;function Ua(s){if(typeof s!="function")throw new hr(a);return function(){var l=arguments;switch(l.length){case 0:return!s.call(this);case 1:return!s.call(this,l[0]);case 2:return!s.call(this,l[0],l[1]);case 3:return!s.call(this,l[0],l[1],l[2])}return!s.apply(this,l)}}function OL(s){return Mm(2,s)}var CL=pk(function(s,l){l=l.length==1&&Mt(l[0])?de(l[0],rr(St())):de(ke(l,1),rr(St()));var g=l.length;return Bt(function(S){for(var N=-1,D=De(S.length,g);++N<D;)S[N]=l[N].call(this,S[N]);return er(s,this,S)})}),Zf=Bt(function(s,l){var g=mn(l,Hi(Zf));return tn(s,E,r,l,g)}),Dm=Bt(function(s,l){var g=mn(l,Hi(Dm));return tn(s,I,r,l,g)}),RL=en(function(s,l){return tn(s,O,r,r,r,l)});function IL(s,l){if(typeof s!="function")throw new hr(a);return l=l===r?l:kt(l),Bt(s,l)}function PL(s,l){if(typeof s!="function")throw new hr(a);return l=l==null?0:Ae(kt(l),0),Bt(function(g){var S=g[l],N=wn(g,0,l);return S&&gn(N,S),er(s,this,N)})}function NL(s,l,g){var S=!0,N=!0;if(typeof s!="function")throw new hr(a);return me(g)&&(S="leading"in g?!!g.leading:S,N="trailing"in g?!!g.trailing:N),Bm(s,l,{leading:S,maxWait:l,trailing:N})}function ML(s){return Nm(s,1)}function kL(s,l){return Zf(Lf(l),s)}function LL(){if(!arguments.length)return[];var s=arguments[0];return Mt(s)?s:[s]}function FL(s){return pr(s,v)}function BL(s,l){return l=typeof l=="function"?l:r,pr(s,v,l)}function DL(s){return pr(s,p|v)}function UL(s,l){return l=typeof l=="function"?l:r,pr(s,p|v,l)}function $L(s,l){return l==null||Sg(s,l,Pe(l))}function Pr(s,l){return s===l||s!==s&&l!==l}var GL=Pa(Tf),jL=Pa(function(s,l){return s>=l}),Jn=Pg(function(){return arguments}())?Pg:function(s){return ye(s)&&ee.call(s,"callee")&&!mg.call(s,"callee")},Mt=st.isArray,qL=Qv?rr(Qv):Z3;function We(s){return s!=null&&$a(s.length)&&!nn(s)}function xe(s){return ye(s)&&We(s)}function zL(s){return s===!0||s===!1||ye(s)&&je(s)==et}var Tn=i3||lc,HL=Jv?rr(Jv):Q3;function VL(s){return ye(s)&&s.nodeType===1&&!Us(s)}function WL(s){if(s==null)return!0;if(We(s)&&(Mt(s)||typeof s=="string"||typeof s.splice=="function"||Tn(s)||Vi(s)||Jn(s)))return!s.length;var l=Ue(s);if(l==xt||l==vt)return!s.size;if(Bs(s))return!Af(s).length;for(var g in s)if(ee.call(s,g))return!1;return!0}function XL(s,l){return ks(s,l)}function KL(s,l,g){g=typeof g=="function"?g:r;var S=g?g(s,l):r;return S===r?ks(s,l,r,g):!!S}function Qf(s){if(!ye(s))return!1;var l=je(s);return l==lt||l==it||typeof s.message=="string"&&typeof s.name=="string"&&!Us(s)}function YL(s){return typeof s=="number"&&_g(s)}function nn(s){if(!me(s))return!1;var l=je(s);return l==pt||l==yt||l==W||l==at}function Um(s){return typeof s=="number"&&s==kt(s)}function $a(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=nt}function me(s){var l=typeof s;return s!=null&&(l=="object"||l=="function")}function ye(s){return s!=null&&typeof s=="object"}var $m=tg?rr(tg):tk;function ZL(s,l){return s===l||Sf(s,l,jf(l))}function QL(s,l,g){return g=typeof g=="function"?g:r,Sf(s,l,jf(l),g)}function JL(s){return Gm(s)&&s!=+s}function tF(s){if(Bk(s))throw new It(o);return Ng(s)}function eF(s){return s===null}function rF(s){return s==null}function Gm(s){return typeof s=="number"||ye(s)&&je(s)==At}function Us(s){if(!ye(s)||je(s)!=Ht)return!1;var l=da(s);if(l===null)return!0;var g=ee.call(l,"constructor")&&l.constructor;return typeof g=="function"&&g instanceof g&&ua.call(g)==QM}var Jf=eg?rr(eg):ek;function nF(s){return Um(s)&&s>=-nt&&s<=nt}var jm=rg?rr(rg):rk;function Ga(s){return typeof s=="string"||!Mt(s)&&ye(s)&&je(s)==ct}function ir(s){return typeof s=="symbol"||ye(s)&&je(s)==Pt}var Vi=ng?rr(ng):nk;function iF(s){return s===r}function sF(s){return ye(s)&&Ue(s)==Nt}function oF(s){return ye(s)&&je(s)==He}var aF=Pa(Of),lF=Pa(function(s,l){return s<=l});function qm(s){if(!s)return[];if(We(s))return Ga(s)?Rr(s):Ve(s);if(As&&s[As])return $M(s[As]());var l=Ue(s),g=l==xt?pf:l==vt?oa:Wi;return g(s)}function sn(s){if(!s)return s===0?s:0;if(s=mr(s),s===z||s===-z){var l=s<0?-1:1;return l*V}return s===s?s:0}function kt(s){var l=sn(s),g=l%1;return l===l?g?l-g:l:0}function zm(s){return s?Kn(kt(s),0,k):0}function mr(s){if(typeof s=="number")return s;if(ir(s))return U;if(me(s)){var l=typeof s.valueOf=="function"?s.valueOf():s;s=me(l)?l+"":l}if(typeof s!="string")return s===0?s:+s;s=ug(s);var g=qN.test(s);return g||HN.test(s)?TM(s.slice(2),g?2:8):jN.test(s)?U:+s}function Hm(s){return jr(s,Xe(s))}function uF(s){return s?Kn(kt(s),-nt,nt):s===0?s:0}function Jt(s){return s==null?"":nr(s)}var fF=qi(function(s,l){if(Bs(l)||We(l)){jr(l,Pe(l),s);return}for(var g in l)ee.call(l,g)&&Ps(s,g,l[g])}),Vm=qi(function(s,l){jr(l,Xe(l),s)}),ja=qi(function(s,l,g,S){jr(l,Xe(l),s,S)}),cF=qi(function(s,l,g,S){jr(l,Pe(l),s,S)}),hF=en(bf);function dF(s,l){var g=ji(s);return l==null?g:Eg(g,l)}var pF=Bt(function(s,l){s=ie(s);var g=-1,S=l.length,N=S>2?l[2]:r;for(N&&qe(l[0],l[1],N)&&(S=1);++g<S;)for(var D=l[g],H=Xe(D),K=-1,tt=H.length;++K<tt;){var ut=H[K],ft=s[ut];(ft===r||Pr(ft,Ui[ut])&&!ee.call(s,ut))&&(s[ut]=D[ut])}return s}),vF=Bt(function(s){return s.push(r,um),er(Wm,r,s)});function gF(s,l){return sg(s,St(l,3),Gr)}function mF(s,l){return sg(s,St(l,3),wf)}function yF(s,l){return s==null?s:xf(s,St(l,3),Xe)}function _F(s,l){return s==null?s:Rg(s,St(l,3),Xe)}function bF(s,l){return s&&Gr(s,St(l,3))}function xF(s,l){return s&&wf(s,St(l,3))}function wF(s){return s==null?[]:Ta(s,Pe(s))}function TF(s){return s==null?[]:Ta(s,Xe(s))}function tc(s,l,g){var S=s==null?r:Yn(s,l);return S===r?g:S}function EF(s,l){return s!=null&&hm(s,l,W3)}function ec(s,l){return s!=null&&hm(s,l,X3)}var SF=im(function(s,l,g){l!=null&&typeof l.toString!="function"&&(l=fa.call(l)),s[l]=g},nc(Ke)),AF=im(function(s,l,g){l!=null&&typeof l.toString!="function"&&(l=fa.call(l)),ee.call(s,l)?s[l].push(g):s[l]=[g]},St),OF=Bt(Ms);function Pe(s){return We(s)?wg(s):Af(s)}function Xe(s){return We(s)?wg(s,!0):ik(s)}function CF(s,l){var g={};return l=St(l,3),Gr(s,function(S,N,D){Jr(g,l(S,N,D),S)}),g}function RF(s,l){var g={};return l=St(l,3),Gr(s,function(S,N,D){Jr(g,N,l(S,N,D))}),g}var IF=qi(function(s,l,g){Ea(s,l,g)}),Wm=qi(function(s,l,g,S){Ea(s,l,g,S)}),PF=en(function(s,l){var g={};if(s==null)return g;var S=!1;l=de(l,function(D){return D=xn(D,s),S||(S=D.length>1),D}),jr(s,$f(s),g),S&&(g=pr(g,p|c|v,Sk));for(var N=l.length;N--;)Nf(g,l[N]);return g});function NF(s,l){return Xm(s,Ua(St(l)))}var MF=en(function(s,l){return s==null?{}:ok(s,l)});function Xm(s,l){if(s==null)return{};var g=de($f(s),function(S){return[S]});return l=St(l),Ug(s,g,function(S,N){return l(S,N[0])})}function kF(s,l,g){l=xn(l,s);var S=-1,N=l.length;for(N||(N=1,s=r);++S<N;){var D=s==null?r:s[qr(l[S])];D===r&&(S=N,D=g),s=nn(D)?D.call(s):D}return s}function LF(s,l,g){return s==null?s:Ls(s,l,g)}function FF(s,l,g,S){return S=typeof S=="function"?S:r,s==null?s:Ls(s,l,g,S)}var Km=am(Pe),Ym=am(Xe);function BF(s,l,g){var S=Mt(s),N=S||Tn(s)||Vi(s);if(l=St(l,4),g==null){var D=s&&s.constructor;N?g=S?new D:[]:me(s)?g=nn(D)?ji(da(s)):{}:g={}}return(N?cr:Gr)(s,function(H,K,tt){return l(g,H,K,tt)}),g}function DF(s,l){return s==null?!0:Nf(s,l)}function UF(s,l,g){return s==null?s:zg(s,l,Lf(g))}function $F(s,l,g,S){return S=typeof S=="function"?S:r,s==null?s:zg(s,l,Lf(g),S)}function Wi(s){return s==null?[]:df(s,Pe(s))}function GF(s){return s==null?[]:df(s,Xe(s))}function jF(s,l,g){return g===r&&(g=l,l=r),g!==r&&(g=mr(g),g=g===g?g:0),l!==r&&(l=mr(l),l=l===l?l:0),Kn(mr(s),l,g)}function qF(s,l,g){return l=sn(l),g===r?(g=l,l=0):g=sn(g),s=mr(s),K3(s,l,g)}function zF(s,l,g){if(g&&typeof g!="boolean"&&qe(s,l,g)&&(l=g=r),g===r&&(typeof l=="boolean"?(g=l,l=r):typeof s=="boolean"&&(g=s,s=r)),s===r&&l===r?(s=0,l=1):(s=sn(s),l===r?(l=s,s=0):l=sn(l)),s>l){var S=s;s=l,l=S}if(g||s%1||l%1){var N=bg();return De(s+N*(l-s+wM("1e-"+((N+"").length-1))),l)}return Rf(s,l)}var HF=zi(function(s,l,g){return l=l.toLowerCase(),s+(g?Zm(l):l)});function Zm(s){return rc(Jt(s).toLowerCase())}function Qm(s){return s=Jt(s),s&&s.replace(WN,LM).replace(hM,"")}function VF(s,l,g){s=Jt(s),l=nr(l);var S=s.length;g=g===r?S:Kn(kt(g),0,S);var N=g;return g-=l.length,g>=0&&s.slice(g,N)==l}function WF(s){return s=Jt(s),s&&ON.test(s)?s.replace(Rv,FM):s}function XF(s){return s=Jt(s),s&&MN.test(s)?s.replace(Yu,"\\$&"):s}var KF=zi(function(s,l,g){return s+(g?"-":"")+l.toLowerCase()}),YF=zi(function(s,l,g){return s+(g?" ":"")+l.toLowerCase()}),ZF=em("toLowerCase");function QF(s,l,g){s=Jt(s),l=kt(l);var S=l?Bi(s):0;if(!l||S>=l)return s;var N=(l-S)/2;return Ia(ma(N),g)+s+Ia(ga(N),g)}function JF(s,l,g){s=Jt(s),l=kt(l);var S=l?Bi(s):0;return l&&S<l?s+Ia(l-S,g):s}function t4(s,l,g){s=Jt(s),l=kt(l);var S=l?Bi(s):0;return l&&S<l?Ia(l-S,g)+s:s}function e4(s,l,g){return g||l==null?l=0:l&&(l=+l),l3(Jt(s).replace(Zu,""),l||0)}function r4(s,l,g){return(g?qe(s,l,g):l===r)?l=1:l=kt(l),If(Jt(s),l)}function n4(){var s=arguments,l=Jt(s[0]);return s.length<3?l:l.replace(s[1],s[2])}var i4=zi(function(s,l,g){return s+(g?"_":"")+l.toLowerCase()});function s4(s,l,g){return g&&typeof g!="number"&&qe(s,l,g)&&(l=g=r),g=g===r?k:g>>>0,g?(s=Jt(s),s&&(typeof l=="string"||l!=null&&!Jf(l))&&(l=nr(l),!l&&Fi(s))?wn(Rr(s),0,g):s.split(l,g)):[]}var o4=zi(function(s,l,g){return s+(g?" ":"")+rc(l)});function a4(s,l,g){return s=Jt(s),g=g==null?0:Kn(kt(g),0,s.length),l=nr(l),s.slice(g,g+l.length)==l}function l4(s,l,g){var S=B.templateSettings;g&&qe(s,l,g)&&(l=r),s=Jt(s),l=ja({},l,S,lm);var N=ja({},l.imports,S.imports,lm),D=Pe(N),H=df(N,D),K,tt,ut=0,ft=l.interpolate||ea,ht="__p += '",gt=vf((l.escape||ea).source+"|"+ft.source+"|"+(ft===Iv?GN:ea).source+"|"+(l.evaluate||ea).source+"|$","g"),wt="//# sourceURL="+(ee.call(l,"sourceURL")?(l.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++mM+"]")+`
1944
+ `;s.replace(gt,function(Ct,Ut,qt,sr,ze,or){return qt||(qt=sr),ht+=s.slice(ut,or).replace(XN,BM),Ut&&(K=!0,ht+=`' +
1945
1945
  __e(`+Ut+`) +
1946
1946
  '`),ze&&(tt=!0,ht+=`';
1947
1947
  `+ze+`;
1948
- __p += '`),zt&&(ht+=`' +
1949
- ((__t = (`+zt+`)) == null ? '' : __t) +
1948
+ __p += '`),qt&&(ht+=`' +
1949
+ ((__t = (`+qt+`)) == null ? '' : __t) +
1950
1950
  '`),ut=or+Ct.length,Ct}),ht+=`';
1951
1951
  `;var Ot=ee.call(l,"variable")&&l.variable;if(!Ot)ht=`with (obj) {
1952
1952
  `+ht+`
@@ -1957,7 +1957,7 @@ __p += '`),zt&&(ht+=`' +
1957
1957
  function print() { __p += __j.call(arguments, '') }
1958
1958
  `:`;
1959
1959
  `)+ht+`return __p
1960
- }`;var Ft=ty(function(){return Yt(D,wt+"return "+ht).apply(r,H)});if(Ft.source=ht,Qf(Ft))throw Ft;return Ft}function u4(s){return Jt(s).toLowerCase()}function f4(s){return Jt(s).toUpperCase()}function c4(s,l,g){if(s=Jt(s),s&&(g||l===r))return ug(s);if(!s||!(l=nr(l)))return s;var S=Rr(s),N=Rr(l),D=fg(S,N),H=cg(S,N)+1;return wn(S,D,H).join("")}function h4(s,l,g){if(s=Jt(s),s&&(g||l===r))return s.slice(0,dg(s)+1);if(!s||!(l=nr(l)))return s;var S=Rr(s),N=cg(S,Rr(l))+1;return wn(S,0,N).join("")}function d4(s,l,g){if(s=Jt(s),s&&(g||l===r))return s.replace(Zu,"");if(!s||!(l=nr(l)))return s;var S=Rr(s),N=fg(S,Rr(l));return wn(S,N).join("")}function p4(s,l){var g=R,S=C;if(me(l)){var N="separator"in l?l.separator:N;g="length"in l?kt(l.length):g,S="omission"in l?nr(l.omission):S}s=Jt(s);var D=s.length;if(Fi(s)){var H=Rr(s);D=H.length}if(g>=D)return s;var K=g-Bi(S);if(K<1)return S;var tt=H?wn(H,0,K).join(""):s.slice(0,K);if(N===r)return tt+S;if(H&&(K+=tt.length-K),Jf(N)){if(s.slice(K).search(N)){var ut,ft=tt;for(N.global||(N=vf(N.source,Jt(Pv.exec(N))+"g")),N.lastIndex=0;ut=N.exec(ft);)var ht=ut.index;tt=tt.slice(0,ht===r?K:ht)}}else if(s.indexOf(nr(N),K)!=K){var gt=tt.lastIndexOf(N);gt>-1&&(tt=tt.slice(0,gt))}return tt+S}function v4(s){return s=Jt(s),s&&AN.test(s)?s.replace(Cv,zM):s}var g4=zi(function(s,l,g){return s+(g?" ":"")+l.toUpperCase()}),rc=em("toUpperCase");function Jm(s,l,g){return s=Jt(s),l=g?r:l,l===r?UM(s)?WM(s):IM(s):s.match(l)||[]}var ty=Bt(function(s,l){try{return er(s,r,l)}catch(g){return Qf(g)?g:new It(g)}}),m4=en(function(s,l){return cr(l,function(g){g=qr(g),Jr(s,g,Yf(s[g],s))}),s});function y4(s){var l=s==null?0:s.length,g=St();return s=l?de(s,function(S){if(typeof S[1]!="function")throw new hr(a);return[g(S[0]),S[1]]}):[],Bt(function(S){for(var N=-1;++N<l;){var D=s[N];if(er(D[0],this,S))return er(D[1],this,S)}})}function _4(s){return z3(pr(s,p))}function nc(s){return function(){return s}}function b4(s,l){return s==null||s!==s?l:s}var x4=nm(),w4=nm(!0);function Ke(s){return s}function ic(s){return Mg(typeof s=="function"?s:pr(s,p))}function T4(s){return Lg(pr(s,p))}function E4(s,l){return Fg(s,pr(l,p))}var S4=Bt(function(s,l){return function(g){return Ms(g,s,l)}}),A4=Bt(function(s,l){return function(g){return Ms(s,g,l)}});function sc(s,l,g){var S=Pe(l),N=Ta(l,S);g==null&&!(me(l)&&(N.length||!S.length))&&(g=l,l=s,s=this,N=Ta(l,Pe(l)));var D=!(me(g)&&"chain"in g)||!!g.chain,H=nn(s);return cr(N,function(K){var tt=l[K];s[K]=tt,H&&(s.prototype[K]=function(){var ut=this.__chain__;if(D||ut){var ft=s(this.__wrapped__),ht=ft.__actions__=Ve(this.__actions__);return ht.push({func:tt,args:arguments,thisArg:s}),ft.__chain__=ut,ft}return tt.apply(s,gn([this.value()],arguments))})}),s}function O4(){return Me._===this&&(Me._=JM),this}function oc(){}function C4(s){return s=kt(s),Bt(function(l){return Bg(l,s)})}var R4=Bf(de),I4=Bf(ig),P4=Bf(lf);function ey(s){return zf(s)?uf(qr(s)):ak(s)}function N4(s){return function(l){return s==null?r:Yn(s,l)}}var M4=sm(),k4=sm(!0);function ac(){return[]}function lc(){return!1}function L4(){return{}}function F4(){return""}function B4(){return!0}function D4(s,l){if(s=kt(s),s<1||s>nt)return[];var g=k,S=De(s,k);l=St(l),s-=k;for(var N=hf(S,l);++g<s;)l(g);return N}function U4(s){return Mt(s)?de(s,qr):ir(s)?[s]:Ve(xm(Jt(s)))}function $4(s){var l=++ZM;return Jt(s)+l}var G4=Ra(function(s,l){return s+l},0),j4=Df("ceil"),q4=Ra(function(s,l){return s/l},1),z4=Df("floor");function H4(s){return s&&s.length?wa(s,Ke,Tf):r}function V4(s,l){return s&&s.length?wa(s,St(l,2),Tf):r}function W4(s){return ag(s,Ke)}function X4(s,l){return ag(s,St(l,2))}function K4(s){return s&&s.length?wa(s,Ke,Of):r}function Y4(s,l){return s&&s.length?wa(s,St(l,2),Of):r}var Z4=Ra(function(s,l){return s*l},1),Q4=Df("round"),J4=Ra(function(s,l){return s-l},0);function tB(s){return s&&s.length?cf(s,Ke):0}function eB(s,l){return s&&s.length?cf(s,St(l,2)):0}return B.after=TL,B.ary=Nm,B.assign=fF,B.assignIn=Vm,B.assignInWith=ja,B.assignWith=cF,B.at=hF,B.before=Mm,B.bind=Yf,B.bindAll=m4,B.bindKey=km,B.castArray=LL,B.chain=Rm,B.chunk=zk,B.compact=Hk,B.concat=Vk,B.cond=y4,B.conforms=_4,B.constant=nc,B.countBy=tL,B.create=dF,B.curry=Lm,B.curryRight=Fm,B.debounce=Bm,B.defaults=pF,B.defaultsDeep=vF,B.defer=EL,B.delay=SL,B.difference=Wk,B.differenceBy=Xk,B.differenceWith=Kk,B.drop=Yk,B.dropRight=Zk,B.dropRightWhile=Qk,B.dropWhile=Jk,B.fill=t5,B.filter=rL,B.flatMap=sL,B.flatMapDeep=oL,B.flatMapDepth=aL,B.flatten=Sm,B.flattenDeep=e5,B.flattenDepth=r5,B.flip=AL,B.flow=x4,B.flowRight=w4,B.fromPairs=n5,B.functions=wF,B.functionsIn=TF,B.groupBy=lL,B.initial=s5,B.intersection=o5,B.intersectionBy=a5,B.intersectionWith=l5,B.invert=SF,B.invertBy=AF,B.invokeMap=fL,B.iteratee=ic,B.keyBy=cL,B.keys=Pe,B.keysIn=Xe,B.map=Fa,B.mapKeys=CF,B.mapValues=RF,B.matches=T4,B.matchesProperty=E4,B.memoize=Da,B.merge=IF,B.mergeWith=Wm,B.method=S4,B.methodOf=A4,B.mixin=sc,B.negate=Ua,B.nthArg=C4,B.omit=PF,B.omitBy=NF,B.once=OL,B.orderBy=hL,B.over=R4,B.overArgs=CL,B.overEvery=I4,B.overSome=P4,B.partial=Zf,B.partialRight=Dm,B.partition=dL,B.pick=MF,B.pickBy=Xm,B.property=ey,B.propertyOf=N4,B.pull=h5,B.pullAll=Om,B.pullAllBy=d5,B.pullAllWith=p5,B.pullAt=v5,B.range=M4,B.rangeRight=k4,B.rearg=RL,B.reject=gL,B.remove=g5,B.rest=IL,B.reverse=Xf,B.sampleSize=yL,B.set=LF,B.setWith=FF,B.shuffle=_L,B.slice=m5,B.sortBy=wL,B.sortedUniq=E5,B.sortedUniqBy=S5,B.split=s4,B.spread=PL,B.tail=A5,B.take=O5,B.takeRight=C5,B.takeRightWhile=R5,B.takeWhile=I5,B.tap=H5,B.throttle=NL,B.thru=La,B.toArray=qm,B.toPairs=Km,B.toPairsIn=Ym,B.toPath=U4,B.toPlainObject=Hm,B.transform=BF,B.unary=ML,B.union=P5,B.unionBy=N5,B.unionWith=M5,B.uniq=k5,B.uniqBy=L5,B.uniqWith=F5,B.unset=DF,B.unzip=Kf,B.unzipWith=Cm,B.update=UF,B.updateWith=$F,B.values=Wi,B.valuesIn=GF,B.without=B5,B.words=Jm,B.wrap=kL,B.xor=D5,B.xorBy=U5,B.xorWith=$5,B.zip=G5,B.zipObject=j5,B.zipObjectDeep=q5,B.zipWith=z5,B.entries=Km,B.entriesIn=Ym,B.extend=Vm,B.extendWith=ja,sc(B,B),B.add=G4,B.attempt=ty,B.camelCase=HF,B.capitalize=Zm,B.ceil=j4,B.clamp=jF,B.clone=FL,B.cloneDeep=DL,B.cloneDeepWith=UL,B.cloneWith=BL,B.conformsTo=$L,B.deburr=Qm,B.defaultTo=b4,B.divide=q4,B.endsWith=VF,B.eq=Pr,B.escape=WF,B.escapeRegExp=XF,B.every=eL,B.find=nL,B.findIndex=Tm,B.findKey=gF,B.findLast=iL,B.findLastIndex=Em,B.findLastKey=mF,B.floor=z4,B.forEach=Im,B.forEachRight=Pm,B.forIn=yF,B.forInRight=_F,B.forOwn=bF,B.forOwnRight=xF,B.get=tc,B.gt=GL,B.gte=jL,B.has=EF,B.hasIn=ec,B.head=Am,B.identity=Ke,B.includes=uL,B.indexOf=i5,B.inRange=qF,B.invoke=OF,B.isArguments=Jn,B.isArray=Mt,B.isArrayBuffer=qL,B.isArrayLike=We,B.isArrayLikeObject=xe,B.isBoolean=zL,B.isBuffer=Tn,B.isDate=HL,B.isElement=VL,B.isEmpty=WL,B.isEqual=XL,B.isEqualWith=KL,B.isError=Qf,B.isFinite=YL,B.isFunction=nn,B.isInteger=Um,B.isLength=$a,B.isMap=$m,B.isMatch=ZL,B.isMatchWith=QL,B.isNaN=JL,B.isNative=tF,B.isNil=rF,B.isNull=eF,B.isNumber=Gm,B.isObject=me,B.isObjectLike=ye,B.isPlainObject=Us,B.isRegExp=Jf,B.isSafeInteger=nF,B.isSet=jm,B.isString=Ga,B.isSymbol=ir,B.isTypedArray=Vi,B.isUndefined=iF,B.isWeakMap=sF,B.isWeakSet=oF,B.join=u5,B.kebabCase=KF,B.last=gr,B.lastIndexOf=f5,B.lowerCase=YF,B.lowerFirst=ZF,B.lt=aF,B.lte=lF,B.max=H4,B.maxBy=V4,B.mean=W4,B.meanBy=X4,B.min=K4,B.minBy=Y4,B.stubArray=ac,B.stubFalse=lc,B.stubObject=L4,B.stubString=F4,B.stubTrue=B4,B.multiply=Z4,B.nth=c5,B.noConflict=O4,B.noop=oc,B.now=Ba,B.pad=QF,B.padEnd=JF,B.padStart=t4,B.parseInt=e4,B.random=zF,B.reduce=pL,B.reduceRight=vL,B.repeat=r4,B.replace=n4,B.result=kF,B.round=Q4,B.runInContext=Q,B.sample=mL,B.size=bL,B.snakeCase=i4,B.some=xL,B.sortedIndex=y5,B.sortedIndexBy=_5,B.sortedIndexOf=b5,B.sortedLastIndex=x5,B.sortedLastIndexBy=w5,B.sortedLastIndexOf=T5,B.startCase=o4,B.startsWith=a4,B.subtract=J4,B.sum=tB,B.sumBy=eB,B.template=l4,B.times=D4,B.toFinite=sn,B.toInteger=kt,B.toLength=zm,B.toLower=u4,B.toNumber=mr,B.toSafeInteger=uF,B.toString=Jt,B.toUpper=f4,B.trim=c4,B.trimEnd=h4,B.trimStart=d4,B.truncate=p4,B.unescape=v4,B.uniqueId=$4,B.upperCase=g4,B.upperFirst=rc,B.each=Im,B.eachRight=Pm,B.first=Am,sc(B,function(){var s={};return Gr(B,function(l,g){ee.call(B.prototype,g)||(s[g]=l)}),s}(),{chain:!1}),B.VERSION=n,cr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){B[s].placeholder=B}),cr(["drop","take"],function(s,l){Gt.prototype[s]=function(g){g=g===r?1:Ae(kt(g),0);var S=this.__filtered__&&!l?new Gt(this):this.clone();return S.__filtered__?S.__takeCount__=De(g,S.__takeCount__):S.__views__.push({size:De(g,k),type:s+(S.__dir__<0?"Right":"")}),S},Gt.prototype[s+"Right"]=function(g){return this.reverse()[s](g).reverse()}}),cr(["filter","map","takeWhile"],function(s,l){var g=l+1,S=g==F||g==Z;Gt.prototype[s]=function(N){var D=this.clone();return D.__iteratees__.push({iteratee:St(N,3),type:g}),D.__filtered__=D.__filtered__||S,D}}),cr(["head","last"],function(s,l){var g="take"+(l?"Right":"");Gt.prototype[s]=function(){return this[g](1).value()[0]}}),cr(["initial","tail"],function(s,l){var g="drop"+(l?"":"Right");Gt.prototype[s]=function(){return this.__filtered__?new Gt(this):this[g](1)}}),Gt.prototype.compact=function(){return this.filter(Ke)},Gt.prototype.find=function(s){return this.filter(s).head()},Gt.prototype.findLast=function(s){return this.reverse().find(s)},Gt.prototype.invokeMap=Bt(function(s,l){return typeof s=="function"?new Gt(this):this.map(function(g){return Ms(g,s,l)})}),Gt.prototype.reject=function(s){return this.filter(Ua(St(s)))},Gt.prototype.slice=function(s,l){s=kt(s);var g=this;return g.__filtered__&&(s>0||l<0)?new Gt(g):(s<0?g=g.takeRight(-s):s&&(g=g.drop(s)),l!==r&&(l=kt(l),g=l<0?g.dropRight(-l):g.take(l-s)),g)},Gt.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},Gt.prototype.toArray=function(){return this.take(k)},Gr(Gt.prototype,function(s,l){var g=/^(?:filter|find|map|reject)|While$/.test(l),S=/^(?:head|last)$/.test(l),N=B[S?"take"+(l=="last"?"Right":""):l],D=S||/^find/.test(l);N&&(B.prototype[l]=function(){var H=this.__wrapped__,K=S?[1]:arguments,tt=H instanceof Gt,ut=K[0],ft=tt||Mt(H),ht=function(Ut){var zt=N.apply(B,gn([Ut],K));return S&&gt?zt[0]:zt};ft&&g&&typeof ut=="function"&&ut.length!=1&&(tt=ft=!1);var gt=this.__chain__,wt=!!this.__actions__.length,Ot=D&&!gt,Ft=tt&&!wt;if(!D&&ft){H=Ft?H:new Gt(this);var Ct=s.apply(H,K);return Ct.__actions__.push({func:La,args:[ht],thisArg:r}),new dr(Ct,gt)}return Ot&&Ft?s.apply(this,K):(Ct=this.thru(ht),Ot?S?Ct.value()[0]:Ct.value():Ct)})}),cr(["pop","push","shift","sort","splice","unshift"],function(s){var l=aa[s],g=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",S=/^(?:pop|shift)$/.test(s);B.prototype[s]=function(){var N=arguments;if(S&&!this.__chain__){var D=this.value();return l.apply(Mt(D)?D:[],N)}return this[g](function(H){return l.apply(Mt(H)?H:[],N)})}}),Gr(Gt.prototype,function(s,l){var g=B[l];if(g){var S=g.name+"";ee.call(Gi,S)||(Gi[S]=[]),Gi[S].push({name:l,func:g})}}),Gi[Ca(r,m).name]=[{name:"wrapper",func:r}],Gt.prototype.clone=v3,Gt.prototype.reverse=g3,Gt.prototype.value=m3,B.prototype.at=V5,B.prototype.chain=W5,B.prototype.commit=X5,B.prototype.next=K5,B.prototype.plant=Z5,B.prototype.reverse=Q5,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=J5,B.prototype.first=B.prototype.head,As&&(B.prototype[As]=Y5),B},Di=XM();Hn?((Hn.exports=Di)._=Di,nf._=Di):Me._=Di}).call(Ye)}(ta,ta.exports);var wv=ta.exports;const gN={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,totalFrames:0,totalDuration:0},Tv=Et.forwardRef((e,t)=>{const[r,n]=Et.useState([]),[,i]=Et.useState(0),[o,a]=Et.useState([]),[,u]=mt.useState(!1),[f,h]=oN({autoPlay:!1}),d=mt.useRef(null),p=mt.useRef(null),c=mt.useRef(gN),v=mt.useRef(),{tl:y,dragModeRef:b}=mt.useContext(An),{frames:_,delays:m}=f,{src:w,startAt:T,endAt:x,frameStartAt:E,frameEndAt:I,loop:A,transformation:{width:O=0,height:L=0,x:R,y:C,animation:P,colorCorrection:M={}},pointerdown:F}=e,{temperatureFilter:q,sharpnessFilter:Z,hueFilter:z,blurFilter:nt,adjustmentFilter:V}=ys(M),{blurRadius:U=0}=M,k=.1;pN(w,h),Ze(Oe.PAUSE,()=>{d.current&&(d.current.stop(),c.current.isPlaying=!1)}),Et.useEffect(()=>{c.current&&d.current&&(b.current?(d.current.stop(),c.current.isPlaying=!1,c.current.isDragging=!0):c.current.isDragging=!1)},[b]),Et.useEffect(()=>{if(!el(_)){const J=FP(_,pt=>{const{data:yt,width:xt,height:At}=pt,oe=new Uint8Array(yt);return zr.Texture.fromBuffer(oe,xt,At)}),it=J.map((pt,yt)=>({texture:pt,time:m[yt]}));n(J),a(it);let lt=0;m.forEach(pt=>{lt+=pt*10}),i(lt),c.current.totalDuration=lt,c.current.totalFrames=_.length}},[_,m]);const j=wv.debounce(J=>{if(d.current){let it=J===0?0:J/k;it=isNaN(it)?0:it;const lt=c.current.totalFrames;it=it>lt?lt:it,it>=lt?(d.current.gotoAndStop(0),c.current.isPlaying=!1):(d.current.gotoAndPlay(it||0),c.current.isPlaying=!0)}},20),G=wv.debounce(()=>{d.current&&(d.current.stop(),c.current.isPlaying=!1)},50),X=J=>{if(d.current){let it=J===0?0:J/k;it=isNaN(it)?0:it;const lt=c.current.totalFrames;it=it>lt?lt:it,it>=lt?(d.current.gotoAndStop(0),c.current.isPlaying=!1):(d.current.gotoAndPlay(it||0),c.current.isPlaying=!0)}},Y=()=>{d.current&&(d.current.stop(),c.current.isPlaying=!1)},$=()=>{d.current&&(d.current.stop(),c.current.isPlaying=!1)},W=J=>{var lt;const it=J+((lt=v.current)==null?void 0:lt.time());d.current&&b.current?(j(it),G(),c.current.isPlaying=!1):v.current&&d.current&&!c.current.isPlaying&&v.current.isActive()&&y.current.isActive()&&(j(it),c.current.isPlaying=!0)},et=()=>{u(!0)};return mt.useEffect(()=>{let J=_e.context(()=>{});if(p.current&&y.current){const it={duration:Number(I)-Number(E),onStart:X,onComplete:Y,onStartParams:[E,I],onCompleteParams:[],onInterrupt:$,onUpdate:W,onUpdateParams:[E,I]};v.current&&v.current.kill(),J=_e.context(()=>{v.current=_e.from(p.current,it,E),y.current.add(v.current,T)})}return()=>{console.log("PixiGif Sprite Component cleanup"),v.current&&(v.current.kill(),_e.killTweensOf(v.current)),J.revert()}},[P,T,x,E,I]),Vt.jsx(ni,{...e,ref:t,ignoreTlForVideo:!0,isGif:!0,children:Vt.jsx(le.Container,{ref:p,children:r&&r.length>0&&Vt.jsx(xv,{x:R,y:C,width:O,height:L,animationSpeed:1,loop:A,textures:o,onComplete:et,anchor:.5,forwardRef:d,interactive:!0,pointerdown:F,filters:[q,Z,z,V,...U>0?[nt]:[]]})})})});Tv.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiGifSprite"};var Ev={exports:{}};/*!
1960
+ }`;var Ft=ty(function(){return Yt(D,wt+"return "+ht).apply(r,H)});if(Ft.source=ht,Qf(Ft))throw Ft;return Ft}function u4(s){return Jt(s).toLowerCase()}function f4(s){return Jt(s).toUpperCase()}function c4(s,l,g){if(s=Jt(s),s&&(g||l===r))return ug(s);if(!s||!(l=nr(l)))return s;var S=Rr(s),N=Rr(l),D=fg(S,N),H=cg(S,N)+1;return wn(S,D,H).join("")}function h4(s,l,g){if(s=Jt(s),s&&(g||l===r))return s.slice(0,dg(s)+1);if(!s||!(l=nr(l)))return s;var S=Rr(s),N=cg(S,Rr(l))+1;return wn(S,0,N).join("")}function d4(s,l,g){if(s=Jt(s),s&&(g||l===r))return s.replace(Zu,"");if(!s||!(l=nr(l)))return s;var S=Rr(s),N=fg(S,Rr(l));return wn(S,N).join("")}function p4(s,l){var g=R,S=C;if(me(l)){var N="separator"in l?l.separator:N;g="length"in l?kt(l.length):g,S="omission"in l?nr(l.omission):S}s=Jt(s);var D=s.length;if(Fi(s)){var H=Rr(s);D=H.length}if(g>=D)return s;var K=g-Bi(S);if(K<1)return S;var tt=H?wn(H,0,K).join(""):s.slice(0,K);if(N===r)return tt+S;if(H&&(K+=tt.length-K),Jf(N)){if(s.slice(K).search(N)){var ut,ft=tt;for(N.global||(N=vf(N.source,Jt(Pv.exec(N))+"g")),N.lastIndex=0;ut=N.exec(ft);)var ht=ut.index;tt=tt.slice(0,ht===r?K:ht)}}else if(s.indexOf(nr(N),K)!=K){var gt=tt.lastIndexOf(N);gt>-1&&(tt=tt.slice(0,gt))}return tt+S}function v4(s){return s=Jt(s),s&&AN.test(s)?s.replace(Cv,zM):s}var g4=zi(function(s,l,g){return s+(g?" ":"")+l.toUpperCase()}),rc=em("toUpperCase");function Jm(s,l,g){return s=Jt(s),l=g?r:l,l===r?UM(s)?WM(s):IM(s):s.match(l)||[]}var ty=Bt(function(s,l){try{return er(s,r,l)}catch(g){return Qf(g)?g:new It(g)}}),m4=en(function(s,l){return cr(l,function(g){g=qr(g),Jr(s,g,Yf(s[g],s))}),s});function y4(s){var l=s==null?0:s.length,g=St();return s=l?de(s,function(S){if(typeof S[1]!="function")throw new hr(a);return[g(S[0]),S[1]]}):[],Bt(function(S){for(var N=-1;++N<l;){var D=s[N];if(er(D[0],this,S))return er(D[1],this,S)}})}function _4(s){return z3(pr(s,p))}function nc(s){return function(){return s}}function b4(s,l){return s==null||s!==s?l:s}var x4=nm(),w4=nm(!0);function Ke(s){return s}function ic(s){return Mg(typeof s=="function"?s:pr(s,p))}function T4(s){return Lg(pr(s,p))}function E4(s,l){return Fg(s,pr(l,p))}var S4=Bt(function(s,l){return function(g){return Ms(g,s,l)}}),A4=Bt(function(s,l){return function(g){return Ms(s,g,l)}});function sc(s,l,g){var S=Pe(l),N=Ta(l,S);g==null&&!(me(l)&&(N.length||!S.length))&&(g=l,l=s,s=this,N=Ta(l,Pe(l)));var D=!(me(g)&&"chain"in g)||!!g.chain,H=nn(s);return cr(N,function(K){var tt=l[K];s[K]=tt,H&&(s.prototype[K]=function(){var ut=this.__chain__;if(D||ut){var ft=s(this.__wrapped__),ht=ft.__actions__=Ve(this.__actions__);return ht.push({func:tt,args:arguments,thisArg:s}),ft.__chain__=ut,ft}return tt.apply(s,gn([this.value()],arguments))})}),s}function O4(){return Me._===this&&(Me._=JM),this}function oc(){}function C4(s){return s=kt(s),Bt(function(l){return Bg(l,s)})}var R4=Bf(de),I4=Bf(ig),P4=Bf(lf);function ey(s){return zf(s)?uf(qr(s)):ak(s)}function N4(s){return function(l){return s==null?r:Yn(s,l)}}var M4=sm(),k4=sm(!0);function ac(){return[]}function lc(){return!1}function L4(){return{}}function F4(){return""}function B4(){return!0}function D4(s,l){if(s=kt(s),s<1||s>nt)return[];var g=k,S=De(s,k);l=St(l),s-=k;for(var N=hf(S,l);++g<s;)l(g);return N}function U4(s){return Mt(s)?de(s,qr):ir(s)?[s]:Ve(xm(Jt(s)))}function $4(s){var l=++ZM;return Jt(s)+l}var G4=Ra(function(s,l){return s+l},0),j4=Df("ceil"),q4=Ra(function(s,l){return s/l},1),z4=Df("floor");function H4(s){return s&&s.length?wa(s,Ke,Tf):r}function V4(s,l){return s&&s.length?wa(s,St(l,2),Tf):r}function W4(s){return ag(s,Ke)}function X4(s,l){return ag(s,St(l,2))}function K4(s){return s&&s.length?wa(s,Ke,Of):r}function Y4(s,l){return s&&s.length?wa(s,St(l,2),Of):r}var Z4=Ra(function(s,l){return s*l},1),Q4=Df("round"),J4=Ra(function(s,l){return s-l},0);function tB(s){return s&&s.length?cf(s,Ke):0}function eB(s,l){return s&&s.length?cf(s,St(l,2)):0}return B.after=TL,B.ary=Nm,B.assign=fF,B.assignIn=Vm,B.assignInWith=ja,B.assignWith=cF,B.at=hF,B.before=Mm,B.bind=Yf,B.bindAll=m4,B.bindKey=km,B.castArray=LL,B.chain=Rm,B.chunk=zk,B.compact=Hk,B.concat=Vk,B.cond=y4,B.conforms=_4,B.constant=nc,B.countBy=tL,B.create=dF,B.curry=Lm,B.curryRight=Fm,B.debounce=Bm,B.defaults=pF,B.defaultsDeep=vF,B.defer=EL,B.delay=SL,B.difference=Wk,B.differenceBy=Xk,B.differenceWith=Kk,B.drop=Yk,B.dropRight=Zk,B.dropRightWhile=Qk,B.dropWhile=Jk,B.fill=t5,B.filter=rL,B.flatMap=sL,B.flatMapDeep=oL,B.flatMapDepth=aL,B.flatten=Sm,B.flattenDeep=e5,B.flattenDepth=r5,B.flip=AL,B.flow=x4,B.flowRight=w4,B.fromPairs=n5,B.functions=wF,B.functionsIn=TF,B.groupBy=lL,B.initial=s5,B.intersection=o5,B.intersectionBy=a5,B.intersectionWith=l5,B.invert=SF,B.invertBy=AF,B.invokeMap=fL,B.iteratee=ic,B.keyBy=cL,B.keys=Pe,B.keysIn=Xe,B.map=Fa,B.mapKeys=CF,B.mapValues=RF,B.matches=T4,B.matchesProperty=E4,B.memoize=Da,B.merge=IF,B.mergeWith=Wm,B.method=S4,B.methodOf=A4,B.mixin=sc,B.negate=Ua,B.nthArg=C4,B.omit=PF,B.omitBy=NF,B.once=OL,B.orderBy=hL,B.over=R4,B.overArgs=CL,B.overEvery=I4,B.overSome=P4,B.partial=Zf,B.partialRight=Dm,B.partition=dL,B.pick=MF,B.pickBy=Xm,B.property=ey,B.propertyOf=N4,B.pull=h5,B.pullAll=Om,B.pullAllBy=d5,B.pullAllWith=p5,B.pullAt=v5,B.range=M4,B.rangeRight=k4,B.rearg=RL,B.reject=gL,B.remove=g5,B.rest=IL,B.reverse=Xf,B.sampleSize=yL,B.set=LF,B.setWith=FF,B.shuffle=_L,B.slice=m5,B.sortBy=wL,B.sortedUniq=E5,B.sortedUniqBy=S5,B.split=s4,B.spread=PL,B.tail=A5,B.take=O5,B.takeRight=C5,B.takeRightWhile=R5,B.takeWhile=I5,B.tap=H5,B.throttle=NL,B.thru=La,B.toArray=qm,B.toPairs=Km,B.toPairsIn=Ym,B.toPath=U4,B.toPlainObject=Hm,B.transform=BF,B.unary=ML,B.union=P5,B.unionBy=N5,B.unionWith=M5,B.uniq=k5,B.uniqBy=L5,B.uniqWith=F5,B.unset=DF,B.unzip=Kf,B.unzipWith=Cm,B.update=UF,B.updateWith=$F,B.values=Wi,B.valuesIn=GF,B.without=B5,B.words=Jm,B.wrap=kL,B.xor=D5,B.xorBy=U5,B.xorWith=$5,B.zip=G5,B.zipObject=j5,B.zipObjectDeep=q5,B.zipWith=z5,B.entries=Km,B.entriesIn=Ym,B.extend=Vm,B.extendWith=ja,sc(B,B),B.add=G4,B.attempt=ty,B.camelCase=HF,B.capitalize=Zm,B.ceil=j4,B.clamp=jF,B.clone=FL,B.cloneDeep=DL,B.cloneDeepWith=UL,B.cloneWith=BL,B.conformsTo=$L,B.deburr=Qm,B.defaultTo=b4,B.divide=q4,B.endsWith=VF,B.eq=Pr,B.escape=WF,B.escapeRegExp=XF,B.every=eL,B.find=nL,B.findIndex=Tm,B.findKey=gF,B.findLast=iL,B.findLastIndex=Em,B.findLastKey=mF,B.floor=z4,B.forEach=Im,B.forEachRight=Pm,B.forIn=yF,B.forInRight=_F,B.forOwn=bF,B.forOwnRight=xF,B.get=tc,B.gt=GL,B.gte=jL,B.has=EF,B.hasIn=ec,B.head=Am,B.identity=Ke,B.includes=uL,B.indexOf=i5,B.inRange=qF,B.invoke=OF,B.isArguments=Jn,B.isArray=Mt,B.isArrayBuffer=qL,B.isArrayLike=We,B.isArrayLikeObject=xe,B.isBoolean=zL,B.isBuffer=Tn,B.isDate=HL,B.isElement=VL,B.isEmpty=WL,B.isEqual=XL,B.isEqualWith=KL,B.isError=Qf,B.isFinite=YL,B.isFunction=nn,B.isInteger=Um,B.isLength=$a,B.isMap=$m,B.isMatch=ZL,B.isMatchWith=QL,B.isNaN=JL,B.isNative=tF,B.isNil=rF,B.isNull=eF,B.isNumber=Gm,B.isObject=me,B.isObjectLike=ye,B.isPlainObject=Us,B.isRegExp=Jf,B.isSafeInteger=nF,B.isSet=jm,B.isString=Ga,B.isSymbol=ir,B.isTypedArray=Vi,B.isUndefined=iF,B.isWeakMap=sF,B.isWeakSet=oF,B.join=u5,B.kebabCase=KF,B.last=gr,B.lastIndexOf=f5,B.lowerCase=YF,B.lowerFirst=ZF,B.lt=aF,B.lte=lF,B.max=H4,B.maxBy=V4,B.mean=W4,B.meanBy=X4,B.min=K4,B.minBy=Y4,B.stubArray=ac,B.stubFalse=lc,B.stubObject=L4,B.stubString=F4,B.stubTrue=B4,B.multiply=Z4,B.nth=c5,B.noConflict=O4,B.noop=oc,B.now=Ba,B.pad=QF,B.padEnd=JF,B.padStart=t4,B.parseInt=e4,B.random=zF,B.reduce=pL,B.reduceRight=vL,B.repeat=r4,B.replace=n4,B.result=kF,B.round=Q4,B.runInContext=Q,B.sample=mL,B.size=bL,B.snakeCase=i4,B.some=xL,B.sortedIndex=y5,B.sortedIndexBy=_5,B.sortedIndexOf=b5,B.sortedLastIndex=x5,B.sortedLastIndexBy=w5,B.sortedLastIndexOf=T5,B.startCase=o4,B.startsWith=a4,B.subtract=J4,B.sum=tB,B.sumBy=eB,B.template=l4,B.times=D4,B.toFinite=sn,B.toInteger=kt,B.toLength=zm,B.toLower=u4,B.toNumber=mr,B.toSafeInteger=uF,B.toString=Jt,B.toUpper=f4,B.trim=c4,B.trimEnd=h4,B.trimStart=d4,B.truncate=p4,B.unescape=v4,B.uniqueId=$4,B.upperCase=g4,B.upperFirst=rc,B.each=Im,B.eachRight=Pm,B.first=Am,sc(B,function(){var s={};return Gr(B,function(l,g){ee.call(B.prototype,g)||(s[g]=l)}),s}(),{chain:!1}),B.VERSION=n,cr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){B[s].placeholder=B}),cr(["drop","take"],function(s,l){Gt.prototype[s]=function(g){g=g===r?1:Ae(kt(g),0);var S=this.__filtered__&&!l?new Gt(this):this.clone();return S.__filtered__?S.__takeCount__=De(g,S.__takeCount__):S.__views__.push({size:De(g,k),type:s+(S.__dir__<0?"Right":"")}),S},Gt.prototype[s+"Right"]=function(g){return this.reverse()[s](g).reverse()}}),cr(["filter","map","takeWhile"],function(s,l){var g=l+1,S=g==F||g==Z;Gt.prototype[s]=function(N){var D=this.clone();return D.__iteratees__.push({iteratee:St(N,3),type:g}),D.__filtered__=D.__filtered__||S,D}}),cr(["head","last"],function(s,l){var g="take"+(l?"Right":"");Gt.prototype[s]=function(){return this[g](1).value()[0]}}),cr(["initial","tail"],function(s,l){var g="drop"+(l?"":"Right");Gt.prototype[s]=function(){return this.__filtered__?new Gt(this):this[g](1)}}),Gt.prototype.compact=function(){return this.filter(Ke)},Gt.prototype.find=function(s){return this.filter(s).head()},Gt.prototype.findLast=function(s){return this.reverse().find(s)},Gt.prototype.invokeMap=Bt(function(s,l){return typeof s=="function"?new Gt(this):this.map(function(g){return Ms(g,s,l)})}),Gt.prototype.reject=function(s){return this.filter(Ua(St(s)))},Gt.prototype.slice=function(s,l){s=kt(s);var g=this;return g.__filtered__&&(s>0||l<0)?new Gt(g):(s<0?g=g.takeRight(-s):s&&(g=g.drop(s)),l!==r&&(l=kt(l),g=l<0?g.dropRight(-l):g.take(l-s)),g)},Gt.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},Gt.prototype.toArray=function(){return this.take(k)},Gr(Gt.prototype,function(s,l){var g=/^(?:filter|find|map|reject)|While$/.test(l),S=/^(?:head|last)$/.test(l),N=B[S?"take"+(l=="last"?"Right":""):l],D=S||/^find/.test(l);N&&(B.prototype[l]=function(){var H=this.__wrapped__,K=S?[1]:arguments,tt=H instanceof Gt,ut=K[0],ft=tt||Mt(H),ht=function(Ut){var qt=N.apply(B,gn([Ut],K));return S&&gt?qt[0]:qt};ft&&g&&typeof ut=="function"&&ut.length!=1&&(tt=ft=!1);var gt=this.__chain__,wt=!!this.__actions__.length,Ot=D&&!gt,Ft=tt&&!wt;if(!D&&ft){H=Ft?H:new Gt(this);var Ct=s.apply(H,K);return Ct.__actions__.push({func:La,args:[ht],thisArg:r}),new dr(Ct,gt)}return Ot&&Ft?s.apply(this,K):(Ct=this.thru(ht),Ot?S?Ct.value()[0]:Ct.value():Ct)})}),cr(["pop","push","shift","sort","splice","unshift"],function(s){var l=aa[s],g=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",S=/^(?:pop|shift)$/.test(s);B.prototype[s]=function(){var N=arguments;if(S&&!this.__chain__){var D=this.value();return l.apply(Mt(D)?D:[],N)}return this[g](function(H){return l.apply(Mt(H)?H:[],N)})}}),Gr(Gt.prototype,function(s,l){var g=B[l];if(g){var S=g.name+"";ee.call(Gi,S)||(Gi[S]=[]),Gi[S].push({name:l,func:g})}}),Gi[Ca(r,m).name]=[{name:"wrapper",func:r}],Gt.prototype.clone=v3,Gt.prototype.reverse=g3,Gt.prototype.value=m3,B.prototype.at=V5,B.prototype.chain=W5,B.prototype.commit=X5,B.prototype.next=K5,B.prototype.plant=Z5,B.prototype.reverse=Q5,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=J5,B.prototype.first=B.prototype.head,As&&(B.prototype[As]=Y5),B},Di=XM();Hn?((Hn.exports=Di)._=Di,nf._=Di):Me._=Di}).call(Ye)}(ta,ta.exports);var wv=ta.exports;const gN={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,totalFrames:0,totalDuration:0},Tv=Et.forwardRef((e,t)=>{const[r,n]=Et.useState([]),[,i]=Et.useState(0),[o,a]=Et.useState([]),[,u]=mt.useState(!1),[f,h]=oN({autoPlay:!1}),d=mt.useRef(null),p=mt.useRef(null),c=mt.useRef(gN),v=mt.useRef(),{tl:y,dragModeRef:b}=mt.useContext(An),{frames:_,delays:m}=f,{src:w,startAt:T,endAt:x,frameStartAt:E,frameEndAt:I,loop:A,transformation:{width:O=0,height:L=0,x:R,y:C,animation:P,colorCorrection:M={}},pointerdown:F}=e,{temperatureFilter:q,sharpnessFilter:Z,hueFilter:z,blurFilter:nt,adjustmentFilter:V}=ys(M),{blurRadius:U=0}=M,k=.1;pN(w,h),Ze(Oe.PAUSE,()=>{d.current&&(d.current.stop(),c.current.isPlaying=!1)}),Et.useEffect(()=>{c.current&&d.current&&(b.current?(d.current.stop(),c.current.isPlaying=!1,c.current.isDragging=!0):c.current.isDragging=!1)},[b]),Et.useEffect(()=>{if(!el(_)){const J=FP(_,pt=>{const{data:yt,width:xt,height:At}=pt,oe=new Uint8Array(yt);return zr.Texture.fromBuffer(oe,xt,At)}),it=J.map((pt,yt)=>({texture:pt,time:m[yt]}));n(J),a(it);let lt=0;m.forEach(pt=>{lt+=pt*10}),i(lt),c.current.totalDuration=lt,c.current.totalFrames=_.length}},[_,m]);const j=wv.debounce(J=>{if(d.current){let it=J===0?0:J/k;it=isNaN(it)?0:it;const lt=c.current.totalFrames;it=it>lt?lt:it,it>=lt?(d.current.gotoAndStop(0),c.current.isPlaying=!1):(d.current.gotoAndPlay(it||0),c.current.isPlaying=!0)}},20),G=wv.debounce(()=>{d.current&&(d.current.stop(),c.current.isPlaying=!1)},50),X=J=>{if(d.current){let it=J===0?0:J/k;it=isNaN(it)?0:it;const lt=c.current.totalFrames;it=it>lt?lt:it,it>=lt?(d.current.gotoAndStop(0),c.current.isPlaying=!1):(d.current.gotoAndPlay(it||0),c.current.isPlaying=!0)}},Y=()=>{d.current&&(d.current.stop(),c.current.isPlaying=!1)},$=()=>{d.current&&(d.current.stop(),c.current.isPlaying=!1)},W=J=>{var lt;const it=J+((lt=v.current)==null?void 0:lt.time());d.current&&b.current?(j(it),G(),c.current.isPlaying=!1):v.current&&d.current&&!c.current.isPlaying&&v.current.isActive()&&y.current.isActive()&&(j(it),c.current.isPlaying=!0)},et=()=>{u(!0)};return mt.useEffect(()=>{let J=_e.context(()=>{});if(p.current&&y.current){const it={duration:Number(I)-Number(E),onStart:X,onComplete:Y,onStartParams:[E,I],onCompleteParams:[],onInterrupt:$,onUpdate:W,onUpdateParams:[E,I]};v.current&&v.current.kill(),J=_e.context(()=>{v.current=_e.from(p.current,it,E),y.current.add(v.current,T)})}return()=>{console.log("PixiGif Sprite Component cleanup"),v.current&&(v.current.kill(),_e.killTweensOf(v.current)),J.revert()}},[P,T,x,E,I]),Vt.jsx(ni,{...e,ref:t,ignoreTlForVideo:!0,isGif:!0,children:Vt.jsx(le.Container,{ref:p,children:r&&r.length>0&&Vt.jsx(xv,{x:R,y:C,width:O,height:L,animationSpeed:1,loop:A,textures:o,onComplete:et,anchor:.5,forwardRef:d,interactive:!0,pointerdown:F,filters:[q,Z,z,V,...U>0?[nt]:[]]})})})});Tv.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiGifSprite"};var Ev={exports:{}};/*!
1961
1961
  * Quill Editor v1.3.7
1962
1962
  * https://quilljs.com/
1963
1963
  * Copyright (c) 2014, Jason Chen
@@ -1977,18 +1977,18 @@ function print() { __p += __j.call(arguments, '') }
1977
1977
  `)||this.appendChild(p.default.create("text",`
1978
1978
  `)),u(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"optimize",this).call(this,C);var P=this.next;P!=null&&P.prev===this&&P.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===P.statics.formats(P.domNode)&&(P.optimize(C),P.moveChildren(this),P.remove())}},{key:"replace",value:function(C){u(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"replace",this).call(this,C),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(P){var M=p.default.find(P);M==null?P.parentNode.removeChild(P):M instanceof p.default.Embed?M.remove():M.unwrap()})}}],[{key:"create",value:function(C){var P=u(L.__proto__||Object.getPrototypeOf(L),"create",this).call(this,C);return P.setAttribute("spellcheck",!1),P}},{key:"formats",value:function(){return!0}}]),L}(v.default);A.blotName="code-block",A.tagName="PRE",A.TAB=" ",n.Code=I,n.default=A},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(V){return typeof V}:function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},a=function(){function V(U,k){var j=[],G=!0,X=!1,Y=void 0;try{for(var $=U[Symbol.iterator](),W;!(G=(W=$.next()).done)&&(j.push(W.value),!(k&&j.length===k));G=!0);}catch(et){X=!0,Y=et}finally{try{!G&&$.return&&$.return()}finally{if(X)throw Y}}return j}return function(U,k){if(Array.isArray(U))return U;if(Symbol.iterator in Object(U))return V(U,k);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function V(U,k){for(var j=0;j<k.length;j++){var G=k[j];G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G&&(G.writable=!0),Object.defineProperty(U,G.key,G)}}return function(U,k,j){return k&&V(U.prototype,k),j&&V(U,j),U}}(),f=i(2),h=P(f),d=i(20),p=P(d),c=i(0),v=P(c),y=i(13),b=P(y),_=i(24),m=P(_),w=i(4),T=P(w),x=i(16),E=P(x),I=i(21),A=P(I),O=i(11),L=P(O),R=i(3),C=P(R);function P(V){return V&&V.__esModule?V:{default:V}}function M(V,U,k){return U in V?Object.defineProperty(V,U,{value:k,enumerable:!0,configurable:!0,writable:!0}):V[U]=k,V}function F(V,U){if(!(V instanceof U))throw new TypeError("Cannot call a class as a function")}var q=/^[ -~]*$/,Z=function(){function V(U){F(this,V),this.scroll=U,this.delta=this.getDelta()}return u(V,[{key:"applyDelta",value:function(k){var j=this,G=!1;this.scroll.update();var X=this.scroll.length();return this.scroll.batchStart(),k=nt(k),k.reduce(function(Y,$){var W=$.retain||$.delete||$.insert.length||1,et=$.attributes||{};if($.insert!=null){if(typeof $.insert=="string"){var J=$.insert;J.endsWith(`
1979
1979
  `)&&G&&(G=!1,J=J.slice(0,-1)),Y>=X&&!J.endsWith(`
1980
- `)&&(G=!0),j.scroll.insertAt(Y,J);var it=j.scroll.line(Y),lt=a(it,2),pt=lt[0],yt=lt[1],xt=(0,C.default)({},(0,w.bubbleFormats)(pt));if(pt instanceof T.default){var At=pt.descendant(v.default.Leaf,yt),oe=a(At,1),qt=oe[0];xt=(0,C.default)(xt,(0,w.bubbleFormats)(qt))}et=p.default.attributes.diff(xt,et)||{}}else if(o($.insert)==="object"){var rt=Object.keys($.insert)[0];if(rt==null)return Y;j.scroll.insertAt(Y,rt,$.insert[rt])}X+=W}return Object.keys(et).forEach(function(at){j.scroll.formatAt(Y,W,at,et[at])}),Y+W},0),k.reduce(function(Y,$){return typeof $.delete=="number"?(j.scroll.deleteAt(Y,$.delete),Y):Y+($.retain||$.insert.length||1)},0),this.scroll.batchEnd(),this.update(k)}},{key:"deleteText",value:function(k,j){return this.scroll.deleteAt(k,j),this.update(new h.default().retain(k).delete(j))}},{key:"formatLine",value:function(k,j){var G=this,X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(X).forEach(function(Y){if(!(G.scroll.whitelist!=null&&!G.scroll.whitelist[Y])){var $=G.scroll.lines(k,Math.max(j,1)),W=j;$.forEach(function(et){var J=et.length();if(!(et instanceof b.default))et.format(Y,X[Y]);else{var it=k-et.offset(G.scroll),lt=et.newlineIndex(it+W)-it+1;et.formatAt(it,lt,Y,X[Y])}W-=J})}}),this.scroll.optimize(),this.update(new h.default().retain(k).retain(j,(0,A.default)(X)))}},{key:"formatText",value:function(k,j){var G=this,X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(X).forEach(function(Y){G.scroll.formatAt(k,j,Y,X[Y])}),this.update(new h.default().retain(k).retain(j,(0,A.default)(X)))}},{key:"getContents",value:function(k,j){return this.delta.slice(k,k+j)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(k,j){return k.concat(j.delta())},new h.default)}},{key:"getFormat",value:function(k){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,G=[],X=[];j===0?this.scroll.path(k).forEach(function($){var W=a($,1),et=W[0];et instanceof T.default?G.push(et):et instanceof v.default.Leaf&&X.push(et)}):(G=this.scroll.lines(k,j),X=this.scroll.descendants(v.default.Leaf,k,j));var Y=[G,X].map(function($){if($.length===0)return{};for(var W=(0,w.bubbleFormats)($.shift());Object.keys(W).length>0;){var et=$.shift();if(et==null)return W;W=z((0,w.bubbleFormats)(et),W)}return W});return C.default.apply(C.default,Y)}},{key:"getText",value:function(k,j){return this.getContents(k,j).filter(function(G){return typeof G.insert=="string"}).map(function(G){return G.insert}).join("")}},{key:"insertEmbed",value:function(k,j,G){return this.scroll.insertAt(k,j,G),this.update(new h.default().retain(k).insert(M({},j,G)))}},{key:"insertText",value:function(k,j){var G=this,X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return j=j.replace(/\r\n/g,`
1980
+ `)&&(G=!0),j.scroll.insertAt(Y,J);var it=j.scroll.line(Y),lt=a(it,2),pt=lt[0],yt=lt[1],xt=(0,C.default)({},(0,w.bubbleFormats)(pt));if(pt instanceof T.default){var At=pt.descendant(v.default.Leaf,yt),oe=a(At,1),Ht=oe[0];xt=(0,C.default)(xt,(0,w.bubbleFormats)(Ht))}et=p.default.attributes.diff(xt,et)||{}}else if(o($.insert)==="object"){var rt=Object.keys($.insert)[0];if(rt==null)return Y;j.scroll.insertAt(Y,rt,$.insert[rt])}X+=W}return Object.keys(et).forEach(function(at){j.scroll.formatAt(Y,W,at,et[at])}),Y+W},0),k.reduce(function(Y,$){return typeof $.delete=="number"?(j.scroll.deleteAt(Y,$.delete),Y):Y+($.retain||$.insert.length||1)},0),this.scroll.batchEnd(),this.update(k)}},{key:"deleteText",value:function(k,j){return this.scroll.deleteAt(k,j),this.update(new h.default().retain(k).delete(j))}},{key:"formatLine",value:function(k,j){var G=this,X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(X).forEach(function(Y){if(!(G.scroll.whitelist!=null&&!G.scroll.whitelist[Y])){var $=G.scroll.lines(k,Math.max(j,1)),W=j;$.forEach(function(et){var J=et.length();if(!(et instanceof b.default))et.format(Y,X[Y]);else{var it=k-et.offset(G.scroll),lt=et.newlineIndex(it+W)-it+1;et.formatAt(it,lt,Y,X[Y])}W-=J})}}),this.scroll.optimize(),this.update(new h.default().retain(k).retain(j,(0,A.default)(X)))}},{key:"formatText",value:function(k,j){var G=this,X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(X).forEach(function(Y){G.scroll.formatAt(k,j,Y,X[Y])}),this.update(new h.default().retain(k).retain(j,(0,A.default)(X)))}},{key:"getContents",value:function(k,j){return this.delta.slice(k,k+j)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(k,j){return k.concat(j.delta())},new h.default)}},{key:"getFormat",value:function(k){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,G=[],X=[];j===0?this.scroll.path(k).forEach(function($){var W=a($,1),et=W[0];et instanceof T.default?G.push(et):et instanceof v.default.Leaf&&X.push(et)}):(G=this.scroll.lines(k,j),X=this.scroll.descendants(v.default.Leaf,k,j));var Y=[G,X].map(function($){if($.length===0)return{};for(var W=(0,w.bubbleFormats)($.shift());Object.keys(W).length>0;){var et=$.shift();if(et==null)return W;W=z((0,w.bubbleFormats)(et),W)}return W});return C.default.apply(C.default,Y)}},{key:"getText",value:function(k,j){return this.getContents(k,j).filter(function(G){return typeof G.insert=="string"}).map(function(G){return G.insert}).join("")}},{key:"insertEmbed",value:function(k,j,G){return this.scroll.insertAt(k,j,G),this.update(new h.default().retain(k).insert(M({},j,G)))}},{key:"insertText",value:function(k,j){var G=this,X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return j=j.replace(/\r\n/g,`
1981
1981
  `).replace(/\r/g,`
1982
1982
  `),this.scroll.insertAt(k,j),Object.keys(X).forEach(function(Y){G.scroll.formatAt(k,j.length,Y,X[Y])}),this.update(new h.default().retain(k).insert(j,(0,A.default)(X)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var k=this.scroll.children.head;return k.statics.blotName!==T.default.blotName||k.children.length>1?!1:k.children.head instanceof E.default}},{key:"removeFormat",value:function(k,j){var G=this.getText(k,j),X=this.scroll.line(k+j),Y=a(X,2),$=Y[0],W=Y[1],et=0,J=new h.default;$!=null&&($ instanceof b.default?et=$.newlineIndex(W)-W+1:et=$.length()-W,J=$.delta().slice(W,W+et-1).insert(`
1983
1983
  `));var it=this.getContents(k,j+et),lt=it.diff(new h.default().insert(G).concat(J)),pt=new h.default().retain(k).concat(lt);return this.applyDelta(pt)}},{key:"update",value:function(k){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,X=this.delta;if(j.length===1&&j[0].type==="characterData"&&j[0].target.data.match(q)&&v.default.find(j[0].target)){var Y=v.default.find(j[0].target),$=(0,w.bubbleFormats)(Y),W=Y.offset(this.scroll),et=j[0].oldValue.replace(m.default.CONTENTS,""),J=new h.default().insert(et),it=new h.default().insert(Y.value()),lt=new h.default().retain(W).concat(J.diff(it,G));k=lt.reduce(function(pt,yt){return yt.insert?pt.insert(yt.insert,$):pt.push(yt)},new h.default),this.delta=X.compose(k)}else this.delta=this.getDelta(),(!k||!(0,L.default)(X.compose(k),this.delta))&&(k=X.diff(this.delta,G));return k}}]),V}();function z(V,U){return Object.keys(U).reduce(function(k,j){return V[j]==null||(U[j]===V[j]?k[j]=U[j]:Array.isArray(U[j])?U[j].indexOf(V[j])<0&&(k[j]=U[j].concat([V[j]])):k[j]=[U[j],V[j]]),k},{})}function nt(V){return V.reduce(function(U,k){if(k.insert===1){var j=(0,A.default)(k.attributes);return delete j.image,U.insert({image:k.attributes.image},j)}if(k.attributes!=null&&(k.attributes.list===!0||k.attributes.bullet===!0)&&(k=(0,A.default)(k),k.attributes.list?k.attributes.list="ordered":(k.attributes.list="bullet",delete k.attributes.bullet)),typeof k.insert=="string"){var G=k.insert.replace(/\r\n/g,`
1984
1984
  `).replace(/\r/g,`
1985
1985
  `);return U.insert(G,k.attributes)}return U.push(k)},new h.default)}n.default=Z},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.Range=void 0;var o=function(){function O(L,R){var C=[],P=!0,M=!1,F=void 0;try{for(var q=L[Symbol.iterator](),Z;!(P=(Z=q.next()).done)&&(C.push(Z.value),!(R&&C.length===R));P=!0);}catch(z){M=!0,F=z}finally{try{!P&&q.return&&q.return()}finally{if(M)throw F}}return C}return function(L,R){if(Array.isArray(L))return L;if(Symbol.iterator in Object(L))return O(L,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function O(L,R){for(var C=0;C<R.length;C++){var P=R[C];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(L,P.key,P)}}return function(L,R,C){return R&&O(L.prototype,R),C&&O(L,C),L}}(),u=i(0),f=m(u),h=i(21),d=m(h),p=i(11),c=m(p),v=i(8),y=m(v),b=i(10),_=m(b);function m(O){return O&&O.__esModule?O:{default:O}}function w(O){if(Array.isArray(O)){for(var L=0,R=Array(O.length);L<O.length;L++)R[L]=O[L];return R}else return Array.from(O)}function T(O,L){if(!(O instanceof L))throw new TypeError("Cannot call a class as a function")}var x=(0,_.default)("quill:selection"),E=function O(L){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;T(this,O),this.index=L,this.length=R},I=function(){function O(L,R){var C=this;T(this,O),this.emitter=R,this.scroll=L,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=f.default.create("cursor",this),this.lastRange=this.savedRange=new E(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){C.mouseDown||setTimeout(C.update.bind(C,y.default.sources.USER),1)}),this.emitter.on(y.default.events.EDITOR_CHANGE,function(P,M){P===y.default.events.TEXT_CHANGE&&M.length()>0&&C.update(y.default.sources.SILENT)}),this.emitter.on(y.default.events.SCROLL_BEFORE_UPDATE,function(){if(C.hasFocus()){var P=C.getNativeRange();P!=null&&P.start.node!==C.cursor.textNode&&C.emitter.once(y.default.events.SCROLL_UPDATE,function(){try{C.setNativeRange(P.start.node,P.start.offset,P.end.node,P.end.offset)}catch{}})}}),this.emitter.on(y.default.events.SCROLL_OPTIMIZE,function(P,M){if(M.range){var F=M.range,q=F.startNode,Z=F.startOffset,z=F.endNode,nt=F.endOffset;C.setNativeRange(q,Z,z,nt)}}),this.update(y.default.sources.SILENT)}return a(O,[{key:"handleComposition",value:function(){var R=this;this.root.addEventListener("compositionstart",function(){R.composing=!0}),this.root.addEventListener("compositionend",function(){if(R.composing=!1,R.cursor.parent){var C=R.cursor.restore();if(!C)return;setTimeout(function(){R.setNativeRange(C.startNode,C.startOffset,C.endNode,C.endOffset)},1)}})}},{key:"handleDragging",value:function(){var R=this;this.emitter.listenDOM("mousedown",document.body,function(){R.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){R.mouseDown=!1,R.update(y.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(R,C){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[R])){this.scroll.update();var P=this.getNativeRange();if(!(P==null||!P.native.collapsed||f.default.query(R,f.default.Scope.BLOCK))){if(P.start.node!==this.cursor.textNode){var M=f.default.find(P.start.node,!1);if(M==null)return;if(M instanceof f.default.Leaf){var F=M.split(P.start.offset);M.parent.insertBefore(this.cursor,F)}else M.insertBefore(this.cursor,P.start.node);this.cursor.attach()}this.cursor.format(R,C),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(R){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,P=this.scroll.length();R=Math.min(R,P-1),C=Math.min(R+C,P-1)-R;var M=void 0,F=this.scroll.leaf(R),q=o(F,2),Z=q[0],z=q[1];if(Z==null)return null;var nt=Z.position(z,!0),V=o(nt,2);M=V[0],z=V[1];var U=document.createRange();if(C>0){U.setStart(M,z);var k=this.scroll.leaf(R+C),j=o(k,2);if(Z=j[0],z=j[1],Z==null)return null;var G=Z.position(z,!0),X=o(G,2);return M=X[0],z=X[1],U.setEnd(M,z),U.getBoundingClientRect()}else{var Y="left",$=void 0;return M instanceof Text?(z<M.data.length?(U.setStart(M,z),U.setEnd(M,z+1)):(U.setStart(M,z-1),U.setEnd(M,z),Y="right"),$=U.getBoundingClientRect()):($=Z.domNode.getBoundingClientRect(),z>0&&(Y="right")),{bottom:$.top+$.height,height:$.height,left:$[Y],right:$[Y],top:$.top,width:0}}}},{key:"getNativeRange",value:function(){var R=document.getSelection();if(R==null||R.rangeCount<=0)return null;var C=R.getRangeAt(0);if(C==null)return null;var P=this.normalizeNative(C);return x.info("getNativeRange",P),P}},{key:"getRange",value:function(){var R=this.getNativeRange();if(R==null)return[null,null];var C=this.normalizedToRange(R);return[C,R]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(R){var C=this,P=[[R.start.node,R.start.offset]];R.native.collapsed||P.push([R.end.node,R.end.offset]);var M=P.map(function(Z){var z=o(Z,2),nt=z[0],V=z[1],U=f.default.find(nt,!0),k=U.offset(C.scroll);return V===0?k:U instanceof f.default.Container?k+U.length():k+U.index(nt,V)}),F=Math.min(Math.max.apply(Math,w(M)),this.scroll.length()-1),q=Math.min.apply(Math,[F].concat(w(M)));return new E(q,F-q)}},{key:"normalizeNative",value:function(R){if(!A(this.root,R.startContainer)||!R.collapsed&&!A(this.root,R.endContainer))return null;var C={start:{node:R.startContainer,offset:R.startOffset},end:{node:R.endContainer,offset:R.endOffset},native:R};return[C.start,C.end].forEach(function(P){for(var M=P.node,F=P.offset;!(M instanceof Text)&&M.childNodes.length>0;)if(M.childNodes.length>F)M=M.childNodes[F],F=0;else if(M.childNodes.length===F)M=M.lastChild,F=M instanceof Text?M.data.length:M.childNodes.length+1;else break;P.node=M,P.offset=F}),C}},{key:"rangeToNative",value:function(R){var C=this,P=R.collapsed?[R.index]:[R.index,R.index+R.length],M=[],F=this.scroll.length();return P.forEach(function(q,Z){q=Math.min(F-1,q);var z=void 0,nt=C.scroll.leaf(q),V=o(nt,2),U=V[0],k=V[1],j=U.position(k,Z!==0),G=o(j,2);z=G[0],k=G[1],M.push(z,k)}),M.length<2&&(M=M.concat(M)),M}},{key:"scrollIntoView",value:function(R){var C=this.lastRange;if(C!=null){var P=this.getBounds(C.index,C.length);if(P!=null){var M=this.scroll.length()-1,F=this.scroll.line(Math.min(C.index,M)),q=o(F,1),Z=q[0],z=Z;if(C.length>0){var nt=this.scroll.line(Math.min(C.index+C.length,M)),V=o(nt,1);z=V[0]}if(!(Z==null||z==null)){var U=R.getBoundingClientRect();P.top<U.top?R.scrollTop-=U.top-P.top:P.bottom>U.bottom&&(R.scrollTop+=P.bottom-U.bottom)}}}}},{key:"setNativeRange",value:function(R,C){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:R,M=arguments.length>3&&arguments[3]!==void 0?arguments[3]:C,F=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(x.info("setNativeRange",R,C,P,M),!(R!=null&&(this.root.parentNode==null||R.parentNode==null||P.parentNode==null))){var q=document.getSelection();if(q!=null)if(R!=null){this.hasFocus()||this.root.focus();var Z=(this.getNativeRange()||{}).native;if(Z==null||F||R!==Z.startContainer||C!==Z.startOffset||P!==Z.endContainer||M!==Z.endOffset){R.tagName=="BR"&&(C=[].indexOf.call(R.parentNode.childNodes,R),R=R.parentNode),P.tagName=="BR"&&(M=[].indexOf.call(P.parentNode.childNodes,P),P=P.parentNode);var z=document.createRange();z.setStart(R,C),z.setEnd(P,M),q.removeAllRanges(),q.addRange(z)}}else q.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(R){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:y.default.sources.API;if(typeof C=="string"&&(P=C,C=!1),x.info("setRange",R),R!=null){var M=this.rangeToNative(R);this.setNativeRange.apply(this,w(M).concat([C]))}else this.setNativeRange(null);this.update(P)}},{key:"update",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:y.default.sources.USER,C=this.lastRange,P=this.getRange(),M=o(P,2),F=M[0],q=M[1];if(this.lastRange=F,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,c.default)(C,this.lastRange)){var Z;!this.composing&&q!=null&&q.native.collapsed&&q.start.node!==this.cursor.textNode&&this.cursor.restore();var z=[y.default.events.SELECTION_CHANGE,(0,d.default)(this.lastRange),(0,d.default)(C),R];if((Z=this.emitter).emit.apply(Z,[y.default.events.EDITOR_CHANGE].concat(z)),R!==y.default.sources.SILENT){var nt;(nt=this.emitter).emit.apply(nt,z)}}}}]),O}();function A(O,L){try{L.parentNode}catch{return!1}return L instanceof Text&&(L=L.parentNode),O.contains(L)}n.Range=E,n.default=I},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function y(b,_){for(var m=0;m<_.length;m++){var w=_[m];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(b,w.key,w)}}return function(b,_,m){return _&&y(b.prototype,_),m&&y(b,m),b}}(),a=function y(b,_,m){b===null&&(b=Function.prototype);var w=Object.getOwnPropertyDescriptor(b,_);if(w===void 0){var T=Object.getPrototypeOf(b);return T===null?void 0:y(T,_,m)}else{if("value"in w)return w.value;var x=w.get;return x===void 0?void 0:x.call(m)}},u=i(0),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function d(y,b){if(!(y instanceof b))throw new TypeError("Cannot call a class as a function")}function p(y,b){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:y}function c(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);y.prototype=Object.create(b&&b.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(y,b):y.__proto__=b)}var v=function(y){c(b,y);function b(){return d(this,b),p(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return o(b,[{key:"insertInto",value:function(m,w){m.children.length===0?a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"insertInto",this).call(this,m,w):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),b}(f.default.Embed);v.blotName="break",v.tagName="BR",n.default=v},function(r,n,i){var o=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,v){c.__proto__=v}||function(c,v){for(var y in v)v.hasOwnProperty(y)&&(c[y]=v[y])};return function(c,v){p(c,v);function y(){this.constructor=c}c.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(44),u=i(30),f=i(1),h=function(p){o(c,p);function c(v){var y=p.call(this,v)||this;return y.build(),y}return c.prototype.appendChild=function(v){this.insertBefore(v)},c.prototype.attach=function(){p.prototype.attach.call(this),this.children.forEach(function(v){v.attach()})},c.prototype.build=function(){var v=this;this.children=new a.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(y){try{var b=d(y);v.insertBefore(b,v.children.head||void 0)}catch(_){if(_ instanceof f.ParchmentError)return;throw _}})},c.prototype.deleteAt=function(v,y){if(v===0&&y===this.length())return this.remove();this.children.forEachAt(v,y,function(b,_,m){b.deleteAt(_,m)})},c.prototype.descendant=function(v,y){var b=this.children.find(y),_=b[0],m=b[1];return v.blotName==null&&v(_)||v.blotName!=null&&_ instanceof v?[_,m]:_ instanceof c?_.descendant(v,m):[null,-1]},c.prototype.descendants=function(v,y,b){y===void 0&&(y=0),b===void 0&&(b=Number.MAX_VALUE);var _=[],m=b;return this.children.forEachAt(y,b,function(w,T,x){(v.blotName==null&&v(w)||v.blotName!=null&&w instanceof v)&&_.push(w),w instanceof c&&(_=_.concat(w.descendants(v,T,m))),m-=x}),_},c.prototype.detach=function(){this.children.forEach(function(v){v.detach()}),p.prototype.detach.call(this)},c.prototype.formatAt=function(v,y,b,_){this.children.forEachAt(v,y,function(m,w,T){m.formatAt(w,T,b,_)})},c.prototype.insertAt=function(v,y,b){var _=this.children.find(v),m=_[0],w=_[1];if(m)m.insertAt(w,y,b);else{var T=b==null?f.create("text",y):f.create(y,b);this.appendChild(T)}},c.prototype.insertBefore=function(v,y){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(b){return v instanceof b}))throw new f.ParchmentError("Cannot insert "+v.statics.blotName+" into "+this.statics.blotName);v.insertInto(this,y)},c.prototype.length=function(){return this.children.reduce(function(v,y){return v+y.length()},0)},c.prototype.moveChildren=function(v,y){this.children.forEach(function(b){v.insertBefore(b,y)})},c.prototype.optimize=function(v){if(p.prototype.optimize.call(this,v),this.children.length===0)if(this.statics.defaultChild!=null){var y=f.create(this.statics.defaultChild);this.appendChild(y),y.optimize(v)}else this.remove()},c.prototype.path=function(v,y){y===void 0&&(y=!1);var b=this.children.find(v,y),_=b[0],m=b[1],w=[[this,v]];return _ instanceof c?w.concat(_.path(m,y)):(_!=null&&w.push([_,m]),w)},c.prototype.removeChild=function(v){this.children.remove(v)},c.prototype.replace=function(v){v instanceof c&&v.moveChildren(this),p.prototype.replace.call(this,v)},c.prototype.split=function(v,y){if(y===void 0&&(y=!1),!y){if(v===0)return this;if(v===this.length())return this.next}var b=this.clone();return this.parent.insertBefore(b,this.next),this.children.forEachAt(v,this.length(),function(_,m,w){_=_.split(m,y),b.appendChild(_)}),b},c.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},c.prototype.update=function(v,y){var b=this,_=[],m=[];v.forEach(function(w){w.target===b.domNode&&w.type==="childList"&&(_.push.apply(_,w.addedNodes),m.push.apply(m,w.removedNodes))}),m.forEach(function(w){if(!(w.parentNode!=null&&w.tagName!=="IFRAME"&&document.body.compareDocumentPosition(w)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var T=f.find(w);T!=null&&(T.domNode.parentNode==null||T.domNode.parentNode===b.domNode)&&T.detach()}}),_.filter(function(w){return w.parentNode==b.domNode}).sort(function(w,T){return w===T?0:w.compareDocumentPosition(T)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(w){var T=null;w.nextSibling!=null&&(T=f.find(w.nextSibling));var x=d(w);(x.next!=T||x.next==null)&&(x.parent!=null&&x.parent.removeChild(b),b.insertBefore(x,T||void 0))})},c}(u.default);function d(p){var c=f.find(p);if(c==null)try{c=f.create(p)}catch{c=f.create(f.Scope.INLINE),[].slice.call(p.childNodes).forEach(function(y){c.domNode.appendChild(y)}),p.parentNode&&p.parentNode.replaceChild(c.domNode,p),c.attach()}return c}n.default=h},function(r,n,i){var o=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,v){c.__proto__=v}||function(c,v){for(var y in v)v.hasOwnProperty(y)&&(c[y]=v[y])};return function(c,v){p(c,v);function y(){this.constructor=c}c.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(12),u=i(31),f=i(17),h=i(1),d=function(p){o(c,p);function c(v){var y=p.call(this,v)||this;return y.attributes=new u.default(y.domNode),y}return c.formats=function(v){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return v.tagName.toLowerCase()},c.prototype.format=function(v,y){var b=h.query(v);b instanceof a.default?this.attributes.attribute(b,y):y&&b!=null&&(v!==this.statics.blotName||this.formats()[v]!==y)&&this.replaceWith(v,y)},c.prototype.formats=function(){var v=this.attributes.values(),y=this.statics.formats(this.domNode);return y!=null&&(v[this.statics.blotName]=y),v},c.prototype.replaceWith=function(v,y){var b=p.prototype.replaceWith.call(this,v,y);return this.attributes.copy(b),b},c.prototype.update=function(v,y){var b=this;p.prototype.update.call(this,v,y),v.some(function(_){return _.target===b.domNode&&_.type==="attributes"})&&this.attributes.build()},c.prototype.wrap=function(v,y){var b=p.prototype.wrap.call(this,v,y);return b instanceof c&&b.statics.scope===this.statics.scope&&this.attributes.move(b),b},c}(f.default);n.default=d},function(r,n,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var c in p)p.hasOwnProperty(c)&&(d[c]=p[c])};return function(d,p){h(d,p);function c(){this.constructor=d}d.prototype=p===null?Object.create(p):(c.prototype=p.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(30),u=i(1),f=function(h){o(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.value=function(p){return!0},d.prototype.index=function(p,c){return this.domNode===p||this.domNode.compareDocumentPosition(p)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(c,1):-1},d.prototype.position=function(p,c){var v=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return p>0&&(v+=1),[this.parent.domNode,v]},d.prototype.value=function(){var p;return p={},p[this.statics.blotName]=this.statics.value(this.domNode)||!0,p},d.scope=u.Scope.INLINE_BLOT,d}(a.default);n.default=f},function(r,n,i){var o=i(11),a=i(3),u={attributes:{compose:function(h,d,p){typeof h!="object"&&(h={}),typeof d!="object"&&(d={});var c=a(!0,{},d);p||(c=Object.keys(c).reduce(function(y,b){return c[b]!=null&&(y[b]=c[b]),y},{}));for(var v in h)h[v]!==void 0&&d[v]===void 0&&(c[v]=h[v]);return Object.keys(c).length>0?c:void 0},diff:function(h,d){typeof h!="object"&&(h={}),typeof d!="object"&&(d={});var p=Object.keys(h).concat(Object.keys(d)).reduce(function(c,v){return o(h[v],d[v])||(c[v]=d[v]===void 0?null:d[v]),c},{});return Object.keys(p).length>0?p:void 0},transform:function(h,d,p){if(typeof h!="object")return d;if(typeof d=="object"){if(!p)return d;var c=Object.keys(d).reduce(function(v,y){return h[y]===void 0&&(v[y]=d[y]),v},{});return Object.keys(c).length>0?c:void 0}}},iterator:function(h){return new f(h)},length:function(h){return typeof h.delete=="number"?h.delete:typeof h.retain=="number"?h.retain:typeof h.insert=="string"?h.insert.length:1}};function f(h){this.ops=h,this.index=0,this.offset=0}f.prototype.hasNext=function(){return this.peekLength()<1/0},f.prototype.next=function(h){h||(h=1/0);var d=this.ops[this.index];if(d){var p=this.offset,c=u.length(d);if(h>=c-p?(h=c-p,this.index+=1,this.offset=0):this.offset+=h,typeof d.delete=="number")return{delete:h};var v={};return d.attributes&&(v.attributes=d.attributes),typeof d.retain=="number"?v.retain=h:typeof d.insert=="string"?v.insert=d.insert.substr(p,h):v.insert=d.insert,v}else return{retain:1/0}},f.prototype.peek=function(){return this.ops[this.index]},f.prototype.peekLength=function(){return this.ops[this.index]?u.length(this.ops[this.index])-this.offset:1/0},f.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},f.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var h=this.offset,d=this.index,p=this.next(),c=this.ops.slice(this.index);return this.offset=h,this.index=d,[p].concat(c)}else return[]},r.exports=u},function(r,n){var i=function(){function o(b,_){return _!=null&&b instanceof _}var a;try{a=Map}catch{a=function(){}}var u;try{u=Set}catch{u=function(){}}var f;try{f=Promise}catch{f=function(){}}function h(b,_,m,w,T){typeof _=="object"&&(m=_.depth,w=_.prototype,T=_.includeNonEnumerable,_=_.circular);var x=[],E=[],I=typeof Buffer<"u";typeof _>"u"&&(_=!0),typeof m>"u"&&(m=1/0);function A(O,L){if(O===null)return null;if(L===0)return O;var R,C;if(typeof O!="object")return O;if(o(O,a))R=new a;else if(o(O,u))R=new u;else if(o(O,f))R=new f(function(U,k){O.then(function(j){U(A(j,L-1))},function(j){k(A(j,L-1))})});else if(h.__isArray(O))R=[];else if(h.__isRegExp(O))R=new RegExp(O.source,y(O)),O.lastIndex&&(R.lastIndex=O.lastIndex);else if(h.__isDate(O))R=new Date(O.getTime());else{if(I&&Buffer.isBuffer(O))return Buffer.allocUnsafe?R=Buffer.allocUnsafe(O.length):R=new Buffer(O.length),O.copy(R),R;o(O,Error)?R=Object.create(O):typeof w>"u"?(C=Object.getPrototypeOf(O),R=Object.create(C)):(R=Object.create(w),C=w)}if(_){var P=x.indexOf(O);if(P!=-1)return E[P];x.push(O),E.push(R)}o(O,a)&&O.forEach(function(U,k){var j=A(k,L-1),G=A(U,L-1);R.set(j,G)}),o(O,u)&&O.forEach(function(U){var k=A(U,L-1);R.add(k)});for(var M in O){var F;C&&(F=Object.getOwnPropertyDescriptor(C,M)),!(F&&F.set==null)&&(R[M]=A(O[M],L-1))}if(Object.getOwnPropertySymbols)for(var q=Object.getOwnPropertySymbols(O),M=0;M<q.length;M++){var Z=q[M],z=Object.getOwnPropertyDescriptor(O,Z);z&&!z.enumerable&&!T||(R[Z]=A(O[Z],L-1),z.enumerable||Object.defineProperty(R,Z,{enumerable:!1}))}if(T)for(var nt=Object.getOwnPropertyNames(O),M=0;M<nt.length;M++){var V=nt[M],z=Object.getOwnPropertyDescriptor(O,V);z&&z.enumerable||(R[V]=A(O[V],L-1),Object.defineProperty(R,V,{enumerable:!1}))}return R}return A(b,m)}h.clonePrototype=function(_){if(_===null)return null;var m=function(){};return m.prototype=_,new m};function d(b){return Object.prototype.toString.call(b)}h.__objToStr=d;function p(b){return typeof b=="object"&&d(b)==="[object Date]"}h.__isDate=p;function c(b){return typeof b=="object"&&d(b)==="[object Array]"}h.__isArray=c;function v(b){return typeof b=="object"&&d(b)==="[object RegExp]"}h.__isRegExp=v;function y(b){var _="";return b.global&&(_+="g"),b.ignoreCase&&(_+="i"),b.multiline&&(_+="m"),_}return h.__getRegExpFlags=y,h}();typeof r=="object"&&r.exports&&(r.exports=i)},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function R(C,P){var M=[],F=!0,q=!1,Z=void 0;try{for(var z=C[Symbol.iterator](),nt;!(F=(nt=z.next()).done)&&(M.push(nt.value),!(P&&M.length===P));F=!0);}catch(V){q=!0,Z=V}finally{try{!F&&z.return&&z.return()}finally{if(q)throw Z}}return M}return function(C,P){if(Array.isArray(C))return C;if(Symbol.iterator in Object(C))return R(C,P);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function R(C,P){for(var M=0;M<P.length;M++){var F=P[M];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(C,F.key,F)}}return function(C,P,M){return P&&R(C.prototype,P),M&&R(C,M),C}}(),u=function R(C,P,M){C===null&&(C=Function.prototype);var F=Object.getOwnPropertyDescriptor(C,P);if(F===void 0){var q=Object.getPrototypeOf(C);return q===null?void 0:R(q,P,M)}else{if("value"in F)return F.value;var Z=F.get;return Z===void 0?void 0:Z.call(M)}},f=i(0),h=x(f),d=i(8),p=x(d),c=i(4),v=x(c),y=i(16),b=x(y),_=i(13),m=x(_),w=i(25),T=x(w);function x(R){return R&&R.__esModule?R:{default:R}}function E(R,C){if(!(R instanceof C))throw new TypeError("Cannot call a class as a function")}function I(R,C){if(!R)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C&&(typeof C=="object"||typeof C=="function")?C:R}function A(R,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof C);R.prototype=Object.create(C&&C.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),C&&(Object.setPrototypeOf?Object.setPrototypeOf(R,C):R.__proto__=C)}function O(R){return R instanceof v.default||R instanceof c.BlockEmbed}var L=function(R){A(C,R);function C(P,M){E(this,C);var F=I(this,(C.__proto__||Object.getPrototypeOf(C)).call(this,P));return F.emitter=M.emitter,Array.isArray(M.whitelist)&&(F.whitelist=M.whitelist.reduce(function(q,Z){return q[Z]=!0,q},{})),F.domNode.addEventListener("DOMNodeInserted",function(){}),F.optimize(),F.enable(),F}return a(C,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(M,F){var q=this.line(M),Z=o(q,2),z=Z[0],nt=Z[1],V=this.line(M+F),U=o(V,1),k=U[0];if(u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"deleteAt",this).call(this,M,F),k!=null&&z!==k&&nt>0){if(z instanceof c.BlockEmbed||k instanceof c.BlockEmbed){this.optimize();return}if(z instanceof m.default){var j=z.newlineIndex(z.length(),!0);if(j>-1&&(z=z.split(j+1),z===k)){this.optimize();return}}else if(k instanceof m.default){var G=k.newlineIndex(0);G>-1&&k.split(G+1)}var X=k.children.head instanceof b.default?null:k.children.head;z.moveChildren(k,X),z.remove()}this.optimize()}},{key:"enable",value:function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",M)}},{key:"formatAt",value:function(M,F,q,Z){this.whitelist!=null&&!this.whitelist[q]||(u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"formatAt",this).call(this,M,F,q,Z),this.optimize())}},{key:"insertAt",value:function(M,F,q){if(!(q!=null&&this.whitelist!=null&&!this.whitelist[F])){if(M>=this.length())if(q==null||h.default.query(F,h.default.Scope.BLOCK)==null){var Z=h.default.create(this.statics.defaultChild);this.appendChild(Z),q==null&&F.endsWith(`
1986
- `)&&(F=F.slice(0,-1)),Z.insertAt(0,F,q)}else{var z=h.default.create(F,q);this.appendChild(z)}else u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"insertAt",this).call(this,M,F,q);this.optimize()}}},{key:"insertBefore",value:function(M,F){if(M.statics.scope===h.default.Scope.INLINE_BLOT){var q=h.default.create(this.statics.defaultChild);q.appendChild(M),M=q}u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"insertBefore",this).call(this,M,F)}},{key:"leaf",value:function(M){return this.path(M).pop()||[null,-1]}},{key:"line",value:function(M){return M===this.length()?this.line(M-1):this.descendant(O,M)}},{key:"lines",value:function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,q=function Z(z,nt,V){var U=[],k=V;return z.children.forEachAt(nt,V,function(j,G,X){O(j)?U.push(j):j instanceof h.default.Container&&(U=U.concat(Z(j,G,k))),k-=X}),U};return q(this,M,F)}},{key:"optimize",value:function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"optimize",this).call(this,M,F),M.length>0&&this.emitter.emit(p.default.events.SCROLL_OPTIMIZE,M,F))}},{key:"path",value:function(M){return u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"path",this).call(this,M).slice(1)}},{key:"update",value:function(M){if(this.batch!==!0){var F=p.default.sources.USER;typeof M=="string"&&(F=M),Array.isArray(M)||(M=this.observer.takeRecords()),M.length>0&&this.emitter.emit(p.default.events.SCROLL_BEFORE_UPDATE,F,M),u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"update",this).call(this,M.concat([])),M.length>0&&this.emitter.emit(p.default.events.SCROLL_UPDATE,F,M)}}}]),C}(h.default.Scroll);L.blotName="scroll",L.className="ql-editor",L.tagName="DIV",L.defaultChild="block",L.allowedChildren=[v.default,c.BlockEmbed,T.default],n.default=L},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.SHORTKEY=n.default=void 0;var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},a=function(){function $(W,et){var J=[],it=!0,lt=!1,pt=void 0;try{for(var yt=W[Symbol.iterator](),xt;!(it=(xt=yt.next()).done)&&(J.push(xt.value),!(et&&J.length===et));it=!0);}catch(At){lt=!0,pt=At}finally{try{!it&&yt.return&&yt.return()}finally{if(lt)throw pt}}return J}return function(W,et){if(Array.isArray(W))return W;if(Symbol.iterator in Object(W))return $(W,et);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function $(W,et){for(var J=0;J<et.length;J++){var it=et[J];it.enumerable=it.enumerable||!1,it.configurable=!0,"value"in it&&(it.writable=!0),Object.defineProperty(W,it.key,it)}}return function(W,et,J){return et&&$(W.prototype,et),J&&$(W,J),W}}(),f=i(21),h=R(f),d=i(11),p=R(d),c=i(3),v=R(c),y=i(2),b=R(y),_=i(20),m=R(_),w=i(0),T=R(w),x=i(5),E=R(x),I=i(10),A=R(I),O=i(9),L=R(O);function R($){return $&&$.__esModule?$:{default:$}}function C($,W,et){return W in $?Object.defineProperty($,W,{value:et,enumerable:!0,configurable:!0,writable:!0}):$[W]=et,$}function P($,W){if(!($ instanceof W))throw new TypeError("Cannot call a class as a function")}function M($,W){if(!$)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return W&&(typeof W=="object"||typeof W=="function")?W:$}function F($,W){if(typeof W!="function"&&W!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof W);$.prototype=Object.create(W&&W.prototype,{constructor:{value:$,enumerable:!1,writable:!0,configurable:!0}}),W&&(Object.setPrototypeOf?Object.setPrototypeOf($,W):$.__proto__=W)}var q=(0,A.default)("quill:keyboard"),Z=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",z=function($){F(W,$),u(W,null,[{key:"match",value:function(J,it){return it=Y(it),["altKey","ctrlKey","metaKey","shiftKey"].some(function(lt){return!!it[lt]!==J[lt]&&it[lt]!==null})?!1:it.key===(J.which||J.keyCode)}}]);function W(et,J){P(this,W);var it=M(this,(W.__proto__||Object.getPrototypeOf(W)).call(this,et,J));return it.bindings={},Object.keys(it.options.bindings).forEach(function(lt){lt==="list autofill"&&et.scroll.whitelist!=null&&!et.scroll.whitelist.list||it.options.bindings[lt]&&it.addBinding(it.options.bindings[lt])}),it.addBinding({key:W.keys.ENTER,shiftKey:null},j),it.addBinding({key:W.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(it.addBinding({key:W.keys.BACKSPACE},{collapsed:!0},V),it.addBinding({key:W.keys.DELETE},{collapsed:!0},U)):(it.addBinding({key:W.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},V),it.addBinding({key:W.keys.DELETE},{collapsed:!0,suffix:/^.?$/},U)),it.addBinding({key:W.keys.BACKSPACE},{collapsed:!1},k),it.addBinding({key:W.keys.DELETE},{collapsed:!1},k),it.addBinding({key:W.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},V),it.listen(),it}return u(W,[{key:"addBinding",value:function(J){var it=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},lt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},pt=Y(J);if(pt==null||pt.key==null)return q.warn("Attempted to add invalid keyboard binding",pt);typeof it=="function"&&(it={handler:it}),typeof lt=="function"&&(lt={handler:lt}),pt=(0,v.default)(pt,it,lt),this.bindings[pt.key]=this.bindings[pt.key]||[],this.bindings[pt.key].push(pt)}},{key:"listen",value:function(){var J=this;this.quill.root.addEventListener("keydown",function(it){if(!it.defaultPrevented){var lt=it.which||it.keyCode,pt=(J.bindings[lt]||[]).filter(function(he){return W.match(it,he)});if(pt.length!==0){var yt=J.quill.getSelection();if(!(yt==null||!J.quill.hasFocus())){var xt=J.quill.getLine(yt.index),At=a(xt,2),oe=At[0],qt=At[1],rt=J.quill.getLeaf(yt.index),at=a(rt,2),dt=at[0],vt=at[1],ct=yt.length===0?[dt,vt]:J.quill.getLeaf(yt.index+yt.length),Pt=a(ct,2),Lt=Pt[0],Nt=Pt[1],He=dt instanceof T.default.Text?dt.value().slice(0,vt):"",Ge=Lt instanceof T.default.Text?Lt.value().slice(Nt):"",Qt={collapsed:yt.length===0,empty:yt.length===0&&oe.length()<=1,format:J.quill.getFormat(yt),offset:qt,prefix:He,suffix:Ge},Es=pt.some(function(he){if(he.collapsed!=null&&he.collapsed!==Qt.collapsed||he.empty!=null&&he.empty!==Qt.empty||he.offset!=null&&he.offset!==Qt.offset)return!1;if(Array.isArray(he.format)){if(he.format.every(function(ur){return Qt.format[ur]==null}))return!1}else if(o(he.format)==="object"&&!Object.keys(he.format).every(function(ur){return he.format[ur]===!0?Qt.format[ur]!=null:he.format[ur]===!1?Qt.format[ur]==null:(0,p.default)(he.format[ur],Qt.format[ur])}))return!1;return he.prefix!=null&&!he.prefix.test(Qt.prefix)||he.suffix!=null&&!he.suffix.test(Qt.suffix)?!1:he.handler.call(J,yt,Qt)!==!0});Es&&it.preventDefault()}}}})}}]),W}(L.default);z.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},z.DEFAULTS={bindings:{bold:X("bold"),italic:X("italic"),underline:X("underline"),indent:{key:z.keys.TAB,format:["blockquote","indent","list"],handler:function(W,et){if(et.collapsed&&et.offset!==0)return!0;this.quill.format("indent","+1",E.default.sources.USER)}},outdent:{key:z.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(W,et){if(et.collapsed&&et.offset!==0)return!0;this.quill.format("indent","-1",E.default.sources.USER)}},"outdent backspace":{key:z.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(W,et){et.format.indent!=null?this.quill.format("indent","-1",E.default.sources.USER):et.format.list!=null&&this.quill.format("list",!1,E.default.sources.USER)}},"indent code-block":G(!0),"outdent code-block":G(!1),"remove tab":{key:z.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(W){this.quill.deleteText(W.index-1,1,E.default.sources.USER)}},tab:{key:z.keys.TAB,handler:function(W){this.quill.history.cutoff();var et=new b.default().retain(W.index).delete(W.length).insert(" ");this.quill.updateContents(et,E.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(W.index+1,E.default.sources.SILENT)}},"list empty enter":{key:z.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(W,et){this.quill.format("list",!1,E.default.sources.USER),et.format.indent&&this.quill.format("indent",!1,E.default.sources.USER)}},"checklist enter":{key:z.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(W){var et=this.quill.getLine(W.index),J=a(et,2),it=J[0],lt=J[1],pt=(0,v.default)({},it.formats(),{list:"checked"}),yt=new b.default().retain(W.index).insert(`
1986
+ `)&&(F=F.slice(0,-1)),Z.insertAt(0,F,q)}else{var z=h.default.create(F,q);this.appendChild(z)}else u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"insertAt",this).call(this,M,F,q);this.optimize()}}},{key:"insertBefore",value:function(M,F){if(M.statics.scope===h.default.Scope.INLINE_BLOT){var q=h.default.create(this.statics.defaultChild);q.appendChild(M),M=q}u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"insertBefore",this).call(this,M,F)}},{key:"leaf",value:function(M){return this.path(M).pop()||[null,-1]}},{key:"line",value:function(M){return M===this.length()?this.line(M-1):this.descendant(O,M)}},{key:"lines",value:function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,q=function Z(z,nt,V){var U=[],k=V;return z.children.forEachAt(nt,V,function(j,G,X){O(j)?U.push(j):j instanceof h.default.Container&&(U=U.concat(Z(j,G,k))),k-=X}),U};return q(this,M,F)}},{key:"optimize",value:function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"optimize",this).call(this,M,F),M.length>0&&this.emitter.emit(p.default.events.SCROLL_OPTIMIZE,M,F))}},{key:"path",value:function(M){return u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"path",this).call(this,M).slice(1)}},{key:"update",value:function(M){if(this.batch!==!0){var F=p.default.sources.USER;typeof M=="string"&&(F=M),Array.isArray(M)||(M=this.observer.takeRecords()),M.length>0&&this.emitter.emit(p.default.events.SCROLL_BEFORE_UPDATE,F,M),u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"update",this).call(this,M.concat([])),M.length>0&&this.emitter.emit(p.default.events.SCROLL_UPDATE,F,M)}}}]),C}(h.default.Scroll);L.blotName="scroll",L.className="ql-editor",L.tagName="DIV",L.defaultChild="block",L.allowedChildren=[v.default,c.BlockEmbed,T.default],n.default=L},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.SHORTKEY=n.default=void 0;var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},a=function(){function $(W,et){var J=[],it=!0,lt=!1,pt=void 0;try{for(var yt=W[Symbol.iterator](),xt;!(it=(xt=yt.next()).done)&&(J.push(xt.value),!(et&&J.length===et));it=!0);}catch(At){lt=!0,pt=At}finally{try{!it&&yt.return&&yt.return()}finally{if(lt)throw pt}}return J}return function(W,et){if(Array.isArray(W))return W;if(Symbol.iterator in Object(W))return $(W,et);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function $(W,et){for(var J=0;J<et.length;J++){var it=et[J];it.enumerable=it.enumerable||!1,it.configurable=!0,"value"in it&&(it.writable=!0),Object.defineProperty(W,it.key,it)}}return function(W,et,J){return et&&$(W.prototype,et),J&&$(W,J),W}}(),f=i(21),h=R(f),d=i(11),p=R(d),c=i(3),v=R(c),y=i(2),b=R(y),_=i(20),m=R(_),w=i(0),T=R(w),x=i(5),E=R(x),I=i(10),A=R(I),O=i(9),L=R(O);function R($){return $&&$.__esModule?$:{default:$}}function C($,W,et){return W in $?Object.defineProperty($,W,{value:et,enumerable:!0,configurable:!0,writable:!0}):$[W]=et,$}function P($,W){if(!($ instanceof W))throw new TypeError("Cannot call a class as a function")}function M($,W){if(!$)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return W&&(typeof W=="object"||typeof W=="function")?W:$}function F($,W){if(typeof W!="function"&&W!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof W);$.prototype=Object.create(W&&W.prototype,{constructor:{value:$,enumerable:!1,writable:!0,configurable:!0}}),W&&(Object.setPrototypeOf?Object.setPrototypeOf($,W):$.__proto__=W)}var q=(0,A.default)("quill:keyboard"),Z=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",z=function($){F(W,$),u(W,null,[{key:"match",value:function(J,it){return it=Y(it),["altKey","ctrlKey","metaKey","shiftKey"].some(function(lt){return!!it[lt]!==J[lt]&&it[lt]!==null})?!1:it.key===(J.which||J.keyCode)}}]);function W(et,J){P(this,W);var it=M(this,(W.__proto__||Object.getPrototypeOf(W)).call(this,et,J));return it.bindings={},Object.keys(it.options.bindings).forEach(function(lt){lt==="list autofill"&&et.scroll.whitelist!=null&&!et.scroll.whitelist.list||it.options.bindings[lt]&&it.addBinding(it.options.bindings[lt])}),it.addBinding({key:W.keys.ENTER,shiftKey:null},j),it.addBinding({key:W.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(it.addBinding({key:W.keys.BACKSPACE},{collapsed:!0},V),it.addBinding({key:W.keys.DELETE},{collapsed:!0},U)):(it.addBinding({key:W.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},V),it.addBinding({key:W.keys.DELETE},{collapsed:!0,suffix:/^.?$/},U)),it.addBinding({key:W.keys.BACKSPACE},{collapsed:!1},k),it.addBinding({key:W.keys.DELETE},{collapsed:!1},k),it.addBinding({key:W.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},V),it.listen(),it}return u(W,[{key:"addBinding",value:function(J){var it=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},lt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},pt=Y(J);if(pt==null||pt.key==null)return q.warn("Attempted to add invalid keyboard binding",pt);typeof it=="function"&&(it={handler:it}),typeof lt=="function"&&(lt={handler:lt}),pt=(0,v.default)(pt,it,lt),this.bindings[pt.key]=this.bindings[pt.key]||[],this.bindings[pt.key].push(pt)}},{key:"listen",value:function(){var J=this;this.quill.root.addEventListener("keydown",function(it){if(!it.defaultPrevented){var lt=it.which||it.keyCode,pt=(J.bindings[lt]||[]).filter(function(he){return W.match(it,he)});if(pt.length!==0){var yt=J.quill.getSelection();if(!(yt==null||!J.quill.hasFocus())){var xt=J.quill.getLine(yt.index),At=a(xt,2),oe=At[0],Ht=At[1],rt=J.quill.getLeaf(yt.index),at=a(rt,2),dt=at[0],vt=at[1],ct=yt.length===0?[dt,vt]:J.quill.getLeaf(yt.index+yt.length),Pt=a(ct,2),Lt=Pt[0],Nt=Pt[1],He=dt instanceof T.default.Text?dt.value().slice(0,vt):"",Ge=Lt instanceof T.default.Text?Lt.value().slice(Nt):"",Qt={collapsed:yt.length===0,empty:yt.length===0&&oe.length()<=1,format:J.quill.getFormat(yt),offset:Ht,prefix:He,suffix:Ge},Es=pt.some(function(he){if(he.collapsed!=null&&he.collapsed!==Qt.collapsed||he.empty!=null&&he.empty!==Qt.empty||he.offset!=null&&he.offset!==Qt.offset)return!1;if(Array.isArray(he.format)){if(he.format.every(function(ur){return Qt.format[ur]==null}))return!1}else if(o(he.format)==="object"&&!Object.keys(he.format).every(function(ur){return he.format[ur]===!0?Qt.format[ur]!=null:he.format[ur]===!1?Qt.format[ur]==null:(0,p.default)(he.format[ur],Qt.format[ur])}))return!1;return he.prefix!=null&&!he.prefix.test(Qt.prefix)||he.suffix!=null&&!he.suffix.test(Qt.suffix)?!1:he.handler.call(J,yt,Qt)!==!0});Es&&it.preventDefault()}}}})}}]),W}(L.default);z.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},z.DEFAULTS={bindings:{bold:X("bold"),italic:X("italic"),underline:X("underline"),indent:{key:z.keys.TAB,format:["blockquote","indent","list"],handler:function(W,et){if(et.collapsed&&et.offset!==0)return!0;this.quill.format("indent","+1",E.default.sources.USER)}},outdent:{key:z.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(W,et){if(et.collapsed&&et.offset!==0)return!0;this.quill.format("indent","-1",E.default.sources.USER)}},"outdent backspace":{key:z.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(W,et){et.format.indent!=null?this.quill.format("indent","-1",E.default.sources.USER):et.format.list!=null&&this.quill.format("list",!1,E.default.sources.USER)}},"indent code-block":G(!0),"outdent code-block":G(!1),"remove tab":{key:z.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(W){this.quill.deleteText(W.index-1,1,E.default.sources.USER)}},tab:{key:z.keys.TAB,handler:function(W){this.quill.history.cutoff();var et=new b.default().retain(W.index).delete(W.length).insert(" ");this.quill.updateContents(et,E.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(W.index+1,E.default.sources.SILENT)}},"list empty enter":{key:z.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(W,et){this.quill.format("list",!1,E.default.sources.USER),et.format.indent&&this.quill.format("indent",!1,E.default.sources.USER)}},"checklist enter":{key:z.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(W){var et=this.quill.getLine(W.index),J=a(et,2),it=J[0],lt=J[1],pt=(0,v.default)({},it.formats(),{list:"checked"}),yt=new b.default().retain(W.index).insert(`
1987
1987
  `,pt).retain(it.length()-lt-1).retain(1,{list:"unchecked"});this.quill.updateContents(yt,E.default.sources.USER),this.quill.setSelection(W.index+1,E.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:z.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(W,et){var J=this.quill.getLine(W.index),it=a(J,2),lt=it[0],pt=it[1],yt=new b.default().retain(W.index).insert(`
1988
- `,et.format).retain(lt.length()-pt-1).retain(1,{header:null});this.quill.updateContents(yt,E.default.sources.USER),this.quill.setSelection(W.index+1,E.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(W,et){var J=et.prefix.length,it=this.quill.getLine(W.index),lt=a(it,2),pt=lt[0],yt=lt[1];if(yt>J)return!0;var xt=void 0;switch(et.prefix.trim()){case"[]":case"[ ]":xt="unchecked";break;case"[x]":xt="checked";break;case"-":case"*":xt="bullet";break;default:xt="ordered"}this.quill.insertText(W.index," ",E.default.sources.USER),this.quill.history.cutoff();var At=new b.default().retain(W.index-yt).delete(J+1).retain(pt.length()-2-yt).retain(1,{list:xt});this.quill.updateContents(At,E.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(W.index-J,E.default.sources.SILENT)}},"code exit":{key:z.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(W){var et=this.quill.getLine(W.index),J=a(et,2),it=J[0],lt=J[1],pt=new b.default().retain(W.index+it.length()-lt-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(pt,E.default.sources.USER)}},"embed left":nt(z.keys.LEFT,!1),"embed left shift":nt(z.keys.LEFT,!0),"embed right":nt(z.keys.RIGHT,!1),"embed right shift":nt(z.keys.RIGHT,!0)}};function nt($,W){var et,J=$===z.keys.LEFT?"prefix":"suffix";return et={key:$,shiftKey:W,altKey:null},C(et,J,/^$/),C(et,"handler",function(lt){var pt=lt.index;$===z.keys.RIGHT&&(pt+=lt.length+1);var yt=this.quill.getLeaf(pt),xt=a(yt,1),At=xt[0];return At instanceof T.default.Embed?($===z.keys.LEFT?W?this.quill.setSelection(lt.index-1,lt.length+1,E.default.sources.USER):this.quill.setSelection(lt.index-1,E.default.sources.USER):W?this.quill.setSelection(lt.index,lt.length+1,E.default.sources.USER):this.quill.setSelection(lt.index+lt.length+1,E.default.sources.USER),!1):!0}),et}function V($,W){if(!($.index===0||this.quill.getLength()<=1)){var et=this.quill.getLine($.index),J=a(et,1),it=J[0],lt={};if(W.offset===0){var pt=this.quill.getLine($.index-1),yt=a(pt,1),xt=yt[0];if(xt!=null&&xt.length()>1){var At=it.formats(),oe=this.quill.getFormat($.index-1,1);lt=m.default.attributes.diff(At,oe)||{}}}var qt=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(W.prefix)?2:1;this.quill.deleteText($.index-qt,qt,E.default.sources.USER),Object.keys(lt).length>0&&this.quill.formatLine($.index-qt,qt,lt,E.default.sources.USER),this.quill.focus()}}function U($,W){var et=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(W.suffix)?2:1;if(!($.index>=this.quill.getLength()-et)){var J={},it=0,lt=this.quill.getLine($.index),pt=a(lt,1),yt=pt[0];if(W.offset>=yt.length()-1){var xt=this.quill.getLine($.index+1),At=a(xt,1),oe=At[0];if(oe){var qt=yt.formats(),rt=this.quill.getFormat($.index,1);J=m.default.attributes.diff(qt,rt)||{},it=oe.length()}}this.quill.deleteText($.index,et,E.default.sources.USER),Object.keys(J).length>0&&this.quill.formatLine($.index+it-1,et,J,E.default.sources.USER)}}function k($){var W=this.quill.getLines($),et={};if(W.length>1){var J=W[0].formats(),it=W[W.length-1].formats();et=m.default.attributes.diff(it,J)||{}}this.quill.deleteText($,E.default.sources.USER),Object.keys(et).length>0&&this.quill.formatLine($.index,1,et,E.default.sources.USER),this.quill.setSelection($.index,E.default.sources.SILENT),this.quill.focus()}function j($,W){var et=this;$.length>0&&this.quill.scroll.deleteAt($.index,$.length);var J=Object.keys(W.format).reduce(function(it,lt){return T.default.query(lt,T.default.Scope.BLOCK)&&!Array.isArray(W.format[lt])&&(it[lt]=W.format[lt]),it},{});this.quill.insertText($.index,`
1989
- `,J,E.default.sources.USER),this.quill.setSelection($.index+1,E.default.sources.SILENT),this.quill.focus(),Object.keys(W.format).forEach(function(it){J[it]==null&&(Array.isArray(W.format[it])||it!=="link"&&et.quill.format(it,W.format[it],E.default.sources.USER))})}function G($){return{key:z.keys.TAB,shiftKey:!$,format:{"code-block":!0},handler:function(et){var J=T.default.query("code-block"),it=et.index,lt=et.length,pt=this.quill.scroll.descendant(J,it),yt=a(pt,2),xt=yt[0],At=yt[1];if(xt!=null){var oe=this.quill.getIndex(xt),qt=xt.newlineIndex(At,!0)+1,rt=xt.newlineIndex(oe+At+lt),at=xt.domNode.textContent.slice(qt,rt).split(`
1990
- `);At=0,at.forEach(function(dt,vt){$?(xt.insertAt(qt+At,J.TAB),At+=J.TAB.length,vt===0?it+=J.TAB.length:lt+=J.TAB.length):dt.startsWith(J.TAB)&&(xt.deleteAt(qt+At,J.TAB.length),At-=J.TAB.length,vt===0?it-=J.TAB.length:lt-=J.TAB.length),At+=dt.length+1}),this.quill.update(E.default.sources.USER),this.quill.setSelection(it,lt,E.default.sources.SILENT)}}}}function X($){return{key:$[0].toUpperCase(),shortKey:!0,handler:function(et,J){this.quill.format($,!J.format[$],E.default.sources.USER)}}}function Y($){if(typeof $=="string"||typeof $=="number")return Y({key:$});if((typeof $>"u"?"undefined":o($))==="object"&&($=(0,h.default)($,!1)),typeof $.key=="string")if(z.keys[$.key.toUpperCase()]!=null)$.key=z.keys[$.key.toUpperCase()];else if($.key.length===1)$.key=$.key.toUpperCase().charCodeAt(0);else return null;return $.shortKey&&($[Z]=$.shortKey,delete $.shortKey),$}n.default=z,n.SHORTKEY=Z},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function m(w,T){var x=[],E=!0,I=!1,A=void 0;try{for(var O=w[Symbol.iterator](),L;!(E=(L=O.next()).done)&&(x.push(L.value),!(T&&x.length===T));E=!0);}catch(R){I=!0,A=R}finally{try{!E&&O.return&&O.return()}finally{if(I)throw A}}return x}return function(w,T){if(Array.isArray(w))return w;if(Symbol.iterator in Object(w))return m(w,T);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function m(w,T,x){w===null&&(w=Function.prototype);var E=Object.getOwnPropertyDescriptor(w,T);if(E===void 0){var I=Object.getPrototypeOf(w);return I===null?void 0:m(I,T,x)}else{if("value"in E)return E.value;var A=E.get;return A===void 0?void 0:A.call(x)}},u=function(){function m(w,T){for(var x=0;x<T.length;x++){var E=T[x];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(w,E.key,E)}}return function(w,T,x){return T&&m(w.prototype,T),x&&m(w,x),w}}(),f=i(0),h=c(f),d=i(7),p=c(d);function c(m){return m&&m.__esModule?m:{default:m}}function v(m,w){if(!(m instanceof w))throw new TypeError("Cannot call a class as a function")}function y(m,w){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:m}function b(m,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);m.prototype=Object.create(w&&w.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(m,w):m.__proto__=w)}var _=function(m){b(w,m),u(w,null,[{key:"value",value:function(){}}]);function w(T,x){v(this,w);var E=y(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,T));return E.selection=x,E.textNode=document.createTextNode(w.CONTENTS),E.domNode.appendChild(E.textNode),E._length=0,E}return u(w,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(x,E){if(this._length!==0)return a(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"format",this).call(this,x,E);for(var I=this,A=0;I!=null&&I.statics.scope!==h.default.Scope.BLOCK_BLOT;)A+=I.offset(I.parent),I=I.parent;I!=null&&(this._length=w.CONTENTS.length,I.optimize(),I.formatAt(A,w.CONTENTS.length,x,E),this._length=0)}},{key:"index",value:function(x,E){return x===this.textNode?0:a(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"index",this).call(this,x,E)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){a(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var x=this.textNode,E=this.selection.getNativeRange(),I=void 0,A=void 0,O=void 0;if(E!=null&&E.start.node===x&&E.end.node===x){var L=[x,E.start.offset,E.end.offset];I=L[0],A=L[1],O=L[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==w.CONTENTS){var R=this.textNode.data.split(w.CONTENTS).join("");this.next instanceof p.default?(I=this.next.domNode,this.next.insertAt(0,R),this.textNode.data=w.CONTENTS):(this.textNode.data=R,this.parent.insertBefore(h.default.create(this.textNode),this),this.textNode=document.createTextNode(w.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),A!=null){var C=[A,O].map(function(M){return Math.max(0,Math.min(I.data.length,M-1))}),P=o(C,2);return A=P[0],O=P[1],{startNode:I,startOffset:A,endNode:I,endOffset:O}}}}},{key:"update",value:function(x,E){var I=this;if(x.some(function(O){return O.type==="characterData"&&O.target===I.textNode})){var A=this.restore();A&&(E.range=A)}}},{key:"value",value:function(){return""}}]),w}(h.default.Embed);_.blotName="cursor",_.className="ql-cursor",_.tagName="span",_.CONTENTS="\uFEFF",n.default=_},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(0),a=h(o),u=i(4),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function d(y,b){if(!(y instanceof b))throw new TypeError("Cannot call a class as a function")}function p(y,b){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:y}function c(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);y.prototype=Object.create(b&&b.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(y,b):y.__proto__=b)}var v=function(y){c(b,y);function b(){return d(this,b),p(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return b}(a.default.Container);v.allowedChildren=[f.default,u.BlockEmbed,v],n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.ColorStyle=n.ColorClass=n.ColorAttributor=void 0;var o=function(){function _(m,w){for(var T=0;T<w.length;T++){var x=w[T];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,w,T){return w&&_(m.prototype,w),T&&_(m,T),m}}(),a=function _(m,w,T){m===null&&(m=Function.prototype);var x=Object.getOwnPropertyDescriptor(m,w);if(x===void 0){var E=Object.getPrototypeOf(m);return E===null?void 0:_(E,w,T)}else{if("value"in x)return x.value;var I=x.get;return I===void 0?void 0:I.call(T)}},u=i(0),f=h(u);function h(_){return _&&_.__esModule?_:{default:_}}function d(_,m){if(!(_ instanceof m))throw new TypeError("Cannot call a class as a function")}function p(_,m){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:_}function c(_,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);_.prototype=Object.create(m&&m.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(_,m):_.__proto__=m)}var v=function(_){c(m,_);function m(){return d(this,m),p(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return o(m,[{key:"value",value:function(T){var x=a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"value",this).call(this,T);return x.startsWith("rgb(")?(x=x.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+x.split(",").map(function(E){return("00"+parseInt(E).toString(16)).slice(-2)}).join("")):x}}]),m}(f.default.Attributor.Style),y=new f.default.Attributor.Class("color","ql-color",{scope:f.default.Scope.INLINE}),b=new v("color","color",{scope:f.default.Scope.INLINE});n.ColorAttributor=v,n.ColorClass=y,n.ColorStyle=b},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.sanitize=n.default=void 0;var o=function(){function b(_,m){for(var w=0;w<m.length;w++){var T=m[w];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(_,T.key,T)}}return function(_,m,w){return m&&b(_.prototype,m),w&&b(_,w),_}}(),a=function b(_,m,w){_===null&&(_=Function.prototype);var T=Object.getOwnPropertyDescriptor(_,m);if(T===void 0){var x=Object.getPrototypeOf(_);return x===null?void 0:b(x,m,w)}else{if("value"in T)return T.value;var E=T.get;return E===void 0?void 0:E.call(w)}},u=i(6),f=h(u);function h(b){return b&&b.__esModule?b:{default:b}}function d(b,_){if(!(b instanceof _))throw new TypeError("Cannot call a class as a function")}function p(b,_){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:b}function c(b,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);b.prototype=Object.create(_&&_.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(b,_):b.__proto__=_)}var v=function(b){c(_,b);function _(){return d(this,_),p(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return o(_,[{key:"format",value:function(w,T){if(w!==this.statics.blotName||!T)return a(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"format",this).call(this,w,T);T=this.constructor.sanitize(T),this.domNode.setAttribute("href",T)}}],[{key:"create",value:function(w){var T=a(_.__proto__||Object.getPrototypeOf(_),"create",this).call(this,w);return w=this.sanitize(w),T.setAttribute("href",w),T.setAttribute("rel","noopener noreferrer"),T.setAttribute("target","_blank"),T}},{key:"formats",value:function(w){return w.getAttribute("href")}},{key:"sanitize",value:function(w){return y(w,this.PROTOCOL_WHITELIST)?w:this.SANITIZED_URL}}]),_}(f.default);v.blotName="link",v.tagName="A",v.SANITIZED_URL="about:blank",v.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function y(b,_){var m=document.createElement("a");m.href=b;var w=m.href.slice(0,m.href.indexOf(":"));return _.indexOf(w)>-1}n.default=v,n.sanitize=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},a=function(){function _(m,w){for(var T=0;T<w.length;T++){var x=w[T];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,w,T){return w&&_(m.prototype,w),T&&_(m,T),m}}(),u=i(23),f=p(u),h=i(107),d=p(h);function p(_){return _&&_.__esModule?_:{default:_}}function c(_,m){if(!(_ instanceof m))throw new TypeError("Cannot call a class as a function")}var v=0;function y(_,m){_.setAttribute(m,_.getAttribute(m)!=="true")}var b=function(){function _(m){var w=this;c(this,_),this.select=m,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){w.togglePicker()}),this.label.addEventListener("keydown",function(T){switch(T.keyCode){case f.default.keys.ENTER:w.togglePicker();break;case f.default.keys.ESCAPE:w.escape(),T.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return a(_,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),y(this.label,"aria-expanded"),y(this.options,"aria-hidden")}},{key:"buildItem",value:function(w){var T=this,x=document.createElement("span");return x.tabIndex="0",x.setAttribute("role","button"),x.classList.add("ql-picker-item"),w.hasAttribute("value")&&x.setAttribute("data-value",w.getAttribute("value")),w.textContent&&x.setAttribute("data-label",w.textContent),x.addEventListener("click",function(){T.selectItem(x,!0)}),x.addEventListener("keydown",function(E){switch(E.keyCode){case f.default.keys.ENTER:T.selectItem(x,!0),E.preventDefault();break;case f.default.keys.ESCAPE:T.escape(),E.preventDefault();break}}),x}},{key:"buildLabel",value:function(){var w=document.createElement("span");return w.classList.add("ql-picker-label"),w.innerHTML=d.default,w.tabIndex="0",w.setAttribute("role","button"),w.setAttribute("aria-expanded","false"),this.container.appendChild(w),w}},{key:"buildOptions",value:function(){var w=this,T=document.createElement("span");T.classList.add("ql-picker-options"),T.setAttribute("aria-hidden","true"),T.tabIndex="-1",T.id="ql-picker-options-"+v,v+=1,this.label.setAttribute("aria-controls",T.id),this.options=T,[].slice.call(this.select.options).forEach(function(x){var E=w.buildItem(x);T.appendChild(E),x.selected===!0&&w.selectItem(E)}),this.container.appendChild(T)}},{key:"buildPicker",value:function(){var w=this;[].slice.call(this.select.attributes).forEach(function(T){w.container.setAttribute(T.name,T.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var w=this;this.close(),setTimeout(function(){return w.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(w){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,x=this.container.querySelector(".ql-selected");if(w!==x&&(x!=null&&x.classList.remove("ql-selected"),w!=null&&(w.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(w.parentNode.children,w),w.hasAttribute("data-value")?this.label.setAttribute("data-value",w.getAttribute("data-value")):this.label.removeAttribute("data-value"),w.hasAttribute("data-label")?this.label.setAttribute("data-label",w.getAttribute("data-label")):this.label.removeAttribute("data-label"),T))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":o(Event))==="object"){var E=document.createEvent("Event");E.initEvent("change",!0,!0),this.select.dispatchEvent(E)}this.close()}}},{key:"update",value:function(){var w=void 0;if(this.select.selectedIndex>-1){var T=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];w=this.select.options[this.select.selectedIndex],this.selectItem(T)}else this.selectItem(null);var x=w!=null&&w!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",x)}}]),_}();n.default=b},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(0),a=q(o),u=i(5),f=q(u),h=i(4),d=q(h),p=i(16),c=q(p),v=i(25),y=q(v),b=i(24),_=q(b),m=i(35),w=q(m),T=i(6),x=q(T),E=i(22),I=q(E),A=i(7),O=q(A),L=i(55),R=q(L),C=i(42),P=q(C),M=i(23),F=q(M);function q(Z){return Z&&Z.__esModule?Z:{default:Z}}f.default.register({"blots/block":d.default,"blots/block/embed":h.BlockEmbed,"blots/break":c.default,"blots/container":y.default,"blots/cursor":_.default,"blots/embed":w.default,"blots/inline":x.default,"blots/scroll":I.default,"blots/text":O.default,"modules/clipboard":R.default,"modules/history":P.default,"modules/keyboard":F.default}),a.default.register(d.default,c.default,_.default,x.default,I.default,O.default),n.default=f.default},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(1),a=function(){function u(f){this.domNode=f,this.domNode[o.DATA_KEY]={blot:this}}return Object.defineProperty(u.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),u.create=function(f){if(this.tagName==null)throw new o.ParchmentError("Blot definition missing tagName");var h;return Array.isArray(this.tagName)?(typeof f=="string"&&(f=f.toUpperCase(),parseInt(f).toString()===f&&(f=parseInt(f))),typeof f=="number"?h=document.createElement(this.tagName[f-1]):this.tagName.indexOf(f)>-1?h=document.createElement(f):h=document.createElement(this.tagName[0])):h=document.createElement(this.tagName),this.className&&h.classList.add(this.className),h},u.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},u.prototype.clone=function(){var f=this.domNode.cloneNode(!1);return o.create(f)},u.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[o.DATA_KEY]},u.prototype.deleteAt=function(f,h){var d=this.isolate(f,h);d.remove()},u.prototype.formatAt=function(f,h,d,p){var c=this.isolate(f,h);if(o.query(d,o.Scope.BLOT)!=null&&p)c.wrap(d,p);else if(o.query(d,o.Scope.ATTRIBUTE)!=null){var v=o.create(this.statics.scope);c.wrap(v),v.format(d,p)}},u.prototype.insertAt=function(f,h,d){var p=d==null?o.create("text",h):o.create(h,d),c=this.split(f);this.parent.insertBefore(p,c)},u.prototype.insertInto=function(f,h){h===void 0&&(h=null),this.parent!=null&&this.parent.children.remove(this);var d=null;f.children.insertBefore(this,h),h!=null&&(d=h.domNode),(this.domNode.parentNode!=f.domNode||this.domNode.nextSibling!=d)&&f.domNode.insertBefore(this.domNode,d),this.parent=f,this.attach()},u.prototype.isolate=function(f,h){var d=this.split(f);return d.split(h),d},u.prototype.length=function(){return 1},u.prototype.offset=function(f){return f===void 0&&(f=this.parent),this.parent==null||this==f?0:this.parent.children.offset(this)+this.parent.offset(f)},u.prototype.optimize=function(f){this.domNode[o.DATA_KEY]!=null&&delete this.domNode[o.DATA_KEY].mutations},u.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},u.prototype.replace=function(f){f.parent!=null&&(f.parent.insertBefore(this,f.next),f.remove())},u.prototype.replaceWith=function(f,h){var d=typeof f=="string"?o.create(f,h):f;return d.replace(this),d},u.prototype.split=function(f,h){return f===0?this:this.next},u.prototype.update=function(f,h){},u.prototype.wrap=function(f,h){var d=typeof f=="string"?o.create(f,h):f;return this.parent!=null&&this.parent.insertBefore(d,this.next),d.appendChild(this),d},u.blotName="abstract",u}();n.default=a},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(12),a=i(32),u=i(33),f=i(1),h=function(){function d(p){this.attributes={},this.domNode=p,this.build()}return d.prototype.attribute=function(p,c){c?p.add(this.domNode,c)&&(p.value(this.domNode)!=null?this.attributes[p.attrName]=p:delete this.attributes[p.attrName]):(p.remove(this.domNode),delete this.attributes[p.attrName])},d.prototype.build=function(){var p=this;this.attributes={};var c=o.default.keys(this.domNode),v=a.default.keys(this.domNode),y=u.default.keys(this.domNode);c.concat(v).concat(y).forEach(function(b){var _=f.query(b,f.Scope.ATTRIBUTE);_ instanceof o.default&&(p.attributes[_.attrName]=_)})},d.prototype.copy=function(p){var c=this;Object.keys(this.attributes).forEach(function(v){var y=c.attributes[v].value(c.domNode);p.format(v,y)})},d.prototype.move=function(p){var c=this;this.copy(p),Object.keys(this.attributes).forEach(function(v){c.attributes[v].remove(c.domNode)}),this.attributes={}},d.prototype.values=function(){var p=this;return Object.keys(this.attributes).reduce(function(c,v){return c[v]=p.attributes[v].value(p.domNode),c},{})},d}();n.default=h},function(r,n,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var c in p)p.hasOwnProperty(c)&&(d[c]=p[c])};return function(d,p){h(d,p);function c(){this.constructor=d}d.prototype=p===null?Object.create(p):(c.prototype=p.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(12);function u(h,d){var p=h.getAttribute("class")||"";return p.split(/\s+/).filter(function(c){return c.indexOf(d+"-")===0})}var f=function(h){o(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.keys=function(p){return(p.getAttribute("class")||"").split(/\s+/).map(function(c){return c.split("-").slice(0,-1).join("-")})},d.prototype.add=function(p,c){return this.canAdd(p,c)?(this.remove(p),p.classList.add(this.keyName+"-"+c),!0):!1},d.prototype.remove=function(p){var c=u(p,this.keyName);c.forEach(function(v){p.classList.remove(v)}),p.classList.length===0&&p.removeAttribute("class")},d.prototype.value=function(p){var c=u(p,this.keyName)[0]||"",v=c.slice(this.keyName.length+1);return this.canAdd(p,v)?v:""},d}(a.default);n.default=f},function(r,n,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var c in p)p.hasOwnProperty(c)&&(d[c]=p[c])};return function(d,p){h(d,p);function c(){this.constructor=d}d.prototype=p===null?Object.create(p):(c.prototype=p.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(12);function u(h){var d=h.split("-"),p=d.slice(1).map(function(c){return c[0].toUpperCase()+c.slice(1)}).join("");return d[0]+p}var f=function(h){o(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.keys=function(p){return(p.getAttribute("style")||"").split(";").map(function(c){var v=c.split(":");return v[0].trim()})},d.prototype.add=function(p,c){return this.canAdd(p,c)?(p.style[u(this.keyName)]=c,!0):!1},d.prototype.remove=function(p){p.style[u(this.keyName)]="",p.getAttribute("style")||p.removeAttribute("style")},d.prototype.value=function(p){var c=p.style[u(this.keyName)];return this.canAdd(p,c)?c:""},d}(a.default);n.default=f},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function f(h,d){for(var p=0;p<d.length;p++){var c=d[p];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(h,c.key,c)}}return function(h,d,p){return d&&f(h.prototype,d),p&&f(h,p),h}}();function a(f,h){if(!(f instanceof h))throw new TypeError("Cannot call a class as a function")}var u=function(){function f(h,d){a(this,f),this.quill=h,this.options=d,this.modules={}}return o(f,[{key:"init",value:function(){var d=this;Object.keys(this.options.modules).forEach(function(p){d.modules[p]==null&&d.addModule(p)})}},{key:"addModule",value:function(d){var p=this.quill.constructor.import("modules/"+d);return this.modules[d]=new p(this.quill,this.options.modules[d]||{}),this.modules[d]}}]),f}();u.DEFAULTS={modules:{}},u.themes={default:u},n.default=u},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function m(w,T){for(var x=0;x<T.length;x++){var E=T[x];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(w,E.key,E)}}return function(w,T,x){return T&&m(w.prototype,T),x&&m(w,x),w}}(),a=function m(w,T,x){w===null&&(w=Function.prototype);var E=Object.getOwnPropertyDescriptor(w,T);if(E===void 0){var I=Object.getPrototypeOf(w);return I===null?void 0:m(I,T,x)}else{if("value"in E)return E.value;var A=E.get;return A===void 0?void 0:A.call(x)}},u=i(0),f=p(u),h=i(7),d=p(h);function p(m){return m&&m.__esModule?m:{default:m}}function c(m,w){if(!(m instanceof w))throw new TypeError("Cannot call a class as a function")}function v(m,w){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:m}function y(m,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);m.prototype=Object.create(w&&w.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(m,w):m.__proto__=w)}var b="\uFEFF",_=function(m){y(w,m);function w(T){c(this,w);var x=v(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,T));return x.contentNode=document.createElement("span"),x.contentNode.setAttribute("contenteditable",!1),[].slice.call(x.domNode.childNodes).forEach(function(E){x.contentNode.appendChild(E)}),x.leftGuard=document.createTextNode(b),x.rightGuard=document.createTextNode(b),x.domNode.appendChild(x.leftGuard),x.domNode.appendChild(x.contentNode),x.domNode.appendChild(x.rightGuard),x}return o(w,[{key:"index",value:function(x,E){return x===this.leftGuard?0:x===this.rightGuard?1:a(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"index",this).call(this,x,E)}},{key:"restore",value:function(x){var E=void 0,I=void 0,A=x.data.split(b).join("");if(x===this.leftGuard)if(this.prev instanceof d.default){var O=this.prev.length();this.prev.insertAt(O,A),E={startNode:this.prev.domNode,startOffset:O+A.length}}else I=document.createTextNode(A),this.parent.insertBefore(f.default.create(I),this),E={startNode:I,startOffset:A.length};else x===this.rightGuard&&(this.next instanceof d.default?(this.next.insertAt(0,A),E={startNode:this.next.domNode,startOffset:A.length}):(I=document.createTextNode(A),this.parent.insertBefore(f.default.create(I),this.next),E={startNode:I,startOffset:A.length}));return x.data=b,E}},{key:"update",value:function(x,E){var I=this;x.forEach(function(A){if(A.type==="characterData"&&(A.target===I.leftGuard||A.target===I.rightGuard)){var O=I.restore(A.target);O&&(E.range=O)}})}}]),w}(f.default.Embed);n.default=_},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.AlignStyle=n.AlignClass=n.AlignAttribute=void 0;var o=i(0),a=u(o);function u(c){return c&&c.__esModule?c:{default:c}}var f={scope:a.default.Scope.BLOCK,whitelist:["right","center","justify"]},h=new a.default.Attributor.Attribute("align","align",f),d=new a.default.Attributor.Class("align","ql-align",f),p=new a.default.Attributor.Style("align","text-align",f);n.AlignAttribute=h,n.AlignClass=d,n.AlignStyle=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.BackgroundStyle=n.BackgroundClass=void 0;var o=i(0),a=f(o),u=i(26);function f(p){return p&&p.__esModule?p:{default:p}}var h=new a.default.Attributor.Class("background","ql-bg",{scope:a.default.Scope.INLINE}),d=new u.ColorAttributor("background","background-color",{scope:a.default.Scope.INLINE});n.BackgroundClass=h,n.BackgroundStyle=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.DirectionStyle=n.DirectionClass=n.DirectionAttribute=void 0;var o=i(0),a=u(o);function u(c){return c&&c.__esModule?c:{default:c}}var f={scope:a.default.Scope.BLOCK,whitelist:["rtl"]},h=new a.default.Attributor.Attribute("direction","dir",f),d=new a.default.Attributor.Class("direction","ql-direction",f),p=new a.default.Attributor.Style("direction","direction",f);n.DirectionAttribute=h,n.DirectionClass=d,n.DirectionStyle=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.FontClass=n.FontStyle=void 0;var o=function(){function m(w,T){for(var x=0;x<T.length;x++){var E=T[x];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(w,E.key,E)}}return function(w,T,x){return T&&m(w.prototype,T),x&&m(w,x),w}}(),a=function m(w,T,x){w===null&&(w=Function.prototype);var E=Object.getOwnPropertyDescriptor(w,T);if(E===void 0){var I=Object.getPrototypeOf(w);return I===null?void 0:m(I,T,x)}else{if("value"in E)return E.value;var A=E.get;return A===void 0?void 0:A.call(x)}},u=i(0),f=h(u);function h(m){return m&&m.__esModule?m:{default:m}}function d(m,w){if(!(m instanceof w))throw new TypeError("Cannot call a class as a function")}function p(m,w){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:m}function c(m,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);m.prototype=Object.create(w&&w.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(m,w):m.__proto__=w)}var v={scope:f.default.Scope.INLINE,whitelist:["serif","monospace"]},y=new f.default.Attributor.Class("font","ql-font",v),b=function(m){c(w,m);function w(){return d(this,w),p(this,(w.__proto__||Object.getPrototypeOf(w)).apply(this,arguments))}return o(w,[{key:"value",value:function(x){return a(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"value",this).call(this,x).replace(/["']/g,"")}}]),w}(f.default.Attributor.Style),_=new b("font","font-family",v);n.FontStyle=_,n.FontClass=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.SizeStyle=n.SizeClass=void 0;var o=i(0),a=u(o);function u(d){return d&&d.__esModule?d:{default:d}}var f=new a.default.Attributor.Class("size","ql-size",{scope:a.default.Scope.INLINE,whitelist:["small","large","huge"]}),h=new a.default.Attributor.Style("size","font-size",{scope:a.default.Scope.INLINE,whitelist:["10px","18px","32px"]});n.SizeClass=f,n.SizeStyle=h},function(r,n,i){r.exports={align:{"":i(76),center:i(77),right:i(78),justify:i(79)},background:i(80),blockquote:i(81),bold:i(82),clean:i(83),code:i(58),"code-block":i(58),color:i(84),direction:{"":i(85),rtl:i(86)},float:{center:i(87),full:i(88),left:i(89),right:i(90)},formula:i(91),header:{1:i(92),2:i(93)},italic:i(94),image:i(95),indent:{"+1":i(96),"-1":i(97)},link:i(98),list:{ordered:i(99),bullet:i(100),check:i(101)},script:{sub:i(102),super:i(103)},strike:i(104),underline:i(105),video:i(106)}},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.getLastChangeIndex=n.default=void 0;var o=function(){function T(x,E){for(var I=0;I<E.length;I++){var A=E[I];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(x,A.key,A)}}return function(x,E,I){return E&&T(x.prototype,E),I&&T(x,I),x}}(),a=i(0),u=c(a),f=i(5),h=c(f),d=i(9),p=c(d);function c(T){return T&&T.__esModule?T:{default:T}}function v(T,x){if(!(T instanceof x))throw new TypeError("Cannot call a class as a function")}function y(T,x){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:T}function b(T,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);T.prototype=Object.create(x&&x.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(T,x):T.__proto__=x)}var _=function(T){b(x,T);function x(E,I){v(this,x);var A=y(this,(x.__proto__||Object.getPrototypeOf(x)).call(this,E,I));return A.lastRecorded=0,A.ignoreChange=!1,A.clear(),A.quill.on(h.default.events.EDITOR_CHANGE,function(O,L,R,C){O!==h.default.events.TEXT_CHANGE||A.ignoreChange||(!A.options.userOnly||C===h.default.sources.USER?A.record(L,R):A.transform(L))}),A.quill.keyboard.addBinding({key:"Z",shortKey:!0},A.undo.bind(A)),A.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},A.redo.bind(A)),/Win/i.test(navigator.platform)&&A.quill.keyboard.addBinding({key:"Y",shortKey:!0},A.redo.bind(A)),A}return o(x,[{key:"change",value:function(I,A){if(this.stack[I].length!==0){var O=this.stack[I].pop();this.stack[A].push(O),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(O[I],h.default.sources.USER),this.ignoreChange=!1;var L=w(O[I]);this.quill.setSelection(L)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(I,A){if(I.ops.length!==0){this.stack.redo=[];var O=this.quill.getContents().diff(A),L=Date.now();if(this.lastRecorded+this.options.delay>L&&this.stack.undo.length>0){var R=this.stack.undo.pop();O=O.compose(R.undo),I=R.redo.compose(I)}else this.lastRecorded=L;this.stack.undo.push({redo:I,undo:O}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(I){this.stack.undo.forEach(function(A){A.undo=I.transform(A.undo,!0),A.redo=I.transform(A.redo,!0)}),this.stack.redo.forEach(function(A){A.undo=I.transform(A.undo,!0),A.redo=I.transform(A.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),x}(p.default);_.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function m(T){var x=T.ops[T.ops.length-1];return x==null?!1:x.insert!=null?typeof x.insert=="string"&&x.insert.endsWith(`
1991
- `):x.attributes!=null?Object.keys(x.attributes).some(function(E){return u.default.query(E,u.default.Scope.BLOCK)!=null}):!1}function w(T){var x=T.reduce(function(I,A){return I+=A.delete||0,I},0),E=T.length()-x;return m(T)&&(E-=1),E}n.default=_,n.getLastChangeIndex=w},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BaseTooltip=void 0;var o=function(){function j(G,X){for(var Y=0;Y<X.length;Y++){var $=X[Y];$.enumerable=$.enumerable||!1,$.configurable=!0,"value"in $&&($.writable=!0),Object.defineProperty(G,$.key,$)}}return function(G,X,Y){return X&&j(G.prototype,X),Y&&j(G,Y),G}}(),a=function j(G,X,Y){G===null&&(G=Function.prototype);var $=Object.getOwnPropertyDescriptor(G,X);if($===void 0){var W=Object.getPrototypeOf(G);return W===null?void 0:j(W,X,Y)}else{if("value"in $)return $.value;var et=$.get;return et===void 0?void 0:et.call(Y)}},u=i(3),f=L(u),h=i(2),d=L(h),p=i(8),c=L(p),v=i(23),y=L(v),b=i(34),_=L(b),m=i(59),w=L(m),T=i(60),x=L(T),E=i(28),I=L(E),A=i(61),O=L(A);function L(j){return j&&j.__esModule?j:{default:j}}function R(j,G){if(!(j instanceof G))throw new TypeError("Cannot call a class as a function")}function C(j,G){if(!j)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return G&&(typeof G=="object"||typeof G=="function")?G:j}function P(j,G){if(typeof G!="function"&&G!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof G);j.prototype=Object.create(G&&G.prototype,{constructor:{value:j,enumerable:!1,writable:!0,configurable:!0}}),G&&(Object.setPrototypeOf?Object.setPrototypeOf(j,G):j.__proto__=G)}var M=[!1,"center","right","justify"],F=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],q=[!1,"serif","monospace"],Z=["1","2","3",!1],z=["small",!1,"large","huge"],nt=function(j){P(G,j);function G(X,Y){R(this,G);var $=C(this,(G.__proto__||Object.getPrototypeOf(G)).call(this,X,Y)),W=function et(J){if(!document.body.contains(X.root))return document.body.removeEventListener("click",et);$.tooltip!=null&&!$.tooltip.root.contains(J.target)&&document.activeElement!==$.tooltip.textbox&&!$.quill.hasFocus()&&$.tooltip.hide(),$.pickers!=null&&$.pickers.forEach(function(it){it.container.contains(J.target)||it.close()})};return X.emitter.listenDOM("click",document.body,W),$}return o(G,[{key:"addModule",value:function(Y){var $=a(G.prototype.__proto__||Object.getPrototypeOf(G.prototype),"addModule",this).call(this,Y);return Y==="toolbar"&&this.extendToolbar($),$}},{key:"buildButtons",value:function(Y,$){Y.forEach(function(W){var et=W.getAttribute("class")||"";et.split(/\s+/).forEach(function(J){if(J.startsWith("ql-")&&(J=J.slice(3),$[J]!=null))if(J==="direction")W.innerHTML=$[J][""]+$[J].rtl;else if(typeof $[J]=="string")W.innerHTML=$[J];else{var it=W.value||"";it!=null&&$[J][it]&&(W.innerHTML=$[J][it])}})})}},{key:"buildPickers",value:function(Y,$){var W=this;this.pickers=Y.map(function(J){if(J.classList.contains("ql-align"))return J.querySelector("option")==null&&k(J,M),new x.default(J,$.align);if(J.classList.contains("ql-background")||J.classList.contains("ql-color")){var it=J.classList.contains("ql-background")?"background":"color";return J.querySelector("option")==null&&k(J,F,it==="background"?"#ffffff":"#000000"),new w.default(J,$[it])}else return J.querySelector("option")==null&&(J.classList.contains("ql-font")?k(J,q):J.classList.contains("ql-header")?k(J,Z):J.classList.contains("ql-size")&&k(J,z)),new I.default(J)});var et=function(){W.pickers.forEach(function(it){it.update()})};this.quill.on(c.default.events.EDITOR_CHANGE,et)}}]),G}(_.default);nt.DEFAULTS=(0,f.default)(!0,{},_.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var G=this,X=this.container.querySelector("input.ql-image[type=file]");X==null&&(X=document.createElement("input"),X.setAttribute("type","file"),X.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),X.classList.add("ql-image"),X.addEventListener("change",function(){if(X.files!=null&&X.files[0]!=null){var Y=new FileReader;Y.onload=function($){var W=G.quill.getSelection(!0);G.quill.updateContents(new d.default().retain(W.index).delete(W.length).insert({image:$.target.result}),c.default.sources.USER),G.quill.setSelection(W.index+1,c.default.sources.SILENT),X.value=""},Y.readAsDataURL(X.files[0])}}),this.container.appendChild(X)),X.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var V=function(j){P(G,j);function G(X,Y){R(this,G);var $=C(this,(G.__proto__||Object.getPrototypeOf(G)).call(this,X,Y));return $.textbox=$.root.querySelector('input[type="text"]'),$.listen(),$}return o(G,[{key:"listen",value:function(){var Y=this;this.textbox.addEventListener("keydown",function($){y.default.match($,"enter")?(Y.save(),$.preventDefault()):y.default.match($,"escape")&&(Y.cancel(),$.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",$=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),$!=null?this.textbox.value=$:Y!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+Y)||""),this.root.setAttribute("data-mode",Y)}},{key:"restoreFocus",value:function(){var Y=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=Y}},{key:"save",value:function(){var Y=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var $=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",Y,c.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",Y,c.default.sources.USER)),this.quill.root.scrollTop=$;break}case"video":Y=U(Y);case"formula":{if(!Y)break;var W=this.quill.getSelection(!0);if(W!=null){var et=W.index+W.length;this.quill.insertEmbed(et,this.root.getAttribute("data-mode"),Y,c.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(et+1," ",c.default.sources.USER),this.quill.setSelection(et+2,c.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),G}(O.default);function U(j){var G=j.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||j.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return G?(G[1]||"https")+"://www.youtube.com/embed/"+G[2]+"?showinfo=0":(G=j.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(G[1]||"https")+"://player.vimeo.com/video/"+G[2]+"/":j}function k(j,G){var X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;G.forEach(function(Y){var $=document.createElement("option");Y===X?$.setAttribute("selected","selected"):$.setAttribute("value",Y),j.appendChild($)})}n.BaseTooltip=V,n.default=nt},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function a(){this.head=this.tail=null,this.length=0}return a.prototype.append=function(){for(var u=[],f=0;f<arguments.length;f++)u[f]=arguments[f];this.insertBefore(u[0],null),u.length>1&&this.append.apply(this,u.slice(1))},a.prototype.contains=function(u){for(var f,h=this.iterator();f=h();)if(f===u)return!0;return!1},a.prototype.insertBefore=function(u,f){u&&(u.next=f,f!=null?(u.prev=f.prev,f.prev!=null&&(f.prev.next=u),f.prev=u,f===this.head&&(this.head=u)):this.tail!=null?(this.tail.next=u,u.prev=this.tail,this.tail=u):(u.prev=null,this.head=this.tail=u),this.length+=1)},a.prototype.offset=function(u){for(var f=0,h=this.head;h!=null;){if(h===u)return f;f+=h.length(),h=h.next}return-1},a.prototype.remove=function(u){this.contains(u)&&(u.prev!=null&&(u.prev.next=u.next),u.next!=null&&(u.next.prev=u.prev),u===this.head&&(this.head=u.next),u===this.tail&&(this.tail=u.prev),this.length-=1)},a.prototype.iterator=function(u){return u===void 0&&(u=this.head),function(){var f=u;return u!=null&&(u=u.next),f}},a.prototype.find=function(u,f){f===void 0&&(f=!1);for(var h,d=this.iterator();h=d();){var p=h.length();if(u<p||f&&u===p&&(h.next==null||h.next.length()!==0))return[h,u];u-=p}return[null,0]},a.prototype.forEach=function(u){for(var f,h=this.iterator();f=h();)u(f)},a.prototype.forEachAt=function(u,f,h){if(!(f<=0))for(var d=this.find(u),p=d[0],c=d[1],v,y=u-c,b=this.iterator(p);(v=b())&&y<u+f;){var _=v.length();u>y?h(v,u-y,Math.min(f,y+_-u)):h(v,0,Math.min(_,u+f-y)),y+=_}},a.prototype.map=function(u){return this.reduce(function(f,h){return f.push(u(h)),f},[])},a.prototype.reduce=function(u,f){for(var h,d=this.iterator();h=d();)f=u(f,h);return f},a}();n.default=o},function(r,n,i){var o=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,v){c.__proto__=v}||function(c,v){for(var y in v)v.hasOwnProperty(y)&&(c[y]=v[y])};return function(c,v){p(c,v);function y(){this.constructor=c}c.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(17),u=i(1),f={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},h=100,d=function(p){o(c,p);function c(v){var y=p.call(this,v)||this;return y.scroll=y,y.observer=new MutationObserver(function(b){y.update(b)}),y.observer.observe(y.domNode,f),y.attach(),y}return c.prototype.detach=function(){p.prototype.detach.call(this),this.observer.disconnect()},c.prototype.deleteAt=function(v,y){this.update(),v===0&&y===this.length()?this.children.forEach(function(b){b.remove()}):p.prototype.deleteAt.call(this,v,y)},c.prototype.formatAt=function(v,y,b,_){this.update(),p.prototype.formatAt.call(this,v,y,b,_)},c.prototype.insertAt=function(v,y,b){this.update(),p.prototype.insertAt.call(this,v,y,b)},c.prototype.optimize=function(v,y){var b=this;v===void 0&&(v=[]),y===void 0&&(y={}),p.prototype.optimize.call(this,y);for(var _=[].slice.call(this.observer.takeRecords());_.length>0;)v.push(_.pop());for(var m=function(E,I){I===void 0&&(I=!0),!(E==null||E===b)&&E.domNode.parentNode!=null&&(E.domNode[u.DATA_KEY].mutations==null&&(E.domNode[u.DATA_KEY].mutations=[]),I&&m(E.parent))},w=function(E){E.domNode[u.DATA_KEY]==null||E.domNode[u.DATA_KEY].mutations==null||(E instanceof a.default&&E.children.forEach(w),E.optimize(y))},T=v,x=0;T.length>0;x+=1){if(x>=h)throw new Error("[Parchment] Maximum optimize iterations reached");for(T.forEach(function(E){var I=u.find(E.target,!0);I!=null&&(I.domNode===E.target&&(E.type==="childList"?(m(u.find(E.previousSibling,!1)),[].forEach.call(E.addedNodes,function(A){var O=u.find(A,!1);m(O,!1),O instanceof a.default&&O.children.forEach(function(L){m(L,!1)})})):E.type==="attributes"&&m(I.prev)),m(I))}),this.children.forEach(w),T=[].slice.call(this.observer.takeRecords()),_=T.slice();_.length>0;)v.push(_.pop())}},c.prototype.update=function(v,y){var b=this;y===void 0&&(y={}),v=v||this.observer.takeRecords(),v.map(function(_){var m=u.find(_.target,!0);return m==null?null:m.domNode[u.DATA_KEY].mutations==null?(m.domNode[u.DATA_KEY].mutations=[_],m):(m.domNode[u.DATA_KEY].mutations.push(_),null)}).forEach(function(_){_==null||_===b||_.domNode[u.DATA_KEY]==null||_.update(_.domNode[u.DATA_KEY].mutations||[],y)}),this.domNode[u.DATA_KEY].mutations!=null&&p.prototype.update.call(this,this.domNode[u.DATA_KEY].mutations,y),this.optimize(v,y)},c.blotName="scroll",c.defaultChild="block",c.scope=u.Scope.BLOCK_BLOT,c.tagName="DIV",c}(a.default);n.default=d},function(r,n,i){var o=this&&this.__extends||function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,c){p.__proto__=c}||function(p,c){for(var v in c)c.hasOwnProperty(v)&&(p[v]=c[v])};return function(p,c){d(p,c);function v(){this.constructor=p}p.prototype=c===null?Object.create(c):(v.prototype=c.prototype,new v)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(18),u=i(1);function f(d,p){if(Object.keys(d).length!==Object.keys(p).length)return!1;for(var c in d)if(d[c]!==p[c])return!1;return!0}var h=function(d){o(p,d);function p(){return d!==null&&d.apply(this,arguments)||this}return p.formats=function(c){if(c.tagName!==p.tagName)return d.formats.call(this,c)},p.prototype.format=function(c,v){var y=this;c===this.statics.blotName&&!v?(this.children.forEach(function(b){b instanceof a.default||(b=b.wrap(p.blotName,!0)),y.attributes.copy(b)}),this.unwrap()):d.prototype.format.call(this,c,v)},p.prototype.formatAt=function(c,v,y,b){if(this.formats()[y]!=null||u.query(y,u.Scope.ATTRIBUTE)){var _=this.isolate(c,v);_.format(y,b)}else d.prototype.formatAt.call(this,c,v,y,b)},p.prototype.optimize=function(c){d.prototype.optimize.call(this,c);var v=this.formats();if(Object.keys(v).length===0)return this.unwrap();var y=this.next;y instanceof p&&y.prev===this&&f(v,y.formats())&&(y.moveChildren(this),y.remove())},p.blotName="inline",p.scope=u.Scope.INLINE_BLOT,p.tagName="SPAN",p}(a.default);n.default=h},function(r,n,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var c in p)p.hasOwnProperty(c)&&(d[c]=p[c])};return function(d,p){h(d,p);function c(){this.constructor=d}d.prototype=p===null?Object.create(p):(c.prototype=p.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(18),u=i(1),f=function(h){o(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.formats=function(p){var c=u.query(d.blotName).tagName;if(p.tagName!==c)return h.formats.call(this,p)},d.prototype.format=function(p,c){u.query(p,u.Scope.BLOCK)!=null&&(p===this.statics.blotName&&!c?this.replaceWith(d.blotName):h.prototype.format.call(this,p,c))},d.prototype.formatAt=function(p,c,v,y){u.query(v,u.Scope.BLOCK)!=null?this.format(v,y):h.prototype.formatAt.call(this,p,c,v,y)},d.prototype.insertAt=function(p,c,v){if(v==null||u.query(c,u.Scope.INLINE)!=null)h.prototype.insertAt.call(this,p,c,v);else{var y=this.split(p),b=u.create(c,v);y.parent.insertBefore(b,y)}},d.prototype.update=function(p,c){navigator.userAgent.match(/Trident/)?this.build():h.prototype.update.call(this,p,c)},d.blotName="block",d.scope=u.Scope.BLOCK_BLOT,d.tagName="P",d}(a.default);n.default=f},function(r,n,i){var o=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,d){h.__proto__=d}||function(h,d){for(var p in d)d.hasOwnProperty(p)&&(h[p]=d[p])};return function(h,d){f(h,d);function p(){this.constructor=h}h.prototype=d===null?Object.create(d):(p.prototype=d.prototype,new p)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(19),u=function(f){o(h,f);function h(){return f!==null&&f.apply(this,arguments)||this}return h.formats=function(d){},h.prototype.format=function(d,p){f.prototype.formatAt.call(this,0,this.length(),d,p)},h.prototype.formatAt=function(d,p,c,v){d===0&&p===this.length()?this.format(c,v):f.prototype.formatAt.call(this,d,p,c,v)},h.prototype.formats=function(){return this.statics.formats(this.domNode)},h}(a.default);n.default=u},function(r,n,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var c in p)p.hasOwnProperty(c)&&(d[c]=p[c])};return function(d,p){h(d,p);function c(){this.constructor=d}d.prototype=p===null?Object.create(p):(c.prototype=p.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(19),u=i(1),f=function(h){o(d,h);function d(p){var c=h.call(this,p)||this;return c.text=c.statics.value(c.domNode),c}return d.create=function(p){return document.createTextNode(p)},d.value=function(p){var c=p.data;return c.normalize&&(c=c.normalize()),c},d.prototype.deleteAt=function(p,c){this.domNode.data=this.text=this.text.slice(0,p)+this.text.slice(p+c)},d.prototype.index=function(p,c){return this.domNode===p?c:-1},d.prototype.insertAt=function(p,c,v){v==null?(this.text=this.text.slice(0,p)+c+this.text.slice(p),this.domNode.data=this.text):h.prototype.insertAt.call(this,p,c,v)},d.prototype.length=function(){return this.text.length},d.prototype.optimize=function(p){h.prototype.optimize.call(this,p),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof d&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},d.prototype.position=function(p,c){return[this.domNode,p]},d.prototype.split=function(p,c){if(c===void 0&&(c=!1),!c){if(p===0)return this;if(p===this.length())return this.next}var v=u.create(this.domNode.splitText(p));return this.parent.insertBefore(v,this.next),this.text=this.statics.value(this.domNode),v},d.prototype.update=function(p,c){var v=this;p.some(function(y){return y.type==="characterData"&&y.target===v.domNode})&&(this.text=this.statics.value(this.domNode))},d.prototype.value=function(){return this.text},d.blotName="text",d.scope=u.Scope.INLINE_BLOT,d}(a.default);n.default=f},function(r,n,i){var o=document.createElement("div");if(o.classList.toggle("test-class",!1),o.classList.contains("test-class")){var a=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(u,f){return arguments.length>1&&!this.contains(u)==!f?f:a.call(this,u)}}String.prototype.startsWith||(String.prototype.startsWith=function(u,f){return f=f||0,this.substr(f,u.length)===u}),String.prototype.endsWith||(String.prototype.endsWith=function(u,f){var h=this.toString();(typeof f!="number"||!isFinite(f)||Math.floor(f)!==f||f>h.length)&&(f=h.length),f-=u.length;var d=h.indexOf(u,f);return d!==-1&&d===f}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(f){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof f!="function")throw new TypeError("predicate must be a function");for(var h=Object(this),d=h.length>>>0,p=arguments[1],c,v=0;v<d;v++)if(c=h[v],f.call(p,c,v,h))return c}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(r,n){var i=-1,o=1,a=0;function u(x,E,I){if(x==E)return x?[[a,x]]:[];(I<0||x.length<I)&&(I=null);var A=p(x,E),O=x.substring(0,A);x=x.substring(A),E=E.substring(A),A=c(x,E);var L=x.substring(x.length-A);x=x.substring(0,x.length-A),E=E.substring(0,E.length-A);var R=f(x,E);return O&&R.unshift([a,O]),L&&R.push([a,L]),y(R),I!=null&&(R=m(R,I)),R=w(R),R}function f(x,E){var I;if(!x)return[[o,E]];if(!E)return[[i,x]];var A=x.length>E.length?x:E,O=x.length>E.length?E:x,L=A.indexOf(O);if(L!=-1)return I=[[o,A.substring(0,L)],[a,O],[o,A.substring(L+O.length)]],x.length>E.length&&(I[0][0]=I[2][0]=i),I;if(O.length==1)return[[i,x],[o,E]];var R=v(x,E);if(R){var C=R[0],P=R[1],M=R[2],F=R[3],q=R[4],Z=u(C,M),z=u(P,F);return Z.concat([[a,q]],z)}return h(x,E)}function h(x,E){for(var I=x.length,A=E.length,O=Math.ceil((I+A)/2),L=O,R=2*O,C=new Array(R),P=new Array(R),M=0;M<R;M++)C[M]=-1,P[M]=-1;C[L+1]=0,P[L+1]=0;for(var F=I-A,q=F%2!=0,Z=0,z=0,nt=0,V=0,U=0;U<O;U++){for(var k=-U+Z;k<=U-z;k+=2){var j=L+k,G;k==-U||k!=U&&C[j-1]<C[j+1]?G=C[j+1]:G=C[j-1]+1;for(var X=G-k;G<I&&X<A&&x.charAt(G)==E.charAt(X);)G++,X++;if(C[j]=G,G>I)z+=2;else if(X>A)Z+=2;else if(q){var Y=L+F-k;if(Y>=0&&Y<R&&P[Y]!=-1){var $=I-P[Y];if(G>=$)return d(x,E,G,X)}}}for(var W=-U+nt;W<=U-V;W+=2){var Y=L+W,$;W==-U||W!=U&&P[Y-1]<P[Y+1]?$=P[Y+1]:$=P[Y-1]+1;for(var et=$-W;$<I&&et<A&&x.charAt(I-$-1)==E.charAt(A-et-1);)$++,et++;if(P[Y]=$,$>I)V+=2;else if(et>A)nt+=2;else if(!q){var j=L+F-W;if(j>=0&&j<R&&C[j]!=-1){var G=C[j],X=L+G-j;if($=I-$,G>=$)return d(x,E,G,X)}}}}return[[i,x],[o,E]]}function d(x,E,I,A){var O=x.substring(0,I),L=E.substring(0,A),R=x.substring(I),C=E.substring(A),P=u(O,L),M=u(R,C);return P.concat(M)}function p(x,E){if(!x||!E||x.charAt(0)!=E.charAt(0))return 0;for(var I=0,A=Math.min(x.length,E.length),O=A,L=0;I<O;)x.substring(L,O)==E.substring(L,O)?(I=O,L=I):A=O,O=Math.floor((A-I)/2+I);return O}function c(x,E){if(!x||!E||x.charAt(x.length-1)!=E.charAt(E.length-1))return 0;for(var I=0,A=Math.min(x.length,E.length),O=A,L=0;I<O;)x.substring(x.length-O,x.length-L)==E.substring(E.length-O,E.length-L)?(I=O,L=I):A=O,O=Math.floor((A-I)/2+I);return O}function v(x,E){var I=x.length>E.length?x:E,A=x.length>E.length?E:x;if(I.length<4||A.length*2<I.length)return null;function O(z,nt,V){for(var U=z.substring(V,V+Math.floor(z.length/4)),k=-1,j="",G,X,Y,$;(k=nt.indexOf(U,k+1))!=-1;){var W=p(z.substring(V),nt.substring(k)),et=c(z.substring(0,V),nt.substring(0,k));j.length<et+W&&(j=nt.substring(k-et,k)+nt.substring(k,k+W),G=z.substring(0,V-et),X=z.substring(V+W),Y=nt.substring(0,k-et),$=nt.substring(k+W))}return j.length*2>=z.length?[G,X,Y,$,j]:null}var L=O(I,A,Math.ceil(I.length/4)),R=O(I,A,Math.ceil(I.length/2)),C;if(!L&&!R)return null;R?L?C=L[4].length>R[4].length?L:R:C=R:C=L;var P,M,F,q;x.length>E.length?(P=C[0],M=C[1],F=C[2],q=C[3]):(F=C[0],q=C[1],P=C[2],M=C[3]);var Z=C[4];return[P,M,F,q,Z]}function y(x){x.push([a,""]);for(var E=0,I=0,A=0,O="",L="",R;E<x.length;)switch(x[E][0]){case o:A++,L+=x[E][1],E++;break;case i:I++,O+=x[E][1],E++;break;case a:I+A>1?(I!==0&&A!==0&&(R=p(L,O),R!==0&&(E-I-A>0&&x[E-I-A-1][0]==a?x[E-I-A-1][1]+=L.substring(0,R):(x.splice(0,0,[a,L.substring(0,R)]),E++),L=L.substring(R),O=O.substring(R)),R=c(L,O),R!==0&&(x[E][1]=L.substring(L.length-R)+x[E][1],L=L.substring(0,L.length-R),O=O.substring(0,O.length-R))),I===0?x.splice(E-A,I+A,[o,L]):A===0?x.splice(E-I,I+A,[i,O]):x.splice(E-I-A,I+A,[i,O],[o,L]),E=E-I-A+(I?1:0)+(A?1:0)+1):E!==0&&x[E-1][0]==a?(x[E-1][1]+=x[E][1],x.splice(E,1)):E++,A=0,I=0,O="",L="";break}x[x.length-1][1]===""&&x.pop();var C=!1;for(E=1;E<x.length-1;)x[E-1][0]==a&&x[E+1][0]==a&&(x[E][1].substring(x[E][1].length-x[E-1][1].length)==x[E-1][1]?(x[E][1]=x[E-1][1]+x[E][1].substring(0,x[E][1].length-x[E-1][1].length),x[E+1][1]=x[E-1][1]+x[E+1][1],x.splice(E-1,1),C=!0):x[E][1].substring(0,x[E+1][1].length)==x[E+1][1]&&(x[E-1][1]+=x[E+1][1],x[E][1]=x[E][1].substring(x[E+1][1].length)+x[E+1][1],x.splice(E+1,1),C=!0)),E++;C&&y(x)}var b=u;b.INSERT=o,b.DELETE=i,b.EQUAL=a,r.exports=b;function _(x,E){if(E===0)return[a,x];for(var I=0,A=0;A<x.length;A++){var O=x[A];if(O[0]===i||O[0]===a){var L=I+O[1].length;if(E===L)return[A+1,x];if(E<L){x=x.slice();var R=E-I,C=[O[0],O[1].slice(0,R)],P=[O[0],O[1].slice(R)];return x.splice(A,1,C,P),[A+1,x]}else I=L}}throw new Error("cursor_pos is out of bounds!")}function m(x,E){var I=_(x,E),A=I[1],O=I[0],L=A[O],R=A[O+1];if(L==null)return x;if(L[0]!==a)return x;if(R!=null&&L[1]+R[1]===R[1]+L[1])return A.splice(O,2,R,L),T(A,O,2);if(R!=null&&R[1].indexOf(L[1])===0){A.splice(O,2,[R[0],L[1]],[0,L[1]]);var C=R[1].slice(L[1].length);return C.length>0&&A.splice(O+2,0,[R[0],C]),T(A,O,3)}else return x}function w(x){for(var E=!1,I=function(R){return R.charCodeAt(0)>=56320&&R.charCodeAt(0)<=57343},A=function(R){return R.charCodeAt(R.length-1)>=55296&&R.charCodeAt(R.length-1)<=56319},O=2;O<x.length;O+=1)x[O-2][0]===a&&A(x[O-2][1])&&x[O-1][0]===i&&I(x[O-1][1])&&x[O][0]===o&&I(x[O][1])&&(E=!0,x[O-1][1]=x[O-2][1].slice(-1)+x[O-1][1],x[O][1]=x[O-2][1].slice(-1)+x[O][1],x[O-2][1]=x[O-2][1].slice(0,-1));if(!E)return x;for(var L=[],O=0;O<x.length;O+=1)x[O][1].length>0&&L.push(x[O]);return L}function T(x,E,I){for(var A=E+I-1;A>=0&&A>=E-1;A--)if(A+1<x.length){var O=x[A],L=x[A+1];O[0]===L[1]&&x.splice(A,2,[O[0],O[1]+L[1]])}return x}},function(r,n){n=r.exports=typeof Object.keys=="function"?Object.keys:i,n.shim=i;function i(o){var a=[];for(var u in o)a.push(u);return a}},function(r,n){var i=function(){return Object.prototype.toString.call(arguments)}()=="[object Arguments]";n=r.exports=i?o:a,n.supported=o;function o(u){return Object.prototype.toString.call(u)=="[object Arguments]"}n.unsupported=a;function a(u){return u&&typeof u=="object"&&typeof u.length=="number"&&Object.prototype.hasOwnProperty.call(u,"callee")&&!Object.prototype.propertyIsEnumerable.call(u,"callee")||!1}},function(r,n){var i=Object.prototype.hasOwnProperty,o="~";function a(){}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(o=!1));function u(h,d,p){this.fn=h,this.context=d,this.once=p||!1}function f(){this._events=new a,this._eventsCount=0}f.prototype.eventNames=function(){var d=[],p,c;if(this._eventsCount===0)return d;for(c in p=this._events)i.call(p,c)&&d.push(o?c.slice(1):c);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(p)):d},f.prototype.listeners=function(d,p){var c=o?o+d:d,v=this._events[c];if(p)return!!v;if(!v)return[];if(v.fn)return[v.fn];for(var y=0,b=v.length,_=new Array(b);y<b;y++)_[y]=v[y].fn;return _},f.prototype.emit=function(d,p,c,v,y,b){var _=o?o+d:d;if(!this._events[_])return!1;var m=this._events[_],w=arguments.length,T,x;if(m.fn){switch(m.once&&this.removeListener(d,m.fn,void 0,!0),w){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,p),!0;case 3:return m.fn.call(m.context,p,c),!0;case 4:return m.fn.call(m.context,p,c,v),!0;case 5:return m.fn.call(m.context,p,c,v,y),!0;case 6:return m.fn.call(m.context,p,c,v,y,b),!0}for(x=1,T=new Array(w-1);x<w;x++)T[x-1]=arguments[x];m.fn.apply(m.context,T)}else{var E=m.length,I;for(x=0;x<E;x++)switch(m[x].once&&this.removeListener(d,m[x].fn,void 0,!0),w){case 1:m[x].fn.call(m[x].context);break;case 2:m[x].fn.call(m[x].context,p);break;case 3:m[x].fn.call(m[x].context,p,c);break;case 4:m[x].fn.call(m[x].context,p,c,v);break;default:if(!T)for(I=1,T=new Array(w-1);I<w;I++)T[I-1]=arguments[I];m[x].fn.apply(m[x].context,T)}}return!0},f.prototype.on=function(d,p,c){var v=new u(p,c||this),y=o?o+d:d;return this._events[y]?this._events[y].fn?this._events[y]=[this._events[y],v]:this._events[y].push(v):(this._events[y]=v,this._eventsCount++),this},f.prototype.once=function(d,p,c){var v=new u(p,c||this,!0),y=o?o+d:d;return this._events[y]?this._events[y].fn?this._events[y]=[this._events[y],v]:this._events[y].push(v):(this._events[y]=v,this._eventsCount++),this},f.prototype.removeListener=function(d,p,c,v){var y=o?o+d:d;if(!this._events[y])return this;if(!p)return--this._eventsCount===0?this._events=new a:delete this._events[y],this;var b=this._events[y];if(b.fn)b.fn===p&&(!v||b.once)&&(!c||b.context===c)&&(--this._eventsCount===0?this._events=new a:delete this._events[y]);else{for(var _=0,m=[],w=b.length;_<w;_++)(b[_].fn!==p||v&&!b[_].once||c&&b[_].context!==c)&&m.push(b[_]);m.length?this._events[y]=m.length===1?m[0]:m:--this._eventsCount===0?this._events=new a:delete this._events[y]}return this},f.prototype.removeAllListeners=function(d){var p;return d?(p=o?o+d:d,this._events[p]&&(--this._eventsCount===0?this._events=new a:delete this._events[p])):(this._events=new a,this._eventsCount=0),this},f.prototype.off=f.prototype.removeListener,f.prototype.addListener=f.prototype.on,f.prototype.setMaxListeners=function(){return this},f.prefixed=o,f.EventEmitter=f,typeof r<"u"&&(r.exports=f)},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.matchText=n.matchSpacing=n.matchNewline=n.matchBlot=n.matchAttributor=n.default=void 0;var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(rt){return typeof rt}:function(rt){return rt&&typeof Symbol=="function"&&rt.constructor===Symbol&&rt!==Symbol.prototype?"symbol":typeof rt},a=function(){function rt(at,dt){var vt=[],ct=!0,Pt=!1,Lt=void 0;try{for(var Nt=at[Symbol.iterator](),He;!(ct=(He=Nt.next()).done)&&(vt.push(He.value),!(dt&&vt.length===dt));ct=!0);}catch(Ge){Pt=!0,Lt=Ge}finally{try{!ct&&Nt.return&&Nt.return()}finally{if(Pt)throw Lt}}return vt}return function(at,dt){if(Array.isArray(at))return at;if(Symbol.iterator in Object(at))return rt(at,dt);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function rt(at,dt){for(var vt=0;vt<dt.length;vt++){var ct=dt[vt];ct.enumerable=ct.enumerable||!1,ct.configurable=!0,"value"in ct&&(ct.writable=!0),Object.defineProperty(at,ct.key,ct)}}return function(at,dt,vt){return dt&&rt(at.prototype,dt),vt&&rt(at,vt),at}}(),f=i(3),h=P(f),d=i(2),p=P(d),c=i(0),v=P(c),y=i(5),b=P(y),_=i(10),m=P(_),w=i(9),T=P(w),x=i(36),E=i(37),I=i(13),A=P(I),O=i(26),L=i(38),R=i(39),C=i(40);function P(rt){return rt&&rt.__esModule?rt:{default:rt}}function M(rt,at,dt){return at in rt?Object.defineProperty(rt,at,{value:dt,enumerable:!0,configurable:!0,writable:!0}):rt[at]=dt,rt}function F(rt,at){if(!(rt instanceof at))throw new TypeError("Cannot call a class as a function")}function q(rt,at){if(!rt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return at&&(typeof at=="object"||typeof at=="function")?at:rt}function Z(rt,at){if(typeof at!="function"&&at!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof at);rt.prototype=Object.create(at&&at.prototype,{constructor:{value:rt,enumerable:!1,writable:!0,configurable:!0}}),at&&(Object.setPrototypeOf?Object.setPrototypeOf(rt,at):rt.__proto__=at)}var z=(0,m.default)("quill:clipboard"),nt="__ql-matcher",V=[[Node.TEXT_NODE,qt],[Node.TEXT_NODE,xt],["br",lt],[Node.ELEMENT_NODE,xt],[Node.ELEMENT_NODE,it],[Node.ELEMENT_NODE,At],[Node.ELEMENT_NODE,J],[Node.ELEMENT_NODE,oe],["li",yt],["b",et.bind(et,"bold")],["i",et.bind(et,"italic")],["style",pt]],U=[x.AlignAttribute,L.DirectionAttribute].reduce(function(rt,at){return rt[at.keyName]=at,rt},{}),k=[x.AlignStyle,E.BackgroundStyle,O.ColorStyle,L.DirectionStyle,R.FontStyle,C.SizeStyle].reduce(function(rt,at){return rt[at.keyName]=at,rt},{}),j=function(rt){Z(at,rt);function at(dt,vt){F(this,at);var ct=q(this,(at.__proto__||Object.getPrototypeOf(at)).call(this,dt,vt));return ct.quill.root.addEventListener("paste",ct.onPaste.bind(ct)),ct.container=ct.quill.addContainer("ql-clipboard"),ct.container.setAttribute("contenteditable",!0),ct.container.setAttribute("tabindex",-1),ct.matchers=[],V.concat(ct.options.matchers).forEach(function(Pt){var Lt=a(Pt,2),Nt=Lt[0],He=Lt[1];!vt.matchVisual&&He===At||ct.addMatcher(Nt,He)}),ct}return u(at,[{key:"addMatcher",value:function(vt,ct){this.matchers.push([vt,ct])}},{key:"convert",value:function(vt){if(typeof vt=="string")return this.container.innerHTML=vt.replace(/\>\r?\n +\</g,"><"),this.convert();var ct=this.quill.getFormat(this.quill.selection.savedRange.index);if(ct[A.default.blotName]){var Pt=this.container.innerText;return this.container.innerHTML="",new p.default().insert(Pt,M({},A.default.blotName,ct[A.default.blotName]))}var Lt=this.prepareMatching(),Nt=a(Lt,2),He=Nt[0],Ge=Nt[1],Qt=W(this.container,He,Ge);return Y(Qt,`
1988
+ `,et.format).retain(lt.length()-pt-1).retain(1,{header:null});this.quill.updateContents(yt,E.default.sources.USER),this.quill.setSelection(W.index+1,E.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(W,et){var J=et.prefix.length,it=this.quill.getLine(W.index),lt=a(it,2),pt=lt[0],yt=lt[1];if(yt>J)return!0;var xt=void 0;switch(et.prefix.trim()){case"[]":case"[ ]":xt="unchecked";break;case"[x]":xt="checked";break;case"-":case"*":xt="bullet";break;default:xt="ordered"}this.quill.insertText(W.index," ",E.default.sources.USER),this.quill.history.cutoff();var At=new b.default().retain(W.index-yt).delete(J+1).retain(pt.length()-2-yt).retain(1,{list:xt});this.quill.updateContents(At,E.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(W.index-J,E.default.sources.SILENT)}},"code exit":{key:z.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(W){var et=this.quill.getLine(W.index),J=a(et,2),it=J[0],lt=J[1],pt=new b.default().retain(W.index+it.length()-lt-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(pt,E.default.sources.USER)}},"embed left":nt(z.keys.LEFT,!1),"embed left shift":nt(z.keys.LEFT,!0),"embed right":nt(z.keys.RIGHT,!1),"embed right shift":nt(z.keys.RIGHT,!0)}};function nt($,W){var et,J=$===z.keys.LEFT?"prefix":"suffix";return et={key:$,shiftKey:W,altKey:null},C(et,J,/^$/),C(et,"handler",function(lt){var pt=lt.index;$===z.keys.RIGHT&&(pt+=lt.length+1);var yt=this.quill.getLeaf(pt),xt=a(yt,1),At=xt[0];return At instanceof T.default.Embed?($===z.keys.LEFT?W?this.quill.setSelection(lt.index-1,lt.length+1,E.default.sources.USER):this.quill.setSelection(lt.index-1,E.default.sources.USER):W?this.quill.setSelection(lt.index,lt.length+1,E.default.sources.USER):this.quill.setSelection(lt.index+lt.length+1,E.default.sources.USER),!1):!0}),et}function V($,W){if(!($.index===0||this.quill.getLength()<=1)){var et=this.quill.getLine($.index),J=a(et,1),it=J[0],lt={};if(W.offset===0){var pt=this.quill.getLine($.index-1),yt=a(pt,1),xt=yt[0];if(xt!=null&&xt.length()>1){var At=it.formats(),oe=this.quill.getFormat($.index-1,1);lt=m.default.attributes.diff(At,oe)||{}}}var Ht=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(W.prefix)?2:1;this.quill.deleteText($.index-Ht,Ht,E.default.sources.USER),Object.keys(lt).length>0&&this.quill.formatLine($.index-Ht,Ht,lt,E.default.sources.USER),this.quill.focus()}}function U($,W){var et=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(W.suffix)?2:1;if(!($.index>=this.quill.getLength()-et)){var J={},it=0,lt=this.quill.getLine($.index),pt=a(lt,1),yt=pt[0];if(W.offset>=yt.length()-1){var xt=this.quill.getLine($.index+1),At=a(xt,1),oe=At[0];if(oe){var Ht=yt.formats(),rt=this.quill.getFormat($.index,1);J=m.default.attributes.diff(Ht,rt)||{},it=oe.length()}}this.quill.deleteText($.index,et,E.default.sources.USER),Object.keys(J).length>0&&this.quill.formatLine($.index+it-1,et,J,E.default.sources.USER)}}function k($){var W=this.quill.getLines($),et={};if(W.length>1){var J=W[0].formats(),it=W[W.length-1].formats();et=m.default.attributes.diff(it,J)||{}}this.quill.deleteText($,E.default.sources.USER),Object.keys(et).length>0&&this.quill.formatLine($.index,1,et,E.default.sources.USER),this.quill.setSelection($.index,E.default.sources.SILENT),this.quill.focus()}function j($,W){var et=this;$.length>0&&this.quill.scroll.deleteAt($.index,$.length);var J=Object.keys(W.format).reduce(function(it,lt){return T.default.query(lt,T.default.Scope.BLOCK)&&!Array.isArray(W.format[lt])&&(it[lt]=W.format[lt]),it},{});this.quill.insertText($.index,`
1989
+ `,J,E.default.sources.USER),this.quill.setSelection($.index+1,E.default.sources.SILENT),this.quill.focus(),Object.keys(W.format).forEach(function(it){J[it]==null&&(Array.isArray(W.format[it])||it!=="link"&&et.quill.format(it,W.format[it],E.default.sources.USER))})}function G($){return{key:z.keys.TAB,shiftKey:!$,format:{"code-block":!0},handler:function(et){var J=T.default.query("code-block"),it=et.index,lt=et.length,pt=this.quill.scroll.descendant(J,it),yt=a(pt,2),xt=yt[0],At=yt[1];if(xt!=null){var oe=this.quill.getIndex(xt),Ht=xt.newlineIndex(At,!0)+1,rt=xt.newlineIndex(oe+At+lt),at=xt.domNode.textContent.slice(Ht,rt).split(`
1990
+ `);At=0,at.forEach(function(dt,vt){$?(xt.insertAt(Ht+At,J.TAB),At+=J.TAB.length,vt===0?it+=J.TAB.length:lt+=J.TAB.length):dt.startsWith(J.TAB)&&(xt.deleteAt(Ht+At,J.TAB.length),At-=J.TAB.length,vt===0?it-=J.TAB.length:lt-=J.TAB.length),At+=dt.length+1}),this.quill.update(E.default.sources.USER),this.quill.setSelection(it,lt,E.default.sources.SILENT)}}}}function X($){return{key:$[0].toUpperCase(),shortKey:!0,handler:function(et,J){this.quill.format($,!J.format[$],E.default.sources.USER)}}}function Y($){if(typeof $=="string"||typeof $=="number")return Y({key:$});if((typeof $>"u"?"undefined":o($))==="object"&&($=(0,h.default)($,!1)),typeof $.key=="string")if(z.keys[$.key.toUpperCase()]!=null)$.key=z.keys[$.key.toUpperCase()];else if($.key.length===1)$.key=$.key.toUpperCase().charCodeAt(0);else return null;return $.shortKey&&($[Z]=$.shortKey,delete $.shortKey),$}n.default=z,n.SHORTKEY=Z},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function m(w,T){var x=[],E=!0,I=!1,A=void 0;try{for(var O=w[Symbol.iterator](),L;!(E=(L=O.next()).done)&&(x.push(L.value),!(T&&x.length===T));E=!0);}catch(R){I=!0,A=R}finally{try{!E&&O.return&&O.return()}finally{if(I)throw A}}return x}return function(w,T){if(Array.isArray(w))return w;if(Symbol.iterator in Object(w))return m(w,T);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function m(w,T,x){w===null&&(w=Function.prototype);var E=Object.getOwnPropertyDescriptor(w,T);if(E===void 0){var I=Object.getPrototypeOf(w);return I===null?void 0:m(I,T,x)}else{if("value"in E)return E.value;var A=E.get;return A===void 0?void 0:A.call(x)}},u=function(){function m(w,T){for(var x=0;x<T.length;x++){var E=T[x];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(w,E.key,E)}}return function(w,T,x){return T&&m(w.prototype,T),x&&m(w,x),w}}(),f=i(0),h=c(f),d=i(7),p=c(d);function c(m){return m&&m.__esModule?m:{default:m}}function v(m,w){if(!(m instanceof w))throw new TypeError("Cannot call a class as a function")}function y(m,w){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:m}function b(m,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);m.prototype=Object.create(w&&w.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(m,w):m.__proto__=w)}var _=function(m){b(w,m),u(w,null,[{key:"value",value:function(){}}]);function w(T,x){v(this,w);var E=y(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,T));return E.selection=x,E.textNode=document.createTextNode(w.CONTENTS),E.domNode.appendChild(E.textNode),E._length=0,E}return u(w,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(x,E){if(this._length!==0)return a(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"format",this).call(this,x,E);for(var I=this,A=0;I!=null&&I.statics.scope!==h.default.Scope.BLOCK_BLOT;)A+=I.offset(I.parent),I=I.parent;I!=null&&(this._length=w.CONTENTS.length,I.optimize(),I.formatAt(A,w.CONTENTS.length,x,E),this._length=0)}},{key:"index",value:function(x,E){return x===this.textNode?0:a(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"index",this).call(this,x,E)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){a(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var x=this.textNode,E=this.selection.getNativeRange(),I=void 0,A=void 0,O=void 0;if(E!=null&&E.start.node===x&&E.end.node===x){var L=[x,E.start.offset,E.end.offset];I=L[0],A=L[1],O=L[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==w.CONTENTS){var R=this.textNode.data.split(w.CONTENTS).join("");this.next instanceof p.default?(I=this.next.domNode,this.next.insertAt(0,R),this.textNode.data=w.CONTENTS):(this.textNode.data=R,this.parent.insertBefore(h.default.create(this.textNode),this),this.textNode=document.createTextNode(w.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),A!=null){var C=[A,O].map(function(M){return Math.max(0,Math.min(I.data.length,M-1))}),P=o(C,2);return A=P[0],O=P[1],{startNode:I,startOffset:A,endNode:I,endOffset:O}}}}},{key:"update",value:function(x,E){var I=this;if(x.some(function(O){return O.type==="characterData"&&O.target===I.textNode})){var A=this.restore();A&&(E.range=A)}}},{key:"value",value:function(){return""}}]),w}(h.default.Embed);_.blotName="cursor",_.className="ql-cursor",_.tagName="span",_.CONTENTS="\uFEFF",n.default=_},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(0),a=h(o),u=i(4),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function d(y,b){if(!(y instanceof b))throw new TypeError("Cannot call a class as a function")}function p(y,b){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:y}function c(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);y.prototype=Object.create(b&&b.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(y,b):y.__proto__=b)}var v=function(y){c(b,y);function b(){return d(this,b),p(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return b}(a.default.Container);v.allowedChildren=[f.default,u.BlockEmbed,v],n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.ColorStyle=n.ColorClass=n.ColorAttributor=void 0;var o=function(){function _(m,w){for(var T=0;T<w.length;T++){var x=w[T];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,w,T){return w&&_(m.prototype,w),T&&_(m,T),m}}(),a=function _(m,w,T){m===null&&(m=Function.prototype);var x=Object.getOwnPropertyDescriptor(m,w);if(x===void 0){var E=Object.getPrototypeOf(m);return E===null?void 0:_(E,w,T)}else{if("value"in x)return x.value;var I=x.get;return I===void 0?void 0:I.call(T)}},u=i(0),f=h(u);function h(_){return _&&_.__esModule?_:{default:_}}function d(_,m){if(!(_ instanceof m))throw new TypeError("Cannot call a class as a function")}function p(_,m){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:_}function c(_,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);_.prototype=Object.create(m&&m.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(_,m):_.__proto__=m)}var v=function(_){c(m,_);function m(){return d(this,m),p(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return o(m,[{key:"value",value:function(T){var x=a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"value",this).call(this,T);return x.startsWith("rgb(")?(x=x.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+x.split(",").map(function(E){return("00"+parseInt(E).toString(16)).slice(-2)}).join("")):x}}]),m}(f.default.Attributor.Style),y=new f.default.Attributor.Class("color","ql-color",{scope:f.default.Scope.INLINE}),b=new v("color","color",{scope:f.default.Scope.INLINE});n.ColorAttributor=v,n.ColorClass=y,n.ColorStyle=b},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.sanitize=n.default=void 0;var o=function(){function b(_,m){for(var w=0;w<m.length;w++){var T=m[w];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(_,T.key,T)}}return function(_,m,w){return m&&b(_.prototype,m),w&&b(_,w),_}}(),a=function b(_,m,w){_===null&&(_=Function.prototype);var T=Object.getOwnPropertyDescriptor(_,m);if(T===void 0){var x=Object.getPrototypeOf(_);return x===null?void 0:b(x,m,w)}else{if("value"in T)return T.value;var E=T.get;return E===void 0?void 0:E.call(w)}},u=i(6),f=h(u);function h(b){return b&&b.__esModule?b:{default:b}}function d(b,_){if(!(b instanceof _))throw new TypeError("Cannot call a class as a function")}function p(b,_){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:b}function c(b,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);b.prototype=Object.create(_&&_.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(b,_):b.__proto__=_)}var v=function(b){c(_,b);function _(){return d(this,_),p(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return o(_,[{key:"format",value:function(w,T){if(w!==this.statics.blotName||!T)return a(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"format",this).call(this,w,T);T=this.constructor.sanitize(T),this.domNode.setAttribute("href",T)}}],[{key:"create",value:function(w){var T=a(_.__proto__||Object.getPrototypeOf(_),"create",this).call(this,w);return w=this.sanitize(w),T.setAttribute("href",w),T.setAttribute("rel","noopener noreferrer"),T.setAttribute("target","_blank"),T}},{key:"formats",value:function(w){return w.getAttribute("href")}},{key:"sanitize",value:function(w){return y(w,this.PROTOCOL_WHITELIST)?w:this.SANITIZED_URL}}]),_}(f.default);v.blotName="link",v.tagName="A",v.SANITIZED_URL="about:blank",v.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function y(b,_){var m=document.createElement("a");m.href=b;var w=m.href.slice(0,m.href.indexOf(":"));return _.indexOf(w)>-1}n.default=v,n.sanitize=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},a=function(){function _(m,w){for(var T=0;T<w.length;T++){var x=w[T];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,w,T){return w&&_(m.prototype,w),T&&_(m,T),m}}(),u=i(23),f=p(u),h=i(107),d=p(h);function p(_){return _&&_.__esModule?_:{default:_}}function c(_,m){if(!(_ instanceof m))throw new TypeError("Cannot call a class as a function")}var v=0;function y(_,m){_.setAttribute(m,_.getAttribute(m)!=="true")}var b=function(){function _(m){var w=this;c(this,_),this.select=m,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){w.togglePicker()}),this.label.addEventListener("keydown",function(T){switch(T.keyCode){case f.default.keys.ENTER:w.togglePicker();break;case f.default.keys.ESCAPE:w.escape(),T.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return a(_,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),y(this.label,"aria-expanded"),y(this.options,"aria-hidden")}},{key:"buildItem",value:function(w){var T=this,x=document.createElement("span");return x.tabIndex="0",x.setAttribute("role","button"),x.classList.add("ql-picker-item"),w.hasAttribute("value")&&x.setAttribute("data-value",w.getAttribute("value")),w.textContent&&x.setAttribute("data-label",w.textContent),x.addEventListener("click",function(){T.selectItem(x,!0)}),x.addEventListener("keydown",function(E){switch(E.keyCode){case f.default.keys.ENTER:T.selectItem(x,!0),E.preventDefault();break;case f.default.keys.ESCAPE:T.escape(),E.preventDefault();break}}),x}},{key:"buildLabel",value:function(){var w=document.createElement("span");return w.classList.add("ql-picker-label"),w.innerHTML=d.default,w.tabIndex="0",w.setAttribute("role","button"),w.setAttribute("aria-expanded","false"),this.container.appendChild(w),w}},{key:"buildOptions",value:function(){var w=this,T=document.createElement("span");T.classList.add("ql-picker-options"),T.setAttribute("aria-hidden","true"),T.tabIndex="-1",T.id="ql-picker-options-"+v,v+=1,this.label.setAttribute("aria-controls",T.id),this.options=T,[].slice.call(this.select.options).forEach(function(x){var E=w.buildItem(x);T.appendChild(E),x.selected===!0&&w.selectItem(E)}),this.container.appendChild(T)}},{key:"buildPicker",value:function(){var w=this;[].slice.call(this.select.attributes).forEach(function(T){w.container.setAttribute(T.name,T.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var w=this;this.close(),setTimeout(function(){return w.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(w){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,x=this.container.querySelector(".ql-selected");if(w!==x&&(x!=null&&x.classList.remove("ql-selected"),w!=null&&(w.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(w.parentNode.children,w),w.hasAttribute("data-value")?this.label.setAttribute("data-value",w.getAttribute("data-value")):this.label.removeAttribute("data-value"),w.hasAttribute("data-label")?this.label.setAttribute("data-label",w.getAttribute("data-label")):this.label.removeAttribute("data-label"),T))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":o(Event))==="object"){var E=document.createEvent("Event");E.initEvent("change",!0,!0),this.select.dispatchEvent(E)}this.close()}}},{key:"update",value:function(){var w=void 0;if(this.select.selectedIndex>-1){var T=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];w=this.select.options[this.select.selectedIndex],this.selectItem(T)}else this.selectItem(null);var x=w!=null&&w!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",x)}}]),_}();n.default=b},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(0),a=q(o),u=i(5),f=q(u),h=i(4),d=q(h),p=i(16),c=q(p),v=i(25),y=q(v),b=i(24),_=q(b),m=i(35),w=q(m),T=i(6),x=q(T),E=i(22),I=q(E),A=i(7),O=q(A),L=i(55),R=q(L),C=i(42),P=q(C),M=i(23),F=q(M);function q(Z){return Z&&Z.__esModule?Z:{default:Z}}f.default.register({"blots/block":d.default,"blots/block/embed":h.BlockEmbed,"blots/break":c.default,"blots/container":y.default,"blots/cursor":_.default,"blots/embed":w.default,"blots/inline":x.default,"blots/scroll":I.default,"blots/text":O.default,"modules/clipboard":R.default,"modules/history":P.default,"modules/keyboard":F.default}),a.default.register(d.default,c.default,_.default,x.default,I.default,O.default),n.default=f.default},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(1),a=function(){function u(f){this.domNode=f,this.domNode[o.DATA_KEY]={blot:this}}return Object.defineProperty(u.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),u.create=function(f){if(this.tagName==null)throw new o.ParchmentError("Blot definition missing tagName");var h;return Array.isArray(this.tagName)?(typeof f=="string"&&(f=f.toUpperCase(),parseInt(f).toString()===f&&(f=parseInt(f))),typeof f=="number"?h=document.createElement(this.tagName[f-1]):this.tagName.indexOf(f)>-1?h=document.createElement(f):h=document.createElement(this.tagName[0])):h=document.createElement(this.tagName),this.className&&h.classList.add(this.className),h},u.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},u.prototype.clone=function(){var f=this.domNode.cloneNode(!1);return o.create(f)},u.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[o.DATA_KEY]},u.prototype.deleteAt=function(f,h){var d=this.isolate(f,h);d.remove()},u.prototype.formatAt=function(f,h,d,p){var c=this.isolate(f,h);if(o.query(d,o.Scope.BLOT)!=null&&p)c.wrap(d,p);else if(o.query(d,o.Scope.ATTRIBUTE)!=null){var v=o.create(this.statics.scope);c.wrap(v),v.format(d,p)}},u.prototype.insertAt=function(f,h,d){var p=d==null?o.create("text",h):o.create(h,d),c=this.split(f);this.parent.insertBefore(p,c)},u.prototype.insertInto=function(f,h){h===void 0&&(h=null),this.parent!=null&&this.parent.children.remove(this);var d=null;f.children.insertBefore(this,h),h!=null&&(d=h.domNode),(this.domNode.parentNode!=f.domNode||this.domNode.nextSibling!=d)&&f.domNode.insertBefore(this.domNode,d),this.parent=f,this.attach()},u.prototype.isolate=function(f,h){var d=this.split(f);return d.split(h),d},u.prototype.length=function(){return 1},u.prototype.offset=function(f){return f===void 0&&(f=this.parent),this.parent==null||this==f?0:this.parent.children.offset(this)+this.parent.offset(f)},u.prototype.optimize=function(f){this.domNode[o.DATA_KEY]!=null&&delete this.domNode[o.DATA_KEY].mutations},u.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},u.prototype.replace=function(f){f.parent!=null&&(f.parent.insertBefore(this,f.next),f.remove())},u.prototype.replaceWith=function(f,h){var d=typeof f=="string"?o.create(f,h):f;return d.replace(this),d},u.prototype.split=function(f,h){return f===0?this:this.next},u.prototype.update=function(f,h){},u.prototype.wrap=function(f,h){var d=typeof f=="string"?o.create(f,h):f;return this.parent!=null&&this.parent.insertBefore(d,this.next),d.appendChild(this),d},u.blotName="abstract",u}();n.default=a},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(12),a=i(32),u=i(33),f=i(1),h=function(){function d(p){this.attributes={},this.domNode=p,this.build()}return d.prototype.attribute=function(p,c){c?p.add(this.domNode,c)&&(p.value(this.domNode)!=null?this.attributes[p.attrName]=p:delete this.attributes[p.attrName]):(p.remove(this.domNode),delete this.attributes[p.attrName])},d.prototype.build=function(){var p=this;this.attributes={};var c=o.default.keys(this.domNode),v=a.default.keys(this.domNode),y=u.default.keys(this.domNode);c.concat(v).concat(y).forEach(function(b){var _=f.query(b,f.Scope.ATTRIBUTE);_ instanceof o.default&&(p.attributes[_.attrName]=_)})},d.prototype.copy=function(p){var c=this;Object.keys(this.attributes).forEach(function(v){var y=c.attributes[v].value(c.domNode);p.format(v,y)})},d.prototype.move=function(p){var c=this;this.copy(p),Object.keys(this.attributes).forEach(function(v){c.attributes[v].remove(c.domNode)}),this.attributes={}},d.prototype.values=function(){var p=this;return Object.keys(this.attributes).reduce(function(c,v){return c[v]=p.attributes[v].value(p.domNode),c},{})},d}();n.default=h},function(r,n,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var c in p)p.hasOwnProperty(c)&&(d[c]=p[c])};return function(d,p){h(d,p);function c(){this.constructor=d}d.prototype=p===null?Object.create(p):(c.prototype=p.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(12);function u(h,d){var p=h.getAttribute("class")||"";return p.split(/\s+/).filter(function(c){return c.indexOf(d+"-")===0})}var f=function(h){o(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.keys=function(p){return(p.getAttribute("class")||"").split(/\s+/).map(function(c){return c.split("-").slice(0,-1).join("-")})},d.prototype.add=function(p,c){return this.canAdd(p,c)?(this.remove(p),p.classList.add(this.keyName+"-"+c),!0):!1},d.prototype.remove=function(p){var c=u(p,this.keyName);c.forEach(function(v){p.classList.remove(v)}),p.classList.length===0&&p.removeAttribute("class")},d.prototype.value=function(p){var c=u(p,this.keyName)[0]||"",v=c.slice(this.keyName.length+1);return this.canAdd(p,v)?v:""},d}(a.default);n.default=f},function(r,n,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var c in p)p.hasOwnProperty(c)&&(d[c]=p[c])};return function(d,p){h(d,p);function c(){this.constructor=d}d.prototype=p===null?Object.create(p):(c.prototype=p.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(12);function u(h){var d=h.split("-"),p=d.slice(1).map(function(c){return c[0].toUpperCase()+c.slice(1)}).join("");return d[0]+p}var f=function(h){o(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.keys=function(p){return(p.getAttribute("style")||"").split(";").map(function(c){var v=c.split(":");return v[0].trim()})},d.prototype.add=function(p,c){return this.canAdd(p,c)?(p.style[u(this.keyName)]=c,!0):!1},d.prototype.remove=function(p){p.style[u(this.keyName)]="",p.getAttribute("style")||p.removeAttribute("style")},d.prototype.value=function(p){var c=p.style[u(this.keyName)];return this.canAdd(p,c)?c:""},d}(a.default);n.default=f},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function f(h,d){for(var p=0;p<d.length;p++){var c=d[p];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(h,c.key,c)}}return function(h,d,p){return d&&f(h.prototype,d),p&&f(h,p),h}}();function a(f,h){if(!(f instanceof h))throw new TypeError("Cannot call a class as a function")}var u=function(){function f(h,d){a(this,f),this.quill=h,this.options=d,this.modules={}}return o(f,[{key:"init",value:function(){var d=this;Object.keys(this.options.modules).forEach(function(p){d.modules[p]==null&&d.addModule(p)})}},{key:"addModule",value:function(d){var p=this.quill.constructor.import("modules/"+d);return this.modules[d]=new p(this.quill,this.options.modules[d]||{}),this.modules[d]}}]),f}();u.DEFAULTS={modules:{}},u.themes={default:u},n.default=u},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function m(w,T){for(var x=0;x<T.length;x++){var E=T[x];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(w,E.key,E)}}return function(w,T,x){return T&&m(w.prototype,T),x&&m(w,x),w}}(),a=function m(w,T,x){w===null&&(w=Function.prototype);var E=Object.getOwnPropertyDescriptor(w,T);if(E===void 0){var I=Object.getPrototypeOf(w);return I===null?void 0:m(I,T,x)}else{if("value"in E)return E.value;var A=E.get;return A===void 0?void 0:A.call(x)}},u=i(0),f=p(u),h=i(7),d=p(h);function p(m){return m&&m.__esModule?m:{default:m}}function c(m,w){if(!(m instanceof w))throw new TypeError("Cannot call a class as a function")}function v(m,w){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:m}function y(m,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);m.prototype=Object.create(w&&w.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(m,w):m.__proto__=w)}var b="\uFEFF",_=function(m){y(w,m);function w(T){c(this,w);var x=v(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,T));return x.contentNode=document.createElement("span"),x.contentNode.setAttribute("contenteditable",!1),[].slice.call(x.domNode.childNodes).forEach(function(E){x.contentNode.appendChild(E)}),x.leftGuard=document.createTextNode(b),x.rightGuard=document.createTextNode(b),x.domNode.appendChild(x.leftGuard),x.domNode.appendChild(x.contentNode),x.domNode.appendChild(x.rightGuard),x}return o(w,[{key:"index",value:function(x,E){return x===this.leftGuard?0:x===this.rightGuard?1:a(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"index",this).call(this,x,E)}},{key:"restore",value:function(x){var E=void 0,I=void 0,A=x.data.split(b).join("");if(x===this.leftGuard)if(this.prev instanceof d.default){var O=this.prev.length();this.prev.insertAt(O,A),E={startNode:this.prev.domNode,startOffset:O+A.length}}else I=document.createTextNode(A),this.parent.insertBefore(f.default.create(I),this),E={startNode:I,startOffset:A.length};else x===this.rightGuard&&(this.next instanceof d.default?(this.next.insertAt(0,A),E={startNode:this.next.domNode,startOffset:A.length}):(I=document.createTextNode(A),this.parent.insertBefore(f.default.create(I),this.next),E={startNode:I,startOffset:A.length}));return x.data=b,E}},{key:"update",value:function(x,E){var I=this;x.forEach(function(A){if(A.type==="characterData"&&(A.target===I.leftGuard||A.target===I.rightGuard)){var O=I.restore(A.target);O&&(E.range=O)}})}}]),w}(f.default.Embed);n.default=_},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.AlignStyle=n.AlignClass=n.AlignAttribute=void 0;var o=i(0),a=u(o);function u(c){return c&&c.__esModule?c:{default:c}}var f={scope:a.default.Scope.BLOCK,whitelist:["right","center","justify"]},h=new a.default.Attributor.Attribute("align","align",f),d=new a.default.Attributor.Class("align","ql-align",f),p=new a.default.Attributor.Style("align","text-align",f);n.AlignAttribute=h,n.AlignClass=d,n.AlignStyle=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.BackgroundStyle=n.BackgroundClass=void 0;var o=i(0),a=f(o),u=i(26);function f(p){return p&&p.__esModule?p:{default:p}}var h=new a.default.Attributor.Class("background","ql-bg",{scope:a.default.Scope.INLINE}),d=new u.ColorAttributor("background","background-color",{scope:a.default.Scope.INLINE});n.BackgroundClass=h,n.BackgroundStyle=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.DirectionStyle=n.DirectionClass=n.DirectionAttribute=void 0;var o=i(0),a=u(o);function u(c){return c&&c.__esModule?c:{default:c}}var f={scope:a.default.Scope.BLOCK,whitelist:["rtl"]},h=new a.default.Attributor.Attribute("direction","dir",f),d=new a.default.Attributor.Class("direction","ql-direction",f),p=new a.default.Attributor.Style("direction","direction",f);n.DirectionAttribute=h,n.DirectionClass=d,n.DirectionStyle=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.FontClass=n.FontStyle=void 0;var o=function(){function m(w,T){for(var x=0;x<T.length;x++){var E=T[x];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(w,E.key,E)}}return function(w,T,x){return T&&m(w.prototype,T),x&&m(w,x),w}}(),a=function m(w,T,x){w===null&&(w=Function.prototype);var E=Object.getOwnPropertyDescriptor(w,T);if(E===void 0){var I=Object.getPrototypeOf(w);return I===null?void 0:m(I,T,x)}else{if("value"in E)return E.value;var A=E.get;return A===void 0?void 0:A.call(x)}},u=i(0),f=h(u);function h(m){return m&&m.__esModule?m:{default:m}}function d(m,w){if(!(m instanceof w))throw new TypeError("Cannot call a class as a function")}function p(m,w){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:m}function c(m,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);m.prototype=Object.create(w&&w.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(m,w):m.__proto__=w)}var v={scope:f.default.Scope.INLINE,whitelist:["serif","monospace"]},y=new f.default.Attributor.Class("font","ql-font",v),b=function(m){c(w,m);function w(){return d(this,w),p(this,(w.__proto__||Object.getPrototypeOf(w)).apply(this,arguments))}return o(w,[{key:"value",value:function(x){return a(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"value",this).call(this,x).replace(/["']/g,"")}}]),w}(f.default.Attributor.Style),_=new b("font","font-family",v);n.FontStyle=_,n.FontClass=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.SizeStyle=n.SizeClass=void 0;var o=i(0),a=u(o);function u(d){return d&&d.__esModule?d:{default:d}}var f=new a.default.Attributor.Class("size","ql-size",{scope:a.default.Scope.INLINE,whitelist:["small","large","huge"]}),h=new a.default.Attributor.Style("size","font-size",{scope:a.default.Scope.INLINE,whitelist:["10px","18px","32px"]});n.SizeClass=f,n.SizeStyle=h},function(r,n,i){r.exports={align:{"":i(76),center:i(77),right:i(78),justify:i(79)},background:i(80),blockquote:i(81),bold:i(82),clean:i(83),code:i(58),"code-block":i(58),color:i(84),direction:{"":i(85),rtl:i(86)},float:{center:i(87),full:i(88),left:i(89),right:i(90)},formula:i(91),header:{1:i(92),2:i(93)},italic:i(94),image:i(95),indent:{"+1":i(96),"-1":i(97)},link:i(98),list:{ordered:i(99),bullet:i(100),check:i(101)},script:{sub:i(102),super:i(103)},strike:i(104),underline:i(105),video:i(106)}},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.getLastChangeIndex=n.default=void 0;var o=function(){function T(x,E){for(var I=0;I<E.length;I++){var A=E[I];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(x,A.key,A)}}return function(x,E,I){return E&&T(x.prototype,E),I&&T(x,I),x}}(),a=i(0),u=c(a),f=i(5),h=c(f),d=i(9),p=c(d);function c(T){return T&&T.__esModule?T:{default:T}}function v(T,x){if(!(T instanceof x))throw new TypeError("Cannot call a class as a function")}function y(T,x){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:T}function b(T,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);T.prototype=Object.create(x&&x.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(T,x):T.__proto__=x)}var _=function(T){b(x,T);function x(E,I){v(this,x);var A=y(this,(x.__proto__||Object.getPrototypeOf(x)).call(this,E,I));return A.lastRecorded=0,A.ignoreChange=!1,A.clear(),A.quill.on(h.default.events.EDITOR_CHANGE,function(O,L,R,C){O!==h.default.events.TEXT_CHANGE||A.ignoreChange||(!A.options.userOnly||C===h.default.sources.USER?A.record(L,R):A.transform(L))}),A.quill.keyboard.addBinding({key:"Z",shortKey:!0},A.undo.bind(A)),A.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},A.redo.bind(A)),/Win/i.test(navigator.platform)&&A.quill.keyboard.addBinding({key:"Y",shortKey:!0},A.redo.bind(A)),A}return o(x,[{key:"change",value:function(I,A){if(this.stack[I].length!==0){var O=this.stack[I].pop();this.stack[A].push(O),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(O[I],h.default.sources.USER),this.ignoreChange=!1;var L=w(O[I]);this.quill.setSelection(L)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(I,A){if(I.ops.length!==0){this.stack.redo=[];var O=this.quill.getContents().diff(A),L=Date.now();if(this.lastRecorded+this.options.delay>L&&this.stack.undo.length>0){var R=this.stack.undo.pop();O=O.compose(R.undo),I=R.redo.compose(I)}else this.lastRecorded=L;this.stack.undo.push({redo:I,undo:O}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(I){this.stack.undo.forEach(function(A){A.undo=I.transform(A.undo,!0),A.redo=I.transform(A.redo,!0)}),this.stack.redo.forEach(function(A){A.undo=I.transform(A.undo,!0),A.redo=I.transform(A.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),x}(p.default);_.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function m(T){var x=T.ops[T.ops.length-1];return x==null?!1:x.insert!=null?typeof x.insert=="string"&&x.insert.endsWith(`
1991
+ `):x.attributes!=null?Object.keys(x.attributes).some(function(E){return u.default.query(E,u.default.Scope.BLOCK)!=null}):!1}function w(T){var x=T.reduce(function(I,A){return I+=A.delete||0,I},0),E=T.length()-x;return m(T)&&(E-=1),E}n.default=_,n.getLastChangeIndex=w},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BaseTooltip=void 0;var o=function(){function j(G,X){for(var Y=0;Y<X.length;Y++){var $=X[Y];$.enumerable=$.enumerable||!1,$.configurable=!0,"value"in $&&($.writable=!0),Object.defineProperty(G,$.key,$)}}return function(G,X,Y){return X&&j(G.prototype,X),Y&&j(G,Y),G}}(),a=function j(G,X,Y){G===null&&(G=Function.prototype);var $=Object.getOwnPropertyDescriptor(G,X);if($===void 0){var W=Object.getPrototypeOf(G);return W===null?void 0:j(W,X,Y)}else{if("value"in $)return $.value;var et=$.get;return et===void 0?void 0:et.call(Y)}},u=i(3),f=L(u),h=i(2),d=L(h),p=i(8),c=L(p),v=i(23),y=L(v),b=i(34),_=L(b),m=i(59),w=L(m),T=i(60),x=L(T),E=i(28),I=L(E),A=i(61),O=L(A);function L(j){return j&&j.__esModule?j:{default:j}}function R(j,G){if(!(j instanceof G))throw new TypeError("Cannot call a class as a function")}function C(j,G){if(!j)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return G&&(typeof G=="object"||typeof G=="function")?G:j}function P(j,G){if(typeof G!="function"&&G!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof G);j.prototype=Object.create(G&&G.prototype,{constructor:{value:j,enumerable:!1,writable:!0,configurable:!0}}),G&&(Object.setPrototypeOf?Object.setPrototypeOf(j,G):j.__proto__=G)}var M=[!1,"center","right","justify"],F=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],q=[!1,"serif","monospace"],Z=["1","2","3",!1],z=["small",!1,"large","huge"],nt=function(j){P(G,j);function G(X,Y){R(this,G);var $=C(this,(G.__proto__||Object.getPrototypeOf(G)).call(this,X,Y)),W=function et(J){if(!document.body.contains(X.root))return document.body.removeEventListener("click",et);$.tooltip!=null&&!$.tooltip.root.contains(J.target)&&document.activeElement!==$.tooltip.textbox&&!$.quill.hasFocus()&&$.tooltip.hide(),$.pickers!=null&&$.pickers.forEach(function(it){it.container.contains(J.target)||it.close()})};return X.emitter.listenDOM("click",document.body,W),$}return o(G,[{key:"addModule",value:function(Y){var $=a(G.prototype.__proto__||Object.getPrototypeOf(G.prototype),"addModule",this).call(this,Y);return Y==="toolbar"&&this.extendToolbar($),$}},{key:"buildButtons",value:function(Y,$){Y.forEach(function(W){var et=W.getAttribute("class")||"";et.split(/\s+/).forEach(function(J){if(J.startsWith("ql-")&&(J=J.slice(3),$[J]!=null))if(J==="direction")W.innerHTML=$[J][""]+$[J].rtl;else if(typeof $[J]=="string")W.innerHTML=$[J];else{var it=W.value||"";it!=null&&$[J][it]&&(W.innerHTML=$[J][it])}})})}},{key:"buildPickers",value:function(Y,$){var W=this;this.pickers=Y.map(function(J){if(J.classList.contains("ql-align"))return J.querySelector("option")==null&&k(J,M),new x.default(J,$.align);if(J.classList.contains("ql-background")||J.classList.contains("ql-color")){var it=J.classList.contains("ql-background")?"background":"color";return J.querySelector("option")==null&&k(J,F,it==="background"?"#ffffff":"#000000"),new w.default(J,$[it])}else return J.querySelector("option")==null&&(J.classList.contains("ql-font")?k(J,q):J.classList.contains("ql-header")?k(J,Z):J.classList.contains("ql-size")&&k(J,z)),new I.default(J)});var et=function(){W.pickers.forEach(function(it){it.update()})};this.quill.on(c.default.events.EDITOR_CHANGE,et)}}]),G}(_.default);nt.DEFAULTS=(0,f.default)(!0,{},_.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var G=this,X=this.container.querySelector("input.ql-image[type=file]");X==null&&(X=document.createElement("input"),X.setAttribute("type","file"),X.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),X.classList.add("ql-image"),X.addEventListener("change",function(){if(X.files!=null&&X.files[0]!=null){var Y=new FileReader;Y.onload=function($){var W=G.quill.getSelection(!0);G.quill.updateContents(new d.default().retain(W.index).delete(W.length).insert({image:$.target.result}),c.default.sources.USER),G.quill.setSelection(W.index+1,c.default.sources.SILENT),X.value=""},Y.readAsDataURL(X.files[0])}}),this.container.appendChild(X)),X.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var V=function(j){P(G,j);function G(X,Y){R(this,G);var $=C(this,(G.__proto__||Object.getPrototypeOf(G)).call(this,X,Y));return $.textbox=$.root.querySelector('input[type="text"]'),$.listen(),$}return o(G,[{key:"listen",value:function(){var Y=this;this.textbox.addEventListener("keydown",function($){y.default.match($,"enter")?(Y.save(),$.preventDefault()):y.default.match($,"escape")&&(Y.cancel(),$.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",$=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),$!=null?this.textbox.value=$:Y!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+Y)||""),this.root.setAttribute("data-mode",Y)}},{key:"restoreFocus",value:function(){var Y=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=Y}},{key:"save",value:function(){var Y=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var $=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",Y,c.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",Y,c.default.sources.USER)),this.quill.root.scrollTop=$;break}case"video":Y=U(Y);case"formula":{if(!Y)break;var W=this.quill.getSelection(!0);if(W!=null){var et=W.index+W.length;this.quill.insertEmbed(et,this.root.getAttribute("data-mode"),Y,c.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(et+1," ",c.default.sources.USER),this.quill.setSelection(et+2,c.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),G}(O.default);function U(j){var G=j.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||j.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return G?(G[1]||"https")+"://www.youtube.com/embed/"+G[2]+"?showinfo=0":(G=j.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(G[1]||"https")+"://player.vimeo.com/video/"+G[2]+"/":j}function k(j,G){var X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;G.forEach(function(Y){var $=document.createElement("option");Y===X?$.setAttribute("selected","selected"):$.setAttribute("value",Y),j.appendChild($)})}n.BaseTooltip=V,n.default=nt},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function a(){this.head=this.tail=null,this.length=0}return a.prototype.append=function(){for(var u=[],f=0;f<arguments.length;f++)u[f]=arguments[f];this.insertBefore(u[0],null),u.length>1&&this.append.apply(this,u.slice(1))},a.prototype.contains=function(u){for(var f,h=this.iterator();f=h();)if(f===u)return!0;return!1},a.prototype.insertBefore=function(u,f){u&&(u.next=f,f!=null?(u.prev=f.prev,f.prev!=null&&(f.prev.next=u),f.prev=u,f===this.head&&(this.head=u)):this.tail!=null?(this.tail.next=u,u.prev=this.tail,this.tail=u):(u.prev=null,this.head=this.tail=u),this.length+=1)},a.prototype.offset=function(u){for(var f=0,h=this.head;h!=null;){if(h===u)return f;f+=h.length(),h=h.next}return-1},a.prototype.remove=function(u){this.contains(u)&&(u.prev!=null&&(u.prev.next=u.next),u.next!=null&&(u.next.prev=u.prev),u===this.head&&(this.head=u.next),u===this.tail&&(this.tail=u.prev),this.length-=1)},a.prototype.iterator=function(u){return u===void 0&&(u=this.head),function(){var f=u;return u!=null&&(u=u.next),f}},a.prototype.find=function(u,f){f===void 0&&(f=!1);for(var h,d=this.iterator();h=d();){var p=h.length();if(u<p||f&&u===p&&(h.next==null||h.next.length()!==0))return[h,u];u-=p}return[null,0]},a.prototype.forEach=function(u){for(var f,h=this.iterator();f=h();)u(f)},a.prototype.forEachAt=function(u,f,h){if(!(f<=0))for(var d=this.find(u),p=d[0],c=d[1],v,y=u-c,b=this.iterator(p);(v=b())&&y<u+f;){var _=v.length();u>y?h(v,u-y,Math.min(f,y+_-u)):h(v,0,Math.min(_,u+f-y)),y+=_}},a.prototype.map=function(u){return this.reduce(function(f,h){return f.push(u(h)),f},[])},a.prototype.reduce=function(u,f){for(var h,d=this.iterator();h=d();)f=u(f,h);return f},a}();n.default=o},function(r,n,i){var o=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,v){c.__proto__=v}||function(c,v){for(var y in v)v.hasOwnProperty(y)&&(c[y]=v[y])};return function(c,v){p(c,v);function y(){this.constructor=c}c.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(17),u=i(1),f={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},h=100,d=function(p){o(c,p);function c(v){var y=p.call(this,v)||this;return y.scroll=y,y.observer=new MutationObserver(function(b){y.update(b)}),y.observer.observe(y.domNode,f),y.attach(),y}return c.prototype.detach=function(){p.prototype.detach.call(this),this.observer.disconnect()},c.prototype.deleteAt=function(v,y){this.update(),v===0&&y===this.length()?this.children.forEach(function(b){b.remove()}):p.prototype.deleteAt.call(this,v,y)},c.prototype.formatAt=function(v,y,b,_){this.update(),p.prototype.formatAt.call(this,v,y,b,_)},c.prototype.insertAt=function(v,y,b){this.update(),p.prototype.insertAt.call(this,v,y,b)},c.prototype.optimize=function(v,y){var b=this;v===void 0&&(v=[]),y===void 0&&(y={}),p.prototype.optimize.call(this,y);for(var _=[].slice.call(this.observer.takeRecords());_.length>0;)v.push(_.pop());for(var m=function(E,I){I===void 0&&(I=!0),!(E==null||E===b)&&E.domNode.parentNode!=null&&(E.domNode[u.DATA_KEY].mutations==null&&(E.domNode[u.DATA_KEY].mutations=[]),I&&m(E.parent))},w=function(E){E.domNode[u.DATA_KEY]==null||E.domNode[u.DATA_KEY].mutations==null||(E instanceof a.default&&E.children.forEach(w),E.optimize(y))},T=v,x=0;T.length>0;x+=1){if(x>=h)throw new Error("[Parchment] Maximum optimize iterations reached");for(T.forEach(function(E){var I=u.find(E.target,!0);I!=null&&(I.domNode===E.target&&(E.type==="childList"?(m(u.find(E.previousSibling,!1)),[].forEach.call(E.addedNodes,function(A){var O=u.find(A,!1);m(O,!1),O instanceof a.default&&O.children.forEach(function(L){m(L,!1)})})):E.type==="attributes"&&m(I.prev)),m(I))}),this.children.forEach(w),T=[].slice.call(this.observer.takeRecords()),_=T.slice();_.length>0;)v.push(_.pop())}},c.prototype.update=function(v,y){var b=this;y===void 0&&(y={}),v=v||this.observer.takeRecords(),v.map(function(_){var m=u.find(_.target,!0);return m==null?null:m.domNode[u.DATA_KEY].mutations==null?(m.domNode[u.DATA_KEY].mutations=[_],m):(m.domNode[u.DATA_KEY].mutations.push(_),null)}).forEach(function(_){_==null||_===b||_.domNode[u.DATA_KEY]==null||_.update(_.domNode[u.DATA_KEY].mutations||[],y)}),this.domNode[u.DATA_KEY].mutations!=null&&p.prototype.update.call(this,this.domNode[u.DATA_KEY].mutations,y),this.optimize(v,y)},c.blotName="scroll",c.defaultChild="block",c.scope=u.Scope.BLOCK_BLOT,c.tagName="DIV",c}(a.default);n.default=d},function(r,n,i){var o=this&&this.__extends||function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,c){p.__proto__=c}||function(p,c){for(var v in c)c.hasOwnProperty(v)&&(p[v]=c[v])};return function(p,c){d(p,c);function v(){this.constructor=p}p.prototype=c===null?Object.create(c):(v.prototype=c.prototype,new v)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(18),u=i(1);function f(d,p){if(Object.keys(d).length!==Object.keys(p).length)return!1;for(var c in d)if(d[c]!==p[c])return!1;return!0}var h=function(d){o(p,d);function p(){return d!==null&&d.apply(this,arguments)||this}return p.formats=function(c){if(c.tagName!==p.tagName)return d.formats.call(this,c)},p.prototype.format=function(c,v){var y=this;c===this.statics.blotName&&!v?(this.children.forEach(function(b){b instanceof a.default||(b=b.wrap(p.blotName,!0)),y.attributes.copy(b)}),this.unwrap()):d.prototype.format.call(this,c,v)},p.prototype.formatAt=function(c,v,y,b){if(this.formats()[y]!=null||u.query(y,u.Scope.ATTRIBUTE)){var _=this.isolate(c,v);_.format(y,b)}else d.prototype.formatAt.call(this,c,v,y,b)},p.prototype.optimize=function(c){d.prototype.optimize.call(this,c);var v=this.formats();if(Object.keys(v).length===0)return this.unwrap();var y=this.next;y instanceof p&&y.prev===this&&f(v,y.formats())&&(y.moveChildren(this),y.remove())},p.blotName="inline",p.scope=u.Scope.INLINE_BLOT,p.tagName="SPAN",p}(a.default);n.default=h},function(r,n,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var c in p)p.hasOwnProperty(c)&&(d[c]=p[c])};return function(d,p){h(d,p);function c(){this.constructor=d}d.prototype=p===null?Object.create(p):(c.prototype=p.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(18),u=i(1),f=function(h){o(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.formats=function(p){var c=u.query(d.blotName).tagName;if(p.tagName!==c)return h.formats.call(this,p)},d.prototype.format=function(p,c){u.query(p,u.Scope.BLOCK)!=null&&(p===this.statics.blotName&&!c?this.replaceWith(d.blotName):h.prototype.format.call(this,p,c))},d.prototype.formatAt=function(p,c,v,y){u.query(v,u.Scope.BLOCK)!=null?this.format(v,y):h.prototype.formatAt.call(this,p,c,v,y)},d.prototype.insertAt=function(p,c,v){if(v==null||u.query(c,u.Scope.INLINE)!=null)h.prototype.insertAt.call(this,p,c,v);else{var y=this.split(p),b=u.create(c,v);y.parent.insertBefore(b,y)}},d.prototype.update=function(p,c){navigator.userAgent.match(/Trident/)?this.build():h.prototype.update.call(this,p,c)},d.blotName="block",d.scope=u.Scope.BLOCK_BLOT,d.tagName="P",d}(a.default);n.default=f},function(r,n,i){var o=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,d){h.__proto__=d}||function(h,d){for(var p in d)d.hasOwnProperty(p)&&(h[p]=d[p])};return function(h,d){f(h,d);function p(){this.constructor=h}h.prototype=d===null?Object.create(d):(p.prototype=d.prototype,new p)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(19),u=function(f){o(h,f);function h(){return f!==null&&f.apply(this,arguments)||this}return h.formats=function(d){},h.prototype.format=function(d,p){f.prototype.formatAt.call(this,0,this.length(),d,p)},h.prototype.formatAt=function(d,p,c,v){d===0&&p===this.length()?this.format(c,v):f.prototype.formatAt.call(this,d,p,c,v)},h.prototype.formats=function(){return this.statics.formats(this.domNode)},h}(a.default);n.default=u},function(r,n,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var c in p)p.hasOwnProperty(c)&&(d[c]=p[c])};return function(d,p){h(d,p);function c(){this.constructor=d}d.prototype=p===null?Object.create(p):(c.prototype=p.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(19),u=i(1),f=function(h){o(d,h);function d(p){var c=h.call(this,p)||this;return c.text=c.statics.value(c.domNode),c}return d.create=function(p){return document.createTextNode(p)},d.value=function(p){var c=p.data;return c.normalize&&(c=c.normalize()),c},d.prototype.deleteAt=function(p,c){this.domNode.data=this.text=this.text.slice(0,p)+this.text.slice(p+c)},d.prototype.index=function(p,c){return this.domNode===p?c:-1},d.prototype.insertAt=function(p,c,v){v==null?(this.text=this.text.slice(0,p)+c+this.text.slice(p),this.domNode.data=this.text):h.prototype.insertAt.call(this,p,c,v)},d.prototype.length=function(){return this.text.length},d.prototype.optimize=function(p){h.prototype.optimize.call(this,p),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof d&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},d.prototype.position=function(p,c){return[this.domNode,p]},d.prototype.split=function(p,c){if(c===void 0&&(c=!1),!c){if(p===0)return this;if(p===this.length())return this.next}var v=u.create(this.domNode.splitText(p));return this.parent.insertBefore(v,this.next),this.text=this.statics.value(this.domNode),v},d.prototype.update=function(p,c){var v=this;p.some(function(y){return y.type==="characterData"&&y.target===v.domNode})&&(this.text=this.statics.value(this.domNode))},d.prototype.value=function(){return this.text},d.blotName="text",d.scope=u.Scope.INLINE_BLOT,d}(a.default);n.default=f},function(r,n,i){var o=document.createElement("div");if(o.classList.toggle("test-class",!1),o.classList.contains("test-class")){var a=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(u,f){return arguments.length>1&&!this.contains(u)==!f?f:a.call(this,u)}}String.prototype.startsWith||(String.prototype.startsWith=function(u,f){return f=f||0,this.substr(f,u.length)===u}),String.prototype.endsWith||(String.prototype.endsWith=function(u,f){var h=this.toString();(typeof f!="number"||!isFinite(f)||Math.floor(f)!==f||f>h.length)&&(f=h.length),f-=u.length;var d=h.indexOf(u,f);return d!==-1&&d===f}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(f){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof f!="function")throw new TypeError("predicate must be a function");for(var h=Object(this),d=h.length>>>0,p=arguments[1],c,v=0;v<d;v++)if(c=h[v],f.call(p,c,v,h))return c}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(r,n){var i=-1,o=1,a=0;function u(x,E,I){if(x==E)return x?[[a,x]]:[];(I<0||x.length<I)&&(I=null);var A=p(x,E),O=x.substring(0,A);x=x.substring(A),E=E.substring(A),A=c(x,E);var L=x.substring(x.length-A);x=x.substring(0,x.length-A),E=E.substring(0,E.length-A);var R=f(x,E);return O&&R.unshift([a,O]),L&&R.push([a,L]),y(R),I!=null&&(R=m(R,I)),R=w(R),R}function f(x,E){var I;if(!x)return[[o,E]];if(!E)return[[i,x]];var A=x.length>E.length?x:E,O=x.length>E.length?E:x,L=A.indexOf(O);if(L!=-1)return I=[[o,A.substring(0,L)],[a,O],[o,A.substring(L+O.length)]],x.length>E.length&&(I[0][0]=I[2][0]=i),I;if(O.length==1)return[[i,x],[o,E]];var R=v(x,E);if(R){var C=R[0],P=R[1],M=R[2],F=R[3],q=R[4],Z=u(C,M),z=u(P,F);return Z.concat([[a,q]],z)}return h(x,E)}function h(x,E){for(var I=x.length,A=E.length,O=Math.ceil((I+A)/2),L=O,R=2*O,C=new Array(R),P=new Array(R),M=0;M<R;M++)C[M]=-1,P[M]=-1;C[L+1]=0,P[L+1]=0;for(var F=I-A,q=F%2!=0,Z=0,z=0,nt=0,V=0,U=0;U<O;U++){for(var k=-U+Z;k<=U-z;k+=2){var j=L+k,G;k==-U||k!=U&&C[j-1]<C[j+1]?G=C[j+1]:G=C[j-1]+1;for(var X=G-k;G<I&&X<A&&x.charAt(G)==E.charAt(X);)G++,X++;if(C[j]=G,G>I)z+=2;else if(X>A)Z+=2;else if(q){var Y=L+F-k;if(Y>=0&&Y<R&&P[Y]!=-1){var $=I-P[Y];if(G>=$)return d(x,E,G,X)}}}for(var W=-U+nt;W<=U-V;W+=2){var Y=L+W,$;W==-U||W!=U&&P[Y-1]<P[Y+1]?$=P[Y+1]:$=P[Y-1]+1;for(var et=$-W;$<I&&et<A&&x.charAt(I-$-1)==E.charAt(A-et-1);)$++,et++;if(P[Y]=$,$>I)V+=2;else if(et>A)nt+=2;else if(!q){var j=L+F-W;if(j>=0&&j<R&&C[j]!=-1){var G=C[j],X=L+G-j;if($=I-$,G>=$)return d(x,E,G,X)}}}}return[[i,x],[o,E]]}function d(x,E,I,A){var O=x.substring(0,I),L=E.substring(0,A),R=x.substring(I),C=E.substring(A),P=u(O,L),M=u(R,C);return P.concat(M)}function p(x,E){if(!x||!E||x.charAt(0)!=E.charAt(0))return 0;for(var I=0,A=Math.min(x.length,E.length),O=A,L=0;I<O;)x.substring(L,O)==E.substring(L,O)?(I=O,L=I):A=O,O=Math.floor((A-I)/2+I);return O}function c(x,E){if(!x||!E||x.charAt(x.length-1)!=E.charAt(E.length-1))return 0;for(var I=0,A=Math.min(x.length,E.length),O=A,L=0;I<O;)x.substring(x.length-O,x.length-L)==E.substring(E.length-O,E.length-L)?(I=O,L=I):A=O,O=Math.floor((A-I)/2+I);return O}function v(x,E){var I=x.length>E.length?x:E,A=x.length>E.length?E:x;if(I.length<4||A.length*2<I.length)return null;function O(z,nt,V){for(var U=z.substring(V,V+Math.floor(z.length/4)),k=-1,j="",G,X,Y,$;(k=nt.indexOf(U,k+1))!=-1;){var W=p(z.substring(V),nt.substring(k)),et=c(z.substring(0,V),nt.substring(0,k));j.length<et+W&&(j=nt.substring(k-et,k)+nt.substring(k,k+W),G=z.substring(0,V-et),X=z.substring(V+W),Y=nt.substring(0,k-et),$=nt.substring(k+W))}return j.length*2>=z.length?[G,X,Y,$,j]:null}var L=O(I,A,Math.ceil(I.length/4)),R=O(I,A,Math.ceil(I.length/2)),C;if(!L&&!R)return null;R?L?C=L[4].length>R[4].length?L:R:C=R:C=L;var P,M,F,q;x.length>E.length?(P=C[0],M=C[1],F=C[2],q=C[3]):(F=C[0],q=C[1],P=C[2],M=C[3]);var Z=C[4];return[P,M,F,q,Z]}function y(x){x.push([a,""]);for(var E=0,I=0,A=0,O="",L="",R;E<x.length;)switch(x[E][0]){case o:A++,L+=x[E][1],E++;break;case i:I++,O+=x[E][1],E++;break;case a:I+A>1?(I!==0&&A!==0&&(R=p(L,O),R!==0&&(E-I-A>0&&x[E-I-A-1][0]==a?x[E-I-A-1][1]+=L.substring(0,R):(x.splice(0,0,[a,L.substring(0,R)]),E++),L=L.substring(R),O=O.substring(R)),R=c(L,O),R!==0&&(x[E][1]=L.substring(L.length-R)+x[E][1],L=L.substring(0,L.length-R),O=O.substring(0,O.length-R))),I===0?x.splice(E-A,I+A,[o,L]):A===0?x.splice(E-I,I+A,[i,O]):x.splice(E-I-A,I+A,[i,O],[o,L]),E=E-I-A+(I?1:0)+(A?1:0)+1):E!==0&&x[E-1][0]==a?(x[E-1][1]+=x[E][1],x.splice(E,1)):E++,A=0,I=0,O="",L="";break}x[x.length-1][1]===""&&x.pop();var C=!1;for(E=1;E<x.length-1;)x[E-1][0]==a&&x[E+1][0]==a&&(x[E][1].substring(x[E][1].length-x[E-1][1].length)==x[E-1][1]?(x[E][1]=x[E-1][1]+x[E][1].substring(0,x[E][1].length-x[E-1][1].length),x[E+1][1]=x[E-1][1]+x[E+1][1],x.splice(E-1,1),C=!0):x[E][1].substring(0,x[E+1][1].length)==x[E+1][1]&&(x[E-1][1]+=x[E+1][1],x[E][1]=x[E][1].substring(x[E+1][1].length)+x[E+1][1],x.splice(E+1,1),C=!0)),E++;C&&y(x)}var b=u;b.INSERT=o,b.DELETE=i,b.EQUAL=a,r.exports=b;function _(x,E){if(E===0)return[a,x];for(var I=0,A=0;A<x.length;A++){var O=x[A];if(O[0]===i||O[0]===a){var L=I+O[1].length;if(E===L)return[A+1,x];if(E<L){x=x.slice();var R=E-I,C=[O[0],O[1].slice(0,R)],P=[O[0],O[1].slice(R)];return x.splice(A,1,C,P),[A+1,x]}else I=L}}throw new Error("cursor_pos is out of bounds!")}function m(x,E){var I=_(x,E),A=I[1],O=I[0],L=A[O],R=A[O+1];if(L==null)return x;if(L[0]!==a)return x;if(R!=null&&L[1]+R[1]===R[1]+L[1])return A.splice(O,2,R,L),T(A,O,2);if(R!=null&&R[1].indexOf(L[1])===0){A.splice(O,2,[R[0],L[1]],[0,L[1]]);var C=R[1].slice(L[1].length);return C.length>0&&A.splice(O+2,0,[R[0],C]),T(A,O,3)}else return x}function w(x){for(var E=!1,I=function(R){return R.charCodeAt(0)>=56320&&R.charCodeAt(0)<=57343},A=function(R){return R.charCodeAt(R.length-1)>=55296&&R.charCodeAt(R.length-1)<=56319},O=2;O<x.length;O+=1)x[O-2][0]===a&&A(x[O-2][1])&&x[O-1][0]===i&&I(x[O-1][1])&&x[O][0]===o&&I(x[O][1])&&(E=!0,x[O-1][1]=x[O-2][1].slice(-1)+x[O-1][1],x[O][1]=x[O-2][1].slice(-1)+x[O][1],x[O-2][1]=x[O-2][1].slice(0,-1));if(!E)return x;for(var L=[],O=0;O<x.length;O+=1)x[O][1].length>0&&L.push(x[O]);return L}function T(x,E,I){for(var A=E+I-1;A>=0&&A>=E-1;A--)if(A+1<x.length){var O=x[A],L=x[A+1];O[0]===L[1]&&x.splice(A,2,[O[0],O[1]+L[1]])}return x}},function(r,n){n=r.exports=typeof Object.keys=="function"?Object.keys:i,n.shim=i;function i(o){var a=[];for(var u in o)a.push(u);return a}},function(r,n){var i=function(){return Object.prototype.toString.call(arguments)}()=="[object Arguments]";n=r.exports=i?o:a,n.supported=o;function o(u){return Object.prototype.toString.call(u)=="[object Arguments]"}n.unsupported=a;function a(u){return u&&typeof u=="object"&&typeof u.length=="number"&&Object.prototype.hasOwnProperty.call(u,"callee")&&!Object.prototype.propertyIsEnumerable.call(u,"callee")||!1}},function(r,n){var i=Object.prototype.hasOwnProperty,o="~";function a(){}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(o=!1));function u(h,d,p){this.fn=h,this.context=d,this.once=p||!1}function f(){this._events=new a,this._eventsCount=0}f.prototype.eventNames=function(){var d=[],p,c;if(this._eventsCount===0)return d;for(c in p=this._events)i.call(p,c)&&d.push(o?c.slice(1):c);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(p)):d},f.prototype.listeners=function(d,p){var c=o?o+d:d,v=this._events[c];if(p)return!!v;if(!v)return[];if(v.fn)return[v.fn];for(var y=0,b=v.length,_=new Array(b);y<b;y++)_[y]=v[y].fn;return _},f.prototype.emit=function(d,p,c,v,y,b){var _=o?o+d:d;if(!this._events[_])return!1;var m=this._events[_],w=arguments.length,T,x;if(m.fn){switch(m.once&&this.removeListener(d,m.fn,void 0,!0),w){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,p),!0;case 3:return m.fn.call(m.context,p,c),!0;case 4:return m.fn.call(m.context,p,c,v),!0;case 5:return m.fn.call(m.context,p,c,v,y),!0;case 6:return m.fn.call(m.context,p,c,v,y,b),!0}for(x=1,T=new Array(w-1);x<w;x++)T[x-1]=arguments[x];m.fn.apply(m.context,T)}else{var E=m.length,I;for(x=0;x<E;x++)switch(m[x].once&&this.removeListener(d,m[x].fn,void 0,!0),w){case 1:m[x].fn.call(m[x].context);break;case 2:m[x].fn.call(m[x].context,p);break;case 3:m[x].fn.call(m[x].context,p,c);break;case 4:m[x].fn.call(m[x].context,p,c,v);break;default:if(!T)for(I=1,T=new Array(w-1);I<w;I++)T[I-1]=arguments[I];m[x].fn.apply(m[x].context,T)}}return!0},f.prototype.on=function(d,p,c){var v=new u(p,c||this),y=o?o+d:d;return this._events[y]?this._events[y].fn?this._events[y]=[this._events[y],v]:this._events[y].push(v):(this._events[y]=v,this._eventsCount++),this},f.prototype.once=function(d,p,c){var v=new u(p,c||this,!0),y=o?o+d:d;return this._events[y]?this._events[y].fn?this._events[y]=[this._events[y],v]:this._events[y].push(v):(this._events[y]=v,this._eventsCount++),this},f.prototype.removeListener=function(d,p,c,v){var y=o?o+d:d;if(!this._events[y])return this;if(!p)return--this._eventsCount===0?this._events=new a:delete this._events[y],this;var b=this._events[y];if(b.fn)b.fn===p&&(!v||b.once)&&(!c||b.context===c)&&(--this._eventsCount===0?this._events=new a:delete this._events[y]);else{for(var _=0,m=[],w=b.length;_<w;_++)(b[_].fn!==p||v&&!b[_].once||c&&b[_].context!==c)&&m.push(b[_]);m.length?this._events[y]=m.length===1?m[0]:m:--this._eventsCount===0?this._events=new a:delete this._events[y]}return this},f.prototype.removeAllListeners=function(d){var p;return d?(p=o?o+d:d,this._events[p]&&(--this._eventsCount===0?this._events=new a:delete this._events[p])):(this._events=new a,this._eventsCount=0),this},f.prototype.off=f.prototype.removeListener,f.prototype.addListener=f.prototype.on,f.prototype.setMaxListeners=function(){return this},f.prefixed=o,f.EventEmitter=f,typeof r<"u"&&(r.exports=f)},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.matchText=n.matchSpacing=n.matchNewline=n.matchBlot=n.matchAttributor=n.default=void 0;var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(rt){return typeof rt}:function(rt){return rt&&typeof Symbol=="function"&&rt.constructor===Symbol&&rt!==Symbol.prototype?"symbol":typeof rt},a=function(){function rt(at,dt){var vt=[],ct=!0,Pt=!1,Lt=void 0;try{for(var Nt=at[Symbol.iterator](),He;!(ct=(He=Nt.next()).done)&&(vt.push(He.value),!(dt&&vt.length===dt));ct=!0);}catch(Ge){Pt=!0,Lt=Ge}finally{try{!ct&&Nt.return&&Nt.return()}finally{if(Pt)throw Lt}}return vt}return function(at,dt){if(Array.isArray(at))return at;if(Symbol.iterator in Object(at))return rt(at,dt);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function rt(at,dt){for(var vt=0;vt<dt.length;vt++){var ct=dt[vt];ct.enumerable=ct.enumerable||!1,ct.configurable=!0,"value"in ct&&(ct.writable=!0),Object.defineProperty(at,ct.key,ct)}}return function(at,dt,vt){return dt&&rt(at.prototype,dt),vt&&rt(at,vt),at}}(),f=i(3),h=P(f),d=i(2),p=P(d),c=i(0),v=P(c),y=i(5),b=P(y),_=i(10),m=P(_),w=i(9),T=P(w),x=i(36),E=i(37),I=i(13),A=P(I),O=i(26),L=i(38),R=i(39),C=i(40);function P(rt){return rt&&rt.__esModule?rt:{default:rt}}function M(rt,at,dt){return at in rt?Object.defineProperty(rt,at,{value:dt,enumerable:!0,configurable:!0,writable:!0}):rt[at]=dt,rt}function F(rt,at){if(!(rt instanceof at))throw new TypeError("Cannot call a class as a function")}function q(rt,at){if(!rt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return at&&(typeof at=="object"||typeof at=="function")?at:rt}function Z(rt,at){if(typeof at!="function"&&at!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof at);rt.prototype=Object.create(at&&at.prototype,{constructor:{value:rt,enumerable:!1,writable:!0,configurable:!0}}),at&&(Object.setPrototypeOf?Object.setPrototypeOf(rt,at):rt.__proto__=at)}var z=(0,m.default)("quill:clipboard"),nt="__ql-matcher",V=[[Node.TEXT_NODE,Ht],[Node.TEXT_NODE,xt],["br",lt],[Node.ELEMENT_NODE,xt],[Node.ELEMENT_NODE,it],[Node.ELEMENT_NODE,At],[Node.ELEMENT_NODE,J],[Node.ELEMENT_NODE,oe],["li",yt],["b",et.bind(et,"bold")],["i",et.bind(et,"italic")],["style",pt]],U=[x.AlignAttribute,L.DirectionAttribute].reduce(function(rt,at){return rt[at.keyName]=at,rt},{}),k=[x.AlignStyle,E.BackgroundStyle,O.ColorStyle,L.DirectionStyle,R.FontStyle,C.SizeStyle].reduce(function(rt,at){return rt[at.keyName]=at,rt},{}),j=function(rt){Z(at,rt);function at(dt,vt){F(this,at);var ct=q(this,(at.__proto__||Object.getPrototypeOf(at)).call(this,dt,vt));return ct.quill.root.addEventListener("paste",ct.onPaste.bind(ct)),ct.container=ct.quill.addContainer("ql-clipboard"),ct.container.setAttribute("contenteditable",!0),ct.container.setAttribute("tabindex",-1),ct.matchers=[],V.concat(ct.options.matchers).forEach(function(Pt){var Lt=a(Pt,2),Nt=Lt[0],He=Lt[1];!vt.matchVisual&&He===At||ct.addMatcher(Nt,He)}),ct}return u(at,[{key:"addMatcher",value:function(vt,ct){this.matchers.push([vt,ct])}},{key:"convert",value:function(vt){if(typeof vt=="string")return this.container.innerHTML=vt.replace(/\>\r?\n +\</g,"><"),this.convert();var ct=this.quill.getFormat(this.quill.selection.savedRange.index);if(ct[A.default.blotName]){var Pt=this.container.innerText;return this.container.innerHTML="",new p.default().insert(Pt,M({},A.default.blotName,ct[A.default.blotName]))}var Lt=this.prepareMatching(),Nt=a(Lt,2),He=Nt[0],Ge=Nt[1],Qt=W(this.container,He,Ge);return Y(Qt,`
1992
1992
  `)&&Qt.ops[Qt.ops.length-1].attributes==null&&(Qt=Qt.compose(new p.default().retain(Qt.length()-1).delete(1))),z.log("convert",this.container.innerHTML,Qt),this.container.innerHTML="",Qt}},{key:"dangerouslyPasteHTML",value:function(vt,ct){var Pt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:b.default.sources.API;if(typeof vt=="string")this.quill.setContents(this.convert(vt),ct),this.quill.setSelection(0,b.default.sources.SILENT);else{var Lt=this.convert(ct);this.quill.updateContents(new p.default().retain(vt).concat(Lt),Pt),this.quill.setSelection(vt+Lt.length(),b.default.sources.SILENT)}}},{key:"onPaste",value:function(vt){var ct=this;if(!(vt.defaultPrevented||!this.quill.isEnabled())){var Pt=this.quill.getSelection(),Lt=new p.default().retain(Pt.index),Nt=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(b.default.sources.SILENT),setTimeout(function(){Lt=Lt.concat(ct.convert()).delete(Pt.length),ct.quill.updateContents(Lt,b.default.sources.USER),ct.quill.setSelection(Lt.length()-Pt.length,b.default.sources.SILENT),ct.quill.scrollingContainer.scrollTop=Nt,ct.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var vt=this,ct=[],Pt=[];return this.matchers.forEach(function(Lt){var Nt=a(Lt,2),He=Nt[0],Ge=Nt[1];switch(He){case Node.TEXT_NODE:Pt.push(Ge);break;case Node.ELEMENT_NODE:ct.push(Ge);break;default:[].forEach.call(vt.container.querySelectorAll(He),function(Qt){Qt[nt]=Qt[nt]||[],Qt[nt].push(Ge)});break}}),[ct,Pt]}}]),at}(T.default);j.DEFAULTS={matchers:[],matchVisual:!0};function G(rt,at,dt){return(typeof at>"u"?"undefined":o(at))==="object"?Object.keys(at).reduce(function(vt,ct){return G(vt,ct,at[ct])},rt):rt.reduce(function(vt,ct){return ct.attributes&&ct.attributes[at]?vt.push(ct):vt.insert(ct.insert,(0,h.default)({},M({},at,dt),ct.attributes))},new p.default)}function X(rt){if(rt.nodeType!==Node.ELEMENT_NODE)return{};var at="__ql-computed-style";return rt[at]||(rt[at]=window.getComputedStyle(rt))}function Y(rt,at){for(var dt="",vt=rt.ops.length-1;vt>=0&&dt.length<at.length;--vt){var ct=rt.ops[vt];if(typeof ct.insert!="string")break;dt=ct.insert+dt}return dt.slice(-1*at.length)===at}function $(rt){if(rt.childNodes.length===0)return!1;var at=X(rt);return["block","list-item"].indexOf(at.display)>-1}function W(rt,at,dt){return rt.nodeType===rt.TEXT_NODE?dt.reduce(function(vt,ct){return ct(rt,vt)},new p.default):rt.nodeType===rt.ELEMENT_NODE?[].reduce.call(rt.childNodes||[],function(vt,ct){var Pt=W(ct,at,dt);return ct.nodeType===rt.ELEMENT_NODE&&(Pt=at.reduce(function(Lt,Nt){return Nt(ct,Lt)},Pt),Pt=(ct[nt]||[]).reduce(function(Lt,Nt){return Nt(ct,Lt)},Pt)),vt.concat(Pt)},new p.default):new p.default}function et(rt,at,dt){return G(dt,rt,!0)}function J(rt,at){var dt=v.default.Attributor.Attribute.keys(rt),vt=v.default.Attributor.Class.keys(rt),ct=v.default.Attributor.Style.keys(rt),Pt={};return dt.concat(vt).concat(ct).forEach(function(Lt){var Nt=v.default.query(Lt,v.default.Scope.ATTRIBUTE);Nt!=null&&(Pt[Nt.attrName]=Nt.value(rt),Pt[Nt.attrName])||(Nt=U[Lt],Nt!=null&&(Nt.attrName===Lt||Nt.keyName===Lt)&&(Pt[Nt.attrName]=Nt.value(rt)||void 0),Nt=k[Lt],Nt!=null&&(Nt.attrName===Lt||Nt.keyName===Lt)&&(Nt=k[Lt],Pt[Nt.attrName]=Nt.value(rt)||void 0))}),Object.keys(Pt).length>0&&(at=G(at,Pt)),at}function it(rt,at){var dt=v.default.query(rt);if(dt==null)return at;if(dt.prototype instanceof v.default.Embed){var vt={},ct=dt.value(rt);ct!=null&&(vt[dt.blotName]=ct,at=new p.default().insert(vt,dt.formats(rt)))}else typeof dt.formats=="function"&&(at=G(at,dt.blotName,dt.formats(rt)));return at}function lt(rt,at){return Y(at,`
1993
1993
  `)||at.insert(`
1994
1994
  `),at}function pt(){return new p.default}function yt(rt,at){var dt=v.default.query(rt);if(dt==null||dt.blotName!=="list-item"||!Y(at,`
@@ -1997,4 +1997,5 @@ function print() { __p += __j.call(arguments, '') }
1997
1997
  `),at}function At(rt,at){if($(rt)&&rt.nextElementSibling!=null&&!Y(at,`
1998
1998
 
1999
1999
  `)){var dt=rt.offsetHeight+parseFloat(X(rt).marginTop)+parseFloat(X(rt).marginBottom);rt.nextElementSibling.offsetTop>rt.offsetTop+dt*1.5&&at.insert(`
2000
- `)}return at}function oe(rt,at){var dt={},vt=rt.style||{};return vt.fontStyle&&X(rt).fontStyle==="italic"&&(dt.italic=!0),vt.fontWeight&&(X(rt).fontWeight.startsWith("bold")||parseInt(X(rt).fontWeight)>=700)&&(dt.bold=!0),Object.keys(dt).length>0&&(at=G(at,dt)),parseFloat(vt.textIndent||0)>0&&(at=new p.default().insert(" ").concat(at)),at}function qt(rt,at){var dt=rt.data;if(rt.parentNode.tagName==="O:P")return at.insert(dt.trim());if(dt.trim().length===0&&rt.parentNode.classList.contains("ql-clipboard"))return at;if(!X(rt.parentNode).whiteSpace.startsWith("pre")){var vt=function(Pt,Lt){return Lt=Lt.replace(/[^\u00a0]/g,""),Lt.length<1&&Pt?" ":Lt};dt=dt.replace(/\r\n/g," ").replace(/\n/g," "),dt=dt.replace(/\s\s+/g,vt.bind(vt,!0)),(rt.previousSibling==null&&$(rt.parentNode)||rt.previousSibling!=null&&$(rt.previousSibling))&&(dt=dt.replace(/^\s+/,vt.bind(vt,!1))),(rt.nextSibling==null&&$(rt.parentNode)||rt.nextSibling!=null&&$(rt.nextSibling))&&(dt=dt.replace(/\s+$/,vt.bind(vt,!1)))}return at.insert(dt)}n.default=j,n.matchAttributor=J,n.matchBlot=it,n.matchNewline=xt,n.matchSpacing=At,n.matchText=qt},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function y(b,_){for(var m=0;m<_.length;m++){var w=_[m];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(b,w.key,w)}}return function(b,_,m){return _&&y(b.prototype,_),m&&y(b,m),b}}(),a=function y(b,_,m){b===null&&(b=Function.prototype);var w=Object.getOwnPropertyDescriptor(b,_);if(w===void 0){var T=Object.getPrototypeOf(b);return T===null?void 0:y(T,_,m)}else{if("value"in w)return w.value;var x=w.get;return x===void 0?void 0:x.call(m)}},u=i(6),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function d(y,b){if(!(y instanceof b))throw new TypeError("Cannot call a class as a function")}function p(y,b){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:y}function c(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);y.prototype=Object.create(b&&b.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(y,b):y.__proto__=b)}var v=function(y){c(b,y);function b(){return d(this,b),p(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return o(b,[{key:"optimize",value:function(m){a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"optimize",this).call(this,m),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return a(b.__proto__||Object.getPrototypeOf(b),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),b}(f.default);v.blotName="bold",v.tagName=["STRONG","B"],n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.addControls=n.default=void 0;var o=function(){function C(P,M){var F=[],q=!0,Z=!1,z=void 0;try{for(var nt=P[Symbol.iterator](),V;!(q=(V=nt.next()).done)&&(F.push(V.value),!(M&&F.length===M));q=!0);}catch(U){Z=!0,z=U}finally{try{!q&&nt.return&&nt.return()}finally{if(Z)throw z}}return F}return function(P,M){if(Array.isArray(P))return P;if(Symbol.iterator in Object(P))return C(P,M);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function C(P,M){for(var F=0;F<M.length;F++){var q=M[F];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(P,q.key,q)}}return function(P,M,F){return M&&C(P.prototype,M),F&&C(P,F),P}}(),u=i(2),f=m(u),h=i(0),d=m(h),p=i(5),c=m(p),v=i(10),y=m(v),b=i(9),_=m(b);function m(C){return C&&C.__esModule?C:{default:C}}function w(C,P,M){return P in C?Object.defineProperty(C,P,{value:M,enumerable:!0,configurable:!0,writable:!0}):C[P]=M,C}function T(C,P){if(!(C instanceof P))throw new TypeError("Cannot call a class as a function")}function x(C,P){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P&&(typeof P=="object"||typeof P=="function")?P:C}function E(C,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof P);C.prototype=Object.create(P&&P.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),P&&(Object.setPrototypeOf?Object.setPrototypeOf(C,P):C.__proto__=P)}var I=(0,y.default)("quill:toolbar"),A=function(C){E(P,C);function P(M,F){T(this,P);var q=x(this,(P.__proto__||Object.getPrototypeOf(P)).call(this,M,F));if(Array.isArray(q.options.container)){var Z=document.createElement("div");L(Z,q.options.container),M.container.parentNode.insertBefore(Z,M.container),q.container=Z}else typeof q.options.container=="string"?q.container=document.querySelector(q.options.container):q.container=q.options.container;if(!(q.container instanceof HTMLElement)){var z;return z=I.error("Container required for toolbar",q.options),x(q,z)}return q.container.classList.add("ql-toolbar"),q.controls=[],q.handlers={},Object.keys(q.options.handlers).forEach(function(nt){q.addHandler(nt,q.options.handlers[nt])}),[].forEach.call(q.container.querySelectorAll("button, select"),function(nt){q.attach(nt)}),q.quill.on(c.default.events.EDITOR_CHANGE,function(nt,V){nt===c.default.events.SELECTION_CHANGE&&q.update(V)}),q.quill.on(c.default.events.SCROLL_OPTIMIZE,function(){var nt=q.quill.selection.getRange(),V=o(nt,1),U=V[0];q.update(U)}),q}return a(P,[{key:"addHandler",value:function(F,q){this.handlers[F]=q}},{key:"attach",value:function(F){var q=this,Z=[].find.call(F.classList,function(nt){return nt.indexOf("ql-")===0});if(Z){if(Z=Z.slice(3),F.tagName==="BUTTON"&&F.setAttribute("type","button"),this.handlers[Z]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[Z]==null){I.warn("ignoring attaching to disabled format",Z,F);return}if(d.default.query(Z)==null){I.warn("ignoring attaching to nonexistent format",Z,F);return}}var z=F.tagName==="SELECT"?"change":"click";F.addEventListener(z,function(nt){var V=void 0;if(F.tagName==="SELECT"){if(F.selectedIndex<0)return;var U=F.options[F.selectedIndex];U.hasAttribute("selected")?V=!1:V=U.value||!1}else F.classList.contains("ql-active")?V=!1:V=F.value||!F.hasAttribute("value"),nt.preventDefault();q.quill.focus();var k=q.quill.selection.getRange(),j=o(k,1),G=j[0];if(q.handlers[Z]!=null)q.handlers[Z].call(q,V);else if(d.default.query(Z).prototype instanceof d.default.Embed){if(V=prompt("Enter "+Z),!V)return;q.quill.updateContents(new f.default().retain(G.index).delete(G.length).insert(w({},Z,V)),c.default.sources.USER)}else q.quill.format(Z,V,c.default.sources.USER);q.update(G)}),this.controls.push([Z,F])}}},{key:"update",value:function(F){var q=F==null?{}:this.quill.getFormat(F);this.controls.forEach(function(Z){var z=o(Z,2),nt=z[0],V=z[1];if(V.tagName==="SELECT"){var U=void 0;if(F==null)U=null;else if(q[nt]==null)U=V.querySelector("option[selected]");else if(!Array.isArray(q[nt])){var k=q[nt];typeof k=="string"&&(k=k.replace(/\"/g,'\\"')),U=V.querySelector('option[value="'+k+'"]')}U==null?(V.value="",V.selectedIndex=-1):U.selected=!0}else if(F==null)V.classList.remove("ql-active");else if(V.hasAttribute("value")){var j=q[nt]===V.getAttribute("value")||q[nt]!=null&&q[nt].toString()===V.getAttribute("value")||q[nt]==null&&!V.getAttribute("value");V.classList.toggle("ql-active",j)}else V.classList.toggle("ql-active",q[nt]!=null)})}}]),P}(_.default);A.DEFAULTS={};function O(C,P,M){var F=document.createElement("button");F.setAttribute("type","button"),F.classList.add("ql-"+P),M!=null&&(F.value=M),C.appendChild(F)}function L(C,P){Array.isArray(P[0])||(P=[P]),P.forEach(function(M){var F=document.createElement("span");F.classList.add("ql-formats"),M.forEach(function(q){if(typeof q=="string")O(F,q);else{var Z=Object.keys(q)[0],z=q[Z];Array.isArray(z)?R(F,Z,z):O(F,Z,z)}}),C.appendChild(F)})}function R(C,P,M){var F=document.createElement("select");F.classList.add("ql-"+P),M.forEach(function(q){var Z=document.createElement("option");q!==!1?Z.setAttribute("value",q):Z.setAttribute("selected","selected"),F.appendChild(Z)}),C.appendChild(F)}A.DEFAULTS={container:null,handlers:{clean:function(){var P=this,M=this.quill.getSelection();if(M!=null)if(M.length==0){var F=this.quill.getFormat();Object.keys(F).forEach(function(q){d.default.query(q,d.default.Scope.INLINE)!=null&&P.quill.format(q,!1)})}else this.quill.removeFormat(M,c.default.sources.USER)},direction:function(P){var M=this.quill.getFormat().align;P==="rtl"&&M==null?this.quill.format("align","right",c.default.sources.USER):!P&&M==="right"&&this.quill.format("align",!1,c.default.sources.USER),this.quill.format("direction",P,c.default.sources.USER)},indent:function(P){var M=this.quill.getSelection(),F=this.quill.getFormat(M),q=parseInt(F.indent||0);if(P==="+1"||P==="-1"){var Z=P==="+1"?1:-1;F.direction==="rtl"&&(Z*=-1),this.quill.format("indent",q+Z,c.default.sources.USER)}},link:function(P){P===!0&&(P=prompt("Enter link URL:")),this.quill.format("link",P,c.default.sources.USER)},list:function(P){var M=this.quill.getSelection(),F=this.quill.getFormat(M);P==="check"?F.list==="checked"||F.list==="unchecked"?this.quill.format("list",!1,c.default.sources.USER):this.quill.format("list","unchecked",c.default.sources.USER):this.quill.format("list",P,c.default.sources.USER)}}},n.default=A,n.addControls=L},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function y(b,_){for(var m=0;m<_.length;m++){var w=_[m];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(b,w.key,w)}}return function(b,_,m){return _&&y(b.prototype,_),m&&y(b,m),b}}(),a=function y(b,_,m){b===null&&(b=Function.prototype);var w=Object.getOwnPropertyDescriptor(b,_);if(w===void 0){var T=Object.getPrototypeOf(b);return T===null?void 0:y(T,_,m)}else{if("value"in w)return w.value;var x=w.get;return x===void 0?void 0:x.call(m)}},u=i(28),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function d(y,b){if(!(y instanceof b))throw new TypeError("Cannot call a class as a function")}function p(y,b){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:y}function c(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);y.prototype=Object.create(b&&b.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(y,b):y.__proto__=b)}var v=function(y){c(b,y);function b(_,m){d(this,b);var w=p(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,_));return w.label.innerHTML=m,w.container.classList.add("ql-color-picker"),[].slice.call(w.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(T){T.classList.add("ql-primary")}),w}return o(b,[{key:"buildItem",value:function(m){var w=a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"buildItem",this).call(this,m);return w.style.backgroundColor=m.getAttribute("value")||"",w}},{key:"selectItem",value:function(m,w){a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"selectItem",this).call(this,m,w);var T=this.label.querySelector(".ql-color-label"),x=m&&m.getAttribute("data-value")||"";T&&(T.tagName==="line"?T.style.stroke=x:T.style.fill=x)}}]),b}(f.default);n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function y(b,_){for(var m=0;m<_.length;m++){var w=_[m];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(b,w.key,w)}}return function(b,_,m){return _&&y(b.prototype,_),m&&y(b,m),b}}(),a=function y(b,_,m){b===null&&(b=Function.prototype);var w=Object.getOwnPropertyDescriptor(b,_);if(w===void 0){var T=Object.getPrototypeOf(b);return T===null?void 0:y(T,_,m)}else{if("value"in w)return w.value;var x=w.get;return x===void 0?void 0:x.call(m)}},u=i(28),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function d(y,b){if(!(y instanceof b))throw new TypeError("Cannot call a class as a function")}function p(y,b){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:y}function c(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);y.prototype=Object.create(b&&b.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(y,b):y.__proto__=b)}var v=function(y){c(b,y);function b(_,m){d(this,b);var w=p(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,_));return w.container.classList.add("ql-icon-picker"),[].forEach.call(w.container.querySelectorAll(".ql-picker-item"),function(T){T.innerHTML=m[T.getAttribute("data-value")||""]}),w.defaultItem=w.container.querySelector(".ql-selected"),w.selectItem(w.defaultItem),w}return o(b,[{key:"selectItem",value:function(m,w){a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"selectItem",this).call(this,m,w),m=m||this.defaultItem,this.label.innerHTML=m.innerHTML}}]),b}(f.default);n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function f(h,d){for(var p=0;p<d.length;p++){var c=d[p];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(h,c.key,c)}}return function(h,d,p){return d&&f(h.prototype,d),p&&f(h,p),h}}();function a(f,h){if(!(f instanceof h))throw new TypeError("Cannot call a class as a function")}var u=function(){function f(h,d){var p=this;a(this,f),this.quill=h,this.boundsContainer=d||document.body,this.root=h.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){p.root.style.marginTop=-1*p.quill.root.scrollTop+"px"}),this.hide()}return o(f,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(d){var p=d.left+d.width/2-this.root.offsetWidth/2,c=d.bottom+this.quill.root.scrollTop;this.root.style.left=p+"px",this.root.style.top=c+"px",this.root.classList.remove("ql-flip");var v=this.boundsContainer.getBoundingClientRect(),y=this.root.getBoundingClientRect(),b=0;if(y.right>v.right&&(b=v.right-y.right,this.root.style.left=p+b+"px"),y.left<v.left&&(b=v.left-y.left,this.root.style.left=p+b+"px"),y.bottom>v.bottom){var _=y.bottom-y.top,m=d.bottom-d.top+_;this.root.style.top=c-m+"px",this.root.classList.add("ql-flip")}return b}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),f}();n.default=u},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function R(C,P){var M=[],F=!0,q=!1,Z=void 0;try{for(var z=C[Symbol.iterator](),nt;!(F=(nt=z.next()).done)&&(M.push(nt.value),!(P&&M.length===P));F=!0);}catch(V){q=!0,Z=V}finally{try{!F&&z.return&&z.return()}finally{if(q)throw Z}}return M}return function(C,P){if(Array.isArray(C))return C;if(Symbol.iterator in Object(C))return R(C,P);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function R(C,P,M){C===null&&(C=Function.prototype);var F=Object.getOwnPropertyDescriptor(C,P);if(F===void 0){var q=Object.getPrototypeOf(C);return q===null?void 0:R(q,P,M)}else{if("value"in F)return F.value;var Z=F.get;return Z===void 0?void 0:Z.call(M)}},u=function(){function R(C,P){for(var M=0;M<P.length;M++){var F=P[M];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(C,F.key,F)}}return function(C,P,M){return P&&R(C.prototype,P),M&&R(C,M),C}}(),f=i(3),h=T(f),d=i(8),p=T(d),c=i(43),v=T(c),y=i(27),b=T(y),_=i(15),m=i(41),w=T(m);function T(R){return R&&R.__esModule?R:{default:R}}function x(R,C){if(!(R instanceof C))throw new TypeError("Cannot call a class as a function")}function E(R,C){if(!R)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C&&(typeof C=="object"||typeof C=="function")?C:R}function I(R,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof C);R.prototype=Object.create(C&&C.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),C&&(Object.setPrototypeOf?Object.setPrototypeOf(R,C):R.__proto__=C)}var A=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],O=function(R){I(C,R);function C(P,M){x(this,C),M.modules.toolbar!=null&&M.modules.toolbar.container==null&&(M.modules.toolbar.container=A);var F=E(this,(C.__proto__||Object.getPrototypeOf(C)).call(this,P,M));return F.quill.container.classList.add("ql-snow"),F}return u(C,[{key:"extendToolbar",value:function(M){M.container.classList.add("ql-snow"),this.buildButtons([].slice.call(M.container.querySelectorAll("button")),w.default),this.buildPickers([].slice.call(M.container.querySelectorAll("select")),w.default),this.tooltip=new L(this.quill,this.options.bounds),M.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(F,q){M.handlers.link.call(M,!q.format.link)})}}]),C}(v.default);O.DEFAULTS=(0,h.default)(!0,{},v.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(C){if(C){var P=this.quill.getSelection();if(P==null||P.length==0)return;var M=this.quill.getText(P);/^\S+@\S+\.\S+$/.test(M)&&M.indexOf("mailto:")!==0&&(M="mailto:"+M);var F=this.quill.theme.tooltip;F.edit("link",M)}else this.quill.format("link",!1)}}}}});var L=function(R){I(C,R);function C(P,M){x(this,C);var F=E(this,(C.__proto__||Object.getPrototypeOf(C)).call(this,P,M));return F.preview=F.root.querySelector("a.ql-preview"),F}return u(C,[{key:"listen",value:function(){var M=this;a(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(F){M.root.classList.contains("ql-editing")?M.save():M.edit("link",M.preview.textContent),F.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(F){if(M.linkRange!=null){var q=M.linkRange;M.restoreFocus(),M.quill.formatText(q,"link",!1,p.default.sources.USER),delete M.linkRange}F.preventDefault(),M.hide()}),this.quill.on(p.default.events.SELECTION_CHANGE,function(F,q,Z){if(F!=null){if(F.length===0&&Z===p.default.sources.USER){var z=M.quill.scroll.descendant(b.default,F.index),nt=o(z,2),V=nt[0],U=nt[1];if(V!=null){M.linkRange=new _.Range(F.index-U,V.length());var k=b.default.formats(V.domNode);M.preview.textContent=k,M.preview.setAttribute("href",k),M.show(),M.position(M.quill.getBounds(M.linkRange));return}}else delete M.linkRange;M.hide()}})}},{key:"show",value:function(){a(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),C}(c.BaseTooltip);L.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),n.default=O},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(29),a=ct(o),u=i(36),f=i(38),h=i(64),d=i(65),p=ct(d),c=i(66),v=ct(c),y=i(67),b=ct(y),_=i(37),m=i(26),w=i(39),T=i(40),x=i(56),E=ct(x),I=i(68),A=ct(I),O=i(27),L=ct(O),R=i(69),C=ct(R),P=i(70),M=ct(P),F=i(71),q=ct(F),Z=i(72),z=ct(Z),nt=i(73),V=ct(nt),U=i(13),k=ct(U),j=i(74),G=ct(j),X=i(75),Y=ct(X),$=i(57),W=ct($),et=i(41),J=ct(et),it=i(28),lt=ct(it),pt=i(59),yt=ct(pt),xt=i(60),At=ct(xt),oe=i(61),qt=ct(oe),rt=i(108),at=ct(rt),dt=i(62),vt=ct(dt);function ct(Pt){return Pt&&Pt.__esModule?Pt:{default:Pt}}a.default.register({"attributors/attribute/direction":f.DirectionAttribute,"attributors/class/align":u.AlignClass,"attributors/class/background":_.BackgroundClass,"attributors/class/color":m.ColorClass,"attributors/class/direction":f.DirectionClass,"attributors/class/font":w.FontClass,"attributors/class/size":T.SizeClass,"attributors/style/align":u.AlignStyle,"attributors/style/background":_.BackgroundStyle,"attributors/style/color":m.ColorStyle,"attributors/style/direction":f.DirectionStyle,"attributors/style/font":w.FontStyle,"attributors/style/size":T.SizeStyle},!0),a.default.register({"formats/align":u.AlignClass,"formats/direction":f.DirectionClass,"formats/indent":h.IndentClass,"formats/background":_.BackgroundStyle,"formats/color":m.ColorStyle,"formats/font":w.FontClass,"formats/size":T.SizeClass,"formats/blockquote":p.default,"formats/code-block":k.default,"formats/header":v.default,"formats/list":b.default,"formats/bold":E.default,"formats/code":U.Code,"formats/italic":A.default,"formats/link":L.default,"formats/script":C.default,"formats/strike":M.default,"formats/underline":q.default,"formats/image":z.default,"formats/video":V.default,"formats/list/item":y.ListItem,"modules/formula":G.default,"modules/syntax":Y.default,"modules/toolbar":W.default,"themes/bubble":at.default,"themes/snow":vt.default,"ui/icons":J.default,"ui/picker":lt.default,"ui/icon-picker":At.default,"ui/color-picker":yt.default,"ui/tooltip":qt.default},!0),n.default=a.default},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.IndentClass=void 0;var o=function(){function b(_,m){for(var w=0;w<m.length;w++){var T=m[w];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(_,T.key,T)}}return function(_,m,w){return m&&b(_.prototype,m),w&&b(_,w),_}}(),a=function b(_,m,w){_===null&&(_=Function.prototype);var T=Object.getOwnPropertyDescriptor(_,m);if(T===void 0){var x=Object.getPrototypeOf(_);return x===null?void 0:b(x,m,w)}else{if("value"in T)return T.value;var E=T.get;return E===void 0?void 0:E.call(w)}},u=i(0),f=h(u);function h(b){return b&&b.__esModule?b:{default:b}}function d(b,_){if(!(b instanceof _))throw new TypeError("Cannot call a class as a function")}function p(b,_){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:b}function c(b,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);b.prototype=Object.create(_&&_.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(b,_):b.__proto__=_)}var v=function(b){c(_,b);function _(){return d(this,_),p(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return o(_,[{key:"add",value:function(w,T){if(T==="+1"||T==="-1"){var x=this.value(w)||0;T=T==="+1"?x+1:x-1}return T===0?(this.remove(w),!0):a(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"add",this).call(this,w,T)}},{key:"canAdd",value:function(w,T){return a(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"canAdd",this).call(this,w,T)||a(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"canAdd",this).call(this,w,parseInt(T))}},{key:"value",value:function(w){return parseInt(a(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"value",this).call(this,w))||void 0}}]),_}(f.default.Attributor.Class),y=new v("indent","ql-indent",{scope:f.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});n.IndentClass=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(4),a=u(o);function u(c){return c&&c.__esModule?c:{default:c}}function f(c,v){if(!(c instanceof v))throw new TypeError("Cannot call a class as a function")}function h(c,v){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:c}function d(c,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);c.prototype=Object.create(v&&v.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(c,v):c.__proto__=v)}var p=function(c){d(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(a.default);p.blotName="blockquote",p.tagName="blockquote",n.default=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function v(y,b){for(var _=0;_<b.length;_++){var m=b[_];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(y,m.key,m)}}return function(y,b,_){return b&&v(y.prototype,b),_&&v(y,_),y}}(),a=i(4),u=f(a);function f(v){return v&&v.__esModule?v:{default:v}}function h(v,y){if(!(v instanceof y))throw new TypeError("Cannot call a class as a function")}function d(v,y){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:v}function p(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);v.prototype=Object.create(y&&y.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(v,y):v.__proto__=y)}var c=function(v){p(y,v);function y(){return h(this,y),d(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return o(y,null,[{key:"formats",value:function(_){return this.tagName.indexOf(_.tagName)+1}}]),y}(u.default);c.blotName="header",c.tagName=["H1","H2","H3","H4","H5","H6"],n.default=c},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.ListItem=void 0;var o=function(){function x(E,I){for(var A=0;A<I.length;A++){var O=I[A];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(E,O.key,O)}}return function(E,I,A){return I&&x(E.prototype,I),A&&x(E,A),E}}(),a=function x(E,I,A){E===null&&(E=Function.prototype);var O=Object.getOwnPropertyDescriptor(E,I);if(O===void 0){var L=Object.getPrototypeOf(E);return L===null?void 0:x(L,I,A)}else{if("value"in O)return O.value;var R=O.get;return R===void 0?void 0:R.call(A)}},u=i(0),f=v(u),h=i(4),d=v(h),p=i(25),c=v(p);function v(x){return x&&x.__esModule?x:{default:x}}function y(x,E,I){return E in x?Object.defineProperty(x,E,{value:I,enumerable:!0,configurable:!0,writable:!0}):x[E]=I,x}function b(x,E){if(!(x instanceof E))throw new TypeError("Cannot call a class as a function")}function _(x,E){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:x}function m(x,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);x.prototype=Object.create(E&&E.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(x,E):x.__proto__=E)}var w=function(x){m(E,x);function E(){return b(this,E),_(this,(E.__proto__||Object.getPrototypeOf(E)).apply(this,arguments))}return o(E,[{key:"format",value:function(A,O){A===T.blotName&&!O?this.replaceWith(f.default.create(this.statics.scope)):a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"format",this).call(this,A,O)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(A,O){return this.parent.isolate(this.offset(this.parent),this.length()),A===this.parent.statics.blotName?(this.parent.replaceWith(A,O),this):(this.parent.unwrap(),a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"replaceWith",this).call(this,A,O))}}],[{key:"formats",value:function(A){return A.tagName===this.tagName?void 0:a(E.__proto__||Object.getPrototypeOf(E),"formats",this).call(this,A)}}]),E}(d.default);w.blotName="list-item",w.tagName="LI";var T=function(x){m(E,x),o(E,null,[{key:"create",value:function(A){var O=A==="ordered"?"OL":"UL",L=a(E.__proto__||Object.getPrototypeOf(E),"create",this).call(this,O);return(A==="checked"||A==="unchecked")&&L.setAttribute("data-checked",A==="checked"),L}},{key:"formats",value:function(A){if(A.tagName==="OL")return"ordered";if(A.tagName==="UL")return A.hasAttribute("data-checked")?A.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function E(I){b(this,E);var A=_(this,(E.__proto__||Object.getPrototypeOf(E)).call(this,I)),O=function(R){if(R.target.parentNode===I){var C=A.statics.formats(I),P=f.default.find(R.target);C==="checked"?P.format("list","unchecked"):C==="unchecked"&&P.format("list","checked")}};return I.addEventListener("touchstart",O),I.addEventListener("mousedown",O),A}return o(E,[{key:"format",value:function(A,O){this.children.length>0&&this.children.tail.format(A,O)}},{key:"formats",value:function(){return y({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(A,O){if(A instanceof w)a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"insertBefore",this).call(this,A,O);else{var L=O==null?this.length():O.offset(this),R=this.split(L);R.parent.insertBefore(A,R)}}},{key:"optimize",value:function(A){a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"optimize",this).call(this,A);var O=this.next;O!=null&&O.prev===this&&O.statics.blotName===this.statics.blotName&&O.domNode.tagName===this.domNode.tagName&&O.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(O.moveChildren(this),O.remove())}},{key:"replace",value:function(A){if(A.statics.blotName!==this.statics.blotName){var O=f.default.create(this.statics.defaultChild);A.moveChildren(O),this.appendChild(O)}a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"replace",this).call(this,A)}}]),E}(c.default);T.blotName="list",T.scope=f.default.Scope.BLOCK_BLOT,T.tagName=["OL","UL"],T.defaultChild="list-item",T.allowedChildren=[w],n.ListItem=w,n.default=T},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(56),a=u(o);function u(c){return c&&c.__esModule?c:{default:c}}function f(c,v){if(!(c instanceof v))throw new TypeError("Cannot call a class as a function")}function h(c,v){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:c}function d(c,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);c.prototype=Object.create(v&&v.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(c,v):c.__proto__=v)}var p=function(c){d(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(a.default);p.blotName="italic",p.tagName=["EM","I"],n.default=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function y(b,_){for(var m=0;m<_.length;m++){var w=_[m];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(b,w.key,w)}}return function(b,_,m){return _&&y(b.prototype,_),m&&y(b,m),b}}(),a=function y(b,_,m){b===null&&(b=Function.prototype);var w=Object.getOwnPropertyDescriptor(b,_);if(w===void 0){var T=Object.getPrototypeOf(b);return T===null?void 0:y(T,_,m)}else{if("value"in w)return w.value;var x=w.get;return x===void 0?void 0:x.call(m)}},u=i(6),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function d(y,b){if(!(y instanceof b))throw new TypeError("Cannot call a class as a function")}function p(y,b){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:y}function c(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);y.prototype=Object.create(b&&b.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(y,b):y.__proto__=b)}var v=function(y){c(b,y);function b(){return d(this,b),p(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return o(b,null,[{key:"create",value:function(m){return m==="super"?document.createElement("sup"):m==="sub"?document.createElement("sub"):a(b.__proto__||Object.getPrototypeOf(b),"create",this).call(this,m)}},{key:"formats",value:function(m){if(m.tagName==="SUB")return"sub";if(m.tagName==="SUP")return"super"}}]),b}(f.default);v.blotName="script",v.tagName=["SUB","SUP"],n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(6),a=u(o);function u(c){return c&&c.__esModule?c:{default:c}}function f(c,v){if(!(c instanceof v))throw new TypeError("Cannot call a class as a function")}function h(c,v){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:c}function d(c,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);c.prototype=Object.create(v&&v.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(c,v):c.__proto__=v)}var p=function(c){d(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(a.default);p.blotName="strike",p.tagName="S",n.default=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(6),a=u(o);function u(c){return c&&c.__esModule?c:{default:c}}function f(c,v){if(!(c instanceof v))throw new TypeError("Cannot call a class as a function")}function h(c,v){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:c}function d(c,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);c.prototype=Object.create(v&&v.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(c,v):c.__proto__=v)}var p=function(c){d(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(a.default);p.blotName="underline",p.tagName="U",n.default=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function _(m,w){for(var T=0;T<w.length;T++){var x=w[T];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,w,T){return w&&_(m.prototype,w),T&&_(m,T),m}}(),a=function _(m,w,T){m===null&&(m=Function.prototype);var x=Object.getOwnPropertyDescriptor(m,w);if(x===void 0){var E=Object.getPrototypeOf(m);return E===null?void 0:_(E,w,T)}else{if("value"in x)return x.value;var I=x.get;return I===void 0?void 0:I.call(T)}},u=i(0),f=d(u),h=i(27);function d(_){return _&&_.__esModule?_:{default:_}}function p(_,m){if(!(_ instanceof m))throw new TypeError("Cannot call a class as a function")}function c(_,m){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:_}function v(_,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);_.prototype=Object.create(m&&m.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(_,m):_.__proto__=m)}var y=["alt","height","width"],b=function(_){v(m,_);function m(){return p(this,m),c(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return o(m,[{key:"format",value:function(T,x){y.indexOf(T)>-1?x?this.domNode.setAttribute(T,x):this.domNode.removeAttribute(T):a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"format",this).call(this,T,x)}}],[{key:"create",value:function(T){var x=a(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,T);return typeof T=="string"&&x.setAttribute("src",this.sanitize(T)),x}},{key:"formats",value:function(T){return y.reduce(function(x,E){return T.hasAttribute(E)&&(x[E]=T.getAttribute(E)),x},{})}},{key:"match",value:function(T){return/\.(jpe?g|gif|png)$/.test(T)||/^data:image\/.+;base64/.test(T)}},{key:"sanitize",value:function(T){return(0,h.sanitize)(T,["http","https","data"])?T:"//:0"}},{key:"value",value:function(T){return T.getAttribute("src")}}]),m}(f.default.Embed);b.blotName="image",b.tagName="IMG",n.default=b},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function _(m,w){for(var T=0;T<w.length;T++){var x=w[T];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,w,T){return w&&_(m.prototype,w),T&&_(m,T),m}}(),a=function _(m,w,T){m===null&&(m=Function.prototype);var x=Object.getOwnPropertyDescriptor(m,w);if(x===void 0){var E=Object.getPrototypeOf(m);return E===null?void 0:_(E,w,T)}else{if("value"in x)return x.value;var I=x.get;return I===void 0?void 0:I.call(T)}},u=i(4),f=i(27),h=d(f);function d(_){return _&&_.__esModule?_:{default:_}}function p(_,m){if(!(_ instanceof m))throw new TypeError("Cannot call a class as a function")}function c(_,m){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:_}function v(_,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);_.prototype=Object.create(m&&m.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(_,m):_.__proto__=m)}var y=["height","width"],b=function(_){v(m,_);function m(){return p(this,m),c(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return o(m,[{key:"format",value:function(T,x){y.indexOf(T)>-1?x?this.domNode.setAttribute(T,x):this.domNode.removeAttribute(T):a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"format",this).call(this,T,x)}}],[{key:"create",value:function(T){var x=a(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,T);return x.setAttribute("frameborder","0"),x.setAttribute("allowfullscreen",!0),x.setAttribute("src",this.sanitize(T)),x}},{key:"formats",value:function(T){return y.reduce(function(x,E){return T.hasAttribute(E)&&(x[E]=T.getAttribute(E)),x},{})}},{key:"sanitize",value:function(T){return h.default.sanitize(T)}},{key:"value",value:function(T){return T.getAttribute("src")}}]),m}(u.BlockEmbed);b.blotName="video",b.className="ql-video",b.tagName="IFRAME",n.default=b},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.FormulaBlot=void 0;var o=function(){function T(x,E){for(var I=0;I<E.length;I++){var A=E[I];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(x,A.key,A)}}return function(x,E,I){return E&&T(x.prototype,E),I&&T(x,I),x}}(),a=function T(x,E,I){x===null&&(x=Function.prototype);var A=Object.getOwnPropertyDescriptor(x,E);if(A===void 0){var O=Object.getPrototypeOf(x);return O===null?void 0:T(O,E,I)}else{if("value"in A)return A.value;var L=A.get;return L===void 0?void 0:L.call(I)}},u=i(35),f=v(u),h=i(5),d=v(h),p=i(9),c=v(p);function v(T){return T&&T.__esModule?T:{default:T}}function y(T,x){if(!(T instanceof x))throw new TypeError("Cannot call a class as a function")}function b(T,x){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:T}function _(T,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);T.prototype=Object.create(x&&x.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(T,x):T.__proto__=x)}var m=function(T){_(x,T);function x(){return y(this,x),b(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return o(x,null,[{key:"create",value:function(I){var A=a(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,I);return typeof I=="string"&&(window.katex.render(I,A,{throwOnError:!1,errorColor:"#f00"}),A.setAttribute("data-value",I)),A}},{key:"value",value:function(I){return I.getAttribute("data-value")}}]),x}(f.default);m.blotName="formula",m.className="ql-formula",m.tagName="SPAN";var w=function(T){_(x,T),o(x,null,[{key:"register",value:function(){d.default.register(m,!0)}}]);function x(){y(this,x);var E=b(this,(x.__proto__||Object.getPrototypeOf(x)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return E}return x}(c.default);n.FormulaBlot=m,n.default=w},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.CodeToken=n.CodeBlock=void 0;var o=function(){function I(A,O){for(var L=0;L<O.length;L++){var R=O[L];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(A,R.key,R)}}return function(A,O,L){return O&&I(A.prototype,O),L&&I(A,L),A}}(),a=function I(A,O,L){A===null&&(A=Function.prototype);var R=Object.getOwnPropertyDescriptor(A,O);if(R===void 0){var C=Object.getPrototypeOf(A);return C===null?void 0:I(C,O,L)}else{if("value"in R)return R.value;var P=R.get;return P===void 0?void 0:P.call(L)}},u=i(0),f=b(u),h=i(5),d=b(h),p=i(9),c=b(p),v=i(13),y=b(v);function b(I){return I&&I.__esModule?I:{default:I}}function _(I,A){if(!(I instanceof A))throw new TypeError("Cannot call a class as a function")}function m(I,A){if(!I)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:I}function w(I,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);I.prototype=Object.create(A&&A.prototype,{constructor:{value:I,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(I,A):I.__proto__=A)}var T=function(I){w(A,I);function A(){return _(this,A),m(this,(A.__proto__||Object.getPrototypeOf(A)).apply(this,arguments))}return o(A,[{key:"replaceWith",value:function(L){this.domNode.textContent=this.domNode.textContent,this.attach(),a(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"replaceWith",this).call(this,L)}},{key:"highlight",value:function(L){var R=this.domNode.textContent;this.cachedText!==R&&((R.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=L(R),this.domNode.normalize(),this.attach()),this.cachedText=R)}}]),A}(y.default);T.className="ql-syntax";var x=new f.default.Attributor.Class("token","hljs",{scope:f.default.Scope.INLINE}),E=function(I){w(A,I),o(A,null,[{key:"register",value:function(){d.default.register(x,!0),d.default.register(T,!0)}}]);function A(O,L){_(this,A);var R=m(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,O,L));if(typeof R.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var C=null;return R.quill.on(d.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(C),C=setTimeout(function(){R.highlight(),C=null},R.options.interval)}),R.highlight(),R}return o(A,[{key:"highlight",value:function(){var L=this;if(!this.quill.selection.composing){this.quill.update(d.default.sources.USER);var R=this.quill.getSelection();this.quill.scroll.descendants(T).forEach(function(C){C.highlight(L.options.highlight)}),this.quill.update(d.default.sources.SILENT),R!=null&&this.quill.setSelection(R,d.default.sources.SILENT)}}}]),A}(c.default);E.DEFAULTS={highlight:function(){return window.hljs==null?null:function(I){var A=window.hljs.highlightAuto(I);return A.value}}(),interval:1e3},n.CodeBlock=T,n.CodeToken=x,n.default=E},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(r,n){r.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(r,n){r.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(r,n){r.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(r,n){r.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BubbleTooltip=void 0;var o=function A(O,L,R){O===null&&(O=Function.prototype);var C=Object.getOwnPropertyDescriptor(O,L);if(C===void 0){var P=Object.getPrototypeOf(O);return P===null?void 0:A(P,L,R)}else{if("value"in C)return C.value;var M=C.get;return M===void 0?void 0:M.call(R)}},a=function(){function A(O,L){for(var R=0;R<L.length;R++){var C=L[R];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(O,C.key,C)}}return function(O,L,R){return L&&A(O.prototype,L),R&&A(O,R),O}}(),u=i(3),f=_(u),h=i(8),d=_(h),p=i(43),c=_(p),v=i(15),y=i(41),b=_(y);function _(A){return A&&A.__esModule?A:{default:A}}function m(A,O){if(!(A instanceof O))throw new TypeError("Cannot call a class as a function")}function w(A,O){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:A}function T(A,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);A.prototype=Object.create(O&&O.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(A,O):A.__proto__=O)}var x=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],E=function(A){T(O,A);function O(L,R){m(this,O),R.modules.toolbar!=null&&R.modules.toolbar.container==null&&(R.modules.toolbar.container=x);var C=w(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,L,R));return C.quill.container.classList.add("ql-bubble"),C}return a(O,[{key:"extendToolbar",value:function(R){this.tooltip=new I(this.quill,this.options.bounds),this.tooltip.root.appendChild(R.container),this.buildButtons([].slice.call(R.container.querySelectorAll("button")),b.default),this.buildPickers([].slice.call(R.container.querySelectorAll("select")),b.default)}}]),O}(c.default);E.DEFAULTS=(0,f.default)(!0,{},c.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(O){O?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var I=function(A){T(O,A);function O(L,R){m(this,O);var C=w(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,L,R));return C.quill.on(d.default.events.EDITOR_CHANGE,function(P,M,F,q){if(P===d.default.events.SELECTION_CHANGE)if(M!=null&&M.length>0&&q===d.default.sources.USER){C.show(),C.root.style.left="0px",C.root.style.width="",C.root.style.width=C.root.offsetWidth+"px";var Z=C.quill.getLines(M.index,M.length);if(Z.length===1)C.position(C.quill.getBounds(M));else{var z=Z[Z.length-1],nt=C.quill.getIndex(z),V=Math.min(z.length()-1,M.index+M.length-nt),U=C.quill.getBounds(new v.Range(nt,V));C.position(U)}}else document.activeElement!==C.textbox&&C.quill.hasFocus()&&C.hide()}),C}return a(O,[{key:"listen",value:function(){var R=this;o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){R.root.classList.remove("ql-editing")}),this.quill.on(d.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!R.root.classList.contains("ql-hidden")){var C=R.quill.getSelection();C!=null&&R.position(R.quill.getBounds(C))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(R){var C=o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"position",this).call(this,R),P=this.root.querySelector(".ql-tooltip-arrow");if(P.style.marginLeft="",C===0)return C;P.style.marginLeft=-1*C-P.offsetWidth/2+"px"}}]),O}(p.BaseTooltip);I.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),n.BubbleTooltip=I,n.default=E},function(r,n,i){r.exports=i(63)}]).default})})(Ev);var mN=Ev.exports;const yN=En(mN),oB="",_N=Et.forwardRef((e,t)=>{const[r,n]=mt.useState(!1),i=300,o=mt.useRef(null),a=mt.useRef(0),u=mt.useRef(null),f=mt.useRef(null),h=mt.useRef(null),d=mt.useRef(16),p=mt.useRef(null),c=mt.useRef(null),{uniqueId:v,text:y,disabled:b,transformation:_,onTextUpdate:m,pointerdown:w,onExitQuillEditor:T}=e,{x,y:E,fontFamily:I="Arial",fontWeight:A="normal",fontStyle:O="normal",fontSize:L=16,fontVariant:R="normal",fill:C="black",stroke:P,strokeThickness:M=0,blurRadius:F=0,blurEnabled:q=!1,dropShadowColor:Z=null,dropShadow:z=!1,dropShadowBlur:nt=0,wordWrapWidth:V=5e7,leading:U=0,letterSpacing:k,colorCorrection:j={}}=_,{temperatureFilter:G,sharpnessFilter:X,hueFilter:Y,blurFilter:$,adjustmentFilter:W}=ys(j),{blurRadius:et=0}=j;Et.useEffect(()=>{d.current=Number(L)},[L]);const J=["italic","oblique"].includes(O)?O:void 0,it=["small-caps"].includes(R),lt=["bold","bolder","lighter","100","200","300"].includes(A)?A:void 0,pt=Number(k)>0?k:void 0,yt=Et.useMemo(()=>new zr.TextStyle({fontFamily:I,fontSize:L,fill:C||"white",...P&&M>0&&{stroke:P,strokeThickness:M},...J&&{fontStyle:J},...it&&{fontVariant:it},...lt&&{fontWeight:lt},...pt&&{letterSpacing:pt},...q&&{dropShadow:!0,dropShadowBlur:Number(F),dropShadowColor:(Z==null?void 0:Z.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},...z&&{dropShadow:!0,dropShadowBlur:Number(nt),dropShadowColor:(Z==null?void 0:Z.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},wordWrap:!0,breakWords:!0,wordWrapWidth:V||500,leading:U||0}),[q,F,C,I,L,O,U,J,lt,it,pt,Z,P,M,V,z,nt]);Et.useEffect(()=>{p.current={..._}},[_]);const xt=()=>{n(!0)},At=()=>{const rt=new Date().getTime();rt-a.current<i?xt():w&&w(),a.current=rt},oe=rt=>{m&&m({text:rt,uniqueId:v})},qt=()=>{n(!1),T&&T()};return Et.useEffect(()=>{if(r&&f.current){let rt=document.getElementById("note-editor");if(rt){rt.style.position="absolute",rt.style.display="block",rt.style.zIndex="10",rt.style.left=x+"px",rt.style.top=E+"px",rt.style.backgroundColor="var(--chakra-color-darkShark)",rt.style.transform="scale(1.5)",rt.style.width="300px",rt.style.height="100px",rt.style.color="#fff",rt.style.fontSize="20px",rt.style.border="1px solid #CBCEE0";const at={esc:{key:27,handler:function(){qt()}},enter:{key:13,handler:function(){qt()}}};if(c.current=new yN("#note-editor",{modules:{toolbar:!1,keyboard:{bindings:{...at}}},placeholder:"Compose your text here...",theme:"snow"}),c.current){c.current.on("text-change",function(){c.current&&oe(c.current.root.innerText)}),c.current.setText(y),c.current.focus(),c.current.off("text-change",()=>{}),c.current.hasFocus()||(rt.style.display="none");const dt=document.createElement("button");dt.innerHTML="&#10006;",dt.style.position="absolute",dt.style.bottom="-14px",dt.style.left="-3px",dt.style.cursor="pointer",dt.addEventListener("click",()=>{qt()}),dt.style.border="none",dt.style.borderRadius="50%",dt.style.width="15px",dt.style.height="15px",dt.style.backgroundColor="#f8f8f8",dt.style.color="#333",dt.style.fontSize="10px",rt.appendChild(dt)}}}else if(c.current){let rt=document.getElementById("note-editor");rt&&rt.hasChildNodes()&&(rt.removeChild(rt.firstChild),rt.removeAttribute("class"),rt.removeAttribute("style")),c.current.off("text-change",()=>{})}return()=>{c.current&&c.current.off("text-change",()=>{})}},[x,E,r]),Et.useEffect(()=>{if(!r){const rt=document.getElementById("note-editor");rt&&(rt.style.display="none")}},[r]),Vt.jsx(ni,{...e,ref:t,isText:!0,onDoubleClick:xt,isTextEditMode:r,children:Vt.jsxs(le.Container,{ref:o,children:[r&&Vt.jsx(le.Container,{ref:f}),Vt.jsx(le.Container,{alpha:r?0:1,ref:h,children:Vt.jsx(le.Text,{style:yt,x,y:E,anchor:.5,text:y,...!r&&!b&&{interactive:!0,buttonMode:!0,pointerdown:At},ref:u,filters:[G,X,Y,W,...et>0?[$]:[]]})})]})})}),bN={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,isStalled:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,timeDiff:0},Sv=Et.forwardRef((e,t)=>{const[,r]=Et.useState(!1),[n,i]=Et.useState(),o=mt.useRef(null),a=mt.useRef(null),u=mt.useRef(null),f=mt.useRef(bN),h=mt.useRef(),{tl:d,dragModeRef:p}=mt.useContext(An),{uniqueId:c,mute:v=!1,src:y,startAt:b,endAt:_,frameStartAt:m,frameEndAt:w,transformation:{x:T,y:x,width:E,height:I,animation:A,colorCorrection:O={}},pointerdown:L}=e,{blurRadius:R=0}=O,{temperatureFilter:C,sharpnessFilter:P,hueFilter:M,blurFilter:F,adjustmentFilter:q}=ys(O),Z=y||"",z=Et.useMemo(()=>{const G=document.createElement("video");return G.src=y,G.crossOrigin="Anonymus",G.autoplay=!1,G.currentTime=m===0?.001:m,G},[y,m]);Ze(Oe.PAUSE,()=>{if(u.current){const G=u.current;G.currentTime>0&&!G.paused&&!G.ended&&G.readyState>G.HAVE_CURRENT_DATA&&u.current.pause(),f.current.isPlaying=!1}});const nt=Et.useCallback(Bu(()=>{if(u.current){const G=u.current;G.currentTime>0&&!G.paused&&!G.ended&&G.readyState>G.HAVE_CURRENT_DATA&&u.current.pause(),f.current.isPlaying=!1}},400),[u]);Et.useEffect(()=>{u.current?(p.current?(nt(),f.current.isPlaying=!1,f.current.isDragging=!0):f.current.isDragging=!1,u.current.muted=v):f.current.isDragging=!1},[v,p,nt,u]);const V=G=>{if(u.current){if(u.current.currentTime=Number(G),!p.current){const X=u.current,Y=X.currentTime>0&&!X.paused&&!X.ended&&X.readyState>X.HAVE_CURRENT_DATA;u.current.currentTime=Number(G),d.current&&d.current.isActive()&&h.current&&h.current.isActive()&&(Y||u.current.play(),f.current.isPlaying=!0)}f.current.progress=0}},U=()=>{if(u.current){const G=u.current;G.currentTime>0&&!G.paused&&!G.ended&&G.readyState>G.HAVE_CURRENT_DATA&&u.current.pause(),f.current.isPlaying=!1,h.current&&(f.current.progress=h.current.progress())}},k=()=>{},j=()=>{var G,X;if(h.current&&(f.current.progress=h.current.progress()),u.current&&h.current){const Y=m+((G=h==null?void 0:h.current)==null?void 0:G.time()),$=Math.abs(u.current.currentTime-Y),W=u.current,et=W.currentTime>0&&!W.paused&&!W.ended&&W.readyState>W.HAVE_CURRENT_DATA;p.current?(u.current.currentTime=Y,setTimeout(()=>{u.current&&u.current.play().then(()=>{f.current.isPlaying=!1,u.current&&u.current.pause()})},100),f.current.isPlaying=!1):!f.current.isPlaying&&f.current.progress>.01&&f.current.progress<.99?(X=d.current)!=null&&X.isActive()&&h.current&&h.current.isActive()&&(et||u.current.play(),f.current.isPlaying=!0):$>.3&&f.current.progress>.01&&f.current.progress<.99}};return mt.useEffect(()=>{let G=_e.context(()=>{});if(a.current&&d.current){const X={duration:Number(w)-Number(m),onStart:V,onComplete:U,onStartParams:[m,w],onCompleteParams:[],onInterrupt:k,onUpdate:j,onUpdateParams:[m,w]};G=_e.context(()=>{h.current=_e.from(a.current,X,m),d.current.add(h.current,b)})}return()=>{h.current&&(h.current.kill(),_e.killTweensOf(h.current)),G.revert()}},[A,b,_,m,w]),Et.useEffect(()=>{a.current&&r(!0)},[]),Et.useEffect(()=>{u.current&&(u.current.muted=v)},[v]),Et.useEffect(()=>{const G=Math.round((Number(m)+Number.EPSILON)*100)/100,X=function(){u.current&&(u.current.currentTime=G)},Y=function(){if(u.current){const pt=u.current;pt.currentTime>0&&!pt.paused&&!pt.ended&&pt.readyState>pt.HAVE_CURRENT_DATA&&u.current.pause()}f.current.isWaiting=!1,f.current.isStalled=!1},$=function(){u.current&&u.current.pause(),f.current.isWaiting=!0,f.current.isStalled=!1},W=function(){f.current.isWaiting=!1,f.current.isStalled=!1},et=function(){f.current.isWaiting=!1,f.current.isStalled=!0},J=Math.round((Number(m)+Number.EPSILON)*100)/100,it=Math.round((Number(w)+Number.EPSILON)*100)/100,lt=`${Z}#t=${J},${it}`;return zr.Texture.fromLoader(z,lt,c,{pixiIdPrefix:c,resourceOptions:{autoPlay:!1,crossorigin:"Anonymus",updateFPS:30}}).then(pt=>{pt&&(i(pt),u.current=pt.baseTexture.resource.source,u.current.id=c,u.current.addEventListener("loadedmetadata",X),u.current.addEventListener("ended",Y),u.current.addEventListener("loadstart",$),u.current.addEventListener("canplaythrough",W),u.current.addEventListener("stalled",et))}),()=>{u.current&&(u.current.pause(),u.current.removeEventListener("loadedmetadata",X),u.current.removeEventListener("ended",Y),u.current.removeEventListener("loadstart",$),u.current.removeEventListener("canplaythrough",W),u.current.removeEventListener("stalled",et))}},[Z,c,m,w,z]),Vt.jsx(ni,{...e,ref:t,ignoreTlForVideo:!0,children:Vt.jsx(le.Container,{ref:a,children:n&&Vt.jsx(le.Sprite,{texture:n,width:E,height:I,anchor:.5,x:T,y:x,ref:o,pointerdown:L,filters:[C,P,M,q,...R>0?[F]:[]]})})})});Sv.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiVideoSprite"};const xN=e=>{const{startAt:t,endAt:r}=e,[n,i]=Et.useState(!1),o=mt.useRef(null),a=mt.useRef(null),u=mt.useRef(null),f=mt.useRef(null),h=mt.useRef(null),{tl:d,totalDuration:p=0,reverseModeRef:c}=mt.useContext(An),v=()=>{i(!0)},y=()=>{i(!1)},b=()=>{if(c.current&&f.current&&d.current){const m=d.current.time();m>t&&m<r&&(i(()=>!0),a.current&&(a.current.alpha=1))}},_=m=>{m<.2?i(!0):i(!1)};return Et.useEffect(()=>{const m={onStart:v,onStartParams:[{alpha:1}]},w={onComplete:y,onCompleteParams:[{alpha:t>0?0:1}]},T=Math.max(0,t-1),x=_e.context(()=>{if(o.current&&d.current){const E=_e.from(o.current,{alpha:t<.2?1:0,duration:.5,...m});d.current.add(E,T),d.current.to(o.current,{alpha:0,duration:.5,overwrite:"auto",...w},r-.5),t<.2&&i(!0),f.current=_e.to(u.current,{alpha:1,overwrite:"auto",duration:Number(r)-Number(t),onUpdate:b},t),d.current.add(f.current,t),p>.2&&d.current.call(_,[t],p-.3)}});return()=>{var E;(E=f.current)==null||E.kill(),x.revert()}},[t,r,p]),Et.useEffect(()=>{const m=_e.context(()=>{a.current&&d.current&&(h.current&&h.current.kill(),h.current=_e.to(a.current,{alpha:1,duration:.5,overwrite:"auto"}),d.current.add(h.current,t))});return()=>{h.current&&h.current.kill(),m.revert()}},[n,t]),Vt.jsx(le.Container,{ref:o,alpha:1,children:Vt.jsx(le.Container,{ref:u,children:n&&Vt.jsx(le.Container,{ref:a,alpha:t<.2?1:0,children:e.children})})})},wN=e=>{const{startAt:t,endAt:r}=e,{setTotalDuration:n}=mt.useContext(An);return Et.useEffect(()=>{n&&n(r)},[t,r]),e.children};var Av=(e=>(e.FADE_IN="FADE_IN",e.FADE_OUT="FADE_OUT",e.FADE_IN_OUT="FADE_IN_OUT",e.SLIDE_IN_LEFT="SLIDE_IN_LEFT",e.SLIDE_IN_RIGHT="SLIDE_IN_RIGHT",e.SLIDE_IN_TOP="SLIDE_IN_TOP",e.SLIDE_IN_BOTTOM="SLIDE_IN_BOTTOM",e.SLIDE_OUT_LEFT="SLIDE_OUT_LEFT",e.SLIDE_OUT_RIGHT="SLIDE_OUT_RIGHT",e.SLIDE_OUT_TOP="SLIDE_OUT_TOP",e.SLIDE_OUT_BOTTOM="SLIDE_OUT_BOTTOM",e.ZOOM_IN="ZOOM_IN",e.ZOOM_OUT="ZOOM_OUT",e.ZOOM_IN_OUT="ZOOM_IN_OUT",e.BOUNCE_IN="BOUNCE_IN",e.BOUNCE_OUT="BOUNCE_OUT",e.BOUNCE_IN_OUT="BOUNCE_IN_OUT",e.ELASTIC_IN="ELASTIC_IN",e.ELASTIC_OUT="ELASTIC_OUT",e.ELASTIC_IN_OUT="ELASTIC_IN_OUT",e.BACK_IN="BACK_IN",e.BACK_OUT="BACK_OUT",e.BACK_IN_OUT="BACK_IN_OUT",e.CIRCULAR_IN="CIRCULAR_IN",e.CIRCULAR_OUT="CIRCULAR_OUT",e.CIRCULAR_IN_OUT="CIRCULAR_IN_OUT",e.EXPO_IN="EXPO_IN",e.EXPO_OUT="EXPO_OUT",e.EXPO_IN_OUT="EXPO_IN_OUT",e.SINE_IN="SINE_IN",e.SINE_OUT="SINE_OUT",e.SINE_IN_OUT="SINE_IN_OUT",e.BOUNCE="BOUNCE",e.ELASTIC="ELASTIC",e.BACK="BACK",e.CIRCULAR="CIRCULAR",e.EXPO="EXPO",e.SINE="SINE",e))(Av||{}),Ov=(e=>(e[e.NORMAL=0]="NORMAL",e[e.ADD=1]="ADD",e[e.MULTIPLY=2]="MULTIPLY",e[e.SCREEN=3]="SCREEN",e[e.OVERLAY=4]="OVERLAY",e[e.DARKEN=5]="DARKEN",e[e.LIGHTEN=6]="LIGHTEN",e[e.COLOR_DODGE=7]="COLOR_DODGE",e[e.COLOR_BURN=8]="COLOR_BURN",e[e.HARD_LIGHT=9]="HARD_LIGHT",e[e.SOFT_LIGHT=10]="SOFT_LIGHT",e[e.DIFFERENCE=11]="DIFFERENCE",e[e.EXCLUSION=12]="EXCLUSION",e[e.HUE=13]="HUE",e[e.SATURATION=14]="SATURATION",e[e.COLOR=15]="COLOR",e[e.LUMINOSITY=16]="LUMINOSITY",e))(Ov||{});re.Animations=Av,re.BlendModes=Ov,re.Events=Oe,re.GsapPixieContext=An,re.GsapPixieContextProvider=my,re.PixiAnimatedSprite=xv,re.PixiAudioSprite=LS,re.PixiGifSprite=Tv,re.PixiImageSprite=gp,re.PixiSequence=xN,re.PixiSequenceWrapper=wN,re.PixiSvgPathSprite=oS,re.PixiTextSprite=_N,re.PixiVideoSprite=Sv,re.emitCustomEvent=ti,re.newCustomEventEmitter=gy,re.useCustomEventListener=Ze,Object.defineProperty(re,Symbol.toStringTag,{value:"Module"})});
2000
+ `)}return at}function oe(rt,at){var dt={},vt=rt.style||{};return vt.fontStyle&&X(rt).fontStyle==="italic"&&(dt.italic=!0),vt.fontWeight&&(X(rt).fontWeight.startsWith("bold")||parseInt(X(rt).fontWeight)>=700)&&(dt.bold=!0),Object.keys(dt).length>0&&(at=G(at,dt)),parseFloat(vt.textIndent||0)>0&&(at=new p.default().insert(" ").concat(at)),at}function Ht(rt,at){var dt=rt.data;if(rt.parentNode.tagName==="O:P")return at.insert(dt.trim());if(dt.trim().length===0&&rt.parentNode.classList.contains("ql-clipboard"))return at;if(!X(rt.parentNode).whiteSpace.startsWith("pre")){var vt=function(Pt,Lt){return Lt=Lt.replace(/[^\u00a0]/g,""),Lt.length<1&&Pt?" ":Lt};dt=dt.replace(/\r\n/g," ").replace(/\n/g," "),dt=dt.replace(/\s\s+/g,vt.bind(vt,!0)),(rt.previousSibling==null&&$(rt.parentNode)||rt.previousSibling!=null&&$(rt.previousSibling))&&(dt=dt.replace(/^\s+/,vt.bind(vt,!1))),(rt.nextSibling==null&&$(rt.parentNode)||rt.nextSibling!=null&&$(rt.nextSibling))&&(dt=dt.replace(/\s+$/,vt.bind(vt,!1)))}return at.insert(dt)}n.default=j,n.matchAttributor=J,n.matchBlot=it,n.matchNewline=xt,n.matchSpacing=At,n.matchText=Ht},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function y(b,_){for(var m=0;m<_.length;m++){var w=_[m];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(b,w.key,w)}}return function(b,_,m){return _&&y(b.prototype,_),m&&y(b,m),b}}(),a=function y(b,_,m){b===null&&(b=Function.prototype);var w=Object.getOwnPropertyDescriptor(b,_);if(w===void 0){var T=Object.getPrototypeOf(b);return T===null?void 0:y(T,_,m)}else{if("value"in w)return w.value;var x=w.get;return x===void 0?void 0:x.call(m)}},u=i(6),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function d(y,b){if(!(y instanceof b))throw new TypeError("Cannot call a class as a function")}function p(y,b){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:y}function c(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);y.prototype=Object.create(b&&b.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(y,b):y.__proto__=b)}var v=function(y){c(b,y);function b(){return d(this,b),p(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return o(b,[{key:"optimize",value:function(m){a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"optimize",this).call(this,m),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return a(b.__proto__||Object.getPrototypeOf(b),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),b}(f.default);v.blotName="bold",v.tagName=["STRONG","B"],n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.addControls=n.default=void 0;var o=function(){function C(P,M){var F=[],q=!0,Z=!1,z=void 0;try{for(var nt=P[Symbol.iterator](),V;!(q=(V=nt.next()).done)&&(F.push(V.value),!(M&&F.length===M));q=!0);}catch(U){Z=!0,z=U}finally{try{!q&&nt.return&&nt.return()}finally{if(Z)throw z}}return F}return function(P,M){if(Array.isArray(P))return P;if(Symbol.iterator in Object(P))return C(P,M);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function C(P,M){for(var F=0;F<M.length;F++){var q=M[F];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(P,q.key,q)}}return function(P,M,F){return M&&C(P.prototype,M),F&&C(P,F),P}}(),u=i(2),f=m(u),h=i(0),d=m(h),p=i(5),c=m(p),v=i(10),y=m(v),b=i(9),_=m(b);function m(C){return C&&C.__esModule?C:{default:C}}function w(C,P,M){return P in C?Object.defineProperty(C,P,{value:M,enumerable:!0,configurable:!0,writable:!0}):C[P]=M,C}function T(C,P){if(!(C instanceof P))throw new TypeError("Cannot call a class as a function")}function x(C,P){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P&&(typeof P=="object"||typeof P=="function")?P:C}function E(C,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof P);C.prototype=Object.create(P&&P.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),P&&(Object.setPrototypeOf?Object.setPrototypeOf(C,P):C.__proto__=P)}var I=(0,y.default)("quill:toolbar"),A=function(C){E(P,C);function P(M,F){T(this,P);var q=x(this,(P.__proto__||Object.getPrototypeOf(P)).call(this,M,F));if(Array.isArray(q.options.container)){var Z=document.createElement("div");L(Z,q.options.container),M.container.parentNode.insertBefore(Z,M.container),q.container=Z}else typeof q.options.container=="string"?q.container=document.querySelector(q.options.container):q.container=q.options.container;if(!(q.container instanceof HTMLElement)){var z;return z=I.error("Container required for toolbar",q.options),x(q,z)}return q.container.classList.add("ql-toolbar"),q.controls=[],q.handlers={},Object.keys(q.options.handlers).forEach(function(nt){q.addHandler(nt,q.options.handlers[nt])}),[].forEach.call(q.container.querySelectorAll("button, select"),function(nt){q.attach(nt)}),q.quill.on(c.default.events.EDITOR_CHANGE,function(nt,V){nt===c.default.events.SELECTION_CHANGE&&q.update(V)}),q.quill.on(c.default.events.SCROLL_OPTIMIZE,function(){var nt=q.quill.selection.getRange(),V=o(nt,1),U=V[0];q.update(U)}),q}return a(P,[{key:"addHandler",value:function(F,q){this.handlers[F]=q}},{key:"attach",value:function(F){var q=this,Z=[].find.call(F.classList,function(nt){return nt.indexOf("ql-")===0});if(Z){if(Z=Z.slice(3),F.tagName==="BUTTON"&&F.setAttribute("type","button"),this.handlers[Z]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[Z]==null){I.warn("ignoring attaching to disabled format",Z,F);return}if(d.default.query(Z)==null){I.warn("ignoring attaching to nonexistent format",Z,F);return}}var z=F.tagName==="SELECT"?"change":"click";F.addEventListener(z,function(nt){var V=void 0;if(F.tagName==="SELECT"){if(F.selectedIndex<0)return;var U=F.options[F.selectedIndex];U.hasAttribute("selected")?V=!1:V=U.value||!1}else F.classList.contains("ql-active")?V=!1:V=F.value||!F.hasAttribute("value"),nt.preventDefault();q.quill.focus();var k=q.quill.selection.getRange(),j=o(k,1),G=j[0];if(q.handlers[Z]!=null)q.handlers[Z].call(q,V);else if(d.default.query(Z).prototype instanceof d.default.Embed){if(V=prompt("Enter "+Z),!V)return;q.quill.updateContents(new f.default().retain(G.index).delete(G.length).insert(w({},Z,V)),c.default.sources.USER)}else q.quill.format(Z,V,c.default.sources.USER);q.update(G)}),this.controls.push([Z,F])}}},{key:"update",value:function(F){var q=F==null?{}:this.quill.getFormat(F);this.controls.forEach(function(Z){var z=o(Z,2),nt=z[0],V=z[1];if(V.tagName==="SELECT"){var U=void 0;if(F==null)U=null;else if(q[nt]==null)U=V.querySelector("option[selected]");else if(!Array.isArray(q[nt])){var k=q[nt];typeof k=="string"&&(k=k.replace(/\"/g,'\\"')),U=V.querySelector('option[value="'+k+'"]')}U==null?(V.value="",V.selectedIndex=-1):U.selected=!0}else if(F==null)V.classList.remove("ql-active");else if(V.hasAttribute("value")){var j=q[nt]===V.getAttribute("value")||q[nt]!=null&&q[nt].toString()===V.getAttribute("value")||q[nt]==null&&!V.getAttribute("value");V.classList.toggle("ql-active",j)}else V.classList.toggle("ql-active",q[nt]!=null)})}}]),P}(_.default);A.DEFAULTS={};function O(C,P,M){var F=document.createElement("button");F.setAttribute("type","button"),F.classList.add("ql-"+P),M!=null&&(F.value=M),C.appendChild(F)}function L(C,P){Array.isArray(P[0])||(P=[P]),P.forEach(function(M){var F=document.createElement("span");F.classList.add("ql-formats"),M.forEach(function(q){if(typeof q=="string")O(F,q);else{var Z=Object.keys(q)[0],z=q[Z];Array.isArray(z)?R(F,Z,z):O(F,Z,z)}}),C.appendChild(F)})}function R(C,P,M){var F=document.createElement("select");F.classList.add("ql-"+P),M.forEach(function(q){var Z=document.createElement("option");q!==!1?Z.setAttribute("value",q):Z.setAttribute("selected","selected"),F.appendChild(Z)}),C.appendChild(F)}A.DEFAULTS={container:null,handlers:{clean:function(){var P=this,M=this.quill.getSelection();if(M!=null)if(M.length==0){var F=this.quill.getFormat();Object.keys(F).forEach(function(q){d.default.query(q,d.default.Scope.INLINE)!=null&&P.quill.format(q,!1)})}else this.quill.removeFormat(M,c.default.sources.USER)},direction:function(P){var M=this.quill.getFormat().align;P==="rtl"&&M==null?this.quill.format("align","right",c.default.sources.USER):!P&&M==="right"&&this.quill.format("align",!1,c.default.sources.USER),this.quill.format("direction",P,c.default.sources.USER)},indent:function(P){var M=this.quill.getSelection(),F=this.quill.getFormat(M),q=parseInt(F.indent||0);if(P==="+1"||P==="-1"){var Z=P==="+1"?1:-1;F.direction==="rtl"&&(Z*=-1),this.quill.format("indent",q+Z,c.default.sources.USER)}},link:function(P){P===!0&&(P=prompt("Enter link URL:")),this.quill.format("link",P,c.default.sources.USER)},list:function(P){var M=this.quill.getSelection(),F=this.quill.getFormat(M);P==="check"?F.list==="checked"||F.list==="unchecked"?this.quill.format("list",!1,c.default.sources.USER):this.quill.format("list","unchecked",c.default.sources.USER):this.quill.format("list",P,c.default.sources.USER)}}},n.default=A,n.addControls=L},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function y(b,_){for(var m=0;m<_.length;m++){var w=_[m];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(b,w.key,w)}}return function(b,_,m){return _&&y(b.prototype,_),m&&y(b,m),b}}(),a=function y(b,_,m){b===null&&(b=Function.prototype);var w=Object.getOwnPropertyDescriptor(b,_);if(w===void 0){var T=Object.getPrototypeOf(b);return T===null?void 0:y(T,_,m)}else{if("value"in w)return w.value;var x=w.get;return x===void 0?void 0:x.call(m)}},u=i(28),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function d(y,b){if(!(y instanceof b))throw new TypeError("Cannot call a class as a function")}function p(y,b){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:y}function c(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);y.prototype=Object.create(b&&b.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(y,b):y.__proto__=b)}var v=function(y){c(b,y);function b(_,m){d(this,b);var w=p(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,_));return w.label.innerHTML=m,w.container.classList.add("ql-color-picker"),[].slice.call(w.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(T){T.classList.add("ql-primary")}),w}return o(b,[{key:"buildItem",value:function(m){var w=a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"buildItem",this).call(this,m);return w.style.backgroundColor=m.getAttribute("value")||"",w}},{key:"selectItem",value:function(m,w){a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"selectItem",this).call(this,m,w);var T=this.label.querySelector(".ql-color-label"),x=m&&m.getAttribute("data-value")||"";T&&(T.tagName==="line"?T.style.stroke=x:T.style.fill=x)}}]),b}(f.default);n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function y(b,_){for(var m=0;m<_.length;m++){var w=_[m];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(b,w.key,w)}}return function(b,_,m){return _&&y(b.prototype,_),m&&y(b,m),b}}(),a=function y(b,_,m){b===null&&(b=Function.prototype);var w=Object.getOwnPropertyDescriptor(b,_);if(w===void 0){var T=Object.getPrototypeOf(b);return T===null?void 0:y(T,_,m)}else{if("value"in w)return w.value;var x=w.get;return x===void 0?void 0:x.call(m)}},u=i(28),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function d(y,b){if(!(y instanceof b))throw new TypeError("Cannot call a class as a function")}function p(y,b){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:y}function c(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);y.prototype=Object.create(b&&b.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(y,b):y.__proto__=b)}var v=function(y){c(b,y);function b(_,m){d(this,b);var w=p(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,_));return w.container.classList.add("ql-icon-picker"),[].forEach.call(w.container.querySelectorAll(".ql-picker-item"),function(T){T.innerHTML=m[T.getAttribute("data-value")||""]}),w.defaultItem=w.container.querySelector(".ql-selected"),w.selectItem(w.defaultItem),w}return o(b,[{key:"selectItem",value:function(m,w){a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"selectItem",this).call(this,m,w),m=m||this.defaultItem,this.label.innerHTML=m.innerHTML}}]),b}(f.default);n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function f(h,d){for(var p=0;p<d.length;p++){var c=d[p];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(h,c.key,c)}}return function(h,d,p){return d&&f(h.prototype,d),p&&f(h,p),h}}();function a(f,h){if(!(f instanceof h))throw new TypeError("Cannot call a class as a function")}var u=function(){function f(h,d){var p=this;a(this,f),this.quill=h,this.boundsContainer=d||document.body,this.root=h.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){p.root.style.marginTop=-1*p.quill.root.scrollTop+"px"}),this.hide()}return o(f,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(d){var p=d.left+d.width/2-this.root.offsetWidth/2,c=d.bottom+this.quill.root.scrollTop;this.root.style.left=p+"px",this.root.style.top=c+"px",this.root.classList.remove("ql-flip");var v=this.boundsContainer.getBoundingClientRect(),y=this.root.getBoundingClientRect(),b=0;if(y.right>v.right&&(b=v.right-y.right,this.root.style.left=p+b+"px"),y.left<v.left&&(b=v.left-y.left,this.root.style.left=p+b+"px"),y.bottom>v.bottom){var _=y.bottom-y.top,m=d.bottom-d.top+_;this.root.style.top=c-m+"px",this.root.classList.add("ql-flip")}return b}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),f}();n.default=u},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function R(C,P){var M=[],F=!0,q=!1,Z=void 0;try{for(var z=C[Symbol.iterator](),nt;!(F=(nt=z.next()).done)&&(M.push(nt.value),!(P&&M.length===P));F=!0);}catch(V){q=!0,Z=V}finally{try{!F&&z.return&&z.return()}finally{if(q)throw Z}}return M}return function(C,P){if(Array.isArray(C))return C;if(Symbol.iterator in Object(C))return R(C,P);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function R(C,P,M){C===null&&(C=Function.prototype);var F=Object.getOwnPropertyDescriptor(C,P);if(F===void 0){var q=Object.getPrototypeOf(C);return q===null?void 0:R(q,P,M)}else{if("value"in F)return F.value;var Z=F.get;return Z===void 0?void 0:Z.call(M)}},u=function(){function R(C,P){for(var M=0;M<P.length;M++){var F=P[M];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(C,F.key,F)}}return function(C,P,M){return P&&R(C.prototype,P),M&&R(C,M),C}}(),f=i(3),h=T(f),d=i(8),p=T(d),c=i(43),v=T(c),y=i(27),b=T(y),_=i(15),m=i(41),w=T(m);function T(R){return R&&R.__esModule?R:{default:R}}function x(R,C){if(!(R instanceof C))throw new TypeError("Cannot call a class as a function")}function E(R,C){if(!R)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C&&(typeof C=="object"||typeof C=="function")?C:R}function I(R,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof C);R.prototype=Object.create(C&&C.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),C&&(Object.setPrototypeOf?Object.setPrototypeOf(R,C):R.__proto__=C)}var A=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],O=function(R){I(C,R);function C(P,M){x(this,C),M.modules.toolbar!=null&&M.modules.toolbar.container==null&&(M.modules.toolbar.container=A);var F=E(this,(C.__proto__||Object.getPrototypeOf(C)).call(this,P,M));return F.quill.container.classList.add("ql-snow"),F}return u(C,[{key:"extendToolbar",value:function(M){M.container.classList.add("ql-snow"),this.buildButtons([].slice.call(M.container.querySelectorAll("button")),w.default),this.buildPickers([].slice.call(M.container.querySelectorAll("select")),w.default),this.tooltip=new L(this.quill,this.options.bounds),M.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(F,q){M.handlers.link.call(M,!q.format.link)})}}]),C}(v.default);O.DEFAULTS=(0,h.default)(!0,{},v.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(C){if(C){var P=this.quill.getSelection();if(P==null||P.length==0)return;var M=this.quill.getText(P);/^\S+@\S+\.\S+$/.test(M)&&M.indexOf("mailto:")!==0&&(M="mailto:"+M);var F=this.quill.theme.tooltip;F.edit("link",M)}else this.quill.format("link",!1)}}}}});var L=function(R){I(C,R);function C(P,M){x(this,C);var F=E(this,(C.__proto__||Object.getPrototypeOf(C)).call(this,P,M));return F.preview=F.root.querySelector("a.ql-preview"),F}return u(C,[{key:"listen",value:function(){var M=this;a(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(F){M.root.classList.contains("ql-editing")?M.save():M.edit("link",M.preview.textContent),F.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(F){if(M.linkRange!=null){var q=M.linkRange;M.restoreFocus(),M.quill.formatText(q,"link",!1,p.default.sources.USER),delete M.linkRange}F.preventDefault(),M.hide()}),this.quill.on(p.default.events.SELECTION_CHANGE,function(F,q,Z){if(F!=null){if(F.length===0&&Z===p.default.sources.USER){var z=M.quill.scroll.descendant(b.default,F.index),nt=o(z,2),V=nt[0],U=nt[1];if(V!=null){M.linkRange=new _.Range(F.index-U,V.length());var k=b.default.formats(V.domNode);M.preview.textContent=k,M.preview.setAttribute("href",k),M.show(),M.position(M.quill.getBounds(M.linkRange));return}}else delete M.linkRange;M.hide()}})}},{key:"show",value:function(){a(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),C}(c.BaseTooltip);L.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),n.default=O},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(29),a=ct(o),u=i(36),f=i(38),h=i(64),d=i(65),p=ct(d),c=i(66),v=ct(c),y=i(67),b=ct(y),_=i(37),m=i(26),w=i(39),T=i(40),x=i(56),E=ct(x),I=i(68),A=ct(I),O=i(27),L=ct(O),R=i(69),C=ct(R),P=i(70),M=ct(P),F=i(71),q=ct(F),Z=i(72),z=ct(Z),nt=i(73),V=ct(nt),U=i(13),k=ct(U),j=i(74),G=ct(j),X=i(75),Y=ct(X),$=i(57),W=ct($),et=i(41),J=ct(et),it=i(28),lt=ct(it),pt=i(59),yt=ct(pt),xt=i(60),At=ct(xt),oe=i(61),Ht=ct(oe),rt=i(108),at=ct(rt),dt=i(62),vt=ct(dt);function ct(Pt){return Pt&&Pt.__esModule?Pt:{default:Pt}}a.default.register({"attributors/attribute/direction":f.DirectionAttribute,"attributors/class/align":u.AlignClass,"attributors/class/background":_.BackgroundClass,"attributors/class/color":m.ColorClass,"attributors/class/direction":f.DirectionClass,"attributors/class/font":w.FontClass,"attributors/class/size":T.SizeClass,"attributors/style/align":u.AlignStyle,"attributors/style/background":_.BackgroundStyle,"attributors/style/color":m.ColorStyle,"attributors/style/direction":f.DirectionStyle,"attributors/style/font":w.FontStyle,"attributors/style/size":T.SizeStyle},!0),a.default.register({"formats/align":u.AlignClass,"formats/direction":f.DirectionClass,"formats/indent":h.IndentClass,"formats/background":_.BackgroundStyle,"formats/color":m.ColorStyle,"formats/font":w.FontClass,"formats/size":T.SizeClass,"formats/blockquote":p.default,"formats/code-block":k.default,"formats/header":v.default,"formats/list":b.default,"formats/bold":E.default,"formats/code":U.Code,"formats/italic":A.default,"formats/link":L.default,"formats/script":C.default,"formats/strike":M.default,"formats/underline":q.default,"formats/image":z.default,"formats/video":V.default,"formats/list/item":y.ListItem,"modules/formula":G.default,"modules/syntax":Y.default,"modules/toolbar":W.default,"themes/bubble":at.default,"themes/snow":vt.default,"ui/icons":J.default,"ui/picker":lt.default,"ui/icon-picker":At.default,"ui/color-picker":yt.default,"ui/tooltip":Ht.default},!0),n.default=a.default},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.IndentClass=void 0;var o=function(){function b(_,m){for(var w=0;w<m.length;w++){var T=m[w];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(_,T.key,T)}}return function(_,m,w){return m&&b(_.prototype,m),w&&b(_,w),_}}(),a=function b(_,m,w){_===null&&(_=Function.prototype);var T=Object.getOwnPropertyDescriptor(_,m);if(T===void 0){var x=Object.getPrototypeOf(_);return x===null?void 0:b(x,m,w)}else{if("value"in T)return T.value;var E=T.get;return E===void 0?void 0:E.call(w)}},u=i(0),f=h(u);function h(b){return b&&b.__esModule?b:{default:b}}function d(b,_){if(!(b instanceof _))throw new TypeError("Cannot call a class as a function")}function p(b,_){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:b}function c(b,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);b.prototype=Object.create(_&&_.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(b,_):b.__proto__=_)}var v=function(b){c(_,b);function _(){return d(this,_),p(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return o(_,[{key:"add",value:function(w,T){if(T==="+1"||T==="-1"){var x=this.value(w)||0;T=T==="+1"?x+1:x-1}return T===0?(this.remove(w),!0):a(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"add",this).call(this,w,T)}},{key:"canAdd",value:function(w,T){return a(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"canAdd",this).call(this,w,T)||a(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"canAdd",this).call(this,w,parseInt(T))}},{key:"value",value:function(w){return parseInt(a(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"value",this).call(this,w))||void 0}}]),_}(f.default.Attributor.Class),y=new v("indent","ql-indent",{scope:f.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});n.IndentClass=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(4),a=u(o);function u(c){return c&&c.__esModule?c:{default:c}}function f(c,v){if(!(c instanceof v))throw new TypeError("Cannot call a class as a function")}function h(c,v){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:c}function d(c,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);c.prototype=Object.create(v&&v.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(c,v):c.__proto__=v)}var p=function(c){d(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(a.default);p.blotName="blockquote",p.tagName="blockquote",n.default=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function v(y,b){for(var _=0;_<b.length;_++){var m=b[_];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(y,m.key,m)}}return function(y,b,_){return b&&v(y.prototype,b),_&&v(y,_),y}}(),a=i(4),u=f(a);function f(v){return v&&v.__esModule?v:{default:v}}function h(v,y){if(!(v instanceof y))throw new TypeError("Cannot call a class as a function")}function d(v,y){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:v}function p(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);v.prototype=Object.create(y&&y.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(v,y):v.__proto__=y)}var c=function(v){p(y,v);function y(){return h(this,y),d(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return o(y,null,[{key:"formats",value:function(_){return this.tagName.indexOf(_.tagName)+1}}]),y}(u.default);c.blotName="header",c.tagName=["H1","H2","H3","H4","H5","H6"],n.default=c},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.ListItem=void 0;var o=function(){function x(E,I){for(var A=0;A<I.length;A++){var O=I[A];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(E,O.key,O)}}return function(E,I,A){return I&&x(E.prototype,I),A&&x(E,A),E}}(),a=function x(E,I,A){E===null&&(E=Function.prototype);var O=Object.getOwnPropertyDescriptor(E,I);if(O===void 0){var L=Object.getPrototypeOf(E);return L===null?void 0:x(L,I,A)}else{if("value"in O)return O.value;var R=O.get;return R===void 0?void 0:R.call(A)}},u=i(0),f=v(u),h=i(4),d=v(h),p=i(25),c=v(p);function v(x){return x&&x.__esModule?x:{default:x}}function y(x,E,I){return E in x?Object.defineProperty(x,E,{value:I,enumerable:!0,configurable:!0,writable:!0}):x[E]=I,x}function b(x,E){if(!(x instanceof E))throw new TypeError("Cannot call a class as a function")}function _(x,E){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:x}function m(x,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);x.prototype=Object.create(E&&E.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(x,E):x.__proto__=E)}var w=function(x){m(E,x);function E(){return b(this,E),_(this,(E.__proto__||Object.getPrototypeOf(E)).apply(this,arguments))}return o(E,[{key:"format",value:function(A,O){A===T.blotName&&!O?this.replaceWith(f.default.create(this.statics.scope)):a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"format",this).call(this,A,O)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(A,O){return this.parent.isolate(this.offset(this.parent),this.length()),A===this.parent.statics.blotName?(this.parent.replaceWith(A,O),this):(this.parent.unwrap(),a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"replaceWith",this).call(this,A,O))}}],[{key:"formats",value:function(A){return A.tagName===this.tagName?void 0:a(E.__proto__||Object.getPrototypeOf(E),"formats",this).call(this,A)}}]),E}(d.default);w.blotName="list-item",w.tagName="LI";var T=function(x){m(E,x),o(E,null,[{key:"create",value:function(A){var O=A==="ordered"?"OL":"UL",L=a(E.__proto__||Object.getPrototypeOf(E),"create",this).call(this,O);return(A==="checked"||A==="unchecked")&&L.setAttribute("data-checked",A==="checked"),L}},{key:"formats",value:function(A){if(A.tagName==="OL")return"ordered";if(A.tagName==="UL")return A.hasAttribute("data-checked")?A.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function E(I){b(this,E);var A=_(this,(E.__proto__||Object.getPrototypeOf(E)).call(this,I)),O=function(R){if(R.target.parentNode===I){var C=A.statics.formats(I),P=f.default.find(R.target);C==="checked"?P.format("list","unchecked"):C==="unchecked"&&P.format("list","checked")}};return I.addEventListener("touchstart",O),I.addEventListener("mousedown",O),A}return o(E,[{key:"format",value:function(A,O){this.children.length>0&&this.children.tail.format(A,O)}},{key:"formats",value:function(){return y({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(A,O){if(A instanceof w)a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"insertBefore",this).call(this,A,O);else{var L=O==null?this.length():O.offset(this),R=this.split(L);R.parent.insertBefore(A,R)}}},{key:"optimize",value:function(A){a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"optimize",this).call(this,A);var O=this.next;O!=null&&O.prev===this&&O.statics.blotName===this.statics.blotName&&O.domNode.tagName===this.domNode.tagName&&O.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(O.moveChildren(this),O.remove())}},{key:"replace",value:function(A){if(A.statics.blotName!==this.statics.blotName){var O=f.default.create(this.statics.defaultChild);A.moveChildren(O),this.appendChild(O)}a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"replace",this).call(this,A)}}]),E}(c.default);T.blotName="list",T.scope=f.default.Scope.BLOCK_BLOT,T.tagName=["OL","UL"],T.defaultChild="list-item",T.allowedChildren=[w],n.ListItem=w,n.default=T},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(56),a=u(o);function u(c){return c&&c.__esModule?c:{default:c}}function f(c,v){if(!(c instanceof v))throw new TypeError("Cannot call a class as a function")}function h(c,v){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:c}function d(c,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);c.prototype=Object.create(v&&v.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(c,v):c.__proto__=v)}var p=function(c){d(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(a.default);p.blotName="italic",p.tagName=["EM","I"],n.default=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function y(b,_){for(var m=0;m<_.length;m++){var w=_[m];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(b,w.key,w)}}return function(b,_,m){return _&&y(b.prototype,_),m&&y(b,m),b}}(),a=function y(b,_,m){b===null&&(b=Function.prototype);var w=Object.getOwnPropertyDescriptor(b,_);if(w===void 0){var T=Object.getPrototypeOf(b);return T===null?void 0:y(T,_,m)}else{if("value"in w)return w.value;var x=w.get;return x===void 0?void 0:x.call(m)}},u=i(6),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function d(y,b){if(!(y instanceof b))throw new TypeError("Cannot call a class as a function")}function p(y,b){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:y}function c(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);y.prototype=Object.create(b&&b.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(y,b):y.__proto__=b)}var v=function(y){c(b,y);function b(){return d(this,b),p(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return o(b,null,[{key:"create",value:function(m){return m==="super"?document.createElement("sup"):m==="sub"?document.createElement("sub"):a(b.__proto__||Object.getPrototypeOf(b),"create",this).call(this,m)}},{key:"formats",value:function(m){if(m.tagName==="SUB")return"sub";if(m.tagName==="SUP")return"super"}}]),b}(f.default);v.blotName="script",v.tagName=["SUB","SUP"],n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(6),a=u(o);function u(c){return c&&c.__esModule?c:{default:c}}function f(c,v){if(!(c instanceof v))throw new TypeError("Cannot call a class as a function")}function h(c,v){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:c}function d(c,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);c.prototype=Object.create(v&&v.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(c,v):c.__proto__=v)}var p=function(c){d(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(a.default);p.blotName="strike",p.tagName="S",n.default=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(6),a=u(o);function u(c){return c&&c.__esModule?c:{default:c}}function f(c,v){if(!(c instanceof v))throw new TypeError("Cannot call a class as a function")}function h(c,v){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:c}function d(c,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);c.prototype=Object.create(v&&v.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(c,v):c.__proto__=v)}var p=function(c){d(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(a.default);p.blotName="underline",p.tagName="U",n.default=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function _(m,w){for(var T=0;T<w.length;T++){var x=w[T];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,w,T){return w&&_(m.prototype,w),T&&_(m,T),m}}(),a=function _(m,w,T){m===null&&(m=Function.prototype);var x=Object.getOwnPropertyDescriptor(m,w);if(x===void 0){var E=Object.getPrototypeOf(m);return E===null?void 0:_(E,w,T)}else{if("value"in x)return x.value;var I=x.get;return I===void 0?void 0:I.call(T)}},u=i(0),f=d(u),h=i(27);function d(_){return _&&_.__esModule?_:{default:_}}function p(_,m){if(!(_ instanceof m))throw new TypeError("Cannot call a class as a function")}function c(_,m){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:_}function v(_,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);_.prototype=Object.create(m&&m.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(_,m):_.__proto__=m)}var y=["alt","height","width"],b=function(_){v(m,_);function m(){return p(this,m),c(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return o(m,[{key:"format",value:function(T,x){y.indexOf(T)>-1?x?this.domNode.setAttribute(T,x):this.domNode.removeAttribute(T):a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"format",this).call(this,T,x)}}],[{key:"create",value:function(T){var x=a(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,T);return typeof T=="string"&&x.setAttribute("src",this.sanitize(T)),x}},{key:"formats",value:function(T){return y.reduce(function(x,E){return T.hasAttribute(E)&&(x[E]=T.getAttribute(E)),x},{})}},{key:"match",value:function(T){return/\.(jpe?g|gif|png)$/.test(T)||/^data:image\/.+;base64/.test(T)}},{key:"sanitize",value:function(T){return(0,h.sanitize)(T,["http","https","data"])?T:"//:0"}},{key:"value",value:function(T){return T.getAttribute("src")}}]),m}(f.default.Embed);b.blotName="image",b.tagName="IMG",n.default=b},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function _(m,w){for(var T=0;T<w.length;T++){var x=w[T];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,w,T){return w&&_(m.prototype,w),T&&_(m,T),m}}(),a=function _(m,w,T){m===null&&(m=Function.prototype);var x=Object.getOwnPropertyDescriptor(m,w);if(x===void 0){var E=Object.getPrototypeOf(m);return E===null?void 0:_(E,w,T)}else{if("value"in x)return x.value;var I=x.get;return I===void 0?void 0:I.call(T)}},u=i(4),f=i(27),h=d(f);function d(_){return _&&_.__esModule?_:{default:_}}function p(_,m){if(!(_ instanceof m))throw new TypeError("Cannot call a class as a function")}function c(_,m){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:_}function v(_,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);_.prototype=Object.create(m&&m.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(_,m):_.__proto__=m)}var y=["height","width"],b=function(_){v(m,_);function m(){return p(this,m),c(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return o(m,[{key:"format",value:function(T,x){y.indexOf(T)>-1?x?this.domNode.setAttribute(T,x):this.domNode.removeAttribute(T):a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"format",this).call(this,T,x)}}],[{key:"create",value:function(T){var x=a(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,T);return x.setAttribute("frameborder","0"),x.setAttribute("allowfullscreen",!0),x.setAttribute("src",this.sanitize(T)),x}},{key:"formats",value:function(T){return y.reduce(function(x,E){return T.hasAttribute(E)&&(x[E]=T.getAttribute(E)),x},{})}},{key:"sanitize",value:function(T){return h.default.sanitize(T)}},{key:"value",value:function(T){return T.getAttribute("src")}}]),m}(u.BlockEmbed);b.blotName="video",b.className="ql-video",b.tagName="IFRAME",n.default=b},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.FormulaBlot=void 0;var o=function(){function T(x,E){for(var I=0;I<E.length;I++){var A=E[I];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(x,A.key,A)}}return function(x,E,I){return E&&T(x.prototype,E),I&&T(x,I),x}}(),a=function T(x,E,I){x===null&&(x=Function.prototype);var A=Object.getOwnPropertyDescriptor(x,E);if(A===void 0){var O=Object.getPrototypeOf(x);return O===null?void 0:T(O,E,I)}else{if("value"in A)return A.value;var L=A.get;return L===void 0?void 0:L.call(I)}},u=i(35),f=v(u),h=i(5),d=v(h),p=i(9),c=v(p);function v(T){return T&&T.__esModule?T:{default:T}}function y(T,x){if(!(T instanceof x))throw new TypeError("Cannot call a class as a function")}function b(T,x){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:T}function _(T,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);T.prototype=Object.create(x&&x.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(T,x):T.__proto__=x)}var m=function(T){_(x,T);function x(){return y(this,x),b(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return o(x,null,[{key:"create",value:function(I){var A=a(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,I);return typeof I=="string"&&(window.katex.render(I,A,{throwOnError:!1,errorColor:"#f00"}),A.setAttribute("data-value",I)),A}},{key:"value",value:function(I){return I.getAttribute("data-value")}}]),x}(f.default);m.blotName="formula",m.className="ql-formula",m.tagName="SPAN";var w=function(T){_(x,T),o(x,null,[{key:"register",value:function(){d.default.register(m,!0)}}]);function x(){y(this,x);var E=b(this,(x.__proto__||Object.getPrototypeOf(x)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return E}return x}(c.default);n.FormulaBlot=m,n.default=w},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.CodeToken=n.CodeBlock=void 0;var o=function(){function I(A,O){for(var L=0;L<O.length;L++){var R=O[L];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(A,R.key,R)}}return function(A,O,L){return O&&I(A.prototype,O),L&&I(A,L),A}}(),a=function I(A,O,L){A===null&&(A=Function.prototype);var R=Object.getOwnPropertyDescriptor(A,O);if(R===void 0){var C=Object.getPrototypeOf(A);return C===null?void 0:I(C,O,L)}else{if("value"in R)return R.value;var P=R.get;return P===void 0?void 0:P.call(L)}},u=i(0),f=b(u),h=i(5),d=b(h),p=i(9),c=b(p),v=i(13),y=b(v);function b(I){return I&&I.__esModule?I:{default:I}}function _(I,A){if(!(I instanceof A))throw new TypeError("Cannot call a class as a function")}function m(I,A){if(!I)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:I}function w(I,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);I.prototype=Object.create(A&&A.prototype,{constructor:{value:I,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(I,A):I.__proto__=A)}var T=function(I){w(A,I);function A(){return _(this,A),m(this,(A.__proto__||Object.getPrototypeOf(A)).apply(this,arguments))}return o(A,[{key:"replaceWith",value:function(L){this.domNode.textContent=this.domNode.textContent,this.attach(),a(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"replaceWith",this).call(this,L)}},{key:"highlight",value:function(L){var R=this.domNode.textContent;this.cachedText!==R&&((R.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=L(R),this.domNode.normalize(),this.attach()),this.cachedText=R)}}]),A}(y.default);T.className="ql-syntax";var x=new f.default.Attributor.Class("token","hljs",{scope:f.default.Scope.INLINE}),E=function(I){w(A,I),o(A,null,[{key:"register",value:function(){d.default.register(x,!0),d.default.register(T,!0)}}]);function A(O,L){_(this,A);var R=m(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,O,L));if(typeof R.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var C=null;return R.quill.on(d.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(C),C=setTimeout(function(){R.highlight(),C=null},R.options.interval)}),R.highlight(),R}return o(A,[{key:"highlight",value:function(){var L=this;if(!this.quill.selection.composing){this.quill.update(d.default.sources.USER);var R=this.quill.getSelection();this.quill.scroll.descendants(T).forEach(function(C){C.highlight(L.options.highlight)}),this.quill.update(d.default.sources.SILENT),R!=null&&this.quill.setSelection(R,d.default.sources.SILENT)}}}]),A}(c.default);E.DEFAULTS={highlight:function(){return window.hljs==null?null:function(I){var A=window.hljs.highlightAuto(I);return A.value}}(),interval:1e3},n.CodeBlock=T,n.CodeToken=x,n.default=E},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(r,n){r.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(r,n){r.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(r,n){r.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(r,n){r.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BubbleTooltip=void 0;var o=function A(O,L,R){O===null&&(O=Function.prototype);var C=Object.getOwnPropertyDescriptor(O,L);if(C===void 0){var P=Object.getPrototypeOf(O);return P===null?void 0:A(P,L,R)}else{if("value"in C)return C.value;var M=C.get;return M===void 0?void 0:M.call(R)}},a=function(){function A(O,L){for(var R=0;R<L.length;R++){var C=L[R];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(O,C.key,C)}}return function(O,L,R){return L&&A(O.prototype,L),R&&A(O,R),O}}(),u=i(3),f=_(u),h=i(8),d=_(h),p=i(43),c=_(p),v=i(15),y=i(41),b=_(y);function _(A){return A&&A.__esModule?A:{default:A}}function m(A,O){if(!(A instanceof O))throw new TypeError("Cannot call a class as a function")}function w(A,O){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:A}function T(A,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);A.prototype=Object.create(O&&O.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(A,O):A.__proto__=O)}var x=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],E=function(A){T(O,A);function O(L,R){m(this,O),R.modules.toolbar!=null&&R.modules.toolbar.container==null&&(R.modules.toolbar.container=x);var C=w(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,L,R));return C.quill.container.classList.add("ql-bubble"),C}return a(O,[{key:"extendToolbar",value:function(R){this.tooltip=new I(this.quill,this.options.bounds),this.tooltip.root.appendChild(R.container),this.buildButtons([].slice.call(R.container.querySelectorAll("button")),b.default),this.buildPickers([].slice.call(R.container.querySelectorAll("select")),b.default)}}]),O}(c.default);E.DEFAULTS=(0,f.default)(!0,{},c.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(O){O?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var I=function(A){T(O,A);function O(L,R){m(this,O);var C=w(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,L,R));return C.quill.on(d.default.events.EDITOR_CHANGE,function(P,M,F,q){if(P===d.default.events.SELECTION_CHANGE)if(M!=null&&M.length>0&&q===d.default.sources.USER){C.show(),C.root.style.left="0px",C.root.style.width="",C.root.style.width=C.root.offsetWidth+"px";var Z=C.quill.getLines(M.index,M.length);if(Z.length===1)C.position(C.quill.getBounds(M));else{var z=Z[Z.length-1],nt=C.quill.getIndex(z),V=Math.min(z.length()-1,M.index+M.length-nt),U=C.quill.getBounds(new v.Range(nt,V));C.position(U)}}else document.activeElement!==C.textbox&&C.quill.hasFocus()&&C.hide()}),C}return a(O,[{key:"listen",value:function(){var R=this;o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){R.root.classList.remove("ql-editing")}),this.quill.on(d.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!R.root.classList.contains("ql-hidden")){var C=R.quill.getSelection();C!=null&&R.position(R.quill.getBounds(C))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(R){var C=o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"position",this).call(this,R),P=this.root.querySelector(".ql-tooltip-arrow");if(P.style.marginLeft="",C===0)return C;P.style.marginLeft=-1*C-P.offsetWidth/2+"px"}}]),O}(p.BaseTooltip);I.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),n.BubbleTooltip=I,n.default=E},function(r,n,i){r.exports=i(63)}]).default})})(Ev);var mN=Ev.exports;const yN=En(mN),oB="",_N=Et.forwardRef((e,t)=>{const[r,n]=mt.useState(!1),i=300,o=mt.useRef(null),a=mt.useRef(0),u=mt.useRef(null),f=mt.useRef(null),h=mt.useRef(null),d=mt.useRef(16),p=mt.useRef(null),c=mt.useRef(null),{uniqueId:v,text:y,disabled:b,transformation:_,onTextUpdate:m,pointerdown:w,onExitQuillEditor:T}=e,{x,y:E,fontFamily:I="Arial",fontWeight:A="normal",fontStyle:O="normal",fontSize:L=16,fontVariant:R="normal",fill:C="black",stroke:P,strokeThickness:M=0,blurRadius:F=0,blurEnabled:q=!1,dropShadowColor:Z=null,dropShadow:z=!1,dropShadowBlur:nt=0,wordWrapWidth:V=5e7,leading:U=0,letterSpacing:k,colorCorrection:j={}}=_,{temperatureFilter:G,sharpnessFilter:X,hueFilter:Y,blurFilter:$,adjustmentFilter:W}=ys(j),{blurRadius:et=0}=j;Et.useEffect(()=>{d.current=Number(L)},[L]);const J=["italic","oblique"].includes(O)?O:void 0,it=["small-caps"].includes(R),lt=["bold","bolder","lighter","100","200","300"].includes(A)?A:void 0,pt=Number(k)>0?k:void 0,yt=Et.useMemo(()=>new zr.TextStyle({fontFamily:I,fontSize:L,fill:C||"white",...P&&M>0&&{stroke:P,strokeThickness:M},...J&&{fontStyle:J},...it&&{fontVariant:it},...lt&&{fontWeight:lt},...pt&&{letterSpacing:pt},...q&&{dropShadow:!0,dropShadowBlur:Number(F),dropShadowColor:(Z==null?void 0:Z.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},...z&&{dropShadow:!0,dropShadowBlur:Number(nt),dropShadowColor:(Z==null?void 0:Z.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},wordWrap:!0,breakWords:!0,wordWrapWidth:V||500,leading:U||0}),[q,F,C,I,L,O,U,J,lt,it,pt,Z,P,M,V,z,nt]);Et.useEffect(()=>{p.current={..._}},[_]);const xt=()=>{n(!0)},At=()=>{const rt=new Date().getTime();rt-a.current<i?xt():w&&w(),a.current=rt},oe=rt=>{m&&m({text:rt&&rt.replace(/\n+/g,`
2001
+ `),uniqueId:v})},Ht=()=>{n(!1),T&&T()};return Et.useEffect(()=>{if(r&&f.current){let rt=document.getElementById("note-editor");if(rt){rt.style.position="absolute",rt.style.display="block",rt.style.zIndex="10",rt.style.left=x+"px",rt.style.top=E+"px",rt.style.backgroundColor="var(--chakra-color-darkShark)",rt.style.transform="scale(1.5)",rt.style.width="300px",rt.style.height="100px",rt.style.color="#fff",rt.style.fontSize="20px",rt.style.border="1px solid #CBCEE0";const at={esc:{key:27,handler:function(){Ht()}}};if(c.current=new yN("#note-editor",{modules:{toolbar:!1,keyboard:{bindings:{...at}}},placeholder:"Compose your text here...",theme:"snow"}),c.current){c.current.on("text-change",function(){c.current&&oe(c.current.root.innerText)}),c.current.setText(y),c.current.focus(),c.current.off("text-change",()=>{}),c.current.hasFocus()||(rt.style.display="none");const dt=document.createElement("button");dt.innerHTML="&#10006;",dt.style.position="absolute",dt.style.bottom="-14px",dt.style.left="-3px",dt.style.cursor="pointer",dt.addEventListener("click",()=>{Ht()}),dt.style.border="none",dt.style.borderRadius="50%",dt.style.width="15px",dt.style.height="15px",dt.style.backgroundColor="#f8f8f8",dt.style.color="#333",dt.style.fontSize="10px",rt.appendChild(dt)}}}else if(c.current){let rt=document.getElementById("note-editor");rt&&rt.hasChildNodes()&&(rt.removeChild(rt.firstChild),rt.removeAttribute("class"),rt.removeAttribute("style")),c.current.off("text-change",()=>{})}return()=>{c.current&&c.current.off("text-change",()=>{})}},[x,E,r]),Et.useEffect(()=>{if(!r){const rt=document.getElementById("note-editor");rt&&(rt.style.display="none")}},[r]),Vt.jsx(ni,{...e,ref:t,isText:!0,onDoubleClick:xt,isTextEditMode:r,children:Vt.jsxs(le.Container,{ref:o,children:[r&&Vt.jsx(le.Container,{ref:f}),Vt.jsx(le.Container,{alpha:r?0:1,ref:h,children:Vt.jsx(le.Text,{style:yt,x,y:E,anchor:.5,text:y,...!r&&!b&&{interactive:!0,buttonMode:!0,pointerdown:At},ref:u,filters:[G,X,Y,W,...et>0?[$]:[]]})})]})})}),bN={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,isStalled:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,timeDiff:0},Sv=Et.forwardRef((e,t)=>{const[,r]=Et.useState(!1),[n,i]=Et.useState(),o=mt.useRef(null),a=mt.useRef(null),u=mt.useRef(null),f=mt.useRef(bN),h=mt.useRef(),{tl:d,dragModeRef:p}=mt.useContext(An),{uniqueId:c,mute:v=!1,src:y,startAt:b,endAt:_,frameStartAt:m,frameEndAt:w,transformation:{x:T,y:x,width:E,height:I,animation:A,colorCorrection:O={}},pointerdown:L}=e,{blurRadius:R=0}=O,{temperatureFilter:C,sharpnessFilter:P,hueFilter:M,blurFilter:F,adjustmentFilter:q}=ys(O),Z=y||"",z=Et.useMemo(()=>{const G=document.createElement("video");return G.src=y,G.crossOrigin="Anonymus",G.autoplay=!1,G.currentTime=m===0?.001:m,G},[y,m]);Ze(Oe.PAUSE,()=>{if(u.current){const G=u.current;G.currentTime>0&&!G.paused&&!G.ended&&G.readyState>G.HAVE_CURRENT_DATA&&u.current.pause(),f.current.isPlaying=!1}});const nt=Et.useCallback(Bu(()=>{if(u.current){const G=u.current;G.currentTime>0&&!G.paused&&!G.ended&&G.readyState>G.HAVE_CURRENT_DATA&&u.current.pause(),f.current.isPlaying=!1}},400),[u]);Et.useEffect(()=>{u.current?(p.current?(nt(),f.current.isPlaying=!1,f.current.isDragging=!0):f.current.isDragging=!1,u.current.muted=v):f.current.isDragging=!1},[v,p,nt,u]);const V=G=>{if(u.current){if(u.current.currentTime=Number(G),!p.current){const X=u.current,Y=X.currentTime>0&&!X.paused&&!X.ended&&X.readyState>X.HAVE_CURRENT_DATA;u.current.currentTime=Number(G),d.current&&d.current.isActive()&&h.current&&h.current.isActive()&&(Y||u.current.play(),f.current.isPlaying=!0)}f.current.progress=0}},U=()=>{if(u.current){const G=u.current;G.currentTime>0&&!G.paused&&!G.ended&&G.readyState>G.HAVE_CURRENT_DATA&&u.current.pause(),f.current.isPlaying=!1,h.current&&(f.current.progress=h.current.progress())}},k=()=>{},j=()=>{var G,X;if(h.current&&(f.current.progress=h.current.progress()),u.current&&h.current){const Y=m+((G=h==null?void 0:h.current)==null?void 0:G.time()),$=Math.abs(u.current.currentTime-Y),W=u.current,et=W.currentTime>0&&!W.paused&&!W.ended&&W.readyState>W.HAVE_CURRENT_DATA;p.current?(u.current.currentTime=Y,setTimeout(()=>{u.current&&u.current.play().then(()=>{f.current.isPlaying=!1,u.current&&u.current.pause()})},100),f.current.isPlaying=!1):!f.current.isPlaying&&f.current.progress>.01&&f.current.progress<.99?(X=d.current)!=null&&X.isActive()&&h.current&&h.current.isActive()&&(et||u.current.play(),f.current.isPlaying=!0):$>.3&&f.current.progress>.01&&f.current.progress<.99}};return mt.useEffect(()=>{let G=_e.context(()=>{});if(a.current&&d.current){const X={duration:Number(w)-Number(m),onStart:V,onComplete:U,onStartParams:[m,w],onCompleteParams:[],onInterrupt:k,onUpdate:j,onUpdateParams:[m,w]};G=_e.context(()=>{h.current=_e.from(a.current,X,m),d.current.add(h.current,b)})}return()=>{h.current&&(h.current.kill(),_e.killTweensOf(h.current)),G.revert()}},[A,b,_,m,w]),Et.useEffect(()=>{a.current&&r(!0)},[]),Et.useEffect(()=>{u.current&&(u.current.muted=v)},[v]),Et.useEffect(()=>{const G=Math.round((Number(m)+Number.EPSILON)*100)/100,X=function(){u.current&&(u.current.currentTime=G)},Y=function(){if(u.current){const pt=u.current;pt.currentTime>0&&!pt.paused&&!pt.ended&&pt.readyState>pt.HAVE_CURRENT_DATA&&u.current.pause()}f.current.isWaiting=!1,f.current.isStalled=!1},$=function(){u.current&&u.current.pause(),f.current.isWaiting=!0,f.current.isStalled=!1},W=function(){f.current.isWaiting=!1,f.current.isStalled=!1},et=function(){f.current.isWaiting=!1,f.current.isStalled=!0},J=Math.round((Number(m)+Number.EPSILON)*100)/100,it=Math.round((Number(w)+Number.EPSILON)*100)/100,lt=`${Z}#t=${J},${it}`;return zr.Texture.fromLoader(z,lt,c,{pixiIdPrefix:c,resourceOptions:{autoPlay:!1,crossorigin:"Anonymus",updateFPS:30}}).then(pt=>{pt&&(i(pt),u.current=pt.baseTexture.resource.source,u.current.id=c,u.current.addEventListener("loadedmetadata",X),u.current.addEventListener("ended",Y),u.current.addEventListener("loadstart",$),u.current.addEventListener("canplaythrough",W),u.current.addEventListener("stalled",et))}),()=>{u.current&&(u.current.pause(),u.current.removeEventListener("loadedmetadata",X),u.current.removeEventListener("ended",Y),u.current.removeEventListener("loadstart",$),u.current.removeEventListener("canplaythrough",W),u.current.removeEventListener("stalled",et))}},[Z,c,m,w,z]),Vt.jsx(ni,{...e,ref:t,ignoreTlForVideo:!0,children:Vt.jsx(le.Container,{ref:a,children:n&&Vt.jsx(le.Sprite,{texture:n,width:E,height:I,anchor:.5,x:T,y:x,ref:o,pointerdown:L,filters:[C,P,M,q,...R>0?[F]:[]]})})})});Sv.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiVideoSprite"};const xN=e=>{const{startAt:t,endAt:r}=e,[n,i]=Et.useState(!1),o=mt.useRef(null),a=mt.useRef(null),u=mt.useRef(null),f=mt.useRef(null),h=mt.useRef(null),{tl:d,totalDuration:p=0,reverseModeRef:c}=mt.useContext(An),v=()=>{i(!0)},y=()=>{i(!1)},b=()=>{if(c.current&&f.current&&d.current){const m=d.current.time();m>t&&m<r&&(i(()=>!0),a.current&&(a.current.alpha=1))}},_=m=>{m<.2?i(!0):i(!1)};return Et.useEffect(()=>{const m={onStart:v,onStartParams:[{alpha:1}]},w={onComplete:y,onCompleteParams:[{alpha:t>0?0:1}]},T=Math.max(0,t-1),x=_e.context(()=>{if(o.current&&d.current){const E=_e.from(o.current,{alpha:t<.2?1:0,duration:.5,...m});d.current.add(E,T),d.current.to(o.current,{alpha:0,duration:.5,overwrite:"auto",...w},r-.5),t<.2&&i(!0),f.current=_e.to(u.current,{alpha:1,overwrite:"auto",duration:Number(r)-Number(t),onUpdate:b},t),d.current.add(f.current,t),p>.2&&d.current.call(_,[t],p-.3)}});return()=>{var E;(E=f.current)==null||E.kill(),x.revert()}},[t,r,p]),Et.useEffect(()=>{const m=_e.context(()=>{a.current&&d.current&&(h.current&&h.current.kill(),h.current=_e.to(a.current,{alpha:1,duration:.5,overwrite:"auto"}),d.current.add(h.current,t))});return()=>{h.current&&h.current.kill(),m.revert()}},[n,t]),Vt.jsx(le.Container,{ref:o,alpha:1,children:Vt.jsx(le.Container,{ref:u,children:n&&Vt.jsx(le.Container,{ref:a,alpha:t<.2?1:0,children:e.children})})})},wN=e=>{const{startAt:t,endAt:r}=e,{setTotalDuration:n}=mt.useContext(An);return Et.useEffect(()=>{n&&n(r)},[t,r]),e.children};var Av=(e=>(e.FADE_IN="FADE_IN",e.FADE_OUT="FADE_OUT",e.FADE_IN_OUT="FADE_IN_OUT",e.SLIDE_IN_LEFT="SLIDE_IN_LEFT",e.SLIDE_IN_RIGHT="SLIDE_IN_RIGHT",e.SLIDE_IN_TOP="SLIDE_IN_TOP",e.SLIDE_IN_BOTTOM="SLIDE_IN_BOTTOM",e.SLIDE_OUT_LEFT="SLIDE_OUT_LEFT",e.SLIDE_OUT_RIGHT="SLIDE_OUT_RIGHT",e.SLIDE_OUT_TOP="SLIDE_OUT_TOP",e.SLIDE_OUT_BOTTOM="SLIDE_OUT_BOTTOM",e.ZOOM_IN="ZOOM_IN",e.ZOOM_OUT="ZOOM_OUT",e.ZOOM_IN_OUT="ZOOM_IN_OUT",e.BOUNCE_IN="BOUNCE_IN",e.BOUNCE_OUT="BOUNCE_OUT",e.BOUNCE_IN_OUT="BOUNCE_IN_OUT",e.ELASTIC_IN="ELASTIC_IN",e.ELASTIC_OUT="ELASTIC_OUT",e.ELASTIC_IN_OUT="ELASTIC_IN_OUT",e.BACK_IN="BACK_IN",e.BACK_OUT="BACK_OUT",e.BACK_IN_OUT="BACK_IN_OUT",e.CIRCULAR_IN="CIRCULAR_IN",e.CIRCULAR_OUT="CIRCULAR_OUT",e.CIRCULAR_IN_OUT="CIRCULAR_IN_OUT",e.EXPO_IN="EXPO_IN",e.EXPO_OUT="EXPO_OUT",e.EXPO_IN_OUT="EXPO_IN_OUT",e.SINE_IN="SINE_IN",e.SINE_OUT="SINE_OUT",e.SINE_IN_OUT="SINE_IN_OUT",e.BOUNCE="BOUNCE",e.ELASTIC="ELASTIC",e.BACK="BACK",e.CIRCULAR="CIRCULAR",e.EXPO="EXPO",e.SINE="SINE",e))(Av||{}),Ov=(e=>(e[e.NORMAL=0]="NORMAL",e[e.ADD=1]="ADD",e[e.MULTIPLY=2]="MULTIPLY",e[e.SCREEN=3]="SCREEN",e[e.OVERLAY=4]="OVERLAY",e[e.DARKEN=5]="DARKEN",e[e.LIGHTEN=6]="LIGHTEN",e[e.COLOR_DODGE=7]="COLOR_DODGE",e[e.COLOR_BURN=8]="COLOR_BURN",e[e.HARD_LIGHT=9]="HARD_LIGHT",e[e.SOFT_LIGHT=10]="SOFT_LIGHT",e[e.DIFFERENCE=11]="DIFFERENCE",e[e.EXCLUSION=12]="EXCLUSION",e[e.HUE=13]="HUE",e[e.SATURATION=14]="SATURATION",e[e.COLOR=15]="COLOR",e[e.LUMINOSITY=16]="LUMINOSITY",e))(Ov||{});re.Animations=Av,re.BlendModes=Ov,re.Events=Oe,re.GsapPixieContext=An,re.GsapPixieContextProvider=my,re.PixiAnimatedSprite=xv,re.PixiAudioSprite=LS,re.PixiGifSprite=Tv,re.PixiImageSprite=gp,re.PixiSequence=xN,re.PixiSequenceWrapper=wN,re.PixiSvgPathSprite=oS,re.PixiTextSprite=_N,re.PixiVideoSprite=Sv,re.emitCustomEvent=ti,re.newCustomEventEmitter=gy,re.useCustomEventListener=Ze,Object.defineProperty(re,Symbol.toStringTag,{value:"Module"})});