aptechka 0.14.0 → 0.16.0

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.
Files changed (83) hide show
  1. package/lib/{Animation-De9aUv3b.cjs → Animation-DI864E0i.cjs} +1 -1
  2. package/lib/{Animation-NAGXiFv5.js → Animation-w6BLTCum.js} +1 -1
  3. package/lib/{Damped-DbJKrUIf.js → Damped-DEHDEq-b.js} +1 -1
  4. package/lib/{Damped-DYJ6Z0xo.cjs → Damped-ipnDc0iX.cjs} +1 -1
  5. package/lib/Store-CDb6RMce.cjs +1 -0
  6. package/lib/Store-OTdcl6SX.js +134 -0
  7. package/lib/{Tweened-BkkD9s4n.cjs → Tweened-B1TfANfR.cjs} +1 -1
  8. package/lib/{Tweened-DOSHLCZa.js → Tweened-C52xXDLY.js} +1 -1
  9. package/lib/{Viewport-Cv4TRGiv.cjs → Viewport-BDPsnAF4.cjs} +1 -1
  10. package/lib/{Viewport-B55BvLsV.js → Viewport-taEXS8Uv.js} +1 -1
  11. package/lib/animation/index.cjs +1 -1
  12. package/lib/animation/index.js +3 -3
  13. package/lib/attribute/index.cjs +1 -1
  14. package/lib/attribute/index.js +1 -1
  15. package/lib/canvas/index.cjs +1 -7
  16. package/lib/canvas/index.js +49 -48
  17. package/lib/class-linked-status/index.cjs +1 -1
  18. package/lib/class-linked-status/index.js +1 -1
  19. package/lib/controls/index.cjs +1 -1
  20. package/lib/controls/index.js +2 -2
  21. package/lib/css-property/index.cjs +1 -1
  22. package/lib/css-property/index.js +1 -1
  23. package/lib/dev/index.cjs +1 -1
  24. package/lib/dev/index.js +1 -1
  25. package/lib/device/index.cjs +1 -1
  26. package/lib/device/index.js +1 -1
  27. package/lib/en3/index.cjs +8 -1
  28. package/lib/en3/index.js +372 -4
  29. package/lib/image/index.cjs +1 -1
  30. package/lib/image/index.js +1 -1
  31. package/lib/jss-CjccJC-K.js +21 -0
  32. package/lib/jss-GJLvaNfT.cjs +1 -0
  33. package/lib/ladder/index.cjs +1 -1
  34. package/lib/ladder/index.js +1 -1
  35. package/lib/media/index.cjs +1 -1
  36. package/lib/media/index.js +1 -1
  37. package/lib/need_redo_tweaker/index.cjs +4 -4
  38. package/lib/need_redo_tweaker/index.js +838 -460
  39. package/lib/pointer/index.cjs +1 -1
  40. package/lib/pointer/index.js +2 -2
  41. package/lib/popover/index.cjs +1 -1
  42. package/lib/popover/index.js +15 -21
  43. package/lib/scroll/index.cjs +1 -1
  44. package/lib/scroll/index.js +576 -608
  45. package/lib/sequence/index.cjs +1 -1
  46. package/lib/sequence/index.js +1 -1
  47. package/lib/source/index.cjs +2 -2
  48. package/lib/source/index.js +154 -62
  49. package/lib/store/index.cjs +1 -1
  50. package/lib/store/index.js +71 -37
  51. package/lib/utils/index.cjs +1 -1
  52. package/lib/utils/index.js +59 -56
  53. package/lib/video/index.cjs +1 -1
  54. package/lib/video/index.js +1 -1
  55. package/package.json +1 -34
  56. package/lib/Composed-C_4slJQ6.cjs +0 -1
  57. package/lib/Composed-CfWa-69I.js +0 -31
  58. package/lib/Derived-BIBU-y7Z.cjs +0 -1
  59. package/lib/Derived-Vo_RsJfi.js +0 -23
  60. package/lib/SourceManager-B6wZpXUZ.js +0 -104
  61. package/lib/SourceManager-CfHcGLUa.cjs +0 -1
  62. package/lib/Store-C46i0nvr.js +0 -137
  63. package/lib/Store-npaZHvX4.cjs +0 -1
  64. package/lib/createStylesheet-C68ja-RS.js +0 -8
  65. package/lib/createStylesheet-Csfmh-MH.cjs +0 -1
  66. package/lib/element-constructor/index.cjs +0 -1
  67. package/lib/element-constructor/index.js +0 -135
  68. package/lib/en3/helpers/index.cjs +0 -1
  69. package/lib/en3/helpers/index.js +0 -1870
  70. package/lib/en3/libs/index.cjs +0 -1
  71. package/lib/en3/libs/index.js +0 -200
  72. package/lib/en3/loaders/index.cjs +0 -1
  73. package/lib/en3/loaders/index.js +0 -1742
  74. package/lib/en3/misc/index.cjs +0 -10
  75. package/lib/en3/misc/index.js +0 -110
  76. package/lib/en3/utils/index.cjs +0 -1
  77. package/lib/en3/utils/index.js +0 -20
  78. package/lib/en3-C1fLmsjs.cjs +0 -8
  79. package/lib/en3-sK9Z-fp2.js +0 -344
  80. package/lib/tags-6_ETuR75.cjs +0 -1
  81. package/lib/tags-zft1DGBz.js +0 -833
  82. package/lib/traverseMaterials-BlZbRhgW.js +0 -29
  83. package/lib/traverseMaterials-CD_3_56D.cjs +0 -1
