aptechka 0.5.25 → 0.5.27

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 (109) hide show
  1. package/lib/Damped-DxwUBxOC.cjs +1 -0
  2. package/lib/{Damped-BJgyFENo.js → Damped-QZAoXO5Z.js} +31 -32
  3. package/lib/{Derived-BZtlW0bB.cjs → Derived-B-g8dYgh.cjs} +1 -1
  4. package/lib/{Derived-DH-ouLBq.js → Derived-kPJs5JC5.js} +1 -1
  5. package/lib/{SourceManager-DmXmmA6z.js → SourceManager-Q-PB-Rkh.js} +3 -4
  6. package/lib/SourceManager-vSlsMKUE.cjs +1 -0
  7. package/lib/{Store-Cd-E5W1z.js → Store-BQXXikps.js} +7 -8
  8. package/lib/Store-C-1ruEIm.cjs +1 -0
  9. package/lib/{Viewport-CCDNxaDg.js → Viewport-CFFhFKqX.js} +5 -6
  10. package/lib/Viewport-DMB0dO-s.cjs +1 -0
  11. package/lib/accordion/index.cjs +1 -1
  12. package/lib/accordion/index.js +8 -9
  13. package/lib/animation/index.cjs +1 -1
  14. package/lib/animation/index.js +13 -14
  15. package/lib/attribute/index.cjs +1 -1
  16. package/lib/attribute/index.js +15 -16
  17. package/lib/canvas/index.cjs +1 -1
  18. package/lib/canvas/index.js +3 -4
  19. package/lib/checkbox/index.cjs +1 -1
  20. package/lib/checkbox/index.js +3 -4
  21. package/lib/class-linked-status/index.cjs +1 -1
  22. package/lib/class-linked-status/index.js +28 -29
  23. package/lib/controls/index.cjs +1 -1
  24. package/lib/controls/index.js +52 -53
  25. package/lib/{createStylesheet-C8aQQ4hd.cjs → createStylesheet-CqHU9_qv.cjs} +1 -1
  26. package/lib/{createStylesheet-KMRQhSa-.js → createStylesheet-DBCEbDjI.js} +1 -1
  27. package/lib/createTheme-CHnsCgAr.js +15 -0
  28. package/lib/createTheme-Cfaw9UmV.cjs +1 -0
  29. package/lib/css-property/index.cjs +1 -1
  30. package/lib/css-property/index.js +9 -10
  31. package/lib/custom-element/index.cjs +1 -1
  32. package/lib/custom-element/index.js +15 -16
  33. package/lib/dev/index.cjs +1 -1
  34. package/lib/dev/index.js +6 -7
  35. package/lib/device/index.cjs +1 -1
  36. package/lib/device/index.js +1 -1
  37. package/lib/element-constructor/index.cjs +1 -1
  38. package/lib/element-constructor/index.js +3 -3
  39. package/lib/element-resizer/index.cjs +1 -1
  40. package/lib/element-resizer/index.js +22 -23
  41. package/lib/en3/index.cjs +1 -1
  42. package/lib/en3/index.js +20 -21
  43. package/lib/image/index.cjs +1 -1
  44. package/lib/image/index.js +7 -8
  45. package/lib/index-BAHHdcp3.js +301 -0
  46. package/lib/index-D2XtQX56.cjs +9 -0
  47. package/lib/intersector/index.cjs +1 -1
  48. package/lib/intersector/index.js +6 -7
  49. package/lib/ladder/index.cjs +1 -1
  50. package/lib/ladder/index.js +3 -4
  51. package/lib/layout-box/index.cjs +1 -1
  52. package/lib/layout-box/index.js +2 -3
  53. package/lib/loading/index.cjs +1 -1
  54. package/lib/loading/index.js +15 -16
  55. package/lib/media/index.cjs +1 -1
  56. package/lib/media/index.js +5 -6
  57. package/lib/modal/index.cjs +1 -1
  58. package/lib/modal/index.js +3 -4
  59. package/lib/morph/index.cjs +1 -1
  60. package/lib/morph/index.js +2 -3
  61. package/lib/pointer/index.cjs +1 -1
  62. package/lib/pointer/index.js +2 -3
  63. package/lib/popover/index.cjs +1 -1
  64. package/lib/popover/index.js +46 -54
  65. package/lib/resized/index.cjs +1 -1
  66. package/lib/resized/index.js +7 -8
  67. package/lib/router/index.cjs +1 -1
  68. package/lib/router/index.js +7 -8
  69. package/lib/scroll/index.cjs +1 -1
  70. package/lib/scroll/index.js +6 -7
  71. package/lib/select/index.cjs +1 -1
  72. package/lib/select/index.js +1 -1
  73. package/lib/sequence/index.cjs +1 -1
  74. package/lib/sequence/index.js +1 -2
  75. package/lib/slicer/index.cjs +2 -2
  76. package/lib/slicer/index.js +3 -4
  77. package/lib/source/index.cjs +1 -1
  78. package/lib/source/index.js +29 -30
  79. package/lib/store/index.cjs +1 -1
  80. package/lib/store/index.js +12 -13
  81. package/lib/svg-path-data/index.cjs +3 -0
  82. package/lib/{utils/svg.d.ts → svg-path-data/index.d.ts} +1 -1
  83. package/lib/{path-data-polyfill-DgeDWYeI.js → svg-path-data/index.js} +201 -162
  84. package/lib/{tags-BoPv9fDr.js → tags-CMPg9ETZ.js} +233 -234
  85. package/lib/tags-Djb6mb1o.cjs +1 -0
  86. package/lib/theme/index.cjs +1 -1
  87. package/lib/theme/index.js +3 -4
  88. package/lib/ticker/index.cjs +1 -1
  89. package/lib/ticker/index.js +12 -13
  90. package/lib/tweaker/index.cjs +1 -1
  91. package/lib/tweaker/index.js +5 -6
  92. package/lib/utils/index.cjs +1 -1
  93. package/lib/utils/index.d.ts +0 -1
  94. package/lib/utils/index.js +125 -163
  95. package/lib/video/index.cjs +1 -1
  96. package/lib/video/index.js +4 -5
  97. package/lib/window-resizer/index.cjs +1 -1
  98. package/lib/window-resizer/index.js +6 -7
  99. package/package.json +9 -1
  100. package/lib/Damped-CbWlWAbx.cjs +0 -1
  101. package/lib/SourceManager-BFSCX4Q8.cjs +0 -1
  102. package/lib/Store-BQGNOHlY.cjs +0 -1
  103. package/lib/Viewport-DhKPH5nw.cjs +0 -1
  104. package/lib/createTheme-BSreUYge.cjs +0 -1
  105. package/lib/createTheme-u3NsrEV6.js +0 -16
  106. package/lib/index-CSo_PnUP.js +0 -314
  107. package/lib/index-pPxbZLWQ.cjs +0 -9
  108. package/lib/path-data-polyfill-CXsOR7Oc.cjs +0 -3
  109. package/lib/tags-CueX-JLX.cjs +0 -1
