reacthub-pixitweenjs 0.2.47 → 0.2.48

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
@@ -6,11 +6,11 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var yf=Q,mf=Symbol.for("react.element"),gf=Symbol.for("react.fragment"),bf=Object.prototype.hasOwnProperty,_f=yf.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,xf={key:!0,ref:!0,__self:!0,__source:!0};function Ta(e,t,r){var n,i={},s=null,a=null;r!==void 0&&(s=""+r),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(a=t.ref);for(n in t)bf.call(t,n)&&!xf.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:mf,type:e,key:s,ref:a,props:i,_owner:_f.current}}pn.Fragment=gf,pn.jsx=Ta,pn.jsxs=Ta,Ea.exports=pn;var dt=Ea.exports,Ge=(e=>(e[e.WEBGL_LEGACY=0]="WEBGL_LEGACY",e[e.WEBGL=1]="WEBGL",e[e.WEBGL2=2]="WEBGL2",e))(Ge||{}),wa=(e=>(e[e.UNKNOWN=0]="UNKNOWN",e[e.WEBGL=1]="WEBGL",e[e.CANVAS=2]="CANVAS",e))(wa||{}),Oi=(e=>(e[e.COLOR=16384]="COLOR",e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL",e))(Oi||{}),ot=(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[e.NORMAL_NPM=17]="NORMAL_NPM",e[e.ADD_NPM=18]="ADD_NPM",e[e.SCREEN_NPM=19]="SCREEN_NPM",e[e.NONE=20]="NONE",e[e.SRC_OVER=0]="SRC_OVER",e[e.SRC_IN=21]="SRC_IN",e[e.SRC_OUT=22]="SRC_OUT",e[e.SRC_ATOP=23]="SRC_ATOP",e[e.DST_OVER=24]="DST_OVER",e[e.DST_IN=25]="DST_IN",e[e.DST_OUT=26]="DST_OUT",e[e.DST_ATOP=27]="DST_ATOP",e[e.ERASE=26]="ERASE",e[e.SUBTRACT=28]="SUBTRACT",e[e.XOR=29]="XOR",e))(ot||{}),Pe=(e=>(e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN",e))(Pe||{}),rt=(e=>(e[e.RGBA=6408]="RGBA",e[e.RGB=6407]="RGB",e[e.RG=33319]="RG",e[e.RED=6403]="RED",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.ALPHA=6406]="ALPHA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e))(rt||{}),ar=(e=>(e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",e))(ar||{}),bt=(e=>(e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.BYTE=5120]="BYTE",e[e.SHORT=5122]="SHORT",e[e.INT=5124]="INT",e[e.FLOAT=5126]="FLOAT",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",e[e.HALF_FLOAT=36193]="HALF_FLOAT",e))(bt||{}),Ii=(e=>(e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT",e))(Ii||{}),Ee=(e=>(e[e.NEAREST=0]="NEAREST",e[e.LINEAR=1]="LINEAR",e))(Ee||{}),$r=(e=>(e[e.CLAMP=33071]="CLAMP",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",e))($r||{}),qe=(e=>(e[e.OFF=0]="OFF",e[e.POW2=1]="POW2",e[e.ON=2]="ON",e[e.ON_MANUAL=3]="ON_MANUAL",e))(qe||{}),ke=(e=>(e[e.NPM=0]="NPM",e[e.UNPACK=1]="UNPACK",e[e.PMA=2]="PMA",e[e.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",e[e.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",e[e.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",e))(ke||{}),He=(e=>(e[e.NO=0]="NO",e[e.YES=1]="YES",e[e.AUTO=2]="AUTO",e[e.BLEND=0]="BLEND",e[e.CLEAR=1]="CLEAR",e[e.BLIT=2]="BLIT",e))(He||{}),Ri=(e=>(e[e.AUTO=0]="AUTO",e[e.MANUAL=1]="MANUAL",e))(Ri||{}),Qt=(e=>(e.LOW="lowp",e.MEDIUM="mediump",e.HIGH="highp",e))(Qt||{}),Ut=(e=>(e[e.NONE=0]="NONE",e[e.SCISSOR=1]="SCISSOR",e[e.STENCIL=2]="STENCIL",e[e.SPRITE=3]="SPRITE",e[e.COLOR=4]="COLOR",e))(Ut||{}),Bt=(e=>(e[e.NONE=0]="NONE",e[e.LOW=2]="LOW",e[e.MEDIUM=4]="MEDIUM",e[e.HIGH=8]="HIGH",e))(Bt||{}),pe=(e=>(e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",e))(pe||{});const mt={ADAPTER:{createCanvas:(e,t)=>{const r=document.createElement("canvas");return r.width=e,r.height=t,r},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(e,t)=>fetch(e,t),parseXML:e=>new DOMParser().parseFromString(e,"text/xml")},RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var Ni=/iPhone/i,Aa=/iPod/i,Sa=/iPad/i,Oa=/\biOS-universal(?:.+)Mac\b/i,Ci=/\bAndroid(?:.+)Mobile\b/i,Ia=/Android/i,or=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,vn=/Silk/i,Te=/Windows Phone/i,Ra=/\bWindows(?:.+)ARM\b/i,Na=/BlackBerry/i,Ca=/BB10/i,Pa=/Opera Mini/i,ka=/\b(CriOS|Chrome)(?:.+)Mobile/i,Ma=/Mobile(?:.+)Firefox\b/i,La=function(e){return typeof e<"u"&&e.platform==="MacIntel"&&typeof e.maxTouchPoints=="number"&&e.maxTouchPoints>1&&typeof MSStream>"u"};function Ef(e){return function(t){return t.test(e)}}function Fa(e){var t={userAgent:"",platform:"",maxTouchPoints:0};!e&&typeof navigator<"u"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e=="string"?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});var r=t.userAgent,n=r.split("[FBAN");typeof n[1]<"u"&&(r=n[0]),n=r.split("Twitter"),typeof n[1]<"u"&&(r=n[0]);var i=Ef(r),s={apple:{phone:i(Ni)&&!i(Te),ipod:i(Aa),tablet:!i(Ni)&&(i(Sa)||La(t))&&!i(Te),universal:i(Oa),device:(i(Ni)||i(Aa)||i(Sa)||i(Oa)||La(t))&&!i(Te)},amazon:{phone:i(or),tablet:!i(or)&&i(vn),device:i(or)||i(vn)},android:{phone:!i(Te)&&i(or)||!i(Te)&&i(Ci),tablet:!i(Te)&&!i(or)&&!i(Ci)&&(i(vn)||i(Ia)),device:!i(Te)&&(i(or)||i(vn)||i(Ci)||i(Ia))||i(/\bokhttp\b/i)},windows:{phone:i(Te),tablet:i(Ra),device:i(Te)||i(Ra)},other:{blackberry:i(Na),blackberry10:i(Ca),opera:i(Pa),firefox:i(Ma),chrome:i(ka),device:i(Na)||i(Ca)||i(Pa)||i(Ma)||i(ka)},any:!1,phone:!1,tablet:!1};return s.any=s.apple.device||s.android.device||s.windows.device||s.other.device,s.phone=s.apple.phone||s.android.phone||s.windows.phone,s.tablet=s.apple.tablet||s.android.tablet||s.windows.tablet,s}const lr=(Fa.default??Fa)(globalThis.navigator);mt.RETINA_PREFIX=/@([0-9\.]+)x/,mt.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var Ba={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(l,f,c){this.fn=l,this.context=f,this.once=c||!1}function s(l,f,c,h,u){if(typeof c!="function")throw new TypeError("The listener must be a function");var d=new i(c,h||l,u),p=r?r+f:f;return l._events[p]?l._events[p].fn?l._events[p]=[l._events[p],d]:l._events[p].push(d):(l._events[p]=d,l._eventsCount++),l}function a(l,f){--l._eventsCount===0?l._events=new n:delete l._events[f]}function o(){this._events=new n,this._eventsCount=0}o.prototype.eventNames=function(){var f=[],c,h;if(this._eventsCount===0)return f;for(h in c=this._events)t.call(c,h)&&f.push(r?h.slice(1):h);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(c)):f},o.prototype.listeners=function(f){var c=r?r+f:f,h=this._events[c];if(!h)return[];if(h.fn)return[h.fn];for(var u=0,d=h.length,p=new Array(d);u<d;u++)p[u]=h[u].fn;return p},o.prototype.listenerCount=function(f){var c=r?r+f:f,h=this._events[c];return h?h.fn?1:h.length:0},o.prototype.emit=function(f,c,h,u,d,p){var v=r?r+f:f;if(!this._events[v])return!1;var g=this._events[v],m=arguments.length,b,_;if(g.fn){switch(g.once&&this.removeListener(f,g.fn,void 0,!0),m){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,c),!0;case 3:return g.fn.call(g.context,c,h),!0;case 4:return g.fn.call(g.context,c,h,u),!0;case 5:return g.fn.call(g.context,c,h,u,d),!0;case 6:return g.fn.call(g.context,c,h,u,d,p),!0}for(_=1,b=new Array(m-1);_<m;_++)b[_-1]=arguments[_];g.fn.apply(g.context,b)}else{var y=g.length,x;for(_=0;_<y;_++)switch(g[_].once&&this.removeListener(f,g[_].fn,void 0,!0),m){case 1:g[_].fn.call(g[_].context);break;case 2:g[_].fn.call(g[_].context,c);break;case 3:g[_].fn.call(g[_].context,c,h);break;case 4:g[_].fn.call(g[_].context,c,h,u);break;default:if(!b)for(x=1,b=new Array(m-1);x<m;x++)b[x-1]=arguments[x];g[_].fn.apply(g[_].context,b)}}return!0},o.prototype.on=function(f,c,h){return s(this,f,c,h,!1)},o.prototype.once=function(f,c,h){return s(this,f,c,h,!0)},o.prototype.removeListener=function(f,c,h,u){var d=r?r+f:f;if(!this._events[d])return this;if(!c)return a(this,d),this;var p=this._events[d];if(p.fn)p.fn===c&&(!u||p.once)&&(!h||p.context===h)&&a(this,d);else{for(var v=0,g=[],m=p.length;v<m;v++)(p[v].fn!==c||u&&!p[v].once||h&&p[v].context!==h)&&g.push(p[v]);g.length?this._events[d]=g.length===1?g[0]:g:a(this,d)}return this},o.prototype.removeAllListeners=function(f){var c;return f?(c=r?r+f:f,this._events[c]&&a(this,c)):(this._events=new n,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=r,o.EventEmitter=o,e.exports=o})(Ba);var Tf=Ba.exports;const yn=sr(Tf);var Pi={exports:{}};Pi.exports=mn,Pi.exports.default=mn;function mn(e,t,r){r=r||2;var n=t&&t.length,i=n?t[0]*r:e.length,s=Ua(e,0,i,r,!0),a=[];if(!s||s.next===s.prev)return a;var o,l,f,c,h,u,d;if(n&&(s=If(e,t,s,r)),e.length>80*r){o=f=e[0],l=c=e[1];for(var p=r;p<i;p+=r)h=e[p],u=e[p+1],h<o&&(o=h),u<l&&(l=u),h>f&&(f=h),u>c&&(c=u);d=Math.max(f-o,c-l),d=d!==0?32767/d:0}return jr(s,a,r,o,l,d,0),a}function Ua(e,t,r,n,i){var s,a;if(i===Li(e,t,r,n)>0)for(s=t;s<r;s+=n)a=ja(s,e[s],e[s+1],a);else for(s=r-n;s>=t;s-=n)a=ja(s,e[s],e[s+1],a);return a&&gn(a,a.next)&&(qr(a),a=a.next),a}function Ve(e,t){if(!e)return e;t||(t=e);var r=e,n;do if(n=!1,!r.steiner&&(gn(r,r.next)||Pt(r.prev,r,r.next)===0)){if(qr(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function jr(e,t,r,n,i,s,a){if(e){!a&&s&&kf(e,n,i,s);for(var o=e,l,f;e.prev!==e.next;){if(l=e.prev,f=e.next,s?Af(e,n,i,s):wf(e)){t.push(l.i/r|0),t.push(e.i/r|0),t.push(f.i/r|0),qr(e),e=f.next,o=f.next;continue}if(e=f,e===o){a?a===1?(e=Sf(Ve(e),t,r),jr(e,t,r,n,i,s,2)):a===2&&Of(e,t,r,n,i,s):jr(Ve(e),t,r,n,i,s,1);break}}}}function wf(e){var t=e.prev,r=e,n=e.next;if(Pt(t,r,n)>=0)return!1;for(var i=t.x,s=r.x,a=n.x,o=t.y,l=r.y,f=n.y,c=i<s?i<a?i:a:s<a?s:a,h=o<l?o<f?o:f:l<f?l:f,u=i>s?i>a?i:a:s>a?s:a,d=o>l?o>f?o:f:l>f?l:f,p=n.next;p!==t;){if(p.x>=c&&p.x<=u&&p.y>=h&&p.y<=d&&ur(i,o,s,l,a,f,p.x,p.y)&&Pt(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function Af(e,t,r,n){var i=e.prev,s=e,a=e.next;if(Pt(i,s,a)>=0)return!1;for(var o=i.x,l=s.x,f=a.x,c=i.y,h=s.y,u=a.y,d=o<l?o<f?o:f:l<f?l:f,p=c<h?c<u?c:u:h<u?h:u,v=o>l?o>f?o:f:l>f?l:f,g=c>h?c>u?c:u:h>u?h:u,m=ki(d,p,t,r,n),b=ki(v,g,t,r,n),_=e.prevZ,y=e.nextZ;_&&_.z>=m&&y&&y.z<=b;){if(_.x>=d&&_.x<=v&&_.y>=p&&_.y<=g&&_!==i&&_!==a&&ur(o,c,l,h,f,u,_.x,_.y)&&Pt(_.prev,_,_.next)>=0||(_=_.prevZ,y.x>=d&&y.x<=v&&y.y>=p&&y.y<=g&&y!==i&&y!==a&&ur(o,c,l,h,f,u,y.x,y.y)&&Pt(y.prev,y,y.next)>=0))return!1;y=y.nextZ}for(;_&&_.z>=m;){if(_.x>=d&&_.x<=v&&_.y>=p&&_.y<=g&&_!==i&&_!==a&&ur(o,c,l,h,f,u,_.x,_.y)&&Pt(_.prev,_,_.next)>=0)return!1;_=_.prevZ}for(;y&&y.z<=b;){if(y.x>=d&&y.x<=v&&y.y>=p&&y.y<=g&&y!==i&&y!==a&&ur(o,c,l,h,f,u,y.x,y.y)&&Pt(y.prev,y,y.next)>=0)return!1;y=y.nextZ}return!0}function Sf(e,t,r){var n=e;do{var i=n.prev,s=n.next.next;!gn(i,s)&&Da(i,n,n.next,s)&&Gr(i,s)&&Gr(s,i)&&(t.push(i.i/r|0),t.push(n.i/r|0),t.push(s.i/r|0),qr(n),qr(n.next),n=e=s),n=n.next}while(n!==e);return Ve(n)}function Of(e,t,r,n,i,s){var a=e;do{for(var o=a.next.next;o!==a.prev;){if(a.i!==o.i&&Ff(a,o)){var l=$a(a,o);a=Ve(a,a.next),l=Ve(l,l.next),jr(a,t,r,n,i,s,0),jr(l,t,r,n,i,s,0);return}o=o.next}a=a.next}while(a!==e)}function If(e,t,r,n){var i=[],s,a,o,l,f;for(s=0,a=t.length;s<a;s++)o=t[s]*n,l=s<a-1?t[s+1]*n:e.length,f=Ua(e,o,l,n,!1),f===f.next&&(f.steiner=!0),i.push(Lf(f));for(i.sort(Rf),s=0;s<i.length;s++)r=Nf(i[s],r);return r}function Rf(e,t){return e.x-t.x}function Nf(e,t){var r=Cf(e,t);if(!r)return t;var n=$a(r,e);return Ve(n,n.next),Ve(r,r.next)}function Cf(e,t){var r=t,n=e.x,i=e.y,s=-1/0,a;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var o=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(o<=n&&o>s&&(s=o,a=r.x<r.next.x?r:r.next,o===n))return a}r=r.next}while(r!==t);if(!a)return null;var l=a,f=a.x,c=a.y,h=1/0,u;r=a;do n>=r.x&&r.x>=f&&n!==r.x&&ur(i<c?n:s,i,f,c,i<c?s:n,i,r.x,r.y)&&(u=Math.abs(i-r.y)/(n-r.x),Gr(r,e)&&(u<h||u===h&&(r.x>a.x||r.x===a.x&&Pf(a,r)))&&(a=r,h=u)),r=r.next;while(r!==l);return a}function Pf(e,t){return Pt(e.prev,e,t.prev)<0&&Pt(t.next,e,e.next)<0}function kf(e,t,r,n){var i=e;do i.z===0&&(i.z=ki(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,Mf(i)}function Mf(e){var t,r,n,i,s,a,o,l,f=1;do{for(r=e,e=null,s=null,a=0;r;){for(a++,n=r,o=0,t=0;t<f&&(o++,n=n.nextZ,!!n);t++);for(l=f;o>0||l>0&&n;)o!==0&&(l===0||!n||r.z<=n.z)?(i=r,r=r.nextZ,o--):(i=n,n=n.nextZ,l--),s?s.nextZ=i:e=i,i.prevZ=s,s=i;r=n}s.nextZ=null,f*=2}while(a>1);return e}function ki(e,t,r,n,i){return e=(e-r)*i|0,t=(t-n)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function Lf(e){var t=e,r=e;do(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next;while(t!==e);return r}function ur(e,t,r,n,i,s,a,o){return(i-a)*(t-o)>=(e-a)*(s-o)&&(e-a)*(n-o)>=(r-a)*(t-o)&&(r-a)*(s-o)>=(i-a)*(n-o)}function Ff(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!Bf(e,t)&&(Gr(e,t)&&Gr(t,e)&&Uf(e,t)&&(Pt(e.prev,e,t.prev)||Pt(e,t.prev,t))||gn(e,t)&&Pt(e.prev,e,e.next)>0&&Pt(t.prev,t,t.next)>0)}function Pt(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function gn(e,t){return e.x===t.x&&e.y===t.y}function Da(e,t,r,n){var i=_n(Pt(e,t,r)),s=_n(Pt(e,t,n)),a=_n(Pt(r,n,e)),o=_n(Pt(r,n,t));return!!(i!==s&&a!==o||i===0&&bn(e,r,t)||s===0&&bn(e,n,t)||a===0&&bn(r,e,n)||o===0&&bn(r,t,n))}function bn(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function _n(e){return e>0?1:e<0?-1:0}function Bf(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&Da(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function Gr(e,t){return Pt(e.prev,e,e.next)<0?Pt(e,t,e.next)>=0&&Pt(e,e.prev,t)>=0:Pt(e,t,e.prev)<0||Pt(e,e.next,t)<0}function Uf(e,t){var r=e,n=!1,i=(e.x+t.x)/2,s=(e.y+t.y)/2;do r.y>s!=r.next.y>s&&r.next.y!==r.y&&i<(r.next.x-r.x)*(s-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==e);return n}function $a(e,t){var r=new Mi(e.i,e.x,e.y),n=new Mi(t.i,t.x,t.y),i=e.next,s=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,s.next=n,n.prev=s,n}function ja(e,t,r,n){var i=new Mi(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function qr(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Mi(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}mn.deviation=function(e,t,r,n){var i=t&&t.length,s=i?t[0]*r:e.length,a=Math.abs(Li(e,0,s,r));if(i)for(var o=0,l=t.length;o<l;o++){var f=t[o]*r,c=o<l-1?t[o+1]*r:e.length;a-=Math.abs(Li(e,f,c,r))}var h=0;for(o=0;o<n.length;o+=3){var u=n[o]*r,d=n[o+1]*r,p=n[o+2]*r;h+=Math.abs((e[u]-e[p])*(e[d+1]-e[u+1])-(e[u]-e[d])*(e[p+1]-e[u+1]))}return a===0&&h===0?0:Math.abs((h-a)/a)};function Li(e,t,r,n){for(var i=0,s=t,a=r-n;s<r;s+=n)i+=(e[a]-e[s])*(e[s+1]+e[a+1]),a=s;return i}mn.flatten=function(e){for(var t=e[0][0].length,r={vertices:[],holes:[],dimensions:t},n=0,i=0;i<e.length;i++){for(var s=0;s<e[i].length;s++)for(var a=0;a<t;a++)r.vertices.push(e[i][s][a]);i>0&&(n+=e[i-1].length,r.holes.push(n))}return r};var Df=Pi.exports;const $f=sr(Df);var xn={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */xn.exports,function(e,t){(function(r){var n=t&&!t.nodeType&&t,i=e&&!e.nodeType&&e,s=typeof Ce=="object"&&Ce;(s.global===s||s.window===s||s.self===s)&&(r=s);var a,o=2147483647,l=36,f=1,c=26,h=38,u=700,d=72,p=128,v="-",g=/^xn--/,m=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,_={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y=l-f,x=Math.floor,O=String.fromCharCode,T;function E(k){throw new RangeError(_[k])}function N(k,R){for(var P=k.length,L=[];P--;)L[P]=R(k[P]);return L}function A(k,R){var P=k.split("@"),L="";P.length>1&&(L=P[0]+"@",k=P[1]),k=k.replace(b,".");var j=k.split("."),G=N(j,R).join(".");return L+G}function w(k){for(var R=[],P=0,L=k.length,j,G;P<L;)j=k.charCodeAt(P++),j>=55296&&j<=56319&&P<L?(G=k.charCodeAt(P++),(G&64512)==56320?R.push(((j&1023)<<10)+(G&1023)+65536):(R.push(j),P--)):R.push(j);return R}function S(k){return N(k,function(R){var P="";return R>65535&&(R-=65536,P+=O(R>>>10&1023|55296),R=56320|R&1023),P+=O(R),P}).join("")}function I(k){return k-48<10?k-22:k-65<26?k-65:k-97<26?k-97:l}function C(k,R){return k+22+75*(k<26)-((R!=0)<<5)}function F(k,R,P){var L=0;for(k=P?x(k/u):k>>1,k+=x(k/R);k>y*c>>1;L+=l)k=x(k/y);return x(L+(y+1)*k/(k+h))}function D(k){var R=[],P=k.length,L,j=0,G=p,M=d,B,q,H,z,Y,J,et,at,lt;for(B=k.lastIndexOf(v),B<0&&(B=0),q=0;q<B;++q)k.charCodeAt(q)>=128&&E("not-basic"),R.push(k.charCodeAt(q));for(H=B>0?B+1:0;H<P;){for(z=j,Y=1,J=l;H>=P&&E("invalid-input"),et=I(k.charCodeAt(H++)),(et>=l||et>x((o-j)/Y))&&E("overflow"),j+=et*Y,at=J<=M?f:J>=M+c?c:J-M,!(et<at);J+=l)lt=l-at,Y>x(o/lt)&&E("overflow"),Y*=lt;L=R.length+1,M=F(j-z,L,z==0),x(j/L)>o-G&&E("overflow"),G+=x(j/L),j%=L,R.splice(j++,0,G)}return S(R)}function U(k){var R,P,L,j,G,M,B,q,H,z,Y,J=[],et,at,lt,Ct;for(k=w(k),et=k.length,R=p,P=0,G=d,M=0;M<et;++M)Y=k[M],Y<128&&J.push(O(Y));for(L=j=J.length,j&&J.push(v);L<et;){for(B=o,M=0;M<et;++M)Y=k[M],Y>=R&&Y<B&&(B=Y);for(at=L+1,B-R>x((o-P)/at)&&E("overflow"),P+=(B-R)*at,R=B,M=0;M<et;++M)if(Y=k[M],Y<R&&++P>o&&E("overflow"),Y==R){for(q=P,H=l;z=H<=G?f:H>=G+c?c:H-G,!(q<z);H+=l)Ct=q-z,lt=l-z,J.push(O(C(z+Ct%lt,0))),q=x(Ct/lt);J.push(O(C(q,0))),G=F(P,at,L==j),P=0,++L}++P,++R}return J.join("")}function X(k){return A(k,function(R){return g.test(R)?D(R.slice(4).toLowerCase()):R})}function $(k){return A(k,function(R){return m.test(R)?"xn--"+U(R):R})}if(a={version:"1.4.1",ucs2:{decode:w,encode:S},decode:D,encode:U,toASCII:$,toUnicode:X},n&&i)if(e.exports==n)i.exports=a;else for(T in a)a.hasOwnProperty(T)&&(n[T]=a[T]);else r.punycode=a})(Ce)}(xn,xn.exports);var jf=xn.exports,Gf=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(r in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,r);if(a.value!==i||a.enumerable!==!0)return!1}return!0},Ga=typeof Symbol<"u"&&Symbol,qf=Gf,Hf=function(){return typeof Ga!="function"||typeof Symbol!="function"||typeof Ga("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:qf()},qa={foo:{}},Vf=Object,zf=function(){return{__proto__:qa}.foo===qa.foo&&!({__proto__:null}instanceof Vf)},Xf="Function.prototype.bind called on incompatible ",Fi=Array.prototype.slice,Wf=Object.prototype.toString,Yf="[object Function]",Kf=function(t){var r=this;if(typeof r!="function"||Wf.call(r)!==Yf)throw new TypeError(Xf+r);for(var n=Fi.call(arguments,1),i,s=function(){if(this instanceof i){var c=r.apply(this,n.concat(Fi.call(arguments)));return Object(c)===c?c:this}else return r.apply(t,n.concat(Fi.call(arguments)))},a=Math.max(0,r.length-n.length),o=[],l=0;l<a;l++)o.push("$"+l);if(i=Function("binder","return function ("+o.join(",")+"){ return binder.apply(this,arguments); }")(s),r.prototype){var f=function(){};f.prototype=r.prototype,i.prototype=new f,f.prototype=null}return i},Zf=Kf,Bi=Function.prototype.bind||Zf,Qf=Bi,Jf=Qf.call(Function.call,Object.prototype.hasOwnProperty),pt,fr=SyntaxError,Ha=Function,cr=TypeError,Ui=function(e){try{return Ha('"use strict"; return ('+e+").constructor;")()}catch{}},ze=Object.getOwnPropertyDescriptor;if(ze)try{ze({},"")}catch{ze=null}var Di=function(){throw new cr},tc=ze?function(){try{return arguments.callee,Di}catch{try{return ze(arguments,"callee").get}catch{return Di}}}():Di,hr=Hf(),ec=zf(),Dt=Object.getPrototypeOf||(ec?function(e){return e.__proto__}:null),dr={},rc=typeof Uint8Array>"u"||!Dt?pt:Dt(Uint8Array),Xe={"%AggregateError%":typeof AggregateError>"u"?pt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?pt:ArrayBuffer,"%ArrayIteratorPrototype%":hr&&Dt?Dt([][Symbol.iterator]()):pt,"%AsyncFromSyncIteratorPrototype%":pt,"%AsyncFunction%":dr,"%AsyncGenerator%":dr,"%AsyncGeneratorFunction%":dr,"%AsyncIteratorPrototype%":dr,"%Atomics%":typeof Atomics>"u"?pt:Atomics,"%BigInt%":typeof BigInt>"u"?pt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?pt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?pt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?pt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?pt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?pt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?pt:FinalizationRegistry,"%Function%":Ha,"%GeneratorFunction%":dr,"%Int8Array%":typeof Int8Array>"u"?pt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?pt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?pt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hr&&Dt?Dt(Dt([][Symbol.iterator]())):pt,"%JSON%":typeof JSON=="object"?JSON:pt,"%Map%":typeof Map>"u"?pt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!hr||!Dt?pt:Dt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?pt:Promise,"%Proxy%":typeof Proxy>"u"?pt:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?pt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?pt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!hr||!Dt?pt:Dt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?pt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hr&&Dt?Dt(""[Symbol.iterator]()):pt,"%Symbol%":hr?Symbol:pt,"%SyntaxError%":fr,"%ThrowTypeError%":tc,"%TypedArray%":rc,"%TypeError%":cr,"%Uint8Array%":typeof Uint8Array>"u"?pt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?pt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?pt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?pt:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?pt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?pt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?pt:WeakSet};if(Dt)try{null.error}catch(e){var nc=Dt(Dt(e));Xe["%Error.prototype%"]=nc}var ic=function e(t){var r;if(t==="%AsyncFunction%")r=Ui("async function () {}");else if(t==="%GeneratorFunction%")r=Ui("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=Ui("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Dt&&(r=Dt(i.prototype))}return Xe[t]=r,r},Va={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Hr=Bi,En=Jf,sc=Hr.call(Function.call,Array.prototype.concat),ac=Hr.call(Function.apply,Array.prototype.splice),za=Hr.call(Function.call,String.prototype.replace),Tn=Hr.call(Function.call,String.prototype.slice),oc=Hr.call(Function.call,RegExp.prototype.exec),lc=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,uc=/\\(\\)?/g,fc=function(t){var r=Tn(t,0,1),n=Tn(t,-1);if(r==="%"&&n!=="%")throw new fr("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new fr("invalid intrinsic syntax, expected opening `%`");var i=[];return za(t,lc,function(s,a,o,l){i[i.length]=o?za(l,uc,"$1"):a||s}),i},cc=function(t,r){var n=t,i;if(En(Va,n)&&(i=Va[n],n="%"+i[0]+"%"),En(Xe,n)){var s=Xe[n];if(s===dr&&(s=ic(n)),typeof s>"u"&&!r)throw new cr("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:s}}throw new fr("intrinsic "+t+" does not exist!")},$i=function(t,r){if(typeof t!="string"||t.length===0)throw new cr("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new cr('"allowMissing" argument must be a boolean');if(oc(/^%?[^%]*%?$/,t)===null)throw new fr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=fc(t),i=n.length>0?n[0]:"",s=cc("%"+i+"%",r),a=s.name,o=s.value,l=!1,f=s.alias;f&&(i=f[0],ac(n,sc([0,1],f)));for(var c=1,h=!0;c<n.length;c+=1){var u=n[c],d=Tn(u,0,1),p=Tn(u,-1);if((d==='"'||d==="'"||d==="`"||p==='"'||p==="'"||p==="`")&&d!==p)throw new fr("property names with quotes must have matching quotes");if((u==="constructor"||!h)&&(l=!0),i+="."+u,a="%"+i+"%",En(Xe,a))o=Xe[a];else if(o!=null){if(!(u in o)){if(!r)throw new cr("base intrinsic for "+t+" exists, but the property is not available.");return}if(ze&&c+1>=n.length){var v=ze(o,u);h=!!v,h&&"get"in v&&!("originalValue"in v.get)?o=v.get:o=o[u]}else h=En(o,u),o=o[u];h&&!l&&(Xe[a]=o)}}return o},Xa={exports:{}};(function(e){var t=Bi,r=$i,n=r("%Function.prototype.apply%"),i=r("%Function.prototype.call%"),s=r("%Reflect.apply%",!0)||t.call(i,n),a=r("%Object.getOwnPropertyDescriptor%",!0),o=r("%Object.defineProperty%",!0),l=r("%Math.max%");if(o)try{o({},"a",{value:1})}catch{o=null}e.exports=function(h){var u=s(t,i,arguments);if(a&&o){var d=a(u,"length");d.configurable&&o(u,"length",{value:1+l(0,h.length-(arguments.length-1))})}return u};var f=function(){return s(t,n,arguments)};o?o(e.exports,"apply",{value:f}):e.exports.apply=f})(Xa);var hc=Xa.exports,Wa=$i,Ya=hc,dc=Ya(Wa("String.prototype.indexOf")),pc=function(t,r){var n=Wa(t,!!r);return typeof n=="function"&&dc(t,".prototype.")>-1?Ya(n):n};const vc=vf(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var ji=typeof Map=="function"&&Map.prototype,Gi=Object.getOwnPropertyDescriptor&&ji?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,wn=ji&&Gi&&typeof Gi.get=="function"?Gi.get:null,Ka=ji&&Map.prototype.forEach,qi=typeof Set=="function"&&Set.prototype,Hi=Object.getOwnPropertyDescriptor&&qi?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,An=qi&&Hi&&typeof Hi.get=="function"?Hi.get:null,Za=qi&&Set.prototype.forEach,yc=typeof WeakMap=="function"&&WeakMap.prototype,Vr=yc?WeakMap.prototype.has:null,mc=typeof WeakSet=="function"&&WeakSet.prototype,zr=mc?WeakSet.prototype.has:null,gc=typeof WeakRef=="function"&&WeakRef.prototype,Qa=gc?WeakRef.prototype.deref:null,bc=Boolean.prototype.valueOf,_c=Object.prototype.toString,xc=Function.prototype.toString,Ec=String.prototype.match,Vi=String.prototype.slice,Me=String.prototype.replace,Tc=String.prototype.toUpperCase,Ja=String.prototype.toLowerCase,to=RegExp.prototype.test,eo=Array.prototype.concat,ve=Array.prototype.join,wc=Array.prototype.slice,ro=Math.floor,zi=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Xi=Object.getOwnPropertySymbols,Wi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,pr=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Ht=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===pr||"symbol")?Symbol.toStringTag:null,no=Object.prototype.propertyIsEnumerable,io=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function so(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||to.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-ro(-e):ro(e);if(n!==e){var i=String(n),s=Vi.call(t,i.length+1);return Me.call(i,r,"$&_")+"."+Me.call(Me.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Me.call(t,r,"$&_")}var Yi=vc,ao=Yi.custom,oo=fo(ao)?ao:null,Ac=function e(t,r,n,i){var s=r||{};if(Le(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Le(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=Le(s,"customInspect")?s.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Le(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Le(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var o=s.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return ho(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return o?so(t,l):l}if(typeof t=="bigint"){var f=String(t)+"n";return o?so(t,f):f}var c=typeof s.depth>"u"?5:s.depth;if(typeof n>"u"&&(n=0),n>=c&&c>0&&typeof t=="object")return Ki(t)?"[Array]":"[Object]";var h=qc(s,n);if(typeof i>"u")i=[];else if(co(i,t)>=0)return"[Circular]";function u(I,C,F){if(C&&(i=wc.call(i),i.push(C)),F){var D={depth:s.depth};return Le(s,"quoteStyle")&&(D.quoteStyle=s.quoteStyle),e(I,D,n+1,i)}return e(I,s,n+1,i)}if(typeof t=="function"&&!uo(t)){var d=Mc(t),p=Sn(t,u);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(p.length>0?" { "+ve.call(p,", ")+" }":"")}if(fo(t)){var v=pr?Me.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Wi.call(t);return typeof t=="object"&&!pr?Xr(v):v}if($c(t)){for(var g="<"+Ja.call(String(t.nodeName)),m=t.attributes||[],b=0;b<m.length;b++)g+=" "+m[b].name+"="+lo(Sc(m[b].value),"double",s);return g+=">",t.childNodes&&t.childNodes.length&&(g+="..."),g+="</"+Ja.call(String(t.nodeName))+">",g}if(Ki(t)){if(t.length===0)return"[]";var _=Sn(t,u);return h&&!Gc(_)?"["+Qi(_,h)+"]":"[ "+ve.call(_,", ")+" ]"}if(Ic(t)){var y=Sn(t,u);return!("cause"in Error.prototype)&&"cause"in t&&!no.call(t,"cause")?"{ ["+String(t)+"] "+ve.call(eo.call("[cause]: "+u(t.cause),y),", ")+" }":y.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+ve.call(y,", ")+" }"}if(typeof t=="object"&&a){if(oo&&typeof t[oo]=="function"&&Yi)return Yi(t,{depth:c-n});if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(Lc(t)){var x=[];return Ka&&Ka.call(t,function(I,C){x.push(u(C,t,!0)+" => "+u(I,t))}),po("Map",wn.call(t),x,h)}if(Uc(t)){var O=[];return Za&&Za.call(t,function(I){O.push(u(I,t))}),po("Set",An.call(t),O,h)}if(Fc(t))return Zi("WeakMap");if(Dc(t))return Zi("WeakSet");if(Bc(t))return Zi("WeakRef");if(Nc(t))return Xr(u(Number(t)));if(Pc(t))return Xr(u(zi.call(t)));if(Cc(t))return Xr(bc.call(t));if(Rc(t))return Xr(u(String(t)));if(!Oc(t)&&!uo(t)){var T=Sn(t,u),E=io?io(t)===Object.prototype:t instanceof Object||t.constructor===Object,N=t instanceof Object?"":"null prototype",A=!E&&Ht&&Object(t)===t&&Ht in t?Vi.call(Fe(t),8,-1):N?"Object":"",w=E||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",S=w+(A||N?"["+ve.call(eo.call([],A||[],N||[]),": ")+"] ":"");return T.length===0?S+"{}":h?S+"{"+Qi(T,h)+"}":S+"{ "+ve.call(T,", ")+" }"}return String(t)};function lo(e,t,r){var n=(r.quoteStyle||t)==="double"?'"':"'";return n+e+n}function Sc(e){return Me.call(String(e),/"/g,"&quot;")}function Ki(e){return Fe(e)==="[object Array]"&&(!Ht||!(typeof e=="object"&&Ht in e))}function Oc(e){return Fe(e)==="[object Date]"&&(!Ht||!(typeof e=="object"&&Ht in e))}function uo(e){return Fe(e)==="[object RegExp]"&&(!Ht||!(typeof e=="object"&&Ht in e))}function Ic(e){return Fe(e)==="[object Error]"&&(!Ht||!(typeof e=="object"&&Ht in e))}function Rc(e){return Fe(e)==="[object String]"&&(!Ht||!(typeof e=="object"&&Ht in e))}function Nc(e){return Fe(e)==="[object Number]"&&(!Ht||!(typeof e=="object"&&Ht in e))}function Cc(e){return Fe(e)==="[object Boolean]"&&(!Ht||!(typeof e=="object"&&Ht in e))}function fo(e){if(pr)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Wi)return!1;try{return Wi.call(e),!0}catch{}return!1}function Pc(e){if(!e||typeof e!="object"||!zi)return!1;try{return zi.call(e),!0}catch{}return!1}var kc=Object.prototype.hasOwnProperty||function(e){return e in this};function Le(e,t){return kc.call(e,t)}function Fe(e){return _c.call(e)}function Mc(e){if(e.name)return e.name;var t=Ec.call(xc.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function co(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function Lc(e){if(!wn||!e||typeof e!="object")return!1;try{wn.call(e);try{An.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function Fc(e){if(!Vr||!e||typeof e!="object")return!1;try{Vr.call(e,Vr);try{zr.call(e,zr)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function Bc(e){if(!Qa||!e||typeof e!="object")return!1;try{return Qa.call(e),!0}catch{}return!1}function Uc(e){if(!An||!e||typeof e!="object")return!1;try{An.call(e);try{wn.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function Dc(e){if(!zr||!e||typeof e!="object")return!1;try{zr.call(e,zr);try{Vr.call(e,Vr)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function $c(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function ho(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return ho(Vi.call(e,0,t.maxStringLength),t)+n}var i=Me.call(Me.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,jc);return lo(i,"single",t)}function jc(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+Tc.call(t.toString(16))}function Xr(e){return"Object("+e+")"}function Zi(e){return e+" { ? }"}function po(e,t,r,n){var i=n?Qi(r,n):ve.call(r,", ");return e+" ("+t+") {"+i+"}"}function Gc(e){for(var t=0;t<e.length;t++)if(co(e[t],`
9
+ */var yf=Q,mf=Symbol.for("react.element"),gf=Symbol.for("react.fragment"),bf=Object.prototype.hasOwnProperty,_f=yf.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,xf={key:!0,ref:!0,__self:!0,__source:!0};function Ta(e,t,r){var n,i={},s=null,a=null;r!==void 0&&(s=""+r),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(a=t.ref);for(n in t)bf.call(t,n)&&!xf.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:mf,type:e,key:s,ref:a,props:i,_owner:_f.current}}pn.Fragment=gf,pn.jsx=Ta,pn.jsxs=Ta,Ea.exports=pn;var dt=Ea.exports,Ge=(e=>(e[e.WEBGL_LEGACY=0]="WEBGL_LEGACY",e[e.WEBGL=1]="WEBGL",e[e.WEBGL2=2]="WEBGL2",e))(Ge||{}),wa=(e=>(e[e.UNKNOWN=0]="UNKNOWN",e[e.WEBGL=1]="WEBGL",e[e.CANVAS=2]="CANVAS",e))(wa||{}),Oi=(e=>(e[e.COLOR=16384]="COLOR",e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL",e))(Oi||{}),ot=(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[e.NORMAL_NPM=17]="NORMAL_NPM",e[e.ADD_NPM=18]="ADD_NPM",e[e.SCREEN_NPM=19]="SCREEN_NPM",e[e.NONE=20]="NONE",e[e.SRC_OVER=0]="SRC_OVER",e[e.SRC_IN=21]="SRC_IN",e[e.SRC_OUT=22]="SRC_OUT",e[e.SRC_ATOP=23]="SRC_ATOP",e[e.DST_OVER=24]="DST_OVER",e[e.DST_IN=25]="DST_IN",e[e.DST_OUT=26]="DST_OUT",e[e.DST_ATOP=27]="DST_ATOP",e[e.ERASE=26]="ERASE",e[e.SUBTRACT=28]="SUBTRACT",e[e.XOR=29]="XOR",e))(ot||{}),Pe=(e=>(e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN",e))(Pe||{}),rt=(e=>(e[e.RGBA=6408]="RGBA",e[e.RGB=6407]="RGB",e[e.RG=33319]="RG",e[e.RED=6403]="RED",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.ALPHA=6406]="ALPHA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e))(rt||{}),ar=(e=>(e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",e))(ar||{}),bt=(e=>(e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.BYTE=5120]="BYTE",e[e.SHORT=5122]="SHORT",e[e.INT=5124]="INT",e[e.FLOAT=5126]="FLOAT",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",e[e.HALF_FLOAT=36193]="HALF_FLOAT",e))(bt||{}),Ii=(e=>(e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT",e))(Ii||{}),Ee=(e=>(e[e.NEAREST=0]="NEAREST",e[e.LINEAR=1]="LINEAR",e))(Ee||{}),$r=(e=>(e[e.CLAMP=33071]="CLAMP",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",e))($r||{}),qe=(e=>(e[e.OFF=0]="OFF",e[e.POW2=1]="POW2",e[e.ON=2]="ON",e[e.ON_MANUAL=3]="ON_MANUAL",e))(qe||{}),ke=(e=>(e[e.NPM=0]="NPM",e[e.UNPACK=1]="UNPACK",e[e.PMA=2]="PMA",e[e.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",e[e.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",e[e.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",e))(ke||{}),He=(e=>(e[e.NO=0]="NO",e[e.YES=1]="YES",e[e.AUTO=2]="AUTO",e[e.BLEND=0]="BLEND",e[e.CLEAR=1]="CLEAR",e[e.BLIT=2]="BLIT",e))(He||{}),Ri=(e=>(e[e.AUTO=0]="AUTO",e[e.MANUAL=1]="MANUAL",e))(Ri||{}),Qt=(e=>(e.LOW="lowp",e.MEDIUM="mediump",e.HIGH="highp",e))(Qt||{}),Ut=(e=>(e[e.NONE=0]="NONE",e[e.SCISSOR=1]="SCISSOR",e[e.STENCIL=2]="STENCIL",e[e.SPRITE=3]="SPRITE",e[e.COLOR=4]="COLOR",e))(Ut||{}),Bt=(e=>(e[e.NONE=0]="NONE",e[e.LOW=2]="LOW",e[e.MEDIUM=4]="MEDIUM",e[e.HIGH=8]="HIGH",e))(Bt||{}),pe=(e=>(e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",e))(pe||{});const mt={ADAPTER:{createCanvas:(e,t)=>{const r=document.createElement("canvas");return r.width=e,r.height=t,r},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(e,t)=>fetch(e,t),parseXML:e=>new DOMParser().parseFromString(e,"text/xml")},RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var Ni=/iPhone/i,Aa=/iPod/i,Sa=/iPad/i,Oa=/\biOS-universal(?:.+)Mac\b/i,Ci=/\bAndroid(?:.+)Mobile\b/i,Ia=/Android/i,or=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,vn=/Silk/i,Te=/Windows Phone/i,Ra=/\bWindows(?:.+)ARM\b/i,Na=/BlackBerry/i,Ca=/BB10/i,Pa=/Opera Mini/i,ka=/\b(CriOS|Chrome)(?:.+)Mobile/i,Ma=/Mobile(?:.+)Firefox\b/i,La=function(e){return typeof e<"u"&&e.platform==="MacIntel"&&typeof e.maxTouchPoints=="number"&&e.maxTouchPoints>1&&typeof MSStream>"u"};function Ef(e){return function(t){return t.test(e)}}function Fa(e){var t={userAgent:"",platform:"",maxTouchPoints:0};!e&&typeof navigator<"u"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e=="string"?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});var r=t.userAgent,n=r.split("[FBAN");typeof n[1]<"u"&&(r=n[0]),n=r.split("Twitter"),typeof n[1]<"u"&&(r=n[0]);var i=Ef(r),s={apple:{phone:i(Ni)&&!i(Te),ipod:i(Aa),tablet:!i(Ni)&&(i(Sa)||La(t))&&!i(Te),universal:i(Oa),device:(i(Ni)||i(Aa)||i(Sa)||i(Oa)||La(t))&&!i(Te)},amazon:{phone:i(or),tablet:!i(or)&&i(vn),device:i(or)||i(vn)},android:{phone:!i(Te)&&i(or)||!i(Te)&&i(Ci),tablet:!i(Te)&&!i(or)&&!i(Ci)&&(i(vn)||i(Ia)),device:!i(Te)&&(i(or)||i(vn)||i(Ci)||i(Ia))||i(/\bokhttp\b/i)},windows:{phone:i(Te),tablet:i(Ra),device:i(Te)||i(Ra)},other:{blackberry:i(Na),blackberry10:i(Ca),opera:i(Pa),firefox:i(Ma),chrome:i(ka),device:i(Na)||i(Ca)||i(Pa)||i(Ma)||i(ka)},any:!1,phone:!1,tablet:!1};return s.any=s.apple.device||s.android.device||s.windows.device||s.other.device,s.phone=s.apple.phone||s.android.phone||s.windows.phone,s.tablet=s.apple.tablet||s.android.tablet||s.windows.tablet,s}const lr=(Fa.default??Fa)(globalThis.navigator);mt.RETINA_PREFIX=/@([0-9\.]+)x/,mt.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var Ba={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(l,f,c){this.fn=l,this.context=f,this.once=c||!1}function s(l,f,c,h,u){if(typeof c!="function")throw new TypeError("The listener must be a function");var d=new i(c,h||l,u),p=r?r+f:f;return l._events[p]?l._events[p].fn?l._events[p]=[l._events[p],d]:l._events[p].push(d):(l._events[p]=d,l._eventsCount++),l}function a(l,f){--l._eventsCount===0?l._events=new n:delete l._events[f]}function o(){this._events=new n,this._eventsCount=0}o.prototype.eventNames=function(){var f=[],c,h;if(this._eventsCount===0)return f;for(h in c=this._events)t.call(c,h)&&f.push(r?h.slice(1):h);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(c)):f},o.prototype.listeners=function(f){var c=r?r+f:f,h=this._events[c];if(!h)return[];if(h.fn)return[h.fn];for(var u=0,d=h.length,p=new Array(d);u<d;u++)p[u]=h[u].fn;return p},o.prototype.listenerCount=function(f){var c=r?r+f:f,h=this._events[c];return h?h.fn?1:h.length:0},o.prototype.emit=function(f,c,h,u,d,p){var v=r?r+f:f;if(!this._events[v])return!1;var g=this._events[v],m=arguments.length,b,_;if(g.fn){switch(g.once&&this.removeListener(f,g.fn,void 0,!0),m){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,c),!0;case 3:return g.fn.call(g.context,c,h),!0;case 4:return g.fn.call(g.context,c,h,u),!0;case 5:return g.fn.call(g.context,c,h,u,d),!0;case 6:return g.fn.call(g.context,c,h,u,d,p),!0}for(_=1,b=new Array(m-1);_<m;_++)b[_-1]=arguments[_];g.fn.apply(g.context,b)}else{var y=g.length,x;for(_=0;_<y;_++)switch(g[_].once&&this.removeListener(f,g[_].fn,void 0,!0),m){case 1:g[_].fn.call(g[_].context);break;case 2:g[_].fn.call(g[_].context,c);break;case 3:g[_].fn.call(g[_].context,c,h);break;case 4:g[_].fn.call(g[_].context,c,h,u);break;default:if(!b)for(x=1,b=new Array(m-1);x<m;x++)b[x-1]=arguments[x];g[_].fn.apply(g[_].context,b)}}return!0},o.prototype.on=function(f,c,h){return s(this,f,c,h,!1)},o.prototype.once=function(f,c,h){return s(this,f,c,h,!0)},o.prototype.removeListener=function(f,c,h,u){var d=r?r+f:f;if(!this._events[d])return this;if(!c)return a(this,d),this;var p=this._events[d];if(p.fn)p.fn===c&&(!u||p.once)&&(!h||p.context===h)&&a(this,d);else{for(var v=0,g=[],m=p.length;v<m;v++)(p[v].fn!==c||u&&!p[v].once||h&&p[v].context!==h)&&g.push(p[v]);g.length?this._events[d]=g.length===1?g[0]:g:a(this,d)}return this},o.prototype.removeAllListeners=function(f){var c;return f?(c=r?r+f:f,this._events[c]&&a(this,c)):(this._events=new n,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=r,o.EventEmitter=o,e.exports=o})(Ba);var Tf=Ba.exports;const yn=sr(Tf);var Pi={exports:{}};Pi.exports=mn,Pi.exports.default=mn;function mn(e,t,r){r=r||2;var n=t&&t.length,i=n?t[0]*r:e.length,s=Ua(e,0,i,r,!0),a=[];if(!s||s.next===s.prev)return a;var o,l,f,c,h,u,d;if(n&&(s=If(e,t,s,r)),e.length>80*r){o=f=e[0],l=c=e[1];for(var p=r;p<i;p+=r)h=e[p],u=e[p+1],h<o&&(o=h),u<l&&(l=u),h>f&&(f=h),u>c&&(c=u);d=Math.max(f-o,c-l),d=d!==0?32767/d:0}return jr(s,a,r,o,l,d,0),a}function Ua(e,t,r,n,i){var s,a;if(i===Li(e,t,r,n)>0)for(s=t;s<r;s+=n)a=ja(s,e[s],e[s+1],a);else for(s=r-n;s>=t;s-=n)a=ja(s,e[s],e[s+1],a);return a&&gn(a,a.next)&&(qr(a),a=a.next),a}function Ve(e,t){if(!e)return e;t||(t=e);var r=e,n;do if(n=!1,!r.steiner&&(gn(r,r.next)||Pt(r.prev,r,r.next)===0)){if(qr(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function jr(e,t,r,n,i,s,a){if(e){!a&&s&&kf(e,n,i,s);for(var o=e,l,f;e.prev!==e.next;){if(l=e.prev,f=e.next,s?Af(e,n,i,s):wf(e)){t.push(l.i/r|0),t.push(e.i/r|0),t.push(f.i/r|0),qr(e),e=f.next,o=f.next;continue}if(e=f,e===o){a?a===1?(e=Sf(Ve(e),t,r),jr(e,t,r,n,i,s,2)):a===2&&Of(e,t,r,n,i,s):jr(Ve(e),t,r,n,i,s,1);break}}}}function wf(e){var t=e.prev,r=e,n=e.next;if(Pt(t,r,n)>=0)return!1;for(var i=t.x,s=r.x,a=n.x,o=t.y,l=r.y,f=n.y,c=i<s?i<a?i:a:s<a?s:a,h=o<l?o<f?o:f:l<f?l:f,u=i>s?i>a?i:a:s>a?s:a,d=o>l?o>f?o:f:l>f?l:f,p=n.next;p!==t;){if(p.x>=c&&p.x<=u&&p.y>=h&&p.y<=d&&ur(i,o,s,l,a,f,p.x,p.y)&&Pt(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function Af(e,t,r,n){var i=e.prev,s=e,a=e.next;if(Pt(i,s,a)>=0)return!1;for(var o=i.x,l=s.x,f=a.x,c=i.y,h=s.y,u=a.y,d=o<l?o<f?o:f:l<f?l:f,p=c<h?c<u?c:u:h<u?h:u,v=o>l?o>f?o:f:l>f?l:f,g=c>h?c>u?c:u:h>u?h:u,m=ki(d,p,t,r,n),b=ki(v,g,t,r,n),_=e.prevZ,y=e.nextZ;_&&_.z>=m&&y&&y.z<=b;){if(_.x>=d&&_.x<=v&&_.y>=p&&_.y<=g&&_!==i&&_!==a&&ur(o,c,l,h,f,u,_.x,_.y)&&Pt(_.prev,_,_.next)>=0||(_=_.prevZ,y.x>=d&&y.x<=v&&y.y>=p&&y.y<=g&&y!==i&&y!==a&&ur(o,c,l,h,f,u,y.x,y.y)&&Pt(y.prev,y,y.next)>=0))return!1;y=y.nextZ}for(;_&&_.z>=m;){if(_.x>=d&&_.x<=v&&_.y>=p&&_.y<=g&&_!==i&&_!==a&&ur(o,c,l,h,f,u,_.x,_.y)&&Pt(_.prev,_,_.next)>=0)return!1;_=_.prevZ}for(;y&&y.z<=b;){if(y.x>=d&&y.x<=v&&y.y>=p&&y.y<=g&&y!==i&&y!==a&&ur(o,c,l,h,f,u,y.x,y.y)&&Pt(y.prev,y,y.next)>=0)return!1;y=y.nextZ}return!0}function Sf(e,t,r){var n=e;do{var i=n.prev,s=n.next.next;!gn(i,s)&&Da(i,n,n.next,s)&&Gr(i,s)&&Gr(s,i)&&(t.push(i.i/r|0),t.push(n.i/r|0),t.push(s.i/r|0),qr(n),qr(n.next),n=e=s),n=n.next}while(n!==e);return Ve(n)}function Of(e,t,r,n,i,s){var a=e;do{for(var o=a.next.next;o!==a.prev;){if(a.i!==o.i&&Ff(a,o)){var l=$a(a,o);a=Ve(a,a.next),l=Ve(l,l.next),jr(a,t,r,n,i,s,0),jr(l,t,r,n,i,s,0);return}o=o.next}a=a.next}while(a!==e)}function If(e,t,r,n){var i=[],s,a,o,l,f;for(s=0,a=t.length;s<a;s++)o=t[s]*n,l=s<a-1?t[s+1]*n:e.length,f=Ua(e,o,l,n,!1),f===f.next&&(f.steiner=!0),i.push(Lf(f));for(i.sort(Rf),s=0;s<i.length;s++)r=Nf(i[s],r);return r}function Rf(e,t){return e.x-t.x}function Nf(e,t){var r=Cf(e,t);if(!r)return t;var n=$a(r,e);return Ve(n,n.next),Ve(r,r.next)}function Cf(e,t){var r=t,n=e.x,i=e.y,s=-1/0,a;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var o=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(o<=n&&o>s&&(s=o,a=r.x<r.next.x?r:r.next,o===n))return a}r=r.next}while(r!==t);if(!a)return null;var l=a,f=a.x,c=a.y,h=1/0,u;r=a;do n>=r.x&&r.x>=f&&n!==r.x&&ur(i<c?n:s,i,f,c,i<c?s:n,i,r.x,r.y)&&(u=Math.abs(i-r.y)/(n-r.x),Gr(r,e)&&(u<h||u===h&&(r.x>a.x||r.x===a.x&&Pf(a,r)))&&(a=r,h=u)),r=r.next;while(r!==l);return a}function Pf(e,t){return Pt(e.prev,e,t.prev)<0&&Pt(t.next,e,e.next)<0}function kf(e,t,r,n){var i=e;do i.z===0&&(i.z=ki(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,Mf(i)}function Mf(e){var t,r,n,i,s,a,o,l,f=1;do{for(r=e,e=null,s=null,a=0;r;){for(a++,n=r,o=0,t=0;t<f&&(o++,n=n.nextZ,!!n);t++);for(l=f;o>0||l>0&&n;)o!==0&&(l===0||!n||r.z<=n.z)?(i=r,r=r.nextZ,o--):(i=n,n=n.nextZ,l--),s?s.nextZ=i:e=i,i.prevZ=s,s=i;r=n}s.nextZ=null,f*=2}while(a>1);return e}function ki(e,t,r,n,i){return e=(e-r)*i|0,t=(t-n)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function Lf(e){var t=e,r=e;do(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next;while(t!==e);return r}function ur(e,t,r,n,i,s,a,o){return(i-a)*(t-o)>=(e-a)*(s-o)&&(e-a)*(n-o)>=(r-a)*(t-o)&&(r-a)*(s-o)>=(i-a)*(n-o)}function Ff(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!Bf(e,t)&&(Gr(e,t)&&Gr(t,e)&&Uf(e,t)&&(Pt(e.prev,e,t.prev)||Pt(e,t.prev,t))||gn(e,t)&&Pt(e.prev,e,e.next)>0&&Pt(t.prev,t,t.next)>0)}function Pt(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function gn(e,t){return e.x===t.x&&e.y===t.y}function Da(e,t,r,n){var i=_n(Pt(e,t,r)),s=_n(Pt(e,t,n)),a=_n(Pt(r,n,e)),o=_n(Pt(r,n,t));return!!(i!==s&&a!==o||i===0&&bn(e,r,t)||s===0&&bn(e,n,t)||a===0&&bn(r,e,n)||o===0&&bn(r,t,n))}function bn(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function _n(e){return e>0?1:e<0?-1:0}function Bf(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&Da(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function Gr(e,t){return Pt(e.prev,e,e.next)<0?Pt(e,t,e.next)>=0&&Pt(e,e.prev,t)>=0:Pt(e,t,e.prev)<0||Pt(e,e.next,t)<0}function Uf(e,t){var r=e,n=!1,i=(e.x+t.x)/2,s=(e.y+t.y)/2;do r.y>s!=r.next.y>s&&r.next.y!==r.y&&i<(r.next.x-r.x)*(s-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==e);return n}function $a(e,t){var r=new Mi(e.i,e.x,e.y),n=new Mi(t.i,t.x,t.y),i=e.next,s=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,s.next=n,n.prev=s,n}function ja(e,t,r,n){var i=new Mi(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function qr(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Mi(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}mn.deviation=function(e,t,r,n){var i=t&&t.length,s=i?t[0]*r:e.length,a=Math.abs(Li(e,0,s,r));if(i)for(var o=0,l=t.length;o<l;o++){var f=t[o]*r,c=o<l-1?t[o+1]*r:e.length;a-=Math.abs(Li(e,f,c,r))}var h=0;for(o=0;o<n.length;o+=3){var u=n[o]*r,d=n[o+1]*r,p=n[o+2]*r;h+=Math.abs((e[u]-e[p])*(e[d+1]-e[u+1])-(e[u]-e[d])*(e[p+1]-e[u+1]))}return a===0&&h===0?0:Math.abs((h-a)/a)};function Li(e,t,r,n){for(var i=0,s=t,a=r-n;s<r;s+=n)i+=(e[a]-e[s])*(e[s+1]+e[a+1]),a=s;return i}mn.flatten=function(e){for(var t=e[0][0].length,r={vertices:[],holes:[],dimensions:t},n=0,i=0;i<e.length;i++){for(var s=0;s<e[i].length;s++)for(var a=0;a<t;a++)r.vertices.push(e[i][s][a]);i>0&&(n+=e[i-1].length,r.holes.push(n))}return r};var Df=Pi.exports;const $f=sr(Df);var xn={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */xn.exports,function(e,t){(function(r){var n=t&&!t.nodeType&&t,i=e&&!e.nodeType&&e,s=typeof Ce=="object"&&Ce;(s.global===s||s.window===s||s.self===s)&&(r=s);var a,o=2147483647,l=36,f=1,c=26,h=38,u=700,d=72,p=128,v="-",g=/^xn--/,m=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,_={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y=l-f,x=Math.floor,O=String.fromCharCode,T;function E(P){throw new RangeError(_[P])}function N(P,R){for(var k=P.length,L=[];k--;)L[k]=R(P[k]);return L}function A(P,R){var k=P.split("@"),L="";k.length>1&&(L=k[0]+"@",P=k[1]),P=P.replace(b,".");var j=P.split("."),G=N(j,R).join(".");return L+G}function w(P){for(var R=[],k=0,L=P.length,j,G;k<L;)j=P.charCodeAt(k++),j>=55296&&j<=56319&&k<L?(G=P.charCodeAt(k++),(G&64512)==56320?R.push(((j&1023)<<10)+(G&1023)+65536):(R.push(j),k--)):R.push(j);return R}function S(P){return N(P,function(R){var k="";return R>65535&&(R-=65536,k+=O(R>>>10&1023|55296),R=56320|R&1023),k+=O(R),k}).join("")}function I(P){return P-48<10?P-22:P-65<26?P-65:P-97<26?P-97:l}function C(P,R){return P+22+75*(P<26)-((R!=0)<<5)}function F(P,R,k){var L=0;for(P=k?x(P/u):P>>1,P+=x(P/R);P>y*c>>1;L+=l)P=x(P/y);return x(L+(y+1)*P/(P+h))}function $(P){var R=[],k=P.length,L,j=0,G=p,M=d,B,q,H,z,Y,J,et,at,lt;for(B=P.lastIndexOf(v),B<0&&(B=0),q=0;q<B;++q)P.charCodeAt(q)>=128&&E("not-basic"),R.push(P.charCodeAt(q));for(H=B>0?B+1:0;H<k;){for(z=j,Y=1,J=l;H>=k&&E("invalid-input"),et=I(P.charCodeAt(H++)),(et>=l||et>x((o-j)/Y))&&E("overflow"),j+=et*Y,at=J<=M?f:J>=M+c?c:J-M,!(et<at);J+=l)lt=l-at,Y>x(o/lt)&&E("overflow"),Y*=lt;L=R.length+1,M=F(j-z,L,z==0),x(j/L)>o-G&&E("overflow"),G+=x(j/L),j%=L,R.splice(j++,0,G)}return S(R)}function U(P){var R,k,L,j,G,M,B,q,H,z,Y,J=[],et,at,lt,Ct;for(P=w(P),et=P.length,R=p,k=0,G=d,M=0;M<et;++M)Y=P[M],Y<128&&J.push(O(Y));for(L=j=J.length,j&&J.push(v);L<et;){for(B=o,M=0;M<et;++M)Y=P[M],Y>=R&&Y<B&&(B=Y);for(at=L+1,B-R>x((o-k)/at)&&E("overflow"),k+=(B-R)*at,R=B,M=0;M<et;++M)if(Y=P[M],Y<R&&++k>o&&E("overflow"),Y==R){for(q=k,H=l;z=H<=G?f:H>=G+c?c:H-G,!(q<z);H+=l)Ct=q-z,lt=l-z,J.push(O(C(z+Ct%lt,0))),q=x(Ct/lt);J.push(O(C(q,0))),G=F(k,at,L==j),k=0,++L}++k,++R}return J.join("")}function X(P){return A(P,function(R){return g.test(R)?$(R.slice(4).toLowerCase()):R})}function D(P){return A(P,function(R){return m.test(R)?"xn--"+U(R):R})}if(a={version:"1.4.1",ucs2:{decode:w,encode:S},decode:$,encode:U,toASCII:D,toUnicode:X},n&&i)if(e.exports==n)i.exports=a;else for(T in a)a.hasOwnProperty(T)&&(n[T]=a[T]);else r.punycode=a})(Ce)}(xn,xn.exports);var jf=xn.exports,Gf=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(r in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,r);if(a.value!==i||a.enumerable!==!0)return!1}return!0},Ga=typeof Symbol<"u"&&Symbol,qf=Gf,Hf=function(){return typeof Ga!="function"||typeof Symbol!="function"||typeof Ga("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:qf()},qa={foo:{}},Vf=Object,zf=function(){return{__proto__:qa}.foo===qa.foo&&!({__proto__:null}instanceof Vf)},Xf="Function.prototype.bind called on incompatible ",Fi=Array.prototype.slice,Wf=Object.prototype.toString,Yf="[object Function]",Kf=function(t){var r=this;if(typeof r!="function"||Wf.call(r)!==Yf)throw new TypeError(Xf+r);for(var n=Fi.call(arguments,1),i,s=function(){if(this instanceof i){var c=r.apply(this,n.concat(Fi.call(arguments)));return Object(c)===c?c:this}else return r.apply(t,n.concat(Fi.call(arguments)))},a=Math.max(0,r.length-n.length),o=[],l=0;l<a;l++)o.push("$"+l);if(i=Function("binder","return function ("+o.join(",")+"){ return binder.apply(this,arguments); }")(s),r.prototype){var f=function(){};f.prototype=r.prototype,i.prototype=new f,f.prototype=null}return i},Zf=Kf,Bi=Function.prototype.bind||Zf,Qf=Bi,Jf=Qf.call(Function.call,Object.prototype.hasOwnProperty),pt,fr=SyntaxError,Ha=Function,cr=TypeError,Ui=function(e){try{return Ha('"use strict"; return ('+e+").constructor;")()}catch{}},ze=Object.getOwnPropertyDescriptor;if(ze)try{ze({},"")}catch{ze=null}var Di=function(){throw new cr},tc=ze?function(){try{return arguments.callee,Di}catch{try{return ze(arguments,"callee").get}catch{return Di}}}():Di,hr=Hf(),ec=zf(),Dt=Object.getPrototypeOf||(ec?function(e){return e.__proto__}:null),dr={},rc=typeof Uint8Array>"u"||!Dt?pt:Dt(Uint8Array),Xe={"%AggregateError%":typeof AggregateError>"u"?pt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?pt:ArrayBuffer,"%ArrayIteratorPrototype%":hr&&Dt?Dt([][Symbol.iterator]()):pt,"%AsyncFromSyncIteratorPrototype%":pt,"%AsyncFunction%":dr,"%AsyncGenerator%":dr,"%AsyncGeneratorFunction%":dr,"%AsyncIteratorPrototype%":dr,"%Atomics%":typeof Atomics>"u"?pt:Atomics,"%BigInt%":typeof BigInt>"u"?pt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?pt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?pt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?pt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?pt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?pt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?pt:FinalizationRegistry,"%Function%":Ha,"%GeneratorFunction%":dr,"%Int8Array%":typeof Int8Array>"u"?pt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?pt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?pt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hr&&Dt?Dt(Dt([][Symbol.iterator]())):pt,"%JSON%":typeof JSON=="object"?JSON:pt,"%Map%":typeof Map>"u"?pt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!hr||!Dt?pt:Dt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?pt:Promise,"%Proxy%":typeof Proxy>"u"?pt:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?pt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?pt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!hr||!Dt?pt:Dt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?pt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hr&&Dt?Dt(""[Symbol.iterator]()):pt,"%Symbol%":hr?Symbol:pt,"%SyntaxError%":fr,"%ThrowTypeError%":tc,"%TypedArray%":rc,"%TypeError%":cr,"%Uint8Array%":typeof Uint8Array>"u"?pt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?pt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?pt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?pt:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?pt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?pt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?pt:WeakSet};if(Dt)try{null.error}catch(e){var nc=Dt(Dt(e));Xe["%Error.prototype%"]=nc}var ic=function e(t){var r;if(t==="%AsyncFunction%")r=Ui("async function () {}");else if(t==="%GeneratorFunction%")r=Ui("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=Ui("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Dt&&(r=Dt(i.prototype))}return Xe[t]=r,r},Va={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Hr=Bi,En=Jf,sc=Hr.call(Function.call,Array.prototype.concat),ac=Hr.call(Function.apply,Array.prototype.splice),za=Hr.call(Function.call,String.prototype.replace),Tn=Hr.call(Function.call,String.prototype.slice),oc=Hr.call(Function.call,RegExp.prototype.exec),lc=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,uc=/\\(\\)?/g,fc=function(t){var r=Tn(t,0,1),n=Tn(t,-1);if(r==="%"&&n!=="%")throw new fr("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new fr("invalid intrinsic syntax, expected opening `%`");var i=[];return za(t,lc,function(s,a,o,l){i[i.length]=o?za(l,uc,"$1"):a||s}),i},cc=function(t,r){var n=t,i;if(En(Va,n)&&(i=Va[n],n="%"+i[0]+"%"),En(Xe,n)){var s=Xe[n];if(s===dr&&(s=ic(n)),typeof s>"u"&&!r)throw new cr("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:s}}throw new fr("intrinsic "+t+" does not exist!")},$i=function(t,r){if(typeof t!="string"||t.length===0)throw new cr("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new cr('"allowMissing" argument must be a boolean');if(oc(/^%?[^%]*%?$/,t)===null)throw new fr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=fc(t),i=n.length>0?n[0]:"",s=cc("%"+i+"%",r),a=s.name,o=s.value,l=!1,f=s.alias;f&&(i=f[0],ac(n,sc([0,1],f)));for(var c=1,h=!0;c<n.length;c+=1){var u=n[c],d=Tn(u,0,1),p=Tn(u,-1);if((d==='"'||d==="'"||d==="`"||p==='"'||p==="'"||p==="`")&&d!==p)throw new fr("property names with quotes must have matching quotes");if((u==="constructor"||!h)&&(l=!0),i+="."+u,a="%"+i+"%",En(Xe,a))o=Xe[a];else if(o!=null){if(!(u in o)){if(!r)throw new cr("base intrinsic for "+t+" exists, but the property is not available.");return}if(ze&&c+1>=n.length){var v=ze(o,u);h=!!v,h&&"get"in v&&!("originalValue"in v.get)?o=v.get:o=o[u]}else h=En(o,u),o=o[u];h&&!l&&(Xe[a]=o)}}return o},Xa={exports:{}};(function(e){var t=Bi,r=$i,n=r("%Function.prototype.apply%"),i=r("%Function.prototype.call%"),s=r("%Reflect.apply%",!0)||t.call(i,n),a=r("%Object.getOwnPropertyDescriptor%",!0),o=r("%Object.defineProperty%",!0),l=r("%Math.max%");if(o)try{o({},"a",{value:1})}catch{o=null}e.exports=function(h){var u=s(t,i,arguments);if(a&&o){var d=a(u,"length");d.configurable&&o(u,"length",{value:1+l(0,h.length-(arguments.length-1))})}return u};var f=function(){return s(t,n,arguments)};o?o(e.exports,"apply",{value:f}):e.exports.apply=f})(Xa);var hc=Xa.exports,Wa=$i,Ya=hc,dc=Ya(Wa("String.prototype.indexOf")),pc=function(t,r){var n=Wa(t,!!r);return typeof n=="function"&&dc(t,".prototype.")>-1?Ya(n):n};const vc=vf(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var ji=typeof Map=="function"&&Map.prototype,Gi=Object.getOwnPropertyDescriptor&&ji?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,wn=ji&&Gi&&typeof Gi.get=="function"?Gi.get:null,Ka=ji&&Map.prototype.forEach,qi=typeof Set=="function"&&Set.prototype,Hi=Object.getOwnPropertyDescriptor&&qi?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,An=qi&&Hi&&typeof Hi.get=="function"?Hi.get:null,Za=qi&&Set.prototype.forEach,yc=typeof WeakMap=="function"&&WeakMap.prototype,Vr=yc?WeakMap.prototype.has:null,mc=typeof WeakSet=="function"&&WeakSet.prototype,zr=mc?WeakSet.prototype.has:null,gc=typeof WeakRef=="function"&&WeakRef.prototype,Qa=gc?WeakRef.prototype.deref:null,bc=Boolean.prototype.valueOf,_c=Object.prototype.toString,xc=Function.prototype.toString,Ec=String.prototype.match,Vi=String.prototype.slice,Me=String.prototype.replace,Tc=String.prototype.toUpperCase,Ja=String.prototype.toLowerCase,to=RegExp.prototype.test,eo=Array.prototype.concat,ve=Array.prototype.join,wc=Array.prototype.slice,ro=Math.floor,zi=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Xi=Object.getOwnPropertySymbols,Wi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,pr=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Ht=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===pr||"symbol")?Symbol.toStringTag:null,no=Object.prototype.propertyIsEnumerable,io=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function so(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||to.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-ro(-e):ro(e);if(n!==e){var i=String(n),s=Vi.call(t,i.length+1);return Me.call(i,r,"$&_")+"."+Me.call(Me.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Me.call(t,r,"$&_")}var Yi=vc,ao=Yi.custom,oo=fo(ao)?ao:null,Ac=function e(t,r,n,i){var s=r||{};if(Le(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Le(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=Le(s,"customInspect")?s.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Le(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Le(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var o=s.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return ho(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return o?so(t,l):l}if(typeof t=="bigint"){var f=String(t)+"n";return o?so(t,f):f}var c=typeof s.depth>"u"?5:s.depth;if(typeof n>"u"&&(n=0),n>=c&&c>0&&typeof t=="object")return Ki(t)?"[Array]":"[Object]";var h=qc(s,n);if(typeof i>"u")i=[];else if(co(i,t)>=0)return"[Circular]";function u(I,C,F){if(C&&(i=wc.call(i),i.push(C)),F){var $={depth:s.depth};return Le(s,"quoteStyle")&&($.quoteStyle=s.quoteStyle),e(I,$,n+1,i)}return e(I,s,n+1,i)}if(typeof t=="function"&&!uo(t)){var d=Mc(t),p=Sn(t,u);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(p.length>0?" { "+ve.call(p,", ")+" }":"")}if(fo(t)){var v=pr?Me.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Wi.call(t);return typeof t=="object"&&!pr?Xr(v):v}if($c(t)){for(var g="<"+Ja.call(String(t.nodeName)),m=t.attributes||[],b=0;b<m.length;b++)g+=" "+m[b].name+"="+lo(Sc(m[b].value),"double",s);return g+=">",t.childNodes&&t.childNodes.length&&(g+="..."),g+="</"+Ja.call(String(t.nodeName))+">",g}if(Ki(t)){if(t.length===0)return"[]";var _=Sn(t,u);return h&&!Gc(_)?"["+Qi(_,h)+"]":"[ "+ve.call(_,", ")+" ]"}if(Ic(t)){var y=Sn(t,u);return!("cause"in Error.prototype)&&"cause"in t&&!no.call(t,"cause")?"{ ["+String(t)+"] "+ve.call(eo.call("[cause]: "+u(t.cause),y),", ")+" }":y.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+ve.call(y,", ")+" }"}if(typeof t=="object"&&a){if(oo&&typeof t[oo]=="function"&&Yi)return Yi(t,{depth:c-n});if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(Lc(t)){var x=[];return Ka&&Ka.call(t,function(I,C){x.push(u(C,t,!0)+" => "+u(I,t))}),po("Map",wn.call(t),x,h)}if(Uc(t)){var O=[];return Za&&Za.call(t,function(I){O.push(u(I,t))}),po("Set",An.call(t),O,h)}if(Fc(t))return Zi("WeakMap");if(Dc(t))return Zi("WeakSet");if(Bc(t))return Zi("WeakRef");if(Nc(t))return Xr(u(Number(t)));if(Pc(t))return Xr(u(zi.call(t)));if(Cc(t))return Xr(bc.call(t));if(Rc(t))return Xr(u(String(t)));if(!Oc(t)&&!uo(t)){var T=Sn(t,u),E=io?io(t)===Object.prototype:t instanceof Object||t.constructor===Object,N=t instanceof Object?"":"null prototype",A=!E&&Ht&&Object(t)===t&&Ht in t?Vi.call(Fe(t),8,-1):N?"Object":"",w=E||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",S=w+(A||N?"["+ve.call(eo.call([],A||[],N||[]),": ")+"] ":"");return T.length===0?S+"{}":h?S+"{"+Qi(T,h)+"}":S+"{ "+ve.call(T,", ")+" }"}return String(t)};function lo(e,t,r){var n=(r.quoteStyle||t)==="double"?'"':"'";return n+e+n}function Sc(e){return Me.call(String(e),/"/g,"&quot;")}function Ki(e){return Fe(e)==="[object Array]"&&(!Ht||!(typeof e=="object"&&Ht in e))}function Oc(e){return Fe(e)==="[object Date]"&&(!Ht||!(typeof e=="object"&&Ht in e))}function uo(e){return Fe(e)==="[object RegExp]"&&(!Ht||!(typeof e=="object"&&Ht in e))}function Ic(e){return Fe(e)==="[object Error]"&&(!Ht||!(typeof e=="object"&&Ht in e))}function Rc(e){return Fe(e)==="[object String]"&&(!Ht||!(typeof e=="object"&&Ht in e))}function Nc(e){return Fe(e)==="[object Number]"&&(!Ht||!(typeof e=="object"&&Ht in e))}function Cc(e){return Fe(e)==="[object Boolean]"&&(!Ht||!(typeof e=="object"&&Ht in e))}function fo(e){if(pr)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Wi)return!1;try{return Wi.call(e),!0}catch{}return!1}function Pc(e){if(!e||typeof e!="object"||!zi)return!1;try{return zi.call(e),!0}catch{}return!1}var kc=Object.prototype.hasOwnProperty||function(e){return e in this};function Le(e,t){return kc.call(e,t)}function Fe(e){return _c.call(e)}function Mc(e){if(e.name)return e.name;var t=Ec.call(xc.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function co(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function Lc(e){if(!wn||!e||typeof e!="object")return!1;try{wn.call(e);try{An.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function Fc(e){if(!Vr||!e||typeof e!="object")return!1;try{Vr.call(e,Vr);try{zr.call(e,zr)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function Bc(e){if(!Qa||!e||typeof e!="object")return!1;try{return Qa.call(e),!0}catch{}return!1}function Uc(e){if(!An||!e||typeof e!="object")return!1;try{An.call(e);try{wn.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function Dc(e){if(!zr||!e||typeof e!="object")return!1;try{zr.call(e,zr);try{Vr.call(e,Vr)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function $c(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function ho(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return ho(Vi.call(e,0,t.maxStringLength),t)+n}var i=Me.call(Me.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,jc);return lo(i,"single",t)}function jc(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+Tc.call(t.toString(16))}function Xr(e){return"Object("+e+")"}function Zi(e){return e+" { ? }"}function po(e,t,r,n){var i=n?Qi(r,n):ve.call(r,", ");return e+" ("+t+") {"+i+"}"}function Gc(e){for(var t=0;t<e.length;t++)if(co(e[t],`
10
10
  `)>=0)return!1;return!0}function qc(e,t){var r;if(e.indent===" ")r=" ";else if(typeof e.indent=="number"&&e.indent>0)r=ve.call(Array(e.indent+1)," ");else return null;return{base:r,prev:ve.call(Array(t+1),r)}}function Qi(e,t){if(e.length===0)return"";var r=`
11
11
  `+t.prev+t.base;return r+ve.call(e,","+r)+`
12
- `+t.prev}function Sn(e,t){var r=Ki(e),n=[];if(r){n.length=e.length;for(var i=0;i<e.length;i++)n[i]=Le(e,i)?t(e[i],e):""}var s=typeof Xi=="function"?Xi(e):[],a;if(pr){a={};for(var o=0;o<s.length;o++)a["$"+s[o]]=s[o]}for(var l in e)Le(e,l)&&(r&&String(Number(l))===l&&l<e.length||pr&&a["$"+l]instanceof Symbol||(to.call(/[^\w$]/,l)?n.push(t(l,e)+": "+t(e[l],e)):n.push(l+": "+t(e[l],e))));if(typeof Xi=="function")for(var f=0;f<s.length;f++)no.call(e,s[f])&&n.push("["+t(s[f])+"]: "+t(e[s[f]],e));return n}var Ji=$i,vr=pc,Hc=Ac,Vc=Ji("%TypeError%"),On=Ji("%WeakMap%",!0),In=Ji("%Map%",!0),zc=vr("WeakMap.prototype.get",!0),Xc=vr("WeakMap.prototype.set",!0),Wc=vr("WeakMap.prototype.has",!0),Yc=vr("Map.prototype.get",!0),Kc=vr("Map.prototype.set",!0),Zc=vr("Map.prototype.has",!0),ts=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},Qc=function(e,t){var r=ts(e,t);return r&&r.value},Jc=function(e,t,r){var n=ts(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},th=function(e,t){return!!ts(e,t)},eh=function(){var t,r,n,i={assert:function(s){if(!i.has(s))throw new Vc("Side channel does not contain "+Hc(s))},get:function(s){if(On&&s&&(typeof s=="object"||typeof s=="function")){if(t)return zc(t,s)}else if(In){if(r)return Yc(r,s)}else if(n)return Qc(n,s)},has:function(s){if(On&&s&&(typeof s=="object"||typeof s=="function")){if(t)return Wc(t,s)}else if(In){if(r)return Zc(r,s)}else if(n)return th(n,s);return!1},set:function(s,a){On&&s&&(typeof s=="object"||typeof s=="function")?(t||(t=new On),Xc(t,s,a)):In?(r||(r=new In),Kc(r,s,a)):(n||(n={key:{},next:null}),Jc(n,s,a))}};return i},rh=String.prototype.replace,nh=/%20/g,es={RFC1738:"RFC1738",RFC3986:"RFC3986"},rs={default:es.RFC3986,formatters:{RFC1738:function(e){return rh.call(e,nh,"+")},RFC3986:function(e){return String(e)}},RFC1738:es.RFC1738,RFC3986:es.RFC3986},ih=rs,ns=Object.prototype.hasOwnProperty,We=Array.isArray,ye=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),sh=function(t){for(;t.length>1;){var r=t.pop(),n=r.obj[r.prop];if(We(n)){for(var i=[],s=0;s<n.length;++s)typeof n[s]<"u"&&i.push(n[s]);r.obj[r.prop]=i}}},vo=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},ah=function e(t,r,n){if(!r)return t;if(typeof r!="object"){if(We(t))t.push(r);else if(t&&typeof t=="object")(n&&(n.plainObjects||n.allowPrototypes)||!ns.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 We(t)&&!We(r)&&(i=vo(t,n)),We(t)&&We(r)?(r.forEach(function(s,a){if(ns.call(t,a)){var o=t[a];o&&typeof o=="object"&&s&&typeof s=="object"?t[a]=e(o,s,n):t.push(s)}else t[a]=s}),t):Object.keys(r).reduce(function(s,a){var o=r[a];return ns.call(s,a)?s[a]=e(s[a],o,n):s[a]=o,s},i)},oh=function(t,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},t)},lh=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}},uh=function(t,r,n,i,s){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(c){return"%26%23"+parseInt(c.slice(2),16)+"%3B"});for(var o="",l=0;l<a.length;++l){var f=a.charCodeAt(l);if(f===45||f===46||f===95||f===126||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||s===ih.RFC1738&&(f===40||f===41)){o+=a.charAt(l);continue}if(f<128){o=o+ye[f];continue}if(f<2048){o=o+(ye[192|f>>6]+ye[128|f&63]);continue}if(f<55296||f>=57344){o=o+(ye[224|f>>12]+ye[128|f>>6&63]+ye[128|f&63]);continue}l+=1,f=65536+((f&1023)<<10|a.charCodeAt(l)&1023),o+=ye[240|f>>18]+ye[128|f>>12&63]+ye[128|f>>6&63]+ye[128|f&63]}return o},fh=function(t){for(var r=[{obj:{o:t},prop:"o"}],n=[],i=0;i<r.length;++i)for(var s=r[i],a=s.obj[s.prop],o=Object.keys(a),l=0;l<o.length;++l){var f=o[l],c=a[f];typeof c=="object"&&c!==null&&n.indexOf(c)===-1&&(r.push({obj:a,prop:f}),n.push(c))}return sh(r),t},ch=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},hh=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},dh=function(t,r){return[].concat(t,r)},ph=function(t,r){if(We(t)){for(var n=[],i=0;i<t.length;i+=1)n.push(r(t[i]));return n}return r(t)},yo={arrayToObject:vo,assign:oh,combine:dh,compact:fh,decode:lh,encode:uh,isBuffer:hh,isRegExp:ch,maybeMap:ph,merge:ah},mo=eh,Rn=yo,Wr=rs,vh=Object.prototype.hasOwnProperty,go={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,r){return t+"["+r+"]"},repeat:function(t){return t}},we=Array.isArray,yh=Array.prototype.push,bo=function(e,t){yh.apply(e,we(t)?t:[t])},mh=Date.prototype.toISOString,_o=Wr.default,Vt={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Rn.encode,encodeValuesOnly:!1,format:_o,formatter:Wr.formatters[_o],indices:!1,serializeDate:function(t){return mh.call(t)},skipNulls:!1,strictNullHandling:!1},gh=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},is={},bh=function e(t,r,n,i,s,a,o,l,f,c,h,u,d,p,v,g){for(var m=t,b=g,_=0,y=!1;(b=b.get(is))!==void 0&&!y;){var x=b.get(t);if(_+=1,typeof x<"u"){if(x===_)throw new RangeError("Cyclic object value");y=!0}typeof b.get(is)>"u"&&(_=0)}if(typeof l=="function"?m=l(r,m):m instanceof Date?m=h(m):n==="comma"&&we(m)&&(m=Rn.maybeMap(m,function(D){return D instanceof Date?h(D):D})),m===null){if(s)return o&&!p?o(r,Vt.encoder,v,"key",u):r;m=""}if(gh(m)||Rn.isBuffer(m)){if(o){var O=p?r:o(r,Vt.encoder,v,"key",u);return[d(O)+"="+d(o(m,Vt.encoder,v,"value",u))]}return[d(r)+"="+d(String(m))]}var T=[];if(typeof m>"u")return T;var E;if(n==="comma"&&we(m))p&&o&&(m=Rn.maybeMap(m,o)),E=[{value:m.length>0?m.join(",")||null:void 0}];else if(we(l))E=l;else{var N=Object.keys(m);E=f?N.sort(f):N}for(var A=i&&we(m)&&m.length===1?r+"[]":r,w=0;w<E.length;++w){var S=E[w],I=typeof S=="object"&&typeof S.value<"u"?S.value:m[S];if(!(a&&I===null)){var C=we(m)?typeof n=="function"?n(A,S):A:A+(c?"."+S:"["+S+"]");g.set(t,_);var F=mo();F.set(is,g),bo(T,e(I,C,n,i,s,a,n==="comma"&&p&&we(m)?null:o,l,f,c,h,u,d,p,v,F))}}return T},_h=function(t){if(!t)return Vt;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||Vt.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=Wr.default;if(typeof t.format<"u"){if(!vh.call(Wr.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var i=Wr.formatters[n],s=Vt.filter;return(typeof t.filter=="function"||we(t.filter))&&(s=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Vt.addQueryPrefix,allowDots:typeof t.allowDots>"u"?Vt.allowDots:!!t.allowDots,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Vt.charsetSentinel,delimiter:typeof t.delimiter>"u"?Vt.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Vt.encode,encoder:typeof t.encoder=="function"?t.encoder:Vt.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Vt.encodeValuesOnly,filter:s,format:n,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Vt.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Vt.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Vt.strictNullHandling}},xh=function(e,t){var r=e,n=_h(t),i,s;typeof n.filter=="function"?(s=n.filter,r=s("",r)):we(n.filter)&&(s=n.filter,i=s);var a=[];if(typeof r!="object"||r===null)return"";var o;t&&t.arrayFormat in go?o=t.arrayFormat:t&&"indices"in t?o=t.indices?"indices":"repeat":o="indices";var l=go[o];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var f=l==="comma"&&t&&t.commaRoundTrip;i||(i=Object.keys(r)),n.sort&&i.sort(n.sort);for(var c=mo(),h=0;h<i.length;++h){var u=i[h];n.skipNulls&&r[u]===null||bo(a,bh(r[u],u,l,f,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,c))}var d=a.join(n.delimiter),p=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),d.length>0?p+d:""},yr=yo,ss=Object.prototype.hasOwnProperty,Eh=Array.isArray,$t={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:yr.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Th=function(e){return e.replace(/&#(\d+);/g,function(t,r){return String.fromCharCode(parseInt(r,10))})},xo=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},wh="utf8=%26%2310003%3B",Ah="utf8=%E2%9C%93",Sh=function(t,r){var n={__proto__:null},i=r.ignoreQueryPrefix?t.replace(/^\?/,""):t,s=r.parameterLimit===1/0?void 0:r.parameterLimit,a=i.split(r.delimiter,s),o=-1,l,f=r.charset;if(r.charsetSentinel)for(l=0;l<a.length;++l)a[l].indexOf("utf8=")===0&&(a[l]===Ah?f="utf-8":a[l]===wh&&(f="iso-8859-1"),o=l,l=a.length);for(l=0;l<a.length;++l)if(l!==o){var c=a[l],h=c.indexOf("]="),u=h===-1?c.indexOf("="):h+1,d,p;u===-1?(d=r.decoder(c,$t.decoder,f,"key"),p=r.strictNullHandling?null:""):(d=r.decoder(c.slice(0,u),$t.decoder,f,"key"),p=yr.maybeMap(xo(c.slice(u+1),r),function(v){return r.decoder(v,$t.decoder,f,"value")})),p&&r.interpretNumericEntities&&f==="iso-8859-1"&&(p=Th(p)),c.indexOf("[]=")>-1&&(p=Eh(p)?[p]:p),ss.call(n,d)?n[d]=yr.combine(n[d],p):n[d]=p}return n},Oh=function(e,t,r,n){for(var i=n?t:xo(t,r),s=e.length-1;s>=0;--s){var a,o=e[s];if(o==="[]"&&r.parseArrays)a=[].concat(i);else{a=r.plainObjects?Object.create(null):{};var l=o.charAt(0)==="["&&o.charAt(o.length-1)==="]"?o.slice(1,-1):o,f=parseInt(l,10);!r.parseArrays&&l===""?a={0:i}:!isNaN(f)&&o!==l&&String(f)===l&&f>=0&&r.parseArrays&&f<=r.arrayLimit?(a=[],a[f]=i):l!=="__proto__"&&(a[l]=i)}i=a}return i},Ih=function(t,r,n,i){if(t){var s=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/,o=/(\[[^[\]]*])/g,l=n.depth>0&&a.exec(s),f=l?s.slice(0,l.index):s,c=[];if(f){if(!n.plainObjects&&ss.call(Object.prototype,f)&&!n.allowPrototypes)return;c.push(f)}for(var h=0;n.depth>0&&(l=o.exec(s))!==null&&h<n.depth;){if(h+=1,!n.plainObjects&&ss.call(Object.prototype,l[1].slice(1,-1))&&!n.allowPrototypes)return;c.push(l[1])}return l&&c.push("["+s.slice(l.index)+"]"),Oh(c,r,n,i)}},Rh=function(t){if(!t)return $t;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"?$t.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?$t.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:$t.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:$t.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:$t.arrayLimit,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:$t.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:$t.comma,decoder:typeof t.decoder=="function"?t.decoder:$t.decoder,delimiter:typeof t.delimiter=="string"||yr.isRegExp(t.delimiter)?t.delimiter:$t.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:$t.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:$t.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:$t.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:$t.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:$t.strictNullHandling}},Nh=function(e,t){var r=Rh(t);if(e===""||e===null||typeof e>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof e=="string"?Sh(e,r):e,i=r.plainObjects?Object.create(null):{},s=Object.keys(n),a=0;a<s.length;++a){var o=s[a],l=Ih(o,n[o],r,typeof e=="string");i=yr.merge(i,l,r)}return r.allowSparse===!0?i:yr.compact(i)},Ch=xh,Ph=Nh,kh=rs,Mh={formats:kh,parse:Ph,stringify:Ch},Lh=jf;function re(){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 Fh=/^([a-z0-9.+-]+:)/i,Bh=/:[0-9]*$/,Uh=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,Dh=["<",">",'"',"`"," ","\r",`
13
- `," "],$h=["{","}","|","\\","^","`"].concat(Dh),as=["'"].concat($h),Eo=["%","/","?",";","#"].concat(as),To=["/","?","#"],jh=255,wo=/^[+a-z0-9A-Z_-]{0,63}$/,Gh=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,qh={javascript:!0,"javascript:":!0},os={javascript:!0,"javascript:":!0},mr={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},ls=Mh;function Nn(e,t,r){if(e&&typeof e=="object"&&e instanceof re)return e;var n=new re;return n.parse(e,t,r),n}re.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("#")?"?":"#",s=e.split(i),a=/\\/g;s[0]=s[0].replace(a,"/"),e=s.join(i);var o=e;if(o=o.trim(),!r&&e.split("#").length===1){var l=Uh.exec(o);if(l)return this.path=o,this.href=o,this.pathname=l[1],l[2]?(this.search=l[2],t?this.query=ls.parse(this.search.substr(1)):this.query=this.search.substr(1)):t&&(this.search="",this.query={}),this}var f=Fh.exec(o);if(f){f=f[0];var c=f.toLowerCase();this.protocol=c,o=o.substr(f.length)}if(r||f||o.match(/^\/\/[^@/]+@[^@/]+/)){var h=o.substr(0,2)==="//";h&&!(f&&os[f])&&(o=o.substr(2),this.slashes=!0)}if(!os[f]&&(h||f&&!mr[f])){for(var u=-1,d=0;d<To.length;d++){var p=o.indexOf(To[d]);p!==-1&&(u===-1||p<u)&&(u=p)}var v,g;u===-1?g=o.lastIndexOf("@"):g=o.lastIndexOf("@",u),g!==-1&&(v=o.slice(0,g),o=o.slice(g+1),this.auth=decodeURIComponent(v)),u=-1;for(var d=0;d<Eo.length;d++){var p=o.indexOf(Eo[d]);p!==-1&&(u===-1||p<u)&&(u=p)}u===-1&&(u=o.length),this.host=o.slice(0,u),o=o.slice(u),this.parseHost(),this.hostname=this.hostname||"";var m=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!m)for(var b=this.hostname.split(/\./),d=0,_=b.length;d<_;d++){var y=b[d];if(y&&!y.match(wo)){for(var x="",O=0,T=y.length;O<T;O++)y.charCodeAt(O)>127?x+="x":x+=y[O];if(!x.match(wo)){var E=b.slice(0,d),N=b.slice(d+1),A=y.match(Gh);A&&(E.push(A[1]),N.unshift(A[2])),N.length&&(o="/"+N.join(".")+o),this.hostname=E.join(".");break}}}this.hostname.length>jh?this.hostname="":this.hostname=this.hostname.toLowerCase(),m||(this.hostname=Lh.toASCII(this.hostname));var w=this.port?":"+this.port:"",S=this.hostname||"";this.host=S+w,this.href+=this.host,m&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),o[0]!=="/"&&(o="/"+o))}if(!qh[c])for(var d=0,_=as.length;d<_;d++){var I=as[d];if(o.indexOf(I)!==-1){var C=encodeURIComponent(I);C===I&&(C=escape(I)),o=o.split(I).join(C)}}var F=o.indexOf("#");F!==-1&&(this.hash=o.substr(F),o=o.slice(0,F));var D=o.indexOf("?");if(D!==-1?(this.search=o.substr(D),this.query=o.substr(D+1),t&&(this.query=ls.parse(this.query)),o=o.slice(0,D)):t&&(this.search="",this.query={}),o&&(this.pathname=o),mr[c]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var w=this.pathname||"",U=this.search||"";this.path=w+U}return this.href=this.format(),this};function Hh(e){return typeof e=="string"&&(e=Nn(e)),e instanceof re?e.format():re.prototype.format.call(e)}re.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,s="";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&&(s=ls.stringify(this.query));var a=this.search||s&&"?"+s||"";return t&&t.substr(-1)!==":"&&(t+=":"),this.slashes||(!t||mr[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(o){return encodeURIComponent(o)}),a=a.replace("#","%23"),t+i+r+a+n};function Vh(e,t){return Nn(e,!1,!0).resolve(t)}re.prototype.resolve=function(e){return this.resolveObject(Nn(e,!1,!0)).format()},re.prototype.resolveObject=function(e){if(typeof e=="string"){var t=new re;t.parse(e,!1,!0),e=t}for(var r=new re,n=Object.keys(this),i=0;i<n.length;i++){var s=n[i];r[s]=this[s]}if(r.hash=e.hash,e.href==="")return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var a=Object.keys(e),o=0;o<a.length;o++){var l=a[o];l!=="protocol"&&(r[l]=e[l])}return mr[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(!mr[e.protocol]){for(var f=Object.keys(e),c=0;c<f.length;c++){var h=f[c];r[h]=e[h]}return r.href=r.format(),r}if(r.protocol=e.protocol,!e.host&&!os[e.protocol]){for(var _=(e.pathname||"").split("/");_.length&&!(e.host=_.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),_[0]!==""&&_.unshift(""),_.length<2&&_.unshift(""),r.pathname=_.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 u=r.pathname||"",d=r.search||"";r.path=u+d}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var p=r.pathname&&r.pathname.charAt(0)==="/",v=e.host||e.pathname&&e.pathname.charAt(0)==="/",g=v||p||r.host&&e.pathname,m=g,b=r.pathname&&r.pathname.split("/")||[],_=e.pathname&&e.pathname.split("/")||[],y=r.protocol&&!mr[r.protocol];if(y&&(r.hostname="",r.port=null,r.host&&(b[0]===""?b[0]=r.host:b.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(_[0]===""?_[0]=e.host:_.unshift(e.host)),e.host=null),g=g&&(_[0]===""||b[0]==="")),v)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,b=_;else if(_.length)b||(b=[]),b.pop(),b=b.concat(_),r.search=e.search,r.query=e.query;else if(e.search!=null){if(y){r.host=b.shift(),r.hostname=r.host;var x=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;x&&(r.auth=x.shift(),r.hostname=x.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(!b.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var O=b.slice(-1)[0],T=(r.host||e.host||b.length>1)&&(O==="."||O==="..")||O==="",E=0,N=b.length;N>=0;N--)O=b[N],O==="."?b.splice(N,1):O===".."?(b.splice(N,1),E++):E&&(b.splice(N,1),E--);if(!g&&!m)for(;E--;E)b.unshift("..");g&&b[0]!==""&&(!b[0]||b[0].charAt(0)!=="/")&&b.unshift(""),T&&b.join("/").substr(-1)!=="/"&&b.push("");var A=b[0]===""||b[0]&&b[0].charAt(0)==="/";if(y){r.hostname=A?"":b.length?b.shift():"",r.host=r.hostname;var x=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;x&&(r.auth=x.shift(),r.hostname=x.shift(),r.host=r.hostname)}return g=g||r.host&&b.length,g&&!A&&b.unshift(""),b.length>0?r.pathname=b.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},re.prototype.parseHost=function(){var e=this.host,t=Bh.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 zh=Nn,Xh=Vh,Wh=Hh;const Yh={parse:zh,format:Wh,resolve:Xh},Ao={};function Tt(e,t,r=3){if(Ao[t])return;let n=new Error().stack;typeof n>"u"?console.warn("PixiJS Deprecation Warning: ",`${t}
12
+ `+t.prev}function Sn(e,t){var r=Ki(e),n=[];if(r){n.length=e.length;for(var i=0;i<e.length;i++)n[i]=Le(e,i)?t(e[i],e):""}var s=typeof Xi=="function"?Xi(e):[],a;if(pr){a={};for(var o=0;o<s.length;o++)a["$"+s[o]]=s[o]}for(var l in e)Le(e,l)&&(r&&String(Number(l))===l&&l<e.length||pr&&a["$"+l]instanceof Symbol||(to.call(/[^\w$]/,l)?n.push(t(l,e)+": "+t(e[l],e)):n.push(l+": "+t(e[l],e))));if(typeof Xi=="function")for(var f=0;f<s.length;f++)no.call(e,s[f])&&n.push("["+t(s[f])+"]: "+t(e[s[f]],e));return n}var Ji=$i,vr=pc,Hc=Ac,Vc=Ji("%TypeError%"),On=Ji("%WeakMap%",!0),In=Ji("%Map%",!0),zc=vr("WeakMap.prototype.get",!0),Xc=vr("WeakMap.prototype.set",!0),Wc=vr("WeakMap.prototype.has",!0),Yc=vr("Map.prototype.get",!0),Kc=vr("Map.prototype.set",!0),Zc=vr("Map.prototype.has",!0),ts=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},Qc=function(e,t){var r=ts(e,t);return r&&r.value},Jc=function(e,t,r){var n=ts(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},th=function(e,t){return!!ts(e,t)},eh=function(){var t,r,n,i={assert:function(s){if(!i.has(s))throw new Vc("Side channel does not contain "+Hc(s))},get:function(s){if(On&&s&&(typeof s=="object"||typeof s=="function")){if(t)return zc(t,s)}else if(In){if(r)return Yc(r,s)}else if(n)return Qc(n,s)},has:function(s){if(On&&s&&(typeof s=="object"||typeof s=="function")){if(t)return Wc(t,s)}else if(In){if(r)return Zc(r,s)}else if(n)return th(n,s);return!1},set:function(s,a){On&&s&&(typeof s=="object"||typeof s=="function")?(t||(t=new On),Xc(t,s,a)):In?(r||(r=new In),Kc(r,s,a)):(n||(n={key:{},next:null}),Jc(n,s,a))}};return i},rh=String.prototype.replace,nh=/%20/g,es={RFC1738:"RFC1738",RFC3986:"RFC3986"},rs={default:es.RFC3986,formatters:{RFC1738:function(e){return rh.call(e,nh,"+")},RFC3986:function(e){return String(e)}},RFC1738:es.RFC1738,RFC3986:es.RFC3986},ih=rs,ns=Object.prototype.hasOwnProperty,We=Array.isArray,ye=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),sh=function(t){for(;t.length>1;){var r=t.pop(),n=r.obj[r.prop];if(We(n)){for(var i=[],s=0;s<n.length;++s)typeof n[s]<"u"&&i.push(n[s]);r.obj[r.prop]=i}}},vo=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},ah=function e(t,r,n){if(!r)return t;if(typeof r!="object"){if(We(t))t.push(r);else if(t&&typeof t=="object")(n&&(n.plainObjects||n.allowPrototypes)||!ns.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 We(t)&&!We(r)&&(i=vo(t,n)),We(t)&&We(r)?(r.forEach(function(s,a){if(ns.call(t,a)){var o=t[a];o&&typeof o=="object"&&s&&typeof s=="object"?t[a]=e(o,s,n):t.push(s)}else t[a]=s}),t):Object.keys(r).reduce(function(s,a){var o=r[a];return ns.call(s,a)?s[a]=e(s[a],o,n):s[a]=o,s},i)},oh=function(t,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},t)},lh=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}},uh=function(t,r,n,i,s){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(c){return"%26%23"+parseInt(c.slice(2),16)+"%3B"});for(var o="",l=0;l<a.length;++l){var f=a.charCodeAt(l);if(f===45||f===46||f===95||f===126||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||s===ih.RFC1738&&(f===40||f===41)){o+=a.charAt(l);continue}if(f<128){o=o+ye[f];continue}if(f<2048){o=o+(ye[192|f>>6]+ye[128|f&63]);continue}if(f<55296||f>=57344){o=o+(ye[224|f>>12]+ye[128|f>>6&63]+ye[128|f&63]);continue}l+=1,f=65536+((f&1023)<<10|a.charCodeAt(l)&1023),o+=ye[240|f>>18]+ye[128|f>>12&63]+ye[128|f>>6&63]+ye[128|f&63]}return o},fh=function(t){for(var r=[{obj:{o:t},prop:"o"}],n=[],i=0;i<r.length;++i)for(var s=r[i],a=s.obj[s.prop],o=Object.keys(a),l=0;l<o.length;++l){var f=o[l],c=a[f];typeof c=="object"&&c!==null&&n.indexOf(c)===-1&&(r.push({obj:a,prop:f}),n.push(c))}return sh(r),t},ch=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},hh=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},dh=function(t,r){return[].concat(t,r)},ph=function(t,r){if(We(t)){for(var n=[],i=0;i<t.length;i+=1)n.push(r(t[i]));return n}return r(t)},yo={arrayToObject:vo,assign:oh,combine:dh,compact:fh,decode:lh,encode:uh,isBuffer:hh,isRegExp:ch,maybeMap:ph,merge:ah},mo=eh,Rn=yo,Wr=rs,vh=Object.prototype.hasOwnProperty,go={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,r){return t+"["+r+"]"},repeat:function(t){return t}},we=Array.isArray,yh=Array.prototype.push,bo=function(e,t){yh.apply(e,we(t)?t:[t])},mh=Date.prototype.toISOString,_o=Wr.default,Vt={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Rn.encode,encodeValuesOnly:!1,format:_o,formatter:Wr.formatters[_o],indices:!1,serializeDate:function(t){return mh.call(t)},skipNulls:!1,strictNullHandling:!1},gh=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},is={},bh=function e(t,r,n,i,s,a,o,l,f,c,h,u,d,p,v,g){for(var m=t,b=g,_=0,y=!1;(b=b.get(is))!==void 0&&!y;){var x=b.get(t);if(_+=1,typeof x<"u"){if(x===_)throw new RangeError("Cyclic object value");y=!0}typeof b.get(is)>"u"&&(_=0)}if(typeof l=="function"?m=l(r,m):m instanceof Date?m=h(m):n==="comma"&&we(m)&&(m=Rn.maybeMap(m,function($){return $ instanceof Date?h($):$})),m===null){if(s)return o&&!p?o(r,Vt.encoder,v,"key",u):r;m=""}if(gh(m)||Rn.isBuffer(m)){if(o){var O=p?r:o(r,Vt.encoder,v,"key",u);return[d(O)+"="+d(o(m,Vt.encoder,v,"value",u))]}return[d(r)+"="+d(String(m))]}var T=[];if(typeof m>"u")return T;var E;if(n==="comma"&&we(m))p&&o&&(m=Rn.maybeMap(m,o)),E=[{value:m.length>0?m.join(",")||null:void 0}];else if(we(l))E=l;else{var N=Object.keys(m);E=f?N.sort(f):N}for(var A=i&&we(m)&&m.length===1?r+"[]":r,w=0;w<E.length;++w){var S=E[w],I=typeof S=="object"&&typeof S.value<"u"?S.value:m[S];if(!(a&&I===null)){var C=we(m)?typeof n=="function"?n(A,S):A:A+(c?"."+S:"["+S+"]");g.set(t,_);var F=mo();F.set(is,g),bo(T,e(I,C,n,i,s,a,n==="comma"&&p&&we(m)?null:o,l,f,c,h,u,d,p,v,F))}}return T},_h=function(t){if(!t)return Vt;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||Vt.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=Wr.default;if(typeof t.format<"u"){if(!vh.call(Wr.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var i=Wr.formatters[n],s=Vt.filter;return(typeof t.filter=="function"||we(t.filter))&&(s=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Vt.addQueryPrefix,allowDots:typeof t.allowDots>"u"?Vt.allowDots:!!t.allowDots,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Vt.charsetSentinel,delimiter:typeof t.delimiter>"u"?Vt.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Vt.encode,encoder:typeof t.encoder=="function"?t.encoder:Vt.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Vt.encodeValuesOnly,filter:s,format:n,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Vt.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Vt.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Vt.strictNullHandling}},xh=function(e,t){var r=e,n=_h(t),i,s;typeof n.filter=="function"?(s=n.filter,r=s("",r)):we(n.filter)&&(s=n.filter,i=s);var a=[];if(typeof r!="object"||r===null)return"";var o;t&&t.arrayFormat in go?o=t.arrayFormat:t&&"indices"in t?o=t.indices?"indices":"repeat":o="indices";var l=go[o];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var f=l==="comma"&&t&&t.commaRoundTrip;i||(i=Object.keys(r)),n.sort&&i.sort(n.sort);for(var c=mo(),h=0;h<i.length;++h){var u=i[h];n.skipNulls&&r[u]===null||bo(a,bh(r[u],u,l,f,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,c))}var d=a.join(n.delimiter),p=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),d.length>0?p+d:""},yr=yo,ss=Object.prototype.hasOwnProperty,Eh=Array.isArray,$t={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:yr.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Th=function(e){return e.replace(/&#(\d+);/g,function(t,r){return String.fromCharCode(parseInt(r,10))})},xo=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},wh="utf8=%26%2310003%3B",Ah="utf8=%E2%9C%93",Sh=function(t,r){var n={__proto__:null},i=r.ignoreQueryPrefix?t.replace(/^\?/,""):t,s=r.parameterLimit===1/0?void 0:r.parameterLimit,a=i.split(r.delimiter,s),o=-1,l,f=r.charset;if(r.charsetSentinel)for(l=0;l<a.length;++l)a[l].indexOf("utf8=")===0&&(a[l]===Ah?f="utf-8":a[l]===wh&&(f="iso-8859-1"),o=l,l=a.length);for(l=0;l<a.length;++l)if(l!==o){var c=a[l],h=c.indexOf("]="),u=h===-1?c.indexOf("="):h+1,d,p;u===-1?(d=r.decoder(c,$t.decoder,f,"key"),p=r.strictNullHandling?null:""):(d=r.decoder(c.slice(0,u),$t.decoder,f,"key"),p=yr.maybeMap(xo(c.slice(u+1),r),function(v){return r.decoder(v,$t.decoder,f,"value")})),p&&r.interpretNumericEntities&&f==="iso-8859-1"&&(p=Th(p)),c.indexOf("[]=")>-1&&(p=Eh(p)?[p]:p),ss.call(n,d)?n[d]=yr.combine(n[d],p):n[d]=p}return n},Oh=function(e,t,r,n){for(var i=n?t:xo(t,r),s=e.length-1;s>=0;--s){var a,o=e[s];if(o==="[]"&&r.parseArrays)a=[].concat(i);else{a=r.plainObjects?Object.create(null):{};var l=o.charAt(0)==="["&&o.charAt(o.length-1)==="]"?o.slice(1,-1):o,f=parseInt(l,10);!r.parseArrays&&l===""?a={0:i}:!isNaN(f)&&o!==l&&String(f)===l&&f>=0&&r.parseArrays&&f<=r.arrayLimit?(a=[],a[f]=i):l!=="__proto__"&&(a[l]=i)}i=a}return i},Ih=function(t,r,n,i){if(t){var s=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/,o=/(\[[^[\]]*])/g,l=n.depth>0&&a.exec(s),f=l?s.slice(0,l.index):s,c=[];if(f){if(!n.plainObjects&&ss.call(Object.prototype,f)&&!n.allowPrototypes)return;c.push(f)}for(var h=0;n.depth>0&&(l=o.exec(s))!==null&&h<n.depth;){if(h+=1,!n.plainObjects&&ss.call(Object.prototype,l[1].slice(1,-1))&&!n.allowPrototypes)return;c.push(l[1])}return l&&c.push("["+s.slice(l.index)+"]"),Oh(c,r,n,i)}},Rh=function(t){if(!t)return $t;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"?$t.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?$t.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:$t.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:$t.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:$t.arrayLimit,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:$t.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:$t.comma,decoder:typeof t.decoder=="function"?t.decoder:$t.decoder,delimiter:typeof t.delimiter=="string"||yr.isRegExp(t.delimiter)?t.delimiter:$t.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:$t.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:$t.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:$t.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:$t.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:$t.strictNullHandling}},Nh=function(e,t){var r=Rh(t);if(e===""||e===null||typeof e>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof e=="string"?Sh(e,r):e,i=r.plainObjects?Object.create(null):{},s=Object.keys(n),a=0;a<s.length;++a){var o=s[a],l=Ih(o,n[o],r,typeof e=="string");i=yr.merge(i,l,r)}return r.allowSparse===!0?i:yr.compact(i)},Ch=xh,Ph=Nh,kh=rs,Mh={formats:kh,parse:Ph,stringify:Ch},Lh=jf;function re(){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 Fh=/^([a-z0-9.+-]+:)/i,Bh=/:[0-9]*$/,Uh=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,Dh=["<",">",'"',"`"," ","\r",`
13
+ `," "],$h=["{","}","|","\\","^","`"].concat(Dh),as=["'"].concat($h),Eo=["%","/","?",";","#"].concat(as),To=["/","?","#"],jh=255,wo=/^[+a-z0-9A-Z_-]{0,63}$/,Gh=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,qh={javascript:!0,"javascript:":!0},os={javascript:!0,"javascript:":!0},mr={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},ls=Mh;function Nn(e,t,r){if(e&&typeof e=="object"&&e instanceof re)return e;var n=new re;return n.parse(e,t,r),n}re.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("#")?"?":"#",s=e.split(i),a=/\\/g;s[0]=s[0].replace(a,"/"),e=s.join(i);var o=e;if(o=o.trim(),!r&&e.split("#").length===1){var l=Uh.exec(o);if(l)return this.path=o,this.href=o,this.pathname=l[1],l[2]?(this.search=l[2],t?this.query=ls.parse(this.search.substr(1)):this.query=this.search.substr(1)):t&&(this.search="",this.query={}),this}var f=Fh.exec(o);if(f){f=f[0];var c=f.toLowerCase();this.protocol=c,o=o.substr(f.length)}if(r||f||o.match(/^\/\/[^@/]+@[^@/]+/)){var h=o.substr(0,2)==="//";h&&!(f&&os[f])&&(o=o.substr(2),this.slashes=!0)}if(!os[f]&&(h||f&&!mr[f])){for(var u=-1,d=0;d<To.length;d++){var p=o.indexOf(To[d]);p!==-1&&(u===-1||p<u)&&(u=p)}var v,g;u===-1?g=o.lastIndexOf("@"):g=o.lastIndexOf("@",u),g!==-1&&(v=o.slice(0,g),o=o.slice(g+1),this.auth=decodeURIComponent(v)),u=-1;for(var d=0;d<Eo.length;d++){var p=o.indexOf(Eo[d]);p!==-1&&(u===-1||p<u)&&(u=p)}u===-1&&(u=o.length),this.host=o.slice(0,u),o=o.slice(u),this.parseHost(),this.hostname=this.hostname||"";var m=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!m)for(var b=this.hostname.split(/\./),d=0,_=b.length;d<_;d++){var y=b[d];if(y&&!y.match(wo)){for(var x="",O=0,T=y.length;O<T;O++)y.charCodeAt(O)>127?x+="x":x+=y[O];if(!x.match(wo)){var E=b.slice(0,d),N=b.slice(d+1),A=y.match(Gh);A&&(E.push(A[1]),N.unshift(A[2])),N.length&&(o="/"+N.join(".")+o),this.hostname=E.join(".");break}}}this.hostname.length>jh?this.hostname="":this.hostname=this.hostname.toLowerCase(),m||(this.hostname=Lh.toASCII(this.hostname));var w=this.port?":"+this.port:"",S=this.hostname||"";this.host=S+w,this.href+=this.host,m&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),o[0]!=="/"&&(o="/"+o))}if(!qh[c])for(var d=0,_=as.length;d<_;d++){var I=as[d];if(o.indexOf(I)!==-1){var C=encodeURIComponent(I);C===I&&(C=escape(I)),o=o.split(I).join(C)}}var F=o.indexOf("#");F!==-1&&(this.hash=o.substr(F),o=o.slice(0,F));var $=o.indexOf("?");if($!==-1?(this.search=o.substr($),this.query=o.substr($+1),t&&(this.query=ls.parse(this.query)),o=o.slice(0,$)):t&&(this.search="",this.query={}),o&&(this.pathname=o),mr[c]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var w=this.pathname||"",U=this.search||"";this.path=w+U}return this.href=this.format(),this};function Hh(e){return typeof e=="string"&&(e=Nn(e)),e instanceof re?e.format():re.prototype.format.call(e)}re.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,s="";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&&(s=ls.stringify(this.query));var a=this.search||s&&"?"+s||"";return t&&t.substr(-1)!==":"&&(t+=":"),this.slashes||(!t||mr[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(o){return encodeURIComponent(o)}),a=a.replace("#","%23"),t+i+r+a+n};function Vh(e,t){return Nn(e,!1,!0).resolve(t)}re.prototype.resolve=function(e){return this.resolveObject(Nn(e,!1,!0)).format()},re.prototype.resolveObject=function(e){if(typeof e=="string"){var t=new re;t.parse(e,!1,!0),e=t}for(var r=new re,n=Object.keys(this),i=0;i<n.length;i++){var s=n[i];r[s]=this[s]}if(r.hash=e.hash,e.href==="")return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var a=Object.keys(e),o=0;o<a.length;o++){var l=a[o];l!=="protocol"&&(r[l]=e[l])}return mr[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(!mr[e.protocol]){for(var f=Object.keys(e),c=0;c<f.length;c++){var h=f[c];r[h]=e[h]}return r.href=r.format(),r}if(r.protocol=e.protocol,!e.host&&!os[e.protocol]){for(var _=(e.pathname||"").split("/");_.length&&!(e.host=_.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),_[0]!==""&&_.unshift(""),_.length<2&&_.unshift(""),r.pathname=_.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 u=r.pathname||"",d=r.search||"";r.path=u+d}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var p=r.pathname&&r.pathname.charAt(0)==="/",v=e.host||e.pathname&&e.pathname.charAt(0)==="/",g=v||p||r.host&&e.pathname,m=g,b=r.pathname&&r.pathname.split("/")||[],_=e.pathname&&e.pathname.split("/")||[],y=r.protocol&&!mr[r.protocol];if(y&&(r.hostname="",r.port=null,r.host&&(b[0]===""?b[0]=r.host:b.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(_[0]===""?_[0]=e.host:_.unshift(e.host)),e.host=null),g=g&&(_[0]===""||b[0]==="")),v)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,b=_;else if(_.length)b||(b=[]),b.pop(),b=b.concat(_),r.search=e.search,r.query=e.query;else if(e.search!=null){if(y){r.host=b.shift(),r.hostname=r.host;var x=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;x&&(r.auth=x.shift(),r.hostname=x.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(!b.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var O=b.slice(-1)[0],T=(r.host||e.host||b.length>1)&&(O==="."||O==="..")||O==="",E=0,N=b.length;N>=0;N--)O=b[N],O==="."?b.splice(N,1):O===".."?(b.splice(N,1),E++):E&&(b.splice(N,1),E--);if(!g&&!m)for(;E--;E)b.unshift("..");g&&b[0]!==""&&(!b[0]||b[0].charAt(0)!=="/")&&b.unshift(""),T&&b.join("/").substr(-1)!=="/"&&b.push("");var A=b[0]===""||b[0]&&b[0].charAt(0)==="/";if(y){r.hostname=A?"":b.length?b.shift():"",r.host=r.hostname;var x=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;x&&(r.auth=x.shift(),r.hostname=x.shift(),r.host=r.hostname)}return g=g||r.host&&b.length,g&&!A&&b.unshift(""),b.length>0?r.pathname=b.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},re.prototype.parseHost=function(){var e=this.host,t=Bh.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 zh=Nn,Xh=Vh,Wh=Hh;const Yh={parse:zh,format:Wh,resolve:Xh},Ao={};function Tt(e,t,r=3){if(Ao[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}
@@ -536,7 +536,7 @@ void main(void)
536
536
 
537
537
  gl_FragColor = c * alpha;
538
538
  }
539
- `;class js extends Oe{constructor(t){super(wp,Ap),this.gamma=1,this.saturation=1,this.contrast=1,this.brightness=1,this.red=1,this.green=1,this.blue=1,this.alpha=1,Object.assign(this,t)}apply(t,r,n,i){this.uniforms.gamma=Math.max(this.gamma,1e-4),this.uniforms.saturation=this.saturation,this.uniforms.contrast=this.contrast,this.uniforms.brightness=this.brightness,this.uniforms.red=this.red,this.uniforms.green=this.green,this.uniforms.blue=this.blue,this.uniforms.alpha=this.alpha,t.applyFilter(this,r,n,i)}}var tr=(e=>(e.BlackAndWhite="BlackAndWhite",e.Sepia="Sepia",e.RetroVintage="RetroVintage",e.NightVision="NightVision",e.Normal="Normal",e.None="Normal",e))(tr||{});const Gs=({pixiTransformerRef:e,imageRef:t,isMounted:r,transformCommit:n,transformChange:i,mouseoverEvent:s,onDoubleClick:a,uniqueId:o=""})=>{const l=ee.utils.string2hex("#F3C409"),f=ee.utils.string2hex("#F3C409"),c=st.useRef({isDragging:!1}),h=st.useCallback(()=>{s&&!c.current.isDragging&&s(!0)},[s]),u=st.useCallback(()=>{s&&!c.current.isDragging&&s(!1)},[s]),d=st.useCallback(()=>{c.current.isDragging=!0},[]),p=st.useCallback(()=>{c.current.isDragging=!1},[]),v=st.useCallback(()=>{c.current.isDragging=!1},[]),g=st.useCallback(()=>{console.log("dobule click in pixi transformer"),a&&a({uniqueId:o})},[a]),m=st.useCallback(_=>{c.current.isDragging=!0,i&&i(_)},[i]),b=st.useCallback(()=>{if(t.current===null)return;const _=t.current.x,y=t.current.y,x=t.current.width,O=t.current.height,T=t.current.rotation,E=[t.current.scale.x,t.current.scale.y];n&&n({uniqueId:o,transformation:{x:Math.round(_),y:Math.round(y),width:Math.round(Math.max(5,x)),height:Math.round(Math.max(5,O)),rotate:Math.round(T),scale:E}}),c.current.isDragging=!1},[n]);return st.useEffect(()=>(e.current&&(e.current.on("mouseover",h),e.current.on("mouseout",u),e.current.on("mousedown",d),e.current.on("mouseup",p),e.current.on("mouseupoutside",v),e.current.addListener("dblclick",g)),()=>{e.current&&(e.current.off("mouseover",h),e.current.off("mouseout",u),e.current.off("mousedown",d),e.current.off("mouseup",p),e.current.off("mouseupoutside",v),e.current.removeListener("dblclick",g))}),[]),dt.jsx(df.Transformer,{ref:e,group:r?[t.current]:[],rotateEnabled:!0,boxRotationEnabled:!0,centeredScaling:!0,boxScalingEnabled:!0,wireframeStyle:{thickness:1,color:f},lockAspectRatio:!0,scaleEnabled:!0,handleStyle:{outlineColor:l,shape:"circle",radius:9},transformchange:m,transformcommit:b})};let Ml;function Ll(){return Ml=document.body,Ml}function be(e,t,r){let n;return Q.useEffect(()=>{n=n||Ll();const i=s=>{const a=s.detail;t(a)};return n.addEventListener(e,i,!1),()=>{n==null||n.removeEventListener(e,i,!1)}},r),i=>{n=i}}function ei(e,t){const r=Ll(),n=new CustomEvent(e,{detail:t});r.dispatchEvent(n)}function Sp(){let e;function t(r){e=r}return t.emit=function(r,n){const i=new CustomEvent(r,{bubbles:!0,detail:n});e==null||e.dispatchEvent(i)},t}const Or=st.createContext({}),Kt={STOP:"GSAP_STOP",PAUSE:"GSAP_PAUSE",PLAY:"GSAP_PLAY",RESUME:"GSAP_RESUME",RESTART:"GSAP_RESTART",REPEAT:"GSAP_REPEAT",SEEK:"GSAP_SEEK",RESET:"GSAP_RESET",COMPLETE:"GSAP_COMPLETE",SEEK_START:"GSAP_SEEK_START",SEEK_END:"GSAP_SEEK_END",SCRUBBER_SEEK:"GSAP_SCRUBBER_SEEK",SCRUBBER_PROGRESS_UPDATE:"GSAP_SCRUBBER_PROGRESS_UPDATE",SCRUBBER_PLAY:"GSAP_SCRUBBER_PLAY",SCRUBBER_PAUSE:"GSAP_SCRUBBER_PAUSE"},Op=({children:e})=>{const[t,r]=Q.useState(!1),n=Q.useRef(),i=Q.useRef(),s=Q.useRef(.001);Q.useLayoutEffect(()=>(i.current=de.context(()=>{n.current&&n.current.progress(0).kill(),n.current=de.timeline({paused:!0,defaults:{duration:0}})}),()=>i.current.revert()),[]);const a=Q.useCallback(()=>{let m=n.current.time();s.current=m},[]);Q.useEffect(()=>{const g=n.current;g.eventCallback("onStart",function(){}).eventCallback("onInterrupt",function(){g.pause(),a()}).eventCallback("onUpdate",function(){a()}).eventCallback("onPause",function(){a()}).eventCallback("onResume",function(){a()}).eventCallback("onComplete",function(){g.pause(),g.revert(),ei(Kt.COMPLETE,{uniqueId:"timeline"}),console.log("Emitted events"),a()})},[]);const o=Q.useCallback(()=>{n.current.revert()},[]),l=Q.useCallback(()=>{n.current.restart()},[]),f=Q.useCallback(()=>{const g=n.current;g.repeat(1),g.restart()},[]),c=Q.useCallback(g=>{n.current.seek(g)},[]),h=Q.useCallback(()=>{n.current.seek(4)},[]),u=g=>{if(g>0){const m=n.current;m.current.progress(g),m.current.pause()}},d=Q.useCallback(()=>{const g=n.current;return g?g.totalDuration():0},[]),p=()=>{n.current.pause(),ei(Kt.PAUSE)},v=()=>{n.current.resume(),ei(Kt.RESUME)};return be(Kt.SEEK_START,()=>{r(!0)}),be(Kt.SCRUBBER_PLAY,()=>{v()}),be(Kt.SCRUBBER_PAUSE,()=>{p()}),be(Kt.SCRUBBER_SEEK,g=>{c(g)}),be(Kt.SEEK_END,()=>{r(!1)}),be(Kt.SCRUBBER_PROGRESS_UPDATE,g=>{u(g)}),dt.jsx(Or.Provider,{value:{gsapCtx:i,tl:n,handlePlay:v,handlePause:p,handleReset:o,handleSeek:c,handleSeekTest:h,handleRestart:l,handleRepeat:f,playerTimeRef:s,isDragging:t,getTimelineDuration:d},children:e})},qs=e=>{let t={};switch(e){case"NONE":case"none":break;case"BOUNCE_IN":t.from={duration:2,ease:"bounce.out",y:-1500};break;case"BOUNCE_IN_DOWN":t.from={ease:"bounce.out",y:-1500,duration:2};break;case"BOUNCE_IN_LEFT":t.from={ease:"bounce.out",x:-1500,duration:2};break;case"BOUNCE_IN_RIGHT":t.from={ease:"bounce.out",x:1500,duration:2};break;case"BOUNCE_IN_UP":t.from={ease:"bounce.out",y:1500,duration:2};break;case"BOUNCE_OUT":t.from={ease:"bounce.in",y:2,duration:2};break;case"BOUNCE_OUT_DOWN":break;case"BOUNCE_OUT_LEFT":break;case"BOUNCE_OUT_RIGHT":break;case"BOUNCE_OUT_UP":break;case"FADE_IN":t.to={ease:"power4.in",alpha:1,duration:.5};break;case"FADE_IN_DOWN":t.fromTo={from:{y:-1e3,alpha:0},to:{ease:"power4.in",y:0,alpha:1,duration:1}};break;case"FADE_IN_LEFT":t.fromTo={from:{x:-1e3,alpha:0},to:{ease:"power4.in",x:0,alpha:1,duration:1}};break;case"FADE_IN_RIGHT":t.fromTo={from:{x:2e3,alpha:0},to:{ease:"power4.in",x:0,alpha:1,duration:1}};break;case"FADE_IN_UP":t.fromTo={from:{y:2e3,alpha:0},to:{ease:"power4.in",y:0,alpha:1,duration:1}};break}return t};var Ip=Object.prototype;function Rp(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Ip;return e===r}var Fl=Rp;function Np(e,t){return function(r){return e(t(r))}}var Cp=Np,Pp=Cp,kp=Pp(Object.keys,Object),Mp=kp,Lp=Fl,Fp=Mp,Bp=Object.prototype,Up=Bp.hasOwnProperty;function Dp(e){if(!Lp(e))return Fp(e);var t=[];for(var r in Object(e))Up.call(e,r)&&r!="constructor"&&t.push(r);return t}var Bl=Dp,$p=typeof Ce=="object"&&Ce&&Ce.Object===Object&&Ce,Ul=$p,jp=Ul,Gp=typeof self=="object"&&self&&self.Object===Object&&self,qp=jp||Gp||Function("return this")(),Ie=qp,Hp=Ie,Vp=Hp.Symbol,ri=Vp,Dl=ri,$l=Object.prototype,zp=$l.hasOwnProperty,Xp=$l.toString,sn=Dl?Dl.toStringTag:void 0;function Wp(e){var t=zp.call(e,sn),r=e[sn];try{e[sn]=void 0;var n=!0}catch{}var i=Xp.call(e);return n&&(t?e[sn]=r:delete e[sn]),i}var Yp=Wp,Kp=Object.prototype,Zp=Kp.toString;function Qp(e){return Zp.call(e)}var Jp=Qp,jl=ri,tv=Yp,ev=Jp,rv="[object Null]",nv="[object Undefined]",Gl=jl?jl.toStringTag:void 0;function iv(e){return e==null?e===void 0?nv:rv:Gl&&Gl in Object(e)?tv(e):ev(e)}var an=iv;function sv(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Hs=sv,av=an,ov=Hs,lv="[object AsyncFunction]",uv="[object Function]",fv="[object GeneratorFunction]",cv="[object Proxy]";function hv(e){if(!ov(e))return!1;var t=av(e);return t==uv||t==fv||t==lv||t==cv}var ql=hv,dv=Ie,pv=dv["__core-js_shared__"],vv=pv,Vs=vv,Hl=function(){var e=/[^.]+$/.exec(Vs&&Vs.keys&&Vs.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function yv(e){return!!Hl&&Hl in e}var mv=yv,gv=Function.prototype,bv=gv.toString;function _v(e){if(e!=null){try{return bv.call(e)}catch{}try{return e+""}catch{}}return""}var Vl=_v,xv=ql,Ev=mv,Tv=Hs,wv=Vl,Av=/[\\^$.*+?()[\]{}|]/g,Sv=/^\[object .+?Constructor\]$/,Ov=Function.prototype,Iv=Object.prototype,Rv=Ov.toString,Nv=Iv.hasOwnProperty,Cv=RegExp("^"+Rv.call(Nv).replace(Av,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Pv(e){if(!Tv(e)||Ev(e))return!1;var t=xv(e)?Cv:Sv;return t.test(wv(e))}var kv=Pv;function Mv(e,t){return e==null?void 0:e[t]}var Lv=Mv,Fv=kv,Bv=Lv;function Uv(e,t){var r=Bv(e,t);return Fv(r)?r:void 0}var Ir=Uv,Dv=Ir,$v=Ie,jv=Dv($v,"DataView"),Gv=jv,qv=Ir,Hv=Ie,Vv=qv(Hv,"Map"),zs=Vv,zv=Ir,Xv=Ie,Wv=zv(Xv,"Promise"),Yv=Wv,Kv=Ir,Zv=Ie,Qv=Kv(Zv,"Set"),Jv=Qv,ty=Ir,ey=Ie,ry=ty(ey,"WeakMap"),ny=ry,Xs=Gv,Ws=zs,Ys=Yv,Ks=Jv,Zs=ny,zl=an,Rr=Vl,Xl="[object Map]",iy="[object Object]",Wl="[object Promise]",Yl="[object Set]",Kl="[object WeakMap]",Zl="[object DataView]",sy=Rr(Xs),ay=Rr(Ws),oy=Rr(Ys),ly=Rr(Ks),uy=Rr(Zs),er=zl;(Xs&&er(new Xs(new ArrayBuffer(1)))!=Zl||Ws&&er(new Ws)!=Xl||Ys&&er(Ys.resolve())!=Wl||Ks&&er(new Ks)!=Yl||Zs&&er(new Zs)!=Kl)&&(er=function(e){var t=zl(e),r=t==iy?e.constructor:void 0,n=r?Rr(r):"";if(n)switch(n){case sy:return Zl;case ay:return Xl;case oy:return Wl;case ly:return Yl;case uy:return Kl}return t});var Ql=er;function fy(e){return e!=null&&typeof e=="object"}var on=fy,cy=an,hy=on,dy="[object Arguments]";function py(e){return hy(e)&&cy(e)==dy}var vy=py,Jl=vy,yy=on,tu=Object.prototype,my=tu.hasOwnProperty,gy=tu.propertyIsEnumerable,by=Jl(function(){return arguments}())?Jl:function(e){return yy(e)&&my.call(e,"callee")&&!gy.call(e,"callee")},Qs=by,_y=Array.isArray,_e=_y,xy=9007199254740991;function Ey(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=xy}var Js=Ey,Ty=ql,wy=Js;function Ay(e){return e!=null&&wy(e.length)&&!Ty(e)}var ni=Ay,ii={exports:{}};function Sy(){return!1}var Oy=Sy;ii.exports,function(e,t){var r=Ie,n=Oy,i=t&&!t.nodeType&&t,s=i&&!0&&e&&!e.nodeType&&e,a=s&&s.exports===i,o=a?r.Buffer:void 0,l=o?o.isBuffer:void 0,f=l||n;e.exports=f}(ii,ii.exports);var ta=ii.exports,Iy=an,Ry=Js,Ny=on,Cy="[object Arguments]",Py="[object Array]",ky="[object Boolean]",My="[object Date]",Ly="[object Error]",Fy="[object Function]",By="[object Map]",Uy="[object Number]",Dy="[object Object]",$y="[object RegExp]",jy="[object Set]",Gy="[object String]",qy="[object WeakMap]",Hy="[object ArrayBuffer]",Vy="[object DataView]",zy="[object Float32Array]",Xy="[object Float64Array]",Wy="[object Int8Array]",Yy="[object Int16Array]",Ky="[object Int32Array]",Zy="[object Uint8Array]",Qy="[object Uint8ClampedArray]",Jy="[object Uint16Array]",tm="[object Uint32Array]",It={};It[zy]=It[Xy]=It[Wy]=It[Yy]=It[Ky]=It[Zy]=It[Qy]=It[Jy]=It[tm]=!0,It[Cy]=It[Py]=It[Hy]=It[ky]=It[Vy]=It[My]=It[Ly]=It[Fy]=It[By]=It[Uy]=It[Dy]=It[$y]=It[jy]=It[Gy]=It[qy]=!1;function em(e){return Ny(e)&&Ry(e.length)&&!!It[Iy(e)]}var rm=em;function nm(e){return function(t){return e(t)}}var im=nm,si={exports:{}};si.exports,function(e,t){var r=Ul,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===n,a=s&&r.process,o=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();e.exports=o}(si,si.exports);var sm=si.exports,am=rm,om=im,eu=sm,ru=eu&&eu.isTypedArray,lm=ru?om(ru):am,ea=lm,um=Bl,fm=Ql,cm=Qs,hm=_e,dm=ni,pm=ta,vm=Fl,ym=ea,mm="[object Map]",gm="[object Set]",bm=Object.prototype,_m=bm.hasOwnProperty;function xm(e){if(e==null)return!0;if(dm(e)&&(hm(e)||typeof e=="string"||typeof e.splice=="function"||pm(e)||ym(e)||cm(e)))return!e.length;var t=fm(e);if(t==mm||t==gm)return!e.size;if(vm(e))return!um(e).length;for(var r in e)if(_m.call(e,r))return!1;return!0}var Em=xm;const te=sr(Em),Tm=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],ai=st.forwardRef((e,t)=>{const[r,n]=st.useState(!1),[i,s]=Q.useState(!1),[a,o]=Q.useState(!1),l=Q.useRef(null),f=Q.useRef(null),c=Q.useRef(null),h=Q.useRef(null),u=Q.useRef(e.initialAlpha),{tl:d}=Q.useContext(Or),{uniqueId:p,startAt:v,endAt:g,initialAlpha:m,transformation:{x:b,y:_,width:y,height:x,colorCorrection:O,animation:T,effect:E},applyTransformer:N,disabled:A,pointerdown:w,pointerout:S,pointerover:I}=e;console.log("all abstract props",e);const{contrast:C=1,saturation:F=1,brightness:D=1,alpha:U=1,blurRadius:X=0}=O||{},$={...D>1&&{brightness:D},...C>1&&{contrast:C},...F>1&&{saturation:F},...U!==0&&{alpha:U}};st.useImperativeHandle(t,()=>({getIsTransformerDragging:()=>i,getIsMouseOverTransformer:()=>a}),[i,a]),st.useEffect(()=>{l.current&&n(!0)},[]);const k=B=>{u.current=B.alpha},R=B=>{u.current=B.alpha},P=()=>{console.log("reverse complete"),u.current=m};st.useEffect(()=>{let B=de.context(()=>{});if(l.current&&d.current){const q={duration:Number(g)-Number(v)},H={onStart:k,onReverseComplete:P,onStartParams:[{alpha:1}]},z={onComplete:R,onCompleteParams:[{alpha:0}]},Y=qs(T||"None");B=de.context(()=>{var J,et;d.current.to(l.current,{alpha:1,duration:.1,...H},v).from(l.current,{...q},v).to(l.current,{alpha:0,duration:.1,...z},Number(g)-.09),te(Y.from)?te(Y.to)?te(Y.fromTo)||d.current.fromTo(l.current,(J=Y.fromTo)==null?void 0:J.from,(et=Y.fromTo)==null?void 0:et.to,v):d.current.to(l.current,{...Y.to},v):d.current.from(l.current,{...Y.from},v)})}return()=>B.revert()},[T,v,g]);const L=st.useCallback(()=>{s(!0)},[]),j=st.useCallback(B=>{console.log("changeEnd",B),e.onAnchorTransformationEnd&&(console.log("running onAnchorTransformationEnd"),e.onAnchorTransformationEnd(B)),s(!1)},[]),G=yt.withFilters(yt.Container,{...X>0&&{blur:ee.filters.BlurFilter},...!te($)&&{adjust:js},matrix:ee.filters.ColorMatrixFilter}),M=(O==null?void 0:O.enabled)||E&&E!==tr.Normal;return dt.jsxs(yt.Container,{ref:f,children:[dt.jsx(yt.Container,{ref:l,alpha:u.current,position:[b,_],pivot:[b,_],width:y,height:x,...!A&&!i&&{interactive:!0,buttonMode:!0,pointerdown:w,pointerover:I,pointerout:S},children:dt.jsxs(yt.Container,{children:[M&&dt.jsx(G,{scale:1,blur:{blur:X,quality:4},adjust:$,apply:({matrix:B})=>{E===tr.BlackAndWhite?B.desaturate():E===tr.Sepia?B.sepia():E===tr.RetroVintage||E===tr.NightVision?B.negative():E===tr.Normal&&B.reset()},matrix:{enabled:!0,matrix:Tm},children:dt.jsx(yt.Container,{ref:c,children:e.children})}),!M&&dt.jsx(yt.Container,{ref:c,children:e.children})]})}),N&&dt.jsx(Gs,{pixiTransformerRef:h,imageRef:l,isMounted:r,transformCommit:j,transformChange:L,mouseoverEvent:o,uniqueId:p})]})});ai.whyDidYouRender={logOnDifferentValues:!0,customName:"AbstractContainer"};const wm=st.forwardRef((e,t)=>{const r=Q.useRef(null),n=Q.useRef(null),{src:i,transformation:{x:s,y:a,width:o,height:l,anchor:f},pointerdown:c,pointerup:h}=e;return dt.jsx(ai,{...e,ref:t,children:dt.jsx(yt.Container,{ref:n,children:dt.jsx(yt.Sprite,{image:i,width:o,height:l,anchor:f,ref:r,x:s,y:a,interactive:!0,pointerdown:c,pointerup:h})})})}),oi={build(e){const t=e.points;let r,n,i,s,a,o;if(e.type===qt.CIRC){const p=e.shape;r=p.x,n=p.y,a=o=p.radius,i=s=0}else if(e.type===qt.ELIP){const p=e.shape;r=p.x,n=p.y,a=p.width,o=p.height,i=s=0}else{const p=e.shape,v=p.width/2,g=p.height/2;r=p.x+v,n=p.y+g,a=o=Math.max(0,Math.min(p.radius,Math.min(v,g))),i=v-a,s=g-o}if(!(a>=0&&o>=0&&i>=0&&s>=0)){t.length=0;return}const l=Math.ceil(2.3*Math.sqrt(a+o)),f=l*8+(i?4:0)+(s?4:0);if(t.length=f,f===0)return;if(l===0){t.length=8,t[0]=t[6]=r+i,t[1]=t[3]=n+s,t[2]=t[4]=r-i,t[5]=t[7]=n-s;return}let c=0,h=l*4+(i?2:0)+2,u=h,d=f;{const p=i+a,v=s,g=r+p,m=r-p,b=n+v;if(t[c++]=g,t[c++]=b,t[--h]=b,t[--h]=m,s){const _=n-v;t[u++]=m,t[u++]=_,t[--d]=_,t[--d]=g}}for(let p=1;p<l;p++){const v=Math.PI/2*(p/l),g=i+Math.cos(v)*a,m=s+Math.sin(v)*o,b=r+g,_=r-g,y=n+m,x=n-m;t[c++]=b,t[c++]=y,t[--h]=y,t[--h]=_,t[u++]=_,t[u++]=x,t[--d]=x,t[--d]=b}{const p=i,v=s+o,g=r+p,m=r-p,b=n+v,_=n-v;t[c++]=g,t[c++]=b,t[--d]=_,t[--d]=g,i&&(t[c++]=m,t[c++]=b,t[--d]=_,t[--d]=m)}},triangulate(e,t){const r=e.points,n=t.points,i=t.indices;if(r.length===0)return;let s=n.length/2;const a=s;let o,l;if(e.type!==qt.RREC){const c=e.shape;o=c.x,l=c.y}else{const c=e.shape;o=c.x+c.width/2,l=c.y+c.height/2}const f=e.matrix;n.push(e.matrix?f.a*o+f.c*l+f.tx:o,e.matrix?f.b*o+f.d*l+f.ty:l),s++,n.push(r[0],r[1]);for(let c=2;c<r.length;c+=2)n.push(r[c],r[c+1]),i.push(s++,a,s);i.push(a+1,a,s)}};function nu(e,t=!1){const r=e.length;if(r<6)return;let n=0;for(let i=0,s=e[r-2],a=e[r-1];i<r;i+=2){const o=e[i],l=e[i+1];n+=(o-s)*(l+a),s=o,a=l}if(!t&&n>0||t&&n<=0){const i=r/2;for(let s=i+i%2;s<r;s+=2){const a=r-s-2,o=r-s-1,l=s,f=s+1;[e[a],e[l]]=[e[l],e[a]],[e[o],e[f]]=[e[f],e[o]]}}}const iu={build(e){e.points=e.shape.points.slice()},triangulate(e,t){let r=e.points;const n=e.holes,i=t.points,s=t.indices;if(r.length>=6){nu(r,!1);const a=[];for(let f=0;f<n.length;f++){const c=n[f];nu(c.points,!0),a.push(r.length/2),r=r.concat(c.points)}const o=$f(r,a,2);if(!o)return;const l=i.length/2;for(let f=0;f<o.length;f+=3)s.push(o[f]+l),s.push(o[f+1]+l),s.push(o[f+2]+l);for(let f=0;f<r.length;f++)i.push(r[f])}}},Am={build(e){const t=e.shape,r=t.x,n=t.y,i=t.width,s=t.height,a=e.points;a.length=0,i>=0&&s>=0&&a.push(r,n,r+i,n,r+i,n+s,r,n+s)},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)}},Sm={build(e){oi.build(e)},triangulate(e,t){oi.triangulate(e,t)}};var ue=(e=>(e.MITER="miter",e.BEVEL="bevel",e.ROUND="round",e))(ue||{}),rr=(e=>(e.BUTT="butt",e.ROUND="round",e.SQUARE="square",e))(rr||{});const Nr={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 su{static curveTo(t,r,n,i,s,a){const o=a[a.length-2],f=a[a.length-1]-r,c=o-t,h=i-r,u=n-t,d=Math.abs(f*u-c*h);if(d<1e-8||s===0)return(a[a.length-2]!==t||a[a.length-1]!==r)&&a.push(t,r),null;const p=f*f+c*c,v=h*h+u*u,g=f*h+c*u,m=s*Math.sqrt(p)/d,b=s*Math.sqrt(v)/d,_=m*g/p,y=b*g/v,x=m*u+b*c,O=m*h+b*f,T=c*(b+_),E=f*(b+_),N=u*(m+y),A=h*(m+y),w=Math.atan2(E-O,T-x),S=Math.atan2(A-O,N-x);return{cx:x+t,cy:O+r,radius:s,startAngle:w,endAngle:S,anticlockwise:c*h>u*f}}static arc(t,r,n,i,s,a,o,l,f){const c=o-a,h=Nr._segmentsCount(Math.abs(c)*s,Math.ceil(Math.abs(c)/Bn)*40),u=c/(h*2),d=u*2,p=Math.cos(u),v=Math.sin(u),g=h-1,m=g%1/g;for(let b=0;b<=g;++b){const _=b+m*b,y=u+a+d*_,x=Math.cos(y),O=-Math.sin(y);f.push((p*x+v*O)*s+n,(p*-O+v*x)*s+i)}}}class Om{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 ra{static curveLength(t,r,n,i,s,a,o,l){let c=0,h=0,u=0,d=0,p=0,v=0,g=0,m=0,b=0,_=0,y=0,x=t,O=r;for(let T=1;T<=10;++T)h=T/10,u=h*h,d=u*h,p=1-h,v=p*p,g=v*p,m=g*t+3*v*h*n+3*p*u*s+d*o,b=g*r+3*v*h*i+3*p*u*a+d*l,_=x-m,y=O-b,x=m,O=b,c+=Math.sqrt(_*_+y*y);return c}static curveTo(t,r,n,i,s,a,o){const l=o[o.length-2],f=o[o.length-1];o.length-=2;const c=Nr._segmentsCount(ra.curveLength(l,f,t,r,n,i,s,a));let h=0,u=0,d=0,p=0,v=0;o.push(l,f);for(let g=1,m=0;g<=c;++g)m=g/c,h=1-m,u=h*h,d=u*h,p=m*m,v=p*m,o.push(d*l+3*u*m*t+3*h*p*n+v*s,d*f+3*u*m*r+3*h*p*i+v*a)}}function au(e,t,r,n,i,s,a,o){const l=e-r*i,f=t-n*i,c=e+r*s,h=t+n*s;let u,d;a?(u=n,d=-r):(u=-n,d=r);const p=l+u,v=f+d,g=c+u,m=h+d;return o.push(p,v,g,m),2}function nr(e,t,r,n,i,s,a,o){const l=r-e,f=n-t;let c=Math.atan2(l,f),h=Math.atan2(i-e,s-t);o&&c<h?c+=Math.PI*2:!o&&c>h&&(h+=Math.PI*2);let u=c;const d=h-c,p=Math.abs(d),v=Math.sqrt(l*l+f*f),g=(15*p*Math.sqrt(v)/Math.PI>>0)+1,m=d/g;if(u+=m,o){a.push(e,t,r,n);for(let b=1,_=u;b<g;b++,_+=m)a.push(e,t,e+Math.sin(_)*v,t+Math.cos(_)*v);a.push(e,t,i,s)}else{a.push(r,n,e,t);for(let b=1,_=u;b<g;b++,_+=m)a.push(e+Math.sin(_)*v,t+Math.cos(_)*v,e,t);a.push(i,s,e,t)}return g*2}function Im(e,t){const r=e.shape;let n=e.points||r.points.slice();const i=t.closePointEps;if(n.length===0)return;const s=e.lineStyle,a=new Gt(n[0],n[1]),o=new Gt(n[n.length-2],n[n.length-1]),l=r.type!==qt.POLY||r.closeStroke,f=Math.abs(a.x-o.x)<i&&Math.abs(a.y-o.y)<i;if(l){n=n.slice(),f&&(n.pop(),n.pop(),o.set(n[n.length-2],n[n.length-1]));const U=(a.x+o.x)*.5,X=(o.y+a.y)*.5;n.unshift(U,X),n.push(U,X)}const c=t.points,h=n.length/2;let u=n.length;const d=c.length/2,p=s.width/2,v=p*p,g=s.miterLimit*s.miterLimit;let m=n[0],b=n[1],_=n[2],y=n[3],x=0,O=0,T=-(b-y),E=m-_,N=0,A=0,w=Math.sqrt(T*T+E*E);T/=w,E/=w,T*=p,E*=p;const S=s.alignment,I=(1-S)*2,C=S*2;l||(s.cap===rr.ROUND?u+=nr(m-T*(I-C)*.5,b-E*(I-C)*.5,m-T*I,b-E*I,m+T*C,b+E*C,c,!0)+2:s.cap===rr.SQUARE&&(u+=au(m,b,T,E,I,C,!0,c))),c.push(m-T*I,b-E*I,m+T*C,b+E*C);for(let U=1;U<h-1;++U){m=n[(U-1)*2],b=n[(U-1)*2+1],_=n[U*2],y=n[U*2+1],x=n[(U+1)*2],O=n[(U+1)*2+1],T=-(b-y),E=m-_,w=Math.sqrt(T*T+E*E),T/=w,E/=w,T*=p,E*=p,N=-(y-O),A=_-x,w=Math.sqrt(N*N+A*A),N/=w,A/=w,N*=p,A*=p;const X=_-m,$=b-y,k=_-x,R=O-y,P=X*k+$*R,L=$*k-R*X,j=L<0;if(Math.abs(L)<.001*Math.abs(P)){c.push(_-T*I,y-E*I,_+T*C,y+E*C),P>=0&&(s.join===ue.ROUND?u+=nr(_,y,_-T*I,y-E*I,_-N*I,y-A*I,c,!1)+4:u+=2,c.push(_-N*C,y-A*C,_+N*I,y+A*I));continue}const G=(-T+m)*(-E+y)-(-T+_)*(-E+b),M=(-N+x)*(-A+y)-(-N+_)*(-A+O),B=(X*M-k*G)/L,q=(R*G-$*M)/L,H=(B-_)*(B-_)+(q-y)*(q-y),z=_+(B-_)*I,Y=y+(q-y)*I,J=_-(B-_)*C,et=y-(q-y)*C,at=Math.min(X*X+$*$,k*k+R*R),lt=j?I:C,Ct=at+lt*lt*v,Rt=H<=Ct;let V=s.join;if(V===ue.MITER&&H/v>g&&(V=ue.BEVEL),Rt)switch(V){case ue.MITER:{c.push(z,Y,J,et);break}case ue.BEVEL:{j?c.push(z,Y,_+T*C,y+E*C,z,Y,_+N*C,y+A*C):c.push(_-T*I,y-E*I,J,et,_-N*I,y-A*I,J,et),u+=2;break}case ue.ROUND:{j?(c.push(z,Y,_+T*C,y+E*C),u+=nr(_,y,_+T*C,y+E*C,_+N*C,y+A*C,c,!0)+4,c.push(z,Y,_+N*C,y+A*C)):(c.push(_-T*I,y-E*I,J,et),u+=nr(_,y,_-T*I,y-E*I,_-N*I,y-A*I,c,!1)+4,c.push(_-N*I,y-A*I,J,et));break}}else{switch(c.push(_-T*I,y-E*I,_+T*C,y+E*C),V){case ue.MITER:{j?c.push(J,et,J,et):c.push(z,Y,z,Y),u+=2;break}case ue.ROUND:{j?u+=nr(_,y,_+T*C,y+E*C,_+N*C,y+A*C,c,!0)+2:u+=nr(_,y,_-T*I,y-E*I,_-N*I,y-A*I,c,!1)+2;break}}c.push(_-N*I,y-A*I,_+N*C,y+A*C),u+=2}}m=n[(h-2)*2],b=n[(h-2)*2+1],_=n[(h-1)*2],y=n[(h-1)*2+1],T=-(b-y),E=m-_,w=Math.sqrt(T*T+E*E),T/=w,E/=w,T*=p,E*=p,c.push(_-T*I,y-E*I,_+T*C,y+E*C),l||(s.cap===rr.ROUND?u+=nr(_-T*(I-C)*.5,y-E*(I-C)*.5,_-T*I,y-E*I,_+T*C,y+E*C,c,!1)+2:s.cap===rr.SQUARE&&(u+=au(_,y,T,E,I,C,!1,c)));const F=t.indices,D=Nr.epsilon*Nr.epsilon;for(let U=d;U<u+d-2;++U)m=c[U*2],b=c[U*2+1],_=c[(U+1)*2],y=c[(U+1)*2+1],x=c[(U+2)*2],O=c[(U+2)*2+1],!(Math.abs(m*(y-O)+_*(O-b)+x*(b-y))<D)&&F.push(U,U+1,U+2)}function Rm(e,t){let r=0;const n=e.shape,i=e.points||n.points,s=n.type!==qt.POLY||n.closeStroke;if(i.length===0)return;const a=t.points,o=t.indices,l=i.length/2,f=a.length/2;let c=f;for(a.push(i[0],i[1]),r=1;r<l;r++)a.push(i[r*2],i[r*2+1]),o.push(c,c+1),c++;s&&o.push(c,f)}function ou(e,t){e.lineStyle.native?Rm(e,t):Im(e,t)}class na{static curveLength(t,r,n,i,s,a){const o=t-2*n+s,l=r-2*i+a,f=2*n-2*t,c=2*i-2*r,h=4*(o*o+l*l),u=4*(o*f+l*c),d=f*f+c*c,p=2*Math.sqrt(h+u+d),v=Math.sqrt(h),g=2*h*v,m=2*Math.sqrt(d),b=u/v;return(g*p+v*u*(p-m)+(4*d*h-u*u)*Math.log((2*v+b+p)/(b+m)))/(4*g)}static curveTo(t,r,n,i,s){const a=s[s.length-2],o=s[s.length-1],l=Nr._segmentsCount(na.curveLength(a,o,t,r,n,i));let f=0,c=0;for(let h=1;h<=l;++h){const u=h/l;f=a+(t-a)*u,c=o+(r-o)*u,s.push(f+(t+(n-t)*u-f)*u,c+(r+(i-r)*u-c)*u)}}}const ia={[qt.POLY]:iu,[qt.CIRC]:oi,[qt.ELIP]:oi,[qt.RECT]:Am,[qt.RREC]:Sm},lu=[],li=[];class sa{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?St.EMPTY:(t=t||new St(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:s,d:a,tx:o,ty:l}=t,f=n*r.x+s*r.y+o,c=i*r.x+a*r.y+l;this.minX=Math.min(this.minX,f),this.maxX=Math.max(this.maxX,f),this.minY=Math.min(this.minY,c),this.maxY=Math.max(this.maxY,c)}addQuad(t){let r=this.minX,n=this.minY,i=this.maxX,s=this.maxY,a=t[0],o=t[1];r=a<r?a:r,n=o<n?o:n,i=a>i?a:i,s=o>s?o:s,a=t[2],o=t[3],r=a<r?a:r,n=o<n?o:n,i=a>i?a:i,s=o>s?o:s,a=t[4],o=t[5],r=a<r?a:r,n=o<n?o:n,i=a>i?a:i,s=o>s?o:s,a=t[6],o=t[7],r=a<r?a:r,n=o<n?o:n,i=a>i?a:i,s=o>s?o:s,this.minX=r,this.minY=n,this.maxX=i,this.maxY=s}addFrame(t,r,n,i,s){this.addFrameMatrix(t.worldTransform,r,n,i,s)}addFrameMatrix(t,r,n,i,s){const a=t.a,o=t.b,l=t.c,f=t.d,c=t.tx,h=t.ty;let u=this.minX,d=this.minY,p=this.maxX,v=this.maxY,g=a*r+l*n+c,m=o*r+f*n+h;u=g<u?g:u,d=m<d?m:d,p=g>p?g:p,v=m>v?m:v,g=a*i+l*n+c,m=o*i+f*n+h,u=g<u?g:u,d=m<d?m:d,p=g>p?g:p,v=m>v?m:v,g=a*r+l*s+c,m=o*r+f*s+h,u=g<u?g:u,d=m<d?m:d,p=g>p?g:p,v=m>v?m:v,g=a*i+l*s+c,m=o*i+f*s+h,u=g<u?g:u,d=m<d?m:d,p=g>p?g:p,v=m>v?m:v,this.minX=u,this.minY=d,this.maxX=p,this.maxY=v}addVertexData(t,r,n){let i=this.minX,s=this.minY,a=this.maxX,o=this.maxY;for(let l=r;l<n;l+=2){const f=t[l],c=t[l+1];i=f<i?f:i,s=c<s?c:s,a=f>a?f:a,o=c>o?c:o}this.minX=i,this.minY=s,this.maxX=a,this.maxY=o}addVertices(t,r,n,i){this.addVerticesMatrix(t.worldTransform,r,n,i)}addVerticesMatrix(t,r,n,i,s=0,a=s){const o=t.a,l=t.b,f=t.c,c=t.d,h=t.tx,u=t.ty;let d=this.minX,p=this.minY,v=this.maxX,g=this.maxY;for(let m=n;m<i;m+=2){const b=r[m],_=r[m+1],y=o*b+f*_+h,x=c*_+l*b+u;d=Math.min(d,y-s),v=Math.max(v,y+s),p=Math.min(p,x-a),g=Math.max(g,x+a)}this.minX=d,this.minY=p,this.maxX=v,this.maxY=g}addBounds(t){const r=this.minX,n=this.minY,i=this.maxX,s=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>s?t.maxY:s}addBoundsMask(t,r){const n=t.minX>r.minX?t.minX:r.minX,i=t.minY>r.minY?t.minY:r.minY,s=t.maxX<r.maxX?t.maxX:r.maxX,a=t.maxY<r.maxY?t.maxY:r.maxY;if(n<=s&&i<=a){const o=this.minX,l=this.minY,f=this.maxX,c=this.maxY;this.minX=n<o?n:o,this.minY=i<l?i:l,this.maxX=s>f?s:f,this.maxY=a>c?a:c}}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,s=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<=s&&i<=a){const o=this.minX,l=this.minY,f=this.maxX,c=this.maxY;this.minX=n<o?n:o,this.minY=i<l?i:l,this.maxX=s>f?s:f,this.maxY=a>c?a:c}}pad(t=0,r=t){this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=r,this.maxY+=r)}addFramePad(t,r,n,i,s,a){t-=s,r-=a,n+=s,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 Cr extends yn{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new Is,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 sa,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(Cr.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 St),r=this._boundsRect),this._bounds.getRectangle(r)}getLocalBounds(t){t||(this._localBoundsRect||(this._localBoundsRect=new St),t=this._localBoundsRect),this._localBounds||(this._localBounds=new sa);const r=this.transform,n=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;const i=this._bounds,s=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-s,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,s=0,a=0,o=0,l=0,f=0){return this.position.x=t,this.position.y=r,this.scale.x=n||1,this.scale.y=i||1,this.rotation=s,this.skew.x=a,this.skew.y=o,this.pivot.x=l,this.pivot.y=f,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 Nm),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*_d}set angle(t){this.transform.rotation=t*xd}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 Nm extends Cr{constructor(){super(...arguments),this.sortDirty=null}}Cr.prototype.displayObjectUpdateTransform=Cr.prototype.updateTransform;const Cm=new zt;function Pm(e,t){return e.zIndex===t.zIndex?e._lastSortedIndex-t._lastSortedIndex:e.zIndex-t.zIndex}const aa=class extends Cr{constructor(){super(),this.children=[],this.sortableChildren=aa.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);kn(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,kn(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,kn(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 s;if(i>0&&i<=n){s=this.children.splice(r,i);for(let a=0;a<s.length;++a)s[a].parent=null,s[a].transform&&(s[a].transform._parentID=-1);this._boundsID++,this.onChildrenChange(e);for(let a=0;a<s.length;++a)s[a].emit("removed",this),this.emit("childRemoved",s[a],this,a);return s}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(Pm),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 s=this.children[n];s.visible&&s.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!==aa.prototype._render&&(r=this.getBounds(!0));const i=e.projection.transform;if(i&&(n?(n=Cm.copyFrom(n),n.prepend(i)):n=i),r&&t.intersects(r,n))this._render(e);else if(this.cullArea)return;for(let s=0,a=this.children.length;s<a;++s){const o=this.children[s],l=o.cullable;o.cullable=l||!this.cullArea,o.render(e),o.cullable=l}}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,s,a;const t=this.filters,r=this._mask;if(t){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(let o=0;o<t.length;o++)t[o].enabled&&this._enabledFilters.push(t[o])}const n=t&&((i=this._enabledFilters)==null?void 0:i.length)||r&&(!r.isMaskData||r.enabled&&(r.autoDetect||r.type!==Ut.NONE));if(n&&e.batch.flush(),t&&((s=this._enabledFilters)!=null&&s.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 o=0,l=this.children.length;o<l;++o)this.children[o].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 Pr=aa;Pr.defaultSortableChildren=!1,Pr.prototype.containerUpdateTransform=Pr.prototype.updateTransform,Object.defineProperties(mt,{SORTABLE_CHILDREN:{get(){return Pr.defaultSortableChildren},set(e){Tt("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),Pr.defaultSortableChildren=e}}});class ui{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 ui(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 kr=new Gt,uu=class extends Ho{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 sa,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(),li.push(this.drawCalls[e]);this.drawCalls.length=0;for(let e=0;e<this.batches.length;e++){const t=this.batches[e];t.reset(),lu.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 ui(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 ui(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,kr):kr.copyFrom(e),n.shape.contains(kr.x,kr.y))){let i=!1;if(n.holes){for(let s=0;s<n.holes.length;s++)if(n.holes[s].shape.contains(kr.x,kr.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 o=this.shapeIndex;o<t.length;o++){this.shapeIndex++;const l=t[o],f=l.fillStyle,c=l.lineStyle;ia[l.type].build(l),l.matrix&&this.transformPoints(l.points,l.matrix),(f.visible||c.visible)&&this.processHoles(l.holes);for(let u=0;u<2;u++){const d=u===0?f:c;if(!d.visible)continue;const p=d.texture.baseTexture,v=this.indices.length,g=this.points.length/2;p.wrapMode=$r.REPEAT,u===0?this.processFill(l):this.processLine(l);const m=this.points.length/2-g;m!==0&&(r&&!this._compareStyles(n,d)&&(r.end(v,g),r=null),r||(r=lu.pop()||new Om,r.begin(d,v,g),this.batches.push(r),n=d),this.addUvs(this.points,e,d.texture,g,m,d.matrix))}}const i=this.indices.length,s=this.points.length/2;if(r&&r.end(i,s),this.batches.length===0){this.batchable=!0;return}const a=s>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 s=n.start+i;this.indicesUint16[s]=this.indicesUint16[s]-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<uu.BATCHABLE_SIZE*2}buildDrawCalls(){let e=++_t._globalBatch;for(let c=0;c<this.drawCalls.length;c++)this.drawCalls[c].texArray.clear(),li.push(this.drawCalls[c]);this.drawCalls.length=0;const t=this.colors,r=this.textureIds;let n=li.pop();n||(n=new ws,n.texArray=new Ns),n.texArray.count=0,n.start=0,n.size=0,n.type=Pe.TRIANGLES;let i=0,s=null,a=0,o=!1,l=Pe.TRIANGLES,f=0;this.drawCalls.push(n);for(let c=0;c<this.batches.length;c++){const h=this.batches[c],u=8,d=h.style,p=d.texture.baseTexture;o!==!!d.native&&(o=!!d.native,l=o?Pe.LINES:Pe.TRIANGLES,s=null,i=u,e++),s!==p&&(s=p,p._batchEnabled!==e&&(i===u&&(e++,i=0,n.size>0&&(n=li.pop(),n||(n=new ws,n.texArray=new Ns),this.drawCalls.push(n)),n.start=f,n.size=0,n.texArray.count=0,n.type=l),p.touched=1,p._batchEnabled=e,p._batchLocation=i,p.wrapMode=$r.REPEAT,n.texArray.elements[n.texArray.count++]=p,i++)),n.size+=h.size,f+=h.size,a=p._batchLocation,this.addColors(t,d.color,d.alpha,h.attribSize,h.attribStart),this.addTextureIds(r,a,h.attribSize,h.attribStart)}_t._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),s=new Float32Array(i),a=new Uint32Array(i);let o=0;for(let l=0;l<e.length/2;l++)s[o++]=e[l*2],s[o++]=e[l*2+1],s[o++]=t[l*2],s[o++]=t[l*2+1],a[o++]=r[l],s[o++]=n[l];this._buffer.update(i),this._indexBuffer.update(this.indicesUint16)}processFill(e){e.holes.length?iu.triangulate(e,this):ia[e.type].triangulate(e,this)}processLine(e){ou(e,this);for(let t=0;t<e.holes.length;t++)ou(e.holes[t],this)}processHoles(e){for(let t=0;t<e.length;t++){const r=e[t];ia[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 s=Xt.shared.setValue(t).toLittleEndianNumber(),a=Xt.shared.setValue(s).toPremultiplied(r);e.length=Math.max(e.length,i+n);for(let o=0;o<n;o++)e[i+o]=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,s=null){let a=0;const o=t.length,l=r.frame;for(;a<i;){let c=e[(n+a)*2],h=e[(n+a)*2+1];if(s){const u=s.a*c+s.c*h+s.tx;h=s.b*c+s.d*h+s.ty,c=u}a++,t.push(c/l.width,h/l.height)}const f=r.baseTexture;(l.width<f.width||l.height<f.height)&&this.adjustUvs(t,r,o,i)}adjustUvs(e,t,r,n){const i=t.baseTexture,s=1e-6,a=r+n*2,o=t.frame,l=o.width/i.width,f=o.height/i.height;let c=o.x/o.width,h=o.y/o.height,u=Math.floor(e[r]+s),d=Math.floor(e[r+1]+s);for(let p=r+2;p<a;p+=2)u=Math.min(u,Math.floor(e[p]+s)),d=Math.min(d,Math.floor(e[p+1]+s));c-=u,h-=d;for(let p=r;p<a;p+=2)e[p]=(e[p]+c)*l,e[p+1]=(e[p+1]+h)*f}};let fu=uu;fu.BATCHABLE_SIZE=100;class fi{constructor(){this.color=16777215,this.alpha=1,this.texture=xt.WHITE,this.matrix=null,this.visible=!1,this.reset()}clone(){const t=new fi;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=xt.WHITE,this.matrix=null,this.visible=!1}destroy(){this.texture=null,this.matrix=null}}class oa extends fi{constructor(){super(...arguments),this.width=0,this.alignment=.5,this.native=!1,this.cap=rr.BUTT,this.join=ue.MITER,this.miterLimit=10}clone(){const t=new oa;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 la={},ci=class extends Pr{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 fi,this._lineStyle=new oa,this._matrix=null,this._holeMode=!1,this.state=Ln.for2d(),this._geometry=e||new fu,this._geometry.refCount++,this._transformID=-1,this._tintColor=new Xt(16777215),this.blendMode=ot.NORMAL}get geometry(){return this._geometry}clone(){return this.finishPoly(),new ci(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:xt.WHITE,color:e!=null&&e.texture?16777215:0,matrix:null,alignment:.5,native:!1,cap:rr.BUTT,join:ue.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 Qr,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[t-2],e[t-1]))}else this.currentPath=new Qr,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),na.curveTo(e,t,r,n,i),this}bezierCurveTo(e,t,r,n,i,s){return this._initCurve(),ra.curveTo(e,t,r,n,i,s,this.currentPath.points),this}arcTo(e,t,r,n,i){this._initCurve(e,t);const s=this.currentPath.points,a=su.curveTo(e,t,r,n,i,s);if(a){const{cx:o,cy:l,radius:f,startAngle:c,endAngle:h,anticlockwise:u}=a;this.arc(o,l,f,c,h,u)}return this}arc(e,t,r,n,i,s=!1){if(n===i)return this;if(!s&&i<=n?i+=Bn:s&&n<=i&&(n+=Bn),i-n===0)return this;const o=e+Math.cos(n)*r,l=t+Math.sin(n)*r,f=this._geometry.closePointEps;let c=this.currentPath?this.currentPath.points:null;if(c){const h=Math.abs(c[c.length-2]-o),u=Math.abs(c[c.length-1]-l);h<f&&u<f||c.push(o,l)}else this.moveTo(o,l),c=this.currentPath.points;return su.arc(o,l,e,t,r,n,i,s,c),this}beginFill(e=0,t){return this.beginTextureFill({texture:xt.WHITE,color:e,alpha:t})}normalizeColor(e){const t=Xt.shared.setValue(e.color??0);e.color=t.toNumber(),e.alpha??(e.alpha=t.alpha)}beginTextureFill(e){const t={texture:xt.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 St(e,t,r,n))}drawRoundedRect(e,t,r,n,i){return this.drawShape(new Ss(e,t,r,n,i))}drawCircle(e,t,r){return this.drawShape(new As(e,t,r))}drawEllipse(e,t,r,n){return this.drawShape(new Ed(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 Qr(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===qt.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],s=i.style.color,a=new Float32Array(this.vertexData.buffer,i.attribStart*4*2,i.attribSize*2),o=new Float32Array(e.uvsFloat32.buffer,i.attribStart*4*2,i.attribSize*2),l=new Uint16Array(e.indicesUint16.buffer,i.start*2,i.size),f={vertexData:a,blendMode:t,indices:l,uvs:o,_batchRGB:Xt.shared.setValue(s).toRgbArray(),_tintRGB:s,_texture:i.style.texture,alpha:i.style.alpha,worldAlpha:1};this.batches[n]=f}}_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,s=r.drawCalls;i.translationMatrix=this.transform.worldTransform,Xt.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,o=s.length;a<o;a++)this._renderDrawCallDirect(e,r.drawCalls[a])}_renderDrawCallDirect(e,t){const{texArray:r,type:n,size:i,start:s}=t,a=r.count;for(let o=0;o<a;o++)e.texture.bind(r.elements[o],o);e.geometry.draw(n,i,s)}_resolveDirectShader(e){let t=this.shader;const r=this.pluginName;if(!t){if(!la[r]){const{maxTextures:n}=e.plugins[r],i=new Int32Array(n);for(let o=0;o<n;o++)i[o]=o;const s={tint:new Float32Array([1,1,1,1]),translationMatrix:new zt,default:ie.from({uSamplers:i},!0)},a=e.plugins[r]._shader.program;la[r]=new tn(a,s)}t=la[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,ci._TEMP_POINT),this._geometry.containsPoint(ci._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=Xt.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,s=t.d,a=t.tx,o=t.ty,l=this._geometry.points,f=this.vertexData;let c=0;for(let h=0;h<l.length;h+=2){const u=l[h],d=l[h+1];f[c++]=r*u+i*d+a,f[c++]=s*d+n*u+o}}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 ua=ci;ua.curves=Nr,ua._TEMP_POINT=new Gt;var km=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},fa={},Mm={get exports(){return fa},set exports(e){fa=e}};/*!
539
+ `;class js extends Oe{constructor(t){super(wp,Ap),this.gamma=1,this.saturation=1,this.contrast=1,this.brightness=1,this.red=1,this.green=1,this.blue=1,this.alpha=1,Object.assign(this,t)}apply(t,r,n,i){this.uniforms.gamma=Math.max(this.gamma,1e-4),this.uniforms.saturation=this.saturation,this.uniforms.contrast=this.contrast,this.uniforms.brightness=this.brightness,this.uniforms.red=this.red,this.uniforms.green=this.green,this.uniforms.blue=this.blue,this.uniforms.alpha=this.alpha,t.applyFilter(this,r,n,i)}}var tr=(e=>(e.BlackAndWhite="BlackAndWhite",e.Sepia="Sepia",e.RetroVintage="RetroVintage",e.NightVision="NightVision",e.Normal="Normal",e.None="Normal",e))(tr||{});const Gs=({pixiTransformerRef:e,imageRef:t,isMounted:r,transformCommit:n,transformChange:i,mouseoverEvent:s,onDoubleClick:a,uniqueId:o=""})=>{const l=ee.utils.string2hex("#F3C409"),f=ee.utils.string2hex("#F3C409"),c=st.useRef({isDragging:!1}),h=st.useCallback(()=>{s&&!c.current.isDragging&&s(!0)},[s]),u=st.useCallback(()=>{s&&!c.current.isDragging&&s(!1)},[s]),d=st.useCallback(()=>{c.current.isDragging=!0},[]),p=st.useCallback(()=>{c.current.isDragging=!1},[]),v=st.useCallback(()=>{c.current.isDragging=!1},[]),g=st.useCallback(()=>{console.log("dobule click in pixi transformer"),a&&a({uniqueId:o})},[a]),m=st.useCallback(_=>{c.current.isDragging=!0,i&&i(_)},[i]),b=st.useCallback(()=>{if(t.current===null)return;const _=t.current.x,y=t.current.y,x=t.current.width,O=t.current.height,T=t.current.rotation,E=[t.current.scale.x,t.current.scale.y];n&&n({uniqueId:o,transformation:{x:Math.round(_),y:Math.round(y),width:Math.round(Math.max(5,x)),height:Math.round(Math.max(5,O)),rotate:Math.round(T),scale:E}}),c.current.isDragging=!1},[n]);return st.useEffect(()=>(e.current&&(e.current.on("mouseover",h),e.current.on("mouseout",u),e.current.on("mousedown",d),e.current.on("mouseup",p),e.current.on("mouseupoutside",v),e.current.addListener("dblclick",g)),()=>{e.current&&(e.current.off("mouseover",h),e.current.off("mouseout",u),e.current.off("mousedown",d),e.current.off("mouseup",p),e.current.off("mouseupoutside",v),e.current.removeListener("dblclick",g))}),[]),dt.jsx(df.Transformer,{ref:e,group:r?[t.current]:[],rotateEnabled:!0,boxRotationEnabled:!0,centeredScaling:!0,boxScalingEnabled:!0,wireframeStyle:{thickness:1,color:f},lockAspectRatio:!0,scaleEnabled:!0,handleStyle:{outlineColor:l,shape:"circle",radius:9},transformchange:m,transformcommit:b})};let Ml;function Ll(){return Ml=document.body,Ml}function be(e,t,r){let n;return Q.useEffect(()=>{n=n||Ll();const i=s=>{const a=s.detail;t(a)};return n.addEventListener(e,i,!1),()=>{n==null||n.removeEventListener(e,i,!1)}},r),i=>{n=i}}function ei(e,t){const r=Ll(),n=new CustomEvent(e,{detail:t});r.dispatchEvent(n)}function Sp(){let e;function t(r){e=r}return t.emit=function(r,n){const i=new CustomEvent(r,{bubbles:!0,detail:n});e==null||e.dispatchEvent(i)},t}const Or=st.createContext({}),Kt={STOP:"GSAP_STOP",PAUSE:"GSAP_PAUSE",PLAY:"GSAP_PLAY",RESUME:"GSAP_RESUME",RESTART:"GSAP_RESTART",REPEAT:"GSAP_REPEAT",SEEK:"GSAP_SEEK",RESET:"GSAP_RESET",COMPLETE:"GSAP_COMPLETE",SEEK_START:"GSAP_SEEK_START",SEEK_END:"GSAP_SEEK_END",SCRUBBER_SEEK:"GSAP_SCRUBBER_SEEK",SCRUBBER_PROGRESS_UPDATE:"GSAP_SCRUBBER_PROGRESS_UPDATE",SCRUBBER_PLAY:"GSAP_SCRUBBER_PLAY",SCRUBBER_PAUSE:"GSAP_SCRUBBER_PAUSE"},Op=({children:e})=>{const[t,r]=Q.useState(!1),n=Q.useRef(),i=Q.useRef(),s=Q.useRef(.001);Q.useLayoutEffect(()=>(i.current=de.context(()=>{n.current&&n.current.progress(0).kill(),n.current=de.timeline({paused:!0,defaults:{duration:0}})}),()=>i.current.revert()),[]);const a=Q.useCallback(()=>{let m=n.current.time();s.current=m},[]);Q.useEffect(()=>{const g=n.current;g.eventCallback("onStart",function(){}).eventCallback("onInterrupt",function(){g.pause(),a()}).eventCallback("onUpdate",function(){a()}).eventCallback("onPause",function(){a()}).eventCallback("onResume",function(){a()}).eventCallback("onComplete",function(){g.pause(),g.revert(),ei(Kt.COMPLETE,{uniqueId:"timeline"}),console.log("Emitted events"),a()})},[]);const o=Q.useCallback(()=>{n.current.revert()},[]),l=Q.useCallback(()=>{n.current.restart()},[]),f=Q.useCallback(()=>{const g=n.current;g.repeat(1),g.restart()},[]),c=Q.useCallback(g=>{n.current.seek(g)},[]),h=Q.useCallback(()=>{n.current.seek(4)},[]),u=g=>{if(g>0){const m=n.current;m.current.progress(g),m.current.pause()}},d=Q.useCallback(()=>{const g=n.current;return g?g.totalDuration():0},[]),p=()=>{n.current.pause(),ei(Kt.PAUSE)},v=()=>{n.current.resume(),ei(Kt.RESUME)};return be(Kt.SEEK_START,()=>{r(!0)}),be(Kt.SCRUBBER_PLAY,()=>{v()}),be(Kt.SCRUBBER_PAUSE,()=>{p()}),be(Kt.SCRUBBER_SEEK,g=>{c(g)}),be(Kt.SEEK_END,()=>{r(!1)}),be(Kt.SCRUBBER_PROGRESS_UPDATE,g=>{u(g)}),dt.jsx(Or.Provider,{value:{gsapCtx:i,tl:n,handlePlay:v,handlePause:p,handleReset:o,handleSeek:c,handleSeekTest:h,handleRestart:l,handleRepeat:f,playerTimeRef:s,isDragging:t,getTimelineDuration:d},children:e})},qs=e=>{let t={};switch(e){case"NONE":case"none":break;case"BOUNCE_IN":t.from={duration:2,ease:"bounce.out",y:-1500};break;case"BOUNCE_IN_DOWN":t.from={ease:"bounce.out",y:-1500,duration:2};break;case"BOUNCE_IN_LEFT":t.from={ease:"bounce.out",x:-1500,duration:2};break;case"BOUNCE_IN_RIGHT":t.from={ease:"bounce.out",x:1500,duration:2};break;case"BOUNCE_IN_UP":t.from={ease:"bounce.out",y:1500,duration:2};break;case"BOUNCE_OUT":t.from={ease:"bounce.in",y:2,duration:2};break;case"BOUNCE_OUT_DOWN":break;case"BOUNCE_OUT_LEFT":break;case"BOUNCE_OUT_RIGHT":break;case"BOUNCE_OUT_UP":break;case"FADE_IN":t.to={ease:"power4.in",alpha:1,duration:.5};break;case"FADE_IN_DOWN":t.fromTo={from:{y:-1e3,alpha:0},to:{ease:"power4.in",y:0,alpha:1,duration:1}};break;case"FADE_IN_LEFT":t.fromTo={from:{x:-1e3,alpha:0},to:{ease:"power4.in",x:0,alpha:1,duration:1}};break;case"FADE_IN_RIGHT":t.fromTo={from:{x:2e3,alpha:0},to:{ease:"power4.in",x:0,alpha:1,duration:1}};break;case"FADE_IN_UP":t.fromTo={from:{y:2e3,alpha:0},to:{ease:"power4.in",y:0,alpha:1,duration:1}};break}return t};var Ip=Object.prototype;function Rp(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Ip;return e===r}var Fl=Rp;function Np(e,t){return function(r){return e(t(r))}}var Cp=Np,Pp=Cp,kp=Pp(Object.keys,Object),Mp=kp,Lp=Fl,Fp=Mp,Bp=Object.prototype,Up=Bp.hasOwnProperty;function Dp(e){if(!Lp(e))return Fp(e);var t=[];for(var r in Object(e))Up.call(e,r)&&r!="constructor"&&t.push(r);return t}var Bl=Dp,$p=typeof Ce=="object"&&Ce&&Ce.Object===Object&&Ce,Ul=$p,jp=Ul,Gp=typeof self=="object"&&self&&self.Object===Object&&self,qp=jp||Gp||Function("return this")(),Ie=qp,Hp=Ie,Vp=Hp.Symbol,ri=Vp,Dl=ri,$l=Object.prototype,zp=$l.hasOwnProperty,Xp=$l.toString,sn=Dl?Dl.toStringTag:void 0;function Wp(e){var t=zp.call(e,sn),r=e[sn];try{e[sn]=void 0;var n=!0}catch{}var i=Xp.call(e);return n&&(t?e[sn]=r:delete e[sn]),i}var Yp=Wp,Kp=Object.prototype,Zp=Kp.toString;function Qp(e){return Zp.call(e)}var Jp=Qp,jl=ri,tv=Yp,ev=Jp,rv="[object Null]",nv="[object Undefined]",Gl=jl?jl.toStringTag:void 0;function iv(e){return e==null?e===void 0?nv:rv:Gl&&Gl in Object(e)?tv(e):ev(e)}var an=iv;function sv(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Hs=sv,av=an,ov=Hs,lv="[object AsyncFunction]",uv="[object Function]",fv="[object GeneratorFunction]",cv="[object Proxy]";function hv(e){if(!ov(e))return!1;var t=av(e);return t==uv||t==fv||t==lv||t==cv}var ql=hv,dv=Ie,pv=dv["__core-js_shared__"],vv=pv,Vs=vv,Hl=function(){var e=/[^.]+$/.exec(Vs&&Vs.keys&&Vs.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function yv(e){return!!Hl&&Hl in e}var mv=yv,gv=Function.prototype,bv=gv.toString;function _v(e){if(e!=null){try{return bv.call(e)}catch{}try{return e+""}catch{}}return""}var Vl=_v,xv=ql,Ev=mv,Tv=Hs,wv=Vl,Av=/[\\^$.*+?()[\]{}|]/g,Sv=/^\[object .+?Constructor\]$/,Ov=Function.prototype,Iv=Object.prototype,Rv=Ov.toString,Nv=Iv.hasOwnProperty,Cv=RegExp("^"+Rv.call(Nv).replace(Av,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Pv(e){if(!Tv(e)||Ev(e))return!1;var t=xv(e)?Cv:Sv;return t.test(wv(e))}var kv=Pv;function Mv(e,t){return e==null?void 0:e[t]}var Lv=Mv,Fv=kv,Bv=Lv;function Uv(e,t){var r=Bv(e,t);return Fv(r)?r:void 0}var Ir=Uv,Dv=Ir,$v=Ie,jv=Dv($v,"DataView"),Gv=jv,qv=Ir,Hv=Ie,Vv=qv(Hv,"Map"),zs=Vv,zv=Ir,Xv=Ie,Wv=zv(Xv,"Promise"),Yv=Wv,Kv=Ir,Zv=Ie,Qv=Kv(Zv,"Set"),Jv=Qv,ty=Ir,ey=Ie,ry=ty(ey,"WeakMap"),ny=ry,Xs=Gv,Ws=zs,Ys=Yv,Ks=Jv,Zs=ny,zl=an,Rr=Vl,Xl="[object Map]",iy="[object Object]",Wl="[object Promise]",Yl="[object Set]",Kl="[object WeakMap]",Zl="[object DataView]",sy=Rr(Xs),ay=Rr(Ws),oy=Rr(Ys),ly=Rr(Ks),uy=Rr(Zs),er=zl;(Xs&&er(new Xs(new ArrayBuffer(1)))!=Zl||Ws&&er(new Ws)!=Xl||Ys&&er(Ys.resolve())!=Wl||Ks&&er(new Ks)!=Yl||Zs&&er(new Zs)!=Kl)&&(er=function(e){var t=zl(e),r=t==iy?e.constructor:void 0,n=r?Rr(r):"";if(n)switch(n){case sy:return Zl;case ay:return Xl;case oy:return Wl;case ly:return Yl;case uy:return Kl}return t});var Ql=er;function fy(e){return e!=null&&typeof e=="object"}var on=fy,cy=an,hy=on,dy="[object Arguments]";function py(e){return hy(e)&&cy(e)==dy}var vy=py,Jl=vy,yy=on,tu=Object.prototype,my=tu.hasOwnProperty,gy=tu.propertyIsEnumerable,by=Jl(function(){return arguments}())?Jl:function(e){return yy(e)&&my.call(e,"callee")&&!gy.call(e,"callee")},Qs=by,_y=Array.isArray,_e=_y,xy=9007199254740991;function Ey(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=xy}var Js=Ey,Ty=ql,wy=Js;function Ay(e){return e!=null&&wy(e.length)&&!Ty(e)}var ni=Ay,ii={exports:{}};function Sy(){return!1}var Oy=Sy;ii.exports,function(e,t){var r=Ie,n=Oy,i=t&&!t.nodeType&&t,s=i&&!0&&e&&!e.nodeType&&e,a=s&&s.exports===i,o=a?r.Buffer:void 0,l=o?o.isBuffer:void 0,f=l||n;e.exports=f}(ii,ii.exports);var ta=ii.exports,Iy=an,Ry=Js,Ny=on,Cy="[object Arguments]",Py="[object Array]",ky="[object Boolean]",My="[object Date]",Ly="[object Error]",Fy="[object Function]",By="[object Map]",Uy="[object Number]",Dy="[object Object]",$y="[object RegExp]",jy="[object Set]",Gy="[object String]",qy="[object WeakMap]",Hy="[object ArrayBuffer]",Vy="[object DataView]",zy="[object Float32Array]",Xy="[object Float64Array]",Wy="[object Int8Array]",Yy="[object Int16Array]",Ky="[object Int32Array]",Zy="[object Uint8Array]",Qy="[object Uint8ClampedArray]",Jy="[object Uint16Array]",tm="[object Uint32Array]",It={};It[zy]=It[Xy]=It[Wy]=It[Yy]=It[Ky]=It[Zy]=It[Qy]=It[Jy]=It[tm]=!0,It[Cy]=It[Py]=It[Hy]=It[ky]=It[Vy]=It[My]=It[Ly]=It[Fy]=It[By]=It[Uy]=It[Dy]=It[$y]=It[jy]=It[Gy]=It[qy]=!1;function em(e){return Ny(e)&&Ry(e.length)&&!!It[Iy(e)]}var rm=em;function nm(e){return function(t){return e(t)}}var im=nm,si={exports:{}};si.exports,function(e,t){var r=Ul,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===n,a=s&&r.process,o=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();e.exports=o}(si,si.exports);var sm=si.exports,am=rm,om=im,eu=sm,ru=eu&&eu.isTypedArray,lm=ru?om(ru):am,ea=lm,um=Bl,fm=Ql,cm=Qs,hm=_e,dm=ni,pm=ta,vm=Fl,ym=ea,mm="[object Map]",gm="[object Set]",bm=Object.prototype,_m=bm.hasOwnProperty;function xm(e){if(e==null)return!0;if(dm(e)&&(hm(e)||typeof e=="string"||typeof e.splice=="function"||pm(e)||ym(e)||cm(e)))return!e.length;var t=fm(e);if(t==mm||t==gm)return!e.size;if(vm(e))return!um(e).length;for(var r in e)if(_m.call(e,r))return!1;return!0}var Em=xm;const te=sr(Em),Tm=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],ai=st.forwardRef((e,t)=>{const[r,n]=st.useState(!1),[i,s]=Q.useState(!1),[a,o]=Q.useState(!1),l=Q.useRef(null),f=Q.useRef(null),c=Q.useRef(null),h=Q.useRef(null),u=Q.useRef(e.initialAlpha),{tl:d}=Q.useContext(Or),{uniqueId:p,startAt:v,endAt:g,initialAlpha:m,transformation:{x:b,y:_,width:y,height:x,colorCorrection:O,animation:T,effect:E},applyTransformer:N,disabled:A,pointerdown:w,pointerout:S,pointerover:I}=e;console.log("all abstract props",e);const{contrast:C=1,saturation:F=1,brightness:$=1,alpha:U=1,blurRadius:X=0}=O||{},D={...$>1&&{brightness:$},...C>1&&{contrast:C},...F>1&&{saturation:F},...U!==0&&{alpha:U}};st.useImperativeHandle(t,()=>({getIsTransformerDragging:()=>i,getIsMouseOverTransformer:()=>a}),[i,a]),st.useEffect(()=>{l.current&&n(!0)},[]);const P=B=>{u.current=B.alpha},R=B=>{u.current=B.alpha},k=()=>{console.log("reverse complete"),u.current=m};st.useEffect(()=>{let B=de.context(()=>{});if(l.current&&d.current){const q={duration:Number(g)-Number(v)},H={onStart:P,onReverseComplete:k,onStartParams:[{alpha:1}]},z={onComplete:R,onCompleteParams:[{alpha:0}]},Y=qs(T||"None");B=de.context(()=>{var J,et;d.current.to(l.current,{alpha:1,duration:.1,...H},v).from(l.current,{...q},v).to(l.current,{alpha:0,duration:.1,...z},Number(g)-.09),te(Y.from)?te(Y.to)?te(Y.fromTo)||d.current.fromTo(l.current,(J=Y.fromTo)==null?void 0:J.from,(et=Y.fromTo)==null?void 0:et.to,v):d.current.to(l.current,{...Y.to},v):d.current.from(l.current,{...Y.from},v)})}return()=>B.revert()},[T,v,g]);const L=st.useCallback(()=>{s(!0)},[]),j=st.useCallback(B=>{console.log("changeEnd",B),e.onAnchorTransformationEnd&&(console.log("running onAnchorTransformationEnd"),e.onAnchorTransformationEnd(B)),s(!1)},[]),G=yt.withFilters(yt.Container,{...X>0&&{blur:ee.filters.BlurFilter},...!te(D)&&{adjust:js},matrix:ee.filters.ColorMatrixFilter}),M=(O==null?void 0:O.enabled)||E&&E!==tr.Normal;return dt.jsxs(yt.Container,{ref:f,children:[dt.jsx(yt.Container,{ref:l,alpha:u.current,position:[b,_],pivot:[b,_],width:y,height:x,...!A&&!i&&{interactive:!0,buttonMode:!0,pointerdown:w,pointerover:I,pointerout:S},children:dt.jsxs(yt.Container,{children:[M&&dt.jsx(G,{scale:1,blur:{blur:X,quality:4},adjust:D,apply:({matrix:B})=>{E===tr.BlackAndWhite?B.desaturate():E===tr.Sepia?B.sepia():E===tr.RetroVintage||E===tr.NightVision?B.negative():E===tr.Normal&&B.reset()},matrix:{enabled:!0,matrix:Tm},children:dt.jsx(yt.Container,{ref:c,children:e.children})}),!M&&dt.jsx(yt.Container,{ref:c,children:e.children})]})}),N&&dt.jsx(Gs,{pixiTransformerRef:h,imageRef:l,isMounted:r,transformCommit:j,transformChange:L,mouseoverEvent:o,uniqueId:p})]})});ai.whyDidYouRender={logOnDifferentValues:!0,customName:"AbstractContainer"};const wm=st.forwardRef((e,t)=>{const r=Q.useRef(null),n=Q.useRef(null),{src:i,transformation:{x:s,y:a,width:o,height:l,anchor:f},pointerdown:c,pointerup:h}=e;return dt.jsx(ai,{...e,ref:t,children:dt.jsx(yt.Container,{ref:n,children:dt.jsx(yt.Sprite,{image:i,width:o,height:l,anchor:f,ref:r,x:s,y:a,interactive:!0,pointerdown:c,pointerup:h})})})}),oi={build(e){const t=e.points;let r,n,i,s,a,o;if(e.type===qt.CIRC){const p=e.shape;r=p.x,n=p.y,a=o=p.radius,i=s=0}else if(e.type===qt.ELIP){const p=e.shape;r=p.x,n=p.y,a=p.width,o=p.height,i=s=0}else{const p=e.shape,v=p.width/2,g=p.height/2;r=p.x+v,n=p.y+g,a=o=Math.max(0,Math.min(p.radius,Math.min(v,g))),i=v-a,s=g-o}if(!(a>=0&&o>=0&&i>=0&&s>=0)){t.length=0;return}const l=Math.ceil(2.3*Math.sqrt(a+o)),f=l*8+(i?4:0)+(s?4:0);if(t.length=f,f===0)return;if(l===0){t.length=8,t[0]=t[6]=r+i,t[1]=t[3]=n+s,t[2]=t[4]=r-i,t[5]=t[7]=n-s;return}let c=0,h=l*4+(i?2:0)+2,u=h,d=f;{const p=i+a,v=s,g=r+p,m=r-p,b=n+v;if(t[c++]=g,t[c++]=b,t[--h]=b,t[--h]=m,s){const _=n-v;t[u++]=m,t[u++]=_,t[--d]=_,t[--d]=g}}for(let p=1;p<l;p++){const v=Math.PI/2*(p/l),g=i+Math.cos(v)*a,m=s+Math.sin(v)*o,b=r+g,_=r-g,y=n+m,x=n-m;t[c++]=b,t[c++]=y,t[--h]=y,t[--h]=_,t[u++]=_,t[u++]=x,t[--d]=x,t[--d]=b}{const p=i,v=s+o,g=r+p,m=r-p,b=n+v,_=n-v;t[c++]=g,t[c++]=b,t[--d]=_,t[--d]=g,i&&(t[c++]=m,t[c++]=b,t[--d]=_,t[--d]=m)}},triangulate(e,t){const r=e.points,n=t.points,i=t.indices;if(r.length===0)return;let s=n.length/2;const a=s;let o,l;if(e.type!==qt.RREC){const c=e.shape;o=c.x,l=c.y}else{const c=e.shape;o=c.x+c.width/2,l=c.y+c.height/2}const f=e.matrix;n.push(e.matrix?f.a*o+f.c*l+f.tx:o,e.matrix?f.b*o+f.d*l+f.ty:l),s++,n.push(r[0],r[1]);for(let c=2;c<r.length;c+=2)n.push(r[c],r[c+1]),i.push(s++,a,s);i.push(a+1,a,s)}};function nu(e,t=!1){const r=e.length;if(r<6)return;let n=0;for(let i=0,s=e[r-2],a=e[r-1];i<r;i+=2){const o=e[i],l=e[i+1];n+=(o-s)*(l+a),s=o,a=l}if(!t&&n>0||t&&n<=0){const i=r/2;for(let s=i+i%2;s<r;s+=2){const a=r-s-2,o=r-s-1,l=s,f=s+1;[e[a],e[l]]=[e[l],e[a]],[e[o],e[f]]=[e[f],e[o]]}}}const iu={build(e){e.points=e.shape.points.slice()},triangulate(e,t){let r=e.points;const n=e.holes,i=t.points,s=t.indices;if(r.length>=6){nu(r,!1);const a=[];for(let f=0;f<n.length;f++){const c=n[f];nu(c.points,!0),a.push(r.length/2),r=r.concat(c.points)}const o=$f(r,a,2);if(!o)return;const l=i.length/2;for(let f=0;f<o.length;f+=3)s.push(o[f]+l),s.push(o[f+1]+l),s.push(o[f+2]+l);for(let f=0;f<r.length;f++)i.push(r[f])}}},Am={build(e){const t=e.shape,r=t.x,n=t.y,i=t.width,s=t.height,a=e.points;a.length=0,i>=0&&s>=0&&a.push(r,n,r+i,n,r+i,n+s,r,n+s)},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)}},Sm={build(e){oi.build(e)},triangulate(e,t){oi.triangulate(e,t)}};var ue=(e=>(e.MITER="miter",e.BEVEL="bevel",e.ROUND="round",e))(ue||{}),rr=(e=>(e.BUTT="butt",e.ROUND="round",e.SQUARE="square",e))(rr||{});const Nr={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 su{static curveTo(t,r,n,i,s,a){const o=a[a.length-2],f=a[a.length-1]-r,c=o-t,h=i-r,u=n-t,d=Math.abs(f*u-c*h);if(d<1e-8||s===0)return(a[a.length-2]!==t||a[a.length-1]!==r)&&a.push(t,r),null;const p=f*f+c*c,v=h*h+u*u,g=f*h+c*u,m=s*Math.sqrt(p)/d,b=s*Math.sqrt(v)/d,_=m*g/p,y=b*g/v,x=m*u+b*c,O=m*h+b*f,T=c*(b+_),E=f*(b+_),N=u*(m+y),A=h*(m+y),w=Math.atan2(E-O,T-x),S=Math.atan2(A-O,N-x);return{cx:x+t,cy:O+r,radius:s,startAngle:w,endAngle:S,anticlockwise:c*h>u*f}}static arc(t,r,n,i,s,a,o,l,f){const c=o-a,h=Nr._segmentsCount(Math.abs(c)*s,Math.ceil(Math.abs(c)/Bn)*40),u=c/(h*2),d=u*2,p=Math.cos(u),v=Math.sin(u),g=h-1,m=g%1/g;for(let b=0;b<=g;++b){const _=b+m*b,y=u+a+d*_,x=Math.cos(y),O=-Math.sin(y);f.push((p*x+v*O)*s+n,(p*-O+v*x)*s+i)}}}class Om{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 ra{static curveLength(t,r,n,i,s,a,o,l){let c=0,h=0,u=0,d=0,p=0,v=0,g=0,m=0,b=0,_=0,y=0,x=t,O=r;for(let T=1;T<=10;++T)h=T/10,u=h*h,d=u*h,p=1-h,v=p*p,g=v*p,m=g*t+3*v*h*n+3*p*u*s+d*o,b=g*r+3*v*h*i+3*p*u*a+d*l,_=x-m,y=O-b,x=m,O=b,c+=Math.sqrt(_*_+y*y);return c}static curveTo(t,r,n,i,s,a,o){const l=o[o.length-2],f=o[o.length-1];o.length-=2;const c=Nr._segmentsCount(ra.curveLength(l,f,t,r,n,i,s,a));let h=0,u=0,d=0,p=0,v=0;o.push(l,f);for(let g=1,m=0;g<=c;++g)m=g/c,h=1-m,u=h*h,d=u*h,p=m*m,v=p*m,o.push(d*l+3*u*m*t+3*h*p*n+v*s,d*f+3*u*m*r+3*h*p*i+v*a)}}function au(e,t,r,n,i,s,a,o){const l=e-r*i,f=t-n*i,c=e+r*s,h=t+n*s;let u,d;a?(u=n,d=-r):(u=-n,d=r);const p=l+u,v=f+d,g=c+u,m=h+d;return o.push(p,v,g,m),2}function nr(e,t,r,n,i,s,a,o){const l=r-e,f=n-t;let c=Math.atan2(l,f),h=Math.atan2(i-e,s-t);o&&c<h?c+=Math.PI*2:!o&&c>h&&(h+=Math.PI*2);let u=c;const d=h-c,p=Math.abs(d),v=Math.sqrt(l*l+f*f),g=(15*p*Math.sqrt(v)/Math.PI>>0)+1,m=d/g;if(u+=m,o){a.push(e,t,r,n);for(let b=1,_=u;b<g;b++,_+=m)a.push(e,t,e+Math.sin(_)*v,t+Math.cos(_)*v);a.push(e,t,i,s)}else{a.push(r,n,e,t);for(let b=1,_=u;b<g;b++,_+=m)a.push(e+Math.sin(_)*v,t+Math.cos(_)*v,e,t);a.push(i,s,e,t)}return g*2}function Im(e,t){const r=e.shape;let n=e.points||r.points.slice();const i=t.closePointEps;if(n.length===0)return;const s=e.lineStyle,a=new Gt(n[0],n[1]),o=new Gt(n[n.length-2],n[n.length-1]),l=r.type!==qt.POLY||r.closeStroke,f=Math.abs(a.x-o.x)<i&&Math.abs(a.y-o.y)<i;if(l){n=n.slice(),f&&(n.pop(),n.pop(),o.set(n[n.length-2],n[n.length-1]));const U=(a.x+o.x)*.5,X=(o.y+a.y)*.5;n.unshift(U,X),n.push(U,X)}const c=t.points,h=n.length/2;let u=n.length;const d=c.length/2,p=s.width/2,v=p*p,g=s.miterLimit*s.miterLimit;let m=n[0],b=n[1],_=n[2],y=n[3],x=0,O=0,T=-(b-y),E=m-_,N=0,A=0,w=Math.sqrt(T*T+E*E);T/=w,E/=w,T*=p,E*=p;const S=s.alignment,I=(1-S)*2,C=S*2;l||(s.cap===rr.ROUND?u+=nr(m-T*(I-C)*.5,b-E*(I-C)*.5,m-T*I,b-E*I,m+T*C,b+E*C,c,!0)+2:s.cap===rr.SQUARE&&(u+=au(m,b,T,E,I,C,!0,c))),c.push(m-T*I,b-E*I,m+T*C,b+E*C);for(let U=1;U<h-1;++U){m=n[(U-1)*2],b=n[(U-1)*2+1],_=n[U*2],y=n[U*2+1],x=n[(U+1)*2],O=n[(U+1)*2+1],T=-(b-y),E=m-_,w=Math.sqrt(T*T+E*E),T/=w,E/=w,T*=p,E*=p,N=-(y-O),A=_-x,w=Math.sqrt(N*N+A*A),N/=w,A/=w,N*=p,A*=p;const X=_-m,D=b-y,P=_-x,R=O-y,k=X*P+D*R,L=D*P-R*X,j=L<0;if(Math.abs(L)<.001*Math.abs(k)){c.push(_-T*I,y-E*I,_+T*C,y+E*C),k>=0&&(s.join===ue.ROUND?u+=nr(_,y,_-T*I,y-E*I,_-N*I,y-A*I,c,!1)+4:u+=2,c.push(_-N*C,y-A*C,_+N*I,y+A*I));continue}const G=(-T+m)*(-E+y)-(-T+_)*(-E+b),M=(-N+x)*(-A+y)-(-N+_)*(-A+O),B=(X*M-P*G)/L,q=(R*G-D*M)/L,H=(B-_)*(B-_)+(q-y)*(q-y),z=_+(B-_)*I,Y=y+(q-y)*I,J=_-(B-_)*C,et=y-(q-y)*C,at=Math.min(X*X+D*D,P*P+R*R),lt=j?I:C,Ct=at+lt*lt*v,Rt=H<=Ct;let V=s.join;if(V===ue.MITER&&H/v>g&&(V=ue.BEVEL),Rt)switch(V){case ue.MITER:{c.push(z,Y,J,et);break}case ue.BEVEL:{j?c.push(z,Y,_+T*C,y+E*C,z,Y,_+N*C,y+A*C):c.push(_-T*I,y-E*I,J,et,_-N*I,y-A*I,J,et),u+=2;break}case ue.ROUND:{j?(c.push(z,Y,_+T*C,y+E*C),u+=nr(_,y,_+T*C,y+E*C,_+N*C,y+A*C,c,!0)+4,c.push(z,Y,_+N*C,y+A*C)):(c.push(_-T*I,y-E*I,J,et),u+=nr(_,y,_-T*I,y-E*I,_-N*I,y-A*I,c,!1)+4,c.push(_-N*I,y-A*I,J,et));break}}else{switch(c.push(_-T*I,y-E*I,_+T*C,y+E*C),V){case ue.MITER:{j?c.push(J,et,J,et):c.push(z,Y,z,Y),u+=2;break}case ue.ROUND:{j?u+=nr(_,y,_+T*C,y+E*C,_+N*C,y+A*C,c,!0)+2:u+=nr(_,y,_-T*I,y-E*I,_-N*I,y-A*I,c,!1)+2;break}}c.push(_-N*I,y-A*I,_+N*C,y+A*C),u+=2}}m=n[(h-2)*2],b=n[(h-2)*2+1],_=n[(h-1)*2],y=n[(h-1)*2+1],T=-(b-y),E=m-_,w=Math.sqrt(T*T+E*E),T/=w,E/=w,T*=p,E*=p,c.push(_-T*I,y-E*I,_+T*C,y+E*C),l||(s.cap===rr.ROUND?u+=nr(_-T*(I-C)*.5,y-E*(I-C)*.5,_-T*I,y-E*I,_+T*C,y+E*C,c,!1)+2:s.cap===rr.SQUARE&&(u+=au(_,y,T,E,I,C,!1,c)));const F=t.indices,$=Nr.epsilon*Nr.epsilon;for(let U=d;U<u+d-2;++U)m=c[U*2],b=c[U*2+1],_=c[(U+1)*2],y=c[(U+1)*2+1],x=c[(U+2)*2],O=c[(U+2)*2+1],!(Math.abs(m*(y-O)+_*(O-b)+x*(b-y))<$)&&F.push(U,U+1,U+2)}function Rm(e,t){let r=0;const n=e.shape,i=e.points||n.points,s=n.type!==qt.POLY||n.closeStroke;if(i.length===0)return;const a=t.points,o=t.indices,l=i.length/2,f=a.length/2;let c=f;for(a.push(i[0],i[1]),r=1;r<l;r++)a.push(i[r*2],i[r*2+1]),o.push(c,c+1),c++;s&&o.push(c,f)}function ou(e,t){e.lineStyle.native?Rm(e,t):Im(e,t)}class na{static curveLength(t,r,n,i,s,a){const o=t-2*n+s,l=r-2*i+a,f=2*n-2*t,c=2*i-2*r,h=4*(o*o+l*l),u=4*(o*f+l*c),d=f*f+c*c,p=2*Math.sqrt(h+u+d),v=Math.sqrt(h),g=2*h*v,m=2*Math.sqrt(d),b=u/v;return(g*p+v*u*(p-m)+(4*d*h-u*u)*Math.log((2*v+b+p)/(b+m)))/(4*g)}static curveTo(t,r,n,i,s){const a=s[s.length-2],o=s[s.length-1],l=Nr._segmentsCount(na.curveLength(a,o,t,r,n,i));let f=0,c=0;for(let h=1;h<=l;++h){const u=h/l;f=a+(t-a)*u,c=o+(r-o)*u,s.push(f+(t+(n-t)*u-f)*u,c+(r+(i-r)*u-c)*u)}}}const ia={[qt.POLY]:iu,[qt.CIRC]:oi,[qt.ELIP]:oi,[qt.RECT]:Am,[qt.RREC]:Sm},lu=[],li=[];class sa{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?St.EMPTY:(t=t||new St(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:s,d:a,tx:o,ty:l}=t,f=n*r.x+s*r.y+o,c=i*r.x+a*r.y+l;this.minX=Math.min(this.minX,f),this.maxX=Math.max(this.maxX,f),this.minY=Math.min(this.minY,c),this.maxY=Math.max(this.maxY,c)}addQuad(t){let r=this.minX,n=this.minY,i=this.maxX,s=this.maxY,a=t[0],o=t[1];r=a<r?a:r,n=o<n?o:n,i=a>i?a:i,s=o>s?o:s,a=t[2],o=t[3],r=a<r?a:r,n=o<n?o:n,i=a>i?a:i,s=o>s?o:s,a=t[4],o=t[5],r=a<r?a:r,n=o<n?o:n,i=a>i?a:i,s=o>s?o:s,a=t[6],o=t[7],r=a<r?a:r,n=o<n?o:n,i=a>i?a:i,s=o>s?o:s,this.minX=r,this.minY=n,this.maxX=i,this.maxY=s}addFrame(t,r,n,i,s){this.addFrameMatrix(t.worldTransform,r,n,i,s)}addFrameMatrix(t,r,n,i,s){const a=t.a,o=t.b,l=t.c,f=t.d,c=t.tx,h=t.ty;let u=this.minX,d=this.minY,p=this.maxX,v=this.maxY,g=a*r+l*n+c,m=o*r+f*n+h;u=g<u?g:u,d=m<d?m:d,p=g>p?g:p,v=m>v?m:v,g=a*i+l*n+c,m=o*i+f*n+h,u=g<u?g:u,d=m<d?m:d,p=g>p?g:p,v=m>v?m:v,g=a*r+l*s+c,m=o*r+f*s+h,u=g<u?g:u,d=m<d?m:d,p=g>p?g:p,v=m>v?m:v,g=a*i+l*s+c,m=o*i+f*s+h,u=g<u?g:u,d=m<d?m:d,p=g>p?g:p,v=m>v?m:v,this.minX=u,this.minY=d,this.maxX=p,this.maxY=v}addVertexData(t,r,n){let i=this.minX,s=this.minY,a=this.maxX,o=this.maxY;for(let l=r;l<n;l+=2){const f=t[l],c=t[l+1];i=f<i?f:i,s=c<s?c:s,a=f>a?f:a,o=c>o?c:o}this.minX=i,this.minY=s,this.maxX=a,this.maxY=o}addVertices(t,r,n,i){this.addVerticesMatrix(t.worldTransform,r,n,i)}addVerticesMatrix(t,r,n,i,s=0,a=s){const o=t.a,l=t.b,f=t.c,c=t.d,h=t.tx,u=t.ty;let d=this.minX,p=this.minY,v=this.maxX,g=this.maxY;for(let m=n;m<i;m+=2){const b=r[m],_=r[m+1],y=o*b+f*_+h,x=c*_+l*b+u;d=Math.min(d,y-s),v=Math.max(v,y+s),p=Math.min(p,x-a),g=Math.max(g,x+a)}this.minX=d,this.minY=p,this.maxX=v,this.maxY=g}addBounds(t){const r=this.minX,n=this.minY,i=this.maxX,s=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>s?t.maxY:s}addBoundsMask(t,r){const n=t.minX>r.minX?t.minX:r.minX,i=t.minY>r.minY?t.minY:r.minY,s=t.maxX<r.maxX?t.maxX:r.maxX,a=t.maxY<r.maxY?t.maxY:r.maxY;if(n<=s&&i<=a){const o=this.minX,l=this.minY,f=this.maxX,c=this.maxY;this.minX=n<o?n:o,this.minY=i<l?i:l,this.maxX=s>f?s:f,this.maxY=a>c?a:c}}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,s=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<=s&&i<=a){const o=this.minX,l=this.minY,f=this.maxX,c=this.maxY;this.minX=n<o?n:o,this.minY=i<l?i:l,this.maxX=s>f?s:f,this.maxY=a>c?a:c}}pad(t=0,r=t){this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=r,this.maxY+=r)}addFramePad(t,r,n,i,s,a){t-=s,r-=a,n+=s,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 Cr extends yn{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new Is,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 sa,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(Cr.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 St),r=this._boundsRect),this._bounds.getRectangle(r)}getLocalBounds(t){t||(this._localBoundsRect||(this._localBoundsRect=new St),t=this._localBoundsRect),this._localBounds||(this._localBounds=new sa);const r=this.transform,n=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;const i=this._bounds,s=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-s,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,s=0,a=0,o=0,l=0,f=0){return this.position.x=t,this.position.y=r,this.scale.x=n||1,this.scale.y=i||1,this.rotation=s,this.skew.x=a,this.skew.y=o,this.pivot.x=l,this.pivot.y=f,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 Nm),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*_d}set angle(t){this.transform.rotation=t*xd}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 Nm extends Cr{constructor(){super(...arguments),this.sortDirty=null}}Cr.prototype.displayObjectUpdateTransform=Cr.prototype.updateTransform;const Cm=new zt;function Pm(e,t){return e.zIndex===t.zIndex?e._lastSortedIndex-t._lastSortedIndex:e.zIndex-t.zIndex}const aa=class extends Cr{constructor(){super(),this.children=[],this.sortableChildren=aa.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);kn(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,kn(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,kn(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 s;if(i>0&&i<=n){s=this.children.splice(r,i);for(let a=0;a<s.length;++a)s[a].parent=null,s[a].transform&&(s[a].transform._parentID=-1);this._boundsID++,this.onChildrenChange(e);for(let a=0;a<s.length;++a)s[a].emit("removed",this),this.emit("childRemoved",s[a],this,a);return s}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(Pm),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 s=this.children[n];s.visible&&s.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!==aa.prototype._render&&(r=this.getBounds(!0));const i=e.projection.transform;if(i&&(n?(n=Cm.copyFrom(n),n.prepend(i)):n=i),r&&t.intersects(r,n))this._render(e);else if(this.cullArea)return;for(let s=0,a=this.children.length;s<a;++s){const o=this.children[s],l=o.cullable;o.cullable=l||!this.cullArea,o.render(e),o.cullable=l}}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,s,a;const t=this.filters,r=this._mask;if(t){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(let o=0;o<t.length;o++)t[o].enabled&&this._enabledFilters.push(t[o])}const n=t&&((i=this._enabledFilters)==null?void 0:i.length)||r&&(!r.isMaskData||r.enabled&&(r.autoDetect||r.type!==Ut.NONE));if(n&&e.batch.flush(),t&&((s=this._enabledFilters)!=null&&s.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 o=0,l=this.children.length;o<l;++o)this.children[o].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 Pr=aa;Pr.defaultSortableChildren=!1,Pr.prototype.containerUpdateTransform=Pr.prototype.updateTransform,Object.defineProperties(mt,{SORTABLE_CHILDREN:{get(){return Pr.defaultSortableChildren},set(e){Tt("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),Pr.defaultSortableChildren=e}}});class ui{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 ui(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 kr=new Gt,uu=class extends Ho{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 sa,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(),li.push(this.drawCalls[e]);this.drawCalls.length=0;for(let e=0;e<this.batches.length;e++){const t=this.batches[e];t.reset(),lu.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 ui(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 ui(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,kr):kr.copyFrom(e),n.shape.contains(kr.x,kr.y))){let i=!1;if(n.holes){for(let s=0;s<n.holes.length;s++)if(n.holes[s].shape.contains(kr.x,kr.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 o=this.shapeIndex;o<t.length;o++){this.shapeIndex++;const l=t[o],f=l.fillStyle,c=l.lineStyle;ia[l.type].build(l),l.matrix&&this.transformPoints(l.points,l.matrix),(f.visible||c.visible)&&this.processHoles(l.holes);for(let u=0;u<2;u++){const d=u===0?f:c;if(!d.visible)continue;const p=d.texture.baseTexture,v=this.indices.length,g=this.points.length/2;p.wrapMode=$r.REPEAT,u===0?this.processFill(l):this.processLine(l);const m=this.points.length/2-g;m!==0&&(r&&!this._compareStyles(n,d)&&(r.end(v,g),r=null),r||(r=lu.pop()||new Om,r.begin(d,v,g),this.batches.push(r),n=d),this.addUvs(this.points,e,d.texture,g,m,d.matrix))}}const i=this.indices.length,s=this.points.length/2;if(r&&r.end(i,s),this.batches.length===0){this.batchable=!0;return}const a=s>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 s=n.start+i;this.indicesUint16[s]=this.indicesUint16[s]-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<uu.BATCHABLE_SIZE*2}buildDrawCalls(){let e=++_t._globalBatch;for(let c=0;c<this.drawCalls.length;c++)this.drawCalls[c].texArray.clear(),li.push(this.drawCalls[c]);this.drawCalls.length=0;const t=this.colors,r=this.textureIds;let n=li.pop();n||(n=new ws,n.texArray=new Ns),n.texArray.count=0,n.start=0,n.size=0,n.type=Pe.TRIANGLES;let i=0,s=null,a=0,o=!1,l=Pe.TRIANGLES,f=0;this.drawCalls.push(n);for(let c=0;c<this.batches.length;c++){const h=this.batches[c],u=8,d=h.style,p=d.texture.baseTexture;o!==!!d.native&&(o=!!d.native,l=o?Pe.LINES:Pe.TRIANGLES,s=null,i=u,e++),s!==p&&(s=p,p._batchEnabled!==e&&(i===u&&(e++,i=0,n.size>0&&(n=li.pop(),n||(n=new ws,n.texArray=new Ns),this.drawCalls.push(n)),n.start=f,n.size=0,n.texArray.count=0,n.type=l),p.touched=1,p._batchEnabled=e,p._batchLocation=i,p.wrapMode=$r.REPEAT,n.texArray.elements[n.texArray.count++]=p,i++)),n.size+=h.size,f+=h.size,a=p._batchLocation,this.addColors(t,d.color,d.alpha,h.attribSize,h.attribStart),this.addTextureIds(r,a,h.attribSize,h.attribStart)}_t._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),s=new Float32Array(i),a=new Uint32Array(i);let o=0;for(let l=0;l<e.length/2;l++)s[o++]=e[l*2],s[o++]=e[l*2+1],s[o++]=t[l*2],s[o++]=t[l*2+1],a[o++]=r[l],s[o++]=n[l];this._buffer.update(i),this._indexBuffer.update(this.indicesUint16)}processFill(e){e.holes.length?iu.triangulate(e,this):ia[e.type].triangulate(e,this)}processLine(e){ou(e,this);for(let t=0;t<e.holes.length;t++)ou(e.holes[t],this)}processHoles(e){for(let t=0;t<e.length;t++){const r=e[t];ia[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 s=Xt.shared.setValue(t).toLittleEndianNumber(),a=Xt.shared.setValue(s).toPremultiplied(r);e.length=Math.max(e.length,i+n);for(let o=0;o<n;o++)e[i+o]=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,s=null){let a=0;const o=t.length,l=r.frame;for(;a<i;){let c=e[(n+a)*2],h=e[(n+a)*2+1];if(s){const u=s.a*c+s.c*h+s.tx;h=s.b*c+s.d*h+s.ty,c=u}a++,t.push(c/l.width,h/l.height)}const f=r.baseTexture;(l.width<f.width||l.height<f.height)&&this.adjustUvs(t,r,o,i)}adjustUvs(e,t,r,n){const i=t.baseTexture,s=1e-6,a=r+n*2,o=t.frame,l=o.width/i.width,f=o.height/i.height;let c=o.x/o.width,h=o.y/o.height,u=Math.floor(e[r]+s),d=Math.floor(e[r+1]+s);for(let p=r+2;p<a;p+=2)u=Math.min(u,Math.floor(e[p]+s)),d=Math.min(d,Math.floor(e[p+1]+s));c-=u,h-=d;for(let p=r;p<a;p+=2)e[p]=(e[p]+c)*l,e[p+1]=(e[p+1]+h)*f}};let fu=uu;fu.BATCHABLE_SIZE=100;class fi{constructor(){this.color=16777215,this.alpha=1,this.texture=xt.WHITE,this.matrix=null,this.visible=!1,this.reset()}clone(){const t=new fi;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=xt.WHITE,this.matrix=null,this.visible=!1}destroy(){this.texture=null,this.matrix=null}}class oa extends fi{constructor(){super(...arguments),this.width=0,this.alignment=.5,this.native=!1,this.cap=rr.BUTT,this.join=ue.MITER,this.miterLimit=10}clone(){const t=new oa;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 la={},ci=class extends Pr{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 fi,this._lineStyle=new oa,this._matrix=null,this._holeMode=!1,this.state=Ln.for2d(),this._geometry=e||new fu,this._geometry.refCount++,this._transformID=-1,this._tintColor=new Xt(16777215),this.blendMode=ot.NORMAL}get geometry(){return this._geometry}clone(){return this.finishPoly(),new ci(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:xt.WHITE,color:e!=null&&e.texture?16777215:0,matrix:null,alignment:.5,native:!1,cap:rr.BUTT,join:ue.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 Qr,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[t-2],e[t-1]))}else this.currentPath=new Qr,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),na.curveTo(e,t,r,n,i),this}bezierCurveTo(e,t,r,n,i,s){return this._initCurve(),ra.curveTo(e,t,r,n,i,s,this.currentPath.points),this}arcTo(e,t,r,n,i){this._initCurve(e,t);const s=this.currentPath.points,a=su.curveTo(e,t,r,n,i,s);if(a){const{cx:o,cy:l,radius:f,startAngle:c,endAngle:h,anticlockwise:u}=a;this.arc(o,l,f,c,h,u)}return this}arc(e,t,r,n,i,s=!1){if(n===i)return this;if(!s&&i<=n?i+=Bn:s&&n<=i&&(n+=Bn),i-n===0)return this;const o=e+Math.cos(n)*r,l=t+Math.sin(n)*r,f=this._geometry.closePointEps;let c=this.currentPath?this.currentPath.points:null;if(c){const h=Math.abs(c[c.length-2]-o),u=Math.abs(c[c.length-1]-l);h<f&&u<f||c.push(o,l)}else this.moveTo(o,l),c=this.currentPath.points;return su.arc(o,l,e,t,r,n,i,s,c),this}beginFill(e=0,t){return this.beginTextureFill({texture:xt.WHITE,color:e,alpha:t})}normalizeColor(e){const t=Xt.shared.setValue(e.color??0);e.color=t.toNumber(),e.alpha??(e.alpha=t.alpha)}beginTextureFill(e){const t={texture:xt.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 St(e,t,r,n))}drawRoundedRect(e,t,r,n,i){return this.drawShape(new Ss(e,t,r,n,i))}drawCircle(e,t,r){return this.drawShape(new As(e,t,r))}drawEllipse(e,t,r,n){return this.drawShape(new Ed(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 Qr(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===qt.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],s=i.style.color,a=new Float32Array(this.vertexData.buffer,i.attribStart*4*2,i.attribSize*2),o=new Float32Array(e.uvsFloat32.buffer,i.attribStart*4*2,i.attribSize*2),l=new Uint16Array(e.indicesUint16.buffer,i.start*2,i.size),f={vertexData:a,blendMode:t,indices:l,uvs:o,_batchRGB:Xt.shared.setValue(s).toRgbArray(),_tintRGB:s,_texture:i.style.texture,alpha:i.style.alpha,worldAlpha:1};this.batches[n]=f}}_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,s=r.drawCalls;i.translationMatrix=this.transform.worldTransform,Xt.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,o=s.length;a<o;a++)this._renderDrawCallDirect(e,r.drawCalls[a])}_renderDrawCallDirect(e,t){const{texArray:r,type:n,size:i,start:s}=t,a=r.count;for(let o=0;o<a;o++)e.texture.bind(r.elements[o],o);e.geometry.draw(n,i,s)}_resolveDirectShader(e){let t=this.shader;const r=this.pluginName;if(!t){if(!la[r]){const{maxTextures:n}=e.plugins[r],i=new Int32Array(n);for(let o=0;o<n;o++)i[o]=o;const s={tint:new Float32Array([1,1,1,1]),translationMatrix:new zt,default:ie.from({uSamplers:i},!0)},a=e.plugins[r]._shader.program;la[r]=new tn(a,s)}t=la[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,ci._TEMP_POINT),this._geometry.containsPoint(ci._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=Xt.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,s=t.d,a=t.tx,o=t.ty,l=this._geometry.points,f=this.vertexData;let c=0;for(let h=0;h<l.length;h+=2){const u=l[h],d=l[h+1];f[c++]=r*u+i*d+a,f[c++]=s*d+n*u+o}}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 ua=ci;ua.curves=Nr,ua._TEMP_POINT=new Gt;var km=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},fa={},Mm={get exports(){return fa},set exports(e){fa=e}};/*!
540
540
  * d-path-parser - v1.0.0
541
541
  * by Massimo Artizzu (MaxArt2501)
542
542
  *
@@ -544,42 +544,42 @@ void main(void)
544
544
  *
545
545
  * Licensed under the MIT License
546
546
  * See LICENSE for details
547
- */(function(e,t){(function(r,n){e.exports=n()})(km,function(){return function(n){for(var i={command:/\s*([achlmqstvz])/gi,number:/\s*([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/gi,comma:/\s*(?:(,)|\s)/g,flag:/\s*([01])/g},s={number:function(v){return+d("number",v)},"coordinate pair":function(v){var g=d("number",v);if(g===null&&!v)return null;d("comma");var m=d("number",!0);return{x:+g,y:+m}},"arc definition":function(v){var g=s["coordinate pair"](v);if(!g&&!v)return null;d("comma");var m=+d("number",!0);d("comma",!0);var b=!!+d("flag",!0);d("comma");var _=!!+d("flag",!0);d("comma");var y=s["coordinate pair"](!0);return{radii:g,rotation:m,large:b,clockwise:_,end:y}}},a=0,o=[];a<n.length;){var l=d("command"),f=l.toUpperCase(),c=l!==f,h;switch(f){case"M":h=p("coordinate pair").map(function(v,g){return g===1&&(l=c?"l":"L"),u({end:v})});break;case"L":case"T":h=p("coordinate pair").map(function(v){return u({end:v})});break;case"C":if(h=p("coordinate pair"),h.length%3)throw Error("Expected coordinate pair triplet at position "+a);h=h.reduce(function(v,g,m){var b=m%3;if(!b)v.push(u({cp1:g}));else{var _=v[v.length-1];_[b===1?"cp2":"end"]=g}return v},[]);break;case"Q":case"S":if(h=p("coordinate pair"),h.length&1)throw Error("Expected coordinate pair couple at position "+a);h=h.reduce(function(v,g,m){var b=m&1;if(!b)v.push(u({cp:g}));else{var _=v[v.length-1];_.end=g}return v},[]);break;case"H":case"V":h=p("number").map(function(v){return u({value:v})});break;case"A":h=p("arc definition").map(u);break;case"Z":h=[{code:"Z"}];break}o.push.apply(o,h)}return o;function u(v){return v.code=l,v.relative=c,v}function d(v,g){i[v].lastIndex=a;var m=i[v].exec(n);if(!m||m.index!==a){if(!g)return null;throw Error("Expected "+v+" at position "+a)}return a=i[v].lastIndex,m[1]}function p(v){for(var g=[],m,b=!0;m=s[v](b);)g.push(m),b=!!d("comma");return g}}})})(Mm);const Lm=/^\s+/,Fm=/\s+$/;function it(e,t){if(e=e||"",t=t||{},e instanceof it)return e;if(!(this instanceof it))return new it(e,t);var r=Bm(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}it.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),t,r,n,i,s,a;return t=e.r/255,r=e.g/255,n=e.b/255,t<=.03928?i=t/12.92:i=Math.pow((t+.055)/1.055,2.4),r<=.03928?s=r/12.92:s=Math.pow((r+.055)/1.055,2.4),n<=.03928?a=n/12.92:a=Math.pow((n+.055)/1.055,2.4),.2126*i+.7152*s+.0722*a},setAlpha:function(e){return this._a=yu(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=hu(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=hu(this._r,this._g,this._b),t=Math.round(e.h*360),r=Math.round(e.s*100),n=Math.round(e.v*100);return this._a==1?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=cu(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=cu(this._r,this._g,this._b),t=Math.round(e.h*360),r=Math.round(e.s*100),n=Math.round(e.l*100);return this._a==1?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return du(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return jm(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(Nt(this._r,255)*100)+"%",g:Math.round(Nt(this._g,255)*100)+"%",b:Math.round(Nt(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Nt(this._r,255)*100)+"%, "+Math.round(Nt(this._g,255)*100)+"%, "+Math.round(Nt(this._b,255)*100)+"%)":"rgba("+Math.round(Nt(this._r,255)*100)+"%, "+Math.round(Nt(this._g,255)*100)+"%, "+Math.round(Nt(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Jm[du(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var t="#"+pu(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var i=it(e);r="#"+pu(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0,i=!t&&n&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return i?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return it(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(Vm,arguments)},brighten:function(){return this._applyModification(zm,arguments)},darken:function(){return this._applyModification(Xm,arguments)},desaturate:function(){return this._applyModification(Gm,arguments)},saturate:function(){return this._applyModification(qm,arguments)},greyscale:function(){return this._applyModification(Hm,arguments)},spin:function(){return this._applyModification(Wm,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(Zm,arguments)},complement:function(){return this._applyCombination(Ym,arguments)},monochromatic:function(){return this._applyCombination(Qm,arguments)},splitcomplement:function(){return this._applyCombination(Km,arguments)},triad:function(){return this._applyCombination(vu,[3])},tetrad:function(){return this._applyCombination(vu,[4])}},it.fromRatio=function(e,t){if(typeof e=="object"){var r={};for(var n in e)e.hasOwnProperty(n)&&(n==="a"?r[n]=e[n]:r[n]=ln(e[n]));e=r}return it(e,t)};function Bm(e){var t={r:0,g:0,b:0},r=1,n=null,i=null,s=null,a=!1,o=!1;return typeof e=="string"&&(e=ng(e)),typeof e=="object"&&(Re(e.r)&&Re(e.g)&&Re(e.b)?(t=Um(e.r,e.g,e.b),a=!0,o=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Re(e.h)&&Re(e.s)&&Re(e.v)?(n=ln(e.s),i=ln(e.v),t=$m(e.h,n,i),a=!0,o="hsv"):Re(e.h)&&Re(e.s)&&Re(e.l)&&(n=ln(e.s),s=ln(e.l),t=Dm(e.h,n,s),a=!0,o="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=yu(r),{ok:a,format:e.format||o,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}function Um(e,t,r){return{r:Nt(e,255)*255,g:Nt(t,255)*255,b:Nt(r,255)*255}}function cu(e,t,r){e=Nt(e,255),t=Nt(t,255),r=Nt(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),s,a,o=(n+i)/2;if(n==i)s=a=0;else{var l=n-i;switch(a=o>.5?l/(2-n-i):l/(n+i),n){case e:s=(t-r)/l+(t<r?6:0);break;case t:s=(r-e)/l+2;break;case r:s=(e-t)/l+4;break}s/=6}return{h:s,s:a,l:o}}function Dm(e,t,r){var n,i,s;e=Nt(e,360),t=Nt(t,100),r=Nt(r,100);function a(f,c,h){return h<0&&(h+=1),h>1&&(h-=1),h<1/6?f+(c-f)*6*h:h<1/2?c:h<2/3?f+(c-f)*(2/3-h)*6:f}if(t===0)n=i=s=r;else{var o=r<.5?r*(1+t):r+t-r*t,l=2*r-o;n=a(l,o,e+1/3),i=a(l,o,e),s=a(l,o,e-1/3)}return{r:n*255,g:i*255,b:s*255}}function hu(e,t,r){e=Nt(e,255),t=Nt(t,255),r=Nt(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),s,a,o=n,l=n-i;if(a=n===0?0:l/n,n==i)s=0;else{switch(n){case e:s=(t-r)/l+(t<r?6:0);break;case t:s=(r-e)/l+2;break;case r:s=(e-t)/l+4;break}s/=6}return{h:s,s:a,v:o}}function $m(e,t,r){e=Nt(e,360)*6,t=Nt(t,100),r=Nt(r,100);var n=Math.floor(e),i=e-n,s=r*(1-t),a=r*(1-i*t),o=r*(1-(1-i)*t),l=n%6,f=[r,a,s,s,o,r][l],c=[o,r,r,a,s,s][l],h=[s,s,o,r,r,a][l];return{r:f*255,g:c*255,b:h*255}}function du(e,t,r,n){var i=[fe(Math.round(e).toString(16)),fe(Math.round(t).toString(16)),fe(Math.round(r).toString(16))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function jm(e,t,r,n,i){var s=[fe(Math.round(e).toString(16)),fe(Math.round(t).toString(16)),fe(Math.round(r).toString(16)),fe(mu(n))];return i&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)&&s[3].charAt(0)==s[3].charAt(1)?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function pu(e,t,r,n){var i=[fe(mu(n)),fe(Math.round(e).toString(16)),fe(Math.round(t).toString(16)),fe(Math.round(r).toString(16))];return i.join("")}it.equals=function(e,t){return!e||!t?!1:it(e).toRgbString()==it(t).toRgbString()},it.random=function(){return it.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function Gm(e,t){t=t===0?0:t||10;var r=it(e).toHsl();return r.s-=t/100,r.s=hi(r.s),it(r)}function qm(e,t){t=t===0?0:t||10;var r=it(e).toHsl();return r.s+=t/100,r.s=hi(r.s),it(r)}function Hm(e){return it(e).desaturate(100)}function Vm(e,t){t=t===0?0:t||10;var r=it(e).toHsl();return r.l+=t/100,r.l=hi(r.l),it(r)}function zm(e,t){t=t===0?0:t||10;var r=it(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),it(r)}function Xm(e,t){t=t===0?0:t||10;var r=it(e).toHsl();return r.l-=t/100,r.l=hi(r.l),it(r)}function Wm(e,t){var r=it(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,it(r)}function Ym(e){var t=it(e).toHsl();return t.h=(t.h+180)%360,it(t)}function vu(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var r=it(e).toHsl(),n=[it(e)],i=360/t,s=1;s<t;s++)n.push(it({h:(r.h+s*i)%360,s:r.s,l:r.l}));return n}function Km(e){var t=it(e).toHsl(),r=t.h;return[it(e),it({h:(r+72)%360,s:t.s,l:t.l}),it({h:(r+216)%360,s:t.s,l:t.l})]}function Zm(e,t,r){t=t||6,r=r||30;var n=it(e).toHsl(),i=360/r,s=[it(e)];for(n.h=(n.h-(i*t>>1)+720)%360;--t;)n.h=(n.h+i)%360,s.push(it(n));return s}function Qm(e,t){t=t||6;for(var r=it(e).toHsv(),n=r.h,i=r.s,s=r.v,a=[],o=1/t;t--;)a.push(it({h:n,s:i,v:s})),s=(s+o)%1;return a}it.mix=function(e,t,r){r=r===0?0:r||50;var n=it(e).toRgb(),i=it(t).toRgb(),s=r/100,a={r:(i.r-n.r)*s+n.r,g:(i.g-n.g)*s+n.g,b:(i.b-n.b)*s+n.b,a:(i.a-n.a)*s+n.a};return it(a)},it.readability=function(e,t){var r=it(e),n=it(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},it.isReadable=function(e,t,r){var n=it.readability(e,t),i,s;switch(s=!1,i=ig(r),i.level+i.size){case"AAsmall":case"AAAlarge":s=n>=4.5;break;case"AAlarge":s=n>=3;break;case"AAAsmall":s=n>=7;break}return s},it.mostReadable=function(e,t,r){var n=null,i=0,s,a,o,l;r=r||{},a=r.includeFallbackColors,o=r.level,l=r.size;for(var f=0;f<t.length;f++)s=it.readability(e,t[f]),s>i&&(i=s,n=it(t[f]));return it.isReadable(e,n,{level:o,size:l})||!a?n:(r.includeFallbackColors=!1,it.mostReadable(e,["#fff","#000"],r))};var ca=it.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Jm=it.hexNames=tg(ca);function tg(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function yu(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Nt(e,t){eg(e)&&(e="100%");var r=rg(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function hi(e){return Math.min(1,Math.max(0,e))}function Zt(e){return parseInt(e,16)}function eg(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function rg(e){return typeof e=="string"&&e.indexOf("%")!=-1}function fe(e){return e.length==1?"0"+e:""+e}function ln(e){return e<=1&&(e=e*100+"%"),e}function mu(e){return Math.round(parseFloat(e)*255).toString(16)}function gu(e){return Zt(e)/255}var ce=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",r="(?:"+t+")|(?:"+e+")",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",i="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Re(e){return!!ce.CSS_UNIT.exec(e)}function ng(e){e=e.replace(Lm,"").replace(Fm,"").toLowerCase();var t=!1;if(ca[e])e=ca[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=ce.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=ce.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=ce.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=ce.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=ce.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=ce.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=ce.hex8.exec(e))?{r:Zt(r[1]),g:Zt(r[2]),b:Zt(r[3]),a:gu(r[4]),format:t?"name":"hex8"}:(r=ce.hex6.exec(e))?{r:Zt(r[1]),g:Zt(r[2]),b:Zt(r[3]),format:t?"name":"hex"}:(r=ce.hex4.exec(e))?{r:Zt(r[1]+""+r[1]),g:Zt(r[2]+""+r[2]),b:Zt(r[3]+""+r[3]),a:gu(r[4]+""+r[4]),format:t?"name":"hex8"}:(r=ce.hex3.exec(e))?{r:Zt(r[1]+""+r[1]),g:Zt(r[2]+""+r[2]),b:Zt(r[3]+""+r[3]),format:t?"name":"hex"}:!1}function ig(e){var t,r;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:t,size:r}}var sg=function(){function e(t,r){var n=[],i=!0,s=!1,a=void 0;try{for(var o=t[Symbol.iterator](),l;!(i=(l=o.next()).done)&&(n.push(l.value),!(r&&n.length===r));i=!0);}catch(f){s=!0,a=f}finally{try{!i&&o.return&&o.return()}finally{if(s)throw a}}return n}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),un=Math.PI*2,ha=function(t,r,n,i,s,a,o){var l=t.x,f=t.y;l*=r,f*=n;var c=i*l-s*f,h=s*l+i*f;return{x:c+a,y:h+o}},ag=function(t,r){var n=r===1.5707963267948966?.551915024494:r===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(r/4),i=Math.cos(t),s=Math.sin(t),a=Math.cos(t+r),o=Math.sin(t+r);return[{x:i-s*n,y:s+i*n},{x:a+o*n,y:o-a*n},{x:a,y:o}]},bu=function(t,r,n,i){var s=t*i-r*n<0?-1:1,a=t*n+r*i;return a>1&&(a=1),a<-1&&(a=-1),s*Math.acos(a)},og=function(t,r,n,i,s,a,o,l,f,c,h,u){var d=Math.pow(s,2),p=Math.pow(a,2),v=Math.pow(h,2),g=Math.pow(u,2),m=d*p-d*g-p*v;m<0&&(m=0),m/=d*g+p*v,m=Math.sqrt(m)*(o===l?-1:1);var b=m*s/a*u,_=m*-a/s*h,y=c*b-f*_+(t+n)/2,x=f*b+c*_+(r+i)/2,O=(h-b)/s,T=(u-_)/a,E=(-h-b)/s,N=(-u-_)/a,A=bu(1,0,O,T),w=bu(O,T,E,N);return l===0&&w>0&&(w-=un),l===1&&w<0&&(w+=un),[y,x,A,w]},_u=function(t){var r=t.px,n=t.py,i=t.cx,s=t.cy,a=t.rx,o=t.ry,l=t.xAxisRotation,f=l===void 0?0:l,c=t.largeArcFlag,h=c===void 0?0:c,u=t.sweepFlag,d=u===void 0?0:u,p=[];if(a===0||o===0)return[];var v=Math.sin(f*un/360),g=Math.cos(f*un/360),m=g*(r-i)/2+v*(n-s)/2,b=-v*(r-i)/2+g*(n-s)/2;if(m===0&&b===0)return[];a=Math.abs(a),o=Math.abs(o);var _=Math.pow(m,2)/Math.pow(a,2)+Math.pow(b,2)/Math.pow(o,2);_>1&&(a*=Math.sqrt(_),o*=Math.sqrt(_));var y=og(r,n,i,s,a,o,h,d,v,g,m,b),x=sg(y,4),O=x[0],T=x[1],E=x[2],N=x[3],A=Math.abs(N)/(un/4);Math.abs(1-A)<1e-7&&(A=1);var w=Math.max(Math.ceil(A),1);N/=w;for(var S=0;S<w;S++)p.push(ag(E,N)),E+=N;return p.map(function(I){var C=ha(I[0],a,o,g,v,O,T),F=C.x,D=C.y,U=ha(I[1],a,o,g,v,O,T),X=U.x,$=U.y,k=ha(I[2],a,o,g,v,O,T),R=k.x,P=k.y;return{x1:F,y1:D,x2:X,y2:$,x:R,y:P}})};class lg extends ua{constructor(t){super(),this.lineColor=null,t&&this.drawSVG(t)}drawSVG(t){if(typeof t=="string"){const r=document.createElement("div");r.innerHTML=t.trim(),t=r.querySelector("svg")}if(!t)throw new Error("Missing <svg> element in SVG constructor");return this._svgFill(t),this._svgChildren(t.children),this}_svgChildren(t,r=!1){for(let n=0;n<t.length;n++){const i=t[n];switch(this._svgFill(i,r),i.nodeName.toLowerCase()){case"path":{this._svgPath(i);break}case"circle":case"ellipse":{this._svgCircle(i);break}case"rect":{this._svgRect(i);break}case"polygon":{this._svgPoly(i,!0);break}case"polyline":{this._svgPoly(i);break}case"g":break;default:{console.info(`[PIXI.SVG] <${i.nodeName}> elements unsupported`);break}}this._svgChildren(i.children,!0)}}_hexToUint(t){if(t[0]==="#")return t=t.substr(1),t.length===3&&(t=t.replace(/([a-f0-9])/ig,"$1$1")),parseInt(t,16);const{r,g:n,b:i}=it(t).toRgb();return(r<<16)+(n<<8)+i}_svgCircle(t){let r="r",n="r";const i=t.nodeName==="elipse";i&&(r+="x",n+="y");const s=parseFloat(t.getAttribute(n)),a=parseFloat(t.getAttribute(r)),o=t.getAttribute("cx"),l=t.getAttribute("cy");let f=0,c=0;o!==null&&(f=parseFloat(o)),l!==null&&(c=parseFloat(l)),i?this.drawEllipse(f,c,s,a):this.drawCircle(f,c,s)}_svgRect(t){const r=parseFloat(t.getAttribute("x")),n=parseFloat(t.getAttribute("y")),i=parseFloat(t.getAttribute("width")),s=parseFloat(t.getAttribute("height")),a=parseFloat(t.getAttribute("rx"));a?this.drawRoundedRect(r,n,i,s,a):this.drawRect(r,n,i,s)}_convertStyleName(t){return t.trim().replace("-width","Width").replace(/.*-(line)?/,"")}_svgStyle(t){const r=t.getAttribute("style"),n=t.getAttribute("opacity"),i={fill:t.getAttribute("fill"),opacity:n||t.getAttribute("fill-opacity"),stroke:t.getAttribute("stroke"),strokeOpacity:n||t.getAttribute("stroke-opacity"),strokeWidth:t.getAttribute("stroke-width"),cap:t.getAttribute("stroke-linecap"),join:t.getAttribute("stroke-linejoin"),miterLimit:t.getAttribute("stroke-miterlimit")};return r!==null&&r.split(";").forEach(s=>{const[a,o]=s.split(":");if(a){const l=this._convertStyleName(a);i[l]||(i[l]=o.trim())}}),i}_svgPoly(t,r){const n=t.getAttribute("points").split(/[ ,]/g).map(i=>parseInt(i,10));this.drawPolygon(n),r&&this.closePath()}_svgFill(t,r){const{fill:n,opacity:i,stroke:s,strokeOpacity:a,strokeWidth:o,cap:l,join:f,miterLimit:c}=this._svgStyle(t),u=o!==null?parseFloat(o):s!==null?1:0,d=s!==null?this._hexToUint(s):this.lineColor;n?n==="none"?this.beginFill(0,0):this.beginFill(this._hexToUint(n),i!==null?parseFloat(i):1):r||this.beginFill(0),this.lineStyle({width:s===null&&o===null&&r?this.line.width:u,alpha:a===null?this.line.alpha:parseFloat(a),color:s===null&&r?this.line.color:d,cap:l===null&&r?this.line.cap:l,join:f===null&&r?this.line.join:f,miterLimit:c===null&&r?this.line.miterLimit:parseFloat(c)}),t.getAttribute("fill-rule")&&console.info('[PIXI.SVG] "fill-rule" attribute is not supported')}_svgPath(t){const r=t.getAttribute("d");let n=0,i=0;const s=fa(r.trim());for(let a=0;a<s.length;a++){const o=s[a];switch(o.code){case"m":{this.moveTo(n+=o.end.x,i+=o.end.y);break}case"M":{this.moveTo(n=o.end.x,i=o.end.y);break}case"H":{this.lineTo(n=o.value,i);break}case"h":{this.lineTo(n+=o.value,i);break}case"V":{this.lineTo(n,i=o.value);break}case"v":{this.lineTo(n,i+=o.value);break}case"Z":{this.closePath();break}case"L":{this.lineTo(n=o.end.x,i=o.end.y);break}case"l":{this.lineTo(n+=o.end.x,i+=o.end.y);break}case"C":{this.bezierCurveTo(o.cp1.x,o.cp1.y,o.cp2.x,o.cp2.y,n=o.end.x,i=o.end.y);break}case"c":{const l=n,f=i;this.bezierCurveTo(l+o.cp1.x,f+o.cp1.y,l+o.cp2.x,f+o.cp2.y,n+=o.end.x,i+=o.end.y);break}case"s":case"q":{const l=n,f=i;this.quadraticCurveTo(l+o.cp.x,f+o.cp.y,n+=o.end.x,i+=o.end.y);break}case"S":case"Q":{this.quadraticCurveTo(o.cp.x,o.cp.y,n=o.end.x,i=o.end.y);break}case"a":{_u({px:n,py:i,cx:n+=o.end.x,cy:i+=o.end.y,rx:o.radii.x,ry:o.radii.y,xAxisRotation:o.rotation,largeArcFlag:o.large?1:0,sweepFlag:o.clockwise?1:0}).forEach(({x1:l,y1:f,x2:c,y2:h,x:u,y:d})=>this.bezierCurveTo(l,f,c,h,u,d));break}case"A":{_u({px:n,py:i,cx:n=o.end.x,cy:i=o.end.y,rx:o.radii.x,ry:o.radii.y,xAxisRotation:o.rotation,largeArcFlag:o.large?1:0,sweepFlag:o.clockwise?1:0}).forEach(({x1:l,y1:f,x2:c,y2:h,x:u,y:d})=>this.bezierCurveTo(l,f,c,h,u,d));break}default:{console.info("[PIXI.SVG] Draw command not supported:",o.code,o);break}}}}}var di={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},ug=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function fg(e){return e===10||e===13||e===8232||e===8233||e===32||e===9||e===11||e===12||e===160||e>=5760&&ug.indexOf(e)>=0}function cg(e){switch(e|32){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:case 114:return!0}return!1}function hg(e){return(e|32)===97}function Mr(e){return e>=48&&e<=57}function dg(e){return e>=48&&e<=57||e===43||e===45||e===46}function pg(e){this.index=0,this.path=e,this.max=e.length,this.result=[],this.param=0,this.err="",this.segmentStart=0,this.data=[]}function pi(e){for(;e.index<e.max&&fg(e.path.charCodeAt(e.index));)e.index++}function vg(e){var t=e.path.charCodeAt(e.index);if(t===48){e.param=0,e.index++;return}if(t===49){e.param=1,e.index++;return}e.err="SvgPath: arc flag can be 0 or 1 only (at pos "+e.index+")"}function yg(e){var t=e.index,r=t,n=e.max,i=!1,s=!1,a=!1,o=!1,l;if(r>=n){e.err="SvgPath: missed param (at pos "+r+")";return}if(l=e.path.charCodeAt(r),(l===43||l===45)&&(r++,l=r<n?e.path.charCodeAt(r):0),!Mr(l)&&l!==46){e.err="SvgPath: param should start with 0..9 or `.` (at pos "+r+")";return}if(l!==46){if(i=l===48,r++,l=r<n?e.path.charCodeAt(r):0,i&&r<n&&l&&Mr(l)){e.err="SvgPath: numbers started with `0` such as `09` are illegal (at pos "+t+")";return}for(;r<n&&Mr(e.path.charCodeAt(r));)r++,s=!0;l=r<n?e.path.charCodeAt(r):0}if(l===46){for(o=!0,r++;Mr(e.path.charCodeAt(r));)r++,a=!0;l=r<n?e.path.charCodeAt(r):0}if(l===101||l===69){if(o&&!s&&!a){e.err="SvgPath: invalid float exponent (at pos "+r+")";return}if(r++,l=r<n?e.path.charCodeAt(r):0,(l===43||l===45)&&r++,r<n&&Mr(e.path.charCodeAt(r)))for(;r<n&&Mr(e.path.charCodeAt(r));)r++;else{e.err="SvgPath: invalid float exponent (at pos "+r+")";return}}e.index=r,e.param=parseFloat(e.path.slice(t,r))+0}function da(e){var t,r;t=e.path[e.segmentStart],r=t.toLowerCase();var n=e.data;if(r==="m"&&n.length>2&&(e.result.push([t,n[0],n[1]]),n=n.slice(2),r="l",t=t==="m"?"l":"L"),r==="r")e.result.push([t].concat(n));else for(;n.length>=di[r]&&(e.result.push([t].concat(n.splice(0,di[r]))),!!di[r]););}function mg(e){var t=e.max,r,n,i,s,a;if(e.segmentStart=e.index,r=e.path.charCodeAt(e.index),n=hg(r),!cg(r)){e.err="SvgPath: bad command "+e.path[e.index]+" (at pos "+e.index+")";return}if(s=di[e.path[e.index].toLowerCase()],e.index++,pi(e),e.data=[],!s){da(e);return}for(i=!1;;){for(a=s;a>0;a--){if(n&&(a===3||a===4)?vg(e):yg(e),e.err.length){da(e);return}e.data.push(e.param),pi(e),i=!1,e.index<t&&e.path.charCodeAt(e.index)===44&&(e.index++,pi(e),i=!0)}if(!i&&(e.index>=e.max||!dg(e.path.charCodeAt(e.index))))break}da(e)}var gg=function(t){var r=new pg(t),n=r.max;for(pi(r);r.index<n&&!r.err.length;)mg(r);return r.result.length&&("mM".indexOf(r.result[0][0])<0?(r.err="SvgPath: string should start with `M` or `m`",r.result=[]):r.result[0][0]="M"),{err:r.err,segments:r.result}};function bg(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}function he(){if(!(this instanceof he))return new he;this.queue=[],this.cache=null}he.prototype.matrix=function(e){return e[0]===1&&e[1]===0&&e[2]===0&&e[3]===1&&e[4]===0&&e[5]===0?this:(this.cache=null,this.queue.push(e),this)},he.prototype.translate=function(e,t){return(e!==0||t!==0)&&(this.cache=null,this.queue.push([1,0,0,1,e,t])),this},he.prototype.scale=function(e,t){return(e!==1||t!==1)&&(this.cache=null,this.queue.push([e,0,0,t,0,0])),this},he.prototype.rotate=function(e,t,r){var n,i,s;return e!==0&&(this.translate(t,r),n=e*Math.PI/180,i=Math.cos(n),s=Math.sin(n),this.queue.push([i,s,-s,i,0,0]),this.cache=null,this.translate(-t,-r)),this},he.prototype.skewX=function(e){return e!==0&&(this.cache=null,this.queue.push([1,0,Math.tan(e*Math.PI/180),1,0,0])),this},he.prototype.skewY=function(e){return e!==0&&(this.cache=null,this.queue.push([1,Math.tan(e*Math.PI/180),0,1,0,0])),this},he.prototype.toArray=function(){if(this.cache)return this.cache;if(!this.queue.length)return this.cache=[1,0,0,1,0,0],this.cache;if(this.cache=this.queue[0],this.queue.length===1)return this.cache;for(var e=1;e<this.queue.length;e++)this.cache=bg(this.cache,this.queue[e]);return this.cache},he.prototype.calc=function(e,t,r){var n;return this.queue.length?(this.cache||(this.cache=this.toArray()),n=this.cache,[e*n[0]+t*n[2]+(r?0:n[4]),e*n[1]+t*n[3]+(r?0:n[5])]):[e,t]};var xu=he,_g=xu,xg={matrix:!0,scale:!0,rotate:!0,translate:!0,skewX:!0,skewY:!0},Eg=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,Tg=/[\s,]+/,wg=function(t){var r=new _g,n,i;return t.split(Eg).forEach(function(s){if(s.length){if(typeof xg[s]<"u"){n=s;return}switch(i=s.split(Tg).map(function(a){return+a||0}),n){case"matrix":i.length===6&&r.matrix(i);return;case"scale":i.length===1?r.scale(i[0],i[0]):i.length===2&&r.scale(i[0],i[1]);return;case"rotate":i.length===1?r.rotate(i[0],0,0):i.length===3&&r.rotate(i[0],i[1],i[2]);return;case"translate":i.length===1?r.translate(i[0],0):i.length===2&&r.translate(i[0],i[1]);return;case"skewX":i.length===1&&r.skewX(i[0]);return;case"skewY":i.length===1&&r.skewY(i[0]);return}}}),r},fn=Math.PI*2;function Eu(e,t,r,n){var i=e*n-t*r<0?-1:1,s=e*r+t*n;return s>1&&(s=1),s<-1&&(s=-1),i*Math.acos(s)}function Ag(e,t,r,n,i,s,a,o,l,f){var c=f*(e-r)/2+l*(t-n)/2,h=-l*(e-r)/2+f*(t-n)/2,u=a*a,d=o*o,p=c*c,v=h*h,g=u*d-u*v-d*p;g<0&&(g=0),g/=u*v+d*p,g=Math.sqrt(g)*(i===s?-1:1);var m=g*a/o*h,b=g*-o/a*c,_=f*m-l*b+(e+r)/2,y=l*m+f*b+(t+n)/2,x=(c-m)/a,O=(h-b)/o,T=(-c-m)/a,E=(-h-b)/o,N=Eu(1,0,x,O),A=Eu(x,O,T,E);return s===0&&A>0&&(A-=fn),s===1&&A<0&&(A+=fn),[_,y,N,A]}function Sg(e,t){var r=1.3333333333333333*Math.tan(t/4),n=Math.cos(e),i=Math.sin(e),s=Math.cos(e+t),a=Math.sin(e+t);return[n,i,n-i*r,i+n*r,s+a*r,a-s*r,s,a]}var Og=function(t,r,n,i,s,a,o,l,f){var c=Math.sin(f*fn/360),h=Math.cos(f*fn/360),u=h*(t-n)/2+c*(r-i)/2,d=-c*(t-n)/2+h*(r-i)/2;if(u===0&&d===0)return[];if(o===0||l===0)return[];o=Math.abs(o),l=Math.abs(l);var p=u*u/(o*o)+d*d/(l*l);p>1&&(o*=Math.sqrt(p),l*=Math.sqrt(p));var v=Ag(t,r,n,i,s,a,o,l,c,h),g=[],m=v[2],b=v[3],_=Math.max(Math.ceil(Math.abs(b)/(fn/4)),1);b/=_;for(var y=0;y<_;y++)g.push(Sg(m,b)),m+=b;return g.map(function(x){for(var O=0;O<x.length;O+=2){var T=x[O+0],E=x[O+1];T*=o,E*=l;var N=h*T-c*E,A=c*T+h*E;x[O+0]=N+v[0],x[O+1]=A+v[1]}return x})},cn=1e-10,Tu=Math.PI/180;function hn(e,t,r){if(!(this instanceof hn))return new hn(e,t,r);this.rx=e,this.ry=t,this.ax=r}hn.prototype.transform=function(e){var t=Math.cos(this.ax*Tu),r=Math.sin(this.ax*Tu),n=[this.rx*(e[0]*t+e[2]*r),this.rx*(e[1]*t+e[3]*r),this.ry*(-e[0]*r+e[2]*t),this.ry*(-e[1]*r+e[3]*t)],i=n[0]*n[0]+n[2]*n[2],s=n[1]*n[1]+n[3]*n[3],a=((n[0]-n[3])*(n[0]-n[3])+(n[2]+n[1])*(n[2]+n[1]))*((n[0]+n[3])*(n[0]+n[3])+(n[2]-n[1])*(n[2]-n[1])),o=(i+s)/2;if(a<cn*o)return this.rx=this.ry=Math.sqrt(o),this.ax=0,this;var l=n[0]*n[1]+n[2]*n[3];a=Math.sqrt(a);var f=o+a/2,c=o-a/2;return this.ax=Math.abs(l)<cn&&Math.abs(f-s)<cn?90:Math.atan(Math.abs(l)>Math.abs(f-s)?(f-i)/l:l/(f-s))*180/Math.PI,this.ax>=0?(this.rx=Math.sqrt(f),this.ry=Math.sqrt(c)):(this.ax+=90,this.rx=Math.sqrt(c),this.ry=Math.sqrt(f)),this},hn.prototype.isDegenerate=function(){return this.rx<cn*this.ry||this.ry<cn*this.rx};var Ig=hn,Rg=gg,Ng=wg,De=xu,Cg=Og,Pg=Ig;function Mt(e){if(!(this instanceof Mt))return new Mt(e);var t=Rg(e);this.segments=t.segments,this.err=t.err,this.__stack=[]}Mt.from=function(e){if(typeof e=="string")return new Mt(e);if(e instanceof Mt){var t=new Mt("");return t.err=e.err,t.segments=e.segments.map(function(r){return r.slice()}),t.__stack=e.__stack.map(function(r){return De().matrix(r.toArray())}),t}throw new Error("SvgPath.from: invalid param type "+e)},Mt.prototype.__matrix=function(e){var t=this,r;e.queue.length&&this.iterate(function(n,i,s,a){var o,l,f,c;switch(n[0]){case"v":o=e.calc(0,n[1],!0),l=o[0]===0?["v",o[1]]:["l",o[0],o[1]];break;case"V":o=e.calc(s,n[1],!1),l=o[0]===e.calc(s,a,!1)[0]?["V",o[1]]:["L",o[0],o[1]];break;case"h":o=e.calc(n[1],0,!0),l=o[1]===0?["h",o[0]]:["l",o[0],o[1]];break;case"H":o=e.calc(n[1],a,!1),l=o[1]===e.calc(s,a,!1)[1]?["H",o[0]]:["L",o[0],o[1]];break;case"a":case"A":var h=e.toArray(),u=Pg(n[1],n[2],n[3]).transform(h);if(h[0]*h[3]-h[1]*h[2]<0&&(n[5]=n[5]?"0":"1"),o=e.calc(n[6],n[7],n[0]==="a"),n[0]==="A"&&n[6]===s&&n[7]===a||n[0]==="a"&&n[6]===0&&n[7]===0){l=[n[0]==="a"?"l":"L",o[0],o[1]];break}u.isDegenerate()?l=[n[0]==="a"?"l":"L",o[0],o[1]]:l=[n[0],u.rx,u.ry,u.ax,n[4],n[5],o[0],o[1]];break;case"m":c=i>0,o=e.calc(n[1],n[2],c),l=["m",o[0],o[1]];break;default:for(f=n[0],l=[f],c=f.toLowerCase()===f,r=1;r<n.length;r+=2)o=e.calc(n[r],n[r+1],c),l.push(o[0],o[1])}t.segments[i]=l},!0)},Mt.prototype.__evaluateStack=function(){var e,t;if(this.__stack.length){if(this.__stack.length===1){this.__matrix(this.__stack[0]),this.__stack=[];return}for(e=De(),t=this.__stack.length;--t>=0;)e.matrix(this.__stack[t].toArray());this.__matrix(e),this.__stack=[]}},Mt.prototype.toString=function(){var e="",t="",r=!1;this.__evaluateStack();for(var n=0,i=this.segments.length;n<i;n++){var s=this.segments[n],a=s[0];a!==t||a==="m"||a==="M"?(a==="m"&&t==="z"&&(e+=" "),e+=a,r=!1):r=!0;for(var o=1;o<s.length;o++){var l=s[o];o===1?r&&l>=0&&(e+=" "):l>=0&&(e+=" "),e+=l}t=a}return e},Mt.prototype.translate=function(e,t){return this.__stack.push(De().translate(e,t||0)),this},Mt.prototype.scale=function(e,t){return this.__stack.push(De().scale(e,!t&&t!==0?e:t)),this},Mt.prototype.rotate=function(e,t,r){return this.__stack.push(De().rotate(e,t||0,r||0)),this},Mt.prototype.skewX=function(e){return this.__stack.push(De().skewX(e)),this},Mt.prototype.skewY=function(e){return this.__stack.push(De().skewY(e)),this},Mt.prototype.matrix=function(e){return this.__stack.push(De().matrix(e)),this},Mt.prototype.transform=function(e){return e.trim()?(this.__stack.push(Ng(e)),this):this},Mt.prototype.round=function(e){var t=0,r=0,n=0,i=0,s;return e=e||0,this.__evaluateStack(),this.segments.forEach(function(a){var o=a[0].toLowerCase()===a[0];switch(a[0]){case"H":case"h":o&&(a[1]+=n),n=a[1]-a[1].toFixed(e),a[1]=+a[1].toFixed(e);return;case"V":case"v":o&&(a[1]+=i),i=a[1]-a[1].toFixed(e),a[1]=+a[1].toFixed(e);return;case"Z":case"z":n=t,i=r;return;case"M":case"m":o&&(a[1]+=n,a[2]+=i),n=a[1]-a[1].toFixed(e),i=a[2]-a[2].toFixed(e),t=n,r=i,a[1]=+a[1].toFixed(e),a[2]=+a[2].toFixed(e);return;case"A":case"a":o&&(a[6]+=n,a[7]+=i),n=a[6]-a[6].toFixed(e),i=a[7]-a[7].toFixed(e),a[1]=+a[1].toFixed(e),a[2]=+a[2].toFixed(e),a[3]=+a[3].toFixed(e+2),a[6]=+a[6].toFixed(e),a[7]=+a[7].toFixed(e);return;default:s=a.length,o&&(a[s-2]+=n,a[s-1]+=i),n=a[s-2]-a[s-2].toFixed(e),i=a[s-1]-a[s-1].toFixed(e),a.forEach(function(l,f){f&&(a[f]=+a[f].toFixed(e))});return}}),this},Mt.prototype.iterate=function(e,t){var r=this.segments,n={},i=!1,s=0,a=0,o=0,l=0,f,c,h;if(t||this.__evaluateStack(),r.forEach(function(u,d){var p=e(u,d,s,a);Array.isArray(p)&&(n[d]=p,i=!0);var v=u[0]===u[0].toLowerCase();switch(u[0]){case"m":case"M":s=u[1]+(v?s:0),a=u[2]+(v?a:0),o=s,l=a;return;case"h":case"H":s=u[1]+(v?s:0);return;case"v":case"V":a=u[1]+(v?a:0);return;case"z":case"Z":s=o,a=l;return;default:s=u[u.length-2]+(v?s:0),a=u[u.length-1]+(v?a:0)}}),!i)return this;for(h=[],f=0;f<r.length;f++)if(typeof n[f]<"u")for(c=0;c<n[f].length;c++)h.push(n[f][c]);else h.push(r[f]);return this.segments=h,this},Mt.prototype.abs=function(){return this.iterate(function(e,t,r,n){var i=e[0],s=i.toUpperCase(),a;if(i!==s)switch(e[0]=s,i){case"v":e[1]+=n;return;case"a":e[6]+=r,e[7]+=n;return;default:for(a=1;a<e.length;a++)e[a]+=a%2?r:n}},!0),this},Mt.prototype.rel=function(){return this.iterate(function(e,t,r,n){var i=e[0],s=i.toLowerCase(),a;if(i!==s&&!(t===0&&i==="M"))switch(e[0]=s,i){case"V":e[1]-=n;return;case"A":e[6]-=r,e[7]-=n;return;default:for(a=1;a<e.length;a++)e[a]-=a%2?r:n}},!0),this},Mt.prototype.unarc=function(){return this.iterate(function(e,t,r,n){var i,s,a,o=[],l=e[0];return l!=="A"&&l!=="a"?null:(l==="a"?(s=r+e[6],a=n+e[7]):(s=e[6],a=e[7]),i=Cg(r,n,s,a,e[4],e[5],e[1],e[2],e[3]),i.length===0?[[e[0]==="a"?"l":"L",e[6],e[7]]]:(i.forEach(function(f){o.push(["C",f[2],f[3],f[4],f[5],f[6],f[7]])}),o))}),this},Mt.prototype.unshort=function(){var e=this.segments,t,r,n,i,s;return this.iterate(function(a,o,l,f){var c=a[0],h=c.toUpperCase(),u;o&&(h==="T"?(u=c==="t",n=e[o-1],n[0]==="Q"?(t=n[1]-l,r=n[2]-f):n[0]==="q"?(t=n[1]-n[3],r=n[2]-n[4]):(t=0,r=0),i=-t,s=-r,u||(i+=l,s+=f),e[o]=[u?"q":"Q",i,s,a[1],a[2]]):h==="S"&&(u=c==="s",n=e[o-1],n[0]==="C"?(t=n[3]-l,r=n[4]-f):n[0]==="c"?(t=n[3]-n[5],r=n[4]-n[6]):(t=0,r=0),i=-t,s=-r,u||(i+=l,s+=f),e[o]=[u?"c":"C",i,s,a[1],a[2],a[3],a[4]]))}),this};var kg=Mt,Mg=kg;const Lg=sr(Mg),Fg=e=>{const[t,r]=st.useState(null),n=Q.useRef(null),i=Q.useRef(null),s=Q.useRef(null),{path:a,transformation:{x:o,y:l,width:f,height:c,anchor:h,hexColor:u,fill:d,stroke:p="none",strokeWidth:v=0},pointerdown:g,pointerup:m}=e,b=yt.useApp();return st.useEffect(()=>{const _=Lg(a).scale(5).translate(0,0).toString(),y=`<svg xmlns="http://www.w3.org/2000/svg" width="${f}" height="${c}">
548
- <path stroke="${p}" stroke-width="${v}" fill="${u||d}" d="${_}">
547
+ */(function(e,t){(function(r,n){e.exports=n()})(km,function(){return function(n){for(var i={command:/\s*([achlmqstvz])/gi,number:/\s*([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/gi,comma:/\s*(?:(,)|\s)/g,flag:/\s*([01])/g},s={number:function(v){return+d("number",v)},"coordinate pair":function(v){var g=d("number",v);if(g===null&&!v)return null;d("comma");var m=d("number",!0);return{x:+g,y:+m}},"arc definition":function(v){var g=s["coordinate pair"](v);if(!g&&!v)return null;d("comma");var m=+d("number",!0);d("comma",!0);var b=!!+d("flag",!0);d("comma");var _=!!+d("flag",!0);d("comma");var y=s["coordinate pair"](!0);return{radii:g,rotation:m,large:b,clockwise:_,end:y}}},a=0,o=[];a<n.length;){var l=d("command"),f=l.toUpperCase(),c=l!==f,h;switch(f){case"M":h=p("coordinate pair").map(function(v,g){return g===1&&(l=c?"l":"L"),u({end:v})});break;case"L":case"T":h=p("coordinate pair").map(function(v){return u({end:v})});break;case"C":if(h=p("coordinate pair"),h.length%3)throw Error("Expected coordinate pair triplet at position "+a);h=h.reduce(function(v,g,m){var b=m%3;if(!b)v.push(u({cp1:g}));else{var _=v[v.length-1];_[b===1?"cp2":"end"]=g}return v},[]);break;case"Q":case"S":if(h=p("coordinate pair"),h.length&1)throw Error("Expected coordinate pair couple at position "+a);h=h.reduce(function(v,g,m){var b=m&1;if(!b)v.push(u({cp:g}));else{var _=v[v.length-1];_.end=g}return v},[]);break;case"H":case"V":h=p("number").map(function(v){return u({value:v})});break;case"A":h=p("arc definition").map(u);break;case"Z":h=[{code:"Z"}];break}o.push.apply(o,h)}return o;function u(v){return v.code=l,v.relative=c,v}function d(v,g){i[v].lastIndex=a;var m=i[v].exec(n);if(!m||m.index!==a){if(!g)return null;throw Error("Expected "+v+" at position "+a)}return a=i[v].lastIndex,m[1]}function p(v){for(var g=[],m,b=!0;m=s[v](b);)g.push(m),b=!!d("comma");return g}}})})(Mm);const Lm=/^\s+/,Fm=/\s+$/;function it(e,t){if(e=e||"",t=t||{},e instanceof it)return e;if(!(this instanceof it))return new it(e,t);var r=Bm(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}it.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),t,r,n,i,s,a;return t=e.r/255,r=e.g/255,n=e.b/255,t<=.03928?i=t/12.92:i=Math.pow((t+.055)/1.055,2.4),r<=.03928?s=r/12.92:s=Math.pow((r+.055)/1.055,2.4),n<=.03928?a=n/12.92:a=Math.pow((n+.055)/1.055,2.4),.2126*i+.7152*s+.0722*a},setAlpha:function(e){return this._a=yu(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=hu(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=hu(this._r,this._g,this._b),t=Math.round(e.h*360),r=Math.round(e.s*100),n=Math.round(e.v*100);return this._a==1?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=cu(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=cu(this._r,this._g,this._b),t=Math.round(e.h*360),r=Math.round(e.s*100),n=Math.round(e.l*100);return this._a==1?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return du(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return jm(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(Nt(this._r,255)*100)+"%",g:Math.round(Nt(this._g,255)*100)+"%",b:Math.round(Nt(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Nt(this._r,255)*100)+"%, "+Math.round(Nt(this._g,255)*100)+"%, "+Math.round(Nt(this._b,255)*100)+"%)":"rgba("+Math.round(Nt(this._r,255)*100)+"%, "+Math.round(Nt(this._g,255)*100)+"%, "+Math.round(Nt(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Jm[du(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var t="#"+pu(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var i=it(e);r="#"+pu(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0,i=!t&&n&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return i?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return it(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(Vm,arguments)},brighten:function(){return this._applyModification(zm,arguments)},darken:function(){return this._applyModification(Xm,arguments)},desaturate:function(){return this._applyModification(Gm,arguments)},saturate:function(){return this._applyModification(qm,arguments)},greyscale:function(){return this._applyModification(Hm,arguments)},spin:function(){return this._applyModification(Wm,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(Zm,arguments)},complement:function(){return this._applyCombination(Ym,arguments)},monochromatic:function(){return this._applyCombination(Qm,arguments)},splitcomplement:function(){return this._applyCombination(Km,arguments)},triad:function(){return this._applyCombination(vu,[3])},tetrad:function(){return this._applyCombination(vu,[4])}},it.fromRatio=function(e,t){if(typeof e=="object"){var r={};for(var n in e)e.hasOwnProperty(n)&&(n==="a"?r[n]=e[n]:r[n]=ln(e[n]));e=r}return it(e,t)};function Bm(e){var t={r:0,g:0,b:0},r=1,n=null,i=null,s=null,a=!1,o=!1;return typeof e=="string"&&(e=ng(e)),typeof e=="object"&&(Re(e.r)&&Re(e.g)&&Re(e.b)?(t=Um(e.r,e.g,e.b),a=!0,o=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Re(e.h)&&Re(e.s)&&Re(e.v)?(n=ln(e.s),i=ln(e.v),t=$m(e.h,n,i),a=!0,o="hsv"):Re(e.h)&&Re(e.s)&&Re(e.l)&&(n=ln(e.s),s=ln(e.l),t=Dm(e.h,n,s),a=!0,o="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=yu(r),{ok:a,format:e.format||o,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}function Um(e,t,r){return{r:Nt(e,255)*255,g:Nt(t,255)*255,b:Nt(r,255)*255}}function cu(e,t,r){e=Nt(e,255),t=Nt(t,255),r=Nt(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),s,a,o=(n+i)/2;if(n==i)s=a=0;else{var l=n-i;switch(a=o>.5?l/(2-n-i):l/(n+i),n){case e:s=(t-r)/l+(t<r?6:0);break;case t:s=(r-e)/l+2;break;case r:s=(e-t)/l+4;break}s/=6}return{h:s,s:a,l:o}}function Dm(e,t,r){var n,i,s;e=Nt(e,360),t=Nt(t,100),r=Nt(r,100);function a(f,c,h){return h<0&&(h+=1),h>1&&(h-=1),h<1/6?f+(c-f)*6*h:h<1/2?c:h<2/3?f+(c-f)*(2/3-h)*6:f}if(t===0)n=i=s=r;else{var o=r<.5?r*(1+t):r+t-r*t,l=2*r-o;n=a(l,o,e+1/3),i=a(l,o,e),s=a(l,o,e-1/3)}return{r:n*255,g:i*255,b:s*255}}function hu(e,t,r){e=Nt(e,255),t=Nt(t,255),r=Nt(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),s,a,o=n,l=n-i;if(a=n===0?0:l/n,n==i)s=0;else{switch(n){case e:s=(t-r)/l+(t<r?6:0);break;case t:s=(r-e)/l+2;break;case r:s=(e-t)/l+4;break}s/=6}return{h:s,s:a,v:o}}function $m(e,t,r){e=Nt(e,360)*6,t=Nt(t,100),r=Nt(r,100);var n=Math.floor(e),i=e-n,s=r*(1-t),a=r*(1-i*t),o=r*(1-(1-i)*t),l=n%6,f=[r,a,s,s,o,r][l],c=[o,r,r,a,s,s][l],h=[s,s,o,r,r,a][l];return{r:f*255,g:c*255,b:h*255}}function du(e,t,r,n){var i=[fe(Math.round(e).toString(16)),fe(Math.round(t).toString(16)),fe(Math.round(r).toString(16))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function jm(e,t,r,n,i){var s=[fe(Math.round(e).toString(16)),fe(Math.round(t).toString(16)),fe(Math.round(r).toString(16)),fe(mu(n))];return i&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)&&s[3].charAt(0)==s[3].charAt(1)?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function pu(e,t,r,n){var i=[fe(mu(n)),fe(Math.round(e).toString(16)),fe(Math.round(t).toString(16)),fe(Math.round(r).toString(16))];return i.join("")}it.equals=function(e,t){return!e||!t?!1:it(e).toRgbString()==it(t).toRgbString()},it.random=function(){return it.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function Gm(e,t){t=t===0?0:t||10;var r=it(e).toHsl();return r.s-=t/100,r.s=hi(r.s),it(r)}function qm(e,t){t=t===0?0:t||10;var r=it(e).toHsl();return r.s+=t/100,r.s=hi(r.s),it(r)}function Hm(e){return it(e).desaturate(100)}function Vm(e,t){t=t===0?0:t||10;var r=it(e).toHsl();return r.l+=t/100,r.l=hi(r.l),it(r)}function zm(e,t){t=t===0?0:t||10;var r=it(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),it(r)}function Xm(e,t){t=t===0?0:t||10;var r=it(e).toHsl();return r.l-=t/100,r.l=hi(r.l),it(r)}function Wm(e,t){var r=it(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,it(r)}function Ym(e){var t=it(e).toHsl();return t.h=(t.h+180)%360,it(t)}function vu(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var r=it(e).toHsl(),n=[it(e)],i=360/t,s=1;s<t;s++)n.push(it({h:(r.h+s*i)%360,s:r.s,l:r.l}));return n}function Km(e){var t=it(e).toHsl(),r=t.h;return[it(e),it({h:(r+72)%360,s:t.s,l:t.l}),it({h:(r+216)%360,s:t.s,l:t.l})]}function Zm(e,t,r){t=t||6,r=r||30;var n=it(e).toHsl(),i=360/r,s=[it(e)];for(n.h=(n.h-(i*t>>1)+720)%360;--t;)n.h=(n.h+i)%360,s.push(it(n));return s}function Qm(e,t){t=t||6;for(var r=it(e).toHsv(),n=r.h,i=r.s,s=r.v,a=[],o=1/t;t--;)a.push(it({h:n,s:i,v:s})),s=(s+o)%1;return a}it.mix=function(e,t,r){r=r===0?0:r||50;var n=it(e).toRgb(),i=it(t).toRgb(),s=r/100,a={r:(i.r-n.r)*s+n.r,g:(i.g-n.g)*s+n.g,b:(i.b-n.b)*s+n.b,a:(i.a-n.a)*s+n.a};return it(a)},it.readability=function(e,t){var r=it(e),n=it(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},it.isReadable=function(e,t,r){var n=it.readability(e,t),i,s;switch(s=!1,i=ig(r),i.level+i.size){case"AAsmall":case"AAAlarge":s=n>=4.5;break;case"AAlarge":s=n>=3;break;case"AAAsmall":s=n>=7;break}return s},it.mostReadable=function(e,t,r){var n=null,i=0,s,a,o,l;r=r||{},a=r.includeFallbackColors,o=r.level,l=r.size;for(var f=0;f<t.length;f++)s=it.readability(e,t[f]),s>i&&(i=s,n=it(t[f]));return it.isReadable(e,n,{level:o,size:l})||!a?n:(r.includeFallbackColors=!1,it.mostReadable(e,["#fff","#000"],r))};var ca=it.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Jm=it.hexNames=tg(ca);function tg(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function yu(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Nt(e,t){eg(e)&&(e="100%");var r=rg(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function hi(e){return Math.min(1,Math.max(0,e))}function Zt(e){return parseInt(e,16)}function eg(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function rg(e){return typeof e=="string"&&e.indexOf("%")!=-1}function fe(e){return e.length==1?"0"+e:""+e}function ln(e){return e<=1&&(e=e*100+"%"),e}function mu(e){return Math.round(parseFloat(e)*255).toString(16)}function gu(e){return Zt(e)/255}var ce=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",r="(?:"+t+")|(?:"+e+")",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",i="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Re(e){return!!ce.CSS_UNIT.exec(e)}function ng(e){e=e.replace(Lm,"").replace(Fm,"").toLowerCase();var t=!1;if(ca[e])e=ca[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=ce.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=ce.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=ce.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=ce.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=ce.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=ce.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=ce.hex8.exec(e))?{r:Zt(r[1]),g:Zt(r[2]),b:Zt(r[3]),a:gu(r[4]),format:t?"name":"hex8"}:(r=ce.hex6.exec(e))?{r:Zt(r[1]),g:Zt(r[2]),b:Zt(r[3]),format:t?"name":"hex"}:(r=ce.hex4.exec(e))?{r:Zt(r[1]+""+r[1]),g:Zt(r[2]+""+r[2]),b:Zt(r[3]+""+r[3]),a:gu(r[4]+""+r[4]),format:t?"name":"hex8"}:(r=ce.hex3.exec(e))?{r:Zt(r[1]+""+r[1]),g:Zt(r[2]+""+r[2]),b:Zt(r[3]+""+r[3]),format:t?"name":"hex"}:!1}function ig(e){var t,r;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:t,size:r}}var sg=function(){function e(t,r){var n=[],i=!0,s=!1,a=void 0;try{for(var o=t[Symbol.iterator](),l;!(i=(l=o.next()).done)&&(n.push(l.value),!(r&&n.length===r));i=!0);}catch(f){s=!0,a=f}finally{try{!i&&o.return&&o.return()}finally{if(s)throw a}}return n}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),un=Math.PI*2,ha=function(t,r,n,i,s,a,o){var l=t.x,f=t.y;l*=r,f*=n;var c=i*l-s*f,h=s*l+i*f;return{x:c+a,y:h+o}},ag=function(t,r){var n=r===1.5707963267948966?.551915024494:r===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(r/4),i=Math.cos(t),s=Math.sin(t),a=Math.cos(t+r),o=Math.sin(t+r);return[{x:i-s*n,y:s+i*n},{x:a+o*n,y:o-a*n},{x:a,y:o}]},bu=function(t,r,n,i){var s=t*i-r*n<0?-1:1,a=t*n+r*i;return a>1&&(a=1),a<-1&&(a=-1),s*Math.acos(a)},og=function(t,r,n,i,s,a,o,l,f,c,h,u){var d=Math.pow(s,2),p=Math.pow(a,2),v=Math.pow(h,2),g=Math.pow(u,2),m=d*p-d*g-p*v;m<0&&(m=0),m/=d*g+p*v,m=Math.sqrt(m)*(o===l?-1:1);var b=m*s/a*u,_=m*-a/s*h,y=c*b-f*_+(t+n)/2,x=f*b+c*_+(r+i)/2,O=(h-b)/s,T=(u-_)/a,E=(-h-b)/s,N=(-u-_)/a,A=bu(1,0,O,T),w=bu(O,T,E,N);return l===0&&w>0&&(w-=un),l===1&&w<0&&(w+=un),[y,x,A,w]},_u=function(t){var r=t.px,n=t.py,i=t.cx,s=t.cy,a=t.rx,o=t.ry,l=t.xAxisRotation,f=l===void 0?0:l,c=t.largeArcFlag,h=c===void 0?0:c,u=t.sweepFlag,d=u===void 0?0:u,p=[];if(a===0||o===0)return[];var v=Math.sin(f*un/360),g=Math.cos(f*un/360),m=g*(r-i)/2+v*(n-s)/2,b=-v*(r-i)/2+g*(n-s)/2;if(m===0&&b===0)return[];a=Math.abs(a),o=Math.abs(o);var _=Math.pow(m,2)/Math.pow(a,2)+Math.pow(b,2)/Math.pow(o,2);_>1&&(a*=Math.sqrt(_),o*=Math.sqrt(_));var y=og(r,n,i,s,a,o,h,d,v,g,m,b),x=sg(y,4),O=x[0],T=x[1],E=x[2],N=x[3],A=Math.abs(N)/(un/4);Math.abs(1-A)<1e-7&&(A=1);var w=Math.max(Math.ceil(A),1);N/=w;for(var S=0;S<w;S++)p.push(ag(E,N)),E+=N;return p.map(function(I){var C=ha(I[0],a,o,g,v,O,T),F=C.x,$=C.y,U=ha(I[1],a,o,g,v,O,T),X=U.x,D=U.y,P=ha(I[2],a,o,g,v,O,T),R=P.x,k=P.y;return{x1:F,y1:$,x2:X,y2:D,x:R,y:k}})};class lg extends ua{constructor(t){super(),this.lineColor=null,t&&this.drawSVG(t)}drawSVG(t){if(typeof t=="string"){const r=document.createElement("div");r.innerHTML=t.trim(),t=r.querySelector("svg")}if(!t)throw new Error("Missing <svg> element in SVG constructor");return this._svgFill(t),this._svgChildren(t.children),this}_svgChildren(t,r=!1){for(let n=0;n<t.length;n++){const i=t[n];switch(this._svgFill(i,r),i.nodeName.toLowerCase()){case"path":{this._svgPath(i);break}case"circle":case"ellipse":{this._svgCircle(i);break}case"rect":{this._svgRect(i);break}case"polygon":{this._svgPoly(i,!0);break}case"polyline":{this._svgPoly(i);break}case"g":break;default:{console.info(`[PIXI.SVG] <${i.nodeName}> elements unsupported`);break}}this._svgChildren(i.children,!0)}}_hexToUint(t){if(t[0]==="#")return t=t.substr(1),t.length===3&&(t=t.replace(/([a-f0-9])/ig,"$1$1")),parseInt(t,16);const{r,g:n,b:i}=it(t).toRgb();return(r<<16)+(n<<8)+i}_svgCircle(t){let r="r",n="r";const i=t.nodeName==="elipse";i&&(r+="x",n+="y");const s=parseFloat(t.getAttribute(n)),a=parseFloat(t.getAttribute(r)),o=t.getAttribute("cx"),l=t.getAttribute("cy");let f=0,c=0;o!==null&&(f=parseFloat(o)),l!==null&&(c=parseFloat(l)),i?this.drawEllipse(f,c,s,a):this.drawCircle(f,c,s)}_svgRect(t){const r=parseFloat(t.getAttribute("x")),n=parseFloat(t.getAttribute("y")),i=parseFloat(t.getAttribute("width")),s=parseFloat(t.getAttribute("height")),a=parseFloat(t.getAttribute("rx"));a?this.drawRoundedRect(r,n,i,s,a):this.drawRect(r,n,i,s)}_convertStyleName(t){return t.trim().replace("-width","Width").replace(/.*-(line)?/,"")}_svgStyle(t){const r=t.getAttribute("style"),n=t.getAttribute("opacity"),i={fill:t.getAttribute("fill"),opacity:n||t.getAttribute("fill-opacity"),stroke:t.getAttribute("stroke"),strokeOpacity:n||t.getAttribute("stroke-opacity"),strokeWidth:t.getAttribute("stroke-width"),cap:t.getAttribute("stroke-linecap"),join:t.getAttribute("stroke-linejoin"),miterLimit:t.getAttribute("stroke-miterlimit")};return r!==null&&r.split(";").forEach(s=>{const[a,o]=s.split(":");if(a){const l=this._convertStyleName(a);i[l]||(i[l]=o.trim())}}),i}_svgPoly(t,r){const n=t.getAttribute("points").split(/[ ,]/g).map(i=>parseInt(i,10));this.drawPolygon(n),r&&this.closePath()}_svgFill(t,r){const{fill:n,opacity:i,stroke:s,strokeOpacity:a,strokeWidth:o,cap:l,join:f,miterLimit:c}=this._svgStyle(t),u=o!==null?parseFloat(o):s!==null?1:0,d=s!==null?this._hexToUint(s):this.lineColor;n?n==="none"?this.beginFill(0,0):this.beginFill(this._hexToUint(n),i!==null?parseFloat(i):1):r||this.beginFill(0),this.lineStyle({width:s===null&&o===null&&r?this.line.width:u,alpha:a===null?this.line.alpha:parseFloat(a),color:s===null&&r?this.line.color:d,cap:l===null&&r?this.line.cap:l,join:f===null&&r?this.line.join:f,miterLimit:c===null&&r?this.line.miterLimit:parseFloat(c)}),t.getAttribute("fill-rule")&&console.info('[PIXI.SVG] "fill-rule" attribute is not supported')}_svgPath(t){const r=t.getAttribute("d");let n=0,i=0;const s=fa(r.trim());for(let a=0;a<s.length;a++){const o=s[a];switch(o.code){case"m":{this.moveTo(n+=o.end.x,i+=o.end.y);break}case"M":{this.moveTo(n=o.end.x,i=o.end.y);break}case"H":{this.lineTo(n=o.value,i);break}case"h":{this.lineTo(n+=o.value,i);break}case"V":{this.lineTo(n,i=o.value);break}case"v":{this.lineTo(n,i+=o.value);break}case"Z":{this.closePath();break}case"L":{this.lineTo(n=o.end.x,i=o.end.y);break}case"l":{this.lineTo(n+=o.end.x,i+=o.end.y);break}case"C":{this.bezierCurveTo(o.cp1.x,o.cp1.y,o.cp2.x,o.cp2.y,n=o.end.x,i=o.end.y);break}case"c":{const l=n,f=i;this.bezierCurveTo(l+o.cp1.x,f+o.cp1.y,l+o.cp2.x,f+o.cp2.y,n+=o.end.x,i+=o.end.y);break}case"s":case"q":{const l=n,f=i;this.quadraticCurveTo(l+o.cp.x,f+o.cp.y,n+=o.end.x,i+=o.end.y);break}case"S":case"Q":{this.quadraticCurveTo(o.cp.x,o.cp.y,n=o.end.x,i=o.end.y);break}case"a":{_u({px:n,py:i,cx:n+=o.end.x,cy:i+=o.end.y,rx:o.radii.x,ry:o.radii.y,xAxisRotation:o.rotation,largeArcFlag:o.large?1:0,sweepFlag:o.clockwise?1:0}).forEach(({x1:l,y1:f,x2:c,y2:h,x:u,y:d})=>this.bezierCurveTo(l,f,c,h,u,d));break}case"A":{_u({px:n,py:i,cx:n=o.end.x,cy:i=o.end.y,rx:o.radii.x,ry:o.radii.y,xAxisRotation:o.rotation,largeArcFlag:o.large?1:0,sweepFlag:o.clockwise?1:0}).forEach(({x1:l,y1:f,x2:c,y2:h,x:u,y:d})=>this.bezierCurveTo(l,f,c,h,u,d));break}default:{console.info("[PIXI.SVG] Draw command not supported:",o.code,o);break}}}}}var di={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},ug=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function fg(e){return e===10||e===13||e===8232||e===8233||e===32||e===9||e===11||e===12||e===160||e>=5760&&ug.indexOf(e)>=0}function cg(e){switch(e|32){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:case 114:return!0}return!1}function hg(e){return(e|32)===97}function Mr(e){return e>=48&&e<=57}function dg(e){return e>=48&&e<=57||e===43||e===45||e===46}function pg(e){this.index=0,this.path=e,this.max=e.length,this.result=[],this.param=0,this.err="",this.segmentStart=0,this.data=[]}function pi(e){for(;e.index<e.max&&fg(e.path.charCodeAt(e.index));)e.index++}function vg(e){var t=e.path.charCodeAt(e.index);if(t===48){e.param=0,e.index++;return}if(t===49){e.param=1,e.index++;return}e.err="SvgPath: arc flag can be 0 or 1 only (at pos "+e.index+")"}function yg(e){var t=e.index,r=t,n=e.max,i=!1,s=!1,a=!1,o=!1,l;if(r>=n){e.err="SvgPath: missed param (at pos "+r+")";return}if(l=e.path.charCodeAt(r),(l===43||l===45)&&(r++,l=r<n?e.path.charCodeAt(r):0),!Mr(l)&&l!==46){e.err="SvgPath: param should start with 0..9 or `.` (at pos "+r+")";return}if(l!==46){if(i=l===48,r++,l=r<n?e.path.charCodeAt(r):0,i&&r<n&&l&&Mr(l)){e.err="SvgPath: numbers started with `0` such as `09` are illegal (at pos "+t+")";return}for(;r<n&&Mr(e.path.charCodeAt(r));)r++,s=!0;l=r<n?e.path.charCodeAt(r):0}if(l===46){for(o=!0,r++;Mr(e.path.charCodeAt(r));)r++,a=!0;l=r<n?e.path.charCodeAt(r):0}if(l===101||l===69){if(o&&!s&&!a){e.err="SvgPath: invalid float exponent (at pos "+r+")";return}if(r++,l=r<n?e.path.charCodeAt(r):0,(l===43||l===45)&&r++,r<n&&Mr(e.path.charCodeAt(r)))for(;r<n&&Mr(e.path.charCodeAt(r));)r++;else{e.err="SvgPath: invalid float exponent (at pos "+r+")";return}}e.index=r,e.param=parseFloat(e.path.slice(t,r))+0}function da(e){var t,r;t=e.path[e.segmentStart],r=t.toLowerCase();var n=e.data;if(r==="m"&&n.length>2&&(e.result.push([t,n[0],n[1]]),n=n.slice(2),r="l",t=t==="m"?"l":"L"),r==="r")e.result.push([t].concat(n));else for(;n.length>=di[r]&&(e.result.push([t].concat(n.splice(0,di[r]))),!!di[r]););}function mg(e){var t=e.max,r,n,i,s,a;if(e.segmentStart=e.index,r=e.path.charCodeAt(e.index),n=hg(r),!cg(r)){e.err="SvgPath: bad command "+e.path[e.index]+" (at pos "+e.index+")";return}if(s=di[e.path[e.index].toLowerCase()],e.index++,pi(e),e.data=[],!s){da(e);return}for(i=!1;;){for(a=s;a>0;a--){if(n&&(a===3||a===4)?vg(e):yg(e),e.err.length){da(e);return}e.data.push(e.param),pi(e),i=!1,e.index<t&&e.path.charCodeAt(e.index)===44&&(e.index++,pi(e),i=!0)}if(!i&&(e.index>=e.max||!dg(e.path.charCodeAt(e.index))))break}da(e)}var gg=function(t){var r=new pg(t),n=r.max;for(pi(r);r.index<n&&!r.err.length;)mg(r);return r.result.length&&("mM".indexOf(r.result[0][0])<0?(r.err="SvgPath: string should start with `M` or `m`",r.result=[]):r.result[0][0]="M"),{err:r.err,segments:r.result}};function bg(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}function he(){if(!(this instanceof he))return new he;this.queue=[],this.cache=null}he.prototype.matrix=function(e){return e[0]===1&&e[1]===0&&e[2]===0&&e[3]===1&&e[4]===0&&e[5]===0?this:(this.cache=null,this.queue.push(e),this)},he.prototype.translate=function(e,t){return(e!==0||t!==0)&&(this.cache=null,this.queue.push([1,0,0,1,e,t])),this},he.prototype.scale=function(e,t){return(e!==1||t!==1)&&(this.cache=null,this.queue.push([e,0,0,t,0,0])),this},he.prototype.rotate=function(e,t,r){var n,i,s;return e!==0&&(this.translate(t,r),n=e*Math.PI/180,i=Math.cos(n),s=Math.sin(n),this.queue.push([i,s,-s,i,0,0]),this.cache=null,this.translate(-t,-r)),this},he.prototype.skewX=function(e){return e!==0&&(this.cache=null,this.queue.push([1,0,Math.tan(e*Math.PI/180),1,0,0])),this},he.prototype.skewY=function(e){return e!==0&&(this.cache=null,this.queue.push([1,Math.tan(e*Math.PI/180),0,1,0,0])),this},he.prototype.toArray=function(){if(this.cache)return this.cache;if(!this.queue.length)return this.cache=[1,0,0,1,0,0],this.cache;if(this.cache=this.queue[0],this.queue.length===1)return this.cache;for(var e=1;e<this.queue.length;e++)this.cache=bg(this.cache,this.queue[e]);return this.cache},he.prototype.calc=function(e,t,r){var n;return this.queue.length?(this.cache||(this.cache=this.toArray()),n=this.cache,[e*n[0]+t*n[2]+(r?0:n[4]),e*n[1]+t*n[3]+(r?0:n[5])]):[e,t]};var xu=he,_g=xu,xg={matrix:!0,scale:!0,rotate:!0,translate:!0,skewX:!0,skewY:!0},Eg=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,Tg=/[\s,]+/,wg=function(t){var r=new _g,n,i;return t.split(Eg).forEach(function(s){if(s.length){if(typeof xg[s]<"u"){n=s;return}switch(i=s.split(Tg).map(function(a){return+a||0}),n){case"matrix":i.length===6&&r.matrix(i);return;case"scale":i.length===1?r.scale(i[0],i[0]):i.length===2&&r.scale(i[0],i[1]);return;case"rotate":i.length===1?r.rotate(i[0],0,0):i.length===3&&r.rotate(i[0],i[1],i[2]);return;case"translate":i.length===1?r.translate(i[0],0):i.length===2&&r.translate(i[0],i[1]);return;case"skewX":i.length===1&&r.skewX(i[0]);return;case"skewY":i.length===1&&r.skewY(i[0]);return}}}),r},fn=Math.PI*2;function Eu(e,t,r,n){var i=e*n-t*r<0?-1:1,s=e*r+t*n;return s>1&&(s=1),s<-1&&(s=-1),i*Math.acos(s)}function Ag(e,t,r,n,i,s,a,o,l,f){var c=f*(e-r)/2+l*(t-n)/2,h=-l*(e-r)/2+f*(t-n)/2,u=a*a,d=o*o,p=c*c,v=h*h,g=u*d-u*v-d*p;g<0&&(g=0),g/=u*v+d*p,g=Math.sqrt(g)*(i===s?-1:1);var m=g*a/o*h,b=g*-o/a*c,_=f*m-l*b+(e+r)/2,y=l*m+f*b+(t+n)/2,x=(c-m)/a,O=(h-b)/o,T=(-c-m)/a,E=(-h-b)/o,N=Eu(1,0,x,O),A=Eu(x,O,T,E);return s===0&&A>0&&(A-=fn),s===1&&A<0&&(A+=fn),[_,y,N,A]}function Sg(e,t){var r=1.3333333333333333*Math.tan(t/4),n=Math.cos(e),i=Math.sin(e),s=Math.cos(e+t),a=Math.sin(e+t);return[n,i,n-i*r,i+n*r,s+a*r,a-s*r,s,a]}var Og=function(t,r,n,i,s,a,o,l,f){var c=Math.sin(f*fn/360),h=Math.cos(f*fn/360),u=h*(t-n)/2+c*(r-i)/2,d=-c*(t-n)/2+h*(r-i)/2;if(u===0&&d===0)return[];if(o===0||l===0)return[];o=Math.abs(o),l=Math.abs(l);var p=u*u/(o*o)+d*d/(l*l);p>1&&(o*=Math.sqrt(p),l*=Math.sqrt(p));var v=Ag(t,r,n,i,s,a,o,l,c,h),g=[],m=v[2],b=v[3],_=Math.max(Math.ceil(Math.abs(b)/(fn/4)),1);b/=_;for(var y=0;y<_;y++)g.push(Sg(m,b)),m+=b;return g.map(function(x){for(var O=0;O<x.length;O+=2){var T=x[O+0],E=x[O+1];T*=o,E*=l;var N=h*T-c*E,A=c*T+h*E;x[O+0]=N+v[0],x[O+1]=A+v[1]}return x})},cn=1e-10,Tu=Math.PI/180;function hn(e,t,r){if(!(this instanceof hn))return new hn(e,t,r);this.rx=e,this.ry=t,this.ax=r}hn.prototype.transform=function(e){var t=Math.cos(this.ax*Tu),r=Math.sin(this.ax*Tu),n=[this.rx*(e[0]*t+e[2]*r),this.rx*(e[1]*t+e[3]*r),this.ry*(-e[0]*r+e[2]*t),this.ry*(-e[1]*r+e[3]*t)],i=n[0]*n[0]+n[2]*n[2],s=n[1]*n[1]+n[3]*n[3],a=((n[0]-n[3])*(n[0]-n[3])+(n[2]+n[1])*(n[2]+n[1]))*((n[0]+n[3])*(n[0]+n[3])+(n[2]-n[1])*(n[2]-n[1])),o=(i+s)/2;if(a<cn*o)return this.rx=this.ry=Math.sqrt(o),this.ax=0,this;var l=n[0]*n[1]+n[2]*n[3];a=Math.sqrt(a);var f=o+a/2,c=o-a/2;return this.ax=Math.abs(l)<cn&&Math.abs(f-s)<cn?90:Math.atan(Math.abs(l)>Math.abs(f-s)?(f-i)/l:l/(f-s))*180/Math.PI,this.ax>=0?(this.rx=Math.sqrt(f),this.ry=Math.sqrt(c)):(this.ax+=90,this.rx=Math.sqrt(c),this.ry=Math.sqrt(f)),this},hn.prototype.isDegenerate=function(){return this.rx<cn*this.ry||this.ry<cn*this.rx};var Ig=hn,Rg=gg,Ng=wg,De=xu,Cg=Og,Pg=Ig;function Mt(e){if(!(this instanceof Mt))return new Mt(e);var t=Rg(e);this.segments=t.segments,this.err=t.err,this.__stack=[]}Mt.from=function(e){if(typeof e=="string")return new Mt(e);if(e instanceof Mt){var t=new Mt("");return t.err=e.err,t.segments=e.segments.map(function(r){return r.slice()}),t.__stack=e.__stack.map(function(r){return De().matrix(r.toArray())}),t}throw new Error("SvgPath.from: invalid param type "+e)},Mt.prototype.__matrix=function(e){var t=this,r;e.queue.length&&this.iterate(function(n,i,s,a){var o,l,f,c;switch(n[0]){case"v":o=e.calc(0,n[1],!0),l=o[0]===0?["v",o[1]]:["l",o[0],o[1]];break;case"V":o=e.calc(s,n[1],!1),l=o[0]===e.calc(s,a,!1)[0]?["V",o[1]]:["L",o[0],o[1]];break;case"h":o=e.calc(n[1],0,!0),l=o[1]===0?["h",o[0]]:["l",o[0],o[1]];break;case"H":o=e.calc(n[1],a,!1),l=o[1]===e.calc(s,a,!1)[1]?["H",o[0]]:["L",o[0],o[1]];break;case"a":case"A":var h=e.toArray(),u=Pg(n[1],n[2],n[3]).transform(h);if(h[0]*h[3]-h[1]*h[2]<0&&(n[5]=n[5]?"0":"1"),o=e.calc(n[6],n[7],n[0]==="a"),n[0]==="A"&&n[6]===s&&n[7]===a||n[0]==="a"&&n[6]===0&&n[7]===0){l=[n[0]==="a"?"l":"L",o[0],o[1]];break}u.isDegenerate()?l=[n[0]==="a"?"l":"L",o[0],o[1]]:l=[n[0],u.rx,u.ry,u.ax,n[4],n[5],o[0],o[1]];break;case"m":c=i>0,o=e.calc(n[1],n[2],c),l=["m",o[0],o[1]];break;default:for(f=n[0],l=[f],c=f.toLowerCase()===f,r=1;r<n.length;r+=2)o=e.calc(n[r],n[r+1],c),l.push(o[0],o[1])}t.segments[i]=l},!0)},Mt.prototype.__evaluateStack=function(){var e,t;if(this.__stack.length){if(this.__stack.length===1){this.__matrix(this.__stack[0]),this.__stack=[];return}for(e=De(),t=this.__stack.length;--t>=0;)e.matrix(this.__stack[t].toArray());this.__matrix(e),this.__stack=[]}},Mt.prototype.toString=function(){var e="",t="",r=!1;this.__evaluateStack();for(var n=0,i=this.segments.length;n<i;n++){var s=this.segments[n],a=s[0];a!==t||a==="m"||a==="M"?(a==="m"&&t==="z"&&(e+=" "),e+=a,r=!1):r=!0;for(var o=1;o<s.length;o++){var l=s[o];o===1?r&&l>=0&&(e+=" "):l>=0&&(e+=" "),e+=l}t=a}return e},Mt.prototype.translate=function(e,t){return this.__stack.push(De().translate(e,t||0)),this},Mt.prototype.scale=function(e,t){return this.__stack.push(De().scale(e,!t&&t!==0?e:t)),this},Mt.prototype.rotate=function(e,t,r){return this.__stack.push(De().rotate(e,t||0,r||0)),this},Mt.prototype.skewX=function(e){return this.__stack.push(De().skewX(e)),this},Mt.prototype.skewY=function(e){return this.__stack.push(De().skewY(e)),this},Mt.prototype.matrix=function(e){return this.__stack.push(De().matrix(e)),this},Mt.prototype.transform=function(e){return e.trim()?(this.__stack.push(Ng(e)),this):this},Mt.prototype.round=function(e){var t=0,r=0,n=0,i=0,s;return e=e||0,this.__evaluateStack(),this.segments.forEach(function(a){var o=a[0].toLowerCase()===a[0];switch(a[0]){case"H":case"h":o&&(a[1]+=n),n=a[1]-a[1].toFixed(e),a[1]=+a[1].toFixed(e);return;case"V":case"v":o&&(a[1]+=i),i=a[1]-a[1].toFixed(e),a[1]=+a[1].toFixed(e);return;case"Z":case"z":n=t,i=r;return;case"M":case"m":o&&(a[1]+=n,a[2]+=i),n=a[1]-a[1].toFixed(e),i=a[2]-a[2].toFixed(e),t=n,r=i,a[1]=+a[1].toFixed(e),a[2]=+a[2].toFixed(e);return;case"A":case"a":o&&(a[6]+=n,a[7]+=i),n=a[6]-a[6].toFixed(e),i=a[7]-a[7].toFixed(e),a[1]=+a[1].toFixed(e),a[2]=+a[2].toFixed(e),a[3]=+a[3].toFixed(e+2),a[6]=+a[6].toFixed(e),a[7]=+a[7].toFixed(e);return;default:s=a.length,o&&(a[s-2]+=n,a[s-1]+=i),n=a[s-2]-a[s-2].toFixed(e),i=a[s-1]-a[s-1].toFixed(e),a.forEach(function(l,f){f&&(a[f]=+a[f].toFixed(e))});return}}),this},Mt.prototype.iterate=function(e,t){var r=this.segments,n={},i=!1,s=0,a=0,o=0,l=0,f,c,h;if(t||this.__evaluateStack(),r.forEach(function(u,d){var p=e(u,d,s,a);Array.isArray(p)&&(n[d]=p,i=!0);var v=u[0]===u[0].toLowerCase();switch(u[0]){case"m":case"M":s=u[1]+(v?s:0),a=u[2]+(v?a:0),o=s,l=a;return;case"h":case"H":s=u[1]+(v?s:0);return;case"v":case"V":a=u[1]+(v?a:0);return;case"z":case"Z":s=o,a=l;return;default:s=u[u.length-2]+(v?s:0),a=u[u.length-1]+(v?a:0)}}),!i)return this;for(h=[],f=0;f<r.length;f++)if(typeof n[f]<"u")for(c=0;c<n[f].length;c++)h.push(n[f][c]);else h.push(r[f]);return this.segments=h,this},Mt.prototype.abs=function(){return this.iterate(function(e,t,r,n){var i=e[0],s=i.toUpperCase(),a;if(i!==s)switch(e[0]=s,i){case"v":e[1]+=n;return;case"a":e[6]+=r,e[7]+=n;return;default:for(a=1;a<e.length;a++)e[a]+=a%2?r:n}},!0),this},Mt.prototype.rel=function(){return this.iterate(function(e,t,r,n){var i=e[0],s=i.toLowerCase(),a;if(i!==s&&!(t===0&&i==="M"))switch(e[0]=s,i){case"V":e[1]-=n;return;case"A":e[6]-=r,e[7]-=n;return;default:for(a=1;a<e.length;a++)e[a]-=a%2?r:n}},!0),this},Mt.prototype.unarc=function(){return this.iterate(function(e,t,r,n){var i,s,a,o=[],l=e[0];return l!=="A"&&l!=="a"?null:(l==="a"?(s=r+e[6],a=n+e[7]):(s=e[6],a=e[7]),i=Cg(r,n,s,a,e[4],e[5],e[1],e[2],e[3]),i.length===0?[[e[0]==="a"?"l":"L",e[6],e[7]]]:(i.forEach(function(f){o.push(["C",f[2],f[3],f[4],f[5],f[6],f[7]])}),o))}),this},Mt.prototype.unshort=function(){var e=this.segments,t,r,n,i,s;return this.iterate(function(a,o,l,f){var c=a[0],h=c.toUpperCase(),u;o&&(h==="T"?(u=c==="t",n=e[o-1],n[0]==="Q"?(t=n[1]-l,r=n[2]-f):n[0]==="q"?(t=n[1]-n[3],r=n[2]-n[4]):(t=0,r=0),i=-t,s=-r,u||(i+=l,s+=f),e[o]=[u?"q":"Q",i,s,a[1],a[2]]):h==="S"&&(u=c==="s",n=e[o-1],n[0]==="C"?(t=n[3]-l,r=n[4]-f):n[0]==="c"?(t=n[3]-n[5],r=n[4]-n[6]):(t=0,r=0),i=-t,s=-r,u||(i+=l,s+=f),e[o]=[u?"c":"C",i,s,a[1],a[2],a[3],a[4]]))}),this};var kg=Mt,Mg=kg;const Lg=sr(Mg),Fg=st.forwardRef((e,t)=>{const[r,n]=st.useState(null),i=Q.useRef(null),s=Q.useRef(null),a=Q.useRef(null),{path:o,transformation:{x:l,y:f,width:c,height:h,anchor:u,hexColor:d,fill:p,stroke:v="none",strokeWidth:g=0},pointerdown:m,pointerup:b}=e,_=yt.useApp();return st.useEffect(()=>{const y=Lg(o).scale(5).translate(0,0).toString(),x=`<svg xmlns="http://www.w3.org/2000/svg" width="${c}" height="${h}">
548
+ <path stroke="${v}" stroke-width="${g}" fill="${d||p}" d="${y}">
549
549
  </path>
550
- </svg>`,x=new lg(y),O=b.renderer.generateTexture(x);return r(O),()=>{}},[b,a,p,v,u,d]),dt.jsx(ai,{...e,children:dt.jsx(yt.Container,{ref:i,children:dt.jsx(yt.Container,{ref:s,children:t&&dt.jsx(yt.Sprite,{texture:t,width:f,height:c,anchor:h,ref:n,x:o,y:l,interactive:!0,pointerdown:g,pointerup:m})})})})},Bg=e=>{const t={isPlaying:!1,progress:0,speed:1,mute:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1},[,r]=st.useState(!1),n=Q.useRef(t);console.log("allProps",e);const i=Q.useRef(null),s=Q.useRef(null),{tl:a,playerTimeRef:o,isDragging:l}=Q.useContext(Or),{uniqueId:f,src:c,startAt:h,endAt:u,mute:d,speed:p}=e,v=st.useRef(null);be(Kt.PAUSE,()=>{var y;console.log("pause event"),i.current&&v.current&&((y=v.current)==null||y.pause(),n.current.isPlaying=!1)}),st.useEffect(()=>{console.log("current isDragging",v.current,l),v.current&&(l?(v.current.pause(),n.current.isPlaying=!1,n.current.isDragging=!0):n.current.isDragging=!1)},[l]);const g=y=>{var x;if(i.current){console.log("audio gsapOnStart",y,o.current,Number(Math.round(o.current)),l);const O=Number(Math.round(o.current));O>=y&&O<=u&&!l&&(console.log("ifff audio gsapOnStart",y),(x=v.current)==null||x.play({volume:d?0:1,start:y,end:u,speed:p||1}),n.current.isPlaying=!0,n.current.completed=!1)}},m=()=>{var y;i.current&&(console.log("audio gsapOnStart",h),(y=v.current)==null||y.stop(),n.current.isPlaying=!1,n.current.completed=!0)},b=y=>{var x,O,T,E;v.current&&n.current.isDragging?(console.log("audioStateRef updating",o.current),(x=v.current)==null||x.play(),n.current.isPlaying=!1,setTimeout(()=>{n.current.isPlaying=!1,v.current&&v.current.pause()},55),n.current.isPlaying=!1):i.current&&!n.current.isPlaying&&!n.current.completed&&(console.log("audio gsapOnUpdate",y),(O=v.current)==null||O.refresh(),(T=v.current)==null||T.refreshPaused(),(E=v.current)==null||E.resume(),n.current.isPlaying=!0)},_=()=>{};return Q.useEffect(()=>{let y=de.context(()=>{});if(i.current&&a.current){const x={duration:Number(u)-Number(h),onStart:g,onComplete:m,onStartParams:[h],onCompleteParams:[],onInterrupt:_,onUpdate:b,onUpdateParams:[]};y=de.context(()=>{a.current.to(i.current,{alpha:1,duration:.01},h).from(s.current,{...x},h).to(i.current,{alpha:0,duration:.1},Number(u)-.1)})}return()=>y.revert()},[h,u]),st.useEffect(()=>{i.current&&r(!0)},[]),st.useEffect(()=>{i.current&&v.current&&(n.current.mute=d,n.current.speed=p,v.current.volume=d?0:1)},[d,p]),st.useEffect(()=>(te(c)||(v.current=pf.Sound.from({url:c,preload:!0,singleInstance:!0,loaded:()=>{n.current.loaded=!0}})),()=>{}),[f,c]),dt.jsx(yt.Container,{ref:i})};function Ug(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var wu=Ug;function Dg(){this.__data__=[],this.size=0}var $g=Dg;function jg(e,t){return e===t||e!==e&&t!==t}var Au=jg,Gg=Au;function qg(e,t){for(var r=e.length;r--;)if(Gg(e[r][0],t))return r;return-1}var vi=qg,Hg=vi,Vg=Array.prototype,zg=Vg.splice;function Xg(e){var t=this.__data__,r=Hg(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():zg.call(t,r,1),--this.size,!0}var Wg=Xg,Yg=vi;function Kg(e){var t=this.__data__,r=Yg(t,e);return r<0?void 0:t[r][1]}var Zg=Kg,Qg=vi;function Jg(e){return Qg(this.__data__,e)>-1}var t0=Jg,e0=vi;function r0(e,t){var r=this.__data__,n=e0(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var n0=r0,i0=$g,s0=Wg,a0=Zg,o0=t0,l0=n0;function Lr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Lr.prototype.clear=i0,Lr.prototype.delete=s0,Lr.prototype.get=a0,Lr.prototype.has=o0,Lr.prototype.set=l0;var yi=Lr,u0=yi;function f0(){this.__data__=new u0,this.size=0}var c0=f0;function h0(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var d0=h0;function p0(e){return this.__data__.get(e)}var v0=p0;function y0(e){return this.__data__.has(e)}var m0=y0,g0=Ir,b0=g0(Object,"create"),mi=b0,Su=mi;function _0(){this.__data__=Su?Su(null):{},this.size=0}var x0=_0;function E0(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var T0=E0,w0=mi,A0="__lodash_hash_undefined__",S0=Object.prototype,O0=S0.hasOwnProperty;function I0(e){var t=this.__data__;if(w0){var r=t[e];return r===A0?void 0:r}return O0.call(t,e)?t[e]:void 0}var R0=I0,N0=mi,C0=Object.prototype,P0=C0.hasOwnProperty;function k0(e){var t=this.__data__;return N0?t[e]!==void 0:P0.call(t,e)}var M0=k0,L0=mi,F0="__lodash_hash_undefined__";function B0(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=L0&&t===void 0?F0:t,this}var U0=B0,D0=x0,$0=T0,j0=R0,G0=M0,q0=U0;function Fr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Fr.prototype.clear=D0,Fr.prototype.delete=$0,Fr.prototype.get=j0,Fr.prototype.has=G0,Fr.prototype.set=q0;var H0=Fr,Ou=H0,V0=yi,z0=zs;function X0(){this.size=0,this.__data__={hash:new Ou,map:new(z0||V0),string:new Ou}}var W0=X0;function Y0(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var K0=Y0,Z0=K0;function Q0(e,t){var r=e.__data__;return Z0(t)?r[typeof t=="string"?"string":"hash"]:r.map}var gi=Q0,J0=gi;function tb(e){var t=J0(this,e).delete(e);return this.size-=t?1:0,t}var eb=tb,rb=gi;function nb(e){return rb(this,e).get(e)}var ib=nb,sb=gi;function ab(e){return sb(this,e).has(e)}var ob=ab,lb=gi;function ub(e,t){var r=lb(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var fb=ub,cb=W0,hb=eb,db=ib,pb=ob,vb=fb;function Br(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Br.prototype.clear=cb,Br.prototype.delete=hb,Br.prototype.get=db,Br.prototype.has=pb,Br.prototype.set=vb;var pa=Br,yb=yi,mb=zs,gb=pa,bb=200;function _b(e,t){var r=this.__data__;if(r instanceof yb){var n=r.__data__;if(!mb||n.length<bb-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new gb(n)}return r.set(e,t),this.size=r.size,this}var xb=_b,Eb=yi,Tb=c0,wb=d0,Ab=v0,Sb=m0,Ob=xb;function Ur(e){var t=this.__data__=new Eb(e);this.size=t.size}Ur.prototype.clear=Tb,Ur.prototype.delete=wb,Ur.prototype.get=Ab,Ur.prototype.has=Sb,Ur.prototype.set=Ob;var Iu=Ur,Ib="__lodash_hash_undefined__";function Rb(e){return this.__data__.set(e,Ib),this}var Nb=Rb;function Cb(e){return this.__data__.has(e)}var Pb=Cb,kb=pa,Mb=Nb,Lb=Pb;function bi(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new kb;++t<r;)this.add(e[t])}bi.prototype.add=bi.prototype.push=Mb,bi.prototype.has=Lb;var Fb=bi;function Bb(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Ub=Bb;function Db(e,t){return e.has(t)}var $b=Db,jb=Fb,Gb=Ub,qb=$b,Hb=1,Vb=2;function zb(e,t,r,n,i,s){var a=r&Hb,o=e.length,l=t.length;if(o!=l&&!(a&&l>o))return!1;var f=s.get(e),c=s.get(t);if(f&&c)return f==t&&c==e;var h=-1,u=!0,d=r&Vb?new jb:void 0;for(s.set(e,t),s.set(t,e);++h<o;){var p=e[h],v=t[h];if(n)var g=a?n(v,p,h,t,e,s):n(p,v,h,e,t,s);if(g!==void 0){if(g)continue;u=!1;break}if(d){if(!Gb(t,function(m,b){if(!qb(d,b)&&(p===m||i(p,m,r,n,s)))return d.push(b)})){u=!1;break}}else if(!(p===v||i(p,v,r,n,s))){u=!1;break}}return s.delete(e),s.delete(t),u}var Ru=zb,Xb=Ie,Wb=Xb.Uint8Array,Yb=Wb;function Kb(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var Zb=Kb;function Qb(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Jb=Qb,Nu=ri,Cu=Yb,t1=Au,e1=Ru,r1=Zb,n1=Jb,i1=1,s1=2,a1="[object Boolean]",o1="[object Date]",l1="[object Error]",u1="[object Map]",f1="[object Number]",c1="[object RegExp]",h1="[object Set]",d1="[object String]",p1="[object Symbol]",v1="[object ArrayBuffer]",y1="[object DataView]",Pu=Nu?Nu.prototype:void 0,va=Pu?Pu.valueOf:void 0;function m1(e,t,r,n,i,s,a){switch(r){case y1:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case v1:return!(e.byteLength!=t.byteLength||!s(new Cu(e),new Cu(t)));case a1:case o1:case f1:return t1(+e,+t);case l1:return e.name==t.name&&e.message==t.message;case c1:case d1:return e==t+"";case u1:var o=r1;case h1:var l=n&i1;if(o||(o=n1),e.size!=t.size&&!l)return!1;var f=a.get(e);if(f)return f==t;n|=s1,a.set(e,t);var c=e1(o(e),o(t),n,i,s,a);return a.delete(e),c;case p1:if(va)return va.call(e)==va.call(t)}return!1}var g1=m1;function b1(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var _1=b1,x1=_1,E1=_e;function T1(e,t,r){var n=t(e);return E1(e)?n:x1(n,r(e))}var w1=T1;function A1(e,t){for(var r=-1,n=e==null?0:e.length,i=0,s=[];++r<n;){var a=e[r];t(a,r,e)&&(s[i++]=a)}return s}var S1=A1;function O1(){return[]}var I1=O1,R1=S1,N1=I1,C1=Object.prototype,P1=C1.propertyIsEnumerable,ku=Object.getOwnPropertySymbols,k1=ku?function(e){return e==null?[]:(e=Object(e),R1(ku(e),function(t){return P1.call(e,t)}))}:N1,M1=k1;function L1(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var F1=L1,B1=9007199254740991,U1=/^(?:0|[1-9]\d*)$/;function D1(e,t){var r=typeof e;return t=t??B1,!!t&&(r=="number"||r!="symbol"&&U1.test(e))&&e>-1&&e%1==0&&e<t}var Mu=D1,$1=F1,j1=Qs,G1=_e,q1=ta,H1=Mu,V1=ea,z1=Object.prototype,X1=z1.hasOwnProperty;function W1(e,t){var r=G1(e),n=!r&&j1(e),i=!r&&!n&&q1(e),s=!r&&!n&&!i&&V1(e),a=r||n||i||s,o=a?$1(e.length,String):[],l=o.length;for(var f in e)(t||X1.call(e,f))&&!(a&&(f=="length"||i&&(f=="offset"||f=="parent")||s&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||H1(f,l)))&&o.push(f);return o}var Y1=W1,K1=Y1,Z1=Bl,Q1=ni;function J1(e){return Q1(e)?K1(e):Z1(e)}var ya=J1,t_=w1,e_=M1,r_=ya;function n_(e){return t_(e,r_,e_)}var i_=n_,Lu=i_,s_=1,a_=Object.prototype,o_=a_.hasOwnProperty;function l_(e,t,r,n,i,s){var a=r&s_,o=Lu(e),l=o.length,f=Lu(t),c=f.length;if(l!=c&&!a)return!1;for(var h=l;h--;){var u=o[h];if(!(a?u in t:o_.call(t,u)))return!1}var d=s.get(e),p=s.get(t);if(d&&p)return d==t&&p==e;var v=!0;s.set(e,t),s.set(t,e);for(var g=a;++h<l;){u=o[h];var m=e[u],b=t[u];if(n)var _=a?n(b,m,u,t,e,s):n(m,b,u,e,t,s);if(!(_===void 0?m===b||i(m,b,r,n,s):_)){v=!1;break}g||(g=u=="constructor")}if(v&&!g){var y=e.constructor,x=t.constructor;y!=x&&"constructor"in e&&"constructor"in t&&!(typeof y=="function"&&y instanceof y&&typeof x=="function"&&x instanceof x)&&(v=!1)}return s.delete(e),s.delete(t),v}var u_=l_,ma=Iu,f_=Ru,c_=g1,h_=u_,Fu=Ql,Bu=_e,Uu=ta,d_=ea,p_=1,Du="[object Arguments]",$u="[object Array]",_i="[object Object]",v_=Object.prototype,ju=v_.hasOwnProperty;function y_(e,t,r,n,i,s){var a=Bu(e),o=Bu(t),l=a?$u:Fu(e),f=o?$u:Fu(t);l=l==Du?_i:l,f=f==Du?_i:f;var c=l==_i,h=f==_i,u=l==f;if(u&&Uu(e)){if(!Uu(t))return!1;a=!0,c=!1}if(u&&!c)return s||(s=new ma),a||d_(e)?f_(e,t,r,n,i,s):c_(e,t,l,r,n,i,s);if(!(r&p_)){var d=c&&ju.call(e,"__wrapped__"),p=h&&ju.call(t,"__wrapped__");if(d||p){var v=d?e.value():e,g=p?t.value():t;return s||(s=new ma),i(v,g,r,n,s)}}return u?(s||(s=new ma),h_(e,t,r,n,i,s)):!1}var m_=y_,g_=m_,Gu=on;function qu(e,t,r,n,i){return e===t?!0:e==null||t==null||!Gu(e)&&!Gu(t)?e!==e&&t!==t:g_(e,t,r,n,qu,i)}var Hu=qu,b_=Iu,__=Hu,x_=1,E_=2;function T_(e,t,r,n){var i=r.length,s=i,a=!n;if(e==null)return!s;for(e=Object(e);i--;){var o=r[i];if(a&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i<s;){o=r[i];var l=o[0],f=e[l],c=o[1];if(a&&o[2]){if(f===void 0&&!(l in e))return!1}else{var h=new b_;if(n)var u=n(f,c,l,e,t,h);if(!(u===void 0?__(c,f,x_|E_,n,h):u))return!1}}return!0}var w_=T_,A_=Hs;function S_(e){return e===e&&!A_(e)}var Vu=S_,O_=Vu,I_=ya;function R_(e){for(var t=I_(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,O_(i)]}return t}var N_=R_;function C_(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var zu=C_,P_=w_,k_=N_,M_=zu;function L_(e){var t=k_(e);return t.length==1&&t[0][2]?M_(t[0][0],t[0][1]):function(r){return r===e||P_(r,e,t)}}var F_=L_,B_=an,U_=on,D_="[object Symbol]";function $_(e){return typeof e=="symbol"||U_(e)&&B_(e)==D_}var ga=$_,j_=_e,G_=ga,q_=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,H_=/^\w*$/;function V_(e,t){if(j_(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||G_(e)?!0:H_.test(e)||!q_.test(e)||t!=null&&e in Object(t)}var ba=V_,Xu=pa,z_="Expected a function";function _a(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(z_);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var a=e.apply(this,n);return r.cache=s.set(i,a)||s,a};return r.cache=new(_a.Cache||Xu),r}_a.Cache=Xu;var X_=_a,W_=X_,Y_=500;function K_(e){var t=W_(e,function(n){return r.size===Y_&&r.clear(),n}),r=t.cache;return t}var Z_=K_,Q_=Z_,J_=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,tx=/\\(\\)?/g,ex=Q_(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(J_,function(r,n,i,s){t.push(i?s.replace(tx,"$1"):n||r)}),t}),rx=ex,Wu=ri,nx=wu,ix=_e,sx=ga,ax=1/0,Yu=Wu?Wu.prototype:void 0,Ku=Yu?Yu.toString:void 0;function Zu(e){if(typeof e=="string")return e;if(ix(e))return nx(e,Zu)+"";if(sx(e))return Ku?Ku.call(e):"";var t=e+"";return t=="0"&&1/e==-ax?"-0":t}var ox=Zu,lx=ox;function ux(e){return e==null?"":lx(e)}var fx=ux,cx=_e,hx=ba,dx=rx,px=fx;function vx(e,t){return cx(e)?e:hx(e,t)?[e]:dx(px(e))}var Qu=vx,yx=ga,mx=1/0;function gx(e){if(typeof e=="string"||yx(e))return e;var t=e+"";return t=="0"&&1/e==-mx?"-0":t}var xi=gx,bx=Qu,_x=xi;function xx(e,t){t=bx(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[_x(t[r++])];return r&&r==n?e:void 0}var Ju=xx,Ex=Ju;function Tx(e,t,r){var n=e==null?void 0:Ex(e,t);return n===void 0?r:n}var wx=Tx;function Ax(e,t){return e!=null&&t in Object(e)}var Sx=Ax,Ox=Qu,Ix=Qs,Rx=_e,Nx=Mu,Cx=Js,Px=xi;function kx(e,t,r){t=Ox(t,e);for(var n=-1,i=t.length,s=!1;++n<i;){var a=Px(t[n]);if(!(s=e!=null&&r(e,a)))break;e=e[a]}return s||++n!=i?s:(i=e==null?0:e.length,!!i&&Cx(i)&&Nx(a,i)&&(Rx(e)||Ix(e)))}var Mx=kx,Lx=Sx,Fx=Mx;function Bx(e,t){return e!=null&&Fx(e,t,Lx)}var Ux=Bx,Dx=Hu,$x=wx,jx=Ux,Gx=ba,qx=Vu,Hx=zu,Vx=xi,zx=1,Xx=2;function Wx(e,t){return Gx(e)&&qx(t)?Hx(Vx(e),t):function(r){var n=$x(r,e);return n===void 0&&n===t?jx(r,e):Dx(t,n,zx|Xx)}}var Yx=Wx;function Kx(e){return e}var Zx=Kx;function Qx(e){return function(t){return t==null?void 0:t[e]}}var Jx=Qx,tE=Ju;function eE(e){return function(t){return tE(t,e)}}var rE=eE,nE=Jx,iE=rE,sE=ba,aE=xi;function oE(e){return sE(e)?nE(aE(e)):iE(e)}var lE=oE,uE=F_,fE=Yx,cE=Zx,hE=_e,dE=lE;function pE(e){return typeof e=="function"?e:e==null?cE:typeof e=="object"?hE(e)?fE(e[0],e[1]):uE(e):dE(e)}var vE=pE;function yE(e){return function(t,r,n){for(var i=-1,s=Object(t),a=n(t),o=a.length;o--;){var l=a[e?o:++i];if(r(s[l],l,s)===!1)break}return t}}var mE=yE,gE=mE,bE=gE(),_E=bE,xE=_E,EE=ya;function TE(e,t){return e&&xE(e,t,EE)}var wE=TE,AE=ni;function SE(e,t){return function(r,n){if(r==null)return r;if(!AE(r))return e(r,n);for(var i=r.length,s=t?i:-1,a=Object(r);(t?s--:++s<i)&&n(a[s],s,a)!==!1;);return r}}var OE=SE,IE=wE,RE=OE,NE=RE(IE),CE=NE,PE=CE,kE=ni;function ME(e,t){var r=-1,n=kE(e)?Array(e.length):[];return PE(e,function(i,s,a){n[++r]=t(i,s,a)}),n}var LE=ME,FE=wu,BE=vE,UE=LE,DE=_e;function $E(e,t){var r=DE(e)?FE:UE;return r(e,BE(t))}var jE=$E;const GE=sr(jE);var ir={},tf={},Ne={};Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.loop=Ne.conditional=Ne.parse=void 0;var qE=function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:n;if(Array.isArray(r))r.forEach(function(a){return e(t,a,n,i)});else if(typeof r=="function")r(t,n,i,e);else{var s=Object.keys(r)[0];Array.isArray(r[s])?(i[s]={},e(t,r[s],n,i[s])):i[s]=r[s](t,n,i,e)}return n};Ne.parse=qE;var HE=function(t,r){return function(n,i,s,a){r(n,i,s)&&a(n,t,i,s)}};Ne.conditional=HE;var VE=function(t,r){return function(n,i,s,a){for(var o=[],l=n.pos;r(n,i,s);){var f={};if(a(n,t,i,f),n.pos===l)break;l=n.pos,o.push(f)}return o}};Ne.loop=VE;var Ft={};Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.readBits=Ft.readArray=Ft.readUnsigned=Ft.readString=Ft.peekBytes=Ft.readBytes=Ft.peekByte=Ft.readByte=Ft.buildStream=void 0;var zE=function(t){return{data:t,pos:0}};Ft.buildStream=zE;var ef=function(){return function(t){return t.data[t.pos++]}};Ft.readByte=ef;var XE=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(r){return r.data[r.pos+t]}};Ft.peekByte=XE;var Ei=function(t){return function(r){return r.data.subarray(r.pos,r.pos+=t)}};Ft.readBytes=Ei;var WE=function(t){return function(r){return r.data.subarray(r.pos,r.pos+t)}};Ft.peekBytes=WE;var YE=function(t){return function(r){return Array.from(Ei(t)(r)).map(function(n){return String.fromCharCode(n)}).join("")}};Ft.readString=YE;var KE=function(t){return function(r){var n=Ei(2)(r);return t?(n[1]<<8)+n[0]:(n[0]<<8)+n[1]}};Ft.readUnsigned=KE;var ZE=function(t,r){return function(n,i,s){for(var a=typeof r=="function"?r(n,i,s):r,o=Ei(t),l=new Array(a),f=0;f<a;f++)l[f]=o(n);return l}};Ft.readArray=ZE;var QE=function(t,r,n){for(var i=0,s=0;s<n;s++)i+=t[r+s]&&Math.pow(2,n-s-1);return i},JE=function(t){return function(r){for(var n=ef()(r),i=new Array(8),s=0;s<8;s++)i[7-s]=!!(n&1<<s);return Object.keys(t).reduce(function(a,o){var l=t[o];return l.length?a[o]=QE(i,l.index,l.length):a[o]=i[l.index],a},{})}};Ft.readBits=JE,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Ne,r=Ft,n={blocks:function(u){for(var d=0,p=[],v=u.data.length,g=0,m=(0,r.readByte)()(u);m!==d&&m;m=(0,r.readByte)()(u)){if(u.pos+m>=v){var b=v-u.pos;p.push((0,r.readBytes)(b)(u)),g+=b;break}p.push((0,r.readBytes)(m)(u)),g+=m}for(var _=new Uint8Array(g),y=0,x=0;x<p.length;x++)_.set(p[x],y),y+=p[x].length;return _}},i=(0,t.conditional)({gce:[{codes:(0,r.readBytes)(2)},{byteSize:(0,r.readByte)()},{extras:(0,r.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,r.readUnsigned)(!0)},{transparentColorIndex:(0,r.readByte)()},{terminator:(0,r.readByte)()}]},function(h){var u=(0,r.peekBytes)(2)(h);return u[0]===33&&u[1]===249}),s=(0,t.conditional)({image:[{code:(0,r.readByte)()},{descriptor:[{left:(0,r.readUnsigned)(!0)},{top:(0,r.readUnsigned)(!0)},{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{lct:(0,r.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,t.conditional)({lct:(0,r.readArray)(3,function(h,u,d){return Math.pow(2,d.descriptor.lct.size+1)})},function(h,u,d){return d.descriptor.lct.exists}),{data:[{minCodeSize:(0,r.readByte)()},n]}]},function(h){return(0,r.peekByte)()(h)===44}),a=(0,t.conditional)({text:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{preData:function(u,d,p){return(0,r.readBytes)(p.text.blockSize)(u)}},n]},function(h){var u=(0,r.peekBytes)(2)(h);return u[0]===33&&u[1]===1}),o=(0,t.conditional)({application:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{id:function(u,d,p){return(0,r.readString)(p.blockSize)(u)}},n]},function(h){var u=(0,r.peekBytes)(2)(h);return u[0]===33&&u[1]===255}),l=(0,t.conditional)({comment:[{codes:(0,r.readBytes)(2)},n]},function(h){var u=(0,r.peekBytes)(2)(h);return u[0]===33&&u[1]===254}),f=[{header:[{signature:(0,r.readString)(3)},{version:(0,r.readString)(3)}]},{lsd:[{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{gct:(0,r.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,r.readByte)()},{pixelAspectRatio:(0,r.readByte)()}]},(0,t.conditional)({gct:(0,r.readArray)(3,function(h,u){return Math.pow(2,u.lsd.gct.size+1)})},function(h,u){return u.lsd.gct.exists}),{frames:(0,t.loop)([i,o,l,s,a],function(h){var u=(0,r.peekByte)()(h);return u===33||u===44})}],c=f;e.default=c}(tf);var Ti={};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.deinterlace=void 0;var tT=function(t,r){for(var n=new Array(t.length),i=t.length/r,s=function(u,d){var p=t.slice(d*r,(d+1)*r);n.splice.apply(n,[u*r,r].concat(p))},a=[0,4,2,1],o=[8,8,4,2],l=0,f=0;f<4;f++)for(var c=a[f];c<i;c+=o[f])s(c,l),l++;return n};Ti.deinterlace=tT;var wi={};Object.defineProperty(wi,"__esModule",{value:!0}),wi.lzw=void 0;var eT=function(t,r,n){var i=4096,s=-1,a=n,o,l,f,c,h,u,d,O,p,v,x,g,T,E,A,N,m=new Array(n),b=new Array(i),_=new Array(i),y=new Array(i+1);for(g=t,l=1<<g,h=l+1,o=l+2,d=s,c=g+1,f=(1<<c)-1,p=0;p<l;p++)b[p]=0,_[p]=p;var x,O,T,E,N,A;for(x=O=T=E=N=A=0,v=0;v<a;){if(E===0){if(O<c){x+=r[A]<<O,O+=8,A++;continue}if(p=x&f,x>>=c,O-=c,p>o||p==h)break;if(p==l){c=g+1,f=(1<<c)-1,o=l+2,d=s;continue}if(d==s){y[E++]=_[p],d=p,T=p;continue}for(u=p,p==o&&(y[E++]=T,p=d);p>l;)y[E++]=_[p],p=b[p];T=_[p]&255,y[E++]=T,o<i&&(b[o]=d,_[o]=T,o++,!(o&f)&&o<i&&(c++,f+=o)),d=u}E--,m[N++]=y[E],v++}for(v=N;v<a;v++)m[v]=0;return m};wi.lzw=eT,Object.defineProperty(ir,"__esModule",{value:!0}),ir.decompressFrames=ir.decompressFrame=ir.parseGIF=void 0;var rT=oT(tf),nT=Ne,iT=Ft,sT=Ti,aT=wi;function oT(e){return e&&e.__esModule?e:{default:e}}var lT=function(t){var r=new Uint8Array(t);return(0,nT.parse)((0,iT.buildStream)(r),rT.default)};ir.parseGIF=lT;var uT=function(t){for(var r=t.pixels.length,n=new Uint8ClampedArray(r*4),i=0;i<r;i++){var s=i*4,a=t.pixels[i],o=t.colorTable[a]||[0,0,0];n[s]=o[0],n[s+1]=o[1],n[s+2]=o[2],n[s+3]=a!==t.transparentIndex?255:0}return n},rf=function(t,r,n){if(!t.image){console.warn("gif frame does not have associated image.");return}var i=t.image,s=i.descriptor.width*i.descriptor.height,a=(0,aT.lzw)(i.data.minCodeSize,i.data.blocks,s);i.descriptor.lct.interlaced&&(a=(0,sT.deinterlace)(a,i.descriptor.width));var o={pixels:a,dims:{top:t.image.descriptor.top,left:t.image.descriptor.left,width:t.image.descriptor.width,height:t.image.descriptor.height}};return i.descriptor.lct&&i.descriptor.lct.exists?o.colorTable=i.lct:o.colorTable=r,t.gce&&(o.delay=(t.gce.delay||10)*10,o.disposalType=t.gce.extras.disposal,t.gce.extras.transparentColorGiven&&(o.transparentIndex=t.gce.transparentColorIndex)),n&&(o.patch=uT(o)),o};ir.decompressFrame=rf;var fT=function(t,r){return t.frames.filter(function(n){return n.image}).map(function(n){return rf(n,t.gct,r)})};ir.decompressFrames=fT;const nf=(e,t={})=>{typeof t=="function"&&(t=t(e));const r=t.loaded&&e.loaded!==t.loaded,{playing:n,...i}=t,s={...e,...i};return r&&Object.assign(s,{playing:s.autoPlay&&s.loaded}),(t.delays!=null||t.frames!=null)&&Object.assign(s,{length:s.frames.length}),(t.index!=null||t.frames!=null)&&Object.assign(s,{index:s.length===0?0:(s.length+s.index)%s.length}),t.playing!=null&&Object.assign(s,s.loaded?{playing:n}:{autoPlay:n}),s},cT=e=>nf({autoPlay:!0,playing:!1,frames:[],delays:[],index:0,length:0,loaded:!1},e),hT=e=>Q.useReducer(nf,e,cT);var dT='function e(e){var r={exports:{}};return e(r,r.exports),r.exports}var r=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.loop=r.conditional=r.parse=void 0;r.parse=function e(r,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;if(Array.isArray(t))t.forEach((function(t){return e(r,t,n,a)}));else if("function"==typeof t)t(r,n,a,e);else{var i=Object.keys(t)[0];Array.isArray(t[i])?(a[i]={},e(r,t[i],n,a[i])):a[i]=t[i](r,n,a,e)}return n};r.conditional=function(e,r){return function(t,n,a,i){r(t,n,a)&&i(t,e,n,a)}};r.loop=function(e,r){return function(t,n,a,i){for(var o=[];r(t,n,a);){var s={};i(t,e,n,s),o.push(s)}return o}}})),t=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.readBits=r.readArray=r.readUnsigned=r.readString=r.peekBytes=r.readBytes=r.peekByte=r.readByte=r.buildStream=void 0;r.buildStream=function(e){return{data:e,pos:0}};var t=function(){return function(e){return e.data[e.pos++]}};r.readByte=t;r.peekByte=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return function(r){return r.data[r.pos+e]}};var n=function(e){return function(r){return r.data.subarray(r.pos,r.pos+=e)}};r.readBytes=n;r.peekBytes=function(e){return function(r){return r.data.subarray(r.pos,r.pos+e)}};r.readString=function(e){return function(r){return Array.from(n(e)(r)).map((function(e){return String.fromCharCode(e)})).join("")}};r.readUnsigned=function(e){return function(r){var t=n(2)(r);return e?(t[1]<<8)+t[0]:(t[0]<<8)+t[1]}};r.readArray=function(e,r){return function(t,a,i){for(var o="function"==typeof r?r(t,a,i):r,s=n(e),d=new Array(o),c=0;c<o;c++)d[c]=s(t);return d}};r.readBits=function(e){return function(r){for(var t=function(e){return e.data[e.pos++]}(r),n=new Array(8),a=0;a<8;a++)n[7-a]=!!(t&1<<a);return Object.keys(e).reduce((function(r,t){var a=e[t];return a.length?r[t]=function(e,r,t){for(var n=0,a=0;a<t;a++)n+=e[r+a]&&Math.pow(2,t-a-1);return n}(n,a.index,a.length):r[t]=n[a.index],r}),{})}}})),n=e((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a={blocks:function(e){for(var r=[],n=e.data.length,a=0,i=(0,t.readByte)()(e);0!==i;i=(0,t.readByte)()(e)){if(e.pos+i>=n){var o=n-e.pos;r.push((0,t.readBytes)(o)(e)),a+=o;break}r.push((0,t.readBytes)(i)(e)),a+=i}for(var s=new Uint8Array(a),d=0,c=0;c<r.length;c++)s.set(r[c],d),d+=r[c].length;return s}},i=(0,r.conditional)({gce:[{codes:(0,t.readBytes)(2)},{byteSize:(0,t.readByte)()},{extras:(0,t.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,t.readUnsigned)(!0)},{transparentColorIndex:(0,t.readByte)()},{terminator:(0,t.readByte)()}]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&249===r[1]})),o=(0,r.conditional)({image:[{code:(0,t.readByte)()},{descriptor:[{left:(0,t.readUnsigned)(!0)},{top:(0,t.readUnsigned)(!0)},{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{lct:(0,t.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,r.conditional)({lct:(0,t.readArray)(3,(function(e,r,t){return Math.pow(2,t.descriptor.lct.size+1)}))},(function(e,r,t){return t.descriptor.lct.exists})),{data:[{minCodeSize:(0,t.readByte)()},a]}]},(function(e){return 44===(0,t.peekByte)()(e)})),s=(0,r.conditional)({text:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{preData:function(e,r,n){return(0,t.readBytes)(n.text.blockSize)(e)}},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&1===r[1]})),d=(0,r.conditional)({application:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{id:function(e,r,n){return(0,t.readString)(n.blockSize)(e)}},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&255===r[1]})),c=(0,r.conditional)({comment:[{codes:(0,t.readBytes)(2)},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&254===r[1]})),u=[{header:[{signature:(0,t.readString)(3)},{version:(0,t.readString)(3)}]},{lsd:[{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{gct:(0,t.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,t.readByte)()},{pixelAspectRatio:(0,t.readByte)()}]},(0,r.conditional)({gct:(0,t.readArray)(3,(function(e,r){return Math.pow(2,r.lsd.gct.size+1)}))},(function(e,r){return r.lsd.gct.exists})),{frames:(0,r.loop)([i,d,c,o,s],(function(e){var r=(0,t.peekByte)()(e);return 33===r||44===r}))}];n.default=u})),a=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.deinterlace=void 0;r.deinterlace=function(e,r){for(var t=new Array(e.length),n=e.length/r,a=function(n,a){var i=e.slice(a*r,(a+1)*r);t.splice.apply(t,[n*r,r].concat(i))},i=[0,4,2,1],o=[8,8,4,2],s=0,d=0;d<4;d++)for(var c=i[d];c<n;c+=o[d])a(c,s),s++;return t}})),i=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.lzw=void 0;r.lzw=function(e,r,t){var n,a,i,o,s,d,c,u,l,f,p,g,y,h,v,m,x=4096,B=t,w=new Array(t),b=new Array(x),k=new Array(x),A=new Array(4097);for(s=(a=1<<(f=e))+1,n=a+2,c=-1,i=(1<<(o=f+1))-1,u=0;u<a;u++)b[u]=0,k[u]=u;for(p=g=y=h=v=m=0,l=0;l<B;){if(0===h){if(g<o){p+=r[m]<<g,g+=8,m++;continue}if(u=p&i,p>>=o,g-=o,u>n||u==s)break;if(u==a){i=(1<<(o=f+1))-1,n=a+2,c=-1;continue}if(-1==c){A[h++]=k[u],c=u,y=u;continue}for(d=u,u==n&&(A[h++]=y,u=c);u>a;)A[h++]=k[u],u=b[u];y=255&k[u],A[h++]=y,n<x&&(b[n]=c,k[n]=y,0==(++n&i)&&n<x&&(o++,i+=n)),c=d}h--,w[v++]=A[h],l++}for(l=v;l<B;l++)w[l]=0;return w}})),o=e((function(e,o){Object.defineProperty(o,"__esModule",{value:!0}),o.decompressFrames=o.decompressFrame=o.parseGIF=void 0;var s,d=(s=n)&&s.__esModule?s:{default:s};o.parseGIF=function(e){var n=new Uint8Array(e);return(0,r.parse)((0,t.buildStream)(n),d.default)};var c=function(e,r,t){if(e.image){var n=e.image,o=n.descriptor.width*n.descriptor.height,s=(0,i.lzw)(n.data.minCodeSize,n.data.blocks,o);n.descriptor.lct.interlaced&&(s=(0,a.deinterlace)(s,n.descriptor.width));var d={pixels:s,dims:{top:e.image.descriptor.top,left:e.image.descriptor.left,width:e.image.descriptor.width,height:e.image.descriptor.height}};return n.descriptor.lct&&n.descriptor.lct.exists?d.colorTable=n.lct:d.colorTable=r,e.gce&&(d.delay=10*(e.gce.delay||10),d.disposalType=e.gce.extras.disposal,e.gce.extras.transparentColorGiven&&(d.transparentIndex=e.gce.transparentColorIndex)),t&&(d.patch=function(e){for(var r=e.pixels.length,t=new Uint8ClampedArray(4*r),n=0;n<r;n++){var a=4*n,i=e.pixels[n],o=e.colorTable[i]||[0,0,0];t[a]=o[0],t[a+1]=o[1],t[a+2]=o[2],t[a+3]=i!==e.transparentIndex?255:0}return t}(d)),d}console.warn("gif frame does not have associated image.")};o.decompressFrame=c;o.decompressFrames=function(e,r){return e.frames.filter((function(e){return e.image})).map((function(t){return c(t,e.gct,r)}))}}));const s=(e,r,t)=>{const{width:n,height:a,top:i,left:o}=r.dims,s=i*t.width+o;for(let i=0;i<a;i++)for(let a=0;a<n;a++){const o=i*n+a,d=r.pixels[o];if(d!==r.transparentIndex){const n=s+i*t.width+a,o=r.colorTable[d]||[0,0,0];e[4*n]=o[0],e[4*n+1]=o[1],e[4*n+2]=o[2],e[4*n+3]=255}}return e},d=new Map;self.addEventListener("message",(e=>{const{type:r,src:t}=e.data||e;switch(r){case"parse":if(!d.has(t)){const e=new AbortController,r={signal:e.signal};d.set(t,e),((e,{signal:r})=>fetch(e,{signal:r}).then((e=>{if(!e.headers.get("Content-Type").includes("image/gif"))throw Error(`Wrong content type: "${e.headers.get("Content-Type")}"`);return e.arrayBuffer()})).then((e=>o.parseGIF(e))).then((e=>((e=>{let r=null;for(const t of e.frames)r=t.gce?t.gce:r,"image"in t&&!("gce"in t)&&(t.gce=r)})(e),e))).then((e=>Promise.all([o.decompressFrames(e,!1),{width:e.lsd.width,height:e.lsd.height}]))).then((([e,r])=>{const t=[],n=r.width*r.height*4;for(let a=0;a<e.length;++a){const i=e[a],o=0===a||2===e[a-1].disposalType?new Uint8ClampedArray(n):t[a-1].slice();t.push(s(o,i,r))}return{...r,loaded:!0,delays:e.map((e=>e.delay)),frames:t}})))(t,r).then((e=>{self.postMessage(Object.assign(e,{src:t}),e.frames.map((e=>e.buffer)))})).catch((e=>{self.postMessage({src:t,error:e,loaded:!0})})).finally((()=>{d.delete(t)}))}break;case"cancel":if(d.has(t)){d.get(t).abort(),d.delete(t)}}}));\n';function pT(e){const t=new Blob([dT],{type:"application/javascript"}),r=URL.createObjectURL(t),n=new Worker(r,e);return URL.revokeObjectURL(r),n}const vT=e=>({...e,frames:e.frames.map(t=>{const r=new ImageData(e.width,e.height);return r.data.set(new Uint8ClampedArray(t)),r})}),yT=(e,t)=>{const r={};return()=>(r.instance||(r.instance=e()),Q.useLayoutEffect(()=>(r.timeout?(clearTimeout(r.timeout),delete r.timeout):r.usageCount=(r.usageCount||0)+1,()=>{r.timeout=setTimeout(()=>{r.usageCount=r.usageCount-1,r.usageCount===0&&(t&&t(r.instance),delete r.instance,delete r.timeout)})}),[r,t]),r.instance)},mT=e=>{const t=Q.useRef(e);return Q.useEffect(()=>{t.current=e},[e]),t},gT=e=>{const t=mT(e);return Q.useCallback(r=>t.current&&t.current(r),[])},bT=yT(()=>new pT,e=>e.terminate()),_T=(e,t)=>{const r=gT(t),n=bT();Q.useEffect(()=>{if(typeof e=="string"){const i=s=>{const a=s.data||s;if(a.src===e){const o=a.error?a:vT(a);r(o)}};return n.addEventListener("message",i),n.postMessage({src:e,type:"parse"}),()=>{n.postMessage({src:e,type:"cancel"}),n.removeEventListener("message",i)}}},[n,e])},xT=({isPlaying:e,forwardRef:t,...r})=>{const n=st.useRef(null);return st.useImperativeHandle(t,()=>n.current,[n]),st.useEffect(()=>{if(n.current===null)return;const i=n.current;i[e?"gotoAndPlay":"gotoAndStop"](i.currentFrame)},[e]),dt.jsx(yt.AnimatedSprite,{ref:n,...r,isPlaying:e})},sf=st.memo(xT),ET=yt.withFilters(yt.Container,{blur:ee.filters.BlurFilter,adjust:js,matrix:ee.filters.ColorMatrixFilter}),TT=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],wT={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1},AT=e=>{const[t,r]=st.useState([]),[,n]=st.useState(0),[i,s]=st.useState([]),[,a]=Q.useState(0),[,o]=Q.useState(!1),[l,f]=Q.useState(!1),[,c]=Q.useState(!1),[h,u]=hT({autoPlay:!1}),d=st.useRef(null),p=Q.useRef(null),v=Q.useRef(null),g=Q.useRef(null),m=Q.useRef(null),b=Q.useRef(null),_=Q.useRef(wT),y=Q.useRef(e.initialAlpha),{tl:x}=Q.useContext(Or),{frames:O,delays:T,loaded:E}=h,{uniqueId:N,src:A,startAt:w,endAt:S,locked:I,loop:C,transformation:{width:F=0,height:D=0,x:U,y:X,rotation:$=0,scale:k,animation:R,colorCorrection:P,effect:L},pointerdown:j,pointerup:G,mousedown:M,mouseup:B,pointerover:q,mouseover:H,mouseout:z,pointerout:Y,applyTransformer:J,onAnchorTransformationEnd:et}=e,{contrast:at=1,saturation:lt=1,exposure:Ct=1,blurRadius:Rt=0,alpha:V=1}=P||{},W={brightness:Ct,contrast:at,saturation:lt,alpha:V},Z=yt.useApp();_T(A,u),be(Kt.PAUSE,ut=>{console.log("pause event",ut),p.current&&(p.current.stop(),_.current.isPlaying=!1)});const tt=st.useCallback(ut=>{console.log("changeEnd",ut),et&&et(ut)},[]);st.useEffect(()=>{if(!te(O)){const ut=GE(O,xe=>{const{data:Lt,width:dn,height:Ai}=xe,kT=new Uint8Array(Lt);return ee.Texture.fromBuffer(kT,dn,Ai)}),je=ut.map((xe,Lt)=>({texture:xe,time:T[Lt]}));r(ut),s(je);let Dr=0;T.forEach(xe=>{Dr+=xe*10}),n(Dr)}},[O,T]);const K=ut=>{p.current&&(p.current.gotoAndPlay(ut||0),_.current.isPlaying=!0)},ft=()=>{p.current&&(p.current.stop(),_.current.isPlaying=!1)},ct=()=>{p.current&&(p.current.stop(),_.current.isPlaying=!1)},ht=()=>{p.current&&!_.current.isPlaying&&(p.current.play(),_.current.isPlaying=!0)},nt=()=>{o(!0)},At=ut=>{y.current=ut.alpha},Et=ut=>{y.current=ut.alpha};Q.useEffect(()=>{let ut=de.context(()=>{});if(v.current&&x.current){const je={duration:Number(S)-Number(w),onStart:K,onComplete:ft,onStartParams:[w],onCompleteParams:[],onInterrupt:ct,onUpdate:ht,onUpdateParams:[]},Dr={onStart:At,onStartParams:[{alpha:1}]},xe={onComplete:Et,onCompleteParams:[{alpha:0}]},Lt=qs(R||"None");ut=de.context(()=>{var dn,Ai;x.current.to(v.current,{alpha:1,duration:.01,...Dr},w).from(v.current,{...je},w).to(v.current,{alpha:0,duration:.1,...xe},Number(S)-.09),te(Lt.from)?te(Lt.to)?te(Lt.fromTo)||x.current.fromTo(v.current,(dn=Lt.fromTo)==null?void 0:dn.from,(Ai=Lt.fromTo)==null?void 0:Ai.to,w):x.current.to(v.current,{alpha:1,duration:.2,...Lt.to},w):x.current.from(v.current,{...Lt.from},w)})}return()=>ut.revert()},[R,w,S]);const $e=st.useCallback(()=>{f(!0)},[]);Z.ticker.add(ut=>{d.current&&(d.current.rotation+=.01*ut,d.current.clear().lineStyle(4,16777215,1).moveTo(40,0).arc(0,0,40,0,Math.PI*2*.6,!1))});const gt=st.useCallback(ut=>{ut.clear()},[]);return dt.jsxs(yt.Container,{ref:g,children:[dt.jsx(yt.Container,{ref:v,alpha:y.current,position:[U,X],pivot:[U,X],width:F,height:D,children:dt.jsxs(yt.Container,{ref:m,children:[!E&&dt.jsx(yt.Container,{anchor:.5,position:[F/2,D/2],children:dt.jsx(yt.Graphics,{x:U,y:X,ref:d,draw:gt})}),t&&t.length>0&&dt.jsx(ET,{scale:1,blur:{blur:Rt,quality:4},adjust:W,apply:({matrix:ut})=>{L==="BlackAndWhite"?ut.desaturate():L==="Sepia"?ut.sepia():L==="RetroVintage"||L==="NightVision"?ut.negative():L==="Normal"&&ut.reset()},matrix:{enabled:!0,matrix:TT},children:dt.jsx(sf,{x:U,y:X,width:F,height:D,rotation:$,animationSpeed:1,loop:C,textures:i,onComplete:nt,onFrameChange:ut=>a(ut),anchor:.5,...!I&&!l&&{interactive:!0,buttonMode:!0,pointerdown:j,pointerover:q,pointerout:Y,pointerup:G,mousedown:M,mouseup:B,mouseover:H,mouseout:z},forwardRef:p,scale:k})})]})}),J&&dt.jsx(Gs,{pixiTransformerRef:b,imageRef:v,isMounted:E,transformCommit:tt,transformChange:$e,mouseoverEvent:c,uniqueId:N})]})};var af={exports:{}};/*!
550
+ </svg>`,O=new lg(x),T=_.renderer.generateTexture(O);return n(T),()=>{}},[_,o,v,g,d,p]),dt.jsx(ai,{...e,ref:t,children:dt.jsx(yt.Container,{ref:s,children:dt.jsx(yt.Container,{ref:a,children:r&&dt.jsx(yt.Sprite,{texture:r,width:c,height:h,anchor:u,ref:i,x:l,y:f,interactive:!0,pointerdown:m,pointerup:b})})})})}),Bg=e=>{const t={isPlaying:!1,progress:0,speed:1,mute:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1},[,r]=st.useState(!1),n=Q.useRef(t);console.log("allProps",e);const i=Q.useRef(null),s=Q.useRef(null),{tl:a,playerTimeRef:o,isDragging:l}=Q.useContext(Or),{uniqueId:f,src:c,startAt:h,endAt:u,mute:d,speed:p}=e,v=st.useRef(null);be(Kt.PAUSE,()=>{var y;console.log("pause event"),i.current&&v.current&&((y=v.current)==null||y.pause(),n.current.isPlaying=!1)}),st.useEffect(()=>{console.log("current isDragging",v.current,l),v.current&&(l?(v.current.pause(),n.current.isPlaying=!1,n.current.isDragging=!0):n.current.isDragging=!1)},[l]);const g=y=>{var x;if(i.current){console.log("audio gsapOnStart",y,o.current,Number(Math.round(o.current)),l);const O=Number(Math.round(o.current));O>=y&&O<=u&&!l&&(console.log("ifff audio gsapOnStart",y),(x=v.current)==null||x.play({volume:d?0:1,start:y,end:u,speed:p||1}),n.current.isPlaying=!0,n.current.completed=!1)}},m=()=>{var y;i.current&&(console.log("audio gsapOnStart",h),(y=v.current)==null||y.stop(),n.current.isPlaying=!1,n.current.completed=!0)},b=y=>{var x,O,T,E;v.current&&n.current.isDragging?(console.log("audioStateRef updating",o.current),(x=v.current)==null||x.play(),n.current.isPlaying=!1,setTimeout(()=>{n.current.isPlaying=!1,v.current&&v.current.pause()},55),n.current.isPlaying=!1):i.current&&!n.current.isPlaying&&!n.current.completed&&(console.log("audio gsapOnUpdate",y),(O=v.current)==null||O.refresh(),(T=v.current)==null||T.refreshPaused(),(E=v.current)==null||E.resume(),n.current.isPlaying=!0)},_=()=>{};return Q.useEffect(()=>{let y=de.context(()=>{});if(i.current&&a.current){const x={duration:Number(u)-Number(h),onStart:g,onComplete:m,onStartParams:[h],onCompleteParams:[],onInterrupt:_,onUpdate:b,onUpdateParams:[]};y=de.context(()=>{a.current.to(i.current,{alpha:1,duration:.01},h).from(s.current,{...x},h).to(i.current,{alpha:0,duration:.1},Number(u)-.1)})}return()=>y.revert()},[h,u]),st.useEffect(()=>{i.current&&r(!0)},[]),st.useEffect(()=>{i.current&&v.current&&(n.current.mute=d,n.current.speed=p,v.current.volume=d?0:1)},[d,p]),st.useEffect(()=>(te(c)||(v.current=pf.Sound.from({url:c,preload:!0,singleInstance:!0,loaded:()=>{n.current.loaded=!0}})),()=>{}),[f,c]),dt.jsx(yt.Container,{ref:i})};function Ug(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var wu=Ug;function Dg(){this.__data__=[],this.size=0}var $g=Dg;function jg(e,t){return e===t||e!==e&&t!==t}var Au=jg,Gg=Au;function qg(e,t){for(var r=e.length;r--;)if(Gg(e[r][0],t))return r;return-1}var vi=qg,Hg=vi,Vg=Array.prototype,zg=Vg.splice;function Xg(e){var t=this.__data__,r=Hg(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():zg.call(t,r,1),--this.size,!0}var Wg=Xg,Yg=vi;function Kg(e){var t=this.__data__,r=Yg(t,e);return r<0?void 0:t[r][1]}var Zg=Kg,Qg=vi;function Jg(e){return Qg(this.__data__,e)>-1}var t0=Jg,e0=vi;function r0(e,t){var r=this.__data__,n=e0(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var n0=r0,i0=$g,s0=Wg,a0=Zg,o0=t0,l0=n0;function Lr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Lr.prototype.clear=i0,Lr.prototype.delete=s0,Lr.prototype.get=a0,Lr.prototype.has=o0,Lr.prototype.set=l0;var yi=Lr,u0=yi;function f0(){this.__data__=new u0,this.size=0}var c0=f0;function h0(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var d0=h0;function p0(e){return this.__data__.get(e)}var v0=p0;function y0(e){return this.__data__.has(e)}var m0=y0,g0=Ir,b0=g0(Object,"create"),mi=b0,Su=mi;function _0(){this.__data__=Su?Su(null):{},this.size=0}var x0=_0;function E0(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var T0=E0,w0=mi,A0="__lodash_hash_undefined__",S0=Object.prototype,O0=S0.hasOwnProperty;function I0(e){var t=this.__data__;if(w0){var r=t[e];return r===A0?void 0:r}return O0.call(t,e)?t[e]:void 0}var R0=I0,N0=mi,C0=Object.prototype,P0=C0.hasOwnProperty;function k0(e){var t=this.__data__;return N0?t[e]!==void 0:P0.call(t,e)}var M0=k0,L0=mi,F0="__lodash_hash_undefined__";function B0(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=L0&&t===void 0?F0:t,this}var U0=B0,D0=x0,$0=T0,j0=R0,G0=M0,q0=U0;function Fr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Fr.prototype.clear=D0,Fr.prototype.delete=$0,Fr.prototype.get=j0,Fr.prototype.has=G0,Fr.prototype.set=q0;var H0=Fr,Ou=H0,V0=yi,z0=zs;function X0(){this.size=0,this.__data__={hash:new Ou,map:new(z0||V0),string:new Ou}}var W0=X0;function Y0(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var K0=Y0,Z0=K0;function Q0(e,t){var r=e.__data__;return Z0(t)?r[typeof t=="string"?"string":"hash"]:r.map}var gi=Q0,J0=gi;function tb(e){var t=J0(this,e).delete(e);return this.size-=t?1:0,t}var eb=tb,rb=gi;function nb(e){return rb(this,e).get(e)}var ib=nb,sb=gi;function ab(e){return sb(this,e).has(e)}var ob=ab,lb=gi;function ub(e,t){var r=lb(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var fb=ub,cb=W0,hb=eb,db=ib,pb=ob,vb=fb;function Br(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Br.prototype.clear=cb,Br.prototype.delete=hb,Br.prototype.get=db,Br.prototype.has=pb,Br.prototype.set=vb;var pa=Br,yb=yi,mb=zs,gb=pa,bb=200;function _b(e,t){var r=this.__data__;if(r instanceof yb){var n=r.__data__;if(!mb||n.length<bb-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new gb(n)}return r.set(e,t),this.size=r.size,this}var xb=_b,Eb=yi,Tb=c0,wb=d0,Ab=v0,Sb=m0,Ob=xb;function Ur(e){var t=this.__data__=new Eb(e);this.size=t.size}Ur.prototype.clear=Tb,Ur.prototype.delete=wb,Ur.prototype.get=Ab,Ur.prototype.has=Sb,Ur.prototype.set=Ob;var Iu=Ur,Ib="__lodash_hash_undefined__";function Rb(e){return this.__data__.set(e,Ib),this}var Nb=Rb;function Cb(e){return this.__data__.has(e)}var Pb=Cb,kb=pa,Mb=Nb,Lb=Pb;function bi(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new kb;++t<r;)this.add(e[t])}bi.prototype.add=bi.prototype.push=Mb,bi.prototype.has=Lb;var Fb=bi;function Bb(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Ub=Bb;function Db(e,t){return e.has(t)}var $b=Db,jb=Fb,Gb=Ub,qb=$b,Hb=1,Vb=2;function zb(e,t,r,n,i,s){var a=r&Hb,o=e.length,l=t.length;if(o!=l&&!(a&&l>o))return!1;var f=s.get(e),c=s.get(t);if(f&&c)return f==t&&c==e;var h=-1,u=!0,d=r&Vb?new jb:void 0;for(s.set(e,t),s.set(t,e);++h<o;){var p=e[h],v=t[h];if(n)var g=a?n(v,p,h,t,e,s):n(p,v,h,e,t,s);if(g!==void 0){if(g)continue;u=!1;break}if(d){if(!Gb(t,function(m,b){if(!qb(d,b)&&(p===m||i(p,m,r,n,s)))return d.push(b)})){u=!1;break}}else if(!(p===v||i(p,v,r,n,s))){u=!1;break}}return s.delete(e),s.delete(t),u}var Ru=zb,Xb=Ie,Wb=Xb.Uint8Array,Yb=Wb;function Kb(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var Zb=Kb;function Qb(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Jb=Qb,Nu=ri,Cu=Yb,t1=Au,e1=Ru,r1=Zb,n1=Jb,i1=1,s1=2,a1="[object Boolean]",o1="[object Date]",l1="[object Error]",u1="[object Map]",f1="[object Number]",c1="[object RegExp]",h1="[object Set]",d1="[object String]",p1="[object Symbol]",v1="[object ArrayBuffer]",y1="[object DataView]",Pu=Nu?Nu.prototype:void 0,va=Pu?Pu.valueOf:void 0;function m1(e,t,r,n,i,s,a){switch(r){case y1:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case v1:return!(e.byteLength!=t.byteLength||!s(new Cu(e),new Cu(t)));case a1:case o1:case f1:return t1(+e,+t);case l1:return e.name==t.name&&e.message==t.message;case c1:case d1:return e==t+"";case u1:var o=r1;case h1:var l=n&i1;if(o||(o=n1),e.size!=t.size&&!l)return!1;var f=a.get(e);if(f)return f==t;n|=s1,a.set(e,t);var c=e1(o(e),o(t),n,i,s,a);return a.delete(e),c;case p1:if(va)return va.call(e)==va.call(t)}return!1}var g1=m1;function b1(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var _1=b1,x1=_1,E1=_e;function T1(e,t,r){var n=t(e);return E1(e)?n:x1(n,r(e))}var w1=T1;function A1(e,t){for(var r=-1,n=e==null?0:e.length,i=0,s=[];++r<n;){var a=e[r];t(a,r,e)&&(s[i++]=a)}return s}var S1=A1;function O1(){return[]}var I1=O1,R1=S1,N1=I1,C1=Object.prototype,P1=C1.propertyIsEnumerable,ku=Object.getOwnPropertySymbols,k1=ku?function(e){return e==null?[]:(e=Object(e),R1(ku(e),function(t){return P1.call(e,t)}))}:N1,M1=k1;function L1(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var F1=L1,B1=9007199254740991,U1=/^(?:0|[1-9]\d*)$/;function D1(e,t){var r=typeof e;return t=t??B1,!!t&&(r=="number"||r!="symbol"&&U1.test(e))&&e>-1&&e%1==0&&e<t}var Mu=D1,$1=F1,j1=Qs,G1=_e,q1=ta,H1=Mu,V1=ea,z1=Object.prototype,X1=z1.hasOwnProperty;function W1(e,t){var r=G1(e),n=!r&&j1(e),i=!r&&!n&&q1(e),s=!r&&!n&&!i&&V1(e),a=r||n||i||s,o=a?$1(e.length,String):[],l=o.length;for(var f in e)(t||X1.call(e,f))&&!(a&&(f=="length"||i&&(f=="offset"||f=="parent")||s&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||H1(f,l)))&&o.push(f);return o}var Y1=W1,K1=Y1,Z1=Bl,Q1=ni;function J1(e){return Q1(e)?K1(e):Z1(e)}var ya=J1,t_=w1,e_=M1,r_=ya;function n_(e){return t_(e,r_,e_)}var i_=n_,Lu=i_,s_=1,a_=Object.prototype,o_=a_.hasOwnProperty;function l_(e,t,r,n,i,s){var a=r&s_,o=Lu(e),l=o.length,f=Lu(t),c=f.length;if(l!=c&&!a)return!1;for(var h=l;h--;){var u=o[h];if(!(a?u in t:o_.call(t,u)))return!1}var d=s.get(e),p=s.get(t);if(d&&p)return d==t&&p==e;var v=!0;s.set(e,t),s.set(t,e);for(var g=a;++h<l;){u=o[h];var m=e[u],b=t[u];if(n)var _=a?n(b,m,u,t,e,s):n(m,b,u,e,t,s);if(!(_===void 0?m===b||i(m,b,r,n,s):_)){v=!1;break}g||(g=u=="constructor")}if(v&&!g){var y=e.constructor,x=t.constructor;y!=x&&"constructor"in e&&"constructor"in t&&!(typeof y=="function"&&y instanceof y&&typeof x=="function"&&x instanceof x)&&(v=!1)}return s.delete(e),s.delete(t),v}var u_=l_,ma=Iu,f_=Ru,c_=g1,h_=u_,Fu=Ql,Bu=_e,Uu=ta,d_=ea,p_=1,Du="[object Arguments]",$u="[object Array]",_i="[object Object]",v_=Object.prototype,ju=v_.hasOwnProperty;function y_(e,t,r,n,i,s){var a=Bu(e),o=Bu(t),l=a?$u:Fu(e),f=o?$u:Fu(t);l=l==Du?_i:l,f=f==Du?_i:f;var c=l==_i,h=f==_i,u=l==f;if(u&&Uu(e)){if(!Uu(t))return!1;a=!0,c=!1}if(u&&!c)return s||(s=new ma),a||d_(e)?f_(e,t,r,n,i,s):c_(e,t,l,r,n,i,s);if(!(r&p_)){var d=c&&ju.call(e,"__wrapped__"),p=h&&ju.call(t,"__wrapped__");if(d||p){var v=d?e.value():e,g=p?t.value():t;return s||(s=new ma),i(v,g,r,n,s)}}return u?(s||(s=new ma),h_(e,t,r,n,i,s)):!1}var m_=y_,g_=m_,Gu=on;function qu(e,t,r,n,i){return e===t?!0:e==null||t==null||!Gu(e)&&!Gu(t)?e!==e&&t!==t:g_(e,t,r,n,qu,i)}var Hu=qu,b_=Iu,__=Hu,x_=1,E_=2;function T_(e,t,r,n){var i=r.length,s=i,a=!n;if(e==null)return!s;for(e=Object(e);i--;){var o=r[i];if(a&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i<s;){o=r[i];var l=o[0],f=e[l],c=o[1];if(a&&o[2]){if(f===void 0&&!(l in e))return!1}else{var h=new b_;if(n)var u=n(f,c,l,e,t,h);if(!(u===void 0?__(c,f,x_|E_,n,h):u))return!1}}return!0}var w_=T_,A_=Hs;function S_(e){return e===e&&!A_(e)}var Vu=S_,O_=Vu,I_=ya;function R_(e){for(var t=I_(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,O_(i)]}return t}var N_=R_;function C_(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var zu=C_,P_=w_,k_=N_,M_=zu;function L_(e){var t=k_(e);return t.length==1&&t[0][2]?M_(t[0][0],t[0][1]):function(r){return r===e||P_(r,e,t)}}var F_=L_,B_=an,U_=on,D_="[object Symbol]";function $_(e){return typeof e=="symbol"||U_(e)&&B_(e)==D_}var ga=$_,j_=_e,G_=ga,q_=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,H_=/^\w*$/;function V_(e,t){if(j_(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||G_(e)?!0:H_.test(e)||!q_.test(e)||t!=null&&e in Object(t)}var ba=V_,Xu=pa,z_="Expected a function";function _a(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(z_);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var a=e.apply(this,n);return r.cache=s.set(i,a)||s,a};return r.cache=new(_a.Cache||Xu),r}_a.Cache=Xu;var X_=_a,W_=X_,Y_=500;function K_(e){var t=W_(e,function(n){return r.size===Y_&&r.clear(),n}),r=t.cache;return t}var Z_=K_,Q_=Z_,J_=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,tx=/\\(\\)?/g,ex=Q_(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(J_,function(r,n,i,s){t.push(i?s.replace(tx,"$1"):n||r)}),t}),rx=ex,Wu=ri,nx=wu,ix=_e,sx=ga,ax=1/0,Yu=Wu?Wu.prototype:void 0,Ku=Yu?Yu.toString:void 0;function Zu(e){if(typeof e=="string")return e;if(ix(e))return nx(e,Zu)+"";if(sx(e))return Ku?Ku.call(e):"";var t=e+"";return t=="0"&&1/e==-ax?"-0":t}var ox=Zu,lx=ox;function ux(e){return e==null?"":lx(e)}var fx=ux,cx=_e,hx=ba,dx=rx,px=fx;function vx(e,t){return cx(e)?e:hx(e,t)?[e]:dx(px(e))}var Qu=vx,yx=ga,mx=1/0;function gx(e){if(typeof e=="string"||yx(e))return e;var t=e+"";return t=="0"&&1/e==-mx?"-0":t}var xi=gx,bx=Qu,_x=xi;function xx(e,t){t=bx(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[_x(t[r++])];return r&&r==n?e:void 0}var Ju=xx,Ex=Ju;function Tx(e,t,r){var n=e==null?void 0:Ex(e,t);return n===void 0?r:n}var wx=Tx;function Ax(e,t){return e!=null&&t in Object(e)}var Sx=Ax,Ox=Qu,Ix=Qs,Rx=_e,Nx=Mu,Cx=Js,Px=xi;function kx(e,t,r){t=Ox(t,e);for(var n=-1,i=t.length,s=!1;++n<i;){var a=Px(t[n]);if(!(s=e!=null&&r(e,a)))break;e=e[a]}return s||++n!=i?s:(i=e==null?0:e.length,!!i&&Cx(i)&&Nx(a,i)&&(Rx(e)||Ix(e)))}var Mx=kx,Lx=Sx,Fx=Mx;function Bx(e,t){return e!=null&&Fx(e,t,Lx)}var Ux=Bx,Dx=Hu,$x=wx,jx=Ux,Gx=ba,qx=Vu,Hx=zu,Vx=xi,zx=1,Xx=2;function Wx(e,t){return Gx(e)&&qx(t)?Hx(Vx(e),t):function(r){var n=$x(r,e);return n===void 0&&n===t?jx(r,e):Dx(t,n,zx|Xx)}}var Yx=Wx;function Kx(e){return e}var Zx=Kx;function Qx(e){return function(t){return t==null?void 0:t[e]}}var Jx=Qx,tE=Ju;function eE(e){return function(t){return tE(t,e)}}var rE=eE,nE=Jx,iE=rE,sE=ba,aE=xi;function oE(e){return sE(e)?nE(aE(e)):iE(e)}var lE=oE,uE=F_,fE=Yx,cE=Zx,hE=_e,dE=lE;function pE(e){return typeof e=="function"?e:e==null?cE:typeof e=="object"?hE(e)?fE(e[0],e[1]):uE(e):dE(e)}var vE=pE;function yE(e){return function(t,r,n){for(var i=-1,s=Object(t),a=n(t),o=a.length;o--;){var l=a[e?o:++i];if(r(s[l],l,s)===!1)break}return t}}var mE=yE,gE=mE,bE=gE(),_E=bE,xE=_E,EE=ya;function TE(e,t){return e&&xE(e,t,EE)}var wE=TE,AE=ni;function SE(e,t){return function(r,n){if(r==null)return r;if(!AE(r))return e(r,n);for(var i=r.length,s=t?i:-1,a=Object(r);(t?s--:++s<i)&&n(a[s],s,a)!==!1;);return r}}var OE=SE,IE=wE,RE=OE,NE=RE(IE),CE=NE,PE=CE,kE=ni;function ME(e,t){var r=-1,n=kE(e)?Array(e.length):[];return PE(e,function(i,s,a){n[++r]=t(i,s,a)}),n}var LE=ME,FE=wu,BE=vE,UE=LE,DE=_e;function $E(e,t){var r=DE(e)?FE:UE;return r(e,BE(t))}var jE=$E;const GE=sr(jE);var ir={},tf={},Ne={};Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.loop=Ne.conditional=Ne.parse=void 0;var qE=function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:n;if(Array.isArray(r))r.forEach(function(a){return e(t,a,n,i)});else if(typeof r=="function")r(t,n,i,e);else{var s=Object.keys(r)[0];Array.isArray(r[s])?(i[s]={},e(t,r[s],n,i[s])):i[s]=r[s](t,n,i,e)}return n};Ne.parse=qE;var HE=function(t,r){return function(n,i,s,a){r(n,i,s)&&a(n,t,i,s)}};Ne.conditional=HE;var VE=function(t,r){return function(n,i,s,a){for(var o=[],l=n.pos;r(n,i,s);){var f={};if(a(n,t,i,f),n.pos===l)break;l=n.pos,o.push(f)}return o}};Ne.loop=VE;var Ft={};Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.readBits=Ft.readArray=Ft.readUnsigned=Ft.readString=Ft.peekBytes=Ft.readBytes=Ft.peekByte=Ft.readByte=Ft.buildStream=void 0;var zE=function(t){return{data:t,pos:0}};Ft.buildStream=zE;var ef=function(){return function(t){return t.data[t.pos++]}};Ft.readByte=ef;var XE=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(r){return r.data[r.pos+t]}};Ft.peekByte=XE;var Ei=function(t){return function(r){return r.data.subarray(r.pos,r.pos+=t)}};Ft.readBytes=Ei;var WE=function(t){return function(r){return r.data.subarray(r.pos,r.pos+t)}};Ft.peekBytes=WE;var YE=function(t){return function(r){return Array.from(Ei(t)(r)).map(function(n){return String.fromCharCode(n)}).join("")}};Ft.readString=YE;var KE=function(t){return function(r){var n=Ei(2)(r);return t?(n[1]<<8)+n[0]:(n[0]<<8)+n[1]}};Ft.readUnsigned=KE;var ZE=function(t,r){return function(n,i,s){for(var a=typeof r=="function"?r(n,i,s):r,o=Ei(t),l=new Array(a),f=0;f<a;f++)l[f]=o(n);return l}};Ft.readArray=ZE;var QE=function(t,r,n){for(var i=0,s=0;s<n;s++)i+=t[r+s]&&Math.pow(2,n-s-1);return i},JE=function(t){return function(r){for(var n=ef()(r),i=new Array(8),s=0;s<8;s++)i[7-s]=!!(n&1<<s);return Object.keys(t).reduce(function(a,o){var l=t[o];return l.length?a[o]=QE(i,l.index,l.length):a[o]=i[l.index],a},{})}};Ft.readBits=JE,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Ne,r=Ft,n={blocks:function(u){for(var d=0,p=[],v=u.data.length,g=0,m=(0,r.readByte)()(u);m!==d&&m;m=(0,r.readByte)()(u)){if(u.pos+m>=v){var b=v-u.pos;p.push((0,r.readBytes)(b)(u)),g+=b;break}p.push((0,r.readBytes)(m)(u)),g+=m}for(var _=new Uint8Array(g),y=0,x=0;x<p.length;x++)_.set(p[x],y),y+=p[x].length;return _}},i=(0,t.conditional)({gce:[{codes:(0,r.readBytes)(2)},{byteSize:(0,r.readByte)()},{extras:(0,r.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,r.readUnsigned)(!0)},{transparentColorIndex:(0,r.readByte)()},{terminator:(0,r.readByte)()}]},function(h){var u=(0,r.peekBytes)(2)(h);return u[0]===33&&u[1]===249}),s=(0,t.conditional)({image:[{code:(0,r.readByte)()},{descriptor:[{left:(0,r.readUnsigned)(!0)},{top:(0,r.readUnsigned)(!0)},{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{lct:(0,r.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,t.conditional)({lct:(0,r.readArray)(3,function(h,u,d){return Math.pow(2,d.descriptor.lct.size+1)})},function(h,u,d){return d.descriptor.lct.exists}),{data:[{minCodeSize:(0,r.readByte)()},n]}]},function(h){return(0,r.peekByte)()(h)===44}),a=(0,t.conditional)({text:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{preData:function(u,d,p){return(0,r.readBytes)(p.text.blockSize)(u)}},n]},function(h){var u=(0,r.peekBytes)(2)(h);return u[0]===33&&u[1]===1}),o=(0,t.conditional)({application:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{id:function(u,d,p){return(0,r.readString)(p.blockSize)(u)}},n]},function(h){var u=(0,r.peekBytes)(2)(h);return u[0]===33&&u[1]===255}),l=(0,t.conditional)({comment:[{codes:(0,r.readBytes)(2)},n]},function(h){var u=(0,r.peekBytes)(2)(h);return u[0]===33&&u[1]===254}),f=[{header:[{signature:(0,r.readString)(3)},{version:(0,r.readString)(3)}]},{lsd:[{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{gct:(0,r.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,r.readByte)()},{pixelAspectRatio:(0,r.readByte)()}]},(0,t.conditional)({gct:(0,r.readArray)(3,function(h,u){return Math.pow(2,u.lsd.gct.size+1)})},function(h,u){return u.lsd.gct.exists}),{frames:(0,t.loop)([i,o,l,s,a],function(h){var u=(0,r.peekByte)()(h);return u===33||u===44})}],c=f;e.default=c}(tf);var Ti={};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.deinterlace=void 0;var tT=function(t,r){for(var n=new Array(t.length),i=t.length/r,s=function(u,d){var p=t.slice(d*r,(d+1)*r);n.splice.apply(n,[u*r,r].concat(p))},a=[0,4,2,1],o=[8,8,4,2],l=0,f=0;f<4;f++)for(var c=a[f];c<i;c+=o[f])s(c,l),l++;return n};Ti.deinterlace=tT;var wi={};Object.defineProperty(wi,"__esModule",{value:!0}),wi.lzw=void 0;var eT=function(t,r,n){var i=4096,s=-1,a=n,o,l,f,c,h,u,d,O,p,v,x,g,T,E,A,N,m=new Array(n),b=new Array(i),_=new Array(i),y=new Array(i+1);for(g=t,l=1<<g,h=l+1,o=l+2,d=s,c=g+1,f=(1<<c)-1,p=0;p<l;p++)b[p]=0,_[p]=p;var x,O,T,E,N,A;for(x=O=T=E=N=A=0,v=0;v<a;){if(E===0){if(O<c){x+=r[A]<<O,O+=8,A++;continue}if(p=x&f,x>>=c,O-=c,p>o||p==h)break;if(p==l){c=g+1,f=(1<<c)-1,o=l+2,d=s;continue}if(d==s){y[E++]=_[p],d=p,T=p;continue}for(u=p,p==o&&(y[E++]=T,p=d);p>l;)y[E++]=_[p],p=b[p];T=_[p]&255,y[E++]=T,o<i&&(b[o]=d,_[o]=T,o++,!(o&f)&&o<i&&(c++,f+=o)),d=u}E--,m[N++]=y[E],v++}for(v=N;v<a;v++)m[v]=0;return m};wi.lzw=eT,Object.defineProperty(ir,"__esModule",{value:!0}),ir.decompressFrames=ir.decompressFrame=ir.parseGIF=void 0;var rT=oT(tf),nT=Ne,iT=Ft,sT=Ti,aT=wi;function oT(e){return e&&e.__esModule?e:{default:e}}var lT=function(t){var r=new Uint8Array(t);return(0,nT.parse)((0,iT.buildStream)(r),rT.default)};ir.parseGIF=lT;var uT=function(t){for(var r=t.pixels.length,n=new Uint8ClampedArray(r*4),i=0;i<r;i++){var s=i*4,a=t.pixels[i],o=t.colorTable[a]||[0,0,0];n[s]=o[0],n[s+1]=o[1],n[s+2]=o[2],n[s+3]=a!==t.transparentIndex?255:0}return n},rf=function(t,r,n){if(!t.image){console.warn("gif frame does not have associated image.");return}var i=t.image,s=i.descriptor.width*i.descriptor.height,a=(0,aT.lzw)(i.data.minCodeSize,i.data.blocks,s);i.descriptor.lct.interlaced&&(a=(0,sT.deinterlace)(a,i.descriptor.width));var o={pixels:a,dims:{top:t.image.descriptor.top,left:t.image.descriptor.left,width:t.image.descriptor.width,height:t.image.descriptor.height}};return i.descriptor.lct&&i.descriptor.lct.exists?o.colorTable=i.lct:o.colorTable=r,t.gce&&(o.delay=(t.gce.delay||10)*10,o.disposalType=t.gce.extras.disposal,t.gce.extras.transparentColorGiven&&(o.transparentIndex=t.gce.transparentColorIndex)),n&&(o.patch=uT(o)),o};ir.decompressFrame=rf;var fT=function(t,r){return t.frames.filter(function(n){return n.image}).map(function(n){return rf(n,t.gct,r)})};ir.decompressFrames=fT;const nf=(e,t={})=>{typeof t=="function"&&(t=t(e));const r=t.loaded&&e.loaded!==t.loaded,{playing:n,...i}=t,s={...e,...i};return r&&Object.assign(s,{playing:s.autoPlay&&s.loaded}),(t.delays!=null||t.frames!=null)&&Object.assign(s,{length:s.frames.length}),(t.index!=null||t.frames!=null)&&Object.assign(s,{index:s.length===0?0:(s.length+s.index)%s.length}),t.playing!=null&&Object.assign(s,s.loaded?{playing:n}:{autoPlay:n}),s},cT=e=>nf({autoPlay:!0,playing:!1,frames:[],delays:[],index:0,length:0,loaded:!1},e),hT=e=>Q.useReducer(nf,e,cT);var dT='function e(e){var r={exports:{}};return e(r,r.exports),r.exports}var r=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.loop=r.conditional=r.parse=void 0;r.parse=function e(r,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;if(Array.isArray(t))t.forEach((function(t){return e(r,t,n,a)}));else if("function"==typeof t)t(r,n,a,e);else{var i=Object.keys(t)[0];Array.isArray(t[i])?(a[i]={},e(r,t[i],n,a[i])):a[i]=t[i](r,n,a,e)}return n};r.conditional=function(e,r){return function(t,n,a,i){r(t,n,a)&&i(t,e,n,a)}};r.loop=function(e,r){return function(t,n,a,i){for(var o=[];r(t,n,a);){var s={};i(t,e,n,s),o.push(s)}return o}}})),t=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.readBits=r.readArray=r.readUnsigned=r.readString=r.peekBytes=r.readBytes=r.peekByte=r.readByte=r.buildStream=void 0;r.buildStream=function(e){return{data:e,pos:0}};var t=function(){return function(e){return e.data[e.pos++]}};r.readByte=t;r.peekByte=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return function(r){return r.data[r.pos+e]}};var n=function(e){return function(r){return r.data.subarray(r.pos,r.pos+=e)}};r.readBytes=n;r.peekBytes=function(e){return function(r){return r.data.subarray(r.pos,r.pos+e)}};r.readString=function(e){return function(r){return Array.from(n(e)(r)).map((function(e){return String.fromCharCode(e)})).join("")}};r.readUnsigned=function(e){return function(r){var t=n(2)(r);return e?(t[1]<<8)+t[0]:(t[0]<<8)+t[1]}};r.readArray=function(e,r){return function(t,a,i){for(var o="function"==typeof r?r(t,a,i):r,s=n(e),d=new Array(o),c=0;c<o;c++)d[c]=s(t);return d}};r.readBits=function(e){return function(r){for(var t=function(e){return e.data[e.pos++]}(r),n=new Array(8),a=0;a<8;a++)n[7-a]=!!(t&1<<a);return Object.keys(e).reduce((function(r,t){var a=e[t];return a.length?r[t]=function(e,r,t){for(var n=0,a=0;a<t;a++)n+=e[r+a]&&Math.pow(2,t-a-1);return n}(n,a.index,a.length):r[t]=n[a.index],r}),{})}}})),n=e((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a={blocks:function(e){for(var r=[],n=e.data.length,a=0,i=(0,t.readByte)()(e);0!==i;i=(0,t.readByte)()(e)){if(e.pos+i>=n){var o=n-e.pos;r.push((0,t.readBytes)(o)(e)),a+=o;break}r.push((0,t.readBytes)(i)(e)),a+=i}for(var s=new Uint8Array(a),d=0,c=0;c<r.length;c++)s.set(r[c],d),d+=r[c].length;return s}},i=(0,r.conditional)({gce:[{codes:(0,t.readBytes)(2)},{byteSize:(0,t.readByte)()},{extras:(0,t.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,t.readUnsigned)(!0)},{transparentColorIndex:(0,t.readByte)()},{terminator:(0,t.readByte)()}]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&249===r[1]})),o=(0,r.conditional)({image:[{code:(0,t.readByte)()},{descriptor:[{left:(0,t.readUnsigned)(!0)},{top:(0,t.readUnsigned)(!0)},{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{lct:(0,t.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,r.conditional)({lct:(0,t.readArray)(3,(function(e,r,t){return Math.pow(2,t.descriptor.lct.size+1)}))},(function(e,r,t){return t.descriptor.lct.exists})),{data:[{minCodeSize:(0,t.readByte)()},a]}]},(function(e){return 44===(0,t.peekByte)()(e)})),s=(0,r.conditional)({text:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{preData:function(e,r,n){return(0,t.readBytes)(n.text.blockSize)(e)}},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&1===r[1]})),d=(0,r.conditional)({application:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{id:function(e,r,n){return(0,t.readString)(n.blockSize)(e)}},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&255===r[1]})),c=(0,r.conditional)({comment:[{codes:(0,t.readBytes)(2)},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&254===r[1]})),u=[{header:[{signature:(0,t.readString)(3)},{version:(0,t.readString)(3)}]},{lsd:[{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{gct:(0,t.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,t.readByte)()},{pixelAspectRatio:(0,t.readByte)()}]},(0,r.conditional)({gct:(0,t.readArray)(3,(function(e,r){return Math.pow(2,r.lsd.gct.size+1)}))},(function(e,r){return r.lsd.gct.exists})),{frames:(0,r.loop)([i,d,c,o,s],(function(e){var r=(0,t.peekByte)()(e);return 33===r||44===r}))}];n.default=u})),a=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.deinterlace=void 0;r.deinterlace=function(e,r){for(var t=new Array(e.length),n=e.length/r,a=function(n,a){var i=e.slice(a*r,(a+1)*r);t.splice.apply(t,[n*r,r].concat(i))},i=[0,4,2,1],o=[8,8,4,2],s=0,d=0;d<4;d++)for(var c=i[d];c<n;c+=o[d])a(c,s),s++;return t}})),i=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.lzw=void 0;r.lzw=function(e,r,t){var n,a,i,o,s,d,c,u,l,f,p,g,y,h,v,m,x=4096,B=t,w=new Array(t),b=new Array(x),k=new Array(x),A=new Array(4097);for(s=(a=1<<(f=e))+1,n=a+2,c=-1,i=(1<<(o=f+1))-1,u=0;u<a;u++)b[u]=0,k[u]=u;for(p=g=y=h=v=m=0,l=0;l<B;){if(0===h){if(g<o){p+=r[m]<<g,g+=8,m++;continue}if(u=p&i,p>>=o,g-=o,u>n||u==s)break;if(u==a){i=(1<<(o=f+1))-1,n=a+2,c=-1;continue}if(-1==c){A[h++]=k[u],c=u,y=u;continue}for(d=u,u==n&&(A[h++]=y,u=c);u>a;)A[h++]=k[u],u=b[u];y=255&k[u],A[h++]=y,n<x&&(b[n]=c,k[n]=y,0==(++n&i)&&n<x&&(o++,i+=n)),c=d}h--,w[v++]=A[h],l++}for(l=v;l<B;l++)w[l]=0;return w}})),o=e((function(e,o){Object.defineProperty(o,"__esModule",{value:!0}),o.decompressFrames=o.decompressFrame=o.parseGIF=void 0;var s,d=(s=n)&&s.__esModule?s:{default:s};o.parseGIF=function(e){var n=new Uint8Array(e);return(0,r.parse)((0,t.buildStream)(n),d.default)};var c=function(e,r,t){if(e.image){var n=e.image,o=n.descriptor.width*n.descriptor.height,s=(0,i.lzw)(n.data.minCodeSize,n.data.blocks,o);n.descriptor.lct.interlaced&&(s=(0,a.deinterlace)(s,n.descriptor.width));var d={pixels:s,dims:{top:e.image.descriptor.top,left:e.image.descriptor.left,width:e.image.descriptor.width,height:e.image.descriptor.height}};return n.descriptor.lct&&n.descriptor.lct.exists?d.colorTable=n.lct:d.colorTable=r,e.gce&&(d.delay=10*(e.gce.delay||10),d.disposalType=e.gce.extras.disposal,e.gce.extras.transparentColorGiven&&(d.transparentIndex=e.gce.transparentColorIndex)),t&&(d.patch=function(e){for(var r=e.pixels.length,t=new Uint8ClampedArray(4*r),n=0;n<r;n++){var a=4*n,i=e.pixels[n],o=e.colorTable[i]||[0,0,0];t[a]=o[0],t[a+1]=o[1],t[a+2]=o[2],t[a+3]=i!==e.transparentIndex?255:0}return t}(d)),d}console.warn("gif frame does not have associated image.")};o.decompressFrame=c;o.decompressFrames=function(e,r){return e.frames.filter((function(e){return e.image})).map((function(t){return c(t,e.gct,r)}))}}));const s=(e,r,t)=>{const{width:n,height:a,top:i,left:o}=r.dims,s=i*t.width+o;for(let i=0;i<a;i++)for(let a=0;a<n;a++){const o=i*n+a,d=r.pixels[o];if(d!==r.transparentIndex){const n=s+i*t.width+a,o=r.colorTable[d]||[0,0,0];e[4*n]=o[0],e[4*n+1]=o[1],e[4*n+2]=o[2],e[4*n+3]=255}}return e},d=new Map;self.addEventListener("message",(e=>{const{type:r,src:t}=e.data||e;switch(r){case"parse":if(!d.has(t)){const e=new AbortController,r={signal:e.signal};d.set(t,e),((e,{signal:r})=>fetch(e,{signal:r}).then((e=>{if(!e.headers.get("Content-Type").includes("image/gif"))throw Error(`Wrong content type: "${e.headers.get("Content-Type")}"`);return e.arrayBuffer()})).then((e=>o.parseGIF(e))).then((e=>((e=>{let r=null;for(const t of e.frames)r=t.gce?t.gce:r,"image"in t&&!("gce"in t)&&(t.gce=r)})(e),e))).then((e=>Promise.all([o.decompressFrames(e,!1),{width:e.lsd.width,height:e.lsd.height}]))).then((([e,r])=>{const t=[],n=r.width*r.height*4;for(let a=0;a<e.length;++a){const i=e[a],o=0===a||2===e[a-1].disposalType?new Uint8ClampedArray(n):t[a-1].slice();t.push(s(o,i,r))}return{...r,loaded:!0,delays:e.map((e=>e.delay)),frames:t}})))(t,r).then((e=>{self.postMessage(Object.assign(e,{src:t}),e.frames.map((e=>e.buffer)))})).catch((e=>{self.postMessage({src:t,error:e,loaded:!0})})).finally((()=>{d.delete(t)}))}break;case"cancel":if(d.has(t)){d.get(t).abort(),d.delete(t)}}}));\n';function pT(e){const t=new Blob([dT],{type:"application/javascript"}),r=URL.createObjectURL(t),n=new Worker(r,e);return URL.revokeObjectURL(r),n}const vT=e=>({...e,frames:e.frames.map(t=>{const r=new ImageData(e.width,e.height);return r.data.set(new Uint8ClampedArray(t)),r})}),yT=(e,t)=>{const r={};return()=>(r.instance||(r.instance=e()),Q.useLayoutEffect(()=>(r.timeout?(clearTimeout(r.timeout),delete r.timeout):r.usageCount=(r.usageCount||0)+1,()=>{r.timeout=setTimeout(()=>{r.usageCount=r.usageCount-1,r.usageCount===0&&(t&&t(r.instance),delete r.instance,delete r.timeout)})}),[r,t]),r.instance)},mT=e=>{const t=Q.useRef(e);return Q.useEffect(()=>{t.current=e},[e]),t},gT=e=>{const t=mT(e);return Q.useCallback(r=>t.current&&t.current(r),[])},bT=yT(()=>new pT,e=>e.terminate()),_T=(e,t)=>{const r=gT(t),n=bT();Q.useEffect(()=>{if(typeof e=="string"){const i=s=>{const a=s.data||s;if(a.src===e){const o=a.error?a:vT(a);r(o)}};return n.addEventListener("message",i),n.postMessage({src:e,type:"parse"}),()=>{n.postMessage({src:e,type:"cancel"}),n.removeEventListener("message",i)}}},[n,e])},xT=({isPlaying:e,forwardRef:t,...r})=>{const n=st.useRef(null);return st.useImperativeHandle(t,()=>n.current,[n]),st.useEffect(()=>{if(n.current===null)return;const i=n.current;i[e?"gotoAndPlay":"gotoAndStop"](i.currentFrame)},[e]),dt.jsx(yt.AnimatedSprite,{ref:n,...r,isPlaying:e})},sf=st.memo(xT),ET=yt.withFilters(yt.Container,{blur:ee.filters.BlurFilter,adjust:js,matrix:ee.filters.ColorMatrixFilter}),TT=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],wT={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1},AT=e=>{const[t,r]=st.useState([]),[,n]=st.useState(0),[i,s]=st.useState([]),[,a]=Q.useState(0),[,o]=Q.useState(!1),[l,f]=Q.useState(!1),[,c]=Q.useState(!1),[h,u]=hT({autoPlay:!1}),d=st.useRef(null),p=Q.useRef(null),v=Q.useRef(null),g=Q.useRef(null),m=Q.useRef(null),b=Q.useRef(null),_=Q.useRef(wT),y=Q.useRef(e.initialAlpha),{tl:x}=Q.useContext(Or),{frames:O,delays:T,loaded:E}=h,{uniqueId:N,src:A,startAt:w,endAt:S,locked:I,loop:C,transformation:{width:F=0,height:$=0,x:U,y:X,rotation:D=0,scale:P,animation:R,colorCorrection:k,effect:L},pointerdown:j,pointerup:G,mousedown:M,mouseup:B,pointerover:q,mouseover:H,mouseout:z,pointerout:Y,applyTransformer:J,onAnchorTransformationEnd:et}=e,{contrast:at=1,saturation:lt=1,exposure:Ct=1,blurRadius:Rt=0,alpha:V=1}=k||{},W={brightness:Ct,contrast:at,saturation:lt,alpha:V},Z=yt.useApp();_T(A,u),be(Kt.PAUSE,ut=>{console.log("pause event",ut),p.current&&(p.current.stop(),_.current.isPlaying=!1)});const tt=st.useCallback(ut=>{console.log("changeEnd",ut),et&&et(ut)},[]);st.useEffect(()=>{if(!te(O)){const ut=GE(O,xe=>{const{data:Lt,width:dn,height:Ai}=xe,kT=new Uint8Array(Lt);return ee.Texture.fromBuffer(kT,dn,Ai)}),je=ut.map((xe,Lt)=>({texture:xe,time:T[Lt]}));r(ut),s(je);let Dr=0;T.forEach(xe=>{Dr+=xe*10}),n(Dr)}},[O,T]);const K=ut=>{p.current&&(p.current.gotoAndPlay(ut||0),_.current.isPlaying=!0)},ft=()=>{p.current&&(p.current.stop(),_.current.isPlaying=!1)},ct=()=>{p.current&&(p.current.stop(),_.current.isPlaying=!1)},ht=()=>{p.current&&!_.current.isPlaying&&(p.current.play(),_.current.isPlaying=!0)},nt=()=>{o(!0)},At=ut=>{y.current=ut.alpha},Et=ut=>{y.current=ut.alpha};Q.useEffect(()=>{let ut=de.context(()=>{});if(v.current&&x.current){const je={duration:Number(S)-Number(w),onStart:K,onComplete:ft,onStartParams:[w],onCompleteParams:[],onInterrupt:ct,onUpdate:ht,onUpdateParams:[]},Dr={onStart:At,onStartParams:[{alpha:1}]},xe={onComplete:Et,onCompleteParams:[{alpha:0}]},Lt=qs(R||"None");ut=de.context(()=>{var dn,Ai;x.current.to(v.current,{alpha:1,duration:.01,...Dr},w).from(v.current,{...je},w).to(v.current,{alpha:0,duration:.1,...xe},Number(S)-.09),te(Lt.from)?te(Lt.to)?te(Lt.fromTo)||x.current.fromTo(v.current,(dn=Lt.fromTo)==null?void 0:dn.from,(Ai=Lt.fromTo)==null?void 0:Ai.to,w):x.current.to(v.current,{alpha:1,duration:.2,...Lt.to},w):x.current.from(v.current,{...Lt.from},w)})}return()=>ut.revert()},[R,w,S]);const $e=st.useCallback(()=>{f(!0)},[]);Z.ticker.add(ut=>{d.current&&(d.current.rotation+=.01*ut,d.current.clear().lineStyle(4,16777215,1).moveTo(40,0).arc(0,0,40,0,Math.PI*2*.6,!1))});const gt=st.useCallback(ut=>{ut.clear()},[]);return dt.jsxs(yt.Container,{ref:g,children:[dt.jsx(yt.Container,{ref:v,alpha:y.current,position:[U,X],pivot:[U,X],width:F,height:$,children:dt.jsxs(yt.Container,{ref:m,children:[!E&&dt.jsx(yt.Container,{anchor:.5,position:[F/2,$/2],children:dt.jsx(yt.Graphics,{x:U,y:X,ref:d,draw:gt})}),t&&t.length>0&&dt.jsx(ET,{scale:1,blur:{blur:Rt,quality:4},adjust:W,apply:({matrix:ut})=>{L==="BlackAndWhite"?ut.desaturate():L==="Sepia"?ut.sepia():L==="RetroVintage"||L==="NightVision"?ut.negative():L==="Normal"&&ut.reset()},matrix:{enabled:!0,matrix:TT},children:dt.jsx(sf,{x:U,y:X,width:F,height:$,rotation:D,animationSpeed:1,loop:C,textures:i,onComplete:nt,onFrameChange:ut=>a(ut),anchor:.5,...!I&&!l&&{interactive:!0,buttonMode:!0,pointerdown:j,pointerover:q,pointerout:Y,pointerup:G,mousedown:M,mouseup:B,mouseover:H,mouseout:z},forwardRef:p,scale:P})})]})}),J&&dt.jsx(Gs,{pixiTransformerRef:b,imageRef:v,isMounted:E,transformCommit:tt,transformChange:$e,mouseoverEvent:c,uniqueId:N})]})};var af={exports:{}};/*!
551
551
  * Quill Editor v1.3.7
552
552
  * https://quilljs.com/
553
553
  * Copyright (c) 2014, Jason Chen
554
554
  * Copyright (c) 2013, salesforce.com
555
555
  */(function(e,t){(function(n,i){e.exports=i()})(typeof self<"u"?self:Ce,function(){return function(r){var n={};function i(s){if(n[s])return n[s].exports;var a=n[s]={i:s,l:!1,exports:{}};return r[s].call(a.exports,a,a.exports,i),a.l=!0,a.exports}return i.m=r,i.c=n,i.d=function(s,a,o){i.o(s,a)||Object.defineProperty(s,a,{configurable:!1,enumerable:!0,get:o})},i.n=function(s){var a=s&&s.__esModule?function(){return s.default}:function(){return s};return i.d(a,"a",a),a},i.o=function(s,a){return Object.prototype.hasOwnProperty.call(s,a)},i.p="",i(i.s=109)}([function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(17),a=i(18),o=i(19),l=i(45),f=i(46),c=i(47),h=i(48),u=i(49),d=i(12),p=i(32),v=i(33),g=i(31),m=i(1),b={Scope:m.Scope,create:m.create,find:m.find,query:m.query,register:m.register,Container:s.default,Format:a.default,Leaf:o.default,Embed:h.default,Scroll:l.default,Block:c.default,Inline:f.default,Text:u.default,Attributor:{Attribute:d.default,Class:p.default,Style:v.default,Store:g.default}};n.default=b},function(r,n,i){var s=this&&this.__extends||function(){var g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,b){m.__proto__=b}||function(m,b){for(var _ in b)b.hasOwnProperty(_)&&(m[_]=b[_])};return function(m,b){g(m,b);function _(){this.constructor=m}m.prototype=b===null?Object.create(b):(_.prototype=b.prototype,new _)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=function(g){s(m,g);function m(b){var _=this;return b="[Parchment] "+b,_=g.call(this,b)||this,_.message=b,_.name=_.constructor.name,_}return m}(Error);n.ParchmentError=a;var o={},l={},f={},c={};n.DATA_KEY="__blot";var h;(function(g){g[g.TYPE=3]="TYPE",g[g.LEVEL=12]="LEVEL",g[g.ATTRIBUTE=13]="ATTRIBUTE",g[g.BLOT=14]="BLOT",g[g.INLINE=7]="INLINE",g[g.BLOCK=11]="BLOCK",g[g.BLOCK_BLOT=10]="BLOCK_BLOT",g[g.INLINE_BLOT=6]="INLINE_BLOT",g[g.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",g[g.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",g[g.ANY=15]="ANY"})(h=n.Scope||(n.Scope={}));function u(g,m){var b=p(g);if(b==null)throw new a("Unable to create "+g+" blot");var _=b,y=g instanceof Node||g.nodeType===Node.TEXT_NODE?g:_.create(m);return new _(y,m)}n.create=u;function d(g,m){return m===void 0&&(m=!1),g==null?null:g[n.DATA_KEY]!=null?g[n.DATA_KEY].blot:m?d(g.parentNode,m):null}n.find=d;function p(g,m){m===void 0&&(m=h.ANY);var b;if(typeof g=="string")b=c[g]||o[g];else if(g instanceof Text||g.nodeType===Node.TEXT_NODE)b=c.text;else if(typeof g=="number")g&h.LEVEL&h.BLOCK?b=c.block:g&h.LEVEL&h.INLINE&&(b=c.inline);else if(g instanceof HTMLElement){var _=(g.getAttribute("class")||"").split(/\s+/);for(var y in _)if(b=l[_[y]],b)break;b=b||f[g.tagName]}return b==null?null:m&h.LEVEL&b.scope&&m&h.TYPE&b.scope?b:null}n.query=p;function v(){for(var g=[],m=0;m<arguments.length;m++)g[m]=arguments[m];if(g.length>1)return g.map(function(y){return v(y)});var b=g[0];if(typeof b.blotName!="string"&&typeof b.attrName!="string")throw new a("Invalid definition");if(b.blotName==="abstract")throw new a("Cannot register abstract class");if(c[b.blotName||b.attrName]=b,typeof b.keyName=="string")o[b.keyName]=b;else if(b.className!=null&&(l[b.className]=b),b.tagName!=null){Array.isArray(b.tagName)?b.tagName=b.tagName.map(function(y){return y.toUpperCase()}):b.tagName=b.tagName.toUpperCase();var _=Array.isArray(b.tagName)?b.tagName:[b.tagName];_.forEach(function(y){(f[y]==null||b.className==null)&&(f[y]=b)})}return b}n.register=v},function(r,n,i){var s=i(51),a=i(11),o=i(3),l=i(20),f=String.fromCharCode(0),c=function(h){Array.isArray(h)?this.ops=h:h!=null&&Array.isArray(h.ops)?this.ops=h.ops:this.ops=[]};c.prototype.insert=function(h,u){var d={};return h.length===0?this:(d.insert=h,u!=null&&typeof u=="object"&&Object.keys(u).length>0&&(d.attributes=u),this.push(d))},c.prototype.delete=function(h){return h<=0?this:this.push({delete:h})},c.prototype.retain=function(h,u){if(h<=0)return this;var d={retain:h};return u!=null&&typeof u=="object"&&Object.keys(u).length>0&&(d.attributes=u),this.push(d)},c.prototype.push=function(h){var u=this.ops.length,d=this.ops[u-1];if(h=o(!0,{},h),typeof d=="object"){if(typeof h.delete=="number"&&typeof d.delete=="number")return this.ops[u-1]={delete:d.delete+h.delete},this;if(typeof d.delete=="number"&&h.insert!=null&&(u-=1,d=this.ops[u-1],typeof d!="object"))return this.ops.unshift(h),this;if(a(h.attributes,d.attributes)){if(typeof h.insert=="string"&&typeof d.insert=="string")return this.ops[u-1]={insert:d.insert+h.insert},typeof h.attributes=="object"&&(this.ops[u-1].attributes=h.attributes),this;if(typeof h.retain=="number"&&typeof d.retain=="number")return this.ops[u-1]={retain:d.retain+h.retain},typeof h.attributes=="object"&&(this.ops[u-1].attributes=h.attributes),this}}return u===this.ops.length?this.ops.push(h):this.ops.splice(u,0,h),this},c.prototype.chop=function(){var h=this.ops[this.ops.length-1];return h&&h.retain&&!h.attributes&&this.ops.pop(),this},c.prototype.filter=function(h){return this.ops.filter(h)},c.prototype.forEach=function(h){this.ops.forEach(h)},c.prototype.map=function(h){return this.ops.map(h)},c.prototype.partition=function(h){var u=[],d=[];return this.forEach(function(p){var v=h(p)?u:d;v.push(p)}),[u,d]},c.prototype.reduce=function(h,u){return this.ops.reduce(h,u)},c.prototype.changeLength=function(){return this.reduce(function(h,u){return u.insert?h+l.length(u):u.delete?h-u.delete:h},0)},c.prototype.length=function(){return this.reduce(function(h,u){return h+l.length(u)},0)},c.prototype.slice=function(h,u){h=h||0,typeof u!="number"&&(u=1/0);for(var d=[],p=l.iterator(this.ops),v=0;v<u&&p.hasNext();){var g;v<h?g=p.next(h-v):(g=p.next(u-v),d.push(g)),v+=l.length(g)}return new c(d)},c.prototype.compose=function(h){var u=l.iterator(this.ops),d=l.iterator(h.ops),p=[],v=d.peek();if(v!=null&&typeof v.retain=="number"&&v.attributes==null){for(var g=v.retain;u.peekType()==="insert"&&u.peekLength()<=g;)g-=u.peekLength(),p.push(u.next());v.retain-g>0&&d.next(v.retain-g)}for(var m=new c(p);u.hasNext()||d.hasNext();)if(d.peekType()==="insert")m.push(d.next());else if(u.peekType()==="delete")m.push(u.next());else{var b=Math.min(u.peekLength(),d.peekLength()),_=u.next(b),y=d.next(b);if(typeof y.retain=="number"){var x={};typeof _.retain=="number"?x.retain=b:x.insert=_.insert;var O=l.attributes.compose(_.attributes,y.attributes,typeof _.retain=="number");if(O&&(x.attributes=O),m.push(x),!d.hasNext()&&a(m.ops[m.ops.length-1],x)){var T=new c(u.rest());return m.concat(T).chop()}}else typeof y.delete=="number"&&typeof _.retain=="number"&&m.push(y)}return m.chop()},c.prototype.concat=function(h){var u=new c(this.ops.slice());return h.ops.length>0&&(u.push(h.ops[0]),u.ops=u.ops.concat(h.ops.slice(1))),u},c.prototype.diff=function(h,u){if(this.ops===h.ops)return new c;var d=[this,h].map(function(b){return b.map(function(_){if(_.insert!=null)return typeof _.insert=="string"?_.insert:f;var y=b===h?"on":"with";throw new Error("diff() called "+y+" non-document")}).join("")}),p=new c,v=s(d[0],d[1],u),g=l.iterator(this.ops),m=l.iterator(h.ops);return v.forEach(function(b){for(var _=b[1].length;_>0;){var y=0;switch(b[0]){case s.INSERT:y=Math.min(m.peekLength(),_),p.push(m.next(y));break;case s.DELETE:y=Math.min(_,g.peekLength()),g.next(y),p.delete(y);break;case s.EQUAL:y=Math.min(g.peekLength(),m.peekLength(),_);var x=g.next(y),O=m.next(y);a(x.insert,O.insert)?p.retain(y,l.attributes.diff(x.attributes,O.attributes)):p.push(O).delete(y);break}_-=y}}),p.chop()},c.prototype.eachLine=function(h,u){u=u||`
556
- `;for(var d=l.iterator(this.ops),p=new c,v=0;d.hasNext();){if(d.peekType()!=="insert")return;var g=d.peek(),m=l.length(g)-d.peekLength(),b=typeof g.insert=="string"?g.insert.indexOf(u,m)-m:-1;if(b<0)p.push(d.next());else if(b>0)p.push(d.next(b));else{if(h(p,d.next(1).attributes||{},v)===!1)return;v+=1,p=new c}}p.length()>0&&h(p,{},v)},c.prototype.transform=function(h,u){if(u=!!u,typeof h=="number")return this.transformPosition(h,u);for(var d=l.iterator(this.ops),p=l.iterator(h.ops),v=new c;d.hasNext()||p.hasNext();)if(d.peekType()==="insert"&&(u||p.peekType()!=="insert"))v.retain(l.length(d.next()));else if(p.peekType()==="insert")v.push(p.next());else{var g=Math.min(d.peekLength(),p.peekLength()),m=d.next(g),b=p.next(g);if(m.delete)continue;b.delete?v.push(b):v.retain(g,l.attributes.transform(m.attributes,b.attributes,u))}return v.chop()},c.prototype.transformPosition=function(h,u){u=!!u;for(var d=l.iterator(this.ops),p=0;d.hasNext()&&p<=h;){var v=d.peekLength(),g=d.peekType();if(d.next(),g==="delete"){h-=Math.min(v,h-p);continue}else g==="insert"&&(p<h||!u)&&(h+=v);p+=v}return h},r.exports=c},function(r,n){var i=Object.prototype.hasOwnProperty,s=Object.prototype.toString,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,l=function(d){return typeof Array.isArray=="function"?Array.isArray(d):s.call(d)==="[object Array]"},f=function(d){if(!d||s.call(d)!=="[object Object]")return!1;var p=i.call(d,"constructor"),v=d.constructor&&d.constructor.prototype&&i.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!p&&!v)return!1;var g;for(g in d);return typeof g>"u"||i.call(d,g)},c=function(d,p){a&&p.name==="__proto__"?a(d,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):d[p.name]=p.newValue},h=function(d,p){if(p==="__proto__")if(i.call(d,p)){if(o)return o(d,p).value}else return;return d[p]};r.exports=function u(){var d,p,v,g,m,b,_=arguments[0],y=1,x=arguments.length,O=!1;for(typeof _=="boolean"&&(O=_,_=arguments[1]||{},y=2),(_==null||typeof _!="object"&&typeof _!="function")&&(_={});y<x;++y)if(d=arguments[y],d!=null)for(p in d)v=h(_,p),g=h(d,p),_!==g&&(O&&g&&(f(g)||(m=l(g)))?(m?(m=!1,b=v&&l(v)?v:[]):b=v&&f(v)?v:{},c(_,{name:p,newValue:u(O,b,g)})):typeof g<"u"&&c(_,{name:p,newValue:g}));return _}},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BlockEmbed=n.bubbleFormats=void 0;var s=function(){function w(S,I){for(var C=0;C<I.length;C++){var F=I[C];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(S,F.key,F)}}return function(S,I,C){return I&&w(S.prototype,I),C&&w(S,C),S}}(),a=function w(S,I,C){S===null&&(S=Function.prototype);var F=Object.getOwnPropertyDescriptor(S,I);if(F===void 0){var D=Object.getPrototypeOf(S);return D===null?void 0:w(D,I,C)}else{if("value"in F)return F.value;var U=F.get;return U===void 0?void 0:U.call(C)}},o=i(3),l=_(o),f=i(2),c=_(f),h=i(0),u=_(h),d=i(16),p=_(d),v=i(6),g=_(v),m=i(7),b=_(m);function _(w){return w&&w.__esModule?w:{default:w}}function y(w,S){if(!(w instanceof S))throw new TypeError("Cannot call a class as a function")}function x(w,S){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:w}function O(w,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);w.prototype=Object.create(S&&S.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(w,S):w.__proto__=S)}var T=1,E=function(w){O(S,w);function S(){return y(this,S),x(this,(S.__proto__||Object.getPrototypeOf(S)).apply(this,arguments))}return s(S,[{key:"attach",value:function(){a(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"attach",this).call(this),this.attributes=new u.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return new c.default().insert(this.value(),(0,l.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(C,F){var D=u.default.query(C,u.default.Scope.BLOCK_ATTRIBUTE);D!=null&&this.attributes.attribute(D,F)}},{key:"formatAt",value:function(C,F,D,U){this.format(D,U)}},{key:"insertAt",value:function(C,F,D){if(typeof F=="string"&&F.endsWith(`
557
- `)){var U=u.default.create(N.blotName);this.parent.insertBefore(U,C===0?this:this.next),U.insertAt(0,F.slice(0,-1))}else a(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"insertAt",this).call(this,C,F,D)}}]),S}(u.default.Embed);E.scope=u.default.Scope.BLOCK_BLOT;var N=function(w){O(S,w);function S(I){y(this,S);var C=x(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,I));return C.cache={},C}return s(S,[{key:"delta",value:function(){return this.cache.delta==null&&(this.cache.delta=this.descendants(u.default.Leaf).reduce(function(C,F){return F.length()===0?C:C.insert(F.value(),A(F))},new c.default).insert(`
558
- `,A(this))),this.cache.delta}},{key:"deleteAt",value:function(C,F){a(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"deleteAt",this).call(this,C,F),this.cache={}}},{key:"formatAt",value:function(C,F,D,U){F<=0||(u.default.query(D,u.default.Scope.BLOCK)?C+F===this.length()&&this.format(D,U):a(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"formatAt",this).call(this,C,Math.min(F,this.length()-C-1),D,U),this.cache={})}},{key:"insertAt",value:function(C,F,D){if(D!=null)return a(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"insertAt",this).call(this,C,F,D);if(F.length!==0){var U=F.split(`
559
- `),X=U.shift();X.length>0&&(C<this.length()-1||this.children.tail==null?a(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"insertAt",this).call(this,Math.min(C,this.length()-1),X):this.children.tail.insertAt(this.children.tail.length(),X),this.cache={});var $=this;U.reduce(function(k,R){return $=$.split(k,!0),$.insertAt(0,R),R.length},C+X.length)}}},{key:"insertBefore",value:function(C,F){var D=this.children.head;a(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"insertBefore",this).call(this,C,F),D instanceof p.default&&D.remove(),this.cache={}}},{key:"length",value:function(){return this.cache.length==null&&(this.cache.length=a(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"length",this).call(this)+T),this.cache.length}},{key:"moveChildren",value:function(C,F){a(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"moveChildren",this).call(this,C,F),this.cache={}}},{key:"optimize",value:function(C){a(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"optimize",this).call(this,C),this.cache={}}},{key:"path",value:function(C){return a(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"path",this).call(this,C,!0)}},{key:"removeChild",value:function(C){a(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"removeChild",this).call(this,C),this.cache={}}},{key:"split",value:function(C){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(F&&(C===0||C>=this.length()-T)){var D=this.clone();return C===0?(this.parent.insertBefore(D,this),this):(this.parent.insertBefore(D,this.next),D)}else{var U=a(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"split",this).call(this,C,F);return this.cache={},U}}}]),S}(u.default.Block);N.blotName="block",N.tagName="P",N.defaultChild="break",N.allowedChildren=[g.default,u.default.Embed,b.default];function A(w){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return w==null||(typeof w.formats=="function"&&(S=(0,l.default)(S,w.formats())),w.parent==null||w.parent.blotName=="scroll"||w.parent.statics.scope!==w.statics.scope)?S:A(w.parent,S)}n.bubbleFormats=A,n.BlockEmbed=E,n.default=N},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.overload=n.expandConfig=void 0;var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},a=function(){function $(k,R){var P=[],L=!0,j=!1,G=void 0;try{for(var M=k[Symbol.iterator](),B;!(L=(B=M.next()).done)&&(P.push(B.value),!(R&&P.length===R));L=!0);}catch(q){j=!0,G=q}finally{try{!L&&M.return&&M.return()}finally{if(j)throw G}}return P}return function(k,R){if(Array.isArray(k))return k;if(Symbol.iterator in Object(k))return $(k,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function $(k,R){for(var P=0;P<R.length;P++){var L=R[P];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(k,L.key,L)}}return function(k,R,P){return R&&$(k.prototype,R),P&&$(k,P),k}}();i(50);var l=i(2),f=A(l),c=i(14),h=A(c),u=i(8),d=A(u),p=i(9),v=A(p),g=i(0),m=A(g),b=i(15),_=A(b),y=i(3),x=A(y),O=i(10),T=A(O),E=i(34),N=A(E);function A($){return $&&$.__esModule?$:{default:$}}function w($,k,R){return k in $?Object.defineProperty($,k,{value:R,enumerable:!0,configurable:!0,writable:!0}):$[k]=R,$}function S($,k){if(!($ instanceof k))throw new TypeError("Cannot call a class as a function")}var I=(0,T.default)("quill"),C=function(){o($,null,[{key:"debug",value:function(R){R===!0&&(R="log"),T.default.level(R)}},{key:"find",value:function(R){return R.__quill||m.default.find(R)}},{key:"import",value:function(R){return this.imports[R]==null&&I.error("Cannot import "+R+". Are you sure it was registered?"),this.imports[R]}},{key:"register",value:function(R,P){var L=this,j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof R!="string"){var G=R.attrName||R.blotName;typeof G=="string"?this.register("formats/"+G,R,P):Object.keys(R).forEach(function(M){L.register(M,R[M],P)})}else this.imports[R]!=null&&!j&&I.warn("Overwriting "+R+" with",P),this.imports[R]=P,(R.startsWith("blots/")||R.startsWith("formats/"))&&P.blotName!=="abstract"?m.default.register(P):R.startsWith("modules")&&typeof P.register=="function"&&P.register()}}]);function $(k){var R=this,P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(S(this,$),this.options=F(k,P),this.container=this.options.container,this.container==null)return I.error("Invalid Quill container",k);this.options.debug&&$.debug(this.options.debug);var L=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new d.default,this.scroll=m.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new h.default(this.scroll),this.selection=new _.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(d.default.events.EDITOR_CHANGE,function(G){G===d.default.events.TEXT_CHANGE&&R.root.classList.toggle("ql-blank",R.editor.isBlank())}),this.emitter.on(d.default.events.SCROLL_UPDATE,function(G,M){var B=R.selection.lastRange,q=B&&B.length===0?B.index:void 0;D.call(R,function(){return R.editor.update(null,M,q)},G)});var j=this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">`+L+"<p><br></p></div>");this.setContents(j),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return o($,[{key:"addContainer",value:function(R){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof R=="string"){var L=R;R=document.createElement("div"),R.classList.add(L)}return this.container.insertBefore(R,P),R}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(R,P,L){var j=this,G=U(R,P,L),M=a(G,4);return R=M[0],P=M[1],L=M[3],D.call(this,function(){return j.editor.deleteText(R,P)},L,R,-1*P)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(R),this.container.classList.toggle("ql-disabled",!R)}},{key:"focus",value:function(){var R=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=R,this.scrollIntoView()}},{key:"format",value:function(R,P){var L=this,j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:d.default.sources.API;return D.call(this,function(){var G=L.getSelection(!0),M=new f.default;if(G==null)return M;if(m.default.query(R,m.default.Scope.BLOCK))M=L.editor.formatLine(G.index,G.length,w({},R,P));else{if(G.length===0)return L.selection.format(R,P),M;M=L.editor.formatText(G.index,G.length,w({},R,P))}return L.setSelection(G,d.default.sources.SILENT),M},j)}},{key:"formatLine",value:function(R,P,L,j,G){var M=this,B=void 0,q=U(R,P,L,j,G),H=a(q,4);return R=H[0],P=H[1],B=H[2],G=H[3],D.call(this,function(){return M.editor.formatLine(R,P,B)},G,R,0)}},{key:"formatText",value:function(R,P,L,j,G){var M=this,B=void 0,q=U(R,P,L,j,G),H=a(q,4);return R=H[0],P=H[1],B=H[2],G=H[3],D.call(this,function(){return M.editor.formatText(R,P,B)},G,R,0)}},{key:"getBounds",value:function(R){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,L=void 0;typeof R=="number"?L=this.selection.getBounds(R,P):L=this.selection.getBounds(R.index,R.length);var j=this.container.getBoundingClientRect();return{bottom:L.bottom-j.top,height:L.height,left:L.left-j.left,right:L.right-j.left,top:L.top-j.top,width:L.width}}},{key:"getContents",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-R,L=U(R,P),j=a(L,2);return R=j[0],P=j[1],this.editor.getContents(R,P)}},{key:"getFormat",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof R=="number"?this.editor.getFormat(R,P):this.editor.getFormat(R.index,R.length)}},{key:"getIndex",value:function(R){return R.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(R){return this.scroll.leaf(R)}},{key:"getLine",value:function(R){return this.scroll.line(R)}},{key:"getLines",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof R!="number"?this.scroll.lines(R.index,R.length):this.scroll.lines(R,P)}},{key:"getModule",value:function(R){return this.theme.modules[R]}},{key:"getSelection",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return R&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-R,L=U(R,P),j=a(L,2);return R=j[0],P=j[1],this.editor.getText(R,P)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(R,P,L){var j=this,G=arguments.length>3&&arguments[3]!==void 0?arguments[3]:$.sources.API;return D.call(this,function(){return j.editor.insertEmbed(R,P,L)},G,R)}},{key:"insertText",value:function(R,P,L,j,G){var M=this,B=void 0,q=U(R,0,L,j,G),H=a(q,4);return R=H[0],B=H[2],G=H[3],D.call(this,function(){return M.editor.insertText(R,P,B)},G,R,P.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(R,P,L){this.clipboard.dangerouslyPasteHTML(R,P,L)}},{key:"removeFormat",value:function(R,P,L){var j=this,G=U(R,P,L),M=a(G,4);return R=M[0],P=M[1],L=M[3],D.call(this,function(){return j.editor.removeFormat(R,P)},L,R)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(R){var P=this,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d.default.sources.API;return D.call(this,function(){R=new f.default(R);var j=P.getLength(),G=P.editor.deleteText(0,j),M=P.editor.applyDelta(R),B=M.ops[M.ops.length-1];B!=null&&typeof B.insert=="string"&&B.insert[B.insert.length-1]===`
560
- `&&(P.editor.deleteText(P.getLength()-1,1),M.delete(1));var q=G.compose(M);return q},L)}},{key:"setSelection",value:function(R,P,L){if(R==null)this.selection.setRange(null,P||$.sources.API);else{var j=U(R,P,L),G=a(j,4);R=G[0],P=G[1],L=G[3],this.selection.setRange(new b.Range(R,P),L),L!==d.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(R){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d.default.sources.API,L=new f.default().insert(R);return this.setContents(L,P)}},{key:"update",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d.default.sources.USER,P=this.scroll.update(R);return this.selection.update(R),P}},{key:"updateContents",value:function(R){var P=this,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d.default.sources.API;return D.call(this,function(){return R=new f.default(R),P.editor.applyDelta(R,L)},L,!0)}}]),$}();C.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},C.events=d.default.events,C.sources=d.default.sources,C.version="1.3.7",C.imports={delta:f.default,parchment:m.default,"core/module":v.default,"core/theme":N.default};function F($,k){if(k=(0,x.default)(!0,{container:$,modules:{clipboard:!0,keyboard:!0,history:!0}},k),!k.theme||k.theme===C.DEFAULTS.theme)k.theme=N.default;else if(k.theme=C.import("themes/"+k.theme),k.theme==null)throw new Error("Invalid theme "+k.theme+". Did you register it?");var R=(0,x.default)(!0,{},k.theme.DEFAULTS);[R,k].forEach(function(j){j.modules=j.modules||{},Object.keys(j.modules).forEach(function(G){j.modules[G]===!0&&(j.modules[G]={})})});var P=Object.keys(R.modules).concat(Object.keys(k.modules)),L=P.reduce(function(j,G){var M=C.import("modules/"+G);return M==null?I.error("Cannot load "+G+" module. Are you sure you registered it?"):j[G]=M.DEFAULTS||{},j},{});return k.modules!=null&&k.modules.toolbar&&k.modules.toolbar.constructor!==Object&&(k.modules.toolbar={container:k.modules.toolbar}),k=(0,x.default)(!0,{},C.DEFAULTS,{modules:L},R,k),["bounds","container","scrollingContainer"].forEach(function(j){typeof k[j]=="string"&&(k[j]=document.querySelector(k[j]))}),k.modules=Object.keys(k.modules).reduce(function(j,G){return k.modules[G]&&(j[G]=k.modules[G]),j},{}),k}function D($,k,R,P){if(this.options.strict&&!this.isEnabled()&&k===d.default.sources.USER)return new f.default;var L=R==null?null:this.getSelection(),j=this.editor.delta,G=$();if(L!=null&&(R===!0&&(R=L.index),P==null?L=X(L,G,k):P!==0&&(L=X(L,R,P,k)),this.setSelection(L,d.default.sources.SILENT)),G.length()>0){var M,B=[d.default.events.TEXT_CHANGE,G,j,k];if((M=this.emitter).emit.apply(M,[d.default.events.EDITOR_CHANGE].concat(B)),k!==d.default.sources.SILENT){var q;(q=this.emitter).emit.apply(q,B)}}return G}function U($,k,R,P,L){var j={};return typeof $.index=="number"&&typeof $.length=="number"?typeof k!="number"?(L=P,P=R,R=k,k=$.length,$=$.index):(k=$.length,$=$.index):typeof k!="number"&&(L=P,P=R,R=k,k=0),(typeof R>"u"?"undefined":s(R))==="object"?(j=R,L=P):typeof R=="string"&&(P!=null?j[R]=P:L=R),L=L||d.default.sources.API,[$,k,j,L]}function X($,k,R,P){if($==null)return null;var L=void 0,j=void 0;if(k instanceof f.default){var G=[$.index,$.index+$.length].map(function(H){return k.transformPosition(H,P!==d.default.sources.USER)}),M=a(G,2);L=M[0],j=M[1]}else{var B=[$.index,$.index+$.length].map(function(H){return H<k||H===k&&P===d.default.sources.USER?H:R>=0?H+R:Math.max(k,H+R)}),q=a(B,2);L=q[0],j=q[1]}return new b.Range(L,j-L)}n.expandConfig=F,n.overload=U,n.default=C},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function g(m,b){for(var _=0;_<b.length;_++){var y=b[_];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(m,y.key,y)}}return function(m,b,_){return b&&g(m.prototype,b),_&&g(m,_),m}}(),a=function g(m,b,_){m===null&&(m=Function.prototype);var y=Object.getOwnPropertyDescriptor(m,b);if(y===void 0){var x=Object.getPrototypeOf(m);return x===null?void 0:g(x,b,_)}else{if("value"in y)return y.value;var O=y.get;return O===void 0?void 0:O.call(_)}},o=i(7),l=h(o),f=i(0),c=h(f);function h(g){return g&&g.__esModule?g:{default:g}}function u(g,m){if(!(g instanceof m))throw new TypeError("Cannot call a class as a function")}function d(g,m){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:g}function p(g,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);g.prototype=Object.create(m&&m.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(g,m):g.__proto__=m)}var v=function(g){p(m,g);function m(){return u(this,m),d(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return s(m,[{key:"formatAt",value:function(_,y,x,O){if(m.compare(this.statics.blotName,x)<0&&c.default.query(x,c.default.Scope.BLOT)){var T=this.isolate(_,y);O&&T.wrap(x,O)}else a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"formatAt",this).call(this,_,y,x,O)}},{key:"optimize",value:function(_){if(a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"optimize",this).call(this,_),this.parent instanceof m&&m.compare(this.statics.blotName,this.parent.statics.blotName)>0){var y=this.parent.isolate(this.offset(),this.length());this.moveChildren(y),y.wrap(this)}}}],[{key:"compare",value:function(_,y){var x=m.order.indexOf(_),O=m.order.indexOf(y);return x>=0||O>=0?x-O:_===y?0:_<y?-1:1}}]),m}(c.default.Inline);v.allowedChildren=[v,c.default.Embed,l.default],v.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(0),a=o(s);function o(u){return u&&u.__esModule?u:{default:u}}function l(u,d){if(!(u instanceof d))throw new TypeError("Cannot call a class as a function")}function f(u,d){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:u}function c(u,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);u.prototype=Object.create(d&&d.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(u,d):u.__proto__=d)}var h=function(u){c(d,u);function d(){return l(this,d),f(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}return d}(a.default.Text);n.default=h},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function b(_,y){for(var x=0;x<y.length;x++){var O=y[x];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(_,O.key,O)}}return function(_,y,x){return y&&b(_.prototype,y),x&&b(_,x),_}}(),a=function b(_,y,x){_===null&&(_=Function.prototype);var O=Object.getOwnPropertyDescriptor(_,y);if(O===void 0){var T=Object.getPrototypeOf(_);return T===null?void 0:b(T,y,x)}else{if("value"in O)return O.value;var E=O.get;return E===void 0?void 0:E.call(x)}},o=i(54),l=h(o),f=i(10),c=h(f);function h(b){return b&&b.__esModule?b:{default:b}}function u(b,_){if(!(b instanceof _))throw new TypeError("Cannot call a class as a function")}function d(b,_){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:b}function p(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=(0,c.default)("quill:events"),g=["selectionchange","mousedown","mouseup","click"];g.forEach(function(b){document.addEventListener(b,function(){for(var _=arguments.length,y=Array(_),x=0;x<_;x++)y[x]=arguments[x];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(O){if(O.__quill&&O.__quill.emitter){var T;(T=O.__quill.emitter).handleDOM.apply(T,y)}})})});var m=function(b){p(_,b);function _(){u(this,_);var y=d(this,(_.__proto__||Object.getPrototypeOf(_)).call(this));return y.listeners={},y.on("error",v.error),y}return s(_,[{key:"emit",value:function(){v.log.apply(v,arguments),a(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(x){for(var O=arguments.length,T=Array(O>1?O-1:0),E=1;E<O;E++)T[E-1]=arguments[E];(this.listeners[x.type]||[]).forEach(function(N){var A=N.node,w=N.handler;(x.target===A||A.contains(x.target))&&w.apply(void 0,[x].concat(T))})}},{key:"listenDOM",value:function(x,O,T){this.listeners[x]||(this.listeners[x]=[]),this.listeners[x].push({node:O,handler:T})}}]),_}(l.default);m.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},m.sources={API:"api",SILENT:"silent",USER:"user"},n.default=m},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});function s(o,l){if(!(o instanceof l))throw new TypeError("Cannot call a class as a function")}var a=function o(l){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};s(this,o),this.quill=l,this.options=f};a.DEFAULTS={},n.default=a},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=["error","warn","log","info"],a="warn";function o(f){if(s.indexOf(f)<=s.indexOf(a)){for(var c,h=arguments.length,u=Array(h>1?h-1:0),d=1;d<h;d++)u[d-1]=arguments[d];(c=console)[f].apply(c,u)}}function l(f){return s.reduce(function(c,h){return c[h]=o.bind(console,h,f),c},{})}o.level=l.level=function(f){a=f},n.default=l},function(r,n,i){var s=Array.prototype.slice,a=i(52),o=i(53),l=r.exports=function(u,d,p){return p||(p={}),u===d?!0:u instanceof Date&&d instanceof Date?u.getTime()===d.getTime():!u||!d||typeof u!="object"&&typeof d!="object"?p.strict?u===d:u==d:h(u,d,p)};function f(u){return u==null}function c(u){return!(!u||typeof u!="object"||typeof u.length!="number"||typeof u.copy!="function"||typeof u.slice!="function"||u.length>0&&typeof u[0]!="number")}function h(u,d,p){var v,g;if(f(u)||f(d)||u.prototype!==d.prototype)return!1;if(o(u))return o(d)?(u=s.call(u),d=s.call(d),l(u,d,p)):!1;if(c(u)){if(!c(d)||u.length!==d.length)return!1;for(v=0;v<u.length;v++)if(u[v]!==d[v])return!1;return!0}try{var m=a(u),b=a(d)}catch{return!1}if(m.length!=b.length)return!1;for(m.sort(),b.sort(),v=m.length-1;v>=0;v--)if(m[v]!=b[v])return!1;for(v=m.length-1;v>=0;v--)if(g=m[v],!l(u[g],d[g],p))return!1;return typeof u==typeof d}},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(1),a=function(){function o(l,f,c){c===void 0&&(c={}),this.attrName=l,this.keyName=f;var h=s.Scope.TYPE&s.Scope.ATTRIBUTE;c.scope!=null?this.scope=c.scope&s.Scope.LEVEL|h:this.scope=s.Scope.ATTRIBUTE,c.whitelist!=null&&(this.whitelist=c.whitelist)}return o.keys=function(l){return[].map.call(l.attributes,function(f){return f.name})},o.prototype.add=function(l,f){return this.canAdd(l,f)?(l.setAttribute(this.keyName,f),!0):!1},o.prototype.canAdd=function(l,f){var c=s.query(l,s.Scope.BLOT&(this.scope|s.Scope.TYPE));return c==null?!1:this.whitelist==null?!0:typeof f=="string"?this.whitelist.indexOf(f.replace(/["']/g,""))>-1:this.whitelist.indexOf(f)>-1},o.prototype.remove=function(l){l.removeAttribute(this.keyName)},o.prototype.value=function(l){var f=l.getAttribute(this.keyName);return this.canAdd(l,f)&&f?f:""},o}();n.default=a},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.Code=void 0;var s=function(){function E(N,A){var w=[],S=!0,I=!1,C=void 0;try{for(var F=N[Symbol.iterator](),D;!(S=(D=F.next()).done)&&(w.push(D.value),!(A&&w.length===A));S=!0);}catch(U){I=!0,C=U}finally{try{!S&&F.return&&F.return()}finally{if(I)throw C}}return w}return function(N,A){if(Array.isArray(N))return N;if(Symbol.iterator in Object(N))return E(N,A);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function E(N,A){for(var w=0;w<A.length;w++){var S=A[w];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(N,S.key,S)}}return function(N,A,w){return A&&E(N.prototype,A),w&&E(N,w),N}}(),o=function E(N,A,w){N===null&&(N=Function.prototype);var S=Object.getOwnPropertyDescriptor(N,A);if(S===void 0){var I=Object.getPrototypeOf(N);return I===null?void 0:E(I,A,w)}else{if("value"in S)return S.value;var C=S.get;return C===void 0?void 0:C.call(w)}},l=i(2),f=b(l),c=i(0),h=b(c),u=i(4),d=b(u),p=i(6),v=b(p),g=i(7),m=b(g);function b(E){return E&&E.__esModule?E:{default:E}}function _(E,N){if(!(E instanceof N))throw new TypeError("Cannot call a class as a function")}function y(E,N){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N&&(typeof N=="object"||typeof N=="function")?N:E}function x(E,N){if(typeof N!="function"&&N!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof N);E.prototype=Object.create(N&&N.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),N&&(Object.setPrototypeOf?Object.setPrototypeOf(E,N):E.__proto__=N)}var O=function(E){x(N,E);function N(){return _(this,N),y(this,(N.__proto__||Object.getPrototypeOf(N)).apply(this,arguments))}return N}(v.default);O.blotName="code",O.tagName="CODE";var T=function(E){x(N,E);function N(){return _(this,N),y(this,(N.__proto__||Object.getPrototypeOf(N)).apply(this,arguments))}return a(N,[{key:"delta",value:function(){var w=this,S=this.domNode.textContent;return S.endsWith(`
556
+ `;for(var d=l.iterator(this.ops),p=new c,v=0;d.hasNext();){if(d.peekType()!=="insert")return;var g=d.peek(),m=l.length(g)-d.peekLength(),b=typeof g.insert=="string"?g.insert.indexOf(u,m)-m:-1;if(b<0)p.push(d.next());else if(b>0)p.push(d.next(b));else{if(h(p,d.next(1).attributes||{},v)===!1)return;v+=1,p=new c}}p.length()>0&&h(p,{},v)},c.prototype.transform=function(h,u){if(u=!!u,typeof h=="number")return this.transformPosition(h,u);for(var d=l.iterator(this.ops),p=l.iterator(h.ops),v=new c;d.hasNext()||p.hasNext();)if(d.peekType()==="insert"&&(u||p.peekType()!=="insert"))v.retain(l.length(d.next()));else if(p.peekType()==="insert")v.push(p.next());else{var g=Math.min(d.peekLength(),p.peekLength()),m=d.next(g),b=p.next(g);if(m.delete)continue;b.delete?v.push(b):v.retain(g,l.attributes.transform(m.attributes,b.attributes,u))}return v.chop()},c.prototype.transformPosition=function(h,u){u=!!u;for(var d=l.iterator(this.ops),p=0;d.hasNext()&&p<=h;){var v=d.peekLength(),g=d.peekType();if(d.next(),g==="delete"){h-=Math.min(v,h-p);continue}else g==="insert"&&(p<h||!u)&&(h+=v);p+=v}return h},r.exports=c},function(r,n){var i=Object.prototype.hasOwnProperty,s=Object.prototype.toString,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,l=function(d){return typeof Array.isArray=="function"?Array.isArray(d):s.call(d)==="[object Array]"},f=function(d){if(!d||s.call(d)!=="[object Object]")return!1;var p=i.call(d,"constructor"),v=d.constructor&&d.constructor.prototype&&i.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!p&&!v)return!1;var g;for(g in d);return typeof g>"u"||i.call(d,g)},c=function(d,p){a&&p.name==="__proto__"?a(d,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):d[p.name]=p.newValue},h=function(d,p){if(p==="__proto__")if(i.call(d,p)){if(o)return o(d,p).value}else return;return d[p]};r.exports=function u(){var d,p,v,g,m,b,_=arguments[0],y=1,x=arguments.length,O=!1;for(typeof _=="boolean"&&(O=_,_=arguments[1]||{},y=2),(_==null||typeof _!="object"&&typeof _!="function")&&(_={});y<x;++y)if(d=arguments[y],d!=null)for(p in d)v=h(_,p),g=h(d,p),_!==g&&(O&&g&&(f(g)||(m=l(g)))?(m?(m=!1,b=v&&l(v)?v:[]):b=v&&f(v)?v:{},c(_,{name:p,newValue:u(O,b,g)})):typeof g<"u"&&c(_,{name:p,newValue:g}));return _}},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BlockEmbed=n.bubbleFormats=void 0;var s=function(){function w(S,I){for(var C=0;C<I.length;C++){var F=I[C];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(S,F.key,F)}}return function(S,I,C){return I&&w(S.prototype,I),C&&w(S,C),S}}(),a=function w(S,I,C){S===null&&(S=Function.prototype);var F=Object.getOwnPropertyDescriptor(S,I);if(F===void 0){var $=Object.getPrototypeOf(S);return $===null?void 0:w($,I,C)}else{if("value"in F)return F.value;var U=F.get;return U===void 0?void 0:U.call(C)}},o=i(3),l=_(o),f=i(2),c=_(f),h=i(0),u=_(h),d=i(16),p=_(d),v=i(6),g=_(v),m=i(7),b=_(m);function _(w){return w&&w.__esModule?w:{default:w}}function y(w,S){if(!(w instanceof S))throw new TypeError("Cannot call a class as a function")}function x(w,S){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:w}function O(w,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);w.prototype=Object.create(S&&S.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(w,S):w.__proto__=S)}var T=1,E=function(w){O(S,w);function S(){return y(this,S),x(this,(S.__proto__||Object.getPrototypeOf(S)).apply(this,arguments))}return s(S,[{key:"attach",value:function(){a(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"attach",this).call(this),this.attributes=new u.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return new c.default().insert(this.value(),(0,l.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(C,F){var $=u.default.query(C,u.default.Scope.BLOCK_ATTRIBUTE);$!=null&&this.attributes.attribute($,F)}},{key:"formatAt",value:function(C,F,$,U){this.format($,U)}},{key:"insertAt",value:function(C,F,$){if(typeof F=="string"&&F.endsWith(`
557
+ `)){var U=u.default.create(N.blotName);this.parent.insertBefore(U,C===0?this:this.next),U.insertAt(0,F.slice(0,-1))}else a(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"insertAt",this).call(this,C,F,$)}}]),S}(u.default.Embed);E.scope=u.default.Scope.BLOCK_BLOT;var N=function(w){O(S,w);function S(I){y(this,S);var C=x(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,I));return C.cache={},C}return s(S,[{key:"delta",value:function(){return this.cache.delta==null&&(this.cache.delta=this.descendants(u.default.Leaf).reduce(function(C,F){return F.length()===0?C:C.insert(F.value(),A(F))},new c.default).insert(`
558
+ `,A(this))),this.cache.delta}},{key:"deleteAt",value:function(C,F){a(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"deleteAt",this).call(this,C,F),this.cache={}}},{key:"formatAt",value:function(C,F,$,U){F<=0||(u.default.query($,u.default.Scope.BLOCK)?C+F===this.length()&&this.format($,U):a(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"formatAt",this).call(this,C,Math.min(F,this.length()-C-1),$,U),this.cache={})}},{key:"insertAt",value:function(C,F,$){if($!=null)return a(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"insertAt",this).call(this,C,F,$);if(F.length!==0){var U=F.split(`
559
+ `),X=U.shift();X.length>0&&(C<this.length()-1||this.children.tail==null?a(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"insertAt",this).call(this,Math.min(C,this.length()-1),X):this.children.tail.insertAt(this.children.tail.length(),X),this.cache={});var D=this;U.reduce(function(P,R){return D=D.split(P,!0),D.insertAt(0,R),R.length},C+X.length)}}},{key:"insertBefore",value:function(C,F){var $=this.children.head;a(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"insertBefore",this).call(this,C,F),$ instanceof p.default&&$.remove(),this.cache={}}},{key:"length",value:function(){return this.cache.length==null&&(this.cache.length=a(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"length",this).call(this)+T),this.cache.length}},{key:"moveChildren",value:function(C,F){a(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"moveChildren",this).call(this,C,F),this.cache={}}},{key:"optimize",value:function(C){a(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"optimize",this).call(this,C),this.cache={}}},{key:"path",value:function(C){return a(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"path",this).call(this,C,!0)}},{key:"removeChild",value:function(C){a(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"removeChild",this).call(this,C),this.cache={}}},{key:"split",value:function(C){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(F&&(C===0||C>=this.length()-T)){var $=this.clone();return C===0?(this.parent.insertBefore($,this),this):(this.parent.insertBefore($,this.next),$)}else{var U=a(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"split",this).call(this,C,F);return this.cache={},U}}}]),S}(u.default.Block);N.blotName="block",N.tagName="P",N.defaultChild="break",N.allowedChildren=[g.default,u.default.Embed,b.default];function A(w){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return w==null||(typeof w.formats=="function"&&(S=(0,l.default)(S,w.formats())),w.parent==null||w.parent.blotName=="scroll"||w.parent.statics.scope!==w.statics.scope)?S:A(w.parent,S)}n.bubbleFormats=A,n.BlockEmbed=E,n.default=N},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.overload=n.expandConfig=void 0;var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(D){return typeof D}:function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},a=function(){function D(P,R){var k=[],L=!0,j=!1,G=void 0;try{for(var M=P[Symbol.iterator](),B;!(L=(B=M.next()).done)&&(k.push(B.value),!(R&&k.length===R));L=!0);}catch(q){j=!0,G=q}finally{try{!L&&M.return&&M.return()}finally{if(j)throw G}}return k}return function(P,R){if(Array.isArray(P))return P;if(Symbol.iterator in Object(P))return D(P,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function D(P,R){for(var k=0;k<R.length;k++){var L=R[k];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(P,L.key,L)}}return function(P,R,k){return R&&D(P.prototype,R),k&&D(P,k),P}}();i(50);var l=i(2),f=A(l),c=i(14),h=A(c),u=i(8),d=A(u),p=i(9),v=A(p),g=i(0),m=A(g),b=i(15),_=A(b),y=i(3),x=A(y),O=i(10),T=A(O),E=i(34),N=A(E);function A(D){return D&&D.__esModule?D:{default:D}}function w(D,P,R){return P in D?Object.defineProperty(D,P,{value:R,enumerable:!0,configurable:!0,writable:!0}):D[P]=R,D}function S(D,P){if(!(D instanceof P))throw new TypeError("Cannot call a class as a function")}var I=(0,T.default)("quill"),C=function(){o(D,null,[{key:"debug",value:function(R){R===!0&&(R="log"),T.default.level(R)}},{key:"find",value:function(R){return R.__quill||m.default.find(R)}},{key:"import",value:function(R){return this.imports[R]==null&&I.error("Cannot import "+R+". Are you sure it was registered?"),this.imports[R]}},{key:"register",value:function(R,k){var L=this,j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof R!="string"){var G=R.attrName||R.blotName;typeof G=="string"?this.register("formats/"+G,R,k):Object.keys(R).forEach(function(M){L.register(M,R[M],k)})}else this.imports[R]!=null&&!j&&I.warn("Overwriting "+R+" with",k),this.imports[R]=k,(R.startsWith("blots/")||R.startsWith("formats/"))&&k.blotName!=="abstract"?m.default.register(k):R.startsWith("modules")&&typeof k.register=="function"&&k.register()}}]);function D(P){var R=this,k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(S(this,D),this.options=F(P,k),this.container=this.options.container,this.container==null)return I.error("Invalid Quill container",P);this.options.debug&&D.debug(this.options.debug);var L=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new d.default,this.scroll=m.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new h.default(this.scroll),this.selection=new _.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(d.default.events.EDITOR_CHANGE,function(G){G===d.default.events.TEXT_CHANGE&&R.root.classList.toggle("ql-blank",R.editor.isBlank())}),this.emitter.on(d.default.events.SCROLL_UPDATE,function(G,M){var B=R.selection.lastRange,q=B&&B.length===0?B.index:void 0;$.call(R,function(){return R.editor.update(null,M,q)},G)});var j=this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">`+L+"<p><br></p></div>");this.setContents(j),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return o(D,[{key:"addContainer",value:function(R){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof R=="string"){var L=R;R=document.createElement("div"),R.classList.add(L)}return this.container.insertBefore(R,k),R}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(R,k,L){var j=this,G=U(R,k,L),M=a(G,4);return R=M[0],k=M[1],L=M[3],$.call(this,function(){return j.editor.deleteText(R,k)},L,R,-1*k)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(R),this.container.classList.toggle("ql-disabled",!R)}},{key:"focus",value:function(){var R=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=R,this.scrollIntoView()}},{key:"format",value:function(R,k){var L=this,j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:d.default.sources.API;return $.call(this,function(){var G=L.getSelection(!0),M=new f.default;if(G==null)return M;if(m.default.query(R,m.default.Scope.BLOCK))M=L.editor.formatLine(G.index,G.length,w({},R,k));else{if(G.length===0)return L.selection.format(R,k),M;M=L.editor.formatText(G.index,G.length,w({},R,k))}return L.setSelection(G,d.default.sources.SILENT),M},j)}},{key:"formatLine",value:function(R,k,L,j,G){var M=this,B=void 0,q=U(R,k,L,j,G),H=a(q,4);return R=H[0],k=H[1],B=H[2],G=H[3],$.call(this,function(){return M.editor.formatLine(R,k,B)},G,R,0)}},{key:"formatText",value:function(R,k,L,j,G){var M=this,B=void 0,q=U(R,k,L,j,G),H=a(q,4);return R=H[0],k=H[1],B=H[2],G=H[3],$.call(this,function(){return M.editor.formatText(R,k,B)},G,R,0)}},{key:"getBounds",value:function(R){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,L=void 0;typeof R=="number"?L=this.selection.getBounds(R,k):L=this.selection.getBounds(R.index,R.length);var j=this.container.getBoundingClientRect();return{bottom:L.bottom-j.top,height:L.height,left:L.left-j.left,right:L.right-j.left,top:L.top-j.top,width:L.width}}},{key:"getContents",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-R,L=U(R,k),j=a(L,2);return R=j[0],k=j[1],this.editor.getContents(R,k)}},{key:"getFormat",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof R=="number"?this.editor.getFormat(R,k):this.editor.getFormat(R.index,R.length)}},{key:"getIndex",value:function(R){return R.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(R){return this.scroll.leaf(R)}},{key:"getLine",value:function(R){return this.scroll.line(R)}},{key:"getLines",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof R!="number"?this.scroll.lines(R.index,R.length):this.scroll.lines(R,k)}},{key:"getModule",value:function(R){return this.theme.modules[R]}},{key:"getSelection",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return R&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-R,L=U(R,k),j=a(L,2);return R=j[0],k=j[1],this.editor.getText(R,k)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(R,k,L){var j=this,G=arguments.length>3&&arguments[3]!==void 0?arguments[3]:D.sources.API;return $.call(this,function(){return j.editor.insertEmbed(R,k,L)},G,R)}},{key:"insertText",value:function(R,k,L,j,G){var M=this,B=void 0,q=U(R,0,L,j,G),H=a(q,4);return R=H[0],B=H[2],G=H[3],$.call(this,function(){return M.editor.insertText(R,k,B)},G,R,k.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(R,k,L){this.clipboard.dangerouslyPasteHTML(R,k,L)}},{key:"removeFormat",value:function(R,k,L){var j=this,G=U(R,k,L),M=a(G,4);return R=M[0],k=M[1],L=M[3],$.call(this,function(){return j.editor.removeFormat(R,k)},L,R)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(R){var k=this,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d.default.sources.API;return $.call(this,function(){R=new f.default(R);var j=k.getLength(),G=k.editor.deleteText(0,j),M=k.editor.applyDelta(R),B=M.ops[M.ops.length-1];B!=null&&typeof B.insert=="string"&&B.insert[B.insert.length-1]===`
560
+ `&&(k.editor.deleteText(k.getLength()-1,1),M.delete(1));var q=G.compose(M);return q},L)}},{key:"setSelection",value:function(R,k,L){if(R==null)this.selection.setRange(null,k||D.sources.API);else{var j=U(R,k,L),G=a(j,4);R=G[0],k=G[1],L=G[3],this.selection.setRange(new b.Range(R,k),L),L!==d.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(R){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d.default.sources.API,L=new f.default().insert(R);return this.setContents(L,k)}},{key:"update",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d.default.sources.USER,k=this.scroll.update(R);return this.selection.update(R),k}},{key:"updateContents",value:function(R){var k=this,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d.default.sources.API;return $.call(this,function(){return R=new f.default(R),k.editor.applyDelta(R,L)},L,!0)}}]),D}();C.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},C.events=d.default.events,C.sources=d.default.sources,C.version="1.3.7",C.imports={delta:f.default,parchment:m.default,"core/module":v.default,"core/theme":N.default};function F(D,P){if(P=(0,x.default)(!0,{container:D,modules:{clipboard:!0,keyboard:!0,history:!0}},P),!P.theme||P.theme===C.DEFAULTS.theme)P.theme=N.default;else if(P.theme=C.import("themes/"+P.theme),P.theme==null)throw new Error("Invalid theme "+P.theme+". Did you register it?");var R=(0,x.default)(!0,{},P.theme.DEFAULTS);[R,P].forEach(function(j){j.modules=j.modules||{},Object.keys(j.modules).forEach(function(G){j.modules[G]===!0&&(j.modules[G]={})})});var k=Object.keys(R.modules).concat(Object.keys(P.modules)),L=k.reduce(function(j,G){var M=C.import("modules/"+G);return M==null?I.error("Cannot load "+G+" module. Are you sure you registered it?"):j[G]=M.DEFAULTS||{},j},{});return P.modules!=null&&P.modules.toolbar&&P.modules.toolbar.constructor!==Object&&(P.modules.toolbar={container:P.modules.toolbar}),P=(0,x.default)(!0,{},C.DEFAULTS,{modules:L},R,P),["bounds","container","scrollingContainer"].forEach(function(j){typeof P[j]=="string"&&(P[j]=document.querySelector(P[j]))}),P.modules=Object.keys(P.modules).reduce(function(j,G){return P.modules[G]&&(j[G]=P.modules[G]),j},{}),P}function $(D,P,R,k){if(this.options.strict&&!this.isEnabled()&&P===d.default.sources.USER)return new f.default;var L=R==null?null:this.getSelection(),j=this.editor.delta,G=D();if(L!=null&&(R===!0&&(R=L.index),k==null?L=X(L,G,P):k!==0&&(L=X(L,R,k,P)),this.setSelection(L,d.default.sources.SILENT)),G.length()>0){var M,B=[d.default.events.TEXT_CHANGE,G,j,P];if((M=this.emitter).emit.apply(M,[d.default.events.EDITOR_CHANGE].concat(B)),P!==d.default.sources.SILENT){var q;(q=this.emitter).emit.apply(q,B)}}return G}function U(D,P,R,k,L){var j={};return typeof D.index=="number"&&typeof D.length=="number"?typeof P!="number"?(L=k,k=R,R=P,P=D.length,D=D.index):(P=D.length,D=D.index):typeof P!="number"&&(L=k,k=R,R=P,P=0),(typeof R>"u"?"undefined":s(R))==="object"?(j=R,L=k):typeof R=="string"&&(k!=null?j[R]=k:L=R),L=L||d.default.sources.API,[D,P,j,L]}function X(D,P,R,k){if(D==null)return null;var L=void 0,j=void 0;if(P instanceof f.default){var G=[D.index,D.index+D.length].map(function(H){return P.transformPosition(H,k!==d.default.sources.USER)}),M=a(G,2);L=M[0],j=M[1]}else{var B=[D.index,D.index+D.length].map(function(H){return H<P||H===P&&k===d.default.sources.USER?H:R>=0?H+R:Math.max(P,H+R)}),q=a(B,2);L=q[0],j=q[1]}return new b.Range(L,j-L)}n.expandConfig=F,n.overload=U,n.default=C},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function g(m,b){for(var _=0;_<b.length;_++){var y=b[_];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(m,y.key,y)}}return function(m,b,_){return b&&g(m.prototype,b),_&&g(m,_),m}}(),a=function g(m,b,_){m===null&&(m=Function.prototype);var y=Object.getOwnPropertyDescriptor(m,b);if(y===void 0){var x=Object.getPrototypeOf(m);return x===null?void 0:g(x,b,_)}else{if("value"in y)return y.value;var O=y.get;return O===void 0?void 0:O.call(_)}},o=i(7),l=h(o),f=i(0),c=h(f);function h(g){return g&&g.__esModule?g:{default:g}}function u(g,m){if(!(g instanceof m))throw new TypeError("Cannot call a class as a function")}function d(g,m){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:g}function p(g,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);g.prototype=Object.create(m&&m.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(g,m):g.__proto__=m)}var v=function(g){p(m,g);function m(){return u(this,m),d(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return s(m,[{key:"formatAt",value:function(_,y,x,O){if(m.compare(this.statics.blotName,x)<0&&c.default.query(x,c.default.Scope.BLOT)){var T=this.isolate(_,y);O&&T.wrap(x,O)}else a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"formatAt",this).call(this,_,y,x,O)}},{key:"optimize",value:function(_){if(a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"optimize",this).call(this,_),this.parent instanceof m&&m.compare(this.statics.blotName,this.parent.statics.blotName)>0){var y=this.parent.isolate(this.offset(),this.length());this.moveChildren(y),y.wrap(this)}}}],[{key:"compare",value:function(_,y){var x=m.order.indexOf(_),O=m.order.indexOf(y);return x>=0||O>=0?x-O:_===y?0:_<y?-1:1}}]),m}(c.default.Inline);v.allowedChildren=[v,c.default.Embed,l.default],v.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(0),a=o(s);function o(u){return u&&u.__esModule?u:{default:u}}function l(u,d){if(!(u instanceof d))throw new TypeError("Cannot call a class as a function")}function f(u,d){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:u}function c(u,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);u.prototype=Object.create(d&&d.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(u,d):u.__proto__=d)}var h=function(u){c(d,u);function d(){return l(this,d),f(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}return d}(a.default.Text);n.default=h},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function b(_,y){for(var x=0;x<y.length;x++){var O=y[x];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(_,O.key,O)}}return function(_,y,x){return y&&b(_.prototype,y),x&&b(_,x),_}}(),a=function b(_,y,x){_===null&&(_=Function.prototype);var O=Object.getOwnPropertyDescriptor(_,y);if(O===void 0){var T=Object.getPrototypeOf(_);return T===null?void 0:b(T,y,x)}else{if("value"in O)return O.value;var E=O.get;return E===void 0?void 0:E.call(x)}},o=i(54),l=h(o),f=i(10),c=h(f);function h(b){return b&&b.__esModule?b:{default:b}}function u(b,_){if(!(b instanceof _))throw new TypeError("Cannot call a class as a function")}function d(b,_){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:b}function p(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=(0,c.default)("quill:events"),g=["selectionchange","mousedown","mouseup","click"];g.forEach(function(b){document.addEventListener(b,function(){for(var _=arguments.length,y=Array(_),x=0;x<_;x++)y[x]=arguments[x];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(O){if(O.__quill&&O.__quill.emitter){var T;(T=O.__quill.emitter).handleDOM.apply(T,y)}})})});var m=function(b){p(_,b);function _(){u(this,_);var y=d(this,(_.__proto__||Object.getPrototypeOf(_)).call(this));return y.listeners={},y.on("error",v.error),y}return s(_,[{key:"emit",value:function(){v.log.apply(v,arguments),a(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(x){for(var O=arguments.length,T=Array(O>1?O-1:0),E=1;E<O;E++)T[E-1]=arguments[E];(this.listeners[x.type]||[]).forEach(function(N){var A=N.node,w=N.handler;(x.target===A||A.contains(x.target))&&w.apply(void 0,[x].concat(T))})}},{key:"listenDOM",value:function(x,O,T){this.listeners[x]||(this.listeners[x]=[]),this.listeners[x].push({node:O,handler:T})}}]),_}(l.default);m.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},m.sources={API:"api",SILENT:"silent",USER:"user"},n.default=m},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});function s(o,l){if(!(o instanceof l))throw new TypeError("Cannot call a class as a function")}var a=function o(l){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};s(this,o),this.quill=l,this.options=f};a.DEFAULTS={},n.default=a},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=["error","warn","log","info"],a="warn";function o(f){if(s.indexOf(f)<=s.indexOf(a)){for(var c,h=arguments.length,u=Array(h>1?h-1:0),d=1;d<h;d++)u[d-1]=arguments[d];(c=console)[f].apply(c,u)}}function l(f){return s.reduce(function(c,h){return c[h]=o.bind(console,h,f),c},{})}o.level=l.level=function(f){a=f},n.default=l},function(r,n,i){var s=Array.prototype.slice,a=i(52),o=i(53),l=r.exports=function(u,d,p){return p||(p={}),u===d?!0:u instanceof Date&&d instanceof Date?u.getTime()===d.getTime():!u||!d||typeof u!="object"&&typeof d!="object"?p.strict?u===d:u==d:h(u,d,p)};function f(u){return u==null}function c(u){return!(!u||typeof u!="object"||typeof u.length!="number"||typeof u.copy!="function"||typeof u.slice!="function"||u.length>0&&typeof u[0]!="number")}function h(u,d,p){var v,g;if(f(u)||f(d)||u.prototype!==d.prototype)return!1;if(o(u))return o(d)?(u=s.call(u),d=s.call(d),l(u,d,p)):!1;if(c(u)){if(!c(d)||u.length!==d.length)return!1;for(v=0;v<u.length;v++)if(u[v]!==d[v])return!1;return!0}try{var m=a(u),b=a(d)}catch{return!1}if(m.length!=b.length)return!1;for(m.sort(),b.sort(),v=m.length-1;v>=0;v--)if(m[v]!=b[v])return!1;for(v=m.length-1;v>=0;v--)if(g=m[v],!l(u[g],d[g],p))return!1;return typeof u==typeof d}},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(1),a=function(){function o(l,f,c){c===void 0&&(c={}),this.attrName=l,this.keyName=f;var h=s.Scope.TYPE&s.Scope.ATTRIBUTE;c.scope!=null?this.scope=c.scope&s.Scope.LEVEL|h:this.scope=s.Scope.ATTRIBUTE,c.whitelist!=null&&(this.whitelist=c.whitelist)}return o.keys=function(l){return[].map.call(l.attributes,function(f){return f.name})},o.prototype.add=function(l,f){return this.canAdd(l,f)?(l.setAttribute(this.keyName,f),!0):!1},o.prototype.canAdd=function(l,f){var c=s.query(l,s.Scope.BLOT&(this.scope|s.Scope.TYPE));return c==null?!1:this.whitelist==null?!0:typeof f=="string"?this.whitelist.indexOf(f.replace(/["']/g,""))>-1:this.whitelist.indexOf(f)>-1},o.prototype.remove=function(l){l.removeAttribute(this.keyName)},o.prototype.value=function(l){var f=l.getAttribute(this.keyName);return this.canAdd(l,f)&&f?f:""},o}();n.default=a},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.Code=void 0;var s=function(){function E(N,A){var w=[],S=!0,I=!1,C=void 0;try{for(var F=N[Symbol.iterator](),$;!(S=($=F.next()).done)&&(w.push($.value),!(A&&w.length===A));S=!0);}catch(U){I=!0,C=U}finally{try{!S&&F.return&&F.return()}finally{if(I)throw C}}return w}return function(N,A){if(Array.isArray(N))return N;if(Symbol.iterator in Object(N))return E(N,A);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function E(N,A){for(var w=0;w<A.length;w++){var S=A[w];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(N,S.key,S)}}return function(N,A,w){return A&&E(N.prototype,A),w&&E(N,w),N}}(),o=function E(N,A,w){N===null&&(N=Function.prototype);var S=Object.getOwnPropertyDescriptor(N,A);if(S===void 0){var I=Object.getPrototypeOf(N);return I===null?void 0:E(I,A,w)}else{if("value"in S)return S.value;var C=S.get;return C===void 0?void 0:C.call(w)}},l=i(2),f=b(l),c=i(0),h=b(c),u=i(4),d=b(u),p=i(6),v=b(p),g=i(7),m=b(g);function b(E){return E&&E.__esModule?E:{default:E}}function _(E,N){if(!(E instanceof N))throw new TypeError("Cannot call a class as a function")}function y(E,N){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N&&(typeof N=="object"||typeof N=="function")?N:E}function x(E,N){if(typeof N!="function"&&N!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof N);E.prototype=Object.create(N&&N.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),N&&(Object.setPrototypeOf?Object.setPrototypeOf(E,N):E.__proto__=N)}var O=function(E){x(N,E);function N(){return _(this,N),y(this,(N.__proto__||Object.getPrototypeOf(N)).apply(this,arguments))}return N}(v.default);O.blotName="code",O.tagName="CODE";var T=function(E){x(N,E);function N(){return _(this,N),y(this,(N.__proto__||Object.getPrototypeOf(N)).apply(this,arguments))}return a(N,[{key:"delta",value:function(){var w=this,S=this.domNode.textContent;return S.endsWith(`
561
561
  `)&&(S=S.slice(0,-1)),S.split(`
562
562
  `).reduce(function(I,C){return I.insert(C).insert(`
563
- `,w.formats())},new f.default)}},{key:"format",value:function(w,S){if(!(w===this.statics.blotName&&S)){var I=this.descendant(m.default,this.length()-1),C=s(I,1),F=C[0];F!=null&&F.deleteAt(F.length()-1,1),o(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"format",this).call(this,w,S)}}},{key:"formatAt",value:function(w,S,I,C){if(S!==0&&!(h.default.query(I,h.default.Scope.BLOCK)==null||I===this.statics.blotName&&C===this.statics.formats(this.domNode))){var F=this.newlineIndex(w);if(!(F<0||F>=w+S)){var D=this.newlineIndex(w,!0)+1,U=F-D+1,X=this.isolate(D,U),$=X.next;X.format(I,C),$ instanceof N&&$.formatAt(0,w-D+S-U,I,C)}}}},{key:"insertAt",value:function(w,S,I){if(I==null){var C=this.descendant(m.default,w),F=s(C,2),D=F[0],U=F[1];D.insertAt(U,S)}}},{key:"length",value:function(){var w=this.domNode.textContent.length;return this.domNode.textContent.endsWith(`
563
+ `,w.formats())},new f.default)}},{key:"format",value:function(w,S){if(!(w===this.statics.blotName&&S)){var I=this.descendant(m.default,this.length()-1),C=s(I,1),F=C[0];F!=null&&F.deleteAt(F.length()-1,1),o(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"format",this).call(this,w,S)}}},{key:"formatAt",value:function(w,S,I,C){if(S!==0&&!(h.default.query(I,h.default.Scope.BLOCK)==null||I===this.statics.blotName&&C===this.statics.formats(this.domNode))){var F=this.newlineIndex(w);if(!(F<0||F>=w+S)){var $=this.newlineIndex(w,!0)+1,U=F-$+1,X=this.isolate($,U),D=X.next;X.format(I,C),D instanceof N&&D.formatAt(0,w-$+S-U,I,C)}}}},{key:"insertAt",value:function(w,S,I){if(I==null){var C=this.descendant(m.default,w),F=s(C,2),$=F[0],U=F[1];$.insertAt(U,S)}}},{key:"length",value:function(){var w=this.domNode.textContent.length;return this.domNode.textContent.endsWith(`
564
564
  `)?w:w+1}},{key:"newlineIndex",value:function(w){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(S)return this.domNode.textContent.slice(0,w).lastIndexOf(`
565
565
  `);var I=this.domNode.textContent.slice(w).indexOf(`
566
566
  `);return I>-1?w+I:-1}},{key:"optimize",value:function(w){this.domNode.textContent.endsWith(`
567
567
  `)||this.appendChild(h.default.create("text",`
568
- `)),o(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"optimize",this).call(this,w);var S=this.next;S!=null&&S.prev===this&&S.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===S.statics.formats(S.domNode)&&(S.optimize(w),S.moveChildren(this),S.remove())}},{key:"replace",value:function(w){o(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"replace",this).call(this,w),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(S){var I=h.default.find(S);I==null?S.parentNode.removeChild(S):I instanceof h.default.Embed?I.remove():I.unwrap()})}}],[{key:"create",value:function(w){var S=o(N.__proto__||Object.getPrototypeOf(N),"create",this).call(this,w);return S.setAttribute("spellcheck",!1),S}},{key:"formats",value:function(){return!0}}]),N}(d.default);T.blotName="code-block",T.tagName="PRE",T.TAB=" ",n.Code=O,n.default=T},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},a=function(){function $(k,R){var P=[],L=!0,j=!1,G=void 0;try{for(var M=k[Symbol.iterator](),B;!(L=(B=M.next()).done)&&(P.push(B.value),!(R&&P.length===R));L=!0);}catch(q){j=!0,G=q}finally{try{!L&&M.return&&M.return()}finally{if(j)throw G}}return P}return function(k,R){if(Array.isArray(k))return k;if(Symbol.iterator in Object(k))return $(k,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function $(k,R){for(var P=0;P<R.length;P++){var L=R[P];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(k,L.key,L)}}return function(k,R,P){return R&&$(k.prototype,R),P&&$(k,P),k}}(),l=i(2),f=S(l),c=i(20),h=S(c),u=i(0),d=S(u),p=i(13),v=S(p),g=i(24),m=S(g),b=i(4),_=S(b),y=i(16),x=S(y),O=i(21),T=S(O),E=i(11),N=S(E),A=i(3),w=S(A);function S($){return $&&$.__esModule?$:{default:$}}function I($,k,R){return k in $?Object.defineProperty($,k,{value:R,enumerable:!0,configurable:!0,writable:!0}):$[k]=R,$}function C($,k){if(!($ instanceof k))throw new TypeError("Cannot call a class as a function")}var F=/^[ -~]*$/,D=function(){function $(k){C(this,$),this.scroll=k,this.delta=this.getDelta()}return o($,[{key:"applyDelta",value:function(R){var P=this,L=!1;this.scroll.update();var j=this.scroll.length();return this.scroll.batchStart(),R=X(R),R.reduce(function(G,M){var B=M.retain||M.delete||M.insert.length||1,q=M.attributes||{};if(M.insert!=null){if(typeof M.insert=="string"){var H=M.insert;H.endsWith(`
568
+ `)),o(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"optimize",this).call(this,w);var S=this.next;S!=null&&S.prev===this&&S.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===S.statics.formats(S.domNode)&&(S.optimize(w),S.moveChildren(this),S.remove())}},{key:"replace",value:function(w){o(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"replace",this).call(this,w),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(S){var I=h.default.find(S);I==null?S.parentNode.removeChild(S):I instanceof h.default.Embed?I.remove():I.unwrap()})}}],[{key:"create",value:function(w){var S=o(N.__proto__||Object.getPrototypeOf(N),"create",this).call(this,w);return S.setAttribute("spellcheck",!1),S}},{key:"formats",value:function(){return!0}}]),N}(d.default);T.blotName="code-block",T.tagName="PRE",T.TAB=" ",n.Code=O,n.default=T},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(D){return typeof D}:function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},a=function(){function D(P,R){var k=[],L=!0,j=!1,G=void 0;try{for(var M=P[Symbol.iterator](),B;!(L=(B=M.next()).done)&&(k.push(B.value),!(R&&k.length===R));L=!0);}catch(q){j=!0,G=q}finally{try{!L&&M.return&&M.return()}finally{if(j)throw G}}return k}return function(P,R){if(Array.isArray(P))return P;if(Symbol.iterator in Object(P))return D(P,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function D(P,R){for(var k=0;k<R.length;k++){var L=R[k];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(P,L.key,L)}}return function(P,R,k){return R&&D(P.prototype,R),k&&D(P,k),P}}(),l=i(2),f=S(l),c=i(20),h=S(c),u=i(0),d=S(u),p=i(13),v=S(p),g=i(24),m=S(g),b=i(4),_=S(b),y=i(16),x=S(y),O=i(21),T=S(O),E=i(11),N=S(E),A=i(3),w=S(A);function S(D){return D&&D.__esModule?D:{default:D}}function I(D,P,R){return P in D?Object.defineProperty(D,P,{value:R,enumerable:!0,configurable:!0,writable:!0}):D[P]=R,D}function C(D,P){if(!(D instanceof P))throw new TypeError("Cannot call a class as a function")}var F=/^[ -~]*$/,$=function(){function D(P){C(this,D),this.scroll=P,this.delta=this.getDelta()}return o(D,[{key:"applyDelta",value:function(R){var k=this,L=!1;this.scroll.update();var j=this.scroll.length();return this.scroll.batchStart(),R=X(R),R.reduce(function(G,M){var B=M.retain||M.delete||M.insert.length||1,q=M.attributes||{};if(M.insert!=null){if(typeof M.insert=="string"){var H=M.insert;H.endsWith(`
569
569
  `)&&L&&(L=!1,H=H.slice(0,-1)),G>=j&&!H.endsWith(`
570
- `)&&(L=!0),P.scroll.insertAt(G,H);var z=P.scroll.line(G),Y=a(z,2),J=Y[0],et=Y[1],at=(0,w.default)({},(0,b.bubbleFormats)(J));if(J instanceof _.default){var lt=J.descendant(d.default.Leaf,et),Ct=a(lt,1),Rt=Ct[0];at=(0,w.default)(at,(0,b.bubbleFormats)(Rt))}q=h.default.attributes.diff(at,q)||{}}else if(s(M.insert)==="object"){var V=Object.keys(M.insert)[0];if(V==null)return G;P.scroll.insertAt(G,V,M.insert[V])}j+=B}return Object.keys(q).forEach(function(W){P.scroll.formatAt(G,B,W,q[W])}),G+B},0),R.reduce(function(G,M){return typeof M.delete=="number"?(P.scroll.deleteAt(G,M.delete),G):G+(M.retain||M.insert.length||1)},0),this.scroll.batchEnd(),this.update(R)}},{key:"deleteText",value:function(R,P){return this.scroll.deleteAt(R,P),this.update(new f.default().retain(R).delete(P))}},{key:"formatLine",value:function(R,P){var L=this,j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(j).forEach(function(G){if(!(L.scroll.whitelist!=null&&!L.scroll.whitelist[G])){var M=L.scroll.lines(R,Math.max(P,1)),B=P;M.forEach(function(q){var H=q.length();if(!(q instanceof v.default))q.format(G,j[G]);else{var z=R-q.offset(L.scroll),Y=q.newlineIndex(z+B)-z+1;q.formatAt(z,Y,G,j[G])}B-=H})}}),this.scroll.optimize(),this.update(new f.default().retain(R).retain(P,(0,T.default)(j)))}},{key:"formatText",value:function(R,P){var L=this,j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(j).forEach(function(G){L.scroll.formatAt(R,P,G,j[G])}),this.update(new f.default().retain(R).retain(P,(0,T.default)(j)))}},{key:"getContents",value:function(R,P){return this.delta.slice(R,R+P)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(R,P){return R.concat(P.delta())},new f.default)}},{key:"getFormat",value:function(R){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,L=[],j=[];P===0?this.scroll.path(R).forEach(function(M){var B=a(M,1),q=B[0];q instanceof _.default?L.push(q):q instanceof d.default.Leaf&&j.push(q)}):(L=this.scroll.lines(R,P),j=this.scroll.descendants(d.default.Leaf,R,P));var G=[L,j].map(function(M){if(M.length===0)return{};for(var B=(0,b.bubbleFormats)(M.shift());Object.keys(B).length>0;){var q=M.shift();if(q==null)return B;B=U((0,b.bubbleFormats)(q),B)}return B});return w.default.apply(w.default,G)}},{key:"getText",value:function(R,P){return this.getContents(R,P).filter(function(L){return typeof L.insert=="string"}).map(function(L){return L.insert}).join("")}},{key:"insertEmbed",value:function(R,P,L){return this.scroll.insertAt(R,P,L),this.update(new f.default().retain(R).insert(I({},P,L)))}},{key:"insertText",value:function(R,P){var L=this,j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return P=P.replace(/\r\n/g,`
570
+ `)&&(L=!0),k.scroll.insertAt(G,H);var z=k.scroll.line(G),Y=a(z,2),J=Y[0],et=Y[1],at=(0,w.default)({},(0,b.bubbleFormats)(J));if(J instanceof _.default){var lt=J.descendant(d.default.Leaf,et),Ct=a(lt,1),Rt=Ct[0];at=(0,w.default)(at,(0,b.bubbleFormats)(Rt))}q=h.default.attributes.diff(at,q)||{}}else if(s(M.insert)==="object"){var V=Object.keys(M.insert)[0];if(V==null)return G;k.scroll.insertAt(G,V,M.insert[V])}j+=B}return Object.keys(q).forEach(function(W){k.scroll.formatAt(G,B,W,q[W])}),G+B},0),R.reduce(function(G,M){return typeof M.delete=="number"?(k.scroll.deleteAt(G,M.delete),G):G+(M.retain||M.insert.length||1)},0),this.scroll.batchEnd(),this.update(R)}},{key:"deleteText",value:function(R,k){return this.scroll.deleteAt(R,k),this.update(new f.default().retain(R).delete(k))}},{key:"formatLine",value:function(R,k){var L=this,j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(j).forEach(function(G){if(!(L.scroll.whitelist!=null&&!L.scroll.whitelist[G])){var M=L.scroll.lines(R,Math.max(k,1)),B=k;M.forEach(function(q){var H=q.length();if(!(q instanceof v.default))q.format(G,j[G]);else{var z=R-q.offset(L.scroll),Y=q.newlineIndex(z+B)-z+1;q.formatAt(z,Y,G,j[G])}B-=H})}}),this.scroll.optimize(),this.update(new f.default().retain(R).retain(k,(0,T.default)(j)))}},{key:"formatText",value:function(R,k){var L=this,j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(j).forEach(function(G){L.scroll.formatAt(R,k,G,j[G])}),this.update(new f.default().retain(R).retain(k,(0,T.default)(j)))}},{key:"getContents",value:function(R,k){return this.delta.slice(R,R+k)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(R,k){return R.concat(k.delta())},new f.default)}},{key:"getFormat",value:function(R){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,L=[],j=[];k===0?this.scroll.path(R).forEach(function(M){var B=a(M,1),q=B[0];q instanceof _.default?L.push(q):q instanceof d.default.Leaf&&j.push(q)}):(L=this.scroll.lines(R,k),j=this.scroll.descendants(d.default.Leaf,R,k));var G=[L,j].map(function(M){if(M.length===0)return{};for(var B=(0,b.bubbleFormats)(M.shift());Object.keys(B).length>0;){var q=M.shift();if(q==null)return B;B=U((0,b.bubbleFormats)(q),B)}return B});return w.default.apply(w.default,G)}},{key:"getText",value:function(R,k){return this.getContents(R,k).filter(function(L){return typeof L.insert=="string"}).map(function(L){return L.insert}).join("")}},{key:"insertEmbed",value:function(R,k,L){return this.scroll.insertAt(R,k,L),this.update(new f.default().retain(R).insert(I({},k,L)))}},{key:"insertText",value:function(R,k){var L=this,j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return k=k.replace(/\r\n/g,`
571
571
  `).replace(/\r/g,`
572
- `),this.scroll.insertAt(R,P),Object.keys(j).forEach(function(G){L.scroll.formatAt(R,P.length,G,j[G])}),this.update(new f.default().retain(R).insert(P,(0,T.default)(j)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var R=this.scroll.children.head;return R.statics.blotName!==_.default.blotName||R.children.length>1?!1:R.children.head instanceof x.default}},{key:"removeFormat",value:function(R,P){var L=this.getText(R,P),j=this.scroll.line(R+P),G=a(j,2),M=G[0],B=G[1],q=0,H=new f.default;M!=null&&(M instanceof v.default?q=M.newlineIndex(B)-B+1:q=M.length()-B,H=M.delta().slice(B,B+q-1).insert(`
573
- `));var z=this.getContents(R,P+q),Y=z.diff(new f.default().insert(L).concat(H)),J=new f.default().retain(R).concat(Y);return this.applyDelta(J)}},{key:"update",value:function(R){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,j=this.delta;if(P.length===1&&P[0].type==="characterData"&&P[0].target.data.match(F)&&d.default.find(P[0].target)){var G=d.default.find(P[0].target),M=(0,b.bubbleFormats)(G),B=G.offset(this.scroll),q=P[0].oldValue.replace(m.default.CONTENTS,""),H=new f.default().insert(q),z=new f.default().insert(G.value()),Y=new f.default().retain(B).concat(H.diff(z,L));R=Y.reduce(function(J,et){return et.insert?J.insert(et.insert,M):J.push(et)},new f.default),this.delta=j.compose(R)}else this.delta=this.getDelta(),(!R||!(0,N.default)(j.compose(R),this.delta))&&(R=j.diff(this.delta,L));return R}}]),$}();function U($,k){return Object.keys(k).reduce(function(R,P){return $[P]==null||(k[P]===$[P]?R[P]=k[P]:Array.isArray(k[P])?k[P].indexOf($[P])<0&&(R[P]=k[P].concat([$[P]])):R[P]=[k[P],$[P]]),R},{})}function X($){return $.reduce(function(k,R){if(R.insert===1){var P=(0,T.default)(R.attributes);return delete P.image,k.insert({image:R.attributes.image},P)}if(R.attributes!=null&&(R.attributes.list===!0||R.attributes.bullet===!0)&&(R=(0,T.default)(R),R.attributes.list?R.attributes.list="ordered":(R.attributes.list="bullet",delete R.attributes.bullet)),typeof R.insert=="string"){var L=R.insert.replace(/\r\n/g,`
572
+ `),this.scroll.insertAt(R,k),Object.keys(j).forEach(function(G){L.scroll.formatAt(R,k.length,G,j[G])}),this.update(new f.default().retain(R).insert(k,(0,T.default)(j)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var R=this.scroll.children.head;return R.statics.blotName!==_.default.blotName||R.children.length>1?!1:R.children.head instanceof x.default}},{key:"removeFormat",value:function(R,k){var L=this.getText(R,k),j=this.scroll.line(R+k),G=a(j,2),M=G[0],B=G[1],q=0,H=new f.default;M!=null&&(M instanceof v.default?q=M.newlineIndex(B)-B+1:q=M.length()-B,H=M.delta().slice(B,B+q-1).insert(`
573
+ `));var z=this.getContents(R,k+q),Y=z.diff(new f.default().insert(L).concat(H)),J=new f.default().retain(R).concat(Y);return this.applyDelta(J)}},{key:"update",value:function(R){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,j=this.delta;if(k.length===1&&k[0].type==="characterData"&&k[0].target.data.match(F)&&d.default.find(k[0].target)){var G=d.default.find(k[0].target),M=(0,b.bubbleFormats)(G),B=G.offset(this.scroll),q=k[0].oldValue.replace(m.default.CONTENTS,""),H=new f.default().insert(q),z=new f.default().insert(G.value()),Y=new f.default().retain(B).concat(H.diff(z,L));R=Y.reduce(function(J,et){return et.insert?J.insert(et.insert,M):J.push(et)},new f.default),this.delta=j.compose(R)}else this.delta=this.getDelta(),(!R||!(0,N.default)(j.compose(R),this.delta))&&(R=j.diff(this.delta,L));return R}}]),D}();function U(D,P){return Object.keys(P).reduce(function(R,k){return D[k]==null||(P[k]===D[k]?R[k]=P[k]:Array.isArray(P[k])?P[k].indexOf(D[k])<0&&(R[k]=P[k].concat([D[k]])):R[k]=[P[k],D[k]]),R},{})}function X(D){return D.reduce(function(P,R){if(R.insert===1){var k=(0,T.default)(R.attributes);return delete k.image,P.insert({image:R.attributes.image},k)}if(R.attributes!=null&&(R.attributes.list===!0||R.attributes.bullet===!0)&&(R=(0,T.default)(R),R.attributes.list?R.attributes.list="ordered":(R.attributes.list="bullet",delete R.attributes.bullet)),typeof R.insert=="string"){var L=R.insert.replace(/\r\n/g,`
574
574
  `).replace(/\r/g,`
575
- `);return k.insert(L,R.attributes)}return k.push(R)},new f.default)}n.default=D},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.Range=void 0;var s=function(){function E(N,A){var w=[],S=!0,I=!1,C=void 0;try{for(var F=N[Symbol.iterator](),D;!(S=(D=F.next()).done)&&(w.push(D.value),!(A&&w.length===A));S=!0);}catch(U){I=!0,C=U}finally{try{!S&&F.return&&F.return()}finally{if(I)throw C}}return w}return function(N,A){if(Array.isArray(N))return N;if(Symbol.iterator in Object(N))return E(N,A);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function E(N,A){for(var w=0;w<A.length;w++){var S=A[w];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(N,S.key,S)}}return function(N,A,w){return A&&E(N.prototype,A),w&&E(N,w),N}}(),o=i(0),l=m(o),f=i(21),c=m(f),h=i(11),u=m(h),d=i(8),p=m(d),v=i(10),g=m(v);function m(E){return E&&E.__esModule?E:{default:E}}function b(E){if(Array.isArray(E)){for(var N=0,A=Array(E.length);N<E.length;N++)A[N]=E[N];return A}else return Array.from(E)}function _(E,N){if(!(E instanceof N))throw new TypeError("Cannot call a class as a function")}var y=(0,g.default)("quill:selection"),x=function E(N){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;_(this,E),this.index=N,this.length=A},O=function(){function E(N,A){var w=this;_(this,E),this.emitter=A,this.scroll=N,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=l.default.create("cursor",this),this.lastRange=this.savedRange=new x(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){w.mouseDown||setTimeout(w.update.bind(w,p.default.sources.USER),1)}),this.emitter.on(p.default.events.EDITOR_CHANGE,function(S,I){S===p.default.events.TEXT_CHANGE&&I.length()>0&&w.update(p.default.sources.SILENT)}),this.emitter.on(p.default.events.SCROLL_BEFORE_UPDATE,function(){if(w.hasFocus()){var S=w.getNativeRange();S!=null&&S.start.node!==w.cursor.textNode&&w.emitter.once(p.default.events.SCROLL_UPDATE,function(){try{w.setNativeRange(S.start.node,S.start.offset,S.end.node,S.end.offset)}catch{}})}}),this.emitter.on(p.default.events.SCROLL_OPTIMIZE,function(S,I){if(I.range){var C=I.range,F=C.startNode,D=C.startOffset,U=C.endNode,X=C.endOffset;w.setNativeRange(F,D,U,X)}}),this.update(p.default.sources.SILENT)}return a(E,[{key:"handleComposition",value:function(){var A=this;this.root.addEventListener("compositionstart",function(){A.composing=!0}),this.root.addEventListener("compositionend",function(){if(A.composing=!1,A.cursor.parent){var w=A.cursor.restore();if(!w)return;setTimeout(function(){A.setNativeRange(w.startNode,w.startOffset,w.endNode,w.endOffset)},1)}})}},{key:"handleDragging",value:function(){var A=this;this.emitter.listenDOM("mousedown",document.body,function(){A.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){A.mouseDown=!1,A.update(p.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(A,w){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[A])){this.scroll.update();var S=this.getNativeRange();if(!(S==null||!S.native.collapsed||l.default.query(A,l.default.Scope.BLOCK))){if(S.start.node!==this.cursor.textNode){var I=l.default.find(S.start.node,!1);if(I==null)return;if(I instanceof l.default.Leaf){var C=I.split(S.start.offset);I.parent.insertBefore(this.cursor,C)}else I.insertBefore(this.cursor,S.start.node);this.cursor.attach()}this.cursor.format(A,w),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(A){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,S=this.scroll.length();A=Math.min(A,S-1),w=Math.min(A+w,S-1)-A;var I=void 0,C=this.scroll.leaf(A),F=s(C,2),D=F[0],U=F[1];if(D==null)return null;var X=D.position(U,!0),$=s(X,2);I=$[0],U=$[1];var k=document.createRange();if(w>0){k.setStart(I,U);var R=this.scroll.leaf(A+w),P=s(R,2);if(D=P[0],U=P[1],D==null)return null;var L=D.position(U,!0),j=s(L,2);return I=j[0],U=j[1],k.setEnd(I,U),k.getBoundingClientRect()}else{var G="left",M=void 0;return I instanceof Text?(U<I.data.length?(k.setStart(I,U),k.setEnd(I,U+1)):(k.setStart(I,U-1),k.setEnd(I,U),G="right"),M=k.getBoundingClientRect()):(M=D.domNode.getBoundingClientRect(),U>0&&(G="right")),{bottom:M.top+M.height,height:M.height,left:M[G],right:M[G],top:M.top,width:0}}}},{key:"getNativeRange",value:function(){var A=document.getSelection();if(A==null||A.rangeCount<=0)return null;var w=A.getRangeAt(0);if(w==null)return null;var S=this.normalizeNative(w);return y.info("getNativeRange",S),S}},{key:"getRange",value:function(){var A=this.getNativeRange();if(A==null)return[null,null];var w=this.normalizedToRange(A);return[w,A]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(A){var w=this,S=[[A.start.node,A.start.offset]];A.native.collapsed||S.push([A.end.node,A.end.offset]);var I=S.map(function(D){var U=s(D,2),X=U[0],$=U[1],k=l.default.find(X,!0),R=k.offset(w.scroll);return $===0?R:k instanceof l.default.Container?R+k.length():R+k.index(X,$)}),C=Math.min(Math.max.apply(Math,b(I)),this.scroll.length()-1),F=Math.min.apply(Math,[C].concat(b(I)));return new x(F,C-F)}},{key:"normalizeNative",value:function(A){if(!T(this.root,A.startContainer)||!A.collapsed&&!T(this.root,A.endContainer))return null;var w={start:{node:A.startContainer,offset:A.startOffset},end:{node:A.endContainer,offset:A.endOffset},native:A};return[w.start,w.end].forEach(function(S){for(var I=S.node,C=S.offset;!(I instanceof Text)&&I.childNodes.length>0;)if(I.childNodes.length>C)I=I.childNodes[C],C=0;else if(I.childNodes.length===C)I=I.lastChild,C=I instanceof Text?I.data.length:I.childNodes.length+1;else break;S.node=I,S.offset=C}),w}},{key:"rangeToNative",value:function(A){var w=this,S=A.collapsed?[A.index]:[A.index,A.index+A.length],I=[],C=this.scroll.length();return S.forEach(function(F,D){F=Math.min(C-1,F);var U=void 0,X=w.scroll.leaf(F),$=s(X,2),k=$[0],R=$[1],P=k.position(R,D!==0),L=s(P,2);U=L[0],R=L[1],I.push(U,R)}),I.length<2&&(I=I.concat(I)),I}},{key:"scrollIntoView",value:function(A){var w=this.lastRange;if(w!=null){var S=this.getBounds(w.index,w.length);if(S!=null){var I=this.scroll.length()-1,C=this.scroll.line(Math.min(w.index,I)),F=s(C,1),D=F[0],U=D;if(w.length>0){var X=this.scroll.line(Math.min(w.index+w.length,I)),$=s(X,1);U=$[0]}if(!(D==null||U==null)){var k=A.getBoundingClientRect();S.top<k.top?A.scrollTop-=k.top-S.top:S.bottom>k.bottom&&(A.scrollTop+=S.bottom-k.bottom)}}}}},{key:"setNativeRange",value:function(A,w){var S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:A,I=arguments.length>3&&arguments[3]!==void 0?arguments[3]:w,C=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(y.info("setNativeRange",A,w,S,I),!(A!=null&&(this.root.parentNode==null||A.parentNode==null||S.parentNode==null))){var F=document.getSelection();if(F!=null)if(A!=null){this.hasFocus()||this.root.focus();var D=(this.getNativeRange()||{}).native;if(D==null||C||A!==D.startContainer||w!==D.startOffset||S!==D.endContainer||I!==D.endOffset){A.tagName=="BR"&&(w=[].indexOf.call(A.parentNode.childNodes,A),A=A.parentNode),S.tagName=="BR"&&(I=[].indexOf.call(S.parentNode.childNodes,S),S=S.parentNode);var U=document.createRange();U.setStart(A,w),U.setEnd(S,I),F.removeAllRanges(),F.addRange(U)}}else F.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(A){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:p.default.sources.API;if(typeof w=="string"&&(S=w,w=!1),y.info("setRange",A),A!=null){var I=this.rangeToNative(A);this.setNativeRange.apply(this,b(I).concat([w]))}else this.setNativeRange(null);this.update(S)}},{key:"update",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p.default.sources.USER,w=this.lastRange,S=this.getRange(),I=s(S,2),C=I[0],F=I[1];if(this.lastRange=C,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,u.default)(w,this.lastRange)){var D;!this.composing&&F!=null&&F.native.collapsed&&F.start.node!==this.cursor.textNode&&this.cursor.restore();var U=[p.default.events.SELECTION_CHANGE,(0,c.default)(this.lastRange),(0,c.default)(w),A];if((D=this.emitter).emit.apply(D,[p.default.events.EDITOR_CHANGE].concat(U)),A!==p.default.sources.SILENT){var X;(X=this.emitter).emit.apply(X,U)}}}}]),E}();function T(E,N){try{N.parentNode}catch{return!1}return N instanceof Text&&(N=N.parentNode),E.contains(N)}n.Range=x,n.default=O},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function p(v,g){for(var m=0;m<g.length;m++){var b=g[m];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(v,b.key,b)}}return function(v,g,m){return g&&p(v.prototype,g),m&&p(v,m),v}}(),a=function p(v,g,m){v===null&&(v=Function.prototype);var b=Object.getOwnPropertyDescriptor(v,g);if(b===void 0){var _=Object.getPrototypeOf(v);return _===null?void 0:p(_,g,m)}else{if("value"in b)return b.value;var y=b.get;return y===void 0?void 0:y.call(m)}},o=i(0),l=f(o);function f(p){return p&&p.__esModule?p:{default:p}}function c(p,v){if(!(p instanceof v))throw new TypeError("Cannot call a class as a function")}function h(p,v){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:p}function u(p,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);p.prototype=Object.create(v&&v.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(p,v):p.__proto__=v)}var d=function(p){u(v,p);function v(){return c(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return s(v,[{key:"insertInto",value:function(m,b){m.children.length===0?a(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"insertInto",this).call(this,m,b):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),v}(l.default.Embed);d.blotName="break",d.tagName="BR",n.default=d},function(r,n,i){var s=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var p in d)d.hasOwnProperty(p)&&(u[p]=d[p])};return function(u,d){h(u,d);function p(){this.constructor=u}u.prototype=d===null?Object.create(d):(p.prototype=d.prototype,new p)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(44),o=i(30),l=i(1),f=function(h){s(u,h);function u(d){var p=h.call(this,d)||this;return p.build(),p}return u.prototype.appendChild=function(d){this.insertBefore(d)},u.prototype.attach=function(){h.prototype.attach.call(this),this.children.forEach(function(d){d.attach()})},u.prototype.build=function(){var d=this;this.children=new a.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(p){try{var v=c(p);d.insertBefore(v,d.children.head||void 0)}catch(g){if(g instanceof l.ParchmentError)return;throw g}})},u.prototype.deleteAt=function(d,p){if(d===0&&p===this.length())return this.remove();this.children.forEachAt(d,p,function(v,g,m){v.deleteAt(g,m)})},u.prototype.descendant=function(d,p){var v=this.children.find(p),g=v[0],m=v[1];return d.blotName==null&&d(g)||d.blotName!=null&&g instanceof d?[g,m]:g instanceof u?g.descendant(d,m):[null,-1]},u.prototype.descendants=function(d,p,v){p===void 0&&(p=0),v===void 0&&(v=Number.MAX_VALUE);var g=[],m=v;return this.children.forEachAt(p,v,function(b,_,y){(d.blotName==null&&d(b)||d.blotName!=null&&b instanceof d)&&g.push(b),b instanceof u&&(g=g.concat(b.descendants(d,_,m))),m-=y}),g},u.prototype.detach=function(){this.children.forEach(function(d){d.detach()}),h.prototype.detach.call(this)},u.prototype.formatAt=function(d,p,v,g){this.children.forEachAt(d,p,function(m,b,_){m.formatAt(b,_,v,g)})},u.prototype.insertAt=function(d,p,v){var g=this.children.find(d),m=g[0],b=g[1];if(m)m.insertAt(b,p,v);else{var _=v==null?l.create("text",p):l.create(p,v);this.appendChild(_)}},u.prototype.insertBefore=function(d,p){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(v){return d instanceof v}))throw new l.ParchmentError("Cannot insert "+d.statics.blotName+" into "+this.statics.blotName);d.insertInto(this,p)},u.prototype.length=function(){return this.children.reduce(function(d,p){return d+p.length()},0)},u.prototype.moveChildren=function(d,p){this.children.forEach(function(v){d.insertBefore(v,p)})},u.prototype.optimize=function(d){if(h.prototype.optimize.call(this,d),this.children.length===0)if(this.statics.defaultChild!=null){var p=l.create(this.statics.defaultChild);this.appendChild(p),p.optimize(d)}else this.remove()},u.prototype.path=function(d,p){p===void 0&&(p=!1);var v=this.children.find(d,p),g=v[0],m=v[1],b=[[this,d]];return g instanceof u?b.concat(g.path(m,p)):(g!=null&&b.push([g,m]),b)},u.prototype.removeChild=function(d){this.children.remove(d)},u.prototype.replace=function(d){d instanceof u&&d.moveChildren(this),h.prototype.replace.call(this,d)},u.prototype.split=function(d,p){if(p===void 0&&(p=!1),!p){if(d===0)return this;if(d===this.length())return this.next}var v=this.clone();return this.parent.insertBefore(v,this.next),this.children.forEachAt(d,this.length(),function(g,m,b){g=g.split(m,p),v.appendChild(g)}),v},u.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},u.prototype.update=function(d,p){var v=this,g=[],m=[];d.forEach(function(b){b.target===v.domNode&&b.type==="childList"&&(g.push.apply(g,b.addedNodes),m.push.apply(m,b.removedNodes))}),m.forEach(function(b){if(!(b.parentNode!=null&&b.tagName!=="IFRAME"&&document.body.compareDocumentPosition(b)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var _=l.find(b);_!=null&&(_.domNode.parentNode==null||_.domNode.parentNode===v.domNode)&&_.detach()}}),g.filter(function(b){return b.parentNode==v.domNode}).sort(function(b,_){return b===_?0:b.compareDocumentPosition(_)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(b){var _=null;b.nextSibling!=null&&(_=l.find(b.nextSibling));var y=c(b);(y.next!=_||y.next==null)&&(y.parent!=null&&y.parent.removeChild(v),v.insertBefore(y,_||void 0))})},u}(o.default);function c(h){var u=l.find(h);if(u==null)try{u=l.create(h)}catch{u=l.create(l.Scope.INLINE),[].slice.call(h.childNodes).forEach(function(p){u.domNode.appendChild(p)}),h.parentNode&&h.parentNode.replaceChild(u.domNode,h),u.attach()}return u}n.default=f},function(r,n,i){var s=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var p in d)d.hasOwnProperty(p)&&(u[p]=d[p])};return function(u,d){h(u,d);function p(){this.constructor=u}u.prototype=d===null?Object.create(d):(p.prototype=d.prototype,new p)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(12),o=i(31),l=i(17),f=i(1),c=function(h){s(u,h);function u(d){var p=h.call(this,d)||this;return p.attributes=new o.default(p.domNode),p}return u.formats=function(d){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return d.tagName.toLowerCase()},u.prototype.format=function(d,p){var v=f.query(d);v instanceof a.default?this.attributes.attribute(v,p):p&&v!=null&&(d!==this.statics.blotName||this.formats()[d]!==p)&&this.replaceWith(d,p)},u.prototype.formats=function(){var d=this.attributes.values(),p=this.statics.formats(this.domNode);return p!=null&&(d[this.statics.blotName]=p),d},u.prototype.replaceWith=function(d,p){var v=h.prototype.replaceWith.call(this,d,p);return this.attributes.copy(v),v},u.prototype.update=function(d,p){var v=this;h.prototype.update.call(this,d,p),d.some(function(g){return g.target===v.domNode&&g.type==="attributes"})&&this.attributes.build()},u.prototype.wrap=function(d,p){var v=h.prototype.wrap.call(this,d,p);return v instanceof u&&v.statics.scope===this.statics.scope&&this.attributes.move(v),v},u}(l.default);n.default=c},function(r,n,i){var s=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,h){c.__proto__=h}||function(c,h){for(var u in h)h.hasOwnProperty(u)&&(c[u]=h[u])};return function(c,h){f(c,h);function u(){this.constructor=c}c.prototype=h===null?Object.create(h):(u.prototype=h.prototype,new u)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(30),o=i(1),l=function(f){s(c,f);function c(){return f!==null&&f.apply(this,arguments)||this}return c.value=function(h){return!0},c.prototype.index=function(h,u){return this.domNode===h||this.domNode.compareDocumentPosition(h)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(u,1):-1},c.prototype.position=function(h,u){var d=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return h>0&&(d+=1),[this.parent.domNode,d]},c.prototype.value=function(){var h;return h={},h[this.statics.blotName]=this.statics.value(this.domNode)||!0,h},c.scope=o.Scope.INLINE_BLOT,c}(a.default);n.default=l},function(r,n,i){var s=i(11),a=i(3),o={attributes:{compose:function(f,c,h){typeof f!="object"&&(f={}),typeof c!="object"&&(c={});var u=a(!0,{},c);h||(u=Object.keys(u).reduce(function(p,v){return u[v]!=null&&(p[v]=u[v]),p},{}));for(var d in f)f[d]!==void 0&&c[d]===void 0&&(u[d]=f[d]);return Object.keys(u).length>0?u:void 0},diff:function(f,c){typeof f!="object"&&(f={}),typeof c!="object"&&(c={});var h=Object.keys(f).concat(Object.keys(c)).reduce(function(u,d){return s(f[d],c[d])||(u[d]=c[d]===void 0?null:c[d]),u},{});return Object.keys(h).length>0?h:void 0},transform:function(f,c,h){if(typeof f!="object")return c;if(typeof c=="object"){if(!h)return c;var u=Object.keys(c).reduce(function(d,p){return f[p]===void 0&&(d[p]=c[p]),d},{});return Object.keys(u).length>0?u:void 0}}},iterator:function(f){return new l(f)},length:function(f){return typeof f.delete=="number"?f.delete:typeof f.retain=="number"?f.retain:typeof f.insert=="string"?f.insert.length:1}};function l(f){this.ops=f,this.index=0,this.offset=0}l.prototype.hasNext=function(){return this.peekLength()<1/0},l.prototype.next=function(f){f||(f=1/0);var c=this.ops[this.index];if(c){var h=this.offset,u=o.length(c);if(f>=u-h?(f=u-h,this.index+=1,this.offset=0):this.offset+=f,typeof c.delete=="number")return{delete:f};var d={};return c.attributes&&(d.attributes=c.attributes),typeof c.retain=="number"?d.retain=f:typeof c.insert=="string"?d.insert=c.insert.substr(h,f):d.insert=c.insert,d}else return{retain:1/0}},l.prototype.peek=function(){return this.ops[this.index]},l.prototype.peekLength=function(){return this.ops[this.index]?o.length(this.ops[this.index])-this.offset:1/0},l.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"},l.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var f=this.offset,c=this.index,h=this.next(),u=this.ops.slice(this.index);return this.offset=f,this.index=c,[h].concat(u)}else return[]},r.exports=o},function(r,n){var i=function(){function s(v,g){return g!=null&&v instanceof g}var a;try{a=Map}catch{a=function(){}}var o;try{o=Set}catch{o=function(){}}var l;try{l=Promise}catch{l=function(){}}function f(v,g,m,b,_){typeof g=="object"&&(m=g.depth,b=g.prototype,_=g.includeNonEnumerable,g=g.circular);var y=[],x=[],O=typeof Buffer<"u";typeof g>"u"&&(g=!0),typeof m>"u"&&(m=1/0);function T(E,N){if(E===null)return null;if(N===0)return E;var A,w;if(typeof E!="object")return E;if(s(E,a))A=new a;else if(s(E,o))A=new o;else if(s(E,l))A=new l(function(k,R){E.then(function(P){k(T(P,N-1))},function(P){R(T(P,N-1))})});else if(f.__isArray(E))A=[];else if(f.__isRegExp(E))A=new RegExp(E.source,p(E)),E.lastIndex&&(A.lastIndex=E.lastIndex);else if(f.__isDate(E))A=new Date(E.getTime());else{if(O&&Buffer.isBuffer(E))return Buffer.allocUnsafe?A=Buffer.allocUnsafe(E.length):A=new Buffer(E.length),E.copy(A),A;s(E,Error)?A=Object.create(E):typeof b>"u"?(w=Object.getPrototypeOf(E),A=Object.create(w)):(A=Object.create(b),w=b)}if(g){var S=y.indexOf(E);if(S!=-1)return x[S];y.push(E),x.push(A)}s(E,a)&&E.forEach(function(k,R){var P=T(R,N-1),L=T(k,N-1);A.set(P,L)}),s(E,o)&&E.forEach(function(k){var R=T(k,N-1);A.add(R)});for(var I in E){var C;w&&(C=Object.getOwnPropertyDescriptor(w,I)),!(C&&C.set==null)&&(A[I]=T(E[I],N-1))}if(Object.getOwnPropertySymbols)for(var F=Object.getOwnPropertySymbols(E),I=0;I<F.length;I++){var D=F[I],U=Object.getOwnPropertyDescriptor(E,D);U&&!U.enumerable&&!_||(A[D]=T(E[D],N-1),U.enumerable||Object.defineProperty(A,D,{enumerable:!1}))}if(_)for(var X=Object.getOwnPropertyNames(E),I=0;I<X.length;I++){var $=X[I],U=Object.getOwnPropertyDescriptor(E,$);U&&U.enumerable||(A[$]=T(E[$],N-1),Object.defineProperty(A,$,{enumerable:!1}))}return A}return T(v,m)}f.clonePrototype=function(g){if(g===null)return null;var m=function(){};return m.prototype=g,new m};function c(v){return Object.prototype.toString.call(v)}f.__objToStr=c;function h(v){return typeof v=="object"&&c(v)==="[object Date]"}f.__isDate=h;function u(v){return typeof v=="object"&&c(v)==="[object Array]"}f.__isArray=u;function d(v){return typeof v=="object"&&c(v)==="[object RegExp]"}f.__isRegExp=d;function p(v){var g="";return v.global&&(g+="g"),v.ignoreCase&&(g+="i"),v.multiline&&(g+="m"),g}return f.__getRegExpFlags=p,f}();typeof r=="object"&&r.exports&&(r.exports=i)},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function A(w,S){var I=[],C=!0,F=!1,D=void 0;try{for(var U=w[Symbol.iterator](),X;!(C=(X=U.next()).done)&&(I.push(X.value),!(S&&I.length===S));C=!0);}catch($){F=!0,D=$}finally{try{!C&&U.return&&U.return()}finally{if(F)throw D}}return I}return function(w,S){if(Array.isArray(w))return w;if(Symbol.iterator in Object(w))return A(w,S);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function A(w,S){for(var I=0;I<S.length;I++){var C=S[I];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(w,C.key,C)}}return function(w,S,I){return S&&A(w.prototype,S),I&&A(w,I),w}}(),o=function A(w,S,I){w===null&&(w=Function.prototype);var C=Object.getOwnPropertyDescriptor(w,S);if(C===void 0){var F=Object.getPrototypeOf(w);return F===null?void 0:A(F,S,I)}else{if("value"in C)return C.value;var D=C.get;return D===void 0?void 0:D.call(I)}},l=i(0),f=y(l),c=i(8),h=y(c),u=i(4),d=y(u),p=i(16),v=y(p),g=i(13),m=y(g),b=i(25),_=y(b);function y(A){return A&&A.__esModule?A:{default:A}}function x(A,w){if(!(A instanceof w))throw new TypeError("Cannot call a class as a function")}function O(A,w){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:A}function T(A,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);A.prototype=Object.create(w&&w.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(A,w):A.__proto__=w)}function E(A){return A instanceof d.default||A instanceof u.BlockEmbed}var N=function(A){T(w,A);function w(S,I){x(this,w);var C=O(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,S));return C.emitter=I.emitter,Array.isArray(I.whitelist)&&(C.whitelist=I.whitelist.reduce(function(F,D){return F[D]=!0,F},{})),C.domNode.addEventListener("DOMNodeInserted",function(){}),C.optimize(),C.enable(),C}return a(w,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(I,C){var F=this.line(I),D=s(F,2),U=D[0],X=D[1],$=this.line(I+C),k=s($,1),R=k[0];if(o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"deleteAt",this).call(this,I,C),R!=null&&U!==R&&X>0){if(U instanceof u.BlockEmbed||R instanceof u.BlockEmbed){this.optimize();return}if(U instanceof m.default){var P=U.newlineIndex(U.length(),!0);if(P>-1&&(U=U.split(P+1),U===R)){this.optimize();return}}else if(R instanceof m.default){var L=R.newlineIndex(0);L>-1&&R.split(L+1)}var j=R.children.head instanceof v.default?null:R.children.head;U.moveChildren(R,j),U.remove()}this.optimize()}},{key:"enable",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",I)}},{key:"formatAt",value:function(I,C,F,D){this.whitelist!=null&&!this.whitelist[F]||(o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"formatAt",this).call(this,I,C,F,D),this.optimize())}},{key:"insertAt",value:function(I,C,F){if(!(F!=null&&this.whitelist!=null&&!this.whitelist[C])){if(I>=this.length())if(F==null||f.default.query(C,f.default.Scope.BLOCK)==null){var D=f.default.create(this.statics.defaultChild);this.appendChild(D),F==null&&C.endsWith(`
576
- `)&&(C=C.slice(0,-1)),D.insertAt(0,C,F)}else{var U=f.default.create(C,F);this.appendChild(U)}else o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"insertAt",this).call(this,I,C,F);this.optimize()}}},{key:"insertBefore",value:function(I,C){if(I.statics.scope===f.default.Scope.INLINE_BLOT){var F=f.default.create(this.statics.defaultChild);F.appendChild(I),I=F}o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"insertBefore",this).call(this,I,C)}},{key:"leaf",value:function(I){return this.path(I).pop()||[null,-1]}},{key:"line",value:function(I){return I===this.length()?this.line(I-1):this.descendant(E,I)}},{key:"lines",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,F=function D(U,X,$){var k=[],R=$;return U.children.forEachAt(X,$,function(P,L,j){E(P)?k.push(P):P instanceof f.default.Container&&(k=k.concat(D(P,L,R))),R-=j}),k};return F(this,I,C)}},{key:"optimize",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"optimize",this).call(this,I,C),I.length>0&&this.emitter.emit(h.default.events.SCROLL_OPTIMIZE,I,C))}},{key:"path",value:function(I){return o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"path",this).call(this,I).slice(1)}},{key:"update",value:function(I){if(this.batch!==!0){var C=h.default.sources.USER;typeof I=="string"&&(C=I),Array.isArray(I)||(I=this.observer.takeRecords()),I.length>0&&this.emitter.emit(h.default.events.SCROLL_BEFORE_UPDATE,C,I),o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"update",this).call(this,I.concat([])),I.length>0&&this.emitter.emit(h.default.events.SCROLL_UPDATE,C,I)}}}]),w}(f.default.Scroll);N.blotName="scroll",N.className="ql-editor",N.tagName="DIV",N.defaultChild="block",N.allowedChildren=[d.default,u.BlockEmbed,_.default],n.default=N},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.SHORTKEY=n.default=void 0;var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(M){return typeof M}:function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M},a=function(){function M(B,q){var H=[],z=!0,Y=!1,J=void 0;try{for(var et=B[Symbol.iterator](),at;!(z=(at=et.next()).done)&&(H.push(at.value),!(q&&H.length===q));z=!0);}catch(lt){Y=!0,J=lt}finally{try{!z&&et.return&&et.return()}finally{if(Y)throw J}}return H}return function(B,q){if(Array.isArray(B))return B;if(Symbol.iterator in Object(B))return M(B,q);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function M(B,q){for(var H=0;H<q.length;H++){var z=q[H];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(B,z.key,z)}}return function(B,q,H){return q&&M(B.prototype,q),H&&M(B,H),B}}(),l=i(21),f=A(l),c=i(11),h=A(c),u=i(3),d=A(u),p=i(2),v=A(p),g=i(20),m=A(g),b=i(0),_=A(b),y=i(5),x=A(y),O=i(10),T=A(O),E=i(9),N=A(E);function A(M){return M&&M.__esModule?M:{default:M}}function w(M,B,q){return B in M?Object.defineProperty(M,B,{value:q,enumerable:!0,configurable:!0,writable:!0}):M[B]=q,M}function S(M,B){if(!(M instanceof B))throw new TypeError("Cannot call a class as a function")}function I(M,B){if(!M)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return B&&(typeof B=="object"||typeof B=="function")?B:M}function C(M,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof B);M.prototype=Object.create(B&&B.prototype,{constructor:{value:M,enumerable:!1,writable:!0,configurable:!0}}),B&&(Object.setPrototypeOf?Object.setPrototypeOf(M,B):M.__proto__=B)}var F=(0,T.default)("quill:keyboard"),D=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",U=function(M){C(B,M),o(B,null,[{key:"match",value:function(H,z){return z=G(z),["altKey","ctrlKey","metaKey","shiftKey"].some(function(Y){return!!z[Y]!==H[Y]&&z[Y]!==null})?!1:z.key===(H.which||H.keyCode)}}]);function B(q,H){S(this,B);var z=I(this,(B.__proto__||Object.getPrototypeOf(B)).call(this,q,H));return z.bindings={},Object.keys(z.options.bindings).forEach(function(Y){Y==="list autofill"&&q.scroll.whitelist!=null&&!q.scroll.whitelist.list||z.options.bindings[Y]&&z.addBinding(z.options.bindings[Y])}),z.addBinding({key:B.keys.ENTER,shiftKey:null},P),z.addBinding({key:B.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(z.addBinding({key:B.keys.BACKSPACE},{collapsed:!0},$),z.addBinding({key:B.keys.DELETE},{collapsed:!0},k)):(z.addBinding({key:B.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},$),z.addBinding({key:B.keys.DELETE},{collapsed:!0,suffix:/^.?$/},k)),z.addBinding({key:B.keys.BACKSPACE},{collapsed:!1},R),z.addBinding({key:B.keys.DELETE},{collapsed:!1},R),z.addBinding({key:B.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},$),z.listen(),z}return o(B,[{key:"addBinding",value:function(H){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},J=G(H);if(J==null||J.key==null)return F.warn("Attempted to add invalid keyboard binding",J);typeof z=="function"&&(z={handler:z}),typeof Y=="function"&&(Y={handler:Y}),J=(0,d.default)(J,z,Y),this.bindings[J.key]=this.bindings[J.key]||[],this.bindings[J.key].push(J)}},{key:"listen",value:function(){var H=this;this.quill.root.addEventListener("keydown",function(z){if(!z.defaultPrevented){var Y=z.which||z.keyCode,J=(H.bindings[Y]||[]).filter(function(gt){return B.match(z,gt)});if(J.length!==0){var et=H.quill.getSelection();if(!(et==null||!H.quill.hasFocus())){var at=H.quill.getLine(et.index),lt=a(at,2),Ct=lt[0],Rt=lt[1],V=H.quill.getLeaf(et.index),W=a(V,2),Z=W[0],tt=W[1],K=et.length===0?[Z,tt]:H.quill.getLeaf(et.index+et.length),ft=a(K,2),ct=ft[0],ht=ft[1],nt=Z instanceof _.default.Text?Z.value().slice(0,tt):"",At=ct instanceof _.default.Text?ct.value().slice(ht):"",Et={collapsed:et.length===0,empty:et.length===0&&Ct.length()<=1,format:H.quill.getFormat(et),offset:Rt,prefix:nt,suffix:At},$e=J.some(function(gt){if(gt.collapsed!=null&&gt.collapsed!==Et.collapsed||gt.empty!=null&&gt.empty!==Et.empty||gt.offset!=null&&gt.offset!==Et.offset)return!1;if(Array.isArray(gt.format)){if(gt.format.every(function(ut){return Et.format[ut]==null}))return!1}else if(s(gt.format)==="object"&&!Object.keys(gt.format).every(function(ut){return gt.format[ut]===!0?Et.format[ut]!=null:gt.format[ut]===!1?Et.format[ut]==null:(0,h.default)(gt.format[ut],Et.format[ut])}))return!1;return gt.prefix!=null&&!gt.prefix.test(Et.prefix)||gt.suffix!=null&&!gt.suffix.test(Et.suffix)?!1:gt.handler.call(H,et,Et)!==!0});$e&&z.preventDefault()}}}})}}]),B}(N.default);U.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},U.DEFAULTS={bindings:{bold:j("bold"),italic:j("italic"),underline:j("underline"),indent:{key:U.keys.TAB,format:["blockquote","indent","list"],handler:function(B,q){if(q.collapsed&&q.offset!==0)return!0;this.quill.format("indent","+1",x.default.sources.USER)}},outdent:{key:U.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(B,q){if(q.collapsed&&q.offset!==0)return!0;this.quill.format("indent","-1",x.default.sources.USER)}},"outdent backspace":{key:U.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(B,q){q.format.indent!=null?this.quill.format("indent","-1",x.default.sources.USER):q.format.list!=null&&this.quill.format("list",!1,x.default.sources.USER)}},"indent code-block":L(!0),"outdent code-block":L(!1),"remove tab":{key:U.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(B){this.quill.deleteText(B.index-1,1,x.default.sources.USER)}},tab:{key:U.keys.TAB,handler:function(B){this.quill.history.cutoff();var q=new v.default().retain(B.index).delete(B.length).insert(" ");this.quill.updateContents(q,x.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(B.index+1,x.default.sources.SILENT)}},"list empty enter":{key:U.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(B,q){this.quill.format("list",!1,x.default.sources.USER),q.format.indent&&this.quill.format("indent",!1,x.default.sources.USER)}},"checklist enter":{key:U.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(B){var q=this.quill.getLine(B.index),H=a(q,2),z=H[0],Y=H[1],J=(0,d.default)({},z.formats(),{list:"checked"}),et=new v.default().retain(B.index).insert(`
575
+ `);return P.insert(L,R.attributes)}return P.push(R)},new f.default)}n.default=$},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.Range=void 0;var s=function(){function E(N,A){var w=[],S=!0,I=!1,C=void 0;try{for(var F=N[Symbol.iterator](),$;!(S=($=F.next()).done)&&(w.push($.value),!(A&&w.length===A));S=!0);}catch(U){I=!0,C=U}finally{try{!S&&F.return&&F.return()}finally{if(I)throw C}}return w}return function(N,A){if(Array.isArray(N))return N;if(Symbol.iterator in Object(N))return E(N,A);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function E(N,A){for(var w=0;w<A.length;w++){var S=A[w];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(N,S.key,S)}}return function(N,A,w){return A&&E(N.prototype,A),w&&E(N,w),N}}(),o=i(0),l=m(o),f=i(21),c=m(f),h=i(11),u=m(h),d=i(8),p=m(d),v=i(10),g=m(v);function m(E){return E&&E.__esModule?E:{default:E}}function b(E){if(Array.isArray(E)){for(var N=0,A=Array(E.length);N<E.length;N++)A[N]=E[N];return A}else return Array.from(E)}function _(E,N){if(!(E instanceof N))throw new TypeError("Cannot call a class as a function")}var y=(0,g.default)("quill:selection"),x=function E(N){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;_(this,E),this.index=N,this.length=A},O=function(){function E(N,A){var w=this;_(this,E),this.emitter=A,this.scroll=N,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=l.default.create("cursor",this),this.lastRange=this.savedRange=new x(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){w.mouseDown||setTimeout(w.update.bind(w,p.default.sources.USER),1)}),this.emitter.on(p.default.events.EDITOR_CHANGE,function(S,I){S===p.default.events.TEXT_CHANGE&&I.length()>0&&w.update(p.default.sources.SILENT)}),this.emitter.on(p.default.events.SCROLL_BEFORE_UPDATE,function(){if(w.hasFocus()){var S=w.getNativeRange();S!=null&&S.start.node!==w.cursor.textNode&&w.emitter.once(p.default.events.SCROLL_UPDATE,function(){try{w.setNativeRange(S.start.node,S.start.offset,S.end.node,S.end.offset)}catch{}})}}),this.emitter.on(p.default.events.SCROLL_OPTIMIZE,function(S,I){if(I.range){var C=I.range,F=C.startNode,$=C.startOffset,U=C.endNode,X=C.endOffset;w.setNativeRange(F,$,U,X)}}),this.update(p.default.sources.SILENT)}return a(E,[{key:"handleComposition",value:function(){var A=this;this.root.addEventListener("compositionstart",function(){A.composing=!0}),this.root.addEventListener("compositionend",function(){if(A.composing=!1,A.cursor.parent){var w=A.cursor.restore();if(!w)return;setTimeout(function(){A.setNativeRange(w.startNode,w.startOffset,w.endNode,w.endOffset)},1)}})}},{key:"handleDragging",value:function(){var A=this;this.emitter.listenDOM("mousedown",document.body,function(){A.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){A.mouseDown=!1,A.update(p.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(A,w){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[A])){this.scroll.update();var S=this.getNativeRange();if(!(S==null||!S.native.collapsed||l.default.query(A,l.default.Scope.BLOCK))){if(S.start.node!==this.cursor.textNode){var I=l.default.find(S.start.node,!1);if(I==null)return;if(I instanceof l.default.Leaf){var C=I.split(S.start.offset);I.parent.insertBefore(this.cursor,C)}else I.insertBefore(this.cursor,S.start.node);this.cursor.attach()}this.cursor.format(A,w),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(A){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,S=this.scroll.length();A=Math.min(A,S-1),w=Math.min(A+w,S-1)-A;var I=void 0,C=this.scroll.leaf(A),F=s(C,2),$=F[0],U=F[1];if($==null)return null;var X=$.position(U,!0),D=s(X,2);I=D[0],U=D[1];var P=document.createRange();if(w>0){P.setStart(I,U);var R=this.scroll.leaf(A+w),k=s(R,2);if($=k[0],U=k[1],$==null)return null;var L=$.position(U,!0),j=s(L,2);return I=j[0],U=j[1],P.setEnd(I,U),P.getBoundingClientRect()}else{var G="left",M=void 0;return I instanceof Text?(U<I.data.length?(P.setStart(I,U),P.setEnd(I,U+1)):(P.setStart(I,U-1),P.setEnd(I,U),G="right"),M=P.getBoundingClientRect()):(M=$.domNode.getBoundingClientRect(),U>0&&(G="right")),{bottom:M.top+M.height,height:M.height,left:M[G],right:M[G],top:M.top,width:0}}}},{key:"getNativeRange",value:function(){var A=document.getSelection();if(A==null||A.rangeCount<=0)return null;var w=A.getRangeAt(0);if(w==null)return null;var S=this.normalizeNative(w);return y.info("getNativeRange",S),S}},{key:"getRange",value:function(){var A=this.getNativeRange();if(A==null)return[null,null];var w=this.normalizedToRange(A);return[w,A]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(A){var w=this,S=[[A.start.node,A.start.offset]];A.native.collapsed||S.push([A.end.node,A.end.offset]);var I=S.map(function($){var U=s($,2),X=U[0],D=U[1],P=l.default.find(X,!0),R=P.offset(w.scroll);return D===0?R:P instanceof l.default.Container?R+P.length():R+P.index(X,D)}),C=Math.min(Math.max.apply(Math,b(I)),this.scroll.length()-1),F=Math.min.apply(Math,[C].concat(b(I)));return new x(F,C-F)}},{key:"normalizeNative",value:function(A){if(!T(this.root,A.startContainer)||!A.collapsed&&!T(this.root,A.endContainer))return null;var w={start:{node:A.startContainer,offset:A.startOffset},end:{node:A.endContainer,offset:A.endOffset},native:A};return[w.start,w.end].forEach(function(S){for(var I=S.node,C=S.offset;!(I instanceof Text)&&I.childNodes.length>0;)if(I.childNodes.length>C)I=I.childNodes[C],C=0;else if(I.childNodes.length===C)I=I.lastChild,C=I instanceof Text?I.data.length:I.childNodes.length+1;else break;S.node=I,S.offset=C}),w}},{key:"rangeToNative",value:function(A){var w=this,S=A.collapsed?[A.index]:[A.index,A.index+A.length],I=[],C=this.scroll.length();return S.forEach(function(F,$){F=Math.min(C-1,F);var U=void 0,X=w.scroll.leaf(F),D=s(X,2),P=D[0],R=D[1],k=P.position(R,$!==0),L=s(k,2);U=L[0],R=L[1],I.push(U,R)}),I.length<2&&(I=I.concat(I)),I}},{key:"scrollIntoView",value:function(A){var w=this.lastRange;if(w!=null){var S=this.getBounds(w.index,w.length);if(S!=null){var I=this.scroll.length()-1,C=this.scroll.line(Math.min(w.index,I)),F=s(C,1),$=F[0],U=$;if(w.length>0){var X=this.scroll.line(Math.min(w.index+w.length,I)),D=s(X,1);U=D[0]}if(!($==null||U==null)){var P=A.getBoundingClientRect();S.top<P.top?A.scrollTop-=P.top-S.top:S.bottom>P.bottom&&(A.scrollTop+=S.bottom-P.bottom)}}}}},{key:"setNativeRange",value:function(A,w){var S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:A,I=arguments.length>3&&arguments[3]!==void 0?arguments[3]:w,C=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(y.info("setNativeRange",A,w,S,I),!(A!=null&&(this.root.parentNode==null||A.parentNode==null||S.parentNode==null))){var F=document.getSelection();if(F!=null)if(A!=null){this.hasFocus()||this.root.focus();var $=(this.getNativeRange()||{}).native;if($==null||C||A!==$.startContainer||w!==$.startOffset||S!==$.endContainer||I!==$.endOffset){A.tagName=="BR"&&(w=[].indexOf.call(A.parentNode.childNodes,A),A=A.parentNode),S.tagName=="BR"&&(I=[].indexOf.call(S.parentNode.childNodes,S),S=S.parentNode);var U=document.createRange();U.setStart(A,w),U.setEnd(S,I),F.removeAllRanges(),F.addRange(U)}}else F.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(A){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:p.default.sources.API;if(typeof w=="string"&&(S=w,w=!1),y.info("setRange",A),A!=null){var I=this.rangeToNative(A);this.setNativeRange.apply(this,b(I).concat([w]))}else this.setNativeRange(null);this.update(S)}},{key:"update",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p.default.sources.USER,w=this.lastRange,S=this.getRange(),I=s(S,2),C=I[0],F=I[1];if(this.lastRange=C,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,u.default)(w,this.lastRange)){var $;!this.composing&&F!=null&&F.native.collapsed&&F.start.node!==this.cursor.textNode&&this.cursor.restore();var U=[p.default.events.SELECTION_CHANGE,(0,c.default)(this.lastRange),(0,c.default)(w),A];if(($=this.emitter).emit.apply($,[p.default.events.EDITOR_CHANGE].concat(U)),A!==p.default.sources.SILENT){var X;(X=this.emitter).emit.apply(X,U)}}}}]),E}();function T(E,N){try{N.parentNode}catch{return!1}return N instanceof Text&&(N=N.parentNode),E.contains(N)}n.Range=x,n.default=O},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function p(v,g){for(var m=0;m<g.length;m++){var b=g[m];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(v,b.key,b)}}return function(v,g,m){return g&&p(v.prototype,g),m&&p(v,m),v}}(),a=function p(v,g,m){v===null&&(v=Function.prototype);var b=Object.getOwnPropertyDescriptor(v,g);if(b===void 0){var _=Object.getPrototypeOf(v);return _===null?void 0:p(_,g,m)}else{if("value"in b)return b.value;var y=b.get;return y===void 0?void 0:y.call(m)}},o=i(0),l=f(o);function f(p){return p&&p.__esModule?p:{default:p}}function c(p,v){if(!(p instanceof v))throw new TypeError("Cannot call a class as a function")}function h(p,v){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:p}function u(p,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);p.prototype=Object.create(v&&v.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(p,v):p.__proto__=v)}var d=function(p){u(v,p);function v(){return c(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return s(v,[{key:"insertInto",value:function(m,b){m.children.length===0?a(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"insertInto",this).call(this,m,b):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),v}(l.default.Embed);d.blotName="break",d.tagName="BR",n.default=d},function(r,n,i){var s=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var p in d)d.hasOwnProperty(p)&&(u[p]=d[p])};return function(u,d){h(u,d);function p(){this.constructor=u}u.prototype=d===null?Object.create(d):(p.prototype=d.prototype,new p)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(44),o=i(30),l=i(1),f=function(h){s(u,h);function u(d){var p=h.call(this,d)||this;return p.build(),p}return u.prototype.appendChild=function(d){this.insertBefore(d)},u.prototype.attach=function(){h.prototype.attach.call(this),this.children.forEach(function(d){d.attach()})},u.prototype.build=function(){var d=this;this.children=new a.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(p){try{var v=c(p);d.insertBefore(v,d.children.head||void 0)}catch(g){if(g instanceof l.ParchmentError)return;throw g}})},u.prototype.deleteAt=function(d,p){if(d===0&&p===this.length())return this.remove();this.children.forEachAt(d,p,function(v,g,m){v.deleteAt(g,m)})},u.prototype.descendant=function(d,p){var v=this.children.find(p),g=v[0],m=v[1];return d.blotName==null&&d(g)||d.blotName!=null&&g instanceof d?[g,m]:g instanceof u?g.descendant(d,m):[null,-1]},u.prototype.descendants=function(d,p,v){p===void 0&&(p=0),v===void 0&&(v=Number.MAX_VALUE);var g=[],m=v;return this.children.forEachAt(p,v,function(b,_,y){(d.blotName==null&&d(b)||d.blotName!=null&&b instanceof d)&&g.push(b),b instanceof u&&(g=g.concat(b.descendants(d,_,m))),m-=y}),g},u.prototype.detach=function(){this.children.forEach(function(d){d.detach()}),h.prototype.detach.call(this)},u.prototype.formatAt=function(d,p,v,g){this.children.forEachAt(d,p,function(m,b,_){m.formatAt(b,_,v,g)})},u.prototype.insertAt=function(d,p,v){var g=this.children.find(d),m=g[0],b=g[1];if(m)m.insertAt(b,p,v);else{var _=v==null?l.create("text",p):l.create(p,v);this.appendChild(_)}},u.prototype.insertBefore=function(d,p){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(v){return d instanceof v}))throw new l.ParchmentError("Cannot insert "+d.statics.blotName+" into "+this.statics.blotName);d.insertInto(this,p)},u.prototype.length=function(){return this.children.reduce(function(d,p){return d+p.length()},0)},u.prototype.moveChildren=function(d,p){this.children.forEach(function(v){d.insertBefore(v,p)})},u.prototype.optimize=function(d){if(h.prototype.optimize.call(this,d),this.children.length===0)if(this.statics.defaultChild!=null){var p=l.create(this.statics.defaultChild);this.appendChild(p),p.optimize(d)}else this.remove()},u.prototype.path=function(d,p){p===void 0&&(p=!1);var v=this.children.find(d,p),g=v[0],m=v[1],b=[[this,d]];return g instanceof u?b.concat(g.path(m,p)):(g!=null&&b.push([g,m]),b)},u.prototype.removeChild=function(d){this.children.remove(d)},u.prototype.replace=function(d){d instanceof u&&d.moveChildren(this),h.prototype.replace.call(this,d)},u.prototype.split=function(d,p){if(p===void 0&&(p=!1),!p){if(d===0)return this;if(d===this.length())return this.next}var v=this.clone();return this.parent.insertBefore(v,this.next),this.children.forEachAt(d,this.length(),function(g,m,b){g=g.split(m,p),v.appendChild(g)}),v},u.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},u.prototype.update=function(d,p){var v=this,g=[],m=[];d.forEach(function(b){b.target===v.domNode&&b.type==="childList"&&(g.push.apply(g,b.addedNodes),m.push.apply(m,b.removedNodes))}),m.forEach(function(b){if(!(b.parentNode!=null&&b.tagName!=="IFRAME"&&document.body.compareDocumentPosition(b)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var _=l.find(b);_!=null&&(_.domNode.parentNode==null||_.domNode.parentNode===v.domNode)&&_.detach()}}),g.filter(function(b){return b.parentNode==v.domNode}).sort(function(b,_){return b===_?0:b.compareDocumentPosition(_)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(b){var _=null;b.nextSibling!=null&&(_=l.find(b.nextSibling));var y=c(b);(y.next!=_||y.next==null)&&(y.parent!=null&&y.parent.removeChild(v),v.insertBefore(y,_||void 0))})},u}(o.default);function c(h){var u=l.find(h);if(u==null)try{u=l.create(h)}catch{u=l.create(l.Scope.INLINE),[].slice.call(h.childNodes).forEach(function(p){u.domNode.appendChild(p)}),h.parentNode&&h.parentNode.replaceChild(u.domNode,h),u.attach()}return u}n.default=f},function(r,n,i){var s=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var p in d)d.hasOwnProperty(p)&&(u[p]=d[p])};return function(u,d){h(u,d);function p(){this.constructor=u}u.prototype=d===null?Object.create(d):(p.prototype=d.prototype,new p)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(12),o=i(31),l=i(17),f=i(1),c=function(h){s(u,h);function u(d){var p=h.call(this,d)||this;return p.attributes=new o.default(p.domNode),p}return u.formats=function(d){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return d.tagName.toLowerCase()},u.prototype.format=function(d,p){var v=f.query(d);v instanceof a.default?this.attributes.attribute(v,p):p&&v!=null&&(d!==this.statics.blotName||this.formats()[d]!==p)&&this.replaceWith(d,p)},u.prototype.formats=function(){var d=this.attributes.values(),p=this.statics.formats(this.domNode);return p!=null&&(d[this.statics.blotName]=p),d},u.prototype.replaceWith=function(d,p){var v=h.prototype.replaceWith.call(this,d,p);return this.attributes.copy(v),v},u.prototype.update=function(d,p){var v=this;h.prototype.update.call(this,d,p),d.some(function(g){return g.target===v.domNode&&g.type==="attributes"})&&this.attributes.build()},u.prototype.wrap=function(d,p){var v=h.prototype.wrap.call(this,d,p);return v instanceof u&&v.statics.scope===this.statics.scope&&this.attributes.move(v),v},u}(l.default);n.default=c},function(r,n,i){var s=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,h){c.__proto__=h}||function(c,h){for(var u in h)h.hasOwnProperty(u)&&(c[u]=h[u])};return function(c,h){f(c,h);function u(){this.constructor=c}c.prototype=h===null?Object.create(h):(u.prototype=h.prototype,new u)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(30),o=i(1),l=function(f){s(c,f);function c(){return f!==null&&f.apply(this,arguments)||this}return c.value=function(h){return!0},c.prototype.index=function(h,u){return this.domNode===h||this.domNode.compareDocumentPosition(h)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(u,1):-1},c.prototype.position=function(h,u){var d=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return h>0&&(d+=1),[this.parent.domNode,d]},c.prototype.value=function(){var h;return h={},h[this.statics.blotName]=this.statics.value(this.domNode)||!0,h},c.scope=o.Scope.INLINE_BLOT,c}(a.default);n.default=l},function(r,n,i){var s=i(11),a=i(3),o={attributes:{compose:function(f,c,h){typeof f!="object"&&(f={}),typeof c!="object"&&(c={});var u=a(!0,{},c);h||(u=Object.keys(u).reduce(function(p,v){return u[v]!=null&&(p[v]=u[v]),p},{}));for(var d in f)f[d]!==void 0&&c[d]===void 0&&(u[d]=f[d]);return Object.keys(u).length>0?u:void 0},diff:function(f,c){typeof f!="object"&&(f={}),typeof c!="object"&&(c={});var h=Object.keys(f).concat(Object.keys(c)).reduce(function(u,d){return s(f[d],c[d])||(u[d]=c[d]===void 0?null:c[d]),u},{});return Object.keys(h).length>0?h:void 0},transform:function(f,c,h){if(typeof f!="object")return c;if(typeof c=="object"){if(!h)return c;var u=Object.keys(c).reduce(function(d,p){return f[p]===void 0&&(d[p]=c[p]),d},{});return Object.keys(u).length>0?u:void 0}}},iterator:function(f){return new l(f)},length:function(f){return typeof f.delete=="number"?f.delete:typeof f.retain=="number"?f.retain:typeof f.insert=="string"?f.insert.length:1}};function l(f){this.ops=f,this.index=0,this.offset=0}l.prototype.hasNext=function(){return this.peekLength()<1/0},l.prototype.next=function(f){f||(f=1/0);var c=this.ops[this.index];if(c){var h=this.offset,u=o.length(c);if(f>=u-h?(f=u-h,this.index+=1,this.offset=0):this.offset+=f,typeof c.delete=="number")return{delete:f};var d={};return c.attributes&&(d.attributes=c.attributes),typeof c.retain=="number"?d.retain=f:typeof c.insert=="string"?d.insert=c.insert.substr(h,f):d.insert=c.insert,d}else return{retain:1/0}},l.prototype.peek=function(){return this.ops[this.index]},l.prototype.peekLength=function(){return this.ops[this.index]?o.length(this.ops[this.index])-this.offset:1/0},l.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"},l.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var f=this.offset,c=this.index,h=this.next(),u=this.ops.slice(this.index);return this.offset=f,this.index=c,[h].concat(u)}else return[]},r.exports=o},function(r,n){var i=function(){function s(v,g){return g!=null&&v instanceof g}var a;try{a=Map}catch{a=function(){}}var o;try{o=Set}catch{o=function(){}}var l;try{l=Promise}catch{l=function(){}}function f(v,g,m,b,_){typeof g=="object"&&(m=g.depth,b=g.prototype,_=g.includeNonEnumerable,g=g.circular);var y=[],x=[],O=typeof Buffer<"u";typeof g>"u"&&(g=!0),typeof m>"u"&&(m=1/0);function T(E,N){if(E===null)return null;if(N===0)return E;var A,w;if(typeof E!="object")return E;if(s(E,a))A=new a;else if(s(E,o))A=new o;else if(s(E,l))A=new l(function(P,R){E.then(function(k){P(T(k,N-1))},function(k){R(T(k,N-1))})});else if(f.__isArray(E))A=[];else if(f.__isRegExp(E))A=new RegExp(E.source,p(E)),E.lastIndex&&(A.lastIndex=E.lastIndex);else if(f.__isDate(E))A=new Date(E.getTime());else{if(O&&Buffer.isBuffer(E))return Buffer.allocUnsafe?A=Buffer.allocUnsafe(E.length):A=new Buffer(E.length),E.copy(A),A;s(E,Error)?A=Object.create(E):typeof b>"u"?(w=Object.getPrototypeOf(E),A=Object.create(w)):(A=Object.create(b),w=b)}if(g){var S=y.indexOf(E);if(S!=-1)return x[S];y.push(E),x.push(A)}s(E,a)&&E.forEach(function(P,R){var k=T(R,N-1),L=T(P,N-1);A.set(k,L)}),s(E,o)&&E.forEach(function(P){var R=T(P,N-1);A.add(R)});for(var I in E){var C;w&&(C=Object.getOwnPropertyDescriptor(w,I)),!(C&&C.set==null)&&(A[I]=T(E[I],N-1))}if(Object.getOwnPropertySymbols)for(var F=Object.getOwnPropertySymbols(E),I=0;I<F.length;I++){var $=F[I],U=Object.getOwnPropertyDescriptor(E,$);U&&!U.enumerable&&!_||(A[$]=T(E[$],N-1),U.enumerable||Object.defineProperty(A,$,{enumerable:!1}))}if(_)for(var X=Object.getOwnPropertyNames(E),I=0;I<X.length;I++){var D=X[I],U=Object.getOwnPropertyDescriptor(E,D);U&&U.enumerable||(A[D]=T(E[D],N-1),Object.defineProperty(A,D,{enumerable:!1}))}return A}return T(v,m)}f.clonePrototype=function(g){if(g===null)return null;var m=function(){};return m.prototype=g,new m};function c(v){return Object.prototype.toString.call(v)}f.__objToStr=c;function h(v){return typeof v=="object"&&c(v)==="[object Date]"}f.__isDate=h;function u(v){return typeof v=="object"&&c(v)==="[object Array]"}f.__isArray=u;function d(v){return typeof v=="object"&&c(v)==="[object RegExp]"}f.__isRegExp=d;function p(v){var g="";return v.global&&(g+="g"),v.ignoreCase&&(g+="i"),v.multiline&&(g+="m"),g}return f.__getRegExpFlags=p,f}();typeof r=="object"&&r.exports&&(r.exports=i)},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function A(w,S){var I=[],C=!0,F=!1,$=void 0;try{for(var U=w[Symbol.iterator](),X;!(C=(X=U.next()).done)&&(I.push(X.value),!(S&&I.length===S));C=!0);}catch(D){F=!0,$=D}finally{try{!C&&U.return&&U.return()}finally{if(F)throw $}}return I}return function(w,S){if(Array.isArray(w))return w;if(Symbol.iterator in Object(w))return A(w,S);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function A(w,S){for(var I=0;I<S.length;I++){var C=S[I];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(w,C.key,C)}}return function(w,S,I){return S&&A(w.prototype,S),I&&A(w,I),w}}(),o=function A(w,S,I){w===null&&(w=Function.prototype);var C=Object.getOwnPropertyDescriptor(w,S);if(C===void 0){var F=Object.getPrototypeOf(w);return F===null?void 0:A(F,S,I)}else{if("value"in C)return C.value;var $=C.get;return $===void 0?void 0:$.call(I)}},l=i(0),f=y(l),c=i(8),h=y(c),u=i(4),d=y(u),p=i(16),v=y(p),g=i(13),m=y(g),b=i(25),_=y(b);function y(A){return A&&A.__esModule?A:{default:A}}function x(A,w){if(!(A instanceof w))throw new TypeError("Cannot call a class as a function")}function O(A,w){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:A}function T(A,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);A.prototype=Object.create(w&&w.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(A,w):A.__proto__=w)}function E(A){return A instanceof d.default||A instanceof u.BlockEmbed}var N=function(A){T(w,A);function w(S,I){x(this,w);var C=O(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,S));return C.emitter=I.emitter,Array.isArray(I.whitelist)&&(C.whitelist=I.whitelist.reduce(function(F,$){return F[$]=!0,F},{})),C.domNode.addEventListener("DOMNodeInserted",function(){}),C.optimize(),C.enable(),C}return a(w,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(I,C){var F=this.line(I),$=s(F,2),U=$[0],X=$[1],D=this.line(I+C),P=s(D,1),R=P[0];if(o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"deleteAt",this).call(this,I,C),R!=null&&U!==R&&X>0){if(U instanceof u.BlockEmbed||R instanceof u.BlockEmbed){this.optimize();return}if(U instanceof m.default){var k=U.newlineIndex(U.length(),!0);if(k>-1&&(U=U.split(k+1),U===R)){this.optimize();return}}else if(R instanceof m.default){var L=R.newlineIndex(0);L>-1&&R.split(L+1)}var j=R.children.head instanceof v.default?null:R.children.head;U.moveChildren(R,j),U.remove()}this.optimize()}},{key:"enable",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",I)}},{key:"formatAt",value:function(I,C,F,$){this.whitelist!=null&&!this.whitelist[F]||(o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"formatAt",this).call(this,I,C,F,$),this.optimize())}},{key:"insertAt",value:function(I,C,F){if(!(F!=null&&this.whitelist!=null&&!this.whitelist[C])){if(I>=this.length())if(F==null||f.default.query(C,f.default.Scope.BLOCK)==null){var $=f.default.create(this.statics.defaultChild);this.appendChild($),F==null&&C.endsWith(`
576
+ `)&&(C=C.slice(0,-1)),$.insertAt(0,C,F)}else{var U=f.default.create(C,F);this.appendChild(U)}else o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"insertAt",this).call(this,I,C,F);this.optimize()}}},{key:"insertBefore",value:function(I,C){if(I.statics.scope===f.default.Scope.INLINE_BLOT){var F=f.default.create(this.statics.defaultChild);F.appendChild(I),I=F}o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"insertBefore",this).call(this,I,C)}},{key:"leaf",value:function(I){return this.path(I).pop()||[null,-1]}},{key:"line",value:function(I){return I===this.length()?this.line(I-1):this.descendant(E,I)}},{key:"lines",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,F=function $(U,X,D){var P=[],R=D;return U.children.forEachAt(X,D,function(k,L,j){E(k)?P.push(k):k instanceof f.default.Container&&(P=P.concat($(k,L,R))),R-=j}),P};return F(this,I,C)}},{key:"optimize",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"optimize",this).call(this,I,C),I.length>0&&this.emitter.emit(h.default.events.SCROLL_OPTIMIZE,I,C))}},{key:"path",value:function(I){return o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"path",this).call(this,I).slice(1)}},{key:"update",value:function(I){if(this.batch!==!0){var C=h.default.sources.USER;typeof I=="string"&&(C=I),Array.isArray(I)||(I=this.observer.takeRecords()),I.length>0&&this.emitter.emit(h.default.events.SCROLL_BEFORE_UPDATE,C,I),o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"update",this).call(this,I.concat([])),I.length>0&&this.emitter.emit(h.default.events.SCROLL_UPDATE,C,I)}}}]),w}(f.default.Scroll);N.blotName="scroll",N.className="ql-editor",N.tagName="DIV",N.defaultChild="block",N.allowedChildren=[d.default,u.BlockEmbed,_.default],n.default=N},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.SHORTKEY=n.default=void 0;var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(M){return typeof M}:function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M},a=function(){function M(B,q){var H=[],z=!0,Y=!1,J=void 0;try{for(var et=B[Symbol.iterator](),at;!(z=(at=et.next()).done)&&(H.push(at.value),!(q&&H.length===q));z=!0);}catch(lt){Y=!0,J=lt}finally{try{!z&&et.return&&et.return()}finally{if(Y)throw J}}return H}return function(B,q){if(Array.isArray(B))return B;if(Symbol.iterator in Object(B))return M(B,q);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function M(B,q){for(var H=0;H<q.length;H++){var z=q[H];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(B,z.key,z)}}return function(B,q,H){return q&&M(B.prototype,q),H&&M(B,H),B}}(),l=i(21),f=A(l),c=i(11),h=A(c),u=i(3),d=A(u),p=i(2),v=A(p),g=i(20),m=A(g),b=i(0),_=A(b),y=i(5),x=A(y),O=i(10),T=A(O),E=i(9),N=A(E);function A(M){return M&&M.__esModule?M:{default:M}}function w(M,B,q){return B in M?Object.defineProperty(M,B,{value:q,enumerable:!0,configurable:!0,writable:!0}):M[B]=q,M}function S(M,B){if(!(M instanceof B))throw new TypeError("Cannot call a class as a function")}function I(M,B){if(!M)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return B&&(typeof B=="object"||typeof B=="function")?B:M}function C(M,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof B);M.prototype=Object.create(B&&B.prototype,{constructor:{value:M,enumerable:!1,writable:!0,configurable:!0}}),B&&(Object.setPrototypeOf?Object.setPrototypeOf(M,B):M.__proto__=B)}var F=(0,T.default)("quill:keyboard"),$=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",U=function(M){C(B,M),o(B,null,[{key:"match",value:function(H,z){return z=G(z),["altKey","ctrlKey","metaKey","shiftKey"].some(function(Y){return!!z[Y]!==H[Y]&&z[Y]!==null})?!1:z.key===(H.which||H.keyCode)}}]);function B(q,H){S(this,B);var z=I(this,(B.__proto__||Object.getPrototypeOf(B)).call(this,q,H));return z.bindings={},Object.keys(z.options.bindings).forEach(function(Y){Y==="list autofill"&&q.scroll.whitelist!=null&&!q.scroll.whitelist.list||z.options.bindings[Y]&&z.addBinding(z.options.bindings[Y])}),z.addBinding({key:B.keys.ENTER,shiftKey:null},k),z.addBinding({key:B.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(z.addBinding({key:B.keys.BACKSPACE},{collapsed:!0},D),z.addBinding({key:B.keys.DELETE},{collapsed:!0},P)):(z.addBinding({key:B.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},D),z.addBinding({key:B.keys.DELETE},{collapsed:!0,suffix:/^.?$/},P)),z.addBinding({key:B.keys.BACKSPACE},{collapsed:!1},R),z.addBinding({key:B.keys.DELETE},{collapsed:!1},R),z.addBinding({key:B.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},D),z.listen(),z}return o(B,[{key:"addBinding",value:function(H){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},J=G(H);if(J==null||J.key==null)return F.warn("Attempted to add invalid keyboard binding",J);typeof z=="function"&&(z={handler:z}),typeof Y=="function"&&(Y={handler:Y}),J=(0,d.default)(J,z,Y),this.bindings[J.key]=this.bindings[J.key]||[],this.bindings[J.key].push(J)}},{key:"listen",value:function(){var H=this;this.quill.root.addEventListener("keydown",function(z){if(!z.defaultPrevented){var Y=z.which||z.keyCode,J=(H.bindings[Y]||[]).filter(function(gt){return B.match(z,gt)});if(J.length!==0){var et=H.quill.getSelection();if(!(et==null||!H.quill.hasFocus())){var at=H.quill.getLine(et.index),lt=a(at,2),Ct=lt[0],Rt=lt[1],V=H.quill.getLeaf(et.index),W=a(V,2),Z=W[0],tt=W[1],K=et.length===0?[Z,tt]:H.quill.getLeaf(et.index+et.length),ft=a(K,2),ct=ft[0],ht=ft[1],nt=Z instanceof _.default.Text?Z.value().slice(0,tt):"",At=ct instanceof _.default.Text?ct.value().slice(ht):"",Et={collapsed:et.length===0,empty:et.length===0&&Ct.length()<=1,format:H.quill.getFormat(et),offset:Rt,prefix:nt,suffix:At},$e=J.some(function(gt){if(gt.collapsed!=null&&gt.collapsed!==Et.collapsed||gt.empty!=null&&gt.empty!==Et.empty||gt.offset!=null&&gt.offset!==Et.offset)return!1;if(Array.isArray(gt.format)){if(gt.format.every(function(ut){return Et.format[ut]==null}))return!1}else if(s(gt.format)==="object"&&!Object.keys(gt.format).every(function(ut){return gt.format[ut]===!0?Et.format[ut]!=null:gt.format[ut]===!1?Et.format[ut]==null:(0,h.default)(gt.format[ut],Et.format[ut])}))return!1;return gt.prefix!=null&&!gt.prefix.test(Et.prefix)||gt.suffix!=null&&!gt.suffix.test(Et.suffix)?!1:gt.handler.call(H,et,Et)!==!0});$e&&z.preventDefault()}}}})}}]),B}(N.default);U.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},U.DEFAULTS={bindings:{bold:j("bold"),italic:j("italic"),underline:j("underline"),indent:{key:U.keys.TAB,format:["blockquote","indent","list"],handler:function(B,q){if(q.collapsed&&q.offset!==0)return!0;this.quill.format("indent","+1",x.default.sources.USER)}},outdent:{key:U.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(B,q){if(q.collapsed&&q.offset!==0)return!0;this.quill.format("indent","-1",x.default.sources.USER)}},"outdent backspace":{key:U.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(B,q){q.format.indent!=null?this.quill.format("indent","-1",x.default.sources.USER):q.format.list!=null&&this.quill.format("list",!1,x.default.sources.USER)}},"indent code-block":L(!0),"outdent code-block":L(!1),"remove tab":{key:U.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(B){this.quill.deleteText(B.index-1,1,x.default.sources.USER)}},tab:{key:U.keys.TAB,handler:function(B){this.quill.history.cutoff();var q=new v.default().retain(B.index).delete(B.length).insert(" ");this.quill.updateContents(q,x.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(B.index+1,x.default.sources.SILENT)}},"list empty enter":{key:U.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(B,q){this.quill.format("list",!1,x.default.sources.USER),q.format.indent&&this.quill.format("indent",!1,x.default.sources.USER)}},"checklist enter":{key:U.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(B){var q=this.quill.getLine(B.index),H=a(q,2),z=H[0],Y=H[1],J=(0,d.default)({},z.formats(),{list:"checked"}),et=new v.default().retain(B.index).insert(`
577
577
  `,J).retain(z.length()-Y-1).retain(1,{list:"unchecked"});this.quill.updateContents(et,x.default.sources.USER),this.quill.setSelection(B.index+1,x.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:U.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(B,q){var H=this.quill.getLine(B.index),z=a(H,2),Y=z[0],J=z[1],et=new v.default().retain(B.index).insert(`
578
- `,q.format).retain(Y.length()-J-1).retain(1,{header:null});this.quill.updateContents(et,x.default.sources.USER),this.quill.setSelection(B.index+1,x.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(B,q){var H=q.prefix.length,z=this.quill.getLine(B.index),Y=a(z,2),J=Y[0],et=Y[1];if(et>H)return!0;var at=void 0;switch(q.prefix.trim()){case"[]":case"[ ]":at="unchecked";break;case"[x]":at="checked";break;case"-":case"*":at="bullet";break;default:at="ordered"}this.quill.insertText(B.index," ",x.default.sources.USER),this.quill.history.cutoff();var lt=new v.default().retain(B.index-et).delete(H+1).retain(J.length()-2-et).retain(1,{list:at});this.quill.updateContents(lt,x.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(B.index-H,x.default.sources.SILENT)}},"code exit":{key:U.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(B){var q=this.quill.getLine(B.index),H=a(q,2),z=H[0],Y=H[1],J=new v.default().retain(B.index+z.length()-Y-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(J,x.default.sources.USER)}},"embed left":X(U.keys.LEFT,!1),"embed left shift":X(U.keys.LEFT,!0),"embed right":X(U.keys.RIGHT,!1),"embed right shift":X(U.keys.RIGHT,!0)}};function X(M,B){var q,H=M===U.keys.LEFT?"prefix":"suffix";return q={key:M,shiftKey:B,altKey:null},w(q,H,/^$/),w(q,"handler",function(Y){var J=Y.index;M===U.keys.RIGHT&&(J+=Y.length+1);var et=this.quill.getLeaf(J),at=a(et,1),lt=at[0];return lt instanceof _.default.Embed?(M===U.keys.LEFT?B?this.quill.setSelection(Y.index-1,Y.length+1,x.default.sources.USER):this.quill.setSelection(Y.index-1,x.default.sources.USER):B?this.quill.setSelection(Y.index,Y.length+1,x.default.sources.USER):this.quill.setSelection(Y.index+Y.length+1,x.default.sources.USER),!1):!0}),q}function $(M,B){if(!(M.index===0||this.quill.getLength()<=1)){var q=this.quill.getLine(M.index),H=a(q,1),z=H[0],Y={};if(B.offset===0){var J=this.quill.getLine(M.index-1),et=a(J,1),at=et[0];if(at!=null&&at.length()>1){var lt=z.formats(),Ct=this.quill.getFormat(M.index-1,1);Y=m.default.attributes.diff(lt,Ct)||{}}}var Rt=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(B.prefix)?2:1;this.quill.deleteText(M.index-Rt,Rt,x.default.sources.USER),Object.keys(Y).length>0&&this.quill.formatLine(M.index-Rt,Rt,Y,x.default.sources.USER),this.quill.focus()}}function k(M,B){var q=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(B.suffix)?2:1;if(!(M.index>=this.quill.getLength()-q)){var H={},z=0,Y=this.quill.getLine(M.index),J=a(Y,1),et=J[0];if(B.offset>=et.length()-1){var at=this.quill.getLine(M.index+1),lt=a(at,1),Ct=lt[0];if(Ct){var Rt=et.formats(),V=this.quill.getFormat(M.index,1);H=m.default.attributes.diff(Rt,V)||{},z=Ct.length()}}this.quill.deleteText(M.index,q,x.default.sources.USER),Object.keys(H).length>0&&this.quill.formatLine(M.index+z-1,q,H,x.default.sources.USER)}}function R(M){var B=this.quill.getLines(M),q={};if(B.length>1){var H=B[0].formats(),z=B[B.length-1].formats();q=m.default.attributes.diff(z,H)||{}}this.quill.deleteText(M,x.default.sources.USER),Object.keys(q).length>0&&this.quill.formatLine(M.index,1,q,x.default.sources.USER),this.quill.setSelection(M.index,x.default.sources.SILENT),this.quill.focus()}function P(M,B){var q=this;M.length>0&&this.quill.scroll.deleteAt(M.index,M.length);var H=Object.keys(B.format).reduce(function(z,Y){return _.default.query(Y,_.default.Scope.BLOCK)&&!Array.isArray(B.format[Y])&&(z[Y]=B.format[Y]),z},{});this.quill.insertText(M.index,`
578
+ `,q.format).retain(Y.length()-J-1).retain(1,{header:null});this.quill.updateContents(et,x.default.sources.USER),this.quill.setSelection(B.index+1,x.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(B,q){var H=q.prefix.length,z=this.quill.getLine(B.index),Y=a(z,2),J=Y[0],et=Y[1];if(et>H)return!0;var at=void 0;switch(q.prefix.trim()){case"[]":case"[ ]":at="unchecked";break;case"[x]":at="checked";break;case"-":case"*":at="bullet";break;default:at="ordered"}this.quill.insertText(B.index," ",x.default.sources.USER),this.quill.history.cutoff();var lt=new v.default().retain(B.index-et).delete(H+1).retain(J.length()-2-et).retain(1,{list:at});this.quill.updateContents(lt,x.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(B.index-H,x.default.sources.SILENT)}},"code exit":{key:U.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(B){var q=this.quill.getLine(B.index),H=a(q,2),z=H[0],Y=H[1],J=new v.default().retain(B.index+z.length()-Y-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(J,x.default.sources.USER)}},"embed left":X(U.keys.LEFT,!1),"embed left shift":X(U.keys.LEFT,!0),"embed right":X(U.keys.RIGHT,!1),"embed right shift":X(U.keys.RIGHT,!0)}};function X(M,B){var q,H=M===U.keys.LEFT?"prefix":"suffix";return q={key:M,shiftKey:B,altKey:null},w(q,H,/^$/),w(q,"handler",function(Y){var J=Y.index;M===U.keys.RIGHT&&(J+=Y.length+1);var et=this.quill.getLeaf(J),at=a(et,1),lt=at[0];return lt instanceof _.default.Embed?(M===U.keys.LEFT?B?this.quill.setSelection(Y.index-1,Y.length+1,x.default.sources.USER):this.quill.setSelection(Y.index-1,x.default.sources.USER):B?this.quill.setSelection(Y.index,Y.length+1,x.default.sources.USER):this.quill.setSelection(Y.index+Y.length+1,x.default.sources.USER),!1):!0}),q}function D(M,B){if(!(M.index===0||this.quill.getLength()<=1)){var q=this.quill.getLine(M.index),H=a(q,1),z=H[0],Y={};if(B.offset===0){var J=this.quill.getLine(M.index-1),et=a(J,1),at=et[0];if(at!=null&&at.length()>1){var lt=z.formats(),Ct=this.quill.getFormat(M.index-1,1);Y=m.default.attributes.diff(lt,Ct)||{}}}var Rt=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(B.prefix)?2:1;this.quill.deleteText(M.index-Rt,Rt,x.default.sources.USER),Object.keys(Y).length>0&&this.quill.formatLine(M.index-Rt,Rt,Y,x.default.sources.USER),this.quill.focus()}}function P(M,B){var q=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(B.suffix)?2:1;if(!(M.index>=this.quill.getLength()-q)){var H={},z=0,Y=this.quill.getLine(M.index),J=a(Y,1),et=J[0];if(B.offset>=et.length()-1){var at=this.quill.getLine(M.index+1),lt=a(at,1),Ct=lt[0];if(Ct){var Rt=et.formats(),V=this.quill.getFormat(M.index,1);H=m.default.attributes.diff(Rt,V)||{},z=Ct.length()}}this.quill.deleteText(M.index,q,x.default.sources.USER),Object.keys(H).length>0&&this.quill.formatLine(M.index+z-1,q,H,x.default.sources.USER)}}function R(M){var B=this.quill.getLines(M),q={};if(B.length>1){var H=B[0].formats(),z=B[B.length-1].formats();q=m.default.attributes.diff(z,H)||{}}this.quill.deleteText(M,x.default.sources.USER),Object.keys(q).length>0&&this.quill.formatLine(M.index,1,q,x.default.sources.USER),this.quill.setSelection(M.index,x.default.sources.SILENT),this.quill.focus()}function k(M,B){var q=this;M.length>0&&this.quill.scroll.deleteAt(M.index,M.length);var H=Object.keys(B.format).reduce(function(z,Y){return _.default.query(Y,_.default.Scope.BLOCK)&&!Array.isArray(B.format[Y])&&(z[Y]=B.format[Y]),z},{});this.quill.insertText(M.index,`
579
579
  `,H,x.default.sources.USER),this.quill.setSelection(M.index+1,x.default.sources.SILENT),this.quill.focus(),Object.keys(B.format).forEach(function(z){H[z]==null&&(Array.isArray(B.format[z])||z!=="link"&&q.quill.format(z,B.format[z],x.default.sources.USER))})}function L(M){return{key:U.keys.TAB,shiftKey:!M,format:{"code-block":!0},handler:function(q){var H=_.default.query("code-block"),z=q.index,Y=q.length,J=this.quill.scroll.descendant(H,z),et=a(J,2),at=et[0],lt=et[1];if(at!=null){var Ct=this.quill.getIndex(at),Rt=at.newlineIndex(lt,!0)+1,V=at.newlineIndex(Ct+lt+Y),W=at.domNode.textContent.slice(Rt,V).split(`
580
- `);lt=0,W.forEach(function(Z,tt){M?(at.insertAt(Rt+lt,H.TAB),lt+=H.TAB.length,tt===0?z+=H.TAB.length:Y+=H.TAB.length):Z.startsWith(H.TAB)&&(at.deleteAt(Rt+lt,H.TAB.length),lt-=H.TAB.length,tt===0?z-=H.TAB.length:Y-=H.TAB.length),lt+=Z.length+1}),this.quill.update(x.default.sources.USER),this.quill.setSelection(z,Y,x.default.sources.SILENT)}}}}function j(M){return{key:M[0].toUpperCase(),shortKey:!0,handler:function(q,H){this.quill.format(M,!H.format[M],x.default.sources.USER)}}}function G(M){if(typeof M=="string"||typeof M=="number")return G({key:M});if((typeof M>"u"?"undefined":s(M))==="object"&&(M=(0,f.default)(M,!1)),typeof M.key=="string")if(U.keys[M.key.toUpperCase()]!=null)M.key=U.keys[M.key.toUpperCase()];else if(M.key.length===1)M.key=M.key.toUpperCase().charCodeAt(0);else return null;return M.shortKey&&(M[D]=M.shortKey,delete M.shortKey),M}n.default=U,n.SHORTKEY=D},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function m(b,_){var y=[],x=!0,O=!1,T=void 0;try{for(var E=b[Symbol.iterator](),N;!(x=(N=E.next()).done)&&(y.push(N.value),!(_&&y.length===_));x=!0);}catch(A){O=!0,T=A}finally{try{!x&&E.return&&E.return()}finally{if(O)throw T}}return y}return function(b,_){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return m(b,_);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function m(b,_,y){b===null&&(b=Function.prototype);var x=Object.getOwnPropertyDescriptor(b,_);if(x===void 0){var O=Object.getPrototypeOf(b);return O===null?void 0:m(O,_,y)}else{if("value"in x)return x.value;var T=x.get;return T===void 0?void 0:T.call(y)}},o=function(){function m(b,_){for(var y=0;y<_.length;y++){var x=_[y];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(b,x.key,x)}}return function(b,_,y){return _&&m(b.prototype,_),y&&m(b,y),b}}(),l=i(0),f=u(l),c=i(7),h=u(c);function u(m){return m&&m.__esModule?m:{default:m}}function d(m,b){if(!(m instanceof b))throw new TypeError("Cannot call a class as a function")}function p(m,b){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:m}function v(m,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);m.prototype=Object.create(b&&b.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(m,b):m.__proto__=b)}var g=function(m){v(b,m),o(b,null,[{key:"value",value:function(){}}]);function b(_,y){d(this,b);var x=p(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,_));return x.selection=y,x.textNode=document.createTextNode(b.CONTENTS),x.domNode.appendChild(x.textNode),x._length=0,x}return o(b,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(y,x){if(this._length!==0)return a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"format",this).call(this,y,x);for(var O=this,T=0;O!=null&&O.statics.scope!==f.default.Scope.BLOCK_BLOT;)T+=O.offset(O.parent),O=O.parent;O!=null&&(this._length=b.CONTENTS.length,O.optimize(),O.formatAt(T,b.CONTENTS.length,y,x),this._length=0)}},{key:"index",value:function(y,x){return y===this.textNode?0:a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"index",this).call(this,y,x)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var y=this.textNode,x=this.selection.getNativeRange(),O=void 0,T=void 0,E=void 0;if(x!=null&&x.start.node===y&&x.end.node===y){var N=[y,x.start.offset,x.end.offset];O=N[0],T=N[1],E=N[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==b.CONTENTS){var A=this.textNode.data.split(b.CONTENTS).join("");this.next instanceof h.default?(O=this.next.domNode,this.next.insertAt(0,A),this.textNode.data=b.CONTENTS):(this.textNode.data=A,this.parent.insertBefore(f.default.create(this.textNode),this),this.textNode=document.createTextNode(b.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),T!=null){var w=[T,E].map(function(I){return Math.max(0,Math.min(O.data.length,I-1))}),S=s(w,2);return T=S[0],E=S[1],{startNode:O,startOffset:T,endNode:O,endOffset:E}}}}},{key:"update",value:function(y,x){var O=this;if(y.some(function(E){return E.type==="characterData"&&E.target===O.textNode})){var T=this.restore();T&&(x.range=T)}}},{key:"value",value:function(){return""}}]),b}(f.default.Embed);g.blotName="cursor",g.className="ql-cursor",g.tagName="span",g.CONTENTS="\uFEFF",n.default=g},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(0),a=f(s),o=i(4),l=f(o);function f(p){return p&&p.__esModule?p:{default:p}}function c(p,v){if(!(p instanceof v))throw new TypeError("Cannot call a class as a function")}function h(p,v){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:p}function u(p,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);p.prototype=Object.create(v&&v.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(p,v):p.__proto__=v)}var d=function(p){u(v,p);function v(){return c(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(a.default.Container);d.allowedChildren=[l.default,o.BlockEmbed,d],n.default=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.ColorStyle=n.ColorClass=n.ColorAttributor=void 0;var s=function(){function g(m,b){for(var _=0;_<b.length;_++){var y=b[_];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(m,y.key,y)}}return function(m,b,_){return b&&g(m.prototype,b),_&&g(m,_),m}}(),a=function g(m,b,_){m===null&&(m=Function.prototype);var y=Object.getOwnPropertyDescriptor(m,b);if(y===void 0){var x=Object.getPrototypeOf(m);return x===null?void 0:g(x,b,_)}else{if("value"in y)return y.value;var O=y.get;return O===void 0?void 0:O.call(_)}},o=i(0),l=f(o);function f(g){return g&&g.__esModule?g:{default:g}}function c(g,m){if(!(g instanceof m))throw new TypeError("Cannot call a class as a function")}function h(g,m){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:g}function u(g,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);g.prototype=Object.create(m&&m.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(g,m):g.__proto__=m)}var d=function(g){u(m,g);function m(){return c(this,m),h(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return s(m,[{key:"value",value:function(_){var y=a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"value",this).call(this,_);return y.startsWith("rgb(")?(y=y.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+y.split(",").map(function(x){return("00"+parseInt(x).toString(16)).slice(-2)}).join("")):y}}]),m}(l.default.Attributor.Style),p=new l.default.Attributor.Class("color","ql-color",{scope:l.default.Scope.INLINE}),v=new d("color","color",{scope:l.default.Scope.INLINE});n.ColorAttributor=d,n.ColorClass=p,n.ColorStyle=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.sanitize=n.default=void 0;var s=function(){function v(g,m){for(var b=0;b<m.length;b++){var _=m[b];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(g,_.key,_)}}return function(g,m,b){return m&&v(g.prototype,m),b&&v(g,b),g}}(),a=function v(g,m,b){g===null&&(g=Function.prototype);var _=Object.getOwnPropertyDescriptor(g,m);if(_===void 0){var y=Object.getPrototypeOf(g);return y===null?void 0:v(y,m,b)}else{if("value"in _)return _.value;var x=_.get;return x===void 0?void 0:x.call(b)}},o=i(6),l=f(o);function f(v){return v&&v.__esModule?v:{default:v}}function c(v,g){if(!(v instanceof g))throw new TypeError("Cannot call a class as a function")}function h(v,g){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:v}function u(v,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);v.prototype=Object.create(g&&g.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(v,g):v.__proto__=g)}var d=function(v){u(g,v);function g(){return c(this,g),h(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return s(g,[{key:"format",value:function(b,_){if(b!==this.statics.blotName||!_)return a(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"format",this).call(this,b,_);_=this.constructor.sanitize(_),this.domNode.setAttribute("href",_)}}],[{key:"create",value:function(b){var _=a(g.__proto__||Object.getPrototypeOf(g),"create",this).call(this,b);return b=this.sanitize(b),_.setAttribute("href",b),_.setAttribute("rel","noopener noreferrer"),_.setAttribute("target","_blank"),_}},{key:"formats",value:function(b){return b.getAttribute("href")}},{key:"sanitize",value:function(b){return p(b,this.PROTOCOL_WHITELIST)?b:this.SANITIZED_URL}}]),g}(l.default);d.blotName="link",d.tagName="A",d.SANITIZED_URL="about:blank",d.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function p(v,g){var m=document.createElement("a");m.href=v;var b=m.href.slice(0,m.href.indexOf(":"));return g.indexOf(b)>-1}n.default=d,n.sanitize=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g},a=function(){function g(m,b){for(var _=0;_<b.length;_++){var y=b[_];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(m,y.key,y)}}return function(m,b,_){return b&&g(m.prototype,b),_&&g(m,_),m}}(),o=i(23),l=h(o),f=i(107),c=h(f);function h(g){return g&&g.__esModule?g:{default:g}}function u(g,m){if(!(g instanceof m))throw new TypeError("Cannot call a class as a function")}var d=0;function p(g,m){g.setAttribute(m,g.getAttribute(m)!=="true")}var v=function(){function g(m){var b=this;u(this,g),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(){b.togglePicker()}),this.label.addEventListener("keydown",function(_){switch(_.keyCode){case l.default.keys.ENTER:b.togglePicker();break;case l.default.keys.ESCAPE:b.escape(),_.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return a(g,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),p(this.label,"aria-expanded"),p(this.options,"aria-hidden")}},{key:"buildItem",value:function(b){var _=this,y=document.createElement("span");return y.tabIndex="0",y.setAttribute("role","button"),y.classList.add("ql-picker-item"),b.hasAttribute("value")&&y.setAttribute("data-value",b.getAttribute("value")),b.textContent&&y.setAttribute("data-label",b.textContent),y.addEventListener("click",function(){_.selectItem(y,!0)}),y.addEventListener("keydown",function(x){switch(x.keyCode){case l.default.keys.ENTER:_.selectItem(y,!0),x.preventDefault();break;case l.default.keys.ESCAPE:_.escape(),x.preventDefault();break}}),y}},{key:"buildLabel",value:function(){var b=document.createElement("span");return b.classList.add("ql-picker-label"),b.innerHTML=c.default,b.tabIndex="0",b.setAttribute("role","button"),b.setAttribute("aria-expanded","false"),this.container.appendChild(b),b}},{key:"buildOptions",value:function(){var b=this,_=document.createElement("span");_.classList.add("ql-picker-options"),_.setAttribute("aria-hidden","true"),_.tabIndex="-1",_.id="ql-picker-options-"+d,d+=1,this.label.setAttribute("aria-controls",_.id),this.options=_,[].slice.call(this.select.options).forEach(function(y){var x=b.buildItem(y);_.appendChild(x),y.selected===!0&&b.selectItem(x)}),this.container.appendChild(_)}},{key:"buildPicker",value:function(){var b=this;[].slice.call(this.select.attributes).forEach(function(_){b.container.setAttribute(_.name,_.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var b=this;this.close(),setTimeout(function(){return b.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(b){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,y=this.container.querySelector(".ql-selected");if(b!==y&&(y!=null&&y.classList.remove("ql-selected"),b!=null&&(b.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(b.parentNode.children,b),b.hasAttribute("data-value")?this.label.setAttribute("data-value",b.getAttribute("data-value")):this.label.removeAttribute("data-value"),b.hasAttribute("data-label")?this.label.setAttribute("data-label",b.getAttribute("data-label")):this.label.removeAttribute("data-label"),_))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":s(Event))==="object"){var x=document.createEvent("Event");x.initEvent("change",!0,!0),this.select.dispatchEvent(x)}this.close()}}},{key:"update",value:function(){var b=void 0;if(this.select.selectedIndex>-1){var _=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];b=this.select.options[this.select.selectedIndex],this.selectItem(_)}else this.selectItem(null);var y=b!=null&&b!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",y)}}]),g}();n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(0),a=F(s),o=i(5),l=F(o),f=i(4),c=F(f),h=i(16),u=F(h),d=i(25),p=F(d),v=i(24),g=F(v),m=i(35),b=F(m),_=i(6),y=F(_),x=i(22),O=F(x),T=i(7),E=F(T),N=i(55),A=F(N),w=i(42),S=F(w),I=i(23),C=F(I);function F(D){return D&&D.__esModule?D:{default:D}}l.default.register({"blots/block":c.default,"blots/block/embed":f.BlockEmbed,"blots/break":u.default,"blots/container":p.default,"blots/cursor":g.default,"blots/embed":b.default,"blots/inline":y.default,"blots/scroll":O.default,"blots/text":E.default,"modules/clipboard":A.default,"modules/history":S.default,"modules/keyboard":C.default}),a.default.register(c.default,u.default,g.default,y.default,O.default,E.default),n.default=l.default},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(1),a=function(){function o(l){this.domNode=l,this.domNode[s.DATA_KEY]={blot:this}}return Object.defineProperty(o.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),o.create=function(l){if(this.tagName==null)throw new s.ParchmentError("Blot definition missing tagName");var f;return Array.isArray(this.tagName)?(typeof l=="string"&&(l=l.toUpperCase(),parseInt(l).toString()===l&&(l=parseInt(l))),typeof l=="number"?f=document.createElement(this.tagName[l-1]):this.tagName.indexOf(l)>-1?f=document.createElement(l):f=document.createElement(this.tagName[0])):f=document.createElement(this.tagName),this.className&&f.classList.add(this.className),f},o.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},o.prototype.clone=function(){var l=this.domNode.cloneNode(!1);return s.create(l)},o.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[s.DATA_KEY]},o.prototype.deleteAt=function(l,f){var c=this.isolate(l,f);c.remove()},o.prototype.formatAt=function(l,f,c,h){var u=this.isolate(l,f);if(s.query(c,s.Scope.BLOT)!=null&&h)u.wrap(c,h);else if(s.query(c,s.Scope.ATTRIBUTE)!=null){var d=s.create(this.statics.scope);u.wrap(d),d.format(c,h)}},o.prototype.insertAt=function(l,f,c){var h=c==null?s.create("text",f):s.create(f,c),u=this.split(l);this.parent.insertBefore(h,u)},o.prototype.insertInto=function(l,f){f===void 0&&(f=null),this.parent!=null&&this.parent.children.remove(this);var c=null;l.children.insertBefore(this,f),f!=null&&(c=f.domNode),(this.domNode.parentNode!=l.domNode||this.domNode.nextSibling!=c)&&l.domNode.insertBefore(this.domNode,c),this.parent=l,this.attach()},o.prototype.isolate=function(l,f){var c=this.split(l);return c.split(f),c},o.prototype.length=function(){return 1},o.prototype.offset=function(l){return l===void 0&&(l=this.parent),this.parent==null||this==l?0:this.parent.children.offset(this)+this.parent.offset(l)},o.prototype.optimize=function(l){this.domNode[s.DATA_KEY]!=null&&delete this.domNode[s.DATA_KEY].mutations},o.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},o.prototype.replace=function(l){l.parent!=null&&(l.parent.insertBefore(this,l.next),l.remove())},o.prototype.replaceWith=function(l,f){var c=typeof l=="string"?s.create(l,f):l;return c.replace(this),c},o.prototype.split=function(l,f){return l===0?this:this.next},o.prototype.update=function(l,f){},o.prototype.wrap=function(l,f){var c=typeof l=="string"?s.create(l,f):l;return this.parent!=null&&this.parent.insertBefore(c,this.next),c.appendChild(this),c},o.blotName="abstract",o}();n.default=a},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(12),a=i(32),o=i(33),l=i(1),f=function(){function c(h){this.attributes={},this.domNode=h,this.build()}return c.prototype.attribute=function(h,u){u?h.add(this.domNode,u)&&(h.value(this.domNode)!=null?this.attributes[h.attrName]=h:delete this.attributes[h.attrName]):(h.remove(this.domNode),delete this.attributes[h.attrName])},c.prototype.build=function(){var h=this;this.attributes={};var u=s.default.keys(this.domNode),d=a.default.keys(this.domNode),p=o.default.keys(this.domNode);u.concat(d).concat(p).forEach(function(v){var g=l.query(v,l.Scope.ATTRIBUTE);g instanceof s.default&&(h.attributes[g.attrName]=g)})},c.prototype.copy=function(h){var u=this;Object.keys(this.attributes).forEach(function(d){var p=u.attributes[d].value(u.domNode);h.format(d,p)})},c.prototype.move=function(h){var u=this;this.copy(h),Object.keys(this.attributes).forEach(function(d){u.attributes[d].remove(u.domNode)}),this.attributes={}},c.prototype.values=function(){var h=this;return Object.keys(this.attributes).reduce(function(u,d){return u[d]=h.attributes[d].value(h.domNode),u},{})},c}();n.default=f},function(r,n,i){var s=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,h){c.__proto__=h}||function(c,h){for(var u in h)h.hasOwnProperty(u)&&(c[u]=h[u])};return function(c,h){f(c,h);function u(){this.constructor=c}c.prototype=h===null?Object.create(h):(u.prototype=h.prototype,new u)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(12);function o(f,c){var h=f.getAttribute("class")||"";return h.split(/\s+/).filter(function(u){return u.indexOf(c+"-")===0})}var l=function(f){s(c,f);function c(){return f!==null&&f.apply(this,arguments)||this}return c.keys=function(h){return(h.getAttribute("class")||"").split(/\s+/).map(function(u){return u.split("-").slice(0,-1).join("-")})},c.prototype.add=function(h,u){return this.canAdd(h,u)?(this.remove(h),h.classList.add(this.keyName+"-"+u),!0):!1},c.prototype.remove=function(h){var u=o(h,this.keyName);u.forEach(function(d){h.classList.remove(d)}),h.classList.length===0&&h.removeAttribute("class")},c.prototype.value=function(h){var u=o(h,this.keyName)[0]||"",d=u.slice(this.keyName.length+1);return this.canAdd(h,d)?d:""},c}(a.default);n.default=l},function(r,n,i){var s=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,h){c.__proto__=h}||function(c,h){for(var u in h)h.hasOwnProperty(u)&&(c[u]=h[u])};return function(c,h){f(c,h);function u(){this.constructor=c}c.prototype=h===null?Object.create(h):(u.prototype=h.prototype,new u)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(12);function o(f){var c=f.split("-"),h=c.slice(1).map(function(u){return u[0].toUpperCase()+u.slice(1)}).join("");return c[0]+h}var l=function(f){s(c,f);function c(){return f!==null&&f.apply(this,arguments)||this}return c.keys=function(h){return(h.getAttribute("style")||"").split(";").map(function(u){var d=u.split(":");return d[0].trim()})},c.prototype.add=function(h,u){return this.canAdd(h,u)?(h.style[o(this.keyName)]=u,!0):!1},c.prototype.remove=function(h){h.style[o(this.keyName)]="",h.getAttribute("style")||h.removeAttribute("style")},c.prototype.value=function(h){var u=h.style[o(this.keyName)];return this.canAdd(h,u)?u:""},c}(a.default);n.default=l},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function l(f,c){for(var h=0;h<c.length;h++){var u=c[h];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(f,u.key,u)}}return function(f,c,h){return c&&l(f.prototype,c),h&&l(f,h),f}}();function a(l,f){if(!(l instanceof f))throw new TypeError("Cannot call a class as a function")}var o=function(){function l(f,c){a(this,l),this.quill=f,this.options=c,this.modules={}}return s(l,[{key:"init",value:function(){var c=this;Object.keys(this.options.modules).forEach(function(h){c.modules[h]==null&&c.addModule(h)})}},{key:"addModule",value:function(c){var h=this.quill.constructor.import("modules/"+c);return this.modules[c]=new h(this.quill,this.options.modules[c]||{}),this.modules[c]}}]),l}();o.DEFAULTS={modules:{}},o.themes={default:o},n.default=o},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function m(b,_){for(var y=0;y<_.length;y++){var x=_[y];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(b,x.key,x)}}return function(b,_,y){return _&&m(b.prototype,_),y&&m(b,y),b}}(),a=function m(b,_,y){b===null&&(b=Function.prototype);var x=Object.getOwnPropertyDescriptor(b,_);if(x===void 0){var O=Object.getPrototypeOf(b);return O===null?void 0:m(O,_,y)}else{if("value"in x)return x.value;var T=x.get;return T===void 0?void 0:T.call(y)}},o=i(0),l=h(o),f=i(7),c=h(f);function h(m){return m&&m.__esModule?m:{default:m}}function u(m,b){if(!(m instanceof b))throw new TypeError("Cannot call a class as a function")}function d(m,b){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:m}function p(m,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);m.prototype=Object.create(b&&b.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(m,b):m.__proto__=b)}var v="\uFEFF",g=function(m){p(b,m);function b(_){u(this,b);var y=d(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,_));return y.contentNode=document.createElement("span"),y.contentNode.setAttribute("contenteditable",!1),[].slice.call(y.domNode.childNodes).forEach(function(x){y.contentNode.appendChild(x)}),y.leftGuard=document.createTextNode(v),y.rightGuard=document.createTextNode(v),y.domNode.appendChild(y.leftGuard),y.domNode.appendChild(y.contentNode),y.domNode.appendChild(y.rightGuard),y}return s(b,[{key:"index",value:function(y,x){return y===this.leftGuard?0:y===this.rightGuard?1:a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"index",this).call(this,y,x)}},{key:"restore",value:function(y){var x=void 0,O=void 0,T=y.data.split(v).join("");if(y===this.leftGuard)if(this.prev instanceof c.default){var E=this.prev.length();this.prev.insertAt(E,T),x={startNode:this.prev.domNode,startOffset:E+T.length}}else O=document.createTextNode(T),this.parent.insertBefore(l.default.create(O),this),x={startNode:O,startOffset:T.length};else y===this.rightGuard&&(this.next instanceof c.default?(this.next.insertAt(0,T),x={startNode:this.next.domNode,startOffset:T.length}):(O=document.createTextNode(T),this.parent.insertBefore(l.default.create(O),this.next),x={startNode:O,startOffset:T.length}));return y.data=v,x}},{key:"update",value:function(y,x){var O=this;y.forEach(function(T){if(T.type==="characterData"&&(T.target===O.leftGuard||T.target===O.rightGuard)){var E=O.restore(T.target);E&&(x.range=E)}})}}]),b}(l.default.Embed);n.default=g},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.AlignStyle=n.AlignClass=n.AlignAttribute=void 0;var s=i(0),a=o(s);function o(u){return u&&u.__esModule?u:{default:u}}var l={scope:a.default.Scope.BLOCK,whitelist:["right","center","justify"]},f=new a.default.Attributor.Attribute("align","align",l),c=new a.default.Attributor.Class("align","ql-align",l),h=new a.default.Attributor.Style("align","text-align",l);n.AlignAttribute=f,n.AlignClass=c,n.AlignStyle=h},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.BackgroundStyle=n.BackgroundClass=void 0;var s=i(0),a=l(s),o=i(26);function l(h){return h&&h.__esModule?h:{default:h}}var f=new a.default.Attributor.Class("background","ql-bg",{scope:a.default.Scope.INLINE}),c=new o.ColorAttributor("background","background-color",{scope:a.default.Scope.INLINE});n.BackgroundClass=f,n.BackgroundStyle=c},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.DirectionStyle=n.DirectionClass=n.DirectionAttribute=void 0;var s=i(0),a=o(s);function o(u){return u&&u.__esModule?u:{default:u}}var l={scope:a.default.Scope.BLOCK,whitelist:["rtl"]},f=new a.default.Attributor.Attribute("direction","dir",l),c=new a.default.Attributor.Class("direction","ql-direction",l),h=new a.default.Attributor.Style("direction","direction",l);n.DirectionAttribute=f,n.DirectionClass=c,n.DirectionStyle=h},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.FontClass=n.FontStyle=void 0;var s=function(){function m(b,_){for(var y=0;y<_.length;y++){var x=_[y];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(b,x.key,x)}}return function(b,_,y){return _&&m(b.prototype,_),y&&m(b,y),b}}(),a=function m(b,_,y){b===null&&(b=Function.prototype);var x=Object.getOwnPropertyDescriptor(b,_);if(x===void 0){var O=Object.getPrototypeOf(b);return O===null?void 0:m(O,_,y)}else{if("value"in x)return x.value;var T=x.get;return T===void 0?void 0:T.call(y)}},o=i(0),l=f(o);function f(m){return m&&m.__esModule?m:{default:m}}function c(m,b){if(!(m instanceof b))throw new TypeError("Cannot call a class as a function")}function h(m,b){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:m}function u(m,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);m.prototype=Object.create(b&&b.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(m,b):m.__proto__=b)}var d={scope:l.default.Scope.INLINE,whitelist:["serif","monospace"]},p=new l.default.Attributor.Class("font","ql-font",d),v=function(m){u(b,m);function b(){return c(this,b),h(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return s(b,[{key:"value",value:function(y){return a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"value",this).call(this,y).replace(/["']/g,"")}}]),b}(l.default.Attributor.Style),g=new v("font","font-family",d);n.FontStyle=g,n.FontClass=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.SizeStyle=n.SizeClass=void 0;var s=i(0),a=o(s);function o(c){return c&&c.__esModule?c:{default:c}}var l=new a.default.Attributor.Class("size","ql-size",{scope:a.default.Scope.INLINE,whitelist:["small","large","huge"]}),f=new a.default.Attributor.Style("size","font-size",{scope:a.default.Scope.INLINE,whitelist:["10px","18px","32px"]});n.SizeClass=l,n.SizeStyle=f},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 s=function(){function _(y,x){for(var O=0;O<x.length;O++){var T=x[O];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(y,T.key,T)}}return function(y,x,O){return x&&_(y.prototype,x),O&&_(y,O),y}}(),a=i(0),o=u(a),l=i(5),f=u(l),c=i(9),h=u(c);function u(_){return _&&_.__esModule?_:{default:_}}function d(_,y){if(!(_ instanceof y))throw new TypeError("Cannot call a class as a function")}function p(_,y){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:_}function v(_,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);_.prototype=Object.create(y&&y.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(_,y):_.__proto__=y)}var g=function(_){v(y,_);function y(x,O){d(this,y);var T=p(this,(y.__proto__||Object.getPrototypeOf(y)).call(this,x,O));return T.lastRecorded=0,T.ignoreChange=!1,T.clear(),T.quill.on(f.default.events.EDITOR_CHANGE,function(E,N,A,w){E!==f.default.events.TEXT_CHANGE||T.ignoreChange||(!T.options.userOnly||w===f.default.sources.USER?T.record(N,A):T.transform(N))}),T.quill.keyboard.addBinding({key:"Z",shortKey:!0},T.undo.bind(T)),T.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},T.redo.bind(T)),/Win/i.test(navigator.platform)&&T.quill.keyboard.addBinding({key:"Y",shortKey:!0},T.redo.bind(T)),T}return s(y,[{key:"change",value:function(O,T){if(this.stack[O].length!==0){var E=this.stack[O].pop();this.stack[T].push(E),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(E[O],f.default.sources.USER),this.ignoreChange=!1;var N=b(E[O]);this.quill.setSelection(N)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(O,T){if(O.ops.length!==0){this.stack.redo=[];var E=this.quill.getContents().diff(T),N=Date.now();if(this.lastRecorded+this.options.delay>N&&this.stack.undo.length>0){var A=this.stack.undo.pop();E=E.compose(A.undo),O=A.redo.compose(O)}else this.lastRecorded=N;this.stack.undo.push({redo:O,undo:E}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(O){this.stack.undo.forEach(function(T){T.undo=O.transform(T.undo,!0),T.redo=O.transform(T.redo,!0)}),this.stack.redo.forEach(function(T){T.undo=O.transform(T.undo,!0),T.redo=O.transform(T.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),y}(h.default);g.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function m(_){var y=_.ops[_.ops.length-1];return y==null?!1:y.insert!=null?typeof y.insert=="string"&&y.insert.endsWith(`
581
- `):y.attributes!=null?Object.keys(y.attributes).some(function(x){return o.default.query(x,o.default.Scope.BLOCK)!=null}):!1}function b(_){var y=_.reduce(function(O,T){return O+=T.delete||0,O},0),x=_.length()-y;return m(_)&&(x-=1),x}n.default=g,n.getLastChangeIndex=b},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BaseTooltip=void 0;var s=function(){function P(L,j){for(var G=0;G<j.length;G++){var M=j[G];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(L,M.key,M)}}return function(L,j,G){return j&&P(L.prototype,j),G&&P(L,G),L}}(),a=function P(L,j,G){L===null&&(L=Function.prototype);var M=Object.getOwnPropertyDescriptor(L,j);if(M===void 0){var B=Object.getPrototypeOf(L);return B===null?void 0:P(B,j,G)}else{if("value"in M)return M.value;var q=M.get;return q===void 0?void 0:q.call(G)}},o=i(3),l=N(o),f=i(2),c=N(f),h=i(8),u=N(h),d=i(23),p=N(d),v=i(34),g=N(v),m=i(59),b=N(m),_=i(60),y=N(_),x=i(28),O=N(x),T=i(61),E=N(T);function N(P){return P&&P.__esModule?P:{default:P}}function A(P,L){if(!(P instanceof L))throw new TypeError("Cannot call a class as a function")}function w(P,L){if(!P)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L&&(typeof L=="object"||typeof L=="function")?L:P}function S(P,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof L);P.prototype=Object.create(L&&L.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),L&&(Object.setPrototypeOf?Object.setPrototypeOf(P,L):P.__proto__=L)}var I=[!1,"center","right","justify"],C=["#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"],F=[!1,"serif","monospace"],D=["1","2","3",!1],U=["small",!1,"large","huge"],X=function(P){S(L,P);function L(j,G){A(this,L);var M=w(this,(L.__proto__||Object.getPrototypeOf(L)).call(this,j,G)),B=function q(H){if(!document.body.contains(j.root))return document.body.removeEventListener("click",q);M.tooltip!=null&&!M.tooltip.root.contains(H.target)&&document.activeElement!==M.tooltip.textbox&&!M.quill.hasFocus()&&M.tooltip.hide(),M.pickers!=null&&M.pickers.forEach(function(z){z.container.contains(H.target)||z.close()})};return j.emitter.listenDOM("click",document.body,B),M}return s(L,[{key:"addModule",value:function(G){var M=a(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"addModule",this).call(this,G);return G==="toolbar"&&this.extendToolbar(M),M}},{key:"buildButtons",value:function(G,M){G.forEach(function(B){var q=B.getAttribute("class")||"";q.split(/\s+/).forEach(function(H){if(H.startsWith("ql-")&&(H=H.slice(3),M[H]!=null))if(H==="direction")B.innerHTML=M[H][""]+M[H].rtl;else if(typeof M[H]=="string")B.innerHTML=M[H];else{var z=B.value||"";z!=null&&M[H][z]&&(B.innerHTML=M[H][z])}})})}},{key:"buildPickers",value:function(G,M){var B=this;this.pickers=G.map(function(H){if(H.classList.contains("ql-align"))return H.querySelector("option")==null&&R(H,I),new y.default(H,M.align);if(H.classList.contains("ql-background")||H.classList.contains("ql-color")){var z=H.classList.contains("ql-background")?"background":"color";return H.querySelector("option")==null&&R(H,C,z==="background"?"#ffffff":"#000000"),new b.default(H,M[z])}else return H.querySelector("option")==null&&(H.classList.contains("ql-font")?R(H,F):H.classList.contains("ql-header")?R(H,D):H.classList.contains("ql-size")&&R(H,U)),new O.default(H)});var q=function(){B.pickers.forEach(function(z){z.update()})};this.quill.on(u.default.events.EDITOR_CHANGE,q)}}]),L}(g.default);X.DEFAULTS=(0,l.default)(!0,{},g.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var L=this,j=this.container.querySelector("input.ql-image[type=file]");j==null&&(j=document.createElement("input"),j.setAttribute("type","file"),j.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),j.classList.add("ql-image"),j.addEventListener("change",function(){if(j.files!=null&&j.files[0]!=null){var G=new FileReader;G.onload=function(M){var B=L.quill.getSelection(!0);L.quill.updateContents(new c.default().retain(B.index).delete(B.length).insert({image:M.target.result}),u.default.sources.USER),L.quill.setSelection(B.index+1,u.default.sources.SILENT),j.value=""},G.readAsDataURL(j.files[0])}}),this.container.appendChild(j)),j.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var $=function(P){S(L,P);function L(j,G){A(this,L);var M=w(this,(L.__proto__||Object.getPrototypeOf(L)).call(this,j,G));return M.textbox=M.root.querySelector('input[type="text"]'),M.listen(),M}return s(L,[{key:"listen",value:function(){var G=this;this.textbox.addEventListener("keydown",function(M){p.default.match(M,"enter")?(G.save(),M.preventDefault()):p.default.match(M,"escape")&&(G.cancel(),M.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),M!=null?this.textbox.value=M:G!==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-"+G)||""),this.root.setAttribute("data-mode",G)}},{key:"restoreFocus",value:function(){var G=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=G}},{key:"save",value:function(){var G=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var M=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",G,u.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",G,u.default.sources.USER)),this.quill.root.scrollTop=M;break}case"video":G=k(G);case"formula":{if(!G)break;var B=this.quill.getSelection(!0);if(B!=null){var q=B.index+B.length;this.quill.insertEmbed(q,this.root.getAttribute("data-mode"),G,u.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(q+1," ",u.default.sources.USER),this.quill.setSelection(q+2,u.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),L}(E.default);function k(P){var L=P.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||P.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return L?(L[1]||"https")+"://www.youtube.com/embed/"+L[2]+"?showinfo=0":(L=P.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(L[1]||"https")+"://player.vimeo.com/video/"+L[2]+"/":P}function R(P,L){var j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;L.forEach(function(G){var M=document.createElement("option");G===j?M.setAttribute("selected","selected"):M.setAttribute("value",G),P.appendChild(M)})}n.BaseTooltip=$,n.default=X},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function a(){this.head=this.tail=null,this.length=0}return a.prototype.append=function(){for(var o=[],l=0;l<arguments.length;l++)o[l]=arguments[l];this.insertBefore(o[0],null),o.length>1&&this.append.apply(this,o.slice(1))},a.prototype.contains=function(o){for(var l,f=this.iterator();l=f();)if(l===o)return!0;return!1},a.prototype.insertBefore=function(o,l){o&&(o.next=l,l!=null?(o.prev=l.prev,l.prev!=null&&(l.prev.next=o),l.prev=o,l===this.head&&(this.head=o)):this.tail!=null?(this.tail.next=o,o.prev=this.tail,this.tail=o):(o.prev=null,this.head=this.tail=o),this.length+=1)},a.prototype.offset=function(o){for(var l=0,f=this.head;f!=null;){if(f===o)return l;l+=f.length(),f=f.next}return-1},a.prototype.remove=function(o){this.contains(o)&&(o.prev!=null&&(o.prev.next=o.next),o.next!=null&&(o.next.prev=o.prev),o===this.head&&(this.head=o.next),o===this.tail&&(this.tail=o.prev),this.length-=1)},a.prototype.iterator=function(o){return o===void 0&&(o=this.head),function(){var l=o;return o!=null&&(o=o.next),l}},a.prototype.find=function(o,l){l===void 0&&(l=!1);for(var f,c=this.iterator();f=c();){var h=f.length();if(o<h||l&&o===h&&(f.next==null||f.next.length()!==0))return[f,o];o-=h}return[null,0]},a.prototype.forEach=function(o){for(var l,f=this.iterator();l=f();)o(l)},a.prototype.forEachAt=function(o,l,f){if(!(l<=0))for(var c=this.find(o),h=c[0],u=c[1],d,p=o-u,v=this.iterator(h);(d=v())&&p<o+l;){var g=d.length();o>p?f(d,o-p,Math.min(l,p+g-o)):f(d,0,Math.min(g,o+l-p)),p+=g}},a.prototype.map=function(o){return this.reduce(function(l,f){return l.push(o(f)),l},[])},a.prototype.reduce=function(o,l){for(var f,c=this.iterator();f=c();)l=o(l,f);return l},a}();n.default=s},function(r,n,i){var s=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var p in d)d.hasOwnProperty(p)&&(u[p]=d[p])};return function(u,d){h(u,d);function p(){this.constructor=u}u.prototype=d===null?Object.create(d):(p.prototype=d.prototype,new p)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(17),o=i(1),l={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},f=100,c=function(h){s(u,h);function u(d){var p=h.call(this,d)||this;return p.scroll=p,p.observer=new MutationObserver(function(v){p.update(v)}),p.observer.observe(p.domNode,l),p.attach(),p}return u.prototype.detach=function(){h.prototype.detach.call(this),this.observer.disconnect()},u.prototype.deleteAt=function(d,p){this.update(),d===0&&p===this.length()?this.children.forEach(function(v){v.remove()}):h.prototype.deleteAt.call(this,d,p)},u.prototype.formatAt=function(d,p,v,g){this.update(),h.prototype.formatAt.call(this,d,p,v,g)},u.prototype.insertAt=function(d,p,v){this.update(),h.prototype.insertAt.call(this,d,p,v)},u.prototype.optimize=function(d,p){var v=this;d===void 0&&(d=[]),p===void 0&&(p={}),h.prototype.optimize.call(this,p);for(var g=[].slice.call(this.observer.takeRecords());g.length>0;)d.push(g.pop());for(var m=function(x,O){O===void 0&&(O=!0),!(x==null||x===v)&&x.domNode.parentNode!=null&&(x.domNode[o.DATA_KEY].mutations==null&&(x.domNode[o.DATA_KEY].mutations=[]),O&&m(x.parent))},b=function(x){x.domNode[o.DATA_KEY]==null||x.domNode[o.DATA_KEY].mutations==null||(x instanceof a.default&&x.children.forEach(b),x.optimize(p))},_=d,y=0;_.length>0;y+=1){if(y>=f)throw new Error("[Parchment] Maximum optimize iterations reached");for(_.forEach(function(x){var O=o.find(x.target,!0);O!=null&&(O.domNode===x.target&&(x.type==="childList"?(m(o.find(x.previousSibling,!1)),[].forEach.call(x.addedNodes,function(T){var E=o.find(T,!1);m(E,!1),E instanceof a.default&&E.children.forEach(function(N){m(N,!1)})})):x.type==="attributes"&&m(O.prev)),m(O))}),this.children.forEach(b),_=[].slice.call(this.observer.takeRecords()),g=_.slice();g.length>0;)d.push(g.pop())}},u.prototype.update=function(d,p){var v=this;p===void 0&&(p={}),d=d||this.observer.takeRecords(),d.map(function(g){var m=o.find(g.target,!0);return m==null?null:m.domNode[o.DATA_KEY].mutations==null?(m.domNode[o.DATA_KEY].mutations=[g],m):(m.domNode[o.DATA_KEY].mutations.push(g),null)}).forEach(function(g){g==null||g===v||g.domNode[o.DATA_KEY]==null||g.update(g.domNode[o.DATA_KEY].mutations||[],p)}),this.domNode[o.DATA_KEY].mutations!=null&&h.prototype.update.call(this,this.domNode[o.DATA_KEY].mutations,p),this.optimize(d,p)},u.blotName="scroll",u.defaultChild="block",u.scope=o.Scope.BLOCK_BLOT,u.tagName="DIV",u}(a.default);n.default=c},function(r,n,i){var s=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,u){h.__proto__=u}||function(h,u){for(var d in u)u.hasOwnProperty(d)&&(h[d]=u[d])};return function(h,u){c(h,u);function d(){this.constructor=h}h.prototype=u===null?Object.create(u):(d.prototype=u.prototype,new d)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(18),o=i(1);function l(c,h){if(Object.keys(c).length!==Object.keys(h).length)return!1;for(var u in c)if(c[u]!==h[u])return!1;return!0}var f=function(c){s(h,c);function h(){return c!==null&&c.apply(this,arguments)||this}return h.formats=function(u){if(u.tagName!==h.tagName)return c.formats.call(this,u)},h.prototype.format=function(u,d){var p=this;u===this.statics.blotName&&!d?(this.children.forEach(function(v){v instanceof a.default||(v=v.wrap(h.blotName,!0)),p.attributes.copy(v)}),this.unwrap()):c.prototype.format.call(this,u,d)},h.prototype.formatAt=function(u,d,p,v){if(this.formats()[p]!=null||o.query(p,o.Scope.ATTRIBUTE)){var g=this.isolate(u,d);g.format(p,v)}else c.prototype.formatAt.call(this,u,d,p,v)},h.prototype.optimize=function(u){c.prototype.optimize.call(this,u);var d=this.formats();if(Object.keys(d).length===0)return this.unwrap();var p=this.next;p instanceof h&&p.prev===this&&l(d,p.formats())&&(p.moveChildren(this),p.remove())},h.blotName="inline",h.scope=o.Scope.INLINE_BLOT,h.tagName="SPAN",h}(a.default);n.default=f},function(r,n,i){var s=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,h){c.__proto__=h}||function(c,h){for(var u in h)h.hasOwnProperty(u)&&(c[u]=h[u])};return function(c,h){f(c,h);function u(){this.constructor=c}c.prototype=h===null?Object.create(h):(u.prototype=h.prototype,new u)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(18),o=i(1),l=function(f){s(c,f);function c(){return f!==null&&f.apply(this,arguments)||this}return c.formats=function(h){var u=o.query(c.blotName).tagName;if(h.tagName!==u)return f.formats.call(this,h)},c.prototype.format=function(h,u){o.query(h,o.Scope.BLOCK)!=null&&(h===this.statics.blotName&&!u?this.replaceWith(c.blotName):f.prototype.format.call(this,h,u))},c.prototype.formatAt=function(h,u,d,p){o.query(d,o.Scope.BLOCK)!=null?this.format(d,p):f.prototype.formatAt.call(this,h,u,d,p)},c.prototype.insertAt=function(h,u,d){if(d==null||o.query(u,o.Scope.INLINE)!=null)f.prototype.insertAt.call(this,h,u,d);else{var p=this.split(h),v=o.create(u,d);p.parent.insertBefore(v,p)}},c.prototype.update=function(h,u){navigator.userAgent.match(/Trident/)?this.build():f.prototype.update.call(this,h,u)},c.blotName="block",c.scope=o.Scope.BLOCK_BLOT,c.tagName="P",c}(a.default);n.default=l},function(r,n,i){var s=this&&this.__extends||function(){var l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,c){f.__proto__=c}||function(f,c){for(var h in c)c.hasOwnProperty(h)&&(f[h]=c[h])};return function(f,c){l(f,c);function h(){this.constructor=f}f.prototype=c===null?Object.create(c):(h.prototype=c.prototype,new h)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(19),o=function(l){s(f,l);function f(){return l!==null&&l.apply(this,arguments)||this}return f.formats=function(c){},f.prototype.format=function(c,h){l.prototype.formatAt.call(this,0,this.length(),c,h)},f.prototype.formatAt=function(c,h,u,d){c===0&&h===this.length()?this.format(u,d):l.prototype.formatAt.call(this,c,h,u,d)},f.prototype.formats=function(){return this.statics.formats(this.domNode)},f}(a.default);n.default=o},function(r,n,i){var s=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,h){c.__proto__=h}||function(c,h){for(var u in h)h.hasOwnProperty(u)&&(c[u]=h[u])};return function(c,h){f(c,h);function u(){this.constructor=c}c.prototype=h===null?Object.create(h):(u.prototype=h.prototype,new u)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(19),o=i(1),l=function(f){s(c,f);function c(h){var u=f.call(this,h)||this;return u.text=u.statics.value(u.domNode),u}return c.create=function(h){return document.createTextNode(h)},c.value=function(h){var u=h.data;return u.normalize&&(u=u.normalize()),u},c.prototype.deleteAt=function(h,u){this.domNode.data=this.text=this.text.slice(0,h)+this.text.slice(h+u)},c.prototype.index=function(h,u){return this.domNode===h?u:-1},c.prototype.insertAt=function(h,u,d){d==null?(this.text=this.text.slice(0,h)+u+this.text.slice(h),this.domNode.data=this.text):f.prototype.insertAt.call(this,h,u,d)},c.prototype.length=function(){return this.text.length},c.prototype.optimize=function(h){f.prototype.optimize.call(this,h),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof c&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},c.prototype.position=function(h,u){return[this.domNode,h]},c.prototype.split=function(h,u){if(u===void 0&&(u=!1),!u){if(h===0)return this;if(h===this.length())return this.next}var d=o.create(this.domNode.splitText(h));return this.parent.insertBefore(d,this.next),this.text=this.statics.value(this.domNode),d},c.prototype.update=function(h,u){var d=this;h.some(function(p){return p.type==="characterData"&&p.target===d.domNode})&&(this.text=this.statics.value(this.domNode))},c.prototype.value=function(){return this.text},c.blotName="text",c.scope=o.Scope.INLINE_BLOT,c}(a.default);n.default=l},function(r,n,i){var s=document.createElement("div");if(s.classList.toggle("test-class",!1),s.classList.contains("test-class")){var a=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(o,l){return arguments.length>1&&!this.contains(o)==!l?l:a.call(this,o)}}String.prototype.startsWith||(String.prototype.startsWith=function(o,l){return l=l||0,this.substr(l,o.length)===o}),String.prototype.endsWith||(String.prototype.endsWith=function(o,l){var f=this.toString();(typeof l!="number"||!isFinite(l)||Math.floor(l)!==l||l>f.length)&&(l=f.length),l-=o.length;var c=f.indexOf(o,l);return c!==-1&&c===l}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(l){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof l!="function")throw new TypeError("predicate must be a function");for(var f=Object(this),c=f.length>>>0,h=arguments[1],u,d=0;d<c;d++)if(u=f[d],l.call(h,u,d,f))return u}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(r,n){var i=-1,s=1,a=0;function o(y,x,O){if(y==x)return y?[[a,y]]:[];(O<0||y.length<O)&&(O=null);var T=h(y,x),E=y.substring(0,T);y=y.substring(T),x=x.substring(T),T=u(y,x);var N=y.substring(y.length-T);y=y.substring(0,y.length-T),x=x.substring(0,x.length-T);var A=l(y,x);return E&&A.unshift([a,E]),N&&A.push([a,N]),p(A),O!=null&&(A=m(A,O)),A=b(A),A}function l(y,x){var O;if(!y)return[[s,x]];if(!x)return[[i,y]];var T=y.length>x.length?y:x,E=y.length>x.length?x:y,N=T.indexOf(E);if(N!=-1)return O=[[s,T.substring(0,N)],[a,E],[s,T.substring(N+E.length)]],y.length>x.length&&(O[0][0]=O[2][0]=i),O;if(E.length==1)return[[i,y],[s,x]];var A=d(y,x);if(A){var w=A[0],S=A[1],I=A[2],C=A[3],F=A[4],D=o(w,I),U=o(S,C);return D.concat([[a,F]],U)}return f(y,x)}function f(y,x){for(var O=y.length,T=x.length,E=Math.ceil((O+T)/2),N=E,A=2*E,w=new Array(A),S=new Array(A),I=0;I<A;I++)w[I]=-1,S[I]=-1;w[N+1]=0,S[N+1]=0;for(var C=O-T,F=C%2!=0,D=0,U=0,X=0,$=0,k=0;k<E;k++){for(var R=-k+D;R<=k-U;R+=2){var P=N+R,L;R==-k||R!=k&&w[P-1]<w[P+1]?L=w[P+1]:L=w[P-1]+1;for(var j=L-R;L<O&&j<T&&y.charAt(L)==x.charAt(j);)L++,j++;if(w[P]=L,L>O)U+=2;else if(j>T)D+=2;else if(F){var G=N+C-R;if(G>=0&&G<A&&S[G]!=-1){var M=O-S[G];if(L>=M)return c(y,x,L,j)}}}for(var B=-k+X;B<=k-$;B+=2){var G=N+B,M;B==-k||B!=k&&S[G-1]<S[G+1]?M=S[G+1]:M=S[G-1]+1;for(var q=M-B;M<O&&q<T&&y.charAt(O-M-1)==x.charAt(T-q-1);)M++,q++;if(S[G]=M,M>O)$+=2;else if(q>T)X+=2;else if(!F){var P=N+C-B;if(P>=0&&P<A&&w[P]!=-1){var L=w[P],j=N+L-P;if(M=O-M,L>=M)return c(y,x,L,j)}}}}return[[i,y],[s,x]]}function c(y,x,O,T){var E=y.substring(0,O),N=x.substring(0,T),A=y.substring(O),w=x.substring(T),S=o(E,N),I=o(A,w);return S.concat(I)}function h(y,x){if(!y||!x||y.charAt(0)!=x.charAt(0))return 0;for(var O=0,T=Math.min(y.length,x.length),E=T,N=0;O<E;)y.substring(N,E)==x.substring(N,E)?(O=E,N=O):T=E,E=Math.floor((T-O)/2+O);return E}function u(y,x){if(!y||!x||y.charAt(y.length-1)!=x.charAt(x.length-1))return 0;for(var O=0,T=Math.min(y.length,x.length),E=T,N=0;O<E;)y.substring(y.length-E,y.length-N)==x.substring(x.length-E,x.length-N)?(O=E,N=O):T=E,E=Math.floor((T-O)/2+O);return E}function d(y,x){var O=y.length>x.length?y:x,T=y.length>x.length?x:y;if(O.length<4||T.length*2<O.length)return null;function E(U,X,$){for(var k=U.substring($,$+Math.floor(U.length/4)),R=-1,P="",L,j,G,M;(R=X.indexOf(k,R+1))!=-1;){var B=h(U.substring($),X.substring(R)),q=u(U.substring(0,$),X.substring(0,R));P.length<q+B&&(P=X.substring(R-q,R)+X.substring(R,R+B),L=U.substring(0,$-q),j=U.substring($+B),G=X.substring(0,R-q),M=X.substring(R+B))}return P.length*2>=U.length?[L,j,G,M,P]:null}var N=E(O,T,Math.ceil(O.length/4)),A=E(O,T,Math.ceil(O.length/2)),w;if(!N&&!A)return null;A?N?w=N[4].length>A[4].length?N:A:w=A:w=N;var S,I,C,F;y.length>x.length?(S=w[0],I=w[1],C=w[2],F=w[3]):(C=w[0],F=w[1],S=w[2],I=w[3]);var D=w[4];return[S,I,C,F,D]}function p(y){y.push([a,""]);for(var x=0,O=0,T=0,E="",N="",A;x<y.length;)switch(y[x][0]){case s:T++,N+=y[x][1],x++;break;case i:O++,E+=y[x][1],x++;break;case a:O+T>1?(O!==0&&T!==0&&(A=h(N,E),A!==0&&(x-O-T>0&&y[x-O-T-1][0]==a?y[x-O-T-1][1]+=N.substring(0,A):(y.splice(0,0,[a,N.substring(0,A)]),x++),N=N.substring(A),E=E.substring(A)),A=u(N,E),A!==0&&(y[x][1]=N.substring(N.length-A)+y[x][1],N=N.substring(0,N.length-A),E=E.substring(0,E.length-A))),O===0?y.splice(x-T,O+T,[s,N]):T===0?y.splice(x-O,O+T,[i,E]):y.splice(x-O-T,O+T,[i,E],[s,N]),x=x-O-T+(O?1:0)+(T?1:0)+1):x!==0&&y[x-1][0]==a?(y[x-1][1]+=y[x][1],y.splice(x,1)):x++,T=0,O=0,E="",N="";break}y[y.length-1][1]===""&&y.pop();var w=!1;for(x=1;x<y.length-1;)y[x-1][0]==a&&y[x+1][0]==a&&(y[x][1].substring(y[x][1].length-y[x-1][1].length)==y[x-1][1]?(y[x][1]=y[x-1][1]+y[x][1].substring(0,y[x][1].length-y[x-1][1].length),y[x+1][1]=y[x-1][1]+y[x+1][1],y.splice(x-1,1),w=!0):y[x][1].substring(0,y[x+1][1].length)==y[x+1][1]&&(y[x-1][1]+=y[x+1][1],y[x][1]=y[x][1].substring(y[x+1][1].length)+y[x+1][1],y.splice(x+1,1),w=!0)),x++;w&&p(y)}var v=o;v.INSERT=s,v.DELETE=i,v.EQUAL=a,r.exports=v;function g(y,x){if(x===0)return[a,y];for(var O=0,T=0;T<y.length;T++){var E=y[T];if(E[0]===i||E[0]===a){var N=O+E[1].length;if(x===N)return[T+1,y];if(x<N){y=y.slice();var A=x-O,w=[E[0],E[1].slice(0,A)],S=[E[0],E[1].slice(A)];return y.splice(T,1,w,S),[T+1,y]}else O=N}}throw new Error("cursor_pos is out of bounds!")}function m(y,x){var O=g(y,x),T=O[1],E=O[0],N=T[E],A=T[E+1];if(N==null)return y;if(N[0]!==a)return y;if(A!=null&&N[1]+A[1]===A[1]+N[1])return T.splice(E,2,A,N),_(T,E,2);if(A!=null&&A[1].indexOf(N[1])===0){T.splice(E,2,[A[0],N[1]],[0,N[1]]);var w=A[1].slice(N[1].length);return w.length>0&&T.splice(E+2,0,[A[0],w]),_(T,E,3)}else return y}function b(y){for(var x=!1,O=function(A){return A.charCodeAt(0)>=56320&&A.charCodeAt(0)<=57343},T=function(A){return A.charCodeAt(A.length-1)>=55296&&A.charCodeAt(A.length-1)<=56319},E=2;E<y.length;E+=1)y[E-2][0]===a&&T(y[E-2][1])&&y[E-1][0]===i&&O(y[E-1][1])&&y[E][0]===s&&O(y[E][1])&&(x=!0,y[E-1][1]=y[E-2][1].slice(-1)+y[E-1][1],y[E][1]=y[E-2][1].slice(-1)+y[E][1],y[E-2][1]=y[E-2][1].slice(0,-1));if(!x)return y;for(var N=[],E=0;E<y.length;E+=1)y[E][1].length>0&&N.push(y[E]);return N}function _(y,x,O){for(var T=x+O-1;T>=0&&T>=x-1;T--)if(T+1<y.length){var E=y[T],N=y[T+1];E[0]===N[1]&&y.splice(T,2,[E[0],E[1]+N[1]])}return y}},function(r,n){n=r.exports=typeof Object.keys=="function"?Object.keys:i,n.shim=i;function i(s){var a=[];for(var o in s)a.push(o);return a}},function(r,n){var i=function(){return Object.prototype.toString.call(arguments)}()=="[object Arguments]";n=r.exports=i?s:a,n.supported=s;function s(o){return Object.prototype.toString.call(o)=="[object Arguments]"}n.unsupported=a;function a(o){return o&&typeof o=="object"&&typeof o.length=="number"&&Object.prototype.hasOwnProperty.call(o,"callee")&&!Object.prototype.propertyIsEnumerable.call(o,"callee")||!1}},function(r,n){var i=Object.prototype.hasOwnProperty,s="~";function a(){}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(s=!1));function o(f,c,h){this.fn=f,this.context=c,this.once=h||!1}function l(){this._events=new a,this._eventsCount=0}l.prototype.eventNames=function(){var c=[],h,u;if(this._eventsCount===0)return c;for(u in h=this._events)i.call(h,u)&&c.push(s?u.slice(1):u);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(h)):c},l.prototype.listeners=function(c,h){var u=s?s+c:c,d=this._events[u];if(h)return!!d;if(!d)return[];if(d.fn)return[d.fn];for(var p=0,v=d.length,g=new Array(v);p<v;p++)g[p]=d[p].fn;return g},l.prototype.emit=function(c,h,u,d,p,v){var g=s?s+c:c;if(!this._events[g])return!1;var m=this._events[g],b=arguments.length,_,y;if(m.fn){switch(m.once&&this.removeListener(c,m.fn,void 0,!0),b){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,h),!0;case 3:return m.fn.call(m.context,h,u),!0;case 4:return m.fn.call(m.context,h,u,d),!0;case 5:return m.fn.call(m.context,h,u,d,p),!0;case 6:return m.fn.call(m.context,h,u,d,p,v),!0}for(y=1,_=new Array(b-1);y<b;y++)_[y-1]=arguments[y];m.fn.apply(m.context,_)}else{var x=m.length,O;for(y=0;y<x;y++)switch(m[y].once&&this.removeListener(c,m[y].fn,void 0,!0),b){case 1:m[y].fn.call(m[y].context);break;case 2:m[y].fn.call(m[y].context,h);break;case 3:m[y].fn.call(m[y].context,h,u);break;case 4:m[y].fn.call(m[y].context,h,u,d);break;default:if(!_)for(O=1,_=new Array(b-1);O<b;O++)_[O-1]=arguments[O];m[y].fn.apply(m[y].context,_)}}return!0},l.prototype.on=function(c,h,u){var d=new o(h,u||this),p=s?s+c:c;return this._events[p]?this._events[p].fn?this._events[p]=[this._events[p],d]:this._events[p].push(d):(this._events[p]=d,this._eventsCount++),this},l.prototype.once=function(c,h,u){var d=new o(h,u||this,!0),p=s?s+c:c;return this._events[p]?this._events[p].fn?this._events[p]=[this._events[p],d]:this._events[p].push(d):(this._events[p]=d,this._eventsCount++),this},l.prototype.removeListener=function(c,h,u,d){var p=s?s+c:c;if(!this._events[p])return this;if(!h)return--this._eventsCount===0?this._events=new a:delete this._events[p],this;var v=this._events[p];if(v.fn)v.fn===h&&(!d||v.once)&&(!u||v.context===u)&&(--this._eventsCount===0?this._events=new a:delete this._events[p]);else{for(var g=0,m=[],b=v.length;g<b;g++)(v[g].fn!==h||d&&!v[g].once||u&&v[g].context!==u)&&m.push(v[g]);m.length?this._events[p]=m.length===1?m[0]:m:--this._eventsCount===0?this._events=new a:delete this._events[p]}return this},l.prototype.removeAllListeners=function(c){var h;return c?(h=s?s+c:c,this._events[h]&&(--this._eventsCount===0?this._events=new a:delete this._events[h])):(this._events=new a,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prototype.setMaxListeners=function(){return this},l.prefixed=s,l.EventEmitter=l,typeof r<"u"&&(r.exports=l)},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 s=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(W,Z){var tt=[],K=!0,ft=!1,ct=void 0;try{for(var ht=W[Symbol.iterator](),nt;!(K=(nt=ht.next()).done)&&(tt.push(nt.value),!(Z&&tt.length===Z));K=!0);}catch(At){ft=!0,ct=At}finally{try{!K&&ht.return&&ht.return()}finally{if(ft)throw ct}}return tt}return function(W,Z){if(Array.isArray(W))return W;if(Symbol.iterator in Object(W))return V(W,Z);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function V(W,Z){for(var tt=0;tt<Z.length;tt++){var K=Z[tt];K.enumerable=K.enumerable||!1,K.configurable=!0,"value"in K&&(K.writable=!0),Object.defineProperty(W,K.key,K)}}return function(W,Z,tt){return Z&&V(W.prototype,Z),tt&&V(W,tt),W}}(),l=i(3),f=S(l),c=i(2),h=S(c),u=i(0),d=S(u),p=i(5),v=S(p),g=i(10),m=S(g),b=i(9),_=S(b),y=i(36),x=i(37),O=i(13),T=S(O),E=i(26),N=i(38),A=i(39),w=i(40);function S(V){return V&&V.__esModule?V:{default:V}}function I(V,W,Z){return W in V?Object.defineProperty(V,W,{value:Z,enumerable:!0,configurable:!0,writable:!0}):V[W]=Z,V}function C(V,W){if(!(V instanceof W))throw new TypeError("Cannot call a class as a function")}function F(V,W){if(!V)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return W&&(typeof W=="object"||typeof W=="function")?W:V}function D(V,W){if(typeof W!="function"&&W!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof W);V.prototype=Object.create(W&&W.prototype,{constructor:{value:V,enumerable:!1,writable:!0,configurable:!0}}),W&&(Object.setPrototypeOf?Object.setPrototypeOf(V,W):V.__proto__=W)}var U=(0,m.default)("quill:clipboard"),X="__ql-matcher",$=[[Node.TEXT_NODE,Rt],[Node.TEXT_NODE,at],["br",Y],[Node.ELEMENT_NODE,at],[Node.ELEMENT_NODE,z],[Node.ELEMENT_NODE,lt],[Node.ELEMENT_NODE,H],[Node.ELEMENT_NODE,Ct],["li",et],["b",q.bind(q,"bold")],["i",q.bind(q,"italic")],["style",J]],k=[y.AlignAttribute,N.DirectionAttribute].reduce(function(V,W){return V[W.keyName]=W,V},{}),R=[y.AlignStyle,x.BackgroundStyle,E.ColorStyle,N.DirectionStyle,A.FontStyle,w.SizeStyle].reduce(function(V,W){return V[W.keyName]=W,V},{}),P=function(V){D(W,V);function W(Z,tt){C(this,W);var K=F(this,(W.__proto__||Object.getPrototypeOf(W)).call(this,Z,tt));return K.quill.root.addEventListener("paste",K.onPaste.bind(K)),K.container=K.quill.addContainer("ql-clipboard"),K.container.setAttribute("contenteditable",!0),K.container.setAttribute("tabindex",-1),K.matchers=[],$.concat(K.options.matchers).forEach(function(ft){var ct=a(ft,2),ht=ct[0],nt=ct[1];!tt.matchVisual&&nt===lt||K.addMatcher(ht,nt)}),K}return o(W,[{key:"addMatcher",value:function(tt,K){this.matchers.push([tt,K])}},{key:"convert",value:function(tt){if(typeof tt=="string")return this.container.innerHTML=tt.replace(/\>\r?\n +\</g,"><"),this.convert();var K=this.quill.getFormat(this.quill.selection.savedRange.index);if(K[T.default.blotName]){var ft=this.container.innerText;return this.container.innerHTML="",new h.default().insert(ft,I({},T.default.blotName,K[T.default.blotName]))}var ct=this.prepareMatching(),ht=a(ct,2),nt=ht[0],At=ht[1],Et=B(this.container,nt,At);return G(Et,`
582
- `)&&Et.ops[Et.ops.length-1].attributes==null&&(Et=Et.compose(new h.default().retain(Et.length()-1).delete(1))),U.log("convert",this.container.innerHTML,Et),this.container.innerHTML="",Et}},{key:"dangerouslyPasteHTML",value:function(tt,K){var ft=arguments.length>2&&arguments[2]!==void 0?arguments[2]:v.default.sources.API;if(typeof tt=="string")this.quill.setContents(this.convert(tt),K),this.quill.setSelection(0,v.default.sources.SILENT);else{var ct=this.convert(K);this.quill.updateContents(new h.default().retain(tt).concat(ct),ft),this.quill.setSelection(tt+ct.length(),v.default.sources.SILENT)}}},{key:"onPaste",value:function(tt){var K=this;if(!(tt.defaultPrevented||!this.quill.isEnabled())){var ft=this.quill.getSelection(),ct=new h.default().retain(ft.index),ht=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(v.default.sources.SILENT),setTimeout(function(){ct=ct.concat(K.convert()).delete(ft.length),K.quill.updateContents(ct,v.default.sources.USER),K.quill.setSelection(ct.length()-ft.length,v.default.sources.SILENT),K.quill.scrollingContainer.scrollTop=ht,K.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var tt=this,K=[],ft=[];return this.matchers.forEach(function(ct){var ht=a(ct,2),nt=ht[0],At=ht[1];switch(nt){case Node.TEXT_NODE:ft.push(At);break;case Node.ELEMENT_NODE:K.push(At);break;default:[].forEach.call(tt.container.querySelectorAll(nt),function(Et){Et[X]=Et[X]||[],Et[X].push(At)});break}}),[K,ft]}}]),W}(_.default);P.DEFAULTS={matchers:[],matchVisual:!0};function L(V,W,Z){return(typeof W>"u"?"undefined":s(W))==="object"?Object.keys(W).reduce(function(tt,K){return L(tt,K,W[K])},V):V.reduce(function(tt,K){return K.attributes&&K.attributes[W]?tt.push(K):tt.insert(K.insert,(0,f.default)({},I({},W,Z),K.attributes))},new h.default)}function j(V){if(V.nodeType!==Node.ELEMENT_NODE)return{};var W="__ql-computed-style";return V[W]||(V[W]=window.getComputedStyle(V))}function G(V,W){for(var Z="",tt=V.ops.length-1;tt>=0&&Z.length<W.length;--tt){var K=V.ops[tt];if(typeof K.insert!="string")break;Z=K.insert+Z}return Z.slice(-1*W.length)===W}function M(V){if(V.childNodes.length===0)return!1;var W=j(V);return["block","list-item"].indexOf(W.display)>-1}function B(V,W,Z){return V.nodeType===V.TEXT_NODE?Z.reduce(function(tt,K){return K(V,tt)},new h.default):V.nodeType===V.ELEMENT_NODE?[].reduce.call(V.childNodes||[],function(tt,K){var ft=B(K,W,Z);return K.nodeType===V.ELEMENT_NODE&&(ft=W.reduce(function(ct,ht){return ht(K,ct)},ft),ft=(K[X]||[]).reduce(function(ct,ht){return ht(K,ct)},ft)),tt.concat(ft)},new h.default):new h.default}function q(V,W,Z){return L(Z,V,!0)}function H(V,W){var Z=d.default.Attributor.Attribute.keys(V),tt=d.default.Attributor.Class.keys(V),K=d.default.Attributor.Style.keys(V),ft={};return Z.concat(tt).concat(K).forEach(function(ct){var ht=d.default.query(ct,d.default.Scope.ATTRIBUTE);ht!=null&&(ft[ht.attrName]=ht.value(V),ft[ht.attrName])||(ht=k[ct],ht!=null&&(ht.attrName===ct||ht.keyName===ct)&&(ft[ht.attrName]=ht.value(V)||void 0),ht=R[ct],ht!=null&&(ht.attrName===ct||ht.keyName===ct)&&(ht=R[ct],ft[ht.attrName]=ht.value(V)||void 0))}),Object.keys(ft).length>0&&(W=L(W,ft)),W}function z(V,W){var Z=d.default.query(V);if(Z==null)return W;if(Z.prototype instanceof d.default.Embed){var tt={},K=Z.value(V);K!=null&&(tt[Z.blotName]=K,W=new h.default().insert(tt,Z.formats(V)))}else typeof Z.formats=="function"&&(W=L(W,Z.blotName,Z.formats(V)));return W}function Y(V,W){return G(W,`
580
+ `);lt=0,W.forEach(function(Z,tt){M?(at.insertAt(Rt+lt,H.TAB),lt+=H.TAB.length,tt===0?z+=H.TAB.length:Y+=H.TAB.length):Z.startsWith(H.TAB)&&(at.deleteAt(Rt+lt,H.TAB.length),lt-=H.TAB.length,tt===0?z-=H.TAB.length:Y-=H.TAB.length),lt+=Z.length+1}),this.quill.update(x.default.sources.USER),this.quill.setSelection(z,Y,x.default.sources.SILENT)}}}}function j(M){return{key:M[0].toUpperCase(),shortKey:!0,handler:function(q,H){this.quill.format(M,!H.format[M],x.default.sources.USER)}}}function G(M){if(typeof M=="string"||typeof M=="number")return G({key:M});if((typeof M>"u"?"undefined":s(M))==="object"&&(M=(0,f.default)(M,!1)),typeof M.key=="string")if(U.keys[M.key.toUpperCase()]!=null)M.key=U.keys[M.key.toUpperCase()];else if(M.key.length===1)M.key=M.key.toUpperCase().charCodeAt(0);else return null;return M.shortKey&&(M[$]=M.shortKey,delete M.shortKey),M}n.default=U,n.SHORTKEY=$},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function m(b,_){var y=[],x=!0,O=!1,T=void 0;try{for(var E=b[Symbol.iterator](),N;!(x=(N=E.next()).done)&&(y.push(N.value),!(_&&y.length===_));x=!0);}catch(A){O=!0,T=A}finally{try{!x&&E.return&&E.return()}finally{if(O)throw T}}return y}return function(b,_){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return m(b,_);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function m(b,_,y){b===null&&(b=Function.prototype);var x=Object.getOwnPropertyDescriptor(b,_);if(x===void 0){var O=Object.getPrototypeOf(b);return O===null?void 0:m(O,_,y)}else{if("value"in x)return x.value;var T=x.get;return T===void 0?void 0:T.call(y)}},o=function(){function m(b,_){for(var y=0;y<_.length;y++){var x=_[y];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(b,x.key,x)}}return function(b,_,y){return _&&m(b.prototype,_),y&&m(b,y),b}}(),l=i(0),f=u(l),c=i(7),h=u(c);function u(m){return m&&m.__esModule?m:{default:m}}function d(m,b){if(!(m instanceof b))throw new TypeError("Cannot call a class as a function")}function p(m,b){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:m}function v(m,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);m.prototype=Object.create(b&&b.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(m,b):m.__proto__=b)}var g=function(m){v(b,m),o(b,null,[{key:"value",value:function(){}}]);function b(_,y){d(this,b);var x=p(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,_));return x.selection=y,x.textNode=document.createTextNode(b.CONTENTS),x.domNode.appendChild(x.textNode),x._length=0,x}return o(b,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(y,x){if(this._length!==0)return a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"format",this).call(this,y,x);for(var O=this,T=0;O!=null&&O.statics.scope!==f.default.Scope.BLOCK_BLOT;)T+=O.offset(O.parent),O=O.parent;O!=null&&(this._length=b.CONTENTS.length,O.optimize(),O.formatAt(T,b.CONTENTS.length,y,x),this._length=0)}},{key:"index",value:function(y,x){return y===this.textNode?0:a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"index",this).call(this,y,x)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var y=this.textNode,x=this.selection.getNativeRange(),O=void 0,T=void 0,E=void 0;if(x!=null&&x.start.node===y&&x.end.node===y){var N=[y,x.start.offset,x.end.offset];O=N[0],T=N[1],E=N[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==b.CONTENTS){var A=this.textNode.data.split(b.CONTENTS).join("");this.next instanceof h.default?(O=this.next.domNode,this.next.insertAt(0,A),this.textNode.data=b.CONTENTS):(this.textNode.data=A,this.parent.insertBefore(f.default.create(this.textNode),this),this.textNode=document.createTextNode(b.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),T!=null){var w=[T,E].map(function(I){return Math.max(0,Math.min(O.data.length,I-1))}),S=s(w,2);return T=S[0],E=S[1],{startNode:O,startOffset:T,endNode:O,endOffset:E}}}}},{key:"update",value:function(y,x){var O=this;if(y.some(function(E){return E.type==="characterData"&&E.target===O.textNode})){var T=this.restore();T&&(x.range=T)}}},{key:"value",value:function(){return""}}]),b}(f.default.Embed);g.blotName="cursor",g.className="ql-cursor",g.tagName="span",g.CONTENTS="\uFEFF",n.default=g},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(0),a=f(s),o=i(4),l=f(o);function f(p){return p&&p.__esModule?p:{default:p}}function c(p,v){if(!(p instanceof v))throw new TypeError("Cannot call a class as a function")}function h(p,v){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:p}function u(p,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);p.prototype=Object.create(v&&v.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(p,v):p.__proto__=v)}var d=function(p){u(v,p);function v(){return c(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(a.default.Container);d.allowedChildren=[l.default,o.BlockEmbed,d],n.default=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.ColorStyle=n.ColorClass=n.ColorAttributor=void 0;var s=function(){function g(m,b){for(var _=0;_<b.length;_++){var y=b[_];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(m,y.key,y)}}return function(m,b,_){return b&&g(m.prototype,b),_&&g(m,_),m}}(),a=function g(m,b,_){m===null&&(m=Function.prototype);var y=Object.getOwnPropertyDescriptor(m,b);if(y===void 0){var x=Object.getPrototypeOf(m);return x===null?void 0:g(x,b,_)}else{if("value"in y)return y.value;var O=y.get;return O===void 0?void 0:O.call(_)}},o=i(0),l=f(o);function f(g){return g&&g.__esModule?g:{default:g}}function c(g,m){if(!(g instanceof m))throw new TypeError("Cannot call a class as a function")}function h(g,m){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:g}function u(g,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);g.prototype=Object.create(m&&m.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(g,m):g.__proto__=m)}var d=function(g){u(m,g);function m(){return c(this,m),h(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return s(m,[{key:"value",value:function(_){var y=a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"value",this).call(this,_);return y.startsWith("rgb(")?(y=y.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+y.split(",").map(function(x){return("00"+parseInt(x).toString(16)).slice(-2)}).join("")):y}}]),m}(l.default.Attributor.Style),p=new l.default.Attributor.Class("color","ql-color",{scope:l.default.Scope.INLINE}),v=new d("color","color",{scope:l.default.Scope.INLINE});n.ColorAttributor=d,n.ColorClass=p,n.ColorStyle=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.sanitize=n.default=void 0;var s=function(){function v(g,m){for(var b=0;b<m.length;b++){var _=m[b];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(g,_.key,_)}}return function(g,m,b){return m&&v(g.prototype,m),b&&v(g,b),g}}(),a=function v(g,m,b){g===null&&(g=Function.prototype);var _=Object.getOwnPropertyDescriptor(g,m);if(_===void 0){var y=Object.getPrototypeOf(g);return y===null?void 0:v(y,m,b)}else{if("value"in _)return _.value;var x=_.get;return x===void 0?void 0:x.call(b)}},o=i(6),l=f(o);function f(v){return v&&v.__esModule?v:{default:v}}function c(v,g){if(!(v instanceof g))throw new TypeError("Cannot call a class as a function")}function h(v,g){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:v}function u(v,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);v.prototype=Object.create(g&&g.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(v,g):v.__proto__=g)}var d=function(v){u(g,v);function g(){return c(this,g),h(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return s(g,[{key:"format",value:function(b,_){if(b!==this.statics.blotName||!_)return a(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"format",this).call(this,b,_);_=this.constructor.sanitize(_),this.domNode.setAttribute("href",_)}}],[{key:"create",value:function(b){var _=a(g.__proto__||Object.getPrototypeOf(g),"create",this).call(this,b);return b=this.sanitize(b),_.setAttribute("href",b),_.setAttribute("rel","noopener noreferrer"),_.setAttribute("target","_blank"),_}},{key:"formats",value:function(b){return b.getAttribute("href")}},{key:"sanitize",value:function(b){return p(b,this.PROTOCOL_WHITELIST)?b:this.SANITIZED_URL}}]),g}(l.default);d.blotName="link",d.tagName="A",d.SANITIZED_URL="about:blank",d.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function p(v,g){var m=document.createElement("a");m.href=v;var b=m.href.slice(0,m.href.indexOf(":"));return g.indexOf(b)>-1}n.default=d,n.sanitize=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g},a=function(){function g(m,b){for(var _=0;_<b.length;_++){var y=b[_];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(m,y.key,y)}}return function(m,b,_){return b&&g(m.prototype,b),_&&g(m,_),m}}(),o=i(23),l=h(o),f=i(107),c=h(f);function h(g){return g&&g.__esModule?g:{default:g}}function u(g,m){if(!(g instanceof m))throw new TypeError("Cannot call a class as a function")}var d=0;function p(g,m){g.setAttribute(m,g.getAttribute(m)!=="true")}var v=function(){function g(m){var b=this;u(this,g),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(){b.togglePicker()}),this.label.addEventListener("keydown",function(_){switch(_.keyCode){case l.default.keys.ENTER:b.togglePicker();break;case l.default.keys.ESCAPE:b.escape(),_.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return a(g,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),p(this.label,"aria-expanded"),p(this.options,"aria-hidden")}},{key:"buildItem",value:function(b){var _=this,y=document.createElement("span");return y.tabIndex="0",y.setAttribute("role","button"),y.classList.add("ql-picker-item"),b.hasAttribute("value")&&y.setAttribute("data-value",b.getAttribute("value")),b.textContent&&y.setAttribute("data-label",b.textContent),y.addEventListener("click",function(){_.selectItem(y,!0)}),y.addEventListener("keydown",function(x){switch(x.keyCode){case l.default.keys.ENTER:_.selectItem(y,!0),x.preventDefault();break;case l.default.keys.ESCAPE:_.escape(),x.preventDefault();break}}),y}},{key:"buildLabel",value:function(){var b=document.createElement("span");return b.classList.add("ql-picker-label"),b.innerHTML=c.default,b.tabIndex="0",b.setAttribute("role","button"),b.setAttribute("aria-expanded","false"),this.container.appendChild(b),b}},{key:"buildOptions",value:function(){var b=this,_=document.createElement("span");_.classList.add("ql-picker-options"),_.setAttribute("aria-hidden","true"),_.tabIndex="-1",_.id="ql-picker-options-"+d,d+=1,this.label.setAttribute("aria-controls",_.id),this.options=_,[].slice.call(this.select.options).forEach(function(y){var x=b.buildItem(y);_.appendChild(x),y.selected===!0&&b.selectItem(x)}),this.container.appendChild(_)}},{key:"buildPicker",value:function(){var b=this;[].slice.call(this.select.attributes).forEach(function(_){b.container.setAttribute(_.name,_.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var b=this;this.close(),setTimeout(function(){return b.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(b){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,y=this.container.querySelector(".ql-selected");if(b!==y&&(y!=null&&y.classList.remove("ql-selected"),b!=null&&(b.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(b.parentNode.children,b),b.hasAttribute("data-value")?this.label.setAttribute("data-value",b.getAttribute("data-value")):this.label.removeAttribute("data-value"),b.hasAttribute("data-label")?this.label.setAttribute("data-label",b.getAttribute("data-label")):this.label.removeAttribute("data-label"),_))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":s(Event))==="object"){var x=document.createEvent("Event");x.initEvent("change",!0,!0),this.select.dispatchEvent(x)}this.close()}}},{key:"update",value:function(){var b=void 0;if(this.select.selectedIndex>-1){var _=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];b=this.select.options[this.select.selectedIndex],this.selectItem(_)}else this.selectItem(null);var y=b!=null&&b!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",y)}}]),g}();n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(0),a=F(s),o=i(5),l=F(o),f=i(4),c=F(f),h=i(16),u=F(h),d=i(25),p=F(d),v=i(24),g=F(v),m=i(35),b=F(m),_=i(6),y=F(_),x=i(22),O=F(x),T=i(7),E=F(T),N=i(55),A=F(N),w=i(42),S=F(w),I=i(23),C=F(I);function F($){return $&&$.__esModule?$:{default:$}}l.default.register({"blots/block":c.default,"blots/block/embed":f.BlockEmbed,"blots/break":u.default,"blots/container":p.default,"blots/cursor":g.default,"blots/embed":b.default,"blots/inline":y.default,"blots/scroll":O.default,"blots/text":E.default,"modules/clipboard":A.default,"modules/history":S.default,"modules/keyboard":C.default}),a.default.register(c.default,u.default,g.default,y.default,O.default,E.default),n.default=l.default},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(1),a=function(){function o(l){this.domNode=l,this.domNode[s.DATA_KEY]={blot:this}}return Object.defineProperty(o.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),o.create=function(l){if(this.tagName==null)throw new s.ParchmentError("Blot definition missing tagName");var f;return Array.isArray(this.tagName)?(typeof l=="string"&&(l=l.toUpperCase(),parseInt(l).toString()===l&&(l=parseInt(l))),typeof l=="number"?f=document.createElement(this.tagName[l-1]):this.tagName.indexOf(l)>-1?f=document.createElement(l):f=document.createElement(this.tagName[0])):f=document.createElement(this.tagName),this.className&&f.classList.add(this.className),f},o.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},o.prototype.clone=function(){var l=this.domNode.cloneNode(!1);return s.create(l)},o.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[s.DATA_KEY]},o.prototype.deleteAt=function(l,f){var c=this.isolate(l,f);c.remove()},o.prototype.formatAt=function(l,f,c,h){var u=this.isolate(l,f);if(s.query(c,s.Scope.BLOT)!=null&&h)u.wrap(c,h);else if(s.query(c,s.Scope.ATTRIBUTE)!=null){var d=s.create(this.statics.scope);u.wrap(d),d.format(c,h)}},o.prototype.insertAt=function(l,f,c){var h=c==null?s.create("text",f):s.create(f,c),u=this.split(l);this.parent.insertBefore(h,u)},o.prototype.insertInto=function(l,f){f===void 0&&(f=null),this.parent!=null&&this.parent.children.remove(this);var c=null;l.children.insertBefore(this,f),f!=null&&(c=f.domNode),(this.domNode.parentNode!=l.domNode||this.domNode.nextSibling!=c)&&l.domNode.insertBefore(this.domNode,c),this.parent=l,this.attach()},o.prototype.isolate=function(l,f){var c=this.split(l);return c.split(f),c},o.prototype.length=function(){return 1},o.prototype.offset=function(l){return l===void 0&&(l=this.parent),this.parent==null||this==l?0:this.parent.children.offset(this)+this.parent.offset(l)},o.prototype.optimize=function(l){this.domNode[s.DATA_KEY]!=null&&delete this.domNode[s.DATA_KEY].mutations},o.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},o.prototype.replace=function(l){l.parent!=null&&(l.parent.insertBefore(this,l.next),l.remove())},o.prototype.replaceWith=function(l,f){var c=typeof l=="string"?s.create(l,f):l;return c.replace(this),c},o.prototype.split=function(l,f){return l===0?this:this.next},o.prototype.update=function(l,f){},o.prototype.wrap=function(l,f){var c=typeof l=="string"?s.create(l,f):l;return this.parent!=null&&this.parent.insertBefore(c,this.next),c.appendChild(this),c},o.blotName="abstract",o}();n.default=a},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(12),a=i(32),o=i(33),l=i(1),f=function(){function c(h){this.attributes={},this.domNode=h,this.build()}return c.prototype.attribute=function(h,u){u?h.add(this.domNode,u)&&(h.value(this.domNode)!=null?this.attributes[h.attrName]=h:delete this.attributes[h.attrName]):(h.remove(this.domNode),delete this.attributes[h.attrName])},c.prototype.build=function(){var h=this;this.attributes={};var u=s.default.keys(this.domNode),d=a.default.keys(this.domNode),p=o.default.keys(this.domNode);u.concat(d).concat(p).forEach(function(v){var g=l.query(v,l.Scope.ATTRIBUTE);g instanceof s.default&&(h.attributes[g.attrName]=g)})},c.prototype.copy=function(h){var u=this;Object.keys(this.attributes).forEach(function(d){var p=u.attributes[d].value(u.domNode);h.format(d,p)})},c.prototype.move=function(h){var u=this;this.copy(h),Object.keys(this.attributes).forEach(function(d){u.attributes[d].remove(u.domNode)}),this.attributes={}},c.prototype.values=function(){var h=this;return Object.keys(this.attributes).reduce(function(u,d){return u[d]=h.attributes[d].value(h.domNode),u},{})},c}();n.default=f},function(r,n,i){var s=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,h){c.__proto__=h}||function(c,h){for(var u in h)h.hasOwnProperty(u)&&(c[u]=h[u])};return function(c,h){f(c,h);function u(){this.constructor=c}c.prototype=h===null?Object.create(h):(u.prototype=h.prototype,new u)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(12);function o(f,c){var h=f.getAttribute("class")||"";return h.split(/\s+/).filter(function(u){return u.indexOf(c+"-")===0})}var l=function(f){s(c,f);function c(){return f!==null&&f.apply(this,arguments)||this}return c.keys=function(h){return(h.getAttribute("class")||"").split(/\s+/).map(function(u){return u.split("-").slice(0,-1).join("-")})},c.prototype.add=function(h,u){return this.canAdd(h,u)?(this.remove(h),h.classList.add(this.keyName+"-"+u),!0):!1},c.prototype.remove=function(h){var u=o(h,this.keyName);u.forEach(function(d){h.classList.remove(d)}),h.classList.length===0&&h.removeAttribute("class")},c.prototype.value=function(h){var u=o(h,this.keyName)[0]||"",d=u.slice(this.keyName.length+1);return this.canAdd(h,d)?d:""},c}(a.default);n.default=l},function(r,n,i){var s=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,h){c.__proto__=h}||function(c,h){for(var u in h)h.hasOwnProperty(u)&&(c[u]=h[u])};return function(c,h){f(c,h);function u(){this.constructor=c}c.prototype=h===null?Object.create(h):(u.prototype=h.prototype,new u)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(12);function o(f){var c=f.split("-"),h=c.slice(1).map(function(u){return u[0].toUpperCase()+u.slice(1)}).join("");return c[0]+h}var l=function(f){s(c,f);function c(){return f!==null&&f.apply(this,arguments)||this}return c.keys=function(h){return(h.getAttribute("style")||"").split(";").map(function(u){var d=u.split(":");return d[0].trim()})},c.prototype.add=function(h,u){return this.canAdd(h,u)?(h.style[o(this.keyName)]=u,!0):!1},c.prototype.remove=function(h){h.style[o(this.keyName)]="",h.getAttribute("style")||h.removeAttribute("style")},c.prototype.value=function(h){var u=h.style[o(this.keyName)];return this.canAdd(h,u)?u:""},c}(a.default);n.default=l},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function l(f,c){for(var h=0;h<c.length;h++){var u=c[h];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(f,u.key,u)}}return function(f,c,h){return c&&l(f.prototype,c),h&&l(f,h),f}}();function a(l,f){if(!(l instanceof f))throw new TypeError("Cannot call a class as a function")}var o=function(){function l(f,c){a(this,l),this.quill=f,this.options=c,this.modules={}}return s(l,[{key:"init",value:function(){var c=this;Object.keys(this.options.modules).forEach(function(h){c.modules[h]==null&&c.addModule(h)})}},{key:"addModule",value:function(c){var h=this.quill.constructor.import("modules/"+c);return this.modules[c]=new h(this.quill,this.options.modules[c]||{}),this.modules[c]}}]),l}();o.DEFAULTS={modules:{}},o.themes={default:o},n.default=o},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function m(b,_){for(var y=0;y<_.length;y++){var x=_[y];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(b,x.key,x)}}return function(b,_,y){return _&&m(b.prototype,_),y&&m(b,y),b}}(),a=function m(b,_,y){b===null&&(b=Function.prototype);var x=Object.getOwnPropertyDescriptor(b,_);if(x===void 0){var O=Object.getPrototypeOf(b);return O===null?void 0:m(O,_,y)}else{if("value"in x)return x.value;var T=x.get;return T===void 0?void 0:T.call(y)}},o=i(0),l=h(o),f=i(7),c=h(f);function h(m){return m&&m.__esModule?m:{default:m}}function u(m,b){if(!(m instanceof b))throw new TypeError("Cannot call a class as a function")}function d(m,b){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:m}function p(m,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);m.prototype=Object.create(b&&b.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(m,b):m.__proto__=b)}var v="\uFEFF",g=function(m){p(b,m);function b(_){u(this,b);var y=d(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,_));return y.contentNode=document.createElement("span"),y.contentNode.setAttribute("contenteditable",!1),[].slice.call(y.domNode.childNodes).forEach(function(x){y.contentNode.appendChild(x)}),y.leftGuard=document.createTextNode(v),y.rightGuard=document.createTextNode(v),y.domNode.appendChild(y.leftGuard),y.domNode.appendChild(y.contentNode),y.domNode.appendChild(y.rightGuard),y}return s(b,[{key:"index",value:function(y,x){return y===this.leftGuard?0:y===this.rightGuard?1:a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"index",this).call(this,y,x)}},{key:"restore",value:function(y){var x=void 0,O=void 0,T=y.data.split(v).join("");if(y===this.leftGuard)if(this.prev instanceof c.default){var E=this.prev.length();this.prev.insertAt(E,T),x={startNode:this.prev.domNode,startOffset:E+T.length}}else O=document.createTextNode(T),this.parent.insertBefore(l.default.create(O),this),x={startNode:O,startOffset:T.length};else y===this.rightGuard&&(this.next instanceof c.default?(this.next.insertAt(0,T),x={startNode:this.next.domNode,startOffset:T.length}):(O=document.createTextNode(T),this.parent.insertBefore(l.default.create(O),this.next),x={startNode:O,startOffset:T.length}));return y.data=v,x}},{key:"update",value:function(y,x){var O=this;y.forEach(function(T){if(T.type==="characterData"&&(T.target===O.leftGuard||T.target===O.rightGuard)){var E=O.restore(T.target);E&&(x.range=E)}})}}]),b}(l.default.Embed);n.default=g},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.AlignStyle=n.AlignClass=n.AlignAttribute=void 0;var s=i(0),a=o(s);function o(u){return u&&u.__esModule?u:{default:u}}var l={scope:a.default.Scope.BLOCK,whitelist:["right","center","justify"]},f=new a.default.Attributor.Attribute("align","align",l),c=new a.default.Attributor.Class("align","ql-align",l),h=new a.default.Attributor.Style("align","text-align",l);n.AlignAttribute=f,n.AlignClass=c,n.AlignStyle=h},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.BackgroundStyle=n.BackgroundClass=void 0;var s=i(0),a=l(s),o=i(26);function l(h){return h&&h.__esModule?h:{default:h}}var f=new a.default.Attributor.Class("background","ql-bg",{scope:a.default.Scope.INLINE}),c=new o.ColorAttributor("background","background-color",{scope:a.default.Scope.INLINE});n.BackgroundClass=f,n.BackgroundStyle=c},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.DirectionStyle=n.DirectionClass=n.DirectionAttribute=void 0;var s=i(0),a=o(s);function o(u){return u&&u.__esModule?u:{default:u}}var l={scope:a.default.Scope.BLOCK,whitelist:["rtl"]},f=new a.default.Attributor.Attribute("direction","dir",l),c=new a.default.Attributor.Class("direction","ql-direction",l),h=new a.default.Attributor.Style("direction","direction",l);n.DirectionAttribute=f,n.DirectionClass=c,n.DirectionStyle=h},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.FontClass=n.FontStyle=void 0;var s=function(){function m(b,_){for(var y=0;y<_.length;y++){var x=_[y];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(b,x.key,x)}}return function(b,_,y){return _&&m(b.prototype,_),y&&m(b,y),b}}(),a=function m(b,_,y){b===null&&(b=Function.prototype);var x=Object.getOwnPropertyDescriptor(b,_);if(x===void 0){var O=Object.getPrototypeOf(b);return O===null?void 0:m(O,_,y)}else{if("value"in x)return x.value;var T=x.get;return T===void 0?void 0:T.call(y)}},o=i(0),l=f(o);function f(m){return m&&m.__esModule?m:{default:m}}function c(m,b){if(!(m instanceof b))throw new TypeError("Cannot call a class as a function")}function h(m,b){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:m}function u(m,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);m.prototype=Object.create(b&&b.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(m,b):m.__proto__=b)}var d={scope:l.default.Scope.INLINE,whitelist:["serif","monospace"]},p=new l.default.Attributor.Class("font","ql-font",d),v=function(m){u(b,m);function b(){return c(this,b),h(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return s(b,[{key:"value",value:function(y){return a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"value",this).call(this,y).replace(/["']/g,"")}}]),b}(l.default.Attributor.Style),g=new v("font","font-family",d);n.FontStyle=g,n.FontClass=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.SizeStyle=n.SizeClass=void 0;var s=i(0),a=o(s);function o(c){return c&&c.__esModule?c:{default:c}}var l=new a.default.Attributor.Class("size","ql-size",{scope:a.default.Scope.INLINE,whitelist:["small","large","huge"]}),f=new a.default.Attributor.Style("size","font-size",{scope:a.default.Scope.INLINE,whitelist:["10px","18px","32px"]});n.SizeClass=l,n.SizeStyle=f},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 s=function(){function _(y,x){for(var O=0;O<x.length;O++){var T=x[O];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(y,T.key,T)}}return function(y,x,O){return x&&_(y.prototype,x),O&&_(y,O),y}}(),a=i(0),o=u(a),l=i(5),f=u(l),c=i(9),h=u(c);function u(_){return _&&_.__esModule?_:{default:_}}function d(_,y){if(!(_ instanceof y))throw new TypeError("Cannot call a class as a function")}function p(_,y){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:_}function v(_,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);_.prototype=Object.create(y&&y.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(_,y):_.__proto__=y)}var g=function(_){v(y,_);function y(x,O){d(this,y);var T=p(this,(y.__proto__||Object.getPrototypeOf(y)).call(this,x,O));return T.lastRecorded=0,T.ignoreChange=!1,T.clear(),T.quill.on(f.default.events.EDITOR_CHANGE,function(E,N,A,w){E!==f.default.events.TEXT_CHANGE||T.ignoreChange||(!T.options.userOnly||w===f.default.sources.USER?T.record(N,A):T.transform(N))}),T.quill.keyboard.addBinding({key:"Z",shortKey:!0},T.undo.bind(T)),T.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},T.redo.bind(T)),/Win/i.test(navigator.platform)&&T.quill.keyboard.addBinding({key:"Y",shortKey:!0},T.redo.bind(T)),T}return s(y,[{key:"change",value:function(O,T){if(this.stack[O].length!==0){var E=this.stack[O].pop();this.stack[T].push(E),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(E[O],f.default.sources.USER),this.ignoreChange=!1;var N=b(E[O]);this.quill.setSelection(N)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(O,T){if(O.ops.length!==0){this.stack.redo=[];var E=this.quill.getContents().diff(T),N=Date.now();if(this.lastRecorded+this.options.delay>N&&this.stack.undo.length>0){var A=this.stack.undo.pop();E=E.compose(A.undo),O=A.redo.compose(O)}else this.lastRecorded=N;this.stack.undo.push({redo:O,undo:E}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(O){this.stack.undo.forEach(function(T){T.undo=O.transform(T.undo,!0),T.redo=O.transform(T.redo,!0)}),this.stack.redo.forEach(function(T){T.undo=O.transform(T.undo,!0),T.redo=O.transform(T.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),y}(h.default);g.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function m(_){var y=_.ops[_.ops.length-1];return y==null?!1:y.insert!=null?typeof y.insert=="string"&&y.insert.endsWith(`
581
+ `):y.attributes!=null?Object.keys(y.attributes).some(function(x){return o.default.query(x,o.default.Scope.BLOCK)!=null}):!1}function b(_){var y=_.reduce(function(O,T){return O+=T.delete||0,O},0),x=_.length()-y;return m(_)&&(x-=1),x}n.default=g,n.getLastChangeIndex=b},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BaseTooltip=void 0;var s=function(){function k(L,j){for(var G=0;G<j.length;G++){var M=j[G];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(L,M.key,M)}}return function(L,j,G){return j&&k(L.prototype,j),G&&k(L,G),L}}(),a=function k(L,j,G){L===null&&(L=Function.prototype);var M=Object.getOwnPropertyDescriptor(L,j);if(M===void 0){var B=Object.getPrototypeOf(L);return B===null?void 0:k(B,j,G)}else{if("value"in M)return M.value;var q=M.get;return q===void 0?void 0:q.call(G)}},o=i(3),l=N(o),f=i(2),c=N(f),h=i(8),u=N(h),d=i(23),p=N(d),v=i(34),g=N(v),m=i(59),b=N(m),_=i(60),y=N(_),x=i(28),O=N(x),T=i(61),E=N(T);function N(k){return k&&k.__esModule?k:{default:k}}function A(k,L){if(!(k instanceof L))throw new TypeError("Cannot call a class as a function")}function w(k,L){if(!k)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L&&(typeof L=="object"||typeof L=="function")?L:k}function S(k,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof L);k.prototype=Object.create(L&&L.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}),L&&(Object.setPrototypeOf?Object.setPrototypeOf(k,L):k.__proto__=L)}var I=[!1,"center","right","justify"],C=["#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"],F=[!1,"serif","monospace"],$=["1","2","3",!1],U=["small",!1,"large","huge"],X=function(k){S(L,k);function L(j,G){A(this,L);var M=w(this,(L.__proto__||Object.getPrototypeOf(L)).call(this,j,G)),B=function q(H){if(!document.body.contains(j.root))return document.body.removeEventListener("click",q);M.tooltip!=null&&!M.tooltip.root.contains(H.target)&&document.activeElement!==M.tooltip.textbox&&!M.quill.hasFocus()&&M.tooltip.hide(),M.pickers!=null&&M.pickers.forEach(function(z){z.container.contains(H.target)||z.close()})};return j.emitter.listenDOM("click",document.body,B),M}return s(L,[{key:"addModule",value:function(G){var M=a(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"addModule",this).call(this,G);return G==="toolbar"&&this.extendToolbar(M),M}},{key:"buildButtons",value:function(G,M){G.forEach(function(B){var q=B.getAttribute("class")||"";q.split(/\s+/).forEach(function(H){if(H.startsWith("ql-")&&(H=H.slice(3),M[H]!=null))if(H==="direction")B.innerHTML=M[H][""]+M[H].rtl;else if(typeof M[H]=="string")B.innerHTML=M[H];else{var z=B.value||"";z!=null&&M[H][z]&&(B.innerHTML=M[H][z])}})})}},{key:"buildPickers",value:function(G,M){var B=this;this.pickers=G.map(function(H){if(H.classList.contains("ql-align"))return H.querySelector("option")==null&&R(H,I),new y.default(H,M.align);if(H.classList.contains("ql-background")||H.classList.contains("ql-color")){var z=H.classList.contains("ql-background")?"background":"color";return H.querySelector("option")==null&&R(H,C,z==="background"?"#ffffff":"#000000"),new b.default(H,M[z])}else return H.querySelector("option")==null&&(H.classList.contains("ql-font")?R(H,F):H.classList.contains("ql-header")?R(H,$):H.classList.contains("ql-size")&&R(H,U)),new O.default(H)});var q=function(){B.pickers.forEach(function(z){z.update()})};this.quill.on(u.default.events.EDITOR_CHANGE,q)}}]),L}(g.default);X.DEFAULTS=(0,l.default)(!0,{},g.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var L=this,j=this.container.querySelector("input.ql-image[type=file]");j==null&&(j=document.createElement("input"),j.setAttribute("type","file"),j.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),j.classList.add("ql-image"),j.addEventListener("change",function(){if(j.files!=null&&j.files[0]!=null){var G=new FileReader;G.onload=function(M){var B=L.quill.getSelection(!0);L.quill.updateContents(new c.default().retain(B.index).delete(B.length).insert({image:M.target.result}),u.default.sources.USER),L.quill.setSelection(B.index+1,u.default.sources.SILENT),j.value=""},G.readAsDataURL(j.files[0])}}),this.container.appendChild(j)),j.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var D=function(k){S(L,k);function L(j,G){A(this,L);var M=w(this,(L.__proto__||Object.getPrototypeOf(L)).call(this,j,G));return M.textbox=M.root.querySelector('input[type="text"]'),M.listen(),M}return s(L,[{key:"listen",value:function(){var G=this;this.textbox.addEventListener("keydown",function(M){p.default.match(M,"enter")?(G.save(),M.preventDefault()):p.default.match(M,"escape")&&(G.cancel(),M.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),M!=null?this.textbox.value=M:G!==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-"+G)||""),this.root.setAttribute("data-mode",G)}},{key:"restoreFocus",value:function(){var G=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=G}},{key:"save",value:function(){var G=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var M=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",G,u.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",G,u.default.sources.USER)),this.quill.root.scrollTop=M;break}case"video":G=P(G);case"formula":{if(!G)break;var B=this.quill.getSelection(!0);if(B!=null){var q=B.index+B.length;this.quill.insertEmbed(q,this.root.getAttribute("data-mode"),G,u.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(q+1," ",u.default.sources.USER),this.quill.setSelection(q+2,u.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),L}(E.default);function P(k){var L=k.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||k.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return L?(L[1]||"https")+"://www.youtube.com/embed/"+L[2]+"?showinfo=0":(L=k.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(L[1]||"https")+"://player.vimeo.com/video/"+L[2]+"/":k}function R(k,L){var j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;L.forEach(function(G){var M=document.createElement("option");G===j?M.setAttribute("selected","selected"):M.setAttribute("value",G),k.appendChild(M)})}n.BaseTooltip=D,n.default=X},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function a(){this.head=this.tail=null,this.length=0}return a.prototype.append=function(){for(var o=[],l=0;l<arguments.length;l++)o[l]=arguments[l];this.insertBefore(o[0],null),o.length>1&&this.append.apply(this,o.slice(1))},a.prototype.contains=function(o){for(var l,f=this.iterator();l=f();)if(l===o)return!0;return!1},a.prototype.insertBefore=function(o,l){o&&(o.next=l,l!=null?(o.prev=l.prev,l.prev!=null&&(l.prev.next=o),l.prev=o,l===this.head&&(this.head=o)):this.tail!=null?(this.tail.next=o,o.prev=this.tail,this.tail=o):(o.prev=null,this.head=this.tail=o),this.length+=1)},a.prototype.offset=function(o){for(var l=0,f=this.head;f!=null;){if(f===o)return l;l+=f.length(),f=f.next}return-1},a.prototype.remove=function(o){this.contains(o)&&(o.prev!=null&&(o.prev.next=o.next),o.next!=null&&(o.next.prev=o.prev),o===this.head&&(this.head=o.next),o===this.tail&&(this.tail=o.prev),this.length-=1)},a.prototype.iterator=function(o){return o===void 0&&(o=this.head),function(){var l=o;return o!=null&&(o=o.next),l}},a.prototype.find=function(o,l){l===void 0&&(l=!1);for(var f,c=this.iterator();f=c();){var h=f.length();if(o<h||l&&o===h&&(f.next==null||f.next.length()!==0))return[f,o];o-=h}return[null,0]},a.prototype.forEach=function(o){for(var l,f=this.iterator();l=f();)o(l)},a.prototype.forEachAt=function(o,l,f){if(!(l<=0))for(var c=this.find(o),h=c[0],u=c[1],d,p=o-u,v=this.iterator(h);(d=v())&&p<o+l;){var g=d.length();o>p?f(d,o-p,Math.min(l,p+g-o)):f(d,0,Math.min(g,o+l-p)),p+=g}},a.prototype.map=function(o){return this.reduce(function(l,f){return l.push(o(f)),l},[])},a.prototype.reduce=function(o,l){for(var f,c=this.iterator();f=c();)l=o(l,f);return l},a}();n.default=s},function(r,n,i){var s=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var p in d)d.hasOwnProperty(p)&&(u[p]=d[p])};return function(u,d){h(u,d);function p(){this.constructor=u}u.prototype=d===null?Object.create(d):(p.prototype=d.prototype,new p)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(17),o=i(1),l={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},f=100,c=function(h){s(u,h);function u(d){var p=h.call(this,d)||this;return p.scroll=p,p.observer=new MutationObserver(function(v){p.update(v)}),p.observer.observe(p.domNode,l),p.attach(),p}return u.prototype.detach=function(){h.prototype.detach.call(this),this.observer.disconnect()},u.prototype.deleteAt=function(d,p){this.update(),d===0&&p===this.length()?this.children.forEach(function(v){v.remove()}):h.prototype.deleteAt.call(this,d,p)},u.prototype.formatAt=function(d,p,v,g){this.update(),h.prototype.formatAt.call(this,d,p,v,g)},u.prototype.insertAt=function(d,p,v){this.update(),h.prototype.insertAt.call(this,d,p,v)},u.prototype.optimize=function(d,p){var v=this;d===void 0&&(d=[]),p===void 0&&(p={}),h.prototype.optimize.call(this,p);for(var g=[].slice.call(this.observer.takeRecords());g.length>0;)d.push(g.pop());for(var m=function(x,O){O===void 0&&(O=!0),!(x==null||x===v)&&x.domNode.parentNode!=null&&(x.domNode[o.DATA_KEY].mutations==null&&(x.domNode[o.DATA_KEY].mutations=[]),O&&m(x.parent))},b=function(x){x.domNode[o.DATA_KEY]==null||x.domNode[o.DATA_KEY].mutations==null||(x instanceof a.default&&x.children.forEach(b),x.optimize(p))},_=d,y=0;_.length>0;y+=1){if(y>=f)throw new Error("[Parchment] Maximum optimize iterations reached");for(_.forEach(function(x){var O=o.find(x.target,!0);O!=null&&(O.domNode===x.target&&(x.type==="childList"?(m(o.find(x.previousSibling,!1)),[].forEach.call(x.addedNodes,function(T){var E=o.find(T,!1);m(E,!1),E instanceof a.default&&E.children.forEach(function(N){m(N,!1)})})):x.type==="attributes"&&m(O.prev)),m(O))}),this.children.forEach(b),_=[].slice.call(this.observer.takeRecords()),g=_.slice();g.length>0;)d.push(g.pop())}},u.prototype.update=function(d,p){var v=this;p===void 0&&(p={}),d=d||this.observer.takeRecords(),d.map(function(g){var m=o.find(g.target,!0);return m==null?null:m.domNode[o.DATA_KEY].mutations==null?(m.domNode[o.DATA_KEY].mutations=[g],m):(m.domNode[o.DATA_KEY].mutations.push(g),null)}).forEach(function(g){g==null||g===v||g.domNode[o.DATA_KEY]==null||g.update(g.domNode[o.DATA_KEY].mutations||[],p)}),this.domNode[o.DATA_KEY].mutations!=null&&h.prototype.update.call(this,this.domNode[o.DATA_KEY].mutations,p),this.optimize(d,p)},u.blotName="scroll",u.defaultChild="block",u.scope=o.Scope.BLOCK_BLOT,u.tagName="DIV",u}(a.default);n.default=c},function(r,n,i){var s=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,u){h.__proto__=u}||function(h,u){for(var d in u)u.hasOwnProperty(d)&&(h[d]=u[d])};return function(h,u){c(h,u);function d(){this.constructor=h}h.prototype=u===null?Object.create(u):(d.prototype=u.prototype,new d)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(18),o=i(1);function l(c,h){if(Object.keys(c).length!==Object.keys(h).length)return!1;for(var u in c)if(c[u]!==h[u])return!1;return!0}var f=function(c){s(h,c);function h(){return c!==null&&c.apply(this,arguments)||this}return h.formats=function(u){if(u.tagName!==h.tagName)return c.formats.call(this,u)},h.prototype.format=function(u,d){var p=this;u===this.statics.blotName&&!d?(this.children.forEach(function(v){v instanceof a.default||(v=v.wrap(h.blotName,!0)),p.attributes.copy(v)}),this.unwrap()):c.prototype.format.call(this,u,d)},h.prototype.formatAt=function(u,d,p,v){if(this.formats()[p]!=null||o.query(p,o.Scope.ATTRIBUTE)){var g=this.isolate(u,d);g.format(p,v)}else c.prototype.formatAt.call(this,u,d,p,v)},h.prototype.optimize=function(u){c.prototype.optimize.call(this,u);var d=this.formats();if(Object.keys(d).length===0)return this.unwrap();var p=this.next;p instanceof h&&p.prev===this&&l(d,p.formats())&&(p.moveChildren(this),p.remove())},h.blotName="inline",h.scope=o.Scope.INLINE_BLOT,h.tagName="SPAN",h}(a.default);n.default=f},function(r,n,i){var s=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,h){c.__proto__=h}||function(c,h){for(var u in h)h.hasOwnProperty(u)&&(c[u]=h[u])};return function(c,h){f(c,h);function u(){this.constructor=c}c.prototype=h===null?Object.create(h):(u.prototype=h.prototype,new u)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(18),o=i(1),l=function(f){s(c,f);function c(){return f!==null&&f.apply(this,arguments)||this}return c.formats=function(h){var u=o.query(c.blotName).tagName;if(h.tagName!==u)return f.formats.call(this,h)},c.prototype.format=function(h,u){o.query(h,o.Scope.BLOCK)!=null&&(h===this.statics.blotName&&!u?this.replaceWith(c.blotName):f.prototype.format.call(this,h,u))},c.prototype.formatAt=function(h,u,d,p){o.query(d,o.Scope.BLOCK)!=null?this.format(d,p):f.prototype.formatAt.call(this,h,u,d,p)},c.prototype.insertAt=function(h,u,d){if(d==null||o.query(u,o.Scope.INLINE)!=null)f.prototype.insertAt.call(this,h,u,d);else{var p=this.split(h),v=o.create(u,d);p.parent.insertBefore(v,p)}},c.prototype.update=function(h,u){navigator.userAgent.match(/Trident/)?this.build():f.prototype.update.call(this,h,u)},c.blotName="block",c.scope=o.Scope.BLOCK_BLOT,c.tagName="P",c}(a.default);n.default=l},function(r,n,i){var s=this&&this.__extends||function(){var l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,c){f.__proto__=c}||function(f,c){for(var h in c)c.hasOwnProperty(h)&&(f[h]=c[h])};return function(f,c){l(f,c);function h(){this.constructor=f}f.prototype=c===null?Object.create(c):(h.prototype=c.prototype,new h)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(19),o=function(l){s(f,l);function f(){return l!==null&&l.apply(this,arguments)||this}return f.formats=function(c){},f.prototype.format=function(c,h){l.prototype.formatAt.call(this,0,this.length(),c,h)},f.prototype.formatAt=function(c,h,u,d){c===0&&h===this.length()?this.format(u,d):l.prototype.formatAt.call(this,c,h,u,d)},f.prototype.formats=function(){return this.statics.formats(this.domNode)},f}(a.default);n.default=o},function(r,n,i){var s=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,h){c.__proto__=h}||function(c,h){for(var u in h)h.hasOwnProperty(u)&&(c[u]=h[u])};return function(c,h){f(c,h);function u(){this.constructor=c}c.prototype=h===null?Object.create(h):(u.prototype=h.prototype,new u)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(19),o=i(1),l=function(f){s(c,f);function c(h){var u=f.call(this,h)||this;return u.text=u.statics.value(u.domNode),u}return c.create=function(h){return document.createTextNode(h)},c.value=function(h){var u=h.data;return u.normalize&&(u=u.normalize()),u},c.prototype.deleteAt=function(h,u){this.domNode.data=this.text=this.text.slice(0,h)+this.text.slice(h+u)},c.prototype.index=function(h,u){return this.domNode===h?u:-1},c.prototype.insertAt=function(h,u,d){d==null?(this.text=this.text.slice(0,h)+u+this.text.slice(h),this.domNode.data=this.text):f.prototype.insertAt.call(this,h,u,d)},c.prototype.length=function(){return this.text.length},c.prototype.optimize=function(h){f.prototype.optimize.call(this,h),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof c&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},c.prototype.position=function(h,u){return[this.domNode,h]},c.prototype.split=function(h,u){if(u===void 0&&(u=!1),!u){if(h===0)return this;if(h===this.length())return this.next}var d=o.create(this.domNode.splitText(h));return this.parent.insertBefore(d,this.next),this.text=this.statics.value(this.domNode),d},c.prototype.update=function(h,u){var d=this;h.some(function(p){return p.type==="characterData"&&p.target===d.domNode})&&(this.text=this.statics.value(this.domNode))},c.prototype.value=function(){return this.text},c.blotName="text",c.scope=o.Scope.INLINE_BLOT,c}(a.default);n.default=l},function(r,n,i){var s=document.createElement("div");if(s.classList.toggle("test-class",!1),s.classList.contains("test-class")){var a=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(o,l){return arguments.length>1&&!this.contains(o)==!l?l:a.call(this,o)}}String.prototype.startsWith||(String.prototype.startsWith=function(o,l){return l=l||0,this.substr(l,o.length)===o}),String.prototype.endsWith||(String.prototype.endsWith=function(o,l){var f=this.toString();(typeof l!="number"||!isFinite(l)||Math.floor(l)!==l||l>f.length)&&(l=f.length),l-=o.length;var c=f.indexOf(o,l);return c!==-1&&c===l}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(l){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof l!="function")throw new TypeError("predicate must be a function");for(var f=Object(this),c=f.length>>>0,h=arguments[1],u,d=0;d<c;d++)if(u=f[d],l.call(h,u,d,f))return u}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(r,n){var i=-1,s=1,a=0;function o(y,x,O){if(y==x)return y?[[a,y]]:[];(O<0||y.length<O)&&(O=null);var T=h(y,x),E=y.substring(0,T);y=y.substring(T),x=x.substring(T),T=u(y,x);var N=y.substring(y.length-T);y=y.substring(0,y.length-T),x=x.substring(0,x.length-T);var A=l(y,x);return E&&A.unshift([a,E]),N&&A.push([a,N]),p(A),O!=null&&(A=m(A,O)),A=b(A),A}function l(y,x){var O;if(!y)return[[s,x]];if(!x)return[[i,y]];var T=y.length>x.length?y:x,E=y.length>x.length?x:y,N=T.indexOf(E);if(N!=-1)return O=[[s,T.substring(0,N)],[a,E],[s,T.substring(N+E.length)]],y.length>x.length&&(O[0][0]=O[2][0]=i),O;if(E.length==1)return[[i,y],[s,x]];var A=d(y,x);if(A){var w=A[0],S=A[1],I=A[2],C=A[3],F=A[4],$=o(w,I),U=o(S,C);return $.concat([[a,F]],U)}return f(y,x)}function f(y,x){for(var O=y.length,T=x.length,E=Math.ceil((O+T)/2),N=E,A=2*E,w=new Array(A),S=new Array(A),I=0;I<A;I++)w[I]=-1,S[I]=-1;w[N+1]=0,S[N+1]=0;for(var C=O-T,F=C%2!=0,$=0,U=0,X=0,D=0,P=0;P<E;P++){for(var R=-P+$;R<=P-U;R+=2){var k=N+R,L;R==-P||R!=P&&w[k-1]<w[k+1]?L=w[k+1]:L=w[k-1]+1;for(var j=L-R;L<O&&j<T&&y.charAt(L)==x.charAt(j);)L++,j++;if(w[k]=L,L>O)U+=2;else if(j>T)$+=2;else if(F){var G=N+C-R;if(G>=0&&G<A&&S[G]!=-1){var M=O-S[G];if(L>=M)return c(y,x,L,j)}}}for(var B=-P+X;B<=P-D;B+=2){var G=N+B,M;B==-P||B!=P&&S[G-1]<S[G+1]?M=S[G+1]:M=S[G-1]+1;for(var q=M-B;M<O&&q<T&&y.charAt(O-M-1)==x.charAt(T-q-1);)M++,q++;if(S[G]=M,M>O)D+=2;else if(q>T)X+=2;else if(!F){var k=N+C-B;if(k>=0&&k<A&&w[k]!=-1){var L=w[k],j=N+L-k;if(M=O-M,L>=M)return c(y,x,L,j)}}}}return[[i,y],[s,x]]}function c(y,x,O,T){var E=y.substring(0,O),N=x.substring(0,T),A=y.substring(O),w=x.substring(T),S=o(E,N),I=o(A,w);return S.concat(I)}function h(y,x){if(!y||!x||y.charAt(0)!=x.charAt(0))return 0;for(var O=0,T=Math.min(y.length,x.length),E=T,N=0;O<E;)y.substring(N,E)==x.substring(N,E)?(O=E,N=O):T=E,E=Math.floor((T-O)/2+O);return E}function u(y,x){if(!y||!x||y.charAt(y.length-1)!=x.charAt(x.length-1))return 0;for(var O=0,T=Math.min(y.length,x.length),E=T,N=0;O<E;)y.substring(y.length-E,y.length-N)==x.substring(x.length-E,x.length-N)?(O=E,N=O):T=E,E=Math.floor((T-O)/2+O);return E}function d(y,x){var O=y.length>x.length?y:x,T=y.length>x.length?x:y;if(O.length<4||T.length*2<O.length)return null;function E(U,X,D){for(var P=U.substring(D,D+Math.floor(U.length/4)),R=-1,k="",L,j,G,M;(R=X.indexOf(P,R+1))!=-1;){var B=h(U.substring(D),X.substring(R)),q=u(U.substring(0,D),X.substring(0,R));k.length<q+B&&(k=X.substring(R-q,R)+X.substring(R,R+B),L=U.substring(0,D-q),j=U.substring(D+B),G=X.substring(0,R-q),M=X.substring(R+B))}return k.length*2>=U.length?[L,j,G,M,k]:null}var N=E(O,T,Math.ceil(O.length/4)),A=E(O,T,Math.ceil(O.length/2)),w;if(!N&&!A)return null;A?N?w=N[4].length>A[4].length?N:A:w=A:w=N;var S,I,C,F;y.length>x.length?(S=w[0],I=w[1],C=w[2],F=w[3]):(C=w[0],F=w[1],S=w[2],I=w[3]);var $=w[4];return[S,I,C,F,$]}function p(y){y.push([a,""]);for(var x=0,O=0,T=0,E="",N="",A;x<y.length;)switch(y[x][0]){case s:T++,N+=y[x][1],x++;break;case i:O++,E+=y[x][1],x++;break;case a:O+T>1?(O!==0&&T!==0&&(A=h(N,E),A!==0&&(x-O-T>0&&y[x-O-T-1][0]==a?y[x-O-T-1][1]+=N.substring(0,A):(y.splice(0,0,[a,N.substring(0,A)]),x++),N=N.substring(A),E=E.substring(A)),A=u(N,E),A!==0&&(y[x][1]=N.substring(N.length-A)+y[x][1],N=N.substring(0,N.length-A),E=E.substring(0,E.length-A))),O===0?y.splice(x-T,O+T,[s,N]):T===0?y.splice(x-O,O+T,[i,E]):y.splice(x-O-T,O+T,[i,E],[s,N]),x=x-O-T+(O?1:0)+(T?1:0)+1):x!==0&&y[x-1][0]==a?(y[x-1][1]+=y[x][1],y.splice(x,1)):x++,T=0,O=0,E="",N="";break}y[y.length-1][1]===""&&y.pop();var w=!1;for(x=1;x<y.length-1;)y[x-1][0]==a&&y[x+1][0]==a&&(y[x][1].substring(y[x][1].length-y[x-1][1].length)==y[x-1][1]?(y[x][1]=y[x-1][1]+y[x][1].substring(0,y[x][1].length-y[x-1][1].length),y[x+1][1]=y[x-1][1]+y[x+1][1],y.splice(x-1,1),w=!0):y[x][1].substring(0,y[x+1][1].length)==y[x+1][1]&&(y[x-1][1]+=y[x+1][1],y[x][1]=y[x][1].substring(y[x+1][1].length)+y[x+1][1],y.splice(x+1,1),w=!0)),x++;w&&p(y)}var v=o;v.INSERT=s,v.DELETE=i,v.EQUAL=a,r.exports=v;function g(y,x){if(x===0)return[a,y];for(var O=0,T=0;T<y.length;T++){var E=y[T];if(E[0]===i||E[0]===a){var N=O+E[1].length;if(x===N)return[T+1,y];if(x<N){y=y.slice();var A=x-O,w=[E[0],E[1].slice(0,A)],S=[E[0],E[1].slice(A)];return y.splice(T,1,w,S),[T+1,y]}else O=N}}throw new Error("cursor_pos is out of bounds!")}function m(y,x){var O=g(y,x),T=O[1],E=O[0],N=T[E],A=T[E+1];if(N==null)return y;if(N[0]!==a)return y;if(A!=null&&N[1]+A[1]===A[1]+N[1])return T.splice(E,2,A,N),_(T,E,2);if(A!=null&&A[1].indexOf(N[1])===0){T.splice(E,2,[A[0],N[1]],[0,N[1]]);var w=A[1].slice(N[1].length);return w.length>0&&T.splice(E+2,0,[A[0],w]),_(T,E,3)}else return y}function b(y){for(var x=!1,O=function(A){return A.charCodeAt(0)>=56320&&A.charCodeAt(0)<=57343},T=function(A){return A.charCodeAt(A.length-1)>=55296&&A.charCodeAt(A.length-1)<=56319},E=2;E<y.length;E+=1)y[E-2][0]===a&&T(y[E-2][1])&&y[E-1][0]===i&&O(y[E-1][1])&&y[E][0]===s&&O(y[E][1])&&(x=!0,y[E-1][1]=y[E-2][1].slice(-1)+y[E-1][1],y[E][1]=y[E-2][1].slice(-1)+y[E][1],y[E-2][1]=y[E-2][1].slice(0,-1));if(!x)return y;for(var N=[],E=0;E<y.length;E+=1)y[E][1].length>0&&N.push(y[E]);return N}function _(y,x,O){for(var T=x+O-1;T>=0&&T>=x-1;T--)if(T+1<y.length){var E=y[T],N=y[T+1];E[0]===N[1]&&y.splice(T,2,[E[0],E[1]+N[1]])}return y}},function(r,n){n=r.exports=typeof Object.keys=="function"?Object.keys:i,n.shim=i;function i(s){var a=[];for(var o in s)a.push(o);return a}},function(r,n){var i=function(){return Object.prototype.toString.call(arguments)}()=="[object Arguments]";n=r.exports=i?s:a,n.supported=s;function s(o){return Object.prototype.toString.call(o)=="[object Arguments]"}n.unsupported=a;function a(o){return o&&typeof o=="object"&&typeof o.length=="number"&&Object.prototype.hasOwnProperty.call(o,"callee")&&!Object.prototype.propertyIsEnumerable.call(o,"callee")||!1}},function(r,n){var i=Object.prototype.hasOwnProperty,s="~";function a(){}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(s=!1));function o(f,c,h){this.fn=f,this.context=c,this.once=h||!1}function l(){this._events=new a,this._eventsCount=0}l.prototype.eventNames=function(){var c=[],h,u;if(this._eventsCount===0)return c;for(u in h=this._events)i.call(h,u)&&c.push(s?u.slice(1):u);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(h)):c},l.prototype.listeners=function(c,h){var u=s?s+c:c,d=this._events[u];if(h)return!!d;if(!d)return[];if(d.fn)return[d.fn];for(var p=0,v=d.length,g=new Array(v);p<v;p++)g[p]=d[p].fn;return g},l.prototype.emit=function(c,h,u,d,p,v){var g=s?s+c:c;if(!this._events[g])return!1;var m=this._events[g],b=arguments.length,_,y;if(m.fn){switch(m.once&&this.removeListener(c,m.fn,void 0,!0),b){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,h),!0;case 3:return m.fn.call(m.context,h,u),!0;case 4:return m.fn.call(m.context,h,u,d),!0;case 5:return m.fn.call(m.context,h,u,d,p),!0;case 6:return m.fn.call(m.context,h,u,d,p,v),!0}for(y=1,_=new Array(b-1);y<b;y++)_[y-1]=arguments[y];m.fn.apply(m.context,_)}else{var x=m.length,O;for(y=0;y<x;y++)switch(m[y].once&&this.removeListener(c,m[y].fn,void 0,!0),b){case 1:m[y].fn.call(m[y].context);break;case 2:m[y].fn.call(m[y].context,h);break;case 3:m[y].fn.call(m[y].context,h,u);break;case 4:m[y].fn.call(m[y].context,h,u,d);break;default:if(!_)for(O=1,_=new Array(b-1);O<b;O++)_[O-1]=arguments[O];m[y].fn.apply(m[y].context,_)}}return!0},l.prototype.on=function(c,h,u){var d=new o(h,u||this),p=s?s+c:c;return this._events[p]?this._events[p].fn?this._events[p]=[this._events[p],d]:this._events[p].push(d):(this._events[p]=d,this._eventsCount++),this},l.prototype.once=function(c,h,u){var d=new o(h,u||this,!0),p=s?s+c:c;return this._events[p]?this._events[p].fn?this._events[p]=[this._events[p],d]:this._events[p].push(d):(this._events[p]=d,this._eventsCount++),this},l.prototype.removeListener=function(c,h,u,d){var p=s?s+c:c;if(!this._events[p])return this;if(!h)return--this._eventsCount===0?this._events=new a:delete this._events[p],this;var v=this._events[p];if(v.fn)v.fn===h&&(!d||v.once)&&(!u||v.context===u)&&(--this._eventsCount===0?this._events=new a:delete this._events[p]);else{for(var g=0,m=[],b=v.length;g<b;g++)(v[g].fn!==h||d&&!v[g].once||u&&v[g].context!==u)&&m.push(v[g]);m.length?this._events[p]=m.length===1?m[0]:m:--this._eventsCount===0?this._events=new a:delete this._events[p]}return this},l.prototype.removeAllListeners=function(c){var h;return c?(h=s?s+c:c,this._events[h]&&(--this._eventsCount===0?this._events=new a:delete this._events[h])):(this._events=new a,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prototype.setMaxListeners=function(){return this},l.prefixed=s,l.EventEmitter=l,typeof r<"u"&&(r.exports=l)},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 s=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(W,Z){var tt=[],K=!0,ft=!1,ct=void 0;try{for(var ht=W[Symbol.iterator](),nt;!(K=(nt=ht.next()).done)&&(tt.push(nt.value),!(Z&&tt.length===Z));K=!0);}catch(At){ft=!0,ct=At}finally{try{!K&&ht.return&&ht.return()}finally{if(ft)throw ct}}return tt}return function(W,Z){if(Array.isArray(W))return W;if(Symbol.iterator in Object(W))return V(W,Z);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function V(W,Z){for(var tt=0;tt<Z.length;tt++){var K=Z[tt];K.enumerable=K.enumerable||!1,K.configurable=!0,"value"in K&&(K.writable=!0),Object.defineProperty(W,K.key,K)}}return function(W,Z,tt){return Z&&V(W.prototype,Z),tt&&V(W,tt),W}}(),l=i(3),f=S(l),c=i(2),h=S(c),u=i(0),d=S(u),p=i(5),v=S(p),g=i(10),m=S(g),b=i(9),_=S(b),y=i(36),x=i(37),O=i(13),T=S(O),E=i(26),N=i(38),A=i(39),w=i(40);function S(V){return V&&V.__esModule?V:{default:V}}function I(V,W,Z){return W in V?Object.defineProperty(V,W,{value:Z,enumerable:!0,configurable:!0,writable:!0}):V[W]=Z,V}function C(V,W){if(!(V instanceof W))throw new TypeError("Cannot call a class as a function")}function F(V,W){if(!V)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return W&&(typeof W=="object"||typeof W=="function")?W:V}function $(V,W){if(typeof W!="function"&&W!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof W);V.prototype=Object.create(W&&W.prototype,{constructor:{value:V,enumerable:!1,writable:!0,configurable:!0}}),W&&(Object.setPrototypeOf?Object.setPrototypeOf(V,W):V.__proto__=W)}var U=(0,m.default)("quill:clipboard"),X="__ql-matcher",D=[[Node.TEXT_NODE,Rt],[Node.TEXT_NODE,at],["br",Y],[Node.ELEMENT_NODE,at],[Node.ELEMENT_NODE,z],[Node.ELEMENT_NODE,lt],[Node.ELEMENT_NODE,H],[Node.ELEMENT_NODE,Ct],["li",et],["b",q.bind(q,"bold")],["i",q.bind(q,"italic")],["style",J]],P=[y.AlignAttribute,N.DirectionAttribute].reduce(function(V,W){return V[W.keyName]=W,V},{}),R=[y.AlignStyle,x.BackgroundStyle,E.ColorStyle,N.DirectionStyle,A.FontStyle,w.SizeStyle].reduce(function(V,W){return V[W.keyName]=W,V},{}),k=function(V){$(W,V);function W(Z,tt){C(this,W);var K=F(this,(W.__proto__||Object.getPrototypeOf(W)).call(this,Z,tt));return K.quill.root.addEventListener("paste",K.onPaste.bind(K)),K.container=K.quill.addContainer("ql-clipboard"),K.container.setAttribute("contenteditable",!0),K.container.setAttribute("tabindex",-1),K.matchers=[],D.concat(K.options.matchers).forEach(function(ft){var ct=a(ft,2),ht=ct[0],nt=ct[1];!tt.matchVisual&&nt===lt||K.addMatcher(ht,nt)}),K}return o(W,[{key:"addMatcher",value:function(tt,K){this.matchers.push([tt,K])}},{key:"convert",value:function(tt){if(typeof tt=="string")return this.container.innerHTML=tt.replace(/\>\r?\n +\</g,"><"),this.convert();var K=this.quill.getFormat(this.quill.selection.savedRange.index);if(K[T.default.blotName]){var ft=this.container.innerText;return this.container.innerHTML="",new h.default().insert(ft,I({},T.default.blotName,K[T.default.blotName]))}var ct=this.prepareMatching(),ht=a(ct,2),nt=ht[0],At=ht[1],Et=B(this.container,nt,At);return G(Et,`
582
+ `)&&Et.ops[Et.ops.length-1].attributes==null&&(Et=Et.compose(new h.default().retain(Et.length()-1).delete(1))),U.log("convert",this.container.innerHTML,Et),this.container.innerHTML="",Et}},{key:"dangerouslyPasteHTML",value:function(tt,K){var ft=arguments.length>2&&arguments[2]!==void 0?arguments[2]:v.default.sources.API;if(typeof tt=="string")this.quill.setContents(this.convert(tt),K),this.quill.setSelection(0,v.default.sources.SILENT);else{var ct=this.convert(K);this.quill.updateContents(new h.default().retain(tt).concat(ct),ft),this.quill.setSelection(tt+ct.length(),v.default.sources.SILENT)}}},{key:"onPaste",value:function(tt){var K=this;if(!(tt.defaultPrevented||!this.quill.isEnabled())){var ft=this.quill.getSelection(),ct=new h.default().retain(ft.index),ht=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(v.default.sources.SILENT),setTimeout(function(){ct=ct.concat(K.convert()).delete(ft.length),K.quill.updateContents(ct,v.default.sources.USER),K.quill.setSelection(ct.length()-ft.length,v.default.sources.SILENT),K.quill.scrollingContainer.scrollTop=ht,K.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var tt=this,K=[],ft=[];return this.matchers.forEach(function(ct){var ht=a(ct,2),nt=ht[0],At=ht[1];switch(nt){case Node.TEXT_NODE:ft.push(At);break;case Node.ELEMENT_NODE:K.push(At);break;default:[].forEach.call(tt.container.querySelectorAll(nt),function(Et){Et[X]=Et[X]||[],Et[X].push(At)});break}}),[K,ft]}}]),W}(_.default);k.DEFAULTS={matchers:[],matchVisual:!0};function L(V,W,Z){return(typeof W>"u"?"undefined":s(W))==="object"?Object.keys(W).reduce(function(tt,K){return L(tt,K,W[K])},V):V.reduce(function(tt,K){return K.attributes&&K.attributes[W]?tt.push(K):tt.insert(K.insert,(0,f.default)({},I({},W,Z),K.attributes))},new h.default)}function j(V){if(V.nodeType!==Node.ELEMENT_NODE)return{};var W="__ql-computed-style";return V[W]||(V[W]=window.getComputedStyle(V))}function G(V,W){for(var Z="",tt=V.ops.length-1;tt>=0&&Z.length<W.length;--tt){var K=V.ops[tt];if(typeof K.insert!="string")break;Z=K.insert+Z}return Z.slice(-1*W.length)===W}function M(V){if(V.childNodes.length===0)return!1;var W=j(V);return["block","list-item"].indexOf(W.display)>-1}function B(V,W,Z){return V.nodeType===V.TEXT_NODE?Z.reduce(function(tt,K){return K(V,tt)},new h.default):V.nodeType===V.ELEMENT_NODE?[].reduce.call(V.childNodes||[],function(tt,K){var ft=B(K,W,Z);return K.nodeType===V.ELEMENT_NODE&&(ft=W.reduce(function(ct,ht){return ht(K,ct)},ft),ft=(K[X]||[]).reduce(function(ct,ht){return ht(K,ct)},ft)),tt.concat(ft)},new h.default):new h.default}function q(V,W,Z){return L(Z,V,!0)}function H(V,W){var Z=d.default.Attributor.Attribute.keys(V),tt=d.default.Attributor.Class.keys(V),K=d.default.Attributor.Style.keys(V),ft={};return Z.concat(tt).concat(K).forEach(function(ct){var ht=d.default.query(ct,d.default.Scope.ATTRIBUTE);ht!=null&&(ft[ht.attrName]=ht.value(V),ft[ht.attrName])||(ht=P[ct],ht!=null&&(ht.attrName===ct||ht.keyName===ct)&&(ft[ht.attrName]=ht.value(V)||void 0),ht=R[ct],ht!=null&&(ht.attrName===ct||ht.keyName===ct)&&(ht=R[ct],ft[ht.attrName]=ht.value(V)||void 0))}),Object.keys(ft).length>0&&(W=L(W,ft)),W}function z(V,W){var Z=d.default.query(V);if(Z==null)return W;if(Z.prototype instanceof d.default.Embed){var tt={},K=Z.value(V);K!=null&&(tt[Z.blotName]=K,W=new h.default().insert(tt,Z.formats(V)))}else typeof Z.formats=="function"&&(W=L(W,Z.blotName,Z.formats(V)));return W}function Y(V,W){return G(W,`
583
583
  `)||W.insert(`
584
584
  `),W}function J(){return new h.default}function et(V,W){var Z=d.default.query(V);if(Z==null||Z.blotName!=="list-item"||!G(W,`
585
585
  `))return W;for(var tt=-1,K=V.parentNode;!K.classList.contains("ql-clipboard");)(d.default.query(K)||{}).blotName==="list"&&(tt+=1),K=K.parentNode;return tt<=0?W:W.compose(new h.default().retain(W.length()-1).retain(1,{indent:tt}))}function at(V,W){return G(W,`
@@ -587,4 +587,4 @@ void main(void)
587
587
  `),W}function lt(V,W){if(M(V)&&V.nextElementSibling!=null&&!G(W,`
588
588
 
589
589
  `)){var Z=V.offsetHeight+parseFloat(j(V).marginTop)+parseFloat(j(V).marginBottom);V.nextElementSibling.offsetTop>V.offsetTop+Z*1.5&&W.insert(`
590
- `)}return W}function Ct(V,W){var Z={},tt=V.style||{};return tt.fontStyle&&j(V).fontStyle==="italic"&&(Z.italic=!0),tt.fontWeight&&(j(V).fontWeight.startsWith("bold")||parseInt(j(V).fontWeight)>=700)&&(Z.bold=!0),Object.keys(Z).length>0&&(W=L(W,Z)),parseFloat(tt.textIndent||0)>0&&(W=new h.default().insert(" ").concat(W)),W}function Rt(V,W){var Z=V.data;if(V.parentNode.tagName==="O:P")return W.insert(Z.trim());if(Z.trim().length===0&&V.parentNode.classList.contains("ql-clipboard"))return W;if(!j(V.parentNode).whiteSpace.startsWith("pre")){var tt=function(ft,ct){return ct=ct.replace(/[^\u00a0]/g,""),ct.length<1&&ft?" ":ct};Z=Z.replace(/\r\n/g," ").replace(/\n/g," "),Z=Z.replace(/\s\s+/g,tt.bind(tt,!0)),(V.previousSibling==null&&M(V.parentNode)||V.previousSibling!=null&&M(V.previousSibling))&&(Z=Z.replace(/^\s+/,tt.bind(tt,!1))),(V.nextSibling==null&&M(V.parentNode)||V.nextSibling!=null&&M(V.nextSibling))&&(Z=Z.replace(/\s+$/,tt.bind(tt,!1)))}return W.insert(Z)}n.default=P,n.matchAttributor=H,n.matchBlot=z,n.matchNewline=at,n.matchSpacing=lt,n.matchText=Rt},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function p(v,g){for(var m=0;m<g.length;m++){var b=g[m];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(v,b.key,b)}}return function(v,g,m){return g&&p(v.prototype,g),m&&p(v,m),v}}(),a=function p(v,g,m){v===null&&(v=Function.prototype);var b=Object.getOwnPropertyDescriptor(v,g);if(b===void 0){var _=Object.getPrototypeOf(v);return _===null?void 0:p(_,g,m)}else{if("value"in b)return b.value;var y=b.get;return y===void 0?void 0:y.call(m)}},o=i(6),l=f(o);function f(p){return p&&p.__esModule?p:{default:p}}function c(p,v){if(!(p instanceof v))throw new TypeError("Cannot call a class as a function")}function h(p,v){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:p}function u(p,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);p.prototype=Object.create(v&&v.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(p,v):p.__proto__=v)}var d=function(p){u(v,p);function v(){return c(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return s(v,[{key:"optimize",value:function(m){a(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"optimize",this).call(this,m),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return a(v.__proto__||Object.getPrototypeOf(v),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),v}(l.default);d.blotName="bold",d.tagName=["STRONG","B"],n.default=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.addControls=n.default=void 0;var s=function(){function w(S,I){var C=[],F=!0,D=!1,U=void 0;try{for(var X=S[Symbol.iterator](),$;!(F=($=X.next()).done)&&(C.push($.value),!(I&&C.length===I));F=!0);}catch(k){D=!0,U=k}finally{try{!F&&X.return&&X.return()}finally{if(D)throw U}}return C}return function(S,I){if(Array.isArray(S))return S;if(Symbol.iterator in Object(S))return w(S,I);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function w(S,I){for(var C=0;C<I.length;C++){var F=I[C];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(S,F.key,F)}}return function(S,I,C){return I&&w(S.prototype,I),C&&w(S,C),S}}(),o=i(2),l=m(o),f=i(0),c=m(f),h=i(5),u=m(h),d=i(10),p=m(d),v=i(9),g=m(v);function m(w){return w&&w.__esModule?w:{default:w}}function b(w,S,I){return S in w?Object.defineProperty(w,S,{value:I,enumerable:!0,configurable:!0,writable:!0}):w[S]=I,w}function _(w,S){if(!(w instanceof S))throw new TypeError("Cannot call a class as a function")}function y(w,S){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:w}function x(w,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);w.prototype=Object.create(S&&S.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(w,S):w.__proto__=S)}var O=(0,p.default)("quill:toolbar"),T=function(w){x(S,w);function S(I,C){_(this,S);var F=y(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,I,C));if(Array.isArray(F.options.container)){var D=document.createElement("div");N(D,F.options.container),I.container.parentNode.insertBefore(D,I.container),F.container=D}else typeof F.options.container=="string"?F.container=document.querySelector(F.options.container):F.container=F.options.container;if(!(F.container instanceof HTMLElement)){var U;return U=O.error("Container required for toolbar",F.options),y(F,U)}return F.container.classList.add("ql-toolbar"),F.controls=[],F.handlers={},Object.keys(F.options.handlers).forEach(function(X){F.addHandler(X,F.options.handlers[X])}),[].forEach.call(F.container.querySelectorAll("button, select"),function(X){F.attach(X)}),F.quill.on(u.default.events.EDITOR_CHANGE,function(X,$){X===u.default.events.SELECTION_CHANGE&&F.update($)}),F.quill.on(u.default.events.SCROLL_OPTIMIZE,function(){var X=F.quill.selection.getRange(),$=s(X,1),k=$[0];F.update(k)}),F}return a(S,[{key:"addHandler",value:function(C,F){this.handlers[C]=F}},{key:"attach",value:function(C){var F=this,D=[].find.call(C.classList,function(X){return X.indexOf("ql-")===0});if(D){if(D=D.slice(3),C.tagName==="BUTTON"&&C.setAttribute("type","button"),this.handlers[D]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[D]==null){O.warn("ignoring attaching to disabled format",D,C);return}if(c.default.query(D)==null){O.warn("ignoring attaching to nonexistent format",D,C);return}}var U=C.tagName==="SELECT"?"change":"click";C.addEventListener(U,function(X){var $=void 0;if(C.tagName==="SELECT"){if(C.selectedIndex<0)return;var k=C.options[C.selectedIndex];k.hasAttribute("selected")?$=!1:$=k.value||!1}else C.classList.contains("ql-active")?$=!1:$=C.value||!C.hasAttribute("value"),X.preventDefault();F.quill.focus();var R=F.quill.selection.getRange(),P=s(R,1),L=P[0];if(F.handlers[D]!=null)F.handlers[D].call(F,$);else if(c.default.query(D).prototype instanceof c.default.Embed){if($=prompt("Enter "+D),!$)return;F.quill.updateContents(new l.default().retain(L.index).delete(L.length).insert(b({},D,$)),u.default.sources.USER)}else F.quill.format(D,$,u.default.sources.USER);F.update(L)}),this.controls.push([D,C])}}},{key:"update",value:function(C){var F=C==null?{}:this.quill.getFormat(C);this.controls.forEach(function(D){var U=s(D,2),X=U[0],$=U[1];if($.tagName==="SELECT"){var k=void 0;if(C==null)k=null;else if(F[X]==null)k=$.querySelector("option[selected]");else if(!Array.isArray(F[X])){var R=F[X];typeof R=="string"&&(R=R.replace(/\"/g,'\\"')),k=$.querySelector('option[value="'+R+'"]')}k==null?($.value="",$.selectedIndex=-1):k.selected=!0}else if(C==null)$.classList.remove("ql-active");else if($.hasAttribute("value")){var P=F[X]===$.getAttribute("value")||F[X]!=null&&F[X].toString()===$.getAttribute("value")||F[X]==null&&!$.getAttribute("value");$.classList.toggle("ql-active",P)}else $.classList.toggle("ql-active",F[X]!=null)})}}]),S}(g.default);T.DEFAULTS={};function E(w,S,I){var C=document.createElement("button");C.setAttribute("type","button"),C.classList.add("ql-"+S),I!=null&&(C.value=I),w.appendChild(C)}function N(w,S){Array.isArray(S[0])||(S=[S]),S.forEach(function(I){var C=document.createElement("span");C.classList.add("ql-formats"),I.forEach(function(F){if(typeof F=="string")E(C,F);else{var D=Object.keys(F)[0],U=F[D];Array.isArray(U)?A(C,D,U):E(C,D,U)}}),w.appendChild(C)})}function A(w,S,I){var C=document.createElement("select");C.classList.add("ql-"+S),I.forEach(function(F){var D=document.createElement("option");F!==!1?D.setAttribute("value",F):D.setAttribute("selected","selected"),C.appendChild(D)}),w.appendChild(C)}T.DEFAULTS={container:null,handlers:{clean:function(){var S=this,I=this.quill.getSelection();if(I!=null)if(I.length==0){var C=this.quill.getFormat();Object.keys(C).forEach(function(F){c.default.query(F,c.default.Scope.INLINE)!=null&&S.quill.format(F,!1)})}else this.quill.removeFormat(I,u.default.sources.USER)},direction:function(S){var I=this.quill.getFormat().align;S==="rtl"&&I==null?this.quill.format("align","right",u.default.sources.USER):!S&&I==="right"&&this.quill.format("align",!1,u.default.sources.USER),this.quill.format("direction",S,u.default.sources.USER)},indent:function(S){var I=this.quill.getSelection(),C=this.quill.getFormat(I),F=parseInt(C.indent||0);if(S==="+1"||S==="-1"){var D=S==="+1"?1:-1;C.direction==="rtl"&&(D*=-1),this.quill.format("indent",F+D,u.default.sources.USER)}},link:function(S){S===!0&&(S=prompt("Enter link URL:")),this.quill.format("link",S,u.default.sources.USER)},list:function(S){var I=this.quill.getSelection(),C=this.quill.getFormat(I);S==="check"?C.list==="checked"||C.list==="unchecked"?this.quill.format("list",!1,u.default.sources.USER):this.quill.format("list","unchecked",u.default.sources.USER):this.quill.format("list",S,u.default.sources.USER)}}},n.default=T,n.addControls=N},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 s=function(){function p(v,g){for(var m=0;m<g.length;m++){var b=g[m];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(v,b.key,b)}}return function(v,g,m){return g&&p(v.prototype,g),m&&p(v,m),v}}(),a=function p(v,g,m){v===null&&(v=Function.prototype);var b=Object.getOwnPropertyDescriptor(v,g);if(b===void 0){var _=Object.getPrototypeOf(v);return _===null?void 0:p(_,g,m)}else{if("value"in b)return b.value;var y=b.get;return y===void 0?void 0:y.call(m)}},o=i(28),l=f(o);function f(p){return p&&p.__esModule?p:{default:p}}function c(p,v){if(!(p instanceof v))throw new TypeError("Cannot call a class as a function")}function h(p,v){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:p}function u(p,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);p.prototype=Object.create(v&&v.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(p,v):p.__proto__=v)}var d=function(p){u(v,p);function v(g,m){c(this,v);var b=h(this,(v.__proto__||Object.getPrototypeOf(v)).call(this,g));return b.label.innerHTML=m,b.container.classList.add("ql-color-picker"),[].slice.call(b.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(_){_.classList.add("ql-primary")}),b}return s(v,[{key:"buildItem",value:function(m){var b=a(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"buildItem",this).call(this,m);return b.style.backgroundColor=m.getAttribute("value")||"",b}},{key:"selectItem",value:function(m,b){a(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"selectItem",this).call(this,m,b);var _=this.label.querySelector(".ql-color-label"),y=m&&m.getAttribute("data-value")||"";_&&(_.tagName==="line"?_.style.stroke=y:_.style.fill=y)}}]),v}(l.default);n.default=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function p(v,g){for(var m=0;m<g.length;m++){var b=g[m];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(v,b.key,b)}}return function(v,g,m){return g&&p(v.prototype,g),m&&p(v,m),v}}(),a=function p(v,g,m){v===null&&(v=Function.prototype);var b=Object.getOwnPropertyDescriptor(v,g);if(b===void 0){var _=Object.getPrototypeOf(v);return _===null?void 0:p(_,g,m)}else{if("value"in b)return b.value;var y=b.get;return y===void 0?void 0:y.call(m)}},o=i(28),l=f(o);function f(p){return p&&p.__esModule?p:{default:p}}function c(p,v){if(!(p instanceof v))throw new TypeError("Cannot call a class as a function")}function h(p,v){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:p}function u(p,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);p.prototype=Object.create(v&&v.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(p,v):p.__proto__=v)}var d=function(p){u(v,p);function v(g,m){c(this,v);var b=h(this,(v.__proto__||Object.getPrototypeOf(v)).call(this,g));return b.container.classList.add("ql-icon-picker"),[].forEach.call(b.container.querySelectorAll(".ql-picker-item"),function(_){_.innerHTML=m[_.getAttribute("data-value")||""]}),b.defaultItem=b.container.querySelector(".ql-selected"),b.selectItem(b.defaultItem),b}return s(v,[{key:"selectItem",value:function(m,b){a(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"selectItem",this).call(this,m,b),m=m||this.defaultItem,this.label.innerHTML=m.innerHTML}}]),v}(l.default);n.default=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function l(f,c){for(var h=0;h<c.length;h++){var u=c[h];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(f,u.key,u)}}return function(f,c,h){return c&&l(f.prototype,c),h&&l(f,h),f}}();function a(l,f){if(!(l instanceof f))throw new TypeError("Cannot call a class as a function")}var o=function(){function l(f,c){var h=this;a(this,l),this.quill=f,this.boundsContainer=c||document.body,this.root=f.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){h.root.style.marginTop=-1*h.quill.root.scrollTop+"px"}),this.hide()}return s(l,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(c){var h=c.left+c.width/2-this.root.offsetWidth/2,u=c.bottom+this.quill.root.scrollTop;this.root.style.left=h+"px",this.root.style.top=u+"px",this.root.classList.remove("ql-flip");var d=this.boundsContainer.getBoundingClientRect(),p=this.root.getBoundingClientRect(),v=0;if(p.right>d.right&&(v=d.right-p.right,this.root.style.left=h+v+"px"),p.left<d.left&&(v=d.left-p.left,this.root.style.left=h+v+"px"),p.bottom>d.bottom){var g=p.bottom-p.top,m=c.bottom-c.top+g;this.root.style.top=u-m+"px",this.root.classList.add("ql-flip")}return v}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),l}();n.default=o},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function A(w,S){var I=[],C=!0,F=!1,D=void 0;try{for(var U=w[Symbol.iterator](),X;!(C=(X=U.next()).done)&&(I.push(X.value),!(S&&I.length===S));C=!0);}catch($){F=!0,D=$}finally{try{!C&&U.return&&U.return()}finally{if(F)throw D}}return I}return function(w,S){if(Array.isArray(w))return w;if(Symbol.iterator in Object(w))return A(w,S);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function A(w,S,I){w===null&&(w=Function.prototype);var C=Object.getOwnPropertyDescriptor(w,S);if(C===void 0){var F=Object.getPrototypeOf(w);return F===null?void 0:A(F,S,I)}else{if("value"in C)return C.value;var D=C.get;return D===void 0?void 0:D.call(I)}},o=function(){function A(w,S){for(var I=0;I<S.length;I++){var C=S[I];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(w,C.key,C)}}return function(w,S,I){return S&&A(w.prototype,S),I&&A(w,I),w}}(),l=i(3),f=_(l),c=i(8),h=_(c),u=i(43),d=_(u),p=i(27),v=_(p),g=i(15),m=i(41),b=_(m);function _(A){return A&&A.__esModule?A:{default:A}}function y(A,w){if(!(A instanceof w))throw new TypeError("Cannot call a class as a function")}function x(A,w){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:A}function O(A,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);A.prototype=Object.create(w&&w.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(A,w):A.__proto__=w)}var T=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],E=function(A){O(w,A);function w(S,I){y(this,w),I.modules.toolbar!=null&&I.modules.toolbar.container==null&&(I.modules.toolbar.container=T);var C=x(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,S,I));return C.quill.container.classList.add("ql-snow"),C}return o(w,[{key:"extendToolbar",value:function(I){I.container.classList.add("ql-snow"),this.buildButtons([].slice.call(I.container.querySelectorAll("button")),b.default),this.buildPickers([].slice.call(I.container.querySelectorAll("select")),b.default),this.tooltip=new N(this.quill,this.options.bounds),I.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(C,F){I.handlers.link.call(I,!F.format.link)})}}]),w}(d.default);E.DEFAULTS=(0,f.default)(!0,{},d.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(w){if(w){var S=this.quill.getSelection();if(S==null||S.length==0)return;var I=this.quill.getText(S);/^\S+@\S+\.\S+$/.test(I)&&I.indexOf("mailto:")!==0&&(I="mailto:"+I);var C=this.quill.theme.tooltip;C.edit("link",I)}else this.quill.format("link",!1)}}}}});var N=function(A){O(w,A);function w(S,I){y(this,w);var C=x(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,S,I));return C.preview=C.root.querySelector("a.ql-preview"),C}return o(w,[{key:"listen",value:function(){var I=this;a(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(C){I.root.classList.contains("ql-editing")?I.save():I.edit("link",I.preview.textContent),C.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(C){if(I.linkRange!=null){var F=I.linkRange;I.restoreFocus(),I.quill.formatText(F,"link",!1,h.default.sources.USER),delete I.linkRange}C.preventDefault(),I.hide()}),this.quill.on(h.default.events.SELECTION_CHANGE,function(C,F,D){if(C!=null){if(C.length===0&&D===h.default.sources.USER){var U=I.quill.scroll.descendant(v.default,C.index),X=s(U,2),$=X[0],k=X[1];if($!=null){I.linkRange=new g.Range(C.index-k,$.length());var R=v.default.formats($.domNode);I.preview.textContent=R,I.preview.setAttribute("href",R),I.show(),I.position(I.quill.getBounds(I.linkRange));return}}else delete I.linkRange;I.hide()}})}},{key:"show",value:function(){a(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),w}(u.BaseTooltip);N.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=E},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(29),a=K(s),o=i(36),l=i(38),f=i(64),c=i(65),h=K(c),u=i(66),d=K(u),p=i(67),v=K(p),g=i(37),m=i(26),b=i(39),_=i(40),y=i(56),x=K(y),O=i(68),T=K(O),E=i(27),N=K(E),A=i(69),w=K(A),S=i(70),I=K(S),C=i(71),F=K(C),D=i(72),U=K(D),X=i(73),$=K(X),k=i(13),R=K(k),P=i(74),L=K(P),j=i(75),G=K(j),M=i(57),B=K(M),q=i(41),H=K(q),z=i(28),Y=K(z),J=i(59),et=K(J),at=i(60),lt=K(at),Ct=i(61),Rt=K(Ct),V=i(108),W=K(V),Z=i(62),tt=K(Z);function K(ft){return ft&&ft.__esModule?ft:{default:ft}}a.default.register({"attributors/attribute/direction":l.DirectionAttribute,"attributors/class/align":o.AlignClass,"attributors/class/background":g.BackgroundClass,"attributors/class/color":m.ColorClass,"attributors/class/direction":l.DirectionClass,"attributors/class/font":b.FontClass,"attributors/class/size":_.SizeClass,"attributors/style/align":o.AlignStyle,"attributors/style/background":g.BackgroundStyle,"attributors/style/color":m.ColorStyle,"attributors/style/direction":l.DirectionStyle,"attributors/style/font":b.FontStyle,"attributors/style/size":_.SizeStyle},!0),a.default.register({"formats/align":o.AlignClass,"formats/direction":l.DirectionClass,"formats/indent":f.IndentClass,"formats/background":g.BackgroundStyle,"formats/color":m.ColorStyle,"formats/font":b.FontClass,"formats/size":_.SizeClass,"formats/blockquote":h.default,"formats/code-block":R.default,"formats/header":d.default,"formats/list":v.default,"formats/bold":x.default,"formats/code":k.Code,"formats/italic":T.default,"formats/link":N.default,"formats/script":w.default,"formats/strike":I.default,"formats/underline":F.default,"formats/image":U.default,"formats/video":$.default,"formats/list/item":p.ListItem,"modules/formula":L.default,"modules/syntax":G.default,"modules/toolbar":B.default,"themes/bubble":W.default,"themes/snow":tt.default,"ui/icons":H.default,"ui/picker":Y.default,"ui/icon-picker":lt.default,"ui/color-picker":et.default,"ui/tooltip":Rt.default},!0),n.default=a.default},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.IndentClass=void 0;var s=function(){function v(g,m){for(var b=0;b<m.length;b++){var _=m[b];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(g,_.key,_)}}return function(g,m,b){return m&&v(g.prototype,m),b&&v(g,b),g}}(),a=function v(g,m,b){g===null&&(g=Function.prototype);var _=Object.getOwnPropertyDescriptor(g,m);if(_===void 0){var y=Object.getPrototypeOf(g);return y===null?void 0:v(y,m,b)}else{if("value"in _)return _.value;var x=_.get;return x===void 0?void 0:x.call(b)}},o=i(0),l=f(o);function f(v){return v&&v.__esModule?v:{default:v}}function c(v,g){if(!(v instanceof g))throw new TypeError("Cannot call a class as a function")}function h(v,g){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:v}function u(v,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);v.prototype=Object.create(g&&g.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(v,g):v.__proto__=g)}var d=function(v){u(g,v);function g(){return c(this,g),h(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return s(g,[{key:"add",value:function(b,_){if(_==="+1"||_==="-1"){var y=this.value(b)||0;_=_==="+1"?y+1:y-1}return _===0?(this.remove(b),!0):a(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"add",this).call(this,b,_)}},{key:"canAdd",value:function(b,_){return a(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"canAdd",this).call(this,b,_)||a(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"canAdd",this).call(this,b,parseInt(_))}},{key:"value",value:function(b){return parseInt(a(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"value",this).call(this,b))||void 0}}]),g}(l.default.Attributor.Class),p=new d("indent","ql-indent",{scope:l.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});n.IndentClass=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(4),a=o(s);function o(u){return u&&u.__esModule?u:{default:u}}function l(u,d){if(!(u instanceof d))throw new TypeError("Cannot call a class as a function")}function f(u,d){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:u}function c(u,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);u.prototype=Object.create(d&&d.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(u,d):u.__proto__=d)}var h=function(u){c(d,u);function d(){return l(this,d),f(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}return d}(a.default);h.blotName="blockquote",h.tagName="blockquote",n.default=h},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function d(p,v){for(var g=0;g<v.length;g++){var m=v[g];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,m.key,m)}}return function(p,v,g){return v&&d(p.prototype,v),g&&d(p,g),p}}(),a=i(4),o=l(a);function l(d){return d&&d.__esModule?d:{default:d}}function f(d,p){if(!(d instanceof p))throw new TypeError("Cannot call a class as a function")}function c(d,p){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:d}function h(d,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);d.prototype=Object.create(p&&p.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(d,p):d.__proto__=p)}var u=function(d){h(p,d);function p(){return f(this,p),c(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return s(p,null,[{key:"formats",value:function(g){return this.tagName.indexOf(g.tagName)+1}}]),p}(o.default);u.blotName="header",u.tagName=["H1","H2","H3","H4","H5","H6"],n.default=u},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.ListItem=void 0;var s=function(){function y(x,O){for(var T=0;T<O.length;T++){var E=O[T];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(x,E.key,E)}}return function(x,O,T){return O&&y(x.prototype,O),T&&y(x,T),x}}(),a=function y(x,O,T){x===null&&(x=Function.prototype);var E=Object.getOwnPropertyDescriptor(x,O);if(E===void 0){var N=Object.getPrototypeOf(x);return N===null?void 0:y(N,O,T)}else{if("value"in E)return E.value;var A=E.get;return A===void 0?void 0:A.call(T)}},o=i(0),l=d(o),f=i(4),c=d(f),h=i(25),u=d(h);function d(y){return y&&y.__esModule?y:{default:y}}function p(y,x,O){return x in y?Object.defineProperty(y,x,{value:O,enumerable:!0,configurable:!0,writable:!0}):y[x]=O,y}function v(y,x){if(!(y instanceof x))throw new TypeError("Cannot call a class as a function")}function g(y,x){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:y}function m(y,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);y.prototype=Object.create(x&&x.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(y,x):y.__proto__=x)}var b=function(y){m(x,y);function x(){return v(this,x),g(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return s(x,[{key:"format",value:function(T,E){T===_.blotName&&!E?this.replaceWith(l.default.create(this.statics.scope)):a(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"format",this).call(this,T,E)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():a(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(T,E){return this.parent.isolate(this.offset(this.parent),this.length()),T===this.parent.statics.blotName?(this.parent.replaceWith(T,E),this):(this.parent.unwrap(),a(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"replaceWith",this).call(this,T,E))}}],[{key:"formats",value:function(T){return T.tagName===this.tagName?void 0:a(x.__proto__||Object.getPrototypeOf(x),"formats",this).call(this,T)}}]),x}(c.default);b.blotName="list-item",b.tagName="LI";var _=function(y){m(x,y),s(x,null,[{key:"create",value:function(T){var E=T==="ordered"?"OL":"UL",N=a(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,E);return(T==="checked"||T==="unchecked")&&N.setAttribute("data-checked",T==="checked"),N}},{key:"formats",value:function(T){if(T.tagName==="OL")return"ordered";if(T.tagName==="UL")return T.hasAttribute("data-checked")?T.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function x(O){v(this,x);var T=g(this,(x.__proto__||Object.getPrototypeOf(x)).call(this,O)),E=function(A){if(A.target.parentNode===O){var w=T.statics.formats(O),S=l.default.find(A.target);w==="checked"?S.format("list","unchecked"):w==="unchecked"&&S.format("list","checked")}};return O.addEventListener("touchstart",E),O.addEventListener("mousedown",E),T}return s(x,[{key:"format",value:function(T,E){this.children.length>0&&this.children.tail.format(T,E)}},{key:"formats",value:function(){return p({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(T,E){if(T instanceof b)a(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"insertBefore",this).call(this,T,E);else{var N=E==null?this.length():E.offset(this),A=this.split(N);A.parent.insertBefore(T,A)}}},{key:"optimize",value:function(T){a(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"optimize",this).call(this,T);var E=this.next;E!=null&&E.prev===this&&E.statics.blotName===this.statics.blotName&&E.domNode.tagName===this.domNode.tagName&&E.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(E.moveChildren(this),E.remove())}},{key:"replace",value:function(T){if(T.statics.blotName!==this.statics.blotName){var E=l.default.create(this.statics.defaultChild);T.moveChildren(E),this.appendChild(E)}a(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"replace",this).call(this,T)}}]),x}(u.default);_.blotName="list",_.scope=l.default.Scope.BLOCK_BLOT,_.tagName=["OL","UL"],_.defaultChild="list-item",_.allowedChildren=[b],n.ListItem=b,n.default=_},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(56),a=o(s);function o(u){return u&&u.__esModule?u:{default:u}}function l(u,d){if(!(u instanceof d))throw new TypeError("Cannot call a class as a function")}function f(u,d){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:u}function c(u,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);u.prototype=Object.create(d&&d.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(u,d):u.__proto__=d)}var h=function(u){c(d,u);function d(){return l(this,d),f(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}return d}(a.default);h.blotName="italic",h.tagName=["EM","I"],n.default=h},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function p(v,g){for(var m=0;m<g.length;m++){var b=g[m];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(v,b.key,b)}}return function(v,g,m){return g&&p(v.prototype,g),m&&p(v,m),v}}(),a=function p(v,g,m){v===null&&(v=Function.prototype);var b=Object.getOwnPropertyDescriptor(v,g);if(b===void 0){var _=Object.getPrototypeOf(v);return _===null?void 0:p(_,g,m)}else{if("value"in b)return b.value;var y=b.get;return y===void 0?void 0:y.call(m)}},o=i(6),l=f(o);function f(p){return p&&p.__esModule?p:{default:p}}function c(p,v){if(!(p instanceof v))throw new TypeError("Cannot call a class as a function")}function h(p,v){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:p}function u(p,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);p.prototype=Object.create(v&&v.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(p,v):p.__proto__=v)}var d=function(p){u(v,p);function v(){return c(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return s(v,null,[{key:"create",value:function(m){return m==="super"?document.createElement("sup"):m==="sub"?document.createElement("sub"):a(v.__proto__||Object.getPrototypeOf(v),"create",this).call(this,m)}},{key:"formats",value:function(m){if(m.tagName==="SUB")return"sub";if(m.tagName==="SUP")return"super"}}]),v}(l.default);d.blotName="script",d.tagName=["SUB","SUP"],n.default=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(6),a=o(s);function o(u){return u&&u.__esModule?u:{default:u}}function l(u,d){if(!(u instanceof d))throw new TypeError("Cannot call a class as a function")}function f(u,d){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:u}function c(u,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);u.prototype=Object.create(d&&d.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(u,d):u.__proto__=d)}var h=function(u){c(d,u);function d(){return l(this,d),f(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}return d}(a.default);h.blotName="strike",h.tagName="S",n.default=h},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(6),a=o(s);function o(u){return u&&u.__esModule?u:{default:u}}function l(u,d){if(!(u instanceof d))throw new TypeError("Cannot call a class as a function")}function f(u,d){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:u}function c(u,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);u.prototype=Object.create(d&&d.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(u,d):u.__proto__=d)}var h=function(u){c(d,u);function d(){return l(this,d),f(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}return d}(a.default);h.blotName="underline",h.tagName="U",n.default=h},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function g(m,b){for(var _=0;_<b.length;_++){var y=b[_];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(m,y.key,y)}}return function(m,b,_){return b&&g(m.prototype,b),_&&g(m,_),m}}(),a=function g(m,b,_){m===null&&(m=Function.prototype);var y=Object.getOwnPropertyDescriptor(m,b);if(y===void 0){var x=Object.getPrototypeOf(m);return x===null?void 0:g(x,b,_)}else{if("value"in y)return y.value;var O=y.get;return O===void 0?void 0:O.call(_)}},o=i(0),l=c(o),f=i(27);function c(g){return g&&g.__esModule?g:{default:g}}function h(g,m){if(!(g instanceof m))throw new TypeError("Cannot call a class as a function")}function u(g,m){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:g}function d(g,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);g.prototype=Object.create(m&&m.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(g,m):g.__proto__=m)}var p=["alt","height","width"],v=function(g){d(m,g);function m(){return h(this,m),u(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return s(m,[{key:"format",value:function(_,y){p.indexOf(_)>-1?y?this.domNode.setAttribute(_,y):this.domNode.removeAttribute(_):a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"format",this).call(this,_,y)}}],[{key:"create",value:function(_){var y=a(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,_);return typeof _=="string"&&y.setAttribute("src",this.sanitize(_)),y}},{key:"formats",value:function(_){return p.reduce(function(y,x){return _.hasAttribute(x)&&(y[x]=_.getAttribute(x)),y},{})}},{key:"match",value:function(_){return/\.(jpe?g|gif|png)$/.test(_)||/^data:image\/.+;base64/.test(_)}},{key:"sanitize",value:function(_){return(0,f.sanitize)(_,["http","https","data"])?_:"//:0"}},{key:"value",value:function(_){return _.getAttribute("src")}}]),m}(l.default.Embed);v.blotName="image",v.tagName="IMG",n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function g(m,b){for(var _=0;_<b.length;_++){var y=b[_];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(m,y.key,y)}}return function(m,b,_){return b&&g(m.prototype,b),_&&g(m,_),m}}(),a=function g(m,b,_){m===null&&(m=Function.prototype);var y=Object.getOwnPropertyDescriptor(m,b);if(y===void 0){var x=Object.getPrototypeOf(m);return x===null?void 0:g(x,b,_)}else{if("value"in y)return y.value;var O=y.get;return O===void 0?void 0:O.call(_)}},o=i(4),l=i(27),f=c(l);function c(g){return g&&g.__esModule?g:{default:g}}function h(g,m){if(!(g instanceof m))throw new TypeError("Cannot call a class as a function")}function u(g,m){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:g}function d(g,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);g.prototype=Object.create(m&&m.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(g,m):g.__proto__=m)}var p=["height","width"],v=function(g){d(m,g);function m(){return h(this,m),u(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return s(m,[{key:"format",value:function(_,y){p.indexOf(_)>-1?y?this.domNode.setAttribute(_,y):this.domNode.removeAttribute(_):a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"format",this).call(this,_,y)}}],[{key:"create",value:function(_){var y=a(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,_);return y.setAttribute("frameborder","0"),y.setAttribute("allowfullscreen",!0),y.setAttribute("src",this.sanitize(_)),y}},{key:"formats",value:function(_){return p.reduce(function(y,x){return _.hasAttribute(x)&&(y[x]=_.getAttribute(x)),y},{})}},{key:"sanitize",value:function(_){return f.default.sanitize(_)}},{key:"value",value:function(_){return _.getAttribute("src")}}]),m}(o.BlockEmbed);v.blotName="video",v.className="ql-video",v.tagName="IFRAME",n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.FormulaBlot=void 0;var s=function(){function _(y,x){for(var O=0;O<x.length;O++){var T=x[O];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(y,T.key,T)}}return function(y,x,O){return x&&_(y.prototype,x),O&&_(y,O),y}}(),a=function _(y,x,O){y===null&&(y=Function.prototype);var T=Object.getOwnPropertyDescriptor(y,x);if(T===void 0){var E=Object.getPrototypeOf(y);return E===null?void 0:_(E,x,O)}else{if("value"in T)return T.value;var N=T.get;return N===void 0?void 0:N.call(O)}},o=i(35),l=d(o),f=i(5),c=d(f),h=i(9),u=d(h);function d(_){return _&&_.__esModule?_:{default:_}}function p(_,y){if(!(_ instanceof y))throw new TypeError("Cannot call a class as a function")}function v(_,y){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:_}function g(_,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);_.prototype=Object.create(y&&y.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(_,y):_.__proto__=y)}var m=function(_){g(y,_);function y(){return p(this,y),v(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return s(y,null,[{key:"create",value:function(O){var T=a(y.__proto__||Object.getPrototypeOf(y),"create",this).call(this,O);return typeof O=="string"&&(window.katex.render(O,T,{throwOnError:!1,errorColor:"#f00"}),T.setAttribute("data-value",O)),T}},{key:"value",value:function(O){return O.getAttribute("data-value")}}]),y}(l.default);m.blotName="formula",m.className="ql-formula",m.tagName="SPAN";var b=function(_){g(y,_),s(y,null,[{key:"register",value:function(){c.default.register(m,!0)}}]);function y(){p(this,y);var x=v(this,(y.__proto__||Object.getPrototypeOf(y)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return x}return y}(u.default);n.FormulaBlot=m,n.default=b},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.CodeToken=n.CodeBlock=void 0;var s=function(){function O(T,E){for(var N=0;N<E.length;N++){var A=E[N];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(T,A.key,A)}}return function(T,E,N){return E&&O(T.prototype,E),N&&O(T,N),T}}(),a=function O(T,E,N){T===null&&(T=Function.prototype);var A=Object.getOwnPropertyDescriptor(T,E);if(A===void 0){var w=Object.getPrototypeOf(T);return w===null?void 0:O(w,E,N)}else{if("value"in A)return A.value;var S=A.get;return S===void 0?void 0:S.call(N)}},o=i(0),l=v(o),f=i(5),c=v(f),h=i(9),u=v(h),d=i(13),p=v(d);function v(O){return O&&O.__esModule?O:{default:O}}function g(O,T){if(!(O instanceof T))throw new TypeError("Cannot call a class as a function")}function m(O,T){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T&&(typeof T=="object"||typeof T=="function")?T:O}function b(O,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof T);O.prototype=Object.create(T&&T.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(O,T):O.__proto__=T)}var _=function(O){b(T,O);function T(){return g(this,T),m(this,(T.__proto__||Object.getPrototypeOf(T)).apply(this,arguments))}return s(T,[{key:"replaceWith",value:function(N){this.domNode.textContent=this.domNode.textContent,this.attach(),a(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"replaceWith",this).call(this,N)}},{key:"highlight",value:function(N){var A=this.domNode.textContent;this.cachedText!==A&&((A.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=N(A),this.domNode.normalize(),this.attach()),this.cachedText=A)}}]),T}(p.default);_.className="ql-syntax";var y=new l.default.Attributor.Class("token","hljs",{scope:l.default.Scope.INLINE}),x=function(O){b(T,O),s(T,null,[{key:"register",value:function(){c.default.register(y,!0),c.default.register(_,!0)}}]);function T(E,N){g(this,T);var A=m(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,E,N));if(typeof A.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var w=null;return A.quill.on(c.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(w),w=setTimeout(function(){A.highlight(),w=null},A.options.interval)}),A.highlight(),A}return s(T,[{key:"highlight",value:function(){var N=this;if(!this.quill.selection.composing){this.quill.update(c.default.sources.USER);var A=this.quill.getSelection();this.quill.scroll.descendants(_).forEach(function(w){w.highlight(N.options.highlight)}),this.quill.update(c.default.sources.SILENT),A!=null&&this.quill.setSelection(A,c.default.sources.SILENT)}}}]),T}(u.default);x.DEFAULTS={highlight:function(){return window.hljs==null?null:function(O){var T=window.hljs.highlightAuto(O);return T.value}}(),interval:1e3},n.CodeBlock=_,n.CodeToken=y,n.default=x},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 s=function T(E,N,A){E===null&&(E=Function.prototype);var w=Object.getOwnPropertyDescriptor(E,N);if(w===void 0){var S=Object.getPrototypeOf(E);return S===null?void 0:T(S,N,A)}else{if("value"in w)return w.value;var I=w.get;return I===void 0?void 0:I.call(A)}},a=function(){function T(E,N){for(var A=0;A<N.length;A++){var w=N[A];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(E,w.key,w)}}return function(E,N,A){return N&&T(E.prototype,N),A&&T(E,A),E}}(),o=i(3),l=g(o),f=i(8),c=g(f),h=i(43),u=g(h),d=i(15),p=i(41),v=g(p);function g(T){return T&&T.__esModule?T:{default:T}}function m(T,E){if(!(T instanceof E))throw new TypeError("Cannot call a class as a function")}function b(T,E){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:T}function _(T,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);T.prototype=Object.create(E&&E.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(T,E):T.__proto__=E)}var y=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],x=function(T){_(E,T);function E(N,A){m(this,E),A.modules.toolbar!=null&&A.modules.toolbar.container==null&&(A.modules.toolbar.container=y);var w=b(this,(E.__proto__||Object.getPrototypeOf(E)).call(this,N,A));return w.quill.container.classList.add("ql-bubble"),w}return a(E,[{key:"extendToolbar",value:function(A){this.tooltip=new O(this.quill,this.options.bounds),this.tooltip.root.appendChild(A.container),this.buildButtons([].slice.call(A.container.querySelectorAll("button")),v.default),this.buildPickers([].slice.call(A.container.querySelectorAll("select")),v.default)}}]),E}(u.default);x.DEFAULTS=(0,l.default)(!0,{},u.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(E){E?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var O=function(T){_(E,T);function E(N,A){m(this,E);var w=b(this,(E.__proto__||Object.getPrototypeOf(E)).call(this,N,A));return w.quill.on(c.default.events.EDITOR_CHANGE,function(S,I,C,F){if(S===c.default.events.SELECTION_CHANGE)if(I!=null&&I.length>0&&F===c.default.sources.USER){w.show(),w.root.style.left="0px",w.root.style.width="",w.root.style.width=w.root.offsetWidth+"px";var D=w.quill.getLines(I.index,I.length);if(D.length===1)w.position(w.quill.getBounds(I));else{var U=D[D.length-1],X=w.quill.getIndex(U),$=Math.min(U.length()-1,I.index+I.length-X),k=w.quill.getBounds(new d.Range(X,$));w.position(k)}}else document.activeElement!==w.textbox&&w.quill.hasFocus()&&w.hide()}),w}return a(E,[{key:"listen",value:function(){var A=this;s(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){A.root.classList.remove("ql-editing")}),this.quill.on(c.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!A.root.classList.contains("ql-hidden")){var w=A.quill.getSelection();w!=null&&A.position(A.quill.getBounds(w))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(A){var w=s(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"position",this).call(this,A),S=this.root.querySelector(".ql-tooltip-arrow");if(S.style.marginLeft="",w===0)return w;S.style.marginLeft=-1*w-S.offsetWidth/2+"px"}}]),E}(h.BaseTooltip);O.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=O,n.default=x},function(r,n,i){r.exports=i(63)}]).default})})(af);var ST=af.exports;const OT=sr(ST),UT="",IT=e=>{const[t,r]=Q.useState(!1);console.log("allProps",e);const n=Q.useRef(null),i=Q.useRef(null),s=Q.useRef(null),a=Q.useRef(null),o=Q.useRef(16),l=Q.useRef(null),{uniqueId:f,text:c,disabled:h,transformation:u,onTextUpdate:d,pointerdown:p}=e,{scale:v=[1,1],x:g,y:m,rotation:b=1,fontFamily:_="Arial",fontWeight:y="normal",fontStyle:x="normal",fontSize:O=16,fill:T="black",stroke:E,strokeThickness:N=0,blurRadius:A=0,blurEnabled:w=!1,dropShadowColor:S=null,wordWrapWidth:I=5e7,leading:C=0,letterSpacing:F}=u;st.useEffect(()=>{o.current=Number(O)},[O]);const D=["italic","oblique"].includes(x)?x:void 0,U=["bold","lighter","100","200","300"].includes(y)?y:void 0,X=Number(F)>0?F:void 0,$=st.useMemo(()=>new ee.TextStyle({fontFamily:_,fontSize:O,fill:T||"white",...E&&N>0&&{stroke:E,strokeThickness:N},...D&&{fontStyle:D},...U&&{fontWeight:U},...X&&{letterSpacing:X},...w&&{dropShadow:!0,dropShadowBlur:Number(A),dropShadowColor:(S==null?void 0:S.toString())||"black",dropShadowDistance:0},wordWrap:!0,breakWords:!0,wordWrapWidth:I||500,leading:C||0}),[w,A,T,_,O,C,D,U,X,S,E,N,I]);st.useEffect(()=>{l.current={...u}},[u]);const k=R=>{d&&d({text:R,uniqueId:f,droptype:"titles"})};return st.useEffect(()=>{if(t&&s.current){let P=document.getElementById("note-editor");if(P){P.style.position="absolute",P.style.zIndex="10",P.style.left=g+"px",P.style.top=m+"px",P.style.backgroundColor="var(--chakra-color-darkShark)",P.style.transform="scale(1.5)",P.style.width="300px",P.style.height="100px",P.style.color="#fff",P.style.fontSize="20px",P.style.border="1px solid #CBCEE0";const L={esc:{key:27,handler:function(){r(!1)}},enter:{key:13,handler:function(){r(!1)}}};var R=new OT("#note-editor",{modules:{toolbar:!1,keyboard:{bindings:{...L}}},placeholder:"Compose your text here...",theme:"snow"});R.on("text-change",function(){k(R.root.innerText)}),R.setText(c),R.focus(),R.off("text-change",()=>{console.log("removed")}),R.hasFocus()||(P.style.display="none")}}},[g,m,t]),dt.jsx(ai,{...e,children:dt.jsxs(yt.Container,{ref:n,children:[t&&dt.jsx(yt.Container,{ref:s}),dt.jsx(yt.Container,{alpha:t?0:1,ref:a,children:dt.jsx(yt.Text,{style:$,x:g,y:m,rotation:b,anchor:.5,text:c,...!t&&!h&&{interactive:!0,buttonMode:!0,pointerdown:p},ref:i,scale:v})})]})})},RT=yt.withFilters(yt.Container,{blur:ee.filters.BlurFilter,adjust:js,matrix:ee.filters.ColorMatrixFilter}),NT=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],CT={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1},PT=e=>{const[t,r]=st.useState(!1),[,n]=Q.useState(!1),[,i]=st.useState({isWaiting:!1,isStalled:!1}),[s,a]=st.useState(),[o,l]=Q.useState(!1),f=Q.useRef(null),c=Q.useRef(null),h=Q.useRef(null),u=Q.useRef(null),d=Q.useRef(null),p=Q.useRef(null),v=Q.useRef(CT),g=Q.useRef(e.initialAlpha),{tl:m,playerTimeRef:b,isDragging:_}=Q.useContext(Or),{uniqueId:y,mute:x=!1,locked:O=!1,src:T,startAt:E,endAt:N,frameStartAt:A,frameEndAt:w,transformation:{x:S,y:I,width:C,height:F,scale:D,rotation:U,animation:X,colorCorrection:$,effect:k},pointerdown:R,pointerup:P,mousedown:L,mouseup:j,pointerover:G,mouseover:M,mouseout:B,applyTransformer:q,onAnchorTransformationEnd:H}=e,z=T||"",{contrast:Y=1,saturation:J=1,exposure:et=1,blurRadius:at=0,alpha:lt=1}=$||{},Ct={brightness:et,contrast:Y,saturation:J,alpha:lt},Rt=st.useCallback(()=>{l(!0)},[]),V=st.useCallback(nt=>{console.log("changeEnd",nt),H&&(console.log("running onAnchorTransformationEnd"),H(nt))},[]),W=st.useMemo(()=>{const nt=document.createElement("video");return nt.src=T,nt.crossOrigin="Anonymus",nt.autoplay=!1,nt.currentTime=1e-4,nt},[T]);be(Kt.PAUSE,nt=>{if(console.log("pause event",nt),p.current){const At=p.current;At.currentTime>0&&!At.paused&&!At.ended&&At.readyState>At.HAVE_CURRENT_DATA&&p.current.pause(),v.current.isPlaying=!1}}),st.useEffect(()=>{console.log("current",p.current,_),p.current&&(_?(p.current.pause(),v.current.isPlaying=!1,v.current.isDragging=!0):v.current.isDragging=!1)},[_]);const Z=nt=>{if(p.current){console.log("video gsapOnStart",b.current,_);const At=Number(Math.round(b.current));At>=nt&&At<=N&&!_&&(p.current.currentTime=Number(A)||Number(nt),p.current.play(),v.current.isPlaying=!0)}},tt=()=>{if(console.log("onComplete triggered"),p.current){const nt=p.current;nt.currentTime>0&&!nt.paused&&!nt.ended&&nt.readyState>nt.HAVE_CURRENT_DATA&&p.current.pause(),v.current.isPlaying=!1}},K=()=>{},ft=()=>{if(p.current){Math.abs(p.current.currentTime-b.current);const nt=p.current,At=nt.currentTime>0&&!nt.paused&&!nt.ended&&nt.readyState>nt.HAVE_CURRENT_DATA;v.current.isDragging?(console.log("video updating",b.current),p.current.currentTime=b.current,p.current.play(),setTimeout(()=>{v.current.isPlaying=!1,p.current&&p.current.pause()},55),v.current.isPlaying=!1):v.current.isPlaying||(At||p.current.play(),v.current.isPlaying=!0)}},ct=nt=>{g.current=nt.alpha},ht=nt=>{g.current=nt.alpha};return Q.useEffect(()=>{let nt=de.context(()=>{});if(c.current&&m.current){const At={duration:Number(N)-Number(E),onStart:Z,onComplete:tt,onStartParams:[E],onCompleteParams:[],onInterrupt:K,onUpdate:ft,onUpdateParams:[]},Et={onStart:ct,onStartParams:[{alpha:1}]},$e={onComplete:ht,onCompleteParams:[{alpha:0}]},gt=qs(X||"None");nt=de.context(()=>{var ut,je;m.current.to(c.current,{alpha:1,duration:.01,...Et},E).from(c.current,{...At},E).to(c.current,{alpha:0,duration:.1,...$e},Number(N)-.09),te(gt.from)?te(gt.to)?te(gt.fromTo)||m.current.fromTo(c.current,(ut=gt.fromTo)==null?void 0:ut.from,(je=gt.fromTo)==null?void 0:je.to,E):m.current.to(c.current,{alpha:1,duration:.2,...gt.to},E):m.current.from(c.current,{...gt.from},E)})}return()=>nt.revert()},[X,E,N]),st.useEffect(()=>{c.current&&r(!0)},[]),st.useEffect(()=>{p.current&&(p.current.muted=x)},[x]),st.useEffect(()=>{if(p.current){const nt=p.current;nt.currentTime>0&&!nt.paused&&!nt.ended&&nt.readyState>nt.HAVE_CURRENT_DATA&&(o||_)&&(p.current.pause(),v.current.isPlaying=!1)}},[o,_]),st.useEffect(()=>{const nt=Math.round((Number(A)+Number.EPSILON)*100)/100,At=function(){p.current&&(p.current.currentTime=nt)},Et=function(){if(p.current){const Lt=p.current;Lt.currentTime>0&&!Lt.paused&&!Lt.ended&&Lt.readyState>Lt.HAVE_CURRENT_DATA&&p.current.pause()}i({isWaiting:!1,isStalled:!1})},$e=function(){p.current&&p.current.pause(),i({isWaiting:!0,isStalled:!1})},gt=function(){i({isWaiting:!1,isStalled:!1})},ut=function(){i({isWaiting:!1,isStalled:!0})},je=Math.round((Number(A)+Number.EPSILON)*100)/100,Dr=Math.round((Number(w)+Number.EPSILON)*100)/100,xe=`${z}#t=${je},${Dr}`;return console.log("urlTimestap",xe),ee.Texture.fromLoader(W,xe,y,{pixiIdPrefix:y,resourceOptions:{autoPlay:!1,crossorigin:"Anonymus",updateFPS:30}}).then(Lt=>{Lt&&(a(Lt),console.log(Lt.baseTexture.resource.source),p.current=Lt.baseTexture.resource.source,p.current.id=y,p.current.addEventListener("loadedmetadata",At),p.current.addEventListener("ended",Et),p.current.addEventListener("loadstart",$e),p.current.addEventListener("canplaythrough",gt),p.current.addEventListener("stalled",ut))}),()=>{p.current.removeEventListener("loadedmetadata",At),p.current.removeEventListener("ended",Et),p.current.removeEventListener("loadstart",$e),p.current.removeEventListener("canplaythrough",gt),p.current.removeEventListener("stalled",ut)}},[z,y,A,w,W]),dt.jsxs(yt.Container,{ref:h,children:[dt.jsx(yt.Container,{ref:c,alpha:g.current,position:[S,I],pivot:[S,I],width:C,height:F,children:dt.jsx(RT,{scale:1,blur:{blur:at,quality:4},adjust:Ct,apply:({matrix:nt})=>{k==="BlackAndWhite"?nt.desaturate():k==="Sepia"?nt.sepia():k==="RetroVintage"||k==="NightVision"?nt.negative():k==="Normal"&&nt.reset()},matrix:{enabled:!0,matrix:NT},children:dt.jsx(yt.Container,{ref:u,children:s&&dt.jsx(yt.Sprite,{texture:s,width:C,height:F,anchor:.5,x:S,y:I,...!O&&!o&&{interactive:!0,buttonMode:!0,pointerdown:R,pointerover:G,pointerout:B,mousedown:L,mouseover:M,mouseout:B,mouseup:j,pointerup:P},ref:f,scale:D,rotation:U})})})}),q&&dt.jsx(Gs,{pixiTransformerRef:d,imageRef:c,isMounted:t,transformCommit:V,transformChange:Rt,mouseoverEvent:n,uniqueId:y})]})};var of=(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))(of||{}),lf=(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))(lf||{});Ot.Animations=of,Ot.BlendModes=lf,Ot.Events=Kt,Ot.GsapPixieContext=Or,Ot.GsapPixieContextProvider=Op,Ot.PixiAnimatedSprite=sf,Ot.PixiAudioSprite=Bg,Ot.PixiGifSprite=AT,Ot.PixiImageSprite=wm,Ot.PixiSvgPathSprite=Fg,Ot.PixiTextSprite=IT,Ot.PixiVideoSprite=PT,Ot.emitCustomEvent=ei,Ot.newCustomEventEmitter=Sp,Ot.useCustomEventListener=be,Object.defineProperty(Ot,Symbol.toStringTag,{value:"Module"})});
590
+ `)}return W}function Ct(V,W){var Z={},tt=V.style||{};return tt.fontStyle&&j(V).fontStyle==="italic"&&(Z.italic=!0),tt.fontWeight&&(j(V).fontWeight.startsWith("bold")||parseInt(j(V).fontWeight)>=700)&&(Z.bold=!0),Object.keys(Z).length>0&&(W=L(W,Z)),parseFloat(tt.textIndent||0)>0&&(W=new h.default().insert(" ").concat(W)),W}function Rt(V,W){var Z=V.data;if(V.parentNode.tagName==="O:P")return W.insert(Z.trim());if(Z.trim().length===0&&V.parentNode.classList.contains("ql-clipboard"))return W;if(!j(V.parentNode).whiteSpace.startsWith("pre")){var tt=function(ft,ct){return ct=ct.replace(/[^\u00a0]/g,""),ct.length<1&&ft?" ":ct};Z=Z.replace(/\r\n/g," ").replace(/\n/g," "),Z=Z.replace(/\s\s+/g,tt.bind(tt,!0)),(V.previousSibling==null&&M(V.parentNode)||V.previousSibling!=null&&M(V.previousSibling))&&(Z=Z.replace(/^\s+/,tt.bind(tt,!1))),(V.nextSibling==null&&M(V.parentNode)||V.nextSibling!=null&&M(V.nextSibling))&&(Z=Z.replace(/\s+$/,tt.bind(tt,!1)))}return W.insert(Z)}n.default=k,n.matchAttributor=H,n.matchBlot=z,n.matchNewline=at,n.matchSpacing=lt,n.matchText=Rt},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function p(v,g){for(var m=0;m<g.length;m++){var b=g[m];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(v,b.key,b)}}return function(v,g,m){return g&&p(v.prototype,g),m&&p(v,m),v}}(),a=function p(v,g,m){v===null&&(v=Function.prototype);var b=Object.getOwnPropertyDescriptor(v,g);if(b===void 0){var _=Object.getPrototypeOf(v);return _===null?void 0:p(_,g,m)}else{if("value"in b)return b.value;var y=b.get;return y===void 0?void 0:y.call(m)}},o=i(6),l=f(o);function f(p){return p&&p.__esModule?p:{default:p}}function c(p,v){if(!(p instanceof v))throw new TypeError("Cannot call a class as a function")}function h(p,v){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:p}function u(p,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);p.prototype=Object.create(v&&v.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(p,v):p.__proto__=v)}var d=function(p){u(v,p);function v(){return c(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return s(v,[{key:"optimize",value:function(m){a(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"optimize",this).call(this,m),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return a(v.__proto__||Object.getPrototypeOf(v),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),v}(l.default);d.blotName="bold",d.tagName=["STRONG","B"],n.default=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.addControls=n.default=void 0;var s=function(){function w(S,I){var C=[],F=!0,$=!1,U=void 0;try{for(var X=S[Symbol.iterator](),D;!(F=(D=X.next()).done)&&(C.push(D.value),!(I&&C.length===I));F=!0);}catch(P){$=!0,U=P}finally{try{!F&&X.return&&X.return()}finally{if($)throw U}}return C}return function(S,I){if(Array.isArray(S))return S;if(Symbol.iterator in Object(S))return w(S,I);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function w(S,I){for(var C=0;C<I.length;C++){var F=I[C];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(S,F.key,F)}}return function(S,I,C){return I&&w(S.prototype,I),C&&w(S,C),S}}(),o=i(2),l=m(o),f=i(0),c=m(f),h=i(5),u=m(h),d=i(10),p=m(d),v=i(9),g=m(v);function m(w){return w&&w.__esModule?w:{default:w}}function b(w,S,I){return S in w?Object.defineProperty(w,S,{value:I,enumerable:!0,configurable:!0,writable:!0}):w[S]=I,w}function _(w,S){if(!(w instanceof S))throw new TypeError("Cannot call a class as a function")}function y(w,S){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:w}function x(w,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);w.prototype=Object.create(S&&S.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(w,S):w.__proto__=S)}var O=(0,p.default)("quill:toolbar"),T=function(w){x(S,w);function S(I,C){_(this,S);var F=y(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,I,C));if(Array.isArray(F.options.container)){var $=document.createElement("div");N($,F.options.container),I.container.parentNode.insertBefore($,I.container),F.container=$}else typeof F.options.container=="string"?F.container=document.querySelector(F.options.container):F.container=F.options.container;if(!(F.container instanceof HTMLElement)){var U;return U=O.error("Container required for toolbar",F.options),y(F,U)}return F.container.classList.add("ql-toolbar"),F.controls=[],F.handlers={},Object.keys(F.options.handlers).forEach(function(X){F.addHandler(X,F.options.handlers[X])}),[].forEach.call(F.container.querySelectorAll("button, select"),function(X){F.attach(X)}),F.quill.on(u.default.events.EDITOR_CHANGE,function(X,D){X===u.default.events.SELECTION_CHANGE&&F.update(D)}),F.quill.on(u.default.events.SCROLL_OPTIMIZE,function(){var X=F.quill.selection.getRange(),D=s(X,1),P=D[0];F.update(P)}),F}return a(S,[{key:"addHandler",value:function(C,F){this.handlers[C]=F}},{key:"attach",value:function(C){var F=this,$=[].find.call(C.classList,function(X){return X.indexOf("ql-")===0});if($){if($=$.slice(3),C.tagName==="BUTTON"&&C.setAttribute("type","button"),this.handlers[$]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[$]==null){O.warn("ignoring attaching to disabled format",$,C);return}if(c.default.query($)==null){O.warn("ignoring attaching to nonexistent format",$,C);return}}var U=C.tagName==="SELECT"?"change":"click";C.addEventListener(U,function(X){var D=void 0;if(C.tagName==="SELECT"){if(C.selectedIndex<0)return;var P=C.options[C.selectedIndex];P.hasAttribute("selected")?D=!1:D=P.value||!1}else C.classList.contains("ql-active")?D=!1:D=C.value||!C.hasAttribute("value"),X.preventDefault();F.quill.focus();var R=F.quill.selection.getRange(),k=s(R,1),L=k[0];if(F.handlers[$]!=null)F.handlers[$].call(F,D);else if(c.default.query($).prototype instanceof c.default.Embed){if(D=prompt("Enter "+$),!D)return;F.quill.updateContents(new l.default().retain(L.index).delete(L.length).insert(b({},$,D)),u.default.sources.USER)}else F.quill.format($,D,u.default.sources.USER);F.update(L)}),this.controls.push([$,C])}}},{key:"update",value:function(C){var F=C==null?{}:this.quill.getFormat(C);this.controls.forEach(function($){var U=s($,2),X=U[0],D=U[1];if(D.tagName==="SELECT"){var P=void 0;if(C==null)P=null;else if(F[X]==null)P=D.querySelector("option[selected]");else if(!Array.isArray(F[X])){var R=F[X];typeof R=="string"&&(R=R.replace(/\"/g,'\\"')),P=D.querySelector('option[value="'+R+'"]')}P==null?(D.value="",D.selectedIndex=-1):P.selected=!0}else if(C==null)D.classList.remove("ql-active");else if(D.hasAttribute("value")){var k=F[X]===D.getAttribute("value")||F[X]!=null&&F[X].toString()===D.getAttribute("value")||F[X]==null&&!D.getAttribute("value");D.classList.toggle("ql-active",k)}else D.classList.toggle("ql-active",F[X]!=null)})}}]),S}(g.default);T.DEFAULTS={};function E(w,S,I){var C=document.createElement("button");C.setAttribute("type","button"),C.classList.add("ql-"+S),I!=null&&(C.value=I),w.appendChild(C)}function N(w,S){Array.isArray(S[0])||(S=[S]),S.forEach(function(I){var C=document.createElement("span");C.classList.add("ql-formats"),I.forEach(function(F){if(typeof F=="string")E(C,F);else{var $=Object.keys(F)[0],U=F[$];Array.isArray(U)?A(C,$,U):E(C,$,U)}}),w.appendChild(C)})}function A(w,S,I){var C=document.createElement("select");C.classList.add("ql-"+S),I.forEach(function(F){var $=document.createElement("option");F!==!1?$.setAttribute("value",F):$.setAttribute("selected","selected"),C.appendChild($)}),w.appendChild(C)}T.DEFAULTS={container:null,handlers:{clean:function(){var S=this,I=this.quill.getSelection();if(I!=null)if(I.length==0){var C=this.quill.getFormat();Object.keys(C).forEach(function(F){c.default.query(F,c.default.Scope.INLINE)!=null&&S.quill.format(F,!1)})}else this.quill.removeFormat(I,u.default.sources.USER)},direction:function(S){var I=this.quill.getFormat().align;S==="rtl"&&I==null?this.quill.format("align","right",u.default.sources.USER):!S&&I==="right"&&this.quill.format("align",!1,u.default.sources.USER),this.quill.format("direction",S,u.default.sources.USER)},indent:function(S){var I=this.quill.getSelection(),C=this.quill.getFormat(I),F=parseInt(C.indent||0);if(S==="+1"||S==="-1"){var $=S==="+1"?1:-1;C.direction==="rtl"&&($*=-1),this.quill.format("indent",F+$,u.default.sources.USER)}},link:function(S){S===!0&&(S=prompt("Enter link URL:")),this.quill.format("link",S,u.default.sources.USER)},list:function(S){var I=this.quill.getSelection(),C=this.quill.getFormat(I);S==="check"?C.list==="checked"||C.list==="unchecked"?this.quill.format("list",!1,u.default.sources.USER):this.quill.format("list","unchecked",u.default.sources.USER):this.quill.format("list",S,u.default.sources.USER)}}},n.default=T,n.addControls=N},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 s=function(){function p(v,g){for(var m=0;m<g.length;m++){var b=g[m];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(v,b.key,b)}}return function(v,g,m){return g&&p(v.prototype,g),m&&p(v,m),v}}(),a=function p(v,g,m){v===null&&(v=Function.prototype);var b=Object.getOwnPropertyDescriptor(v,g);if(b===void 0){var _=Object.getPrototypeOf(v);return _===null?void 0:p(_,g,m)}else{if("value"in b)return b.value;var y=b.get;return y===void 0?void 0:y.call(m)}},o=i(28),l=f(o);function f(p){return p&&p.__esModule?p:{default:p}}function c(p,v){if(!(p instanceof v))throw new TypeError("Cannot call a class as a function")}function h(p,v){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:p}function u(p,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);p.prototype=Object.create(v&&v.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(p,v):p.__proto__=v)}var d=function(p){u(v,p);function v(g,m){c(this,v);var b=h(this,(v.__proto__||Object.getPrototypeOf(v)).call(this,g));return b.label.innerHTML=m,b.container.classList.add("ql-color-picker"),[].slice.call(b.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(_){_.classList.add("ql-primary")}),b}return s(v,[{key:"buildItem",value:function(m){var b=a(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"buildItem",this).call(this,m);return b.style.backgroundColor=m.getAttribute("value")||"",b}},{key:"selectItem",value:function(m,b){a(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"selectItem",this).call(this,m,b);var _=this.label.querySelector(".ql-color-label"),y=m&&m.getAttribute("data-value")||"";_&&(_.tagName==="line"?_.style.stroke=y:_.style.fill=y)}}]),v}(l.default);n.default=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function p(v,g){for(var m=0;m<g.length;m++){var b=g[m];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(v,b.key,b)}}return function(v,g,m){return g&&p(v.prototype,g),m&&p(v,m),v}}(),a=function p(v,g,m){v===null&&(v=Function.prototype);var b=Object.getOwnPropertyDescriptor(v,g);if(b===void 0){var _=Object.getPrototypeOf(v);return _===null?void 0:p(_,g,m)}else{if("value"in b)return b.value;var y=b.get;return y===void 0?void 0:y.call(m)}},o=i(28),l=f(o);function f(p){return p&&p.__esModule?p:{default:p}}function c(p,v){if(!(p instanceof v))throw new TypeError("Cannot call a class as a function")}function h(p,v){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:p}function u(p,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);p.prototype=Object.create(v&&v.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(p,v):p.__proto__=v)}var d=function(p){u(v,p);function v(g,m){c(this,v);var b=h(this,(v.__proto__||Object.getPrototypeOf(v)).call(this,g));return b.container.classList.add("ql-icon-picker"),[].forEach.call(b.container.querySelectorAll(".ql-picker-item"),function(_){_.innerHTML=m[_.getAttribute("data-value")||""]}),b.defaultItem=b.container.querySelector(".ql-selected"),b.selectItem(b.defaultItem),b}return s(v,[{key:"selectItem",value:function(m,b){a(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"selectItem",this).call(this,m,b),m=m||this.defaultItem,this.label.innerHTML=m.innerHTML}}]),v}(l.default);n.default=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function l(f,c){for(var h=0;h<c.length;h++){var u=c[h];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(f,u.key,u)}}return function(f,c,h){return c&&l(f.prototype,c),h&&l(f,h),f}}();function a(l,f){if(!(l instanceof f))throw new TypeError("Cannot call a class as a function")}var o=function(){function l(f,c){var h=this;a(this,l),this.quill=f,this.boundsContainer=c||document.body,this.root=f.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){h.root.style.marginTop=-1*h.quill.root.scrollTop+"px"}),this.hide()}return s(l,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(c){var h=c.left+c.width/2-this.root.offsetWidth/2,u=c.bottom+this.quill.root.scrollTop;this.root.style.left=h+"px",this.root.style.top=u+"px",this.root.classList.remove("ql-flip");var d=this.boundsContainer.getBoundingClientRect(),p=this.root.getBoundingClientRect(),v=0;if(p.right>d.right&&(v=d.right-p.right,this.root.style.left=h+v+"px"),p.left<d.left&&(v=d.left-p.left,this.root.style.left=h+v+"px"),p.bottom>d.bottom){var g=p.bottom-p.top,m=c.bottom-c.top+g;this.root.style.top=u-m+"px",this.root.classList.add("ql-flip")}return v}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),l}();n.default=o},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function A(w,S){var I=[],C=!0,F=!1,$=void 0;try{for(var U=w[Symbol.iterator](),X;!(C=(X=U.next()).done)&&(I.push(X.value),!(S&&I.length===S));C=!0);}catch(D){F=!0,$=D}finally{try{!C&&U.return&&U.return()}finally{if(F)throw $}}return I}return function(w,S){if(Array.isArray(w))return w;if(Symbol.iterator in Object(w))return A(w,S);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function A(w,S,I){w===null&&(w=Function.prototype);var C=Object.getOwnPropertyDescriptor(w,S);if(C===void 0){var F=Object.getPrototypeOf(w);return F===null?void 0:A(F,S,I)}else{if("value"in C)return C.value;var $=C.get;return $===void 0?void 0:$.call(I)}},o=function(){function A(w,S){for(var I=0;I<S.length;I++){var C=S[I];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(w,C.key,C)}}return function(w,S,I){return S&&A(w.prototype,S),I&&A(w,I),w}}(),l=i(3),f=_(l),c=i(8),h=_(c),u=i(43),d=_(u),p=i(27),v=_(p),g=i(15),m=i(41),b=_(m);function _(A){return A&&A.__esModule?A:{default:A}}function y(A,w){if(!(A instanceof w))throw new TypeError("Cannot call a class as a function")}function x(A,w){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:A}function O(A,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);A.prototype=Object.create(w&&w.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(A,w):A.__proto__=w)}var T=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],E=function(A){O(w,A);function w(S,I){y(this,w),I.modules.toolbar!=null&&I.modules.toolbar.container==null&&(I.modules.toolbar.container=T);var C=x(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,S,I));return C.quill.container.classList.add("ql-snow"),C}return o(w,[{key:"extendToolbar",value:function(I){I.container.classList.add("ql-snow"),this.buildButtons([].slice.call(I.container.querySelectorAll("button")),b.default),this.buildPickers([].slice.call(I.container.querySelectorAll("select")),b.default),this.tooltip=new N(this.quill,this.options.bounds),I.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(C,F){I.handlers.link.call(I,!F.format.link)})}}]),w}(d.default);E.DEFAULTS=(0,f.default)(!0,{},d.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(w){if(w){var S=this.quill.getSelection();if(S==null||S.length==0)return;var I=this.quill.getText(S);/^\S+@\S+\.\S+$/.test(I)&&I.indexOf("mailto:")!==0&&(I="mailto:"+I);var C=this.quill.theme.tooltip;C.edit("link",I)}else this.quill.format("link",!1)}}}}});var N=function(A){O(w,A);function w(S,I){y(this,w);var C=x(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,S,I));return C.preview=C.root.querySelector("a.ql-preview"),C}return o(w,[{key:"listen",value:function(){var I=this;a(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(C){I.root.classList.contains("ql-editing")?I.save():I.edit("link",I.preview.textContent),C.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(C){if(I.linkRange!=null){var F=I.linkRange;I.restoreFocus(),I.quill.formatText(F,"link",!1,h.default.sources.USER),delete I.linkRange}C.preventDefault(),I.hide()}),this.quill.on(h.default.events.SELECTION_CHANGE,function(C,F,$){if(C!=null){if(C.length===0&&$===h.default.sources.USER){var U=I.quill.scroll.descendant(v.default,C.index),X=s(U,2),D=X[0],P=X[1];if(D!=null){I.linkRange=new g.Range(C.index-P,D.length());var R=v.default.formats(D.domNode);I.preview.textContent=R,I.preview.setAttribute("href",R),I.show(),I.position(I.quill.getBounds(I.linkRange));return}}else delete I.linkRange;I.hide()}})}},{key:"show",value:function(){a(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),w}(u.BaseTooltip);N.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=E},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(29),a=K(s),o=i(36),l=i(38),f=i(64),c=i(65),h=K(c),u=i(66),d=K(u),p=i(67),v=K(p),g=i(37),m=i(26),b=i(39),_=i(40),y=i(56),x=K(y),O=i(68),T=K(O),E=i(27),N=K(E),A=i(69),w=K(A),S=i(70),I=K(S),C=i(71),F=K(C),$=i(72),U=K($),X=i(73),D=K(X),P=i(13),R=K(P),k=i(74),L=K(k),j=i(75),G=K(j),M=i(57),B=K(M),q=i(41),H=K(q),z=i(28),Y=K(z),J=i(59),et=K(J),at=i(60),lt=K(at),Ct=i(61),Rt=K(Ct),V=i(108),W=K(V),Z=i(62),tt=K(Z);function K(ft){return ft&&ft.__esModule?ft:{default:ft}}a.default.register({"attributors/attribute/direction":l.DirectionAttribute,"attributors/class/align":o.AlignClass,"attributors/class/background":g.BackgroundClass,"attributors/class/color":m.ColorClass,"attributors/class/direction":l.DirectionClass,"attributors/class/font":b.FontClass,"attributors/class/size":_.SizeClass,"attributors/style/align":o.AlignStyle,"attributors/style/background":g.BackgroundStyle,"attributors/style/color":m.ColorStyle,"attributors/style/direction":l.DirectionStyle,"attributors/style/font":b.FontStyle,"attributors/style/size":_.SizeStyle},!0),a.default.register({"formats/align":o.AlignClass,"formats/direction":l.DirectionClass,"formats/indent":f.IndentClass,"formats/background":g.BackgroundStyle,"formats/color":m.ColorStyle,"formats/font":b.FontClass,"formats/size":_.SizeClass,"formats/blockquote":h.default,"formats/code-block":R.default,"formats/header":d.default,"formats/list":v.default,"formats/bold":x.default,"formats/code":P.Code,"formats/italic":T.default,"formats/link":N.default,"formats/script":w.default,"formats/strike":I.default,"formats/underline":F.default,"formats/image":U.default,"formats/video":D.default,"formats/list/item":p.ListItem,"modules/formula":L.default,"modules/syntax":G.default,"modules/toolbar":B.default,"themes/bubble":W.default,"themes/snow":tt.default,"ui/icons":H.default,"ui/picker":Y.default,"ui/icon-picker":lt.default,"ui/color-picker":et.default,"ui/tooltip":Rt.default},!0),n.default=a.default},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.IndentClass=void 0;var s=function(){function v(g,m){for(var b=0;b<m.length;b++){var _=m[b];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(g,_.key,_)}}return function(g,m,b){return m&&v(g.prototype,m),b&&v(g,b),g}}(),a=function v(g,m,b){g===null&&(g=Function.prototype);var _=Object.getOwnPropertyDescriptor(g,m);if(_===void 0){var y=Object.getPrototypeOf(g);return y===null?void 0:v(y,m,b)}else{if("value"in _)return _.value;var x=_.get;return x===void 0?void 0:x.call(b)}},o=i(0),l=f(o);function f(v){return v&&v.__esModule?v:{default:v}}function c(v,g){if(!(v instanceof g))throw new TypeError("Cannot call a class as a function")}function h(v,g){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:v}function u(v,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);v.prototype=Object.create(g&&g.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(v,g):v.__proto__=g)}var d=function(v){u(g,v);function g(){return c(this,g),h(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return s(g,[{key:"add",value:function(b,_){if(_==="+1"||_==="-1"){var y=this.value(b)||0;_=_==="+1"?y+1:y-1}return _===0?(this.remove(b),!0):a(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"add",this).call(this,b,_)}},{key:"canAdd",value:function(b,_){return a(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"canAdd",this).call(this,b,_)||a(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"canAdd",this).call(this,b,parseInt(_))}},{key:"value",value:function(b){return parseInt(a(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"value",this).call(this,b))||void 0}}]),g}(l.default.Attributor.Class),p=new d("indent","ql-indent",{scope:l.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});n.IndentClass=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(4),a=o(s);function o(u){return u&&u.__esModule?u:{default:u}}function l(u,d){if(!(u instanceof d))throw new TypeError("Cannot call a class as a function")}function f(u,d){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:u}function c(u,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);u.prototype=Object.create(d&&d.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(u,d):u.__proto__=d)}var h=function(u){c(d,u);function d(){return l(this,d),f(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}return d}(a.default);h.blotName="blockquote",h.tagName="blockquote",n.default=h},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function d(p,v){for(var g=0;g<v.length;g++){var m=v[g];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,m.key,m)}}return function(p,v,g){return v&&d(p.prototype,v),g&&d(p,g),p}}(),a=i(4),o=l(a);function l(d){return d&&d.__esModule?d:{default:d}}function f(d,p){if(!(d instanceof p))throw new TypeError("Cannot call a class as a function")}function c(d,p){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:d}function h(d,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);d.prototype=Object.create(p&&p.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(d,p):d.__proto__=p)}var u=function(d){h(p,d);function p(){return f(this,p),c(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return s(p,null,[{key:"formats",value:function(g){return this.tagName.indexOf(g.tagName)+1}}]),p}(o.default);u.blotName="header",u.tagName=["H1","H2","H3","H4","H5","H6"],n.default=u},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.ListItem=void 0;var s=function(){function y(x,O){for(var T=0;T<O.length;T++){var E=O[T];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(x,E.key,E)}}return function(x,O,T){return O&&y(x.prototype,O),T&&y(x,T),x}}(),a=function y(x,O,T){x===null&&(x=Function.prototype);var E=Object.getOwnPropertyDescriptor(x,O);if(E===void 0){var N=Object.getPrototypeOf(x);return N===null?void 0:y(N,O,T)}else{if("value"in E)return E.value;var A=E.get;return A===void 0?void 0:A.call(T)}},o=i(0),l=d(o),f=i(4),c=d(f),h=i(25),u=d(h);function d(y){return y&&y.__esModule?y:{default:y}}function p(y,x,O){return x in y?Object.defineProperty(y,x,{value:O,enumerable:!0,configurable:!0,writable:!0}):y[x]=O,y}function v(y,x){if(!(y instanceof x))throw new TypeError("Cannot call a class as a function")}function g(y,x){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:y}function m(y,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);y.prototype=Object.create(x&&x.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(y,x):y.__proto__=x)}var b=function(y){m(x,y);function x(){return v(this,x),g(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return s(x,[{key:"format",value:function(T,E){T===_.blotName&&!E?this.replaceWith(l.default.create(this.statics.scope)):a(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"format",this).call(this,T,E)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():a(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(T,E){return this.parent.isolate(this.offset(this.parent),this.length()),T===this.parent.statics.blotName?(this.parent.replaceWith(T,E),this):(this.parent.unwrap(),a(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"replaceWith",this).call(this,T,E))}}],[{key:"formats",value:function(T){return T.tagName===this.tagName?void 0:a(x.__proto__||Object.getPrototypeOf(x),"formats",this).call(this,T)}}]),x}(c.default);b.blotName="list-item",b.tagName="LI";var _=function(y){m(x,y),s(x,null,[{key:"create",value:function(T){var E=T==="ordered"?"OL":"UL",N=a(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,E);return(T==="checked"||T==="unchecked")&&N.setAttribute("data-checked",T==="checked"),N}},{key:"formats",value:function(T){if(T.tagName==="OL")return"ordered";if(T.tagName==="UL")return T.hasAttribute("data-checked")?T.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function x(O){v(this,x);var T=g(this,(x.__proto__||Object.getPrototypeOf(x)).call(this,O)),E=function(A){if(A.target.parentNode===O){var w=T.statics.formats(O),S=l.default.find(A.target);w==="checked"?S.format("list","unchecked"):w==="unchecked"&&S.format("list","checked")}};return O.addEventListener("touchstart",E),O.addEventListener("mousedown",E),T}return s(x,[{key:"format",value:function(T,E){this.children.length>0&&this.children.tail.format(T,E)}},{key:"formats",value:function(){return p({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(T,E){if(T instanceof b)a(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"insertBefore",this).call(this,T,E);else{var N=E==null?this.length():E.offset(this),A=this.split(N);A.parent.insertBefore(T,A)}}},{key:"optimize",value:function(T){a(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"optimize",this).call(this,T);var E=this.next;E!=null&&E.prev===this&&E.statics.blotName===this.statics.blotName&&E.domNode.tagName===this.domNode.tagName&&E.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(E.moveChildren(this),E.remove())}},{key:"replace",value:function(T){if(T.statics.blotName!==this.statics.blotName){var E=l.default.create(this.statics.defaultChild);T.moveChildren(E),this.appendChild(E)}a(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"replace",this).call(this,T)}}]),x}(u.default);_.blotName="list",_.scope=l.default.Scope.BLOCK_BLOT,_.tagName=["OL","UL"],_.defaultChild="list-item",_.allowedChildren=[b],n.ListItem=b,n.default=_},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(56),a=o(s);function o(u){return u&&u.__esModule?u:{default:u}}function l(u,d){if(!(u instanceof d))throw new TypeError("Cannot call a class as a function")}function f(u,d){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:u}function c(u,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);u.prototype=Object.create(d&&d.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(u,d):u.__proto__=d)}var h=function(u){c(d,u);function d(){return l(this,d),f(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}return d}(a.default);h.blotName="italic",h.tagName=["EM","I"],n.default=h},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function p(v,g){for(var m=0;m<g.length;m++){var b=g[m];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(v,b.key,b)}}return function(v,g,m){return g&&p(v.prototype,g),m&&p(v,m),v}}(),a=function p(v,g,m){v===null&&(v=Function.prototype);var b=Object.getOwnPropertyDescriptor(v,g);if(b===void 0){var _=Object.getPrototypeOf(v);return _===null?void 0:p(_,g,m)}else{if("value"in b)return b.value;var y=b.get;return y===void 0?void 0:y.call(m)}},o=i(6),l=f(o);function f(p){return p&&p.__esModule?p:{default:p}}function c(p,v){if(!(p instanceof v))throw new TypeError("Cannot call a class as a function")}function h(p,v){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:p}function u(p,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);p.prototype=Object.create(v&&v.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(p,v):p.__proto__=v)}var d=function(p){u(v,p);function v(){return c(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return s(v,null,[{key:"create",value:function(m){return m==="super"?document.createElement("sup"):m==="sub"?document.createElement("sub"):a(v.__proto__||Object.getPrototypeOf(v),"create",this).call(this,m)}},{key:"formats",value:function(m){if(m.tagName==="SUB")return"sub";if(m.tagName==="SUP")return"super"}}]),v}(l.default);d.blotName="script",d.tagName=["SUB","SUP"],n.default=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(6),a=o(s);function o(u){return u&&u.__esModule?u:{default:u}}function l(u,d){if(!(u instanceof d))throw new TypeError("Cannot call a class as a function")}function f(u,d){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:u}function c(u,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);u.prototype=Object.create(d&&d.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(u,d):u.__proto__=d)}var h=function(u){c(d,u);function d(){return l(this,d),f(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}return d}(a.default);h.blotName="strike",h.tagName="S",n.default=h},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(6),a=o(s);function o(u){return u&&u.__esModule?u:{default:u}}function l(u,d){if(!(u instanceof d))throw new TypeError("Cannot call a class as a function")}function f(u,d){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:u}function c(u,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);u.prototype=Object.create(d&&d.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(u,d):u.__proto__=d)}var h=function(u){c(d,u);function d(){return l(this,d),f(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}return d}(a.default);h.blotName="underline",h.tagName="U",n.default=h},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function g(m,b){for(var _=0;_<b.length;_++){var y=b[_];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(m,y.key,y)}}return function(m,b,_){return b&&g(m.prototype,b),_&&g(m,_),m}}(),a=function g(m,b,_){m===null&&(m=Function.prototype);var y=Object.getOwnPropertyDescriptor(m,b);if(y===void 0){var x=Object.getPrototypeOf(m);return x===null?void 0:g(x,b,_)}else{if("value"in y)return y.value;var O=y.get;return O===void 0?void 0:O.call(_)}},o=i(0),l=c(o),f=i(27);function c(g){return g&&g.__esModule?g:{default:g}}function h(g,m){if(!(g instanceof m))throw new TypeError("Cannot call a class as a function")}function u(g,m){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:g}function d(g,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);g.prototype=Object.create(m&&m.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(g,m):g.__proto__=m)}var p=["alt","height","width"],v=function(g){d(m,g);function m(){return h(this,m),u(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return s(m,[{key:"format",value:function(_,y){p.indexOf(_)>-1?y?this.domNode.setAttribute(_,y):this.domNode.removeAttribute(_):a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"format",this).call(this,_,y)}}],[{key:"create",value:function(_){var y=a(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,_);return typeof _=="string"&&y.setAttribute("src",this.sanitize(_)),y}},{key:"formats",value:function(_){return p.reduce(function(y,x){return _.hasAttribute(x)&&(y[x]=_.getAttribute(x)),y},{})}},{key:"match",value:function(_){return/\.(jpe?g|gif|png)$/.test(_)||/^data:image\/.+;base64/.test(_)}},{key:"sanitize",value:function(_){return(0,f.sanitize)(_,["http","https","data"])?_:"//:0"}},{key:"value",value:function(_){return _.getAttribute("src")}}]),m}(l.default.Embed);v.blotName="image",v.tagName="IMG",n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function g(m,b){for(var _=0;_<b.length;_++){var y=b[_];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(m,y.key,y)}}return function(m,b,_){return b&&g(m.prototype,b),_&&g(m,_),m}}(),a=function g(m,b,_){m===null&&(m=Function.prototype);var y=Object.getOwnPropertyDescriptor(m,b);if(y===void 0){var x=Object.getPrototypeOf(m);return x===null?void 0:g(x,b,_)}else{if("value"in y)return y.value;var O=y.get;return O===void 0?void 0:O.call(_)}},o=i(4),l=i(27),f=c(l);function c(g){return g&&g.__esModule?g:{default:g}}function h(g,m){if(!(g instanceof m))throw new TypeError("Cannot call a class as a function")}function u(g,m){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:g}function d(g,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);g.prototype=Object.create(m&&m.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(g,m):g.__proto__=m)}var p=["height","width"],v=function(g){d(m,g);function m(){return h(this,m),u(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return s(m,[{key:"format",value:function(_,y){p.indexOf(_)>-1?y?this.domNode.setAttribute(_,y):this.domNode.removeAttribute(_):a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"format",this).call(this,_,y)}}],[{key:"create",value:function(_){var y=a(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,_);return y.setAttribute("frameborder","0"),y.setAttribute("allowfullscreen",!0),y.setAttribute("src",this.sanitize(_)),y}},{key:"formats",value:function(_){return p.reduce(function(y,x){return _.hasAttribute(x)&&(y[x]=_.getAttribute(x)),y},{})}},{key:"sanitize",value:function(_){return f.default.sanitize(_)}},{key:"value",value:function(_){return _.getAttribute("src")}}]),m}(o.BlockEmbed);v.blotName="video",v.className="ql-video",v.tagName="IFRAME",n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.FormulaBlot=void 0;var s=function(){function _(y,x){for(var O=0;O<x.length;O++){var T=x[O];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(y,T.key,T)}}return function(y,x,O){return x&&_(y.prototype,x),O&&_(y,O),y}}(),a=function _(y,x,O){y===null&&(y=Function.prototype);var T=Object.getOwnPropertyDescriptor(y,x);if(T===void 0){var E=Object.getPrototypeOf(y);return E===null?void 0:_(E,x,O)}else{if("value"in T)return T.value;var N=T.get;return N===void 0?void 0:N.call(O)}},o=i(35),l=d(o),f=i(5),c=d(f),h=i(9),u=d(h);function d(_){return _&&_.__esModule?_:{default:_}}function p(_,y){if(!(_ instanceof y))throw new TypeError("Cannot call a class as a function")}function v(_,y){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:_}function g(_,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);_.prototype=Object.create(y&&y.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(_,y):_.__proto__=y)}var m=function(_){g(y,_);function y(){return p(this,y),v(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return s(y,null,[{key:"create",value:function(O){var T=a(y.__proto__||Object.getPrototypeOf(y),"create",this).call(this,O);return typeof O=="string"&&(window.katex.render(O,T,{throwOnError:!1,errorColor:"#f00"}),T.setAttribute("data-value",O)),T}},{key:"value",value:function(O){return O.getAttribute("data-value")}}]),y}(l.default);m.blotName="formula",m.className="ql-formula",m.tagName="SPAN";var b=function(_){g(y,_),s(y,null,[{key:"register",value:function(){c.default.register(m,!0)}}]);function y(){p(this,y);var x=v(this,(y.__proto__||Object.getPrototypeOf(y)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return x}return y}(u.default);n.FormulaBlot=m,n.default=b},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.CodeToken=n.CodeBlock=void 0;var s=function(){function O(T,E){for(var N=0;N<E.length;N++){var A=E[N];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(T,A.key,A)}}return function(T,E,N){return E&&O(T.prototype,E),N&&O(T,N),T}}(),a=function O(T,E,N){T===null&&(T=Function.prototype);var A=Object.getOwnPropertyDescriptor(T,E);if(A===void 0){var w=Object.getPrototypeOf(T);return w===null?void 0:O(w,E,N)}else{if("value"in A)return A.value;var S=A.get;return S===void 0?void 0:S.call(N)}},o=i(0),l=v(o),f=i(5),c=v(f),h=i(9),u=v(h),d=i(13),p=v(d);function v(O){return O&&O.__esModule?O:{default:O}}function g(O,T){if(!(O instanceof T))throw new TypeError("Cannot call a class as a function")}function m(O,T){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T&&(typeof T=="object"||typeof T=="function")?T:O}function b(O,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof T);O.prototype=Object.create(T&&T.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(O,T):O.__proto__=T)}var _=function(O){b(T,O);function T(){return g(this,T),m(this,(T.__proto__||Object.getPrototypeOf(T)).apply(this,arguments))}return s(T,[{key:"replaceWith",value:function(N){this.domNode.textContent=this.domNode.textContent,this.attach(),a(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"replaceWith",this).call(this,N)}},{key:"highlight",value:function(N){var A=this.domNode.textContent;this.cachedText!==A&&((A.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=N(A),this.domNode.normalize(),this.attach()),this.cachedText=A)}}]),T}(p.default);_.className="ql-syntax";var y=new l.default.Attributor.Class("token","hljs",{scope:l.default.Scope.INLINE}),x=function(O){b(T,O),s(T,null,[{key:"register",value:function(){c.default.register(y,!0),c.default.register(_,!0)}}]);function T(E,N){g(this,T);var A=m(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,E,N));if(typeof A.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var w=null;return A.quill.on(c.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(w),w=setTimeout(function(){A.highlight(),w=null},A.options.interval)}),A.highlight(),A}return s(T,[{key:"highlight",value:function(){var N=this;if(!this.quill.selection.composing){this.quill.update(c.default.sources.USER);var A=this.quill.getSelection();this.quill.scroll.descendants(_).forEach(function(w){w.highlight(N.options.highlight)}),this.quill.update(c.default.sources.SILENT),A!=null&&this.quill.setSelection(A,c.default.sources.SILENT)}}}]),T}(u.default);x.DEFAULTS={highlight:function(){return window.hljs==null?null:function(O){var T=window.hljs.highlightAuto(O);return T.value}}(),interval:1e3},n.CodeBlock=_,n.CodeToken=y,n.default=x},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 s=function T(E,N,A){E===null&&(E=Function.prototype);var w=Object.getOwnPropertyDescriptor(E,N);if(w===void 0){var S=Object.getPrototypeOf(E);return S===null?void 0:T(S,N,A)}else{if("value"in w)return w.value;var I=w.get;return I===void 0?void 0:I.call(A)}},a=function(){function T(E,N){for(var A=0;A<N.length;A++){var w=N[A];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(E,w.key,w)}}return function(E,N,A){return N&&T(E.prototype,N),A&&T(E,A),E}}(),o=i(3),l=g(o),f=i(8),c=g(f),h=i(43),u=g(h),d=i(15),p=i(41),v=g(p);function g(T){return T&&T.__esModule?T:{default:T}}function m(T,E){if(!(T instanceof E))throw new TypeError("Cannot call a class as a function")}function b(T,E){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:T}function _(T,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);T.prototype=Object.create(E&&E.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(T,E):T.__proto__=E)}var y=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],x=function(T){_(E,T);function E(N,A){m(this,E),A.modules.toolbar!=null&&A.modules.toolbar.container==null&&(A.modules.toolbar.container=y);var w=b(this,(E.__proto__||Object.getPrototypeOf(E)).call(this,N,A));return w.quill.container.classList.add("ql-bubble"),w}return a(E,[{key:"extendToolbar",value:function(A){this.tooltip=new O(this.quill,this.options.bounds),this.tooltip.root.appendChild(A.container),this.buildButtons([].slice.call(A.container.querySelectorAll("button")),v.default),this.buildPickers([].slice.call(A.container.querySelectorAll("select")),v.default)}}]),E}(u.default);x.DEFAULTS=(0,l.default)(!0,{},u.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(E){E?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var O=function(T){_(E,T);function E(N,A){m(this,E);var w=b(this,(E.__proto__||Object.getPrototypeOf(E)).call(this,N,A));return w.quill.on(c.default.events.EDITOR_CHANGE,function(S,I,C,F){if(S===c.default.events.SELECTION_CHANGE)if(I!=null&&I.length>0&&F===c.default.sources.USER){w.show(),w.root.style.left="0px",w.root.style.width="",w.root.style.width=w.root.offsetWidth+"px";var $=w.quill.getLines(I.index,I.length);if($.length===1)w.position(w.quill.getBounds(I));else{var U=$[$.length-1],X=w.quill.getIndex(U),D=Math.min(U.length()-1,I.index+I.length-X),P=w.quill.getBounds(new d.Range(X,D));w.position(P)}}else document.activeElement!==w.textbox&&w.quill.hasFocus()&&w.hide()}),w}return a(E,[{key:"listen",value:function(){var A=this;s(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){A.root.classList.remove("ql-editing")}),this.quill.on(c.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!A.root.classList.contains("ql-hidden")){var w=A.quill.getSelection();w!=null&&A.position(A.quill.getBounds(w))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(A){var w=s(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"position",this).call(this,A),S=this.root.querySelector(".ql-tooltip-arrow");if(S.style.marginLeft="",w===0)return w;S.style.marginLeft=-1*w-S.offsetWidth/2+"px"}}]),E}(h.BaseTooltip);O.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=O,n.default=x},function(r,n,i){r.exports=i(63)}]).default})})(af);var ST=af.exports;const OT=sr(ST),UT="",IT=st.forwardRef((e,t)=>{const[r,n]=Q.useState(!1);console.log("allProps",e);const i=Q.useRef(null),s=Q.useRef(null),a=Q.useRef(null),o=Q.useRef(null),l=Q.useRef(16),f=Q.useRef(null),{uniqueId:c,text:h,disabled:u,transformation:d,onTextUpdate:p,pointerdown:v}=e,{scale:g=[1,1],x:m,y:b,rotation:_=1,fontFamily:y="Arial",fontWeight:x="normal",fontStyle:O="normal",fontSize:T=16,fill:E="black",stroke:N,strokeThickness:A=0,blurRadius:w=0,blurEnabled:S=!1,dropShadowColor:I=null,wordWrapWidth:C=5e7,leading:F=0,letterSpacing:$}=d;st.useEffect(()=>{l.current=Number(T)},[T]);const U=["italic","oblique"].includes(O)?O:void 0,X=["bold","lighter","100","200","300"].includes(x)?x:void 0,D=Number($)>0?$:void 0,P=st.useMemo(()=>new ee.TextStyle({fontFamily:y,fontSize:T,fill:E||"white",...N&&A>0&&{stroke:N,strokeThickness:A},...U&&{fontStyle:U},...X&&{fontWeight:X},...D&&{letterSpacing:D},...S&&{dropShadow:!0,dropShadowBlur:Number(w),dropShadowColor:(I==null?void 0:I.toString())||"black",dropShadowDistance:0},wordWrap:!0,breakWords:!0,wordWrapWidth:C||500,leading:F||0}),[S,w,E,y,T,F,U,X,D,I,N,A,C]);st.useEffect(()=>{f.current={...d}},[d]);const R=k=>{p&&p({text:k,uniqueId:c,droptype:"titles"})};return st.useEffect(()=>{if(r&&a.current){let L=document.getElementById("note-editor");if(L){L.style.position="absolute",L.style.zIndex="10",L.style.left=m+"px",L.style.top=b+"px",L.style.backgroundColor="var(--chakra-color-darkShark)",L.style.transform="scale(1.5)",L.style.width="300px",L.style.height="100px",L.style.color="#fff",L.style.fontSize="20px",L.style.border="1px solid #CBCEE0";const j={esc:{key:27,handler:function(){n(!1)}},enter:{key:13,handler:function(){n(!1)}}};var k=new OT("#note-editor",{modules:{toolbar:!1,keyboard:{bindings:{...j}}},placeholder:"Compose your text here...",theme:"snow"});k.on("text-change",function(){R(k.root.innerText)}),k.setText(h),k.focus(),k.off("text-change",()=>{console.log("removed")}),k.hasFocus()||(L.style.display="none")}}},[m,b,r]),dt.jsx(ai,{...e,ref:t,children:dt.jsxs(yt.Container,{ref:i,children:[r&&dt.jsx(yt.Container,{ref:a}),dt.jsx(yt.Container,{alpha:r?0:1,ref:o,children:dt.jsx(yt.Text,{style:P,x:m,y:b,rotation:_,anchor:.5,text:h,...!r&&!u&&{interactive:!0,buttonMode:!0,pointerdown:v},ref:s,scale:g})})]})})}),RT=yt.withFilters(yt.Container,{blur:ee.filters.BlurFilter,adjust:js,matrix:ee.filters.ColorMatrixFilter}),NT=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],CT={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1},PT=e=>{const[t,r]=st.useState(!1),[,n]=Q.useState(!1),[,i]=st.useState({isWaiting:!1,isStalled:!1}),[s,a]=st.useState(),[o,l]=Q.useState(!1),f=Q.useRef(null),c=Q.useRef(null),h=Q.useRef(null),u=Q.useRef(null),d=Q.useRef(null),p=Q.useRef(null),v=Q.useRef(CT),g=Q.useRef(e.initialAlpha),{tl:m,playerTimeRef:b,isDragging:_}=Q.useContext(Or),{uniqueId:y,mute:x=!1,locked:O=!1,src:T,startAt:E,endAt:N,frameStartAt:A,frameEndAt:w,transformation:{x:S,y:I,width:C,height:F,scale:$,rotation:U,animation:X,colorCorrection:D,effect:P},pointerdown:R,pointerup:k,mousedown:L,mouseup:j,pointerover:G,mouseover:M,mouseout:B,applyTransformer:q,onAnchorTransformationEnd:H}=e,z=T||"",{contrast:Y=1,saturation:J=1,exposure:et=1,blurRadius:at=0,alpha:lt=1}=D||{},Ct={brightness:et,contrast:Y,saturation:J,alpha:lt},Rt=st.useCallback(()=>{l(!0)},[]),V=st.useCallback(nt=>{console.log("changeEnd",nt),H&&(console.log("running onAnchorTransformationEnd"),H(nt))},[]),W=st.useMemo(()=>{const nt=document.createElement("video");return nt.src=T,nt.crossOrigin="Anonymus",nt.autoplay=!1,nt.currentTime=1e-4,nt},[T]);be(Kt.PAUSE,nt=>{if(console.log("pause event",nt),p.current){const At=p.current;At.currentTime>0&&!At.paused&&!At.ended&&At.readyState>At.HAVE_CURRENT_DATA&&p.current.pause(),v.current.isPlaying=!1}}),st.useEffect(()=>{console.log("current",p.current,_),p.current&&(_?(p.current.pause(),v.current.isPlaying=!1,v.current.isDragging=!0):v.current.isDragging=!1)},[_]);const Z=nt=>{if(p.current){console.log("video gsapOnStart",b.current,_);const At=Number(Math.round(b.current));At>=nt&&At<=N&&!_&&(p.current.currentTime=Number(A)||Number(nt),p.current.play(),v.current.isPlaying=!0)}},tt=()=>{if(console.log("onComplete triggered"),p.current){const nt=p.current;nt.currentTime>0&&!nt.paused&&!nt.ended&&nt.readyState>nt.HAVE_CURRENT_DATA&&p.current.pause(),v.current.isPlaying=!1}},K=()=>{},ft=()=>{if(p.current){Math.abs(p.current.currentTime-b.current);const nt=p.current,At=nt.currentTime>0&&!nt.paused&&!nt.ended&&nt.readyState>nt.HAVE_CURRENT_DATA;v.current.isDragging?(console.log("video updating",b.current),p.current.currentTime=b.current,p.current.play(),setTimeout(()=>{v.current.isPlaying=!1,p.current&&p.current.pause()},55),v.current.isPlaying=!1):v.current.isPlaying||(At||p.current.play(),v.current.isPlaying=!0)}},ct=nt=>{g.current=nt.alpha},ht=nt=>{g.current=nt.alpha};return Q.useEffect(()=>{let nt=de.context(()=>{});if(c.current&&m.current){const At={duration:Number(N)-Number(E),onStart:Z,onComplete:tt,onStartParams:[E],onCompleteParams:[],onInterrupt:K,onUpdate:ft,onUpdateParams:[]},Et={onStart:ct,onStartParams:[{alpha:1}]},$e={onComplete:ht,onCompleteParams:[{alpha:0}]},gt=qs(X||"None");nt=de.context(()=>{var ut,je;m.current.to(c.current,{alpha:1,duration:.01,...Et},E).from(c.current,{...At},E).to(c.current,{alpha:0,duration:.1,...$e},Number(N)-.09),te(gt.from)?te(gt.to)?te(gt.fromTo)||m.current.fromTo(c.current,(ut=gt.fromTo)==null?void 0:ut.from,(je=gt.fromTo)==null?void 0:je.to,E):m.current.to(c.current,{alpha:1,duration:.2,...gt.to},E):m.current.from(c.current,{...gt.from},E)})}return()=>nt.revert()},[X,E,N]),st.useEffect(()=>{c.current&&r(!0)},[]),st.useEffect(()=>{p.current&&(p.current.muted=x)},[x]),st.useEffect(()=>{if(p.current){const nt=p.current;nt.currentTime>0&&!nt.paused&&!nt.ended&&nt.readyState>nt.HAVE_CURRENT_DATA&&(o||_)&&(p.current.pause(),v.current.isPlaying=!1)}},[o,_]),st.useEffect(()=>{const nt=Math.round((Number(A)+Number.EPSILON)*100)/100,At=function(){p.current&&(p.current.currentTime=nt)},Et=function(){if(p.current){const Lt=p.current;Lt.currentTime>0&&!Lt.paused&&!Lt.ended&&Lt.readyState>Lt.HAVE_CURRENT_DATA&&p.current.pause()}i({isWaiting:!1,isStalled:!1})},$e=function(){p.current&&p.current.pause(),i({isWaiting:!0,isStalled:!1})},gt=function(){i({isWaiting:!1,isStalled:!1})},ut=function(){i({isWaiting:!1,isStalled:!0})},je=Math.round((Number(A)+Number.EPSILON)*100)/100,Dr=Math.round((Number(w)+Number.EPSILON)*100)/100,xe=`${z}#t=${je},${Dr}`;return console.log("urlTimestap",xe),ee.Texture.fromLoader(W,xe,y,{pixiIdPrefix:y,resourceOptions:{autoPlay:!1,crossorigin:"Anonymus",updateFPS:30}}).then(Lt=>{Lt&&(a(Lt),console.log(Lt.baseTexture.resource.source),p.current=Lt.baseTexture.resource.source,p.current.id=y,p.current.addEventListener("loadedmetadata",At),p.current.addEventListener("ended",Et),p.current.addEventListener("loadstart",$e),p.current.addEventListener("canplaythrough",gt),p.current.addEventListener("stalled",ut))}),()=>{p.current.removeEventListener("loadedmetadata",At),p.current.removeEventListener("ended",Et),p.current.removeEventListener("loadstart",$e),p.current.removeEventListener("canplaythrough",gt),p.current.removeEventListener("stalled",ut)}},[z,y,A,w,W]),dt.jsxs(yt.Container,{ref:h,children:[dt.jsx(yt.Container,{ref:c,alpha:g.current,position:[S,I],pivot:[S,I],width:C,height:F,children:dt.jsx(RT,{scale:1,blur:{blur:at,quality:4},adjust:Ct,apply:({matrix:nt})=>{P==="BlackAndWhite"?nt.desaturate():P==="Sepia"?nt.sepia():P==="RetroVintage"||P==="NightVision"?nt.negative():P==="Normal"&&nt.reset()},matrix:{enabled:!0,matrix:NT},children:dt.jsx(yt.Container,{ref:u,children:s&&dt.jsx(yt.Sprite,{texture:s,width:C,height:F,anchor:.5,x:S,y:I,...!O&&!o&&{interactive:!0,buttonMode:!0,pointerdown:R,pointerover:G,pointerout:B,mousedown:L,mouseover:M,mouseout:B,mouseup:j,pointerup:k},ref:f,scale:$,rotation:U})})})}),q&&dt.jsx(Gs,{pixiTransformerRef:d,imageRef:c,isMounted:t,transformCommit:V,transformChange:Rt,mouseoverEvent:n,uniqueId:y})]})};var of=(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))(of||{}),lf=(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))(lf||{});Ot.Animations=of,Ot.BlendModes=lf,Ot.Events=Kt,Ot.GsapPixieContext=Or,Ot.GsapPixieContextProvider=Op,Ot.PixiAnimatedSprite=sf,Ot.PixiAudioSprite=Bg,Ot.PixiGifSprite=AT,Ot.PixiImageSprite=wm,Ot.PixiSvgPathSprite=Fg,Ot.PixiTextSprite=IT,Ot.PixiVideoSprite=PT,Ot.emitCustomEvent=ei,Ot.newCustomEventEmitter=Sp,Ot.useCustomEventListener=be,Object.defineProperty(Ot,Symbol.toStringTag,{value:"Module"})});