aptechka 0.41.7 → 0.42.1

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 (179) hide show
  1. package/lib/Animation-CMiBKrwE.cjs +1 -0
  2. package/lib/{Animation-CSexZn4M.js → Animation-DPRlQfW2.js} +1 -1
  3. package/lib/{Damped-BMr6Toib.cjs → Damped-CHZ314Rn.cjs} +1 -1
  4. package/lib/{Damped-Bcngr1kp.js → Damped-DxylD27S.js} +1 -1
  5. package/lib/{Tweened-D-vlLZdS.cjs → Tweened-Dn6CMA-p.cjs} +1 -1
  6. package/lib/{Tweened-sqOQu9Gf.js → Tweened-p5hYr6lL.js} +2 -2
  7. package/lib/animation/Animation.d.ts +2 -2
  8. package/lib/animation/Damped.d.ts +1 -1
  9. package/lib/animation/Tweened.d.ts +1 -1
  10. package/lib/animation/index.cjs +1 -1
  11. package/lib/animation/index.js +3 -3
  12. package/lib/attribute/index.d.ts +1 -1
  13. package/lib/attribute/index.js +1 -1
  14. package/lib/canvas/index.cjs +1 -1
  15. package/lib/canvas/index.js +2 -2
  16. package/lib/class-linked-status/index.d.ts +1 -1
  17. package/lib/connector/index.cjs +1 -1
  18. package/lib/connector/index.js +1 -1
  19. package/lib/controls/AutoplayControls.d.ts +1 -1
  20. package/lib/controls/index.cjs +1 -1
  21. package/lib/controls/index.js +4 -4
  22. package/lib/css-property/index.cjs +1 -1
  23. package/lib/css-property/index.d.ts +1 -1
  24. package/lib/css-property/index.js +2 -2
  25. package/lib/custom-scrollbar/index.cjs +1 -0
  26. package/lib/custom-scrollbar/index.d.ts +13 -0
  27. package/lib/custom-scrollbar/index.js +60 -0
  28. package/lib/dev/index.cjs +1 -1
  29. package/lib/dev/index.js +1 -1
  30. package/lib/device/Viewport.d.ts +1 -1
  31. package/lib/device/index.cjs +1 -1
  32. package/lib/device/index.js +1 -1
  33. package/lib/{dom-0S_WDL4g.js → dom-CVWzyXPH.js} +2 -2
  34. package/lib/{easings-BEmRlrDd.js → easings-Bni3YAAW.js} +15 -15
  35. package/lib/element-resizer/index.cjs +1 -0
  36. package/lib/element-resizer/{vanilla/index.d.ts → index.d.ts} +1 -1
  37. package/lib/element-resizer/{vanilla/index.js → index.js} +2 -2
  38. package/lib/en3/index.cjs +1 -1
  39. package/lib/en3/index.js +3 -3
  40. package/lib/iframe/index.cjs +1 -0
  41. package/lib/iframe/index.js +38 -0
  42. package/lib/image/index.cjs +1 -0
  43. package/lib/image/index.js +20 -0
  44. package/lib/intersector/index.cjs +1 -0
  45. package/lib/intersector/{vanilla/index.d.ts → index.d.ts} +1 -1
  46. package/lib/intersector/{vanilla/index.js → index.js} +2 -2
  47. package/lib/ladder/index.d.ts +1 -1
  48. package/lib/layout-Ctc2p3uz.cjs +1 -0
  49. package/lib/layout-DpZo-I0y.js +29 -0
  50. package/lib/layout-box/index.cjs +1 -1
  51. package/lib/layout-box/index.d.ts +1 -1
  52. package/lib/layout-box/index.js +5 -5
  53. package/lib/masonry-layout/index.cjs +1 -0
  54. package/lib/masonry-layout/index.d.ts +11 -0
  55. package/lib/masonry-layout/index.js +60 -0
  56. package/lib/media/index.cjs +1 -1
  57. package/lib/media/index.d.ts +1 -1
  58. package/lib/media/index.js +1 -1
  59. package/lib/need_redo_tweaker/TweakerBooleanManagerElement.d.ts +1 -1
  60. package/lib/need_redo_tweaker/TweakerColorManagerElement.d.ts +1 -1
  61. package/lib/need_redo_tweaker/TweakerElement.d.ts +1 -1
  62. package/lib/need_redo_tweaker/TweakerFieldElement.d.ts +1 -1
  63. package/lib/need_redo_tweaker/TweakerFolderElement.d.ts +1 -1
  64. package/lib/need_redo_tweaker/TweakerLinkManagerElement.d.ts +1 -1
  65. package/lib/need_redo_tweaker/TweakerNumberManagerElement.d.ts +1 -1
  66. package/lib/need_redo_tweaker/TweakerSelectManagerElement.d.ts +1 -1
  67. package/lib/need_redo_tweaker/TweakerStoreManagerElement.d.ts +1 -1
  68. package/lib/need_redo_tweaker/TweakerStringManagerElement.d.ts +1 -1
  69. package/lib/need_redo_tweaker/element-constructor/ElementConstructor.d.ts +1 -1
  70. package/lib/need_redo_tweaker/index.cjs +1 -1
  71. package/lib/need_redo_tweaker/index.js +2 -2
  72. package/lib/pointer/index.cjs +1 -1
  73. package/lib/pointer/index.js +5 -5
  74. package/lib/popover/PopoverElement.d.ts +1 -1
  75. package/lib/popover/index.cjs +1 -1
  76. package/lib/popover/index.js +1 -1
  77. package/lib/scroll/{vanilla/ScrollElement.d.ts → ScrollElement.d.ts} +4 -4
  78. package/lib/scroll/{vanilla/ScrollSegmentElement.d.ts → ScrollSegmentElement.d.ts} +1 -1
  79. package/lib/scroll/index.cjs +1 -0
  80. package/lib/scroll/{vanilla/index.js → index.js} +50 -50
  81. package/lib/scroll-entries/index.js +1 -1
  82. package/lib/scroll-segment/index.cjs +1 -1
  83. package/lib/scroll-segment/index.d.ts +1 -1
  84. package/lib/scroll-segment/index.js +4 -4
  85. package/lib/sequence/index.cjs +1 -0
  86. package/lib/{media-elements/sequence → sequence}/index.d.ts +2 -3
  87. package/lib/sequence/index.js +158 -0
  88. package/lib/size-element/index.cjs +1 -0
  89. package/lib/size-element/index.d.ts +10 -0
  90. package/lib/size-element/index.js +32 -0
  91. package/lib/{media-elements/source/index.d.ts → source/SourceElement.d.ts} +3 -3
  92. package/lib/source/SourceManager.d.ts +1 -1
  93. package/lib/source/index.cjs +5 -1
  94. package/lib/source/index.d.ts +1 -0
  95. package/lib/source/index.js +173 -67
  96. package/lib/store/index.cjs +1 -0
  97. package/lib/store/{vanilla/index.js → index.js} +3 -3
  98. package/lib/ticker/index.cjs +1 -0
  99. package/lib/ticker/{vanilla/index.d.ts → index.d.ts} +1 -1
  100. package/lib/ticker/{vanilla/index.js → index.js} +2 -2
  101. package/lib/utils/clipboard.d.ts +1 -0
  102. package/lib/utils/index.cjs +1 -1
  103. package/lib/utils/index.d.ts +3 -1
  104. package/lib/utils/index.js +190 -144
  105. package/lib/utils/layout.d.ts +4 -3
  106. package/lib/utils/scroll.d.ts +6 -0
  107. package/lib/utils/template.d.ts +1 -0
  108. package/lib/video/index.cjs +1 -0
  109. package/lib/video/index.js +54 -0
  110. package/lib/window-resizer/index.cjs +1 -0
  111. package/lib/window-resizer/{vanilla/index.d.ts → index.d.ts} +1 -1
  112. package/lib/window-resizer/{vanilla/index.js → index.js} +3 -3
  113. package/lib/youtube/index.cjs +1 -0
  114. package/lib/youtube/index.js +81 -0
  115. package/package.json +101 -99
  116. package/lib/Animation-esZH7swx.cjs +0 -1
  117. package/lib/element-resizer/react/index.cjs +0 -1
  118. package/lib/element-resizer/react/index.d.ts +0 -2
  119. package/lib/element-resizer/react/index.js +0 -8
  120. package/lib/element-resizer/vanilla/index.cjs +0 -1
  121. package/lib/intersector/react/index.cjs +0 -1
  122. package/lib/intersector/react/index.d.ts +0 -4
  123. package/lib/intersector/react/index.js +0 -12
  124. package/lib/intersector/vanilla/index.cjs +0 -1
  125. package/lib/layout-8ryRAMGJ.cjs +0 -1
  126. package/lib/layout-HoBT_Da2.js +0 -12
  127. package/lib/media-elements/index.cjs +0 -5
  128. package/lib/media-elements/index.d.ts +0 -6
  129. package/lib/media-elements/index.js +0 -416
  130. package/lib/scroll/react/Scroll.d.ts +0 -13
  131. package/lib/scroll/react/ScrollBulletButtons.d.ts +0 -11
  132. package/lib/scroll/react/ScrollSegment.d.ts +0 -18
  133. package/lib/scroll/react/ScrollSetButton.d.ts +0 -14
  134. package/lib/scroll/react/ScrollStepButton.d.ts +0 -14
  135. package/lib/scroll/react/Scrollbar.d.ts +0 -11
  136. package/lib/scroll/react/index.cjs +0 -30
  137. package/lib/scroll/react/index.d.ts +0 -6
  138. package/lib/scroll/react/index.js +0 -761
  139. package/lib/scroll/vanilla/index.cjs +0 -1
  140. package/lib/store/react/index.cjs +0 -1
  141. package/lib/store/react/index.d.ts +0 -1
  142. package/lib/store/react/index.js +0 -14
  143. package/lib/store/react/useStore.d.ts +0 -2
  144. package/lib/store/vanilla/index.cjs +0 -1
  145. package/lib/studio/Outliner/File/index.d.ts +0 -8
  146. package/lib/studio/Outliner/Folder/index.d.ts +0 -9
  147. package/lib/studio/Outliner/index.d.ts +0 -2
  148. package/lib/studio/Studio/index.d.ts +0 -2
  149. package/lib/studio/Tweaker/index.d.ts +0 -4
  150. package/lib/studio/index.d.ts +0 -1
  151. package/lib/studio/store.d.ts +0 -2
  152. package/lib/ticker/react/index.cjs +0 -1
  153. package/lib/ticker/react/index.d.ts +0 -5
  154. package/lib/ticker/react/index.js +0 -19
  155. package/lib/ticker/vanilla/index.cjs +0 -1
  156. package/lib/utils/ts-react-utility.d.ts +0 -12
  157. package/lib/window-resizer/react/index.cjs +0 -1
  158. package/lib/window-resizer/react/index.d.ts +0 -2
  159. package/lib/window-resizer/react/index.js +0 -8
  160. package/lib/window-resizer/vanilla/index.cjs +0 -1
  161. /package/lib/{media-elements/iframe → iframe}/index.d.ts +0 -0
  162. /package/lib/{media-elements/image → image}/index.d.ts +0 -0
  163. /package/lib/scroll/{vanilla/ScrollBulletButtonsElement.d.ts → ScrollBulletButtonsElement.d.ts} +0 -0
  164. /package/lib/scroll/{vanilla/ScrollButtonElement.d.ts → ScrollButtonElement.d.ts} +0 -0
  165. /package/lib/scroll/{vanilla/ScrollSection.d.ts → ScrollSection.d.ts} +0 -0
  166. /package/lib/scroll/{vanilla/ScrollSetButtonElement.d.ts → ScrollSetButtonElement.d.ts} +0 -0
  167. /package/lib/scroll/{vanilla/ScrollStepButtonElement.d.ts → ScrollStepButtonElement.d.ts} +0 -0
  168. /package/lib/scroll/{vanilla/ScrollUserElement.d.ts → ScrollUserElement.d.ts} +0 -0
  169. /package/lib/scroll/{vanilla/ScrollbarElement.d.ts → ScrollbarElement.d.ts} +0 -0
  170. /package/lib/scroll/{vanilla/index.d.ts → index.d.ts} +0 -0
  171. /package/lib/store/{vanilla/Composed.d.ts → Composed.d.ts} +0 -0
  172. /package/lib/store/{vanilla/Derived.d.ts → Derived.d.ts} +0 -0
  173. /package/lib/store/{vanilla/DerivedArray.d.ts → DerivedArray.d.ts} +0 -0
  174. /package/lib/store/{vanilla/Resource.d.ts → Resource.d.ts} +0 -0
  175. /package/lib/store/{vanilla/Store.d.ts → Store.d.ts} +0 -0
  176. /package/lib/store/{vanilla/StoreRegistry.d.ts → StoreRegistry.d.ts} +0 -0
  177. /package/lib/store/{vanilla/index.d.ts → index.d.ts} +0 -0
  178. /package/lib/{media-elements/video → video}/index.d.ts +0 -0
  179. /package/lib/{media-elements/youtube → youtube}/index.d.ts +0 -0