@@ -1,4 +1,4 @@
1
- "use strict";var L=(n,t,e)=>{if(!t.has(n))throw TypeError("Cannot "+e)};var i=(n,t,e)=>(L(n,t,"read from private field"),e?e.call(n):t.get(n)),p=(n,t,e)=>{if(t.has(n))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(n):t.set(n,e)},d=(n,t,e,s)=>(L(n,t,"write to private field"),s?s.call(n,e):t.set(n,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("../custom-element/index.cjs"),$=require("../string-DhgS_iFl.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");var w,h,f;class T{constructor(t){p(this,w,void 0);p(this,h,void 0);p(this,f,void 0);d(this,w,t.index),d(this,h,document.createElement("span")),d(this,f,[]),t.letters&&t.letterConstructor&&t.lettersAcc!==void 0?(d(this,f,t.text.split("").map((e,s)=>new t.letterConstructor({index:t.lettersAcc+s,text:e,clone:t.clone}))),i(this,h).append(...i(this,f).map(e=>e.element))):t.clone?i(this,h).innerHTML=`
1
+ "use strict";var L=(n,t,e)=>{if(!t.has(n))throw TypeError("Cannot "+e)};var i=(n,t,e)=>(L(n,t,"read from private field"),e?e.call(n):t.get(n)),p=(n,t,e)=>{if(t.has(n))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(n):t.set(n,e)},d=(n,t,e,s)=>(L(n,t,"write to private field"),s?s.call(n,e):t.set(n,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("../custom-element/index.cjs"),$=require("../string-DhgS_iFl.cjs");var w,h,f;class T{constructor(t){p(this,w,void 0);p(this,h,void 0);p(this,f,void 0);d(this,w,t.index),d(this,h,document.createElement("span")),d(this,f,[]),t.letters&&t.letterConstructor&&t.lettersAcc!==void 0?(d(this,f,t.text.split("").map((e,s)=>new t.letterConstructor({index:t.lettersAcc+s,text:e,clone:t.clone}))),i(this,h).append(...i(this,f).map(e=>e.element))):t.clone?i(this,h).innerHTML=`
2
2
  <span class="original">${t.text}</span>
3
3
  <span class="clone" aria-hidden>${t.text}</span>
4
4
  `:i(this,h).innerHTML=`
@@ -8,4 +8,4 @@
8
8
  <span class="clone" aria-hidden>${t.text}</span>
9
9
  `:i(this,a).innerHTML=`
10
10
  <span class="value">${t.text}</span>
11
- `}get index(){return i(this,C)}get element(){return i(this,a)}}C=new WeakMap,a=new WeakMap;var D=Object.defineProperty,O=Object.getOwnPropertyDescriptor,W=(n,t,e,s)=>{for(var r=s>1?void 0:s?O(t,e):t,l=n.length-1,u;l>=0;l--)(u=n[l])&&(r=(s?u(t,e,r):u(r))||r);return s&&r&&D(t,e,r),r},A=(n,t,e)=>{if(!t.has(n))throw TypeError("Cannot "+e)},o=(n,t,e)=>(A(n,t,"read from private field"),e?e.call(n):t.get(n)),_=(n,t,e)=>{if(t.has(n))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(n):t.set(n,e)},y=(n,t,e,s)=>(A(n,t,"write to private field"),s?s.call(n,e):t.set(n,e),e),g,c,x,E,M;exports.SlicerElement=class extends P.CustomElement{constructor(t){super(),_(this,g,""),_(this,c,[]),_(this,x,[]),_(this,E,void 0),_(this,M,void 0),y(this,E,(t==null?void 0:t.wordConstructor)||T),y(this,M,(t==null?void 0:t.letterConstructor)||S)}get wordsArray(){return o(this,c)}get lettersArray(){return o(this,x)}get originalText(){return o(this,g)}connectedCallback(){var e;y(this,g,((e=this.textContent)==null?void 0:e.trim())||""),this.innerHTML="";let t=0;y(this,c,o(this,g).replace(/ +/g," ").split(" ").map((s,r)=>{const l=new(o(this,E))({index:r,text:s,letters:this.hasAttribute("letters"),lettersAcc:t,letterConstructor:o(this,M),clone:this.hasAttribute("clone")});return t+=l.letters.length,o(this,x).push(...l.letters),l})),this.hasAttribute("index")&&(o(this,c).forEach(s=>{s.element.style.setProperty("--word-index",s.index.toString())}),o(this,x).forEach(s=>{s.element.style.setProperty("--letter-index",s.index.toString())})),o(this,c).forEach((s,r)=>{if(this.appendChild(s.element),r!==o(this,c).length-1){const l=document.createElement("span");l.innerHTML="&nbsp;",this.appendChild(l)}}),this.style.setProperty("--words-length",o(this,c).length.toString()),this.style.setProperty("--letters-length",o(this,x).length.toString())}disconnectedCallback(){y(this,c,[]),this.textContent=o(this,g),this.style.removeProperty("--words-length"),this.style.removeProperty("--letters-length")}};g=new WeakMap;c=new WeakMap;x=new WeakMap;E=new WeakMap;M=new WeakMap;exports.SlicerElement=W([P.define("e-slicer")],exports.SlicerElement);var m=Object.defineProperty,H=Object.getOwnPropertyDescriptor,q=(n,t,e,s)=>{for(var r=s>1?void 0:s?H(t,e):t,l=n.length-1,u;l>=0;l--)(u=n[l])&&(r=(s?u(t,e,r):u(r))||r);return s&&r&&m(t,e,r),r},v;class b extends S{constructor(e){super(e);p(this,v,void 0);d(this,v,$.generateId(2+Math.floor(Math.random()*15),"abcdefghijklmnopqrstuvwxyz0123456789#!%$^&*+=?")+e.text),this.play(0)}play(e){const s=Math.floor(e*(i(this,v).length-1));this.element.textContent=i(this,v)[s]}}v=new WeakMap;exports.DecoderElement=class extends exports.SlicerElement{constructor(){super({letterConstructor:b})}play(t){this.lettersArray.forEach(e=>{e.play(t)})}};exports.DecoderElement=q([P.define("e-decoder")],exports.DecoderElement);exports.Letter=S;exports.Word=T;
11
+ `}get index(){return i(this,C)}get element(){return i(this,a)}}C=new WeakMap,a=new WeakMap;var D=Object.defineProperty,O=Object.getOwnPropertyDescriptor,W=(n,t,e,s)=>{for(var r=s>1?void 0:s?O(t,e):t,l=n.length-1,u;l>=0;l--)(u=n[l])&&(r=(s?u(t,e,r):u(r))||r);return s&&r&&D(t,e,r),r},A=(n,t,e)=>{if(!t.has(n))throw TypeError("Cannot "+e)},o=(n,t,e)=>(A(n,t,"read from private field"),e?e.call(n):t.get(n)),_=(n,t,e)=>{if(t.has(n))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(n):t.set(n,e)},y=(n,t,e,s)=>(A(n,t,"write to private field"),s?s.call(n,e):t.set(n,e),e),g,c,x,E,M;exports.SlicerElement=class extends P.CustomElement{constructor(t){super(),_(this,g,""),_(this,c,[]),_(this,x,[]),_(this,E,void 0),_(this,M,void 0),y(this,E,(t==null?void 0:t.wordConstructor)||T),y(this,M,(t==null?void 0:t.letterConstructor)||S)}get wordsArray(){return o(this,c)}get lettersArray(){return o(this,x)}get originalText(){return o(this,g)}connectedCallback(){var e;y(this,g,((e=this.textContent)==null?void 0:e.trim())||""),this.innerHTML="";let t=0;y(this,c,o(this,g).replace(/ +/g," ").split(" ").map((s,r)=>{const l=new(o(this,E))({index:r,text:s,letters:this.hasAttribute("letters"),lettersAcc:t,letterConstructor:o(this,M),clone:this.hasAttribute("clone")});return t+=l.letters.length,o(this,x).push(...l.letters),l})),this.hasAttribute("index")&&(o(this,c).forEach(s=>{s.element.style.setProperty("--word-index",s.index.toString())}),o(this,x).forEach(s=>{s.element.style.setProperty("--letter-index",s.index.toString())})),o(this,c).forEach((s,r)=>{if(this.appendChild(s.element),r!==o(this,c).length-1){const l=document.createElement("span");l.innerHTML="&nbsp;",this.appendChild(l)}}),this.style.setProperty("--words-length",o(this,c).length.toString()),this.style.setProperty("--letters-length",o(this,x).length.toString())}disconnectedCallback(){y(this,c,[]),this.textContent=o(this,g),this.style.removeProperty("--words-length"),this.style.removeProperty("--letters-length")}};g=new WeakMap;c=new WeakMap;x=new WeakMap;E=new WeakMap;M=new WeakMap;exports.SlicerElement=W([P.define("e-slicer")],exports.SlicerElement);var m=Object.defineProperty,H=Object.getOwnPropertyDescriptor,b=(n,t,e,s)=>{for(var r=s>1?void 0:s?H(t,e):t,l=n.length-1,u;l>=0;l--)(u=n[l])&&(r=(s?u(t,e,r):u(r))||r);return s&&r&&m(t,e,r),r},v;class q extends S{constructor(e){super(e);p(this,v,void 0);d(this,v,$.generateId(2+Math.floor(Math.random()*15),"abcdefghijklmnopqrstuvwxyz0123456789#!%$^&*+=?")+e.text),this.play(0)}play(e){const s=Math.floor(e*(i(this,v).length-1));this.element.textContent=i(this,v)[s]}}v=new WeakMap;exports.DecoderElement=class extends exports.SlicerElement{constructor(){super({letterConstructor:q})}play(t){this.lettersArray.forEach(e=>{e.play(t)})}};exports.DecoderElement=b([P.define("e-decoder")],exports.DecoderElement);exports.Letter=S;exports.Word=T;
@@ -9,7 +9,6 @@ var i = (e, t, s) => (A(e, t, "read from private field"), s ? s.call(e) : t.get(
9
9
  }, c = (e, t, s, n) => (A(e, t, "write to private field"), n ? n.call(e, s) : t.set(e, s), s);
10
10
  import { CustomElement as S, define as T } from "../custom-element/index.js";
11
11
  import { g as W } from "../string-f0Dnk0L1.js";
12
- import "../path-data-polyfill-DgeDWYeI.js";
13
12
  var y, h, f;
14
13
  class D {
15
14
  constructor(t) {
@@ -58,8 +57,8 @@ class $ {
58
57
  }
59
58
  }
60
59
  C = new WeakMap(), a = new WeakMap();
61
- var H = Object.defineProperty, m = Object.getOwnPropertyDescriptor, b = (e, t, s, n) => {
62
- for (var r = n > 1 ? void 0 : n ? m(t, s) : t, d = e.length - 1, p; d >= 0; d--)
60
+ var H = Object.defineProperty, b = Object.getOwnPropertyDescriptor, m = (e, t, s, n) => {
61
+ for (var r = n > 1 ? void 0 : n ? b(t, s) : t, d = e.length - 1, p; d >= 0; d--)
63
62
  (p = e[d]) && (r = (n ? p(t, s, r) : p(r)) || r);
64
63
  return n && r && H(t, s, r), r;
65
64
  }, O = (e, t, s) => {
@@ -120,7 +119,7 @@ o = /* @__PURE__ */ new WeakMap();
120
119
  g = /* @__PURE__ */ new WeakMap();
121
120
  M = /* @__PURE__ */ new WeakMap();
122
121
  P = /* @__PURE__ */ new WeakMap();
123
- E = b([
122
+ E = m([
124
123
  T("e-slicer")
125
124
  ], E);
126
125
  var q = Object.defineProperty, z = Object.getOwnPropertyDescriptor, G = (e, t, s, n) => {
@@ -1,4 +1,4 @@
1
- "use strict";var L=(i,r,t)=>{if(!r.has(i))throw TypeError("Cannot "+t)};var e=(i,r,t)=>(L(i,r,"read from private field"),t?t.call(i):r.get(i)),a=(i,r,t)=>{if(r.has(i))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(i):r.set(i,t)},u=(i,r,t,n)=>(L(i,r,"write to private field"),n?n.call(i,t):r.set(i,t),t);var y=(i,r,t)=>(L(i,r,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../SourceManager-BFSCX4Q8.cjs"),k=require("../custom-element/index.cjs"),C=require("../loading/index.cjs"),q=require("../class-linked-status/index.cjs"),x=require("../browser-CpzFX2xg.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");let M=0;var h,s,c,f,l,d,o,m,S,w,b,p,E;class A extends k.CustomElement{constructor(){super();a(this,S);a(this,h,null);a(this,s,null);a(this,c,!1);a(this,f,!1);a(this,l,!1);a(this,d,"");a(this,o,new q.ClassLinkedStatus(this,{loading:!1,loaded:!1,error:!1}));a(this,m,null);a(this,b,t=>{const n=t[0];e(this,l)&&!e(this,f)&&n.isIntersecting&&(e(this,h).current&&e(this,h).current!==e(this,h).previous&&y(this,S,w).call(this,e(this,h).current),u(this,f,!0)),n.isIntersecting?this.dispatchEvent(new CustomEvent("sourceCapture")):this.dispatchEvent(new CustomEvent("sourceRelease"))});a(this,p,()=>{e(this,o).set("loaded",!0),e(this,o).set("error",!1),e(this,o).set("loading",!1),!e(this,l)&&!e(this,c)&&C.loading.setLoaded(e(this,d),1),u(this,c,!0)});a(this,E,t=>{e(this,o).set("loaded",!1),e(this,o).set("error",!0),e(this,o).set("loading",!1),!e(this,l)&&!e(this,c)&&C.loading.setError(e(this,d),t),u(this,c,!0)});x.isBrowser&&(u(this,d,`source-consumer-${++M}`),u(this,m,new IntersectionObserver(e(this,b))))}get consumerElement(){return e(this,s)}get status(){return e(this,o)}get isLazy(){return e(this,l)}connectedCallback(){const t=this.getAttribute("srcset");t&&(u(this,s,this.createConsumer()),e(this,s).style.cssText=`
1
+ "use strict";var L=(i,r,t)=>{if(!r.has(i))throw TypeError("Cannot "+t)};var e=(i,r,t)=>(L(i,r,"read from private field"),t?t.call(i):r.get(i)),a=(i,r,t)=>{if(r.has(i))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(i):r.set(i,t)},u=(i,r,t,n)=>(L(i,r,"write to private field"),n?n.call(i,t):r.set(i,t),t);var y=(i,r,t)=>(L(i,r,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../SourceManager-vSlsMKUE.cjs"),k=require("../custom-element/index.cjs"),C=require("../loading/index.cjs"),x=require("../class-linked-status/index.cjs"),M=require("../browser-CpzFX2xg.cjs");let q=0;var h,s,c,f,l,d,o,m,S,w,b,p,E;class A extends k.CustomElement{constructor(){super();a(this,S);a(this,h,null);a(this,s,null);a(this,c,!1);a(this,f,!1);a(this,l,!1);a(this,d,"");a(this,o,new x.ClassLinkedStatus(this,{loading:!1,loaded:!1,error:!1}));a(this,m,null);a(this,b,t=>{const n=t[0];e(this,l)&&!e(this,f)&&n.isIntersecting&&(e(this,h).current&&e(this,h).current!==e(this,h).previous&&y(this,S,w).call(this,e(this,h).current),u(this,f,!0)),n.isIntersecting?this.dispatchEvent(new CustomEvent("sourceCapture")):this.dispatchEvent(new CustomEvent("sourceRelease"))});a(this,p,()=>{e(this,o).set("loaded",!0),e(this,o).set("error",!1),e(this,o).set("loading",!1),!e(this,l)&&!e(this,c)&&C.loading.setLoaded(e(this,d),1),u(this,c,!0)});a(this,E,t=>{e(this,o).set("loaded",!1),e(this,o).set("error",!0),e(this,o).set("loading",!1),!e(this,l)&&!e(this,c)&&C.loading.setError(e(this,d),t),u(this,c,!0)});M.isBrowser&&(u(this,d,`source-consumer-${++q}`),u(this,m,new IntersectionObserver(e(this,b))))}get consumerElement(){return e(this,s)}get status(){return e(this,o)}get isLazy(){return e(this,l)}connectedCallback(){const t=this.getAttribute("srcset");t&&(u(this,s,this.createConsumer()),e(this,s).style.cssText=`
2
2
  display: block;
3
3
  width: 100%;
4
4
  height: 100%;
@@ -6,44 +6,43 @@ var t = (i, r, s) => (E(i, r, "read from private field"), s ? s.call(i) : r.get(
6
6
  if (r.has(i))
7
7
  throw TypeError("Cannot add the same private member more than once");
8
8
  r instanceof WeakSet ? r.add(i) : r.set(i, s);
9
- }, u = (i, r, s, o) => (E(i, r, "write to private field"), o ? o.call(i, s) : r.set(i, s), s);
9
+ }, u = (i, r, s, n) => (E(i, r, "write to private field"), n ? n.call(i, s) : r.set(i, s), s);
10
10
  var C = (i, r, s) => (E(i, r, "access private method"), s);
11
- import { S as y } from "../SourceManager-DmXmmA6z.js";
12
- import { a as V, b as $ } from "../SourceManager-DmXmmA6z.js";
11
+ import { S as y } from "../SourceManager-Q-PB-Rkh.js";
12
+ import { a as R, b as V } from "../SourceManager-Q-PB-Rkh.js";
13
13
  import { CustomElement as k } from "../custom-element/index.js";
14
14
  import { loading as L } from "../loading/index.js";
15
15
  import { ClassLinkedStatus as x } from "../class-linked-status/index.js";
16
16
  import { i as A } from "../browser-0zX67oeU.js";
17
- import "../path-data-polyfill-DgeDWYeI.js";
18
17
  let z = 0;
19
- var a, e, c, m, l, d, n, f, g, w, S, b, v;
20
- class K extends k {
18
+ var a, e, c, f, l, d, o, m, g, w, S, b, v;
19
+ class F extends k {
21
20
  constructor() {
22
21
  super();
23
22
  h(this, g);
24
23
  h(this, a, null);
25
24
  h(this, e, null);
26
25
  h(this, c, !1);
27
- h(this, m, !1);
26
+ h(this, f, !1);
28
27
  h(this, l, !1);
29
28
  h(this, d, "");
30
- h(this, n, new x(this, {
29
+ h(this, o, new x(this, {
31
30
  loading: !1,
32
31
  loaded: !1,
33
32
  error: !1
34
33
  }));
35
- h(this, f, null);
34
+ h(this, m, null);
36
35
  h(this, S, (s) => {
37
- const o = s[0];
38
- t(this, l) && !t(this, m) && o.isIntersecting && (t(this, a).current && t(this, a).current !== t(this, a).previous && C(this, g, w).call(this, t(this, a).current), u(this, m, !0)), o.isIntersecting ? this.dispatchEvent(new CustomEvent("sourceCapture")) : this.dispatchEvent(new CustomEvent("sourceRelease"));
36
+ const n = s[0];
37
+ t(this, l) && !t(this, f) && n.isIntersecting && (t(this, a).current && t(this, a).current !== t(this, a).previous && C(this, g, w).call(this, t(this, a).current), u(this, f, !0)), n.isIntersecting ? this.dispatchEvent(new CustomEvent("sourceCapture")) : this.dispatchEvent(new CustomEvent("sourceRelease"));
39
38
  });
40
39
  h(this, b, () => {
41
- t(this, n).set("loaded", !0), t(this, n).set("error", !1), t(this, n).set("loading", !1), !t(this, l) && !t(this, c) && L.setLoaded(t(this, d), 1), u(this, c, !0);
40
+ t(this, o).set("loaded", !0), t(this, o).set("error", !1), t(this, o).set("loading", !1), !t(this, l) && !t(this, c) && L.setLoaded(t(this, d), 1), u(this, c, !0);
42
41
  });
43
42
  h(this, v, (s) => {
44
- t(this, n).set("loaded", !1), t(this, n).set("error", !0), t(this, n).set("loading", !1), !t(this, l) && !t(this, c) && L.setError(t(this, d), s), u(this, c, !0);
43
+ t(this, o).set("loaded", !1), t(this, o).set("error", !0), t(this, o).set("loading", !1), !t(this, l) && !t(this, c) && L.setError(t(this, d), s), u(this, c, !0);
45
44
  });
46
- A && (u(this, d, `source-consumer-${++z}`), u(this, f, new IntersectionObserver(
45
+ A && (u(this, d, `source-consumer-${++z}`), u(this, m, new IntersectionObserver(
47
46
  t(this, S)
48
47
  )));
49
48
  }
@@ -51,7 +50,7 @@ class K extends k {
51
50
  return t(this, e);
52
51
  }
53
52
  get status() {
54
- return t(this, n);
53
+ return t(this, o);
55
54
  }
56
55
  get isLazy() {
57
56
  return t(this, l);
@@ -62,26 +61,26 @@ class K extends k {
62
61
  display: block;
63
62
  width: 100%;
64
63
  height: 100%;
65
- `, t(this, e).classList.add("source-consumer"), Array.from(this.attributes).forEach((o) => {
66
- if (o.name !== "srcset") {
67
- const p = o.nodeValue || "";
68
- o.name in t(this, e) && (t(this, e)[o.name] = p || !0);
64
+ `, t(this, e).classList.add("source-consumer"), Array.from(this.attributes).forEach((n) => {
65
+ if (n.name !== "srcset") {
66
+ const p = n.nodeValue || "";
67
+ n.name in t(this, e) && (t(this, e)[n.name] = p || !0);
69
68
  }
70
69
  }), this.appendChild(t(this, e)), u(this, a, new y({
71
70
  srcset: s
72
- })), u(this, l, this.hasAttribute("lazy")), t(this, a).subscribe((o) => {
73
- (!t(this, l) || t(this, l) && t(this, m)) && C(this, g, w).call(this, o.current);
74
- }), t(this, f).observe(this), t(this, a).connect());
71
+ })), u(this, l, this.hasAttribute("lazy")), t(this, a).subscribe((n) => {
72
+ (!t(this, l) || t(this, l) && t(this, f)) && C(this, g, w).call(this, n.current);
73
+ }), t(this, m).observe(this), t(this, a).connect());
75
74
  }
76
75
  disconnectedCallback() {
77
- t(this, f).disconnect(), t(this, a).close(), t(this, e).onloadeddata = null, t(this, e).onload = null, t(this, e).onerror = null, t(this, e).remove(), t(this, n).reset();
76
+ t(this, m).disconnect(), t(this, a).close(), t(this, e).onloadeddata = null, t(this, e).onload = null, t(this, e).onerror = null, t(this, e).remove(), t(this, o).reset();
78
77
  }
79
78
  }
80
- a = new WeakMap(), e = new WeakMap(), c = new WeakMap(), m = new WeakMap(), l = new WeakMap(), d = new WeakMap(), n = new WeakMap(), f = new WeakMap(), g = new WeakSet(), w = function(s) {
79
+ a = new WeakMap(), e = new WeakMap(), c = new WeakMap(), f = new WeakMap(), l = new WeakMap(), d = new WeakMap(), o = new WeakMap(), m = new WeakMap(), g = new WeakSet(), w = function(s) {
81
80
  if (t(this, e).onloadeddata = null, t(this, e).onload = null, t(this, e).onerror = null, s) {
82
- const o = this.hasAttribute("keep-source-parameters");
83
- t(this, n).set("loaded", !1), t(this, n).set("error", !1), t(this, n).set("loading", !0);
84
- const p = o ? s.url : s.name + s.extension;
81
+ const n = this.hasAttribute("keep-source-parameters");
82
+ t(this, o).set("loaded", !1), t(this, o).set("error", !1), t(this, o).set("loading", !0);
83
+ const p = n ? s.url : s.name + s.extension;
85
84
  this.consumeSource(p), !t(this, l) && !t(this, c) && L.setTotal(t(this, d), 1), t(this, e).onloadeddata = () => {
86
85
  t(this, b).call(this);
87
86
  }, t(this, e).onload = () => {
@@ -93,8 +92,8 @@ a = new WeakMap(), e = new WeakMap(), c = new WeakMap(), m = new WeakMap(), l =
93
92
  this.consumeSource(null);
94
93
  }, S = new WeakMap(), b = new WeakMap(), v = new WeakMap();
95
94
  export {
96
- V as Source,
97
- K as SourceElement,
95
+ R as Source,
96
+ F as SourceElement,
98
97
  y as SourceManager,
99
- $ as SourceSet
98
+ V as SourceSet
100
99
  };
@@ -1 +1 @@
1
- "use strict";var A=(t,s,e)=>{if(!s.has(t))throw TypeError("Cannot "+e)};var r=(t,s,e)=>(A(t,s,"read from private field"),e?e.call(t):s.get(t)),o=(t,s,e)=>{if(s.has(t))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(t):s.set(t,e)},h=(t,s,e,c)=>(A(t,s,"write to private field"),c?c.call(t,e):s.set(t,e),e);var D=(t,s,e,c)=>({set _(i){h(t,s,i,e)},get _(){return r(t,s,c)}});var I=(t,s,e)=>new Promise((c,i)=>{var l=u=>{try{n(e.next(u))}catch(b){i(b)}},d=u=>{try{n(e.throw(u))}catch(b){i(b)}},n=u=>u.done?c(u.value):Promise.resolve(u.value).then(l,d);n((e=e.apply(t,s)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../Store-BQGNOHlY.cjs"),E=require("../Derived-BZtlW0bB.cjs"),M=require("../function-MthRj-GJ.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");var v,a;class P extends p.Store{constructor(e,c,i){super(null,i);o(this,v,void 0);o(this,a,new Map);h(this,v,e.subscribe(l=>{const d=[];l.current.forEach((n,u)=>{var b;if((b=l.previous)!=null&&b.includes(n)&&r(this,a).has(n))d.push(r(this,a).get(n));else{const C=c(n,u);r(this,a).set(n,C),d.push(C)}}),r(this,a).forEach((n,u)=>{l.current.includes(u)||r(this,a).delete(u)}),this.current=d}))}close(){super.close(),r(this,v).call(this)}}v=new WeakMap,a=new WeakMap;var S,f,g;class q extends p.Store{constructor(e,c,i){super(e,i);o(this,S,void 0);o(this,f,void 0);o(this,g,0);h(this,f,new p.Store(!1)),h(this,S,c),i!=null&&i.manualControl||this.refetch()}get isPending(){return r(this,f)}refetch(){r(this,f).current=!0,h(this,g,r(this,g)+1);const e=r(this,g);r(this,S).call(this).then(c=>{e===r(this,g)&&(r(this,f).current=!1,this.current=c)})}}S=new WeakMap,f=new WeakMap,g=new WeakMap;var m,y,R;class k extends q{constructor(e,c,i=100){super(e,c,{manualControl:!0,skipSubscribeNotification:!0});o(this,m,void 0);o(this,y,void 0);o(this,R,0);h(this,y,i)}get step(){return r(this,R)}startAccumulating(){h(this,m,setInterval(()=>I(this,null,function*(){++D(this,R)._,this.refetch()}),r(this,y)))}stopAccumulating(){clearInterval(r(this,m))}close(){super.close(),this.stopAccumulating()}}m=new WeakMap,y=new WeakMap,R=new WeakMap;var x;class w extends p.Store{constructor(e,c,i){super(null,i);o(this,x,[]);const l=M.debounce(()=>{this.current=c()},0);e.forEach(d=>{r(this,x).push(d.subscribe(()=>{l()}))})}close(){super.close(),r(this,x).forEach(e=>e())}}x=new WeakMap;exports.Store=p.Store;exports.activeStores=p.activeStores;exports.storeRegistry=p.storeRegistry;exports.Derived=E.Derived;exports.Composed=w;exports.CumulativeResource=k;exports.DerivedArray=P;exports.Resource=q;
1
+ "use strict";var A=(t,s,e)=>{if(!s.has(t))throw TypeError("Cannot "+e)};var r=(t,s,e)=>(A(t,s,"read from private field"),e?e.call(t):s.get(t)),o=(t,s,e)=>{if(s.has(t))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(t):s.set(t,e)},h=(t,s,e,c)=>(A(t,s,"write to private field"),c?c.call(t,e):s.set(t,e),e);var D=(t,s,e,c)=>({set _(i){h(t,s,i,e)},get _(){return r(t,s,c)}});var I=(t,s,e)=>new Promise((c,i)=>{var l=u=>{try{n(e.next(u))}catch(b){i(b)}},d=u=>{try{n(e.throw(u))}catch(b){i(b)}},n=u=>u.done?c(u.value):Promise.resolve(u.value).then(l,d);n((e=e.apply(t,s)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../Store-C-1ruEIm.cjs"),q=require("../Derived-B-g8dYgh.cjs"),M=require("../function-MthRj-GJ.cjs");var v,a;class P extends p.Store{constructor(e,c,i){super(null,i);o(this,v,void 0);o(this,a,new Map);h(this,v,e.subscribe(l=>{const d=[];l.current.forEach((n,u)=>{var b;if((b=l.previous)!=null&&b.includes(n)&&r(this,a).has(n))d.push(r(this,a).get(n));else{const C=c(n,u);r(this,a).set(n,C),d.push(C)}}),r(this,a).forEach((n,u)=>{l.current.includes(u)||r(this,a).delete(u)}),this.current=d}))}close(){super.close(),r(this,v).call(this)}}v=new WeakMap,a=new WeakMap;var S,f,g;class E extends p.Store{constructor(e,c,i){super(e,i);o(this,S,void 0);o(this,f,void 0);o(this,g,0);h(this,f,new p.Store(!1)),h(this,S,c),i!=null&&i.manualControl||this.refetch()}get isPending(){return r(this,f)}refetch(){r(this,f).current=!0,h(this,g,r(this,g)+1);const e=r(this,g);r(this,S).call(this).then(c=>{e===r(this,g)&&(r(this,f).current=!1,this.current=c)})}}S=new WeakMap,f=new WeakMap,g=new WeakMap;var m,y,R;class k extends E{constructor(e,c,i=100){super(e,c,{manualControl:!0,skipSubscribeNotification:!0});o(this,m,void 0);o(this,y,void 0);o(this,R,0);h(this,y,i)}get step(){return r(this,R)}startAccumulating(){h(this,m,setInterval(()=>I(this,null,function*(){++D(this,R)._,this.refetch()}),r(this,y)))}stopAccumulating(){clearInterval(r(this,m))}close(){super.close(),this.stopAccumulating()}}m=new WeakMap,y=new WeakMap,R=new WeakMap;var x;class w extends p.Store{constructor(e,c,i){super(null,i);o(this,x,[]);const l=M.debounce(()=>{this.current=c()},0);e.forEach(d=>{r(this,x).push(d.subscribe(()=>{l()}))})}close(){super.close(),r(this,x).forEach(e=>e())}}x=new WeakMap;exports.Store=p.Store;exports.activeStores=p.activeStores;exports.storeRegistry=p.storeRegistry;exports.Derived=q.Derived;exports.Composed=w;exports.CumulativeResource=k;exports.DerivedArray=P;exports.Resource=E;
@@ -31,13 +31,12 @@ var S = (e, t, s) => new Promise((c, i) => {
31
31
  }, n = (u) => u.done ? c(u.value) : Promise.resolve(u.value).then(l, f);
32
32
  n((s = s.apply(e, t)).next());
33
33
  });
34
- import { S as A } from "../Store-Cd-E5W1z.js";
35
- import { a as G, s as H } from "../Store-Cd-E5W1z.js";
36
- import { D as K } from "../Derived-DH-ouLBq.js";
34
+ import { S as A } from "../Store-BQXXikps.js";
35
+ import { a as F, s as G } from "../Store-BQXXikps.js";
36
+ import { D as J } from "../Derived-kPJs5JC5.js";
37
37
  import { d as D } from "../function-C10DGppn.js";
38
- import "../path-data-polyfill-DgeDWYeI.js";
39
38
  var b, o;
40
- class j extends A {
39
+ class N extends A {
41
40
  constructor(s, c, i) {
42
41
  super(null, i);
43
42
  h(this, b, void 0);
@@ -87,7 +86,7 @@ class k extends A {
87
86
  }
88
87
  g = new WeakMap(), p = new WeakMap(), m = new WeakMap();
89
88
  var x, v, I;
90
- class q extends k {
89
+ class j extends k {
91
90
  constructor(s, c, i = 100) {
92
91
  super(s, c, {
93
92
  manualControl: !0,
@@ -115,7 +114,7 @@ class q extends k {
115
114
  }
116
115
  x = new WeakMap(), v = new WeakMap(), I = new WeakMap();
117
116
  var y;
118
- class z extends A {
117
+ class q extends A {
119
118
  constructor(s, c, i) {
120
119
  super(null, i);
121
120
  h(this, y, []);
@@ -136,12 +135,12 @@ class z extends A {
136
135
  }
137
136
  y = new WeakMap();
138
137
  export {
139
- z as Composed,
140
- q as CumulativeResource,
141
- K as Derived,
142
- j as DerivedArray,
138
+ q as Composed,
139
+ j as CumulativeResource,
140
+ J as Derived,
141
+ N as DerivedArray,
143
142
  k as Resource,
144
143
  A as Store,
145
- G as activeStores,
146
- H as storeRegistry
144
+ F as activeStores,
145
+ G as storeRegistry
147
146
  };
@@ -0,0 +1,3 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});// @license
2
+ (!SVGPathElement.prototype.getPathData||!SVGPathElement.prototype.setPathData)&&function(){var V={Z:"Z",M:"M",L:"L",C:"C",Q:"Q",A:"A",H:"H",V:"V",S:"S",T:"T",z:"Z",m:"m",l:"l",c:"c",q:"q",a:"a",h:"h",v:"v",s:"s",t:"t"},M=function(n){this._string=n,this._currentIndex=0,this._endIndex=this._string.length,this._prevCommand=null,this._skipOptionalSpaces()},D=window.navigator.userAgent.indexOf("MSIE ")!==-1;M.prototype={parseSegment:function(){var n=this._string[this._currentIndex],t=V[n]?V[n]:null;if(t===null){if(this._prevCommand===null||((n==="+"||n==="-"||n==="."||n>="0"&&n<="9")&&this._prevCommand!=="Z"?this._prevCommand==="M"?t="L":this._prevCommand==="m"?t="l":t=this._prevCommand:t=null,t===null))return null}else this._currentIndex+=1;this._prevCommand=t;var e=null,s=t.toUpperCase();return s==="H"||s==="V"?e=[this._parseNumber()]:s==="M"||s==="L"||s==="T"?e=[this._parseNumber(),this._parseNumber()]:s==="S"||s==="Q"?e=[this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber()]:s==="C"?e=[this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber()]:s==="A"?e=[this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseArcFlag(),this._parseArcFlag(),this._parseNumber(),this._parseNumber()]:s==="Z"&&(this._skipOptionalSpaces(),e=[]),e===null||e.indexOf(null)>=0?null:{type:t,values:e}},hasMoreData:function(){return this._currentIndex<this._endIndex},peekSegmentType:function(){var n=this._string[this._currentIndex];return V[n]?V[n]:null},initialCommandIsMoveTo:function(){if(!this.hasMoreData())return!0;var n=this.peekSegmentType();return n==="M"||n==="m"},_isCurrentSpace:function(){var n=this._string[this._currentIndex];return n<=" "&&(n===" "||n===`
3
+ `||n===" "||n==="\r"||n==="\f")},_skipOptionalSpaces:function(){for(;this._currentIndex<this._endIndex&&this._isCurrentSpace();)this._currentIndex+=1;return this._currentIndex<this._endIndex},_skipOptionalSpacesOrDelimiter:function(){return this._currentIndex<this._endIndex&&!this._isCurrentSpace()&&this._string[this._currentIndex]!==","?!1:(this._skipOptionalSpaces()&&this._currentIndex<this._endIndex&&this._string[this._currentIndex]===","&&(this._currentIndex+=1,this._skipOptionalSpaces()),this._currentIndex<this._endIndex)},_parseNumber:function(){var n=0,t=0,e=1,s=0,l=1,u=1,a=this._currentIndex;if(this._skipOptionalSpaces(),this._currentIndex<this._endIndex&&this._string[this._currentIndex]==="+"?this._currentIndex+=1:this._currentIndex<this._endIndex&&this._string[this._currentIndex]==="-"&&(this._currentIndex+=1,l=-1),this._currentIndex===this._endIndex||(this._string[this._currentIndex]<"0"||this._string[this._currentIndex]>"9")&&this._string[this._currentIndex]!==".")return null;for(var p=this._currentIndex;this._currentIndex<this._endIndex&&this._string[this._currentIndex]>="0"&&this._string[this._currentIndex]<="9";)this._currentIndex+=1;if(this._currentIndex!==p)for(var i=this._currentIndex-1,r=1;i>=p;)t+=r*(this._string[i]-"0"),i-=1,r*=10;if(this._currentIndex<this._endIndex&&this._string[this._currentIndex]==="."){if(this._currentIndex+=1,this._currentIndex>=this._endIndex||this._string[this._currentIndex]<"0"||this._string[this._currentIndex]>"9")return null;for(;this._currentIndex<this._endIndex&&this._string[this._currentIndex]>="0"&&this._string[this._currentIndex]<="9";)e*=10,s+=(this._string.charAt(this._currentIndex)-"0")/e,this._currentIndex+=1}if(this._currentIndex!==a&&this._currentIndex+1<this._endIndex&&(this._string[this._currentIndex]==="e"||this._string[this._currentIndex]==="E")&&this._string[this._currentIndex+1]!=="x"&&this._string[this._currentIndex+1]!=="m"){if(this._currentIndex+=1,this._string[this._currentIndex]==="+"?this._currentIndex+=1:this._string[this._currentIndex]==="-"&&(this._currentIndex+=1,u=-1),this._currentIndex>=this._endIndex||this._string[this._currentIndex]<"0"||this._string[this._currentIndex]>"9")return null;for(;this._currentIndex<this._endIndex&&this._string[this._currentIndex]>="0"&&this._string[this._currentIndex]<="9";)n*=10,n+=this._string[this._currentIndex]-"0",this._currentIndex+=1}var v=t+s;return v*=l,n&&(v*=Math.pow(10,u*n)),a===this._currentIndex?null:(this._skipOptionalSpacesOrDelimiter(),v)},_parseArcFlag:function(){if(this._currentIndex>=this._endIndex)return null;var n=null,t=this._string[this._currentIndex];if(this._currentIndex+=1,t==="0")n=0;else if(t==="1")n=1;else return null;return this._skipOptionalSpacesOrDelimiter(),n}};var A=function(n){if(!n||n.length===0)return[];var t=new M(n),e=[];if(t.initialCommandIsMoveTo())for(;t.hasMoreData();){var s=t.parseSegment();if(s===null)break;e.push(s)}return e},P=SVGPathElement.prototype.setAttribute,S=SVGPathElement.prototype.setAttributeNS,_=SVGPathElement.prototype.removeAttribute,x=SVGPathElement.prototype.removeAttributeNS,y=window.Symbol?Symbol():"__cachedPathData",m=window.Symbol?Symbol():"__cachedNormalizedPathData",O=function(n,t,e,s,l,u,a,p,i,r){var v=function(X){return Math.PI*X/180},h=function(X,tt,Y){var pt=X*Math.cos(Y)-tt*Math.sin(Y),ct=X*Math.sin(Y)+tt*Math.cos(Y);return{x:pt,y:ct}},f=v(a),c=[],d,o,I,b;if(r)d=r[0],o=r[1],I=r[2],b=r[3];else{var T=h(n,t,-f);n=T.x,t=T.y;var L=h(e,s,-f);e=L.x,s=L.y;var w=(n-e)/2,C=(t-s)/2,G=w*w/(l*l)+C*C/(u*u);G>1&&(G=Math.sqrt(G),l=G*l,u=G*u);var k;p===i?k=-1:k=1;var z=l*l,H=u*u,at=z*H-z*C*C-H*w*w,rt=z*C*C+H*w*w,q=k*Math.sqrt(Math.abs(at/rt));I=q*l*C/u+(n+e)/2,b=q*-u*w/l+(t+s)/2,d=Math.asin(parseFloat(((t-b)/u).toFixed(9))),o=Math.asin(parseFloat(((s-b)/u).toFixed(9))),n<I&&(d=Math.PI-d),e<I&&(o=Math.PI-o),d<0&&(d=Math.PI*2+d),o<0&&(o=Math.PI*2+o),i&&d>o&&(d=d-Math.PI*2),!i&&o>d&&(o=o-Math.PI*2)}var B=o-d;if(Math.abs(B)>Math.PI*120/180){var st=o,nt=e,it=s;i&&o>d?o=d+Math.PI*120/180*1:o=d+Math.PI*120/180*-1,e=I+l*Math.cos(o),s=b+u*Math.sin(o),c=O(e,s,nt,it,l,u,a,0,i,[o,st,I,b])}B=o-d;var ut=Math.cos(d),lt=Math.sin(d),vt=Math.cos(o),ht=Math.sin(o),F=Math.tan(B/4),j=4/3*l*F,J=4/3*u*F,K=[n,t],Z=[n+j*lt,t-J*ut],W=[e+j*ht,s-J*vt],U=[e,s];if(Z[0]=2*K[0]-Z[0],Z[1]=2*K[1]-Z[1],r)return[Z,W,U].concat(c);c=[Z,W,U].concat(c);for(var R=[],N=0;N<c.length;N+=3){var l=h(c[N][0],c[N][1],f),u=h(c[N+1][0],c[N+1][1],f),g=h(c[N+2][0],c[N+2][1],f);R.push([l.x,l.y,u.x,u.y,g.x,g.y])}return R},E=function(n){return n.map(function(t){return{type:t.type,values:Array.prototype.slice.call(t.values)}})},$=function(n){var t=[],e=null,s=null,l=null,u=null;return n.forEach(function(a){var p=a.type;if(p==="M"){var i=a.values[0],r=a.values[1];t.push({type:"M",values:[i,r]}),l=i,u=r,e=i,s=r}else if(p==="m"){var i=e+a.values[0],r=s+a.values[1];t.push({type:"M",values:[i,r]}),l=i,u=r,e=i,s=r}else if(p==="L"){var i=a.values[0],r=a.values[1];t.push({type:"L",values:[i,r]}),e=i,s=r}else if(p==="l"){var i=e+a.values[0],r=s+a.values[1];t.push({type:"L",values:[i,r]}),e=i,s=r}else if(p==="C"){var v=a.values[0],h=a.values[1],f=a.values[2],c=a.values[3],i=a.values[4],r=a.values[5];t.push({type:"C",values:[v,h,f,c,i,r]}),e=i,s=r}else if(p==="c"){var v=e+a.values[0],h=s+a.values[1],f=e+a.values[2],c=s+a.values[3],i=e+a.values[4],r=s+a.values[5];t.push({type:"C",values:[v,h,f,c,i,r]}),e=i,s=r}else if(p==="Q"){var v=a.values[0],h=a.values[1],i=a.values[2],r=a.values[3];t.push({type:"Q",values:[v,h,i,r]}),e=i,s=r}else if(p==="q"){var v=e+a.values[0],h=s+a.values[1],i=e+a.values[2],r=s+a.values[3];t.push({type:"Q",values:[v,h,i,r]}),e=i,s=r}else if(p==="A"){var i=a.values[5],r=a.values[6];t.push({type:"A",values:[a.values[0],a.values[1],a.values[2],a.values[3],a.values[4],i,r]}),e=i,s=r}else if(p==="a"){var i=e+a.values[5],r=s+a.values[6];t.push({type:"A",values:[a.values[0],a.values[1],a.values[2],a.values[3],a.values[4],i,r]}),e=i,s=r}else if(p==="H"){var i=a.values[0];t.push({type:"H",values:[i]}),e=i}else if(p==="h"){var i=e+a.values[0];t.push({type:"H",values:[i]}),e=i}else if(p==="V"){var r=a.values[0];t.push({type:"V",values:[r]}),s=r}else if(p==="v"){var r=s+a.values[0];t.push({type:"V",values:[r]}),s=r}else if(p==="S"){var f=a.values[0],c=a.values[1],i=a.values[2],r=a.values[3];t.push({type:"S",values:[f,c,i,r]}),e=i,s=r}else if(p==="s"){var f=e+a.values[0],c=s+a.values[1],i=e+a.values[2],r=s+a.values[3];t.push({type:"S",values:[f,c,i,r]}),e=i,s=r}else if(p==="T"){var i=a.values[0],r=a.values[1];t.push({type:"T",values:[i,r]}),e=i,s=r}else if(p==="t"){var i=e+a.values[0],r=s+a.values[1];t.push({type:"T",values:[i,r]}),e=i,s=r}else(p==="Z"||p==="z")&&(t.push({type:"Z",values:[]}),e=l,s=u)}),t},Q=function(n){var t=[],e=null,s=null,l=null,u=null,a=null,p=null,i=null;return n.forEach(function(r){if(r.type==="M"){var v=r.values[0],h=r.values[1];t.push({type:"M",values:[v,h]}),p=v,i=h,u=v,a=h}else if(r.type==="C"){var f=r.values[0],c=r.values[1],d=r.values[2],o=r.values[3],v=r.values[4],h=r.values[5];t.push({type:"C",values:[f,c,d,o,v,h]}),s=d,l=o,u=v,a=h}else if(r.type==="L"){var v=r.values[0],h=r.values[1];t.push({type:"L",values:[v,h]}),u=v,a=h}else if(r.type==="H"){var v=r.values[0];t.push({type:"L",values:[v,a]}),u=v}else if(r.type==="V"){var h=r.values[0];t.push({type:"L",values:[u,h]}),a=h}else if(r.type==="S"){var d=r.values[0],o=r.values[1],v=r.values[2],h=r.values[3],I,b;e==="C"||e==="S"?(I=u+(u-s),b=a+(a-l)):(I=u,b=a),t.push({type:"C",values:[I,b,d,o,v,h]}),s=d,l=o,u=v,a=h}else if(r.type==="T"){var v=r.values[0],h=r.values[1],f,c;e==="Q"||e==="T"?(f=u+(u-s),c=a+(a-l)):(f=u,c=a);var I=u+2*(f-u)/3,b=a+2*(c-a)/3,T=v+2*(f-v)/3,L=h+2*(c-h)/3;t.push({type:"C",values:[I,b,T,L,v,h]}),s=f,l=c,u=v,a=h}else if(r.type==="Q"){var f=r.values[0],c=r.values[1],v=r.values[2],h=r.values[3],I=u+2*(f-u)/3,b=a+2*(c-a)/3,T=v+2*(f-v)/3,L=h+2*(c-h)/3;t.push({type:"C",values:[I,b,T,L,v,h]}),s=f,l=c,u=v,a=h}else if(r.type==="A"){var w=Math.abs(r.values[0]),C=Math.abs(r.values[1]),G=r.values[2],k=r.values[3],z=r.values[4],v=r.values[5],h=r.values[6];if(w===0||C===0)t.push({type:"C",values:[u,a,v,h,v,h]}),u=v,a=h;else if(u!==v||a!==h){var H=O(u,a,v,h,w,C,G,k,z);H.forEach(function(q){t.push({type:"C",values:q})}),u=v,a=h}}else r.type==="Z"&&(t.push(r),u=p,a=i);e=r.type}),t};SVGPathElement.prototype.setAttribute=function(n,t){n==="d"&&(this[y]=null,this[m]=null),P.call(this,n,t)},SVGPathElement.prototype.setAttributeNS=function(n,t,e){if(t==="d"){var s="http://www.w3.org/2000/svg";if(n)for(var l of this.ownerSVGElement.attributes)l.name===`xmlns:${n}`&&(s=l.value);s==="http://www.w3.org/2000/svg"&&(this[y]=null,this[m]=null)}S.call(this,n,t,e)},SVGPathElement.prototype.removeAttribute=function(n,t){n==="d"&&(this[y]=null,this[m]=null),_.call(this,n)},SVGPathElement.prototype.removeAttributeNS=function(n,t){if(t==="d"){var e="http://www.w3.org/2000/svg";if(n)for(var s of this.ownerSVGElement.attributes)s.name===`xmlns:${n}`&&(e=s.value);e==="http://www.w3.org/2000/svg"&&(this[y]=null,this[m]=null)}x.call(this,n,t)},SVGPathElement.prototype.getPathData=function(n){if(n&&n.normalize){if(this[m])return E(this[m]);var t;this[y]?t=E(this[y]):(t=A(this.getAttribute("d")||""),this[y]=E(t));var e=Q($(t));return this[m]=E(e),e}else{if(this[y])return E(this[y]);var t=A(this.getAttribute("d")||"");return this[y]=E(t),t}},SVGPathElement.prototype.setPathData=function(n){if(n.length===0)D?this.setAttribute("d",""):this.removeAttribute("d");else{for(var t="",e=0,s=n.length;e<s;e+=1){var l=n[e];e>0&&(t+=" "),t+=l.type,l.values&&l.values.length>0&&(t+=" "+l.values.join(" "))}this.setAttribute("d",t)}},SVGRectElement.prototype.getPathData=function(n){var t=this.x.baseVal.value,e=this.y.baseVal.value,s=this.width.baseVal.value,l=this.height.baseVal.value,u=this.hasAttribute("rx")?this.rx.baseVal.value:this.ry.baseVal.value,a=this.hasAttribute("ry")?this.ry.baseVal.value:this.rx.baseVal.value;u>s/2&&(u=s/2),a>l/2&&(a=l/2);var p=[{type:"M",values:[t+u,e]},{type:"H",values:[t+s-u]},{type:"A",values:[u,a,0,0,1,t+s,e+a]},{type:"V",values:[e+l-a]},{type:"A",values:[u,a,0,0,1,t+s-u,e+l]},{type:"H",values:[t+u]},{type:"A",values:[u,a,0,0,1,t,e+l-a]},{type:"V",values:[e+a]},{type:"A",values:[u,a,0,0,1,t+u,e]},{type:"Z",values:[]}];return p=p.filter(function(i){return!(i.type==="A"&&(i.values[0]===0||i.values[1]===0))}),n&&n.normalize===!0&&(p=Q(p)),p},SVGCircleElement.prototype.getPathData=function(n){var t=this.cx.baseVal.value,e=this.cy.baseVal.value,s=this.r.baseVal.value,l=[{type:"M",values:[t+s,e]},{type:"A",values:[s,s,0,0,1,t,e+s]},{type:"A",values:[s,s,0,0,1,t-s,e]},{type:"A",values:[s,s,0,0,1,t,e-s]},{type:"A",values:[s,s,0,0,1,t+s,e]},{type:"Z",values:[]}];return n&&n.normalize===!0&&(l=Q(l)),l},SVGEllipseElement.prototype.getPathData=function(n){var t=this.cx.baseVal.value,e=this.cy.baseVal.value,s=this.rx.baseVal.value,l=this.ry.baseVal.value,u=[{type:"M",values:[t+s,e]},{type:"A",values:[s,l,0,0,1,t,e+l]},{type:"A",values:[s,l,0,0,1,t-s,e]},{type:"A",values:[s,l,0,0,1,t,e-l]},{type:"A",values:[s,l,0,0,1,t+s,e]},{type:"Z",values:[]}];return n&&n.normalize===!0&&(u=Q(u)),u},SVGLineElement.prototype.getPathData=function(){return[{type:"M",values:[this.x1.baseVal.value,this.y1.baseVal.value]},{type:"L",values:[this.x2.baseVal.value,this.y2.baseVal.value]}]},SVGPolylineElement.prototype.getPathData=function(){for(var n=[],t=0;t<this.points.numberOfItems;t+=1){var e=this.points.getItem(t);n.push({type:t===0?"M":"L",values:[e.x,e.y]})}return n},SVGPolygonElement.prototype.getPathData=function(){for(var n=[],t=0;t<this.points.numberOfItems;t+=1){var e=this.points.getItem(t);n.push({type:t===0?"M":"L",values:[e.x,e.y]})}return n.push({type:"Z",values:[]}),n}}();function et(V,{pathSelector:M="path"}={}){const D=document.createElement(null);D.innerHTML=V;const A=D.firstElementChild,S=A.querySelector(M).getPathData(),_=A.getAttribute("viewBox").split(" ").map(m=>m.trim()),x={x:parseInt(_[0]),y:parseInt(_[1]),width:parseInt(_[2]),height:parseInt(_[3])},y=Math.min(x.width,x.height);return S.forEach(m=>{m.values=m.values.map(O=>O/y)}),S}function ot(V,M,D,A,P){const S=[];for(let _=0;_<=1;_+=1/P){const x=Math.pow(1-_,3)*V.x+3*Math.pow(1-_,2)*_*M.x+3*(1-_)*Math.pow(_,2)*D.x+Math.pow(_,3)*A.x,y=Math.pow(1-_,3)*V.y+3*Math.pow(1-_,2)*_*M.y+3*(1-_)*Math.pow(_,2)*D.y+Math.pow(_,3)*A.y;S.push({x,y})}return S}function ft(V,M){const D=(M==null?void 0:M.segments)||20,A=et(V,M);let P=[];for(let S=0;S<A.length-1;S++){const{type:_,values:x}=A[S];if(_==="M"&&S===0)P.push({x:x[0],y:x[1]});else if(_==="C"){const y=P[P.length-1],m={x:x[0],y:x[1]},O={x:x[2],y:x[3]},E={x:x[4],y:x[5]},$=ot(y,m,O,E,D);P=[...P,...$]}}return P}exports.getPathData=et;exports.getPoints=ft;
@@ -1,4 +1,4 @@
1
- import { Dot2D } from './ts-shape';
1
+ import { Dot2D } from '../utils';
2
2
 
3
3
  export interface GenerateSVGPathDataOptions {
4
4
  normalize?: boolean;