@@ -1,10 +0,0 @@
1
- "use strict";var b=o=>{throw TypeError(o)};var D=(o,e,t)=>e.has(o)||b("Cannot "+t);var i=(o,e,t)=>(D(o,e,"read from private field"),t?t.call(o):e.get(o)),s=(o,e,t)=>e.has(o)?b("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),c=(o,e,t,r)=>(D(o,e,"write to private field"),r?r.call(o,t):e.set(o,t),t),L=(o,e,t)=>(D(o,e,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("../../loading/index.cjs"),z=require("../../SourceManager-CfHcGLUa.cjs"),y=require("../../Store-npaZHvX4.cjs");var u,l,v,k;class T{constructor(e){s(this,v);s(this,u);s(this,l);c(this,u,e.material),c(this,l,e.uniforms||{}),i(this,u).userData.uniforms=i(this,l);let t;const r=()=>{t==null||t()};i(this,u).addEventListener("dispose",r),i(this,u).onBeforeCompile=n=>{var d;t==null||t();for(const R in i(this,l))n.uniforms[R]=i(this,l)[R];e.vertextDeclarations&&(n.vertexShader=`
2
- ${e.vertextDeclarations}
3
- ${n.vertexShader}
4
- `),e.fragmentDeclarations&&(n.fragmentShader=`
5
- ${e.fragmentDeclarations}
6
- ${n.fragmentShader}
7
- `),L(this,v,k).call(this,n,"vertex",e),L(this,v,k).call(this,n,"fragment",e),t=(d=e.onReady)==null?void 0:d.call(e,this),e.log&&(console.log("VERTEX SHADER: ",n.vertexShader),console.log("FRAGMENT SHADER: ",n.fragmentShader))}}get material(){return i(this,u)}get uniforms(){return i(this,l)}}u=new WeakMap,l=new WeakMap,v=new WeakSet,k=function(e,t,r){const n=t==="vertex"?"vertexChunk":"fragmentChunk",d=t==="vertex"?"vertexShader":"fragmentShader";r[n]&&(r[n].replace?e[d]=e[d].replace(`#include <${r[n].replace}>`,r[n].content):r[n].update&&(e[d]=e[d].replace(`#include <${r[n].update}>`,`
8
- #include <${r[n].update}>
9
- ${r[n].content}
10
- `)))};var f,a,g,x,E,h,S,M;class m extends z.SourceManager{constructor(t){super(t);s(this,f,new y.Store(null));s(this,a,new y.Store(void 0));s(this,g);s(this,x);s(this,E);s(this,h);s(this,S,!1);s(this,M,()=>{if(!(i(this,h)&&!i(this,S))&&(this.current!==this.previous&&(i(this,f).current=null),this.current)){const t=i(this,E)?this.current.url:this.current.name+this.current.extension;i(this,h)||$.loading.setTotal(t,1),i(this,a).current="start",i(this,x).load(t,r=>{var n;i(this,f).current=((n=this.processData)==null?void 0:n.call(this,r))||r,i(this,a).current="complete",i(this,h)||$.loading.setLoaded(t,1)},void 0,()=>{i(this,h)||(i(this,a).current="error",$.loading.setError(t,t))})}});c(this,g,t.consumer),c(this,x,t.loader),c(this,E,t.keepSourceParameters||!1),c(this,h,t.lazy||!1),this.subscribe(i(this,M)),i(this,g).addEventListener("added",()=>{this.connect()}),i(this,g).addEventListener("removed",()=>{this.disconnect()})}get data(){return i(this,f)}get loading(){return i(this,a)}lazyLoad(){i(this,S)||(c(this,S,!0),i(this,M).call(this))}}f=new WeakMap,a=new WeakMap,g=new WeakMap,x=new WeakMap,E=new WeakMap,h=new WeakMap,S=new WeakMap,M=new WeakMap;exports.En3ModifiedMaterial=T;exports.En3SourceManager=m;
@@ -1,110 +0,0 @@
1
- var R = (o) => {
2
- throw TypeError(o);
3
- };
4
- var m = (o, i, t) => i.has(o) || R("Cannot " + t);
5
- var e = (o, i, t) => (m(o, i, "read from private field"), t ? t.call(o) : i.get(o)), r = (o, i, t) => i.has(o) ? R("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(o) : i.set(o, t), c = (o, i, t, s) => (m(o, i, "write to private field"), s ? s.call(o, t) : i.set(o, t), t), L = (o, i, t) => (m(o, i, "access private method"), t);
6
- import { loading as $ } from "../../loading/index.js";
7
- import { S as A } from "../../SourceManager-B6wZpXUZ.js";
8
- import { S as z } from "../../Store-C46i0nvr.js";
9
- var h, u, S, k;
10
- class w {
11
- constructor(i) {
12
- r(this, S);
13
- r(this, h);
14
- r(this, u);
15
- c(this, h, i.material), c(this, u, i.uniforms || {}), e(this, h).userData.uniforms = e(this, u);
16
- let t;
17
- const s = () => {
18
- t == null || t();
19
- };
20
- e(this, h).addEventListener("dispose", s), e(this, h).onBeforeCompile = (n) => {
21
- var f;
22
- t == null || t();
23
- for (const M in e(this, u))
24
- n.uniforms[M] = e(this, u)[M];
25
- i.vertextDeclarations && (n.vertexShader = `
26
- ${i.vertextDeclarations}
27
- ${n.vertexShader}
28
- `), i.fragmentDeclarations && (n.fragmentShader = `
29
- ${i.fragmentDeclarations}
30
- ${n.fragmentShader}
31
- `), L(this, S, k).call(this, n, "vertex", i), L(this, S, k).call(this, n, "fragment", i), t = (f = i.onReady) == null ? void 0 : f.call(i, this), i.log && (console.log("VERTEX SHADER: ", n.vertexShader), console.log("FRAGMENT SHADER: ", n.fragmentShader));
32
- };
33
- }
34
- get material() {
35
- return e(this, h);
36
- }
37
- get uniforms() {
38
- return e(this, u);
39
- }
40
- }
41
- h = new WeakMap(), u = new WeakMap(), S = new WeakSet(), k = function(i, t, s) {
42
- const n = t === "vertex" ? "vertexChunk" : "fragmentChunk", f = t === "vertex" ? "vertexShader" : "fragmentShader";
43
- s[n] && (s[n].replace ? i[f] = i[f].replace(
44
- `#include <${s[n].replace}>`,
45
- s[n].content
46
- ) : s[n].update && (i[f] = i[f].replace(
47
- `#include <${s[n].update}>`,
48
- `
49
- #include <${s[n].update}>
50
- ${s[n].content}
51
- `
52
- )));
53
- };
54
- var a, d, g, x, E, l, v, D;
55
- class y extends A {
56
- constructor(t) {
57
- super(t);
58
- r(this, a, new z(null));
59
- r(this, d, new z(void 0));
60
- r(this, g);
61
- r(this, x);
62
- r(this, E);
63
- r(this, l);
64
- r(this, v, !1);
65
- r(this, D, () => {
66
- if (!(e(this, l) && !e(this, v)) && (this.current !== this.previous && (e(this, a).current = null), this.current)) {
67
- const t = e(this, E) ? this.current.url : this.current.name + this.current.extension;
68
- e(this, l) || $.setTotal(t, 1), e(this, d).current = "start", e(this, x).load(
69
- t,
70
- (s) => {
71
- var n;
72
- e(this, a).current = ((n = this.processData) == null ? void 0 : n.call(this, s)) || s, e(this, d).current = "complete", e(this, l) || $.setLoaded(t, 1);
73
- },
74
- void 0,
75
- () => {
76
- e(this, l) || (e(this, d).current = "error", $.setError(t, t));
77
- }
78
- );
79
- }
80
- });
81
- c(this, g, t.consumer), c(this, x, t.loader), c(this, E, t.keepSourceParameters || !1), c(this, l, t.lazy || !1), this.subscribe(e(this, D)), e(this, g).addEventListener("added", () => {
82
- this.connect();
83
- }), e(this, g).addEventListener("removed", () => {
84
- this.disconnect();
85
- });
86
- }
87
- /**
88
- * Resource store.
89
- */
90
- get data() {
91
- return e(this, a);
92
- }
93
- /**
94
- * Loading store.
95
- */
96
- get loading() {
97
- return e(this, d);
98
- }
99
- /**
100
- * Calling this method will start loading the resource.
101
- */
102
- lazyLoad() {
103
- e(this, v) || (c(this, v, !0), e(this, D).call(this));
104
- }
105
- }
106
- a = new WeakMap(), d = new WeakMap(), g = new WeakMap(), x = new WeakMap(), E = new WeakMap(), l = new WeakMap(), v = new WeakMap(), D = new WeakMap();
107
- export {
108
- w as En3ModifiedMaterial,
109
- y as En3SourceManager
110
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../../en3-C1fLmsjs.cjs"),c=require("../../traverseMaterials-CD_3_56D.cjs"),M=require("three");function d(e,t,r){const s=t.x,i=t.y,o=r||e.image.width/e.image.height;let a=0,n=0,l=e.offset.x,f=e.offset.y,v=e.rotation,h=e.center.x,g=e.center.y;s/i>o?(a=1,n=i/s*o):(n=1,a=s/i/o),e.matrix.setUvTransform(l,f,a,n,v,h,g)}function m(e,t){e.traverse(r=>{r instanceof M.Mesh&&t(r)})}exports.dispose=y.dispose;exports.getCurrentViewport=c.getCurrentViewport;exports.traverseMaterials=c.traverseMaterials;exports.coverTexture=d;exports.traverseMeshes=m;
@@ -1,20 +0,0 @@
1
- import { d as w } from "../../en3-sK9Z-fp2.js";
2
- import { g as T, t as C } from "../../traverseMaterials-BlZbRhgW.js";
3
- import { Mesh as g } from "three";
4
- function y(t, e, s) {
5
- const o = e.x, r = e.y, i = s || t.image.width / t.image.height;
6
- let a = 0, f = 0, c = t.offset.x, n = t.offset.y, h = t.rotation, l = t.center.x, m = t.center.y;
7
- o / r > i ? (a = 1, f = r / o * i) : (f = 1, a = o / r / i), t.matrix.setUvTransform(c, n, a, f, h, l, m);
8
- }
9
- function v(t, e) {
10
- t.traverse((s) => {
11
- s instanceof g && e(s);
12
- });
13
- }
14
- export {
15
- y as coverTexture,
16
- w as dispose,
17
- T as getCurrentViewport,
18
- C as traverseMaterials,
19
- v as traverseMeshes
20
- };
@@ -1,8 +0,0 @@
1
- "use strict";var ce=Object.defineProperty,le=Object.defineProperties;var de=Object.getOwnPropertyDescriptors;var Z=Object.getOwnPropertySymbols;var ue=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable;var Q=h=>{throw TypeError(h)};var J=(h,t,i)=>t in h?ce(h,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):h[t]=i,O=(h,t)=>{for(var i in t||(t={}))ue.call(t,i)&&J(h,i,t[i]);if(Z)for(var i of Z(t))oe.call(t,i)&&J(h,i,t[i]);return h},ee=(h,t)=>le(h,de(t));var te=(h,t,i)=>t.has(h)||Q("Cannot "+i);var e=(h,t,i)=>(te(h,t,"read from private field"),i?i.call(h):t.get(h)),s=(h,t,i)=>t.has(h)?Q("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(h):t.set(h,i),r=(h,t,i,a)=>(te(h,t,"write to private field"),a?a.call(h,i):t.set(h,i),i);const ie=require("./order/index.cjs"),se=require("./window-resizer/index.cjs"),re=require("./ticker/index.cjs"),ne=require("./dom-JBOkFLTh.cjs"),x=require("three"),he=require("./layout-box/index.cjs");function ae(h){const t=i=>{i.dispose();for(const a of Object.keys(i)){const l=i[a];l&&typeof l=="object"&&"minFilter"in l&&l.dispose()}};h.traverse(i=>{if(i instanceof x.Mesh){if(i.geometry.dispose(),!Array.isArray(i.material)&&i.material.isMaterial)t(i.material);else if(Array.isArray(i.material))for(const a of i.material)t(a)}})}var V,c,p,w,y,M,R,D;class W{constructor(t,i){s(this,V);s(this,c);s(this,p);s(this,w);s(this,y);s(this,M);s(this,R);s(this,D);r(this,V,t),r(this,c,(i==null?void 0:i.cameraType)==="orthographic"?new x.OrthographicCamera:new x.PerspectiveCamera),r(this,p,new x.Scene),r(this,w,[]),r(this,y,(i==null?void 0:i.cameraDistance)||1e3),e(this,c).near=(i==null?void 0:i.cameraNear)||1,e(this,c).far=(i==null?void 0:i.cameraFar)||11e3,r(this,M,(i==null?void 0:i.cameraFov)||"auto"),e(this,c).position.z=e(this,y),e(this,c).name=`Cameras.${e(this,V)}`,r(this,R,ne.getElement(i==null?void 0:i.sizeElement)||document.documentElement),this.beforeRenderCallback=i==null?void 0:i.beforeRender,r(this,D,new he.LayoutBox(e(this,R))),e(this,D).onResize(()=>{this.resize()})}get name(){return e(this,V)}get camera(){return e(this,c)}get scene(){return e(this,p)}get box(){return e(this,D)}get cameraDistance(){return e(this,y)}set cameraDistance(t){r(this,y,t),this.resize()}get sizeElement(){return e(this,R)}get isClipped(){return e(this,R)!==m.containerElement}resize(){const{width:t,height:i}=e(this,D);e(this,c).userData.controlled||(e(this,c).position.z=e(this,y)),e(this,c)instanceof x.PerspectiveCamera?(e(this,c).aspect=t/i,e(this,c).fov=e(this,M)==="auto"?2*Math.atan(i/2/e(this,y))*(180/Math.PI):e(this,c).userData.controlled?e(this,c).fov:e(this,M)):e(this,c)instanceof x.OrthographicCamera&&(e(this,c).left=t/-2,e(this,c).right=t/2,e(this,c).top=i/2,e(this,c).bottom=i/-2),e(this,c).updateProjectionMatrix()}destroy(){e(this,w).forEach(t=>{t.userData.box.destroy()}),e(this,p).clear(),ae(e(this,p)),m.destroyView(this.name),e(this,D).destroy()}attachToHTMLElement(t,i,a){const l=new he.LayoutBox(t,ee(O({},a),{containerElement:e(this,R),cartesian:!0,scrollStep:!this.isClipped}));return l.bindObject(i),i.userData.box=l,e(this,w).push(i),i}detachFromHTMLElement(t){r(this,w,e(this,w).filter(i=>i===t?(t.userData.box.destroy(),!1):!0))}add(...t){const i=t[0],a=t[1],l=t[2];return a&&this.attachToHTMLElement(a,i,l),this.scene.add(i),i}remove(t,i){this.scene.remove(t),i&&this.detachFromHTMLElement(t)}}V=new WeakMap,c=new WeakMap,p=new WeakMap,w=new WeakMap,y=new WeakMap,M=new WeakMap,R=new WeakMap,D=new WeakMap;const K=new Map;var S,k,j,z,A;class me{constructor(t){s(this,S);s(this,k);s(this,j);s(this,z);s(this,A);r(this,S,t.targetName||void 0),r(this,k,t.eventDispatcher||t.object3D),r(this,j,t.propagation||!1),r(this,z,t.object3D),r(this,A,e(this,S)?()=>e(this,z).getObjectByName(e(this,S))||e(this,z):()=>e(this,z))}get object3D(){return e(this,z)}get eventDispatcher(){return e(this,k)}get propagation(){return e(this,j)}get target(){return e(this,A).call(this)}dispatch(t,i){this.eventDispatcher.dispatchEvent(O({originalEvent:i,type:t},this.intersection))}}S=new WeakMap,k=new WeakMap,j=new WeakMap,z=new WeakMap,A=new WeakMap;var g,u,H,F,N,q,I;class fe{constructor(){s(this,g,[]);s(this,u,[]);s(this,H,new x.Vector2);s(this,F,new x.Raycaster);s(this,N,t=>{for(let i=0;i<e(this,u).length;i++)e(this,u)[i].dispatch("pointerDown",t)});s(this,q,t=>{for(let i=0;i<e(this,u).length;i++)e(this,u)[i].dispatch("pointerUp",t)});s(this,I,t=>{if(!e(this,g).length)return;e(this,H).x=t.clientX/m.width*2-1,e(this,H).y=-(t.clientY/m.height)*2+1,m.camera&&e(this,F).setFromCamera(e(this,H),m.camera);const i=[];for(const n of e(this,g)){const b=e(this,F).intersectObject(n.target);b.length&&(n.intersection=b[0],i.push(n))}let a=!1;const l=e(this,u).filter(n=>!i.find(b=>b.object3D.uuid===n.object3D.uuid)),U=i.sort((n,b)=>b.object3D.position.z-n.object3D.position.z).filter((n,b)=>a?(l.push(n),!1):(a=!n.propagation,!0)),X=U.filter(n=>!e(this,u).find(b=>b.object3D.uuid===n.object3D.uuid));for(let n=0;n<l.length;n++)l[n].dispatch("pointerLeave",t);for(let n=0;n<X.length;n++)X[n].dispatch("pointerEnter",t);r(this,u,U);for(let n=0;n<e(this,u).length;n++)e(this,u)[n].dispatch("pointerMove",t)});m.containerElement.addEventListener("pointerdown",e(this,N)),m.containerElement.addEventListener("pointerup",e(this,q)),m.containerElement.addEventListener("pointermove",e(this,I))}destroy(){m.containerElement.removeEventListener("pointerdown",e(this,N)),m.containerElement.removeEventListener("pointerup",e(this,q)),m.containerElement.removeEventListener("pointermove",e(this,I)),r(this,g,[]),r(this,u,[])}add(t,i){if(e(this,g).find(l=>l.object3D.uuid===t.uuid))return;const a=new me(O({object3D:t},i));e(this,g).push(a)}remove(t){r(this,g,e(this,g).filter(i=>i.object3D.uuid!==t.uuid)),r(this,u,e(this,u).filter(i=>i.object3D.uuid!==t.uuid))}}g=new WeakMap,u=new WeakMap,H=new WeakMap,F=new WeakMap,N=new WeakMap,q=new WeakMap,I=new WeakMap;var G,E,d,P,o,L,C,v,_,T,B,f,Y,$;class ge{constructor(){s(this,G,`https://unpkg.com/three@0.${x.REVISION}.x`);s(this,E,null);s(this,d,null);s(this,P,null);s(this,o,new Map);s(this,L,0);s(this,C,0);s(this,v,0);s(this,_,2);s(this,T,!1);s(this,B,!1);s(this,f,null);s(this,Y,()=>{r(this,L,e(this,E).clientWidth),r(this,C,e(this,E).clientHeight),r(this,v,Math.min(e(this,_),devicePixelRatio||1)),e(this,d).setPixelRatio(e(this,v)),e(this,d).setSize(e(this,L),e(this,C)),e(this,f)&&(e(this,f).setPixelRatio(e(this,v)),e(this,f).setSize(e(this,L),e(this,C)))});s(this,$,()=>{e(this,d).setRenderTarget(null),e(this,o).forEach(t=>{this.render(t)})})}get CDNVersion(){return e(this,G)}get containerElement(){return e(this,E)}get webglRenderer(){return e(this,d)}get raycaster(){return e(this,P)}get views(){return e(this,o)}get view(){return this.getView("default")}get camera(){return this.getView("default").camera}get scene(){return this.getView("default").scene}get width(){return e(this,L)}get height(){return e(this,C)}get pixelRatio(){return e(this,v)}get cacheAssets(){return e(this,B)}get composer(){return e(this,f)}setup(t){if(e(this,T)){console.warn("[en3.setup]: You are trying to setup en3 again.");return}r(this,E,ne.getElement(t==null?void 0:t.containerElement)||document.body),r(this,_,(t==null?void 0:t.maxPixelRatio)||2),r(this,d,new x.WebGLRenderer(t==null?void 0:t.webGLRendererParameters)),e(this,d).domElement.style.cssText=`
2
- position: fixed;
3
- left: 0;
4
- top: 0;
5
- width: 100%;
6
- height: 100%;
7
- z-index: ${(t==null?void 0:t.zIndex)||0};
8
- `,(e(this,E).shadowRoot||e(this,E)).append(e(this,d).domElement),e(this,o).set("default",new W("default",O({sizeElement:e(this,E)},t==null?void 0:t.view))),r(this,P,new fe),t!=null&&t.composer&&(r(this,f,new t.composer(e(this,d))),this.render=()=>{e(this,f).render()}),r(this,B,(t==null?void 0:t.cacheAssets)||!1),r(this,T,!0),se.windowResizer.subscribe(e(this,Y),ie.RESIZE_ORDER.EN3),re.ticker.subscribe(e(this,$),{order:ie.TICK_ORDER.EN3})}destroy(){if(!e(this,T)){console.warn("[en3.setup]: You are trying to destory en3 but it has not been initialized.");return}se.windowResizer.unsubscribe(e(this,Y)),re.ticker.unsubscribe(e(this,$)),e(this,P).destroy(),e(this,o).forEach(t=>{t.destroy()}),e(this,d).dispose(),e(this,d).domElement.remove(),r(this,d,null),e(this,f).dispose(),r(this,f,null),r(this,T,!1),K.forEach(t=>{t.dispose()}),K.clear()}createView(t,i){const a=e(this,o).size,l=new W(t,i);return e(this,o).set(t,l),a===1&&e(this,d).setScissorTest(!0),l}getView(t){return e(this,o).get(t)}destroyView(t){const i=e(this,o).get(t);i&&(e(this,o).delete(t),i.destroy(),e(this,o).size<=1&&e(this,d).setScissorTest(!1))}render(t){var i;if(e(this,o).size>1||this.view.isClipped){const a=t.box.left+t.box.CSSTranslation.x+t.box.scrollValue.x,l=m.height-t.box.height-t.box.top+t.box.CSSTranslation.y+t.box.scrollValue.y*-1;e(this,d).setScissor(a,l,t.box.width,t.box.height),e(this,d).setViewport(a,l,t.box.width,t.box.height)}(i=t.beforeRenderCallback)==null||i.call(t),e(this,d).render(t.scene,t.camera)}}G=new WeakMap,E=new WeakMap,d=new WeakMap,P=new WeakMap,o=new WeakMap,L=new WeakMap,C=new WeakMap,v=new WeakMap,_=new WeakMap,T=new WeakMap,B=new WeakMap,f=new WeakMap,Y=new WeakMap,$=new WeakMap;const m=new ge;exports.En3View=W;exports.dispose=ae;exports.en3=m;exports.en3Cache=K;
@@ -1,344 +0,0 @@
1
- var ne = Object.defineProperty, ce = Object.defineProperties;
2
- var le = Object.getOwnPropertyDescriptors;
3
- var U = Object.getOwnPropertySymbols;
4
- var de = Object.prototype.hasOwnProperty, oe = Object.prototype.propertyIsEnumerable;
5
- var Z = (h) => {
6
- throw TypeError(h);
7
- };
8
- var X = (h, t, i) => t in h ? ne(h, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : h[t] = i, P = (h, t) => {
9
- for (var i in t || (t = {}))
10
- de.call(t, i) && X(h, i, t[i]);
11
- if (U)
12
- for (var i of U(t))
13
- oe.call(t, i) && X(h, i, t[i]);
14
- return h;
15
- }, q = (h, t) => ce(h, le(t));
16
- var J = (h, t, i) => t.has(h) || Z("Cannot " + i);
17
- var e = (h, t, i) => (J(h, t, "read from private field"), i ? i.call(h) : t.get(h)), s = (h, t, i) => t.has(h) ? Z("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(h) : t.set(h, i), r = (h, t, i, n) => (J(h, t, "write to private field"), n ? n.call(h, i) : t.set(h, i), i);
18
- import { RESIZE_ORDER as ue, TICK_ORDER as me } from "./order/index.js";
19
- import { windowResizer as Q } from "./window-resizer/index.js";
20
- import { ticker as ee } from "./ticker/index.js";
21
- import { g as ae } from "./dom-0S_WDL4g.js";
22
- import { Mesh as fe, OrthographicCamera as te, PerspectiveCamera as ie, Scene as ge, Vector2 as Ee, Raycaster as be, REVISION as xe, WebGLRenderer as ye } from "three";
23
- import { LayoutBox as se } from "./layout-box/index.js";
24
- function we(h) {
25
- const t = (i) => {
26
- i.dispose();
27
- for (const n of Object.keys(i)) {
28
- const l = i[n];
29
- l && typeof l == "object" && "minFilter" in l && l.dispose();
30
- }
31
- };
32
- h.traverse((i) => {
33
- if (i instanceof fe) {
34
- if (i.geometry.dispose(), !Array.isArray(i.material) && i.material.isMaterial)
35
- t(i.material);
36
- else if (Array.isArray(i.material))
37
- for (const n of i.material) t(n);
38
- }
39
- });
40
- }
41
- var T, c, R, y, x, V, w, D;
42
- class re {
43
- constructor(t, i) {
44
- s(this, T);
45
- s(this, c);
46
- s(this, R);
47
- s(this, y);
48
- s(this, x);
49
- s(this, V);
50
- s(this, w);
51
- s(this, D);
52
- r(this, T, t), r(this, c, (i == null ? void 0 : i.cameraType) === "orthographic" ? new te() : new ie()), r(this, R, new ge()), r(this, y, []), r(this, x, (i == null ? void 0 : i.cameraDistance) || 1e3), e(this, c).near = (i == null ? void 0 : i.cameraNear) || 1, e(this, c).far = (i == null ? void 0 : i.cameraFar) || 11e3, r(this, V, (i == null ? void 0 : i.cameraFov) || "auto"), e(this, c).position.z = e(this, x), e(this, c).name = `Cameras.${e(this, T)}`, r(this, w, ae(i == null ? void 0 : i.sizeElement) || document.documentElement), this.beforeRenderCallback = i == null ? void 0 : i.beforeRender, r(this, D, new se(e(this, w))), e(this, D).onResize(() => {
53
- this.resize();
54
- });
55
- }
56
- get name() {
57
- return e(this, T);
58
- }
59
- get camera() {
60
- return e(this, c);
61
- }
62
- get scene() {
63
- return e(this, R);
64
- }
65
- get box() {
66
- return e(this, D);
67
- }
68
- get cameraDistance() {
69
- return e(this, x);
70
- }
71
- set cameraDistance(t) {
72
- r(this, x, t), this.resize();
73
- }
74
- get sizeElement() {
75
- return e(this, w);
76
- }
77
- get isClipped() {
78
- return e(this, w) !== m.containerElement;
79
- }
80
- resize() {
81
- const { width: t, height: i } = e(this, D);
82
- e(this, c).userData.controlled || (e(this, c).position.z = e(this, x)), e(this, c) instanceof ie ? (e(this, c).aspect = t / i, e(this, c).fov = e(this, V) === "auto" ? 2 * Math.atan(i / 2 / e(this, x)) * (180 / Math.PI) : e(this, c).userData.controlled ? e(this, c).fov : e(this, V)) : e(this, c) instanceof te && (e(this, c).left = t / -2, e(this, c).right = t / 2, e(this, c).top = i / 2, e(this, c).bottom = i / -2), e(this, c).updateProjectionMatrix();
83
- }
84
- destroy() {
85
- e(this, y).forEach((t) => {
86
- t.userData.box.destroy();
87
- }), e(this, R).clear(), we(e(this, R)), m.destroyView(this.name), e(this, D).destroy();
88
- }
89
- attachToHTMLElement(t, i, n) {
90
- const l = new se(t, q(P({}, n), {
91
- containerElement: e(this, w),
92
- cartesian: !0,
93
- scrollStep: !this.isClipped
94
- }));
95
- return l.bindObject(i), i.userData.box = l, e(this, y).push(i), i;
96
- }
97
- detachFromHTMLElement(t) {
98
- r(this, y, e(this, y).filter((i) => i === t ? (t.userData.box.destroy(), !1) : !0));
99
- }
100
- add(...t) {
101
- const i = t[0], n = t[1], l = t[2];
102
- return n && this.attachToHTMLElement(n, i, l), this.scene.add(i), i;
103
- }
104
- remove(t, i) {
105
- this.scene.remove(t), i && this.detachFromHTMLElement(t);
106
- }
107
- }
108
- T = new WeakMap(), c = new WeakMap(), R = new WeakMap(), y = new WeakMap(), x = new WeakMap(), V = new WeakMap(), w = new WeakMap(), D = new WeakMap();
109
- const he = /* @__PURE__ */ new Map();
110
- var M, O, j, p, k;
111
- class De {
112
- constructor(t) {
113
- s(this, M);
114
- s(this, O);
115
- s(this, j);
116
- s(this, p);
117
- s(this, k);
118
- r(this, M, t.targetName || void 0), r(this, O, t.eventDispatcher || t.object3D), r(this, j, t.propagation || !1), r(this, p, t.object3D), r(this, k, e(this, M) ? () => e(this, p).getObjectByName(e(this, M)) || e(this, p) : () => e(this, p));
119
- }
120
- get object3D() {
121
- return e(this, p);
122
- }
123
- get eventDispatcher() {
124
- return e(this, O);
125
- }
126
- get propagation() {
127
- return e(this, j);
128
- }
129
- get target() {
130
- return e(this, k).call(this);
131
- }
132
- dispatch(t, i) {
133
- this.eventDispatcher.dispatchEvent(P({
134
- originalEvent: i,
135
- type: t
136
- }, this.intersection));
137
- }
138
- }
139
- M = new WeakMap(), O = new WeakMap(), j = new WeakMap(), p = new WeakMap(), k = new WeakMap();
140
- var g, o, S, A, F, N, I;
141
- class pe {
142
- constructor() {
143
- s(this, g, []);
144
- s(this, o, []);
145
- s(this, S, new Ee());
146
- s(this, A, new be());
147
- s(this, F, (t) => {
148
- for (let i = 0; i < e(this, o).length; i++)
149
- e(this, o)[i].dispatch("pointerDown", t);
150
- });
151
- s(this, N, (t) => {
152
- for (let i = 0; i < e(this, o).length; i++)
153
- e(this, o)[i].dispatch("pointerUp", t);
154
- });
155
- s(this, I, (t) => {
156
- if (!e(this, g).length)
157
- return;
158
- e(this, S).x = t.clientX / m.width * 2 - 1, e(this, S).y = -(t.clientY / m.height) * 2 + 1, m.camera && e(this, A).setFromCamera(e(this, S), m.camera);
159
- const i = [];
160
- for (const a of e(this, g)) {
161
- const b = e(this, A).intersectObject(a.target);
162
- b.length && (a.intersection = b[0], i.push(a));
163
- }
164
- let n = !1;
165
- const l = e(this, o).filter(
166
- (a) => !i.find((b) => b.object3D.uuid === a.object3D.uuid)
167
- ), _ = i.sort(
168
- (a, b) => b.object3D.position.z - a.object3D.position.z
169
- ).filter((a, b) => n ? (l.push(a), !1) : (n = !a.propagation, !0)), K = _.filter(
170
- (a) => !e(this, o).find((b) => b.object3D.uuid === a.object3D.uuid)
171
- );
172
- for (let a = 0; a < l.length; a++)
173
- l[a].dispatch("pointerLeave", t);
174
- for (let a = 0; a < K.length; a++)
175
- K[a].dispatch("pointerEnter", t);
176
- r(this, o, _);
177
- for (let a = 0; a < e(this, o).length; a++)
178
- e(this, o)[a].dispatch("pointerMove", t);
179
- });
180
- m.containerElement.addEventListener(
181
- "pointerdown",
182
- e(this, F)
183
- ), m.containerElement.addEventListener("pointerup", e(this, N)), m.containerElement.addEventListener(
184
- "pointermove",
185
- e(this, I)
186
- );
187
- }
188
- destroy() {
189
- m.containerElement.removeEventListener(
190
- "pointerdown",
191
- e(this, F)
192
- ), m.containerElement.removeEventListener(
193
- "pointerup",
194
- e(this, N)
195
- ), m.containerElement.removeEventListener(
196
- "pointermove",
197
- e(this, I)
198
- ), r(this, g, []), r(this, o, []);
199
- }
200
- add(t, i) {
201
- if (e(this, g).find((l) => l.object3D.uuid === t.uuid))
202
- return;
203
- const n = new De(P({
204
- object3D: t
205
- }, i));
206
- e(this, g).push(n);
207
- }
208
- remove(t) {
209
- r(this, g, e(this, g).filter(
210
- (i) => i.object3D.uuid !== t.uuid
211
- )), r(this, o, e(this, o).filter((i) => i.object3D.uuid !== t.uuid));
212
- }
213
- }
214
- g = new WeakMap(), o = new WeakMap(), S = new WeakMap(), A = new WeakMap(), F = new WeakMap(), N = new WeakMap(), I = new WeakMap();
215
- var W, E, d, H, u, z, L, v, Y, C, $, f, B, G;
216
- class Re {
217
- constructor() {
218
- s(this, W, `https://unpkg.com/three@0.${xe}.x`);
219
- s(this, E, null);
220
- s(this, d, null);
221
- s(this, H, null);
222
- s(this, u, /* @__PURE__ */ new Map());
223
- s(this, z, 0);
224
- s(this, L, 0);
225
- s(this, v, 0);
226
- s(this, Y, 2);
227
- s(this, C, !1);
228
- s(this, $, !1);
229
- s(this, f, null);
230
- s(this, B, () => {
231
- r(this, z, e(this, E).clientWidth), r(this, L, e(this, E).clientHeight), r(this, v, Math.min(e(this, Y), devicePixelRatio || 1)), e(this, d).setPixelRatio(e(this, v)), e(this, d).setSize(e(this, z), e(this, L)), e(this, f) && (e(this, f).setPixelRatio(e(this, v)), e(this, f).setSize(e(this, z), e(this, L)));
232
- });
233
- s(this, G, () => {
234
- e(this, d).setRenderTarget(null), e(this, u).forEach((t) => {
235
- this.render(t);
236
- });
237
- });
238
- }
239
- get CDNVersion() {
240
- return e(this, W);
241
- }
242
- get containerElement() {
243
- return e(this, E);
244
- }
245
- get webglRenderer() {
246
- return e(this, d);
247
- }
248
- get raycaster() {
249
- return e(this, H);
250
- }
251
- get views() {
252
- return e(this, u);
253
- }
254
- get view() {
255
- return this.getView("default");
256
- }
257
- get camera() {
258
- return this.getView("default").camera;
259
- }
260
- get scene() {
261
- return this.getView("default").scene;
262
- }
263
- get width() {
264
- return e(this, z);
265
- }
266
- get height() {
267
- return e(this, L);
268
- }
269
- get pixelRatio() {
270
- return e(this, v);
271
- }
272
- get cacheAssets() {
273
- return e(this, $);
274
- }
275
- get composer() {
276
- return e(this, f);
277
- }
278
- setup(t) {
279
- if (e(this, C)) {
280
- console.warn("[en3.setup]: You are trying to setup en3 again.");
281
- return;
282
- }
283
- r(this, E, ae(t == null ? void 0 : t.containerElement) || document.body), r(this, Y, (t == null ? void 0 : t.maxPixelRatio) || 2), r(this, d, new ye(t == null ? void 0 : t.webGLRendererParameters)), e(this, d).domElement.style.cssText = `
284
- position: fixed;
285
- left: 0;
286
- top: 0;
287
- width: 100%;
288
- height: 100%;
289
- z-index: ${(t == null ? void 0 : t.zIndex) || 0};
290
- `, (e(this, E).shadowRoot || e(this, E)).append(e(this, d).domElement), e(this, u).set(
291
- "default",
292
- new re("default", P({
293
- sizeElement: e(this, E)
294
- }, t == null ? void 0 : t.view))
295
- ), r(this, H, new pe()), t != null && t.composer && (r(this, f, new t.composer(e(this, d))), this.render = () => {
296
- e(this, f).render();
297
- }), r(this, $, (t == null ? void 0 : t.cacheAssets) || !1), r(this, C, !0), Q.subscribe(e(this, B), ue.EN3), ee.subscribe(e(this, G), { order: me.EN3 });
298
- }
299
- destroy() {
300
- if (!e(this, C)) {
301
- console.warn(
302
- "[en3.setup]: You are trying to destory en3 but it has not been initialized."
303
- );
304
- return;
305
- }
306
- Q.unsubscribe(e(this, B)), ee.unsubscribe(e(this, G)), e(this, H).destroy(), e(this, u).forEach((t) => {
307
- t.destroy();
308
- }), e(this, d).dispose(), e(this, d).domElement.remove(), r(this, d, null), e(this, f).dispose(), r(this, f, null), r(this, C, !1), he.forEach((t) => {
309
- t.dispose();
310
- }), he.clear();
311
- }
312
- createView(t, i) {
313
- const n = e(this, u).size, l = new re(t, i);
314
- return e(this, u).set(t, l), n === 1 && e(this, d).setScissorTest(!0), l;
315
- }
316
- getView(t) {
317
- return e(this, u).get(t);
318
- }
319
- destroyView(t) {
320
- const i = e(this, u).get(t);
321
- i && (e(this, u).delete(t), i.destroy(), e(this, u).size <= 1 && e(this, d).setScissorTest(!1));
322
- }
323
- render(t) {
324
- var i;
325
- if (e(this, u).size > 1 || this.view.isClipped) {
326
- const n = t.box.left + t.box.CSSTranslation.x + t.box.scrollValue.x, l = m.height - t.box.height - t.box.top + t.box.CSSTranslation.y + t.box.scrollValue.y * -1;
327
- e(this, d).setScissor(n, l, t.box.width, t.box.height), e(this, d).setViewport(
328
- n,
329
- l,
330
- t.box.width,
331
- t.box.height
332
- );
333
- }
334
- (i = t.beforeRenderCallback) == null || i.call(t), e(this, d).render(t.scene, t.camera);
335
- }
336
- }
337
- W = new WeakMap(), E = new WeakMap(), d = new WeakMap(), H = new WeakMap(), u = new WeakMap(), z = new WeakMap(), L = new WeakMap(), v = new WeakMap(), Y = new WeakMap(), C = new WeakMap(), $ = new WeakMap(), f = new WeakMap(), B = new WeakMap(), G = new WeakMap();
338
- const m = new Re();
339
- export {
340
- re as E,
341
- he as a,
342
- we as d,
343
- m as e
344
- };
@@ -1 +0,0 @@
1
- "use strict";var ae=Object.defineProperty,fe=Object.defineProperties;var le=Object.getOwnPropertyDescriptors;var Y=Object.getOwnPropertySymbols;var de=Object.prototype.hasOwnProperty,he=Object.prototype.propertyIsEnumerable;var X=e=>{throw TypeError(e)};var Q=(e,t,i)=>t in e?ae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,D=(e,t)=>{for(var i in t||(t={}))de.call(t,i)&&Q(e,i,t[i]);if(Y)for(var i of Y(t))he.call(t,i)&&Q(e,i,t[i]);return e},Z=(e,t)=>fe(e,le(t));var F=(e,t,i)=>t.has(e)||X("Cannot "+i);var o=(e,t,i)=>(F(e,t,"read from private field"),i?i.call(e):t.get(e)),w=(e,t,i)=>t.has(e)?X("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),y=(e,t,i,r)=>(F(e,t,"write to private field"),r?r.call(e,i):t.set(e,i),i),a=(e,t,i)=>(F(e,t,"access private method"),i);const S=require("./Store-npaZHvX4.cjs"),_=require("./browser-CpzFX2xg.cjs"),O=require("./object-CCiXnER2.cjs"),H=require("./string-DhgS_iFl.cjs"),we=require("./connector/index.cjs"),me=new Set(["animate","animateMotion","animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","listener","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidColor","stop","svg","switch","symbol","text","textPath","title","tspan","view","use"]);var c,m,d,v,p,b,s,j,ee,te,P,B,ne,ie,re,oe,R,$,se,G,V,ue,W,k,z,J,I,L,T;const A=class A{constructor(...t){w(this,s);w(this,c,null);w(this,m,new Set);w(this,d,new Set);w(this,v);w(this,p);w(this,b);w(this,L,t=>{o(this,m).forEach(i=>{i(t)}),o(this,m).clear()});w(this,T,(t,i)=>{o(this,d).forEach(r=>{r(t,i)}),o(this,d).clear(),a(this,s,V).call(this)});if(_.isBrowser){const i=t[0],r=t[1];y(this,c,a(this,s,j).call(this,i,r==null?void 0:r.forceSvg)),a(this,s,te).call(this,r)}}get node(){return o(this,c)}set node(t){var i;a(this,s,V).call(this),y(this,c,t),(i=o(this,v))==null||i.call(this),o(this,c)instanceof Element&&y(this,p,[...o(this,c).querySelectorAll("store-root")]),a(this,s,G).call(this),a(this,s,P).call(this)}};c=new WeakMap,m=new WeakMap,d=new WeakMap,v=new WeakMap,p=new WeakMap,b=new WeakMap,s=new WeakSet,j=function(t,i){let r=null;if(t instanceof Node)r=t;else if(typeof t=="string")if(!t.includes("<")&&t.includes("-"))r=new(customElements.get(t));else if(t.includes("<")){const u=document.createElement("div");u.innerHTML=t,r=u.firstElementChild}else me.has(t)||i?r=document.createElementNS("http://www.w3.org/2000/svg",t):r=document.createElement(t);else r=document.createElement("div");return r},ee=function(t){return t instanceof HTMLElement||t instanceof SVGElement},te=function(t){if(!t)return;const i=a(this,s,ee).call(this,o(this,c)),r=t.ref;delete t.ref,t!=null&&t.onConnect&&(o(this,m).add(t.onConnect),delete t.onConnect),t!=null&&t.onDisconnect&&(o(this,d).add(t.onDisconnect),delete t.onDisconnect);let u,f;for(const l in t){const h=t[l];l==="class"&&i?a(this,s,B).call(this,h):l==="style"&&i?a(this,s,re).call(this,h):l==="lightChildren"?a(this,s,k).call(this,o(this,c),h):l==="children"?a(this,s,k).call(this,o(this,c)instanceof Element?o(this,c).shadowRoot||o(this,c):o(this,c),h):l==="connectedClass"?o(this,m).add(()=>{requestAnimationFrame(()=>{o(this,c).classList.add(typeof h=="boolean"?"connected":h)})}):l.startsWith("on")?(f||(f={}),f[l]=h):(u||(u={}),u[l]=h)}a(this,s,ue).call(this,u),a(this,s,se).call(this,f),r&&(typeof r=="function"?r(o(this,c)):r.current=o(this,c)),a(this,s,P).call(this)},P=function(){if(_.isBrowser&&(o(this,d).size||o(this,m).size)){const t=o(this,c)instanceof DocumentFragment?o(this,c).firstChild:o(this,c);y(this,v,we.connector.subscribe(t,{connectCallback:o(this,L),disconnectCallback:o(this,T),unsubscribeAfterDisconnect:!0,maxWaitSec:20}))}},B=function(t){if(t){if(typeof t=="string")o(this,c).classList.add(t);else if(Array.isArray(t))t.forEach(i=>{i&&a(this,s,B).call(this,i)});else if(typeof t=="object")if(t instanceof S.Store)a(this,s,ne).call(this,t);else for(const i in t){const r=t[i];r instanceof S.Store?a(this,s,ie).call(this,i,r):r?o(this,c).classList.add(i):o(this,c).classList.remove(i)}}else return},ne=function(t){o(this,d).add(t.subscribe(({current:i,previous:r})=>{r&&[r].flat().forEach(u=>{u&&o(this,c).classList.remove(u)}),i&&[i].flat().forEach(u=>{u&&o(this,c).classList.add(u)})}))},ie=function(t,i){o(this,d).add(i.subscribe(({current:r})=>{r?o(this,c).classList.add(t):o(this,c).classList.remove(t)}))},re=function(t){if(!t)return;o(this,c).tagName==="style"||o(this,c).tagName==="STYLE"?a(this,s,R).call(this,t):a(this,s,oe).call(this,t)},oe=function(t){for(const i in t){const r=i,u=t[r];u instanceof S.Store?o(this,d).add(u.subscribe(({current:f})=>{a(this,s,$).call(this,r,f)})):a(this,s,$).call(this,r,u)}},R=function(t){for(const i in t){const r=t[i];if(typeof r=="object"&&!(r instanceof S.Store))o(this,c).appendChild(document.createTextNode(`${i} {`)),a(this,s,R).call(this,r),o(this,c).appendChild(document.createTextNode("}"));else if(r instanceof S.Store){const u=document.createTextNode("");o(this,d).add(r.subscribe(f=>{f.current?u.nodeValue=`${H.camelToKebab(i)}: ${f.current};`:u.nodeValue=""})),o(this,c).appendChild(u)}else o(this,c).appendChild(document.createTextNode(`${H.camelToKebab(i)}: ${r};`))}},$=function(t,i){t.includes("--")?i?o(this,c).style.setProperty(t,i.toString()):o(this,c).style.removeProperty(t):i?o(this,c).style[t]=i.toString():o(this,c).style[t]=""},se=function(t){if(t){o(this,b)||y(this,b,[]);for(const i in t){const r=i,u=H.uncapitalize(r.split("on").slice(1).join("on")),f=t[r];typeof f=="object"?o(this,b).push({name:u,callback:f.callback,options:f.options}):typeof f=="function"&&o(this,b).push({name:u,callback:f})}a(this,s,G).call(this)}},G=function(){var t;(t=o(this,b))==null||t.forEach(i=>{o(this,c).addEventListener(i.name,i.callback,i.options)})},V=function(){var t;(t=o(this,b))==null||t.forEach(i=>{o(this,c).removeEventListener(i.name,i.callback,i.options)})},ue=function(t){for(const i in t){const r=t[i];r instanceof S.Store?o(this,d).add(r.subscribe(({current:u})=>{a(this,s,W).call(this,i,u)})):a(this,s,W).call(this,i,r)}},W=function(t,i){var u,f;const r=o(this,c);if(t in r&&!((f=(u=r.constructor)==null?void 0:u.observedAttributes)!=null&&f.includes(t)))i!=null&&(r[t]=i.toString());else if(i!=null){const l=i.toString();t.includes("xlink")?r.setAttributeNS("http://www.w3.org/1999/xlink",t,l):r.setAttribute(t,l)}},k=function(t,i){i&&(i=[i].flat(),i.forEach(r=>{if(r instanceof S.Store){const u=document.createElement("div");u.style.display="contents",t.appendChild(u),o(this,p)||y(this,p,[]);const f=o(this,p).length;u.setAttribute("store-root",""),o(this,p).push(u),o(this,d).add(r.subscribe(({current:l,previous:h})=>{const E=o(this,p)[f];E.dispatchEvent(new CustomEvent("beforeChildrenChange",{bubbles:!0,composed:!0}));const x=Array.from(E.childNodes),K=Array.isArray(l)?l:[l],ce=Array.isArray(h)?h:[h],U=[],q=[];x.length&&ce.forEach((g,N)=>{K.includes(g)?q.push(g):U.push(x[N])}),K.forEach((g,N)=>{if(q[N]!=null){if(g!==q[N]){const C=a(this,s,J).call(this,g),M=x[N];C instanceof Node&&!M.isEqualNode(C)?E.replaceChild(C,M):E.removeChild(M)}}else{const C=a(this,s,J).call(this,g);C instanceof Node&&u.appendChild(C)}}),U.forEach(g=>{E.removeChild(g)}),E.dispatchEvent(new CustomEvent("afterChildrenChange",{bubbles:!0,composed:!0}))}))}else if(r instanceof A)a(this,s,z).call(this,t,r.node);else if(r instanceof Function)a(this,s,k).call(this,t,O.isESClass(r)?new r:r());else{const u=a(this,s,I).call(this,r);u instanceof Node&&a(this,s,z).call(this,t,u)}}))},z=function(t,i){!(t instanceof ShadowRoot)&&i instanceof HTMLElement&&i.tagName==="STYLE"?(o(this,m).add(()=>{[...document.head.querySelectorAll("style")].find(u=>u.outerHTML===i.outerHTML)||document.head.appendChild(i)}),o(this,d).add(()=>{i.remove()})):t.appendChild(i)},J=function(t){return t instanceof A?t.node:typeof t=="function"?O.isESClass(t)?new t:t():a(this,s,I).call(this,t)},I=function(t){if(t instanceof Node)return t;if(t!=null){const i=String(t);if(i.trim().startsWith("<")&&i.trim().endsWith(">")){const r=document.createElement("div");return r.innerHTML=i,r.firstElementChild}else return document.createTextNode(i)}else return},L=new WeakMap,T=new WeakMap;let n=A;function pe(...e){return new n(...e)}function be(e){return new n("a",e)}function ge(e){return new n("abbr",e)}function ye(e){return new n("address",e)}function Se(e){return new n("area",e)}function Ee(e){return new n("article",e)}function Ce(e){return new n("aside",e)}function Ne(e){return new n("audio",e)}function ve(e){return new n("b",e)}function ke(e){return new n("base",e)}function Le(e){return new n("bdi",e)}function Te(e){return new n("bdo",e)}function Ae(e){return new n("blockquote",e)}function xe(e){return new n("body",e)}function qe(e){return new n("br",e)}function Me(e){return new n("button",e)}function De(e){return new n("canvas",e)}function Fe(e){return new n("caption",e)}function He(e){return new n("cite",e)}function Pe(e){return new n("code",e)}function Be(e){return new n("col",e)}function Re(e){return new n("colgroup",e)}function $e(e){return new n("data",e)}function Ge(e){return new n("datalist",e)}function Ve(e){return new n("dd",e)}function We(e){return new n("del",e)}function ze(e){return new n("details",e)}function Je(e){return new n("dfn",e)}function Ie(e){return new n("dialog",e)}function Ke(e){return new n("div",e)}function Ue(e){return new n("dl",e)}function Ye(e){return new n("dt",e)}function Qe(e){return new n("em",e)}function Xe(e){return new n("embed",e)}function Ze(e){return new n("fieldset",e)}function _e(e){return new n("figcaption",e)}function Oe(e){return new n("figure",e)}function je(e){return new n("footer",e)}function et(e){return new n("form",e)}function tt(e){return new n("h1",e)}function nt(e){return new n("h2",e)}function it(e){return new n("h3",e)}function rt(e){return new n("h4",e)}function ot(e){return new n("h5",e)}function st(e){return new n("h6",e)}function ut(e){return new n("head",e)}function ct(e){return new n("header",e)}function at(e){return new n("hgroup",e)}function ft(e){return new n("hr",e)}function lt(e){return new n("html",e)}function dt(e){return new n("i",e)}function ht(e){return new n("iframe",e)}function wt(e){return new n("img",e)}function mt(e){return new n("input",e)}function pt(e){return new n("ins",e)}function bt(e){return new n("kbd",e)}function gt(e){return new n("label",e)}function yt(e){return new n("legend",e)}function St(e){return new n("li",e)}function Et(e){return new n("link",e)}function Ct(e){return new n("main",e)}function Nt(e){return new n("map",e)}function vt(e){return new n("mark",e)}function kt(e){return new n("menu",e)}function Lt(e){return new n("meta",e)}function Tt(e){return new n("meter",e)}function At(e){return new n("nav",e)}function xt(e){return new n("noscript",e)}function qt(e){return new n("object",e)}function Mt(e){return new n("ol",e)}function Dt(e){return new n("optgroup",e)}function Ft(e){return new n("option",e)}function Ht(e){return new n("output",e)}function Pt(e){return new n("p",e)}function Bt(e){return new n("picture",e)}function Rt(e){return new n("pre",e)}function $t(e){return new n("progress",e)}function Gt(e){return new n("q",e)}function Vt(e){return new n("rp",e)}function Wt(e){return new n("rt",e)}function zt(e){return new n("ruby",e)}function Jt(e){return new n("s",e)}function It(e){return new n("samp",e)}function Kt(e){return new n("script",e)}function Ut(e){return new n("search",e)}function Yt(e){return new n("section",e)}function Qt(e){return new n("select",e)}function Xt(e){return new n("slot",e)}function Zt(e){return new n("small",e)}function _t(e){return new n("source",e)}function Ot(e){return new n("span",e)}function jt(e){return new n("strong",e)}function en(e){return new n("style",{style:e})}function tn(e){return new n("sub",e)}function nn(e){return new n("summary",e)}function rn(e){return new n("sup",e)}function on(e){return new n("table",e)}function sn(e){return new n("tbody",e)}function un(e){return new n("td",e)}function cn(e){return new n("template",e)}function an(e){return new n("textarea",e)}function fn(e){return new n("tfoot",e)}function ln(e){return new n("th",e)}function dn(e){return new n("thead",e)}function hn(e){return new n("time",e)}function wn(e){return new n("title",e)}function mn(e){return new n("tr",e)}function pn(e){return new n("track",e)}function bn(e){return new n("u",e)}function gn(e){return new n("ul",e)}function yn(e){return new n("var",e)}function Sn(e){return new n("video",e)}function En(e){return new n("wbr",e)}function Cn(e){return new n(document.createDocumentFragment(),e)}function Nn(e){return new n(document.createTextNode(""),e)}function vn(e){return new n("div",Z(D({},e),{style:D({display:"contents"},e==null?void 0:e.style)}))}exports.ElementConstructor=n;exports.a=be;exports.abbr=ge;exports.address=ye;exports.area=Se;exports.article=Ee;exports.aside=Ce;exports.audio=Ne;exports.b=ve;exports.base=ke;exports.bdi=Le;exports.bdo=Te;exports.blockquote=Ae;exports.body=xe;exports.br=qe;exports.button=Me;exports.canvas=De;exports.caption=Fe;exports.cite=He;exports.code=Pe;exports.col=Be;exports.colgroup=Re;exports.contents=vn;exports.data=$e;exports.datalist=Ge;exports.dd=Ve;exports.del=We;exports.details=ze;exports.dfn=Je;exports.dialog=Ie;exports.div=Ke;exports.dl=Ue;exports.dt=Ye;exports.element=pe;exports.em=Qe;exports.embed=Xe;exports.empty=Nn;exports.fieldset=Ze;exports.figcaption=_e;exports.figure=Oe;exports.footer=je;exports.form=et;exports.fragment=Cn;exports.h1=tt;exports.h2=nt;exports.h3=it;exports.h4=rt;exports.h5=ot;exports.h6=st;exports.head=ut;exports.header=ct;exports.hgroup=at;exports.hr=ft;exports.html=lt;exports.htmlVar=yn;exports.i=dt;exports.iframe=ht;exports.img=wt;exports.input=mt;exports.ins=pt;exports.kbd=bt;exports.label=gt;exports.legend=yt;exports.li=St;exports.link=Et;exports.main=Ct;exports.map=Nt;exports.mark=vt;exports.menu=kt;exports.meta=Lt;exports.meter=Tt;exports.nav=At;exports.noscript=xt;exports.object=qt;exports.ol=Mt;exports.optgroup=Dt;exports.option=Ft;exports.output=Ht;exports.p=Pt;exports.picture=Bt;exports.pre=Rt;exports.progress=$t;exports.q=Gt;exports.rp=Vt;exports.rt=Wt;exports.ruby=zt;exports.s=Jt;exports.samp=It;exports.script=Kt;exports.search=Ut;exports.section=Yt;exports.select=Qt;exports.slot=Xt;exports.small=Zt;exports.source=_t;exports.span=Ot;exports.strong=jt;exports.style=en;exports.sub=tn;exports.summary=nn;exports.sup=rn;exports.table=on;exports.tbody=sn;exports.td=un;exports.template=cn;exports.textarea=an;exports.tfoot=fn;exports.th=ln;exports.thead=dn;exports.time=hn;exports.title=wn;exports.tr=mn;exports.track=pn;exports.u=bn;exports.ul=gn;exports.video=Sn;exports.wbr=En;