@atlas-viewer/atlas 3.0.3 → 3.0.4
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.cjs +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/events.ts","../src/world-objects/paint.ts","../src/world-objects/abstract-object.ts","../src/aom.ts","../src/world-objects/render-pipeline.ts","../src/world-objects/abstract-world-object.ts","../src/world-objects/image.ts","../src/world-objects/zone.ts","../src/spacial-content/abstract-content.ts","../src/spacial-content/composite-resource.ts","../src/objects/base-object.ts","../src/world-objects/world-object.ts","../src/world.ts","../src/renderer/renderer.ts","../src/utility/easing-functions.ts","../src/modules/transition-manager/transition-manager.ts","../src/renderer/runtime.ts","../src/types.ts","../src/spacial-content/image-texture.ts","../src/spacial-content/spacial-content.ts","../src/spacial-content/single-image.ts","../src/spacial-content/tiled-image.ts","../src/objects/box.ts","../src/objects/text.ts","../src/objects/geometry.ts","../src/modules/composite-renderer/composite-renderer.ts","../src/modules/grid-builder/grid-builder.ts","../src/modules/popmotion-controller/popmotion-controller.ts","../src/modules/iiif/shared.ts","../src/modules/browser-event-manager/browser-event-manager.ts","../src/modules/canvas-renderer/canvas-renderer.ts","../src/modules/debug-renderer/debug-renderer.ts","../src/modules/react-reconciler/presets/_types.ts","../src/modules/react-reconciler/presets/default-preset.ts","../src/modules/react-reconciler/presets/static-preset.ts","../src/modules/react-reconciler/presets/index.ts","../src/modules/react-reconciler/Atlas.tsx","../src/modules/react-reconciler/reconciler.ts","../src/modules/react-reconciler/components/AtlasAuto.tsx","../src/modules/react-reconciler/components/AtlasContext.tsx","../src/modules/react-reconciler/components/BoxDraw.tsx","../src/modules/react-reconciler/components/HTMLPortal.tsx","../src/modules/react-reconciler/components/RegionHighlight.tsx","../src/modules/react-reconciler/components/ResizeWorldItem.tsx","../src/modules/react-reconciler/components/TileSet.tsx","../src/modules/react-reconciler/components/ImageService.tsx","../src/modules/react-reconciler/hooks/use-after-frame.ts","../src/modules/react-reconciler/hooks/use-after-paint.ts","../src/modules/react-reconciler/hooks/use-atlas.ts","../src/modules/react-reconciler/hooks/use-atlas-image.tsx","../src/modules/react-reconciler/hooks/use-before-frame.ts","../src/modules/react-reconciler/hooks/use-canvas.ts","../src/modules/react-reconciler/hooks/use-controlled-annotation-list.ts","../src/modules/react-reconciler/hooks/use-frame.ts","../src/modules/react-reconciler/hooks/use-mode.tsx","../src/modules/react-reconciler/hooks/use-resize-world-item.ts","../src/modules/react-reconciler/hooks/use-runtime.ts","../src/modules/react-reconciler/hooks/use-world-event.ts","../src/modules/react-reconciler/utility/can-drag.ts","../src/clean-objects/traits/evented.ts","../src/modules/react-reconciler/types.ts","../src/modules/iiif/get-tiles.ts","../src/utility/stylesheet.ts","../src/modules/overlay-renderer/overlay-renderer.ts","../src/modules/static-renderer/static-renderer.ts","../src/modules/webgl-renderer/webgl-renderer.ts","../src/utility/merge-styles.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;cAAa;iBAiCG,qBAAA,CAAA,GAAyB;cAO5B;;;;;;;;;EAxCA,QAAA,EAAA,qBA+BH;EAEM,SAAA,EAAA,qBAAqB;EAOxB,UAAA,EAAA,qBAImD;;;;;;;;;;;;;;;;;;;;KAEpD,eAAA;;;;;;;;;;;EAAA,YAAA,CAAA,CAAA,EAAA,GAAe,CAAA,EAAA,IAAA;EAgCf,aAAA,CAAA,CAAA,EAAA,GAAA,CAAA,EAAmB,IAAA;EA+BnB,aAAA,CAAA,CAAA,EAAA,GAAiB,CAAA,EAAA,IAAA;EACZ,WAAA,CAAA,CAAA,EAAA,GAAA,CAAA,EAAA,IAAA;EAAwB,eAAA,CAAA,CAAA,EAAA,GAAA,CAAA,EAAA,IAAA;EAA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AAA,EgEiVsC,WhEjVtC,CAAA,EgEiViD,YhEjVjD;EAAW,yBAAA,CAAA,CAAA,EAAA,OAAA;EAAQ,iBAAA,CAAA,IAAA,CAAA,EgEuXb,YhEvXa,CAAA,EgEuXD,WhEvXC;EAAM,YAAA,CAAA,CAAA,EAAA,MAAA,EAAA,CAAA,EAAA,MAAA,EAAA,KAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,CAAA,EAAA,IAAA;qEgEwYoB,aAAA;+BASvC;;E/DpZV,KAAA,CAAA,CAAA,EAAA,IAAA;;;;iBgEAD,WAAA,gBAA2B,kBAAkB,WAAW"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/events.ts","../src/world-objects/paint.ts","../src/world-objects/abstract-object.ts","../src/aom.ts","../src/world-objects/render-pipeline.ts","../src/world-objects/abstract-world-object.ts","../src/world-objects/image.ts","../src/world-objects/zone.ts","../src/spacial-content/abstract-content.ts","../src/spacial-content/composite-resource.ts","../src/objects/base-object.ts","../src/world-objects/world-object.ts","../src/world.ts","../src/renderer/renderer.ts","../src/utility/easing-functions.ts","../src/modules/transition-manager/transition-manager.ts","../src/renderer/runtime.ts","../src/types.ts","../src/spacial-content/image-texture.ts","../src/spacial-content/spacial-content.ts","../src/spacial-content/single-image.ts","../src/spacial-content/tiled-image.ts","../src/objects/box.ts","../src/objects/text.ts","../src/objects/geometry.ts","../src/modules/composite-renderer/composite-renderer.ts","../src/modules/grid-builder/grid-builder.ts","../src/modules/popmotion-controller/popmotion-controller.ts","../src/modules/iiif/shared.ts","../src/modules/browser-event-manager/browser-event-manager.ts","../src/modules/canvas-renderer/canvas-renderer.ts","../src/modules/debug-renderer/debug-renderer.ts","../src/modules/react-reconciler/presets/_types.ts","../src/modules/react-reconciler/presets/default-preset.ts","../src/modules/react-reconciler/presets/static-preset.ts","../src/modules/react-reconciler/presets/index.ts","../src/modules/react-reconciler/Atlas.tsx","../src/modules/react-reconciler/reconciler.ts","../src/modules/react-reconciler/components/AtlasAuto.tsx","../src/modules/react-reconciler/components/AtlasContext.tsx","../src/modules/react-reconciler/components/BoxDraw.tsx","../src/modules/react-reconciler/components/HTMLPortal.tsx","../src/modules/react-reconciler/components/RegionHighlight.tsx","../src/modules/react-reconciler/components/ResizeWorldItem.tsx","../src/modules/react-reconciler/components/TileSet.tsx","../src/modules/react-reconciler/components/ImageService.tsx","../src/modules/react-reconciler/hooks/use-after-frame.ts","../src/modules/react-reconciler/hooks/use-after-paint.ts","../src/modules/react-reconciler/hooks/use-atlas.ts","../src/modules/react-reconciler/hooks/use-atlas-image.tsx","../src/modules/react-reconciler/hooks/use-before-frame.ts","../src/modules/react-reconciler/hooks/use-canvas.ts","../src/modules/react-reconciler/hooks/use-controlled-annotation-list.ts","../src/modules/react-reconciler/hooks/use-frame.ts","../src/modules/react-reconciler/hooks/use-mode.tsx","../src/modules/react-reconciler/hooks/use-resize-world-item.ts","../src/modules/react-reconciler/hooks/use-runtime.ts","../src/modules/react-reconciler/hooks/use-world-event.ts","../src/modules/react-reconciler/utility/can-drag.ts","../src/clean-objects/traits/evented.ts","../src/modules/react-reconciler/types.ts","../src/modules/iiif/get-tiles.ts","../src/utility/stylesheet.ts","../src/modules/overlay-renderer/overlay-renderer.ts","../src/modules/static-renderer/static-renderer.ts","../src/modules/webgl-renderer/webgl-renderer.ts","../src/utility/merge-styles.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;cAAa;iBAiCG,qBAAA,CAAA,GAAyB;cAO5B;;;;;;;;;EAxCA,QAAA,EAAA,qBA+BH;EAEM,SAAA,EAAA,qBAAqB;EAOxB,UAAA,EAAA,qBAImD;;;;;;;;;;;;;;;;;;;;KAEpD,eAAA;;;;;;;;;;;EAAA,YAAA,CAAA,CAAA,EAAA,GAAe,CAAA,EAAA,IAAA;EAgCf,aAAA,CAAA,CAAA,EAAA,GAAA,CAAA,EAAmB,IAAA;EA+BnB,aAAA,CAAA,CAAA,EAAA,GAAiB,CAAA,EAAA,IAAA;EAC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,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,CAAA,EgE6T0B,WhE7T1B;EAAI,aAAA,CAAA,YAAA,EgEiVS,WhEjVT,EAAA,cAAA,EgEiVsC,WhEjVtC,CAAA,EgEiViD,YhEjVjD;EAAW,yBAAA,CAAA,CAAA,EAAA,OAAA;EAAQ,iBAAA,CAAA,IAAA,CAAA,EgEuXb,YhEvXa,CAAA,EgEuXD,WhEvXC;EAAM,YAAA,CAAA,CAAA,EAAA,MAAA,EAAA,CAAA,EAAA,MAAA,EAAA,KAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,CAAA,EAAA,IAAA;qEgEwYoB,aAAA;+BASvC;;E/DpZV,KAAA,CAAA,CAAA,EAAA,IAAA;;;;iBgEAD,WAAA,gBAA2B,kBAAkB,WAAW"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{DnaFactory as e,compose as t,dna as n,dnaLength as r,getIntersection as i,hidePointsOutsideRegion as a,mutate as o,scale as s,scaleAtOrigin as c,transform as l,translate as u}from"@atlas-viewer/dna";import*as d from"react";import f,{memo as p,useCallback as m,useContext as h,useEffect as g,useLayoutEffect as _,useMemo as v,useRef as y,useState as b,version as x}from"react";import{Fragment as S,jsx as C,jsxs as w}from"react/jsx-runtime";import T from"react-use-measure";import E from"react-reconciler";import{ImageServiceLoader as D}from"@atlas-viewer/iiif-image-api";import{createThumbnailHelper as ee}from"@iiif/helpers/thumbnail";var O=Object.create,k=Object.defineProperty,A=Object.getOwnPropertyDescriptor,te=Object.getOwnPropertyNames,ne=Object.getPrototypeOf,re=Object.prototype.hasOwnProperty,j=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ie=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=te(t),a=0,o=i.length,s;a<o;a++)s=i[a],!re.call(e,s)&&s!==n&&k(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=A(t,s))||r.enumerable});return e},ae=(e,t,n)=>(n=e==null?{}:O(ne(e)),ie(t||!e||!e.__esModule?k(n,`default`,{value:e,enumerable:!0}):n,e));const oe=`onMouseDown.onMouseEnter.onMouseLeave.onMouseMove.onMouseOut.onMouseOver.onMouseUp.onTouchCancel.onTouchEnd.onTouchMove.onTouchStart.onPointerDown.onPointerMove.onPointerUp.onPointerCancel.onPointerEnter.onPointerLeave.onPointerOver.onPointerOut.onScroll.onWheel.onClick.onDragStart.onDragEnd.onDragEnter.onDragExit.onDrag.onDragOver.onContextMenu`.split(`.`);function M(){return oe.reduce((e,t)=>(e[t]=[],e),{})}const N=oe.reduce((e,t)=>(e[t.slice(2).toLowerCase()]=t,e[t]=t,e),{});let P=(e=21)=>{let t=``,n=crypto.getRandomValues(new Uint8Array(e));for(;e--;)t+=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`[n[e]&63];return t};function F(e){"@babel/helpers - typeof";return F=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},F(e)}function se(e,t){if(F(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(F(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function I(e){var t=se(e,`string`);return F(t)==`symbol`?t:t+``}function L(e,t,n){return(t=I(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var R=class{get crop(){return this._crop}set crop(e){this._crop=e}getObjectsAt(e){return[]}getAllPointsAt(e,t,n){return[]}getScheduledUpdates(e,t){return[]}constructor(){L(this,`__id`,void 0),L(this,`__revision`,0),L(this,`__host`,void 0),L(this,`__onCreate`,void 0),L(this,`__parent`,void 0),L(this,`__owner`,{value:void 0}),L(this,`__state`,{}),L(this,`eventHandlers`,void 0),L(this,`scale`,1),L(this,`layers`,[]),L(this,`time`,[]),L(this,`_crop`,void 0),L(this,`cropData`,void 0),L(this,`id`,void 0),L(this,`addEventListener`,(e,t,n)=>{let r=N[e];if(!this.eventHandlers[r])throw Error(`Unknown event ${r}`);this.eventHandlers[r].indexOf(t)===-1&&this.eventHandlers[r].push(t)}),L(this,`removeEventListener`,(e,t)=>{let n=N[e];if(!this.eventHandlers[n]){console.warn(`Unknown event ${n}`);return}this.eventHandlers[n].indexOf(t)!==-1&&(this.eventHandlers[n]=this.eventHandlers[n].filter(e=>e!==t))}),this.id=this.__id=P(),this.eventHandlers=M()}dispatchEvent(e,t){let n=this.eventHandlers[e],r=n?n.length:0,i=!1;if(r)for(let a=0;a<r;a++)try{n[a](t),i=!0}catch(t){console.error(e,t)}return i}get x(){return this.points[1]}get y(){return this.points[2]}get width(){return this.points[3]-this.points[1]}get height(){return this.points[4]-this.points[2]}translate(e,t){o(this.points,u(e,t))}atScale(e){o(this.points,c(e,this.x,this.y)),this.scale*=e}transform(e){o(this.points,e)}applyProps(e){this.__revision++}appendChild(e){}removeChild(e){}insertBefore(e,t){}hideInstance(){}},z=class t extends R{constructor(t){if(super(),L(this,`type`,`spacial-content`),L(this,`id`,void 0),L(this,`uri`,void 0),L(this,`display`,void 0),L(this,`points`,void 0),L(this,`priority`,void 0),L(this,`style`,{opacity:1}),!t)this.id=``,this.uri=``,this.display={x:0,y:0,scale:1,width:0,height:0,points:n(5)},this.points=n(5);else{let n=t.scale||1;this.id=t.id||t.uri,this.uri=t.uri,this.points=e.singleBox(t.width,t.height,t.x,t.y),this.display={x:0,y:0,scale:n,width:t.width/n,height:t.height/n,points:e.singleBox(t.width/n,t.height/n),rotation:t?.rotation}}}applyProps(t){let r=t.display?t.display.width:t.target.width,i=t.target.width/r;if(this.id=t.id||t.uri,this.uri=t.uri,this.points.set(e.singleBox(t.target.width,t.target.height,t.target.x,t.target.y)),t.style&&t.style.opacity!==void 0&&(this.style.opacity=t.style.opacity),t.crop){this.cropData=t.crop;let r=e.singleBox(t.crop.width,t.crop.height,t.crop.x,t.crop.y);o(r,u(-t.crop.x,-t.crop.y)),this.crop?this.crop.set(r):this.crop=n(r)}t.display?(this.display.scale=i,this.display.width=t.display.width,this.display.height=t.display.height,this.display.rotation=t.display.rotation,this.display.points=e.singleBox(t.display.width,t.display.height)):(this.display.scale=i,this.display.width=t.target.width/i,this.display.height=t.target.height/i,this.display.points=e.singleBox(t.target.width/i,t.target.height/i))}getAllPointsAt(e,t,n){return[[this,this.crop||this.points,t]]}static fromSvg(e,n,r,i){return t.fromImage(`data:image/svg+xml;base64,`+btoa(e),n,r,i)}static fromImage(e,n,r,i){let a=new t;return a.applyProps({uri:e,id:i,display:r,target:n}),a}getImageUrl(){return this.uri}},B=class extends R{constructor(t){if(super(),L(this,`type`,`spacial-content`),L(this,`id`,void 0),L(this,`uri`,void 0),L(this,`display`,void 0),L(this,`points`,void 0),L(this,`getTexture`,void 0),this.getTexture=()=>({source:void 0,hash:-1}),!t)this.id=``,this.uri=``,this.display={x:0,y:0,scale:1,width:0,height:0,points:n(5)},this.points=n(5);else{let n=t.scale||1;this.id=t.id||t.uri,this.uri=t.uri,this.points=e.singleBox(t.width,t.height),this.display={x:0,y:0,scale:n,width:t.width/n,height:t.height/n,points:n===1?this.points:e.singleBox(t.width/n,t.height/n)}}}applyProps(t){let n=t.display?t.display.width:t.target.width,r=t.target.width/n;this.id=t.id,this.points.set(e.singleBox(t.target.width,t.target.height)),this.display.scale=r,this.display.width=t.target.width/r,this.display.height=t.target.height/r,this.getTexture=t.getTexture,this.display.points=r===1?this.points:e.singleBox(t.target.width/r,t.target.height/r)}getAllPointsAt(e,t,n){return[[this,this.points,t]]}};function ce(e,t,n=1){let r=t.length;if(r===0)throw Error(`No resources passed in.`);let i=0,a=1/0;for(let o=0;o<r&&!(!t[o]||!t[o].display);o++){let r=le(t[o].display.scale,e/(n||1));r<a&&(a=r,i=o)}return i}function le(e,t){return Math.abs(e-t)}function V(e,t){let n=le(e.x,t.x),r=le(e.y,t.y);return Math.sqrt(n**2+r**2)}function ue(e){let t=e.length;return e.indexOf(`/info.json`)===t-10?e.slice(0,-10):e}function de(e,t,n){return Math.min(Math.max(e,t),n)}var H=class t extends R{constructor(e){super(),L(this,`id`,void 0),L(this,`type`,`spacial-content`),L(this,`display`,void 0),L(this,`tileWidth`,void 0),L(this,`style`,{opacity:1}),L(this,`points`,void 0),L(this,`service`,void 0),L(this,`format`,`jpg`),L(this,`crop2`,void 0),L(this,`version3`,void 0),L(this,`tileUrl`,void 0),this.tileUrl=ue(e.url),this.id=e.id||`${this.tileUrl}--${e.scaleFactor}`,this.points=e.displayPoints?e.displayPoints:l(e.points,s(e.scaleFactor)),this.tileWidth=e.tileWidth,this.version3=e.version3,this.display={x:0,y:0,width:e.width/e.scaleFactor,height:e.height/e.scaleFactor,points:e.points,scale:e.scaleFactor},e.format&&(this.format=e.format)}applyProps(e){if(e.style&&e.style.opacity!==void 0&&(this.style.opacity=e.style.opacity),e.service!==this.service&&(this.service=e.service),e.format?this.format=e.format:this.format=`jpg`,e.version3!==void 0&&(this.version3=e.version3),e.crop){this.cropData=e.crop;let t=n([...this.points]),r=t.length/5,i=e.crop.x||0,a=e.crop.y||0,s=e.crop.x+e.crop.width,c=e.crop.y+e.crop.height;for(let e=0;e<r;e++){let n=e*5;t[n+1]<s&&t[n+3]>i&&t[n+2]<c&&t[n+4]>a?(t[n+1]=de(t[n+1],i,s),t[n+3]=de(t[n+3],i,s),t[n+2]=de(t[n+2],a,c),t[n+4]=de(t[n+4],a,c)):t[n]=0}o(t,u(-e.crop.x,-e.crop.y)),this.crop?this.crop.set(t):this.crop=t}}static fromTile(n,r,i,a,o,s,c,l){i.height=i.height?i.height:i.width;let u=c?Math.floor(r.width/a):Math.ceil(r.width/a),d=c?Math.floor(r.height/a):Math.ceil(r.height/a),f=Math.ceil(u/i.width),p=Math.ceil(d/i.height),m=e.grid(f,p),h=e.grid(f,p),g=o&&o[`@context`]?Array.isArray(o[`@context`])?o[`@context`]:[o[`@context`]]:[],_=l===void 0?g.indexOf(`http://iiif.io/api/image/3/context.json`)!==-1:l;for(let e=0;e<p;e++)for(let t=0;t<f;t++){let n=t*i.width,o=e*i.height;h.addPoints(n*a,o*a,t===f-1?r.width:(n+i.width)*a,e===p-1?r.height:(o+i.height)*a),m.addPoints(n,o,t===f-1?u:n+i.width,e===p-1?d:o+i.height)}let v=new t({url:n,scaleFactor:a,points:m.build(),displayPoints:h.build(),width:r.width,height:r.height,tileWidth:i.width,format:s,version3:_});return v.applyProps({service:o}),v}getImageUrl(e){let t=this.points.slice(e*5,e*5+5),n=t[3]-t[1],r=t[4]-t[2],i=Math.ceil(n/this.display.scale),a=Math.ceil(r/this.display.scale),o=`${i>this.tileWidth?this.tileWidth:i},`;return this.version3&&(o+=`${a>this.tileWidth?this.tileWidth:a}`),`${this.tileUrl}/${t[1]},${t[2]},${n},${r}/${o}/0/default.${this.format||`jpg`}`}getAllPointsAt(e,t,n){let r=a(this.crop||this.points,e);return[[this,r,t]]}transform(e){o(this.points,e)}getScheduledUpdates(e,t){return[]}},fe=class extends R{constructor(...e){super(...e),L(this,`type`,`spacial-content`)}getAllPointsAt(e,t,n){return[[this,this.points,t]]}},pe=class extends fe{constructor(t){super(),L(this,`id`,void 0),L(this,`display`,void 0),L(this,`points`,void 0),L(this,`images`,[]),L(this,`allImages`,[]),L(this,`scaleFactors`,[]),L(this,`aggregateBuffer`,n(9)),L(this,`lazyLoader`,void 0),L(this,`isFullyLoaded`,!1),L(this,`maxScaleFactor`,0),L(this,`renderOptions`,void 0),L(this,`_scheduleSortByScales`,!1),L(this,`_sortByScales`,()=>{this._scheduleSortByScales=!1,this.allImages.sort((e,t)=>t.display.width-e.display.width),this.images=[];let e=.1;for(let t of this.allImages)if(!(t.display.width<this.renderOptions.minSize&&t.display.height<this.renderOptions.minSize&&!t.priority)&&!(t instanceof z&&(t.display.width>this.renderOptions.maxImageSize||t.display.height>this.renderOptions.maxImageSize)&&!t.priority)){if(Math.abs(t.display.scale-e)<.25||t.priority){let e=this.images.pop();e&&(e instanceof z||e.priority)?(t.priority&&this.images.push(t),this.images.push(e)):t&&this.images.push(t)}else t&&this.images.push(t);e=t.display.scale}this.images.length===0&&(this.images=[...this.allImages]),this.scaleFactors=this.images.map(e=>e.display.scale),this.maxScaleFactor=Math.max(...this.scaleFactors)}),L(this,`loadFullResource`,async()=>{if(!this.isFullyLoaded&&this.lazyLoader){this.isFullyLoaded=!0;let e=await this.lazyLoader();this.addImages(e)}}),L(this,`fallback`,[this.loadFullResource]),this.id=t.id,this.points=e.singleBox(t.width,t.height),this.lazyLoader=t.loadFullImages,t.loadFullImages||(this.isFullyLoaded=!0),this.display={x:0,y:0,points:e.singleBox(t.width,t.height),height:t.height,width:t.width,scale:1},this.renderOptions={renderSmallestFallback:!0,renderLayers:3,minSize:255,maxImageSize:2048,quality:1.5,...t.renderOptions||{}},this.addImages(t.images)}applyProps(e){e.renderSmallestFallback!==void 0&&e.renderSmallestFallback!==this.renderOptions.renderSmallestFallback&&(this.renderOptions.renderSmallestFallback=e.renderSmallestFallback),e.renderLayers!==void 0&&e.renderLayers!==this.renderOptions.renderLayers&&(this.renderOptions.renderLayers=e.renderLayers),e.minSize!==void 0&&e.minSize!==this.renderOptions.minSize&&(this.renderOptions.minSize=e.minSize),e.maxImageSize!==void 0&&e.maxImageSize!==this.renderOptions.maxImageSize&&(this.renderOptions.maxImageSize=e.maxImageSize),e.quality!==void 0&&e.quality!==this.renderOptions.quality&&(this.renderOptions.quality=e.quality)}appendChild(e){this.addImages([e])}removeChild(e){this.images.indexOf(e)!==-1&&(this.images=this.images.filter(t=>t!==e),this.sortByScales())}insertBefore(e,t){this.addImages([e])}hideInstance(){}addImages(e){for(let t of e)t.__parent=this,t.__owner=this.__owner;this.allImages.push(...e.filter(Boolean)),this.sortByScales()}sortByScales(){this._scheduleSortByScales=!0}getScheduledUpdates(e,t){return this._scheduleSortByScales?[this._sortByScales]:this.isFullyLoaded?[]:t>1/this.maxScaleFactor?this.fallback:[]}getAllPointsAt(e,n,r){if(this.images.length===0)return[];let i=ce(1/(r||1)/(window.devicePixelRatio||1),this.images,this.renderOptions.quality),a=this.images.length,o=n?t(n,u(this.x,this.y)):u(this.x,this.y);if(i!==this.images.length-1&&this.images[i+1]){let t=[];for(let e=a-1;e>=i;e--)t.push(e);let n=t[0];this.renderOptions.renderLayers&&(t=t.slice(-Math.min(t.length,this.renderOptions.renderLayers))),this.renderOptions.renderSmallestFallback&&t.indexOf(n)===-1&&t.unshift(n);let s=[];for(let n=0;n<t.length;n++)s.push(...this.images[t[n]].getAllPointsAt(e,o,r));return s}return this.images[i].getAllPointsAt(e,o,r)}};function U(e,t,n,r,i){let a=Math.PI/180*i,o=Math.cos(a),s=Math.sin(a);return[o*(n-e)+s*(r-t)+e,o*(r-t)-s*(n-e)+t]}var me=class e extends R{constructor(e,t){super(),L(this,`id`,void 0),L(this,`type`,`world-object`),L(this,`scale`,void 0),L(this,`layers`,void 0),L(this,`points`,void 0),L(this,`worldPoints`,void 0),L(this,`intersectionBuffer`,n(5)),L(this,`aggregateBuffer`,n(9)),L(this,`invertedBuffer`,n(9)),L(this,`rotation`,0),L(this,`filteredPointsBuffer`,void 0),L(this,`_updatedList`,[]),L(this,`geometry`,void 0);let{x:r=0,y:i=0}=t||{};e?(this.id=e.id||``,this.scale=1,this.layers=e.layers,this.points=n([1,r,i,r+e.width,i+e.height]),this.worldPoints=n([1,r,i,r+e.width,i+e.height]),this.filteredPointsBuffer=n(e.layers.length*5)):(this.id=``,this.scale=1,this.layers=[],this.points=n(5),this.worldPoints=n(5),this.filteredPointsBuffer=n(5))}static createWithProps(t){let n=new e;return n.applyProps(t),n}applyProps(e){let t=e.x||0,n=e.y||0;this.id=e.id;let r=e.scale===void 0?this.scale:e.scale;this.points[0]=1,this.points[1]=t,this.points[2]=n,this.points[3]=t+e.width,this.points[4]=n+e.height,this.rotation=e.rotation||0,this.worldPoints[3]=this.worldPoints[1]+e.width,this.worldPoints[4]=this.worldPoints[2]+e.height,e.scale&&e.scale!==1&&this.atScale(r),this.scale=r}appendChild(e){e.points[0]===0&&e.points.set(this.points),e.__owner.value=this,this.addLayers([e])}removeChild(e){this.layers=this.layers.filter(t=>t!==e),this.filteredPointsBuffer=n(this.layers.length*5)}insertBefore(e,t){let n=this.layers.indexOf(t);if(n===-1||this.layers.indexOf(e)!==-1)return;let r=this.layers.slice(0,n),i=this.layers.slice(n);this.layers=[...r,e,...i]}hideInstance(){console.warn(`hideInstance: not yet implemented`)}getObjectsAt(e,t){if(this.rotation&&(e=this.applyRotation(e)),a(this.points,e,this.filteredPointsBuffer)[0]===0)return[];let n=this.layers.length,r=[];for(let i=0;i<n;i++){let n=this.layers[i];if(t&&n.isShape){let t=l(n.points,u(this.x,this.y));if(!n.intersects([e[1]-t[1],e[2]-t[2]]))continue}if(a(l(n.points,u(this.x,this.y)),e,this.filteredPointsBuffer)[0]!==0&&r.push(n),t){let i=n;r.push(...i.getObjectsAt(e,t))}}return r}applyRotation(e){if(this.rotation){let t={x:e[1],y:e[2]},r={x:e[1],y:e[4]},i={x:e[3],y:e[2]},a={x:e[3],y:e[4]},o=this.points[1]+(this.points[3]-this.points[1])/2,s=this.points[2]+(this.points[4]-this.points[2])/2,[c,l]=U(o,s,t.x,t.y,this.rotation),[u,d]=U(o,s,r.x,r.y,this.rotation),[f,p]=U(o,s,i.x,i.y,this.rotation),[m,h]=U(o,s,a.x,a.y,this.rotation),g=Math.min(c,u,f,m),_=Math.max(c,u,f,m),v=Math.min(l,d,p,h),y=Math.max(l,d,p,h);return n([e[0],g,v,_,y])}return e}getAllPointsAt(e,n,r){let a=t(u(this.x,this.y),s(this.scale),this.aggregateBuffer);this.rotation&&(e=this.applyRotation(e));let o=i(e,this.points,this.intersectionBuffer),c=this.layers.length,d=[],f=l(o,t(s(1/this.scale),u(-this.x,-this.y),this.invertedBuffer)),p=n?t(n,a,this.aggregateBuffer):a,m=r*this.scale;for(let e=0;e<c;e++)d.push(...this.layers[e].getAllPointsAt(f,p,m));return d}addLayers(e){let t=[];for(let r of e)this.layers.indexOf(r)===-1&&(t.push(r),r.points.length===5&&(r.points[1]<this.worldPoints[1]/this.scale||r.points[2]<this.worldPoints[2]/this.scale||r.points[3]>this.worldPoints[3]/this.scale||r.points[4]>this.worldPoints[4]/this.scale)&&(r.crop=r.crop||n([1,Math.max(this.worldPoints[1]/this.scale,r.points[1]),Math.max(this.worldPoints[2]/this.scale,r.points[2]),Math.min(this.worldPoints[3]/this.scale,r.points[3]),Math.min(this.worldPoints[4]/this.scale,r.points[4])])));this.layers=this.layers.concat(t),this.filteredPointsBuffer=n(this.layers.length*5)}getScheduledUpdates(e,t){let n=this.layers.length;this._updatedList=[];let r=t*this.scale;for(let t=0;t<n;t++){let n=this.layers[t].getScheduledUpdates(e,r);n&&this._updatedList.push(...n)}return this._updatedList}},W=class i extends R{get x(){return 0}get y(){return 0}get width(){return this._width}get height(){return this._height}constructor(e=0,t=0,r=100,i=`left-to-right`){super(),L(this,`id`,`world`),L(this,`_width`,void 0),L(this,`_height`,void 0),L(this,`aspectRatio`,void 0),L(this,`viewingDirection`,void 0),L(this,`aggregateBuffer`,n(9)),L(this,`isDirty`,!1),L(this,`zones`,[]),L(this,`filteredPointsBuffer`,void 0),L(this,`selectedZone`,void 0),L(this,`triggerQueue`,[]),L(this,`activatedEvents`,[]),L(this,`_updatedList`,[]),L(this,`translationBuffer`,n(9)),L(this,`needsRecalculate`,!0),L(this,`emptyPaintables`,[]),L(this,`renderOrder`,[]),L(this,`points`,void 0),L(this,`objects`,[]),L(this,`subscriptions`,[]),L(this,`_propagateEventTargets`,[]),L(this,`_alreadyFlushed`,[]),this._width=e,this._height=t,this.aspectRatio=Number.isNaN(e/t)?1:e/t,this.viewingDirection=i,this.points=n(r*5),this.filteredPointsBuffer=n(r*5)}static withProps(e){let t=new i;return t.applyProps(e),t}applyProps(e){e.width!==void 0&&e.height!==void 0&&(e.width!==this._width||e.height!==this._height)&&this.resize(e.width,e.height),e.viewingDirection!==this.viewingDirection&&(this.viewingDirection=e.viewingDirection,this.triggerRepaint())}propagateTouchEvent(t,n,r){let i=[];for(let t of r)if(t.x&&t.y){let n=e.singleBox(1,1,t.x,t.y);i.push(this.getObjectsAt(n,!0).reverse())}return i.map(e=>this.propagateEvent(t,n,e,{bubbles:!0,cancelable:!0}))}propagatePointerEvent(t,n,r,i,a={}){let o=e.singleBox(1,1,r,i),s=this.getObjectsAt(o,!0).reverse();return this.propagateEvent(t,n,s,a)}propagateEvent(e,t,n,{bubbles:r=!1,cancelable:i=!1}={}){t.atlasTarget=this,this._propagateEventTargets.length=1,this._propagateEventTargets[0]=this;let a=!1;t.stopPropagation=()=>{a=!0};let o=n.length;for(let e=o-1;e>=0;e--){this._propagateEventTargets.unshift(n[e][0]);let t=n[e][1].length;if(t)for(let r=0;r<t;r++)this._propagateEventTargets.unshift(n[e][1][r])}let s=this._propagateEventTargets.length,c=!1;for(let n=0;n<s&&(t.atlasTarget=this._propagateEventTargets[n],t.atlasWorld=this,c=this._propagateEventTargets[n].dispatchEvent(e,t)||c,!a);n++);return c&&this.triggerRepaint(),this._propagateEventTargets}appendChild(e){let t=this.appendWorldObject(e);this.renderOrder.push(t/5)}removeChild(e){let t=this.objects.indexOf(e);if(t===-1){for(let t of this.objects)if(t&&t.id===e.id){this.removeChild(t);return}return}this.objects[t]=null,this.renderOrder=this.renderOrder.filter(e=>e!==t),this.points[t*5]=0,this.triggerRepaint(),this.needsRecalculate=!0}insertBefore(e,t){let n=this.objects.indexOf(t);if(n===-1)return;let r=this.appendWorldObject(e);this.renderOrder.splice(n-1,0,r/5)}hideInstance(){}asWorldObject(){return null}addZone(e){this.zones.push(e)}selectZone(e){if(typeof e==`string`){let t=this.zones.length;for(let n=0;n<t;n++)if(this.zones[n].id===e){this.selectedZone=n,this.trigger(`zone-changed`);return}}else this.zones[e]&&(this.selectedZone=e,this.trigger(`zone-changed`))}deselectZone(){this.selectedZone=void 0}getActiveZone(){if(this.selectedZone)return this.zones[this.selectedZone]}hasActiveZone(){return this.selectedZone!==void 0}checkResizeInternalBuffer(){if(r(this.points)===this.objects.length){let e=this.points,t=n(this.points.length*2);t.set(e,0),this.points=t}}appendWorldObject(e){this.checkResizeInternalBuffer();let t=this.objects.length*5,r=e.points;return e.points=this.points.subarray(this.objects.length*5,this.objects.length*5+5),e.points[1]=r[1],e.points[2]=r[2],e.points[3]=r[3],e.points[4]=r[4],this.objects.push(e),this.filteredPointsBuffer=n(this.objects.length*5),this.needsRecalculate=!0,this.triggerRepaint(),t}recalculateWorldSize(){let e=!1;if(this.needsRecalculate){let t=new Int32Array(this.objects.length),n=new Int32Array(this.objects.length),r=this.renderOrder.length;for(let e=0;e<r;e++){let r=this.renderOrder[e];this.objects[r]&&(t[e]=this.points[r*5+3],n[e]=this.points[r*5+4])}let i=Math.max(...t);i!==this._width&&(this._width=i,e=!0);let a=Math.max(...n);a!==this._height&&(this._height=a,e=!0),e&&this.trigger(`recalculate-world-size`,{width:i,height:a}),this.needsRecalculate=!1}return e}addObjectAt(t,r){r.width&&!r.height?r.height=r.width/t.width*t.height:r.height&&!r.width&&(r.width=r.height/t.height*t.width),(!r||!r.width||!r.height)&&(r.width=t.width,r.height=t.height);let{width:i,x:a,y:o}=r,s=i/t.width;this.checkResizeInternalBuffer(),this.points.set(e.singleBox(t.width,t.height,0,0),this.objects.length*5);let c=new me(t);return c.points=this.points.subarray(this.objects.length*5,this.objects.length*5+5),this.objects.push(c),this.scaleWorldObject(this.objects.length-1,s),this.translateWorldObject(this.objects.length-1,a,o),this.filteredPointsBuffer=n(this.points.length*2),this.triggerRepaint(),this.needsRecalculate=!0,c}scaleWorldObject(e,t){o(this.points.subarray(e*5,e*5+5),c(t,this.points[e*5+1],this.points[e*5+2]));let n=this.objects[e];n&&(n.atScale(t),this.triggerRepaint())}translateWorldObject(e,t,n){o(this.points.subarray(e*5,e*5+5),u(t,n));let r=this.objects[e];r&&(r.translate(t,n),this.triggerRepaint())}resize(e,t){return this._width=e,this._height=t,this.aspectRatio=e/t,this.triggerRepaint(),this}getObjects(){return this.objects}getPoints(){return this.points}getPointsFromViewer(t,n){let r=e.singleBox(t.width,t.height,t.x,t.y);return this.getPointsAt(r,n,t.scale)}addLayoutSubscriber(e){return this.subscriptions.push(e),()=>{this.subscriptions.splice(this.subscriptions.indexOf(e),1)}}getScheduledUpdates(e,t){let n=a(this.points,e,this.filteredPointsBuffer),r=this.objects.length;this._updatedList=[];for(let i=0;i<r;i++)if(n[i*5]!==0){if(!this.objects[i])continue;this._updatedList.push(...this.objects[i].getScheduledUpdates(e,t))}return this._updatedList}getObjectsAt(e,t=!1){let n=this.getActiveZone(),r=a(this.points,e,this.filteredPointsBuffer),i=this.renderOrder.length,o=[];for(let a=0;a<i;a++){let i=this.renderOrder[a];if(r[i*5]!==0){let r=this.objects[i];if(!r||n&&n.objects.indexOf(r)===-1)continue;if(r.type!==`world-object`){o.push([r,[r]]);continue}t?o.push([r,r.getObjectsAt(e,t)]):o.push([r,this.emptyPaintables])}}return o}getPointsAt(e,n,r=1){let i=this.getObjectsAt(e),a=t(s(r),u(-e[1],-e[2]),this.translationBuffer),o=n?t(n,a,this.aggregateBuffer):a,c=i.length,l=[];for(let t=0;t<c;t++)i[t]&&l.push(...i[t][0].getAllPointsAt(e,o,r));return l}flushSubscriptions(){if(this.triggerQueue.length){this._alreadyFlushed=[];let e=this.triggerQueue.length;for(let t=0;t<e;t++){if(this._alreadyFlushed.indexOf(this.triggerQueue[t][0])!==-1)continue;this.triggerQueue[t][1]===void 0&&this._alreadyFlushed.push(this.triggerQueue[t][0]);let e=this.subscriptions.length;for(let n=0;n<e;n++)this.subscriptions[n].apply(null,this.triggerQueue[t])}this.triggerQueue=[]}}trigger(e,t){this.triggerQueue.push([e,t])}triggerEventActivation(){this.trigger(`event-activation`)}triggerRepaint(){this.trigger(`repaint`)}gotoRegion(e){this.trigger(`goto-region`,e)}goHome(e=!1){this.trigger(`go-home`,{immediate:e})}zoomTo(e,t,n){this.trigger(`zoom-to`,{point:t,factor:e,stream:n})}zoomIn(e){this.trigger(`zoom-to`,{point:e,factor:.5})}zoomOut(e){this.trigger(`zoom-to`,{point:e,factor:2})}constraintBounds(e){this.trigger(`constrain-bounds`,{immediate:e})}};function he(e){let{src:t,target:n}=e,r=n?n.width:e.width,i=n?n.height:e.height;return new me({id:t,height:i,width:r,layers:[z.fromImage(t,{height:i,width:r},{width:e.width,height:e.height})]})}const ge={margin:0};var _e=class{constructor(e,t={}){L(this,`id`,void 0),L(this,`config`,void 0),L(this,`points`,void 0),L(this,`objects`,void 0),this.id=e.map(e=>e.id).join(`$$`),this.config={...ge,...t},this.points=n(5),this.objects=e,this.recalculateBounds()}recalculateBounds(){this.points.set([1,Math.min(...this.objects.map(e=>e.points[1]))-this.config.margin,Math.min(...this.objects.map(e=>e.points[2]))-this.config.margin,Math.max(...this.objects.map(e=>e.points[3]))+this.config.margin,Math.max(...this.objects.map(e=>e.points[4]))+this.config.margin])}getPointsAt(e,t,n){return[]}};const ve=/([0-9]+(px|em)\s+)+(solid)\s+(.*)/g,ye={},be=[`backgroundColor`,`opacity`,`boxShadow`,`borderColor`,`borderWidth`,`borderStyle`,`outlineColor`,`outlineWidth`,`outlineOffset`,`outlineStyle`];var G=class extends R{constructor(){super(),L(this,`id`,void 0),L(this,`type`,`spacial-content`),L(this,`points`,void 0),L(this,`hoverEvents`,!1),L(this,`activeEvents`,!1),L(this,`display`,{x:0,y:0,scale:1,width:-1,height:-1,points:n(5)}),L(this,`_parsed`,{border:{id:null,match:[]},outline:{id:null,match:[]}}),L(this,`hovering`,void 0),L(this,`pressing`,void 0),L(this,`props`,{}),L(this,`addHover`,()=>{this.hovering=!0,this.__revision++}),L(this,`removeHover`,()=>{this.hovering=!1,this.pressing=!1,this.__revision++}),L(this,`addPress`,()=>{this.pressing=!0,this.__revision++}),L(this,`removePress`,()=>{this.pressing=!1,this.__revision++}),this.id=P(12),this.points=n(5)}getAllPointsAt(e,t){return[[this,this.points,t]]}applyProps(t={}){let n=!1;if(t.interactive!==this.props.interactive&&(n=!0,this.props.interactive=t.interactive),t.style){let e=t.border||t.style.border;if(e!==this._parsed.border.id)if(!e)this._parsed.border.id=null,this._parsed.border.match=[];else{let t=ye[e]||ve.exec(e)||ve.exec(e);t&&(this._parsed.border.id=e,this._parsed.border.match=ye[e]=t)}if(this._parsed.border.id&&(t.style.borderWidth=this._parsed.border.match[1],t.style.borderStyle=`solid`,t.style.borderColor=this._parsed.border.match[4]),t.style.outline!==this._parsed.outline.id)if(!t.style.outline)this._parsed.outline.id=null,this._parsed.outline.match=[];else{let e=ye[t.style.outline]||ve.exec(t.style.outline)||ve.exec(t.style.outline);e&&(this._parsed.outline.id=t.style.outline,this._parsed.outline.match=ye[t.style.outline]=e)}this._parsed.outline.id&&(t.style.outlineWidth=this._parsed.outline.match[1],t.style.outlineStyle=`solid`,t.style.outlineColor=this._parsed.outline.match[4]),this.props.style=t.style,t.backgroundColor&&!this.props.style.backgroundColor&&(this.props.style.backgroundColor=t.backgroundColor,n=!0),t.style.background&&!this.props.style.backgroundColor&&(this.props.style.backgroundColor=t.style.background,n=!0);for(let e of be)if(this.props.style[e]!==t.style[e]){n=!0;break}t.style[`:hover`]!==this.props.hoverStyles&&(this.props.hoverStyles=t.style[`:hover`],this.hoverEvents||(this.hoverEvents=!0,this.addEventListener(`pointerenter`,this.addHover),this.addEventListener(`pointerleave`,this.removeHover)),n=!0),t.style[`:active`]!==this.props.pressStyles&&(this.props.pressStyles=t.style[`:active`],this.activeEvents||(this.activeEvents=!0,this.addEventListener(`mousedown`,this.addPress),this.addEventListener(`mouseup`,this.removePress)),n=!0)}t.href!==this.props.href&&(this.props.href=t.href,n=!0),t.hrefTarget!==this.props.hrefTarget&&(this.props.hrefTarget=t.hrefTarget,n=!0),t.title!==this.props.title&&(this.props.title=t.title,n=!0),t.className!==this.props.className&&(this.props.className=t.className,t.className&&!this.hoverEvents&&(this.hoverEvents=!0,this.addEventListener(`pointerenter`,this.addHover),this.addEventListener(`pointerleave`,this.removeHover)),t.className&&!this.activeEvents&&(this.activeEvents=!0,this.addEventListener(`mousedown`,this.addPress),this.addEventListener(`mouseup`,this.removePress)),n=!0),t.relativeSize!==this.props.relativeSize&&(this.props.relativeSize=t.relativeSize,n=!0),t.relativeStyle!==this.props.relativeStyle&&(this.props.relativeStyle=t.relativeStyle,n=!0),t.html!==this.props.html&&(this.props.html=t.html,n=!0),t.target&&(t.target.width!==this.display.width||t.target.height!==this.display.height||t.target.x!==this.points[1]||t.target.y!==this.points[2])&&(n=!0,this.points=e.singleBox(t.target.width,t.target.height,t.target.x,t.target.y),this.display.points=e.singleBox(t.target.width,t.target.height,t.target.x,t.target.y),this.display.width=t.target.width,this.display.height=t.target.height),n&&this.__revision++}},xe=class extends R{constructor(){super(),L(this,`type`,`spacial-content`),L(this,`id`,void 0),L(this,`points`,void 0),L(this,`color`,`#000`),L(this,`backgroundColor`,void 0),L(this,`hovering`,void 0),L(this,`pressing`,void 0),L(this,`text`,``),L(this,`display`,{x:0,y:0,scale:1,width:100,height:100,points:n(5)}),L(this,`className`,void 0),L(this,`html`,void 0),L(this,`interactive`,!1),L(this,`props`,{font:`18px Arial, sans-serif`,lineHeight:1,textAlign:`left`,verticalAlign:`top`,paddingX:0,paddingY:0,fitParent:!1,lineBreak:`auto`,strokeText:!1,sizeToFill:!1,maxFontSizeToFill:void 0,allowNewLine:!0,justifyLines:!1,renderHDPI:!1,textDecoration:`none`,interactive:!1,relativeSize:!1}),this.id=``,this.points=n(5)}getAllPointsAt(e,t){return[[this,this.points,t]]}applyProps({id:t,target:n,text:r,color:i,backgroundColor:a,fontSize:o=18,interactive:s,fontFamily:c=`Arial, sans-serif`,...l}){l.font=`${o}px ${c}`,this.interactive=s||!1,r!==void 0&&(this.text=r||``),i&&(this.color=i),a&&(this.backgroundColor=a),t&&(this.id=t),n&&(this.points=e.singleBox(n.width,n.height,n.x,n.y),this.display.points=this.points,this.display.width=n.width,this.display.height=n.height),this.props={...this.props,...l},this.__revision++}};const K=Math.pow,Se=Math.sqrt,Ce=Math.sin,we=Math.cos,Te=Math.PI,Ee=1.70158,De=Ee*1.525,Oe=Ee+1,ke=2*Te/3,Ae=2*Te/4.5,je=function(e){let t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},q={linear:e=>e,easeInQuad:function(e){return e*e},easeOutQuad:function(e){return 1-(1-e)*(1-e)},easeInOutQuad:function(e){return e<.5?2*e*e:1-K(-2*e+2,2)/2},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return 1-K(1-e,3)},easeInOutCubic:function(e){return e<.5?4*e*e*e:1-K(-2*e+2,3)/2},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1-K(1-e,4)},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-K(-2*e+2,4)/2},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1-K(1-e,5)},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1-K(-2*e+2,5)/2},easeInSine:function(e){return 1-we(e*Te/2)},easeOutSine:function(e){return Ce(e*Te/2)},easeInOutSine:function(e){return-(we(Te*e)-1)/2},easeInExpo:function(e){return e===0?0:K(2,10*e-10)},easeOutExpo:function(e){return e===1?1:1-K(2,-10*e)},easeInOutExpo:function(e){return e===0?0:e===1?1:e<.5?K(2,20*e-10)/2:(2-K(2,-20*e+10))/2},easeInCirc:function(e){return 1-Se(1-K(e,2))},easeOutCirc:function(e){return Se(1-K(e-1,2))},easeInOutCirc:function(e){return e<.5?(1-Se(1-K(2*e,2)))/2:(Se(1-K(-2*e+2,2))+1)/2},easeInBack:function(e){return Oe*e*e*e-Ee*e*e},easeOutBack:function(e){return 1+Oe*K(e-1,3)+Ee*K(e-1,2)},easeInOutBack:function(e){return e<.5?K(2*e,2)*((De+1)*2*e-De)/2:(K(2*e-2,2)*((De+1)*(e*2-2)+De)+2)/2},easeInElastic:function(e){return e===0?0:e===1?1:-K(2,10*e-10)*Ce((e*10-10.75)*ke)},easeOutElastic:function(e){return e===0?0:e===1?1:K(2,-10*e)*Ce((e*10-.75)*ke)+1},easeInOutElastic:function(e){return e===0?0:e===1?1:e<.5?-(K(2,20*e-10)*Ce((20*e-11.125)*Ae))/2:K(2,-20*e+10)*Ce((20*e-11.125)*Ae)/2+1},easeInBounce:function(e){return 1-je(1-e)},easeOutBounce:je,easeInOutBounce:function(e){return e<.5?(1-je(1-2*e))/2:(1+je(2*e-1))/2}};var Me=class{constructor(e){L(this,`runtime`,void 0),L(this,`pendingTransition`,void 0),L(this,`lastZoomTo`,null),L(this,`isConstraining`,!1),L(this,`lastGoToRegion`,null),this.runtime=e,this.pendingTransition={from:n(5),to:n(5),elapsed_time:0,done:!0,total_time:0,timingFunction:q.easeInOutQuad,constrain:!1}}hasPending(){return!this.pendingTransition.done}getPendingTransition(){return this.pendingTransition}getPendingFrom(){return this.pendingTransition.from}customTransition(e){e(this.pendingTransition)}stopTransition(){this.pendingTransition.from=n(this.runtime.target),this.pendingTransition.to=n(this.runtime.target),this.pendingTransition.done=!0,this.pendingTransition.elapsed_time=0,this.pendingTransition.total_time=0}runTransition(e,t){if(!this.pendingTransition.done){let n=this.pendingTransition,r=n.total_time===0?0:(n.elapsed_time+t)/n.total_time,i=n.total_time===0?1:r===0?0:n.timingFunction(r);e[1]=n.from[1]+(n.to[1]-n.from[1])*i,e[2]=n.from[2]+(n.to[2]-n.from[2])*i,e[3]=n.from[3]+(n.to[3]-n.from[3])*i,e[4]=n.from[4]+(n.to[4]-n.from[4])*i,this.pendingTransition.elapsed_time+=t,this.pendingTransition.elapsed_time>=this.pendingTransition.total_time&&(this.pendingTransition.done=!0,this.pendingTransition.callback?.(),this.pendingTransition.constrain&&this.constrainBounds({transition:{duration:this.pendingTransition.total_time===0?0:500,easing:q.easeOutExpo}}))}}resumeTransition(){this.lastZoomTo&&this.zoomTo(this.lastZoomTo.factor,this.lastZoomTo.options),this.isConstraining&&this.constrainBounds(),this.lastGoToRegion&&this.goToRegion(this.lastGoToRegion.target,this.lastGoToRegion.options)}zoomTo(e,t={}){let{origin:n,stream:r=!1,transition:i}=t;this.lastZoomTo={factor:e,options:t};let a=this.runtime.getZoomedPosition(e,{origin:n}),o=Math.abs(1-e);this.applyTransition(a,i,{duration:2e3*o,easing:q.easeOutExpo,constrain:!0,callback:()=>{this.lastZoomTo=null}},{stream:!1})}constrainBounds({transition:e,panPadding:t=0}={}){this.isConstraining=!0;let[n,r]=this.runtime.constrainBounds(this.runtime.target,{panPadding:t});n&&(this.applyTransition(r,e,{duration:500,easing:q.easeOutQuart,constrain:!1,callback:()=>{this.isConstraining=!1}}),this.runtime.updateNextFrame())}applyTransition(e,t,r,{stream:i}={}){this.pendingTransition.from=n(this.runtime.target),this.pendingTransition.to=e,i||(this.pendingTransition.elapsed_time=0),this.pendingTransition.done=!1,this.pendingTransition.total_time=t?.duration===void 0?r?.duration===void 0?1e3:r.duration:t.duration,this.pendingTransition.constrain=t?.constrain===void 0?r?.constrain===void 0?!1:r.constrain:t.constrain,this.pendingTransition.timingFunction=t?.easing||r?.easing||q.easeInOutSine}goToRegion(t,{transition:n}={}){this.lastGoToRegion={target:t,options:{transition:n}};let r=this.runtime.clampRegion(t);this.applyTransition(e.singleBox(r.width,r.height,r.x,r.y),n,{duration:1e3,easing:q.easeOutExpo,constrain:!0,callback:()=>{this.lastGoToRegion=null}}),this.runtime.updateNextFrame()}};Number.MIN_VALUE+1;var Ne=class{get x(){return this.target[1]}set x(e){this.target[1]=e}get y(){return this.target[2]}set y(e){this.target[2]=e}get x2(){return this.target[3]}set x2(e){this.target[3]=e}get y2(){return this.target[4]}set y2(e){this.target[4]=e}get width(){return this.target[3]-this.target[1]}set width(e){this.target[3]=this.target[1]+e}get height(){return this.target[4]-this.target[2]}set height(e){this.target[4]=this.target[2]=e}constructor(t,r,i,a=[],o){L(this,`id`,P()),L(this,`ready`,!1),L(this,`renderer`,void 0),L(this,`world`,void 0),L(this,`target`,void 0),L(this,`homePosition`,void 0),L(this,`manualHomePosition`,void 0),L(this,`manualFocalPosition`,void 0),L(this,`focalPosition`,void 0),L(this,`transitionManager`,void 0),L(this,`aggregate`,void 0),L(this,`transformBuffer`,n(500)),L(this,`lastTarget`,n(5)),L(this,`zoomBuffer`,n(5)),L(this,`logNextRender`,!1),L(this,`pendingUpdate`,!0),L(this,`isCommitting`,!1),L(this,`firstRender`,!0),L(this,`lastTime`,void 0),L(this,`stopId`,void 0),L(this,`mode`,`explore`),L(this,`controllers`,[]),L(this,`controllersRunning`,!1),L(this,`controllerStopFunctions`,[]),L(this,`maxScaleFactor`,1),L(this,`_viewerToWorld`,{x:0,y:0}),L(this,`_lastGoodScale`,1),L(this,`hooks`,{useFrame:[],useBeforeFrame:[],useAfterPaint:[],useAfterFrame:[]}),L(this,`fpsLimit`,void 0),L(this,`options`,void 0),L(this,`hookOptions`,{filters:{grayscale:0,contrast:0,brightness:0,saturate:0,sepia:0,invert:0,hueRotate:0,blur:0}}),L(this,`_viewport`,{x:0,y:0,width:0,height:0}),L(this,`setViewport`,e=>{let t=Math.round(e.x===void 0?this.target[1]:e.x),n=Math.round(e.y===void 0?this.target[2]:e.y);e.width?this.target[3]=t+e.width:this.target[3]=this.target[3]-this.target[1]+t,e.height?this.target[4]=n+e.height:this.target[4]=this.target[4]-this.target[2]+n,Math.abs(this.target[1]-t)>.01&&(this.target[1]=t),Math.abs(this.target[2]-n)>.01&&(this.target[2]=n),this.pendingUpdate=!0}),L(this,`render`,e=>{let t=e-this.lastTime;if(this.isCommitting||this.fpsLimit&&t<1e3/this.fpsLimit){this.stopId=window.requestAnimationFrame(this.render);return}this.lastTime=e,this.world.flushSubscriptions(),this.stopId=window.requestAnimationFrame(this.render),this.hook(`useFrame`,t);let n=this.pendingUpdate,r=this.renderer.pendingUpdate();if(this.transitionManager.hasPending()&&(this.transitionManager.runTransition(this.target,t),this.pendingUpdate=!0,this.updateControllerPosition()),!this.firstRender&&!n&&!r&&this.target[0]===this.lastTarget[0]&&this.target[1]===this.lastTarget[1]&&this.target[2]===this.lastTarget[2]&&this.target[3]===this.lastTarget[3]&&this.target[4]===this.lastTarget[4])return;this.hook(`useBeforeFrame`,t),this.renderer.beforeFrame(this.world,t,this.target,this.hookOptions);let i=this.getScaleFactor(),a=this.renderer.getPointsAt(this.world,this.target,this.aggregate,i),o=a.length;for(let e=0;e<o;e++){let t=a[e][0],n=a[e][1],r=a[e][2],i=r?l(n,r,this.transformBuffer):n;this.renderer.prepareLayer(t,t.__parent&&r?l(t.__parent.crop||t.__parent.points,r):i);let o=i.length/5;for(let e=0;e<o;e++){let n=e*5;i[n]!==0&&(this.renderer.paint(t,e,i[n+1],i[n+2],i[n+3]-i[n+1],i[n+4]-i[n+2]),this.hook(`useAfterPaint`,t))}this.renderer.finishLayer(t,n)}this.renderer.afterFrame(this.world,t,this.target,this.hookOptions),this.hook(`useAfterFrame`,t),this.lastTarget[0]=this.target[0],this.lastTarget[1]=this.target[1],this.lastTarget[2]=this.target[2],this.lastTarget[3]=this.target[3],this.lastTarget[4]=this.target[4],this.firstRender=!1,this.pendingUpdate=!1,this.logNextRender=!1,this.renderer.isReady()&&(this.ready=!0,this.world.trigger(`ready`)),this.world.flushSubscriptions();let s=this.world.getScheduledUpdates(this.target,i),c=s.length;if(c>0)for(let e=0;e<c;e++){let t=s[c-e-1]();t?t.then(()=>{this.pendingUpdate=!0}):this.pendingUpdate=!0}}),this.renderer=t,this.world=r,this.options={maxOverZoom:1,maxUnderZoom:1,visibilityRatio:1.5,...o||{}},this.target=e.projection(i),this.manualHomePosition=!1,this.pendingUpdate=!0,this.homePosition=e.projection(this.world),this.manualFocalPosition=!1,this.focalPosition=this.target,this.updateFocalPosition(),this.transitionManager=new Me(this),this.aggregate=s(1),this.world.addLayoutSubscriber(e=>{e===`repaint`&&(this.pendingUpdate=!0),e===`recalculate-world-size`&&(this.manualHomePosition||(this.setHomePosition(),this.goHome()),this.updateFocalPosition())}),this.lastTime=performance.now(),this.controllers=a,this.render(this.lastTime),this.startControllers()}setHomePosition(t){this.homePosition.set(e.projection(t||this.world)),this.pendingUpdate=!0}startControllers(){if(!this.controllersRunning){for(let e of this.controllers)this.controllerStopFunctions.push(e.start(this));this.controllersRunning=!0}}stopControllers(){if(this.controllersRunning){for(let e of this.controllerStopFunctions)e();this.controllersRunning=!1,this.controllerStopFunctions=[]}}updateControllerPosition(){for(let e of this.controllers)e.updatePosition(this.x,this.y,this.width,this.height)}triggerResize(){this.renderer.triggerResize&&this.renderer.triggerResize(),this.pendingUpdate=!0}addController(e){this.controllers.push(e),this.controllersRunning&&e.start(this),this.pendingUpdate=!0}cover(){return this.goHome({cover:!0})}getRendererScreenPosition(){return this.renderer.getRendererScreenPosition()}updateRendererScreenPosition(){this.pendingUpdate=!0,this.renderer.resize()}setOptions(e){this.options={...this.options,...e}}goHome(e={}){if(this.world.width<=0||this.world.height<=0)return;let t=this.getScaleFactor(),n=e.position?{x:e.position[1],y:e.position[2],width:e.position[3]-e.position[1],height:e.position[4]-e.position[2]}:{x:this.homePosition[1],y:this.homePosition[2],width:this.homePosition[3]-this.homePosition[1],height:this.homePosition[4]-this.homePosition[2]},r=this.width*t,i=this.height*t,a=n.width/r,o=n.height/i,s=r/i;if(e.cover?a>o:a<o){let e=s*n.height,t=(e-n.width)/2;this.target[1]=Math.round(-t+n.x),this.target[2]=Math.round(n.y),this.target[3]=Math.round(e-t+n.x),this.target[4]=Math.round(n.height+n.y)}else{let e=n.width/s,t=(e-n.height)/2;this.target[1]=Math.round(n.x),this.target[2]=Math.round(n.y-t),this.target[3]=Math.round(n.x+n.width),this.target[4]=Math.round(n.y+e-t)}this.constrainBounds(this.target),this.updateControllerPosition()}resize(e,t,n,r){this.transitionManager.hasPending()&&this.transitionManager.stopTransition(),this.updateFocalPosition(e-t,n-r);let i=t/e,a=r/n;this.target[3]=this.target[1]+(this.target[3]-this.target[1])*i,this.target[4]=this.target[2]+(this.target[4]-this.target[2])*a,this.goHome({position:this.focalPosition}),this.renderer.resize(t,r),this.pendingUpdate=!0,this.transitionManager.resumeTransition()}updateFocalPosition(t,n){if(!this.manualFocalPosition){let t=this.width,n=this.height,r=Math.min(t,n),i=this.x+0,a=this.y+0;if(t<n){let t=this.height-this.width;this.focalPosition=e.projection({x:i,y:a+t/2,width:r-0,height:r-0}),this.pendingUpdate=!0}else{let t=this.width-this.height;this.focalPosition=e.projection({x:i+t/2,y:a,width:r-0,height:r-0}),this.pendingUpdate=!0}}}getViewport(){return this._viewport.x=this.target[1],this._viewport.y=this.target[2],this._viewport.width=this.target[3]-this.target[1],this._viewport.height=this.target[4]-this.target[2],this._viewport}constrainBounds(e,{panPadding:t=0,ref:r=!1}={}){let{minX:i,maxX:a,minY:o,maxY:s}=this.getBounds({target:e,padding:t}),c=!1,l=r?e:n(e),u=Math.round(e[3]-e[1]),d=Math.round(e[4]-e[2]);return i>e[1]&&(c=!0,l[1]=i,l[3]=i+u),o>e[2]&&(c=!0,l[2]=o,l[4]=o+d),a<e[1]&&(c=!0,l[1]=a,l[3]=a+u),s<e[2]&&(c=!0,l[2]=s,l[4]=s+d),[c,l]}getBounds(e){let t=e.target||this.target,n=e.padding,r=this.options.visibilityRatio,i=Math.abs(1-r);if(this.world.hasActiveZone()){let e=this.world.getActiveZone();if(e){let r=t[3]-t[1]<e.points[3]-e.points[1],i=t[4]-t[2]<e.points[4]-e.points[2];return{minX:r?e.points[1]-n:e.points[1]+(e.points[3]-e.points[1])/2-(t[3]-t[1])/2,maxX:i?e.points[2]-n:e.points[2]+(e.points[4]-e.points[2])/2-(t[4]-t[2])/2,minY:r?e.points[3]+n:e.points[1]+(e.points[3]-e.points[1])/2-(t[3]-t[1])/2,maxY:i?e.points[4]+n:e.points[2]+(e.points[4]-e.points[2])/2-(t[4]-t[2])/2}}}let a=t[3]-t[1],o=this.world.width,s=-a*i,c=o-a-s,l=t[4]-t[2],u=this.world.height,d=-l*i,f=u-l-d,p=Math.round(Math.max(s,c)),m=Math.round(Math.min(s,c)),h=Math.round(Math.max(d,f));return{minX:m,maxX:p,minY:Math.round(Math.min(d,f)),maxY:h}}getScaleFactor(e=!1){let t=this.renderer.getScale(this.target[3]-this.target[1],this.target[4]-this.target[2],e);return t===0?this._lastGoodScale:(this._lastGoodScale=t,t)}getZoomedPosition(e,{origin:t,fromPos:n}){let r=n?{width:n[3]-n[1],height:n[4]-n[2]}:void 0,i=r?this.renderer.getScale(r.width,r.height):this.getScaleFactor(),a=r?r.width:this.width,o=r?r.height:this.height,s=this.getRendererScreenPosition()?.width,u=this.world.width,d=s?s/u:1,f=this.options.maxUnderZoom,p=Math.max(d||1,this.options.maxOverZoom),m=1/e,h=i*m;if(m<1){let t=a*i,n=o*i;this.world.width/t>this.world.height/n?this.world.width*h<~~(a*i)*f&&(e=this.world.width*i/(a*i*f)):this.world.height*h<~~(o*i)*f&&(e=this.world.height*i/(o*i*f))}else h>p&&(e=i/p);let g=l(this.target,c(e,t?t.x:this.target[1]+(this.target[3]-this.target[1])/2,t?t.y:this.target[2]+(this.target[4]-this.target[2])/2),this.zoomBuffer);return this.constrainBounds(g,{ref:!0,panPadding:100}),g}clampRegion({x:e,y:t,width:n,height:r,padding:i=0}){let a=this.width,o=this.height,s=n/a<r/o,c=e-i,l=t-i,u=n+i*2,d=r+i*2;if(s){let e=d/o*a;return{x:c-(e-u)/2,y:l,width:e,height:d}}let f=u/a*o;return{x:c,y:l-(f-d)/2,width:u,height:f}}viewerToWorld(e,t){let n=this.getScaleFactor();return this._viewerToWorld.x=this.target[1]+e/n,this._viewerToWorld.y=this.target[2]+t/n,this._viewerToWorld}worldToViewer(n,r,i,a){let c=e.singleBox(i,a,n,r);return o(c,t(s(this.getScaleFactor()),u(-this.target[1],-this.target[2]))),{x:c[1],y:c[2],width:c[3]-c[1],height:c[4]-c[2],strand:c}}setScale(e,t){o(this.target,c(e,t?t.x:this.target[1]+(this.target[3]-this.target[1])/2,t?t.y:this.target[2]+(this.target[4]-this.target[2])/2)),this.pendingUpdate=!0}syncTo(e){let t=this.target;return this.target=e.target,this.pendingUpdate=!0,()=>{this.target=t}}stop(){return this.stopId!==void 0&&(window.cancelAnimationFrame(this.stopId),this.stopId=void 0),()=>{this.render(performance.now())}}reset(){this.renderer.reset()}selectZone(e){this.world.selectZone(e),this.pendingUpdate=!0}deselectZone(){this.world.deselectZone(),this.pendingUpdate=!0}hook(e,t){let n=this.hooks[e].length;if(n!==0)for(let r=0;r<n;r++)this.hooks[e][r](t)}registerHook(e,t){return this.hooks[e].push(t),()=>{this.hooks[e]=this.hooks[e].filter(e=>e!==t)}}updateNextFrame(){this.pendingUpdate=!0}};const Pe=/([0-9]+(px|em)\s+)+(solid)\s+(.*)/g,Fe={},Ie=[`backgroundColor`,`opacity`,`boxShadow`,`borderColor`,`borderWidth`,`borderStyle`,`outlineColor`,`outlineWidth`,`outlineOffset`,`outlineStyle`];var Le=class extends R{constructor(){super(),L(this,`id`,void 0),L(this,`type`,`spacial-content`),L(this,`isShape`,!0),L(this,`points`,void 0),L(this,`hoverEvents`,!1),L(this,`activeEvents`,!1),L(this,`display`,{x:0,y:0,scale:1,width:-1,height:-1,points:n(5)}),L(this,`boundingBox`,null),L(this,`_parsed`,{border:{id:null,match:[]},outline:{id:null,match:[]}}),L(this,`hovering`,void 0),L(this,`pressing`,void 0),L(this,`props`,{}),L(this,`shape`,{type:`none`}),L(this,`addHover`,()=>{this.hovering=!0,this.__revision++}),L(this,`removeHover`,()=>{this.hovering=!1,this.pressing=!1,this.__revision++}),L(this,`addPress`,()=>{this.pressing=!0,this.__revision++}),L(this,`removePress`,()=>{this.pressing=!1,this.__revision++}),this.id=P(12),this.points=n(5),this.shape={type:`none`}}updateBoundingBox(){if(this.shape.type===`none`)return;let e=this.shape.points;if(this.shape.points.length>2){let t=Math.min(...e.map(e=>e[0])),n=Math.min(...e.map(e=>e[1])),r=Math.max(0,...e.map(e=>e[0])),i=Math.max(0,...e.map(e=>e[1]));this.boundingBox={x:t,y:n,width:r-t,height:i-n};return}this.boundingBox=null}intersects(e){if(!e||this.shape.type===`none`)return!1;let[t,n]=e,r=this.shape.points,i=this.boundingBox;if(i||(this.updateBoundingBox(),i=this.boundingBox),!i||t<i.x||t>i.x+i.width||n<i.y||n>i.height+i.y)return!1;let a=!1;for(let e=0,i=r.length-1;e<r.length;i=e++)r[e][1]>n!=r[i][1]>n&&t<(r[i][0]-r[e][0])*(n-r[e][1])/(r[i][1]-r[e][1])+r[e][0]&&(a=!a);return a}getAllPointsAt(e,t){return e[3]-e[1]===1&&e[4]-e[2]===1?this.intersects([e[1],e[2]])?[[this,this.points,t]]:[]:[[this,this.points,t]]}applyProps(t={}){let n=!1;if(t.points)if(this.shape.type!==`polygon`||this.shape.points.length!==t.points.length)this.shape={type:`polygon`,points:t.points,open:t.open},this.updateBoundingBox();else{let e=!1,n=t.points.length;for(let r=0;r<n;r++)if(t.points[r][0]!==this.shape.points[r][0]||t.points[r][1]!==this.shape.points[r][1]){e=!0;break}e&&(this.shape={type:`polygon`,points:t.points,open:t.open},this.updateBoundingBox())}if(t.interactive!==this.props.interactive&&(n=!0,this.props.interactive=t.interactive),(t.open||t.open===!1)&&(n=!0,this.shape.open=t.open),t.style){let e=t.border||t.style.border;if(e!==this._parsed.border.id)if(!e)this._parsed.border.id=null,this._parsed.border.match=[];else{let t=Fe[e]||Pe.exec(e)||Pe.exec(e);t&&(this._parsed.border.id=e,this._parsed.border.match=Fe[e]=t)}if(this._parsed.border.id&&(t.style.borderWidth=this._parsed.border.match[1],t.style.borderStyle=`solid`,t.style.borderColor=this._parsed.border.match[4]),t.style.outline!==this._parsed.outline.id)if(!t.style.outline)this._parsed.outline.id=null,this._parsed.outline.match=[];else{let e=Fe[t.style.outline]||Pe.exec(t.style.outline)||Pe.exec(t.style.outline);e&&(this._parsed.outline.id=t.style.outline,this._parsed.outline.match=Fe[t.style.outline]=e)}this._parsed.outline.id&&(t.style.outlineWidth=this._parsed.outline.match[1],t.style.outlineStyle=`solid`,t.style.outlineColor=this._parsed.outline.match[4]),this.props.style=t.style,t.backgroundColor&&!this.props.style.backgroundColor&&(this.props.style.backgroundColor=t.backgroundColor,n=!0),t.style.background&&!this.props.style.backgroundColor&&(this.props.style.backgroundColor=t.style.background,n=!0);for(let e of Ie)if(this.props.style[e]!==t.style[e]){n=!0;break}t.style[`:hover`]!==this.props.hoverStyles&&(this.props.hoverStyles=t.style[`:hover`],this.hoverEvents||(this.hoverEvents=!0,this.addEventListener(`pointerenter`,this.addHover),this.addEventListener(`pointerleave`,this.removeHover)),n=!0),t.style[`:active`]!==this.props.pressStyles&&(this.props.pressStyles=t.style[`:active`],this.activeEvents||(this.activeEvents=!0,this.addEventListener(`mousedown`,this.addPress),this.addEventListener(`mouseup`,this.removePress)),n=!0)}t.href!==this.props.href&&(this.props.href=t.href,n=!0),t.hrefTarget!==this.props.hrefTarget&&(this.props.hrefTarget=t.hrefTarget,n=!0),t.title!==this.props.title&&(this.props.title=t.title,n=!0),t.className!==this.props.className&&(this.props.className=t.className,t.className&&!this.hoverEvents&&(this.hoverEvents=!0,this.addEventListener(`pointerenter`,this.addHover),this.addEventListener(`pointerleave`,this.removeHover)),t.className&&!this.activeEvents&&(this.activeEvents=!0,this.addEventListener(`mousedown`,this.addPress),this.addEventListener(`mouseup`,this.removePress)),n=!0),t.relativeSize!==this.props.relativeSize&&(this.props.relativeSize=t.relativeSize,n=!0),t.relativeStyle!==this.props.relativeStyle&&(this.props.relativeStyle=t.relativeStyle,n=!0),t.html!==this.props.html&&(this.props.html=t.html,n=!0),t.target&&(t.target.width!==this.display.width||t.target.height!==this.display.height||t.target.x!==this.points[1]||t.target.y!==this.points[2])&&(n=!0,this.points=e.singleBox(t.target.width,t.target.height,t.target.x,t.target.y),this.display.points=e.singleBox(t.target.width,t.target.height,t.target.x,t.target.y),this.display.width=t.target.width,this.display.height=t.target.height),n&&this.__revision++}};const Re=typeof performance==`object`&&performance&&typeof performance.now==`function`?performance:Date,ze=typeof AbortController==`function`?AbortController:class{constructor(){this.signal=new He}abort(e=Error(`This operation was aborted`)){this.signal.reason=this.signal.reason||e,this.signal.aborted=!0,this.signal.dispatchEvent({type:`abort`,target:this.signal})}},Be=typeof AbortSignal==`function`,Ve=typeof ze.AbortSignal==`function`,He=Be?AbortSignal:Ve?ze.AbortController:class{constructor(){this.reason=void 0,this.aborted=!1,this._listeners=[]}dispatchEvent(e){e.type===`abort`&&(this.aborted=!0,this.onabort(e),this._listeners.forEach(t=>t(e),this))}onabort(){}addEventListener(e,t){e===`abort`&&this._listeners.push(t)}removeEventListener(e,t){e===`abort`&&(this._listeners=this._listeners.filter(e=>e!==t))}},Ue=new Set,We=(e,t)=>{let n=`LRU_CACHE_OPTION_${e}`;Je(n)&&Ye(n,`${e} option`,`options.${t}`,$e)},Ge=(e,t)=>{let n=`LRU_CACHE_METHOD_${e}`;if(Je(n)){let{prototype:r}=$e,{get:i}=Object.getOwnPropertyDescriptor(r,e);Ye(n,`${e} method`,`cache.${t}()`,i)}},Ke=(e,t)=>{let n=`LRU_CACHE_PROPERTY_${e}`;if(Je(n)){let{prototype:r}=$e,{get:i}=Object.getOwnPropertyDescriptor(r,e);Ye(n,`${e} property`,`cache.${t}`,i)}},qe=(...e)=>{typeof process==`object`&&process&&typeof process.emitWarning==`function`?process.emitWarning(...e):console.error(...e)},Je=e=>!Ue.has(e),Ye=(e,t,n,r)=>{Ue.add(e),qe(`The ${t} is deprecated. Please use ${n} instead.`,`DeprecationWarning`,e,r)},J=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),Xe=e=>J(e)?e<=2**8?Uint8Array:e<=2**16?Uint16Array:e<=2**32?Uint32Array:e<=2**53-1?Ze:null:null;var Ze=class extends Array{constructor(e){super(e),this.fill(0)}},Qe=class{constructor(e){if(e===0)return[];this.heap=new(Xe(e))(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},$e=class e{constructor(t={}){let{max:n=0,ttl:r,ttlResolution:i=1,ttlAutopurge:a,updateAgeOnGet:o,updateAgeOnHas:s,allowStale:c,dispose:l,disposeAfter:u,noDisposeOnSet:d,noUpdateTTL:f,maxSize:p=0,maxEntrySize:m=0,sizeCalculation:h,fetchMethod:g,fetchContext:_,noDeleteOnFetchRejection:v,noDeleteOnStaleGet:y,allowStaleOnFetchRejection:b,allowStaleOnFetchAbort:x,ignoreFetchAbort:S}=t,{length:C,maxAge:w,stale:T}=t instanceof e?{}:t;if(n!==0&&!J(n))throw TypeError(`max option must be a nonnegative integer`);let E=n?Xe(n):Array;if(!E)throw Error(`invalid max value: `+n);if(this.max=n,this.maxSize=p,this.maxEntrySize=m||this.maxSize,this.sizeCalculation=h||C,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw TypeError(`cannot set sizeCalculation without setting maxSize or maxEntrySize`);if(typeof this.sizeCalculation!=`function`)throw TypeError(`sizeCalculation set to non-function`)}if(this.fetchMethod=g||null,this.fetchMethod&&typeof this.fetchMethod!=`function`)throw TypeError(`fetchMethod must be a function if specified`);if(this.fetchContext=_,!this.fetchMethod&&_!==void 0)throw TypeError(`cannot set fetchContext without fetchMethod`);if(this.keyMap=new Map,this.keyList=Array(n).fill(null),this.valList=Array(n).fill(null),this.next=new E(n),this.prev=new E(n),this.head=0,this.tail=0,this.free=new Qe(n),this.initialFill=1,this.size=0,typeof l==`function`&&(this.dispose=l),typeof u==`function`?(this.disposeAfter=u,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!d,this.noUpdateTTL=!!f,this.noDeleteOnFetchRejection=!!v,this.allowStaleOnFetchRejection=!!b,this.allowStaleOnFetchAbort=!!x,this.ignoreFetchAbort=!!S,this.maxEntrySize!==0){if(this.maxSize!==0&&!J(this.maxSize))throw TypeError(`maxSize must be a positive integer if specified`);if(!J(this.maxEntrySize))throw TypeError(`maxEntrySize must be a positive integer if specified`);this.initializeSizeTracking()}if(this.allowStale=!!c||!!T,this.noDeleteOnStaleGet=!!y,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!s,this.ttlResolution=J(i)||i===0?i:1,this.ttlAutopurge=!!a,this.ttl=r||w||0,this.ttl){if(!J(this.ttl))throw TypeError(`ttl must be a positive integer if specified`);this.initializeTTLTracking()}if(this.max===0&&this.ttl===0&&this.maxSize===0)throw TypeError(`At least one of max, maxSize, or ttl is required`);if(!this.ttlAutopurge&&!this.max&&!this.maxSize){let t=`LRU_CACHE_UNBOUNDED`;Je(t)&&(Ue.add(t),qe(`TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.`,`UnboundedCacheWarning`,t,e))}T&&We(`stale`,`allowStale`),w&&We(`maxAge`,`ttl`),C&&We(`length`,`sizeCalculation`)}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new Ze(this.max),this.starts=new Ze(this.max),this.setItemTTL=(e,t,n=Re.now())=>{if(this.starts[e]=t===0?0:n,this.ttls[e]=t,t!==0&&this.ttlAutopurge){let n=setTimeout(()=>{this.isStale(e)&&this.delete(this.keyList[e])},t+1);n.unref&&n.unref()}},this.updateItemAge=e=>{this.starts[e]=this.ttls[e]===0?0:Re.now()},this.statusTTL=(n,r)=>{n&&(n.ttl=this.ttls[r],n.start=this.starts[r],n.now=e||t(),n.remainingTTL=n.now+n.ttl-n.start)};let e=0,t=()=>{let t=Re.now();if(this.ttlResolution>0){e=t;let n=setTimeout(()=>e=0,this.ttlResolution);n.unref&&n.unref()}return t};this.getRemainingTTL=n=>{let r=this.keyMap.get(n);return r===void 0?0:this.ttls[r]===0||this.starts[r]===0?1/0:this.starts[r]+this.ttls[r]-(e||t())},this.isStale=n=>this.ttls[n]!==0&&this.starts[n]!==0&&(e||t())-this.starts[n]>this.ttls[n]}updateItemAge(e){}statusTTL(e,t){}setItemTTL(e,t,n){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new Ze(this.max),this.removeItemSize=e=>{this.calculatedSize-=this.sizes[e],this.sizes[e]=0},this.requireSize=(e,t,n,r)=>{if(this.isBackgroundFetch(t))return 0;if(!J(n))if(r){if(typeof r!=`function`)throw TypeError(`sizeCalculation must be a function`);if(n=r(t,e),!J(n))throw TypeError(`sizeCalculation return invalid (expect positive integer)`)}else throw TypeError(`invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.`);return n},this.addItemSize=(e,t,n)=>{if(this.sizes[e]=t,this.maxSize){let t=this.maxSize-this.sizes[e];for(;this.calculatedSize>t;)this.evict(!0)}this.calculatedSize+=this.sizes[e],n&&(n.entrySize=t,n.totalCalculatedSize=this.calculatedSize)}}removeItemSize(e){}addItemSize(e,t){}requireSize(e,t,n,r){if(n||r)throw TypeError(`cannot set size without setting maxSize or maxEntrySize on cache`)}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.tail;!(!this.isValidIndex(t)||((e||!this.isStale(t))&&(yield t),t===this.head));)t=this.prev[t]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.head;!(!this.isValidIndex(t)||((e||!this.isStale(t))&&(yield t),t===this.tail));)t=this.next[t]}isValidIndex(e){return e!==void 0&&this.keyMap.get(this.keyList[e])===e}*entries(){for(let e of this.indexes())this.valList[e]!==void 0&&this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield[this.keyList[e],this.valList[e]])}*rentries(){for(let e of this.rindexes())this.valList[e]!==void 0&&this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield[this.keyList[e],this.valList[e]])}*keys(){for(let e of this.indexes())this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.keyList[e])}*rkeys(){for(let e of this.rindexes())this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.keyList[e])}*values(){for(let e of this.indexes())this.valList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.valList[e])}*rvalues(){for(let e of this.rindexes())this.valList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.valList[e])}[Symbol.iterator](){return this.entries()}find(e,t){for(let n of this.indexes()){let r=this.valList[n],i=this.isBackgroundFetch(r)?r.__staleWhileFetching:r;if(i!==void 0&&e(i,this.keyList[n],this))return this.get(this.keyList[n],t)}}forEach(e,t=this){for(let n of this.indexes()){let r=this.valList[n],i=this.isBackgroundFetch(r)?r.__staleWhileFetching:r;i!==void 0&&e.call(t,i,this.keyList[n],this)}}rforEach(e,t=this){for(let n of this.rindexes()){let r=this.valList[n],i=this.isBackgroundFetch(r)?r.__staleWhileFetching:r;i!==void 0&&e.call(t,i,this.keyList[n],this)}}get prune(){return Ge(`prune`,`purgeStale`),this.purgeStale}purgeStale(){let e=!1;for(let t of this.rindexes({allowStale:!0}))this.isStale(t)&&(this.delete(this.keyList[t]),e=!0);return e}dump(){let e=[];for(let t of this.indexes({allowStale:!0})){let n=this.keyList[t],r=this.valList[t],i=this.isBackgroundFetch(r)?r.__staleWhileFetching:r;if(i===void 0)continue;let a={value:i};if(this.ttls){a.ttl=this.ttls[t];let e=Re.now()-this.starts[t];a.start=Math.floor(Date.now()-e)}this.sizes&&(a.size=this.sizes[t]),e.unshift([n,a])}return e}load(e){this.clear();for(let[t,n]of e){if(n.start){let e=Date.now()-n.start;n.start=Re.now()-e}this.set(t,n.value,n)}}dispose(e,t,n){}set(e,t,{ttl:n=this.ttl,start:r,noDisposeOnSet:i=this.noDisposeOnSet,size:a=0,sizeCalculation:o=this.sizeCalculation,noUpdateTTL:s=this.noUpdateTTL,status:c}={}){if(a=this.requireSize(e,t,a,o),this.maxEntrySize&&a>this.maxEntrySize)return c&&(c.set=`miss`,c.maxEntrySizeExceeded=!0),this.delete(e),this;let l=this.size===0?void 0:this.keyMap.get(e);if(l===void 0)l=this.newIndex(),this.keyList[l]=e,this.valList[l]=t,this.keyMap.set(e,l),this.next[this.tail]=l,this.prev[l]=this.tail,this.tail=l,this.size++,this.addItemSize(l,a,c),c&&(c.set=`add`),s=!1;else{this.moveToTail(l);let n=this.valList[l];if(t!==n){if(this.isBackgroundFetch(n)?n.__abortController.abort(Error(`replaced`)):i||(this.dispose(n,e,`set`),this.disposeAfter&&this.disposed.push([n,e,`set`])),this.removeItemSize(l),this.valList[l]=t,this.addItemSize(l,a,c),c){c.set=`replace`;let e=n&&this.isBackgroundFetch(n)?n.__staleWhileFetching:n;e!==void 0&&(c.oldValue=e)}}else c&&(c.set=`update`)}if(n!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),s||this.setItemTTL(l,n,r),this.statusTTL(c,l),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return this.size===0?this.tail:this.size===this.max&&this.max!==0?this.evict(!1):this.free.length===0?this.initialFill++:this.free.pop()}pop(){if(this.size){let e=this.valList[this.head];return this.evict(!0),e}}evict(e){let t=this.head,n=this.keyList[t],r=this.valList[t];return this.isBackgroundFetch(r)?r.__abortController.abort(Error(`evicted`)):(this.dispose(r,n,`evict`),this.disposeAfter&&this.disposed.push([r,n,`evict`])),this.removeItemSize(t),e&&(this.keyList[t]=null,this.valList[t]=null,this.free.push(t)),this.head=this.next[t],this.keyMap.delete(n),this.size--,t}has(e,{updateAgeOnHas:t=this.updateAgeOnHas,status:n}={}){let r=this.keyMap.get(e);if(r!==void 0)if(this.isStale(r))n&&(n.has=`stale`,this.statusTTL(n,r));else return t&&this.updateItemAge(r),n&&(n.has=`hit`),this.statusTTL(n,r),!0;else n&&(n.has=`miss`);return!1}peek(e,{allowStale:t=this.allowStale}={}){let n=this.keyMap.get(e);if(n!==void 0&&(t||!this.isStale(n))){let e=this.valList[n];return this.isBackgroundFetch(e)?e.__staleWhileFetching:e}}backgroundFetch(e,t,n,r){let i=t===void 0?void 0:this.valList[t];if(this.isBackgroundFetch(i))return i;let a=new ze;n.signal&&n.signal.addEventListener(`abort`,()=>a.abort(n.signal.reason));let o={signal:a.signal,options:n,context:r},s=(r,i=!1)=>{let{aborted:s}=a.signal,c=n.ignoreFetchAbort&&r!==void 0;return n.status&&(s&&!i?(n.status.fetchAborted=!0,n.status.fetchError=a.signal.reason,c&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),s&&!c&&!i?l(a.signal.reason):(this.valList[t]===d&&(r===void 0?d.__staleWhileFetching?this.valList[t]=d.__staleWhileFetching:this.delete(e):(n.status&&(n.status.fetchUpdated=!0),this.set(e,r,o.options))),r)},c=e=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=e),l(e)),l=r=>{let{aborted:i}=a.signal,o=i&&n.allowStaleOnFetchAbort,s=o||n.allowStaleOnFetchRejection,c=s||n.noDeleteOnFetchRejection;if(this.valList[t]===d&&(!c||d.__staleWhileFetching===void 0?this.delete(e):o||(this.valList[t]=d.__staleWhileFetching)),s)return n.status&&d.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),d.__staleWhileFetching;if(d.__returned===d)throw r},u=(t,r)=>{this.fetchMethod(e,i,o).then(e=>t(e),r),a.signal.addEventListener(`abort`,()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(t(),n.allowStaleOnFetchAbort&&(t=e=>s(e,!0)))})};n.status&&(n.status.fetchDispatched=!0);let d=new Promise(u).then(s,c);return d.__abortController=a,d.__staleWhileFetching=i,d.__returned=null,t===void 0?(this.set(e,d,{...o.options,status:void 0}),t=this.keyMap.get(e)):this.valList[t]=d,d}isBackgroundFetch(e){return e&&typeof e==`object`&&typeof e.then==`function`&&Object.prototype.hasOwnProperty.call(e,`__staleWhileFetching`)&&Object.prototype.hasOwnProperty.call(e,`__returned`)&&(e.__returned===e||e.__returned===null)}async fetch(e,{allowStale:t=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:i=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:o=0,sizeCalculation:s=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:l=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:u=this.allowStaleOnFetchRejection,ignoreFetchAbort:d=this.ignoreFetchAbort,allowStaleOnFetchAbort:f=this.allowStaleOnFetchAbort,fetchContext:p=this.fetchContext,forceRefresh:m=!1,status:h,signal:g}={}){if(!this.fetchMethod)return h&&(h.fetch=`get`),this.get(e,{allowStale:t,updateAgeOnGet:n,noDeleteOnStaleGet:r,status:h});let _={allowStale:t,updateAgeOnGet:n,noDeleteOnStaleGet:r,ttl:i,noDisposeOnSet:a,size:o,sizeCalculation:s,noUpdateTTL:c,noDeleteOnFetchRejection:l,allowStaleOnFetchRejection:u,allowStaleOnFetchAbort:f,ignoreFetchAbort:d,status:h,signal:g},v=this.keyMap.get(e);if(v===void 0){h&&(h.fetch=`miss`);let t=this.backgroundFetch(e,v,_,p);return t.__returned=t}else{let r=this.valList[v];if(this.isBackgroundFetch(r)){let e=t&&r.__staleWhileFetching!==void 0;return h&&(h.fetch=`inflight`,e&&(h.returnedStale=!0)),e?r.__staleWhileFetching:r.__returned=r}let i=this.isStale(v);if(!m&&!i)return h&&(h.fetch=`hit`),this.moveToTail(v),n&&this.updateItemAge(v),this.statusTTL(h,v),r;let a=this.backgroundFetch(e,v,_,p),o=a.__staleWhileFetching!==void 0,s=o&&t;return h&&(h.fetch=o&&i?`stale`:`refresh`,s&&i&&(h.returnedStale=!0)),s?a.__staleWhileFetching:a.__returned=a}}get(e,{allowStale:t=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:i}={}){let a=this.keyMap.get(e);if(a!==void 0){let o=this.valList[a],s=this.isBackgroundFetch(o);return this.statusTTL(i,a),this.isStale(a)?(i&&(i.get=`stale`),s?(i&&(i.returnedStale=t&&o.__staleWhileFetching!==void 0),t?o.__staleWhileFetching:void 0):(r||this.delete(e),i&&(i.returnedStale=t),t?o:void 0)):(i&&(i.get=`hit`),s?o.__staleWhileFetching:(this.moveToTail(a),n&&this.updateItemAge(a),o))}else i&&(i.get=`miss`)}connect(e,t){this.prev[t]=e,this.next[e]=t}moveToTail(e){e!==this.tail&&(e===this.head?this.head=this.next[e]:this.connect(this.prev[e],this.next[e]),this.connect(this.tail,e),this.tail=e)}get del(){return Ge(`del`,`delete`),this.delete}delete(e){let t=!1;if(this.size!==0){let n=this.keyMap.get(e);if(n!==void 0)if(t=!0,this.size===1)this.clear();else{this.removeItemSize(n);let t=this.valList[n];this.isBackgroundFetch(t)?t.__abortController.abort(Error(`deleted`)):(this.dispose(t,e,`delete`),this.disposeAfter&&this.disposed.push([t,e,`delete`])),this.keyMap.delete(e),this.keyList[n]=null,this.valList[n]=null,n===this.tail?this.tail=this.prev[n]:n===this.head?this.head=this.next[n]:(this.next[this.prev[n]]=this.next[n],this.prev[this.next[n]]=this.prev[n]),this.size--,this.free.push(n)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return t}clear(){for(let e of this.rindexes({allowStale:!0})){let t=this.valList[e];if(this.isBackgroundFetch(t))t.__abortController.abort(Error(`deleted`));else{let n=this.keyList[e];this.dispose(t,n,`delete`),this.disposeAfter&&this.disposed.push([t,n,`delete`])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return Ge(`reset`,`clear`),this.clear}get length(){return Ke(`length`,`size`),this.size}static get AbortController(){return ze}static get AbortSignal(){return He}},et=$e;const tt=/(-?[0-9]+(px|em)\s+|0\s+)(-?[0-9]+(px|em)\s+|0\s+)(-?[0-9]+(px|em)\s+|0\s+)?(-?[0-9]+(px|em)\s+|0\s+)?(.*)/g,nt={},rt=typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(`firefox`),it={};var at=class{constructor(e,t){L(this,`canvas`,void 0),L(this,`ctx`,void 0),L(this,`options`,void 0),L(this,`imagesPending`,0),L(this,`imagesLoaded`,0),L(this,`imageIdsLoaded`,[]),L(this,`frameIsRendering`,!1),L(this,`pendingDrawCall`,!1),L(this,`firstMeaningfulPaint`,!1),L(this,`parallelTasks`,8),L(this,`frameTasks`,0),L(this,`loadingQueueOrdered`,!0),L(this,`loadingQueue`,[]),L(this,`currentTask`,Promise.resolve()),L(this,`tasksRunning`,0),L(this,`stats`,void 0),L(this,`averageJobTime`,64),L(this,`lastKnownScale`,1),L(this,`visible`,[]),L(this,`previousVisible`,[]),L(this,`rendererPosition`,void 0),L(this,`dpi`,void 0),L(this,`drawCalls`,[]),L(this,`lastPaintedObject`,void 0),L(this,`hostCache`,void 0),L(this,`invalidated`,[]),L(this,`_worker`,()=>{if(this.loadingQueue.length){let e=this.loadingQueue.pop();e&&(this.tasksRunning++,this.frameTasks++,this.currentTask=e.task().then(()=>{this.tasksRunning--}).catch(()=>{this.tasksRunning--}))}}),L(this,`_scheduled`,0),L(this,`_doWork`,()=>{this.loadingQueue.length===0&&this.tasksRunning===0&&this._scheduled&&(clearInterval(this._scheduled),this._scheduled=0);let e=this.parallelTasks||1;!this.firstMeaningfulPaint&&this.loadingQueue.length&&(e=this.loadingQueue.length);for(let t=0;t<=e;t++)this._worker()}),this.canvas=e,this.rendererPosition=e.getBoundingClientRect(),this.ctx=e.getContext(`2d`,{alpha:!0}),this.ctx.imageSmoothingEnabled=!0,this.options=t||{},this.canvas.style.transition=`opacity .3s`,this.dpi=t?.dpi||1,this.hostCache=t?.lruCache?new et({maxSize:1024*512*512,dispose:(e,t,n)=>{this.invalidated.push(t),e.width=0,e.height=0},sizeCalculation:(e,t)=>e.width*e.height}):{store:{},get(e){return this.store[e]},set(e,t){this.store[e]=t}}}getCanvasDims(){return{width:this.canvas.width/this.dpi,height:this.canvas.height/this.dpi}}resize(){this.rendererPosition=this.canvas.getBoundingClientRect()}isReady(){return this.firstMeaningfulPaint}afterFrame(e){if(this.clearTransform(),this.lastPaintedObject=void 0,this.frameIsRendering=!1,this.imagesPending=Math.max(0,this.imagesPending-this.imagesLoaded),this.imagesLoaded=0,this.loadingQueueOrdered||(this.loadingQueue=this.loadingQueue.sort((e,t)=>e.network&&e.scale===t.scale?t.distance-e.distance:e.scale<t.scale?-1:1),this.loadingQueueOrdered=!0),this.previousVisible=this.visible,this.pendingDrawCall=!!this.drawCalls.length,this.pendingDrawCall)for(let e=0;e<this.drawCalls.length;e++){let e=this.drawCalls.shift();e&&e()}this.doOffscreenWork(),this.options.debug&&this.stats&&this.stats.end()}doOffscreenWork(){this.frameTasks=0,this.loadingQueue.length&&(this._worker(),this.loadingQueue.length&&(this._scheduled||(this._scheduled=setInterval(this._doWork,0))))}getScale(e,t,n){if(Number.isNaN(e)||Number.isNaN(t))return this.lastKnownScale;let r=this.getCanvasDims(),i=r.width/e,a=r.height/t,o=(i<a?a:i)*(n&&this.dpi||1);return Number.isNaN(o)||(this.lastKnownScale=o),this.lastKnownScale}beforeFrame(e,t,n,r){this.options.debug&&this.stats&&this.stats.begin(),this.frameIsRendering=!0,this.visible=[],this.options.beforeFrame&&this.options.beforeFrame(t);let i=this.getCanvasDims();if(this.ctx.globalAlpha=1,this.ctx.fillStyle=this.canvas.dataset.background??`rgb(0, 0, 0)`,this.ctx.fillRect(0,0,i.width,i.height),r.enableFilters&&(r.filters.brightness||r.filters.contrast||r.filters.grayscale||r.filters.invert||r.filters.sepia||r.filters.saturate||r.filters.hueRotate||r.filters.blur)){let e=``;r.filters.brightness&&(e+=`brightness(${~~(100+r.filters.brightness*100)}%) `),r.filters.contrast&&(e+=`contrast(${~~(100+r.filters.contrast*100)}%) `),r.filters.grayscale&&(e+=`grayscale(${~~(r.filters.grayscale*100)}%) `),r.filters.invert&&(e+=`invert(${~~(r.filters.invert*100)}%) `),r.filters.sepia&&(e+=`sepia(${~~(r.filters.sepia*100)}%) `),r.filters.saturate&&(e+=`saturate(${~~(100+r.filters.saturate*100)}%) `),r.filters.hueRotate&&(e+=`hue-rotate(${r.filters.hueRotate}deg) `),r.filters.blur&&(e+=`blur(${r.filters.blur}px) `),this.ctx.filter!==e&&(this.ctx.filter=e)}else this.ctx.filter=`none`}applyTransform(e,t,n,r,i){let a=e.__owner.value;if(a&&a.rotation){this.ctx.save();let e=t+r/2,o=n+i/2;this.ctx.translate(e,o),this.ctx.rotate(a.rotation*Math.PI/180),this.ctx.translate(-e,-o),this.lastPaintedObject=a}}clearTransform(){this.lastPaintedObject&&(this.lastPaintedObject.rotation&&this.ctx.restore(),this.lastPaintedObject=void 0)}paint(e,t,n,r,i,a){let o=this.ctx.globalAlpha;if(e instanceof z||e instanceof H){if(e.display.rotation){this.ctx.save();let o=n+i/2,s=r+a/2;e.crop&&(o-=e.crop[t*5+1],s-=e.crop[t*5+2]),this.ctx.translate(o,s),this.ctx.rotate(e.display.rotation*Math.PI/180),this.ctx.translate(-o,-s)}if(this.visible.push(e),typeof e.style&&e.style.opacity!==`undefined`){if(!e.style.opacity)return;this.ctx.globalAlpha=e.style.opacity}try{let o=e.__host.canvas,s=this.getCanvasDims();if((o.indices.indexOf(t)===-1||this.invalidated.indexOf(o.canvases[t])!==-1)&&this.schedulePaintToCanvas(o,e,t,V({x:n+i/2,y:r+i/2},{x:s.width/2,y:s.height/2})),!this.firstMeaningfulPaint)return;let c=this.hostCache.get(o.canvases[t]);if(c)if(e.crop&&e.cropData){if(e.crop[t*5]){let o=[e.crop[t*5+1]/e.display.scale-e.display.points[t*5+1],e.crop[t*5+2]/e.display.scale-e.display.points[t*5+2],1+(e.crop[t*5+3]-e.crop[t*5+1])/e.display.scale,1+(e.crop[t*5+4]-e.crop[t*5+2])/e.display.scale];o[0]+=e.cropData.x/e.display.scale,o[1]+=e.cropData.y/e.display.scale;let s=e.x*this.lastKnownScale,l=e.y*this.lastKnownScale,u=[n+s,r+l,i,a];u[0]+=s,u[1]+=l,this.ctx.drawImage(c,o[0],o[1],o[2],o[3],u[0],u[1],u[2]+1,u[3]+1)}}else rt?this.ctx.drawImage(c,0,0,e.display.points[t*5+3]-e.display.points[t*5+1],e.display.points[t*5+4]-e.display.points[t*5+2],n,r,i+1,a+1):this.ctx.drawImage(c,0,0,e.display.points[t*5+3]-e.display.points[t*5+1],e.display.points[t*5+4]-e.display.points[t*5+2],n,r,i+Number.MIN_VALUE+.5,a+Number.MIN_VALUE+.5)}catch{}e.display.rotation&&this.ctx.restore()}let s=e instanceof G&&this.options.box,c=e instanceof Le&&this.options.polygon;if((s||c)&&!e.props.className&&!e.props.html&&!e.props.href){if(this.visible.push(e),e.props.style){let t=Object.assign({},e.props.style||{},e.hovering?e.props.hoverStyles:{},e.pressing?e.props.pressStyles:{}),o=e.props.relativeStyle?1:i/e.width;t.opacity!==void 0&&(this.ctx.globalAlpha=t.opacity);let s=0;t.borderWidth!==void 0&&(s=parseInt(t.borderWidth,10)*o);let l=0;t.outlineWidth!==void 0&&(l=parseInt(t.outlineWidth,10)*o);let u=0;if(t.outlineOffset!==void 0&&(u=parseInt(t.outlineOffset,10)*o),t.borderColor&&(this.ctx.strokeStyle=t.borderColor),t.boxShadow){let e=t.boxShadow.split(/,(?![^(]*\))/);for(let t of e){let e=nt[t]||tt.exec(t)||tt.exec(t);nt[t]=e,e&&(this.ctx.save(),this.ctx.shadowOffsetX=parseInt(e[1])*this.dpi*o,this.ctx.shadowOffsetY=parseInt(e[3])*this.dpi*o,this.ctx.shadowBlur=parseInt(e[5])*this.dpi*o,this.ctx.shadowColor=e[9],this.ctx.fillStyle=`rgba(0,0,0,1)`,this.ctx.fillRect(n+s,r+s,i,a),this.ctx.restore())}}if(this.ctx.fillStyle=t.backgroundColor||`transparent`,this.ctx.lineWidth=s,c){let t=e.shape,i=t.points||[],a=i.length;this.ctx.beginPath();for(let e=0;e<a;e++)this.ctx.lineTo(n+i[e][0]*this.lastKnownScale,r+i[e][1]*this.lastKnownScale);t.open||this.ctx.closePath(),s&&this.ctx.stroke(),t.open||this.ctx.fill()}else s&&this.ctx.strokeRect(n+s/2,r+s/2,i+s,a+s),this.ctx.fillRect(n+s,r+s,i,a);l&&(t.outlineColor&&(this.ctx.strokeStyle=t.outlineColor),this.ctx.lineWidth=l,this.ctx.strokeRect(n-l/2-u,r-l/2-u,i+s*2+l+u*2,a+s*2+l+u*2))}this.ctx.globalAlpha=o}}loadImage(e,t,n,r=!1){if(it[e]&&it[e].naturalWidth>0){t(it[e]);return}try{let i=!1;r||setTimeout(()=>{i||this.loadImage(e,t,n,!0)},3e3);let a=document.createElement(`img`);a.decoding=`auto`,a.onload=function(){i=!0,t(a),it[e]=a,a.onload=null},this.options.crossOrigin&&(a.crossOrigin=`anonymous`),a.src=e,a.complete&&a.onload({}),a.width}catch(e){console.log(`image error`,e),n(e)}}schedulePaintToCanvas(e,t,n,r){this.imagesPending++,e.indices.push(n);let i=`${t.id}--${t.display.scale}-${n}`,a=this.invalidated.indexOf(i);a!==-1&&this.invalidated.splice(a,1),e.canvases[n]=i,t.__host.canvas.loading=!0,this.loadingQueueOrdered=!1,this.loadingQueue.push({id:i,scale:t.display.scale,network:!0,distance:r,task:()=>new Promise(a=>{if(this.visible.indexOf(t)===-1){this.imagesPending--,e.indices.splice(e.indices.indexOf(n),1),a();return}let o=t.getImageUrl(n);this.loadImage(o,o=>{this.loadingQueue.push({id:i,scale:t.display.scale,distance:r,task:()=>new Promise(r=>{this.imageIdsLoaded.includes(i)||(this.imagesLoaded++,this.imageIdsLoaded.push(i)),e.loaded.push(n),e.loaded.length===e.indices.length&&(e.loading=!1);let a=t.display.points.slice(n*5,n*5+5),s=document.createElement(`canvas`),c=s.getContext(`2d`);s.width=a[3]-a[1],s.height=a[4]-a[2],this.hostCache.set(e.canvases[n],s),this.drawCalls.push(()=>{c.drawImage(o,0,0,a[3]-a[1],a[4]-a[2]),r()})})}),a()},t=>{this.imagesPending--,e.indices.splice(e.indices.indexOf(n),1),a()})})})}afterPaintLayer(e,t){}prepareLayer(e,t){e.__owner.value&&(e.cropData&&this.lastKnownScale*(1/e.display.scale),this.applyTransform(e,t[1],t[2],t[3]-t[1],t[4]-t[2])),(!e.__host||!e.__host.canvas)&&(e instanceof z||e instanceof H)&&this.createImageHost(e)}finishLayer(){this.lastPaintedObject&&this.clearTransform()}createImageHost(e){e.__host=e.__host?e.__host:{},e.__host.canvas={canvas:void 0,canvases:[],indices:[],loaded:[],loading:!1}}getPointsAt(e,t,n,r){return e.getPointsAt(t,n,r)}getViewportBounds(e,t,n){let r=e.getActiveZone();if(r){let e=t[3]-t[1]<r.points[3]-r.points[1],i=t[4]-t[2]<r.points[4]-r.points[2];return{x1:e?r.points[1]-n:r.points[1]+(r.points[3]-r.points[1])/2-(t[3]-t[1])/2,y1:i?r.points[2]-n:r.points[2]+(r.points[4]-r.points[2])/2-(t[4]-t[2])/2,x2:e?r.points[3]+n:r.points[1]+(r.points[3]-r.points[1])/2-(t[3]-t[1])/2,y2:i?r.points[4]+n:r.points[2]+(r.points[4]-r.points[2])/2-(t[4]-t[2])/2}}return null}pendingUpdate(){let e=!this.pendingDrawCall&&this.drawCalls.length===0&&this.imagesPending===0&&this.loadingQueue.length===0&&this.tasksRunning===0;return!e&&this.visible.length===0&&setTimeout(()=>{this.canvas.style.opacity=`1`,this.firstMeaningfulPaint=!0},500),!this.firstMeaningfulPaint&&e&&this.visible.length?(this.canvas.style.opacity=`1`,this.firstMeaningfulPaint=e,!0):this.options.debug?!0:!e}getRendererScreenPosition(){return this.rendererPosition}reset(){this.loadingQueue=[],this.drawCalls=[]}},ot=class{constructor(e){L(this,`renderers`,[]),L(this,`length`,void 0);for(let t of e)t&&this.renderers.push(t);this.length=this.renderers.length}afterFrame(e,t,n,r){for(let i=0;i<this.length;i++)this.renderers[i].afterFrame(e,t,n,r)}afterPaintLayer(e,t){for(let n=0;n<this.length;n++)this.renderers[n].afterPaintLayer(e,t)}beforeFrame(e,t,n,r){for(let i=0;i<this.length;i++)this.renderers[i].beforeFrame(e,t,n,r)}triggerResize(){for(let e=0;e<this.length;e++){let t=this.renderers[e];t.triggerResize&&t.triggerResize()}}getPointsAt(e,t,n,r){return this.renderers[0].getPointsAt(e,t,n,r)}getScale(e,t){return this.renderers[0].getScale(e,t)}getViewportBounds(e,t,n){return this.renderers[0].getViewportBounds(e,t,n)}getRendererScreenPosition(){return this.renderers[0].getRendererScreenPosition()}isReady(){for(let e=0;e<this.length;e++)if(!this.renderers[e].isReady())return!1;return!0}paint(e,t,n,r,i,a){for(let o=0;o<this.length;o++)this.renderers[o].paint(e,t,n,r,i,a)}pendingUpdate(){for(let e=0;e<this.length;e++)if(this.renderers[e].pendingUpdate())return!0;return!1}prepareLayer(e,t){for(let n=0;n<this.length;n++)this.renderers[n].prepareLayer(e,t)}finishLayer(e,t){for(let n=0;n<this.length;n++)this.renderers[n].finishLayer(e,t)}resize(e,t){for(let n=0;n<this.length;n++)this.renderers[n].resize(e,t)}reset(){for(let e=0;e<this.length;e++)this.renderers[e].reset()}},st=class{constructor(e){L(this,`canvas`,void 0),L(this,`context`,void 0),L(this,`heightRatio`,1),L(this,`widthRatio`,1),L(this,`target`,new Float32Array(5)),L(this,`initialWidth`,void 0),L(this,`initialHeight`,void 0),L(this,`bounds`,void 0),L(this,`aggregate`,void 0),L(this,`delta`,0),L(this,`renderNextFrame`,!0),this.canvas=e,this.initialWidth=e.width,this.initialHeight=e.height,this.context=e.getContext(`2d`),this.context.globalAlpha=.5,this.aggregate=s(1)}isReady(){return!0}resize(){this.initialWidth=this.canvas.width,this.initialHeight=this.canvas.height,this.renderNextFrame=!0}afterFrame(e,t,n){if(this.renderNextFrame){this.context.clearRect(0,0,this.canvas.width,this.canvas.height);let t=this.initialWidth/e.width,r=this.initialHeight/e.height,i=this.widthRatio>this.heightRatio?t:r;if(this.target=n,this.bounds){let t=e.getPointsAt(this.bounds,this.aggregate,i);for(let[e,n]of t)if(e instanceof z&&e.__host.canvas){let t=n.length/5;for(let r=0;r<t;r++)e.__host.canvas.canvases[r]&&(n[r+1]*i,n[r+2]*i,(n[r+3]-n[r+1])*i,(n[r+4]-n[r+2])*i)}}e.getPoints().forEach((e,t,n)=>{if(t%5==0&&e){let e={x1:n[t+1]*i,y1:n[t+2]*i,x2:n[t+3]*i,y2:n[t+4]*i,width:(n[t+3]-n[t+1])*i,height:(n[t+4]-n[t+2])*i};this.context.strokeStyle=`red`,this.context.strokeRect(e.x1,e.y1,e.width,e.height)}}),n&&(this.context.strokeStyle=`red`,this.context.lineWidth=window.devicePixelRatio||1,this.context.strokeRect(n[1]*i,n[2]*i,(n[3]-n[1])*i,(n[4]-n[2])*i))}}getActiveZone(e){return null}getPointsAt(e,t,n,r){return e.getPointsAt(t,n,r)}getScale(e,t){return 1}beforeFrame(t,n){this.bounds=e.singleBox(t.width,t.height)}drawImage(){}afterPaintLayer(e,t){}paint(e,t,n,r,i,a){this.renderNextFrame=!0}prepareLayer(e){}pendingUpdate(){return!1}hasActiveZone(){return!1}getViewportBounds(e,t,n){return null}getRendererScreenPosition(){return this.canvas.getBoundingClientRect()}finishLayer(){}reset(){}},ct=class{constructor(){L(this,`autoWidth`,!1),L(this,`autoHeight`,!0),L(this,`width`,void 0),L(this,`height`,void 0),L(this,`world`,void 0),L(this,`content`,[]),L(this,`viewingDirection`,`left-to-right`),L(this,`rows`,void 0),L(this,`columns`,4),L(this,`spacing`,20),L(this,`reversed`,!1),L(this,`padding`,20),this.world=W.withProps({width:0,height:0,viewingDirection:`left-to-right`}),this.width=0,this.height=0}setViewingDirection(e){this.viewingDirection=e}addContent(e){this.content.push(...e.map(e=>this.world.addObjectAt(e,{width:0,height:0,x:0,y:0})))}setWidth(e){this.width=e}setHeight(e){this.height=e}setSpacing(e){this.spacing=e}setPadding(e){this.padding=e}setRows(e){this.autoWidth=!0,this.rows=e}setColumns(e){this.autoHeight=!0,this.columns=e}recalculate(){if(this.height===0&&this.width===0||this.rows===0||this.columns===0)return;if(this.autoHeight&&!this.width)throw Error(`Cannot set auto height without setting a width`);if(this.autoWidth&&!this.height)throw Error(`Cannot set auto width without setting a height`);(this.viewingDirection===`left-to-right`||this.viewingDirection===`top-to-bottom`)&&this.reversed&&(this.reversed=!1,this.content.reverse()),(this.viewingDirection===`right-to-left`||this.viewingDirection===`bottom-to-top`)&&!this.reversed&&(this.reversed=!0,this.content.reverse());let e=this.content.length,{columns:t,rows:n}=(()=>{if(this.autoWidth&&this.rows){let t=e>this.rows?this.rows:e;return{columns:Math.ceil(e/t),rows:t}}if(this.autoHeight&&this.columns){let t=e>this.columns?this.columns:e;return{columns:t,rows:Math.ceil(e/t)}}throw Error(`Something went wrong.`)})(),r=this.autoWidth?-1:this.width-this.padding*2,i=this.autoWidth?-1:(r-this.spacing*(t-1))/t;if(this.autoHeight&&!this.autoWidth){let r=0,a=this.padding;for(let o=0;o<n&&r!==e;o++){let n=0,o=[];for(let a=0;a<t;a++){let t=this.reversed?e-r:r;if(r===e)break;let a=this.content[t],s=a.width,c=i/(a.width/a.height);o.push([r,i,c,i/s]),c>n&&(n=c),r++}for(let r=0;r<t&&o[r];r++){let t=this.world.getPoints(),i=o[r][0],s=o[r][1],c=o[r][2],l=o[r][3],u=this.padding+r*(this.spacing+s),d=a+(n-c)/2,f=this.reversed?e-i:i,p=t[f*5+1],m=t[f*5+2];this.world.scaleWorldObject(i,l),(p!==u||m!==d)&&this.world.translateWorldObject(f,u-p,d-m)}a+=n+this.spacing}this.height=a+this.padding,this.world.resize(this.width,this.height);return}this.autoWidth&&this.autoHeight,!this.autoWidth&&this.autoHeight}getWorld(){return this.world}},lt=j(((e,t)=>{var n=!1,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_;function v(){if(!n){n=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),v=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(m=/\b(iPhone|iP[ao]d)/.exec(e),h=/\b(iP[ao]d)/.exec(e),f=/Android/i.exec(e),g=/FBAN\/\w+;/i.exec(e),_=/Mobile/i.exec(e),p=!!/Win64/.exec(e),t){r=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,r&&document&&document.documentMode&&(r=document.documentMode);var y=/(?:Trident\/(\d+.\d+))/.exec(e);c=y?parseFloat(y[1])+4:r,i=t[2]?parseFloat(t[2]):NaN,a=t[3]?parseFloat(t[3]):NaN,o=t[4]?parseFloat(t[4]):NaN,o?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),s=t&&t[1]?parseFloat(t[1]):NaN):s=NaN}else r=i=a=s=o=NaN;if(v){if(v[1]){var b=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);l=b?parseFloat(b[1].replace(`_`,`.`)):!0}else l=!1;u=!!v[2],d=!!v[3]}else l=u=d=!1}}var y={ie:function(){return v()||r},ieCompatibilityMode:function(){return v()||c>r},ie64:function(){return y.ie()&&p},firefox:function(){return v()||i},opera:function(){return v()||a},webkit:function(){return v()||o},safari:function(){return y.webkit()},chrome:function(){return v()||s},windows:function(){return v()||u},osx:function(){return v()||l},linux:function(){return v()||d},iphone:function(){return v()||m},mobile:function(){return v()||m||h||f||_},nativeApp:function(){return v()||g},android:function(){return v()||f},ipad:function(){return v()||h}};t.exports=y})),ut=j(((e,t)=>{var n=!!(typeof window<`u`&&window.document&&window.document.createElement);t.exports={canUseDOM:n,canUseWorkers:typeof Worker<`u`,canUseEventListeners:n&&!!(window.addEventListener||window.attachEvent),canUseViewport:n&&!!window.screen,isInWorker:!n}})),dt=j(((e,t)=>{var n=ut(),r;n.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature(``,``)!==!0);
|
|
1
|
+
import{DnaFactory as e,compose as t,dna as n,dnaLength as r,getIntersection as i,hidePointsOutsideRegion as a,mutate as o,scale as s,scaleAtOrigin as c,transform as l,translate as u}from"@atlas-viewer/dna";import*as d from"react";import f,{memo as p,useCallback as m,useContext as h,useEffect as g,useLayoutEffect as _,useMemo as v,useRef as y,useState as b,version as x}from"react";import{Fragment as S,jsx as C,jsxs as w}from"react/jsx-runtime";import T from"react-use-measure";import E from"react-reconciler";import{ImageServiceLoader as D}from"@atlas-viewer/iiif-image-api";import{createThumbnailHelper as ee}from"@iiif/helpers/thumbnail";var O=Object.create,k=Object.defineProperty,A=Object.getOwnPropertyDescriptor,te=Object.getOwnPropertyNames,ne=Object.getPrototypeOf,re=Object.prototype.hasOwnProperty,j=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ie=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=te(t),a=0,o=i.length,s;a<o;a++)s=i[a],!re.call(e,s)&&s!==n&&k(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=A(t,s))||r.enumerable});return e},ae=(e,t,n)=>(n=e==null?{}:O(ne(e)),ie(t||!e||!e.__esModule?k(n,`default`,{value:e,enumerable:!0}):n,e));const oe=`onMouseDown.onMouseEnter.onMouseLeave.onMouseMove.onMouseOut.onMouseOver.onMouseUp.onTouchCancel.onTouchEnd.onTouchMove.onTouchStart.onPointerDown.onPointerMove.onPointerUp.onPointerCancel.onPointerEnter.onPointerLeave.onPointerOver.onPointerOut.onScroll.onWheel.onClick.onDragStart.onDragEnd.onDragEnter.onDragExit.onDrag.onDragOver.onContextMenu`.split(`.`);function M(){return oe.reduce((e,t)=>(e[t]=[],e),{})}const N=oe.reduce((e,t)=>(e[t.slice(2).toLowerCase()]=t,e[t]=t,e),{});let P=(e=21)=>{let t=``,n=crypto.getRandomValues(new Uint8Array(e));for(;e--;)t+=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`[n[e]&63];return t};function F(e){"@babel/helpers - typeof";return F=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},F(e)}function se(e,t){if(F(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(F(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function I(e){var t=se(e,`string`);return F(t)==`symbol`?t:t+``}function L(e,t,n){return(t=I(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var R=class{get crop(){return this._crop}set crop(e){this._crop=e}getObjectsAt(e){return[]}getAllPointsAt(e,t,n){return[]}getScheduledUpdates(e,t){return[]}constructor(){L(this,`__id`,void 0),L(this,`__revision`,0),L(this,`__host`,void 0),L(this,`__onCreate`,void 0),L(this,`__parent`,void 0),L(this,`__owner`,{value:void 0}),L(this,`__state`,{}),L(this,`eventHandlers`,void 0),L(this,`scale`,1),L(this,`layers`,[]),L(this,`time`,[]),L(this,`_crop`,void 0),L(this,`cropData`,void 0),L(this,`id`,void 0),L(this,`addEventListener`,(e,t,n)=>{let r=N[e];if(!this.eventHandlers[r])throw Error(`Unknown event ${r}`);this.eventHandlers[r].indexOf(t)===-1&&this.eventHandlers[r].push(t)}),L(this,`removeEventListener`,(e,t)=>{let n=N[e];if(!this.eventHandlers[n]){console.warn(`Unknown event ${n}`);return}this.eventHandlers[n].indexOf(t)!==-1&&(this.eventHandlers[n]=this.eventHandlers[n].filter(e=>e!==t))}),this.id=this.__id=P(),this.eventHandlers=M()}dispatchEvent(e,t){let n=this.eventHandlers[e],r=n?n.length:0,i=!1;if(r)for(let a=0;a<r;a++)try{n[a]?.(t),i=!0}catch(t){console.error(e,t)}return i}get x(){return this.points[1]}get y(){return this.points[2]}get width(){return this.points[3]-this.points[1]}get height(){return this.points[4]-this.points[2]}translate(e,t){o(this.points,u(e,t))}atScale(e){o(this.points,c(e,this.x,this.y)),this.scale*=e}transform(e){o(this.points,e)}applyProps(e){this.__revision++}appendChild(e){}removeChild(e){}insertBefore(e,t){}hideInstance(){}},z=class t extends R{constructor(t){if(super(),L(this,`type`,`spacial-content`),L(this,`id`,void 0),L(this,`uri`,void 0),L(this,`display`,void 0),L(this,`points`,void 0),L(this,`priority`,void 0),L(this,`style`,{opacity:1}),!t)this.id=``,this.uri=``,this.display={x:0,y:0,scale:1,width:0,height:0,points:n(5)},this.points=n(5);else{let n=t.scale||1;this.id=t.id||t.uri,this.uri=t.uri,this.points=e.singleBox(t.width,t.height,t.x,t.y),this.display={x:0,y:0,scale:n,width:t.width/n,height:t.height/n,points:e.singleBox(t.width/n,t.height/n),rotation:t?.rotation}}}applyProps(t){let r=t.display?t.display.width:t.target.width,i=t.target.width/r;if(this.id=t.id||t.uri,this.uri=t.uri,this.points.set(e.singleBox(t.target.width,t.target.height,t.target.x,t.target.y)),t.style&&t.style.opacity!==void 0&&(this.style.opacity=t.style.opacity),t.crop){this.cropData=t.crop;let r=e.singleBox(t.crop.width,t.crop.height,t.crop.x,t.crop.y);o(r,u(-t.crop.x,-t.crop.y)),this.crop?this.crop.set(r):this.crop=n(r)}t.display?(this.display.scale=i,this.display.width=t.display.width,this.display.height=t.display.height,this.display.rotation=t.display.rotation,this.display.points=e.singleBox(t.display.width,t.display.height)):(this.display.scale=i,this.display.width=t.target.width/i,this.display.height=t.target.height/i,this.display.points=e.singleBox(t.target.width/i,t.target.height/i))}getAllPointsAt(e,t,n){return[[this,this.crop||this.points,t]]}static fromSvg(e,n,r,i){return t.fromImage(`data:image/svg+xml;base64,`+btoa(e),n,r,i)}static fromImage(e,n,r,i){let a=new t;return a.applyProps({uri:e,id:i,display:r,target:n}),a}getImageUrl(){return this.uri}},B=class extends R{constructor(t){if(super(),L(this,`type`,`spacial-content`),L(this,`id`,void 0),L(this,`uri`,void 0),L(this,`display`,void 0),L(this,`points`,void 0),L(this,`getTexture`,void 0),this.getTexture=()=>({source:void 0,hash:-1}),!t)this.id=``,this.uri=``,this.display={x:0,y:0,scale:1,width:0,height:0,points:n(5)},this.points=n(5);else{let n=t.scale||1;this.id=t.id||t.uri,this.uri=t.uri,this.points=e.singleBox(t.width,t.height),this.display={x:0,y:0,scale:n,width:t.width/n,height:t.height/n,points:n===1?this.points:e.singleBox(t.width/n,t.height/n)}}}applyProps(t){let n=t.display?t.display.width:t.target.width,r=t.target.width/n;this.id=t.id,this.points.set(e.singleBox(t.target.width,t.target.height)),this.display.scale=r,this.display.width=t.target.width/r,this.display.height=t.target.height/r,this.getTexture=t.getTexture,this.display.points=r===1?this.points:e.singleBox(t.target.width/r,t.target.height/r)}getAllPointsAt(e,t,n){return[[this,this.points,t]]}};function ce(e,t,n=1){let r=t.length;if(r===0)throw Error(`No resources passed in.`);let i=0,a=1/0;for(let o=0;o<r&&!(!t[o]||!t[o].display);o++){let r=le(t[o].display.scale,e/(n||1));r<a&&(a=r,i=o)}return i}function le(e,t){return Math.abs(e-t)}function V(e,t){let n=le(e.x,t.x),r=le(e.y,t.y);return Math.sqrt(n**2+r**2)}function ue(e){let t=e.length;return e.indexOf(`/info.json`)===t-10?e.slice(0,-10):e}function de(e,t,n){return Math.min(Math.max(e,t),n)}var H=class t extends R{constructor(e){super(),L(this,`id`,void 0),L(this,`type`,`spacial-content`),L(this,`display`,void 0),L(this,`tileWidth`,void 0),L(this,`style`,{opacity:1}),L(this,`points`,void 0),L(this,`service`,void 0),L(this,`format`,`jpg`),L(this,`crop2`,void 0),L(this,`version3`,void 0),L(this,`tileUrl`,void 0),this.tileUrl=ue(e.url),this.id=e.id||`${this.tileUrl}--${e.scaleFactor}`,this.points=e.displayPoints?e.displayPoints:l(e.points,s(e.scaleFactor)),this.tileWidth=e.tileWidth,this.version3=e.version3,this.display={x:0,y:0,width:e.width/e.scaleFactor,height:e.height/e.scaleFactor,points:e.points,scale:e.scaleFactor},e.format&&(this.format=e.format)}applyProps(e){if(e.style&&e.style.opacity!==void 0&&(this.style.opacity=e.style.opacity),e.service!==this.service&&(this.service=e.service),e.format?this.format=e.format:this.format=`jpg`,e.version3!==void 0&&(this.version3=e.version3),e.crop){this.cropData=e.crop;let t=n([...this.points]),r=t.length/5,i=e.crop.x||0,a=e.crop.y||0,s=e.crop.x+e.crop.width,c=e.crop.y+e.crop.height;for(let e=0;e<r;e++){let n=e*5;t[n+1]<s&&t[n+3]>i&&t[n+2]<c&&t[n+4]>a?(t[n+1]=de(t[n+1],i,s),t[n+3]=de(t[n+3],i,s),t[n+2]=de(t[n+2],a,c),t[n+4]=de(t[n+4],a,c)):t[n]=0}o(t,u(-e.crop.x,-e.crop.y)),this.crop?this.crop.set(t):this.crop=t}}static fromTile(n,r,i,a,o,s,c,l){i.height=i.height?i.height:i.width;let u=c?Math.floor(r.width/a):Math.ceil(r.width/a),d=c?Math.floor(r.height/a):Math.ceil(r.height/a),f=Math.ceil(u/i.width),p=Math.ceil(d/i.height),m=e.grid(f,p),h=e.grid(f,p),g=o&&o[`@context`]?Array.isArray(o[`@context`])?o[`@context`]:[o[`@context`]]:[],_=l===void 0?g.indexOf(`http://iiif.io/api/image/3/context.json`)!==-1:l;for(let e=0;e<p;e++)for(let t=0;t<f;t++){let n=t*i.width,o=e*i.height;h.addPoints(n*a,o*a,t===f-1?r.width:(n+i.width)*a,e===p-1?r.height:(o+i.height)*a),m.addPoints(n,o,t===f-1?u:n+i.width,e===p-1?d:o+i.height)}let v=new t({url:n,scaleFactor:a,points:m.build(),displayPoints:h.build(),width:r.width,height:r.height,tileWidth:i.width,format:s,version3:_});return v.applyProps({service:o}),v}getImageUrl(e){let t=this.points.slice(e*5,e*5+5),n=t[3]-t[1],r=t[4]-t[2],i=Math.ceil(n/this.display.scale),a=Math.ceil(r/this.display.scale),o=`${i>this.tileWidth?this.tileWidth:i},`;return this.version3&&(o+=`${a>this.tileWidth?this.tileWidth:a}`),`${this.tileUrl}/${t[1]},${t[2]},${n},${r}/${o}/0/default.${this.format||`jpg`}`}getAllPointsAt(e,t,n){let r=a(this.crop||this.points,e);return[[this,r,t]]}transform(e){o(this.points,e)}getScheduledUpdates(e,t){return[]}},fe=class extends R{constructor(...e){super(...e),L(this,`type`,`spacial-content`)}getAllPointsAt(e,t,n){return[[this,this.points,t]]}},pe=class extends fe{constructor(t){super(),L(this,`id`,void 0),L(this,`display`,void 0),L(this,`points`,void 0),L(this,`images`,[]),L(this,`allImages`,[]),L(this,`scaleFactors`,[]),L(this,`aggregateBuffer`,n(9)),L(this,`lazyLoader`,void 0),L(this,`isFullyLoaded`,!1),L(this,`maxScaleFactor`,0),L(this,`renderOptions`,void 0),L(this,`_scheduleSortByScales`,!1),L(this,`_sortByScales`,()=>{this._scheduleSortByScales=!1,this.allImages.sort((e,t)=>t.display.width-e.display.width),this.images=[];let e=.1;for(let t of this.allImages)if(!(t.display.width<this.renderOptions.minSize&&t.display.height<this.renderOptions.minSize&&!t.priority)&&!(t instanceof z&&(t.display.width>this.renderOptions.maxImageSize||t.display.height>this.renderOptions.maxImageSize)&&!t.priority)){if(Math.abs(t.display.scale-e)<.25||t.priority){let e=this.images.pop();e&&(e instanceof z||e.priority)?(t.priority&&this.images.push(t),this.images.push(e)):t&&this.images.push(t)}else t&&this.images.push(t);e=t.display.scale}this.images.length===0&&(this.images=[...this.allImages]),this.scaleFactors=this.images.map(e=>e.display.scale),this.maxScaleFactor=Math.max(...this.scaleFactors)}),L(this,`loadFullResource`,async()=>{if(!this.isFullyLoaded&&this.lazyLoader){this.isFullyLoaded=!0;let e=await this.lazyLoader();this.addImages(e)}}),L(this,`fallback`,[this.loadFullResource]),this.id=t.id,this.points=e.singleBox(t.width,t.height),this.lazyLoader=t.loadFullImages,t.loadFullImages||(this.isFullyLoaded=!0),this.display={x:0,y:0,points:e.singleBox(t.width,t.height),height:t.height,width:t.width,scale:1},this.renderOptions={renderSmallestFallback:!0,renderLayers:3,minSize:255,maxImageSize:2048,quality:1.5,...t.renderOptions||{}},this.addImages(t.images)}applyProps(e){e.renderSmallestFallback!==void 0&&e.renderSmallestFallback!==this.renderOptions.renderSmallestFallback&&(this.renderOptions.renderSmallestFallback=e.renderSmallestFallback),e.renderLayers!==void 0&&e.renderLayers!==this.renderOptions.renderLayers&&(this.renderOptions.renderLayers=e.renderLayers),e.minSize!==void 0&&e.minSize!==this.renderOptions.minSize&&(this.renderOptions.minSize=e.minSize),e.maxImageSize!==void 0&&e.maxImageSize!==this.renderOptions.maxImageSize&&(this.renderOptions.maxImageSize=e.maxImageSize),e.quality!==void 0&&e.quality!==this.renderOptions.quality&&(this.renderOptions.quality=e.quality)}appendChild(e){this.addImages([e])}removeChild(e){this.images.indexOf(e)!==-1&&(this.images=this.images.filter(t=>t!==e),this.sortByScales())}insertBefore(e,t){this.addImages([e])}hideInstance(){}addImages(e){for(let t of e)t.__parent=this,t.__owner=this.__owner;this.allImages.push(...e.filter(Boolean)),this.sortByScales()}sortByScales(){this._scheduleSortByScales=!0}getScheduledUpdates(e,t){return this._scheduleSortByScales?[this._sortByScales]:this.isFullyLoaded?[]:t>1/this.maxScaleFactor?this.fallback:[]}getAllPointsAt(e,n,r){if(this.images.length===0)return[];let i=ce(1/(r||1)/(window.devicePixelRatio||1),this.images,this.renderOptions.quality),a=this.images.length,o=n?t(n,u(this.x,this.y)):u(this.x,this.y);if(i!==this.images.length-1&&this.images[i+1]){let t=[];for(let e=a-1;e>=i;e--)t.push(e);let n=t[0];this.renderOptions.renderLayers&&(t=t.slice(-Math.min(t.length,this.renderOptions.renderLayers))),this.renderOptions.renderSmallestFallback&&t.indexOf(n)===-1&&t.unshift(n);let s=[];for(let n=0;n<t.length;n++)s.push(...this.images[t[n]].getAllPointsAt(e,o,r));return s}return this.images[i].getAllPointsAt(e,o,r)}};function U(e,t,n,r,i){let a=Math.PI/180*i,o=Math.cos(a),s=Math.sin(a);return[o*(n-e)+s*(r-t)+e,o*(r-t)-s*(n-e)+t]}var me=class e extends R{constructor(e,t){super(),L(this,`id`,void 0),L(this,`type`,`world-object`),L(this,`scale`,void 0),L(this,`layers`,void 0),L(this,`points`,void 0),L(this,`worldPoints`,void 0),L(this,`intersectionBuffer`,n(5)),L(this,`aggregateBuffer`,n(9)),L(this,`invertedBuffer`,n(9)),L(this,`rotation`,0),L(this,`filteredPointsBuffer`,void 0),L(this,`_updatedList`,[]),L(this,`geometry`,void 0);let{x:r=0,y:i=0}=t||{};e?(this.id=e.id||``,this.scale=1,this.layers=e.layers,this.points=n([1,r,i,r+e.width,i+e.height]),this.worldPoints=n([1,r,i,r+e.width,i+e.height]),this.filteredPointsBuffer=n(e.layers.length*5)):(this.id=``,this.scale=1,this.layers=[],this.points=n(5),this.worldPoints=n(5),this.filteredPointsBuffer=n(5))}static createWithProps(t){let n=new e;return n.applyProps(t),n}applyProps(e){let t=e.x||0,n=e.y||0;this.id=e.id;let r=e.scale===void 0?this.scale:e.scale;this.points[0]=1,this.points[1]=t,this.points[2]=n,this.points[3]=t+e.width,this.points[4]=n+e.height,this.rotation=e.rotation||0,this.worldPoints[3]=this.worldPoints[1]+e.width,this.worldPoints[4]=this.worldPoints[2]+e.height,e.scale&&e.scale!==1&&this.atScale(r),this.scale=r}appendChild(e){e.points[0]===0&&e.points.set(this.points),e.__owner.value=this,this.addLayers([e])}removeChild(e){this.layers=this.layers.filter(t=>t!==e),this.filteredPointsBuffer=n(this.layers.length*5)}insertBefore(e,t){let n=this.layers.indexOf(t);if(n===-1||this.layers.indexOf(e)!==-1)return;let r=this.layers.slice(0,n),i=this.layers.slice(n);this.layers=[...r,e,...i]}hideInstance(){console.warn(`hideInstance: not yet implemented`)}getObjectsAt(e,t){if(this.rotation&&(e=this.applyRotation(e)),a(this.points,e,this.filteredPointsBuffer)[0]===0)return[];let n=this.layers.length,r=[];for(let i=0;i<n;i++){let n=this.layers[i];if(t&&n.isShape){let t=l(n.points,u(this.x,this.y));if(!n.intersects([e[1]-t[1],e[2]-t[2]]))continue}if(a(l(n.points,u(this.x,this.y)),e,this.filteredPointsBuffer)[0]!==0&&r.push(n),t){let i=n;r.push(...i.getObjectsAt(e,t))}}return r}applyRotation(e){if(this.rotation){let t={x:e[1],y:e[2]},r={x:e[1],y:e[4]},i={x:e[3],y:e[2]},a={x:e[3],y:e[4]},o=this.points[1]+(this.points[3]-this.points[1])/2,s=this.points[2]+(this.points[4]-this.points[2])/2,[c,l]=U(o,s,t.x,t.y,this.rotation),[u,d]=U(o,s,r.x,r.y,this.rotation),[f,p]=U(o,s,i.x,i.y,this.rotation),[m,h]=U(o,s,a.x,a.y,this.rotation),g=Math.min(c,u,f,m),_=Math.max(c,u,f,m),v=Math.min(l,d,p,h),y=Math.max(l,d,p,h);return n([e[0],g,v,_,y])}return e}getAllPointsAt(e,n,r){let a=t(u(this.x,this.y),s(this.scale),this.aggregateBuffer);this.rotation&&(e=this.applyRotation(e));let o=i(e,this.points,this.intersectionBuffer),c=this.layers.length,d=[],f=l(o,t(s(1/this.scale),u(-this.x,-this.y),this.invertedBuffer)),p=n?t(n,a,this.aggregateBuffer):a,m=r*this.scale;for(let e=0;e<c;e++)d.push(...this.layers[e].getAllPointsAt(f,p,m));return d}addLayers(e){let t=[];for(let r of e)this.layers.indexOf(r)===-1&&(t.push(r),r.points.length===5&&(r.points[1]<this.worldPoints[1]/this.scale||r.points[2]<this.worldPoints[2]/this.scale||r.points[3]>this.worldPoints[3]/this.scale||r.points[4]>this.worldPoints[4]/this.scale)&&(r.crop=r.crop||n([1,Math.max(this.worldPoints[1]/this.scale,r.points[1]),Math.max(this.worldPoints[2]/this.scale,r.points[2]),Math.min(this.worldPoints[3]/this.scale,r.points[3]),Math.min(this.worldPoints[4]/this.scale,r.points[4])])));this.layers=this.layers.concat(t),this.filteredPointsBuffer=n(this.layers.length*5)}getScheduledUpdates(e,t){let n=this.layers.length;this._updatedList=[];let r=t*this.scale;for(let t=0;t<n;t++){let n=this.layers[t].getScheduledUpdates(e,r);n&&this._updatedList.push(...n)}return this._updatedList}},W=class i extends R{get x(){return 0}get y(){return 0}get width(){return this._width}get height(){return this._height}constructor(e=0,t=0,r=100,i=`left-to-right`){super(),L(this,`id`,`world`),L(this,`_width`,void 0),L(this,`_height`,void 0),L(this,`aspectRatio`,void 0),L(this,`viewingDirection`,void 0),L(this,`aggregateBuffer`,n(9)),L(this,`isDirty`,!1),L(this,`zones`,[]),L(this,`filteredPointsBuffer`,void 0),L(this,`selectedZone`,void 0),L(this,`triggerQueue`,[]),L(this,`activatedEvents`,[]),L(this,`_updatedList`,[]),L(this,`translationBuffer`,n(9)),L(this,`needsRecalculate`,!0),L(this,`emptyPaintables`,[]),L(this,`renderOrder`,[]),L(this,`points`,void 0),L(this,`objects`,[]),L(this,`subscriptions`,[]),L(this,`_propagateEventTargets`,[]),L(this,`_alreadyFlushed`,[]),this._width=e,this._height=t,this.aspectRatio=Number.isNaN(e/t)?1:e/t,this.viewingDirection=i,this.points=n(r*5),this.filteredPointsBuffer=n(r*5)}static withProps(e){let t=new i;return t.applyProps(e),t}applyProps(e){e.width!==void 0&&e.height!==void 0&&(e.width!==this._width||e.height!==this._height)&&this.resize(e.width,e.height),e.viewingDirection!==this.viewingDirection&&(this.viewingDirection=e.viewingDirection,this.triggerRepaint())}propagateTouchEvent(t,n,r){let i=[];for(let t of r)if(t.x&&t.y){let n=e.singleBox(1,1,t.x,t.y);i.push(this.getObjectsAt(n,!0).reverse())}return i.map(e=>this.propagateEvent(t,n,e,{bubbles:!0,cancelable:!0}))}propagatePointerEvent(t,n,r,i,a={}){let o=e.singleBox(1,1,r,i),s=this.getObjectsAt(o,!0).reverse();return this.propagateEvent(t,n,s,a)}propagateEvent(e,t,n,{bubbles:r=!1,cancelable:i=!1}={}){t.atlasTarget=this,this._propagateEventTargets.length=1,this._propagateEventTargets[0]=this;let a=!1;t.stopPropagation=()=>{a=!0};let o=n.length;for(let e=o-1;e>=0;e--){this._propagateEventTargets.unshift(n[e][0]);let t=n[e][1].length;if(t)for(let r=0;r<t;r++)this._propagateEventTargets.unshift(n[e][1][r])}let s=this._propagateEventTargets.length,c=!1;for(let n=0;n<s&&(t.atlasTarget=this._propagateEventTargets[n],t.atlasWorld=this,c=this._propagateEventTargets[n].dispatchEvent(e,t)||c,!a);n++);return c&&this.triggerRepaint(),this._propagateEventTargets}appendChild(e){let t=this.appendWorldObject(e);this.renderOrder.push(t/5)}removeChild(e){let t=this.objects.indexOf(e);if(t===-1){for(let t of this.objects)if(t&&t.id===e.id){this.removeChild(t);return}return}this.objects[t]=null,this.renderOrder=this.renderOrder.filter(e=>e!==t),this.points[t*5]=0,this.triggerRepaint(),this.needsRecalculate=!0}insertBefore(e,t){let n=this.objects.indexOf(t);if(n===-1)return;let r=this.appendWorldObject(e);this.renderOrder.splice(n-1,0,r/5)}hideInstance(){}asWorldObject(){return null}addZone(e){this.zones.push(e)}selectZone(e){if(typeof e==`string`){let t=this.zones.length;for(let n=0;n<t;n++)if(this.zones[n].id===e){this.selectedZone=n,this.trigger(`zone-changed`);return}}else this.zones[e]&&(this.selectedZone=e,this.trigger(`zone-changed`))}deselectZone(){this.selectedZone=void 0}getActiveZone(){if(this.selectedZone)return this.zones[this.selectedZone]}hasActiveZone(){return this.selectedZone!==void 0}checkResizeInternalBuffer(){if(r(this.points)===this.objects.length){let e=this.points,t=n(this.points.length*2);t.set(e,0),this.points=t}}appendWorldObject(e){this.checkResizeInternalBuffer();let t=this.objects.length*5,r=e.points;return e.points=this.points.subarray(this.objects.length*5,this.objects.length*5+5),e.points[1]=r[1],e.points[2]=r[2],e.points[3]=r[3],e.points[4]=r[4],this.objects.push(e),this.filteredPointsBuffer=n(this.objects.length*5),this.needsRecalculate=!0,this.triggerRepaint(),t}recalculateWorldSize(){let e=!1;if(this.needsRecalculate){let t=new Int32Array(this.objects.length),n=new Int32Array(this.objects.length),r=this.renderOrder.length;for(let e=0;e<r;e++){let r=this.renderOrder[e];this.objects[r]&&(t[e]=this.points[r*5+3],n[e]=this.points[r*5+4])}let i=Math.max(...t);i!==this._width&&(this._width=i,e=!0);let a=Math.max(...n);a!==this._height&&(this._height=a,e=!0),e&&this.trigger(`recalculate-world-size`,{width:i,height:a}),this.needsRecalculate=!1}return e}addObjectAt(t,r){r.width&&!r.height?r.height=r.width/t.width*t.height:r.height&&!r.width&&(r.width=r.height/t.height*t.width),(!r||!r.width||!r.height)&&(r.width=t.width,r.height=t.height);let{width:i,x:a,y:o}=r,s=i/t.width;this.checkResizeInternalBuffer(),this.points.set(e.singleBox(t.width,t.height,0,0),this.objects.length*5);let c=new me(t);return c.points=this.points.subarray(this.objects.length*5,this.objects.length*5+5),this.objects.push(c),this.scaleWorldObject(this.objects.length-1,s),this.translateWorldObject(this.objects.length-1,a,o),this.filteredPointsBuffer=n(this.points.length*2),this.triggerRepaint(),this.needsRecalculate=!0,c}scaleWorldObject(e,t){o(this.points.subarray(e*5,e*5+5),c(t,this.points[e*5+1],this.points[e*5+2]));let n=this.objects[e];n&&(n.atScale(t),this.triggerRepaint())}translateWorldObject(e,t,n){o(this.points.subarray(e*5,e*5+5),u(t,n));let r=this.objects[e];r&&(r.translate(t,n),this.triggerRepaint())}resize(e,t){return this._width=e,this._height=t,this.aspectRatio=e/t,this.triggerRepaint(),this}getObjects(){return this.objects}getPoints(){return this.points}getPointsFromViewer(t,n){let r=e.singleBox(t.width,t.height,t.x,t.y);return this.getPointsAt(r,n,t.scale)}addLayoutSubscriber(e){return this.subscriptions.push(e),()=>{this.subscriptions.splice(this.subscriptions.indexOf(e),1)}}getScheduledUpdates(e,t){let n=a(this.points,e,this.filteredPointsBuffer),r=this.objects.length;this._updatedList=[];for(let i=0;i<r;i++)if(n[i*5]!==0){if(!this.objects[i])continue;this._updatedList.push(...this.objects[i].getScheduledUpdates(e,t))}return this._updatedList}getObjectsAt(e,t=!1){let n=this.getActiveZone(),r=a(this.points,e,this.filteredPointsBuffer),i=this.renderOrder.length,o=[];for(let a=0;a<i;a++){let i=this.renderOrder[a];if(r[i*5]!==0){let r=this.objects[i];if(!r||n&&n.objects.indexOf(r)===-1)continue;if(r.type!==`world-object`){o.push([r,[r]]);continue}t?o.push([r,r.getObjectsAt(e,t)]):o.push([r,this.emptyPaintables])}}return o}getPointsAt(e,n,r=1){let i=this.getObjectsAt(e),a=t(s(r),u(-e[1],-e[2]),this.translationBuffer),o=n?t(n,a,this.aggregateBuffer):a,c=i.length,l=[];for(let t=0;t<c;t++)i[t]&&l.push(...i[t][0].getAllPointsAt(e,o,r));return l}flushSubscriptions(){if(this.triggerQueue.length){this._alreadyFlushed=[];let e=this.triggerQueue.length;for(let t=0;t<e;t++){if(this._alreadyFlushed.indexOf(this.triggerQueue[t][0])!==-1)continue;this.triggerQueue[t][1]===void 0&&this._alreadyFlushed.push(this.triggerQueue[t][0]);let e=this.subscriptions.length;for(let n=0;n<e;n++)this.subscriptions[n].apply(null,this.triggerQueue[t])}this.triggerQueue=[]}}trigger(e,t){this.triggerQueue.push([e,t])}triggerEventActivation(){this.trigger(`event-activation`)}triggerRepaint(){this.trigger(`repaint`)}gotoRegion(e){this.trigger(`goto-region`,e)}goHome(e=!1){this.trigger(`go-home`,{immediate:e})}zoomTo(e,t,n){this.trigger(`zoom-to`,{point:t,factor:e,stream:n})}zoomIn(e){this.trigger(`zoom-to`,{point:e,factor:.5})}zoomOut(e){this.trigger(`zoom-to`,{point:e,factor:2})}constraintBounds(e){this.trigger(`constrain-bounds`,{immediate:e})}};function he(e){let{src:t,target:n}=e,r=n?n.width:e.width,i=n?n.height:e.height;return new me({id:t,height:i,width:r,layers:[z.fromImage(t,{height:i,width:r},{width:e.width,height:e.height})]})}const ge={margin:0};var _e=class{constructor(e,t={}){L(this,`id`,void 0),L(this,`config`,void 0),L(this,`points`,void 0),L(this,`objects`,void 0),this.id=e.map(e=>e.id).join(`$$`),this.config={...ge,...t},this.points=n(5),this.objects=e,this.recalculateBounds()}recalculateBounds(){this.points.set([1,Math.min(...this.objects.map(e=>e.points[1]))-this.config.margin,Math.min(...this.objects.map(e=>e.points[2]))-this.config.margin,Math.max(...this.objects.map(e=>e.points[3]))+this.config.margin,Math.max(...this.objects.map(e=>e.points[4]))+this.config.margin])}getPointsAt(e,t,n){return[]}};const ve=/([0-9]+(px|em)\s+)+(solid)\s+(.*)/g,ye={},be=[`backgroundColor`,`opacity`,`boxShadow`,`borderColor`,`borderWidth`,`borderStyle`,`outlineColor`,`outlineWidth`,`outlineOffset`,`outlineStyle`];var G=class extends R{constructor(){super(),L(this,`id`,void 0),L(this,`type`,`spacial-content`),L(this,`points`,void 0),L(this,`hoverEvents`,!1),L(this,`activeEvents`,!1),L(this,`display`,{x:0,y:0,scale:1,width:-1,height:-1,points:n(5)}),L(this,`_parsed`,{border:{id:null,match:[]},outline:{id:null,match:[]}}),L(this,`hovering`,void 0),L(this,`pressing`,void 0),L(this,`props`,{}),L(this,`addHover`,()=>{this.hovering=!0,this.__revision++}),L(this,`removeHover`,()=>{this.hovering=!1,this.pressing=!1,this.__revision++}),L(this,`addPress`,()=>{this.pressing=!0,this.__revision++}),L(this,`removePress`,()=>{this.pressing=!1,this.__revision++}),this.id=P(12),this.points=n(5)}getAllPointsAt(e,t){return[[this,this.points,t]]}applyProps(t={}){let n=!1;if(t.interactive!==this.props.interactive&&(n=!0,this.props.interactive=t.interactive),t.style){let e=t.border||t.style.border;if(e!==this._parsed.border.id)if(!e)this._parsed.border.id=null,this._parsed.border.match=[];else{let t=ye[e]||ve.exec(e)||ve.exec(e);t&&(this._parsed.border.id=e,this._parsed.border.match=ye[e]=t)}if(this._parsed.border.id&&(t.style.borderWidth=this._parsed.border.match[1],t.style.borderStyle=`solid`,t.style.borderColor=this._parsed.border.match[4]),t.style.outline!==this._parsed.outline.id)if(!t.style.outline)this._parsed.outline.id=null,this._parsed.outline.match=[];else{let e=ye[t.style.outline]||ve.exec(t.style.outline)||ve.exec(t.style.outline);e&&(this._parsed.outline.id=t.style.outline,this._parsed.outline.match=ye[t.style.outline]=e)}this._parsed.outline.id&&(t.style.outlineWidth=this._parsed.outline.match[1],t.style.outlineStyle=`solid`,t.style.outlineColor=this._parsed.outline.match[4]),this.props.style=t.style,t.backgroundColor&&!this.props.style.backgroundColor&&(this.props.style.backgroundColor=t.backgroundColor,n=!0),t.style.background&&!this.props.style.backgroundColor&&(this.props.style.backgroundColor=t.style.background,n=!0);for(let e of be)if(this.props.style[e]!==t.style[e]){n=!0;break}t.style[`:hover`]!==this.props.hoverStyles&&(this.props.hoverStyles=t.style[`:hover`],this.hoverEvents||(this.hoverEvents=!0,this.addEventListener(`pointerenter`,this.addHover),this.addEventListener(`pointerleave`,this.removeHover)),n=!0),t.style[`:active`]!==this.props.pressStyles&&(this.props.pressStyles=t.style[`:active`],this.activeEvents||(this.activeEvents=!0,this.addEventListener(`mousedown`,this.addPress),this.addEventListener(`mouseup`,this.removePress)),n=!0)}t.href!==this.props.href&&(this.props.href=t.href,n=!0),t.hrefTarget!==this.props.hrefTarget&&(this.props.hrefTarget=t.hrefTarget,n=!0),t.title!==this.props.title&&(this.props.title=t.title,n=!0),t.className!==this.props.className&&(this.props.className=t.className,t.className&&!this.hoverEvents&&(this.hoverEvents=!0,this.addEventListener(`pointerenter`,this.addHover),this.addEventListener(`pointerleave`,this.removeHover)),t.className&&!this.activeEvents&&(this.activeEvents=!0,this.addEventListener(`mousedown`,this.addPress),this.addEventListener(`mouseup`,this.removePress)),n=!0),t.relativeSize!==this.props.relativeSize&&(this.props.relativeSize=t.relativeSize,n=!0),t.relativeStyle!==this.props.relativeStyle&&(this.props.relativeStyle=t.relativeStyle,n=!0),t.html!==this.props.html&&(this.props.html=t.html,n=!0),t.target&&(t.target.width!==this.display.width||t.target.height!==this.display.height||t.target.x!==this.points[1]||t.target.y!==this.points[2])&&(n=!0,this.points=e.singleBox(t.target.width,t.target.height,t.target.x,t.target.y),this.display.points=e.singleBox(t.target.width,t.target.height,t.target.x,t.target.y),this.display.width=t.target.width,this.display.height=t.target.height),n&&this.__revision++}},xe=class extends R{constructor(){super(),L(this,`type`,`spacial-content`),L(this,`id`,void 0),L(this,`points`,void 0),L(this,`color`,`#000`),L(this,`backgroundColor`,void 0),L(this,`hovering`,void 0),L(this,`pressing`,void 0),L(this,`text`,``),L(this,`display`,{x:0,y:0,scale:1,width:100,height:100,points:n(5)}),L(this,`className`,void 0),L(this,`html`,void 0),L(this,`interactive`,!1),L(this,`props`,{font:`18px Arial, sans-serif`,lineHeight:1,textAlign:`left`,verticalAlign:`top`,paddingX:0,paddingY:0,fitParent:!1,lineBreak:`auto`,strokeText:!1,sizeToFill:!1,maxFontSizeToFill:void 0,allowNewLine:!0,justifyLines:!1,renderHDPI:!1,textDecoration:`none`,interactive:!1,relativeSize:!1}),this.id=``,this.points=n(5)}getAllPointsAt(e,t){return[[this,this.points,t]]}applyProps({id:t,target:n,text:r,color:i,backgroundColor:a,fontSize:o=18,interactive:s,fontFamily:c=`Arial, sans-serif`,...l}){l.font=`${o}px ${c}`,this.interactive=s||!1,r!==void 0&&(this.text=r||``),i&&(this.color=i),a&&(this.backgroundColor=a),t&&(this.id=t),n&&(this.points=e.singleBox(n.width,n.height,n.x,n.y),this.display.points=this.points,this.display.width=n.width,this.display.height=n.height),this.props={...this.props,...l},this.__revision++}};const K=Math.pow,Se=Math.sqrt,Ce=Math.sin,we=Math.cos,Te=Math.PI,Ee=1.70158,De=Ee*1.525,Oe=Ee+1,ke=2*Te/3,Ae=2*Te/4.5,je=function(e){let t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},q={linear:e=>e,easeInQuad:function(e){return e*e},easeOutQuad:function(e){return 1-(1-e)*(1-e)},easeInOutQuad:function(e){return e<.5?2*e*e:1-K(-2*e+2,2)/2},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return 1-K(1-e,3)},easeInOutCubic:function(e){return e<.5?4*e*e*e:1-K(-2*e+2,3)/2},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1-K(1-e,4)},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-K(-2*e+2,4)/2},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1-K(1-e,5)},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1-K(-2*e+2,5)/2},easeInSine:function(e){return 1-we(e*Te/2)},easeOutSine:function(e){return Ce(e*Te/2)},easeInOutSine:function(e){return-(we(Te*e)-1)/2},easeInExpo:function(e){return e===0?0:K(2,10*e-10)},easeOutExpo:function(e){return e===1?1:1-K(2,-10*e)},easeInOutExpo:function(e){return e===0?0:e===1?1:e<.5?K(2,20*e-10)/2:(2-K(2,-20*e+10))/2},easeInCirc:function(e){return 1-Se(1-K(e,2))},easeOutCirc:function(e){return Se(1-K(e-1,2))},easeInOutCirc:function(e){return e<.5?(1-Se(1-K(2*e,2)))/2:(Se(1-K(-2*e+2,2))+1)/2},easeInBack:function(e){return Oe*e*e*e-Ee*e*e},easeOutBack:function(e){return 1+Oe*K(e-1,3)+Ee*K(e-1,2)},easeInOutBack:function(e){return e<.5?K(2*e,2)*((De+1)*2*e-De)/2:(K(2*e-2,2)*((De+1)*(e*2-2)+De)+2)/2},easeInElastic:function(e){return e===0?0:e===1?1:-K(2,10*e-10)*Ce((e*10-10.75)*ke)},easeOutElastic:function(e){return e===0?0:e===1?1:K(2,-10*e)*Ce((e*10-.75)*ke)+1},easeInOutElastic:function(e){return e===0?0:e===1?1:e<.5?-(K(2,20*e-10)*Ce((20*e-11.125)*Ae))/2:K(2,-20*e+10)*Ce((20*e-11.125)*Ae)/2+1},easeInBounce:function(e){return 1-je(1-e)},easeOutBounce:je,easeInOutBounce:function(e){return e<.5?(1-je(1-2*e))/2:(1+je(2*e-1))/2}};var Me=class{constructor(e){L(this,`runtime`,void 0),L(this,`pendingTransition`,void 0),L(this,`lastZoomTo`,null),L(this,`isConstraining`,!1),L(this,`lastGoToRegion`,null),this.runtime=e,this.pendingTransition={from:n(5),to:n(5),elapsed_time:0,done:!0,total_time:0,timingFunction:q.easeInOutQuad,constrain:!1}}hasPending(){return!this.pendingTransition.done}getPendingTransition(){return this.pendingTransition}getPendingFrom(){return this.pendingTransition.from}customTransition(e){e(this.pendingTransition)}stopTransition(){this.pendingTransition.from=n(this.runtime.target),this.pendingTransition.to=n(this.runtime.target),this.pendingTransition.done=!0,this.pendingTransition.elapsed_time=0,this.pendingTransition.total_time=0}runTransition(e,t){if(!this.pendingTransition.done){let n=this.pendingTransition,r=n.total_time===0?0:(n.elapsed_time+t)/n.total_time,i=n.total_time===0?1:r===0?0:n.timingFunction(r);e[1]=n.from[1]+(n.to[1]-n.from[1])*i,e[2]=n.from[2]+(n.to[2]-n.from[2])*i,e[3]=n.from[3]+(n.to[3]-n.from[3])*i,e[4]=n.from[4]+(n.to[4]-n.from[4])*i,this.pendingTransition.elapsed_time+=t,this.pendingTransition.elapsed_time>=this.pendingTransition.total_time&&(this.pendingTransition.done=!0,this.pendingTransition.callback?.(),this.pendingTransition.constrain&&this.constrainBounds({transition:{duration:this.pendingTransition.total_time===0?0:500,easing:q.easeOutExpo}}))}}resumeTransition(){this.lastZoomTo&&this.zoomTo(this.lastZoomTo.factor,this.lastZoomTo.options),this.isConstraining&&this.constrainBounds(),this.lastGoToRegion&&this.goToRegion(this.lastGoToRegion.target,this.lastGoToRegion.options)}zoomTo(e,t={}){let{origin:n,stream:r=!1,transition:i}=t;this.lastZoomTo={factor:e,options:t};let a=this.runtime.getZoomedPosition(e,{origin:n}),o=Math.abs(1-e);this.applyTransition(a,i,{duration:2e3*o,easing:q.easeOutExpo,constrain:!0,callback:()=>{this.lastZoomTo=null}},{stream:!1})}constrainBounds({transition:e,panPadding:t=0}={}){this.isConstraining=!0;let[n,r]=this.runtime.constrainBounds(this.runtime.target,{panPadding:t});n&&(this.applyTransition(r,e,{duration:500,easing:q.easeOutQuart,constrain:!1,callback:()=>{this.isConstraining=!1}}),this.runtime.updateNextFrame())}applyTransition(e,t,r,{stream:i}={}){this.pendingTransition.from=n(this.runtime.target),this.pendingTransition.to=e,i||(this.pendingTransition.elapsed_time=0),this.pendingTransition.done=!1,this.pendingTransition.total_time=t?.duration===void 0?r?.duration===void 0?1e3:r.duration:t.duration,this.pendingTransition.constrain=t?.constrain===void 0?r?.constrain===void 0?!1:r.constrain:t.constrain,this.pendingTransition.timingFunction=t?.easing||r?.easing||q.easeInOutSine}goToRegion(t,{transition:n}={}){this.lastGoToRegion={target:t,options:{transition:n}};let r=this.runtime.clampRegion(t);this.applyTransition(e.singleBox(r.width,r.height,r.x,r.y),n,{duration:1e3,easing:q.easeOutExpo,constrain:!0,callback:()=>{this.lastGoToRegion=null}}),this.runtime.updateNextFrame()}};Number.MIN_VALUE+1;var Ne=class{get x(){return this.target[1]}set x(e){this.target[1]=e}get y(){return this.target[2]}set y(e){this.target[2]=e}get x2(){return this.target[3]}set x2(e){this.target[3]=e}get y2(){return this.target[4]}set y2(e){this.target[4]=e}get width(){return this.target[3]-this.target[1]}set width(e){this.target[3]=this.target[1]+e}get height(){return this.target[4]-this.target[2]}set height(e){this.target[4]=this.target[2]=e}constructor(t,r,i,a=[],o){L(this,`id`,P()),L(this,`ready`,!1),L(this,`renderer`,void 0),L(this,`world`,void 0),L(this,`target`,void 0),L(this,`homePosition`,void 0),L(this,`manualHomePosition`,void 0),L(this,`manualFocalPosition`,void 0),L(this,`focalPosition`,void 0),L(this,`transitionManager`,void 0),L(this,`aggregate`,void 0),L(this,`transformBuffer`,n(500)),L(this,`lastTarget`,n(5)),L(this,`zoomBuffer`,n(5)),L(this,`logNextRender`,!1),L(this,`pendingUpdate`,!0),L(this,`isCommitting`,!1),L(this,`firstRender`,!0),L(this,`lastTime`,void 0),L(this,`stopId`,void 0),L(this,`mode`,`explore`),L(this,`controllers`,[]),L(this,`controllersRunning`,!1),L(this,`controllerStopFunctions`,[]),L(this,`maxScaleFactor`,1),L(this,`_viewerToWorld`,{x:0,y:0}),L(this,`_lastGoodScale`,1),L(this,`hooks`,{useFrame:[],useBeforeFrame:[],useAfterPaint:[],useAfterFrame:[]}),L(this,`fpsLimit`,void 0),L(this,`options`,void 0),L(this,`hookOptions`,{filters:{grayscale:0,contrast:0,brightness:0,saturate:0,sepia:0,invert:0,hueRotate:0,blur:0}}),L(this,`_viewport`,{x:0,y:0,width:0,height:0}),L(this,`setViewport`,e=>{let t=Math.round(e.x===void 0?this.target[1]:e.x),n=Math.round(e.y===void 0?this.target[2]:e.y);e.width?this.target[3]=t+e.width:this.target[3]=this.target[3]-this.target[1]+t,e.height?this.target[4]=n+e.height:this.target[4]=this.target[4]-this.target[2]+n,Math.abs(this.target[1]-t)>.01&&(this.target[1]=t),Math.abs(this.target[2]-n)>.01&&(this.target[2]=n),this.pendingUpdate=!0}),L(this,`render`,e=>{let t=e-this.lastTime;if(this.isCommitting||this.fpsLimit&&t<1e3/this.fpsLimit){this.stopId=window.requestAnimationFrame(this.render);return}this.lastTime=e,this.world.flushSubscriptions(),this.stopId=window.requestAnimationFrame(this.render),this.hook(`useFrame`,t);let n=this.pendingUpdate,r=this.renderer.pendingUpdate();if(this.transitionManager.hasPending()&&(this.transitionManager.runTransition(this.target,t),this.pendingUpdate=!0,this.updateControllerPosition()),!this.firstRender&&!n&&!r&&this.target[0]===this.lastTarget[0]&&this.target[1]===this.lastTarget[1]&&this.target[2]===this.lastTarget[2]&&this.target[3]===this.lastTarget[3]&&this.target[4]===this.lastTarget[4])return;this.hook(`useBeforeFrame`,t),this.renderer.beforeFrame(this.world,t,this.target,this.hookOptions);let i=this.getScaleFactor(),a=this.renderer.getPointsAt(this.world,this.target,this.aggregate,i),o=a.length;for(let e=0;e<o;e++){let t=a[e][0],n=a[e][1],r=a[e][2],i=r?l(n,r,this.transformBuffer):n;this.renderer.prepareLayer(t,t.__parent&&r?l(t.__parent.crop||t.__parent.points,r):i);let o=i.length/5;for(let e=0;e<o;e++){let n=e*5;i[n]!==0&&(this.renderer.paint(t,e,i[n+1],i[n+2],i[n+3]-i[n+1],i[n+4]-i[n+2]),this.hook(`useAfterPaint`,t))}this.renderer.finishLayer(t,n)}this.renderer.afterFrame(this.world,t,this.target,this.hookOptions),this.hook(`useAfterFrame`,t),this.lastTarget[0]=this.target[0],this.lastTarget[1]=this.target[1],this.lastTarget[2]=this.target[2],this.lastTarget[3]=this.target[3],this.lastTarget[4]=this.target[4],this.firstRender=!1,this.pendingUpdate=!1,this.logNextRender=!1,this.renderer.isReady()&&(this.ready=!0,this.world.trigger(`ready`)),this.world.flushSubscriptions();let s=this.world.getScheduledUpdates(this.target,i),c=s.length;if(c>0)for(let e=0;e<c;e++){let t=s[c-e-1]();t?t.then(()=>{this.pendingUpdate=!0}):this.pendingUpdate=!0}}),this.renderer=t,this.world=r,this.options={maxOverZoom:1,maxUnderZoom:1,visibilityRatio:1.5,...o||{}},this.target=e.projection(i),this.manualHomePosition=!1,this.pendingUpdate=!0,this.homePosition=e.projection(this.world),this.manualFocalPosition=!1,this.focalPosition=this.target,this.updateFocalPosition(),this.transitionManager=new Me(this),this.aggregate=s(1),this.world.addLayoutSubscriber(e=>{e===`repaint`&&(this.pendingUpdate=!0),e===`recalculate-world-size`&&(this.manualHomePosition||(this.setHomePosition(),this.goHome()),this.updateFocalPosition())}),this.lastTime=performance.now(),this.controllers=a,this.render(this.lastTime),this.startControllers()}setHomePosition(t){this.homePosition.set(e.projection(t||this.world)),this.pendingUpdate=!0}startControllers(){if(!this.controllersRunning){for(let e of this.controllers)this.controllerStopFunctions.push(e.start(this));this.controllersRunning=!0}}stopControllers(){if(this.controllersRunning){for(let e of this.controllerStopFunctions)e();this.controllersRunning=!1,this.controllerStopFunctions=[]}}updateControllerPosition(){for(let e of this.controllers)e.updatePosition(this.x,this.y,this.width,this.height)}triggerResize(){this.renderer.triggerResize&&this.renderer.triggerResize(),this.pendingUpdate=!0}addController(e){this.controllers.push(e),this.controllersRunning&&e.start(this),this.pendingUpdate=!0}cover(){return this.goHome({cover:!0})}getRendererScreenPosition(){return this.renderer.getRendererScreenPosition()}updateRendererScreenPosition(){this.pendingUpdate=!0,this.renderer.resize()}setOptions(e){this.options={...this.options,...e}}goHome(e={}){if(this.world.width<=0||this.world.height<=0)return;let t=this.getScaleFactor(),n=e.position?{x:e.position[1],y:e.position[2],width:e.position[3]-e.position[1],height:e.position[4]-e.position[2]}:{x:this.homePosition[1],y:this.homePosition[2],width:this.homePosition[3]-this.homePosition[1],height:this.homePosition[4]-this.homePosition[2]},r=this.width*t,i=this.height*t,a=n.width/r,o=n.height/i,s=r/i;if(e.cover?a>o:a<o){let e=s*n.height,t=(e-n.width)/2;this.target[1]=Math.round(-t+n.x),this.target[2]=Math.round(n.y),this.target[3]=Math.round(e-t+n.x),this.target[4]=Math.round(n.height+n.y)}else{let e=n.width/s,t=(e-n.height)/2;this.target[1]=Math.round(n.x),this.target[2]=Math.round(n.y-t),this.target[3]=Math.round(n.x+n.width),this.target[4]=Math.round(n.y+e-t)}this.constrainBounds(this.target),this.updateControllerPosition()}resize(e,t,n,r){this.transitionManager.hasPending()&&this.transitionManager.stopTransition(),this.updateFocalPosition(e-t,n-r);let i=t/e,a=r/n;this.target[3]=this.target[1]+(this.target[3]-this.target[1])*i,this.target[4]=this.target[2]+(this.target[4]-this.target[2])*a,this.goHome({position:this.focalPosition}),this.renderer.resize(t,r),this.pendingUpdate=!0,this.transitionManager.resumeTransition()}updateFocalPosition(t,n){if(!this.manualFocalPosition){let t=this.width,n=this.height,r=Math.min(t,n),i=this.x+0,a=this.y+0;if(t<n){let t=this.height-this.width;this.focalPosition=e.projection({x:i,y:a+t/2,width:r-0,height:r-0}),this.pendingUpdate=!0}else{let t=this.width-this.height;this.focalPosition=e.projection({x:i+t/2,y:a,width:r-0,height:r-0}),this.pendingUpdate=!0}}}getViewport(){return this._viewport.x=this.target[1],this._viewport.y=this.target[2],this._viewport.width=this.target[3]-this.target[1],this._viewport.height=this.target[4]-this.target[2],this._viewport}constrainBounds(e,{panPadding:t=0,ref:r=!1}={}){let{minX:i,maxX:a,minY:o,maxY:s}=this.getBounds({target:e,padding:t}),c=!1,l=r?e:n(e),u=Math.round(e[3]-e[1]),d=Math.round(e[4]-e[2]);return i>e[1]&&(c=!0,l[1]=i,l[3]=i+u),o>e[2]&&(c=!0,l[2]=o,l[4]=o+d),a<e[1]&&(c=!0,l[1]=a,l[3]=a+u),s<e[2]&&(c=!0,l[2]=s,l[4]=s+d),[c,l]}getBounds(e){let t=e.target||this.target,n=e.padding,r=this.options.visibilityRatio,i=Math.abs(1-r);if(this.world.hasActiveZone()){let e=this.world.getActiveZone();if(e){let r=t[3]-t[1]<e.points[3]-e.points[1],i=t[4]-t[2]<e.points[4]-e.points[2];return{minX:r?e.points[1]-n:e.points[1]+(e.points[3]-e.points[1])/2-(t[3]-t[1])/2,maxX:i?e.points[2]-n:e.points[2]+(e.points[4]-e.points[2])/2-(t[4]-t[2])/2,minY:r?e.points[3]+n:e.points[1]+(e.points[3]-e.points[1])/2-(t[3]-t[1])/2,maxY:i?e.points[4]+n:e.points[2]+(e.points[4]-e.points[2])/2-(t[4]-t[2])/2}}}let a=t[3]-t[1],o=this.world.width,s=-a*i,c=o-a-s,l=t[4]-t[2],u=this.world.height,d=-l*i,f=u-l-d,p=Math.round(Math.max(s,c)),m=Math.round(Math.min(s,c)),h=Math.round(Math.max(d,f));return{minX:m,maxX:p,minY:Math.round(Math.min(d,f)),maxY:h}}getScaleFactor(e=!1){let t=this.renderer.getScale(this.target[3]-this.target[1],this.target[4]-this.target[2],e);return t===0?this._lastGoodScale:(this._lastGoodScale=t,t)}getZoomedPosition(e,{origin:t,fromPos:n}){let r=n?{width:n[3]-n[1],height:n[4]-n[2]}:void 0,i=r?this.renderer.getScale(r.width,r.height):this.getScaleFactor(),a=r?r.width:this.width,o=r?r.height:this.height,s=this.getRendererScreenPosition()?.width,u=this.world.width,d=s?s/u:1,f=this.options.maxUnderZoom,p=Math.max(d||1,this.options.maxOverZoom),m=1/e,h=i*m;if(m<1){let t=a*i,n=o*i;this.world.width/t>this.world.height/n?this.world.width*h<~~(a*i)*f&&(e=this.world.width*i/(a*i*f)):this.world.height*h<~~(o*i)*f&&(e=this.world.height*i/(o*i*f))}else h>p&&(e=i/p);let g=l(this.target,c(e,t?t.x:this.target[1]+(this.target[3]-this.target[1])/2,t?t.y:this.target[2]+(this.target[4]-this.target[2])/2),this.zoomBuffer);return this.constrainBounds(g,{ref:!0,panPadding:100}),g}clampRegion({x:e,y:t,width:n,height:r,padding:i=0}){let a=this.width,o=this.height,s=n/a<r/o,c=e-i,l=t-i,u=n+i*2,d=r+i*2;if(s){let e=d/o*a;return{x:c-(e-u)/2,y:l,width:e,height:d}}let f=u/a*o;return{x:c,y:l-(f-d)/2,width:u,height:f}}viewerToWorld(e,t){let n=this.getScaleFactor();return this._viewerToWorld.x=this.target[1]+e/n,this._viewerToWorld.y=this.target[2]+t/n,this._viewerToWorld}worldToViewer(n,r,i,a){let c=e.singleBox(i,a,n,r);return o(c,t(s(this.getScaleFactor()),u(-this.target[1],-this.target[2]))),{x:c[1],y:c[2],width:c[3]-c[1],height:c[4]-c[2],strand:c}}setScale(e,t){o(this.target,c(e,t?t.x:this.target[1]+(this.target[3]-this.target[1])/2,t?t.y:this.target[2]+(this.target[4]-this.target[2])/2)),this.pendingUpdate=!0}syncTo(e){let t=this.target;return this.target=e.target,this.pendingUpdate=!0,()=>{this.target=t}}stop(){return this.stopId!==void 0&&(window.cancelAnimationFrame(this.stopId),this.stopId=void 0),()=>{this.render(performance.now())}}reset(){this.renderer.reset()}selectZone(e){this.world.selectZone(e),this.pendingUpdate=!0}deselectZone(){this.world.deselectZone(),this.pendingUpdate=!0}hook(e,t){let n=this.hooks[e].length;if(n!==0)for(let r=0;r<n;r++)this.hooks[e][r](t)}registerHook(e,t){return this.hooks[e].push(t),()=>{this.hooks[e]=this.hooks[e].filter(e=>e!==t)}}updateNextFrame(){this.pendingUpdate=!0}};const Pe=/([0-9]+(px|em)\s+)+(solid)\s+(.*)/g,Fe={},Ie=[`backgroundColor`,`opacity`,`boxShadow`,`borderColor`,`borderWidth`,`borderStyle`,`outlineColor`,`outlineWidth`,`outlineOffset`,`outlineStyle`];var Le=class extends R{constructor(){super(),L(this,`id`,void 0),L(this,`type`,`spacial-content`),L(this,`isShape`,!0),L(this,`points`,void 0),L(this,`hoverEvents`,!1),L(this,`activeEvents`,!1),L(this,`display`,{x:0,y:0,scale:1,width:-1,height:-1,points:n(5)}),L(this,`boundingBox`,null),L(this,`_parsed`,{border:{id:null,match:[]},outline:{id:null,match:[]}}),L(this,`hovering`,void 0),L(this,`pressing`,void 0),L(this,`props`,{}),L(this,`shape`,{type:`none`}),L(this,`addHover`,()=>{this.hovering=!0,this.__revision++}),L(this,`removeHover`,()=>{this.hovering=!1,this.pressing=!1,this.__revision++}),L(this,`addPress`,()=>{this.pressing=!0,this.__revision++}),L(this,`removePress`,()=>{this.pressing=!1,this.__revision++}),this.id=P(12),this.points=n(5),this.shape={type:`none`}}updateBoundingBox(){if(this.shape.type===`none`)return;let e=this.shape.points;if(this.shape.points.length>2){let t=Math.min(...e.map(e=>e[0])),n=Math.min(...e.map(e=>e[1])),r=Math.max(0,...e.map(e=>e[0])),i=Math.max(0,...e.map(e=>e[1]));this.boundingBox={x:t,y:n,width:r-t,height:i-n};return}this.boundingBox=null}intersects(e){if(!e||this.shape.type===`none`)return!1;let[t,n]=e,r=this.shape.points,i=this.boundingBox;if(i||(this.updateBoundingBox(),i=this.boundingBox),!i||t<i.x||t>i.x+i.width||n<i.y||n>i.height+i.y)return!1;let a=!1;for(let e=0,i=r.length-1;e<r.length;i=e++)r[e][1]>n!=r[i][1]>n&&t<(r[i][0]-r[e][0])*(n-r[e][1])/(r[i][1]-r[e][1])+r[e][0]&&(a=!a);return a}getAllPointsAt(e,t){return e[3]-e[1]===1&&e[4]-e[2]===1?this.intersects([e[1],e[2]])?[[this,this.points,t]]:[]:[[this,this.points,t]]}applyProps(t={}){let n=!1;if(t.points)if(this.shape.type!==`polygon`||this.shape.points.length!==t.points.length)this.shape={type:`polygon`,points:t.points,open:t.open},this.updateBoundingBox();else{let e=!1,n=t.points.length;for(let r=0;r<n;r++)if(t.points[r][0]!==this.shape.points[r][0]||t.points[r][1]!==this.shape.points[r][1]){e=!0;break}e&&(this.shape={type:`polygon`,points:t.points,open:t.open},this.updateBoundingBox())}if(t.interactive!==this.props.interactive&&(n=!0,this.props.interactive=t.interactive),(t.open||t.open===!1)&&(n=!0,this.shape.open=t.open),t.style){let e=t.border||t.style.border;if(e!==this._parsed.border.id)if(!e)this._parsed.border.id=null,this._parsed.border.match=[];else{let t=Fe[e]||Pe.exec(e)||Pe.exec(e);t&&(this._parsed.border.id=e,this._parsed.border.match=Fe[e]=t)}if(this._parsed.border.id&&(t.style.borderWidth=this._parsed.border.match[1],t.style.borderStyle=`solid`,t.style.borderColor=this._parsed.border.match[4]),t.style.outline!==this._parsed.outline.id)if(!t.style.outline)this._parsed.outline.id=null,this._parsed.outline.match=[];else{let e=Fe[t.style.outline]||Pe.exec(t.style.outline)||Pe.exec(t.style.outline);e&&(this._parsed.outline.id=t.style.outline,this._parsed.outline.match=Fe[t.style.outline]=e)}this._parsed.outline.id&&(t.style.outlineWidth=this._parsed.outline.match[1],t.style.outlineStyle=`solid`,t.style.outlineColor=this._parsed.outline.match[4]),this.props.style=t.style,t.backgroundColor&&!this.props.style.backgroundColor&&(this.props.style.backgroundColor=t.backgroundColor,n=!0),t.style.background&&!this.props.style.backgroundColor&&(this.props.style.backgroundColor=t.style.background,n=!0);for(let e of Ie)if(this.props.style[e]!==t.style[e]){n=!0;break}t.style[`:hover`]!==this.props.hoverStyles&&(this.props.hoverStyles=t.style[`:hover`],this.hoverEvents||(this.hoverEvents=!0,this.addEventListener(`pointerenter`,this.addHover),this.addEventListener(`pointerleave`,this.removeHover)),n=!0),t.style[`:active`]!==this.props.pressStyles&&(this.props.pressStyles=t.style[`:active`],this.activeEvents||(this.activeEvents=!0,this.addEventListener(`mousedown`,this.addPress),this.addEventListener(`mouseup`,this.removePress)),n=!0)}t.href!==this.props.href&&(this.props.href=t.href,n=!0),t.hrefTarget!==this.props.hrefTarget&&(this.props.hrefTarget=t.hrefTarget,n=!0),t.title!==this.props.title&&(this.props.title=t.title,n=!0),t.className!==this.props.className&&(this.props.className=t.className,t.className&&!this.hoverEvents&&(this.hoverEvents=!0,this.addEventListener(`pointerenter`,this.addHover),this.addEventListener(`pointerleave`,this.removeHover)),t.className&&!this.activeEvents&&(this.activeEvents=!0,this.addEventListener(`mousedown`,this.addPress),this.addEventListener(`mouseup`,this.removePress)),n=!0),t.relativeSize!==this.props.relativeSize&&(this.props.relativeSize=t.relativeSize,n=!0),t.relativeStyle!==this.props.relativeStyle&&(this.props.relativeStyle=t.relativeStyle,n=!0),t.html!==this.props.html&&(this.props.html=t.html,n=!0),t.target&&(t.target.width!==this.display.width||t.target.height!==this.display.height||t.target.x!==this.points[1]||t.target.y!==this.points[2])&&(n=!0,this.points=e.singleBox(t.target.width,t.target.height,t.target.x,t.target.y),this.display.points=e.singleBox(t.target.width,t.target.height,t.target.x,t.target.y),this.display.width=t.target.width,this.display.height=t.target.height),n&&this.__revision++}};const Re=typeof performance==`object`&&performance&&typeof performance.now==`function`?performance:Date,ze=typeof AbortController==`function`?AbortController:class{constructor(){this.signal=new He}abort(e=Error(`This operation was aborted`)){this.signal.reason=this.signal.reason||e,this.signal.aborted=!0,this.signal.dispatchEvent({type:`abort`,target:this.signal})}},Be=typeof AbortSignal==`function`,Ve=typeof ze.AbortSignal==`function`,He=Be?AbortSignal:Ve?ze.AbortController:class{constructor(){this.reason=void 0,this.aborted=!1,this._listeners=[]}dispatchEvent(e){e.type===`abort`&&(this.aborted=!0,this.onabort(e),this._listeners.forEach(t=>t(e),this))}onabort(){}addEventListener(e,t){e===`abort`&&this._listeners.push(t)}removeEventListener(e,t){e===`abort`&&(this._listeners=this._listeners.filter(e=>e!==t))}},Ue=new Set,We=(e,t)=>{let n=`LRU_CACHE_OPTION_${e}`;Je(n)&&Ye(n,`${e} option`,`options.${t}`,$e)},Ge=(e,t)=>{let n=`LRU_CACHE_METHOD_${e}`;if(Je(n)){let{prototype:r}=$e,{get:i}=Object.getOwnPropertyDescriptor(r,e);Ye(n,`${e} method`,`cache.${t}()`,i)}},Ke=(e,t)=>{let n=`LRU_CACHE_PROPERTY_${e}`;if(Je(n)){let{prototype:r}=$e,{get:i}=Object.getOwnPropertyDescriptor(r,e);Ye(n,`${e} property`,`cache.${t}`,i)}},qe=(...e)=>{typeof process==`object`&&process&&typeof process.emitWarning==`function`?process.emitWarning(...e):console.error(...e)},Je=e=>!Ue.has(e),Ye=(e,t,n,r)=>{Ue.add(e),qe(`The ${t} is deprecated. Please use ${n} instead.`,`DeprecationWarning`,e,r)},J=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),Xe=e=>J(e)?e<=2**8?Uint8Array:e<=2**16?Uint16Array:e<=2**32?Uint32Array:e<=2**53-1?Ze:null:null;var Ze=class extends Array{constructor(e){super(e),this.fill(0)}},Qe=class{constructor(e){if(e===0)return[];this.heap=new(Xe(e))(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},$e=class e{constructor(t={}){let{max:n=0,ttl:r,ttlResolution:i=1,ttlAutopurge:a,updateAgeOnGet:o,updateAgeOnHas:s,allowStale:c,dispose:l,disposeAfter:u,noDisposeOnSet:d,noUpdateTTL:f,maxSize:p=0,maxEntrySize:m=0,sizeCalculation:h,fetchMethod:g,fetchContext:_,noDeleteOnFetchRejection:v,noDeleteOnStaleGet:y,allowStaleOnFetchRejection:b,allowStaleOnFetchAbort:x,ignoreFetchAbort:S}=t,{length:C,maxAge:w,stale:T}=t instanceof e?{}:t;if(n!==0&&!J(n))throw TypeError(`max option must be a nonnegative integer`);let E=n?Xe(n):Array;if(!E)throw Error(`invalid max value: `+n);if(this.max=n,this.maxSize=p,this.maxEntrySize=m||this.maxSize,this.sizeCalculation=h||C,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw TypeError(`cannot set sizeCalculation without setting maxSize or maxEntrySize`);if(typeof this.sizeCalculation!=`function`)throw TypeError(`sizeCalculation set to non-function`)}if(this.fetchMethod=g||null,this.fetchMethod&&typeof this.fetchMethod!=`function`)throw TypeError(`fetchMethod must be a function if specified`);if(this.fetchContext=_,!this.fetchMethod&&_!==void 0)throw TypeError(`cannot set fetchContext without fetchMethod`);if(this.keyMap=new Map,this.keyList=Array(n).fill(null),this.valList=Array(n).fill(null),this.next=new E(n),this.prev=new E(n),this.head=0,this.tail=0,this.free=new Qe(n),this.initialFill=1,this.size=0,typeof l==`function`&&(this.dispose=l),typeof u==`function`?(this.disposeAfter=u,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!d,this.noUpdateTTL=!!f,this.noDeleteOnFetchRejection=!!v,this.allowStaleOnFetchRejection=!!b,this.allowStaleOnFetchAbort=!!x,this.ignoreFetchAbort=!!S,this.maxEntrySize!==0){if(this.maxSize!==0&&!J(this.maxSize))throw TypeError(`maxSize must be a positive integer if specified`);if(!J(this.maxEntrySize))throw TypeError(`maxEntrySize must be a positive integer if specified`);this.initializeSizeTracking()}if(this.allowStale=!!c||!!T,this.noDeleteOnStaleGet=!!y,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!s,this.ttlResolution=J(i)||i===0?i:1,this.ttlAutopurge=!!a,this.ttl=r||w||0,this.ttl){if(!J(this.ttl))throw TypeError(`ttl must be a positive integer if specified`);this.initializeTTLTracking()}if(this.max===0&&this.ttl===0&&this.maxSize===0)throw TypeError(`At least one of max, maxSize, or ttl is required`);if(!this.ttlAutopurge&&!this.max&&!this.maxSize){let t=`LRU_CACHE_UNBOUNDED`;Je(t)&&(Ue.add(t),qe(`TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.`,`UnboundedCacheWarning`,t,e))}T&&We(`stale`,`allowStale`),w&&We(`maxAge`,`ttl`),C&&We(`length`,`sizeCalculation`)}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new Ze(this.max),this.starts=new Ze(this.max),this.setItemTTL=(e,t,n=Re.now())=>{if(this.starts[e]=t===0?0:n,this.ttls[e]=t,t!==0&&this.ttlAutopurge){let n=setTimeout(()=>{this.isStale(e)&&this.delete(this.keyList[e])},t+1);n.unref&&n.unref()}},this.updateItemAge=e=>{this.starts[e]=this.ttls[e]===0?0:Re.now()},this.statusTTL=(n,r)=>{n&&(n.ttl=this.ttls[r],n.start=this.starts[r],n.now=e||t(),n.remainingTTL=n.now+n.ttl-n.start)};let e=0,t=()=>{let t=Re.now();if(this.ttlResolution>0){e=t;let n=setTimeout(()=>e=0,this.ttlResolution);n.unref&&n.unref()}return t};this.getRemainingTTL=n=>{let r=this.keyMap.get(n);return r===void 0?0:this.ttls[r]===0||this.starts[r]===0?1/0:this.starts[r]+this.ttls[r]-(e||t())},this.isStale=n=>this.ttls[n]!==0&&this.starts[n]!==0&&(e||t())-this.starts[n]>this.ttls[n]}updateItemAge(e){}statusTTL(e,t){}setItemTTL(e,t,n){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new Ze(this.max),this.removeItemSize=e=>{this.calculatedSize-=this.sizes[e],this.sizes[e]=0},this.requireSize=(e,t,n,r)=>{if(this.isBackgroundFetch(t))return 0;if(!J(n))if(r){if(typeof r!=`function`)throw TypeError(`sizeCalculation must be a function`);if(n=r(t,e),!J(n))throw TypeError(`sizeCalculation return invalid (expect positive integer)`)}else throw TypeError(`invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.`);return n},this.addItemSize=(e,t,n)=>{if(this.sizes[e]=t,this.maxSize){let t=this.maxSize-this.sizes[e];for(;this.calculatedSize>t;)this.evict(!0)}this.calculatedSize+=this.sizes[e],n&&(n.entrySize=t,n.totalCalculatedSize=this.calculatedSize)}}removeItemSize(e){}addItemSize(e,t){}requireSize(e,t,n,r){if(n||r)throw TypeError(`cannot set size without setting maxSize or maxEntrySize on cache`)}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.tail;!(!this.isValidIndex(t)||((e||!this.isStale(t))&&(yield t),t===this.head));)t=this.prev[t]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.head;!(!this.isValidIndex(t)||((e||!this.isStale(t))&&(yield t),t===this.tail));)t=this.next[t]}isValidIndex(e){return e!==void 0&&this.keyMap.get(this.keyList[e])===e}*entries(){for(let e of this.indexes())this.valList[e]!==void 0&&this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield[this.keyList[e],this.valList[e]])}*rentries(){for(let e of this.rindexes())this.valList[e]!==void 0&&this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield[this.keyList[e],this.valList[e]])}*keys(){for(let e of this.indexes())this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.keyList[e])}*rkeys(){for(let e of this.rindexes())this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.keyList[e])}*values(){for(let e of this.indexes())this.valList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.valList[e])}*rvalues(){for(let e of this.rindexes())this.valList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.valList[e])}[Symbol.iterator](){return this.entries()}find(e,t){for(let n of this.indexes()){let r=this.valList[n],i=this.isBackgroundFetch(r)?r.__staleWhileFetching:r;if(i!==void 0&&e(i,this.keyList[n],this))return this.get(this.keyList[n],t)}}forEach(e,t=this){for(let n of this.indexes()){let r=this.valList[n],i=this.isBackgroundFetch(r)?r.__staleWhileFetching:r;i!==void 0&&e.call(t,i,this.keyList[n],this)}}rforEach(e,t=this){for(let n of this.rindexes()){let r=this.valList[n],i=this.isBackgroundFetch(r)?r.__staleWhileFetching:r;i!==void 0&&e.call(t,i,this.keyList[n],this)}}get prune(){return Ge(`prune`,`purgeStale`),this.purgeStale}purgeStale(){let e=!1;for(let t of this.rindexes({allowStale:!0}))this.isStale(t)&&(this.delete(this.keyList[t]),e=!0);return e}dump(){let e=[];for(let t of this.indexes({allowStale:!0})){let n=this.keyList[t],r=this.valList[t],i=this.isBackgroundFetch(r)?r.__staleWhileFetching:r;if(i===void 0)continue;let a={value:i};if(this.ttls){a.ttl=this.ttls[t];let e=Re.now()-this.starts[t];a.start=Math.floor(Date.now()-e)}this.sizes&&(a.size=this.sizes[t]),e.unshift([n,a])}return e}load(e){this.clear();for(let[t,n]of e){if(n.start){let e=Date.now()-n.start;n.start=Re.now()-e}this.set(t,n.value,n)}}dispose(e,t,n){}set(e,t,{ttl:n=this.ttl,start:r,noDisposeOnSet:i=this.noDisposeOnSet,size:a=0,sizeCalculation:o=this.sizeCalculation,noUpdateTTL:s=this.noUpdateTTL,status:c}={}){if(a=this.requireSize(e,t,a,o),this.maxEntrySize&&a>this.maxEntrySize)return c&&(c.set=`miss`,c.maxEntrySizeExceeded=!0),this.delete(e),this;let l=this.size===0?void 0:this.keyMap.get(e);if(l===void 0)l=this.newIndex(),this.keyList[l]=e,this.valList[l]=t,this.keyMap.set(e,l),this.next[this.tail]=l,this.prev[l]=this.tail,this.tail=l,this.size++,this.addItemSize(l,a,c),c&&(c.set=`add`),s=!1;else{this.moveToTail(l);let n=this.valList[l];if(t!==n){if(this.isBackgroundFetch(n)?n.__abortController.abort(Error(`replaced`)):i||(this.dispose(n,e,`set`),this.disposeAfter&&this.disposed.push([n,e,`set`])),this.removeItemSize(l),this.valList[l]=t,this.addItemSize(l,a,c),c){c.set=`replace`;let e=n&&this.isBackgroundFetch(n)?n.__staleWhileFetching:n;e!==void 0&&(c.oldValue=e)}}else c&&(c.set=`update`)}if(n!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),s||this.setItemTTL(l,n,r),this.statusTTL(c,l),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return this.size===0?this.tail:this.size===this.max&&this.max!==0?this.evict(!1):this.free.length===0?this.initialFill++:this.free.pop()}pop(){if(this.size){let e=this.valList[this.head];return this.evict(!0),e}}evict(e){let t=this.head,n=this.keyList[t],r=this.valList[t];return this.isBackgroundFetch(r)?r.__abortController.abort(Error(`evicted`)):(this.dispose(r,n,`evict`),this.disposeAfter&&this.disposed.push([r,n,`evict`])),this.removeItemSize(t),e&&(this.keyList[t]=null,this.valList[t]=null,this.free.push(t)),this.head=this.next[t],this.keyMap.delete(n),this.size--,t}has(e,{updateAgeOnHas:t=this.updateAgeOnHas,status:n}={}){let r=this.keyMap.get(e);if(r!==void 0)if(this.isStale(r))n&&(n.has=`stale`,this.statusTTL(n,r));else return t&&this.updateItemAge(r),n&&(n.has=`hit`),this.statusTTL(n,r),!0;else n&&(n.has=`miss`);return!1}peek(e,{allowStale:t=this.allowStale}={}){let n=this.keyMap.get(e);if(n!==void 0&&(t||!this.isStale(n))){let e=this.valList[n];return this.isBackgroundFetch(e)?e.__staleWhileFetching:e}}backgroundFetch(e,t,n,r){let i=t===void 0?void 0:this.valList[t];if(this.isBackgroundFetch(i))return i;let a=new ze;n.signal&&n.signal.addEventListener(`abort`,()=>a.abort(n.signal.reason));let o={signal:a.signal,options:n,context:r},s=(r,i=!1)=>{let{aborted:s}=a.signal,c=n.ignoreFetchAbort&&r!==void 0;return n.status&&(s&&!i?(n.status.fetchAborted=!0,n.status.fetchError=a.signal.reason,c&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),s&&!c&&!i?l(a.signal.reason):(this.valList[t]===d&&(r===void 0?d.__staleWhileFetching?this.valList[t]=d.__staleWhileFetching:this.delete(e):(n.status&&(n.status.fetchUpdated=!0),this.set(e,r,o.options))),r)},c=e=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=e),l(e)),l=r=>{let{aborted:i}=a.signal,o=i&&n.allowStaleOnFetchAbort,s=o||n.allowStaleOnFetchRejection,c=s||n.noDeleteOnFetchRejection;if(this.valList[t]===d&&(!c||d.__staleWhileFetching===void 0?this.delete(e):o||(this.valList[t]=d.__staleWhileFetching)),s)return n.status&&d.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),d.__staleWhileFetching;if(d.__returned===d)throw r},u=(t,r)=>{this.fetchMethod(e,i,o).then(e=>t(e),r),a.signal.addEventListener(`abort`,()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(t(),n.allowStaleOnFetchAbort&&(t=e=>s(e,!0)))})};n.status&&(n.status.fetchDispatched=!0);let d=new Promise(u).then(s,c);return d.__abortController=a,d.__staleWhileFetching=i,d.__returned=null,t===void 0?(this.set(e,d,{...o.options,status:void 0}),t=this.keyMap.get(e)):this.valList[t]=d,d}isBackgroundFetch(e){return e&&typeof e==`object`&&typeof e.then==`function`&&Object.prototype.hasOwnProperty.call(e,`__staleWhileFetching`)&&Object.prototype.hasOwnProperty.call(e,`__returned`)&&(e.__returned===e||e.__returned===null)}async fetch(e,{allowStale:t=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:i=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:o=0,sizeCalculation:s=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:l=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:u=this.allowStaleOnFetchRejection,ignoreFetchAbort:d=this.ignoreFetchAbort,allowStaleOnFetchAbort:f=this.allowStaleOnFetchAbort,fetchContext:p=this.fetchContext,forceRefresh:m=!1,status:h,signal:g}={}){if(!this.fetchMethod)return h&&(h.fetch=`get`),this.get(e,{allowStale:t,updateAgeOnGet:n,noDeleteOnStaleGet:r,status:h});let _={allowStale:t,updateAgeOnGet:n,noDeleteOnStaleGet:r,ttl:i,noDisposeOnSet:a,size:o,sizeCalculation:s,noUpdateTTL:c,noDeleteOnFetchRejection:l,allowStaleOnFetchRejection:u,allowStaleOnFetchAbort:f,ignoreFetchAbort:d,status:h,signal:g},v=this.keyMap.get(e);if(v===void 0){h&&(h.fetch=`miss`);let t=this.backgroundFetch(e,v,_,p);return t.__returned=t}else{let r=this.valList[v];if(this.isBackgroundFetch(r)){let e=t&&r.__staleWhileFetching!==void 0;return h&&(h.fetch=`inflight`,e&&(h.returnedStale=!0)),e?r.__staleWhileFetching:r.__returned=r}let i=this.isStale(v);if(!m&&!i)return h&&(h.fetch=`hit`),this.moveToTail(v),n&&this.updateItemAge(v),this.statusTTL(h,v),r;let a=this.backgroundFetch(e,v,_,p),o=a.__staleWhileFetching!==void 0,s=o&&t;return h&&(h.fetch=o&&i?`stale`:`refresh`,s&&i&&(h.returnedStale=!0)),s?a.__staleWhileFetching:a.__returned=a}}get(e,{allowStale:t=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:i}={}){let a=this.keyMap.get(e);if(a!==void 0){let o=this.valList[a],s=this.isBackgroundFetch(o);return this.statusTTL(i,a),this.isStale(a)?(i&&(i.get=`stale`),s?(i&&(i.returnedStale=t&&o.__staleWhileFetching!==void 0),t?o.__staleWhileFetching:void 0):(r||this.delete(e),i&&(i.returnedStale=t),t?o:void 0)):(i&&(i.get=`hit`),s?o.__staleWhileFetching:(this.moveToTail(a),n&&this.updateItemAge(a),o))}else i&&(i.get=`miss`)}connect(e,t){this.prev[t]=e,this.next[e]=t}moveToTail(e){e!==this.tail&&(e===this.head?this.head=this.next[e]:this.connect(this.prev[e],this.next[e]),this.connect(this.tail,e),this.tail=e)}get del(){return Ge(`del`,`delete`),this.delete}delete(e){let t=!1;if(this.size!==0){let n=this.keyMap.get(e);if(n!==void 0)if(t=!0,this.size===1)this.clear();else{this.removeItemSize(n);let t=this.valList[n];this.isBackgroundFetch(t)?t.__abortController.abort(Error(`deleted`)):(this.dispose(t,e,`delete`),this.disposeAfter&&this.disposed.push([t,e,`delete`])),this.keyMap.delete(e),this.keyList[n]=null,this.valList[n]=null,n===this.tail?this.tail=this.prev[n]:n===this.head?this.head=this.next[n]:(this.next[this.prev[n]]=this.next[n],this.prev[this.next[n]]=this.prev[n]),this.size--,this.free.push(n)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return t}clear(){for(let e of this.rindexes({allowStale:!0})){let t=this.valList[e];if(this.isBackgroundFetch(t))t.__abortController.abort(Error(`deleted`));else{let n=this.keyList[e];this.dispose(t,n,`delete`),this.disposeAfter&&this.disposed.push([t,n,`delete`])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return Ge(`reset`,`clear`),this.clear}get length(){return Ke(`length`,`size`),this.size}static get AbortController(){return ze}static get AbortSignal(){return He}},et=$e;const tt=/(-?[0-9]+(px|em)\s+|0\s+)(-?[0-9]+(px|em)\s+|0\s+)(-?[0-9]+(px|em)\s+|0\s+)?(-?[0-9]+(px|em)\s+|0\s+)?(.*)/g,nt={},rt=typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(`firefox`),it={};var at=class{constructor(e,t){L(this,`canvas`,void 0),L(this,`ctx`,void 0),L(this,`options`,void 0),L(this,`imagesPending`,0),L(this,`imagesLoaded`,0),L(this,`imageIdsLoaded`,[]),L(this,`frameIsRendering`,!1),L(this,`pendingDrawCall`,!1),L(this,`firstMeaningfulPaint`,!1),L(this,`parallelTasks`,8),L(this,`frameTasks`,0),L(this,`loadingQueueOrdered`,!0),L(this,`loadingQueue`,[]),L(this,`currentTask`,Promise.resolve()),L(this,`tasksRunning`,0),L(this,`stats`,void 0),L(this,`averageJobTime`,64),L(this,`lastKnownScale`,1),L(this,`visible`,[]),L(this,`previousVisible`,[]),L(this,`rendererPosition`,void 0),L(this,`dpi`,void 0),L(this,`drawCalls`,[]),L(this,`lastPaintedObject`,void 0),L(this,`hostCache`,void 0),L(this,`invalidated`,[]),L(this,`_worker`,()=>{if(this.loadingQueue.length){let e=this.loadingQueue.pop();e&&(this.tasksRunning++,this.frameTasks++,this.currentTask=e.task().then(()=>{this.tasksRunning--}).catch(()=>{this.tasksRunning--}))}}),L(this,`_scheduled`,0),L(this,`_doWork`,()=>{this.loadingQueue.length===0&&this.tasksRunning===0&&this._scheduled&&(clearInterval(this._scheduled),this._scheduled=0);let e=this.parallelTasks||1;!this.firstMeaningfulPaint&&this.loadingQueue.length&&(e=this.loadingQueue.length);for(let t=0;t<=e;t++)this._worker()}),this.canvas=e,this.rendererPosition=e.getBoundingClientRect(),this.ctx=e.getContext(`2d`,{alpha:!0}),this.ctx.imageSmoothingEnabled=!0,this.options=t||{},this.canvas.style.transition=`opacity .3s`,this.dpi=t?.dpi||1,this.hostCache=t?.lruCache?new et({maxSize:1024*512*512,dispose:(e,t,n)=>{this.invalidated.push(t),e.width=0,e.height=0},sizeCalculation:(e,t)=>e.width*e.height}):{store:{},get(e){return this.store[e]},set(e,t){this.store[e]=t}}}getCanvasDims(){return{width:this.canvas.width/this.dpi,height:this.canvas.height/this.dpi}}resize(){this.rendererPosition=this.canvas.getBoundingClientRect()}isReady(){return this.firstMeaningfulPaint}afterFrame(e){if(this.clearTransform(),this.lastPaintedObject=void 0,this.frameIsRendering=!1,this.imagesPending=Math.max(0,this.imagesPending-this.imagesLoaded),this.imagesLoaded=0,this.loadingQueueOrdered||(this.loadingQueue=this.loadingQueue.sort((e,t)=>e.network&&e.scale===t.scale?t.distance-e.distance:e.scale<t.scale?-1:1),this.loadingQueueOrdered=!0),this.previousVisible=this.visible,this.pendingDrawCall=!!this.drawCalls.length,this.pendingDrawCall)for(let e=0;e<this.drawCalls.length;e++){let e=this.drawCalls.shift();e&&e()}this.doOffscreenWork(),this.options.debug&&this.stats&&this.stats.end()}doOffscreenWork(){this.frameTasks=0,this.loadingQueue.length&&(this._worker(),this.loadingQueue.length&&(this._scheduled||(this._scheduled=setInterval(this._doWork,0))))}getScale(e,t,n){if(Number.isNaN(e)||Number.isNaN(t))return this.lastKnownScale;let r=this.getCanvasDims(),i=r.width/e,a=r.height/t,o=(i<a?a:i)*(n&&this.dpi||1);return Number.isNaN(o)||(this.lastKnownScale=o),this.lastKnownScale}beforeFrame(e,t,n,r){this.options.debug&&this.stats&&this.stats.begin(),this.frameIsRendering=!0,this.visible=[],this.options.beforeFrame&&this.options.beforeFrame(t);let i=this.getCanvasDims();if(this.ctx.globalAlpha=1,this.ctx.fillStyle=this.canvas.dataset.background??`rgb(0, 0, 0)`,this.ctx.fillRect(0,0,i.width,i.height),r.enableFilters&&(r.filters.brightness||r.filters.contrast||r.filters.grayscale||r.filters.invert||r.filters.sepia||r.filters.saturate||r.filters.hueRotate||r.filters.blur)){let e=``;r.filters.brightness&&(e+=`brightness(${~~(100+r.filters.brightness*100)}%) `),r.filters.contrast&&(e+=`contrast(${~~(100+r.filters.contrast*100)}%) `),r.filters.grayscale&&(e+=`grayscale(${~~(r.filters.grayscale*100)}%) `),r.filters.invert&&(e+=`invert(${~~(r.filters.invert*100)}%) `),r.filters.sepia&&(e+=`sepia(${~~(r.filters.sepia*100)}%) `),r.filters.saturate&&(e+=`saturate(${~~(100+r.filters.saturate*100)}%) `),r.filters.hueRotate&&(e+=`hue-rotate(${r.filters.hueRotate}deg) `),r.filters.blur&&(e+=`blur(${r.filters.blur}px) `),this.ctx.filter!==e&&(this.ctx.filter=e)}else this.ctx.filter=`none`}applyTransform(e,t,n,r,i){let a=e.__owner.value;if(a&&a.rotation){this.ctx.save();let e=t+r/2,o=n+i/2;this.ctx.translate(e,o),this.ctx.rotate(a.rotation*Math.PI/180),this.ctx.translate(-e,-o),this.lastPaintedObject=a}}clearTransform(){this.lastPaintedObject&&(this.lastPaintedObject.rotation&&this.ctx.restore(),this.lastPaintedObject=void 0)}paint(e,t,n,r,i,a){let o=this.ctx.globalAlpha;if(e instanceof z||e instanceof H){if(e.display.rotation){this.ctx.save();let o=n+i/2,s=r+a/2;e.crop&&(o-=e.crop[t*5+1],s-=e.crop[t*5+2]),this.ctx.translate(o,s),this.ctx.rotate(e.display.rotation*Math.PI/180),this.ctx.translate(-o,-s)}if(this.visible.push(e),typeof e.style&&e.style.opacity!==`undefined`){if(!e.style.opacity)return;this.ctx.globalAlpha=e.style.opacity}try{let o=e.__host.canvas,s=this.getCanvasDims();if((o.indices.indexOf(t)===-1||this.invalidated.indexOf(o.canvases[t])!==-1)&&this.schedulePaintToCanvas(o,e,t,V({x:n+i/2,y:r+i/2},{x:s.width/2,y:s.height/2})),!this.firstMeaningfulPaint)return;let c=this.hostCache.get(o.canvases[t]);if(c)if(e.crop&&e.cropData){if(e.crop[t*5]){let o=[e.crop[t*5+1]/e.display.scale-e.display.points[t*5+1],e.crop[t*5+2]/e.display.scale-e.display.points[t*5+2],1+(e.crop[t*5+3]-e.crop[t*5+1])/e.display.scale,1+(e.crop[t*5+4]-e.crop[t*5+2])/e.display.scale];o[0]+=e.cropData.x/e.display.scale,o[1]+=e.cropData.y/e.display.scale;let s=e.x*this.lastKnownScale,l=e.y*this.lastKnownScale,u=[n+s,r+l,i,a];u[0]+=s,u[1]+=l,this.ctx.drawImage(c,o[0],o[1],o[2],o[3],u[0],u[1],u[2]+1,u[3]+1)}}else rt?this.ctx.drawImage(c,0,0,e.display.points[t*5+3]-e.display.points[t*5+1],e.display.points[t*5+4]-e.display.points[t*5+2],n,r,i+1,a+1):this.ctx.drawImage(c,0,0,e.display.points[t*5+3]-e.display.points[t*5+1],e.display.points[t*5+4]-e.display.points[t*5+2],n,r,i+Number.MIN_VALUE+.5,a+Number.MIN_VALUE+.5)}catch{}e.display.rotation&&this.ctx.restore()}let s=e instanceof G&&this.options.box,c=e instanceof Le&&this.options.polygon;if((s||c)&&!e.props.className&&!e.props.html&&!e.props.href){if(this.visible.push(e),e.props.style){let t=Object.assign({},e.props.style||{},e.hovering?e.props.hoverStyles:{},e.pressing?e.props.pressStyles:{}),o=e.props.relativeStyle?1:i/e.width;t.opacity!==void 0&&(this.ctx.globalAlpha=t.opacity);let s=0;t.borderWidth!==void 0&&(s=parseInt(t.borderWidth,10)*o);let l=0;t.outlineWidth!==void 0&&(l=parseInt(t.outlineWidth,10)*o);let u=0;if(t.outlineOffset!==void 0&&(u=parseInt(t.outlineOffset,10)*o),t.borderColor&&(this.ctx.strokeStyle=t.borderColor),t.boxShadow){let e=t.boxShadow.split(/,(?![^(]*\))/);for(let t of e){let e=nt[t]||tt.exec(t)||tt.exec(t);nt[t]=e,e&&(this.ctx.save(),this.ctx.shadowOffsetX=parseInt(e[1])*this.dpi*o,this.ctx.shadowOffsetY=parseInt(e[3])*this.dpi*o,this.ctx.shadowBlur=parseInt(e[5])*this.dpi*o,this.ctx.shadowColor=e[9],this.ctx.fillStyle=`rgba(0,0,0,1)`,this.ctx.fillRect(n+s,r+s,i,a),this.ctx.restore())}}if(this.ctx.fillStyle=t.backgroundColor||`transparent`,this.ctx.lineWidth=s,c){let t=e.shape,i=t.points||[],a=i.length;this.ctx.beginPath();for(let e=0;e<a;e++)this.ctx.lineTo(n+i[e][0]*this.lastKnownScale,r+i[e][1]*this.lastKnownScale);t.open||this.ctx.closePath(),s&&this.ctx.stroke(),t.open||this.ctx.fill()}else s&&this.ctx.strokeRect(n+s/2,r+s/2,i+s,a+s),this.ctx.fillRect(n+s,r+s,i,a);l&&(t.outlineColor&&(this.ctx.strokeStyle=t.outlineColor),this.ctx.lineWidth=l,this.ctx.strokeRect(n-l/2-u,r-l/2-u,i+s*2+l+u*2,a+s*2+l+u*2))}this.ctx.globalAlpha=o}}loadImage(e,t,n,r=!1){if(it[e]&&it[e].naturalWidth>0){t(it[e]);return}try{let i=!1;r||setTimeout(()=>{i||this.loadImage(e,t,n,!0)},3e3);let a=document.createElement(`img`);a.decoding=`auto`,a.onload=function(){i=!0,t(a),it[e]=a,a.onload=null},this.options.crossOrigin&&(a.crossOrigin=`anonymous`),a.src=e,a.complete&&a.onload({}),a.width}catch(e){console.log(`image error`,e),n(e)}}schedulePaintToCanvas(e,t,n,r){this.imagesPending++,e.indices.push(n);let i=`${t.id}--${t.display.scale}-${n}`,a=this.invalidated.indexOf(i);a!==-1&&this.invalidated.splice(a,1),e.canvases[n]=i,t.__host.canvas.loading=!0,this.loadingQueueOrdered=!1,this.loadingQueue.push({id:i,scale:t.display.scale,network:!0,distance:r,task:()=>new Promise(a=>{if(this.visible.indexOf(t)===-1){this.imagesPending--,e.indices.splice(e.indices.indexOf(n),1),a();return}let o=t.getImageUrl(n);this.loadImage(o,o=>{this.loadingQueue.push({id:i,scale:t.display.scale,distance:r,task:()=>new Promise(r=>{this.imageIdsLoaded.includes(i)||(this.imagesLoaded++,this.imageIdsLoaded.push(i)),e.loaded.push(n),e.loaded.length===e.indices.length&&(e.loading=!1);let a=t.display.points.slice(n*5,n*5+5),s=document.createElement(`canvas`),c=s.getContext(`2d`);s.width=a[3]-a[1],s.height=a[4]-a[2],this.hostCache.set(e.canvases[n],s),this.drawCalls.push(()=>{c.drawImage(o,0,0,a[3]-a[1],a[4]-a[2]),r()})})}),a()},t=>{this.imagesPending--,e.indices.splice(e.indices.indexOf(n),1),a()})})})}afterPaintLayer(e,t){}prepareLayer(e,t){e.__owner.value&&(e.cropData&&this.lastKnownScale*(1/e.display.scale),this.applyTransform(e,t[1],t[2],t[3]-t[1],t[4]-t[2])),(!e.__host||!e.__host.canvas)&&(e instanceof z||e instanceof H)&&this.createImageHost(e)}finishLayer(){this.lastPaintedObject&&this.clearTransform()}createImageHost(e){e.__host=e.__host?e.__host:{},e.__host.canvas={canvas:void 0,canvases:[],indices:[],loaded:[],loading:!1}}getPointsAt(e,t,n,r){return e.getPointsAt(t,n,r)}getViewportBounds(e,t,n){let r=e.getActiveZone();if(r){let e=t[3]-t[1]<r.points[3]-r.points[1],i=t[4]-t[2]<r.points[4]-r.points[2];return{x1:e?r.points[1]-n:r.points[1]+(r.points[3]-r.points[1])/2-(t[3]-t[1])/2,y1:i?r.points[2]-n:r.points[2]+(r.points[4]-r.points[2])/2-(t[4]-t[2])/2,x2:e?r.points[3]+n:r.points[1]+(r.points[3]-r.points[1])/2-(t[3]-t[1])/2,y2:i?r.points[4]+n:r.points[2]+(r.points[4]-r.points[2])/2-(t[4]-t[2])/2}}return null}pendingUpdate(){let e=!this.pendingDrawCall&&this.drawCalls.length===0&&this.imagesPending===0&&this.loadingQueue.length===0&&this.tasksRunning===0;return!e&&this.visible.length===0&&setTimeout(()=>{this.canvas.style.opacity=`1`,this.firstMeaningfulPaint=!0},500),!this.firstMeaningfulPaint&&e&&this.visible.length?(this.canvas.style.opacity=`1`,this.firstMeaningfulPaint=e,!0):this.options.debug?!0:!e}getRendererScreenPosition(){return this.rendererPosition}reset(){this.loadingQueue=[],this.drawCalls=[]}},ot=class{constructor(e){L(this,`renderers`,[]),L(this,`length`,void 0);for(let t of e)t&&this.renderers.push(t);this.length=this.renderers.length}afterFrame(e,t,n,r){for(let i=0;i<this.length;i++)this.renderers[i].afterFrame(e,t,n,r)}afterPaintLayer(e,t){for(let n=0;n<this.length;n++)this.renderers[n].afterPaintLayer(e,t)}beforeFrame(e,t,n,r){for(let i=0;i<this.length;i++)this.renderers[i].beforeFrame(e,t,n,r)}triggerResize(){for(let e=0;e<this.length;e++){let t=this.renderers[e];t.triggerResize&&t.triggerResize()}}getPointsAt(e,t,n,r){return this.renderers[0].getPointsAt(e,t,n,r)}getScale(e,t){return this.renderers[0].getScale(e,t)}getViewportBounds(e,t,n){return this.renderers[0].getViewportBounds(e,t,n)}getRendererScreenPosition(){return this.renderers[0].getRendererScreenPosition()}isReady(){for(let e=0;e<this.length;e++)if(!this.renderers[e].isReady())return!1;return!0}paint(e,t,n,r,i,a){for(let o=0;o<this.length;o++)this.renderers[o].paint(e,t,n,r,i,a)}pendingUpdate(){for(let e=0;e<this.length;e++)if(this.renderers[e].pendingUpdate())return!0;return!1}prepareLayer(e,t){for(let n=0;n<this.length;n++)this.renderers[n].prepareLayer(e,t)}finishLayer(e,t){for(let n=0;n<this.length;n++)this.renderers[n].finishLayer(e,t)}resize(e,t){for(let n=0;n<this.length;n++)this.renderers[n].resize(e,t)}reset(){for(let e=0;e<this.length;e++)this.renderers[e].reset()}},st=class{constructor(e){L(this,`canvas`,void 0),L(this,`context`,void 0),L(this,`heightRatio`,1),L(this,`widthRatio`,1),L(this,`target`,new Float32Array(5)),L(this,`initialWidth`,void 0),L(this,`initialHeight`,void 0),L(this,`bounds`,void 0),L(this,`aggregate`,void 0),L(this,`delta`,0),L(this,`renderNextFrame`,!0),this.canvas=e,this.initialWidth=e.width,this.initialHeight=e.height,this.context=e.getContext(`2d`),this.context.globalAlpha=.5,this.aggregate=s(1)}isReady(){return!0}resize(){this.initialWidth=this.canvas.width,this.initialHeight=this.canvas.height,this.renderNextFrame=!0}afterFrame(e,t,n){if(this.renderNextFrame){this.context.clearRect(0,0,this.canvas.width,this.canvas.height);let t=this.initialWidth/e.width,r=this.initialHeight/e.height,i=this.widthRatio>this.heightRatio?t:r;if(this.target=n,this.bounds){let t=e.getPointsAt(this.bounds,this.aggregate,i);for(let[e,n]of t)if(e instanceof z&&e.__host.canvas){let t=n.length/5;for(let r=0;r<t;r++)e.__host.canvas.canvases[r]&&(n[r+1]*i,n[r+2]*i,(n[r+3]-n[r+1])*i,(n[r+4]-n[r+2])*i)}}e.getPoints().forEach((e,t,n)=>{if(t%5==0&&e){let e={x1:n[t+1]*i,y1:n[t+2]*i,x2:n[t+3]*i,y2:n[t+4]*i,width:(n[t+3]-n[t+1])*i,height:(n[t+4]-n[t+2])*i};this.context.strokeStyle=`red`,this.context.strokeRect(e.x1,e.y1,e.width,e.height)}}),n&&(this.context.strokeStyle=`red`,this.context.lineWidth=window.devicePixelRatio||1,this.context.strokeRect(n[1]*i,n[2]*i,(n[3]-n[1])*i,(n[4]-n[2])*i))}}getActiveZone(e){return null}getPointsAt(e,t,n,r){return e.getPointsAt(t,n,r)}getScale(e,t){return 1}beforeFrame(t,n){this.bounds=e.singleBox(t.width,t.height)}drawImage(){}afterPaintLayer(e,t){}paint(e,t,n,r,i,a){this.renderNextFrame=!0}prepareLayer(e){}pendingUpdate(){return!1}hasActiveZone(){return!1}getViewportBounds(e,t,n){return null}getRendererScreenPosition(){return this.canvas.getBoundingClientRect()}finishLayer(){}reset(){}},ct=class{constructor(){L(this,`autoWidth`,!1),L(this,`autoHeight`,!0),L(this,`width`,void 0),L(this,`height`,void 0),L(this,`world`,void 0),L(this,`content`,[]),L(this,`viewingDirection`,`left-to-right`),L(this,`rows`,void 0),L(this,`columns`,4),L(this,`spacing`,20),L(this,`reversed`,!1),L(this,`padding`,20),this.world=W.withProps({width:0,height:0,viewingDirection:`left-to-right`}),this.width=0,this.height=0}setViewingDirection(e){this.viewingDirection=e}addContent(e){this.content.push(...e.map(e=>this.world.addObjectAt(e,{width:0,height:0,x:0,y:0})))}setWidth(e){this.width=e}setHeight(e){this.height=e}setSpacing(e){this.spacing=e}setPadding(e){this.padding=e}setRows(e){this.autoWidth=!0,this.rows=e}setColumns(e){this.autoHeight=!0,this.columns=e}recalculate(){if(this.height===0&&this.width===0||this.rows===0||this.columns===0)return;if(this.autoHeight&&!this.width)throw Error(`Cannot set auto height without setting a width`);if(this.autoWidth&&!this.height)throw Error(`Cannot set auto width without setting a height`);(this.viewingDirection===`left-to-right`||this.viewingDirection===`top-to-bottom`)&&this.reversed&&(this.reversed=!1,this.content.reverse()),(this.viewingDirection===`right-to-left`||this.viewingDirection===`bottom-to-top`)&&!this.reversed&&(this.reversed=!0,this.content.reverse());let e=this.content.length,{columns:t,rows:n}=(()=>{if(this.autoWidth&&this.rows){let t=e>this.rows?this.rows:e;return{columns:Math.ceil(e/t),rows:t}}if(this.autoHeight&&this.columns){let t=e>this.columns?this.columns:e;return{columns:t,rows:Math.ceil(e/t)}}throw Error(`Something went wrong.`)})(),r=this.autoWidth?-1:this.width-this.padding*2,i=this.autoWidth?-1:(r-this.spacing*(t-1))/t;if(this.autoHeight&&!this.autoWidth){let r=0,a=this.padding;for(let o=0;o<n&&r!==e;o++){let n=0,o=[];for(let a=0;a<t;a++){let t=this.reversed?e-r:r;if(r===e)break;let a=this.content[t],s=a.width,c=i/(a.width/a.height);o.push([r,i,c,i/s]),c>n&&(n=c),r++}for(let r=0;r<t&&o[r];r++){let t=this.world.getPoints(),i=o[r][0],s=o[r][1],c=o[r][2],l=o[r][3],u=this.padding+r*(this.spacing+s),d=a+(n-c)/2,f=this.reversed?e-i:i,p=t[f*5+1],m=t[f*5+2];this.world.scaleWorldObject(i,l),(p!==u||m!==d)&&this.world.translateWorldObject(f,u-p,d-m)}a+=n+this.spacing}this.height=a+this.padding,this.world.resize(this.width,this.height);return}this.autoWidth&&this.autoHeight,!this.autoWidth&&this.autoHeight}getWorld(){return this.world}},lt=j(((e,t)=>{var n=!1,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_;function v(){if(!n){n=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),v=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(m=/\b(iPhone|iP[ao]d)/.exec(e),h=/\b(iP[ao]d)/.exec(e),f=/Android/i.exec(e),g=/FBAN\/\w+;/i.exec(e),_=/Mobile/i.exec(e),p=!!/Win64/.exec(e),t){r=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,r&&document&&document.documentMode&&(r=document.documentMode);var y=/(?:Trident\/(\d+.\d+))/.exec(e);c=y?parseFloat(y[1])+4:r,i=t[2]?parseFloat(t[2]):NaN,a=t[3]?parseFloat(t[3]):NaN,o=t[4]?parseFloat(t[4]):NaN,o?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),s=t&&t[1]?parseFloat(t[1]):NaN):s=NaN}else r=i=a=s=o=NaN;if(v){if(v[1]){var b=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);l=b?parseFloat(b[1].replace(`_`,`.`)):!0}else l=!1;u=!!v[2],d=!!v[3]}else l=u=d=!1}}var y={ie:function(){return v()||r},ieCompatibilityMode:function(){return v()||c>r},ie64:function(){return y.ie()&&p},firefox:function(){return v()||i},opera:function(){return v()||a},webkit:function(){return v()||o},safari:function(){return y.webkit()},chrome:function(){return v()||s},windows:function(){return v()||u},osx:function(){return v()||l},linux:function(){return v()||d},iphone:function(){return v()||m},mobile:function(){return v()||m||h||f||_},nativeApp:function(){return v()||g},android:function(){return v()||f},ipad:function(){return v()||h}};t.exports=y})),ut=j(((e,t)=>{var n=!!(typeof window<`u`&&window.document&&window.document.createElement);t.exports={canUseDOM:n,canUseWorkers:typeof Worker<`u`,canUseEventListeners:n&&!!(window.addEventListener||window.attachEvent),canUseViewport:n&&!!window.screen,isInWorker:!n}})),dt=j(((e,t)=>{var n=ut(),r;n.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature(``,``)!==!0);
|
|
2
2
|
/**
|
|
3
3
|
* Checks if an event is supported in the current execution environment.
|
|
4
4
|
*
|