reacthub-pixitweenjs 0.2.20 → 0.2.21

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
@@ -536,7 +536,7 @@ void main(void)
536
536
 
537
537
  gl_FragColor = c * alpha;
538
538
  }
539
- `;class Zs extends Oe{constructor(t){super(Jp,ty),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 er=(e=>(e.BlackAndWhite="BlackAndWhite",e.Sepia="Sepia",e.RetroVintage="RetroVintage",e.NightVision="NightVision",e.Normal="Normal",e.None="Normal",e))(er||{});class Qs{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?At.EMPTY:(t=t||new At(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,h=n*r.x+s*r.y+o,c=i*r.x+a*r.y+l;this.minX=Math.min(this.minX,h),this.maxX=Math.max(this.maxX,h),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,h=t.d,c=t.tx,f=t.ty;let u=this.minX,d=this.minY,p=this.maxX,v=this.maxY,g=a*r+l*n+c,y=o*r+h*n+f;u=g<u?g:u,d=y<d?y:d,p=g>p?g:p,v=y>v?y:v,g=a*i+l*n+c,y=o*i+h*n+f,u=g<u?g:u,d=y<d?y:d,p=g>p?g:p,v=y>v?y:v,g=a*r+l*s+c,y=o*r+h*s+f,u=g<u?g:u,d=y<d?y:d,p=g>p?g:p,v=y>v?y:v,g=a*i+l*s+c,y=o*i+h*s+f,u=g<u?g:u,d=y<d?y:d,p=g>p?g:p,v=y>v?y: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 h=t[l],c=t[l+1];i=h<i?h:i,s=c<s?c:s,a=h>a?h: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,h=t.c,c=t.d,f=t.tx,u=t.ty;let d=this.minX,p=this.minY,v=this.maxX,g=this.maxY;for(let y=n;y<i;y+=2){const b=r[y],_=r[y+1],m=o*b+h*_+f,x=c*_+l*b+u;d=Math.min(d,m-s),v=Math.max(v,m+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,h=this.maxX,c=this.maxY;this.minX=n<o?n:o,this.minY=i<l?i:l,this.maxX=s>h?s:h,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,h=this.maxX,c=this.maxY;this.minX=n<o?n:o,this.minY=i<l?i:l,this.maxX=s>h?s:h,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 Rr extends _n{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new Hn,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 Qs,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(Rr.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 At),r=this._boundsRect),this._bounds.getRectangle(r)}getLocalBounds(t){t||(this._localBoundsRect||(this._localBoundsRect=new At),t=this._localBoundsRect),this._localBounds||(this._localBounds=new Qs);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,h=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=h,this}destroy(t){this.removeFromParent(),this._destroyed=!0,this.transform=null,this.parent=null,this._bounds=null,this.mask=null,this.cullArea=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.eventMode="auto",this.interactiveChildren=!1,this.emit("destroyed"),this.removeAllListeners()}get _tempDisplayObjectParent(){return this.tempDisplayObjectParent===null&&(this.tempDisplayObjectParent=new ey),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*Yd}set angle(t){this.transform.rotation=t*Kd}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 ey extends Rr{constructor(){super(...arguments),this.sortDirty=null}}Rr.prototype.displayObjectUpdateTransform=Rr.prototype.updateTransform;const ry=new Ot;function ny(e,t){return e.zIndex===t.zIndex?e._lastSortedIndex-t._lastSortedIndex:e.zIndex-t.zIndex}const Js=class extends Rr{constructor(){super(),this.children=[],this.sortableChildren=Js.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);Bn(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,Bn(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,Bn(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(ny),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!==Js.prototype._render&&(r=this.getBounds(!0));const i=e.projection.transform;if(i&&(n?(n=ry.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 rr=Js;rr.defaultSortableChildren=!1,rr.prototype.containerUpdateTransform=rr.prototype.updateTransform,Object.defineProperties(vt,{SORTABLE_CHILDREN:{get(){return rr.defaultSortableChildren},set(e){xt("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),rr.defaultSortableChildren=e}}});class si{constructor(t=0,r=0,n=0,i=0){this._x=Number(t),this._y=Number(r),this._width=Number(n),this._height=Number(i),this._hull=[new nt,new nt,new nt,new nt],this.currentID=-1,this.dirtyID=0}get x(){return this._x}set x(t){this._x=t,this.dirtyID++}get y(){return this._y}set y(t){this._y=t,this.dirtyID++}get width(){return this._width}set width(t){this._width=t,this.dirtyID++}get height(){return this._height}set height(t){this._height=t,this.dirtyID++}get hull(){return this.isDirty()&&this.update(),this._hull}get topLeft(){return this.isDirty()&&this.update(),this._hull[0]}get topRight(){return this.isDirty()&&this.update(),this._hull[1]}get bottomRight(){return this.isDirty()&&this.update(),this._hull[2]}get bottomLeft(){return this.isDirty()&&this.update(),this._hull[3]}isDirty(){return this.currentID!==this.dirtyID}update(){const[t,r,n,i]=this._hull;t.set(this._x,this._y),r.set(this._x+this._width,this._y),n.set(this._x+this._width,this._y+this._height),i.set(this._x,this._y+this._height)}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}clone(){return new si(this.x,this.y,this.width,this.height)}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t}contains(t,r){return this.width<=0||this.height<=0?!1:t>=this.x&&t<this.x+this.width&&r>=this.y&&r<this.y+this.height}equals(t){return t?t.x===this.x&&t.y===this.y&&t.width===this.width&&t.height===this.height:!1}pad(t=0,r=t){return this.x-=t,this.y-=r,this.width+=t*2,this.height+=r*2,this}fit(t){const r=Math.max(this.x,t.x),n=Math.min(this.x+this.width,t.x+t.width),i=Math.max(this.y,t.y),s=Math.min(this.y+this.height,t.y+t.height);return this.x=r,this.width=Math.max(n-r,0),this.y=i,this.height=Math.max(s-i,0),this}ceil(t=1,r=.001){const n=Math.ceil((this.x+this.width-r)*t)/t,i=Math.ceil((this.y+this.height-r)*t)/t;return this.x=Math.floor((this.x+r)*t)/t,this.y=Math.floor((this.y+r)*t)/t,this.width=n-this.x,this.height=i-this.y,this}enlarge(t){const r=Math.min(this.x,t.x),n=Math.max(this.x+this.width,t.x+t.width),i=Math.min(this.y,t.y),s=Math.max(this.y+this.height,t.y+t.height);return this.x=r,this.width=n-r,this.y=i,this.height=s-i,this}}const Wl=new nt;class ai{constructor(t=0,r=0,n=0,i=0,s=0){t instanceof si&&(s=r||0,r=t.y,n=t.width,i=t.height,t=t.x),this.innerBounds=new si(t,r,n,i),this._rotation=s,this._center=new Je(this.updateCenter,this),this._hull=[new nt,new nt,new nt,new nt],this._matrix=new Ot,this.currentID=-1,this.dirtyID=0}get rotation(){return this._rotation}set rotation(t){this._rotation=t,this.dirtyID++}get center(){return this.isDirty()&&this.update(),this._center}set center(t){this.center.copyFrom(t)}get hull(){return this.isDirty()&&this.update(),this._hull}get topLeft(){return this.isDirty()&&this.update(),this._hull[0]}get topRight(){return this.isDirty()&&this.update(),this._hull[1]}get bottomRight(){return this.isDirty()&&this.update(),this._hull[2]}get bottomLeft(){return this.isDirty()&&this.update(),this._hull[3]}equals(t){return t?this.innerBounds.equals(t.innerBounds)&&this.rotation===t.rotation:!1}contains(t,r){typeof t=="number"&&(t=Wl.set(t,r));const n=this._matrix.applyInverse(t,Wl);return this.innerBounds.contains(n.x,n.y)}copyFrom(t){return this.innerBounds.copyFrom(t.innerBounds),this.rotation=t.rotation,this.dirtyID++,this}isDirty(){return this.currentID!==this.dirtyID+this.innerBounds.dirtyID}update(){const t=this.innerBounds,r=this._rotation,n=this._center,[i,s,a,o]=this._hull,l=this._matrix;n._x=t.x+t.width/2,n._y=t.y+t.height/2,l.identity().translate(-n.x,-n.y).rotate(r).translate(n.x,n.y),l.apply(t.topLeft,i),l.apply(t.topRight,s),l.apply(t.bottomRight,a),l.apply(t.bottomLeft,o),this.currentID=this.dirtyID+this.innerBounds.dirtyID}updateCenter(){const t=this.center,r=this.innerBounds;r.x=t.x-r.width/2,r.y=t.y-r.height/2}}class Yl{constructor(t,r){this._history=new Array(t),this._decayRatio=r,this._currentIndex=0;for(let n=0;n<t;n++)this._history[n]=0}next(t){const{_history:r,_decayRatio:n}=this,i=r.length;this._currentIndex=this._currentIndex<i-1?this._currentIndex+1:0,r[this._currentIndex]=t;let s=0,a=0;for(let o=this._currentIndex+1;o<i;o++)s=(s+r[o])*n,a=(a+1)*n;for(let o=0;o<=this._currentIndex;o++)s=(s+r[o])*n,a=(a+1)*n;return this._average=s/a,this._average}absDev(){let t=0;for(let r=0,n=this._history.length;r<n;r++)t+=Math.abs(this._history[r]-this._average);return t/this._history.length}}class oi{constructor(t={}){oi.prototype.__init.call(this),this._freeList=[],this._freeCount=0,this._borrowRate=0,this._returnRate=0,this._flowRate=0,this._borrowRateAverage=0,this._reserveCount=t.reserve||0,this._capacityRatio=t.capacityRatio||1.2,this._decayRatio=t.decayRatio||.67,this._marginAverage=0,this._borrowRateAverageProvider=new Yl(128,this._decayRatio),this._marginAverageProvider=new Yl(128,this._decayRatio)}get capacity(){return this._freeList.length}set capacity(t){this._freeList.length=Math.ceil(t)}allocate(){return++this._borrowRate,++this._flowRate,this._freeCount>0?this._freeList[--this._freeCount]:this.create()}allocateArray(t){let r,n;Array.isArray(t)?(r=t,n=t.length):(n=t,r=new Array(n)),this._borrowRate+=n,this._flowRate+=n;let i=0;if(this._freeCount>0){const s=this._freeList,a=Math.min(this._freeCount,n);let o=this._freeCount;for(let l=0;l<a;l++)r[i]=s[o-1],++i,--o;this._freeCount=o}for(;i<n;)r[i]=this.create(),++i;return r}release(t){++this._returnRate,--this._flowRate,this._freeCount===this.capacity&&(this.capacity*=this._capacityRatio),this._freeList[this._freeCount]=t,++this._freeCount}releaseArray(t){this._returnRate+=t.length,this._flowRate-=t.length,this._freeCount+t.length>this.capacity&&(this.capacity=Math.max(this.capacity*this._capacityRatio,this._freeCount+t.length));for(let r=0,n=t.length;r<n;r++)this._freeList[this._freeCount]=t[r],++this._freeCount}reserve(t){if(this._reserveCount=t,this._freeCount<t){const r=this._freeCount-t;for(let n=0;n<r;n++)this._freeList[this._freeCount]=this.create(),++this._freeCount}}limit(t){if(this._freeCount>t){this.capacity>t*this._capacityRatio&&(this.capacity=t*this._capacityRatio);const n=Math.min(this._freeCount,this.capacity);for(let i=t;i<n;i++)this._freeList[i]=null}}startGC(t=Zt.shared){t.add(this._gcTick,null,an.UTILITY)}stopGC(t=Zt.shared){t.remove(this._gcTick)}__init(){this._gcTick=()=>{this._borrowRateAverage=this._borrowRateAverageProvider.next(this._borrowRate),this._marginAverage=this._marginAverageProvider.next(this._freeCount-this._borrowRate);const t=this._borrowRateAverageProvider.absDev();this._flowRate=0,this._borrowRate=0,this._returnRate=0;const r=this._freeCount,n=this._freeList.length;if(r<128&&this._borrowRateAverage<128&&n<128)return;const i=Math.max(this._borrowRateAverage*(this._capacityRatio-1),this._reserveCount);if(this._freeCount>i+t){const s=i+t;this.capacity=Math.min(this._freeList.length,Math.ceil(s)),this._freeCount=this._freeList.length}}}}var ta;const Kl=new Map;class Zl{static build(t){let r=Kl.get(t);return r||(r=new class extends oi{create(){return new t}},Kl.set(t,r),r)}static buildFunctional(t){return new(ta=class extends oi{constructor(...n){super(...n),ta.prototype.__init.call(this)}__init(){this.create=t}},ta)}}const li={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)),h=l*8+(i?4:0)+(s?4:0);if(t.length=h,h===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,f=l*4+(i?2:0)+2,u=f,d=h;{const p=i+a,v=s,g=r+p,y=r-p,b=n+v;if(t[c++]=g,t[c++]=b,t[--f]=b,t[--f]=y,s){const _=n-v;t[u++]=y,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,y=s+Math.sin(v)*o,b=r+g,_=r-g,m=n+y,x=n-y;t[c++]=b,t[c++]=m,t[--f]=m,t[--f]=_,t[u++]=_,t[u++]=x,t[--d]=x,t[--d]=b}{const p=i,v=s+o,g=r+p,y=r-p,b=n+v,_=n-v;t[c++]=g,t[c++]=b,t[--d]=_,t[--d]=g,i&&(t[c++]=y,t[c++]=b,t[--d]=_,t[--d]=y)}},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 h=e.matrix;n.push(e.matrix?h.a*o+h.c*l+h.tx:o,e.matrix?h.b*o+h.d*l+h.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 Ql(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,h=s+1;[e[a],e[l]]=[e[l],e[a]],[e[o],e[h]]=[e[h],e[o]]}}}const Jl={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){Ql(r,!1);const a=[];for(let h=0;h<n.length;h++){const c=n[h];Ql(c.points,!0),a.push(r.length/2),r=r.concat(c.points)}const o=pc(r,a,2);if(!o)return;const l=i.length/2;for(let h=0;h<o.length;h+=3)s.push(o[h]+l),s.push(o[h+1]+l),s.push(o[h+2]+l);for(let h=0;h<r.length;h++)i.push(r[h])}}},iy={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)}},sy={build(e){li.build(e)},triangulate(e,t){li.triangulate(e,t)}};var he=(e=>(e.MITER="miter",e.BEVEL="bevel",e.ROUND="round",e))(he||{}),nr=(e=>(e.BUTT="butt",e.ROUND="round",e.SQUARE="square",e))(nr||{});const Ir={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 tu{static curveTo(t,r,n,i,s,a){const o=a[a.length-2],h=a[a.length-1]-r,c=o-t,f=i-r,u=n-t,d=Math.abs(h*u-c*f);if(d<1e-8||s===0)return(a[a.length-2]!==t||a[a.length-1]!==r)&&a.push(t,r),null;const p=h*h+c*c,v=f*f+u*u,g=h*f+c*u,y=s*Math.sqrt(p)/d,b=s*Math.sqrt(v)/d,_=y*g/p,m=b*g/v,x=y*u+b*c,S=y*f+b*h,w=c*(b+_),T=h*(b+_),N=u*(y+m),A=f*(y+m),E=Math.atan2(T-S,w-x),O=Math.atan2(A-S,N-x);return{cx:x+t,cy:S+r,radius:s,startAngle:E,endAngle:O,anticlockwise:c*f>u*h}}static arc(t,r,n,i,s,a,o,l,h){const c=o-a,f=Ir._segmentsCount(Math.abs(c)*s,Math.ceil(Math.abs(c)/Gn)*40),u=c/(f*2),d=u*2,p=Math.cos(u),v=Math.sin(u),g=f-1,y=g%1/g;for(let b=0;b<=g;++b){const _=b+y*b,m=u+a+d*_,x=Math.cos(m),S=-Math.sin(m);h.push((p*x+v*S)*s+n,(p*-S+v*x)*s+i)}}}class ay{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 ea{static curveLength(t,r,n,i,s,a,o,l){let c=0,f=0,u=0,d=0,p=0,v=0,g=0,y=0,b=0,_=0,m=0,x=t,S=r;for(let w=1;w<=10;++w)f=w/10,u=f*f,d=u*f,p=1-f,v=p*p,g=v*p,y=g*t+3*v*f*n+3*p*u*s+d*o,b=g*r+3*v*f*i+3*p*u*a+d*l,_=x-y,m=S-b,x=y,S=b,c+=Math.sqrt(_*_+m*m);return c}static curveTo(t,r,n,i,s,a,o){const l=o[o.length-2],h=o[o.length-1];o.length-=2;const c=Ir._segmentsCount(ea.curveLength(l,h,t,r,n,i,s,a));let f=0,u=0,d=0,p=0,v=0;o.push(l,h);for(let g=1,y=0;g<=c;++g)y=g/c,f=1-y,u=f*f,d=u*f,p=y*y,v=p*y,o.push(d*l+3*u*y*t+3*f*p*n+v*s,d*h+3*u*y*r+3*f*p*i+v*a)}}function eu(e,t,r,n,i,s,a,o){const l=e-r*i,h=t-n*i,c=e+r*s,f=t+n*s;let u,d;a?(u=n,d=-r):(u=-n,d=r);const p=l+u,v=h+d,g=c+u,y=f+d;return o.push(p,v,g,y),2}function ir(e,t,r,n,i,s,a,o){const l=r-e,h=n-t;let c=Math.atan2(l,h),f=Math.atan2(i-e,s-t);o&&c<f?c+=Math.PI*2:!o&&c>f&&(f+=Math.PI*2);let u=c;const d=f-c,p=Math.abs(d),v=Math.sqrt(l*l+h*h),g=(15*p*Math.sqrt(v)/Math.PI>>0)+1,y=d/g;if(u+=y,o){a.push(e,t,r,n);for(let b=1,_=u;b<g;b++,_+=y)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++,_+=y)a.push(e+Math.sin(_)*v,t+Math.cos(_)*v,e,t);a.push(i,s,e,t)}return g*2}function oy(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 nt(n[0],n[1]),o=new nt(n[n.length-2],n[n.length-1]),l=r.type!==qt.POLY||r.closeStroke,h=Math.abs(a.x-o.x)<i&&Math.abs(a.y-o.y)<i;if(l){n=n.slice(),h&&(n.pop(),n.pop(),o.set(n[n.length-2],n[n.length-1]));const D=(a.x+o.x)*.5,z=(o.y+a.y)*.5;n.unshift(D,z),n.push(D,z)}const c=t.points,f=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 y=n[0],b=n[1],_=n[2],m=n[3],x=0,S=0,w=-(b-m),T=y-_,N=0,A=0,E=Math.sqrt(w*w+T*T);w/=E,T/=E,w*=p,T*=p;const O=s.alignment,R=(1-O)*2,C=O*2;l||(s.cap===nr.ROUND?u+=ir(y-w*(R-C)*.5,b-T*(R-C)*.5,y-w*R,b-T*R,y+w*C,b+T*C,c,!0)+2:s.cap===nr.SQUARE&&(u+=eu(y,b,w,T,R,C,!0,c))),c.push(y-w*R,b-T*R,y+w*C,b+T*C);for(let D=1;D<f-1;++D){y=n[(D-1)*2],b=n[(D-1)*2+1],_=n[D*2],m=n[D*2+1],x=n[(D+1)*2],S=n[(D+1)*2+1],w=-(b-m),T=y-_,E=Math.sqrt(w*w+T*T),w/=E,T/=E,w*=p,T*=p,N=-(m-S),A=_-x,E=Math.sqrt(N*N+A*A),N/=E,A/=E,N*=p,A*=p;const z=_-y,j=b-m,k=_-x,I=S-m,P=z*k+j*I,L=j*k-I*z,G=L<0;if(Math.abs(L)<.001*Math.abs(P)){c.push(_-w*R,m-T*R,_+w*C,m+T*C),P>=0&&(s.join===he.ROUND?u+=ir(_,m,_-w*R,m-T*R,_-N*R,m-A*R,c,!1)+4:u+=2,c.push(_-N*C,m-A*C,_+N*R,m+A*R));continue}const $=(-w+y)*(-T+m)-(-w+_)*(-T+b),M=(-N+x)*(-A+m)-(-N+_)*(-A+S),B=(z*M-k*$)/L,q=(I*$-j*M)/L,H=(B-_)*(B-_)+(q-m)*(q-m),X=_+(B-_)*R,K=m+(q-m)*R,et=_-(B-_)*C,it=m-(q-m)*C,ot=Math.min(z*z+j*j,k*k+I*I),ht=G?R:C,Ct=ot+ht*ht*v,It=H<=Ct;let V=s.join;if(V===he.MITER&&H/v>g&&(V=he.BEVEL),It)switch(V){case he.MITER:{c.push(X,K,et,it);break}case he.BEVEL:{G?c.push(X,K,_+w*C,m+T*C,X,K,_+N*C,m+A*C):c.push(_-w*R,m-T*R,et,it,_-N*R,m-A*R,et,it),u+=2;break}case he.ROUND:{G?(c.push(X,K,_+w*C,m+T*C),u+=ir(_,m,_+w*C,m+T*C,_+N*C,m+A*C,c,!0)+4,c.push(X,K,_+N*C,m+A*C)):(c.push(_-w*R,m-T*R,et,it),u+=ir(_,m,_-w*R,m-T*R,_-N*R,m-A*R,c,!1)+4,c.push(_-N*R,m-A*R,et,it));break}}else{switch(c.push(_-w*R,m-T*R,_+w*C,m+T*C),V){case he.MITER:{G?c.push(et,it,et,it):c.push(X,K,X,K),u+=2;break}case he.ROUND:{G?u+=ir(_,m,_+w*C,m+T*C,_+N*C,m+A*C,c,!0)+2:u+=ir(_,m,_-w*R,m-T*R,_-N*R,m-A*R,c,!1)+2;break}}c.push(_-N*R,m-A*R,_+N*C,m+A*C),u+=2}}y=n[(f-2)*2],b=n[(f-2)*2+1],_=n[(f-1)*2],m=n[(f-1)*2+1],w=-(b-m),T=y-_,E=Math.sqrt(w*w+T*T),w/=E,T/=E,w*=p,T*=p,c.push(_-w*R,m-T*R,_+w*C,m+T*C),l||(s.cap===nr.ROUND?u+=ir(_-w*(R-C)*.5,m-T*(R-C)*.5,_-w*R,m-T*R,_+w*C,m+T*C,c,!1)+2:s.cap===nr.SQUARE&&(u+=eu(_,m,w,T,R,C,!1,c)));const F=t.indices,U=Ir.epsilon*Ir.epsilon;for(let D=d;D<u+d-2;++D)y=c[D*2],b=c[D*2+1],_=c[(D+1)*2],m=c[(D+1)*2+1],x=c[(D+2)*2],S=c[(D+2)*2+1],!(Math.abs(y*(m-S)+_*(S-b)+x*(b-m))<U)&&F.push(D,D+1,D+2)}function ly(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,h=a.length/2;let c=h;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,h)}function ru(e,t){e.lineStyle.native?ly(e,t):oy(e,t)}class ra{static curveLength(t,r,n,i,s,a){const o=t-2*n+s,l=r-2*i+a,h=2*n-2*t,c=2*i-2*r,f=4*(o*o+l*l),u=4*(o*h+l*c),d=h*h+c*c,p=2*Math.sqrt(f+u+d),v=Math.sqrt(f),g=2*f*v,y=2*Math.sqrt(d),b=u/v;return(g*p+v*u*(p-y)+(4*d*f-u*u)*Math.log((2*v+b+p)/(b+y)))/(4*g)}static curveTo(t,r,n,i,s){const a=s[s.length-2],o=s[s.length-1],l=Ir._segmentsCount(ra.curveLength(a,o,t,r,n,i));let h=0,c=0;for(let f=1;f<=l;++f){const u=f/l;h=a+(t-a)*u,c=o+(r-o)*u,s.push(h+(t+(n-t)*u-h)*u,c+(r+(i-r)*u-c)*u)}}}const na={[qt.POLY]:Jl,[qt.CIRC]:li,[qt.ELIP]:li,[qt.RECT]:iy,[qt.RREC]:sy},nu=[],ui=[];class hi{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 hi(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 Nr=new nt,iu=class extends il{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 Qs,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(),ui.push(this.drawCalls[e]);this.drawCalls.length=0;for(let e=0;e<this.batches.length;e++){const t=this.batches[e];t.reset(),nu.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 hi(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 hi(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,Nr):Nr.copyFrom(e),n.shape.contains(Nr.x,Nr.y))){let i=!1;if(n.holes){for(let s=0;s<n.holes.length;s++)if(n.holes[s].shape.contains(Nr.x,Nr.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],h=l.fillStyle,c=l.lineStyle;na[l.type].build(l),l.matrix&&this.transformPoints(l.points,l.matrix),(h.visible||c.visible)&&this.processHoles(l.holes);for(let u=0;u<2;u++){const d=u===0?h: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 y=this.points.length/2-g;y!==0&&(r&&!this._compareStyles(n,d)&&(r.end(v,g),r=null),r||(r=nu.pop()||new ay,r.begin(d,v,g),this.batches.push(r),n=d),this.addUvs(this.points,e,d.texture,g,y,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<iu.BATCHABLE_SIZE*2}buildDrawCalls(){let e=++gt._globalBatch;for(let c=0;c<this.drawCalls.length;c++)this.drawCalls[c].texArray.clear(),ui.push(this.drawCalls[c]);this.drawCalls.length=0;const t=this.colors,r=this.textureIds;let n=ui.pop();n||(n=new Ls,n.texArray=new js),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,h=0;this.drawCalls.push(n);for(let c=0;c<this.batches.length;c++){const f=this.batches[c],u=8,d=f.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=ui.pop(),n||(n=new Ls,n.texArray=new js),this.drawCalls.push(n)),n.start=h,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+=f.size,h+=f.size,a=p._batchLocation,this.addColors(t,d.color,d.alpha,f.attribSize,f.attribStart),this.addTextureIds(r,a,f.attribSize,f.attribStart)}gt._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?Jl.triangulate(e,this):na[e.type].triangulate(e,this)}processLine(e){ru(e,this);for(let t=0;t<e.holes.length;t++)ru(e.holes[t],this)}processHoles(e){for(let t=0;t<e.length;t++){const r=e[t];na[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=Wt.shared.setValue(t).toLittleEndianNumber(),a=Wt.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],f=e[(n+a)*2+1];if(s){const u=s.a*c+s.c*f+s.tx;f=s.b*c+s.d*f+s.ty,c=u}a++,t.push(c/l.width,f/l.height)}const h=r.baseTexture;(l.width<h.width||l.height<h.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,h=o.height/i.height;let c=o.x/o.width,f=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,f-=d;for(let p=r;p<a;p+=2)e[p]=(e[p]+c)*l,e[p+1]=(e[p+1]+f)*h}};let su=iu;su.BATCHABLE_SIZE=100;class ci{constructor(){this.color=16777215,this.alpha=1,this.texture=bt.WHITE,this.matrix=null,this.visible=!1,this.reset()}clone(){const t=new ci;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=bt.WHITE,this.matrix=null,this.visible=!1}destroy(){this.texture=null,this.matrix=null}}class ia extends ci{constructor(){super(...arguments),this.width=0,this.alignment=.5,this.native=!1,this.cap=nr.BUTT,this.join=he.MITER,this.miterLimit=10}clone(){const t=new ia;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 sa={},fi=class extends rr{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 ci,this._lineStyle=new ia,this._matrix=null,this._holeMode=!1,this.state=Un.for2d(),this._geometry=e||new su,this._geometry.refCount++,this._transformID=-1,this._tintColor=new Wt(16777215),this.blendMode=ut.NORMAL}get geometry(){return this._geometry}clone(){return this.finishPoly(),new fi(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:bt.WHITE,color:e!=null&&e.texture?16777215:0,matrix:null,alignment:.5,native:!1,cap:nr.BUTT,join:he.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 tn,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[t-2],e[t-1]))}else this.currentPath=new tn,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),ra.curveTo(e,t,r,n,i),this}bezierCurveTo(e,t,r,n,i,s){return this._initCurve(),ea.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=tu.curveTo(e,t,r,n,i,s);if(a){const{cx:o,cy:l,radius:h,startAngle:c,endAngle:f,anticlockwise:u}=a;this.arc(o,l,h,c,f,u)}return this}arc(e,t,r,n,i,s=!1){if(n===i)return this;if(!s&&i<=n?i+=Gn:s&&n<=i&&(n+=Gn),i-n===0)return this;const o=e+Math.cos(n)*r,l=t+Math.sin(n)*r,h=this._geometry.closePointEps;let c=this.currentPath?this.currentPath.points:null;if(c){const f=Math.abs(c[c.length-2]-o),u=Math.abs(c[c.length-1]-l);f<h&&u<h||c.push(o,l)}else this.moveTo(o,l),c=this.currentPath.points;return tu.arc(o,l,e,t,r,n,i,s,c),this}beginFill(e=0,t){return this.beginTextureFill({texture:bt.WHITE,color:e,alpha:t})}normalizeColor(e){const t=Wt.shared.setValue(e.color??0);e.color=t.toNumber(),e.alpha??(e.alpha=t.alpha)}beginTextureFill(e){const t={texture:bt.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 At(e,t,r,n))}drawRoundedRect(e,t,r,n,i){return this.drawShape(new Bs(e,t,r,n,i))}drawCircle(e,t,r){return this.drawShape(new Fs(e,t,r))}drawEllipse(e,t,r,n){return this.drawShape(new Zd(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 tn(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),h={vertexData:a,blendMode:t,indices:l,uvs:o,_batchRGB:Wt.shared.setValue(s).toRgbArray(),_tintRGB:s,_texture:i.style.texture,alpha:i.style.alpha,worldAlpha:1};this.batches[n]=h}}_renderBatched(e){if(this.batches.length){e.batch.setObjectRenderer(e.plugins[this.pluginName]),this.calculateVertices(),this.calculateTints();for(let t=0,r=this.batches.length;t<r;t++){const n=this.batches[t];n.worldAlpha=this.worldAlpha*n.alpha,e.plugins[this.pluginName].render(n)}}}_renderDirect(e){const t=this._resolveDirectShader(e),r=this._geometry,n=this.worldAlpha,i=t.uniforms,s=r.drawCalls;i.translationMatrix=this.transform.worldTransform,Wt.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(!sa[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 Ot,default:ae.from({uSamplers:i},!0)},a=e.plugins[r]._shader.program;sa[r]=new rn(a,s)}t=sa[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,fi._TEMP_POINT),this._geometry.containsPoint(fi._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=Wt.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,h=this.vertexData;let c=0;for(let f=0;f<l.length;f+=2){const u=l[f],d=l[f+1];h[c++]=r*u+i*d+a,h[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 Re=fi;Re.curves=Ir,Re._TEMP_POINT=new nt;const au={color:16777215,outlineColor:0,outlineThickness:1,radius:8,shape:"tooth"},uy=Re;class hy extends uy{constructor(t,r,n={},i,s,a){super(),this.transformer=t;const o=Object.assign({},au,n);this._handle=r,this._style=o,this.onHandleDelta=i,this.onHandleCommit=s,this._dirty=!0,this.interactive=!0,this.cursor=a||"move",this._pointerDown=!1,this._pointerDragging=!1,this._pointerPosition=new nt,this._pointerMoveTarget=null,this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onpointerdown=this.onPointerDown,this.onpointermove=this.onPointerMove,this.onpointerup=this.onPointerUp,this.onpointerupoutside=this.onPointerUp}get handle(){return this._handle}set handle(t){this._handle=t,this._dirty=!0}get style(){return this._style}set style(t){this._style=Object.assign({},au,t),this._dirty=!0}render(t){this._dirty&&(this.draw(),this._dirty=!1),super.render(t)}draw(){const t=this._handle,r=this._style,n=r.radius;if(this.clear().lineStyle(r.outlineThickness,r.outlineColor).beginFill(r.color),r.shape==="square")this.drawRect(-n/2,-n/2,n,n);else if(r.shape==="tooth")switch(t){case"middleLeft":this.drawPolygon([-n/2,-n/2,-n/2,n/2,n/2,n/2,n*1.1,0,n/2,-n/2]);break;case"topCenter":this.drawPolygon([-n/2,-n/2,n/2,-n/2,n/2,n/2,0,n*1.1,-n/2,n/2]);break;case"middleRight":this.drawPolygon([-n/2,n/2,-n*1.1,0,-n/2,-n/2,n/2,-n/2,n/2,n/2]);break;case"bottomCenter":this.drawPolygon([0,-n*1.1,n/2,-n/2,n/2,n/2,-n/2,n/2,-n/2,-n/2]);break;case"rotator":this.drawCircle(0,0,n/Math.sqrt(2));break;default:this.drawRect(-n/2,-n/2,n,n);break}else this.drawCircle(0,0,n);this.endFill()}onPointerDown(t){this._pointerDown=!0,this._pointerDragging=!1,t.stopPropagation(),this._pointerMoveTarget&&(this._pointerMoveTarget.removeEventListener("globalpointermove",this.onPointerMove),this._pointerMoveTarget=null),this._pointerMoveTarget=this.transformer.stage||this,this._pointerMoveTarget.addEventListener("globalpointermove",this.onPointerMove)}onPointerMove(t){this._pointerDown&&(this._pointerDragging?this.onDrag(t):this.onDragStart(t),t.stopPropagation())}onPointerUp(t){this._pointerDragging&&this.onDragEnd(t),this._pointerDown=!1,this._pointerMoveTarget&&(this._pointerMoveTarget.removeEventListener("globalpointermove",this.onPointerMove),this._pointerMoveTarget=null)}onDragStart(t){this._pointerPosition.copyFrom(t.data.global),this._pointerDragging=!0}onDrag(t){const r=t.data.global;this.onHandleDelta&&this.onHandleDelta(r),this._pointerPosition.copyFrom(r)}onDragEnd(t){this._pointerDragging=!1,this.onHandleCommit&&this.onHandleCommit()}}function di(e,t,r,n){const{x:i,y:s}=r,{x:a,y:o}=n;if(Math.abs(a-i)<.01)return Math.abs(e-i);if(Math.abs(o-s)<.01)return Math.abs(t-s);const l=(o-s)/(a-i);return Math.abs((l*e-t+(o-l*a))/Math.sqrt(l*l+1))}const ou=Zl.build(nt),cy=[new nt,new nt,new nt,new nt],fy=new Ot,Cr=new nt,dy=[0,0,0,1,-1,1,-1,-1,1,-1,1,0],py=[0,0,-1,0,-1,-1,1,-1,1,1,0,1],yy=[0,0,1,0,1,1,-1,1,-1,-1,0,-1],vy=[0,0,0,-1,1,-1,1,1,-1,1,-1,0],aa=new Array(12),my=[dy,py,yy,vy],gy=Re;class by extends gy{constructor(t){super(),this.transformer=t,this.boxScalingHandles=[this.addChild(new Re),this.addChild(new Re),this.addChild(new Re),this.addChild(new Re)],this.boxScalingHandles.forEach(r=>{r.interactive=!0}),this.boxScalingHandles[0].cursor=ln.topCenter,this.boxScalingHandles[1].cursor=ln.middleRight,this.boxScalingHandles[2].cursor=ln.bottomCenter,this.boxScalingHandles[3].cursor=ln.middleLeft}hitHandleType(t,r,n){const{boxRotationEnabled:i,boxRotationTolerance:s,boxScalingEnabled:a,boxScalingTolerance:o}=this.transformer,[l,h,c,f]=t.hull,{x:u,y:d}=r.applyInverse(n,Cr);if(a){const p=di(u,d,l,h)*r.d,v=di(u,d,l,f)*r.a,g=di(u,d,h,c)*r.a,y=di(u,d,f,c)*r.d,b=Math.min(p,v,g,y);if(b<o)switch(b){case p:return"topCenter";case v:return"middleLeft";case g:return"middleRight";case y:return"bottomCenter"}}if(i&&!t.contains(u,d)){const p=Math.sqrt((l.x-u)**2+(l.y-d)**2),v=Math.sqrt((h.x-u)**2+(h.y-d)**2),g=Math.sqrt((f.x-u)**2+(f.y-d)**2),y=Math.sqrt((c.x-u)**2+(c.y-d)**2),b=Math.min(p,v,g,y);if(b<s*1.45)switch(b){case p:return"boxRotateTopLeft";case v:return"boxRotateTopRight";case g:return"boxRotateBottomLeft";case y:return"boxRotateBottomRight"}}return null}drawBounds(t){const r=cy;for(let n=0;n<4;n++)this.transformer.projectToLocal(t.hull[n],r[n]);this.drawPolygon(r)}drawBoxScalingTolerance(t,r=this.transformer.boxScalingTolerance){t.innerBounds.pad(-r);const n=ou.allocateArray(4);n.forEach((s,a)=>{this.projectToLocal(t.hull[a],s)}),t.innerBounds.pad(2.5*r);const i=ou.allocateArray(4);i.forEach((s,a)=>{this.projectToLocal(t.hull[a],s)}),t.innerBounds.pad(-1.5*this.transformer.boxScalingTolerance);for(let s=0;s<4;s++){const a=n[s],o=n[(s+1)%4],l=i[s],h=i[(s+1)%4];this.boxScalingHandles[s].clear().beginFill(16777215,1e-4).drawPolygon(a,l,h,o).endFill()}}drawBoxRotationTolerance(){const{boxRotateTopLeft:t,boxRotateTopRight:r,boxRotateBottomLeft:n,boxRotateBottomRight:i}=this.transformer.handleAnchors,s=this.transformer.boxRotationTolerance*2,a=fy.identity().scale(s,s).rotate(this.transformer.getGroupBounds().rotation);for(let o=0;o<4;o++){const l=my[o];let h;switch(o){case 0:h=t;break;case 1:h=r;break;case 2:h=n;break;case 3:h=i;break}for(let c=0;c<l.length;c+=2){const f=l[c],u=l[c+1];Cr.set(f,u),a.apply(Cr,Cr),aa[c]=Cr.x+h.x,aa[c+1]=Cr.y+h.y}this.drawPolygon(aa.slice())}}projectToLocal(t,r){return this.transformer.projectToLocal(t,r)}}const lu=new Ot;function uu(e){const t=lu.identity();return t.c=Math.tan(e),t}function hu(e){const t=lu.identity();return t.b=Math.tan(e),t}function cu(e,t,r,n=e.pivot){const i=t.a,s=t.b,a=t.c,o=t.d,l=-Math.atan2(-a,o),h=Math.atan2(s,i);return r=r??h,e.pivot.set(n.x,n.y),e.rotation=r,e.skew.x=r+l,e.skew.y=-r+h,e.scale.x=Math.sqrt(i*i+s*s),e.scale.y=Math.sqrt(a*a+o*o),e.position.x=t.tx+(n.x*t.a+n.y*t.c),e.position.y=t.ty+(n.x*t.b+n.y*t.d),e}const pi=new Ot,_y=new Ot;function xy(e,t,r){if(!r){const s=e.parent?e.parent:e.enableTempParent();e.updateTransform(),e.disableTempParent(s)}const n=e.worldTransform,i=e.parent?_y.copyFrom(e.parent.worldTransform):Ot.IDENTITY;pi.copyFrom(n),pi.prepend(t),pi.prepend(i.invert()),cu(e.transform,pi)}const yi=new Hn,wy=[new nt,new nt,new nt,new nt],kr=new Ot,Pr=new nt,oa=new ai,Ey=new At,fu=[new nt,new nt,new nt,new nt],du=new nt,pu=new Ot,vi=Zl.build(nt),ln={topLeft:"nw-resize",topCenter:"n-resize",topRight:"ne-resize",middleLeft:"w-resize",middleRight:"e-resize",bottomLeft:"sw-resize",bottomCenter:"s-resize",bottomRight:"se-resize"},mi=["topLeft","topCenter","topRight","middleLeft","middleCenter","middleRight","bottomLeft","bottomCenter","bottomRight"],yu={topLeft:{x:-1,y:-1},topCenter:{x:0,y:-1},topRight:{x:1,y:-1},middleLeft:{x:-1,y:0},middleCenter:{x:0,y:0},middleRight:{x:1,y:0},bottomLeft:{x:-1,y:1},bottomCenter:{x:0,y:1},bottomRight:{x:1,y:1}},Ty=[...mi,"rotator","skewHorizontal","skewVertical"],Ay=4,Sy=16,Oy=[Math.PI/4,Math.PI/2,Math.PI*3/4,Math.PI,0,-Math.PI/4,-Math.PI/2,-Math.PI*3/4,-Math.PI],Ry=Math.PI/90,Iy=[Math.PI/4,-Math.PI/4],Ny=Math.PI/90,vu={color:0,thickness:2},Cy=rr;let ky=class re extends Cy{constructor(t={}){super(),re.prototype.__init.call(this),re.prototype.__init2.call(this),re.prototype.__init3.call(this),re.prototype.__init4.call(this),re.prototype.__init5.call(this),this.interactive=!0,this.cursors=Object.assign({default:"move"},t.cursors),this.cursor=this.cursors.default,this.boundingBoxes=t.boundingBoxes||"all",this.group=t.group||[],this.boxRotationTolerance=t.boxRotationTolerance||Sy,this.boxScalingTolerance=t.boxScalingTolerance||Ay,this.centeredScaling=!!t.centeredScaling,this.projectionTransform=new Ot,this.lockAspectRatio=t.lockAspectRatio===!0,this.rotationSnaps=t.rotationSnaps||Oy,this.rotationSnapTolerance=t.rotationSnapTolerance!==void 0?t.rotationSnapTolerance:Ry,this.skewRadius=t.skewRadius||64,this.skewSnaps=t.skewSnaps||Iy,this.skewSnapTolerance=t.skewSnapTolerance!==void 0?t.skewSnapTolerance:Ny,this.boxRotationEnabled=t.boxRotationEnabled===!0,this.boxScalingEnabled=t.boxScalingEnabled===!0,this._rotateEnabled=t.rotateEnabled!==!1,this._scaleEnabled=t.scaleEnabled!==!1,this._skewEnabled=t.skewEnabled===!0,this.translateEnabled=t.translateEnabled!==!1,this.transientGroupTilt=t.transientGroupTilt!==void 0?t.transientGroupTilt:!0,this.wireframe=this.addChild(new by(this)),this.wireframe.cursor="none",this.stage=t.stage||null,this._skewX=0,this._skewY=0,this._transformType="none",this._wireframeStyle=Object.assign({},vu,t.wireframeStyle||{});const r=t.handleConstructor||hy,n=t.handleStyle||{};this._handleStyle=n;const i={rotator:this.addChild(new r(this,"rotator",n,o=>{this.rotateGroup("rotator",o)},this.commitGroup))},s=mi.reduce((o,l)=>{const h=new r(this,l,n,null,this.commitGroup,ln[l]);return h.onHandleDelta=c=>{this.scaleGroup(h.handle,c)},h.visible=this._scaleEnabled,o[l]=h,this.addChild(o[l]),o},{}),a={skewHorizontal:this.addChild(new r(this,"skewHorizontal",n,o=>{this.skewGroup("skewHorizontal",o)},this.commitGroup,"pointer")),skewVertical:this.addChild(new r(this,"skewVertical",n,o=>{this.skewGroup("skewVertical",o)},this.commitGroup,"pointer"))};this.handles=Object.assign({},s,i,a),this.handles.middleCenter.visible=!1,this.handles.skewHorizontal.visible=this._skewEnabled,this.handles.skewVertical.visible=this._skewEnabled,this.handleAnchors={rotator:new nt,boxRotateTopLeft:new nt,boxRotateTopRight:new nt,boxRotateBottomLeft:new nt,boxRotateBottomRight:new nt,topLeft:new nt,topCenter:new nt,topRight:new nt,middleLeft:new nt,middleCenter:new nt,middleRight:new nt,bottomLeft:new nt,bottomCenter:new nt,bottomRight:new nt,skewHorizontal:new nt,skewVertical:new nt},this.groupBounds=new ai,this.updateGroupBounds(),this._pointerDown=!1,this._pointerDragging=!1,this._pointerPosition=new nt,this._pointerMoveTarget=null,this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.addEventListener("pointerdown",this.onPointerDown),this.addEventListener("pointerup",this.onPointerUp),this.addEventListener("pointerupoutside",this.onPointerUp)}get enabledHandles(){return this._enabledHandles}set enabledHandles(t){!this._enabledHandles&&!t||(this._enabledHandles=t,Ty.forEach(r=>{this.handles[r].visible=!1}),t?t.forEach(r=>{this.handles[r].visible=!0}):(this.handles.rotator.visible=this._rotateEnabled,this.handles.skewHorizontal.visible=this._skewEnabled,this.handles.skewVertical.visible=this._skewEnabled,mi.forEach(r=>{r!=="middleCenter"&&(this.handles[r].visible=this._scaleEnabled)})))}get handleStyle(){return this._handleStyle}set handleStyle(t){const r=this.handles;for(const n in r)r[n].style=t;this._handleStyle=t}get rotateEnabled(){return this._rotateEnabled}set rotateEnabled(t){if(this._rotateEnabled!==t){if(this._rotateEnabled=t,this._enabledHandles)return;this.handles.rotator.visible=t}}get scaleEnabled(){return this._scaleEnabled}set scaleEnabled(t){if(this._scaleEnabled!==t){if(this._scaleEnabled=t,this._enabledHandles)return;mi.forEach(r=>{r!=="middleCenter"&&(this.handles[r].visible=t)})}}get skewEnabled(){return this._skewEnabled}set skewEnabled(t){if(this._skewEnabled!==t){if(this._skewEnabled=t,this._enabledHandles)return;this.handles.skewHorizontal.visible=t,this.handles.skewVertical.visible=t}}get transformType(){return this._transformType}get wireframeStyle(){return this._wireframeStyle}set wireframeStyle(t){this._wireframeStyle=Object.assign({},vu,t)}getGroupBounds(t=!1){return t&&this.updateGroupBounds(),this.groupBounds}__init(){this.translateGroup=t=>{this._transformHandle=null,this._transformType="translate";const r=kr.identity().translate(t.x,t.y);this.prependTransform(r)}}__init2(){this.rotateGroup=(t,r)=>{this._transformHandle=t,this._transformType="rotate";const n=this.groupBounds,i=this.worldTransform.apply(this.handleAnchors[t],Pr);this.projectionTransform.applyInverse(i,i),r=this.projectionTransform.applyInverse(r,du);const s=n.center,a=Math.atan2(i.y-s.y,i.x-s.x);let l=Math.atan2(r.y-s.y,r.x-s.x)-a,h=this.groupBounds.rotation+l;h=this.snapAngle(h,this.rotationSnapTolerance,this.rotationSnaps),l=h-this.groupBounds.rotation;const c=kr.identity().translate(-s.x,-s.y).rotate(l).translate(s.x,s.y);this.prependTransform(c,!0),this.updateGroupBounds(h),this._skewX+=l,this._skewY+=l}}__init3(){this.scaleGroup=(t,r)=>{this._transformHandle=t,this._transformType="scale";const n=yu[t].x,i=yu[t].y,s=this.handles,a=this.groupBounds,o=a.rotation,l=a.innerBounds,h=this.worldTransform.apply(this.handleAnchors[t],Pr);this.projectionTransform.applyInverse(h,h),r=this.projectionTransform.applyInverse(r,du);const c=r.x-h.x,f=r.y-h.y,u=(a.topRight.x-a.topLeft.x)/l.width,d=(a.topRight.y-a.topLeft.y)/l.width,p=(a.bottomLeft.x-a.topLeft.x)/l.height,v=(a.bottomLeft.y-a.topLeft.y)/l.height,g=c*u+f*d,y=c*p+f*v;let b=1+g*n/l.width,_=1+y*i/l.height;this.lockAspectRatio&&(t==="topLeft"||t==="topRight"||t==="bottomLeft"||t==="bottomRight")&&(b>_?_=b:b=_);const x=kr.identity();if(n!==0&&b!==0){const S=this.centeredScaling?a.center:n===1?a.topLeft:a.topRight;x.translate(-S.x,-S.y).rotate(-o).scale(b,1).rotate(o).translate(S.x,S.y)}if(i!==0&&_!==0){const S=this.centeredScaling?a.center:i===1?a.topLeft:a.bottomLeft;x.translate(-S.x,-S.y).rotate(-o).scale(1,_).rotate(o).translate(S.x,S.y)}if((_<0||b<0)&&!(_<0&&b<0))switch(t){case"topLeft":case"bottomLeft":this.swapHandles(s.topLeft,s.bottomLeft);break;case"topCenter":case"bottomCenter":this.swapHandles(s.topCenter,s.bottomCenter);break;case"topRight":case"bottomRight":this.swapHandles(s.topRight,s.bottomRight);break}this.prependTransform(x)}}__init4(){this.skewGroup=(t,r)=>{this._transformHandle=t,this._transformType="skew";const n=this.groupBounds,i=Pr.copyFrom(r);this.projectionTransform.applyInverse(i,i);const s=n.center,a=kr.identity().translate(-s.x,-s.y);let o=this.groupBounds.rotation;if(t==="skewHorizontal"){const l=this._skewX;this._skewX=Math.atan2(i.y-s.y,i.x-s.x),this._skewX=this.snapAngle(this._skewX,this.skewSnapTolerance,this.skewSnaps),a.prepend(hu(-l)),a.prepend(hu(this._skewX))}else{const l=this._skewY,h=Math.atan2(i.y-s.y,i.x-s.x)-Math.PI/2;this._skewY=h,this._skewY=this.snapAngle(this._skewY,this.skewSnapTolerance,this.skewSnaps),a.prepend(uu(l)),a.prepend(uu(-this._skewY)),o-=this._skewY-l}a.translate(s.x,s.y),this.prependTransform(a,!0),this.updateGroupBounds(o)}}__init5(){this.commitGroup=()=>{this._transformHandle=null,this._transformType="none",this.transientGroupTilt!==!1&&this.group.length>1&&this.updateGroupBounds(0),this.emit("transformcommit")}}render(t){this.renderable&&this.visible&&(!this.lazyMode||this.lazyDirty)&&this.draw(),super.render(t)}draw(){const t=this.group,{color:r,thickness:n}=this._wireframeStyle;this.wireframe.clear(),this.boundingBoxes!=="none"&&this.wireframe.lineStyle(n,r),this.translateEnabled&&this.wireframe.beginFill(16777215,1e-4);for(let s=0,a=t.length;s<a&&this.boundingBoxes==="all";s++)this.wireframe.drawBounds(re.calculateOrientedBounds(t[s],oa));const i=t.length!==1?re.calculateGroupOrientedBounds(t,this.groupBounds.rotation,oa,!0):re.calculateOrientedBounds(t[0],oa);this.wireframe.drawBounds(i),this.drawHandles(i),this.groupBounds.copyFrom(i),this.boxRotationEnabled&&(this.wireframe.closePath().beginFill(16777215,1e-4).lineStyle(),this.wireframe.drawBoxRotationTolerance()),this.boxScalingEnabled&&(this.wireframe.closePath().beginFill(16773375,1e-4).lineStyle(),this.wireframe.drawBoxScalingTolerance(i)),this.lazyDirty=!1}drawHandles(t){const r=this.handles,n=this.handleAnchors,{topLeft:i,topRight:s,bottomLeft:a,bottomRight:o,center:l}=t,[h,c,f,u]=fu,d=Pr;if(this.projectToLocal(i,h),this.projectToLocal(s,c),this.projectToLocal(a,f),this.projectToLocal(o,u),this.projectToLocal(l,d),n.topLeft.copyFrom(h),n.topCenter.set((h.x+c.x)/2,(h.y+c.y)/2),n.topRight.copyFrom(c),n.middleLeft.set((h.x+f.x)/2,(h.y+f.y)/2),n.middleCenter.set((h.x+u.x)/2,(h.y+u.y)/2),n.middleRight.set((c.x+u.x)/2,(c.y+u.y)/2),n.bottomLeft.copyFrom(f),n.bottomCenter.set((f.x+u.x)/2,(f.y+u.y)/2),n.bottomRight.copyFrom(u),this.boxRotationEnabled&&(n.boxRotateTopLeft.copyFrom(n.topLeft),n.boxRotateTopRight.copyFrom(n.topRight),n.boxRotateBottomLeft.copyFrom(n.bottomLeft),n.boxRotateBottomRight.copyFrom(n.bottomRight)),this._rotateEnabled){const p=(h.x+c.x)/2,v=(h.y+c.y)/2;let g=-(h.y-c.y),y=h.x-c.x;const b=Math.sqrt(g*g+y*y);g*=32/b,y*=32/b,r.rotator.position.x=p+g,r.rotator.position.y=v+y,this.wireframe.moveTo(p,v).lineTo(r.rotator.position.x,r.rotator.position.y),this.handleAnchors.rotator.copyFrom(r.rotator.position)}if(this._skewEnabled){const p=d.x,v=d.y;this.worldTransform.apply(d,d),n.skewHorizontal.set(d.x+Math.cos(this._skewX)*this.skewRadius,d.y+Math.sin(this._skewX)*this.skewRadius),n.skewVertical.set(d.x+-Math.sin(this._skewY)*this.skewRadius,d.y+Math.cos(this._skewY)*this.skewRadius),this.worldTransform.applyInverse(n.skewHorizontal,n.skewHorizontal),this.worldTransform.applyInverse(n.skewVertical,n.skewVertical),d.set(p,v),this.wireframe.beginFill(this.wireframeStyle.color).drawCircle(d.x,d.y,this.wireframeStyle.thickness*2).endFill(),this.wireframe.moveTo(d.x,d.y).lineTo(r.skewHorizontal.x,r.skewHorizontal.y).moveTo(d.x,d.y).lineTo(r.skewVertical.x,r.skewVertical.y)}for(const p in r){let v=this.groupBounds.rotation;p==="skewHorizontal"?v=this._skewX:p==="skewVertical"&&(v=this._skewY);const g=r[p];g.rotation=v,g.position.copyFrom(n[p]),g.getBounds(!1,Ey)}}onPointerDown(t){this._pointerDown=!0,this._pointerDragging=!1,t.stopPropagation(),this._pointerMoveTarget&&(this._pointerMoveTarget.removeEventListener("globalpointermove",this.onPointerMove),this._pointerMoveTarget=null),this._pointerMoveTarget=this.stage||this,this._pointerMoveTarget.addEventListener("globalpointermove",this.onPointerMove)}onPointerMove(t){const r=this._pointerPosition,n=vi.allocate().copyFrom(t.data.global),i=this.wireframe.hitHandleType(this.groupBounds,this.projectionTransform,n);if(!this._pointerDown)this.setCursorFromHoveredHandle(i);else{const s=n.x,a=n.y;if(this._pointerDragging)switch(this._transformHandle){case"boxRotateTopLeft":case"boxRotateTopRight":case"boxRotateBottomLeft":case"boxRotateBottomRight":this.rotateGroup(this._transformHandle,n);break;case"topCenter":case"middleLeft":case"middleRight":case"bottomCenter":this.scaleGroup(this._transformHandle,n);break;default:if(this.translateEnabled){const[o,l,h]=fu;o.set(0,0),l.set(n.x-r.x,n.y-r.y),this.projectionTransform.applyInverse(o,o),this.projectionTransform.applyInverse(l,l),h.set(l.x-o.x,l.y-o.y),this.translateGroup(h)}}else this._transformHandle=this.wireframe.hitHandleType(this.groupBounds,this.projectionTransform,n),this.setCursorFromHoveredHandle(i);this._pointerPosition.x=s,this._pointerPosition.y=a,this._pointerDragging=!0,t.stopPropagation()}vi.release(n)}onPointerUp(t){this._pointerDragging=!1,this._pointerDown=!1,this.commitGroup(),t.stopPropagation(),this._pointerMoveTarget&&(this._pointerMoveTarget.removeEventListener("globalpointermove",this.onPointerMove),this._pointerMoveTarget=null)}prependTransform(t,r=!1){const n=this.group;for(let i=0,s=n.length;i<s;i++)xy(n[i],t,!1);pu.copyFrom(t),r||this.updateGroupBounds(),this.emit("transformchange",pu)}updateGroupBounds(t=this.groupBounds.rotation){re.calculateGroupOrientedBounds(this.group,t,this.groupBounds),this.drawHandles(this.groupBounds),this.lazyDirty=!0}snapAngle(t,r,n){if(t=t%(Math.PI*2),!n||n.length===1||!r)return t;for(let i=0,s=n.length;i<s;i++)if(Math.abs(t-n[i])<=r)return n[i];return t}swapHandles(t,r){const n=t.handle,i=r.handle,s=t.cursor,a=r.cursor,o=t.x,l=r.x,h=t.y,c=r.y;t.handle=i,r.handle=n,t.position.set(l,c),r.position.set(o,h),t.cursor=a,r.cursor=s,this.handles[n]=r,this.handles[i]=t,this._transformHandle===n?this._transformHandle=i:this._transformHandle===i&&(this._transformHandle=n)}setCursorFromHoveredHandle(t){if(t&&t.startsWith("boxRotate"))this.cursor=this.cursors.boxRotate||this.cursors.default;else if(t)switch(t){case"topCenter":this.cursor=this.cursors.boxScaleTop||this.cursors.default;break;case"middleLeft":this.cursor=this.cursors.boxScaleLeft||this.cursors.default;break;case"middleRight":this.cursor=this.cursors.boxScaleRight||this.cursors.default;break;case"bottomCenter":this.cursor=this.cursors.boxScaleBottom||this.cursors.default;break}else this.cursor=this.cursors.translate||this.cursors.default}projectToLocal(t,r){return r||(r=new nt),this.projectionTransform.apply(t,r),this.worldTransform.applyInverse(r,r),r}static calculateTransformedCorners(t,r=t.worldTransform,n,i=0){const s=t.getLocalBounds();return t.getBounds(),n=n||[new nt,new nt,new nt,new nt],n[i].set(s.x,s.y),n[i+1].set(s.x+s.width,s.y),n[i+2].set(s.x+s.width,s.y+s.height),n[i+3].set(s.x,s.y+s.height),r.apply(n[i],n[i]),r.apply(n[i+1],n[i+1]),r.apply(n[i+2],n[i+2]),r.apply(n[i+3],n[i+3]),n}static calculateOrientedBounds(t,r){const n=t.parent?t.parent:t.enableTempParent();t.updateTransform(),t.disableTempParent(n),cu(yi,t.worldTransform),yi.updateLocalTransform();const i=yi.rotation,s=re.calculateTransformedCorners(t,t.worldTransform,wy),a=(s[0].x+s[1].x+s[2].x+s[3].x)/4,o=(s[0].y+s[1].y+s[2].y+s[3].y)/4,l=kr.identity().translate(-a,-o).rotate(-yi.rotation).translate(a,o);return l.apply(s[0],s[0]),l.apply(s[1],s[1]),l.apply(s[2],s[2]),l.apply(s[3],s[3]),r=r||new ai,r.rotation=i,r.innerBounds.x=Math.min(s[0].x,s[1].x,s[2].x,s[3].x),r.innerBounds.y=Math.min(s[0].y,s[1].y,s[2].y,s[3].y),r.innerBounds.width=Math.max(s[0].x,s[1].x,s[2].x,s[3].x)-r.innerBounds.x,r.innerBounds.height=Math.max(s[0].y,s[1].y,s[2].y,s[3].y)-r.innerBounds.y,r}static calculateGroupOrientedBounds(t,r,n,i=!1){const s=t.length,a=vi.allocateArray(s*4);for(let u=0;u<s;u++){const d=t[u];if(!i){const p=d.parent?d.parent:d.enableTempParent();d.updateTransform(),d.disableTempParent(p)}re.calculateTransformedCorners(d,d.worldTransform,a,u*4)}const o=kr.identity().rotate(-r);let l=Number.MAX_VALUE,h=Number.MAX_VALUE,c=-Number.MAX_VALUE,f=-Number.MAX_VALUE;for(let u=0,d=a.length;u<d;u++){const p=a[u];o.apply(p,p);const v=p.x,g=p.y;l=v<l?v:l,h=g<h?g:h,c=v>c?v:c,f=g>f?g:f}return vi.releaseArray(a),n=n||new ai,n.innerBounds.x=l,n.innerBounds.y=h,n.innerBounds.width=c-l,n.innerBounds.height=f-h,n.rotation=r,o.applyInverse(n.center,Pr),n.center.copyFrom(Pr),n}};function Py(e,t,r,n){for(const i in t){const s=r[i],a=n[i],o=t[i];s!==a&&(s&&e.off(o,s),a&&e.on(o,a))}}const gi={},My=Ot.IDENTITY,Ly={transformchange:"transformchange",transformcommit:"transformcommit"},Fy=yt.PixiComponent("Transformer",{create:e=>new ky(e),applyProps(e,t,r){if(yt.applyDefaultProps(e,t,r),Py(e,Ly,t,r),r.cursors&&Object.assign(e.cursors,r.cursors),e.group=r.group||[],e.boundingBoxes=r.boundingBoxes||"all",e.boxScalingEnabled=r.boxScalingEnabled===!0,e.boxScalingTolerance=r.boxScalingTolerance!==void 0?r.boxScalingTolerance:e.boxScalingTolerance,e.boxRotationEnabled=r.boxRotationEnabled===!0,e.boxRotationTolerance=r.boxRotationTolerance!==void 0?r.boxRotationTolerance:e.boxRotationTolerance,e.centeredScaling=r.centeredScaling,e.enabledHandles=r.enabledHandles,e.lockAspectRatio=r.lockAspectRatio,e.projectionTransform.copyFrom(r.projectionTransform||My),e.skewRadius=r.skewRadius||e.skewRadius,e.rotateEnabled=r.rotateEnabled!==!1,e.scaleEnabled=r.scaleEnabled!==!1,e.skewEnabled=r.skewEnabled===!0,e.translateEnabled=r.translateEnabled!==!1,e.transientGroupTilt=r.transientGroupTilt,t.handleConstructor!==r.handleConstructor)throw new Error("Transformer does not support changing the TransformerHandleConstructor!");t.rotationSnaps!==r.rotationSnaps&&(e.rotationSnaps=r.rotationSnaps),t.rotationSnapTolerance!==r.rotationSnapTolerance&&(e.rotationSnapTolerance=r.rotationSnapTolerance),t.skewSnaps!==r.skewSnaps&&(e.skewSnaps=r.skewSnaps),t.skewSnapTolerance!==r.skewSnapTolerance&&(e.skewSnapTolerance=r.skewSnapTolerance);const n=t.handleStyle||gi,i=r.handleStyle||gi;(n.color!==i.color||n.outlineColor!==i.outlineColor||n.outlineThickness!==i.outlineThickness||n.radius!==i.radius||n.shape!==i.shape)&&(e.handleStyle=i);const s=t.wireframeStyle||gi,a=r.wireframeStyle||gi;(s.color!==a.color||s.thickness!==a.thickness)&&(e.wireframeStyle=a)}}),la=({pixiTransformerRef:e,imageRef:t,isMounted:r,transformCommit:n,transformChange:i,mouseoverEvent:s,onDoubleClick:a,uniqueId:o=""})=>{console.log("transformer props",{pixiTransformerRef:e,imageRef:t,isMounted:r,transformCommit:n,transformChange:i,mouseoverEvent:s,onDoubleClick:a,uniqueId:o});const l=ne.utils.string2hex("#F3C409"),h=ne.utils.string2hex("#F3C409"),c=lt.useRef({isDragging:!1}),f=lt.useCallback(()=>{s&&!c.current.isDragging&&s(!0)},[s]),u=lt.useCallback(()=>{s&&!c.current.isDragging&&s(!1)},[s]),d=lt.useCallback(()=>{c.current.isDragging=!0},[]),p=lt.useCallback(()=>{c.current.isDragging=!1},[]),v=lt.useCallback(y=>{c.current.isDragging=!0,i&&i(y)},[i]),g=lt.useCallback(()=>{if(t.current===null)return;const y=t.current.x,b=t.current.y,_=t.current.width,m=t.current.height,x=t.current.rotation,S=[t.current.scale.x,t.current.scale.y];n&&n({uniqueId:o,transformation:{x:Math.round(y),y:Math.round(b),width:Math.round(Math.max(5,_)),height:Math.round(Math.max(5,m)),rotate:Math.round(x),scale:S}}),c.current.isDragging=!1},[n]);return lt.useEffect(()=>(e.current&&(e.current.on("mouseover",f),e.current.on("mouseout",u),e.current.on("mousedown",d),e.current.on("mouseup",p)),()=>{e.current&&(e.current.off("mouseover",f),e.current.off("mouseout",u),e.current.off("mousedown",d),e.current.off("mouseup",p))}),[]),ft.jsx(Fy,{ref:e,group:r?[t.current]:[],rotateEnabled:!0,boxRotationEnabled:!0,centeredScaling:!0,boxScalingEnabled:!0,wireframeStyle:{thickness:1,color:h},lockAspectRatio:!0,scaleEnabled:!0,handleStyle:{outlineColor:l,shape:"circle",radius:9},transformchange:v,transformcommit:g})};var bi={};Object.defineProperty(bi,"__esModule",{value:!0});var By=J,ua;function mu(){return ua||(ua=document.createElement("div")),ua}function Dy(e,t,r){var n;return By.useEffect(function(){n=n||mu();var i=function(s){var a=s.detail;t(a)};return n.addEventListener(e,i,!1),function(){n==null||n.removeEventListener(e,i,!1)}},r),function(i){n=i}}function Uy(e,t){var r=mu(),n=new CustomEvent(e,{detail:t});r.dispatchEvent(n)}function jy(){var e;function t(r){e=r}return t.emit=function(r,n){var i=new CustomEvent(r,{bubbles:!0,detail:n});e==null||e.dispatchEvent(i)},t}var gu=bi.emitCustomEvent=Uy;bi.newCustomEventEmitter=jy;var un=bi.useCustomEventListener=Dy;const Mr=lt.createContext({}),je={STOP:"GSAP_STOP",PAUSE:"GSAP_PAUSE",PLAY:"GSAP_PLAY",RESUME:"GSAP_RESUME",RESTART:"GSAP_RESTART",REPEAT:"GSAP_REPEAT",SEEK:"GSAP_SEEK",RESET:"GSAP_RESET",DRAGGING_START:"GSAP_DRAGGING_START",DRAGGING_END:"GSAP_DRAGGING_END"},Gy=({children:e})=>{const[t,r]=J.useState(!1),[n,i]=J.useState(!1),s=J.useRef(),a=J.useRef(),o=J.useRef(.001);J.useLayoutEffect(()=>(a.current=ye.context(()=>{s.current&&s.current.progress(0).kill(),s.current=ye.timeline({paused:!0,defaults:{duration:0}})}),()=>a.current.revert()),[]);const l=J.useCallback(()=>{let b=s.current.time();o.current=b},[]);J.useEffect(()=>{const y=s.current;y.eventCallback("onStart",function(){}).eventCallback("onInterrupt",function(){y.pause(),l()}).eventCallback("onUpdate",function(){l()}).eventCallback("onPause",function(){console.log("onPause",y.progress()),l()}).eventCallback("onResume",function(){console.log("onResume",y.progress()),l()}).eventCallback("onComplete",function(){y.seek(0),y.pause(),l()})},[]);const h=J.useCallback(()=>{s.current.revert()},[]),c=J.useCallback(()=>{s.current.restart(),r(!0)},[]),f=J.useCallback(()=>{const y=s.current;y.repeat(1),y.restart()},[]),u=J.useCallback(y=>{s.current.seek(y)},[]),d=J.useCallback(()=>{s.current.seek(4)},[]),p=J.useCallback(()=>{const y=s.current;return y?y.totalDuration():0},[]),v=()=>{s.current.pause(),gu(je.PAUSE),r(!1)},g=()=>{const y=s.current;r(!0),y.resume(),gu(je.RESUME)};return un(je.DRAGGING_START,()=>{console.log("dragging start"),i(!0)}),un(je.DRAGGING_END,()=>{i(!1),console.log("dragging end")}),console.log("set play updated",t),ft.jsx(Mr.Provider,{value:{gsapCtx:a,tl:s,handlePlay:g,handlePause:v,handleReset:h,handleSeek:u,handleSeekTest:d,handleRestart:c,handleRepeat:f,playerTimeRef:o,isDragging:n,getTimelineDuration:p},children:e})},ha=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 $y=Object.prototype;function qy(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||$y;return e===r}var bu=qy;function Hy(e,t){return function(r){return e(t(r))}}var zy=Hy,Vy=zy,Xy=Vy(Object.keys,Object),Wy=Xy,Yy=bu,Ky=Wy,Zy=Object.prototype,Qy=Zy.hasOwnProperty;function Jy(e){if(!Yy(e))return Ky(e);var t=[];for(var r in Object(e))Qy.call(e,r)&&r!="constructor"&&t.push(r);return t}var _u=Jy,tv=typeof ke=="object"&&ke&&ke.Object===Object&&ke,xu=tv,ev=xu,rv=typeof self=="object"&&self&&self.Object===Object&&self,nv=ev||rv||Function("return this")(),Ie=nv,iv=Ie,sv=iv.Symbol,_i=sv,wu=_i,Eu=Object.prototype,av=Eu.hasOwnProperty,ov=Eu.toString,hn=wu?wu.toStringTag:void 0;function lv(e){var t=av.call(e,hn),r=e[hn];try{e[hn]=void 0;var n=!0}catch{}var i=ov.call(e);return n&&(t?e[hn]=r:delete e[hn]),i}var uv=lv,hv=Object.prototype,cv=hv.toString;function fv(e){return cv.call(e)}var dv=fv,Tu=_i,pv=uv,yv=dv,vv="[object Null]",mv="[object Undefined]",Au=Tu?Tu.toStringTag:void 0;function gv(e){return e==null?e===void 0?mv:vv:Au&&Au in Object(e)?pv(e):yv(e)}var cn=gv;function bv(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ca=bv,_v=cn,xv=ca,wv="[object AsyncFunction]",Ev="[object Function]",Tv="[object GeneratorFunction]",Av="[object Proxy]";function Sv(e){if(!xv(e))return!1;var t=_v(e);return t==Ev||t==Tv||t==wv||t==Av}var Su=Sv,Ov=Ie,Rv=Ov["__core-js_shared__"],Iv=Rv,fa=Iv,Ou=function(){var e=/[^.]+$/.exec(fa&&fa.keys&&fa.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Nv(e){return!!Ou&&Ou in e}var Cv=Nv,kv=Function.prototype,Pv=kv.toString;function Mv(e){if(e!=null){try{return Pv.call(e)}catch{}try{return e+""}catch{}}return""}var Ru=Mv,Lv=Su,Fv=Cv,Bv=ca,Dv=Ru,Uv=/[\\^$.*+?()[\]{}|]/g,jv=/^\[object .+?Constructor\]$/,Gv=Function.prototype,$v=Object.prototype,qv=Gv.toString,Hv=$v.hasOwnProperty,zv=RegExp("^"+qv.call(Hv).replace(Uv,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Vv(e){if(!Bv(e)||Fv(e))return!1;var t=Lv(e)?zv:jv;return t.test(Dv(e))}var Xv=Vv;function Wv(e,t){return e==null?void 0:e[t]}var Yv=Wv,Kv=Xv,Zv=Yv;function Qv(e,t){var r=Zv(e,t);return Kv(r)?r:void 0}var Lr=Qv,Jv=Lr,tm=Ie,em=Jv(tm,"DataView"),rm=em,nm=Lr,im=Ie,sm=nm(im,"Map"),da=sm,am=Lr,om=Ie,lm=am(om,"Promise"),um=lm,hm=Lr,cm=Ie,fm=hm(cm,"Set"),dm=fm,pm=Lr,ym=Ie,vm=pm(ym,"WeakMap"),mm=vm,pa=rm,ya=da,va=um,ma=dm,ga=mm,Iu=cn,Fr=Ru,Nu="[object Map]",gm="[object Object]",Cu="[object Promise]",ku="[object Set]",Pu="[object WeakMap]",Mu="[object DataView]",bm=Fr(pa),_m=Fr(ya),xm=Fr(va),wm=Fr(ma),Em=Fr(ga),sr=Iu;(pa&&sr(new pa(new ArrayBuffer(1)))!=Mu||ya&&sr(new ya)!=Nu||va&&sr(va.resolve())!=Cu||ma&&sr(new ma)!=ku||ga&&sr(new ga)!=Pu)&&(sr=function(e){var t=Iu(e),r=t==gm?e.constructor:void 0,n=r?Fr(r):"";if(n)switch(n){case bm:return Mu;case _m:return Nu;case xm:return Cu;case wm:return ku;case Em:return Pu}return t});var Lu=sr;function Tm(e){return e!=null&&typeof e=="object"}var fn=Tm,Am=cn,Sm=fn,Om="[object Arguments]";function Rm(e){return Sm(e)&&Am(e)==Om}var Im=Rm,Fu=Im,Nm=fn,Bu=Object.prototype,Cm=Bu.hasOwnProperty,km=Bu.propertyIsEnumerable,Pm=Fu(function(){return arguments}())?Fu:function(e){return Nm(e)&&Cm.call(e,"callee")&&!km.call(e,"callee")},ba=Pm,Mm=Array.isArray,xe=Mm,Lm=9007199254740991;function Fm(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Lm}var _a=Fm,Bm=Su,Dm=_a;function Um(e){return e!=null&&Dm(e.length)&&!Bm(e)}var xi=Um,wi={exports:{}};function jm(){return!1}var Gm=jm;wi.exports,function(e,t){var r=Ie,n=Gm,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,h=l||n;e.exports=h}(wi,wi.exports);var xa=wi.exports,$m=cn,qm=_a,Hm=fn,zm="[object Arguments]",Vm="[object Array]",Xm="[object Boolean]",Wm="[object Date]",Ym="[object Error]",Km="[object Function]",Zm="[object Map]",Qm="[object Number]",Jm="[object Object]",tg="[object RegExp]",eg="[object Set]",rg="[object String]",ng="[object WeakMap]",ig="[object ArrayBuffer]",sg="[object DataView]",ag="[object Float32Array]",og="[object Float64Array]",lg="[object Int8Array]",ug="[object Int16Array]",hg="[object Int32Array]",cg="[object Uint8Array]",fg="[object Uint8ClampedArray]",dg="[object Uint16Array]",pg="[object Uint32Array]",Rt={};Rt[ag]=Rt[og]=Rt[lg]=Rt[ug]=Rt[hg]=Rt[cg]=Rt[fg]=Rt[dg]=Rt[pg]=!0,Rt[zm]=Rt[Vm]=Rt[ig]=Rt[Xm]=Rt[sg]=Rt[Wm]=Rt[Ym]=Rt[Km]=Rt[Zm]=Rt[Qm]=Rt[Jm]=Rt[tg]=Rt[eg]=Rt[rg]=Rt[ng]=!1;function yg(e){return Hm(e)&&qm(e.length)&&!!Rt[$m(e)]}var vg=yg;function mg(e){return function(t){return e(t)}}var gg=mg,Ei={exports:{}};Ei.exports,function(e,t){var r=xu,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}(Ei,Ei.exports);var bg=Ei.exports,_g=vg,xg=gg,Du=bg,Uu=Du&&Du.isTypedArray,wg=Uu?xg(Uu):_g,wa=wg,Eg=_u,Tg=Lu,Ag=ba,Sg=xe,Og=xi,Rg=xa,Ig=bu,Ng=wa,Cg="[object Map]",kg="[object Set]",Pg=Object.prototype,Mg=Pg.hasOwnProperty;function Lg(e){if(e==null)return!0;if(Og(e)&&(Sg(e)||typeof e=="string"||typeof e.splice=="function"||Rg(e)||Ng(e)||Ag(e)))return!e.length;var t=Tg(e);if(t==Cg||t==kg)return!e.size;if(Ig(e))return!Eg(e).length;for(var r in e)if(Mg.call(e,r))return!1;return!0}var Fg=Lg;const ee=or(Fg),Bg=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],Ea=e=>{const[t,r]=lt.useState(!1),[,n]=J.useState(!1),[,i]=J.useState(!1),s=J.useRef(null),a=J.useRef(null),o=J.useRef(null),l=J.useRef(null),{tl:h}=J.useContext(Mr),{uniqueId:c,startAt:f,endAt:u,initialAlpha:d,transformation:{x:p,y:v,width:g,height:y,colorCorrection:b,animation:_,effect:m},applyTransformer:x}=e;console.log("all abstract props",e);const{contrast:S=1,saturation:w=1,brightness:T=1,alpha:N=1,blurRadius:A=0}=b||{},E={...T>1&&{brightness:T},...S>1&&{contrast:S},...w>1&&{saturation:w},...N!==0&&{alpha:N}};lt.useEffect(()=>{s.current&&r(!0)},[]),lt.useEffect(()=>{let U=ye.context(()=>{});if(s.current&&h.current){const D={duration:Number(u)-Number(f)},z=ha(_||"None");U=ye.context(()=>{var j,k;ee(z.from)?ee(z.to)?ee(z.fromTo)?h.current.to(s.current,{alpha:1,duration:.01},f).from(o.current,{...D},f).to(s.current,{alpha:0,duration:.1},Number(u)-.1):h.current.fromTo(s.current,(j=z.fromTo)==null?void 0:j.from,(k=z.fromTo)==null?void 0:k.to,f).from(o.current,{...D},f).to(s.current,{alpha:0,duration:.2},u-.2):h.current.to(s.current,{alpha:1,duration:.2,...z.to},f).from(o.current,{...D},f).to(s.current,{alpha:0,duration:.2},u-.2):h.current.from(s.current,{...z.from},f).to(o.current,{alpha:1,duration:.2},f).from(o.current,{...D},f).to(s.current,{alpha:0,duration:.2},u-.2)})}return()=>U.revert()},[_,f,u]);const O=lt.useCallback(()=>{n(!0)},[]),R=lt.useCallback(U=>{console.log("changeEnd",U),e.onAnchorTransformationEnd&&(console.log("running onAnchorTransformationEnd"),e.onAnchorTransformationEnd(U))},[]),C=yt.withFilters(yt.Container,{...A>0&&{blur:ne.filters.BlurFilter},...!ee(E)&&{adjust:Zs},matrix:ne.filters.ColorMatrixFilter}),F=(b==null?void 0:b.enabled)||m&&m!==er.Normal;return ft.jsxs(yt.Container,{ref:a,children:[ft.jsxs(yt.Container,{ref:s,alpha:d,position:[p,v],pivot:[p,v],width:g,height:y,children:[F&&ft.jsx(C,{scale:1,blur:{blur:A,quality:4},adjust:E,apply:({matrix:U})=>{m===er.BlackAndWhite?U.desaturate():m===er.Sepia?U.sepia():m===er.RetroVintage||m===er.NightVision?U.negative():m===er.Normal&&U.reset()},matrix:{enabled:!0,matrix:Bg},children:ft.jsx(yt.Container,{ref:o,children:e.children})}),!F&&ft.jsx(yt.Container,{ref:o,children:e.children})]}),x&&ft.jsx(la,{pixiTransformerRef:l,imageRef:s,isMounted:t,transformCommit:R,transformChange:O,mouseoverEvent:i,uniqueId:c})]})},Dg=e=>{const t=J.useRef(null),r=J.useRef(null),{src:n,transformation:{x:i,y:s,width:a,height:o,anchor:l},pointerdown:h,pointerup:c,mousedown:f,mouseup:u,pointerover:d,mouseover:p,mouseout:v}=e;return ft.jsx(Ea,{...e,children:ft.jsx(yt.Container,{ref:r,children:ft.jsx(yt.Sprite,{image:n,width:a,height:o,anchor:l,ref:t,x:i,y:s,interactive:!0,pointerdown:h,pointerup:c,pointerover:d,mousedown:f,mouseup:u,mouseover:p,mouseout:v})})})};var Ug=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ta={},jg={get exports(){return Ta},set exports(e){Ta=e}};/*!
539
+ `;class Zs extends Oe{constructor(t){super(Jp,ty),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 er=(e=>(e.BlackAndWhite="BlackAndWhite",e.Sepia="Sepia",e.RetroVintage="RetroVintage",e.NightVision="NightVision",e.Normal="Normal",e.None="Normal",e))(er||{});class Qs{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?At.EMPTY:(t=t||new At(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,h=n*r.x+s*r.y+o,c=i*r.x+a*r.y+l;this.minX=Math.min(this.minX,h),this.maxX=Math.max(this.maxX,h),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,h=t.d,c=t.tx,f=t.ty;let u=this.minX,d=this.minY,p=this.maxX,v=this.maxY,g=a*r+l*n+c,y=o*r+h*n+f;u=g<u?g:u,d=y<d?y:d,p=g>p?g:p,v=y>v?y:v,g=a*i+l*n+c,y=o*i+h*n+f,u=g<u?g:u,d=y<d?y:d,p=g>p?g:p,v=y>v?y:v,g=a*r+l*s+c,y=o*r+h*s+f,u=g<u?g:u,d=y<d?y:d,p=g>p?g:p,v=y>v?y:v,g=a*i+l*s+c,y=o*i+h*s+f,u=g<u?g:u,d=y<d?y:d,p=g>p?g:p,v=y>v?y: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 h=t[l],c=t[l+1];i=h<i?h:i,s=c<s?c:s,a=h>a?h: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,h=t.c,c=t.d,f=t.tx,u=t.ty;let d=this.minX,p=this.minY,v=this.maxX,g=this.maxY;for(let y=n;y<i;y+=2){const b=r[y],_=r[y+1],m=o*b+h*_+f,x=c*_+l*b+u;d=Math.min(d,m-s),v=Math.max(v,m+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,h=this.maxX,c=this.maxY;this.minX=n<o?n:o,this.minY=i<l?i:l,this.maxX=s>h?s:h,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,h=this.maxX,c=this.maxY;this.minX=n<o?n:o,this.minY=i<l?i:l,this.maxX=s>h?s:h,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 Rr extends _n{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new Hn,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 Qs,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(Rr.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 At),r=this._boundsRect),this._bounds.getRectangle(r)}getLocalBounds(t){t||(this._localBoundsRect||(this._localBoundsRect=new At),t=this._localBoundsRect),this._localBounds||(this._localBounds=new Qs);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,h=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=h,this}destroy(t){this.removeFromParent(),this._destroyed=!0,this.transform=null,this.parent=null,this._bounds=null,this.mask=null,this.cullArea=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.eventMode="auto",this.interactiveChildren=!1,this.emit("destroyed"),this.removeAllListeners()}get _tempDisplayObjectParent(){return this.tempDisplayObjectParent===null&&(this.tempDisplayObjectParent=new ey),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*Yd}set angle(t){this.transform.rotation=t*Kd}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 ey extends Rr{constructor(){super(...arguments),this.sortDirty=null}}Rr.prototype.displayObjectUpdateTransform=Rr.prototype.updateTransform;const ry=new Ot;function ny(e,t){return e.zIndex===t.zIndex?e._lastSortedIndex-t._lastSortedIndex:e.zIndex-t.zIndex}const Js=class extends Rr{constructor(){super(),this.children=[],this.sortableChildren=Js.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);Bn(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,Bn(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,Bn(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(ny),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!==Js.prototype._render&&(r=this.getBounds(!0));const i=e.projection.transform;if(i&&(n?(n=ry.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 rr=Js;rr.defaultSortableChildren=!1,rr.prototype.containerUpdateTransform=rr.prototype.updateTransform,Object.defineProperties(vt,{SORTABLE_CHILDREN:{get(){return rr.defaultSortableChildren},set(e){xt("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),rr.defaultSortableChildren=e}}});class si{constructor(t=0,r=0,n=0,i=0){this._x=Number(t),this._y=Number(r),this._width=Number(n),this._height=Number(i),this._hull=[new nt,new nt,new nt,new nt],this.currentID=-1,this.dirtyID=0}get x(){return this._x}set x(t){this._x=t,this.dirtyID++}get y(){return this._y}set y(t){this._y=t,this.dirtyID++}get width(){return this._width}set width(t){this._width=t,this.dirtyID++}get height(){return this._height}set height(t){this._height=t,this.dirtyID++}get hull(){return this.isDirty()&&this.update(),this._hull}get topLeft(){return this.isDirty()&&this.update(),this._hull[0]}get topRight(){return this.isDirty()&&this.update(),this._hull[1]}get bottomRight(){return this.isDirty()&&this.update(),this._hull[2]}get bottomLeft(){return this.isDirty()&&this.update(),this._hull[3]}isDirty(){return this.currentID!==this.dirtyID}update(){const[t,r,n,i]=this._hull;t.set(this._x,this._y),r.set(this._x+this._width,this._y),n.set(this._x+this._width,this._y+this._height),i.set(this._x,this._y+this._height)}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}clone(){return new si(this.x,this.y,this.width,this.height)}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t}contains(t,r){return this.width<=0||this.height<=0?!1:t>=this.x&&t<this.x+this.width&&r>=this.y&&r<this.y+this.height}equals(t){return t?t.x===this.x&&t.y===this.y&&t.width===this.width&&t.height===this.height:!1}pad(t=0,r=t){return this.x-=t,this.y-=r,this.width+=t*2,this.height+=r*2,this}fit(t){const r=Math.max(this.x,t.x),n=Math.min(this.x+this.width,t.x+t.width),i=Math.max(this.y,t.y),s=Math.min(this.y+this.height,t.y+t.height);return this.x=r,this.width=Math.max(n-r,0),this.y=i,this.height=Math.max(s-i,0),this}ceil(t=1,r=.001){const n=Math.ceil((this.x+this.width-r)*t)/t,i=Math.ceil((this.y+this.height-r)*t)/t;return this.x=Math.floor((this.x+r)*t)/t,this.y=Math.floor((this.y+r)*t)/t,this.width=n-this.x,this.height=i-this.y,this}enlarge(t){const r=Math.min(this.x,t.x),n=Math.max(this.x+this.width,t.x+t.width),i=Math.min(this.y,t.y),s=Math.max(this.y+this.height,t.y+t.height);return this.x=r,this.width=n-r,this.y=i,this.height=s-i,this}}const Wl=new nt;class ai{constructor(t=0,r=0,n=0,i=0,s=0){t instanceof si&&(s=r||0,r=t.y,n=t.width,i=t.height,t=t.x),this.innerBounds=new si(t,r,n,i),this._rotation=s,this._center=new Je(this.updateCenter,this),this._hull=[new nt,new nt,new nt,new nt],this._matrix=new Ot,this.currentID=-1,this.dirtyID=0}get rotation(){return this._rotation}set rotation(t){this._rotation=t,this.dirtyID++}get center(){return this.isDirty()&&this.update(),this._center}set center(t){this.center.copyFrom(t)}get hull(){return this.isDirty()&&this.update(),this._hull}get topLeft(){return this.isDirty()&&this.update(),this._hull[0]}get topRight(){return this.isDirty()&&this.update(),this._hull[1]}get bottomRight(){return this.isDirty()&&this.update(),this._hull[2]}get bottomLeft(){return this.isDirty()&&this.update(),this._hull[3]}equals(t){return t?this.innerBounds.equals(t.innerBounds)&&this.rotation===t.rotation:!1}contains(t,r){typeof t=="number"&&(t=Wl.set(t,r));const n=this._matrix.applyInverse(t,Wl);return this.innerBounds.contains(n.x,n.y)}copyFrom(t){return this.innerBounds.copyFrom(t.innerBounds),this.rotation=t.rotation,this.dirtyID++,this}isDirty(){return this.currentID!==this.dirtyID+this.innerBounds.dirtyID}update(){const t=this.innerBounds,r=this._rotation,n=this._center,[i,s,a,o]=this._hull,l=this._matrix;n._x=t.x+t.width/2,n._y=t.y+t.height/2,l.identity().translate(-n.x,-n.y).rotate(r).translate(n.x,n.y),l.apply(t.topLeft,i),l.apply(t.topRight,s),l.apply(t.bottomRight,a),l.apply(t.bottomLeft,o),this.currentID=this.dirtyID+this.innerBounds.dirtyID}updateCenter(){const t=this.center,r=this.innerBounds;r.x=t.x-r.width/2,r.y=t.y-r.height/2}}class Yl{constructor(t,r){this._history=new Array(t),this._decayRatio=r,this._currentIndex=0;for(let n=0;n<t;n++)this._history[n]=0}next(t){const{_history:r,_decayRatio:n}=this,i=r.length;this._currentIndex=this._currentIndex<i-1?this._currentIndex+1:0,r[this._currentIndex]=t;let s=0,a=0;for(let o=this._currentIndex+1;o<i;o++)s=(s+r[o])*n,a=(a+1)*n;for(let o=0;o<=this._currentIndex;o++)s=(s+r[o])*n,a=(a+1)*n;return this._average=s/a,this._average}absDev(){let t=0;for(let r=0,n=this._history.length;r<n;r++)t+=Math.abs(this._history[r]-this._average);return t/this._history.length}}class oi{constructor(t={}){oi.prototype.__init.call(this),this._freeList=[],this._freeCount=0,this._borrowRate=0,this._returnRate=0,this._flowRate=0,this._borrowRateAverage=0,this._reserveCount=t.reserve||0,this._capacityRatio=t.capacityRatio||1.2,this._decayRatio=t.decayRatio||.67,this._marginAverage=0,this._borrowRateAverageProvider=new Yl(128,this._decayRatio),this._marginAverageProvider=new Yl(128,this._decayRatio)}get capacity(){return this._freeList.length}set capacity(t){this._freeList.length=Math.ceil(t)}allocate(){return++this._borrowRate,++this._flowRate,this._freeCount>0?this._freeList[--this._freeCount]:this.create()}allocateArray(t){let r,n;Array.isArray(t)?(r=t,n=t.length):(n=t,r=new Array(n)),this._borrowRate+=n,this._flowRate+=n;let i=0;if(this._freeCount>0){const s=this._freeList,a=Math.min(this._freeCount,n);let o=this._freeCount;for(let l=0;l<a;l++)r[i]=s[o-1],++i,--o;this._freeCount=o}for(;i<n;)r[i]=this.create(),++i;return r}release(t){++this._returnRate,--this._flowRate,this._freeCount===this.capacity&&(this.capacity*=this._capacityRatio),this._freeList[this._freeCount]=t,++this._freeCount}releaseArray(t){this._returnRate+=t.length,this._flowRate-=t.length,this._freeCount+t.length>this.capacity&&(this.capacity=Math.max(this.capacity*this._capacityRatio,this._freeCount+t.length));for(let r=0,n=t.length;r<n;r++)this._freeList[this._freeCount]=t[r],++this._freeCount}reserve(t){if(this._reserveCount=t,this._freeCount<t){const r=this._freeCount-t;for(let n=0;n<r;n++)this._freeList[this._freeCount]=this.create(),++this._freeCount}}limit(t){if(this._freeCount>t){this.capacity>t*this._capacityRatio&&(this.capacity=t*this._capacityRatio);const n=Math.min(this._freeCount,this.capacity);for(let i=t;i<n;i++)this._freeList[i]=null}}startGC(t=Zt.shared){t.add(this._gcTick,null,an.UTILITY)}stopGC(t=Zt.shared){t.remove(this._gcTick)}__init(){this._gcTick=()=>{this._borrowRateAverage=this._borrowRateAverageProvider.next(this._borrowRate),this._marginAverage=this._marginAverageProvider.next(this._freeCount-this._borrowRate);const t=this._borrowRateAverageProvider.absDev();this._flowRate=0,this._borrowRate=0,this._returnRate=0;const r=this._freeCount,n=this._freeList.length;if(r<128&&this._borrowRateAverage<128&&n<128)return;const i=Math.max(this._borrowRateAverage*(this._capacityRatio-1),this._reserveCount);if(this._freeCount>i+t){const s=i+t;this.capacity=Math.min(this._freeList.length,Math.ceil(s)),this._freeCount=this._freeList.length}}}}var ta;const Kl=new Map;class Zl{static build(t){let r=Kl.get(t);return r||(r=new class extends oi{create(){return new t}},Kl.set(t,r),r)}static buildFunctional(t){return new(ta=class extends oi{constructor(...n){super(...n),ta.prototype.__init.call(this)}__init(){this.create=t}},ta)}}const li={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)),h=l*8+(i?4:0)+(s?4:0);if(t.length=h,h===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,f=l*4+(i?2:0)+2,u=f,d=h;{const p=i+a,v=s,g=r+p,y=r-p,b=n+v;if(t[c++]=g,t[c++]=b,t[--f]=b,t[--f]=y,s){const _=n-v;t[u++]=y,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,y=s+Math.sin(v)*o,b=r+g,_=r-g,m=n+y,x=n-y;t[c++]=b,t[c++]=m,t[--f]=m,t[--f]=_,t[u++]=_,t[u++]=x,t[--d]=x,t[--d]=b}{const p=i,v=s+o,g=r+p,y=r-p,b=n+v,_=n-v;t[c++]=g,t[c++]=b,t[--d]=_,t[--d]=g,i&&(t[c++]=y,t[c++]=b,t[--d]=_,t[--d]=y)}},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 h=e.matrix;n.push(e.matrix?h.a*o+h.c*l+h.tx:o,e.matrix?h.b*o+h.d*l+h.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 Ql(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,h=s+1;[e[a],e[l]]=[e[l],e[a]],[e[o],e[h]]=[e[h],e[o]]}}}const Jl={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){Ql(r,!1);const a=[];for(let h=0;h<n.length;h++){const c=n[h];Ql(c.points,!0),a.push(r.length/2),r=r.concat(c.points)}const o=pc(r,a,2);if(!o)return;const l=i.length/2;for(let h=0;h<o.length;h+=3)s.push(o[h]+l),s.push(o[h+1]+l),s.push(o[h+2]+l);for(let h=0;h<r.length;h++)i.push(r[h])}}},iy={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)}},sy={build(e){li.build(e)},triangulate(e,t){li.triangulate(e,t)}};var he=(e=>(e.MITER="miter",e.BEVEL="bevel",e.ROUND="round",e))(he||{}),nr=(e=>(e.BUTT="butt",e.ROUND="round",e.SQUARE="square",e))(nr||{});const Ir={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 tu{static curveTo(t,r,n,i,s,a){const o=a[a.length-2],h=a[a.length-1]-r,c=o-t,f=i-r,u=n-t,d=Math.abs(h*u-c*f);if(d<1e-8||s===0)return(a[a.length-2]!==t||a[a.length-1]!==r)&&a.push(t,r),null;const p=h*h+c*c,v=f*f+u*u,g=h*f+c*u,y=s*Math.sqrt(p)/d,b=s*Math.sqrt(v)/d,_=y*g/p,m=b*g/v,x=y*u+b*c,S=y*f+b*h,w=c*(b+_),T=h*(b+_),N=u*(y+m),A=f*(y+m),E=Math.atan2(T-S,w-x),O=Math.atan2(A-S,N-x);return{cx:x+t,cy:S+r,radius:s,startAngle:E,endAngle:O,anticlockwise:c*f>u*h}}static arc(t,r,n,i,s,a,o,l,h){const c=o-a,f=Ir._segmentsCount(Math.abs(c)*s,Math.ceil(Math.abs(c)/Gn)*40),u=c/(f*2),d=u*2,p=Math.cos(u),v=Math.sin(u),g=f-1,y=g%1/g;for(let b=0;b<=g;++b){const _=b+y*b,m=u+a+d*_,x=Math.cos(m),S=-Math.sin(m);h.push((p*x+v*S)*s+n,(p*-S+v*x)*s+i)}}}class ay{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 ea{static curveLength(t,r,n,i,s,a,o,l){let c=0,f=0,u=0,d=0,p=0,v=0,g=0,y=0,b=0,_=0,m=0,x=t,S=r;for(let w=1;w<=10;++w)f=w/10,u=f*f,d=u*f,p=1-f,v=p*p,g=v*p,y=g*t+3*v*f*n+3*p*u*s+d*o,b=g*r+3*v*f*i+3*p*u*a+d*l,_=x-y,m=S-b,x=y,S=b,c+=Math.sqrt(_*_+m*m);return c}static curveTo(t,r,n,i,s,a,o){const l=o[o.length-2],h=o[o.length-1];o.length-=2;const c=Ir._segmentsCount(ea.curveLength(l,h,t,r,n,i,s,a));let f=0,u=0,d=0,p=0,v=0;o.push(l,h);for(let g=1,y=0;g<=c;++g)y=g/c,f=1-y,u=f*f,d=u*f,p=y*y,v=p*y,o.push(d*l+3*u*y*t+3*f*p*n+v*s,d*h+3*u*y*r+3*f*p*i+v*a)}}function eu(e,t,r,n,i,s,a,o){const l=e-r*i,h=t-n*i,c=e+r*s,f=t+n*s;let u,d;a?(u=n,d=-r):(u=-n,d=r);const p=l+u,v=h+d,g=c+u,y=f+d;return o.push(p,v,g,y),2}function ir(e,t,r,n,i,s,a,o){const l=r-e,h=n-t;let c=Math.atan2(l,h),f=Math.atan2(i-e,s-t);o&&c<f?c+=Math.PI*2:!o&&c>f&&(f+=Math.PI*2);let u=c;const d=f-c,p=Math.abs(d),v=Math.sqrt(l*l+h*h),g=(15*p*Math.sqrt(v)/Math.PI>>0)+1,y=d/g;if(u+=y,o){a.push(e,t,r,n);for(let b=1,_=u;b<g;b++,_+=y)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++,_+=y)a.push(e+Math.sin(_)*v,t+Math.cos(_)*v,e,t);a.push(i,s,e,t)}return g*2}function oy(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 nt(n[0],n[1]),o=new nt(n[n.length-2],n[n.length-1]),l=r.type!==qt.POLY||r.closeStroke,h=Math.abs(a.x-o.x)<i&&Math.abs(a.y-o.y)<i;if(l){n=n.slice(),h&&(n.pop(),n.pop(),o.set(n[n.length-2],n[n.length-1]));const D=(a.x+o.x)*.5,z=(o.y+a.y)*.5;n.unshift(D,z),n.push(D,z)}const c=t.points,f=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 y=n[0],b=n[1],_=n[2],m=n[3],x=0,S=0,w=-(b-m),T=y-_,N=0,A=0,E=Math.sqrt(w*w+T*T);w/=E,T/=E,w*=p,T*=p;const O=s.alignment,R=(1-O)*2,C=O*2;l||(s.cap===nr.ROUND?u+=ir(y-w*(R-C)*.5,b-T*(R-C)*.5,y-w*R,b-T*R,y+w*C,b+T*C,c,!0)+2:s.cap===nr.SQUARE&&(u+=eu(y,b,w,T,R,C,!0,c))),c.push(y-w*R,b-T*R,y+w*C,b+T*C);for(let D=1;D<f-1;++D){y=n[(D-1)*2],b=n[(D-1)*2+1],_=n[D*2],m=n[D*2+1],x=n[(D+1)*2],S=n[(D+1)*2+1],w=-(b-m),T=y-_,E=Math.sqrt(w*w+T*T),w/=E,T/=E,w*=p,T*=p,N=-(m-S),A=_-x,E=Math.sqrt(N*N+A*A),N/=E,A/=E,N*=p,A*=p;const z=_-y,j=b-m,k=_-x,I=S-m,P=z*k+j*I,L=j*k-I*z,G=L<0;if(Math.abs(L)<.001*Math.abs(P)){c.push(_-w*R,m-T*R,_+w*C,m+T*C),P>=0&&(s.join===he.ROUND?u+=ir(_,m,_-w*R,m-T*R,_-N*R,m-A*R,c,!1)+4:u+=2,c.push(_-N*C,m-A*C,_+N*R,m+A*R));continue}const $=(-w+y)*(-T+m)-(-w+_)*(-T+b),M=(-N+x)*(-A+m)-(-N+_)*(-A+S),B=(z*M-k*$)/L,q=(I*$-j*M)/L,H=(B-_)*(B-_)+(q-m)*(q-m),X=_+(B-_)*R,K=m+(q-m)*R,et=_-(B-_)*C,it=m-(q-m)*C,ot=Math.min(z*z+j*j,k*k+I*I),ht=G?R:C,Ct=ot+ht*ht*v,It=H<=Ct;let V=s.join;if(V===he.MITER&&H/v>g&&(V=he.BEVEL),It)switch(V){case he.MITER:{c.push(X,K,et,it);break}case he.BEVEL:{G?c.push(X,K,_+w*C,m+T*C,X,K,_+N*C,m+A*C):c.push(_-w*R,m-T*R,et,it,_-N*R,m-A*R,et,it),u+=2;break}case he.ROUND:{G?(c.push(X,K,_+w*C,m+T*C),u+=ir(_,m,_+w*C,m+T*C,_+N*C,m+A*C,c,!0)+4,c.push(X,K,_+N*C,m+A*C)):(c.push(_-w*R,m-T*R,et,it),u+=ir(_,m,_-w*R,m-T*R,_-N*R,m-A*R,c,!1)+4,c.push(_-N*R,m-A*R,et,it));break}}else{switch(c.push(_-w*R,m-T*R,_+w*C,m+T*C),V){case he.MITER:{G?c.push(et,it,et,it):c.push(X,K,X,K),u+=2;break}case he.ROUND:{G?u+=ir(_,m,_+w*C,m+T*C,_+N*C,m+A*C,c,!0)+2:u+=ir(_,m,_-w*R,m-T*R,_-N*R,m-A*R,c,!1)+2;break}}c.push(_-N*R,m-A*R,_+N*C,m+A*C),u+=2}}y=n[(f-2)*2],b=n[(f-2)*2+1],_=n[(f-1)*2],m=n[(f-1)*2+1],w=-(b-m),T=y-_,E=Math.sqrt(w*w+T*T),w/=E,T/=E,w*=p,T*=p,c.push(_-w*R,m-T*R,_+w*C,m+T*C),l||(s.cap===nr.ROUND?u+=ir(_-w*(R-C)*.5,m-T*(R-C)*.5,_-w*R,m-T*R,_+w*C,m+T*C,c,!1)+2:s.cap===nr.SQUARE&&(u+=eu(_,m,w,T,R,C,!1,c)));const F=t.indices,U=Ir.epsilon*Ir.epsilon;for(let D=d;D<u+d-2;++D)y=c[D*2],b=c[D*2+1],_=c[(D+1)*2],m=c[(D+1)*2+1],x=c[(D+2)*2],S=c[(D+2)*2+1],!(Math.abs(y*(m-S)+_*(S-b)+x*(b-m))<U)&&F.push(D,D+1,D+2)}function ly(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,h=a.length/2;let c=h;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,h)}function ru(e,t){e.lineStyle.native?ly(e,t):oy(e,t)}class ra{static curveLength(t,r,n,i,s,a){const o=t-2*n+s,l=r-2*i+a,h=2*n-2*t,c=2*i-2*r,f=4*(o*o+l*l),u=4*(o*h+l*c),d=h*h+c*c,p=2*Math.sqrt(f+u+d),v=Math.sqrt(f),g=2*f*v,y=2*Math.sqrt(d),b=u/v;return(g*p+v*u*(p-y)+(4*d*f-u*u)*Math.log((2*v+b+p)/(b+y)))/(4*g)}static curveTo(t,r,n,i,s){const a=s[s.length-2],o=s[s.length-1],l=Ir._segmentsCount(ra.curveLength(a,o,t,r,n,i));let h=0,c=0;for(let f=1;f<=l;++f){const u=f/l;h=a+(t-a)*u,c=o+(r-o)*u,s.push(h+(t+(n-t)*u-h)*u,c+(r+(i-r)*u-c)*u)}}}const na={[qt.POLY]:Jl,[qt.CIRC]:li,[qt.ELIP]:li,[qt.RECT]:iy,[qt.RREC]:sy},nu=[],ui=[];class hi{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 hi(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 Nr=new nt,iu=class extends il{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 Qs,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(),ui.push(this.drawCalls[e]);this.drawCalls.length=0;for(let e=0;e<this.batches.length;e++){const t=this.batches[e];t.reset(),nu.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 hi(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 hi(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,Nr):Nr.copyFrom(e),n.shape.contains(Nr.x,Nr.y))){let i=!1;if(n.holes){for(let s=0;s<n.holes.length;s++)if(n.holes[s].shape.contains(Nr.x,Nr.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],h=l.fillStyle,c=l.lineStyle;na[l.type].build(l),l.matrix&&this.transformPoints(l.points,l.matrix),(h.visible||c.visible)&&this.processHoles(l.holes);for(let u=0;u<2;u++){const d=u===0?h: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 y=this.points.length/2-g;y!==0&&(r&&!this._compareStyles(n,d)&&(r.end(v,g),r=null),r||(r=nu.pop()||new ay,r.begin(d,v,g),this.batches.push(r),n=d),this.addUvs(this.points,e,d.texture,g,y,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<iu.BATCHABLE_SIZE*2}buildDrawCalls(){let e=++gt._globalBatch;for(let c=0;c<this.drawCalls.length;c++)this.drawCalls[c].texArray.clear(),ui.push(this.drawCalls[c]);this.drawCalls.length=0;const t=this.colors,r=this.textureIds;let n=ui.pop();n||(n=new Ls,n.texArray=new js),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,h=0;this.drawCalls.push(n);for(let c=0;c<this.batches.length;c++){const f=this.batches[c],u=8,d=f.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=ui.pop(),n||(n=new Ls,n.texArray=new js),this.drawCalls.push(n)),n.start=h,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+=f.size,h+=f.size,a=p._batchLocation,this.addColors(t,d.color,d.alpha,f.attribSize,f.attribStart),this.addTextureIds(r,a,f.attribSize,f.attribStart)}gt._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?Jl.triangulate(e,this):na[e.type].triangulate(e,this)}processLine(e){ru(e,this);for(let t=0;t<e.holes.length;t++)ru(e.holes[t],this)}processHoles(e){for(let t=0;t<e.length;t++){const r=e[t];na[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=Wt.shared.setValue(t).toLittleEndianNumber(),a=Wt.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],f=e[(n+a)*2+1];if(s){const u=s.a*c+s.c*f+s.tx;f=s.b*c+s.d*f+s.ty,c=u}a++,t.push(c/l.width,f/l.height)}const h=r.baseTexture;(l.width<h.width||l.height<h.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,h=o.height/i.height;let c=o.x/o.width,f=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,f-=d;for(let p=r;p<a;p+=2)e[p]=(e[p]+c)*l,e[p+1]=(e[p+1]+f)*h}};let su=iu;su.BATCHABLE_SIZE=100;class ci{constructor(){this.color=16777215,this.alpha=1,this.texture=bt.WHITE,this.matrix=null,this.visible=!1,this.reset()}clone(){const t=new ci;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=bt.WHITE,this.matrix=null,this.visible=!1}destroy(){this.texture=null,this.matrix=null}}class ia extends ci{constructor(){super(...arguments),this.width=0,this.alignment=.5,this.native=!1,this.cap=nr.BUTT,this.join=he.MITER,this.miterLimit=10}clone(){const t=new ia;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 sa={},fi=class extends rr{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 ci,this._lineStyle=new ia,this._matrix=null,this._holeMode=!1,this.state=Un.for2d(),this._geometry=e||new su,this._geometry.refCount++,this._transformID=-1,this._tintColor=new Wt(16777215),this.blendMode=ut.NORMAL}get geometry(){return this._geometry}clone(){return this.finishPoly(),new fi(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:bt.WHITE,color:e!=null&&e.texture?16777215:0,matrix:null,alignment:.5,native:!1,cap:nr.BUTT,join:he.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 tn,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[t-2],e[t-1]))}else this.currentPath=new tn,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),ra.curveTo(e,t,r,n,i),this}bezierCurveTo(e,t,r,n,i,s){return this._initCurve(),ea.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=tu.curveTo(e,t,r,n,i,s);if(a){const{cx:o,cy:l,radius:h,startAngle:c,endAngle:f,anticlockwise:u}=a;this.arc(o,l,h,c,f,u)}return this}arc(e,t,r,n,i,s=!1){if(n===i)return this;if(!s&&i<=n?i+=Gn:s&&n<=i&&(n+=Gn),i-n===0)return this;const o=e+Math.cos(n)*r,l=t+Math.sin(n)*r,h=this._geometry.closePointEps;let c=this.currentPath?this.currentPath.points:null;if(c){const f=Math.abs(c[c.length-2]-o),u=Math.abs(c[c.length-1]-l);f<h&&u<h||c.push(o,l)}else this.moveTo(o,l),c=this.currentPath.points;return tu.arc(o,l,e,t,r,n,i,s,c),this}beginFill(e=0,t){return this.beginTextureFill({texture:bt.WHITE,color:e,alpha:t})}normalizeColor(e){const t=Wt.shared.setValue(e.color??0);e.color=t.toNumber(),e.alpha??(e.alpha=t.alpha)}beginTextureFill(e){const t={texture:bt.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 At(e,t,r,n))}drawRoundedRect(e,t,r,n,i){return this.drawShape(new Bs(e,t,r,n,i))}drawCircle(e,t,r){return this.drawShape(new Fs(e,t,r))}drawEllipse(e,t,r,n){return this.drawShape(new Zd(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 tn(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),h={vertexData:a,blendMode:t,indices:l,uvs:o,_batchRGB:Wt.shared.setValue(s).toRgbArray(),_tintRGB:s,_texture:i.style.texture,alpha:i.style.alpha,worldAlpha:1};this.batches[n]=h}}_renderBatched(e){if(this.batches.length){e.batch.setObjectRenderer(e.plugins[this.pluginName]),this.calculateVertices(),this.calculateTints();for(let t=0,r=this.batches.length;t<r;t++){const n=this.batches[t];n.worldAlpha=this.worldAlpha*n.alpha,e.plugins[this.pluginName].render(n)}}}_renderDirect(e){const t=this._resolveDirectShader(e),r=this._geometry,n=this.worldAlpha,i=t.uniforms,s=r.drawCalls;i.translationMatrix=this.transform.worldTransform,Wt.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(!sa[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 Ot,default:ae.from({uSamplers:i},!0)},a=e.plugins[r]._shader.program;sa[r]=new rn(a,s)}t=sa[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,fi._TEMP_POINT),this._geometry.containsPoint(fi._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=Wt.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,h=this.vertexData;let c=0;for(let f=0;f<l.length;f+=2){const u=l[f],d=l[f+1];h[c++]=r*u+i*d+a,h[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 Re=fi;Re.curves=Ir,Re._TEMP_POINT=new nt;const au={color:16777215,outlineColor:0,outlineThickness:1,radius:8,shape:"tooth"},uy=Re;class hy extends uy{constructor(t,r,n={},i,s,a){super(),this.transformer=t;const o=Object.assign({},au,n);this._handle=r,this._style=o,this.onHandleDelta=i,this.onHandleCommit=s,this._dirty=!0,this.interactive=!0,this.cursor=a||"move",this._pointerDown=!1,this._pointerDragging=!1,this._pointerPosition=new nt,this._pointerMoveTarget=null,this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onpointerdown=this.onPointerDown,this.onpointermove=this.onPointerMove,this.onpointerup=this.onPointerUp,this.onpointerupoutside=this.onPointerUp}get handle(){return this._handle}set handle(t){this._handle=t,this._dirty=!0}get style(){return this._style}set style(t){this._style=Object.assign({},au,t),this._dirty=!0}render(t){this._dirty&&(this.draw(),this._dirty=!1),super.render(t)}draw(){const t=this._handle,r=this._style,n=r.radius;if(this.clear().lineStyle(r.outlineThickness,r.outlineColor).beginFill(r.color),r.shape==="square")this.drawRect(-n/2,-n/2,n,n);else if(r.shape==="tooth")switch(t){case"middleLeft":this.drawPolygon([-n/2,-n/2,-n/2,n/2,n/2,n/2,n*1.1,0,n/2,-n/2]);break;case"topCenter":this.drawPolygon([-n/2,-n/2,n/2,-n/2,n/2,n/2,0,n*1.1,-n/2,n/2]);break;case"middleRight":this.drawPolygon([-n/2,n/2,-n*1.1,0,-n/2,-n/2,n/2,-n/2,n/2,n/2]);break;case"bottomCenter":this.drawPolygon([0,-n*1.1,n/2,-n/2,n/2,n/2,-n/2,n/2,-n/2,-n/2]);break;case"rotator":this.drawCircle(0,0,n/Math.sqrt(2));break;default:this.drawRect(-n/2,-n/2,n,n);break}else this.drawCircle(0,0,n);this.endFill()}onPointerDown(t){this._pointerDown=!0,this._pointerDragging=!1,t.stopPropagation(),this._pointerMoveTarget&&(this._pointerMoveTarget.removeEventListener("globalpointermove",this.onPointerMove),this._pointerMoveTarget=null),this._pointerMoveTarget=this.transformer.stage||this,this._pointerMoveTarget.addEventListener("globalpointermove",this.onPointerMove)}onPointerMove(t){this._pointerDown&&(this._pointerDragging?this.onDrag(t):this.onDragStart(t),t.stopPropagation())}onPointerUp(t){this._pointerDragging&&this.onDragEnd(t),this._pointerDown=!1,this._pointerMoveTarget&&(this._pointerMoveTarget.removeEventListener("globalpointermove",this.onPointerMove),this._pointerMoveTarget=null)}onDragStart(t){this._pointerPosition.copyFrom(t.data.global),this._pointerDragging=!0}onDrag(t){const r=t.data.global;this.onHandleDelta&&this.onHandleDelta(r),this._pointerPosition.copyFrom(r)}onDragEnd(t){this._pointerDragging=!1,this.onHandleCommit&&this.onHandleCommit()}}function di(e,t,r,n){const{x:i,y:s}=r,{x:a,y:o}=n;if(Math.abs(a-i)<.01)return Math.abs(e-i);if(Math.abs(o-s)<.01)return Math.abs(t-s);const l=(o-s)/(a-i);return Math.abs((l*e-t+(o-l*a))/Math.sqrt(l*l+1))}const ou=Zl.build(nt),cy=[new nt,new nt,new nt,new nt],fy=new Ot,Cr=new nt,dy=[0,0,0,1,-1,1,-1,-1,1,-1,1,0],py=[0,0,-1,0,-1,-1,1,-1,1,1,0,1],yy=[0,0,1,0,1,1,-1,1,-1,-1,0,-1],vy=[0,0,0,-1,1,-1,1,1,-1,1,-1,0],aa=new Array(12),my=[dy,py,yy,vy],gy=Re;class by extends gy{constructor(t){super(),this.transformer=t,this.boxScalingHandles=[this.addChild(new Re),this.addChild(new Re),this.addChild(new Re),this.addChild(new Re)],this.boxScalingHandles.forEach(r=>{r.interactive=!0}),this.boxScalingHandles[0].cursor=ln.topCenter,this.boxScalingHandles[1].cursor=ln.middleRight,this.boxScalingHandles[2].cursor=ln.bottomCenter,this.boxScalingHandles[3].cursor=ln.middleLeft}hitHandleType(t,r,n){const{boxRotationEnabled:i,boxRotationTolerance:s,boxScalingEnabled:a,boxScalingTolerance:o}=this.transformer,[l,h,c,f]=t.hull,{x:u,y:d}=r.applyInverse(n,Cr);if(a){const p=di(u,d,l,h)*r.d,v=di(u,d,l,f)*r.a,g=di(u,d,h,c)*r.a,y=di(u,d,f,c)*r.d,b=Math.min(p,v,g,y);if(b<o)switch(b){case p:return"topCenter";case v:return"middleLeft";case g:return"middleRight";case y:return"bottomCenter"}}if(i&&!t.contains(u,d)){const p=Math.sqrt((l.x-u)**2+(l.y-d)**2),v=Math.sqrt((h.x-u)**2+(h.y-d)**2),g=Math.sqrt((f.x-u)**2+(f.y-d)**2),y=Math.sqrt((c.x-u)**2+(c.y-d)**2),b=Math.min(p,v,g,y);if(b<s*1.45)switch(b){case p:return"boxRotateTopLeft";case v:return"boxRotateTopRight";case g:return"boxRotateBottomLeft";case y:return"boxRotateBottomRight"}}return null}drawBounds(t){const r=cy;for(let n=0;n<4;n++)this.transformer.projectToLocal(t.hull[n],r[n]);this.drawPolygon(r)}drawBoxScalingTolerance(t,r=this.transformer.boxScalingTolerance){t.innerBounds.pad(-r);const n=ou.allocateArray(4);n.forEach((s,a)=>{this.projectToLocal(t.hull[a],s)}),t.innerBounds.pad(2.5*r);const i=ou.allocateArray(4);i.forEach((s,a)=>{this.projectToLocal(t.hull[a],s)}),t.innerBounds.pad(-1.5*this.transformer.boxScalingTolerance);for(let s=0;s<4;s++){const a=n[s],o=n[(s+1)%4],l=i[s],h=i[(s+1)%4];this.boxScalingHandles[s].clear().beginFill(16777215,1e-4).drawPolygon(a,l,h,o).endFill()}}drawBoxRotationTolerance(){const{boxRotateTopLeft:t,boxRotateTopRight:r,boxRotateBottomLeft:n,boxRotateBottomRight:i}=this.transformer.handleAnchors,s=this.transformer.boxRotationTolerance*2,a=fy.identity().scale(s,s).rotate(this.transformer.getGroupBounds().rotation);for(let o=0;o<4;o++){const l=my[o];let h;switch(o){case 0:h=t;break;case 1:h=r;break;case 2:h=n;break;case 3:h=i;break}for(let c=0;c<l.length;c+=2){const f=l[c],u=l[c+1];Cr.set(f,u),a.apply(Cr,Cr),aa[c]=Cr.x+h.x,aa[c+1]=Cr.y+h.y}this.drawPolygon(aa.slice())}}projectToLocal(t,r){return this.transformer.projectToLocal(t,r)}}const lu=new Ot;function uu(e){const t=lu.identity();return t.c=Math.tan(e),t}function hu(e){const t=lu.identity();return t.b=Math.tan(e),t}function cu(e,t,r,n=e.pivot){const i=t.a,s=t.b,a=t.c,o=t.d,l=-Math.atan2(-a,o),h=Math.atan2(s,i);return r=r??h,e.pivot.set(n.x,n.y),e.rotation=r,e.skew.x=r+l,e.skew.y=-r+h,e.scale.x=Math.sqrt(i*i+s*s),e.scale.y=Math.sqrt(a*a+o*o),e.position.x=t.tx+(n.x*t.a+n.y*t.c),e.position.y=t.ty+(n.x*t.b+n.y*t.d),e}const pi=new Ot,_y=new Ot;function xy(e,t,r){if(!r){const s=e.parent?e.parent:e.enableTempParent();e.updateTransform(),e.disableTempParent(s)}const n=e.worldTransform,i=e.parent?_y.copyFrom(e.parent.worldTransform):Ot.IDENTITY;pi.copyFrom(n),pi.prepend(t),pi.prepend(i.invert()),cu(e.transform,pi)}const yi=new Hn,wy=[new nt,new nt,new nt,new nt],kr=new Ot,Pr=new nt,oa=new ai,Ey=new At,fu=[new nt,new nt,new nt,new nt],du=new nt,pu=new Ot,vi=Zl.build(nt),ln={topLeft:"nw-resize",topCenter:"n-resize",topRight:"ne-resize",middleLeft:"w-resize",middleRight:"e-resize",bottomLeft:"sw-resize",bottomCenter:"s-resize",bottomRight:"se-resize"},mi=["topLeft","topCenter","topRight","middleLeft","middleCenter","middleRight","bottomLeft","bottomCenter","bottomRight"],yu={topLeft:{x:-1,y:-1},topCenter:{x:0,y:-1},topRight:{x:1,y:-1},middleLeft:{x:-1,y:0},middleCenter:{x:0,y:0},middleRight:{x:1,y:0},bottomLeft:{x:-1,y:1},bottomCenter:{x:0,y:1},bottomRight:{x:1,y:1}},Ty=[...mi,"rotator","skewHorizontal","skewVertical"],Ay=4,Sy=16,Oy=[Math.PI/4,Math.PI/2,Math.PI*3/4,Math.PI,0,-Math.PI/4,-Math.PI/2,-Math.PI*3/4,-Math.PI],Ry=Math.PI/90,Iy=[Math.PI/4,-Math.PI/4],Ny=Math.PI/90,vu={color:0,thickness:2},Cy=rr;let ky=class re extends Cy{constructor(t={}){super(),re.prototype.__init.call(this),re.prototype.__init2.call(this),re.prototype.__init3.call(this),re.prototype.__init4.call(this),re.prototype.__init5.call(this),this.interactive=!0,this.cursors=Object.assign({default:"move"},t.cursors),this.cursor=this.cursors.default,this.boundingBoxes=t.boundingBoxes||"all",this.group=t.group||[],this.boxRotationTolerance=t.boxRotationTolerance||Sy,this.boxScalingTolerance=t.boxScalingTolerance||Ay,this.centeredScaling=!!t.centeredScaling,this.projectionTransform=new Ot,this.lockAspectRatio=t.lockAspectRatio===!0,this.rotationSnaps=t.rotationSnaps||Oy,this.rotationSnapTolerance=t.rotationSnapTolerance!==void 0?t.rotationSnapTolerance:Ry,this.skewRadius=t.skewRadius||64,this.skewSnaps=t.skewSnaps||Iy,this.skewSnapTolerance=t.skewSnapTolerance!==void 0?t.skewSnapTolerance:Ny,this.boxRotationEnabled=t.boxRotationEnabled===!0,this.boxScalingEnabled=t.boxScalingEnabled===!0,this._rotateEnabled=t.rotateEnabled!==!1,this._scaleEnabled=t.scaleEnabled!==!1,this._skewEnabled=t.skewEnabled===!0,this.translateEnabled=t.translateEnabled!==!1,this.transientGroupTilt=t.transientGroupTilt!==void 0?t.transientGroupTilt:!0,this.wireframe=this.addChild(new by(this)),this.wireframe.cursor="none",this.stage=t.stage||null,this._skewX=0,this._skewY=0,this._transformType="none",this._wireframeStyle=Object.assign({},vu,t.wireframeStyle||{});const r=t.handleConstructor||hy,n=t.handleStyle||{};this._handleStyle=n;const i={rotator:this.addChild(new r(this,"rotator",n,o=>{this.rotateGroup("rotator",o)},this.commitGroup))},s=mi.reduce((o,l)=>{const h=new r(this,l,n,null,this.commitGroup,ln[l]);return h.onHandleDelta=c=>{this.scaleGroup(h.handle,c)},h.visible=this._scaleEnabled,o[l]=h,this.addChild(o[l]),o},{}),a={skewHorizontal:this.addChild(new r(this,"skewHorizontal",n,o=>{this.skewGroup("skewHorizontal",o)},this.commitGroup,"pointer")),skewVertical:this.addChild(new r(this,"skewVertical",n,o=>{this.skewGroup("skewVertical",o)},this.commitGroup,"pointer"))};this.handles=Object.assign({},s,i,a),this.handles.middleCenter.visible=!1,this.handles.skewHorizontal.visible=this._skewEnabled,this.handles.skewVertical.visible=this._skewEnabled,this.handleAnchors={rotator:new nt,boxRotateTopLeft:new nt,boxRotateTopRight:new nt,boxRotateBottomLeft:new nt,boxRotateBottomRight:new nt,topLeft:new nt,topCenter:new nt,topRight:new nt,middleLeft:new nt,middleCenter:new nt,middleRight:new nt,bottomLeft:new nt,bottomCenter:new nt,bottomRight:new nt,skewHorizontal:new nt,skewVertical:new nt},this.groupBounds=new ai,this.updateGroupBounds(),this._pointerDown=!1,this._pointerDragging=!1,this._pointerPosition=new nt,this._pointerMoveTarget=null,this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.addEventListener("pointerdown",this.onPointerDown),this.addEventListener("pointerup",this.onPointerUp),this.addEventListener("pointerupoutside",this.onPointerUp)}get enabledHandles(){return this._enabledHandles}set enabledHandles(t){!this._enabledHandles&&!t||(this._enabledHandles=t,Ty.forEach(r=>{this.handles[r].visible=!1}),t?t.forEach(r=>{this.handles[r].visible=!0}):(this.handles.rotator.visible=this._rotateEnabled,this.handles.skewHorizontal.visible=this._skewEnabled,this.handles.skewVertical.visible=this._skewEnabled,mi.forEach(r=>{r!=="middleCenter"&&(this.handles[r].visible=this._scaleEnabled)})))}get handleStyle(){return this._handleStyle}set handleStyle(t){const r=this.handles;for(const n in r)r[n].style=t;this._handleStyle=t}get rotateEnabled(){return this._rotateEnabled}set rotateEnabled(t){if(this._rotateEnabled!==t){if(this._rotateEnabled=t,this._enabledHandles)return;this.handles.rotator.visible=t}}get scaleEnabled(){return this._scaleEnabled}set scaleEnabled(t){if(this._scaleEnabled!==t){if(this._scaleEnabled=t,this._enabledHandles)return;mi.forEach(r=>{r!=="middleCenter"&&(this.handles[r].visible=t)})}}get skewEnabled(){return this._skewEnabled}set skewEnabled(t){if(this._skewEnabled!==t){if(this._skewEnabled=t,this._enabledHandles)return;this.handles.skewHorizontal.visible=t,this.handles.skewVertical.visible=t}}get transformType(){return this._transformType}get wireframeStyle(){return this._wireframeStyle}set wireframeStyle(t){this._wireframeStyle=Object.assign({},vu,t)}getGroupBounds(t=!1){return t&&this.updateGroupBounds(),this.groupBounds}__init(){this.translateGroup=t=>{this._transformHandle=null,this._transformType="translate";const r=kr.identity().translate(t.x,t.y);this.prependTransform(r)}}__init2(){this.rotateGroup=(t,r)=>{this._transformHandle=t,this._transformType="rotate";const n=this.groupBounds,i=this.worldTransform.apply(this.handleAnchors[t],Pr);this.projectionTransform.applyInverse(i,i),r=this.projectionTransform.applyInverse(r,du);const s=n.center,a=Math.atan2(i.y-s.y,i.x-s.x);let l=Math.atan2(r.y-s.y,r.x-s.x)-a,h=this.groupBounds.rotation+l;h=this.snapAngle(h,this.rotationSnapTolerance,this.rotationSnaps),l=h-this.groupBounds.rotation;const c=kr.identity().translate(-s.x,-s.y).rotate(l).translate(s.x,s.y);this.prependTransform(c,!0),this.updateGroupBounds(h),this._skewX+=l,this._skewY+=l}}__init3(){this.scaleGroup=(t,r)=>{this._transformHandle=t,this._transformType="scale";const n=yu[t].x,i=yu[t].y,s=this.handles,a=this.groupBounds,o=a.rotation,l=a.innerBounds,h=this.worldTransform.apply(this.handleAnchors[t],Pr);this.projectionTransform.applyInverse(h,h),r=this.projectionTransform.applyInverse(r,du);const c=r.x-h.x,f=r.y-h.y,u=(a.topRight.x-a.topLeft.x)/l.width,d=(a.topRight.y-a.topLeft.y)/l.width,p=(a.bottomLeft.x-a.topLeft.x)/l.height,v=(a.bottomLeft.y-a.topLeft.y)/l.height,g=c*u+f*d,y=c*p+f*v;let b=1+g*n/l.width,_=1+y*i/l.height;this.lockAspectRatio&&(t==="topLeft"||t==="topRight"||t==="bottomLeft"||t==="bottomRight")&&(b>_?_=b:b=_);const x=kr.identity();if(n!==0&&b!==0){const S=this.centeredScaling?a.center:n===1?a.topLeft:a.topRight;x.translate(-S.x,-S.y).rotate(-o).scale(b,1).rotate(o).translate(S.x,S.y)}if(i!==0&&_!==0){const S=this.centeredScaling?a.center:i===1?a.topLeft:a.bottomLeft;x.translate(-S.x,-S.y).rotate(-o).scale(1,_).rotate(o).translate(S.x,S.y)}if((_<0||b<0)&&!(_<0&&b<0))switch(t){case"topLeft":case"bottomLeft":this.swapHandles(s.topLeft,s.bottomLeft);break;case"topCenter":case"bottomCenter":this.swapHandles(s.topCenter,s.bottomCenter);break;case"topRight":case"bottomRight":this.swapHandles(s.topRight,s.bottomRight);break}this.prependTransform(x)}}__init4(){this.skewGroup=(t,r)=>{this._transformHandle=t,this._transformType="skew";const n=this.groupBounds,i=Pr.copyFrom(r);this.projectionTransform.applyInverse(i,i);const s=n.center,a=kr.identity().translate(-s.x,-s.y);let o=this.groupBounds.rotation;if(t==="skewHorizontal"){const l=this._skewX;this._skewX=Math.atan2(i.y-s.y,i.x-s.x),this._skewX=this.snapAngle(this._skewX,this.skewSnapTolerance,this.skewSnaps),a.prepend(hu(-l)),a.prepend(hu(this._skewX))}else{const l=this._skewY,h=Math.atan2(i.y-s.y,i.x-s.x)-Math.PI/2;this._skewY=h,this._skewY=this.snapAngle(this._skewY,this.skewSnapTolerance,this.skewSnaps),a.prepend(uu(l)),a.prepend(uu(-this._skewY)),o-=this._skewY-l}a.translate(s.x,s.y),this.prependTransform(a,!0),this.updateGroupBounds(o)}}__init5(){this.commitGroup=()=>{this._transformHandle=null,this._transformType="none",this.transientGroupTilt!==!1&&this.group.length>1&&this.updateGroupBounds(0),this.emit("transformcommit")}}render(t){this.renderable&&this.visible&&(!this.lazyMode||this.lazyDirty)&&this.draw(),super.render(t)}draw(){const t=this.group,{color:r,thickness:n}=this._wireframeStyle;this.wireframe.clear(),this.boundingBoxes!=="none"&&this.wireframe.lineStyle(n,r),this.translateEnabled&&this.wireframe.beginFill(16777215,1e-4);for(let s=0,a=t.length;s<a&&this.boundingBoxes==="all";s++)this.wireframe.drawBounds(re.calculateOrientedBounds(t[s],oa));const i=t.length!==1?re.calculateGroupOrientedBounds(t,this.groupBounds.rotation,oa,!0):re.calculateOrientedBounds(t[0],oa);this.wireframe.drawBounds(i),this.drawHandles(i),this.groupBounds.copyFrom(i),this.boxRotationEnabled&&(this.wireframe.closePath().beginFill(16777215,1e-4).lineStyle(),this.wireframe.drawBoxRotationTolerance()),this.boxScalingEnabled&&(this.wireframe.closePath().beginFill(16773375,1e-4).lineStyle(),this.wireframe.drawBoxScalingTolerance(i)),this.lazyDirty=!1}drawHandles(t){const r=this.handles,n=this.handleAnchors,{topLeft:i,topRight:s,bottomLeft:a,bottomRight:o,center:l}=t,[h,c,f,u]=fu,d=Pr;if(this.projectToLocal(i,h),this.projectToLocal(s,c),this.projectToLocal(a,f),this.projectToLocal(o,u),this.projectToLocal(l,d),n.topLeft.copyFrom(h),n.topCenter.set((h.x+c.x)/2,(h.y+c.y)/2),n.topRight.copyFrom(c),n.middleLeft.set((h.x+f.x)/2,(h.y+f.y)/2),n.middleCenter.set((h.x+u.x)/2,(h.y+u.y)/2),n.middleRight.set((c.x+u.x)/2,(c.y+u.y)/2),n.bottomLeft.copyFrom(f),n.bottomCenter.set((f.x+u.x)/2,(f.y+u.y)/2),n.bottomRight.copyFrom(u),this.boxRotationEnabled&&(n.boxRotateTopLeft.copyFrom(n.topLeft),n.boxRotateTopRight.copyFrom(n.topRight),n.boxRotateBottomLeft.copyFrom(n.bottomLeft),n.boxRotateBottomRight.copyFrom(n.bottomRight)),this._rotateEnabled){const p=(h.x+c.x)/2,v=(h.y+c.y)/2;let g=-(h.y-c.y),y=h.x-c.x;const b=Math.sqrt(g*g+y*y);g*=32/b,y*=32/b,r.rotator.position.x=p+g,r.rotator.position.y=v+y,this.wireframe.moveTo(p,v).lineTo(r.rotator.position.x,r.rotator.position.y),this.handleAnchors.rotator.copyFrom(r.rotator.position)}if(this._skewEnabled){const p=d.x,v=d.y;this.worldTransform.apply(d,d),n.skewHorizontal.set(d.x+Math.cos(this._skewX)*this.skewRadius,d.y+Math.sin(this._skewX)*this.skewRadius),n.skewVertical.set(d.x+-Math.sin(this._skewY)*this.skewRadius,d.y+Math.cos(this._skewY)*this.skewRadius),this.worldTransform.applyInverse(n.skewHorizontal,n.skewHorizontal),this.worldTransform.applyInverse(n.skewVertical,n.skewVertical),d.set(p,v),this.wireframe.beginFill(this.wireframeStyle.color).drawCircle(d.x,d.y,this.wireframeStyle.thickness*2).endFill(),this.wireframe.moveTo(d.x,d.y).lineTo(r.skewHorizontal.x,r.skewHorizontal.y).moveTo(d.x,d.y).lineTo(r.skewVertical.x,r.skewVertical.y)}for(const p in r){let v=this.groupBounds.rotation;p==="skewHorizontal"?v=this._skewX:p==="skewVertical"&&(v=this._skewY);const g=r[p];g.rotation=v,g.position.copyFrom(n[p]),g.getBounds(!1,Ey)}}onPointerDown(t){this._pointerDown=!0,this._pointerDragging=!1,t.stopPropagation(),this._pointerMoveTarget&&(this._pointerMoveTarget.removeEventListener("globalpointermove",this.onPointerMove),this._pointerMoveTarget=null),this._pointerMoveTarget=this.stage||this,this._pointerMoveTarget.addEventListener("globalpointermove",this.onPointerMove)}onPointerMove(t){const r=this._pointerPosition,n=vi.allocate().copyFrom(t.data.global),i=this.wireframe.hitHandleType(this.groupBounds,this.projectionTransform,n);if(!this._pointerDown)this.setCursorFromHoveredHandle(i);else{const s=n.x,a=n.y;if(this._pointerDragging)switch(this._transformHandle){case"boxRotateTopLeft":case"boxRotateTopRight":case"boxRotateBottomLeft":case"boxRotateBottomRight":this.rotateGroup(this._transformHandle,n);break;case"topCenter":case"middleLeft":case"middleRight":case"bottomCenter":this.scaleGroup(this._transformHandle,n);break;default:if(this.translateEnabled){const[o,l,h]=fu;o.set(0,0),l.set(n.x-r.x,n.y-r.y),this.projectionTransform.applyInverse(o,o),this.projectionTransform.applyInverse(l,l),h.set(l.x-o.x,l.y-o.y),this.translateGroup(h)}}else this._transformHandle=this.wireframe.hitHandleType(this.groupBounds,this.projectionTransform,n),this.setCursorFromHoveredHandle(i);this._pointerPosition.x=s,this._pointerPosition.y=a,this._pointerDragging=!0,t.stopPropagation()}vi.release(n)}onPointerUp(t){this._pointerDragging=!1,this._pointerDown=!1,this.commitGroup(),t.stopPropagation(),this._pointerMoveTarget&&(this._pointerMoveTarget.removeEventListener("globalpointermove",this.onPointerMove),this._pointerMoveTarget=null)}prependTransform(t,r=!1){const n=this.group;for(let i=0,s=n.length;i<s;i++)xy(n[i],t,!1);pu.copyFrom(t),r||this.updateGroupBounds(),this.emit("transformchange",pu)}updateGroupBounds(t=this.groupBounds.rotation){re.calculateGroupOrientedBounds(this.group,t,this.groupBounds),this.drawHandles(this.groupBounds),this.lazyDirty=!0}snapAngle(t,r,n){if(t=t%(Math.PI*2),!n||n.length===1||!r)return t;for(let i=0,s=n.length;i<s;i++)if(Math.abs(t-n[i])<=r)return n[i];return t}swapHandles(t,r){const n=t.handle,i=r.handle,s=t.cursor,a=r.cursor,o=t.x,l=r.x,h=t.y,c=r.y;t.handle=i,r.handle=n,t.position.set(l,c),r.position.set(o,h),t.cursor=a,r.cursor=s,this.handles[n]=r,this.handles[i]=t,this._transformHandle===n?this._transformHandle=i:this._transformHandle===i&&(this._transformHandle=n)}setCursorFromHoveredHandle(t){if(t&&t.startsWith("boxRotate"))this.cursor=this.cursors.boxRotate||this.cursors.default;else if(t)switch(t){case"topCenter":this.cursor=this.cursors.boxScaleTop||this.cursors.default;break;case"middleLeft":this.cursor=this.cursors.boxScaleLeft||this.cursors.default;break;case"middleRight":this.cursor=this.cursors.boxScaleRight||this.cursors.default;break;case"bottomCenter":this.cursor=this.cursors.boxScaleBottom||this.cursors.default;break}else this.cursor=this.cursors.translate||this.cursors.default}projectToLocal(t,r){return r||(r=new nt),this.projectionTransform.apply(t,r),this.worldTransform.applyInverse(r,r),r}static calculateTransformedCorners(t,r=t.worldTransform,n,i=0){const s=t.getLocalBounds();return t.getBounds(),n=n||[new nt,new nt,new nt,new nt],n[i].set(s.x,s.y),n[i+1].set(s.x+s.width,s.y),n[i+2].set(s.x+s.width,s.y+s.height),n[i+3].set(s.x,s.y+s.height),r.apply(n[i],n[i]),r.apply(n[i+1],n[i+1]),r.apply(n[i+2],n[i+2]),r.apply(n[i+3],n[i+3]),n}static calculateOrientedBounds(t,r){const n=t.parent?t.parent:t.enableTempParent();t.updateTransform(),t.disableTempParent(n),cu(yi,t.worldTransform),yi.updateLocalTransform();const i=yi.rotation,s=re.calculateTransformedCorners(t,t.worldTransform,wy),a=(s[0].x+s[1].x+s[2].x+s[3].x)/4,o=(s[0].y+s[1].y+s[2].y+s[3].y)/4,l=kr.identity().translate(-a,-o).rotate(-yi.rotation).translate(a,o);return l.apply(s[0],s[0]),l.apply(s[1],s[1]),l.apply(s[2],s[2]),l.apply(s[3],s[3]),r=r||new ai,r.rotation=i,r.innerBounds.x=Math.min(s[0].x,s[1].x,s[2].x,s[3].x),r.innerBounds.y=Math.min(s[0].y,s[1].y,s[2].y,s[3].y),r.innerBounds.width=Math.max(s[0].x,s[1].x,s[2].x,s[3].x)-r.innerBounds.x,r.innerBounds.height=Math.max(s[0].y,s[1].y,s[2].y,s[3].y)-r.innerBounds.y,r}static calculateGroupOrientedBounds(t,r,n,i=!1){const s=t.length,a=vi.allocateArray(s*4);for(let u=0;u<s;u++){const d=t[u];if(!i){const p=d.parent?d.parent:d.enableTempParent();d.updateTransform(),d.disableTempParent(p)}re.calculateTransformedCorners(d,d.worldTransform,a,u*4)}const o=kr.identity().rotate(-r);let l=Number.MAX_VALUE,h=Number.MAX_VALUE,c=-Number.MAX_VALUE,f=-Number.MAX_VALUE;for(let u=0,d=a.length;u<d;u++){const p=a[u];o.apply(p,p);const v=p.x,g=p.y;l=v<l?v:l,h=g<h?g:h,c=v>c?v:c,f=g>f?g:f}return vi.releaseArray(a),n=n||new ai,n.innerBounds.x=l,n.innerBounds.y=h,n.innerBounds.width=c-l,n.innerBounds.height=f-h,n.rotation=r,o.applyInverse(n.center,Pr),n.center.copyFrom(Pr),n}};function Py(e,t,r,n){for(const i in t){const s=r[i],a=n[i],o=t[i];s!==a&&(s&&e.off(o,s),a&&e.on(o,a))}}const gi={},My=Ot.IDENTITY,Ly={transformchange:"transformchange",transformcommit:"transformcommit"},Fy=yt.PixiComponent("Transformer",{create:e=>new ky(e),applyProps(e,t,r){if(yt.applyDefaultProps(e,t,r),Py(e,Ly,t,r),r.cursors&&Object.assign(e.cursors,r.cursors),e.group=r.group||[],e.boundingBoxes=r.boundingBoxes||"all",e.boxScalingEnabled=r.boxScalingEnabled===!0,e.boxScalingTolerance=r.boxScalingTolerance!==void 0?r.boxScalingTolerance:e.boxScalingTolerance,e.boxRotationEnabled=r.boxRotationEnabled===!0,e.boxRotationTolerance=r.boxRotationTolerance!==void 0?r.boxRotationTolerance:e.boxRotationTolerance,e.centeredScaling=r.centeredScaling,e.enabledHandles=r.enabledHandles,e.lockAspectRatio=r.lockAspectRatio,e.projectionTransform.copyFrom(r.projectionTransform||My),e.skewRadius=r.skewRadius||e.skewRadius,e.rotateEnabled=r.rotateEnabled!==!1,e.scaleEnabled=r.scaleEnabled!==!1,e.skewEnabled=r.skewEnabled===!0,e.translateEnabled=r.translateEnabled!==!1,e.transientGroupTilt=r.transientGroupTilt,t.handleConstructor!==r.handleConstructor)throw new Error("Transformer does not support changing the TransformerHandleConstructor!");t.rotationSnaps!==r.rotationSnaps&&(e.rotationSnaps=r.rotationSnaps),t.rotationSnapTolerance!==r.rotationSnapTolerance&&(e.rotationSnapTolerance=r.rotationSnapTolerance),t.skewSnaps!==r.skewSnaps&&(e.skewSnaps=r.skewSnaps),t.skewSnapTolerance!==r.skewSnapTolerance&&(e.skewSnapTolerance=r.skewSnapTolerance);const n=t.handleStyle||gi,i=r.handleStyle||gi;(n.color!==i.color||n.outlineColor!==i.outlineColor||n.outlineThickness!==i.outlineThickness||n.radius!==i.radius||n.shape!==i.shape)&&(e.handleStyle=i);const s=t.wireframeStyle||gi,a=r.wireframeStyle||gi;(s.color!==a.color||s.thickness!==a.thickness)&&(e.wireframeStyle=a)}}),la=({pixiTransformerRef:e,imageRef:t,transformCommit:r,transformChange:n,mouseoverEvent:i,onDoubleClick:s,uniqueId:a=""})=>{console.log("transformer props",{pixiTransformerRef:e,imageRef:t,transformCommit:r,transformChange:n,mouseoverEvent:i,onDoubleClick:s,uniqueId:a});const o=ne.utils.string2hex("#F3C409"),l=ne.utils.string2hex("#F3C409"),h=lt.useRef({isDragging:!1}),c=lt.useCallback(()=>{i&&!h.current.isDragging&&i(!0)},[i]),f=lt.useCallback(()=>{i&&!h.current.isDragging&&i(!1)},[i]),u=lt.useCallback(()=>{h.current.isDragging=!0},[]),d=lt.useCallback(()=>{h.current.isDragging=!1},[]),p=lt.useCallback(g=>{h.current.isDragging=!0,n&&n(g)},[n]),v=lt.useCallback(()=>{if(t.current===null)return;const g=t.current.x,y=t.current.y,b=t.current.width,_=t.current.height,m=t.current.rotation,x=[t.current.scale.x,t.current.scale.y];r&&r({uniqueId:a,transformation:{x:Math.round(g),y:Math.round(y),width:Math.round(Math.max(5,b)),height:Math.round(Math.max(5,_)),rotate:Math.round(m),scale:x}}),h.current.isDragging=!1},[r]);return lt.useEffect(()=>(e.current&&(e.current.on("mouseover",c),e.current.on("mouseout",f),e.current.on("mousedown",u),e.current.on("mouseup",d)),()=>{e.current&&(e.current.off("mouseover",c),e.current.off("mouseout",f),e.current.off("mousedown",u),e.current.off("mouseup",d))}),[]),ft.jsx(Fy,{ref:e,group:[t.current],rotateEnabled:!0,boxRotationEnabled:!0,centeredScaling:!0,boxScalingEnabled:!0,wireframeStyle:{thickness:1,color:l},lockAspectRatio:!0,scaleEnabled:!0,handleStyle:{outlineColor:o,shape:"circle",radius:9},transformchange:p,transformcommit:v})};var bi={};Object.defineProperty(bi,"__esModule",{value:!0});var By=J,ua;function mu(){return ua||(ua=document.createElement("div")),ua}function Dy(e,t,r){var n;return By.useEffect(function(){n=n||mu();var i=function(s){var a=s.detail;t(a)};return n.addEventListener(e,i,!1),function(){n==null||n.removeEventListener(e,i,!1)}},r),function(i){n=i}}function Uy(e,t){var r=mu(),n=new CustomEvent(e,{detail:t});r.dispatchEvent(n)}function jy(){var e;function t(r){e=r}return t.emit=function(r,n){var i=new CustomEvent(r,{bubbles:!0,detail:n});e==null||e.dispatchEvent(i)},t}var gu=bi.emitCustomEvent=Uy;bi.newCustomEventEmitter=jy;var un=bi.useCustomEventListener=Dy;const Mr=lt.createContext({}),je={STOP:"GSAP_STOP",PAUSE:"GSAP_PAUSE",PLAY:"GSAP_PLAY",RESUME:"GSAP_RESUME",RESTART:"GSAP_RESTART",REPEAT:"GSAP_REPEAT",SEEK:"GSAP_SEEK",RESET:"GSAP_RESET",DRAGGING_START:"GSAP_DRAGGING_START",DRAGGING_END:"GSAP_DRAGGING_END"},Gy=({children:e})=>{const[t,r]=J.useState(!1),[n,i]=J.useState(!1),s=J.useRef(),a=J.useRef(),o=J.useRef(.001);J.useLayoutEffect(()=>(a.current=ye.context(()=>{s.current&&s.current.progress(0).kill(),s.current=ye.timeline({paused:!0,defaults:{duration:0}})}),()=>a.current.revert()),[]);const l=J.useCallback(()=>{let b=s.current.time();o.current=b},[]);J.useEffect(()=>{const y=s.current;y.eventCallback("onStart",function(){}).eventCallback("onInterrupt",function(){y.pause(),l()}).eventCallback("onUpdate",function(){l()}).eventCallback("onPause",function(){console.log("onPause",y.progress()),l()}).eventCallback("onResume",function(){console.log("onResume",y.progress()),l()}).eventCallback("onComplete",function(){y.seek(0),y.pause(),l()})},[]);const h=J.useCallback(()=>{s.current.revert()},[]),c=J.useCallback(()=>{s.current.restart(),r(!0)},[]),f=J.useCallback(()=>{const y=s.current;y.repeat(1),y.restart()},[]),u=J.useCallback(y=>{s.current.seek(y)},[]),d=J.useCallback(()=>{s.current.seek(4)},[]),p=J.useCallback(()=>{const y=s.current;return y?y.totalDuration():0},[]),v=()=>{s.current.pause(),gu(je.PAUSE),r(!1)},g=()=>{const y=s.current;r(!0),y.resume(),gu(je.RESUME)};return un(je.DRAGGING_START,()=>{console.log("dragging start"),i(!0)}),un(je.DRAGGING_END,()=>{i(!1),console.log("dragging end")}),console.log("set play updated",t),ft.jsx(Mr.Provider,{value:{gsapCtx:a,tl:s,handlePlay:g,handlePause:v,handleReset:h,handleSeek:u,handleSeekTest:d,handleRestart:c,handleRepeat:f,playerTimeRef:o,isDragging:n,getTimelineDuration:p},children:e})},ha=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 $y=Object.prototype;function qy(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||$y;return e===r}var bu=qy;function Hy(e,t){return function(r){return e(t(r))}}var zy=Hy,Vy=zy,Xy=Vy(Object.keys,Object),Wy=Xy,Yy=bu,Ky=Wy,Zy=Object.prototype,Qy=Zy.hasOwnProperty;function Jy(e){if(!Yy(e))return Ky(e);var t=[];for(var r in Object(e))Qy.call(e,r)&&r!="constructor"&&t.push(r);return t}var _u=Jy,tv=typeof ke=="object"&&ke&&ke.Object===Object&&ke,xu=tv,ev=xu,rv=typeof self=="object"&&self&&self.Object===Object&&self,nv=ev||rv||Function("return this")(),Ie=nv,iv=Ie,sv=iv.Symbol,_i=sv,wu=_i,Eu=Object.prototype,av=Eu.hasOwnProperty,ov=Eu.toString,hn=wu?wu.toStringTag:void 0;function lv(e){var t=av.call(e,hn),r=e[hn];try{e[hn]=void 0;var n=!0}catch{}var i=ov.call(e);return n&&(t?e[hn]=r:delete e[hn]),i}var uv=lv,hv=Object.prototype,cv=hv.toString;function fv(e){return cv.call(e)}var dv=fv,Tu=_i,pv=uv,yv=dv,vv="[object Null]",mv="[object Undefined]",Au=Tu?Tu.toStringTag:void 0;function gv(e){return e==null?e===void 0?mv:vv:Au&&Au in Object(e)?pv(e):yv(e)}var cn=gv;function bv(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ca=bv,_v=cn,xv=ca,wv="[object AsyncFunction]",Ev="[object Function]",Tv="[object GeneratorFunction]",Av="[object Proxy]";function Sv(e){if(!xv(e))return!1;var t=_v(e);return t==Ev||t==Tv||t==wv||t==Av}var Su=Sv,Ov=Ie,Rv=Ov["__core-js_shared__"],Iv=Rv,fa=Iv,Ou=function(){var e=/[^.]+$/.exec(fa&&fa.keys&&fa.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Nv(e){return!!Ou&&Ou in e}var Cv=Nv,kv=Function.prototype,Pv=kv.toString;function Mv(e){if(e!=null){try{return Pv.call(e)}catch{}try{return e+""}catch{}}return""}var Ru=Mv,Lv=Su,Fv=Cv,Bv=ca,Dv=Ru,Uv=/[\\^$.*+?()[\]{}|]/g,jv=/^\[object .+?Constructor\]$/,Gv=Function.prototype,$v=Object.prototype,qv=Gv.toString,Hv=$v.hasOwnProperty,zv=RegExp("^"+qv.call(Hv).replace(Uv,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Vv(e){if(!Bv(e)||Fv(e))return!1;var t=Lv(e)?zv:jv;return t.test(Dv(e))}var Xv=Vv;function Wv(e,t){return e==null?void 0:e[t]}var Yv=Wv,Kv=Xv,Zv=Yv;function Qv(e,t){var r=Zv(e,t);return Kv(r)?r:void 0}var Lr=Qv,Jv=Lr,tm=Ie,em=Jv(tm,"DataView"),rm=em,nm=Lr,im=Ie,sm=nm(im,"Map"),da=sm,am=Lr,om=Ie,lm=am(om,"Promise"),um=lm,hm=Lr,cm=Ie,fm=hm(cm,"Set"),dm=fm,pm=Lr,ym=Ie,vm=pm(ym,"WeakMap"),mm=vm,pa=rm,ya=da,va=um,ma=dm,ga=mm,Iu=cn,Fr=Ru,Nu="[object Map]",gm="[object Object]",Cu="[object Promise]",ku="[object Set]",Pu="[object WeakMap]",Mu="[object DataView]",bm=Fr(pa),_m=Fr(ya),xm=Fr(va),wm=Fr(ma),Em=Fr(ga),sr=Iu;(pa&&sr(new pa(new ArrayBuffer(1)))!=Mu||ya&&sr(new ya)!=Nu||va&&sr(va.resolve())!=Cu||ma&&sr(new ma)!=ku||ga&&sr(new ga)!=Pu)&&(sr=function(e){var t=Iu(e),r=t==gm?e.constructor:void 0,n=r?Fr(r):"";if(n)switch(n){case bm:return Mu;case _m:return Nu;case xm:return Cu;case wm:return ku;case Em:return Pu}return t});var Lu=sr;function Tm(e){return e!=null&&typeof e=="object"}var fn=Tm,Am=cn,Sm=fn,Om="[object Arguments]";function Rm(e){return Sm(e)&&Am(e)==Om}var Im=Rm,Fu=Im,Nm=fn,Bu=Object.prototype,Cm=Bu.hasOwnProperty,km=Bu.propertyIsEnumerable,Pm=Fu(function(){return arguments}())?Fu:function(e){return Nm(e)&&Cm.call(e,"callee")&&!km.call(e,"callee")},ba=Pm,Mm=Array.isArray,xe=Mm,Lm=9007199254740991;function Fm(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Lm}var _a=Fm,Bm=Su,Dm=_a;function Um(e){return e!=null&&Dm(e.length)&&!Bm(e)}var xi=Um,wi={exports:{}};function jm(){return!1}var Gm=jm;wi.exports,function(e,t){var r=Ie,n=Gm,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,h=l||n;e.exports=h}(wi,wi.exports);var xa=wi.exports,$m=cn,qm=_a,Hm=fn,zm="[object Arguments]",Vm="[object Array]",Xm="[object Boolean]",Wm="[object Date]",Ym="[object Error]",Km="[object Function]",Zm="[object Map]",Qm="[object Number]",Jm="[object Object]",tg="[object RegExp]",eg="[object Set]",rg="[object String]",ng="[object WeakMap]",ig="[object ArrayBuffer]",sg="[object DataView]",ag="[object Float32Array]",og="[object Float64Array]",lg="[object Int8Array]",ug="[object Int16Array]",hg="[object Int32Array]",cg="[object Uint8Array]",fg="[object Uint8ClampedArray]",dg="[object Uint16Array]",pg="[object Uint32Array]",Rt={};Rt[ag]=Rt[og]=Rt[lg]=Rt[ug]=Rt[hg]=Rt[cg]=Rt[fg]=Rt[dg]=Rt[pg]=!0,Rt[zm]=Rt[Vm]=Rt[ig]=Rt[Xm]=Rt[sg]=Rt[Wm]=Rt[Ym]=Rt[Km]=Rt[Zm]=Rt[Qm]=Rt[Jm]=Rt[tg]=Rt[eg]=Rt[rg]=Rt[ng]=!1;function yg(e){return Hm(e)&&qm(e.length)&&!!Rt[$m(e)]}var vg=yg;function mg(e){return function(t){return e(t)}}var gg=mg,Ei={exports:{}};Ei.exports,function(e,t){var r=xu,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}(Ei,Ei.exports);var bg=Ei.exports,_g=vg,xg=gg,Du=bg,Uu=Du&&Du.isTypedArray,wg=Uu?xg(Uu):_g,wa=wg,Eg=_u,Tg=Lu,Ag=ba,Sg=xe,Og=xi,Rg=xa,Ig=bu,Ng=wa,Cg="[object Map]",kg="[object Set]",Pg=Object.prototype,Mg=Pg.hasOwnProperty;function Lg(e){if(e==null)return!0;if(Og(e)&&(Sg(e)||typeof e=="string"||typeof e.splice=="function"||Rg(e)||Ng(e)||Ag(e)))return!e.length;var t=Tg(e);if(t==Cg||t==kg)return!e.size;if(Ig(e))return!Eg(e).length;for(var r in e)if(Mg.call(e,r))return!1;return!0}var Fg=Lg;const ee=or(Fg),Bg=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],Ea=e=>{const[t,r]=lt.useState(!1),[,n]=J.useState(!1),[,i]=J.useState(!1),s=J.useRef(null),a=J.useRef(null),o=J.useRef(null),l=J.useRef(null),{tl:h}=J.useContext(Mr),{uniqueId:c,startAt:f,endAt:u,initialAlpha:d,transformation:{x:p,y:v,width:g,height:y,colorCorrection:b,animation:_,effect:m},applyTransformer:x}=e;console.log("all abstract props",e);const{contrast:S=1,saturation:w=1,brightness:T=1,alpha:N=1,blurRadius:A=0}=b||{},E={...T>1&&{brightness:T},...S>1&&{contrast:S},...w>1&&{saturation:w},...N!==0&&{alpha:N}};lt.useEffect(()=>{s.current&&r(!0)},[]),lt.useEffect(()=>{let U=ye.context(()=>{});if(s.current&&h.current){const D={duration:Number(u)-Number(f)},z=ha(_||"None");U=ye.context(()=>{var j,k;ee(z.from)?ee(z.to)?ee(z.fromTo)?h.current.to(s.current,{alpha:1,duration:.01},f).from(o.current,{...D},f).to(s.current,{alpha:0,duration:.1},Number(u)-.1):h.current.fromTo(s.current,(j=z.fromTo)==null?void 0:j.from,(k=z.fromTo)==null?void 0:k.to,f).from(o.current,{...D},f).to(s.current,{alpha:0,duration:.2},u-.2):h.current.to(s.current,{alpha:1,duration:.2,...z.to},f).from(o.current,{...D},f).to(s.current,{alpha:0,duration:.2},u-.2):h.current.from(s.current,{...z.from},f).to(o.current,{alpha:1,duration:.2},f).from(o.current,{...D},f).to(s.current,{alpha:0,duration:.2},u-.2)})}return()=>U.revert()},[_,f,u]);const O=lt.useCallback(()=>{n(!0)},[]),R=lt.useCallback(U=>{console.log("changeEnd",U),e.onAnchorTransformationEnd&&(console.log("running onAnchorTransformationEnd"),e.onAnchorTransformationEnd(U))},[]),C=yt.withFilters(yt.Container,{...A>0&&{blur:ne.filters.BlurFilter},...!ee(E)&&{adjust:Zs},matrix:ne.filters.ColorMatrixFilter}),F=(b==null?void 0:b.enabled)||m&&m!==er.Normal;return ft.jsxs(yt.Container,{ref:a,children:[ft.jsxs(yt.Container,{ref:s,alpha:d,position:[p,v],pivot:[p,v],width:g,height:y,children:[F&&ft.jsx(C,{scale:1,blur:{blur:A,quality:4},adjust:E,apply:({matrix:U})=>{m===er.BlackAndWhite?U.desaturate():m===er.Sepia?U.sepia():m===er.RetroVintage||m===er.NightVision?U.negative():m===er.Normal&&U.reset()},matrix:{enabled:!0,matrix:Bg},children:ft.jsx(yt.Container,{ref:o,children:e.children})}),!F&&ft.jsx(yt.Container,{ref:o,children:e.children})]}),x&&t&&ft.jsx(la,{pixiTransformerRef:l,imageRef:s,transformCommit:R,transformChange:O,mouseoverEvent:i,uniqueId:c})]})},Dg=e=>{const t=J.useRef(null),r=J.useRef(null),{src:n,transformation:{x:i,y:s,width:a,height:o,anchor:l},pointerdown:h,pointerup:c,mousedown:f,mouseup:u,pointerover:d,mouseover:p,mouseout:v}=e;return ft.jsx(Ea,{...e,children:ft.jsx(yt.Container,{ref:r,children:ft.jsx(yt.Sprite,{image:n,width:a,height:o,anchor:l,ref:t,x:i,y:s,interactive:!0,pointerdown:h,pointerup:c,pointerover:d,mousedown:f,mouseup:u,mouseover:p,mouseout:v})})})};var Ug=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ta={},jg={get exports(){return Ta},set exports(e){Ta=e}};/*!
540
540
  * d-path-parser - v1.0.0
541
541
  * by Massimo Artizzu (MaxArt2501)
542
542
  *
@@ -547,7 +547,7 @@ void main(void)
547
547
  */(function(e,t){(function(r,n){e.exports=n()})(Ug,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 y=d("number",!0);return{x:+g,y:+y}},"arc definition":function(v){var g=s["coordinate pair"](v);if(!g&&!v)return null;d("comma");var y=+d("number",!0);d("comma",!0);var b=!!+d("flag",!0);d("comma");var _=!!+d("flag",!0);d("comma");var m=s["coordinate pair"](!0);return{radii:g,rotation:y,large:b,clockwise:_,end:m}}},a=0,o=[];a<n.length;){var l=d("command"),h=l.toUpperCase(),c=l!==h,f;switch(h){case"M":f=p("coordinate pair").map(function(v,g){return g===1&&(l=c?"l":"L"),u({end:v})});break;case"L":case"T":f=p("coordinate pair").map(function(v){return u({end:v})});break;case"C":if(f=p("coordinate pair"),f.length%3)throw Error("Expected coordinate pair triplet at position "+a);f=f.reduce(function(v,g,y){var b=y%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(f=p("coordinate pair"),f.length&1)throw Error("Expected coordinate pair couple at position "+a);f=f.reduce(function(v,g,y){var b=y&1;if(!b)v.push(u({cp:g}));else{var _=v[v.length-1];_.end=g}return v},[]);break;case"H":case"V":f=p("number").map(function(v){return u({value:v})});break;case"A":f=p("arc definition").map(u);break;case"Z":f=[{code:"Z"}];break}o.push.apply(o,f)}return o;function u(v){return v.code=l,v.relative=c,v}function d(v,g){i[v].lastIndex=a;var y=i[v].exec(n);if(!y||y.index!==a){if(!g)return null;throw Error("Expected "+v+" at position "+a)}return a=i[v].lastIndex,y[1]}function p(v){for(var g=[],y,b=!0;y=s[v](b);)g.push(y),b=!!d("comma");return g}}})})(jg);const Gg=/^\s+/,$g=/\s+$/;function st(e,t){if(e=e||"",t=t||{},e instanceof st)return e;if(!(this instanceof st))return new st(e,t);var r=qg(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}st.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=zu(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=Gu(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=Gu(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=ju(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=ju(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 $u(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return Xg(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:s0[$u(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var t="#"+qu(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var i=st(e);r="#"+qu(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 st(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(Zg,arguments)},brighten:function(){return this._applyModification(Qg,arguments)},darken:function(){return this._applyModification(Jg,arguments)},desaturate:function(){return this._applyModification(Wg,arguments)},saturate:function(){return this._applyModification(Yg,arguments)},greyscale:function(){return this._applyModification(Kg,arguments)},spin:function(){return this._applyModification(t0,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(n0,arguments)},complement:function(){return this._applyCombination(e0,arguments)},monochromatic:function(){return this._applyCombination(i0,arguments)},splitcomplement:function(){return this._applyCombination(r0,arguments)},triad:function(){return this._applyCombination(Hu,[3])},tetrad:function(){return this._applyCombination(Hu,[4])}},st.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]=dn(e[n]));e=r}return st(e,t)};function qg(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=u0(e)),typeof e=="object"&&(Ne(e.r)&&Ne(e.g)&&Ne(e.b)?(t=Hg(e.r,e.g,e.b),a=!0,o=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Ne(e.h)&&Ne(e.s)&&Ne(e.v)?(n=dn(e.s),i=dn(e.v),t=Vg(e.h,n,i),a=!0,o="hsv"):Ne(e.h)&&Ne(e.s)&&Ne(e.l)&&(n=dn(e.s),s=dn(e.l),t=zg(e.h,n,s),a=!0,o="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=zu(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 Hg(e,t,r){return{r:Nt(e,255)*255,g:Nt(t,255)*255,b:Nt(r,255)*255}}function ju(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 zg(e,t,r){var n,i,s;e=Nt(e,360),t=Nt(t,100),r=Nt(r,100);function a(h,c,f){return f<0&&(f+=1),f>1&&(f-=1),f<1/6?h+(c-h)*6*f:f<1/2?c:f<2/3?h+(c-h)*(2/3-f)*6:h}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 Gu(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 Vg(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,h=[r,a,s,s,o,r][l],c=[o,r,r,a,s,s][l],f=[s,s,o,r,r,a][l];return{r:h*255,g:c*255,b:f*255}}function $u(e,t,r,n){var i=[ce(Math.round(e).toString(16)),ce(Math.round(t).toString(16)),ce(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 Xg(e,t,r,n,i){var s=[ce(Math.round(e).toString(16)),ce(Math.round(t).toString(16)),ce(Math.round(r).toString(16)),ce(Vu(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 qu(e,t,r,n){var i=[ce(Vu(n)),ce(Math.round(e).toString(16)),ce(Math.round(t).toString(16)),ce(Math.round(r).toString(16))];return i.join("")}st.equals=function(e,t){return!e||!t?!1:st(e).toRgbString()==st(t).toRgbString()},st.random=function(){return st.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function Wg(e,t){t=t===0?0:t||10;var r=st(e).toHsl();return r.s-=t/100,r.s=Ti(r.s),st(r)}function Yg(e,t){t=t===0?0:t||10;var r=st(e).toHsl();return r.s+=t/100,r.s=Ti(r.s),st(r)}function Kg(e){return st(e).desaturate(100)}function Zg(e,t){t=t===0?0:t||10;var r=st(e).toHsl();return r.l+=t/100,r.l=Ti(r.l),st(r)}function Qg(e,t){t=t===0?0:t||10;var r=st(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)))),st(r)}function Jg(e,t){t=t===0?0:t||10;var r=st(e).toHsl();return r.l-=t/100,r.l=Ti(r.l),st(r)}function t0(e,t){var r=st(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,st(r)}function e0(e){var t=st(e).toHsl();return t.h=(t.h+180)%360,st(t)}function Hu(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var r=st(e).toHsl(),n=[st(e)],i=360/t,s=1;s<t;s++)n.push(st({h:(r.h+s*i)%360,s:r.s,l:r.l}));return n}function r0(e){var t=st(e).toHsl(),r=t.h;return[st(e),st({h:(r+72)%360,s:t.s,l:t.l}),st({h:(r+216)%360,s:t.s,l:t.l})]}function n0(e,t,r){t=t||6,r=r||30;var n=st(e).toHsl(),i=360/r,s=[st(e)];for(n.h=(n.h-(i*t>>1)+720)%360;--t;)n.h=(n.h+i)%360,s.push(st(n));return s}function i0(e,t){t=t||6;for(var r=st(e).toHsv(),n=r.h,i=r.s,s=r.v,a=[],o=1/t;t--;)a.push(st({h:n,s:i,v:s})),s=(s+o)%1;return a}st.mix=function(e,t,r){r=r===0?0:r||50;var n=st(e).toRgb(),i=st(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 st(a)},st.readability=function(e,t){var r=st(e),n=st(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},st.isReadable=function(e,t,r){var n=st.readability(e,t),i,s;switch(s=!1,i=h0(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},st.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 h=0;h<t.length;h++)s=st.readability(e,t[h]),s>i&&(i=s,n=st(t[h]));return st.isReadable(e,n,{level:o,size:l})||!a?n:(r.includeFallbackColors=!1,st.mostReadable(e,["#fff","#000"],r))};var Aa=st.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"},s0=st.hexNames=a0(Aa);function a0(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function zu(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Nt(e,t){o0(e)&&(e="100%");var r=l0(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 Ti(e){return Math.min(1,Math.max(0,e))}function Qt(e){return parseInt(e,16)}function o0(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function l0(e){return typeof e=="string"&&e.indexOf("%")!=-1}function ce(e){return e.length==1?"0"+e:""+e}function dn(e){return e<=1&&(e=e*100+"%"),e}function Vu(e){return Math.round(parseFloat(e)*255).toString(16)}function Xu(e){return Qt(e)/255}var fe=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 Ne(e){return!!fe.CSS_UNIT.exec(e)}function u0(e){e=e.replace(Gg,"").replace($g,"").toLowerCase();var t=!1;if(Aa[e])e=Aa[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=fe.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=fe.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=fe.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=fe.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=fe.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=fe.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=fe.hex8.exec(e))?{r:Qt(r[1]),g:Qt(r[2]),b:Qt(r[3]),a:Xu(r[4]),format:t?"name":"hex8"}:(r=fe.hex6.exec(e))?{r:Qt(r[1]),g:Qt(r[2]),b:Qt(r[3]),format:t?"name":"hex"}:(r=fe.hex4.exec(e))?{r:Qt(r[1]+""+r[1]),g:Qt(r[2]+""+r[2]),b:Qt(r[3]+""+r[3]),a:Xu(r[4]+""+r[4]),format:t?"name":"hex8"}:(r=fe.hex3.exec(e))?{r:Qt(r[1]+""+r[1]),g:Qt(r[2]+""+r[2]),b:Qt(r[3]+""+r[3]),format:t?"name":"hex"}:!1}function h0(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 c0=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(h){s=!0,a=h}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")}}(),pn=Math.PI*2,Sa=function(t,r,n,i,s,a,o){var l=t.x,h=t.y;l*=r,h*=n;var c=i*l-s*h,f=s*l+i*h;return{x:c+a,y:f+o}},f0=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}]},Wu=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)},d0=function(t,r,n,i,s,a,o,l,h,c,f,u){var d=Math.pow(s,2),p=Math.pow(a,2),v=Math.pow(f,2),g=Math.pow(u,2),y=d*p-d*g-p*v;y<0&&(y=0),y/=d*g+p*v,y=Math.sqrt(y)*(o===l?-1:1);var b=y*s/a*u,_=y*-a/s*f,m=c*b-h*_+(t+n)/2,x=h*b+c*_+(r+i)/2,S=(f-b)/s,w=(u-_)/a,T=(-f-b)/s,N=(-u-_)/a,A=Wu(1,0,S,w),E=Wu(S,w,T,N);return l===0&&E>0&&(E-=pn),l===1&&E<0&&(E+=pn),[m,x,A,E]},Yu=function(t){var r=t.px,n=t.py,i=t.cx,s=t.cy,a=t.rx,o=t.ry,l=t.xAxisRotation,h=l===void 0?0:l,c=t.largeArcFlag,f=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(h*pn/360),g=Math.cos(h*pn/360),y=g*(r-i)/2+v*(n-s)/2,b=-v*(r-i)/2+g*(n-s)/2;if(y===0&&b===0)return[];a=Math.abs(a),o=Math.abs(o);var _=Math.pow(y,2)/Math.pow(a,2)+Math.pow(b,2)/Math.pow(o,2);_>1&&(a*=Math.sqrt(_),o*=Math.sqrt(_));var m=d0(r,n,i,s,a,o,f,d,v,g,y,b),x=c0(m,4),S=x[0],w=x[1],T=x[2],N=x[3],A=Math.abs(N)/(pn/4);Math.abs(1-A)<1e-7&&(A=1);var E=Math.max(Math.ceil(A),1);N/=E;for(var O=0;O<E;O++)p.push(f0(T,N)),T+=N;return p.map(function(R){var C=Sa(R[0],a,o,g,v,S,w),F=C.x,U=C.y,D=Sa(R[1],a,o,g,v,S,w),z=D.x,j=D.y,k=Sa(R[2],a,o,g,v,S,w),I=k.x,P=k.y;return{x1:F,y1:U,x2:z,y2:j,x:I,y:P}})};class p0 extends Re{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}=st(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 h=0,c=0;o!==null&&(h=parseFloat(o)),l!==null&&(c=parseFloat(l)),i?this.drawEllipse(h,c,s,a):this.drawCircle(h,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:h,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:h===null&&r?this.line.join:h,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=Ta(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,h=i;this.bezierCurveTo(l+o.cp1.x,h+o.cp1.y,l+o.cp2.x,h+o.cp2.y,n+=o.end.x,i+=o.end.y);break}case"s":case"q":{const l=n,h=i;this.quadraticCurveTo(l+o.cp.x,h+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":{Yu({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:h,x2:c,y2:f,x:u,y:d})=>this.bezierCurveTo(l,h,c,f,u,d));break}case"A":{Yu({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:h,x2:c,y2:f,x:u,y:d})=>this.bezierCurveTo(l,h,c,f,u,d));break}default:{console.info("[PIXI.SVG] Draw command not supported:",o.code,o);break}}}}}var Ai={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},y0=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function v0(e){return e===10||e===13||e===8232||e===8233||e===32||e===9||e===11||e===12||e===160||e>=5760&&y0.indexOf(e)>=0}function m0(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 g0(e){return(e|32)===97}function Br(e){return e>=48&&e<=57}function b0(e){return e>=48&&e<=57||e===43||e===45||e===46}function _0(e){this.index=0,this.path=e,this.max=e.length,this.result=[],this.param=0,this.err="",this.segmentStart=0,this.data=[]}function Si(e){for(;e.index<e.max&&v0(e.path.charCodeAt(e.index));)e.index++}function x0(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 w0(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),!Br(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&&Br(l)){e.err="SvgPath: numbers started with `0` such as `09` are illegal (at pos "+t+")";return}for(;r<n&&Br(e.path.charCodeAt(r));)r++,s=!0;l=r<n?e.path.charCodeAt(r):0}if(l===46){for(o=!0,r++;Br(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&&Br(e.path.charCodeAt(r)))for(;r<n&&Br(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 Oa(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>=Ai[r]&&(e.result.push([t].concat(n.splice(0,Ai[r]))),!!Ai[r]););}function E0(e){var t=e.max,r,n,i,s,a;if(e.segmentStart=e.index,r=e.path.charCodeAt(e.index),n=g0(r),!m0(r)){e.err="SvgPath: bad command "+e.path[e.index]+" (at pos "+e.index+")";return}if(s=Ai[e.path[e.index].toLowerCase()],e.index++,Si(e),e.data=[],!s){Oa(e);return}for(i=!1;;){for(a=s;a>0;a--){if(n&&(a===3||a===4)?x0(e):w0(e),e.err.length){Oa(e);return}e.data.push(e.param),Si(e),i=!1,e.index<t&&e.path.charCodeAt(e.index)===44&&(e.index++,Si(e),i=!0)}if(!i&&(e.index>=e.max||!b0(e.path.charCodeAt(e.index))))break}Oa(e)}var T0=function(t){var r=new _0(t),n=r.max;for(Si(r);r.index<n&&!r.err.length;)E0(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 A0(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 de(){if(!(this instanceof de))return new de;this.queue=[],this.cache=null}de.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)},de.prototype.translate=function(e,t){return(e!==0||t!==0)&&(this.cache=null,this.queue.push([1,0,0,1,e,t])),this},de.prototype.scale=function(e,t){return(e!==1||t!==1)&&(this.cache=null,this.queue.push([e,0,0,t,0,0])),this},de.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},de.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},de.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},de.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=A0(this.cache,this.queue[e]);return this.cache},de.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 Ku=de,S0=Ku,O0={matrix:!0,scale:!0,rotate:!0,translate:!0,skewX:!0,skewY:!0},R0=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,I0=/[\s,]+/,N0=function(t){var r=new S0,n,i;return t.split(R0).forEach(function(s){if(s.length){if(typeof O0[s]<"u"){n=s;return}switch(i=s.split(I0).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},yn=Math.PI*2;function Zu(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 C0(e,t,r,n,i,s,a,o,l,h){var c=h*(e-r)/2+l*(t-n)/2,f=-l*(e-r)/2+h*(t-n)/2,u=a*a,d=o*o,p=c*c,v=f*f,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 y=g*a/o*f,b=g*-o/a*c,_=h*y-l*b+(e+r)/2,m=l*y+h*b+(t+n)/2,x=(c-y)/a,S=(f-b)/o,w=(-c-y)/a,T=(-f-b)/o,N=Zu(1,0,x,S),A=Zu(x,S,w,T);return s===0&&A>0&&(A-=yn),s===1&&A<0&&(A+=yn),[_,m,N,A]}function k0(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 P0=function(t,r,n,i,s,a,o,l,h){var c=Math.sin(h*yn/360),f=Math.cos(h*yn/360),u=f*(t-n)/2+c*(r-i)/2,d=-c*(t-n)/2+f*(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=C0(t,r,n,i,s,a,o,l,c,f),g=[],y=v[2],b=v[3],_=Math.max(Math.ceil(Math.abs(b)/(yn/4)),1);b/=_;for(var m=0;m<_;m++)g.push(k0(y,b)),y+=b;return g.map(function(x){for(var S=0;S<x.length;S+=2){var w=x[S+0],T=x[S+1];w*=o,T*=l;var N=f*w-c*T,A=c*w+f*T;x[S+0]=N+v[0],x[S+1]=A+v[1]}return x})},vn=1e-10,Qu=Math.PI/180;function mn(e,t,r){if(!(this instanceof mn))return new mn(e,t,r);this.rx=e,this.ry=t,this.ax=r}mn.prototype.transform=function(e){var t=Math.cos(this.ax*Qu),r=Math.sin(this.ax*Qu),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<vn*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 h=o+a/2,c=o-a/2;return this.ax=Math.abs(l)<vn&&Math.abs(h-s)<vn?90:Math.atan(Math.abs(l)>Math.abs(h-s)?(h-i)/l:l/(h-s))*180/Math.PI,this.ax>=0?(this.rx=Math.sqrt(h),this.ry=Math.sqrt(c)):(this.ax+=90,this.rx=Math.sqrt(c),this.ry=Math.sqrt(h)),this},mn.prototype.isDegenerate=function(){return this.rx<vn*this.ry||this.ry<vn*this.rx};var M0=mn,L0=T0,F0=N0,Ge=Ku,B0=P0,D0=M0;function Mt(e){if(!(this instanceof Mt))return new Mt(e);var t=L0(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 Ge().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,h,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 f=e.toArray(),u=D0(n[1],n[2],n[3]).transform(f);if(f[0]*f[3]-f[1]*f[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(h=n[0],l=[h],c=h.toLowerCase()===h,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=Ge(),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(Ge().translate(e,t||0)),this},Mt.prototype.scale=function(e,t){return this.__stack.push(Ge().scale(e,!t&&t!==0?e:t)),this},Mt.prototype.rotate=function(e,t,r){return this.__stack.push(Ge().rotate(e,t||0,r||0)),this},Mt.prototype.skewX=function(e){return this.__stack.push(Ge().skewX(e)),this},Mt.prototype.skewY=function(e){return this.__stack.push(Ge().skewY(e)),this},Mt.prototype.matrix=function(e){return this.__stack.push(Ge().matrix(e)),this},Mt.prototype.transform=function(e){return e.trim()?(this.__stack.push(F0(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,h){h&&(a[h]=+a[h].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,h,c,f;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(f=[],h=0;h<r.length;h++)if(typeof n[h]<"u")for(c=0;c<n[h].length;c++)f.push(n[h][c]);else f.push(r[h]);return this.segments=f,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=B0(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(h){o.push(["C",h[2],h[3],h[4],h[5],h[6],h[7]])}),o))}),this},Mt.prototype.unshort=function(){var e=this.segments,t,r,n,i,s;return this.iterate(function(a,o,l,h){var c=a[0],f=c.toUpperCase(),u;o&&(f==="T"?(u=c==="t",n=e[o-1],n[0]==="Q"?(t=n[1]-l,r=n[2]-h):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+=h),e[o]=[u?"q":"Q",i,s,a[1],a[2]]):f==="S"&&(u=c==="s",n=e[o-1],n[0]==="C"?(t=n[3]-l,r=n[4]-h):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+=h),e[o]=[u?"c":"C",i,s,a[1],a[2],a[3],a[4]]))}),this};var U0=Mt,j0=U0;const G0=or(j0),$0=e=>{const[t,r]=lt.useState(null),n=J.useRef(null),i=J.useRef(null),s=J.useRef(null),{path:a,transformation:{x:o,y:l,width:h,height:c,anchor:f,fill:u,stroke:d="none",strokeWidth:p=0},pointerdown:v,pointerup:g,mousedown:y,mouseup:b,pointerover:_,mouseover:m,mouseout:x}=e,S=yt.useApp();return lt.useEffect(()=>{const w=G0(a).scale(5).translate(0,0).toString(),T=`<svg xmlns="http://www.w3.org/2000/svg" width="${h}" height="${c}">
548
548
  <path stroke="${d}" stroke-width="${p}" fill="${u}" d="${w}">
549
549
  </path>
550
- </svg>`,N=new p0(T),A=S.renderer.generateTexture(N);return r(A),()=>{}},[S,a,d,p,u]),ft.jsx(Ea,{...e,children:ft.jsx(yt.Container,{ref:i,children:ft.jsx(yt.Container,{ref:s,children:t&&ft.jsx(yt.Sprite,{texture:t,width:h,height:c,anchor:f,ref:n,x:o,y:l,interactive:!0,pointerdown:v,pointerup:g,pointerover:_,mousedown:y,mouseup:b,mouseover:m,mouseout:x})})})})},q0=e=>{const t={isPlaying:!1,progress:0,speed:1,mute:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1},[,r]=lt.useState(!1),n=J.useRef(t);console.log("allProps",e);const i=J.useRef(null),s=J.useRef(null),{tl:a,playerTimeRef:o}=J.useContext(Mr),{uniqueId:l,src:h,startAt:c,endAt:f,mute:u,speed:d}=e,p=lt.useRef(null);un(je.PAUSE,()=>{var m;console.log("pause event"),i.current&&((m=p.current)==null||m.pause(),n.current.isPlaying=!1)});const v=m=>{var x;i.current&&(console.log("audio gsapOnStart",m),o.current>=m&&o.current<=f&&((x=p.current)==null||x.play({volume:u?0:1,start:m,end:f,speed:d||1}),n.current.isPlaying=!0,n.current.completed=!1))},g=()=>{var m;i.current&&(console.log("audio gsapOnStart",c),(m=p.current)==null||m.stop(),n.current.isPlaying=!1,n.current.completed=!0)},y=m=>{var x,S,w;i.current&&!n.current.isPlaying&&!n.current.completed&&(console.log("audio gsapOnUpdate",m),(x=p.current)==null||x.refresh(),(S=p.current)==null||S.refreshPaused(),(w=p.current)==null||w.resume(),n.current.isPlaying=!0)},b=()=>{};J.useEffect(()=>{let m=ye.context(()=>{});if(i.current&&a.current){const x={duration:Number(f)-Number(c),onStart:v,onComplete:g,onStartParams:[c],onCompleteParams:[],onInterrupt:b,onUpdate:y,onUpdateParams:[]};m=ye.context(()=>{a.current.to(i.current,{alpha:1,duration:.01},c).from(s.current,{...x},c).to(i.current,{alpha:0,duration:.1},Number(f)-.1)})}return()=>m.revert()},[c,f]),lt.useEffect(()=>{i.current&&r(!0)},[]),lt.useEffect(()=>{i.current&&p.current&&(console.log("soundref",p.current),n.current.mute=u,n.current.speed=d,console.log("containerAudio",p.current.volume),p.current.volume=u?0:1)},[u,d]);const _=lt.useCallback((m,x)=>{p.current=x,n.current.loaded=!0},[]);return lt.useEffect(()=>(ee(h)||(p.current=$h.Sound.from({url:h,preload:!0,singleInstance:!0,loaded:_})),()=>{}),[l,h,_]),ft.jsx(yt.Container,{ref:i})};function H0(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 Ju=H0;function z0(){this.__data__=[],this.size=0}var V0=z0;function X0(e,t){return e===t||e!==e&&t!==t}var th=X0,W0=th;function Y0(e,t){for(var r=e.length;r--;)if(W0(e[r][0],t))return r;return-1}var Oi=Y0,K0=Oi,Z0=Array.prototype,Q0=Z0.splice;function J0(e){var t=this.__data__,r=K0(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Q0.call(t,r,1),--this.size,!0}var tb=J0,eb=Oi;function rb(e){var t=this.__data__,r=eb(t,e);return r<0?void 0:t[r][1]}var nb=rb,ib=Oi;function sb(e){return ib(this.__data__,e)>-1}var ab=sb,ob=Oi;function lb(e,t){var r=this.__data__,n=ob(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var ub=lb,hb=V0,cb=tb,fb=nb,db=ab,pb=ub;function Dr(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])}}Dr.prototype.clear=hb,Dr.prototype.delete=cb,Dr.prototype.get=fb,Dr.prototype.has=db,Dr.prototype.set=pb;var Ri=Dr,yb=Ri;function vb(){this.__data__=new yb,this.size=0}var mb=vb;function gb(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var bb=gb;function _b(e){return this.__data__.get(e)}var xb=_b;function wb(e){return this.__data__.has(e)}var Eb=wb,Tb=Lr,Ab=Tb(Object,"create"),Ii=Ab,eh=Ii;function Sb(){this.__data__=eh?eh(null):{},this.size=0}var Ob=Sb;function Rb(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Ib=Rb,Nb=Ii,Cb="__lodash_hash_undefined__",kb=Object.prototype,Pb=kb.hasOwnProperty;function Mb(e){var t=this.__data__;if(Nb){var r=t[e];return r===Cb?void 0:r}return Pb.call(t,e)?t[e]:void 0}var Lb=Mb,Fb=Ii,Bb=Object.prototype,Db=Bb.hasOwnProperty;function Ub(e){var t=this.__data__;return Fb?t[e]!==void 0:Db.call(t,e)}var jb=Ub,Gb=Ii,$b="__lodash_hash_undefined__";function qb(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Gb&&t===void 0?$b:t,this}var Hb=qb,zb=Ob,Vb=Ib,Xb=Lb,Wb=jb,Yb=Hb;function Ur(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])}}Ur.prototype.clear=zb,Ur.prototype.delete=Vb,Ur.prototype.get=Xb,Ur.prototype.has=Wb,Ur.prototype.set=Yb;var Kb=Ur,rh=Kb,Zb=Ri,Qb=da;function Jb(){this.size=0,this.__data__={hash:new rh,map:new(Qb||Zb),string:new rh}}var t_=Jb;function e_(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var r_=e_,n_=r_;function i_(e,t){var r=e.__data__;return n_(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Ni=i_,s_=Ni;function a_(e){var t=s_(this,e).delete(e);return this.size-=t?1:0,t}var o_=a_,l_=Ni;function u_(e){return l_(this,e).get(e)}var h_=u_,c_=Ni;function f_(e){return c_(this,e).has(e)}var d_=f_,p_=Ni;function y_(e,t){var r=p_(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var v_=y_,m_=t_,g_=o_,b_=h_,__=d_,x_=v_;function jr(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])}}jr.prototype.clear=m_,jr.prototype.delete=g_,jr.prototype.get=b_,jr.prototype.has=__,jr.prototype.set=x_;var Ra=jr,w_=Ri,E_=da,T_=Ra,A_=200;function S_(e,t){var r=this.__data__;if(r instanceof w_){var n=r.__data__;if(!E_||n.length<A_-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new T_(n)}return r.set(e,t),this.size=r.size,this}var O_=S_,R_=Ri,I_=mb,N_=bb,C_=xb,k_=Eb,P_=O_;function Gr(e){var t=this.__data__=new R_(e);this.size=t.size}Gr.prototype.clear=I_,Gr.prototype.delete=N_,Gr.prototype.get=C_,Gr.prototype.has=k_,Gr.prototype.set=P_;var nh=Gr,M_="__lodash_hash_undefined__";function L_(e){return this.__data__.set(e,M_),this}var F_=L_;function B_(e){return this.__data__.has(e)}var D_=B_,U_=Ra,j_=F_,G_=D_;function Ci(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new U_;++t<r;)this.add(e[t])}Ci.prototype.add=Ci.prototype.push=j_,Ci.prototype.has=G_;var $_=Ci;function q_(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 H_=q_;function z_(e,t){return e.has(t)}var V_=z_,X_=$_,W_=H_,Y_=V_,K_=1,Z_=2;function Q_(e,t,r,n,i,s){var a=r&K_,o=e.length,l=t.length;if(o!=l&&!(a&&l>o))return!1;var h=s.get(e),c=s.get(t);if(h&&c)return h==t&&c==e;var f=-1,u=!0,d=r&Z_?new X_:void 0;for(s.set(e,t),s.set(t,e);++f<o;){var p=e[f],v=t[f];if(n)var g=a?n(v,p,f,t,e,s):n(p,v,f,e,t,s);if(g!==void 0){if(g)continue;u=!1;break}if(d){if(!W_(t,function(y,b){if(!Y_(d,b)&&(p===y||i(p,y,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 ih=Q_,J_=Ie,t1=J_.Uint8Array,e1=t1;function r1(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var n1=r1;function i1(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var s1=i1,sh=_i,ah=e1,a1=th,o1=ih,l1=n1,u1=s1,h1=1,c1=2,f1="[object Boolean]",d1="[object Date]",p1="[object Error]",y1="[object Map]",v1="[object Number]",m1="[object RegExp]",g1="[object Set]",b1="[object String]",_1="[object Symbol]",x1="[object ArrayBuffer]",w1="[object DataView]",oh=sh?sh.prototype:void 0,Ia=oh?oh.valueOf:void 0;function E1(e,t,r,n,i,s,a){switch(r){case w1:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case x1:return!(e.byteLength!=t.byteLength||!s(new ah(e),new ah(t)));case f1:case d1:case v1:return a1(+e,+t);case p1:return e.name==t.name&&e.message==t.message;case m1:case b1:return e==t+"";case y1:var o=l1;case g1:var l=n&h1;if(o||(o=u1),e.size!=t.size&&!l)return!1;var h=a.get(e);if(h)return h==t;n|=c1,a.set(e,t);var c=o1(o(e),o(t),n,i,s,a);return a.delete(e),c;case _1:if(Ia)return Ia.call(e)==Ia.call(t)}return!1}var T1=E1;function A1(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var S1=A1,O1=S1,R1=xe;function I1(e,t,r){var n=t(e);return R1(e)?n:O1(n,r(e))}var N1=I1;function C1(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 k1=C1;function P1(){return[]}var M1=P1,L1=k1,F1=M1,B1=Object.prototype,D1=B1.propertyIsEnumerable,lh=Object.getOwnPropertySymbols,U1=lh?function(e){return e==null?[]:(e=Object(e),L1(lh(e),function(t){return D1.call(e,t)}))}:F1,j1=U1;function G1(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var $1=G1,q1=9007199254740991,H1=/^(?:0|[1-9]\d*)$/;function z1(e,t){var r=typeof e;return t=t??q1,!!t&&(r=="number"||r!="symbol"&&H1.test(e))&&e>-1&&e%1==0&&e<t}var uh=z1,V1=$1,X1=ba,W1=xe,Y1=xa,K1=uh,Z1=wa,Q1=Object.prototype,J1=Q1.hasOwnProperty;function tx(e,t){var r=W1(e),n=!r&&X1(e),i=!r&&!n&&Y1(e),s=!r&&!n&&!i&&Z1(e),a=r||n||i||s,o=a?V1(e.length,String):[],l=o.length;for(var h in e)(t||J1.call(e,h))&&!(a&&(h=="length"||i&&(h=="offset"||h=="parent")||s&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||K1(h,l)))&&o.push(h);return o}var ex=tx,rx=ex,nx=_u,ix=xi;function sx(e){return ix(e)?rx(e):nx(e)}var Na=sx,ax=N1,ox=j1,lx=Na;function ux(e){return ax(e,lx,ox)}var hx=ux,hh=hx,cx=1,fx=Object.prototype,dx=fx.hasOwnProperty;function px(e,t,r,n,i,s){var a=r&cx,o=hh(e),l=o.length,h=hh(t),c=h.length;if(l!=c&&!a)return!1;for(var f=l;f--;){var u=o[f];if(!(a?u in t:dx.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;++f<l;){u=o[f];var y=e[u],b=t[u];if(n)var _=a?n(b,y,u,t,e,s):n(y,b,u,e,t,s);if(!(_===void 0?y===b||i(y,b,r,n,s):_)){v=!1;break}g||(g=u=="constructor")}if(v&&!g){var m=e.constructor,x=t.constructor;m!=x&&"constructor"in e&&"constructor"in t&&!(typeof m=="function"&&m instanceof m&&typeof x=="function"&&x instanceof x)&&(v=!1)}return s.delete(e),s.delete(t),v}var yx=px,Ca=nh,vx=ih,mx=T1,gx=yx,ch=Lu,fh=xe,dh=xa,bx=wa,_x=1,ph="[object Arguments]",yh="[object Array]",ki="[object Object]",xx=Object.prototype,vh=xx.hasOwnProperty;function wx(e,t,r,n,i,s){var a=fh(e),o=fh(t),l=a?yh:ch(e),h=o?yh:ch(t);l=l==ph?ki:l,h=h==ph?ki:h;var c=l==ki,f=h==ki,u=l==h;if(u&&dh(e)){if(!dh(t))return!1;a=!0,c=!1}if(u&&!c)return s||(s=new Ca),a||bx(e)?vx(e,t,r,n,i,s):mx(e,t,l,r,n,i,s);if(!(r&_x)){var d=c&&vh.call(e,"__wrapped__"),p=f&&vh.call(t,"__wrapped__");if(d||p){var v=d?e.value():e,g=p?t.value():t;return s||(s=new Ca),i(v,g,r,n,s)}}return u?(s||(s=new Ca),gx(e,t,r,n,i,s)):!1}var Ex=wx,Tx=Ex,mh=fn;function gh(e,t,r,n,i){return e===t?!0:e==null||t==null||!mh(e)&&!mh(t)?e!==e&&t!==t:Tx(e,t,r,n,gh,i)}var bh=gh,Ax=nh,Sx=bh,Ox=1,Rx=2;function Ix(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],h=e[l],c=o[1];if(a&&o[2]){if(h===void 0&&!(l in e))return!1}else{var f=new Ax;if(n)var u=n(h,c,l,e,t,f);if(!(u===void 0?Sx(c,h,Ox|Rx,n,f):u))return!1}}return!0}var Nx=Ix,Cx=ca;function kx(e){return e===e&&!Cx(e)}var _h=kx,Px=_h,Mx=Na;function Lx(e){for(var t=Mx(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Px(i)]}return t}var Fx=Lx;function Bx(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var xh=Bx,Dx=Nx,Ux=Fx,jx=xh;function Gx(e){var t=Ux(e);return t.length==1&&t[0][2]?jx(t[0][0],t[0][1]):function(r){return r===e||Dx(r,e,t)}}var $x=Gx,qx=cn,Hx=fn,zx="[object Symbol]";function Vx(e){return typeof e=="symbol"||Hx(e)&&qx(e)==zx}var ka=Vx,Xx=xe,Wx=ka,Yx=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Kx=/^\w*$/;function Zx(e,t){if(Xx(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Wx(e)?!0:Kx.test(e)||!Yx.test(e)||t!=null&&e in Object(t)}var Pa=Zx,wh=Ra,Qx="Expected a function";function Ma(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Qx);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(Ma.Cache||wh),r}Ma.Cache=wh;var Jx=Ma,tw=Jx,ew=500;function rw(e){var t=tw(e,function(n){return r.size===ew&&r.clear(),n}),r=t.cache;return t}var nw=rw,iw=nw,sw=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,aw=/\\(\\)?/g,ow=iw(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(sw,function(r,n,i,s){t.push(i?s.replace(aw,"$1"):n||r)}),t}),lw=ow,Eh=_i,uw=Ju,hw=xe,cw=ka,fw=1/0,Th=Eh?Eh.prototype:void 0,Ah=Th?Th.toString:void 0;function Sh(e){if(typeof e=="string")return e;if(hw(e))return uw(e,Sh)+"";if(cw(e))return Ah?Ah.call(e):"";var t=e+"";return t=="0"&&1/e==-fw?"-0":t}var dw=Sh,pw=dw;function yw(e){return e==null?"":pw(e)}var vw=yw,mw=xe,gw=Pa,bw=lw,_w=vw;function xw(e,t){return mw(e)?e:gw(e,t)?[e]:bw(_w(e))}var Oh=xw,ww=ka,Ew=1/0;function Tw(e){if(typeof e=="string"||ww(e))return e;var t=e+"";return t=="0"&&1/e==-Ew?"-0":t}var Pi=Tw,Aw=Oh,Sw=Pi;function Ow(e,t){t=Aw(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Sw(t[r++])];return r&&r==n?e:void 0}var Rh=Ow,Rw=Rh;function Iw(e,t,r){var n=e==null?void 0:Rw(e,t);return n===void 0?r:n}var Nw=Iw;function Cw(e,t){return e!=null&&t in Object(e)}var kw=Cw,Pw=Oh,Mw=ba,Lw=xe,Fw=uh,Bw=_a,Dw=Pi;function Uw(e,t,r){t=Pw(t,e);for(var n=-1,i=t.length,s=!1;++n<i;){var a=Dw(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&&Bw(i)&&Fw(a,i)&&(Lw(e)||Mw(e)))}var jw=Uw,Gw=kw,$w=jw;function qw(e,t){return e!=null&&$w(e,t,Gw)}var Hw=qw,zw=bh,Vw=Nw,Xw=Hw,Ww=Pa,Yw=_h,Kw=xh,Zw=Pi,Qw=1,Jw=2;function tE(e,t){return Ww(e)&&Yw(t)?Kw(Zw(e),t):function(r){var n=Vw(r,e);return n===void 0&&n===t?Xw(r,e):zw(t,n,Qw|Jw)}}var eE=tE;function rE(e){return e}var nE=rE;function iE(e){return function(t){return t==null?void 0:t[e]}}var sE=iE,aE=Rh;function oE(e){return function(t){return aE(t,e)}}var lE=oE,uE=sE,hE=lE,cE=Pa,fE=Pi;function dE(e){return cE(e)?uE(fE(e)):hE(e)}var pE=dE,yE=$x,vE=eE,mE=nE,gE=xe,bE=pE;function _E(e){return typeof e=="function"?e:e==null?mE:typeof e=="object"?gE(e)?vE(e[0],e[1]):yE(e):bE(e)}var xE=_E;function wE(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 EE=wE,TE=EE,AE=TE(),SE=AE,OE=SE,RE=Na;function IE(e,t){return e&&OE(e,t,RE)}var NE=IE,CE=xi;function kE(e,t){return function(r,n){if(r==null)return r;if(!CE(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 PE=kE,ME=NE,LE=PE,FE=LE(ME),BE=FE,DE=BE,UE=xi;function jE(e,t){var r=-1,n=UE(e)?Array(e.length):[];return DE(e,function(i,s,a){n[++r]=t(i,s,a)}),n}var GE=jE,$E=Ju,qE=xE,HE=GE,zE=xe;function VE(e,t){var r=zE(e)?$E:HE;return r(e,qE(t))}var XE=VE;const WE=or(XE);var ar={},Ih={},Ce={};Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.loop=Ce.conditional=Ce.parse=void 0;var YE=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};Ce.parse=YE;var KE=function(t,r){return function(n,i,s,a){r(n,i,s)&&a(n,t,i,s)}};Ce.conditional=KE;var ZE=function(t,r){return function(n,i,s,a){for(var o=[],l=n.pos;r(n,i,s);){var h={};if(a(n,t,i,h),n.pos===l)break;l=n.pos,o.push(h)}return o}};Ce.loop=ZE;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 QE=function(t){return{data:t,pos:0}};Ft.buildStream=QE;var Nh=function(){return function(t){return t.data[t.pos++]}};Ft.readByte=Nh;var JE=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(r){return r.data[r.pos+t]}};Ft.peekByte=JE;var Mi=function(t){return function(r){return r.data.subarray(r.pos,r.pos+=t)}};Ft.readBytes=Mi;var tT=function(t){return function(r){return r.data.subarray(r.pos,r.pos+t)}};Ft.peekBytes=tT;var eT=function(t){return function(r){return Array.from(Mi(t)(r)).map(function(n){return String.fromCharCode(n)}).join("")}};Ft.readString=eT;var rT=function(t){return function(r){var n=Mi(2)(r);return t?(n[1]<<8)+n[0]:(n[0]<<8)+n[1]}};Ft.readUnsigned=rT;var nT=function(t,r){return function(n,i,s){for(var a=typeof r=="function"?r(n,i,s):r,o=Mi(t),l=new Array(a),h=0;h<a;h++)l[h]=o(n);return l}};Ft.readArray=nT;var iT=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},sT=function(t){return function(r){for(var n=Nh()(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]=iT(i,l.index,l.length):a[o]=i[l.index],a},{})}};Ft.readBits=sT,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Ce,r=Ft,n={blocks:function(u){for(var d=0,p=[],v=u.data.length,g=0,y=(0,r.readByte)()(u);y!==d&&y;y=(0,r.readByte)()(u)){if(u.pos+y>=v){var b=v-u.pos;p.push((0,r.readBytes)(b)(u)),g+=b;break}p.push((0,r.readBytes)(y)(u)),g+=y}for(var _=new Uint8Array(g),m=0,x=0;x<p.length;x++)_.set(p[x],m),m+=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(f){var u=(0,r.peekBytes)(2)(f);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(f,u,d){return Math.pow(2,d.descriptor.lct.size+1)})},function(f,u,d){return d.descriptor.lct.exists}),{data:[{minCodeSize:(0,r.readByte)()},n]}]},function(f){return(0,r.peekByte)()(f)===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(f){var u=(0,r.peekBytes)(2)(f);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(f){var u=(0,r.peekBytes)(2)(f);return u[0]===33&&u[1]===255}),l=(0,t.conditional)({comment:[{codes:(0,r.readBytes)(2)},n]},function(f){var u=(0,r.peekBytes)(2)(f);return u[0]===33&&u[1]===254}),h=[{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(f,u){return Math.pow(2,u.lsd.gct.size+1)})},function(f,u){return u.lsd.gct.exists}),{frames:(0,t.loop)([i,o,l,s,a],function(f){var u=(0,r.peekByte)()(f);return u===33||u===44})}],c=h;e.default=c}(Ih);var Li={};Object.defineProperty(Li,"__esModule",{value:!0}),Li.deinterlace=void 0;var aT=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,h=0;h<4;h++)for(var c=a[h];c<i;c+=o[h])s(c,l),l++;return n};Li.deinterlace=aT;var Fi={};Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.lzw=void 0;var oT=function(t,r,n){var i=4096,s=-1,a=n,o,l,h,c,f,u,d,S,p,v,x,g,w,T,A,N,y=new Array(n),b=new Array(i),_=new Array(i),m=new Array(i+1);for(g=t,l=1<<g,f=l+1,o=l+2,d=s,c=g+1,h=(1<<c)-1,p=0;p<l;p++)b[p]=0,_[p]=p;var x,S,w,T,N,A;for(x=S=w=T=N=A=0,v=0;v<a;){if(T===0){if(S<c){x+=r[A]<<S,S+=8,A++;continue}if(p=x&h,x>>=c,S-=c,p>o||p==f)break;if(p==l){c=g+1,h=(1<<c)-1,o=l+2,d=s;continue}if(d==s){m[T++]=_[p],d=p,w=p;continue}for(u=p,p==o&&(m[T++]=w,p=d);p>l;)m[T++]=_[p],p=b[p];w=_[p]&255,m[T++]=w,o<i&&(b[o]=d,_[o]=w,o++,!(o&h)&&o<i&&(c++,h+=o)),d=u}T--,y[N++]=m[T],v++}for(v=N;v<a;v++)y[v]=0;return y};Fi.lzw=oT,Object.defineProperty(ar,"__esModule",{value:!0}),ar.decompressFrames=ar.decompressFrame=ar.parseGIF=void 0;var lT=dT(Ih),uT=Ce,hT=Ft,cT=Li,fT=Fi;function dT(e){return e&&e.__esModule?e:{default:e}}var pT=function(t){var r=new Uint8Array(t);return(0,uT.parse)((0,hT.buildStream)(r),lT.default)};ar.parseGIF=pT;var yT=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},Ch=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,fT.lzw)(i.data.minCodeSize,i.data.blocks,s);i.descriptor.lct.interlaced&&(a=(0,cT.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=yT(o)),o};ar.decompressFrame=Ch;var vT=function(t,r){return t.frames.filter(function(n){return n.image}).map(function(n){return Ch(n,t.gct,r)})};ar.decompressFrames=vT;const kh=(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},mT=e=>kh({autoPlay:!0,playing:!1,frames:[],delays:[],index:0,length:0,loaded:!1},e),gT=e=>J.useReducer(kh,e,mT);var bT='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 _T(e){const t=new Blob([bT],{type:"application/javascript"}),r=URL.createObjectURL(t),n=new Worker(r,e);return URL.revokeObjectURL(r),n}const xT=e=>({...e,frames:e.frames.map(t=>{const r=new ImageData(e.width,e.height);return r.data.set(new Uint8ClampedArray(t)),r})}),wT=(e,t)=>{const r={};return()=>(r.instance||(r.instance=e()),J.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)},ET=e=>{const t=J.useRef(e);return J.useEffect(()=>{t.current=e},[e]),t},TT=e=>{const t=ET(e);return J.useCallback(r=>t.current&&t.current(r),[])},AT=wT(()=>new _T,e=>e.terminate()),ST=(e,t)=>{const r=TT(t),n=AT();J.useEffect(()=>{if(typeof e=="string"){const i=s=>{const a=s.data||s;if(a.src===e){const o=a.error?a:xT(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])},OT=({isPlaying:e,forwardRef:t,...r})=>{const n=lt.useRef(null);return lt.useImperativeHandle(t,()=>n.current,[n]),lt.useEffect(()=>{if(n.current===null)return;const i=n.current;i[e?"gotoAndPlay":"gotoAndStop"](i.currentFrame)},[e]),ft.jsx(yt.AnimatedSprite,{ref:n,...r,isPlaying:e})},Ph=lt.memo(OT),RT=yt.withFilters(yt.Container,{blur:ne.filters.BlurFilter,adjust:Zs,matrix:ne.filters.ColorMatrixFilter}),IT=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],NT={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1},CT=e=>{const[t,r]=lt.useState([]),[,n]=lt.useState(0),[i,s]=lt.useState([]),[,a]=J.useState(0),[,o]=J.useState(!1),[l,h]=J.useState(!1),[,c]=J.useState(!1),[f,u]=gT({autoPlay:!1}),d=lt.useRef(null),p=J.useRef(null),v=J.useRef(null),g=J.useRef(null),y=J.useRef(null),b=J.useRef(null),_=J.useRef(NT),{tl:m}=J.useContext(Mr),{frames:x,delays:S,loaded:w}=f,{uniqueId:T,src:N,startAt:A,endAt:E,initialAlpha:O,locked:R,loop:C,transformation:{width:F=0,height:U=0,x:D,y:z,rotation:j=0,scale:k,animation:I,colorCorrection:P,effect:L},pointerdown:G,pointerup:$,mousedown:M,mouseup:B,pointerover:q,mouseover:H,mouseout:X,pointerout:K,applyTransformer:et,onAnchorTransformationEnd:it}=e,{contrast:ot=1,saturation:ht=1,exposure:Ct=1,blurRadius:It=0,alpha:V=1}=P||{},W={brightness:Ct,contrast:ot,saturation:ht,alpha:V},Q=yt.useApp();ST(N,u),un(je.PAUSE,Et=>{console.log("pause event",Et),p.current&&(p.current.stop(),_.current.isPlaying=!1)});const tt=lt.useCallback(Et=>{console.log("changeEnd",Et),it&&it(Et)},[]);lt.useEffect(()=>{if(!ee(x)){const Et=WE(x,pe=>{const{data:zt,width:Bh,height:UT}=pe,jT=new Uint8Array(zt);return ne.Texture.fromBuffer(jT,Bh,UT)}),Tt=Et.map((pe,zt)=>({texture:pe,time:S[zt]}));r(Et),s(Tt);let Bt=0;S.forEach(pe=>{Bt+=pe*10}),n(Bt)}},[x,S]);const Y=Et=>{p.current&&(p.current.gotoAndPlay(Et||0),_.current.isPlaying=!0)},ct=()=>{p.current&&(p.current.stop(),_.current.isPlaying=!1)},Z=()=>{p.current&&(p.current.stop(),_.current.isPlaying=!1)},at=()=>{p.current&&!_.current.isPlaying&&(p.current.play(),_.current.isPlaying=!0)},St=()=>{o(!0)};J.useEffect(()=>{let Et=ye.context(()=>{});if(v.current&&m.current){const Tt={duration:Number(E)-Number(A),onStart:Y,onComplete:ct,onStartParams:[A],onCompleteParams:[],onInterrupt:Z,onUpdate:at,onUpdateParams:[]},Bt=ha(I||"None");Et=ye.context(()=>{var pe,zt;ee(Bt.from)?ee(Bt.to)?ee(Bt.fromTo)?m.current.to(v.current,{alpha:1,duration:.01},A).from(y.current,{...Tt},A).to(v.current,{alpha:0,duration:.1},Number(E)-.1):m.current.fromTo(v.current,(pe=Bt.fromTo)==null?void 0:pe.from,(zt=Bt.fromTo)==null?void 0:zt.to,A).from(y.current,{...Tt},A).to(v.current,{alpha:0,duration:.2},E-.2):m.current.to(v.current,{alpha:1,duration:.2,...Bt.to},A).from(y.current,{...Tt},A).to(v.current,{alpha:0,duration:.2},E-.2):m.current.from(v.current,{...Bt.from},A).to(y.current,{alpha:1,duration:.2},A).from(y.current,{...Tt},A).to(v.current,{alpha:0,duration:.2},E-.2)})}return()=>Et.revert()},[I,A,E]);const Ht=lt.useCallback(()=>{h(!0)},[]);Q.ticker.add(Et=>{d.current&&(d.current.rotation+=.01*Et,d.current.clear().lineStyle(4,16777215,1).moveTo(40,0).arc(0,0,40,0,Math.PI*2*.6,!1))});const _t=lt.useCallback(Et=>{Et.clear()},[]);return ft.jsxs(yt.Container,{ref:g,children:[ft.jsx(yt.Container,{ref:v,alpha:O,position:[D,z],pivot:[D,z],width:F,height:U,children:ft.jsxs(yt.Container,{ref:y,children:[!w&&ft.jsx(yt.Container,{anchor:.5,position:[F/2,U/2],children:ft.jsx(yt.Graphics,{x:D,y:z,ref:d,draw:_t})}),t&&t.length>0&&ft.jsx(RT,{scale:1,blur:{blur:It,quality:4},adjust:W,apply:({matrix:Et})=>{L==="BlackAndWhite"?Et.desaturate():L==="Sepia"?Et.sepia():L==="RetroVintage"||L==="NightVision"?Et.negative():L==="Normal"&&Et.reset()},matrix:{enabled:!0,matrix:IT},children:ft.jsx(Ph,{x:D,y:z,width:F,height:U,rotation:j,animationSpeed:1,loop:C,textures:i,onComplete:St,onFrameChange:Et=>a(Et),anchor:.5,...!R&&!l&&{interactive:!0,buttonMode:!0,pointerdown:G,pointerover:q,pointerout:K,pointerup:$,mousedown:M,mouseup:B,mouseover:H,mouseout:X},forwardRef:p,scale:k})})]})}),et&&ft.jsx(la,{pixiTransformerRef:b,imageRef:v,isMounted:w,transformCommit:tt,transformChange:Ht,mouseoverEvent:c,uniqueId:T})]})};var Mh={exports:{}};/*!
550
+ </svg>`,N=new p0(T),A=S.renderer.generateTexture(N);return r(A),()=>{}},[S,a,d,p,u]),ft.jsx(Ea,{...e,children:ft.jsx(yt.Container,{ref:i,children:ft.jsx(yt.Container,{ref:s,children:t&&ft.jsx(yt.Sprite,{texture:t,width:h,height:c,anchor:f,ref:n,x:o,y:l,interactive:!0,pointerdown:v,pointerup:g,pointerover:_,mousedown:y,mouseup:b,mouseover:m,mouseout:x})})})})},q0=e=>{const t={isPlaying:!1,progress:0,speed:1,mute:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1},[,r]=lt.useState(!1),n=J.useRef(t);console.log("allProps",e);const i=J.useRef(null),s=J.useRef(null),{tl:a,playerTimeRef:o}=J.useContext(Mr),{uniqueId:l,src:h,startAt:c,endAt:f,mute:u,speed:d}=e,p=lt.useRef(null);un(je.PAUSE,()=>{var m;console.log("pause event"),i.current&&((m=p.current)==null||m.pause(),n.current.isPlaying=!1)});const v=m=>{var x;i.current&&(console.log("audio gsapOnStart",m),o.current>=m&&o.current<=f&&((x=p.current)==null||x.play({volume:u?0:1,start:m,end:f,speed:d||1}),n.current.isPlaying=!0,n.current.completed=!1))},g=()=>{var m;i.current&&(console.log("audio gsapOnStart",c),(m=p.current)==null||m.stop(),n.current.isPlaying=!1,n.current.completed=!0)},y=m=>{var x,S,w;i.current&&!n.current.isPlaying&&!n.current.completed&&(console.log("audio gsapOnUpdate",m),(x=p.current)==null||x.refresh(),(S=p.current)==null||S.refreshPaused(),(w=p.current)==null||w.resume(),n.current.isPlaying=!0)},b=()=>{};J.useEffect(()=>{let m=ye.context(()=>{});if(i.current&&a.current){const x={duration:Number(f)-Number(c),onStart:v,onComplete:g,onStartParams:[c],onCompleteParams:[],onInterrupt:b,onUpdate:y,onUpdateParams:[]};m=ye.context(()=>{a.current.to(i.current,{alpha:1,duration:.01},c).from(s.current,{...x},c).to(i.current,{alpha:0,duration:.1},Number(f)-.1)})}return()=>m.revert()},[c,f]),lt.useEffect(()=>{i.current&&r(!0)},[]),lt.useEffect(()=>{i.current&&p.current&&(console.log("soundref",p.current),n.current.mute=u,n.current.speed=d,console.log("containerAudio",p.current.volume),p.current.volume=u?0:1)},[u,d]);const _=lt.useCallback((m,x)=>{p.current=x,n.current.loaded=!0},[]);return lt.useEffect(()=>(ee(h)||(p.current=$h.Sound.from({url:h,preload:!0,singleInstance:!0,loaded:_})),()=>{}),[l,h,_]),ft.jsx(yt.Container,{ref:i})};function H0(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 Ju=H0;function z0(){this.__data__=[],this.size=0}var V0=z0;function X0(e,t){return e===t||e!==e&&t!==t}var th=X0,W0=th;function Y0(e,t){for(var r=e.length;r--;)if(W0(e[r][0],t))return r;return-1}var Oi=Y0,K0=Oi,Z0=Array.prototype,Q0=Z0.splice;function J0(e){var t=this.__data__,r=K0(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Q0.call(t,r,1),--this.size,!0}var tb=J0,eb=Oi;function rb(e){var t=this.__data__,r=eb(t,e);return r<0?void 0:t[r][1]}var nb=rb,ib=Oi;function sb(e){return ib(this.__data__,e)>-1}var ab=sb,ob=Oi;function lb(e,t){var r=this.__data__,n=ob(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var ub=lb,hb=V0,cb=tb,fb=nb,db=ab,pb=ub;function Dr(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])}}Dr.prototype.clear=hb,Dr.prototype.delete=cb,Dr.prototype.get=fb,Dr.prototype.has=db,Dr.prototype.set=pb;var Ri=Dr,yb=Ri;function vb(){this.__data__=new yb,this.size=0}var mb=vb;function gb(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var bb=gb;function _b(e){return this.__data__.get(e)}var xb=_b;function wb(e){return this.__data__.has(e)}var Eb=wb,Tb=Lr,Ab=Tb(Object,"create"),Ii=Ab,eh=Ii;function Sb(){this.__data__=eh?eh(null):{},this.size=0}var Ob=Sb;function Rb(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Ib=Rb,Nb=Ii,Cb="__lodash_hash_undefined__",kb=Object.prototype,Pb=kb.hasOwnProperty;function Mb(e){var t=this.__data__;if(Nb){var r=t[e];return r===Cb?void 0:r}return Pb.call(t,e)?t[e]:void 0}var Lb=Mb,Fb=Ii,Bb=Object.prototype,Db=Bb.hasOwnProperty;function Ub(e){var t=this.__data__;return Fb?t[e]!==void 0:Db.call(t,e)}var jb=Ub,Gb=Ii,$b="__lodash_hash_undefined__";function qb(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Gb&&t===void 0?$b:t,this}var Hb=qb,zb=Ob,Vb=Ib,Xb=Lb,Wb=jb,Yb=Hb;function Ur(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])}}Ur.prototype.clear=zb,Ur.prototype.delete=Vb,Ur.prototype.get=Xb,Ur.prototype.has=Wb,Ur.prototype.set=Yb;var Kb=Ur,rh=Kb,Zb=Ri,Qb=da;function Jb(){this.size=0,this.__data__={hash:new rh,map:new(Qb||Zb),string:new rh}}var t_=Jb;function e_(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var r_=e_,n_=r_;function i_(e,t){var r=e.__data__;return n_(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Ni=i_,s_=Ni;function a_(e){var t=s_(this,e).delete(e);return this.size-=t?1:0,t}var o_=a_,l_=Ni;function u_(e){return l_(this,e).get(e)}var h_=u_,c_=Ni;function f_(e){return c_(this,e).has(e)}var d_=f_,p_=Ni;function y_(e,t){var r=p_(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var v_=y_,m_=t_,g_=o_,b_=h_,__=d_,x_=v_;function jr(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])}}jr.prototype.clear=m_,jr.prototype.delete=g_,jr.prototype.get=b_,jr.prototype.has=__,jr.prototype.set=x_;var Ra=jr,w_=Ri,E_=da,T_=Ra,A_=200;function S_(e,t){var r=this.__data__;if(r instanceof w_){var n=r.__data__;if(!E_||n.length<A_-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new T_(n)}return r.set(e,t),this.size=r.size,this}var O_=S_,R_=Ri,I_=mb,N_=bb,C_=xb,k_=Eb,P_=O_;function Gr(e){var t=this.__data__=new R_(e);this.size=t.size}Gr.prototype.clear=I_,Gr.prototype.delete=N_,Gr.prototype.get=C_,Gr.prototype.has=k_,Gr.prototype.set=P_;var nh=Gr,M_="__lodash_hash_undefined__";function L_(e){return this.__data__.set(e,M_),this}var F_=L_;function B_(e){return this.__data__.has(e)}var D_=B_,U_=Ra,j_=F_,G_=D_;function Ci(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new U_;++t<r;)this.add(e[t])}Ci.prototype.add=Ci.prototype.push=j_,Ci.prototype.has=G_;var $_=Ci;function q_(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 H_=q_;function z_(e,t){return e.has(t)}var V_=z_,X_=$_,W_=H_,Y_=V_,K_=1,Z_=2;function Q_(e,t,r,n,i,s){var a=r&K_,o=e.length,l=t.length;if(o!=l&&!(a&&l>o))return!1;var h=s.get(e),c=s.get(t);if(h&&c)return h==t&&c==e;var f=-1,u=!0,d=r&Z_?new X_:void 0;for(s.set(e,t),s.set(t,e);++f<o;){var p=e[f],v=t[f];if(n)var g=a?n(v,p,f,t,e,s):n(p,v,f,e,t,s);if(g!==void 0){if(g)continue;u=!1;break}if(d){if(!W_(t,function(y,b){if(!Y_(d,b)&&(p===y||i(p,y,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 ih=Q_,J_=Ie,t1=J_.Uint8Array,e1=t1;function r1(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var n1=r1;function i1(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var s1=i1,sh=_i,ah=e1,a1=th,o1=ih,l1=n1,u1=s1,h1=1,c1=2,f1="[object Boolean]",d1="[object Date]",p1="[object Error]",y1="[object Map]",v1="[object Number]",m1="[object RegExp]",g1="[object Set]",b1="[object String]",_1="[object Symbol]",x1="[object ArrayBuffer]",w1="[object DataView]",oh=sh?sh.prototype:void 0,Ia=oh?oh.valueOf:void 0;function E1(e,t,r,n,i,s,a){switch(r){case w1:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case x1:return!(e.byteLength!=t.byteLength||!s(new ah(e),new ah(t)));case f1:case d1:case v1:return a1(+e,+t);case p1:return e.name==t.name&&e.message==t.message;case m1:case b1:return e==t+"";case y1:var o=l1;case g1:var l=n&h1;if(o||(o=u1),e.size!=t.size&&!l)return!1;var h=a.get(e);if(h)return h==t;n|=c1,a.set(e,t);var c=o1(o(e),o(t),n,i,s,a);return a.delete(e),c;case _1:if(Ia)return Ia.call(e)==Ia.call(t)}return!1}var T1=E1;function A1(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var S1=A1,O1=S1,R1=xe;function I1(e,t,r){var n=t(e);return R1(e)?n:O1(n,r(e))}var N1=I1;function C1(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 k1=C1;function P1(){return[]}var M1=P1,L1=k1,F1=M1,B1=Object.prototype,D1=B1.propertyIsEnumerable,lh=Object.getOwnPropertySymbols,U1=lh?function(e){return e==null?[]:(e=Object(e),L1(lh(e),function(t){return D1.call(e,t)}))}:F1,j1=U1;function G1(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var $1=G1,q1=9007199254740991,H1=/^(?:0|[1-9]\d*)$/;function z1(e,t){var r=typeof e;return t=t??q1,!!t&&(r=="number"||r!="symbol"&&H1.test(e))&&e>-1&&e%1==0&&e<t}var uh=z1,V1=$1,X1=ba,W1=xe,Y1=xa,K1=uh,Z1=wa,Q1=Object.prototype,J1=Q1.hasOwnProperty;function tx(e,t){var r=W1(e),n=!r&&X1(e),i=!r&&!n&&Y1(e),s=!r&&!n&&!i&&Z1(e),a=r||n||i||s,o=a?V1(e.length,String):[],l=o.length;for(var h in e)(t||J1.call(e,h))&&!(a&&(h=="length"||i&&(h=="offset"||h=="parent")||s&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||K1(h,l)))&&o.push(h);return o}var ex=tx,rx=ex,nx=_u,ix=xi;function sx(e){return ix(e)?rx(e):nx(e)}var Na=sx,ax=N1,ox=j1,lx=Na;function ux(e){return ax(e,lx,ox)}var hx=ux,hh=hx,cx=1,fx=Object.prototype,dx=fx.hasOwnProperty;function px(e,t,r,n,i,s){var a=r&cx,o=hh(e),l=o.length,h=hh(t),c=h.length;if(l!=c&&!a)return!1;for(var f=l;f--;){var u=o[f];if(!(a?u in t:dx.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;++f<l;){u=o[f];var y=e[u],b=t[u];if(n)var _=a?n(b,y,u,t,e,s):n(y,b,u,e,t,s);if(!(_===void 0?y===b||i(y,b,r,n,s):_)){v=!1;break}g||(g=u=="constructor")}if(v&&!g){var m=e.constructor,x=t.constructor;m!=x&&"constructor"in e&&"constructor"in t&&!(typeof m=="function"&&m instanceof m&&typeof x=="function"&&x instanceof x)&&(v=!1)}return s.delete(e),s.delete(t),v}var yx=px,Ca=nh,vx=ih,mx=T1,gx=yx,ch=Lu,fh=xe,dh=xa,bx=wa,_x=1,ph="[object Arguments]",yh="[object Array]",ki="[object Object]",xx=Object.prototype,vh=xx.hasOwnProperty;function wx(e,t,r,n,i,s){var a=fh(e),o=fh(t),l=a?yh:ch(e),h=o?yh:ch(t);l=l==ph?ki:l,h=h==ph?ki:h;var c=l==ki,f=h==ki,u=l==h;if(u&&dh(e)){if(!dh(t))return!1;a=!0,c=!1}if(u&&!c)return s||(s=new Ca),a||bx(e)?vx(e,t,r,n,i,s):mx(e,t,l,r,n,i,s);if(!(r&_x)){var d=c&&vh.call(e,"__wrapped__"),p=f&&vh.call(t,"__wrapped__");if(d||p){var v=d?e.value():e,g=p?t.value():t;return s||(s=new Ca),i(v,g,r,n,s)}}return u?(s||(s=new Ca),gx(e,t,r,n,i,s)):!1}var Ex=wx,Tx=Ex,mh=fn;function gh(e,t,r,n,i){return e===t?!0:e==null||t==null||!mh(e)&&!mh(t)?e!==e&&t!==t:Tx(e,t,r,n,gh,i)}var bh=gh,Ax=nh,Sx=bh,Ox=1,Rx=2;function Ix(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],h=e[l],c=o[1];if(a&&o[2]){if(h===void 0&&!(l in e))return!1}else{var f=new Ax;if(n)var u=n(h,c,l,e,t,f);if(!(u===void 0?Sx(c,h,Ox|Rx,n,f):u))return!1}}return!0}var Nx=Ix,Cx=ca;function kx(e){return e===e&&!Cx(e)}var _h=kx,Px=_h,Mx=Na;function Lx(e){for(var t=Mx(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Px(i)]}return t}var Fx=Lx;function Bx(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var xh=Bx,Dx=Nx,Ux=Fx,jx=xh;function Gx(e){var t=Ux(e);return t.length==1&&t[0][2]?jx(t[0][0],t[0][1]):function(r){return r===e||Dx(r,e,t)}}var $x=Gx,qx=cn,Hx=fn,zx="[object Symbol]";function Vx(e){return typeof e=="symbol"||Hx(e)&&qx(e)==zx}var ka=Vx,Xx=xe,Wx=ka,Yx=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Kx=/^\w*$/;function Zx(e,t){if(Xx(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Wx(e)?!0:Kx.test(e)||!Yx.test(e)||t!=null&&e in Object(t)}var Pa=Zx,wh=Ra,Qx="Expected a function";function Ma(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Qx);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(Ma.Cache||wh),r}Ma.Cache=wh;var Jx=Ma,tw=Jx,ew=500;function rw(e){var t=tw(e,function(n){return r.size===ew&&r.clear(),n}),r=t.cache;return t}var nw=rw,iw=nw,sw=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,aw=/\\(\\)?/g,ow=iw(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(sw,function(r,n,i,s){t.push(i?s.replace(aw,"$1"):n||r)}),t}),lw=ow,Eh=_i,uw=Ju,hw=xe,cw=ka,fw=1/0,Th=Eh?Eh.prototype:void 0,Ah=Th?Th.toString:void 0;function Sh(e){if(typeof e=="string")return e;if(hw(e))return uw(e,Sh)+"";if(cw(e))return Ah?Ah.call(e):"";var t=e+"";return t=="0"&&1/e==-fw?"-0":t}var dw=Sh,pw=dw;function yw(e){return e==null?"":pw(e)}var vw=yw,mw=xe,gw=Pa,bw=lw,_w=vw;function xw(e,t){return mw(e)?e:gw(e,t)?[e]:bw(_w(e))}var Oh=xw,ww=ka,Ew=1/0;function Tw(e){if(typeof e=="string"||ww(e))return e;var t=e+"";return t=="0"&&1/e==-Ew?"-0":t}var Pi=Tw,Aw=Oh,Sw=Pi;function Ow(e,t){t=Aw(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Sw(t[r++])];return r&&r==n?e:void 0}var Rh=Ow,Rw=Rh;function Iw(e,t,r){var n=e==null?void 0:Rw(e,t);return n===void 0?r:n}var Nw=Iw;function Cw(e,t){return e!=null&&t in Object(e)}var kw=Cw,Pw=Oh,Mw=ba,Lw=xe,Fw=uh,Bw=_a,Dw=Pi;function Uw(e,t,r){t=Pw(t,e);for(var n=-1,i=t.length,s=!1;++n<i;){var a=Dw(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&&Bw(i)&&Fw(a,i)&&(Lw(e)||Mw(e)))}var jw=Uw,Gw=kw,$w=jw;function qw(e,t){return e!=null&&$w(e,t,Gw)}var Hw=qw,zw=bh,Vw=Nw,Xw=Hw,Ww=Pa,Yw=_h,Kw=xh,Zw=Pi,Qw=1,Jw=2;function tE(e,t){return Ww(e)&&Yw(t)?Kw(Zw(e),t):function(r){var n=Vw(r,e);return n===void 0&&n===t?Xw(r,e):zw(t,n,Qw|Jw)}}var eE=tE;function rE(e){return e}var nE=rE;function iE(e){return function(t){return t==null?void 0:t[e]}}var sE=iE,aE=Rh;function oE(e){return function(t){return aE(t,e)}}var lE=oE,uE=sE,hE=lE,cE=Pa,fE=Pi;function dE(e){return cE(e)?uE(fE(e)):hE(e)}var pE=dE,yE=$x,vE=eE,mE=nE,gE=xe,bE=pE;function _E(e){return typeof e=="function"?e:e==null?mE:typeof e=="object"?gE(e)?vE(e[0],e[1]):yE(e):bE(e)}var xE=_E;function wE(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 EE=wE,TE=EE,AE=TE(),SE=AE,OE=SE,RE=Na;function IE(e,t){return e&&OE(e,t,RE)}var NE=IE,CE=xi;function kE(e,t){return function(r,n){if(r==null)return r;if(!CE(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 PE=kE,ME=NE,LE=PE,FE=LE(ME),BE=FE,DE=BE,UE=xi;function jE(e,t){var r=-1,n=UE(e)?Array(e.length):[];return DE(e,function(i,s,a){n[++r]=t(i,s,a)}),n}var GE=jE,$E=Ju,qE=xE,HE=GE,zE=xe;function VE(e,t){var r=zE(e)?$E:HE;return r(e,qE(t))}var XE=VE;const WE=or(XE);var ar={},Ih={},Ce={};Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.loop=Ce.conditional=Ce.parse=void 0;var YE=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};Ce.parse=YE;var KE=function(t,r){return function(n,i,s,a){r(n,i,s)&&a(n,t,i,s)}};Ce.conditional=KE;var ZE=function(t,r){return function(n,i,s,a){for(var o=[],l=n.pos;r(n,i,s);){var h={};if(a(n,t,i,h),n.pos===l)break;l=n.pos,o.push(h)}return o}};Ce.loop=ZE;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 QE=function(t){return{data:t,pos:0}};Ft.buildStream=QE;var Nh=function(){return function(t){return t.data[t.pos++]}};Ft.readByte=Nh;var JE=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(r){return r.data[r.pos+t]}};Ft.peekByte=JE;var Mi=function(t){return function(r){return r.data.subarray(r.pos,r.pos+=t)}};Ft.readBytes=Mi;var tT=function(t){return function(r){return r.data.subarray(r.pos,r.pos+t)}};Ft.peekBytes=tT;var eT=function(t){return function(r){return Array.from(Mi(t)(r)).map(function(n){return String.fromCharCode(n)}).join("")}};Ft.readString=eT;var rT=function(t){return function(r){var n=Mi(2)(r);return t?(n[1]<<8)+n[0]:(n[0]<<8)+n[1]}};Ft.readUnsigned=rT;var nT=function(t,r){return function(n,i,s){for(var a=typeof r=="function"?r(n,i,s):r,o=Mi(t),l=new Array(a),h=0;h<a;h++)l[h]=o(n);return l}};Ft.readArray=nT;var iT=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},sT=function(t){return function(r){for(var n=Nh()(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]=iT(i,l.index,l.length):a[o]=i[l.index],a},{})}};Ft.readBits=sT,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Ce,r=Ft,n={blocks:function(u){for(var d=0,p=[],v=u.data.length,g=0,y=(0,r.readByte)()(u);y!==d&&y;y=(0,r.readByte)()(u)){if(u.pos+y>=v){var b=v-u.pos;p.push((0,r.readBytes)(b)(u)),g+=b;break}p.push((0,r.readBytes)(y)(u)),g+=y}for(var _=new Uint8Array(g),m=0,x=0;x<p.length;x++)_.set(p[x],m),m+=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(f){var u=(0,r.peekBytes)(2)(f);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(f,u,d){return Math.pow(2,d.descriptor.lct.size+1)})},function(f,u,d){return d.descriptor.lct.exists}),{data:[{minCodeSize:(0,r.readByte)()},n]}]},function(f){return(0,r.peekByte)()(f)===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(f){var u=(0,r.peekBytes)(2)(f);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(f){var u=(0,r.peekBytes)(2)(f);return u[0]===33&&u[1]===255}),l=(0,t.conditional)({comment:[{codes:(0,r.readBytes)(2)},n]},function(f){var u=(0,r.peekBytes)(2)(f);return u[0]===33&&u[1]===254}),h=[{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(f,u){return Math.pow(2,u.lsd.gct.size+1)})},function(f,u){return u.lsd.gct.exists}),{frames:(0,t.loop)([i,o,l,s,a],function(f){var u=(0,r.peekByte)()(f);return u===33||u===44})}],c=h;e.default=c}(Ih);var Li={};Object.defineProperty(Li,"__esModule",{value:!0}),Li.deinterlace=void 0;var aT=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,h=0;h<4;h++)for(var c=a[h];c<i;c+=o[h])s(c,l),l++;return n};Li.deinterlace=aT;var Fi={};Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.lzw=void 0;var oT=function(t,r,n){var i=4096,s=-1,a=n,o,l,h,c,f,u,d,S,p,v,x,g,w,T,A,N,y=new Array(n),b=new Array(i),_=new Array(i),m=new Array(i+1);for(g=t,l=1<<g,f=l+1,o=l+2,d=s,c=g+1,h=(1<<c)-1,p=0;p<l;p++)b[p]=0,_[p]=p;var x,S,w,T,N,A;for(x=S=w=T=N=A=0,v=0;v<a;){if(T===0){if(S<c){x+=r[A]<<S,S+=8,A++;continue}if(p=x&h,x>>=c,S-=c,p>o||p==f)break;if(p==l){c=g+1,h=(1<<c)-1,o=l+2,d=s;continue}if(d==s){m[T++]=_[p],d=p,w=p;continue}for(u=p,p==o&&(m[T++]=w,p=d);p>l;)m[T++]=_[p],p=b[p];w=_[p]&255,m[T++]=w,o<i&&(b[o]=d,_[o]=w,o++,!(o&h)&&o<i&&(c++,h+=o)),d=u}T--,y[N++]=m[T],v++}for(v=N;v<a;v++)y[v]=0;return y};Fi.lzw=oT,Object.defineProperty(ar,"__esModule",{value:!0}),ar.decompressFrames=ar.decompressFrame=ar.parseGIF=void 0;var lT=dT(Ih),uT=Ce,hT=Ft,cT=Li,fT=Fi;function dT(e){return e&&e.__esModule?e:{default:e}}var pT=function(t){var r=new Uint8Array(t);return(0,uT.parse)((0,hT.buildStream)(r),lT.default)};ar.parseGIF=pT;var yT=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},Ch=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,fT.lzw)(i.data.minCodeSize,i.data.blocks,s);i.descriptor.lct.interlaced&&(a=(0,cT.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=yT(o)),o};ar.decompressFrame=Ch;var vT=function(t,r){return t.frames.filter(function(n){return n.image}).map(function(n){return Ch(n,t.gct,r)})};ar.decompressFrames=vT;const kh=(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},mT=e=>kh({autoPlay:!0,playing:!1,frames:[],delays:[],index:0,length:0,loaded:!1},e),gT=e=>J.useReducer(kh,e,mT);var bT='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 _T(e){const t=new Blob([bT],{type:"application/javascript"}),r=URL.createObjectURL(t),n=new Worker(r,e);return URL.revokeObjectURL(r),n}const xT=e=>({...e,frames:e.frames.map(t=>{const r=new ImageData(e.width,e.height);return r.data.set(new Uint8ClampedArray(t)),r})}),wT=(e,t)=>{const r={};return()=>(r.instance||(r.instance=e()),J.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)},ET=e=>{const t=J.useRef(e);return J.useEffect(()=>{t.current=e},[e]),t},TT=e=>{const t=ET(e);return J.useCallback(r=>t.current&&t.current(r),[])},AT=wT(()=>new _T,e=>e.terminate()),ST=(e,t)=>{const r=TT(t),n=AT();J.useEffect(()=>{if(typeof e=="string"){const i=s=>{const a=s.data||s;if(a.src===e){const o=a.error?a:xT(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])},OT=({isPlaying:e,forwardRef:t,...r})=>{const n=lt.useRef(null);return lt.useImperativeHandle(t,()=>n.current,[n]),lt.useEffect(()=>{if(n.current===null)return;const i=n.current;i[e?"gotoAndPlay":"gotoAndStop"](i.currentFrame)},[e]),ft.jsx(yt.AnimatedSprite,{ref:n,...r,isPlaying:e})},Ph=lt.memo(OT),RT=yt.withFilters(yt.Container,{blur:ne.filters.BlurFilter,adjust:Zs,matrix:ne.filters.ColorMatrixFilter}),IT=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],NT={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1},CT=e=>{const[t,r]=lt.useState([]),[,n]=lt.useState(0),[i,s]=lt.useState([]),[,a]=J.useState(0),[,o]=J.useState(!1),[l,h]=J.useState(!1),[,c]=J.useState(!1),[f,u]=gT({autoPlay:!1}),d=lt.useRef(null),p=J.useRef(null),v=J.useRef(null),g=J.useRef(null),y=J.useRef(null),b=J.useRef(null),_=J.useRef(NT),{tl:m}=J.useContext(Mr),{frames:x,delays:S,loaded:w}=f,{uniqueId:T,src:N,startAt:A,endAt:E,initialAlpha:O,locked:R,loop:C,transformation:{width:F=0,height:U=0,x:D,y:z,rotation:j=0,scale:k,animation:I,colorCorrection:P,effect:L},pointerdown:G,pointerup:$,mousedown:M,mouseup:B,pointerover:q,mouseover:H,mouseout:X,pointerout:K,applyTransformer:et,onAnchorTransformationEnd:it}=e,{contrast:ot=1,saturation:ht=1,exposure:Ct=1,blurRadius:It=0,alpha:V=1}=P||{},W={brightness:Ct,contrast:ot,saturation:ht,alpha:V},Q=yt.useApp();ST(N,u),un(je.PAUSE,Et=>{console.log("pause event",Et),p.current&&(p.current.stop(),_.current.isPlaying=!1)});const tt=lt.useCallback(Et=>{console.log("changeEnd",Et),it&&it(Et)},[]);lt.useEffect(()=>{if(!ee(x)){const Et=WE(x,pe=>{const{data:zt,width:Bh,height:UT}=pe,jT=new Uint8Array(zt);return ne.Texture.fromBuffer(jT,Bh,UT)}),Tt=Et.map((pe,zt)=>({texture:pe,time:S[zt]}));r(Et),s(Tt);let Bt=0;S.forEach(pe=>{Bt+=pe*10}),n(Bt)}},[x,S]);const Y=Et=>{p.current&&(p.current.gotoAndPlay(Et||0),_.current.isPlaying=!0)},ct=()=>{p.current&&(p.current.stop(),_.current.isPlaying=!1)},Z=()=>{p.current&&(p.current.stop(),_.current.isPlaying=!1)},at=()=>{p.current&&!_.current.isPlaying&&(p.current.play(),_.current.isPlaying=!0)},St=()=>{o(!0)};J.useEffect(()=>{let Et=ye.context(()=>{});if(v.current&&m.current){const Tt={duration:Number(E)-Number(A),onStart:Y,onComplete:ct,onStartParams:[A],onCompleteParams:[],onInterrupt:Z,onUpdate:at,onUpdateParams:[]},Bt=ha(I||"None");Et=ye.context(()=>{var pe,zt;ee(Bt.from)?ee(Bt.to)?ee(Bt.fromTo)?m.current.to(v.current,{alpha:1,duration:.01},A).from(y.current,{...Tt},A).to(v.current,{alpha:0,duration:.1},Number(E)-.1):m.current.fromTo(v.current,(pe=Bt.fromTo)==null?void 0:pe.from,(zt=Bt.fromTo)==null?void 0:zt.to,A).from(y.current,{...Tt},A).to(v.current,{alpha:0,duration:.2},E-.2):m.current.to(v.current,{alpha:1,duration:.2,...Bt.to},A).from(y.current,{...Tt},A).to(v.current,{alpha:0,duration:.2},E-.2):m.current.from(v.current,{...Bt.from},A).to(y.current,{alpha:1,duration:.2},A).from(y.current,{...Tt},A).to(v.current,{alpha:0,duration:.2},E-.2)})}return()=>Et.revert()},[I,A,E]);const Ht=lt.useCallback(()=>{h(!0)},[]);Q.ticker.add(Et=>{d.current&&(d.current.rotation+=.01*Et,d.current.clear().lineStyle(4,16777215,1).moveTo(40,0).arc(0,0,40,0,Math.PI*2*.6,!1))});const _t=lt.useCallback(Et=>{Et.clear()},[]);return ft.jsxs(yt.Container,{ref:g,children:[ft.jsx(yt.Container,{ref:v,alpha:O,position:[D,z],pivot:[D,z],width:F,height:U,children:ft.jsxs(yt.Container,{ref:y,children:[!w&&ft.jsx(yt.Container,{anchor:.5,position:[F/2,U/2],children:ft.jsx(yt.Graphics,{x:D,y:z,ref:d,draw:_t})}),t&&t.length>0&&ft.jsx(RT,{scale:1,blur:{blur:It,quality:4},adjust:W,apply:({matrix:Et})=>{L==="BlackAndWhite"?Et.desaturate():L==="Sepia"?Et.sepia():L==="RetroVintage"||L==="NightVision"?Et.negative():L==="Normal"&&Et.reset()},matrix:{enabled:!0,matrix:IT},children:ft.jsx(Ph,{x:D,y:z,width:F,height:U,rotation:j,animationSpeed:1,loop:C,textures:i,onComplete:St,onFrameChange:Et=>a(Et),anchor:.5,...!R&&!l&&{interactive:!0,buttonMode:!0,pointerdown:G,pointerover:q,pointerout:K,pointerup:$,mousedown:M,mouseup:B,mouseover:H,mouseout:X},forwardRef:p,scale:k})})]})}),et&&w&&ft.jsx(la,{pixiTransformerRef:b,imageRef:v,transformCommit:tt,transformChange:Ht,mouseoverEvent:c,uniqueId:T})]})};var Mh={exports:{}};/*!
551
551
  * Quill Editor v1.3.7
552
552
  * https://quilljs.com/
553
553
  * Copyright (c) 2014, Jason Chen
@@ -587,4 +587,4 @@ void main(void)
587
587
  `),W}function ht(V,W){if(M(V)&&V.nextElementSibling!=null&&!$(W,`
588
588
 
589
589
  `)){var Q=V.offsetHeight+parseFloat(G(V).marginTop)+parseFloat(G(V).marginBottom);V.nextElementSibling.offsetTop>V.offsetTop+Q*1.5&&W.insert(`
590
- `)}return W}function Ct(V,W){var Q={},tt=V.style||{};return tt.fontStyle&&G(V).fontStyle==="italic"&&(Q.italic=!0),tt.fontWeight&&(G(V).fontWeight.startsWith("bold")||parseInt(G(V).fontWeight)>=700)&&(Q.bold=!0),Object.keys(Q).length>0&&(W=L(W,Q)),parseFloat(tt.textIndent||0)>0&&(W=new f.default().insert(" ").concat(W)),W}function It(V,W){var Q=V.data;if(V.parentNode.tagName==="O:P")return W.insert(Q.trim());if(Q.trim().length===0&&V.parentNode.classList.contains("ql-clipboard"))return W;if(!G(V.parentNode).whiteSpace.startsWith("pre")){var tt=function(ct,Z){return Z=Z.replace(/[^\u00a0]/g,""),Z.length<1&&ct?" ":Z};Q=Q.replace(/\r\n/g," ").replace(/\n/g," "),Q=Q.replace(/\s\s+/g,tt.bind(tt,!0)),(V.previousSibling==null&&M(V.parentNode)||V.previousSibling!=null&&M(V.previousSibling))&&(Q=Q.replace(/^\s+/,tt.bind(tt,!1))),(V.nextSibling==null&&M(V.parentNode)||V.nextSibling!=null&&M(V.nextSibling))&&(Q=Q.replace(/\s+$/,tt.bind(tt,!1)))}return W.insert(Q)}n.default=P,n.matchAttributor=H,n.matchBlot=X,n.matchNewline=ot,n.matchSpacing=ht,n.matchText=It},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function p(v,g){for(var y=0;y<g.length;y++){var b=g[y];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(v,b.key,b)}}return function(v,g,y){return g&&p(v.prototype,g),y&&p(v,y),v}}(),a=function p(v,g,y){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,y)}else{if("value"in b)return b.value;var m=b.get;return m===void 0?void 0:m.call(y)}},o=i(6),l=h(o);function h(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 f(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),f(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return s(v,[{key:"optimize",value:function(y){a(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"optimize",this).call(this,y),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 E(O,R){var C=[],F=!0,U=!1,D=void 0;try{for(var z=O[Symbol.iterator](),j;!(F=(j=z.next()).done)&&(C.push(j.value),!(R&&C.length===R));F=!0);}catch(k){U=!0,D=k}finally{try{!F&&z.return&&z.return()}finally{if(U)throw D}}return C}return function(O,R){if(Array.isArray(O))return O;if(Symbol.iterator in Object(O))return E(O,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function E(O,R){for(var C=0;C<R.length;C++){var F=R[C];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(O,F.key,F)}}return function(O,R,C){return R&&E(O.prototype,R),C&&E(O,C),O}}(),o=i(2),l=y(o),h=i(0),c=y(h),f=i(5),u=y(f),d=i(10),p=y(d),v=i(9),g=y(v);function y(E){return E&&E.__esModule?E:{default:E}}function b(E,O,R){return O in E?Object.defineProperty(E,O,{value:R,enumerable:!0,configurable:!0,writable:!0}):E[O]=R,E}function _(E,O){if(!(E instanceof O))throw new TypeError("Cannot call a class as a function")}function m(E,O){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:E}function x(E,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);E.prototype=Object.create(O&&O.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(E,O):E.__proto__=O)}var S=(0,p.default)("quill:toolbar"),w=function(E){x(O,E);function O(R,C){_(this,O);var F=m(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,R,C));if(Array.isArray(F.options.container)){var U=document.createElement("div");N(U,F.options.container),R.container.parentNode.insertBefore(U,R.container),F.container=U}else typeof F.options.container=="string"?F.container=document.querySelector(F.options.container):F.container=F.options.container;if(!(F.container instanceof HTMLElement)){var D;return D=S.error("Container required for toolbar",F.options),m(F,D)}return F.container.classList.add("ql-toolbar"),F.controls=[],F.handlers={},Object.keys(F.options.handlers).forEach(function(z){F.addHandler(z,F.options.handlers[z])}),[].forEach.call(F.container.querySelectorAll("button, select"),function(z){F.attach(z)}),F.quill.on(u.default.events.EDITOR_CHANGE,function(z,j){z===u.default.events.SELECTION_CHANGE&&F.update(j)}),F.quill.on(u.default.events.SCROLL_OPTIMIZE,function(){var z=F.quill.selection.getRange(),j=s(z,1),k=j[0];F.update(k)}),F}return a(O,[{key:"addHandler",value:function(C,F){this.handlers[C]=F}},{key:"attach",value:function(C){var F=this,U=[].find.call(C.classList,function(z){return z.indexOf("ql-")===0});if(U){if(U=U.slice(3),C.tagName==="BUTTON"&&C.setAttribute("type","button"),this.handlers[U]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[U]==null){S.warn("ignoring attaching to disabled format",U,C);return}if(c.default.query(U)==null){S.warn("ignoring attaching to nonexistent format",U,C);return}}var D=C.tagName==="SELECT"?"change":"click";C.addEventListener(D,function(z){var j=void 0;if(C.tagName==="SELECT"){if(C.selectedIndex<0)return;var k=C.options[C.selectedIndex];k.hasAttribute("selected")?j=!1:j=k.value||!1}else C.classList.contains("ql-active")?j=!1:j=C.value||!C.hasAttribute("value"),z.preventDefault();F.quill.focus();var I=F.quill.selection.getRange(),P=s(I,1),L=P[0];if(F.handlers[U]!=null)F.handlers[U].call(F,j);else if(c.default.query(U).prototype instanceof c.default.Embed){if(j=prompt("Enter "+U),!j)return;F.quill.updateContents(new l.default().retain(L.index).delete(L.length).insert(b({},U,j)),u.default.sources.USER)}else F.quill.format(U,j,u.default.sources.USER);F.update(L)}),this.controls.push([U,C])}}},{key:"update",value:function(C){var F=C==null?{}:this.quill.getFormat(C);this.controls.forEach(function(U){var D=s(U,2),z=D[0],j=D[1];if(j.tagName==="SELECT"){var k=void 0;if(C==null)k=null;else if(F[z]==null)k=j.querySelector("option[selected]");else if(!Array.isArray(F[z])){var I=F[z];typeof I=="string"&&(I=I.replace(/\"/g,'\\"')),k=j.querySelector('option[value="'+I+'"]')}k==null?(j.value="",j.selectedIndex=-1):k.selected=!0}else if(C==null)j.classList.remove("ql-active");else if(j.hasAttribute("value")){var P=F[z]===j.getAttribute("value")||F[z]!=null&&F[z].toString()===j.getAttribute("value")||F[z]==null&&!j.getAttribute("value");j.classList.toggle("ql-active",P)}else j.classList.toggle("ql-active",F[z]!=null)})}}]),O}(g.default);w.DEFAULTS={};function T(E,O,R){var C=document.createElement("button");C.setAttribute("type","button"),C.classList.add("ql-"+O),R!=null&&(C.value=R),E.appendChild(C)}function N(E,O){Array.isArray(O[0])||(O=[O]),O.forEach(function(R){var C=document.createElement("span");C.classList.add("ql-formats"),R.forEach(function(F){if(typeof F=="string")T(C,F);else{var U=Object.keys(F)[0],D=F[U];Array.isArray(D)?A(C,U,D):T(C,U,D)}}),E.appendChild(C)})}function A(E,O,R){var C=document.createElement("select");C.classList.add("ql-"+O),R.forEach(function(F){var U=document.createElement("option");F!==!1?U.setAttribute("value",F):U.setAttribute("selected","selected"),C.appendChild(U)}),E.appendChild(C)}w.DEFAULTS={container:null,handlers:{clean:function(){var O=this,R=this.quill.getSelection();if(R!=null)if(R.length==0){var C=this.quill.getFormat();Object.keys(C).forEach(function(F){c.default.query(F,c.default.Scope.INLINE)!=null&&O.quill.format(F,!1)})}else this.quill.removeFormat(R,u.default.sources.USER)},direction:function(O){var R=this.quill.getFormat().align;O==="rtl"&&R==null?this.quill.format("align","right",u.default.sources.USER):!O&&R==="right"&&this.quill.format("align",!1,u.default.sources.USER),this.quill.format("direction",O,u.default.sources.USER)},indent:function(O){var R=this.quill.getSelection(),C=this.quill.getFormat(R),F=parseInt(C.indent||0);if(O==="+1"||O==="-1"){var U=O==="+1"?1:-1;C.direction==="rtl"&&(U*=-1),this.quill.format("indent",F+U,u.default.sources.USER)}},link:function(O){O===!0&&(O=prompt("Enter link URL:")),this.quill.format("link",O,u.default.sources.USER)},list:function(O){var R=this.quill.getSelection(),C=this.quill.getFormat(R);O==="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",O,u.default.sources.USER)}}},n.default=w,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 y=0;y<g.length;y++){var b=g[y];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(v,b.key,b)}}return function(v,g,y){return g&&p(v.prototype,g),y&&p(v,y),v}}(),a=function p(v,g,y){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,y)}else{if("value"in b)return b.value;var m=b.get;return m===void 0?void 0:m.call(y)}},o=i(28),l=h(o);function h(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 f(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,y){c(this,v);var b=f(this,(v.__proto__||Object.getPrototypeOf(v)).call(this,g));return b.label.innerHTML=y,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(y){var b=a(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"buildItem",this).call(this,y);return b.style.backgroundColor=y.getAttribute("value")||"",b}},{key:"selectItem",value:function(y,b){a(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"selectItem",this).call(this,y,b);var _=this.label.querySelector(".ql-color-label"),m=y&&y.getAttribute("data-value")||"";_&&(_.tagName==="line"?_.style.stroke=m:_.style.fill=m)}}]),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 y=0;y<g.length;y++){var b=g[y];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(v,b.key,b)}}return function(v,g,y){return g&&p(v.prototype,g),y&&p(v,y),v}}(),a=function p(v,g,y){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,y)}else{if("value"in b)return b.value;var m=b.get;return m===void 0?void 0:m.call(y)}},o=i(28),l=h(o);function h(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 f(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,y){c(this,v);var b=f(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=y[_.getAttribute("data-value")||""]}),b.defaultItem=b.container.querySelector(".ql-selected"),b.selectItem(b.defaultItem),b}return s(v,[{key:"selectItem",value:function(y,b){a(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"selectItem",this).call(this,y,b),y=y||this.defaultItem,this.label.innerHTML=y.innerHTML}}]),v}(l.default);n.default=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function l(h,c){for(var f=0;f<c.length;f++){var u=c[f];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(h,u.key,u)}}return function(h,c,f){return c&&l(h.prototype,c),f&&l(h,f),h}}();function a(l,h){if(!(l instanceof h))throw new TypeError("Cannot call a class as a function")}var o=function(){function l(h,c){var f=this;a(this,l),this.quill=h,this.boundsContainer=c||document.body,this.root=h.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){f.root.style.marginTop=-1*f.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 f=c.left+c.width/2-this.root.offsetWidth/2,u=c.bottom+this.quill.root.scrollTop;this.root.style.left=f+"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=f+v+"px"),p.left<d.left&&(v=d.left-p.left,this.root.style.left=f+v+"px"),p.bottom>d.bottom){var g=p.bottom-p.top,y=c.bottom-c.top+g;this.root.style.top=u-y+"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(E,O){var R=[],C=!0,F=!1,U=void 0;try{for(var D=E[Symbol.iterator](),z;!(C=(z=D.next()).done)&&(R.push(z.value),!(O&&R.length===O));C=!0);}catch(j){F=!0,U=j}finally{try{!C&&D.return&&D.return()}finally{if(F)throw U}}return R}return function(E,O){if(Array.isArray(E))return E;if(Symbol.iterator in Object(E))return A(E,O);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function A(E,O,R){E===null&&(E=Function.prototype);var C=Object.getOwnPropertyDescriptor(E,O);if(C===void 0){var F=Object.getPrototypeOf(E);return F===null?void 0:A(F,O,R)}else{if("value"in C)return C.value;var U=C.get;return U===void 0?void 0:U.call(R)}},o=function(){function A(E,O){for(var R=0;R<O.length;R++){var C=O[R];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(E,C.key,C)}}return function(E,O,R){return O&&A(E.prototype,O),R&&A(E,R),E}}(),l=i(3),h=_(l),c=i(8),f=_(c),u=i(43),d=_(u),p=i(27),v=_(p),g=i(15),y=i(41),b=_(y);function _(A){return A&&A.__esModule?A:{default:A}}function m(A,E){if(!(A instanceof E))throw new TypeError("Cannot call a class as a function")}function x(A,E){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:A}function S(A,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);A.prototype=Object.create(E&&E.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(A,E):A.__proto__=E)}var w=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],T=function(A){S(E,A);function E(O,R){m(this,E),R.modules.toolbar!=null&&R.modules.toolbar.container==null&&(R.modules.toolbar.container=w);var C=x(this,(E.__proto__||Object.getPrototypeOf(E)).call(this,O,R));return C.quill.container.classList.add("ql-snow"),C}return o(E,[{key:"extendToolbar",value:function(R){R.container.classList.add("ql-snow"),this.buildButtons([].slice.call(R.container.querySelectorAll("button")),b.default),this.buildPickers([].slice.call(R.container.querySelectorAll("select")),b.default),this.tooltip=new N(this.quill,this.options.bounds),R.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(C,F){R.handlers.link.call(R,!F.format.link)})}}]),E}(d.default);T.DEFAULTS=(0,h.default)(!0,{},d.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(E){if(E){var O=this.quill.getSelection();if(O==null||O.length==0)return;var R=this.quill.getText(O);/^\S+@\S+\.\S+$/.test(R)&&R.indexOf("mailto:")!==0&&(R="mailto:"+R);var C=this.quill.theme.tooltip;C.edit("link",R)}else this.quill.format("link",!1)}}}}});var N=function(A){S(E,A);function E(O,R){m(this,E);var C=x(this,(E.__proto__||Object.getPrototypeOf(E)).call(this,O,R));return C.preview=C.root.querySelector("a.ql-preview"),C}return o(E,[{key:"listen",value:function(){var R=this;a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(C){R.root.classList.contains("ql-editing")?R.save():R.edit("link",R.preview.textContent),C.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(C){if(R.linkRange!=null){var F=R.linkRange;R.restoreFocus(),R.quill.formatText(F,"link",!1,f.default.sources.USER),delete R.linkRange}C.preventDefault(),R.hide()}),this.quill.on(f.default.events.SELECTION_CHANGE,function(C,F,U){if(C!=null){if(C.length===0&&U===f.default.sources.USER){var D=R.quill.scroll.descendant(v.default,C.index),z=s(D,2),j=z[0],k=z[1];if(j!=null){R.linkRange=new g.Range(C.index-k,j.length());var I=v.default.formats(j.domNode);R.preview.textContent=I,R.preview.setAttribute("href",I),R.show(),R.position(R.quill.getBounds(R.linkRange));return}}else delete R.linkRange;R.hide()}})}},{key:"show",value:function(){a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),E}(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=T},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(29),a=Y(s),o=i(36),l=i(38),h=i(64),c=i(65),f=Y(c),u=i(66),d=Y(u),p=i(67),v=Y(p),g=i(37),y=i(26),b=i(39),_=i(40),m=i(56),x=Y(m),S=i(68),w=Y(S),T=i(27),N=Y(T),A=i(69),E=Y(A),O=i(70),R=Y(O),C=i(71),F=Y(C),U=i(72),D=Y(U),z=i(73),j=Y(z),k=i(13),I=Y(k),P=i(74),L=Y(P),G=i(75),$=Y(G),M=i(57),B=Y(M),q=i(41),H=Y(q),X=i(28),K=Y(X),et=i(59),it=Y(et),ot=i(60),ht=Y(ot),Ct=i(61),It=Y(Ct),V=i(108),W=Y(V),Q=i(62),tt=Y(Q);function Y(ct){return ct&&ct.__esModule?ct:{default:ct}}a.default.register({"attributors/attribute/direction":l.DirectionAttribute,"attributors/class/align":o.AlignClass,"attributors/class/background":g.BackgroundClass,"attributors/class/color":y.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":y.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":h.IndentClass,"formats/background":g.BackgroundStyle,"formats/color":y.ColorStyle,"formats/font":b.FontClass,"formats/size":_.SizeClass,"formats/blockquote":f.default,"formats/code-block":I.default,"formats/header":d.default,"formats/list":v.default,"formats/bold":x.default,"formats/code":k.Code,"formats/italic":w.default,"formats/link":N.default,"formats/script":E.default,"formats/strike":R.default,"formats/underline":F.default,"formats/image":D.default,"formats/video":j.default,"formats/list/item":p.ListItem,"modules/formula":L.default,"modules/syntax":$.default,"modules/toolbar":B.default,"themes/bubble":W.default,"themes/snow":tt.default,"ui/icons":H.default,"ui/picker":K.default,"ui/icon-picker":ht.default,"ui/color-picker":it.default,"ui/tooltip":It.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,y){for(var b=0;b<y.length;b++){var _=y[b];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(g,_.key,_)}}return function(g,y,b){return y&&v(g.prototype,y),b&&v(g,b),g}}(),a=function v(g,y,b){g===null&&(g=Function.prototype);var _=Object.getOwnPropertyDescriptor(g,y);if(_===void 0){var m=Object.getPrototypeOf(g);return m===null?void 0:v(m,y,b)}else{if("value"in _)return _.value;var x=_.get;return x===void 0?void 0:x.call(b)}},o=i(0),l=h(o);function h(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 f(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),f(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return s(g,[{key:"add",value:function(b,_){if(_==="+1"||_==="-1"){var m=this.value(b)||0;_=_==="+1"?m+1:m-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 h(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 f=function(u){c(d,u);function d(){return l(this,d),h(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}return d}(a.default);f.blotName="blockquote",f.tagName="blockquote",n.default=f},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 y=v[g];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(p,y.key,y)}}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 h(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 f(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){f(p,d);function p(){return h(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 m(x,S){for(var w=0;w<S.length;w++){var T=S[w];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(x,T.key,T)}}return function(x,S,w){return S&&m(x.prototype,S),w&&m(x,w),x}}(),a=function m(x,S,w){x===null&&(x=Function.prototype);var T=Object.getOwnPropertyDescriptor(x,S);if(T===void 0){var N=Object.getPrototypeOf(x);return N===null?void 0:m(N,S,w)}else{if("value"in T)return T.value;var A=T.get;return A===void 0?void 0:A.call(w)}},o=i(0),l=d(o),h=i(4),c=d(h),f=i(25),u=d(f);function d(m){return m&&m.__esModule?m:{default:m}}function p(m,x,S){return x in m?Object.defineProperty(m,x,{value:S,enumerable:!0,configurable:!0,writable:!0}):m[x]=S,m}function v(m,x){if(!(m instanceof x))throw new TypeError("Cannot call a class as a function")}function g(m,x){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:m}function y(m,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);m.prototype=Object.create(x&&x.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(m,x):m.__proto__=x)}var b=function(m){y(x,m);function x(){return v(this,x),g(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return s(x,[{key:"format",value:function(w,T){w===_.blotName&&!T?this.replaceWith(l.default.create(this.statics.scope)):a(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"format",this).call(this,w,T)}},{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(w,T){return this.parent.isolate(this.offset(this.parent),this.length()),w===this.parent.statics.blotName?(this.parent.replaceWith(w,T),this):(this.parent.unwrap(),a(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"replaceWith",this).call(this,w,T))}}],[{key:"formats",value:function(w){return w.tagName===this.tagName?void 0:a(x.__proto__||Object.getPrototypeOf(x),"formats",this).call(this,w)}}]),x}(c.default);b.blotName="list-item",b.tagName="LI";var _=function(m){y(x,m),s(x,null,[{key:"create",value:function(w){var T=w==="ordered"?"OL":"UL",N=a(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,T);return(w==="checked"||w==="unchecked")&&N.setAttribute("data-checked",w==="checked"),N}},{key:"formats",value:function(w){if(w.tagName==="OL")return"ordered";if(w.tagName==="UL")return w.hasAttribute("data-checked")?w.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function x(S){v(this,x);var w=g(this,(x.__proto__||Object.getPrototypeOf(x)).call(this,S)),T=function(A){if(A.target.parentNode===S){var E=w.statics.formats(S),O=l.default.find(A.target);E==="checked"?O.format("list","unchecked"):E==="unchecked"&&O.format("list","checked")}};return S.addEventListener("touchstart",T),S.addEventListener("mousedown",T),w}return s(x,[{key:"format",value:function(w,T){this.children.length>0&&this.children.tail.format(w,T)}},{key:"formats",value:function(){return p({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(w,T){if(w instanceof b)a(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"insertBefore",this).call(this,w,T);else{var N=T==null?this.length():T.offset(this),A=this.split(N);A.parent.insertBefore(w,A)}}},{key:"optimize",value:function(w){a(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"optimize",this).call(this,w);var T=this.next;T!=null&&T.prev===this&&T.statics.blotName===this.statics.blotName&&T.domNode.tagName===this.domNode.tagName&&T.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(T.moveChildren(this),T.remove())}},{key:"replace",value:function(w){if(w.statics.blotName!==this.statics.blotName){var T=l.default.create(this.statics.defaultChild);w.moveChildren(T),this.appendChild(T)}a(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"replace",this).call(this,w)}}]),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 h(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 f=function(u){c(d,u);function d(){return l(this,d),h(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}return d}(a.default);f.blotName="italic",f.tagName=["EM","I"],n.default=f},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function p(v,g){for(var y=0;y<g.length;y++){var b=g[y];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(v,b.key,b)}}return function(v,g,y){return g&&p(v.prototype,g),y&&p(v,y),v}}(),a=function p(v,g,y){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,y)}else{if("value"in b)return b.value;var m=b.get;return m===void 0?void 0:m.call(y)}},o=i(6),l=h(o);function h(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 f(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),f(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return s(v,null,[{key:"create",value:function(y){return y==="super"?document.createElement("sup"):y==="sub"?document.createElement("sub"):a(v.__proto__||Object.getPrototypeOf(v),"create",this).call(this,y)}},{key:"formats",value:function(y){if(y.tagName==="SUB")return"sub";if(y.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 h(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 f=function(u){c(d,u);function d(){return l(this,d),h(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}return d}(a.default);f.blotName="strike",f.tagName="S",n.default=f},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 h(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 f=function(u){c(d,u);function d(){return l(this,d),h(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}return d}(a.default);f.blotName="underline",f.tagName="U",n.default=f},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function g(y,b){for(var _=0;_<b.length;_++){var m=b[_];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(y,m.key,m)}}return function(y,b,_){return b&&g(y.prototype,b),_&&g(y,_),y}}(),a=function g(y,b,_){y===null&&(y=Function.prototype);var m=Object.getOwnPropertyDescriptor(y,b);if(m===void 0){var x=Object.getPrototypeOf(y);return x===null?void 0:g(x,b,_)}else{if("value"in m)return m.value;var S=m.get;return S===void 0?void 0:S.call(_)}},o=i(0),l=c(o),h=i(27);function c(g){return g&&g.__esModule?g:{default:g}}function f(g,y){if(!(g instanceof y))throw new TypeError("Cannot call a class as a function")}function u(g,y){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:g}function d(g,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);g.prototype=Object.create(y&&y.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(g,y):g.__proto__=y)}var p=["alt","height","width"],v=function(g){d(y,g);function y(){return f(this,y),u(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return s(y,[{key:"format",value:function(_,m){p.indexOf(_)>-1?m?this.domNode.setAttribute(_,m):this.domNode.removeAttribute(_):a(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"format",this).call(this,_,m)}}],[{key:"create",value:function(_){var m=a(y.__proto__||Object.getPrototypeOf(y),"create",this).call(this,_);return typeof _=="string"&&m.setAttribute("src",this.sanitize(_)),m}},{key:"formats",value:function(_){return p.reduce(function(m,x){return _.hasAttribute(x)&&(m[x]=_.getAttribute(x)),m},{})}},{key:"match",value:function(_){return/\.(jpe?g|gif|png)$/.test(_)||/^data:image\/.+;base64/.test(_)}},{key:"sanitize",value:function(_){return(0,h.sanitize)(_,["http","https","data"])?_:"//:0"}},{key:"value",value:function(_){return _.getAttribute("src")}}]),y}(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(y,b){for(var _=0;_<b.length;_++){var m=b[_];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(y,m.key,m)}}return function(y,b,_){return b&&g(y.prototype,b),_&&g(y,_),y}}(),a=function g(y,b,_){y===null&&(y=Function.prototype);var m=Object.getOwnPropertyDescriptor(y,b);if(m===void 0){var x=Object.getPrototypeOf(y);return x===null?void 0:g(x,b,_)}else{if("value"in m)return m.value;var S=m.get;return S===void 0?void 0:S.call(_)}},o=i(4),l=i(27),h=c(l);function c(g){return g&&g.__esModule?g:{default:g}}function f(g,y){if(!(g instanceof y))throw new TypeError("Cannot call a class as a function")}function u(g,y){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:g}function d(g,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);g.prototype=Object.create(y&&y.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(g,y):g.__proto__=y)}var p=["height","width"],v=function(g){d(y,g);function y(){return f(this,y),u(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return s(y,[{key:"format",value:function(_,m){p.indexOf(_)>-1?m?this.domNode.setAttribute(_,m):this.domNode.removeAttribute(_):a(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"format",this).call(this,_,m)}}],[{key:"create",value:function(_){var m=a(y.__proto__||Object.getPrototypeOf(y),"create",this).call(this,_);return m.setAttribute("frameborder","0"),m.setAttribute("allowfullscreen",!0),m.setAttribute("src",this.sanitize(_)),m}},{key:"formats",value:function(_){return p.reduce(function(m,x){return _.hasAttribute(x)&&(m[x]=_.getAttribute(x)),m},{})}},{key:"sanitize",value:function(_){return h.default.sanitize(_)}},{key:"value",value:function(_){return _.getAttribute("src")}}]),y}(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 _(m,x){for(var S=0;S<x.length;S++){var w=x[S];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(m,w.key,w)}}return function(m,x,S){return x&&_(m.prototype,x),S&&_(m,S),m}}(),a=function _(m,x,S){m===null&&(m=Function.prototype);var w=Object.getOwnPropertyDescriptor(m,x);if(w===void 0){var T=Object.getPrototypeOf(m);return T===null?void 0:_(T,x,S)}else{if("value"in w)return w.value;var N=w.get;return N===void 0?void 0:N.call(S)}},o=i(35),l=d(o),h=i(5),c=d(h),f=i(9),u=d(f);function d(_){return _&&_.__esModule?_:{default:_}}function p(_,m){if(!(_ instanceof m))throw new TypeError("Cannot call a class as a function")}function v(_,m){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:_}function g(_,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);_.prototype=Object.create(m&&m.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(_,m):_.__proto__=m)}var y=function(_){g(m,_);function m(){return p(this,m),v(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return s(m,null,[{key:"create",value:function(S){var w=a(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,S);return typeof S=="string"&&(window.katex.render(S,w,{throwOnError:!1,errorColor:"#f00"}),w.setAttribute("data-value",S)),w}},{key:"value",value:function(S){return S.getAttribute("data-value")}}]),m}(l.default);y.blotName="formula",y.className="ql-formula",y.tagName="SPAN";var b=function(_){g(m,_),s(m,null,[{key:"register",value:function(){c.default.register(y,!0)}}]);function m(){p(this,m);var x=v(this,(m.__proto__||Object.getPrototypeOf(m)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return x}return m}(u.default);n.FormulaBlot=y,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 S(w,T){for(var N=0;N<T.length;N++){var A=T[N];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(w,A.key,A)}}return function(w,T,N){return T&&S(w.prototype,T),N&&S(w,N),w}}(),a=function S(w,T,N){w===null&&(w=Function.prototype);var A=Object.getOwnPropertyDescriptor(w,T);if(A===void 0){var E=Object.getPrototypeOf(w);return E===null?void 0:S(E,T,N)}else{if("value"in A)return A.value;var O=A.get;return O===void 0?void 0:O.call(N)}},o=i(0),l=v(o),h=i(5),c=v(h),f=i(9),u=v(f),d=i(13),p=v(d);function v(S){return S&&S.__esModule?S:{default:S}}function g(S,w){if(!(S instanceof w))throw new TypeError("Cannot call a class as a function")}function y(S,w){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:S}function b(S,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);S.prototype=Object.create(w&&w.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(S,w):S.__proto__=w)}var _=function(S){b(w,S);function w(){return g(this,w),y(this,(w.__proto__||Object.getPrototypeOf(w)).apply(this,arguments))}return s(w,[{key:"replaceWith",value:function(N){this.domNode.textContent=this.domNode.textContent,this.attach(),a(w.prototype.__proto__||Object.getPrototypeOf(w.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)}}]),w}(p.default);_.className="ql-syntax";var m=new l.default.Attributor.Class("token","hljs",{scope:l.default.Scope.INLINE}),x=function(S){b(w,S),s(w,null,[{key:"register",value:function(){c.default.register(m,!0),c.default.register(_,!0)}}]);function w(T,N){g(this,w);var A=y(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,T,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 E=null;return A.quill.on(c.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(E),E=setTimeout(function(){A.highlight(),E=null},A.options.interval)}),A.highlight(),A}return s(w,[{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(E){E.highlight(N.options.highlight)}),this.quill.update(c.default.sources.SILENT),A!=null&&this.quill.setSelection(A,c.default.sources.SILENT)}}}]),w}(u.default);x.DEFAULTS={highlight:function(){return window.hljs==null?null:function(S){var w=window.hljs.highlightAuto(S);return w.value}}(),interval:1e3},n.CodeBlock=_,n.CodeToken=m,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 w(T,N,A){T===null&&(T=Function.prototype);var E=Object.getOwnPropertyDescriptor(T,N);if(E===void 0){var O=Object.getPrototypeOf(T);return O===null?void 0:w(O,N,A)}else{if("value"in E)return E.value;var R=E.get;return R===void 0?void 0:R.call(A)}},a=function(){function w(T,N){for(var A=0;A<N.length;A++){var E=N[A];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(T,E.key,E)}}return function(T,N,A){return N&&w(T.prototype,N),A&&w(T,A),T}}(),o=i(3),l=g(o),h=i(8),c=g(h),f=i(43),u=g(f),d=i(15),p=i(41),v=g(p);function g(w){return w&&w.__esModule?w:{default:w}}function y(w,T){if(!(w instanceof T))throw new TypeError("Cannot call a class as a function")}function b(w,T){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T&&(typeof T=="object"||typeof T=="function")?T:w}function _(w,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof T);w.prototype=Object.create(T&&T.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(w,T):w.__proto__=T)}var m=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],x=function(w){_(T,w);function T(N,A){y(this,T),A.modules.toolbar!=null&&A.modules.toolbar.container==null&&(A.modules.toolbar.container=m);var E=b(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,N,A));return E.quill.container.classList.add("ql-bubble"),E}return a(T,[{key:"extendToolbar",value:function(A){this.tooltip=new S(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)}}]),T}(u.default);x.DEFAULTS=(0,l.default)(!0,{},u.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(T){T?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var S=function(w){_(T,w);function T(N,A){y(this,T);var E=b(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,N,A));return E.quill.on(c.default.events.EDITOR_CHANGE,function(O,R,C,F){if(O===c.default.events.SELECTION_CHANGE)if(R!=null&&R.length>0&&F===c.default.sources.USER){E.show(),E.root.style.left="0px",E.root.style.width="",E.root.style.width=E.root.offsetWidth+"px";var U=E.quill.getLines(R.index,R.length);if(U.length===1)E.position(E.quill.getBounds(R));else{var D=U[U.length-1],z=E.quill.getIndex(D),j=Math.min(D.length()-1,R.index+R.length-z),k=E.quill.getBounds(new d.Range(z,j));E.position(k)}}else document.activeElement!==E.textbox&&E.quill.hasFocus()&&E.hide()}),E}return a(T,[{key:"listen",value:function(){var A=this;s(T.prototype.__proto__||Object.getPrototypeOf(T.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 E=A.quill.getSelection();E!=null&&A.position(A.quill.getBounds(E))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(A){var E=s(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"position",this).call(this,A),O=this.root.querySelector(".ql-tooltip-arrow");if(O.style.marginLeft="",E===0)return E;O.style.marginLeft=-1*E-O.offsetWidth/2+"px"}}]),T}(f.BaseTooltip);S.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=S,n.default=x},function(r,n,i){r.exports=i(63)}]).default})})(Mh);var kT=Mh.exports;const PT=or(kT),zT="",MT=e=>{const[t,r]=J.useState(!1);console.log("allProps",e);const n=J.useRef(null),i=J.useRef(null),s=J.useRef(null),a=J.useRef(null),o=J.useRef(16),l=J.useRef(null),{uniqueId:h,text:c,locked:f,transformation:u,onTextUpdate:d,pointerdown:p,pointerup:v,mousedown:g,mouseup:y,pointerover:b,mouseover:_,mouseout:m}=e,{scale:x=[1,1],x:S,y:w,rotation:T=1,fontFamily:N="Arial",fontWeight:A="normal",fontStyle:E="normal",fontSize:O=16,fill:R="black",stroke:C,strokeThickness:F,blurRadius:U=0,blurEnabled:D=!1,dropShadowColor:z=null,wordWrapWidth:j=5e7,leading:k=0,letterSpacing:I}=u;lt.useEffect(()=>{o.current=Number(O)},[O]);const P=["italic","oblique"].includes(E)?E:void 0,L=["bold","lighter","100","200","300"].includes(A)?A:void 0,G=Number(I)>0?I:void 0,$=lt.useMemo(()=>new ne.TextStyle({fontFamily:N,fontSize:O,fill:R||"white",stroke:C,strokeThickness:F,...P&&{fontStyle:P},...L&&{fontWeight:L},...G&&{letterSpacing:G},...D&&{dropShadow:!0,dropShadowBlur:Number(U),dropShadowColor:(z==null?void 0:z.toString())||"black",dropShadowDistance:0},wordWrap:!0,breakWords:!0,wordWrapWidth:j||500,leading:k||0}),[D,U,R,N,O,k,P,L,G,z,C,F,j]);lt.useEffect(()=>{l.current={...u}},[u]);const M=B=>{d&&d({text:B,uniqueId:h,droptype:"titles"})};return lt.useEffect(()=>{if(t&&s.current){let q=document.getElementById("note-editor");if(q){q.style.position="absolute",q.style.zIndex="10",q.style.left=S+"px",q.style.top=w+"px",q.style.backgroundColor="var(--chakra-color-darkShark)",q.style.transform="scale(1.5)",q.style.width="300px",q.style.height="100px",q.style.color="#fff",q.style.fontSize="20px",q.style.border="1px solid #CBCEE0";const H={esc:{key:27,handler:function(){r(!1)}},enter:{key:13,handler:function(){r(!1)}}};var B=new PT("#note-editor",{modules:{toolbar:!1,keyboard:{bindings:{...H}}},placeholder:"Compose your text here...",theme:"snow"});B.on("text-change",function(){M(B.root.innerText)}),B.setText(c),B.focus(),B.off("text-change",()=>{console.log("removed")}),B.hasFocus()||(q.style.display="none")}}},[S,w,t]),ft.jsx(Ea,{...e,children:ft.jsxs(yt.Container,{ref:n,children:[t&&ft.jsx(yt.Container,{ref:s}),ft.jsx(yt.Container,{alpha:t?0:1,ref:a,children:ft.jsx(yt.Text,{style:$,x:S,y:w,rotation:T,anchor:.5,text:c,...!t&&!f&&{interactive:!0,buttonMode:!0,pointerdown:p,pointerout:m,pointerover:b,pointerup:v,mousedown:g,mouseup:y,mouseover:_},ref:i,scale:x})})]})})},LT=yt.withFilters(yt.Container,{blur:ne.filters.BlurFilter,adjust:Zs,matrix:ne.filters.ColorMatrixFilter}),FT=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],BT={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1},DT=e=>{const[t,r]=lt.useState(!1),[,n]=J.useState(!1),[,i]=lt.useState({isWaiting:!1,isStalled:!1}),[s,a]=lt.useState(),[o,l]=J.useState(!1),h=J.useRef(null),c=J.useRef(null),f=J.useRef(null),u=J.useRef(null),d=J.useRef(null),p=J.useRef(null),v=J.useRef(BT),{tl:g,playerTimeRef:y,isDragging:b}=J.useContext(Mr),{uniqueId:_,mute:m=!1,locked:x=!1,src:S,startAt:w,endAt:T,frameStartAt:N,frameEndAt:A,initialAlpha:E,transformation:{x:O,y:R,width:C,height:F,scale:U,rotation:D,animation:z,colorCorrection:j,effect:k},pointerdown:I,pointerup:P,mousedown:L,mouseup:G,pointerover:$,mouseover:M,mouseout:B,applyTransformer:q,onAnchorTransformationEnd:H}=e,X=S||"",{contrast:K=1,saturation:et=1,exposure:it=1,blurRadius:ot=0,alpha:ht=1}=j||{},Ct={brightness:it,contrast:K,saturation:et,alpha:ht},It=lt.useCallback(()=>{l(!0)},[]),V=lt.useCallback(Z=>{console.log("changeEnd",Z),H&&(console.log("running onAnchorTransformationEnd"),H(Z))},[]),W=lt.useMemo(()=>{const Z=document.createElement("video");return Z.src=S,Z.crossOrigin="Anonymus",Z.autoplay=!1,Z.currentTime=1e-4,Z},[S]);un(je.PAUSE,Z=>{if(console.log("pause event",Z),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}}),lt.useEffect(()=>{console.log("current",p.current,b),p.current&&(b?(p.current.pause(),v.current.isPlaying=!1,v.current.isDragging=!0):v.current.isDragging=!1)},[b]);const Q=Z=>{p.current&&(console.log("video gsapOnStart",y.current,b),y.current>=Z&&y.current<=T&&!b&&(p.current.currentTime=Number(N)||Number(Z),p.current.play(),v.current.isPlaying=!0))},tt=()=>{if(console.log("onComplete triggered"),p.current){const Z=p.current;Z.currentTime>0&&!Z.paused&&!Z.ended&&Z.readyState>Z.HAVE_CURRENT_DATA&&p.current.pause(),v.current.isPlaying=!1}},Y=()=>{},ct=()=>{if(p.current){Math.abs(p.current.currentTime-y.current);const Z=p.current,at=Z.currentTime>0&&!Z.paused&&!Z.ended&&Z.readyState>Z.HAVE_CURRENT_DATA;v.current.isDragging?(console.log("video updating",y.current),p.current.currentTime=y.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)}};return J.useEffect(()=>{let Z=ye.context(()=>{});if(c.current&&g.current){const at={duration:Number(T)-Number(w),onStart:Q,onComplete:tt,onStartParams:[w],onCompleteParams:[],onInterrupt:Y,onUpdate:ct,onUpdateParams:[]},St=ha(z||"None");Z=ye.context(()=>{var Ht,_t;ee(St.from)?ee(St.to)?ee(St.fromTo)?g.current.to(c.current,{alpha:1,duration:.01},w).from(u.current,{...at},w).to(c.current,{alpha:0,duration:.1},Number(T)-.1):g.current.fromTo(c.current,(Ht=St.fromTo)==null?void 0:Ht.from,(_t=St.fromTo)==null?void 0:_t.to,w).from(u.current,{...at},w).to(c.current,{alpha:0,duration:.2},T-.2):g.current.to(c.current,{alpha:1,duration:.2,...St.to},w).from(u.current,{...at},w).to(c.current,{alpha:0,duration:.2},T-.2):g.current.from(c.current,{...St.from},w).to(u.current,{alpha:1,duration:.2},w).from(u.current,{...at},w).to(c.current,{alpha:0,duration:.2},T-.2)})}return()=>Z.revert()},[z,w,T]),lt.useEffect(()=>{c.current&&r(!0)},[]),lt.useEffect(()=>{p.current&&(p.current.muted=m)},[m]),lt.useEffect(()=>{if(p.current){const Z=p.current;Z.currentTime>0&&!Z.paused&&!Z.ended&&Z.readyState>Z.HAVE_CURRENT_DATA&&(o||b)&&(p.current.pause(),v.current.isPlaying=!1)}},[o,b]),lt.useEffect(()=>{const Z=Math.round((Number(N)+Number.EPSILON)*100)/100,at=function(){p.current&&(p.current.currentTime=Z)},St=function(){if(p.current){const zt=p.current;zt.currentTime>0&&!zt.paused&&!zt.ended&&zt.readyState>zt.HAVE_CURRENT_DATA&&p.current.pause()}i({isWaiting:!1,isStalled:!1})},Ht=function(){p.current&&p.current.pause(),i({isWaiting:!0,isStalled:!1})},_t=function(){i({isWaiting:!1,isStalled:!1})},Et=function(){i({isWaiting:!1,isStalled:!0})},Tt=Math.round((Number(N)+Number.EPSILON)*100)/100,Bt=Math.round((Number(A)+Number.EPSILON)*100)/100,pe=`${X}#t=${Tt},${Bt}`;return console.log("urlTimestap",pe),ne.Texture.fromLoader(W,pe,_,{pixiIdPrefix:_,resourceOptions:{autoPlay:!1,crossorigin:"Anonymus",updateFPS:30}}).then(zt=>{zt&&(a(zt),console.log(zt.baseTexture.resource.source),p.current=zt.baseTexture.resource.source,p.current.id=_,p.current.addEventListener("loadedmetadata",at),p.current.addEventListener("ended",St),p.current.addEventListener("loadstart",Ht),p.current.addEventListener("canplaythrough",_t),p.current.addEventListener("stalled",Et))}),()=>{p.current.removeEventListener("loadedmetadata",at),p.current.removeEventListener("ended",St),p.current.removeEventListener("loadstart",Ht),p.current.removeEventListener("canplaythrough",_t),p.current.removeEventListener("stalled",Et)}},[X,_,N,A,W]),ft.jsxs(yt.Container,{ref:f,children:[ft.jsx(yt.Container,{ref:c,alpha:E,position:[O,R],pivot:[O,R],width:C,height:F,children:ft.jsx(LT,{scale:1,blur:{blur:ot,quality:4},adjust:Ct,apply:({matrix:Z})=>{k==="BlackAndWhite"?Z.desaturate():k==="Sepia"?Z.sepia():k==="RetroVintage"||k==="NightVision"?Z.negative():k==="Normal"&&Z.reset()},matrix:{enabled:!0,matrix:FT},children:ft.jsx(yt.Container,{ref:u,children:s&&ft.jsx(yt.Sprite,{texture:s,width:C,height:F,anchor:.5,x:O,y:R,...!x&&!o&&{interactive:!0,buttonMode:!0,pointerdown:I,pointerover:$,pointerout:B,mousedown:L,mouseover:M,mouseout:B,mouseup:G,pointerup:P},ref:h,scale:U,rotation:D})})})}),q&&ft.jsx(la,{pixiTransformerRef:d,imageRef:c,isMounted:t,transformCommit:V,transformChange:It,mouseoverEvent:n,uniqueId:_})]})};var Lh=(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))(Lh||{}),Fh=(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))(Fh||{});Lt.Animations=Lh,Lt.BlendModes=Fh,Lt.Events=je,Lt.GsapPixieContext=Mr,Lt.GsapPixieContextProvider=Gy,Lt.PixiAnimatedSprite=Ph,Lt.PixiAudioSprite=q0,Lt.PixiGifSprite=CT,Lt.PixiImageSprite=Dg,Lt.PixiSvgPathSprite=$0,Lt.PixiTextSprite=MT,Lt.PixiVideoSprite=DT,Object.defineProperty(Lt,Symbol.toStringTag,{value:"Module"})});
590
+ `)}return W}function Ct(V,W){var Q={},tt=V.style||{};return tt.fontStyle&&G(V).fontStyle==="italic"&&(Q.italic=!0),tt.fontWeight&&(G(V).fontWeight.startsWith("bold")||parseInt(G(V).fontWeight)>=700)&&(Q.bold=!0),Object.keys(Q).length>0&&(W=L(W,Q)),parseFloat(tt.textIndent||0)>0&&(W=new f.default().insert(" ").concat(W)),W}function It(V,W){var Q=V.data;if(V.parentNode.tagName==="O:P")return W.insert(Q.trim());if(Q.trim().length===0&&V.parentNode.classList.contains("ql-clipboard"))return W;if(!G(V.parentNode).whiteSpace.startsWith("pre")){var tt=function(ct,Z){return Z=Z.replace(/[^\u00a0]/g,""),Z.length<1&&ct?" ":Z};Q=Q.replace(/\r\n/g," ").replace(/\n/g," "),Q=Q.replace(/\s\s+/g,tt.bind(tt,!0)),(V.previousSibling==null&&M(V.parentNode)||V.previousSibling!=null&&M(V.previousSibling))&&(Q=Q.replace(/^\s+/,tt.bind(tt,!1))),(V.nextSibling==null&&M(V.parentNode)||V.nextSibling!=null&&M(V.nextSibling))&&(Q=Q.replace(/\s+$/,tt.bind(tt,!1)))}return W.insert(Q)}n.default=P,n.matchAttributor=H,n.matchBlot=X,n.matchNewline=ot,n.matchSpacing=ht,n.matchText=It},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function p(v,g){for(var y=0;y<g.length;y++){var b=g[y];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(v,b.key,b)}}return function(v,g,y){return g&&p(v.prototype,g),y&&p(v,y),v}}(),a=function p(v,g,y){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,y)}else{if("value"in b)return b.value;var m=b.get;return m===void 0?void 0:m.call(y)}},o=i(6),l=h(o);function h(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 f(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),f(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return s(v,[{key:"optimize",value:function(y){a(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"optimize",this).call(this,y),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 E(O,R){var C=[],F=!0,U=!1,D=void 0;try{for(var z=O[Symbol.iterator](),j;!(F=(j=z.next()).done)&&(C.push(j.value),!(R&&C.length===R));F=!0);}catch(k){U=!0,D=k}finally{try{!F&&z.return&&z.return()}finally{if(U)throw D}}return C}return function(O,R){if(Array.isArray(O))return O;if(Symbol.iterator in Object(O))return E(O,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function E(O,R){for(var C=0;C<R.length;C++){var F=R[C];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(O,F.key,F)}}return function(O,R,C){return R&&E(O.prototype,R),C&&E(O,C),O}}(),o=i(2),l=y(o),h=i(0),c=y(h),f=i(5),u=y(f),d=i(10),p=y(d),v=i(9),g=y(v);function y(E){return E&&E.__esModule?E:{default:E}}function b(E,O,R){return O in E?Object.defineProperty(E,O,{value:R,enumerable:!0,configurable:!0,writable:!0}):E[O]=R,E}function _(E,O){if(!(E instanceof O))throw new TypeError("Cannot call a class as a function")}function m(E,O){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:E}function x(E,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);E.prototype=Object.create(O&&O.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(E,O):E.__proto__=O)}var S=(0,p.default)("quill:toolbar"),w=function(E){x(O,E);function O(R,C){_(this,O);var F=m(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,R,C));if(Array.isArray(F.options.container)){var U=document.createElement("div");N(U,F.options.container),R.container.parentNode.insertBefore(U,R.container),F.container=U}else typeof F.options.container=="string"?F.container=document.querySelector(F.options.container):F.container=F.options.container;if(!(F.container instanceof HTMLElement)){var D;return D=S.error("Container required for toolbar",F.options),m(F,D)}return F.container.classList.add("ql-toolbar"),F.controls=[],F.handlers={},Object.keys(F.options.handlers).forEach(function(z){F.addHandler(z,F.options.handlers[z])}),[].forEach.call(F.container.querySelectorAll("button, select"),function(z){F.attach(z)}),F.quill.on(u.default.events.EDITOR_CHANGE,function(z,j){z===u.default.events.SELECTION_CHANGE&&F.update(j)}),F.quill.on(u.default.events.SCROLL_OPTIMIZE,function(){var z=F.quill.selection.getRange(),j=s(z,1),k=j[0];F.update(k)}),F}return a(O,[{key:"addHandler",value:function(C,F){this.handlers[C]=F}},{key:"attach",value:function(C){var F=this,U=[].find.call(C.classList,function(z){return z.indexOf("ql-")===0});if(U){if(U=U.slice(3),C.tagName==="BUTTON"&&C.setAttribute("type","button"),this.handlers[U]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[U]==null){S.warn("ignoring attaching to disabled format",U,C);return}if(c.default.query(U)==null){S.warn("ignoring attaching to nonexistent format",U,C);return}}var D=C.tagName==="SELECT"?"change":"click";C.addEventListener(D,function(z){var j=void 0;if(C.tagName==="SELECT"){if(C.selectedIndex<0)return;var k=C.options[C.selectedIndex];k.hasAttribute("selected")?j=!1:j=k.value||!1}else C.classList.contains("ql-active")?j=!1:j=C.value||!C.hasAttribute("value"),z.preventDefault();F.quill.focus();var I=F.quill.selection.getRange(),P=s(I,1),L=P[0];if(F.handlers[U]!=null)F.handlers[U].call(F,j);else if(c.default.query(U).prototype instanceof c.default.Embed){if(j=prompt("Enter "+U),!j)return;F.quill.updateContents(new l.default().retain(L.index).delete(L.length).insert(b({},U,j)),u.default.sources.USER)}else F.quill.format(U,j,u.default.sources.USER);F.update(L)}),this.controls.push([U,C])}}},{key:"update",value:function(C){var F=C==null?{}:this.quill.getFormat(C);this.controls.forEach(function(U){var D=s(U,2),z=D[0],j=D[1];if(j.tagName==="SELECT"){var k=void 0;if(C==null)k=null;else if(F[z]==null)k=j.querySelector("option[selected]");else if(!Array.isArray(F[z])){var I=F[z];typeof I=="string"&&(I=I.replace(/\"/g,'\\"')),k=j.querySelector('option[value="'+I+'"]')}k==null?(j.value="",j.selectedIndex=-1):k.selected=!0}else if(C==null)j.classList.remove("ql-active");else if(j.hasAttribute("value")){var P=F[z]===j.getAttribute("value")||F[z]!=null&&F[z].toString()===j.getAttribute("value")||F[z]==null&&!j.getAttribute("value");j.classList.toggle("ql-active",P)}else j.classList.toggle("ql-active",F[z]!=null)})}}]),O}(g.default);w.DEFAULTS={};function T(E,O,R){var C=document.createElement("button");C.setAttribute("type","button"),C.classList.add("ql-"+O),R!=null&&(C.value=R),E.appendChild(C)}function N(E,O){Array.isArray(O[0])||(O=[O]),O.forEach(function(R){var C=document.createElement("span");C.classList.add("ql-formats"),R.forEach(function(F){if(typeof F=="string")T(C,F);else{var U=Object.keys(F)[0],D=F[U];Array.isArray(D)?A(C,U,D):T(C,U,D)}}),E.appendChild(C)})}function A(E,O,R){var C=document.createElement("select");C.classList.add("ql-"+O),R.forEach(function(F){var U=document.createElement("option");F!==!1?U.setAttribute("value",F):U.setAttribute("selected","selected"),C.appendChild(U)}),E.appendChild(C)}w.DEFAULTS={container:null,handlers:{clean:function(){var O=this,R=this.quill.getSelection();if(R!=null)if(R.length==0){var C=this.quill.getFormat();Object.keys(C).forEach(function(F){c.default.query(F,c.default.Scope.INLINE)!=null&&O.quill.format(F,!1)})}else this.quill.removeFormat(R,u.default.sources.USER)},direction:function(O){var R=this.quill.getFormat().align;O==="rtl"&&R==null?this.quill.format("align","right",u.default.sources.USER):!O&&R==="right"&&this.quill.format("align",!1,u.default.sources.USER),this.quill.format("direction",O,u.default.sources.USER)},indent:function(O){var R=this.quill.getSelection(),C=this.quill.getFormat(R),F=parseInt(C.indent||0);if(O==="+1"||O==="-1"){var U=O==="+1"?1:-1;C.direction==="rtl"&&(U*=-1),this.quill.format("indent",F+U,u.default.sources.USER)}},link:function(O){O===!0&&(O=prompt("Enter link URL:")),this.quill.format("link",O,u.default.sources.USER)},list:function(O){var R=this.quill.getSelection(),C=this.quill.getFormat(R);O==="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",O,u.default.sources.USER)}}},n.default=w,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 y=0;y<g.length;y++){var b=g[y];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(v,b.key,b)}}return function(v,g,y){return g&&p(v.prototype,g),y&&p(v,y),v}}(),a=function p(v,g,y){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,y)}else{if("value"in b)return b.value;var m=b.get;return m===void 0?void 0:m.call(y)}},o=i(28),l=h(o);function h(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 f(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,y){c(this,v);var b=f(this,(v.__proto__||Object.getPrototypeOf(v)).call(this,g));return b.label.innerHTML=y,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(y){var b=a(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"buildItem",this).call(this,y);return b.style.backgroundColor=y.getAttribute("value")||"",b}},{key:"selectItem",value:function(y,b){a(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"selectItem",this).call(this,y,b);var _=this.label.querySelector(".ql-color-label"),m=y&&y.getAttribute("data-value")||"";_&&(_.tagName==="line"?_.style.stroke=m:_.style.fill=m)}}]),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 y=0;y<g.length;y++){var b=g[y];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(v,b.key,b)}}return function(v,g,y){return g&&p(v.prototype,g),y&&p(v,y),v}}(),a=function p(v,g,y){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,y)}else{if("value"in b)return b.value;var m=b.get;return m===void 0?void 0:m.call(y)}},o=i(28),l=h(o);function h(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 f(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,y){c(this,v);var b=f(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=y[_.getAttribute("data-value")||""]}),b.defaultItem=b.container.querySelector(".ql-selected"),b.selectItem(b.defaultItem),b}return s(v,[{key:"selectItem",value:function(y,b){a(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"selectItem",this).call(this,y,b),y=y||this.defaultItem,this.label.innerHTML=y.innerHTML}}]),v}(l.default);n.default=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function l(h,c){for(var f=0;f<c.length;f++){var u=c[f];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(h,u.key,u)}}return function(h,c,f){return c&&l(h.prototype,c),f&&l(h,f),h}}();function a(l,h){if(!(l instanceof h))throw new TypeError("Cannot call a class as a function")}var o=function(){function l(h,c){var f=this;a(this,l),this.quill=h,this.boundsContainer=c||document.body,this.root=h.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){f.root.style.marginTop=-1*f.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 f=c.left+c.width/2-this.root.offsetWidth/2,u=c.bottom+this.quill.root.scrollTop;this.root.style.left=f+"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=f+v+"px"),p.left<d.left&&(v=d.left-p.left,this.root.style.left=f+v+"px"),p.bottom>d.bottom){var g=p.bottom-p.top,y=c.bottom-c.top+g;this.root.style.top=u-y+"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(E,O){var R=[],C=!0,F=!1,U=void 0;try{for(var D=E[Symbol.iterator](),z;!(C=(z=D.next()).done)&&(R.push(z.value),!(O&&R.length===O));C=!0);}catch(j){F=!0,U=j}finally{try{!C&&D.return&&D.return()}finally{if(F)throw U}}return R}return function(E,O){if(Array.isArray(E))return E;if(Symbol.iterator in Object(E))return A(E,O);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function A(E,O,R){E===null&&(E=Function.prototype);var C=Object.getOwnPropertyDescriptor(E,O);if(C===void 0){var F=Object.getPrototypeOf(E);return F===null?void 0:A(F,O,R)}else{if("value"in C)return C.value;var U=C.get;return U===void 0?void 0:U.call(R)}},o=function(){function A(E,O){for(var R=0;R<O.length;R++){var C=O[R];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(E,C.key,C)}}return function(E,O,R){return O&&A(E.prototype,O),R&&A(E,R),E}}(),l=i(3),h=_(l),c=i(8),f=_(c),u=i(43),d=_(u),p=i(27),v=_(p),g=i(15),y=i(41),b=_(y);function _(A){return A&&A.__esModule?A:{default:A}}function m(A,E){if(!(A instanceof E))throw new TypeError("Cannot call a class as a function")}function x(A,E){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:A}function S(A,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);A.prototype=Object.create(E&&E.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(A,E):A.__proto__=E)}var w=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],T=function(A){S(E,A);function E(O,R){m(this,E),R.modules.toolbar!=null&&R.modules.toolbar.container==null&&(R.modules.toolbar.container=w);var C=x(this,(E.__proto__||Object.getPrototypeOf(E)).call(this,O,R));return C.quill.container.classList.add("ql-snow"),C}return o(E,[{key:"extendToolbar",value:function(R){R.container.classList.add("ql-snow"),this.buildButtons([].slice.call(R.container.querySelectorAll("button")),b.default),this.buildPickers([].slice.call(R.container.querySelectorAll("select")),b.default),this.tooltip=new N(this.quill,this.options.bounds),R.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(C,F){R.handlers.link.call(R,!F.format.link)})}}]),E}(d.default);T.DEFAULTS=(0,h.default)(!0,{},d.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(E){if(E){var O=this.quill.getSelection();if(O==null||O.length==0)return;var R=this.quill.getText(O);/^\S+@\S+\.\S+$/.test(R)&&R.indexOf("mailto:")!==0&&(R="mailto:"+R);var C=this.quill.theme.tooltip;C.edit("link",R)}else this.quill.format("link",!1)}}}}});var N=function(A){S(E,A);function E(O,R){m(this,E);var C=x(this,(E.__proto__||Object.getPrototypeOf(E)).call(this,O,R));return C.preview=C.root.querySelector("a.ql-preview"),C}return o(E,[{key:"listen",value:function(){var R=this;a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(C){R.root.classList.contains("ql-editing")?R.save():R.edit("link",R.preview.textContent),C.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(C){if(R.linkRange!=null){var F=R.linkRange;R.restoreFocus(),R.quill.formatText(F,"link",!1,f.default.sources.USER),delete R.linkRange}C.preventDefault(),R.hide()}),this.quill.on(f.default.events.SELECTION_CHANGE,function(C,F,U){if(C!=null){if(C.length===0&&U===f.default.sources.USER){var D=R.quill.scroll.descendant(v.default,C.index),z=s(D,2),j=z[0],k=z[1];if(j!=null){R.linkRange=new g.Range(C.index-k,j.length());var I=v.default.formats(j.domNode);R.preview.textContent=I,R.preview.setAttribute("href",I),R.show(),R.position(R.quill.getBounds(R.linkRange));return}}else delete R.linkRange;R.hide()}})}},{key:"show",value:function(){a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),E}(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=T},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=i(29),a=Y(s),o=i(36),l=i(38),h=i(64),c=i(65),f=Y(c),u=i(66),d=Y(u),p=i(67),v=Y(p),g=i(37),y=i(26),b=i(39),_=i(40),m=i(56),x=Y(m),S=i(68),w=Y(S),T=i(27),N=Y(T),A=i(69),E=Y(A),O=i(70),R=Y(O),C=i(71),F=Y(C),U=i(72),D=Y(U),z=i(73),j=Y(z),k=i(13),I=Y(k),P=i(74),L=Y(P),G=i(75),$=Y(G),M=i(57),B=Y(M),q=i(41),H=Y(q),X=i(28),K=Y(X),et=i(59),it=Y(et),ot=i(60),ht=Y(ot),Ct=i(61),It=Y(Ct),V=i(108),W=Y(V),Q=i(62),tt=Y(Q);function Y(ct){return ct&&ct.__esModule?ct:{default:ct}}a.default.register({"attributors/attribute/direction":l.DirectionAttribute,"attributors/class/align":o.AlignClass,"attributors/class/background":g.BackgroundClass,"attributors/class/color":y.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":y.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":h.IndentClass,"formats/background":g.BackgroundStyle,"formats/color":y.ColorStyle,"formats/font":b.FontClass,"formats/size":_.SizeClass,"formats/blockquote":f.default,"formats/code-block":I.default,"formats/header":d.default,"formats/list":v.default,"formats/bold":x.default,"formats/code":k.Code,"formats/italic":w.default,"formats/link":N.default,"formats/script":E.default,"formats/strike":R.default,"formats/underline":F.default,"formats/image":D.default,"formats/video":j.default,"formats/list/item":p.ListItem,"modules/formula":L.default,"modules/syntax":$.default,"modules/toolbar":B.default,"themes/bubble":W.default,"themes/snow":tt.default,"ui/icons":H.default,"ui/picker":K.default,"ui/icon-picker":ht.default,"ui/color-picker":it.default,"ui/tooltip":It.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,y){for(var b=0;b<y.length;b++){var _=y[b];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(g,_.key,_)}}return function(g,y,b){return y&&v(g.prototype,y),b&&v(g,b),g}}(),a=function v(g,y,b){g===null&&(g=Function.prototype);var _=Object.getOwnPropertyDescriptor(g,y);if(_===void 0){var m=Object.getPrototypeOf(g);return m===null?void 0:v(m,y,b)}else{if("value"in _)return _.value;var x=_.get;return x===void 0?void 0:x.call(b)}},o=i(0),l=h(o);function h(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 f(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),f(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return s(g,[{key:"add",value:function(b,_){if(_==="+1"||_==="-1"){var m=this.value(b)||0;_=_==="+1"?m+1:m-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 h(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 f=function(u){c(d,u);function d(){return l(this,d),h(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}return d}(a.default);f.blotName="blockquote",f.tagName="blockquote",n.default=f},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 y=v[g];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(p,y.key,y)}}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 h(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 f(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){f(p,d);function p(){return h(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 m(x,S){for(var w=0;w<S.length;w++){var T=S[w];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(x,T.key,T)}}return function(x,S,w){return S&&m(x.prototype,S),w&&m(x,w),x}}(),a=function m(x,S,w){x===null&&(x=Function.prototype);var T=Object.getOwnPropertyDescriptor(x,S);if(T===void 0){var N=Object.getPrototypeOf(x);return N===null?void 0:m(N,S,w)}else{if("value"in T)return T.value;var A=T.get;return A===void 0?void 0:A.call(w)}},o=i(0),l=d(o),h=i(4),c=d(h),f=i(25),u=d(f);function d(m){return m&&m.__esModule?m:{default:m}}function p(m,x,S){return x in m?Object.defineProperty(m,x,{value:S,enumerable:!0,configurable:!0,writable:!0}):m[x]=S,m}function v(m,x){if(!(m instanceof x))throw new TypeError("Cannot call a class as a function")}function g(m,x){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:m}function y(m,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);m.prototype=Object.create(x&&x.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(m,x):m.__proto__=x)}var b=function(m){y(x,m);function x(){return v(this,x),g(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return s(x,[{key:"format",value:function(w,T){w===_.blotName&&!T?this.replaceWith(l.default.create(this.statics.scope)):a(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"format",this).call(this,w,T)}},{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(w,T){return this.parent.isolate(this.offset(this.parent),this.length()),w===this.parent.statics.blotName?(this.parent.replaceWith(w,T),this):(this.parent.unwrap(),a(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"replaceWith",this).call(this,w,T))}}],[{key:"formats",value:function(w){return w.tagName===this.tagName?void 0:a(x.__proto__||Object.getPrototypeOf(x),"formats",this).call(this,w)}}]),x}(c.default);b.blotName="list-item",b.tagName="LI";var _=function(m){y(x,m),s(x,null,[{key:"create",value:function(w){var T=w==="ordered"?"OL":"UL",N=a(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,T);return(w==="checked"||w==="unchecked")&&N.setAttribute("data-checked",w==="checked"),N}},{key:"formats",value:function(w){if(w.tagName==="OL")return"ordered";if(w.tagName==="UL")return w.hasAttribute("data-checked")?w.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function x(S){v(this,x);var w=g(this,(x.__proto__||Object.getPrototypeOf(x)).call(this,S)),T=function(A){if(A.target.parentNode===S){var E=w.statics.formats(S),O=l.default.find(A.target);E==="checked"?O.format("list","unchecked"):E==="unchecked"&&O.format("list","checked")}};return S.addEventListener("touchstart",T),S.addEventListener("mousedown",T),w}return s(x,[{key:"format",value:function(w,T){this.children.length>0&&this.children.tail.format(w,T)}},{key:"formats",value:function(){return p({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(w,T){if(w instanceof b)a(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"insertBefore",this).call(this,w,T);else{var N=T==null?this.length():T.offset(this),A=this.split(N);A.parent.insertBefore(w,A)}}},{key:"optimize",value:function(w){a(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"optimize",this).call(this,w);var T=this.next;T!=null&&T.prev===this&&T.statics.blotName===this.statics.blotName&&T.domNode.tagName===this.domNode.tagName&&T.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(T.moveChildren(this),T.remove())}},{key:"replace",value:function(w){if(w.statics.blotName!==this.statics.blotName){var T=l.default.create(this.statics.defaultChild);w.moveChildren(T),this.appendChild(T)}a(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"replace",this).call(this,w)}}]),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 h(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 f=function(u){c(d,u);function d(){return l(this,d),h(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}return d}(a.default);f.blotName="italic",f.tagName=["EM","I"],n.default=f},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function p(v,g){for(var y=0;y<g.length;y++){var b=g[y];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(v,b.key,b)}}return function(v,g,y){return g&&p(v.prototype,g),y&&p(v,y),v}}(),a=function p(v,g,y){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,y)}else{if("value"in b)return b.value;var m=b.get;return m===void 0?void 0:m.call(y)}},o=i(6),l=h(o);function h(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 f(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),f(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return s(v,null,[{key:"create",value:function(y){return y==="super"?document.createElement("sup"):y==="sub"?document.createElement("sub"):a(v.__proto__||Object.getPrototypeOf(v),"create",this).call(this,y)}},{key:"formats",value:function(y){if(y.tagName==="SUB")return"sub";if(y.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 h(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 f=function(u){c(d,u);function d(){return l(this,d),h(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}return d}(a.default);f.blotName="strike",f.tagName="S",n.default=f},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 h(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 f=function(u){c(d,u);function d(){return l(this,d),h(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}return d}(a.default);f.blotName="underline",f.tagName="U",n.default=f},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function g(y,b){for(var _=0;_<b.length;_++){var m=b[_];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(y,m.key,m)}}return function(y,b,_){return b&&g(y.prototype,b),_&&g(y,_),y}}(),a=function g(y,b,_){y===null&&(y=Function.prototype);var m=Object.getOwnPropertyDescriptor(y,b);if(m===void 0){var x=Object.getPrototypeOf(y);return x===null?void 0:g(x,b,_)}else{if("value"in m)return m.value;var S=m.get;return S===void 0?void 0:S.call(_)}},o=i(0),l=c(o),h=i(27);function c(g){return g&&g.__esModule?g:{default:g}}function f(g,y){if(!(g instanceof y))throw new TypeError("Cannot call a class as a function")}function u(g,y){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:g}function d(g,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);g.prototype=Object.create(y&&y.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(g,y):g.__proto__=y)}var p=["alt","height","width"],v=function(g){d(y,g);function y(){return f(this,y),u(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return s(y,[{key:"format",value:function(_,m){p.indexOf(_)>-1?m?this.domNode.setAttribute(_,m):this.domNode.removeAttribute(_):a(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"format",this).call(this,_,m)}}],[{key:"create",value:function(_){var m=a(y.__proto__||Object.getPrototypeOf(y),"create",this).call(this,_);return typeof _=="string"&&m.setAttribute("src",this.sanitize(_)),m}},{key:"formats",value:function(_){return p.reduce(function(m,x){return _.hasAttribute(x)&&(m[x]=_.getAttribute(x)),m},{})}},{key:"match",value:function(_){return/\.(jpe?g|gif|png)$/.test(_)||/^data:image\/.+;base64/.test(_)}},{key:"sanitize",value:function(_){return(0,h.sanitize)(_,["http","https","data"])?_:"//:0"}},{key:"value",value:function(_){return _.getAttribute("src")}}]),y}(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(y,b){for(var _=0;_<b.length;_++){var m=b[_];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(y,m.key,m)}}return function(y,b,_){return b&&g(y.prototype,b),_&&g(y,_),y}}(),a=function g(y,b,_){y===null&&(y=Function.prototype);var m=Object.getOwnPropertyDescriptor(y,b);if(m===void 0){var x=Object.getPrototypeOf(y);return x===null?void 0:g(x,b,_)}else{if("value"in m)return m.value;var S=m.get;return S===void 0?void 0:S.call(_)}},o=i(4),l=i(27),h=c(l);function c(g){return g&&g.__esModule?g:{default:g}}function f(g,y){if(!(g instanceof y))throw new TypeError("Cannot call a class as a function")}function u(g,y){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:g}function d(g,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);g.prototype=Object.create(y&&y.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(g,y):g.__proto__=y)}var p=["height","width"],v=function(g){d(y,g);function y(){return f(this,y),u(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return s(y,[{key:"format",value:function(_,m){p.indexOf(_)>-1?m?this.domNode.setAttribute(_,m):this.domNode.removeAttribute(_):a(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"format",this).call(this,_,m)}}],[{key:"create",value:function(_){var m=a(y.__proto__||Object.getPrototypeOf(y),"create",this).call(this,_);return m.setAttribute("frameborder","0"),m.setAttribute("allowfullscreen",!0),m.setAttribute("src",this.sanitize(_)),m}},{key:"formats",value:function(_){return p.reduce(function(m,x){return _.hasAttribute(x)&&(m[x]=_.getAttribute(x)),m},{})}},{key:"sanitize",value:function(_){return h.default.sanitize(_)}},{key:"value",value:function(_){return _.getAttribute("src")}}]),y}(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 _(m,x){for(var S=0;S<x.length;S++){var w=x[S];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(m,w.key,w)}}return function(m,x,S){return x&&_(m.prototype,x),S&&_(m,S),m}}(),a=function _(m,x,S){m===null&&(m=Function.prototype);var w=Object.getOwnPropertyDescriptor(m,x);if(w===void 0){var T=Object.getPrototypeOf(m);return T===null?void 0:_(T,x,S)}else{if("value"in w)return w.value;var N=w.get;return N===void 0?void 0:N.call(S)}},o=i(35),l=d(o),h=i(5),c=d(h),f=i(9),u=d(f);function d(_){return _&&_.__esModule?_:{default:_}}function p(_,m){if(!(_ instanceof m))throw new TypeError("Cannot call a class as a function")}function v(_,m){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:_}function g(_,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);_.prototype=Object.create(m&&m.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(_,m):_.__proto__=m)}var y=function(_){g(m,_);function m(){return p(this,m),v(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return s(m,null,[{key:"create",value:function(S){var w=a(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,S);return typeof S=="string"&&(window.katex.render(S,w,{throwOnError:!1,errorColor:"#f00"}),w.setAttribute("data-value",S)),w}},{key:"value",value:function(S){return S.getAttribute("data-value")}}]),m}(l.default);y.blotName="formula",y.className="ql-formula",y.tagName="SPAN";var b=function(_){g(m,_),s(m,null,[{key:"register",value:function(){c.default.register(y,!0)}}]);function m(){p(this,m);var x=v(this,(m.__proto__||Object.getPrototypeOf(m)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return x}return m}(u.default);n.FormulaBlot=y,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 S(w,T){for(var N=0;N<T.length;N++){var A=T[N];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(w,A.key,A)}}return function(w,T,N){return T&&S(w.prototype,T),N&&S(w,N),w}}(),a=function S(w,T,N){w===null&&(w=Function.prototype);var A=Object.getOwnPropertyDescriptor(w,T);if(A===void 0){var E=Object.getPrototypeOf(w);return E===null?void 0:S(E,T,N)}else{if("value"in A)return A.value;var O=A.get;return O===void 0?void 0:O.call(N)}},o=i(0),l=v(o),h=i(5),c=v(h),f=i(9),u=v(f),d=i(13),p=v(d);function v(S){return S&&S.__esModule?S:{default:S}}function g(S,w){if(!(S instanceof w))throw new TypeError("Cannot call a class as a function")}function y(S,w){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:S}function b(S,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);S.prototype=Object.create(w&&w.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(S,w):S.__proto__=w)}var _=function(S){b(w,S);function w(){return g(this,w),y(this,(w.__proto__||Object.getPrototypeOf(w)).apply(this,arguments))}return s(w,[{key:"replaceWith",value:function(N){this.domNode.textContent=this.domNode.textContent,this.attach(),a(w.prototype.__proto__||Object.getPrototypeOf(w.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)}}]),w}(p.default);_.className="ql-syntax";var m=new l.default.Attributor.Class("token","hljs",{scope:l.default.Scope.INLINE}),x=function(S){b(w,S),s(w,null,[{key:"register",value:function(){c.default.register(m,!0),c.default.register(_,!0)}}]);function w(T,N){g(this,w);var A=y(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,T,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 E=null;return A.quill.on(c.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(E),E=setTimeout(function(){A.highlight(),E=null},A.options.interval)}),A.highlight(),A}return s(w,[{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(E){E.highlight(N.options.highlight)}),this.quill.update(c.default.sources.SILENT),A!=null&&this.quill.setSelection(A,c.default.sources.SILENT)}}}]),w}(u.default);x.DEFAULTS={highlight:function(){return window.hljs==null?null:function(S){var w=window.hljs.highlightAuto(S);return w.value}}(),interval:1e3},n.CodeBlock=_,n.CodeToken=m,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 w(T,N,A){T===null&&(T=Function.prototype);var E=Object.getOwnPropertyDescriptor(T,N);if(E===void 0){var O=Object.getPrototypeOf(T);return O===null?void 0:w(O,N,A)}else{if("value"in E)return E.value;var R=E.get;return R===void 0?void 0:R.call(A)}},a=function(){function w(T,N){for(var A=0;A<N.length;A++){var E=N[A];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(T,E.key,E)}}return function(T,N,A){return N&&w(T.prototype,N),A&&w(T,A),T}}(),o=i(3),l=g(o),h=i(8),c=g(h),f=i(43),u=g(f),d=i(15),p=i(41),v=g(p);function g(w){return w&&w.__esModule?w:{default:w}}function y(w,T){if(!(w instanceof T))throw new TypeError("Cannot call a class as a function")}function b(w,T){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T&&(typeof T=="object"||typeof T=="function")?T:w}function _(w,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof T);w.prototype=Object.create(T&&T.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(w,T):w.__proto__=T)}var m=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],x=function(w){_(T,w);function T(N,A){y(this,T),A.modules.toolbar!=null&&A.modules.toolbar.container==null&&(A.modules.toolbar.container=m);var E=b(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,N,A));return E.quill.container.classList.add("ql-bubble"),E}return a(T,[{key:"extendToolbar",value:function(A){this.tooltip=new S(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)}}]),T}(u.default);x.DEFAULTS=(0,l.default)(!0,{},u.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(T){T?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var S=function(w){_(T,w);function T(N,A){y(this,T);var E=b(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,N,A));return E.quill.on(c.default.events.EDITOR_CHANGE,function(O,R,C,F){if(O===c.default.events.SELECTION_CHANGE)if(R!=null&&R.length>0&&F===c.default.sources.USER){E.show(),E.root.style.left="0px",E.root.style.width="",E.root.style.width=E.root.offsetWidth+"px";var U=E.quill.getLines(R.index,R.length);if(U.length===1)E.position(E.quill.getBounds(R));else{var D=U[U.length-1],z=E.quill.getIndex(D),j=Math.min(D.length()-1,R.index+R.length-z),k=E.quill.getBounds(new d.Range(z,j));E.position(k)}}else document.activeElement!==E.textbox&&E.quill.hasFocus()&&E.hide()}),E}return a(T,[{key:"listen",value:function(){var A=this;s(T.prototype.__proto__||Object.getPrototypeOf(T.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 E=A.quill.getSelection();E!=null&&A.position(A.quill.getBounds(E))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(A){var E=s(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"position",this).call(this,A),O=this.root.querySelector(".ql-tooltip-arrow");if(O.style.marginLeft="",E===0)return E;O.style.marginLeft=-1*E-O.offsetWidth/2+"px"}}]),T}(f.BaseTooltip);S.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=S,n.default=x},function(r,n,i){r.exports=i(63)}]).default})})(Mh);var kT=Mh.exports;const PT=or(kT),zT="",MT=e=>{const[t,r]=J.useState(!1);console.log("allProps",e);const n=J.useRef(null),i=J.useRef(null),s=J.useRef(null),a=J.useRef(null),o=J.useRef(16),l=J.useRef(null),{uniqueId:h,text:c,locked:f,transformation:u,onTextUpdate:d,pointerdown:p,pointerup:v,mousedown:g,mouseup:y,pointerover:b,mouseover:_,mouseout:m}=e,{scale:x=[1,1],x:S,y:w,rotation:T=1,fontFamily:N="Arial",fontWeight:A="normal",fontStyle:E="normal",fontSize:O=16,fill:R="black",stroke:C,strokeThickness:F,blurRadius:U=0,blurEnabled:D=!1,dropShadowColor:z=null,wordWrapWidth:j=5e7,leading:k=0,letterSpacing:I}=u;lt.useEffect(()=>{o.current=Number(O)},[O]);const P=["italic","oblique"].includes(E)?E:void 0,L=["bold","lighter","100","200","300"].includes(A)?A:void 0,G=Number(I)>0?I:void 0,$=lt.useMemo(()=>new ne.TextStyle({fontFamily:N,fontSize:O,fill:R||"white",stroke:C,strokeThickness:F,...P&&{fontStyle:P},...L&&{fontWeight:L},...G&&{letterSpacing:G},...D&&{dropShadow:!0,dropShadowBlur:Number(U),dropShadowColor:(z==null?void 0:z.toString())||"black",dropShadowDistance:0},wordWrap:!0,breakWords:!0,wordWrapWidth:j||500,leading:k||0}),[D,U,R,N,O,k,P,L,G,z,C,F,j]);lt.useEffect(()=>{l.current={...u}},[u]);const M=B=>{d&&d({text:B,uniqueId:h,droptype:"titles"})};return lt.useEffect(()=>{if(t&&s.current){let q=document.getElementById("note-editor");if(q){q.style.position="absolute",q.style.zIndex="10",q.style.left=S+"px",q.style.top=w+"px",q.style.backgroundColor="var(--chakra-color-darkShark)",q.style.transform="scale(1.5)",q.style.width="300px",q.style.height="100px",q.style.color="#fff",q.style.fontSize="20px",q.style.border="1px solid #CBCEE0";const H={esc:{key:27,handler:function(){r(!1)}},enter:{key:13,handler:function(){r(!1)}}};var B=new PT("#note-editor",{modules:{toolbar:!1,keyboard:{bindings:{...H}}},placeholder:"Compose your text here...",theme:"snow"});B.on("text-change",function(){M(B.root.innerText)}),B.setText(c),B.focus(),B.off("text-change",()=>{console.log("removed")}),B.hasFocus()||(q.style.display="none")}}},[S,w,t]),ft.jsx(Ea,{...e,children:ft.jsxs(yt.Container,{ref:n,children:[t&&ft.jsx(yt.Container,{ref:s}),ft.jsx(yt.Container,{alpha:t?0:1,ref:a,children:ft.jsx(yt.Text,{style:$,x:S,y:w,rotation:T,anchor:.5,text:c,...!t&&!f&&{interactive:!0,buttonMode:!0,pointerdown:p,pointerout:m,pointerover:b,pointerup:v,mousedown:g,mouseup:y,mouseover:_},ref:i,scale:x})})]})})},LT=yt.withFilters(yt.Container,{blur:ne.filters.BlurFilter,adjust:Zs,matrix:ne.filters.ColorMatrixFilter}),FT=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],BT={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1},DT=e=>{const[t,r]=lt.useState(!1),[,n]=J.useState(!1),[,i]=lt.useState({isWaiting:!1,isStalled:!1}),[s,a]=lt.useState(),[o,l]=J.useState(!1),h=J.useRef(null),c=J.useRef(null),f=J.useRef(null),u=J.useRef(null),d=J.useRef(null),p=J.useRef(null),v=J.useRef(BT),{tl:g,playerTimeRef:y,isDragging:b}=J.useContext(Mr),{uniqueId:_,mute:m=!1,locked:x=!1,src:S,startAt:w,endAt:T,frameStartAt:N,frameEndAt:A,initialAlpha:E,transformation:{x:O,y:R,width:C,height:F,scale:U,rotation:D,animation:z,colorCorrection:j,effect:k},pointerdown:I,pointerup:P,mousedown:L,mouseup:G,pointerover:$,mouseover:M,mouseout:B,applyTransformer:q,onAnchorTransformationEnd:H}=e,X=S||"",{contrast:K=1,saturation:et=1,exposure:it=1,blurRadius:ot=0,alpha:ht=1}=j||{},Ct={brightness:it,contrast:K,saturation:et,alpha:ht},It=lt.useCallback(()=>{l(!0)},[]),V=lt.useCallback(Z=>{console.log("changeEnd",Z),H&&(console.log("running onAnchorTransformationEnd"),H(Z))},[]),W=lt.useMemo(()=>{const Z=document.createElement("video");return Z.src=S,Z.crossOrigin="Anonymus",Z.autoplay=!1,Z.currentTime=1e-4,Z},[S]);un(je.PAUSE,Z=>{if(console.log("pause event",Z),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}}),lt.useEffect(()=>{console.log("current",p.current,b),p.current&&(b?(p.current.pause(),v.current.isPlaying=!1,v.current.isDragging=!0):v.current.isDragging=!1)},[b]);const Q=Z=>{p.current&&(console.log("video gsapOnStart",y.current,b),y.current>=Z&&y.current<=T&&!b&&(p.current.currentTime=Number(N)||Number(Z),p.current.play(),v.current.isPlaying=!0))},tt=()=>{if(console.log("onComplete triggered"),p.current){const Z=p.current;Z.currentTime>0&&!Z.paused&&!Z.ended&&Z.readyState>Z.HAVE_CURRENT_DATA&&p.current.pause(),v.current.isPlaying=!1}},Y=()=>{},ct=()=>{if(p.current){Math.abs(p.current.currentTime-y.current);const Z=p.current,at=Z.currentTime>0&&!Z.paused&&!Z.ended&&Z.readyState>Z.HAVE_CURRENT_DATA;v.current.isDragging?(console.log("video updating",y.current),p.current.currentTime=y.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)}};return J.useEffect(()=>{let Z=ye.context(()=>{});if(c.current&&g.current){const at={duration:Number(T)-Number(w),onStart:Q,onComplete:tt,onStartParams:[w],onCompleteParams:[],onInterrupt:Y,onUpdate:ct,onUpdateParams:[]},St=ha(z||"None");Z=ye.context(()=>{var Ht,_t;ee(St.from)?ee(St.to)?ee(St.fromTo)?g.current.to(c.current,{alpha:1,duration:.01},w).from(u.current,{...at},w).to(c.current,{alpha:0,duration:.1},Number(T)-.1):g.current.fromTo(c.current,(Ht=St.fromTo)==null?void 0:Ht.from,(_t=St.fromTo)==null?void 0:_t.to,w).from(u.current,{...at},w).to(c.current,{alpha:0,duration:.2},T-.2):g.current.to(c.current,{alpha:1,duration:.2,...St.to},w).from(u.current,{...at},w).to(c.current,{alpha:0,duration:.2},T-.2):g.current.from(c.current,{...St.from},w).to(u.current,{alpha:1,duration:.2},w).from(u.current,{...at},w).to(c.current,{alpha:0,duration:.2},T-.2)})}return()=>Z.revert()},[z,w,T]),lt.useEffect(()=>{c.current&&r(!0)},[]),lt.useEffect(()=>{p.current&&(p.current.muted=m)},[m]),lt.useEffect(()=>{if(p.current){const Z=p.current;Z.currentTime>0&&!Z.paused&&!Z.ended&&Z.readyState>Z.HAVE_CURRENT_DATA&&(o||b)&&(p.current.pause(),v.current.isPlaying=!1)}},[o,b]),lt.useEffect(()=>{const Z=Math.round((Number(N)+Number.EPSILON)*100)/100,at=function(){p.current&&(p.current.currentTime=Z)},St=function(){if(p.current){const zt=p.current;zt.currentTime>0&&!zt.paused&&!zt.ended&&zt.readyState>zt.HAVE_CURRENT_DATA&&p.current.pause()}i({isWaiting:!1,isStalled:!1})},Ht=function(){p.current&&p.current.pause(),i({isWaiting:!0,isStalled:!1})},_t=function(){i({isWaiting:!1,isStalled:!1})},Et=function(){i({isWaiting:!1,isStalled:!0})},Tt=Math.round((Number(N)+Number.EPSILON)*100)/100,Bt=Math.round((Number(A)+Number.EPSILON)*100)/100,pe=`${X}#t=${Tt},${Bt}`;return console.log("urlTimestap",pe),ne.Texture.fromLoader(W,pe,_,{pixiIdPrefix:_,resourceOptions:{autoPlay:!1,crossorigin:"Anonymus",updateFPS:30}}).then(zt=>{zt&&(a(zt),console.log(zt.baseTexture.resource.source),p.current=zt.baseTexture.resource.source,p.current.id=_,p.current.addEventListener("loadedmetadata",at),p.current.addEventListener("ended",St),p.current.addEventListener("loadstart",Ht),p.current.addEventListener("canplaythrough",_t),p.current.addEventListener("stalled",Et))}),()=>{p.current.removeEventListener("loadedmetadata",at),p.current.removeEventListener("ended",St),p.current.removeEventListener("loadstart",Ht),p.current.removeEventListener("canplaythrough",_t),p.current.removeEventListener("stalled",Et)}},[X,_,N,A,W]),ft.jsxs(yt.Container,{ref:f,children:[ft.jsx(yt.Container,{ref:c,alpha:E,position:[O,R],pivot:[O,R],width:C,height:F,children:ft.jsx(LT,{scale:1,blur:{blur:ot,quality:4},adjust:Ct,apply:({matrix:Z})=>{k==="BlackAndWhite"?Z.desaturate():k==="Sepia"?Z.sepia():k==="RetroVintage"||k==="NightVision"?Z.negative():k==="Normal"&&Z.reset()},matrix:{enabled:!0,matrix:FT},children:ft.jsx(yt.Container,{ref:u,children:s&&ft.jsx(yt.Sprite,{texture:s,width:C,height:F,anchor:.5,x:O,y:R,...!x&&!o&&{interactive:!0,buttonMode:!0,pointerdown:I,pointerover:$,pointerout:B,mousedown:L,mouseover:M,mouseout:B,mouseup:G,pointerup:P},ref:h,scale:U,rotation:D})})})}),q&&t&&ft.jsx(la,{pixiTransformerRef:d,imageRef:c,transformCommit:V,transformChange:It,mouseoverEvent:n,uniqueId:_})]})};var Lh=(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))(Lh||{}),Fh=(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))(Fh||{});Lt.Animations=Lh,Lt.BlendModes=Fh,Lt.Events=je,Lt.GsapPixieContext=Mr,Lt.GsapPixieContextProvider=Gy,Lt.PixiAnimatedSprite=Ph,Lt.PixiAudioSprite=q0,Lt.PixiGifSprite=CT,Lt.PixiImageSprite=Dg,Lt.PixiSvgPathSprite=$0,Lt.PixiTextSprite=MT,Lt.PixiVideoSprite=DT,Object.defineProperty(Lt,Symbol.toStringTag,{value:"Module"})});