@@ -0,0 +1,32 @@
1
+ var m = (e) => {
2
+ throw TypeError(e);
3
+ };
4
+ var c = (e, s, t) => s.has(e) || m("Cannot " + t);
5
+ var r = (e, s, t) => (c(e, s, "read from private field"), t ? t.call(e) : s.get(e)), n = (e, s, t) => s.has(e) ? m("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t), l = (e, s, t, h) => (c(e, s, "write to private field"), h ? h.call(e, t) : s.set(e, t), t);
6
+ import { elementResizer as y } from "../element-resizer/index.js";
7
+ var i, o;
8
+ class p extends HTMLElement {
9
+ constructor() {
10
+ super(...arguments);
11
+ n(this, i, this);
12
+ n(this, o, () => {
13
+ r(this, i).style.removeProperty("--width"), r(this, i).style.removeProperty("--height"), setTimeout(() => {
14
+ const t = this.offsetWidth, h = this.offsetHeight;
15
+ r(this, i).style.setProperty("--width", t + "px"), r(this, i).style.setProperty("--height", h + "px");
16
+ }, 0);
17
+ });
18
+ }
19
+ connectedCallback() {
20
+ var h;
21
+ const t = (h = this.getAttribute("target")) == null ? void 0 : h.trim();
22
+ t && (t === "parent" ? l(this, i, this.parentElement || this) : l(this, i, document.querySelector(t) || this)), y.subscribe(this, r(this, o));
23
+ }
24
+ disconnectedCallback() {
25
+ y.unsubscribe(r(this, o)), r(this, i).style.removeProperty("--width"), r(this, i).style.removeProperty("--height");
26
+ }
27
+ }
28
+ i = new WeakMap(), o = new WeakMap();
29
+ customElements.get("e-size-element") || customElements.define("e-size-element", p);
30
+ export {
31
+ p as SizeElement
32
+ };
@@ -1,6 +1,6 @@
1
- import { SourceManager } from '../../source';
2
- import { ClassLinkedStatus } from '../../class-linked-status';
3
- import { SourceSetOptions } from '../../source/SourceSet';
1
+ import { SourceManager } from '.';
2
+ import { ClassLinkedStatus } from '../class-linked-status';
3
+ import { SourceSetOptions } from './SourceSet';
4
4
  export interface SourceEvents {
5
5
  sourceCapture: CustomEvent;
6
6
  sourceRelease: CustomEvent;
@@ -1,4 +1,4 @@
1
- import { Store } from '../store/vanilla';
1
+ import { Store } from '../store';
2
2
  import { Source } from './SourceClass';
3
3
  import { SourceSetOptions } from './SourceSet';
4
4
  export type SourceManagerSourceSet = string | Array<string>;
@@ -1 +1,5 @@
1
- "use strict";var I=r=>{throw TypeError(r)};var V=(r,n,t)=>n.has(r)||I("Cannot "+t);var e=(r,n,t)=>(V(r,n,"read from private field"),t?t.call(r):n.get(r)),u=(r,n,t)=>n.has(r)?I("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(r):n.set(r,t),s=(r,n,t,h)=>(V(r,n,"write to private field"),h?h.call(r,t):n.set(r,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("../order/index.cjs"),k=require("../window-resizer/vanilla/index.cjs"),z=require("../Store-C2J4Q87x.cjs");var w,f,M,d,a,o,y;class B{constructor(n){u(this,w);u(this,f);u(this,M);u(this,d);u(this,a);u(this,o);u(this,y);s(this,w,n);let t=n.split(".");const h=/\b\d{1,2}x\b/g,p=t.find(l=>l.match(h)&&parseInt(l));s(this,M,p?parseInt(p):1),p&&(t=t.slice(0,-1)),s(this,f,t.length>1?t.slice(0,-1).join("."):t.join("."));const c=/\d+max/g,g=/\d+min/g,S=/\d+mar/g,E=/\d+mir/g,$=t.find(l=>l.match(c)),i=t.find(l=>l.match(g)),m=t.find(l=>l.match(S)),b=t.find(l=>l.match(E));m?(s(this,a,parseInt(m)),s(this,o,"max"),s(this,d,`(max-aspect-ratio: ${e(this,a)})`)):b?(s(this,a,parseInt(b)),s(this,o,"max"),s(this,d,`(min-aspect-ratio: ${e(this,a)})`)):$?(s(this,a,parseInt($)),s(this,o,"max"),s(this,d,`(max-width: ${e(this,a)}px)`)):i?(s(this,a,parseInt(i)),s(this,d,`(min-width: ${e(this,a)}px)`),s(this,o,"min")):(s(this,a,0),s(this,d,`(min-width: ${e(this,a)}px)`),s(this,o,"min")),s(this,f,e(this,f).replace(`.${e(this,a)}${e(this,o)}`,"")),s(this,y,t[t.length-1]===e(this,f)?"":"."+t[t.length-1]),s(this,y,e(this,y).replace(`.${e(this,a)}${e(this,o)}`,""))}get url(){return e(this,w)}get name(){return e(this,f)}get density(){return e(this,M)}get query(){return e(this,d)}get extension(){return e(this,y)}get queryType(){return e(this,o)}get queryValue(){return e(this,a)}}w=new WeakMap,f=new WeakMap,M=new WeakMap,d=new WeakMap,a=new WeakMap,o=new WeakMap,y=new WeakMap;var x;class T{constructor(n,t){u(this,x);s(this,x,new Map);const h=(t==null?void 0:t.mediaBuckets)!==!1,p=typeof n=="string"?h?n.trim().split(",").map(i=>i.trim()).filter(i=>!!i):[n]:n,c=[];p.forEach(i=>{const m=new B(i);c.push([m.query,m])});const g=c.filter(i=>i[1].queryType.includes("max")).sort((i,m)=>m[1].queryValue-i[1].queryValue),S=c.filter(i=>i[1].queryType.includes("min")&&i[1].queryValue!==0).sort((i,m)=>i[1].queryValue-m[1].queryValue),E=c.filter(i=>i[0]==="(min-width: 0px)");(E?[...E,...g,...S]:[...g,...S]).forEach(i=>{e(this,x).has(i[0])||e(this,x).set(i[0],[]),e(this,x).get(i[0]).push(i[1])})}get mediaBuckets(){return e(this,x)}}x=new WeakMap;var R,q;class A extends z.Store{constructor(t){super(void 0);u(this,R);u(this,q,()=>{let t;e(this,R).mediaBuckets.forEach((c,g)=>{matchMedia(g).matches&&(t=c)});let h,p=0;t==null||t.forEach(c=>{c.density>p&&c.density<=Math.max(devicePixelRatio,1)&&(p=c.density,h=c)}),t!=null&&t.length&&!h&&(h=t[0]),this.current=h});s(this,R,new T(t.srcset,t.sourceSetOptions))}close(){super.close(),this.disconnect()}connect(){k.windowResizer.subscribe(e(this,q),_.RESIZE_ORDER.SOURCE_MANAGER),e(this,q).call(this)}disconnect(){k.windowResizer.unsubscribe(e(this,q))}}R=new WeakMap,q=new WeakMap;exports.Source=B;exports.SourceManager=A;exports.SourceSet=T;
1
+ "use strict";var W=h=>{throw TypeError(h)};var G=(h,r,e)=>r.has(h)||W("Cannot "+e);var t=(h,r,e)=>(G(h,r,"read from private field"),e?e.call(h):r.get(h)),i=(h,r,e)=>r.has(h)?W("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(h):r.set(h,e),s=(h,r,e,o)=>(G(h,r,"write to private field"),o?o.call(h,e):r.set(h,e),e),_=(h,r,e)=>(G(h,r,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Y=require("../class-linked-status/index.cjs"),tt=require("../browser-CpzFX2xg.cjs"),U=require("../events-KVanG9sR.cjs"),et=require("../string-DhgS_iFl.cjs"),K=require("../loading/index.cjs"),st=require("../order/index.cjs"),Z=require("../window-resizer/index.cjs"),it=require("../Store-C2J4Q87x.cjs");var T,w,$,q,u,f,M;class J{constructor(r){i(this,T);i(this,w);i(this,$);i(this,q);i(this,u);i(this,f);i(this,M);s(this,T,r);let e=r.split(".");const o=/\b\d{1,2}x\b/g,d=e.find(p=>p.match(o)&&parseInt(p));s(this,$,d?parseInt(d):1),d&&(e=e.slice(0,-1)),s(this,w,e.length>1?e.slice(0,-1).join("."):e.join("."));const l=/\d+max/g,x=/\d+min/g,B=/\d+mar/g,P=/\d+mir/g,H=e.find(p=>p.match(l)),n=e.find(p=>p.match(x)),b=e.find(p=>p.match(B)),N=e.find(p=>p.match(P));b?(s(this,u,parseInt(b)),s(this,f,"max"),s(this,q,`(max-aspect-ratio: ${t(this,u)})`)):N?(s(this,u,parseInt(N)),s(this,f,"max"),s(this,q,`(min-aspect-ratio: ${t(this,u)})`)):H?(s(this,u,parseInt(H)),s(this,f,"max"),s(this,q,`(max-width: ${t(this,u)}px)`)):n?(s(this,u,parseInt(n)),s(this,q,`(min-width: ${t(this,u)}px)`),s(this,f,"min")):(s(this,u,0),s(this,q,`(min-width: ${t(this,u)}px)`),s(this,f,"min")),s(this,w,t(this,w).replace(`.${t(this,u)}${t(this,f)}`,"")),s(this,M,e[e.length-1]===t(this,w)?"":"."+e[e.length-1]),s(this,M,t(this,M).replace(`.${t(this,u)}${t(this,f)}`,""))}get url(){return t(this,T)}get name(){return t(this,w)}get density(){return t(this,$)}get query(){return t(this,q)}get extension(){return t(this,M)}get queryType(){return t(this,f)}get queryValue(){return t(this,u)}}T=new WeakMap,w=new WeakMap,$=new WeakMap,q=new WeakMap,u=new WeakMap,f=new WeakMap,M=new WeakMap;let rt=0;var m,a,y,E,g,z,R,c,k,v,S,C,A,j,D,O,F;class nt extends HTMLElement{constructor(e){super();i(this,A);i(this,m,null);i(this,a,null);i(this,y,!1);i(this,E,!1);i(this,g,!1);i(this,z,"");i(this,R,"");i(this,c,new Y.ClassLinkedStatus(this,{loading:!1,loaded:!1,error:!1,clear:!1}));i(this,k,null);i(this,v);i(this,S,null);i(this,C);i(this,D,e=>{const o=e[0];t(this,g)&&(!t(this,E)||this.hasAttribute("reload-source"))&&o.isIntersecting&&this.triggerLazyLoad(),o.isIntersecting?U.dispatchEvent(this,"sourceCapture",{custom:!0}):(this.hasAttribute("reload-source")&&_(this,A,j).call(this,void 0),U.dispatchEvent(this,"sourceRelease",{custom:!0}))});i(this,O,()=>{t(this,c).set("loaded",!0),t(this,c).set("error",!1),t(this,c).set("loading",!1),!t(this,g)&&!t(this,y)&&K.loading.complete(t(this,R)),U.dispatchEvent(this,"sourceLoaded",{custom:!0});const e=getComputedStyle(this).getPropertyValue("--clear-duration");e?s(this,v,setTimeout(()=>{t(this,c).set("clear",!0)},parseFloat(e)*1e3)):t(this,c).set("clear",!0),s(this,y,!0)});i(this,F,e=>{t(this,c).set("loaded",!1),t(this,c).set("error",!0),t(this,c).set("loading",!1),!t(this,g)&&!t(this,y)&&K.loading.error(t(this,R)),U.dispatchEvent(this,"sourceError",{custom:!0}),s(this,y,!0)});s(this,C,e==null?void 0:e.sourceSetOptions),tt.isBrowser&&window.IntersectionObserver&&s(this,k,new IntersectionObserver(t(this,D)))}get consumerElement(){return t(this,a)}get sourceManager(){return t(this,m)}get status(){return t(this,c)}get isLazy(){return t(this,g)}get currentURL(){return t(this,S)}get isFirstLoadHappened(){return t(this,y)}triggerLazyLoad(){!t(this,E)&&t(this,m).current&&t(this,m).current!==t(this,m).previous&&(s(this,E,!0),_(this,A,j).call(this,t(this,m).current))}connectedCallback(){s(this,z,`source-consumer-${++rt}`);const e=this.getAttribute("srcset")||"",o=this.hasAttribute("notify")?this.closest(this.getAttribute("notify")):null;o&&t(this,c).addElement(o),s(this,a,this.createConsumer()),t(this,a).style.cssText=`
2
+ display: block;
3
+ width: 100%;
4
+ height: 100%;
5
+ `,t(this,a).classList.add("source-consumer"),Array.from(this.attributes).forEach(d=>{if(d.name!=="srcset"){const l=d.nodeValue||"",x=et.kebabToCamel(d.name);x in t(this,a)&&(t(this,a)[x]=l||!0)}}),this.appendChild(t(this,a)),s(this,m,new X({srcset:e,sourceSetOptions:t(this,C)})),s(this,g,this.hasAttribute("lazy")),t(this,m).subscribe(d=>{(!t(this,g)||t(this,g)&&t(this,E))&&_(this,A,j).call(this,d.current)}),t(this,m).connect(),t(this,k).observe(this)}disconnectedCallback(){var e;clearTimeout(t(this,v)),t(this,k).disconnect(),(e=t(this,m))==null||e.close(),t(this,a)&&(t(this,a).onloadeddata=null,t(this,a).onload=null,t(this,a).onerror=null,t(this,a).remove()),s(this,y,!1),s(this,E,!1),t(this,c).reset()}}m=new WeakMap,a=new WeakMap,y=new WeakMap,E=new WeakMap,g=new WeakMap,z=new WeakMap,R=new WeakMap,c=new WeakMap,k=new WeakMap,v=new WeakMap,S=new WeakMap,C=new WeakMap,A=new WeakSet,j=function(e){if(clearTimeout(t(this,v)),t(this,a).onloadeddata=null,t(this,a).onload=null,t(this,a).onerror=null,t(this,c).set("loaded",!1),t(this,c).set("error",!1),t(this,c).set("loading",!1),t(this,c).set("clear",!1),e){s(this,R,`${t(this,z)}-${e.url}`);const o=this.hasAttribute("keep-source-parameters");t(this,c).set("loading",!0),s(this,S,o?e.url:e.name+e.extension),this.consumeSource(t(this,S)),!t(this,g)&&!t(this,y)&&K.loading.add(t(this,R)),t(this,a).onloadeddata=()=>{t(this,O).call(this)},t(this,a).onload=()=>{t(this,O).call(this)},t(this,a).onerror=()=>{t(this,F).call(this,t(this,S))}}else s(this,S,null),this.consumeSource(null)},D=new WeakMap,O=new WeakMap,F=new WeakMap;var L;class Q{constructor(r,e){i(this,L);s(this,L,new Map);const o=(e==null?void 0:e.mediaBuckets)!==!1,d=typeof r=="string"?o?r.trim().split(",").map(n=>n.trim()).filter(n=>!!n):[r]:r,l=[];d.forEach(n=>{const b=new J(n);l.push([b.query,b])});const x=l.filter(n=>n[1].queryType.includes("max")).sort((n,b)=>b[1].queryValue-n[1].queryValue),B=l.filter(n=>n[1].queryType.includes("min")&&n[1].queryValue!==0).sort((n,b)=>n[1].queryValue-b[1].queryValue),P=l.filter(n=>n[0]==="(min-width: 0px)");(P?[...P,...x,...B]:[...x,...B]).forEach(n=>{t(this,L).has(n[0])||t(this,L).set(n[0],[]),t(this,L).get(n[0]).push(n[1])})}get mediaBuckets(){return t(this,L)}}L=new WeakMap;var V,I;class X extends it.Store{constructor(e){super(void 0);i(this,V);i(this,I,()=>{let e;t(this,V).mediaBuckets.forEach((l,x)=>{matchMedia(x).matches&&(e=l)});let o,d=0;e==null||e.forEach(l=>{l.density>d&&l.density<=Math.max(devicePixelRatio,1)&&(d=l.density,o=l)}),e!=null&&e.length&&!o&&(o=e[0]),this.current=o});s(this,V,new Q(e.srcset,e.sourceSetOptions))}close(){super.close(),this.disconnect()}connect(){Z.windowResizer.subscribe(t(this,I),st.RESIZE_ORDER.SOURCE_MANAGER),t(this,I).call(this)}disconnect(){Z.windowResizer.unsubscribe(t(this,I))}}V=new WeakMap,I=new WeakMap;exports.Source=J;exports.SourceElement=nt;exports.SourceManager=X;exports.SourceSet=Q;
@@ -1,3 +1,4 @@
1
1
  export { Source } from './SourceClass';
2
+ export { SourceElement, type SourceElementOptions, type SourceEvents, } from './SourceElement';
2
3
  export { SourceSet, type SourceSetMediaSources, type SourceSetMediaBucket, } from './SourceSet';
3
4
  export { SourceManager, type SourceManagerSourceSet, type SourceManagerParameters, } from './SourceManager';
@@ -1,107 +1,213 @@
1
- var b = (r) => {
2
- throw TypeError(r);
1
+ var W = (n) => {
2
+ throw TypeError(n);
3
3
  };
4
- var k = (r, n, t) => n.has(r) || b("Cannot " + t);
5
- var e = (r, n, t) => (k(r, n, "read from private field"), t ? t.call(r) : n.get(r)), m = (r, n, t) => n.has(r) ? b("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(r) : n.set(r, t), i = (r, n, t, c) => (k(r, n, "write to private field"), c ? c.call(r, t) : n.set(r, t), t);
6
- import { RESIZE_ORDER as A } from "../order/index.js";
7
- import { windowResizer as B } from "../window-resizer/vanilla/index.js";
8
- import { S } from "../Store-Cm3LPXlx.js";
9
- var w, f, E, d, h, o, y;
10
- class T {
11
- constructor(n) {
12
- m(this, w);
13
- m(this, f);
14
- m(this, E);
15
- m(this, d);
16
- m(this, h);
17
- m(this, o);
18
- m(this, y);
19
- i(this, w, n);
20
- let t = n.split(".");
21
- const c = /\b\d{1,2}x\b/g, p = t.find((u) => u.match(c) && parseInt(u));
22
- i(this, E, p ? parseInt(p) : 1), p && (t = t.slice(0, -1)), i(this, f, t.length > 1 ? t.slice(0, -1).join(".") : t.join("."));
23
- const a = /\d+max/g, g = /\d+min/g, R = /\d+mar/g, $ = /\d+mir/g, I = t.find((u) => u.match(a)), s = t.find((u) => u.match(g)), l = t.find((u) => u.match(R)), V = t.find((u) => u.match($));
24
- l ? (i(this, h, parseInt(l)), i(this, o, "max"), i(this, d, `(max-aspect-ratio: ${e(this, h)})`)) : V ? (i(this, h, parseInt(V)), i(this, o, "max"), i(this, d, `(min-aspect-ratio: ${e(this, h)})`)) : I ? (i(this, h, parseInt(I)), i(this, o, "max"), i(this, d, `(max-width: ${e(this, h)}px)`)) : s ? (i(this, h, parseInt(s)), i(this, d, `(min-width: ${e(this, h)}px)`), i(this, o, "min")) : (i(this, h, 0), i(this, d, `(min-width: ${e(this, h)}px)`), i(this, o, "min")), i(this, f, e(this, f).replace(
25
- `.${e(this, h)}${e(this, o)}`,
4
+ var G = (n, r, e) => r.has(n) || W("Cannot " + e);
5
+ var t = (n, r, e) => (G(n, r, "read from private field"), e ? e.call(n) : r.get(n)), i = (n, r, e) => r.has(n) ? W("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(n) : r.set(n, e), s = (n, r, e, o) => (G(n, r, "write to private field"), o ? o.call(n, e) : r.set(n, e), e), U = (n, r, e) => (G(n, r, "access private method"), e);
6
+ import { ClassLinkedStatus as J } from "../class-linked-status/index.js";
7
+ import { i as Q } from "../browser-0zX67oeU.js";
8
+ import { d as D } from "../events-CsVF98U6.js";
9
+ import { k as X } from "../string-f0Dnk0L1.js";
10
+ import { loading as K } from "../loading/index.js";
11
+ import { RESIZE_ORDER as Y } from "../order/index.js";
12
+ import { windowResizer as Z } from "../window-resizer/index.js";
13
+ import { S as tt } from "../Store-Cm3LPXlx.js";
14
+ var T, E, C, L, u, f, k;
15
+ class et {
16
+ constructor(r) {
17
+ i(this, T);
18
+ i(this, E);
19
+ i(this, C);
20
+ i(this, L);
21
+ i(this, u);
22
+ i(this, f);
23
+ i(this, k);
24
+ s(this, T, r);
25
+ let e = r.split(".");
26
+ const o = /\b\d{1,2}x\b/g, d = e.find((g) => g.match(o) && parseInt(g));
27
+ s(this, C, d ? parseInt(d) : 1), d && (e = e.slice(0, -1)), s(this, E, e.length > 1 ? e.slice(0, -1).join(".") : e.join("."));
28
+ const c = /\d+max/g, x = /\d+min/g, B = /\d+mar/g, P = /\d+mir/g, _ = e.find((g) => g.match(c)), h = e.find((g) => g.match(x)), b = e.find((g) => g.match(B)), N = e.find((g) => g.match(P));
29
+ b ? (s(this, u, parseInt(b)), s(this, f, "max"), s(this, L, `(max-aspect-ratio: ${t(this, u)})`)) : N ? (s(this, u, parseInt(N)), s(this, f, "max"), s(this, L, `(min-aspect-ratio: ${t(this, u)})`)) : _ ? (s(this, u, parseInt(_)), s(this, f, "max"), s(this, L, `(max-width: ${t(this, u)}px)`)) : h ? (s(this, u, parseInt(h)), s(this, L, `(min-width: ${t(this, u)}px)`), s(this, f, "min")) : (s(this, u, 0), s(this, L, `(min-width: ${t(this, u)}px)`), s(this, f, "min")), s(this, E, t(this, E).replace(
30
+ `.${t(this, u)}${t(this, f)}`,
26
31
  ""
27
- )), i(this, y, t[t.length - 1] === e(this, f) ? "" : "." + t[t.length - 1]), i(this, y, e(this, y).replace(
28
- `.${e(this, h)}${e(this, o)}`,
32
+ )), s(this, k, e[e.length - 1] === t(this, E) ? "" : "." + e[e.length - 1]), s(this, k, t(this, k).replace(
33
+ `.${t(this, u)}${t(this, f)}`,
29
34
  ""
30
35
  ));
31
36
  }
32
37
  get url() {
33
- return e(this, w);
38
+ return t(this, T);
34
39
  }
35
40
  get name() {
36
- return e(this, f);
41
+ return t(this, E);
37
42
  }
38
43
  get density() {
39
- return e(this, E);
44
+ return t(this, C);
40
45
  }
41
46
  get query() {
42
- return e(this, d);
47
+ return t(this, L);
43
48
  }
44
49
  get extension() {
45
- return e(this, y);
50
+ return t(this, k);
46
51
  }
47
52
  get queryType() {
48
- return e(this, o);
53
+ return t(this, f);
49
54
  }
50
55
  get queryValue() {
51
- return e(this, h);
56
+ return t(this, u);
52
57
  }
53
58
  }
54
- w = new WeakMap(), f = new WeakMap(), E = new WeakMap(), d = new WeakMap(), h = new WeakMap(), o = new WeakMap(), y = new WeakMap();
55
- var x;
56
- class O {
57
- constructor(n, t) {
58
- m(this, x);
59
- i(this, x, /* @__PURE__ */ new Map());
60
- const c = (t == null ? void 0 : t.mediaBuckets) !== !1, p = typeof n == "string" ? c ? n.trim().split(",").map((s) => s.trim()).filter((s) => !!s) : [n] : n, a = [];
61
- p.forEach((s) => {
62
- const l = new T(s);
63
- a.push([l.query, l]);
59
+ T = new WeakMap(), E = new WeakMap(), C = new WeakMap(), L = new WeakMap(), u = new WeakMap(), f = new WeakMap(), k = new WeakMap();
60
+ let st = 0;
61
+ var m, a, y, w, p, O, A, l, I, M, q, V, R, F, H, z, j;
62
+ class ft extends HTMLElement {
63
+ constructor(e) {
64
+ super();
65
+ i(this, R);
66
+ i(this, m, null);
67
+ i(this, a, null);
68
+ i(this, y, !1);
69
+ i(this, w, !1);
70
+ i(this, p, !1);
71
+ i(this, O, "");
72
+ i(this, A, "");
73
+ i(this, l, new J(this, {
74
+ loading: !1,
75
+ loaded: !1,
76
+ error: !1,
77
+ clear: !1
78
+ }));
79
+ i(this, I, null);
80
+ i(this, M);
81
+ i(this, q, null);
82
+ i(this, V);
83
+ i(this, H, (e) => {
84
+ const o = e[0];
85
+ t(this, p) && (!t(this, w) || this.hasAttribute("reload-source")) && o.isIntersecting && this.triggerLazyLoad(), o.isIntersecting ? D(this, "sourceCapture", { custom: !0 }) : (this.hasAttribute("reload-source") && U(this, R, F).call(this, void 0), D(this, "sourceRelease", { custom: !0 }));
64
86
  });
65
- const g = a.filter((s) => s[1].queryType.includes("max")).sort((s, l) => l[1].queryValue - s[1].queryValue), R = a.filter((s) => s[1].queryType.includes("min") && s[1].queryValue !== 0).sort((s, l) => s[1].queryValue - l[1].queryValue), $ = a.filter((s) => s[0] === "(min-width: 0px)");
66
- ($ ? [...$, ...g, ...R] : [...g, ...R]).forEach((s) => {
67
- e(this, x).has(s[0]) || e(this, x).set(s[0], []), e(this, x).get(s[0]).push(s[1]);
87
+ i(this, z, () => {
88
+ t(this, l).set("loaded", !0), t(this, l).set("error", !1), t(this, l).set("loading", !1), !t(this, p) && !t(this, y) && K.complete(t(this, A)), D(this, "sourceLoaded", { custom: !0 });
89
+ const e = getComputedStyle(this).getPropertyValue("--clear-duration");
90
+ e ? s(this, M, setTimeout(() => {
91
+ t(this, l).set("clear", !0);
92
+ }, parseFloat(e) * 1e3)) : t(this, l).set("clear", !0), s(this, y, !0);
93
+ });
94
+ i(this, j, (e) => {
95
+ t(this, l).set("loaded", !1), t(this, l).set("error", !0), t(this, l).set("loading", !1), !t(this, p) && !t(this, y) && K.error(t(this, A)), D(this, "sourceError", { custom: !0 }), s(this, y, !0);
96
+ });
97
+ s(this, V, e == null ? void 0 : e.sourceSetOptions), Q && window.IntersectionObserver && s(this, I, new IntersectionObserver(
98
+ t(this, H)
99
+ ));
100
+ }
101
+ get consumerElement() {
102
+ return t(this, a);
103
+ }
104
+ get sourceManager() {
105
+ return t(this, m);
106
+ }
107
+ get status() {
108
+ return t(this, l);
109
+ }
110
+ get isLazy() {
111
+ return t(this, p);
112
+ }
113
+ get currentURL() {
114
+ return t(this, q);
115
+ }
116
+ get isFirstLoadHappened() {
117
+ return t(this, y);
118
+ }
119
+ triggerLazyLoad() {
120
+ !t(this, w) && t(this, m).current && t(this, m).current !== t(this, m).previous && (s(this, w, !0), U(this, R, F).call(this, t(this, m).current));
121
+ }
122
+ connectedCallback() {
123
+ s(this, O, `source-consumer-${++st}`);
124
+ const e = this.getAttribute("srcset") || "", o = this.hasAttribute("notify") ? this.closest(this.getAttribute("notify")) : null;
125
+ o && t(this, l).addElement(o), s(this, a, this.createConsumer()), t(this, a).style.cssText = `
126
+ display: block;
127
+ width: 100%;
128
+ height: 100%;
129
+ `, t(this, a).classList.add("source-consumer"), Array.from(this.attributes).forEach((d) => {
130
+ if (d.name !== "srcset") {
131
+ const c = d.nodeValue || "", x = X(d.name);
132
+ x in t(this, a) && (t(this, a)[x] = c || !0);
133
+ }
134
+ }), this.appendChild(t(this, a)), s(this, m, new rt({
135
+ srcset: e,
136
+ sourceSetOptions: t(this, V)
137
+ })), s(this, p, this.hasAttribute("lazy")), t(this, m).subscribe((d) => {
138
+ (!t(this, p) || t(this, p) && t(this, w)) && U(this, R, F).call(this, d.current);
139
+ }), t(this, m).connect(), t(this, I).observe(this);
140
+ }
141
+ disconnectedCallback() {
142
+ var e;
143
+ clearTimeout(t(this, M)), t(this, I).disconnect(), (e = t(this, m)) == null || e.close(), t(this, a) && (t(this, a).onloadeddata = null, t(this, a).onload = null, t(this, a).onerror = null, t(this, a).remove()), s(this, y, !1), s(this, w, !1), t(this, l).reset();
144
+ }
145
+ }
146
+ m = new WeakMap(), a = new WeakMap(), y = new WeakMap(), w = new WeakMap(), p = new WeakMap(), O = new WeakMap(), A = new WeakMap(), l = new WeakMap(), I = new WeakMap(), M = new WeakMap(), q = new WeakMap(), V = new WeakMap(), R = new WeakSet(), F = function(e) {
147
+ if (clearTimeout(t(this, M)), t(this, a).onloadeddata = null, t(this, a).onload = null, t(this, a).onerror = null, t(this, l).set("loaded", !1), t(this, l).set("error", !1), t(this, l).set("loading", !1), t(this, l).set("clear", !1), e) {
148
+ s(this, A, `${t(this, O)}-${e.url}`);
149
+ const o = this.hasAttribute("keep-source-parameters");
150
+ t(this, l).set("loading", !0), s(this, q, o ? e.url : e.name + e.extension), this.consumeSource(t(this, q)), !t(this, p) && !t(this, y) && K.add(t(this, A)), t(this, a).onloadeddata = () => {
151
+ t(this, z).call(this);
152
+ }, t(this, a).onload = () => {
153
+ t(this, z).call(this);
154
+ }, t(this, a).onerror = () => {
155
+ t(this, j).call(this, t(this, q));
156
+ };
157
+ } else
158
+ s(this, q, null), this.consumeSource(null);
159
+ }, H = new WeakMap(), z = new WeakMap(), j = new WeakMap();
160
+ var S;
161
+ class it {
162
+ constructor(r, e) {
163
+ i(this, S);
164
+ s(this, S, /* @__PURE__ */ new Map());
165
+ const o = (e == null ? void 0 : e.mediaBuckets) !== !1, d = typeof r == "string" ? o ? r.trim().split(",").map((h) => h.trim()).filter((h) => !!h) : [r] : r, c = [];
166
+ d.forEach((h) => {
167
+ const b = new et(h);
168
+ c.push([b.query, b]);
169
+ });
170
+ const x = c.filter((h) => h[1].queryType.includes("max")).sort((h, b) => b[1].queryValue - h[1].queryValue), B = c.filter((h) => h[1].queryType.includes("min") && h[1].queryValue !== 0).sort((h, b) => h[1].queryValue - b[1].queryValue), P = c.filter((h) => h[0] === "(min-width: 0px)");
171
+ (P ? [...P, ...x, ...B] : [...x, ...B]).forEach((h) => {
172
+ t(this, S).has(h[0]) || t(this, S).set(h[0], []), t(this, S).get(h[0]).push(h[1]);
68
173
  });
69
174
  }
70
175
  get mediaBuckets() {
71
- return e(this, x);
176
+ return t(this, S);
72
177
  }
73
178
  }
74
- x = new WeakMap();
75
- var M, q;
76
- class _ extends S {
77
- constructor(t) {
179
+ S = new WeakMap();
180
+ var v, $;
181
+ class rt extends tt {
182
+ constructor(e) {
78
183
  super(void 0);
79
- m(this, M);
80
- m(this, q, () => {
81
- let t;
82
- e(this, M).mediaBuckets.forEach((a, g) => {
83
- matchMedia(g).matches && (t = a);
184
+ i(this, v);
185
+ i(this, $, () => {
186
+ let e;
187
+ t(this, v).mediaBuckets.forEach((c, x) => {
188
+ matchMedia(x).matches && (e = c);
84
189
  });
85
- let c, p = 0;
86
- t == null || t.forEach((a) => {
87
- a.density > p && a.density <= Math.max(devicePixelRatio, 1) && (p = a.density, c = a);
88
- }), t != null && t.length && !c && (c = t[0]), this.current = c;
190
+ let o, d = 0;
191
+ e == null || e.forEach((c) => {
192
+ c.density > d && c.density <= Math.max(devicePixelRatio, 1) && (d = c.density, o = c);
193
+ }), e != null && e.length && !o && (o = e[0]), this.current = o;
89
194
  });
90
- i(this, M, new O(t.srcset, t.sourceSetOptions));
195
+ s(this, v, new it(e.srcset, e.sourceSetOptions));
91
196
  }
92
197
  close() {
93
198
  super.close(), this.disconnect();
94
199
  }
95
200
  connect() {
96
- B.subscribe(e(this, q), A.SOURCE_MANAGER), e(this, q).call(this);
201
+ Z.subscribe(t(this, $), Y.SOURCE_MANAGER), t(this, $).call(this);
97
202
  }
98
203
  disconnect() {
99
- B.unsubscribe(e(this, q));
204
+ Z.unsubscribe(t(this, $));
100
205
  }
101
206
  }
102
- M = new WeakMap(), q = new WeakMap();
207
+ v = new WeakMap(), $ = new WeakMap();
103
208
  export {
104
- T as Source,
105
- _ as SourceManager,
106
- O as SourceSet
209
+ et as Source,
210
+ ft as SourceElement,
211
+ rt as SourceManager,
212
+ it as SourceSet
107
213
  };
@@ -0,0 +1 @@
1
+ "use strict";var g=r=>{throw TypeError(r)};var v=(r,s,e)=>s.has(r)||g("Cannot "+e);var c=(r,s,e)=>(v(r,s,"read from private field"),e?e.call(r):s.get(r)),n=(r,s,e)=>s.has(r)?g("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(r):s.set(r,e),h=(r,s,e,t)=>(v(r,s,"write to private field"),t?t.call(r,e):s.set(r,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../Store-C2J4Q87x.cjs"),m=require("../function-MthRj-GJ.cjs");var d;class D extends i.Store{constructor(e,t,u){super(null,u);n(this,d);h(this,d,e.subscribe(a=>{this.current=t(a.current)}))}close(){super.close(),c(this,d).call(this)}}d=new WeakMap;var b;class R extends i.Store{constructor(e,t,u){super(null,u);n(this,b);h(this,b,e.subscribe(a=>{this.current=a.current.map((p,x,y)=>t(p,x,y))}))}close(){super.close(),c(this,b).call(this)}}b=new WeakMap;var f,o,l;class C extends i.Store{constructor(e,t,u){super(e,u);n(this,f);n(this,o);n(this,l,0);h(this,o,new i.Store(!1)),h(this,f,t),u!=null&&u.manualControl||this.refetch()}get isPending(){return c(this,o)}refetch(){c(this,o).current=!0,h(this,l,c(this,l)+1);const e=c(this,l);c(this,f).call(this).then(t=>{e===c(this,l)&&(c(this,o).current=!1,this.current=t)})}}f=new WeakMap,o=new WeakMap,l=new WeakMap;var S;class P extends i.Store{constructor(e,t,u){super(null,u);n(this,S,[]);const a=m.debounce(()=>{this.current=t()},0);e.forEach(p=>{c(this,S).push(p.subscribe(()=>{a()}))})}close(){super.close(),c(this,S).forEach(e=>e())}}S=new WeakMap;exports.Store=i.Store;exports.activeStores=i.activeStores;exports.storeRegistry=i.storeRegistry;exports.Composed=P;exports.Derived=D;exports.DerivedArray=R;exports.Resource=C;
@@ -3,9 +3,9 @@ var x = (e) => {
3
3
  };
4
4
  var g = (e, r, s) => r.has(e) || x("Cannot " + s);
5
5
  var c = (e, r, s) => (g(e, r, "read from private field"), s ? s.call(e) : r.get(e)), i = (e, r, s) => r.has(e) ? x("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(e) : r.set(e, s), h = (e, r, s, t) => (g(e, r, "write to private field"), t ? t.call(e, s) : r.set(e, s), s);
6
- import { S as a } from "../../Store-Cm3LPXlx.js";
7
- import { a as k, s as q } from "../../Store-Cm3LPXlx.js";
8
- import { d as y } from "../../function-C10DGppn.js";
6
+ import { S as a } from "../Store-Cm3LPXlx.js";
7
+ import { a as k, s as q } from "../Store-Cm3LPXlx.js";
8
+ import { d as y } from "../function-C10DGppn.js";
9
9
  var d;
10
10
  class I extends a {
11
11
  constructor(s, t, u) {
@@ -0,0 +1 @@
1
+ "use strict";var L=r=>{throw TypeError(r)};var A=(r,i,s)=>i.has(r)||L("Cannot "+s);var e=(r,i,s)=>(A(r,i,"read from private field"),s?s.call(r):i.get(r)),h=(r,i,s)=>i.has(r)?L("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(r):i.set(r,s),t=(r,i,s,n)=>(A(r,i,"write to private field"),n?n.call(r,s):i.set(r,s),s),S=(r,i,s)=>(A(r,i,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("../browser-CpzFX2xg.cjs"),M=require("../dom-JBOkFLTh.cjs");var o,u,v,b,m,l,g,y,q;class V{constructor(i,s){h(this,o);h(this,u);h(this,v);h(this,b,0);h(this,m,0);h(this,l,0);h(this,g,!1);h(this,y,null);h(this,q,i=>{const s=i[0];t(this,g,s.isIntersecting)});if(t(this,o,i),t(this,u,s==null?void 0:s.maxFPS),t(this,v,(s==null?void 0:s.order)||0),s!=null&&s.culling&&B.isBrowser){const n=M.getElement(s.culling);n&&(t(this,y,new IntersectionObserver(e(this,q))),e(this,y).observe(n))}else t(this,g,!0)}get callback(){return e(this,o)}get order(){return e(this,v)}sync(i){t(this,b,i-e(this,l))}tick(i){if(t(this,l,Math.max(0,i-e(this,b))),e(this,m)||t(this,m,i),e(this,u))if(e(this,l)>=1e3/e(this,u))t(this,b,i-e(this,l)%e(this,u));else return;else t(this,b,i);e(this,g)&&e(this,o).call(this,{timeBetweenFrames:e(this,l),timestamp:i,subscribeTimestamp:e(this,m),timeElapsedSinceSubscription:i-e(this,m)})}destroy(){var i;(i=e(this,y))==null||i.disconnect()}}o=new WeakMap,u=new WeakMap,v=new WeakMap,b=new WeakMap,m=new WeakMap,l=new WeakMap,g=new WeakMap,y=new WeakMap,q=new WeakMap;var w,f,a,F,c,d,I,E,k,T;class x{constructor(){h(this,d);h(this,w,0);h(this,f,0);h(this,a);h(this,F,!1);h(this,c,[]);h(this,k,i=>{if(e(this,F)){t(this,F,!1),t(this,w,i-e(this,f));for(const s of e(this,c))s.sync(e(this,f))}t(this,a,requestAnimationFrame(e(this,k))),t(this,f,i-e(this,w));for(const s of e(this,c))s.tick(e(this,f))});h(this,T,()=>{document.hidden&&t(this,F,!0)});B.isBrowser&&document.addEventListener("visibilitychange",e(this,T))}subscribe(i,s){if(!e(this,c).find(n=>n.callback===i)){const n=new V(i,s);n.sync(performance.now()),e(this,c).push(n),t(this,c,e(this,c).sort((O,P)=>O.order-P.order))}return S(this,d,I).call(this),()=>this.unsubscribe(i)}unsubscribe(i){const s=e(this,c).filter(n=>n.callback===i);s.length&&(s.forEach(n=>n.destroy()),t(this,c,e(this,c).filter(n=>n.callback!==i)),e(this,c).length||S(this,d,E).call(this))}destroy(){B.isBrowser&&(S(this,d,E).call(this),document.removeEventListener("visibilitychange",e(this,T)))}}w=new WeakMap,f=new WeakMap,a=new WeakMap,F=new WeakMap,c=new WeakMap,d=new WeakSet,I=function(){e(this,c).length&&!e(this,a)&&t(this,a,requestAnimationFrame(e(this,k)))},E=function(){e(this,a)&&(cancelAnimationFrame(e(this,a)),t(this,a,void 0))},k=new WeakMap,T=new WeakMap;const j=new x;exports.Ticker=x;exports.ticker=j;
@@ -1,4 +1,4 @@
1
- import { ElementOrSelector } from '../../utils';
1
+ import { ElementOrSelector } from '../utils';
2
2
  export interface TickerCallbackEntry {
3
3
  timestamp: number;
4
4
  subscribeTimestamp: number;
@@ -3,8 +3,8 @@ var q = (r) => {
3
3
  };
4
4
  var L = (r, i, s) => i.has(r) || q("Cannot " + s);
5
5
  var e = (r, i, s) => (L(r, i, "read from private field"), s ? s.call(r) : i.get(r)), h = (r, i, s) => i.has(r) ? q("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(r) : i.set(r, s), t = (r, i, s, n) => (L(r, i, "write to private field"), n ? n.call(r, s) : i.set(r, s), s), A = (r, i, s) => (L(r, i, "access private method"), s);
6
- import { i as S } from "../../browser-0zX67oeU.js";
7
- import { g as P } from "../../dom-0S_WDL4g.js";
6
+ import { i as S } from "../browser-0zX67oeU.js";
7
+ import { g as P } from "../dom-CVWzyXPH.js";
8
8
  var o, u, v, m, b, l, g, F, E;
9
9
  class V {
10
10
  constructor(i, s) {
@@ -0,0 +1 @@
1
+ export declare function copyTextToClipboard(text: string): void;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("../attributes-Bf2svn4j.cjs"),E=require("../browser-CpzFX2xg.cjs"),p=require("../canvas-CU5Xjahf.cjs"),f=require("../coordinates-D8Np3cPD.cjs"),d=require("../dom-JBOkFLTh.cjs"),a=require("../easings-GegIwET5.cjs"),P=require("../events-KVanG9sR.cjs"),b=require("../file-DSpfWdd9.cjs"),C=require("../function-MthRj-GJ.cjs"),I=require("../gestures-DHLrn6Q8.cjs"),O=require("../jss-GJLvaNfT.cjs"),g=require("../layout-8ryRAMGJ.cjs"),o=require("../math-GDWEqu7y.cjs"),l=require("../polyfills-BANSrI_m.cjs"),i=require("../object-CCiXnER2.cjs"),u=require("../string-DhgS_iFl.cjs"),S=require("../style-At6aDoqG.cjs"),m=require("../url-BiHPIsKq.cjs");function T(t,e,...n){return[...t.slice(0,e),...n,...t.slice(e)]}function w(t,e){const n=t.length;e=e%n;const s=new Array(n);for(let r=0;r<n;r++){const c=(r+e)%n;s[c]=t[r]}return s}function q(t,e=2){if(!+t)return"0 Bytes";const n=1024,s=e<0?0:e,r=["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],c=Math.floor(Math.log(t)/Math.log(n));return`${parseFloat((t/Math.pow(n,c)).toFixed(s))} ${r[c]}`}function v(t,e){return t.x<e.x+e.width&&t.x>e.x&&t.y<e.y+e.height&&t.y>e.y}function x(t,e){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)<e.radius}function y(t,e){const n=t.style.getPropertyValue(e);if(n){const s=n.toString();return s.startsWith("var")?y(t,s.slice(4,-1)):s}}function Q(...t){const e={};return Array.from(document.styleSheets).forEach(n=>{Array.from(n.cssRules).forEach(s=>{s instanceof CSSStyleRule&&s.selectorText===":root"&&t.forEach(r=>{const c=y(s,r);c&&(e[r]=c)})})}),t.forEach(n=>{e[n]||console.warn(`variable named ${n} not found`)}),e}function B(t){const e=window.atob(t);return decodeURIComponent(window.escape(e))}function D(t){const e=window.unescape(encodeURIComponent(t));return window.btoa(e)}function A(t){return new Promise(e=>{setTimeout(()=>{e()},t)})}exports.parseAttribute=h.parseAttribute;exports.parseAttributeValue=h.parseAttributeValue;exports.isBrowser=E.isBrowser;exports.contain=p.contain;exports.cover=p.cover;exports.fixPosition=p.fixPosition;exports.measureText=p.measureText;exports.getPointerPosition=f.getPointerPosition;exports.normalize=f.normalize;exports.screenToCartesian=f.screenToCartesian;exports.findParentElement=d.findParentElement;exports.findScrollParentElement=d.findScrollParentElement;exports.getAllParentElements=d.getAllParentElements;exports.getElement=d.getElement;exports.easeInCubic=a.easeInCubic;exports.easeInExpo=a.easeInExpo;exports.easeInOutCubic=a.easeInOutCubic;exports.easeInOutExpo=a.easeInOutExpo;exports.easeInOutQuad=a.easeInOutQuad;exports.easeInOutQuart=a.easeInOutQuart;exports.easeInOutQuint=a.easeInOutQuint;exports.easeInQuad=a.easeInQuad;exports.easeInQuart=a.easeInQuart;exports.easeInQuint=a.easeInQuint;exports.easeOutCubic=a.easeOutCubic;exports.easeOutExpo=a.easeOutExpo;exports.easeOutQuad=a.easeOutQuad;exports.easeOutQuart=a.easeOutQuart;exports.easeOutQuint=a.easeOutQuint;exports.linear=a.linear;exports.dispatchEvent=P.dispatchEvent;exports.createJSONAndSave=b.createJSONAndSave;exports.downloadURI=b.downloadURI;exports.debounce=C.debounce;exports.throttle=C.throttle;exports.setupDrag=I.setupDrag;exports.createStylesheet=O.createStylesheet;exports.styleToString=O.styleToString;exports.getCumulativeOffsetLeft=g.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=g.getCumulativeOffsetTop;exports.getCumulativePosition=g.getCumulativePosition;exports.calculateDistance=o.calculateDistance;exports.calculateDistanceWithRadius=o.calculateDistanceWithRadius;exports.clamp=o.clamp;exports.damp=o.damp;exports.lerp=o.lerp;exports.mapRange=o.mapRange;exports.round=o.round;exports.smootherstep=o.smootherstep;exports.smoothstep=o.smoothstep;exports.step=o.step;exports.loopNumber=l.loopNumber;exports.nullishCoalescing=l.nullishCoalescing;exports.preciseNumber=l.preciseNumber;exports.roundNumberTo=l.roundNumberTo;exports.toStep=l.toStep;exports.cloneDeep=i.cloneDeep;exports.compareObjects=i.compareObjects;exports.isESClass=i.isESClass;exports.isNullish=i.isNullish;exports.isObject=i.isObject;exports.mergeDeep=i.mergeDeep;exports.mixin=i.mixin;exports.omit=i.omit;exports.pick=i.pick;exports.camelToKebab=u.camelToKebab;exports.capitalize=u.capitalize;exports.generateId=u.generateId;exports.isUppercase=u.isUppercase;exports.kebabToCamel=u.kebabToCamel;exports.snakeToDotted=u.snakeToDotted;exports.toPascalCase=u.toPascalCase;exports.uncapitalize=u.uncapitalize;exports.getElementTransitionDurationMS=S.getElementTransitionDurationMS;exports.getElementTransitionDurationS=S.getElementTransitionDurationS;exports.changeHistory=m.changeHistory;exports.normalizeBase=m.normalizeBase;exports.parseSearchParameters=m.parseSearchParameters;exports.splitPath=m.splitPath;exports.updateSearchParameter=m.updateSearchParameter;exports.decode=D;exports.dotCircleCollision=x;exports.dotRectCollision=v;exports.encode=B;exports.formatBytes=q;exports.getRootVariables=Q;exports.insert=T;exports.shiftArray=w;exports.wait=A;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../attributes-Bf2svn4j.cjs"),I=require("../browser-CpzFX2xg.cjs"),f=require("../canvas-CU5Xjahf.cjs"),h=require("../coordinates-D8Np3cPD.cjs"),u=require("../dom-JBOkFLTh.cjs"),s=require("../easings-GegIwET5.cjs"),v=require("../events-KVanG9sR.cjs"),y=require("../file-DSpfWdd9.cjs"),C=require("../function-MthRj-GJ.cjs"),w=require("../gestures-DHLrn6Q8.cjs"),T=require("../jss-GJLvaNfT.cjs"),d=require("../layout-Ctc2p3uz.cjs"),i=require("../math-GDWEqu7y.cjs"),p=require("../polyfills-BANSrI_m.cjs"),c=require("../object-CCiXnER2.cjs"),l=require("../string-DhgS_iFl.cjs"),O=require("../style-At6aDoqG.cjs"),m=require("../url-BiHPIsKq.cjs");function q(t,e,...o){return[...t.slice(0,e),...o,...t.slice(e)]}function Q(t,e){const o=t.length;e=e%o;const n=new Array(o);for(let a=0;a<o;a++){const r=(a+e)%o;n[r]=t[a]}return n}function B(t,e=2){if(!+t)return"0 Bytes";const o=1024,n=e<0?0:e,a=["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],r=Math.floor(Math.log(t)/Math.log(o));return`${parseFloat((t/Math.pow(o,r)).toFixed(n))} ${a[r]}`}function D(t){if(navigator.clipboard)navigator.clipboard.writeText(t).then(()=>{console.log("Text copied to clipboard successfully!")}).catch(e=>{console.error("Failed to copy text to clipboard:",e)});else{const e=document.createElement("textarea");e.value=t,e.style.position="fixed",e.style.top="0",e.style.left="0",document.body.appendChild(e),e.select();try{document.execCommand("copy")?console.log("Text copied to clipboard successfully!"):console.error("Failed to copy text to clipboard.")}catch(o){console.error("Failed to copy text to clipboard:",o)}document.body.removeChild(e)}}function A(t,e){return t.x<e.x+e.width&&t.x>e.x&&t.y<e.y+e.height&&t.y>e.y}function R(t,e){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)<e.radius}function S(t,e){const o=t.style.getPropertyValue(e);if(o){const n=o.toString();return n.startsWith("var")?S(t,n.slice(4,-1)):n}}function N(...t){const e={};return Array.from(document.styleSheets).forEach(o=>{Array.from(o.cssRules).forEach(n=>{n instanceof CSSStyleRule&&n.selectorText===":root"&&t.forEach(a=>{const r=S(n,a);r&&(e[a]=r)})})}),t.forEach(o=>{e[o]||console.warn(`variable named ${o} not found`)}),e}function z(t){const e=window.atob(t);return decodeURIComponent(window.escape(e))}function M(t){const e=window.unescape(encodeURIComponent(t));return window.btoa(e)}function V(t){return new Promise(e=>{setTimeout(()=>{e()},t)})}function j(t,{behaviour:e="instant",offset:o=0,center:n=!1}={}){var r;const a=u.getElement(t);if(a){const g=u.findScrollParentElement(a),E=d.getCumulativeOffsetTop(a),x=(typeof o=="number"?o:((r=u.getElement(o))==null?void 0:r.offsetHeight)||0)*-1,P=n?innerHeight/2*-1+a.offsetHeight/2:0;g==null||g.scroll({top:E+x+P,behavior:e})}}function U(t,e){if(t){const n=t.content.cloneNode(!0).firstElementChild;return n&&(e==null||e(n)),n}return null}exports.parseAttribute=b.parseAttribute;exports.parseAttributeValue=b.parseAttributeValue;exports.isBrowser=I.isBrowser;exports.contain=f.contain;exports.cover=f.cover;exports.fixPosition=f.fixPosition;exports.measureText=f.measureText;exports.getPointerPosition=h.getPointerPosition;exports.normalize=h.normalize;exports.screenToCartesian=h.screenToCartesian;exports.findParentElement=u.findParentElement;exports.findScrollParentElement=u.findScrollParentElement;exports.getAllParentElements=u.getAllParentElements;exports.getElement=u.getElement;exports.easeInCubic=s.easeInCubic;exports.easeInExpo=s.easeInExpo;exports.easeInOutCubic=s.easeInOutCubic;exports.easeInOutExpo=s.easeInOutExpo;exports.easeInOutQuad=s.easeInOutQuad;exports.easeInOutQuart=s.easeInOutQuart;exports.easeInOutQuint=s.easeInOutQuint;exports.easeInQuad=s.easeInQuad;exports.easeInQuart=s.easeInQuart;exports.easeInQuint=s.easeInQuint;exports.easeOutCubic=s.easeOutCubic;exports.easeOutExpo=s.easeOutExpo;exports.easeOutQuad=s.easeOutQuad;exports.easeOutQuart=s.easeOutQuart;exports.easeOutQuint=s.easeOutQuint;exports.linear=s.linear;exports.dispatchEvent=v.dispatchEvent;exports.createJSONAndSave=y.createJSONAndSave;exports.downloadURI=y.downloadURI;exports.debounce=C.debounce;exports.throttle=C.throttle;exports.setupDrag=w.setupDrag;exports.createStylesheet=T.createStylesheet;exports.styleToString=T.styleToString;exports.getCumulativeOffsetLeft=d.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=d.getCumulativeOffsetTop;exports.getCumulativePosition=d.getCumulativePosition;exports.getStickyOffset=d.getStickyOffset;exports.calculateDistance=i.calculateDistance;exports.calculateDistanceWithRadius=i.calculateDistanceWithRadius;exports.clamp=i.clamp;exports.damp=i.damp;exports.lerp=i.lerp;exports.mapRange=i.mapRange;exports.round=i.round;exports.smootherstep=i.smootherstep;exports.smoothstep=i.smoothstep;exports.step=i.step;exports.loopNumber=p.loopNumber;exports.nullishCoalescing=p.nullishCoalescing;exports.preciseNumber=p.preciseNumber;exports.roundNumberTo=p.roundNumberTo;exports.toStep=p.toStep;exports.cloneDeep=c.cloneDeep;exports.compareObjects=c.compareObjects;exports.isESClass=c.isESClass;exports.isNullish=c.isNullish;exports.isObject=c.isObject;exports.mergeDeep=c.mergeDeep;exports.mixin=c.mixin;exports.omit=c.omit;exports.pick=c.pick;exports.camelToKebab=l.camelToKebab;exports.capitalize=l.capitalize;exports.generateId=l.generateId;exports.isUppercase=l.isUppercase;exports.kebabToCamel=l.kebabToCamel;exports.snakeToDotted=l.snakeToDotted;exports.toPascalCase=l.toPascalCase;exports.uncapitalize=l.uncapitalize;exports.getElementTransitionDurationMS=O.getElementTransitionDurationMS;exports.getElementTransitionDurationS=O.getElementTransitionDurationS;exports.changeHistory=m.changeHistory;exports.normalizeBase=m.normalizeBase;exports.parseSearchParameters=m.parseSearchParameters;exports.splitPath=m.splitPath;exports.updateSearchParameter=m.updateSearchParameter;exports.cloneTemplateContent=U;exports.copyTextToClipboard=D;exports.decode=M;exports.dotCircleCollision=R;exports.dotRectCollision=A;exports.encode=z;exports.formatBytes=B;exports.getRootVariables=N;exports.insert=q;exports.scrollToElement=j;exports.shiftArray=Q;exports.wait=V;
@@ -3,6 +3,7 @@ export * from './attributes';
3
3
  export * from './browser';
4
4
  export * from './bytes';
5
5
  export * from './canvas';
6
+ export * from './clipboard';
6
7
  export * from './collisions';
7
8
  export * from './coordinates';
8
9
  export * from './cssom';
@@ -20,9 +21,10 @@ export * from './number';
20
21
  export * from './object';
21
22
  export * from './polyfills';
22
23
  export * from './promises';
24
+ export * from './scroll';
23
25
  export * from './string';
24
26
  export * from './style';
25
- export * from './ts-react-utility';
27
+ export * from './template';
26
28
  export * from './ts-shape';
27
29
  export * from './ts-utility';
28
30
  export * from './url';