aptechka 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{Animation-seVC6-fS.cjs → Animation-De9aUv3b.cjs} +1 -1
- package/lib/{Animation-DF5jPON_.js → Animation-NAGXiFv5.js} +1 -1
- package/lib/{Composed-ChlKoJEp.cjs → Composed-C_4slJQ6.cjs} +1 -1
- package/lib/{Composed-CoX1ImVk.js → Composed-CfWa-69I.js} +1 -1
- package/lib/{Damped-C7WAqKPh.cjs → Damped-DYJ6Z0xo.cjs} +1 -1
- package/lib/{Damped-BDO-F13V.js → Damped-DbJKrUIf.js} +1 -1
- package/lib/Derived-BIBU-y7Z.cjs +1 -0
- package/lib/Derived-Vo_RsJfi.js +23 -0
- package/lib/{SourceManager-B8-EMNnd.js → SourceManager-B6wZpXUZ.js} +1 -1
- package/lib/{SourceManager-TzU9Rw08.cjs → SourceManager-CfHcGLUa.cjs} +1 -1
- package/lib/Store-C46i0nvr.js +137 -0
- package/lib/Store-npaZHvX4.cjs +1 -0
- package/lib/{Tweened-DSXD0I0k.cjs → Tweened-BkkD9s4n.cjs} +1 -1
- package/lib/{Tweened-CHhmfvzo.js → Tweened-DOSHLCZa.js} +1 -1
- package/lib/{Viewport-DTlImj28.js → Viewport-B55BvLsV.js} +1 -1
- package/lib/{Viewport-BmLTk_6k.cjs → Viewport-Cv4TRGiv.cjs} +1 -1
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +3 -3
- package/lib/attribute/index.cjs +1 -1
- package/lib/attribute/index.js +13 -13
- package/lib/canvas/index.cjs +7 -1
- package/lib/canvas/index.js +54 -58
- package/lib/class-linked-status/index.cjs +1 -1
- package/lib/class-linked-status/index.js +1 -1
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +3 -3
- package/lib/{createStylesheet-DO5t5q-m.js → createStylesheet-C68ja-RS.js} +3 -3
- package/lib/{createStylesheet-CaDI99iu.cjs → createStylesheet-Csfmh-MH.cjs} +1 -1
- package/lib/css-property/index.cjs +1 -1
- package/lib/css-property/index.js +4 -4
- package/lib/dev/index.cjs +1 -1
- package/lib/dev/index.js +1 -1
- package/lib/device/index.cjs +1 -1
- package/lib/device/index.js +1 -1
- package/lib/{dom-P5QbAASX.js → dom-0S_WDL4g.js} +2 -2
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.js +133 -122
- package/lib/element-resizer/index.js +8 -8
- package/lib/en3/helpers/index.cjs +1 -1
- package/lib/en3/helpers/index.js +4 -4
- package/lib/en3/index.js +1 -1
- package/lib/en3/loaders/index.js +1 -1
- package/lib/en3/misc/index.cjs +1 -1
- package/lib/en3/misc/index.js +2 -2
- package/lib/en3/utils/index.js +2 -2
- package/lib/{en3-x-Ki30MY.js → en3-sK9Z-fp2.js} +1 -1
- package/lib/file-BEr-o55N.js +31 -0
- package/lib/file-C9BbxzVU.cjs +1 -0
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +1 -1
- package/lib/intersector/index.js +7 -7
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.js +1 -1
- package/lib/layout-box/index.js +14 -14
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.js +1 -1
- package/lib/need_redo_tweaker/index.cjs +18 -0
- package/lib/need_redo_tweaker/index.js +1343 -0
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +3 -3
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +60 -62
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +105 -106
- package/lib/scroll-entries/index.js +15 -15
- package/lib/sequence/index.cjs +1 -1
- package/lib/sequence/index.js +1 -1
- package/lib/slicer/index.cjs +5 -5
- package/lib/slicer/index.js +55 -86
- package/lib/source/index.cjs +1 -1
- package/lib/source/index.js +2 -2
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.js +38 -112
- package/lib/{tags-v-OSVkiQ.cjs → tags-6_ETuR75.cjs} +1 -1
- package/lib/{tags-4AoxVUe3.js → tags-zft1DGBz.js} +93 -93
- package/lib/ticker/index.js +1 -1
- package/lib/{traverseMaterials-mGC2_FkG.js → traverseMaterials-BlZbRhgW.js} +1 -1
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +56 -57
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +1 -1
- package/package.json +7 -55
- package/lib/Derived-B-2UXnVE.cjs +0 -1
- package/lib/Derived-CDGpSMKu.js +0 -56
- package/lib/Store-BnA-dJsE.cjs +0 -1
- package/lib/Store-DGtldlBH.js +0 -147
- package/lib/accordion/index.cjs +0 -1
- package/lib/accordion/index.js +0 -167
- package/lib/checkbox/index.cjs +0 -1
- package/lib/checkbox/index.js +0 -112
- package/lib/createTheme-CHnsCgAr.js +0 -15
- package/lib/createTheme-Cfaw9UmV.cjs +0 -1
- package/lib/events-BGwqaxVW.cjs +0 -1
- package/lib/events-CJTUMSLU.js +0 -20
- package/lib/file-EevnUtRj.cjs +0 -1
- package/lib/file-lxi_oXJf.js +0 -13
- package/lib/index-BhbT9PrL.js +0 -261
- package/lib/index-BpsQqM-8.cjs +0 -9
- package/lib/modal/index.cjs +0 -1
- package/lib/modal/index.js +0 -133
- package/lib/select/index.cjs +0 -1
- package/lib/select/index.js +0 -7
- package/lib/svg-path-data/index.cjs +0 -3
- package/lib/svg-path-data/index.js +0 -490
- package/lib/theme/index.cjs +0 -1
- package/lib/theme/index.js +0 -25
- package/lib/tweaker/index.cjs +0 -10
- package/lib/tweaker/index.js +0 -992
package/lib/index-BhbT9PrL.js
DELETED
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
var I = (s) => {
|
|
2
|
-
throw TypeError(s);
|
|
3
|
-
};
|
|
4
|
-
var T = (s, i, t) => i.has(s) || I("Cannot " + t);
|
|
5
|
-
var e = (s, i, t) => (T(s, i, "read from private field"), t ? t.call(s) : i.get(s)), n = (s, i, t) => i.has(s) ? I("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(s) : i.set(s, t), a = (s, i, t, o) => (T(s, i, "write to private field"), o ? o.call(s, t) : i.set(s, t), t), g = (s, i, t) => (T(s, i, "access private method"), t);
|
|
6
|
-
import "./Store-DGtldlBH.js";
|
|
7
|
-
import { i as H } from "./browser-0zX67oeU.js";
|
|
8
|
-
import { a as D, d as B } from "./events-CJTUMSLU.js";
|
|
9
|
-
import { g as R } from "./style-j2TwriJ_.js";
|
|
10
|
-
import "./ticker/index.js";
|
|
11
|
-
import { e as S, p as q, ay as v, D as O } from "./tags-4AoxVUe3.js";
|
|
12
|
-
import { c as M } from "./createStylesheet-DO5t5q-m.js";
|
|
13
|
-
import { aptechkaTheme as F } from "./theme/index.js";
|
|
14
|
-
const P = M({
|
|
15
|
-
":host": {
|
|
16
|
-
position: "relative"
|
|
17
|
-
},
|
|
18
|
-
".head": {
|
|
19
|
-
width: "100%",
|
|
20
|
-
cursor: "default",
|
|
21
|
-
background: "none",
|
|
22
|
-
border: "none",
|
|
23
|
-
color: "inherit",
|
|
24
|
-
fontFamily: "inherit",
|
|
25
|
-
fontSize: "inherit",
|
|
26
|
-
fontWeight: "inherit",
|
|
27
|
-
textAlign: "start",
|
|
28
|
-
padding: "0",
|
|
29
|
-
margin: "0"
|
|
30
|
-
},
|
|
31
|
-
".body": {
|
|
32
|
-
boxSizing: "border-box",
|
|
33
|
-
position: "var(--position, unset)",
|
|
34
|
-
top: "100%",
|
|
35
|
-
left: "0",
|
|
36
|
-
width: "100%",
|
|
37
|
-
overflow: "hidden",
|
|
38
|
-
transitionDuration: "var(--duration, var(--duration-short))",
|
|
39
|
-
transitionProperty: "height",
|
|
40
|
-
cursor: "default"
|
|
41
|
-
},
|
|
42
|
-
".body-inner": {
|
|
43
|
-
display: "grid",
|
|
44
|
-
gap: "var(--gap, 0px)",
|
|
45
|
-
width: "100%",
|
|
46
|
-
paddingTop: "var(--gap, 0px)"
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
var r, c, l, h, d, u, L, f, k;
|
|
50
|
-
const A = class A extends HTMLElement {
|
|
51
|
-
constructor() {
|
|
52
|
-
super();
|
|
53
|
-
n(this, f);
|
|
54
|
-
n(this, r, null);
|
|
55
|
-
n(this, c, "");
|
|
56
|
-
n(this, l, null);
|
|
57
|
-
n(this, h, !1);
|
|
58
|
-
n(this, d);
|
|
59
|
-
n(this, u, null);
|
|
60
|
-
n(this, L, () => {
|
|
61
|
-
D(this);
|
|
62
|
-
});
|
|
63
|
-
H && (this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(P), a(this, r, this.attachInternals()), a(this, u, new ResizeObserver(e(this, L))), S(this, {
|
|
64
|
-
children: [
|
|
65
|
-
q({
|
|
66
|
-
class: "head",
|
|
67
|
-
children: v({ name: "head" }),
|
|
68
|
-
onClick: () => {
|
|
69
|
-
this.opened ? this.close() : this.open();
|
|
70
|
-
}
|
|
71
|
-
}),
|
|
72
|
-
O({
|
|
73
|
-
class: "body",
|
|
74
|
-
style: {
|
|
75
|
-
height: "0px"
|
|
76
|
-
},
|
|
77
|
-
children: O({
|
|
78
|
-
class: "body-inner",
|
|
79
|
-
children: v()
|
|
80
|
-
}),
|
|
81
|
-
ref: (o) => {
|
|
82
|
-
a(this, l, o);
|
|
83
|
-
}
|
|
84
|
-
})
|
|
85
|
-
]
|
|
86
|
-
}));
|
|
87
|
-
}
|
|
88
|
-
get value() {
|
|
89
|
-
return e(this, c);
|
|
90
|
-
}
|
|
91
|
-
set value(t) {
|
|
92
|
-
a(this, c, t), this.dispatchEvent(
|
|
93
|
-
new Event("change", {
|
|
94
|
-
bubbles: !0,
|
|
95
|
-
composed: !0
|
|
96
|
-
})
|
|
97
|
-
), e(this, r).setFormValue(e(this, c));
|
|
98
|
-
}
|
|
99
|
-
get internals() {
|
|
100
|
-
return e(this, r);
|
|
101
|
-
}
|
|
102
|
-
get opened() {
|
|
103
|
-
return e(this, h);
|
|
104
|
-
}
|
|
105
|
-
open() {
|
|
106
|
-
clearTimeout(e(this, d)), a(this, h, !0), e(this, l).style.display = "grid", this.classList.add("triggered"), setTimeout(() => {
|
|
107
|
-
this.classList.add("opened"), e(this, l).style.height = e(this, l).scrollHeight + "px", g(this, f, k).call(this);
|
|
108
|
-
}, 0);
|
|
109
|
-
}
|
|
110
|
-
close() {
|
|
111
|
-
a(this, h, !1), e(this, l).style.height = "0px", this.classList.remove("opened"), g(this, f, k).call(this), a(this, d, setTimeout(() => {
|
|
112
|
-
this.classList.remove("triggered"), e(this, l).style.display = "none";
|
|
113
|
-
}, R(e(this, l))));
|
|
114
|
-
}
|
|
115
|
-
connectedCallback() {
|
|
116
|
-
e(this, u).observe(e(this, l));
|
|
117
|
-
}
|
|
118
|
-
disconnectedCallback() {
|
|
119
|
-
clearTimeout(e(this, d)), e(this, u).disconnect();
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
r = new WeakMap(), c = new WeakMap(), l = new WeakMap(), h = new WeakMap(), d = new WeakMap(), u = new WeakMap(), L = new WeakMap(), f = new WeakSet(), k = function() {
|
|
123
|
-
B(this), this.dispatchEvent(
|
|
124
|
-
new CustomEvent("selectToggle", {
|
|
125
|
-
bubbles: !0,
|
|
126
|
-
composed: !0,
|
|
127
|
-
detail: {
|
|
128
|
-
opened: e(this, h)
|
|
129
|
-
}
|
|
130
|
-
})
|
|
131
|
-
);
|
|
132
|
-
}, A.formAssociated = !0;
|
|
133
|
-
let C = A;
|
|
134
|
-
customElements.get("e-select") || customElements.define("e-select", C);
|
|
135
|
-
var E;
|
|
136
|
-
class $ extends HTMLElement {
|
|
137
|
-
constructor() {
|
|
138
|
-
super(...arguments);
|
|
139
|
-
n(this, E, null);
|
|
140
|
-
}
|
|
141
|
-
get selectElement() {
|
|
142
|
-
return e(this, E);
|
|
143
|
-
}
|
|
144
|
-
connectedCallback() {
|
|
145
|
-
var o, x;
|
|
146
|
-
const t = (x = (o = this.assignedSlot) == null ? void 0 : o.getRootNode()) == null ? void 0 : x.host;
|
|
147
|
-
t ? a(this, E, t) : console.log(this, "e-select not found");
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
E = new WeakMap();
|
|
151
|
-
const j = M({
|
|
152
|
-
":host": {
|
|
153
|
-
width: "100%",
|
|
154
|
-
height: "40px",
|
|
155
|
-
display: "inline-flex",
|
|
156
|
-
alignItems: "center"
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
var m, b, z;
|
|
160
|
-
class K extends $ {
|
|
161
|
-
constructor() {
|
|
162
|
-
super();
|
|
163
|
-
n(this, b);
|
|
164
|
-
n(this, m, () => {
|
|
165
|
-
this.selectElement.value === this.value ? this.style.display = "none" : this.style.display = "";
|
|
166
|
-
});
|
|
167
|
-
H && (this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(j), S(this, {
|
|
168
|
-
tabindex: 0,
|
|
169
|
-
onClick: () => {
|
|
170
|
-
g(this, b, z).call(this);
|
|
171
|
-
},
|
|
172
|
-
onKeydown: (o) => {
|
|
173
|
-
o.code === "Space" && g(this, b, z).call(this);
|
|
174
|
-
},
|
|
175
|
-
children: v()
|
|
176
|
-
}));
|
|
177
|
-
}
|
|
178
|
-
get value() {
|
|
179
|
-
return (this.hasAttribute("value") ? this.getAttribute("value") : this.innerText) || "";
|
|
180
|
-
}
|
|
181
|
-
connectedCallback() {
|
|
182
|
-
super.connectedCallback(), this.hasAttribute("default") && (this.selectElement.value || (this.selectElement.value = this.value)), this.selectElement.addEventListener("change", e(this, m)), setTimeout(() => {
|
|
183
|
-
e(this, m).call(this);
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
disconnectedCallback() {
|
|
187
|
-
this.selectElement.removeEventListener("change", e(this, m));
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
m = new WeakMap(), b = new WeakSet(), z = function() {
|
|
191
|
-
this.selectElement.value = this.value, this.selectElement.close();
|
|
192
|
-
};
|
|
193
|
-
customElements.get("e-select-option") || customElements.define("e-select-option", K);
|
|
194
|
-
const N = `<svg
|
|
195
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
196
|
-
width="32"
|
|
197
|
-
height="32"
|
|
198
|
-
viewBox="0 0 24 24"
|
|
199
|
-
>
|
|
200
|
-
<path d="m12.37 15.835l6.43-6.63C19.201 8.79 18.958 8 18.43 8H5.57c-.528 0-.771.79-.37 1.205l6.43 6.63c.213.22.527.22.74 0Z" />
|
|
201
|
-
</svg>
|
|
202
|
-
`, U = M({
|
|
203
|
-
":host": {
|
|
204
|
-
width: "100%",
|
|
205
|
-
height: "40px",
|
|
206
|
-
display: "inline-flex",
|
|
207
|
-
alignItems: "center",
|
|
208
|
-
justifyContent: "space-between"
|
|
209
|
-
},
|
|
210
|
-
".default-arrow": {
|
|
211
|
-
flexShrink: "0",
|
|
212
|
-
width: "var(--arrow-size, 1em)",
|
|
213
|
-
height: "var(--arrow-size, 1em)",
|
|
214
|
-
fill: `var(--arrow-color, ${F.colorMain.var})`,
|
|
215
|
-
transitionProperty: "transform",
|
|
216
|
-
transitionDuration: "var(--duration, var(--duration-short))"
|
|
217
|
-
},
|
|
218
|
-
":host(.opened) .default-arrow": {
|
|
219
|
-
transform: "scaleY(-1)"
|
|
220
|
-
}
|
|
221
|
-
});
|
|
222
|
-
var w, p, y;
|
|
223
|
-
class V extends $ {
|
|
224
|
-
constructor() {
|
|
225
|
-
super();
|
|
226
|
-
n(this, w, null);
|
|
227
|
-
n(this, p, () => {
|
|
228
|
-
const o = this.selectElement.shadowRoot.querySelector(
|
|
229
|
-
".body slot"
|
|
230
|
-
).assignedElements().find((x) => x.value === this.selectElement.value);
|
|
231
|
-
o && (e(this, w).innerHTML = o.innerHTML);
|
|
232
|
-
});
|
|
233
|
-
n(this, y, () => {
|
|
234
|
-
this.classList.toggle("opened", this.selectElement.opened);
|
|
235
|
-
});
|
|
236
|
-
H && (this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(U), S(this, {
|
|
237
|
-
children: [
|
|
238
|
-
v(),
|
|
239
|
-
v({
|
|
240
|
-
name: "arrow",
|
|
241
|
-
children: S(N, { class: "default-arrow" })
|
|
242
|
-
})
|
|
243
|
-
]
|
|
244
|
-
}), this.slot = "head");
|
|
245
|
-
}
|
|
246
|
-
connectedCallback() {
|
|
247
|
-
super.connectedCallback(), a(this, w, this.querySelector("[data-value-holder]") || this), this.selectElement.addEventListener("change", e(this, p)), e(this, p).call(this), this.selectElement.addEventListener("selectToggle", e(this, y));
|
|
248
|
-
}
|
|
249
|
-
disconnectedCallback() {
|
|
250
|
-
this.selectElement.removeEventListener("change", e(this, p)), this.selectElement.removeEventListener("selectToggle", e(this, y));
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
w = new WeakMap(), p = new WeakMap(), y = new WeakMap();
|
|
254
|
-
customElements.get("e-select-head") || customElements.define("e-select-head", V);
|
|
255
|
-
export {
|
|
256
|
-
C as S,
|
|
257
|
-
N as a,
|
|
258
|
-
$ as b,
|
|
259
|
-
K as c,
|
|
260
|
-
V as d
|
|
261
|
-
};
|
package/lib/index-BpsQqM-8.cjs
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";var M=s=>{throw TypeError(s)};var T=(s,i,t)=>i.has(s)||M("Cannot "+t);var e=(s,i,t)=>(T(s,i,"read from private field"),t?t.call(s):i.get(s)),n=(s,i,t)=>i.has(s)?M("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(s):i.set(s,t),h=(s,i,t,l)=>(T(s,i,"write to private field"),l?l.call(s,t):i.set(s,t),t),v=(s,i,t)=>(T(s,i,"access private method"),t);require("./Store-BnA-dJsE.cjs");const q=require("./browser-CpzFX2xg.cjs"),O=require("./events-BGwqaxVW.cjs"),D=require("./style-At6aDoqG.cjs");require("./ticker/index.cjs");const o=require("./tags-v-OSVkiQ.cjs"),z=require("./createStylesheet-CaDI99iu.cjs"),R=require("./theme/index.cjs"),F=z.createStylesheet({":host":{position:"relative"},".head":{width:"100%",cursor:"default",background:"none",border:"none",color:"inherit",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit",textAlign:"start",padding:"0",margin:"0"},".body":{boxSizing:"border-box",position:"var(--position, unset)",top:"100%",left:"0",width:"100%",overflow:"hidden",transitionDuration:"var(--duration, var(--duration-short))",transitionProperty:"height",cursor:"default"},".body-inner":{display:"grid",gap:"var(--gap, 0px)",width:"100%",paddingTop:"var(--gap, 0px)"}});var c,d,r,a,u,m,L,E,C;const I=class I extends HTMLElement{constructor(){super();n(this,E);n(this,c,null);n(this,d,"");n(this,r,null);n(this,a,!1);n(this,u);n(this,m,null);n(this,L,()=>{O.dispatchSizeChangeEvent(this)});q.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(F),h(this,c,this.attachInternals()),h(this,m,new ResizeObserver(e(this,L))),o.element(this,{children:[o.button({class:"head",children:o.slot({name:"head"}),onClick:()=>{this.opened?this.close():this.open()}}),o.div({class:"body",style:{height:"0px"},children:o.div({class:"body-inner",children:o.slot()}),ref:l=>{h(this,r,l)}})]}))}get value(){return e(this,d)}set value(t){h(this,d,t),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),e(this,c).setFormValue(e(this,d))}get internals(){return e(this,c)}get opened(){return e(this,a)}open(){clearTimeout(e(this,u)),h(this,a,!0),e(this,r).style.display="grid",this.classList.add("triggered"),setTimeout(()=>{this.classList.add("opened"),e(this,r).style.height=e(this,r).scrollHeight+"px",v(this,E,C).call(this)},0)}close(){h(this,a,!1),e(this,r).style.height="0px",this.classList.remove("opened"),v(this,E,C).call(this),h(this,u,setTimeout(()=>{this.classList.remove("triggered"),e(this,r).style.display="none"},D.getElementTransitionDurationMS(e(this,r))))}connectedCallback(){e(this,m).observe(e(this,r))}disconnectedCallback(){clearTimeout(e(this,u)),e(this,m).disconnect()}};c=new WeakMap,d=new WeakMap,r=new WeakMap,a=new WeakMap,u=new WeakMap,m=new WeakMap,L=new WeakMap,E=new WeakSet,C=function(){O.dispatchBeforeSizeChangeEvent(this),this.dispatchEvent(new CustomEvent("selectToggle",{bubbles:!0,composed:!0,detail:{opened:e(this,a)}}))},I.formAssociated=!0;let x=I;customElements.get("e-select")||customElements.define("e-select",x);var f;class H extends HTMLElement{constructor(){super(...arguments);n(this,f,null)}get selectElement(){return e(this,f)}connectedCallback(){var l,S;const t=(S=(l=this.assignedSlot)==null?void 0:l.getRootNode())==null?void 0:S.host;t?h(this,f,t):console.log(this,"e-select not found")}}f=new WeakMap;const P=z.createStylesheet({":host":{width:"100%",height:"40px",display:"inline-flex",alignItems:"center"}});var p,w,k;class A extends H{constructor(){super();n(this,w);n(this,p,()=>{this.selectElement.value===this.value?this.style.display="none":this.style.display=""});q.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(P),o.element(this,{tabindex:0,onClick:()=>{v(this,w,k).call(this)},onKeydown:l=>{l.code==="Space"&&v(this,w,k).call(this)},children:o.slot()}))}get value(){return(this.hasAttribute("value")?this.getAttribute("value"):this.innerText)||""}connectedCallback(){super.connectedCallback(),this.hasAttribute("default")&&(this.selectElement.value||(this.selectElement.value=this.value)),this.selectElement.addEventListener("change",e(this,p)),setTimeout(()=>{e(this,p).call(this)})}disconnectedCallback(){this.selectElement.removeEventListener("change",e(this,p))}}p=new WeakMap,w=new WeakSet,k=function(){this.selectElement.value=this.value,this.selectElement.close()};customElements.get("e-select-option")||customElements.define("e-select-option",A);const B=`<svg
|
|
2
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3
|
-
width="32"
|
|
4
|
-
height="32"
|
|
5
|
-
viewBox="0 0 24 24"
|
|
6
|
-
>
|
|
7
|
-
<path d="m12.37 15.835l6.43-6.63C19.201 8.79 18.958 8 18.43 8H5.57c-.528 0-.771.79-.37 1.205l6.43 6.63c.213.22.527.22.74 0Z" />
|
|
8
|
-
</svg>
|
|
9
|
-
`,U=z.createStylesheet({":host":{width:"100%",height:"40px",display:"inline-flex",alignItems:"center",justifyContent:"space-between"},".default-arrow":{flexShrink:"0",width:"var(--arrow-size, 1em)",height:"var(--arrow-size, 1em)",fill:`var(--arrow-color, ${R.aptechkaTheme.colorMain.var})`,transitionProperty:"transform",transitionDuration:"var(--duration, var(--duration-short))"},":host(.opened) .default-arrow":{transform:"scaleY(-1)"}});var y,g,b;class $ extends H{constructor(){super();n(this,y,null);n(this,g,()=>{const l=this.selectElement.shadowRoot.querySelector(".body slot").assignedElements().find(S=>S.value===this.selectElement.value);l&&(e(this,y).innerHTML=l.innerHTML)});n(this,b,()=>{this.classList.toggle("opened",this.selectElement.opened)});q.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(U),o.element(this,{children:[o.slot(),o.slot({name:"arrow",children:o.element(B,{class:"default-arrow"})})]}),this.slot="head")}connectedCallback(){super.connectedCallback(),h(this,y,this.querySelector("[data-value-holder]")||this),this.selectElement.addEventListener("change",e(this,g)),e(this,g).call(this),this.selectElement.addEventListener("selectToggle",e(this,b))}disconnectedCallback(){this.selectElement.removeEventListener("change",e(this,g)),this.selectElement.removeEventListener("selectToggle",e(this,b))}}y=new WeakMap,g=new WeakMap,b=new WeakMap;customElements.get("e-select-head")||customElements.define("e-select-head",$);exports.SelectElement=x;exports.SelectHeadElement=$;exports.SelectOptionElement=A;exports.SelectUserElement=H;exports.arrowIcon=B;
|
package/lib/modal/index.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var d=e=>{throw TypeError(e)};var u=(e,t,o)=>t.has(e)||d("Cannot "+o);var i=(e,t,o)=>(u(e,t,"read from private field"),o?o.call(e):t.get(e)),a=(e,t,o)=>t.has(e)?d("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,o),c=(e,t,o,l)=>(u(e,t,"write to private field"),l?l.call(e,o):t.set(e,o),o);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-BnA-dJsE.cjs");const b=require("../browser-CpzFX2xg.cjs");require("../ticker/index.cjs");const n=require("../tags-v-OSVkiQ.cjs"),f=require("../createStylesheet-CaDI99iu.cjs"),m=require("../popover/index.cjs"),p=require("../theme/index.cjs"),v=f.createStylesheet({":host":{position:"fixed",top:"0",left:"0",zIndex:"1",width:"100%",height:"100%",transitionProperty:"opacity",transitionDuration:"var(--transition-duration)"},":host::before":{content:'""',position:"fixed",top:"0",left:"0",zIndex:"-1",width:"100%",height:"100%",backgroundColor:"var(--backdrop, rgba(0, 0, 0, 0.8))"},".inner":{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden auto"},".overflow .inner":{alignItems:"flex-start"},".content":{position:"relative"},".close-button":{position:"absolute",zIndex:"1",top:"var(--close-button-top, 0.5em)",right:"var(--close-button-right, 0.5em)",background:"none",border:"none",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit"},".close-button-default":{width:"var(--close-button-size, 1.5em)",height:"var(--close-button-size, 1.5em)",display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"transform",transitionDuration:"var(--transition-duration)",willChange:"transform"},".close-button:hover .close-button-default":{transform:"scale(0.9)"},".close-button:active .close-button-default":{transform:"scale(0.7)"},".close-button-default::before, .close-button-default::after":{content:'""',position:"absolute",width:"var(--close-button-thickness, 0.1em)",height:"100%",backgroundColor:`var(--close-button-color, ${p.aptechkaTheme.colorMain.var})`},".close-button-default::before":{transform:"rotate(-45deg)"},".close-button-default::after":{transform:"rotate(45deg)"}});var s,r;class h extends m.PopoverElement{constructor(){super();a(this,s,null);a(this,r,null);b.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(v),n.element(this,{children:n.div({class:"inner",outside:!0,children:n.div({class:"content",children:[n.element("e-popover-button",{type:"close",target:"parent",class:"close-button",lightChildren:[n.slot({name:"close-button",children:n.span({class:"close-button-default"})})]}),n.slot()]}),ref:l=>c(this,r,l)})}),c(this,s,new ResizeObserver(()=>{i(this,r).scrollHeight>i(this,r).clientHeight?this.classList.add("overflow"):this.classList.remove("overflow")})))}connectedCallback(){super.connectedCallback(),i(this,s).observe(this)}disconnectedCallback(){super.disconnectedCallback(),i(this,s).disconnect()}}s=new WeakMap,r=new WeakMap;customElements.get("e-modal")||customElements.define("e-modal",h);exports.ModalElement=h;
|
package/lib/modal/index.js
DELETED
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
var c = (t) => {
|
|
2
|
-
throw TypeError(t);
|
|
3
|
-
};
|
|
4
|
-
var d = (t, e, o) => e.has(t) || c("Cannot " + o);
|
|
5
|
-
var r = (t, e, o) => (d(t, e, "read from private field"), o ? o.call(t) : e.get(t)), a = (t, e, o) => e.has(t) ? c("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, o), l = (t, e, o, i) => (d(t, e, "write to private field"), i ? i.call(t, o) : e.set(t, o), o);
|
|
6
|
-
import "../Store-DGtldlBH.js";
|
|
7
|
-
import { i as m } from "../browser-0zX67oeU.js";
|
|
8
|
-
import "../ticker/index.js";
|
|
9
|
-
import { e as h, D as u, ay as f, aB as b } from "../tags-4AoxVUe3.js";
|
|
10
|
-
import { c as p } from "../createStylesheet-DO5t5q-m.js";
|
|
11
|
-
import { PopoverElement as v } from "../popover/index.js";
|
|
12
|
-
import { aptechkaTheme as g } from "../theme/index.js";
|
|
13
|
-
const w = p({
|
|
14
|
-
":host": {
|
|
15
|
-
position: "fixed",
|
|
16
|
-
top: "0",
|
|
17
|
-
left: "0",
|
|
18
|
-
zIndex: "1",
|
|
19
|
-
width: "100%",
|
|
20
|
-
height: "100%",
|
|
21
|
-
transitionProperty: "opacity",
|
|
22
|
-
transitionDuration: "var(--transition-duration)"
|
|
23
|
-
},
|
|
24
|
-
":host::before": {
|
|
25
|
-
content: '""',
|
|
26
|
-
position: "fixed",
|
|
27
|
-
top: "0",
|
|
28
|
-
left: "0",
|
|
29
|
-
zIndex: "-1",
|
|
30
|
-
width: "100%",
|
|
31
|
-
height: "100%",
|
|
32
|
-
backgroundColor: "var(--backdrop, rgba(0, 0, 0, 0.8))"
|
|
33
|
-
},
|
|
34
|
-
".inner": {
|
|
35
|
-
width: "100%",
|
|
36
|
-
height: "100%",
|
|
37
|
-
display: "flex",
|
|
38
|
-
alignItems: "center",
|
|
39
|
-
justifyContent: "center",
|
|
40
|
-
overflow: "hidden auto"
|
|
41
|
-
},
|
|
42
|
-
".overflow .inner": {
|
|
43
|
-
alignItems: "flex-start"
|
|
44
|
-
},
|
|
45
|
-
".content": {
|
|
46
|
-
position: "relative"
|
|
47
|
-
},
|
|
48
|
-
".close-button": {
|
|
49
|
-
position: "absolute",
|
|
50
|
-
zIndex: "1",
|
|
51
|
-
top: "var(--close-button-top, 0.5em)",
|
|
52
|
-
right: "var(--close-button-right, 0.5em)",
|
|
53
|
-
background: "none",
|
|
54
|
-
border: "none",
|
|
55
|
-
fontFamily: "inherit",
|
|
56
|
-
fontSize: "inherit",
|
|
57
|
-
fontWeight: "inherit"
|
|
58
|
-
},
|
|
59
|
-
".close-button-default": {
|
|
60
|
-
width: "var(--close-button-size, 1.5em)",
|
|
61
|
-
height: "var(--close-button-size, 1.5em)",
|
|
62
|
-
display: "flex",
|
|
63
|
-
alignItems: "center",
|
|
64
|
-
justifyContent: "center",
|
|
65
|
-
transitionProperty: "transform",
|
|
66
|
-
transitionDuration: "var(--transition-duration)",
|
|
67
|
-
willChange: "transform"
|
|
68
|
-
},
|
|
69
|
-
".close-button:hover .close-button-default": {
|
|
70
|
-
transform: "scale(0.9)"
|
|
71
|
-
},
|
|
72
|
-
".close-button:active .close-button-default": {
|
|
73
|
-
transform: "scale(0.7)"
|
|
74
|
-
},
|
|
75
|
-
".close-button-default::before, .close-button-default::after": {
|
|
76
|
-
content: '""',
|
|
77
|
-
position: "absolute",
|
|
78
|
-
width: "var(--close-button-thickness, 0.1em)",
|
|
79
|
-
height: "100%",
|
|
80
|
-
backgroundColor: `var(--close-button-color, ${g.colorMain.var})`
|
|
81
|
-
},
|
|
82
|
-
".close-button-default::before": {
|
|
83
|
-
transform: "rotate(-45deg)"
|
|
84
|
-
},
|
|
85
|
-
".close-button-default::after": {
|
|
86
|
-
transform: "rotate(45deg)"
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
var n, s;
|
|
90
|
-
class y extends v {
|
|
91
|
-
constructor() {
|
|
92
|
-
super();
|
|
93
|
-
a(this, n, null);
|
|
94
|
-
a(this, s, null);
|
|
95
|
-
m && (this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(w), h(this, {
|
|
96
|
-
children: u({
|
|
97
|
-
class: "inner",
|
|
98
|
-
outside: !0,
|
|
99
|
-
children: u({
|
|
100
|
-
class: "content",
|
|
101
|
-
children: [
|
|
102
|
-
h("e-popover-button", {
|
|
103
|
-
type: "close",
|
|
104
|
-
target: "parent",
|
|
105
|
-
class: "close-button",
|
|
106
|
-
lightChildren: [
|
|
107
|
-
f({
|
|
108
|
-
name: "close-button",
|
|
109
|
-
children: b({ class: "close-button-default" })
|
|
110
|
-
})
|
|
111
|
-
]
|
|
112
|
-
}),
|
|
113
|
-
f()
|
|
114
|
-
]
|
|
115
|
-
}),
|
|
116
|
-
ref: (i) => l(this, s, i)
|
|
117
|
-
})
|
|
118
|
-
}), l(this, n, new ResizeObserver(() => {
|
|
119
|
-
r(this, s).scrollHeight > r(this, s).clientHeight ? this.classList.add("overflow") : this.classList.remove("overflow");
|
|
120
|
-
})));
|
|
121
|
-
}
|
|
122
|
-
connectedCallback() {
|
|
123
|
-
super.connectedCallback(), r(this, n).observe(this);
|
|
124
|
-
}
|
|
125
|
-
disconnectedCallback() {
|
|
126
|
-
super.disconnectedCallback(), r(this, n).disconnect();
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
n = new WeakMap(), s = new WeakMap();
|
|
130
|
-
customElements.get("e-modal") || customElements.define("e-modal", y);
|
|
131
|
-
export {
|
|
132
|
-
y as ModalElement
|
|
133
|
-
};
|
package/lib/select/index.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-BpsQqM-8.cjs");exports.SelectElement=e.SelectElement;exports.SelectHeadElement=e.SelectHeadElement;exports.SelectOptionElement=e.SelectOptionElement;exports.SelectUserElement=e.SelectUserElement;
|
package/lib/select/index.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
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;
|