@pie-qti/player-elements 0.1.24 → 0.1.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ItemToolBar-d36g3aw4-B6TGPyKt.js +3079 -0
- package/dist/ItemToolBar-d36g3aw4-B6TGPyKt.js.map +1 -0
- package/dist/{define-D7_K0JFy.js → define-D6MsIPs4.js} +1902 -4395
- package/dist/define-D6MsIPs4.js.map +1 -0
- package/dist/dist-BSG0NOza.js +229 -0
- package/dist/dist-BSG0NOza.js.map +1 -0
- package/dist/{dist-ffJZTPTU.js → dist-C8BDh5vZ.js} +987 -707
- package/dist/dist-C8BDh5vZ.js.map +1 -0
- package/dist/dist-CQel8-vi.js +2507 -0
- package/dist/dist-CQel8-vi.js.map +1 -0
- package/dist/{dist-BaQdJU08.js → dist-L-bDDBry.js} +116 -103
- package/dist/dist-L-bDDBry.js.map +1 -0
- package/dist/{element-class-DQy2cIPM-CldZrSRR.js → element-class-B_qAd8ET-MnL2rzKs.js} +4938 -4241
- package/dist/element-class-B_qAd8ET-MnL2rzKs.js.map +1 -0
- package/dist/{element-DSCNeDLu.js → element-rqU0mnAg.js} +2 -2
- package/dist/{element-DSCNeDLu.js.map → element-rqU0mnAg.js.map} +1 -1
- package/dist/elements.js +3 -3
- package/dist/index.js +2 -2
- package/dist/item-toolbar-element-BgqPFwsS.js +1990 -0
- package/dist/item-toolbar-element-BgqPFwsS.js.map +1 -0
- package/dist/{language-tags-DVlRltrl.js → language-tags-BwFWXo71.js} +3 -3
- package/dist/{language-tags-DVlRltrl.js.map → language-tags-BwFWXo71.js.map} +1 -1
- package/dist/{nl-NL-BeQBX6yq.js → nl-NL-BRA_1Wcl.js} +5 -3
- package/dist/nl-NL-BRA_1Wcl.js.map +1 -0
- package/dist/pie-DwmznDHb.js +363 -0
- package/dist/pie-DwmznDHb.js.map +1 -0
- package/dist/pie-assessment-toolkit-Cruxm385.js +5 -0
- package/dist/pie-assessment-toolkit-Cruxm385.js.map +1 -0
- package/dist/pie-assessment-toolkit-DJfg6laX.js +5 -0
- package/dist/pie-assessment-toolkit-DJfg6laX.js.map +1 -0
- package/dist/{pie-assessment-toolkit-element-CpiB3twr.js → pie-assessment-toolkit-element-CT5UuvVY.js} +1364 -1203
- package/dist/pie-assessment-toolkit-element-CT5UuvVY.js.map +1 -0
- package/dist/pie-tool-calculator-Crfk-IZe.js +378 -0
- package/dist/pie-tool-calculator-Crfk-IZe.js.map +1 -0
- package/dist/{provider-Y5PhmTAu.js → provider-gBXlGb0d.js} +3 -3
- package/dist/{provider-Y5PhmTAu.js.map → provider-gBXlGb0d.js.map} +1 -1
- package/dist/public/api.d.ts +1 -1
- package/dist/register-players.js +1 -1
- package/dist/register.js +26177 -20539
- package/dist/register.js.map +1 -1
- package/dist/{resolveItems-D8DJkv-4.js → resolveItems-D18skYZx.js} +2 -2
- package/dist/{resolveItems-D8DJkv-4.js.map → resolveItems-D18skYZx.js.map} +1 -1
- package/dist/{root-DSkIM1v3.js → root-dCY6j_Hh.js} +3 -3
- package/dist/{root-DSkIM1v3.js.map → root-dCY6j_Hh.js.map} +1 -1
- package/dist/tag-names-DZGvnAgd.js +2495 -0
- package/dist/tag-names-DZGvnAgd.js.map +1 -0
- package/dist/{tool-tts-inline-B71NTBbb.js → tool-tts-inline-k3hLJUfp.js} +1315 -1303
- package/dist/tool-tts-inline-k3hLJUfp.js.map +1 -0
- package/package.json +8 -8
- package/dist/define-D7_K0JFy.js.map +0 -1
- package/dist/dist-BRTWr852.js +0 -5809
- package/dist/dist-BRTWr852.js.map +0 -1
- package/dist/dist-BaQdJU08.js.map +0 -1
- package/dist/dist-DwvskOs6.js +0 -220
- package/dist/dist-DwvskOs6.js.map +0 -1
- package/dist/dist-ffJZTPTU.js.map +0 -1
- package/dist/element-class-DQy2cIPM-CldZrSRR.js.map +0 -1
- package/dist/item-toolbar-element-BW9Y_n5x.js +0 -1990
- package/dist/item-toolbar-element-BW9Y_n5x.js.map +0 -1
- package/dist/nl-NL-BeQBX6yq.js.map +0 -1
- package/dist/pie-assessment-toolkit-element-CpiB3twr.js.map +0 -1
- package/dist/pie-tool-calculator-BiWMTJe7.js +0 -2992
- package/dist/pie-tool-calculator-BiWMTJe7.js.map +0 -1
- package/dist/tool-tts-inline-B71NTBbb.js.map +0 -1
|
@@ -0,0 +1,1990 @@
|
|
|
1
|
+
import { t as e } from "./provider-gBXlGb0d.js";
|
|
2
|
+
import { a as t, c as n, i as r, n as i, r as a, t as o } from "./dist-CQel8-vi.js";
|
|
3
|
+
import { C as s, D as c, E as l, F as u, I as d, L as f, M as p, N as m, O as h, P as g, R as ee, T as _, U as v, W as y, _ as te, a as ne, b, c as x, d as re, f as ie, g as ae, h as oe, j as S, k as C, l as w, m as se, n as T, o as ce, r as le, s as ue, t as E, u as D, v as O, w as k, x as A, z as j } from "./ItemToolBar-d36g3aw4-B6TGPyKt.js";
|
|
4
|
+
//#region ../../node_modules/.bun/@pie-players+pie-players-shared@0.3.73/node_modules/@pie-players/pie-players-shared/dist/components/vendor/nds/nds-icon-button.js
|
|
5
|
+
var de = globalThis, fe = de.ShadowRoot && (de.ShadyCSS === void 0 || de.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, pe = Symbol(), M = /* @__PURE__ */ new WeakMap(), me = class {
|
|
6
|
+
constructor(e, t, n) {
|
|
7
|
+
if (this._$cssResult$ = !0, n !== pe) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
8
|
+
this.cssText = e, this.t = t;
|
|
9
|
+
}
|
|
10
|
+
get styleSheet() {
|
|
11
|
+
let e = this.o, t = this.t;
|
|
12
|
+
if (fe && e === void 0) {
|
|
13
|
+
let n = t !== void 0 && t.length === 1;
|
|
14
|
+
n && (e = M.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), n && M.set(t, e));
|
|
15
|
+
}
|
|
16
|
+
return e;
|
|
17
|
+
}
|
|
18
|
+
toString() {
|
|
19
|
+
return this.cssText;
|
|
20
|
+
}
|
|
21
|
+
}, he = (e) => new me(typeof e == "string" ? e : e + "", void 0, pe), ge = (e, t) => {
|
|
22
|
+
if (fe) e.adoptedStyleSheets = t.map(((e) => e instanceof CSSStyleSheet ? e : e.styleSheet));
|
|
23
|
+
else for (let n of t) {
|
|
24
|
+
let t = document.createElement("style"), r = de.litNonce;
|
|
25
|
+
r !== void 0 && t.setAttribute("nonce", r), t.textContent = n.cssText, e.appendChild(t);
|
|
26
|
+
}
|
|
27
|
+
}, _e = fe ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((e) => {
|
|
28
|
+
let t = "";
|
|
29
|
+
for (let n of e.cssRules) t += n.cssText;
|
|
30
|
+
return he(t);
|
|
31
|
+
})(e) : e, { is: ve, defineProperty: ye, getOwnPropertyDescriptor: be, getOwnPropertyNames: N, getOwnPropertySymbols: xe, getPrototypeOf: Se } = Object, Ce = globalThis, we = Ce.trustedTypes, Te = we ? we.emptyScript : "", Ee = Ce.reactiveElementPolyfillSupport, P = (e, t) => e, F = {
|
|
32
|
+
toAttribute(e, t) {
|
|
33
|
+
switch (t) {
|
|
34
|
+
case Boolean:
|
|
35
|
+
e = e ? Te : null;
|
|
36
|
+
break;
|
|
37
|
+
case Object:
|
|
38
|
+
case Array: e = e == null ? e : JSON.stringify(e);
|
|
39
|
+
}
|
|
40
|
+
return e;
|
|
41
|
+
},
|
|
42
|
+
fromAttribute(e, t) {
|
|
43
|
+
let n = e;
|
|
44
|
+
switch (t) {
|
|
45
|
+
case Boolean:
|
|
46
|
+
n = e !== null;
|
|
47
|
+
break;
|
|
48
|
+
case Number:
|
|
49
|
+
n = e === null ? null : Number(e);
|
|
50
|
+
break;
|
|
51
|
+
case Object:
|
|
52
|
+
case Array: try {
|
|
53
|
+
n = JSON.parse(e);
|
|
54
|
+
} catch {
|
|
55
|
+
n = null;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return n;
|
|
59
|
+
}
|
|
60
|
+
}, I = (e, t) => !ve(e, t), De = {
|
|
61
|
+
attribute: !0,
|
|
62
|
+
type: String,
|
|
63
|
+
converter: F,
|
|
64
|
+
reflect: !1,
|
|
65
|
+
useDefault: !1,
|
|
66
|
+
hasChanged: I
|
|
67
|
+
};
|
|
68
|
+
Symbol.metadata ??= Symbol("metadata"), Ce.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
69
|
+
var Oe = class extends HTMLElement {
|
|
70
|
+
static addInitializer(e) {
|
|
71
|
+
this._$Ei(), (this.l ??= []).push(e);
|
|
72
|
+
}
|
|
73
|
+
static get observedAttributes() {
|
|
74
|
+
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
75
|
+
}
|
|
76
|
+
static createProperty(e, t = De) {
|
|
77
|
+
if (t.state && (t.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((t = Object.create(t)).wrapped = !0), this.elementProperties.set(e, t), !t.noAccessor) {
|
|
78
|
+
let n = Symbol(), r = this.getPropertyDescriptor(e, n, t);
|
|
79
|
+
r !== void 0 && ye(this.prototype, e, r);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
static getPropertyDescriptor(e, t, n) {
|
|
83
|
+
let { get: r, set: i } = be(this.prototype, e) ?? {
|
|
84
|
+
get() {
|
|
85
|
+
return this[t];
|
|
86
|
+
},
|
|
87
|
+
set(e) {
|
|
88
|
+
this[t] = e;
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
return {
|
|
92
|
+
get: r,
|
|
93
|
+
set(t) {
|
|
94
|
+
let a = r?.call(this);
|
|
95
|
+
i?.call(this, t), this.requestUpdate(e, a, n);
|
|
96
|
+
},
|
|
97
|
+
configurable: !0,
|
|
98
|
+
enumerable: !0
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
static getPropertyOptions(e) {
|
|
102
|
+
return this.elementProperties.get(e) ?? De;
|
|
103
|
+
}
|
|
104
|
+
static _$Ei() {
|
|
105
|
+
if (this.hasOwnProperty(P("elementProperties"))) return;
|
|
106
|
+
let e = Se(this);
|
|
107
|
+
e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
|
|
108
|
+
}
|
|
109
|
+
static finalize() {
|
|
110
|
+
if (this.hasOwnProperty(P("finalized"))) return;
|
|
111
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(P("properties"))) {
|
|
112
|
+
let e = this.properties, t = [...N(e), ...xe(e)];
|
|
113
|
+
for (let n of t) this.createProperty(n, e[n]);
|
|
114
|
+
}
|
|
115
|
+
let e = this[Symbol.metadata];
|
|
116
|
+
if (e !== null) {
|
|
117
|
+
let t = litPropertyMetadata.get(e);
|
|
118
|
+
if (t !== void 0) for (let [e, n] of t) this.elementProperties.set(e, n);
|
|
119
|
+
}
|
|
120
|
+
this._$Eh = /* @__PURE__ */ new Map();
|
|
121
|
+
for (let [e, t] of this.elementProperties) {
|
|
122
|
+
let n = this._$Eu(e, t);
|
|
123
|
+
n !== void 0 && this._$Eh.set(n, e);
|
|
124
|
+
}
|
|
125
|
+
this.elementStyles = this.finalizeStyles(this.styles);
|
|
126
|
+
}
|
|
127
|
+
static finalizeStyles(e) {
|
|
128
|
+
let t = [];
|
|
129
|
+
if (Array.isArray(e)) {
|
|
130
|
+
let n = new Set(e.flat(1 / 0).reverse());
|
|
131
|
+
for (let e of n) t.unshift(_e(e));
|
|
132
|
+
} else e !== void 0 && t.push(_e(e));
|
|
133
|
+
return t;
|
|
134
|
+
}
|
|
135
|
+
static _$Eu(e, t) {
|
|
136
|
+
let n = t.attribute;
|
|
137
|
+
return n === !1 ? void 0 : typeof n == "string" ? n : typeof e == "string" ? e.toLowerCase() : void 0;
|
|
138
|
+
}
|
|
139
|
+
constructor() {
|
|
140
|
+
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
141
|
+
}
|
|
142
|
+
_$Ev() {
|
|
143
|
+
this._$ES = new Promise(((e) => this.enableUpdating = e)), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(((e) => e(this)));
|
|
144
|
+
}
|
|
145
|
+
addController(e) {
|
|
146
|
+
(this._$EO ??= /* @__PURE__ */ new Set()).add(e), this.renderRoot !== void 0 && this.isConnected && e.hostConnected?.();
|
|
147
|
+
}
|
|
148
|
+
removeController(e) {
|
|
149
|
+
this._$EO?.delete(e);
|
|
150
|
+
}
|
|
151
|
+
_$E_() {
|
|
152
|
+
let e = /* @__PURE__ */ new Map(), t = this.constructor.elementProperties;
|
|
153
|
+
for (let n of t.keys()) this.hasOwnProperty(n) && (e.set(n, this[n]), delete this[n]);
|
|
154
|
+
e.size > 0 && (this._$Ep = e);
|
|
155
|
+
}
|
|
156
|
+
createRenderRoot() {
|
|
157
|
+
let e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
158
|
+
return ge(e, this.constructor.elementStyles), e;
|
|
159
|
+
}
|
|
160
|
+
connectedCallback() {
|
|
161
|
+
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach(((e) => e.hostConnected?.()));
|
|
162
|
+
}
|
|
163
|
+
enableUpdating(e) {}
|
|
164
|
+
disconnectedCallback() {
|
|
165
|
+
this._$EO?.forEach(((e) => e.hostDisconnected?.()));
|
|
166
|
+
}
|
|
167
|
+
attributeChangedCallback(e, t, n) {
|
|
168
|
+
this._$AK(e, n);
|
|
169
|
+
}
|
|
170
|
+
_$ET(e, t) {
|
|
171
|
+
let n = this.constructor.elementProperties.get(e), r = this.constructor._$Eu(e, n);
|
|
172
|
+
if (r !== void 0 && n.reflect === !0) {
|
|
173
|
+
let i = (n.converter?.toAttribute === void 0 ? F : n.converter).toAttribute(t, n.type);
|
|
174
|
+
this._$Em = e, i == null ? this.removeAttribute(r) : this.setAttribute(r, i), this._$Em = null;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
_$AK(e, t) {
|
|
178
|
+
let n = this.constructor, r = n._$Eh.get(e);
|
|
179
|
+
if (r !== void 0 && this._$Em !== r) {
|
|
180
|
+
let e = n.getPropertyOptions(r), i = typeof e.converter == "function" ? { fromAttribute: e.converter } : e.converter?.fromAttribute === void 0 ? F : e.converter;
|
|
181
|
+
this._$Em = r;
|
|
182
|
+
let a = i.fromAttribute(t, e.type);
|
|
183
|
+
this[r] = a ?? this._$Ej?.get(r) ?? a, this._$Em = null;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
requestUpdate(e, t, n) {
|
|
187
|
+
if (e !== void 0) {
|
|
188
|
+
let r = this.constructor, i = this[e];
|
|
189
|
+
if (n ??= r.getPropertyOptions(e), !((n.hasChanged ?? I)(i, t) || n.useDefault && n.reflect && i === this._$Ej?.get(e) && !this.hasAttribute(r._$Eu(e, n)))) return;
|
|
190
|
+
this.C(e, t, n);
|
|
191
|
+
}
|
|
192
|
+
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
193
|
+
}
|
|
194
|
+
C(e, t, { useDefault: n, reflect: r, wrapped: i }, a) {
|
|
195
|
+
n && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(e) && (this._$Ej.set(e, a ?? t ?? this[e]), i !== !0 || a !== void 0) || (this._$AL.has(e) || (this.hasUpdated || n || (t = void 0), this._$AL.set(e, t)), r === !0 && this._$Em !== e && (this._$Eq ??= /* @__PURE__ */ new Set()).add(e));
|
|
196
|
+
}
|
|
197
|
+
async _$EP() {
|
|
198
|
+
this.isUpdatePending = !0;
|
|
199
|
+
try {
|
|
200
|
+
await this._$ES;
|
|
201
|
+
} catch (e) {
|
|
202
|
+
Promise.reject(e);
|
|
203
|
+
}
|
|
204
|
+
let e = this.scheduleUpdate();
|
|
205
|
+
return e != null && await e, !this.isUpdatePending;
|
|
206
|
+
}
|
|
207
|
+
scheduleUpdate() {
|
|
208
|
+
return this.performUpdate();
|
|
209
|
+
}
|
|
210
|
+
performUpdate() {
|
|
211
|
+
if (!this.isUpdatePending) return;
|
|
212
|
+
if (!this.hasUpdated) {
|
|
213
|
+
if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
|
|
214
|
+
for (let [e, t] of this._$Ep) this[e] = t;
|
|
215
|
+
this._$Ep = void 0;
|
|
216
|
+
}
|
|
217
|
+
let e = this.constructor.elementProperties;
|
|
218
|
+
if (e.size > 0) for (let [t, n] of e) {
|
|
219
|
+
let { wrapped: e } = n, r = this[t];
|
|
220
|
+
e !== !0 || this._$AL.has(t) || r === void 0 || this.C(t, void 0, n, r);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
let e = !1, t = this._$AL;
|
|
224
|
+
try {
|
|
225
|
+
e = this.shouldUpdate(t), e ? (this.willUpdate(t), this._$EO?.forEach(((e) => e.hostUpdate?.())), this.update(t)) : this._$EM();
|
|
226
|
+
} catch (t) {
|
|
227
|
+
throw e = !1, this._$EM(), t;
|
|
228
|
+
}
|
|
229
|
+
e && this._$AE(t);
|
|
230
|
+
}
|
|
231
|
+
willUpdate(e) {}
|
|
232
|
+
_$AE(e) {
|
|
233
|
+
this._$EO?.forEach(((e) => e.hostUpdated?.())), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
|
|
234
|
+
}
|
|
235
|
+
_$EM() {
|
|
236
|
+
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
237
|
+
}
|
|
238
|
+
get updateComplete() {
|
|
239
|
+
return this.getUpdateComplete();
|
|
240
|
+
}
|
|
241
|
+
getUpdateComplete() {
|
|
242
|
+
return this._$ES;
|
|
243
|
+
}
|
|
244
|
+
shouldUpdate(e) {
|
|
245
|
+
return !0;
|
|
246
|
+
}
|
|
247
|
+
update(e) {
|
|
248
|
+
this._$Eq &&= this._$Eq.forEach(((e) => this._$ET(e, this[e]))), this._$EM();
|
|
249
|
+
}
|
|
250
|
+
updated(e) {}
|
|
251
|
+
firstUpdated(e) {}
|
|
252
|
+
};
|
|
253
|
+
Oe.elementStyles = [], Oe.shadowRootOptions = { mode: "open" }, Oe[P("elementProperties")] = /* @__PURE__ */ new Map(), Oe[P("finalized")] = /* @__PURE__ */ new Map(), Ee?.({ ReactiveElement: Oe }), (Ce.reactiveElementVersions ??= []).push("2.1.1");
|
|
254
|
+
var L = globalThis, ke = L.trustedTypes, Ae = ke ? ke.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, R = "$lit$", z = `lit$${Math.random().toFixed(9).slice(2)}$`, B = "?" + z, je = `<${B}>`, V = document, H = () => V.createComment(""), U = (e) => e === null || typeof e != "object" && typeof e != "function", Me = Array.isArray, Ne = (e) => Me(e) || typeof e?.[Symbol.iterator] == "function", W = "[ \n\f\r]", Pe = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Fe = /-->/g, Ie = />/g, G = RegExp(`>|${W}(?:([^\\s"'>=/]+)(${W}*=${W}*(?:[^
|
|
255
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), K = /'/g, q = /"/g, Le = /^(?:script|style|textarea|title)$/i, J = ((e) => (t, ...n) => ({
|
|
256
|
+
_$litType$: e,
|
|
257
|
+
strings: t,
|
|
258
|
+
values: n
|
|
259
|
+
}))(1), Y = Symbol.for("lit-noChange"), X = Symbol.for("lit-nothing"), Re = /* @__PURE__ */ new WeakMap(), Z = V.createTreeWalker(V, 129);
|
|
260
|
+
function ze(e, t) {
|
|
261
|
+
if (!Me(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
262
|
+
return Ae === void 0 ? t : Ae.createHTML(t);
|
|
263
|
+
}
|
|
264
|
+
var Be = (e, t) => {
|
|
265
|
+
let n = e.length - 1, r = [], i, a = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = Pe;
|
|
266
|
+
for (let t = 0; t < n; t++) {
|
|
267
|
+
let n = e[t], s, c, l = -1, u = 0;
|
|
268
|
+
for (; u < n.length && (o.lastIndex = u, c = o.exec(n), c !== null);) u = o.lastIndex, o === Pe ? c[1] === "!--" ? o = Fe : c[1] === void 0 ? c[2] === void 0 ? c[3] !== void 0 && (o = G) : (Le.test(c[2]) && (i = RegExp("</" + c[2], "g")), o = G) : o = Ie : o === G ? c[0] === ">" ? (o = i ?? Pe, l = -1) : c[1] === void 0 ? l = -2 : (l = o.lastIndex - c[2].length, s = c[1], o = c[3] === void 0 ? G : c[3] === "\"" ? q : K) : o === q || o === K ? o = G : o === Fe || o === Ie ? o = Pe : (o = G, i = void 0);
|
|
269
|
+
let d = o === G && e[t + 1].startsWith("/>") ? " " : "";
|
|
270
|
+
a += o === Pe ? n + je : l >= 0 ? (r.push(s), n.slice(0, l) + R + n.slice(l) + z + d) : n + z + (l === -2 ? t : d);
|
|
271
|
+
}
|
|
272
|
+
return [ze(e, a + (e[n] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
|
|
273
|
+
}, Ve = class e {
|
|
274
|
+
constructor({ strings: t, _$litType$: n }, r) {
|
|
275
|
+
let i;
|
|
276
|
+
this.parts = [];
|
|
277
|
+
let a = 0, o = 0, s = t.length - 1, c = this.parts, [l, u] = Be(t, n);
|
|
278
|
+
if (this.el = e.createElement(l, r), Z.currentNode = this.el.content, n === 2 || n === 3) {
|
|
279
|
+
let e = this.el.content.firstChild;
|
|
280
|
+
e.replaceWith(...e.childNodes);
|
|
281
|
+
}
|
|
282
|
+
for (; (i = Z.nextNode()) !== null && c.length < s;) {
|
|
283
|
+
if (i.nodeType === 1) {
|
|
284
|
+
if (i.hasAttributes()) for (let e of i.getAttributeNames()) if (e.endsWith(R)) {
|
|
285
|
+
let t = u[o++], n = i.getAttribute(e).split(z), r = /([.?@])?(.*)/.exec(t);
|
|
286
|
+
c.push({
|
|
287
|
+
type: 1,
|
|
288
|
+
index: a,
|
|
289
|
+
name: r[2],
|
|
290
|
+
strings: n,
|
|
291
|
+
ctor: r[1] === "." ? Ke : r[1] === "?" ? qe : r[1] === "@" ? Je : Ge
|
|
292
|
+
}), i.removeAttribute(e);
|
|
293
|
+
} else e.startsWith(z) && (c.push({
|
|
294
|
+
type: 6,
|
|
295
|
+
index: a
|
|
296
|
+
}), i.removeAttribute(e));
|
|
297
|
+
if (Le.test(i.tagName)) {
|
|
298
|
+
let e = i.textContent.split(z), t = e.length - 1;
|
|
299
|
+
if (t > 0) {
|
|
300
|
+
i.textContent = ke ? ke.emptyScript : "";
|
|
301
|
+
for (let n = 0; n < t; n++) i.append(e[n], H()), Z.nextNode(), c.push({
|
|
302
|
+
type: 2,
|
|
303
|
+
index: ++a
|
|
304
|
+
});
|
|
305
|
+
i.append(e[t], H());
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
} else if (i.nodeType === 8) {
|
|
309
|
+
if (i.data === B) c.push({
|
|
310
|
+
type: 2,
|
|
311
|
+
index: a
|
|
312
|
+
});
|
|
313
|
+
else {
|
|
314
|
+
let e = -1;
|
|
315
|
+
for (; (e = i.data.indexOf(z, e + 1)) !== -1;) c.push({
|
|
316
|
+
type: 7,
|
|
317
|
+
index: a
|
|
318
|
+
}), e += z.length - 1;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
a++;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
static createElement(e, t) {
|
|
325
|
+
let n = V.createElement("template");
|
|
326
|
+
return n.innerHTML = e, n;
|
|
327
|
+
}
|
|
328
|
+
};
|
|
329
|
+
function He(e, t, n = e, r) {
|
|
330
|
+
if (t === Y) return t;
|
|
331
|
+
let i = r === void 0 ? n._$Cl : n._$Co?.[r], a = U(t) ? void 0 : t._$litDirective$;
|
|
332
|
+
return i?.constructor !== a && (i?._$AO?.(!1), a === void 0 ? i = void 0 : (i = new a(e), i._$AT(e, n, r)), r === void 0 ? n._$Cl = i : (n._$Co ??= [])[r] = i), i !== void 0 && (t = He(e, i._$AS(e, t.values), i, r)), t;
|
|
333
|
+
}
|
|
334
|
+
var Ue = class {
|
|
335
|
+
constructor(e, t) {
|
|
336
|
+
this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
|
|
337
|
+
}
|
|
338
|
+
get parentNode() {
|
|
339
|
+
return this._$AM.parentNode;
|
|
340
|
+
}
|
|
341
|
+
get _$AU() {
|
|
342
|
+
return this._$AM._$AU;
|
|
343
|
+
}
|
|
344
|
+
u(e) {
|
|
345
|
+
let { el: { content: t }, parts: n } = this._$AD, r = (e?.creationScope ?? V).importNode(t, !0);
|
|
346
|
+
Z.currentNode = r;
|
|
347
|
+
let i = Z.nextNode(), a = 0, o = 0, s = n[0];
|
|
348
|
+
for (; s !== void 0;) {
|
|
349
|
+
if (a === s.index) {
|
|
350
|
+
let t;
|
|
351
|
+
s.type === 2 ? t = new We(i, i.nextSibling, this, e) : s.type === 1 ? t = new s.ctor(i, s.name, s.strings, this, e) : s.type === 6 && (t = new Ye(i, this, e)), this._$AV.push(t), s = n[++o];
|
|
352
|
+
}
|
|
353
|
+
a !== s?.index && (i = Z.nextNode(), a++);
|
|
354
|
+
}
|
|
355
|
+
return Z.currentNode = V, r;
|
|
356
|
+
}
|
|
357
|
+
p(e) {
|
|
358
|
+
let t = 0;
|
|
359
|
+
for (let n of this._$AV) n !== void 0 && (n.strings === void 0 ? n._$AI(e[t]) : (n._$AI(e, n, t), t += n.strings.length - 2)), t++;
|
|
360
|
+
}
|
|
361
|
+
}, We = class e {
|
|
362
|
+
get _$AU() {
|
|
363
|
+
return this._$AM?._$AU ?? this._$Cv;
|
|
364
|
+
}
|
|
365
|
+
constructor(e, t, n, r) {
|
|
366
|
+
this.type = 2, this._$AH = X, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = n, this.options = r, this._$Cv = r?.isConnected ?? !0;
|
|
367
|
+
}
|
|
368
|
+
get parentNode() {
|
|
369
|
+
let e = this._$AA.parentNode, t = this._$AM;
|
|
370
|
+
return t !== void 0 && e?.nodeType === 11 && (e = t.parentNode), e;
|
|
371
|
+
}
|
|
372
|
+
get startNode() {
|
|
373
|
+
return this._$AA;
|
|
374
|
+
}
|
|
375
|
+
get endNode() {
|
|
376
|
+
return this._$AB;
|
|
377
|
+
}
|
|
378
|
+
_$AI(e, t = this) {
|
|
379
|
+
e = He(this, e, t), U(e) ? e === X || e == null || e === "" ? (this._$AH !== X && this._$AR(), this._$AH = X) : e !== this._$AH && e !== Y && this._(e) : e._$litType$ === void 0 ? e.nodeType === void 0 ? Ne(e) ? this.k(e) : this._(e) : this.T(e) : this.$(e);
|
|
380
|
+
}
|
|
381
|
+
O(e) {
|
|
382
|
+
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
383
|
+
}
|
|
384
|
+
T(e) {
|
|
385
|
+
this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
|
|
386
|
+
}
|
|
387
|
+
_(e) {
|
|
388
|
+
this._$AH !== X && U(this._$AH) ? this._$AA.nextSibling.data = e : this.T(V.createTextNode(e)), this._$AH = e;
|
|
389
|
+
}
|
|
390
|
+
$(e) {
|
|
391
|
+
let { values: t, _$litType$: n } = e, r = typeof n == "number" ? this._$AC(e) : (n.el === void 0 && (n.el = Ve.createElement(ze(n.h, n.h[0]), this.options)), n);
|
|
392
|
+
if (this._$AH?._$AD === r) this._$AH.p(t);
|
|
393
|
+
else {
|
|
394
|
+
let e = new Ue(r, this), n = e.u(this.options);
|
|
395
|
+
e.p(t), this.T(n), this._$AH = e;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
_$AC(e) {
|
|
399
|
+
let t = Re.get(e.strings);
|
|
400
|
+
return t === void 0 && Re.set(e.strings, t = new Ve(e)), t;
|
|
401
|
+
}
|
|
402
|
+
k(t) {
|
|
403
|
+
Me(this._$AH) || (this._$AH = [], this._$AR());
|
|
404
|
+
let n = this._$AH, r, i = 0;
|
|
405
|
+
for (let a of t) i === n.length ? n.push(r = new e(this.O(H()), this.O(H()), this, this.options)) : r = n[i], r._$AI(a), i++;
|
|
406
|
+
i < n.length && (this._$AR(r && r._$AB.nextSibling, i), n.length = i);
|
|
407
|
+
}
|
|
408
|
+
_$AR(e = this._$AA.nextSibling, t) {
|
|
409
|
+
for (this._$AP?.(!1, !0, t); e !== this._$AB;) {
|
|
410
|
+
let t = e.nextSibling;
|
|
411
|
+
e.remove(), e = t;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
setConnected(e) {
|
|
415
|
+
this._$AM === void 0 && (this._$Cv = e, this._$AP?.(e));
|
|
416
|
+
}
|
|
417
|
+
}, Ge = class {
|
|
418
|
+
get tagName() {
|
|
419
|
+
return this.element.tagName;
|
|
420
|
+
}
|
|
421
|
+
get _$AU() {
|
|
422
|
+
return this._$AM._$AU;
|
|
423
|
+
}
|
|
424
|
+
constructor(e, t, n, r, i) {
|
|
425
|
+
this.type = 1, this._$AH = X, this._$AN = void 0, this.element = e, this.name = t, this._$AM = r, this.options = i, n.length > 2 || n[0] !== "" || n[1] !== "" ? (this._$AH = Array(n.length - 1).fill(/* @__PURE__ */ new String()), this.strings = n) : this._$AH = X;
|
|
426
|
+
}
|
|
427
|
+
_$AI(e, t = this, n, r) {
|
|
428
|
+
let i = this.strings, a = !1;
|
|
429
|
+
if (i === void 0) e = He(this, e, t, 0), a = !U(e) || e !== this._$AH && e !== Y, a && (this._$AH = e);
|
|
430
|
+
else {
|
|
431
|
+
let r = e, o, s;
|
|
432
|
+
for (e = i[0], o = 0; o < i.length - 1; o++) s = He(this, r[n + o], t, o), s === Y && (s = this._$AH[o]), a ||= !U(s) || s !== this._$AH[o], s === X ? e = X : e !== X && (e += (s ?? "") + i[o + 1]), this._$AH[o] = s;
|
|
433
|
+
}
|
|
434
|
+
a && !r && this.j(e);
|
|
435
|
+
}
|
|
436
|
+
j(e) {
|
|
437
|
+
e === X ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
438
|
+
}
|
|
439
|
+
}, Ke = class extends Ge {
|
|
440
|
+
constructor() {
|
|
441
|
+
super(...arguments), this.type = 3;
|
|
442
|
+
}
|
|
443
|
+
j(e) {
|
|
444
|
+
this.element[this.name] = e === X ? void 0 : e;
|
|
445
|
+
}
|
|
446
|
+
}, qe = class extends Ge {
|
|
447
|
+
constructor() {
|
|
448
|
+
super(...arguments), this.type = 4;
|
|
449
|
+
}
|
|
450
|
+
j(e) {
|
|
451
|
+
this.element.toggleAttribute(this.name, !!e && e !== X);
|
|
452
|
+
}
|
|
453
|
+
}, Je = class extends Ge {
|
|
454
|
+
constructor(e, t, n, r, i) {
|
|
455
|
+
super(e, t, n, r, i), this.type = 5;
|
|
456
|
+
}
|
|
457
|
+
_$AI(e, t = this) {
|
|
458
|
+
if ((e = He(this, e, t, 0) ?? X) === Y) return;
|
|
459
|
+
let n = this._$AH, r = e === X && n !== X || e.capture !== n.capture || e.once !== n.once || e.passive !== n.passive, i = e !== X && (n === X || r);
|
|
460
|
+
r && this.element.removeEventListener(this.name, this, n), i && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
|
461
|
+
}
|
|
462
|
+
handleEvent(e) {
|
|
463
|
+
typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, e) : this._$AH.handleEvent(e);
|
|
464
|
+
}
|
|
465
|
+
}, Ye = class {
|
|
466
|
+
constructor(e, t, n) {
|
|
467
|
+
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = n;
|
|
468
|
+
}
|
|
469
|
+
get _$AU() {
|
|
470
|
+
return this._$AM._$AU;
|
|
471
|
+
}
|
|
472
|
+
_$AI(e) {
|
|
473
|
+
He(this, e);
|
|
474
|
+
}
|
|
475
|
+
}, Xe = L.litHtmlPolyfillSupport;
|
|
476
|
+
Xe?.(Ve, We), (L.litHtmlVersions ??= []).push("3.3.1");
|
|
477
|
+
var Ze = (e, t, n) => {
|
|
478
|
+
let r = n?.renderBefore ?? t, i = r._$litPart$;
|
|
479
|
+
if (i === void 0) {
|
|
480
|
+
let e = n?.renderBefore ?? null;
|
|
481
|
+
r._$litPart$ = i = new We(t.insertBefore(H(), e), e, void 0, n ?? {});
|
|
482
|
+
}
|
|
483
|
+
return i._$AI(e), i;
|
|
484
|
+
}, Qe = globalThis, $e = class extends Oe {
|
|
485
|
+
constructor() {
|
|
486
|
+
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
487
|
+
}
|
|
488
|
+
createRenderRoot() {
|
|
489
|
+
let e = super.createRenderRoot();
|
|
490
|
+
return this.renderOptions.renderBefore ??= e.firstChild, e;
|
|
491
|
+
}
|
|
492
|
+
update(e) {
|
|
493
|
+
let t = this.render();
|
|
494
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = Ze(t, this.renderRoot, this.renderOptions);
|
|
495
|
+
}
|
|
496
|
+
connectedCallback() {
|
|
497
|
+
super.connectedCallback(), this._$Do?.setConnected(!0);
|
|
498
|
+
}
|
|
499
|
+
disconnectedCallback() {
|
|
500
|
+
super.disconnectedCallback(), this._$Do?.setConnected(!1);
|
|
501
|
+
}
|
|
502
|
+
render() {
|
|
503
|
+
return Y;
|
|
504
|
+
}
|
|
505
|
+
};
|
|
506
|
+
$e._$litElement$ = !0, $e.finalized = !0, Qe.litElementHydrateSupport?.({ LitElement: $e });
|
|
507
|
+
var et = Qe.litElementPolyfillSupport;
|
|
508
|
+
et?.({ LitElement: $e }), (Qe.litElementVersions ??= []).push("4.2.1");
|
|
509
|
+
var tt = (e) => (t, n) => {
|
|
510
|
+
n === void 0 ? customElements.get(e) || customElements.define(e, t) : n.addInitializer((() => {
|
|
511
|
+
customElements.get(e) || customElements.define(e, t);
|
|
512
|
+
}));
|
|
513
|
+
}, nt = {
|
|
514
|
+
attribute: !0,
|
|
515
|
+
type: String,
|
|
516
|
+
converter: F,
|
|
517
|
+
reflect: !1,
|
|
518
|
+
hasChanged: I
|
|
519
|
+
}, rt = (e = nt, t, n) => {
|
|
520
|
+
let { kind: r, metadata: i } = n, a = globalThis.litPropertyMetadata.get(i);
|
|
521
|
+
if (a === void 0 && globalThis.litPropertyMetadata.set(i, a = /* @__PURE__ */ new Map()), r === "setter" && ((e = Object.create(e)).wrapped = !0), a.set(n.name, e), r === "accessor") {
|
|
522
|
+
let { name: r } = n;
|
|
523
|
+
return {
|
|
524
|
+
set(n) {
|
|
525
|
+
let i = t.get.call(this);
|
|
526
|
+
t.set.call(this, n), this.requestUpdate(r, i, e);
|
|
527
|
+
},
|
|
528
|
+
init(t) {
|
|
529
|
+
return t !== void 0 && this.C(r, void 0, e, t), t;
|
|
530
|
+
}
|
|
531
|
+
};
|
|
532
|
+
}
|
|
533
|
+
if (r === "setter") {
|
|
534
|
+
let { name: r } = n;
|
|
535
|
+
return function(n) {
|
|
536
|
+
let i = this[r];
|
|
537
|
+
t.call(this, n), this.requestUpdate(r, i, e);
|
|
538
|
+
};
|
|
539
|
+
}
|
|
540
|
+
throw Error("Unsupported decorator location: " + r);
|
|
541
|
+
};
|
|
542
|
+
function Q(e) {
|
|
543
|
+
return (t, n) => typeof n == "object" ? rt(e, t, n) : ((e, t, n) => {
|
|
544
|
+
let r = t.hasOwnProperty(n);
|
|
545
|
+
return t.constructor.createProperty(n, e), r ? Object.getOwnPropertyDescriptor(t, n) : void 0;
|
|
546
|
+
})(e, t, n);
|
|
547
|
+
}
|
|
548
|
+
var it = Object.defineProperty, at = Object.getOwnPropertyDescriptor, $ = (e, t, n, r) => {
|
|
549
|
+
for (var i = r > 1 ? void 0 : r ? at(t, n) : t, a = e.length - 1, o; a >= 0; a--) (o = e[a]) && (i = (r ? o(t, n, i) : o(i)) || i);
|
|
550
|
+
return r && i && it(t, n, i), i;
|
|
551
|
+
}, ot = class extends $e {
|
|
552
|
+
constructor() {
|
|
553
|
+
super(...arguments), this.variant = "primary", this.size = "default", this.type = "circle", this.state = "default", this.iconName = "home", this.disabled = !1, this.buttonAriaLabel = "Icon button";
|
|
554
|
+
}
|
|
555
|
+
createRenderRoot() {
|
|
556
|
+
return this;
|
|
557
|
+
}
|
|
558
|
+
connectedCallback() {
|
|
559
|
+
if (super.connectedCallback(), !document.querySelector("link[href*=\"Roboto\"]")) {
|
|
560
|
+
let e = document.createElement("link");
|
|
561
|
+
e.rel = "stylesheet", e.href = "https://ui.renaissance.com/fonts/Roboto/style.css", document.head.appendChild(e);
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
set shape(e) {
|
|
565
|
+
this.type = e;
|
|
566
|
+
}
|
|
567
|
+
get shape() {
|
|
568
|
+
return this.type;
|
|
569
|
+
}
|
|
570
|
+
get buttonClasses() {
|
|
571
|
+
return [
|
|
572
|
+
"nds-icon-button",
|
|
573
|
+
`nds-icon-button--${this.variant}`,
|
|
574
|
+
`nds-icon-button--${this.size}`,
|
|
575
|
+
`nds-icon-button--${this.type}`,
|
|
576
|
+
this.state === "default" ? "" : `nds-icon-button--${this.state}`,
|
|
577
|
+
this.disabled ? "nds-icon-button--disabled" : ""
|
|
578
|
+
].filter(Boolean).join(" ");
|
|
579
|
+
}
|
|
580
|
+
handleClick(e) {
|
|
581
|
+
if (this.disabled) {
|
|
582
|
+
e.preventDefault(), e.stopPropagation();
|
|
583
|
+
return;
|
|
584
|
+
}
|
|
585
|
+
this.dispatchEvent(new CustomEvent("icon-button-click", {
|
|
586
|
+
bubbles: !0,
|
|
587
|
+
composed: !0,
|
|
588
|
+
detail: { originalEvent: e }
|
|
589
|
+
}));
|
|
590
|
+
}
|
|
591
|
+
render() {
|
|
592
|
+
return J`
|
|
593
|
+
<style>
|
|
594
|
+
nds-icon-button {
|
|
595
|
+
display: inline-block;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
.nds-icon-button {
|
|
599
|
+
display: inline-flex;
|
|
600
|
+
align-items: center;
|
|
601
|
+
justify-content: center;
|
|
602
|
+
cursor: pointer;
|
|
603
|
+
font-family: var(--font-family-roboto, "Roboto", sans-serif);
|
|
604
|
+
font-weight: var(--font-weight-regular, 400);
|
|
605
|
+
line-height: 1;
|
|
606
|
+
text-decoration: none;
|
|
607
|
+
background: none;
|
|
608
|
+
position: relative;
|
|
609
|
+
box-sizing: border-box;
|
|
610
|
+
margin: 0;
|
|
611
|
+
padding: 0;
|
|
612
|
+
border: none;
|
|
613
|
+
transition: background-color 0.2s ease-in-out,
|
|
614
|
+
color 0.2s ease-in-out,
|
|
615
|
+
box-shadow 0.2s ease-in-out;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
/* ── Sizes ── */
|
|
619
|
+
.nds-icon-button--small {
|
|
620
|
+
width: var(--height-32, 32px);
|
|
621
|
+
height: var(--height-32, 32px);
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
.nds-icon-button--medium {
|
|
625
|
+
width: var(--height-36, 36px);
|
|
626
|
+
height: var(--height-36, 36px);
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
.nds-icon-button--default {
|
|
630
|
+
width: var(--height-40, 40px);
|
|
631
|
+
height: var(--height-40, 40px);
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
.nds-icon-button--large {
|
|
635
|
+
width: var(--height-48, 48px);
|
|
636
|
+
height: var(--height-48, 48px);
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
/* ── Shapes ── */
|
|
640
|
+
.nds-icon-button--circle {
|
|
641
|
+
border-radius: var(--radius-circle, 50%);
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
.nds-icon-button--rounded {
|
|
645
|
+
border-radius: var(--radius-8, 8px);
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
/* ── Primary ── */
|
|
649
|
+
.nds-icon-button--primary {
|
|
650
|
+
background-color: var(--color-interactive-blue, #146eb3);
|
|
651
|
+
color: var(--color-primary-white, #ffffff);
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
.nds-icon-button--primary:hover:not(:disabled):not(.nds-icon-button--disabled) {
|
|
655
|
+
box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
.nds-icon-button--primary:active:not(:disabled):not(.nds-icon-button--disabled) {
|
|
659
|
+
box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
/* ── Secondary ── */
|
|
663
|
+
.nds-icon-button--secondary {
|
|
664
|
+
background-color: var(--color-primary-white, #ffffff);
|
|
665
|
+
color: var(--color-interactive-blue, #146eb3);
|
|
666
|
+
box-shadow: inset 0 0 0 var(--stroke-1, 1px) var(--color-interactive-blue, #146eb3);
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
.nds-icon-button--secondary:hover:not(:disabled):not(.nds-icon-button--disabled) {
|
|
670
|
+
background-color: var(--color-interactive-blue, #146eb3);
|
|
671
|
+
color: var(--color-primary-white, #ffffff);
|
|
672
|
+
box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
.nds-icon-button--secondary:active:not(:disabled):not(.nds-icon-button--disabled) {
|
|
676
|
+
background-color: var(--color-interactive-blue, #146eb3);
|
|
677
|
+
color: var(--color-primary-white, #ffffff);
|
|
678
|
+
box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
/* ── Tertiary ── */
|
|
682
|
+
.nds-icon-button--tertiary {
|
|
683
|
+
background-color: var(--color-new-gray, #f3f5f7);
|
|
684
|
+
color: var(--color-interactive-blue, #146eb3);
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
.nds-icon-button--tertiary:hover:not(:disabled):not(.nds-icon-button--disabled) {
|
|
688
|
+
box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-interactive-blue, #146eb3);
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
.nds-icon-button--tertiary:active:not(:disabled):not(.nds-icon-button--disabled) {
|
|
692
|
+
box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
/* ── Ghost ── */
|
|
696
|
+
.nds-icon-button--ghost {
|
|
697
|
+
background-color: transparent;
|
|
698
|
+
color: var(--color-interactive-blue, #146eb3);
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
.nds-icon-button--ghost:hover:not(:disabled):not(.nds-icon-button--disabled) {
|
|
702
|
+
background-color: var(--color-new-gray, #f3f5f7);
|
|
703
|
+
box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-interactive-blue, #146eb3);
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
.nds-icon-button--ghost:active:not(:disabled):not(.nds-icon-button--disabled) {
|
|
707
|
+
background-color: var(--color-new-gray, #f3f5f7);
|
|
708
|
+
box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
/* ── Dark (for dark backgrounds) ── */
|
|
712
|
+
.nds-icon-button--dark {
|
|
713
|
+
background-color: transparent;
|
|
714
|
+
color: var(--color-primary-white, #ffffff);
|
|
715
|
+
box-shadow: inset 0 0 0 var(--stroke-1, 1px) var(--color-primary-white, #ffffff);
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
.nds-icon-button--dark:hover:not(:disabled):not(.nds-icon-button--disabled) {
|
|
719
|
+
background-color: var(--color-interactive-blue, #146eb3);
|
|
720
|
+
box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-white, #ffffff);
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
.nds-icon-button--dark:active:not(:disabled):not(.nds-icon-button--disabled) {
|
|
724
|
+
background-color: var(--color-interactive-blue, #146eb3);
|
|
725
|
+
box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-white, #ffffff);
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
/* ── Disabled ── */
|
|
729
|
+
.nds-icon-button--disabled,
|
|
730
|
+
.nds-icon-button:disabled {
|
|
731
|
+
opacity: 0.5;
|
|
732
|
+
cursor: not-allowed;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
/* ── Icon sizing ── */
|
|
736
|
+
.nds-icon-button__icon {
|
|
737
|
+
line-height: 1;
|
|
738
|
+
display: inline-flex;
|
|
739
|
+
align-items: center;
|
|
740
|
+
justify-content: center;
|
|
741
|
+
color: inherit;
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
.nds-icon-button--small .nds-icon-button__icon {
|
|
745
|
+
font-size: var(--nds-icon-small, 12px);
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
.nds-icon-button--medium .nds-icon-button__icon {
|
|
749
|
+
font-size: var(--nds-icon-medium, 14px);
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
.nds-icon-button--default .nds-icon-button__icon {
|
|
753
|
+
font-size: var(--nds-icon-default, 16px);
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
.nds-icon-button--large .nds-icon-button__icon {
|
|
757
|
+
font-size: var(--nds-icon-large, 20px);
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
/* ── Focus ── */
|
|
761
|
+
.nds-icon-button:focus-visible {
|
|
762
|
+
outline: 2px solid var(--color-focus-blue, #2b87ff);
|
|
763
|
+
outline-offset: 2px;
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
/* ── Reduced motion ── */
|
|
767
|
+
@media (prefers-reduced-motion: reduce) {
|
|
768
|
+
.nds-icon-button {
|
|
769
|
+
transition: none;
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
</style>
|
|
773
|
+
<button
|
|
774
|
+
type="button"
|
|
775
|
+
class="${this.buttonClasses}"
|
|
776
|
+
?disabled="${this.disabled}"
|
|
777
|
+
aria-disabled="${this.disabled ? "true" : "false"}"
|
|
778
|
+
aria-label="${this.buttonAriaLabel}"
|
|
779
|
+
@click="${this.handleClick}"
|
|
780
|
+
>
|
|
781
|
+
<i class="fa-light fa-${this.iconName} nds-icon-button__icon" aria-hidden="true"></i>
|
|
782
|
+
</button>
|
|
783
|
+
`;
|
|
784
|
+
}
|
|
785
|
+
};
|
|
786
|
+
$([Q()], ot.prototype, "variant", 2), $([Q()], ot.prototype, "size", 2), $([Q()], ot.prototype, "type", 2), $([Q()], ot.prototype, "state", 2), $([Q({ attribute: "icon-name" })], ot.prototype, "iconName", 2), $([Q({ type: Boolean })], ot.prototype, "disabled", 2), $([Q({ attribute: "button-aria-label" })], ot.prototype, "buttonAriaLabel", 2), $([Q()], ot.prototype, "shape", 1), ot = $([tt("nds-icon-button")], ot);
|
|
787
|
+
//#endregion
|
|
788
|
+
//#region ../../node_modules/.bun/@pie-players+pie-assessment-toolkit@0.3.73+4df9da1290a48f6a/node_modules/@pie-players/pie-assessment-toolkit/dist/components/chunks/ItemToolBar-byq80z42.js
|
|
789
|
+
function st(e) {
|
|
790
|
+
return typeof e.href == "string";
|
|
791
|
+
}
|
|
792
|
+
function ct(e) {
|
|
793
|
+
if (!e || typeof e != "object" || Array.isArray(e)) return !1;
|
|
794
|
+
let t = e;
|
|
795
|
+
if (typeof t.id != "string" || t.id.trim().length === 0 || typeof t.label != "string" || t.label.trim().length === 0 || t.ariaLabel !== void 0 && typeof t.ariaLabel != "string" || t.icon !== void 0 && typeof t.icon != "string" || t.tooltip !== void 0 && typeof t.tooltip != "string" || t.active !== void 0 && typeof t.active != "boolean" || t.disabled !== void 0 && typeof t.disabled != "boolean") return !1;
|
|
796
|
+
let n = typeof t.href == "string", r = typeof t.onClick == "function";
|
|
797
|
+
return n === r ? !1 : n ? !0 : r;
|
|
798
|
+
}
|
|
799
|
+
function lt(e) {
|
|
800
|
+
return typeof e == "string" && e.trimStart().startsWith("<svg");
|
|
801
|
+
}
|
|
802
|
+
function ut(e) {
|
|
803
|
+
return typeof e == "string" && e.trimStart().startsWith("http");
|
|
804
|
+
}
|
|
805
|
+
var dt = {
|
|
806
|
+
calculator: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M7 2h10a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Zm0 2v4h10V4H7Zm0 6v2h2v-2H7Zm4 0v2h2v-2h-2Zm4 0v2h2v-2h-2Zm-8 4v2h2v-2H7Zm4 0v2h2v-2h-2Zm4 0v2h2v-2h-2Zm-8 4v2h2v-2H7Zm4 0v2h2v-2h-2Zm4 0v2h2v-2h-2Z\" fill=\"currentColor\"/></svg>",
|
|
807
|
+
"volume-up": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M14 3.23v2.06A7.002 7.002 0 0 1 19 12a7 7 0 0 1-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77Zm-2 17.75V3L7 8H3v8h4l5 5Zm4.5-9a4.5 4.5 0 0 0-2.5-4.03v8.05A4.5 4.5 0 0 0 16.5 12Z\" fill=\"currentColor\"/></svg>",
|
|
808
|
+
swatch: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M12 3a9 9 0 1 0 9 9c0-.55-.45-1-1-1h-2.5a1.5 1.5 0 0 1 0-3H20a1 1 0 0 0 1-1 8.99 8.99 0 0 0-9-4Zm-5.5 9A1.5 1.5 0 1 1 8 13.5 1.5 1.5 0 0 1 6.5 12Zm3-4A1.5 1.5 0 1 1 11 9.5 1.5 1.5 0 0 1 9.5 8Zm5 0A1.5 1.5 0 1 1 16 9.5 1.5 1.5 0 0 1 14.5 8Z\" fill=\"currentColor\"/></svg>",
|
|
809
|
+
"chart-bar": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M4.75 5a.76.76 0 0 1 .75.75v11c0 .438.313.75.75.75h13a.76.76 0 0 1 .696 1.039.74.74 0 0 1-.696.461h-13C5 19 4 18 4 16.75v-11A.74.74 0 0 1 4.75 5ZM8 8.25a.74.74 0 0 1 .75-.75h6.5a.76.76 0 0 1 .696 1.039.74.74 0 0 1-.696.461h-6.5A.722.722 0 0 1 8 8.25Zm.75 2.25h4.5a.76.76 0 0 1 .696 1.039.74.74 0 0 1-.696.461h-4.5a.723.723 0 0 1-.75-.75.74.74 0 0 1 .75-.75Zm0 3h8.5a.76.76 0 0 1 .696 1.039.74.74 0 0 1-.696.461h-8.5a.723.723 0 0 1-.75-.75.74.74 0 0 1 .75-.75Z\" fill=\"currentColor\"/></svg>",
|
|
810
|
+
beaker: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M5 21c-.85 0-1.454-.38-1.813-1.137-.358-.759-.27-1.463.263-2.113L9 11V5H8a.968.968 0 0 1-.713-.287A.968.968 0 0 1 7 4c0-.283.096-.52.287-.712A.968.968 0 0 1 8 3h8c.283 0 .52.096.712.288.192.191.288.429.288.712s-.096.52-.288.713A.968.968 0 0 1 16 5h-1v6l5.55 6.75c.533.65.62 1.354.262 2.113C20.454 20.62 19.85 21 19 21H5Zm2-3h10l-3.4-4h-3.2L7 18Zm-2 1h14l-6-7.3V5h-2v6.7L5 19Z\" fill=\"currentColor\"/></svg>",
|
|
811
|
+
protractor: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"m6.75 21-.25-2.2 2.85-7.85a3.95 3.95 0 0 0 1.75.95l-2.75 7.55L6.75 21Zm10.5 0-1.6-1.55-2.75-7.55a3.948 3.948 0 0 0 1.75-.95l2.85 7.85-.25 2.2ZM12 11a2.893 2.893 0 0 1-2.125-.875A2.893 2.893 0 0 1 9 8c0-.65.188-1.23.563-1.737A2.935 2.935 0 0 1 11 5.2V3h2v2.2c.583.2 1.063.554 1.438 1.063C14.812 6.77 15 7.35 15 8c0 .833-.292 1.542-.875 2.125A2.893 2.893 0 0 1 12 11Zm0-2c.283 0 .52-.096.713-.287A.967.967 0 0 0 13 8a.967.967 0 0 0-.287-.713A.968.968 0 0 0 12 7a.968.968 0 0 0-.713.287A.967.967 0 0 0 11 8c0 .283.096.52.287.713.192.191.43.287.713.287Z\" fill=\"currentColor\"/></svg>",
|
|
812
|
+
"bars-3": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M6.85 15c.517 0 .98-.15 1.388-.45.408-.3.695-.692.862-1.175l.375-1.15c.267-.8.2-1.537-.2-2.213C8.875 9.337 8.3 9 7.55 9H4.025l.475 3.925c.083.583.346 1.075.787 1.475.442.4.963.6 1.563.6Zm10.3 0c.6 0 1.12-.2 1.563-.6.441-.4.704-.892.787-1.475L19.975 9h-3.5c-.75 0-1.325.342-1.725 1.025-.4.683-.467 1.425-.2 2.225l.35 1.125c.167.483.454.875.862 1.175.409.3.871.45 1.388.45Zm-10.3 2c-1.1 0-2.063-.363-2.887-1.088a4.198 4.198 0 0 1-1.438-2.737L2 9H1V7h6.55c.733 0 1.404.18 2.013.537A3.906 3.906 0 0 1 11 9h2.025c.35-.617.83-1.104 1.438-1.463A3.892 3.892 0 0 1 16.474 7H23v2h-1l-.525 4.175a4.198 4.198 0 0 1-1.438 2.737A4.238 4.238 0 0 1 17.15 17c-.95 0-1.804-.27-2.562-.813A4.234 4.234 0 0 1 13 14.026l-.375-1.125a21.35 21.35 0 0 1-.1-.363 4.926 4.926 0 0 1-.1-.537h-.85c-.033.2-.067.363-.1.488a21.35 21.35 0 0 1-.1.362L11 14a4.3 4.3 0 0 1-1.588 2.175A4.258 4.258 0 0 1 6.85 17Z\" fill=\"currentColor\"/></svg>",
|
|
813
|
+
ruler: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"m8.8 10.95 2.15-2.175-1.4-1.425-1.1 1.1-1.4-1.4 1.075-1.1L7 4.825 4.825 7 8.8 10.95Zm8.2 8.225L19.175 17l-1.125-1.125-1.1 1.075-1.4-1.4 1.075-1.1-1.425-1.4-2.15 2.15L17 19.175ZM7.25 21H3v-4.25l4.375-4.375L2 7l5-5 5.4 5.4 3.775-3.8c.2-.2.425-.35.675-.45a2.068 2.068 0 0 1 1.55 0c.25.1.475.25.675.45L20.4 4.95c.2.2.35.425.45.675.1.25.15.508.15.775a1.975 1.975 0 0 1-.6 1.425l-3.775 3.8L22 17l-5 5-5.375-5.375L7.25 21ZM5 19h1.4l9.8-9.775L14.775 7.8 5 17.6V19Z\" fill=\"currentColor\"/></svg>",
|
|
814
|
+
"book-open": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M12 6.25a6.6 6.6 0 0 0-2.3-1.32A8.6 8.6 0 0 0 7 4.5c-.63 0-1.25.06-1.85.18-.6.12-1.19.3-1.76.54a1.5 1.5 0 0 0-.93 1.4v10.1c0 .52.26.98.68 1.24.42.26.92.28 1.35.06.36-.18.75-.31 1.18-.4.42-.09.86-.13 1.33-.13.78 0 1.53.14 2.24.42.7.28 1.35.7 1.93 1.24l.83-.75.83.75c.58-.54 1.22-.96 1.93-1.24a6.1 6.1 0 0 1 2.24-.42c.47 0 .91.04 1.33.13.43.09.82.22 1.18.4.43.22.93.2 1.35-.06.42-.26.68-.72.68-1.24V6.62c0-.6-.36-1.15-.93-1.4a9.3 9.3 0 0 0-1.76-.54A9.8 9.8 0 0 0 17 4.5a8.6 8.6 0 0 0-2.7.43A6.6 6.6 0 0 0 12 6.25Zm1 10.06V8.02c.55-.5 1.16-.88 1.84-1.13A6 6 0 0 1 17 6.5c.45 0 .89.04 1.32.11.43.08.85.19 1.26.34v9.24a8.2 8.2 0 0 0-1.28-.24A10 10 0 0 0 17 15.85c-.72 0-1.42.09-2.09.26a7.7 7.7 0 0 0-1.91.8Zm-2 0a7.7 7.7 0 0 0-1.91-.8 8.4 8.4 0 0 0-2.09-.26c-.44 0-.87.02-1.3.07-.43.05-.86.13-1.28.24V6.95c.41-.15.83-.26 1.26-.34A7.7 7.7 0 0 1 7 6.5c.76 0 1.48.13 2.16.39.68.25 1.29.63 1.84 1.13Z\" fill=\"currentColor\"/></svg>",
|
|
815
|
+
photo: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M4 21c-.55 0-1.02-.2-1.41-.59A1.93 1.93 0 0 1 2 19V5c0-.55.2-1.02.59-1.41A1.93 1.93 0 0 1 4 3h16c.55 0 1.02.2 1.41.59.39.39.59.86.59 1.41v14c0 .55-.2 1.02-.59 1.41-.39.39-.86.59-1.41.59H4Zm0-2h16V5H4v14Zm1.5-2.5h13l-4.1-5.47-3.4 4.47-2.5-3.25L5.5 16.5ZM8.5 10a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z\" fill=\"currentColor\"/></svg>"
|
|
816
|
+
};
|
|
817
|
+
function ft(e) {
|
|
818
|
+
return dt[e] || null;
|
|
819
|
+
}
|
|
820
|
+
var pt = /* @__PURE__ */ new Set([
|
|
821
|
+
"assessment",
|
|
822
|
+
"section",
|
|
823
|
+
"item",
|
|
824
|
+
"passage",
|
|
825
|
+
"rubric"
|
|
826
|
+
]);
|
|
827
|
+
function mt(e) {
|
|
828
|
+
return pt.has(e);
|
|
829
|
+
}
|
|
830
|
+
function ht(e, t, n) {
|
|
831
|
+
let r = e.trim(), i = n.trim();
|
|
832
|
+
if (!r || !i) throw Error("Tool instance ids require non-empty tool and scope ids");
|
|
833
|
+
if (!mt(t)) throw Error(`Unknown tool scope level '${t}'. Register custom levels with registerToolScopeLevel().`);
|
|
834
|
+
return `${r}:${t}:${i}`;
|
|
835
|
+
}
|
|
836
|
+
function gt(e) {
|
|
837
|
+
let t = e.split(":");
|
|
838
|
+
if (t.length !== 3) return null;
|
|
839
|
+
let [n, r, i] = t;
|
|
840
|
+
return !n || !i || !mt(r) ? null : {
|
|
841
|
+
baseToolId: n,
|
|
842
|
+
scopeLevel: r,
|
|
843
|
+
scopeId: i
|
|
844
|
+
};
|
|
845
|
+
}
|
|
846
|
+
var _t = (e, t) => {
|
|
847
|
+
if (!customElements.get(e)) try {
|
|
848
|
+
customElements.define(e, t);
|
|
849
|
+
} catch (t) {
|
|
850
|
+
if (!(t instanceof DOMException && t.name === "NotSupportedError" || t && typeof t == "object" && t.name === "NotSupportedError") || !customElements.get(e)) throw t;
|
|
851
|
+
}
|
|
852
|
+
}, vt = v("<span class=\"item-toolbar__element-host svelte-rnx3ie\"></span>"), yt = v("<span class=\"item-toolbar__nds-button-zoom svelte-rnx3ie\"><nds-icon-button></nds-icon-button></span>", 2), bt = v("<span aria-hidden=\"true\"></span>"), xt = v("<img class=\"item-toolbar__icon-image svelte-rnx3ie\" alt=\"\"/>"), St = v("<i aria-hidden=\"true\"></i>"), Ct = v("<a><!></a>"), wt = v("<button type=\"button\"><!></button>"), Tt = v("<span class=\"item-toolbar__controls-host svelte-rnx3ie\"></span>"), Et = v("<div></div>"), Dt = v("<div><div class=\"item-toolbar__tools-row svelte-rnx3ie\"><!> <!> <!></div> <!></div>"), Ot = {
|
|
853
|
+
hash: "svelte-rnx3ie",
|
|
854
|
+
code: ".item-toolbar.svelte-rnx3ie {display:flex;flex-direction:column;align-items:flex-end;min-width:0;max-width:100%;gap:0;--pie-toolbar-tools-row-height: 2rem;--pie-tts-controls-row-height: 2.875rem;}.item-toolbar__tools-row.svelte-rnx3ie {display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:0.5rem;max-width:100%;min-height:var(--pie-toolbar-tools-row-height);}\n\n /* A granted section tool must stay reachable even when there isn't room for\n every button: scroll the row rather than clipping items past the edge,\n which left them impossible to focus, tab to, or click. `min-width: 0`\n beats the flex default (`auto`, i.e. never shrink below content), which\n would otherwise keep the row at full content width and make overflow-x\n moot. Item and passage rows wrap without an overflow clip so an inline\n reading-controls panel can still extend outside the row. */.item-toolbar[data-level=\"section\"].svelte-rnx3ie .item-toolbar__tools-row:where(.svelte-rnx3ie) {flex-wrap:nowrap;justify-content:flex-start;\n /* Keep the focus outline inside the scrolling box on both axes. */padding:4px;scroll-padding:4px;box-sizing:border-box;overflow-x:auto;max-width:100%;min-width:0;}.item-toolbar__controls-row.svelte-rnx3ie {display:flex;align-items:center;justify-content:flex-end;width:100%;min-height:0;height:auto;}.item-toolbar__controls-row--reserve.svelte-rnx3ie {min-height:var(--pie-tts-controls-row-height);height:var(--pie-tts-controls-row-height);}.item-toolbar__controls-row--active.svelte-rnx3ie {min-height:var(--pie-tts-controls-row-height);height:var(--pie-tts-controls-row-height);}.item-toolbar__controls-row--align-start.svelte-rnx3ie {justify-content:flex-start;}.item-toolbar__controls-host.svelte-rnx3ie {display:inline-flex;align-items:center;justify-content:flex-end;width:100%;}.item-toolbar--top.svelte-rnx3ie,\n .item-toolbar--bottom.svelte-rnx3ie {align-items:flex-end;}.item-toolbar--left.svelte-rnx3ie,\n .item-toolbar--right.svelte-rnx3ie {align-items:stretch;}.item-toolbar--left.svelte-rnx3ie .item-toolbar__tools-row:where(.svelte-rnx3ie),\n .item-toolbar--right.svelte-rnx3ie .item-toolbar__tools-row:where(.svelte-rnx3ie) {flex-direction:column;align-items:center;justify-content:flex-start;flex-wrap:nowrap;}.item-toolbar--left.svelte-rnx3ie .item-toolbar__controls-row:where(.svelte-rnx3ie),\n .item-toolbar--right.svelte-rnx3ie .item-toolbar__controls-row:where(.svelte-rnx3ie) {justify-content:flex-start;width:auto;min-height:0;height:auto;}.item-toolbar__button.svelte-rnx3ie {display:flex;flex-shrink:0;align-items:center;justify-content:center;width:2rem;height:2rem;padding:0.25rem;border:1px solid var(--pie-button-border, var(--pie-border, #ccc));border-radius:0.25rem;background-color:var(--pie-button-bg, var(--pie-background, white));color:var(--pie-button-color, var(--pie-text, #333));cursor:pointer;transition:all 0.15s ease;text-decoration:none;}\n\n /* Drive the vendored NDS icon button's outer size via its own `--height-32`\n custom property so its light-DOM inner button matches the toolbar's\n md/sm/lg dimensions (32 / 44 / 40 px) without a layout shift. The glyph\n keeps the NDS-native icon size (we render size=\"small\"), so it isn't\n oversized. */.item-toolbar__nds-button-zoom.svelte-rnx3ie {display:inline-flex;flex-shrink:0;}.item-toolbar.svelte-rnx3ie nds-icon-button:where(.svelte-rnx3ie) {\n /* Host-settable button size per toolbar size (drives the NDS outer button\n via its own --height-32). */--height-32: var(--pie-calculator-button-size, 2rem);\n /* Host-settable accent for the calculator button: the NDS tertiary glyph\n colour derives from --color-interactive-blue, remapped here to a\n themeable variable. --pie-calculator-button-color is package-private, so\n nothing sets it and the default is what ships: it now resolves through\n --pie-button-color (DaisyUI base-content) instead of holding the Figma\n blue on every theme, with the literal as the no-theme last resort.\n Not --pie-primary or --pie-tertiary: both are `direct` mappings of\n DaisyUI slots chosen to pair with their own -content colour, so a glyph\n taken from either sits at 1.37:1 against the page under `pastel` and 11\n of the 35 shipped themes fall under SC 1.4.11's 3:1. */--color-interactive-blue: var(--pie-calculator-button-color, var(--pie-button-color, var(--pie-text, #222)));\n /* NDS palette bridge — keep in sync with the copies in tool-tts-inline\n and section-player SectionItemsPane (asserted by\n scripts/check-theme-tokens.mjs). The vendored button paints its fill,\n its on-accent glyph, its hover ring and its focus ring from the NDS\n design-system palette, which no PIE theme sets, so a tertiary button\n kept a #f3f5f7 pill on every page — and once the glyph followed the\n theme, a light glyph landed on that light pill. */--color-new-gray: var(--pie-background-dark, #f3f5f7);--color-primary-white: var(--pie-white, #ffffff);--color-primary-black: var(--pie-text, #000000);--color-focus-blue: var(--pie-button-focus-outline, #2b87ff);}.item-toolbar--sm.svelte-rnx3ie nds-icon-button:where(.svelte-rnx3ie) {--height-32: var(--pie-calculator-button-size-sm, 2.75rem);}.item-toolbar--lg.svelte-rnx3ie nds-icon-button:where(.svelte-rnx3ie) {--height-32: var(--pie-calculator-button-size-lg, 2.5rem);}.item-toolbar__element-host.svelte-rnx3ie {display:contents;}.item-toolbar--sm.svelte-rnx3ie .item-toolbar__button:where(.svelte-rnx3ie) {width:2.75rem;height:2.75rem;}.item-toolbar--sm.svelte-rnx3ie {--pie-toolbar-tools-row-height: 2.75rem;--pie-tts-controls-row-height: 3.625rem;}.item-toolbar--lg.svelte-rnx3ie .item-toolbar__button:where(.svelte-rnx3ie) {width:2.5rem;height:2.5rem;}.item-toolbar--lg.svelte-rnx3ie {--pie-toolbar-tools-row-height: 2.5rem;--pie-tts-controls-row-height: 3.375rem;}.item-toolbar__button.svelte-rnx3ie:hover:not(:disabled) {background-color:var(--pie-button-hover-bg, var(--pie-secondary-background, #f5f5f5));border-color:var(--pie-button-hover-border, var(--pie-button-border, var(--pie-border, #ccc)));color:var(--pie-button-hover-color, var(--pie-button-color, var(--pie-text, #333)));transform:translateY(-1px);box-shadow:0 2px 4px color-mix(in srgb, var(--pie-black, #000) 10%, transparent);}.item-toolbar__button.svelte-rnx3ie:active:not(:disabled) {transform:translateY(0);box-shadow:none;}.item-toolbar__button--active.svelte-rnx3ie {background-color:var(--pie-primary, #1976d2);color:var(--pie-white, #fff);border-color:var(--pie-primary, #1976d2);}.item-toolbar__button--active.svelte-rnx3ie:hover:not(:disabled) {background-color:var(--pie-primary-dark, #1565c0);}.item-toolbar__button.svelte-rnx3ie:focus-visible {outline:2px solid var(--pie-button-focus-outline, var(--pie-primary, #1976d2));outline-offset:2px;}.item-toolbar__button.svelte-rnx3ie:disabled {opacity:0.5;cursor:not-allowed;}.item-toolbar__button.svelte-rnx3ie svg {width:100%;height:100%;}.item-toolbar__icon-image.svelte-rnx3ie {width:100%;height:100%;object-fit:contain;}"
|
|
855
|
+
};
|
|
856
|
+
function kt(l, _) {
|
|
857
|
+
re(_, !0), ae(l, Ot);
|
|
858
|
+
let v = typeof window < "u", de = ["/_fa-pro/fontawesome.min.css", "/_fa-pro/light.min.css"], fe = "https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/css/all.min.css", pe = /font.?awesome|fa-?pro/i, M = !1, me = () => {
|
|
859
|
+
if (!(!v || M)) {
|
|
860
|
+
if (M = !0, !document.querySelector("link[href*=\"Roboto\"]")) {
|
|
861
|
+
let e = document.createElement("link");
|
|
862
|
+
e.rel = "stylesheet", e.href = "https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap", document.head.appendChild(e);
|
|
863
|
+
}
|
|
864
|
+
if (!Array.from(document.querySelectorAll("link[rel=\"stylesheet\"][href]")).some((e) => pe.test(e.href))) {
|
|
865
|
+
if (!document.querySelector(`link[href="${fe}"]`)) {
|
|
866
|
+
let e = document.createElement("link");
|
|
867
|
+
e.rel = "stylesheet", e.href = fe, document.head.appendChild(e);
|
|
868
|
+
}
|
|
869
|
+
for (let e of de) {
|
|
870
|
+
if (document.querySelector(`link[href="${e}"]`)) continue;
|
|
871
|
+
let t = document.createElement("link");
|
|
872
|
+
t.rel = "stylesheet", t.href = e, document.head.appendChild(t);
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
}, he = "__pieFaToolbarShadowInstalled", ge = (e) => {
|
|
877
|
+
let t = e.getRootNode();
|
|
878
|
+
if (!(t instanceof ShadowRoot)) return;
|
|
879
|
+
let n = t;
|
|
880
|
+
if (n[he]) return;
|
|
881
|
+
n[he] = !0;
|
|
882
|
+
let r = /* @__PURE__ */ new Set(), i = (e) => {
|
|
883
|
+
if (!e || r.has(e)) return;
|
|
884
|
+
r.add(e);
|
|
885
|
+
let n = document.createElement("link");
|
|
886
|
+
n.rel = "stylesheet", n.href = e, t.appendChild(n);
|
|
887
|
+
}, a = Array.from(document.querySelectorAll("link[rel=\"stylesheet\"][href]")).filter((e) => pe.test(e.href));
|
|
888
|
+
for (let e of a) i(e.href);
|
|
889
|
+
}, _e = (e) => (me(), ge(e), {}), ve = (e, t) => {
|
|
890
|
+
let n = t, r = () => {
|
|
891
|
+
let t = e.querySelector("button");
|
|
892
|
+
t && t.setAttribute("aria-pressed", n ? "true" : "false");
|
|
893
|
+
};
|
|
894
|
+
r();
|
|
895
|
+
let i = new MutationObserver(r);
|
|
896
|
+
return i.observe(e, {
|
|
897
|
+
childList: !0,
|
|
898
|
+
subtree: !0
|
|
899
|
+
}), {
|
|
900
|
+
update(e) {
|
|
901
|
+
n = e, r();
|
|
902
|
+
},
|
|
903
|
+
destroy() {
|
|
904
|
+
i.disconnect();
|
|
905
|
+
}
|
|
906
|
+
};
|
|
907
|
+
}, ye = (e) => e.faIconName || null, be = new d(), N = ee(ue({})), xe = E(_, "level", 7, "item"), Se = E(_, "scopeId", 7, ""), Ce = E(_, "itemId", 7, ""), we = E(_, "sectionId", 7, ""), Te = E(_, "catalogId", 7, ""), Ee = E(_, "tools", 7, ""), P = E(_, "contentKind", 7, "assessment-item"), F = E(_, "position", 7, "bottom"), I = E(_, "scopeElement", 7, null), De = E(_, "toolRegistry", 7, null), Oe = E(_, "item", 7, null), L = E(_, "hostButtons", 23, () => []), ke = E(_, "class", 7, ""), Ae = E(_, "size", 7, "md"), R = E(_, "language", 7, "en-US"), z = ee(null), B = ee(null), je = x(() => w(B)?.ndsIcons === !0), V = x(() => n(w(B))), H = ee(null), U = ee(0), Me = ee(0), Ne = ee(0);
|
|
908
|
+
y(() => {
|
|
909
|
+
if (w(z)) return O(w(z), (e) => {
|
|
910
|
+
oe(B, e, !0);
|
|
911
|
+
});
|
|
912
|
+
}), y(() => {
|
|
913
|
+
if (w(z)) return le(w(z), (e) => {
|
|
914
|
+
oe(H, e, !0);
|
|
915
|
+
});
|
|
916
|
+
}), y(() => {
|
|
917
|
+
let e = w(B)?.toolkitCoordinator;
|
|
918
|
+
if (!e || typeof e.onPolicyChange != "function") return;
|
|
919
|
+
let t = e.onPolicyChange(() => {
|
|
920
|
+
oe(Me, w(Me) + 1);
|
|
921
|
+
});
|
|
922
|
+
return () => {
|
|
923
|
+
try {
|
|
924
|
+
t?.();
|
|
925
|
+
} catch {}
|
|
926
|
+
};
|
|
927
|
+
}), y(() => {
|
|
928
|
+
let e = w(B)?.toolkitCoordinator;
|
|
929
|
+
if (!e || typeof e.onToolContextResolverChange != "function") return;
|
|
930
|
+
let t = e.onToolContextResolverChange(() => {
|
|
931
|
+
oe(Ne, w(Ne) + 1);
|
|
932
|
+
});
|
|
933
|
+
return () => {
|
|
934
|
+
try {
|
|
935
|
+
t?.();
|
|
936
|
+
} catch {}
|
|
937
|
+
};
|
|
938
|
+
});
|
|
939
|
+
let W = x(() => w(B)?.toolCoordinator), Pe = x(() => w(B)?.ttsService), Fe = x(() => w(B)?.elementToolStateStore), Ie = x(() => w(B)?.assessmentId ?? ""), G = x(() => Ce() || w(H)?.itemId || ""), K = x(() => w(H)?.canonicalItemId || w(G)), q = x(() => we() || w(B)?.sectionId || ""), Le = x(() => P() || w(H)?.contentKind || (xe() === "section" ? "section" : "assessment-item")), J = x(() => xe() && xe() !== "item" ? xe() : w(Le) === "rubric-block-stimulus" ? "passage" : "item"), Y = x(() => Se() ? Se() : w(J) === "section" ? w(q) || w(B)?.sectionId || "default-section" : w(J) === "assessment" ? w(B)?.assessmentId || "default-assessment" : w(K) || w(G) || "default-item"), X = x(() => Te() || w(Y)), Re = x(() => Oe() || w(H)?.item || null), Z = x(() => De() || be), ze = x(() => m(Ee())), Be = x(() => w(Z).normalizeToolIds(w(ze)).filter(Boolean)), Ve = x(() => w(J) === "section" ? "section" : w(J) === "passage" || w(Le) === "rubric-block-stimulus" ? "passage" : "item"), He = x(() => {
|
|
940
|
+
w(Me);
|
|
941
|
+
let e = w(B)?.toolkitCoordinator;
|
|
942
|
+
return !e || typeof e.decideToolPolicy != "function" ? null : e.decideToolPolicy({
|
|
943
|
+
level: w(Ve),
|
|
944
|
+
scope: {
|
|
945
|
+
level: w(J),
|
|
946
|
+
scopeId: w(Y),
|
|
947
|
+
assessmentId: w(B)?.assessmentId,
|
|
948
|
+
sectionId: w(q) || void 0,
|
|
949
|
+
itemId: w(G) || void 0,
|
|
950
|
+
canonicalItemId: w(K) || void 0,
|
|
951
|
+
contentKind: w(Le)
|
|
952
|
+
}
|
|
953
|
+
});
|
|
954
|
+
}), Ue = x(() => {
|
|
955
|
+
let e = (e) => Array.from(new Set(e));
|
|
956
|
+
return w(He) ? e(w(Z).normalizeToolIds(w(He).visibleTools.map((e) => e.toolId)).filter(Boolean)) : e(w(Be));
|
|
957
|
+
}), We = x(() => {
|
|
958
|
+
let e = /* @__PURE__ */ new Set();
|
|
959
|
+
if (!w(He)) return e;
|
|
960
|
+
for (let t of w(He).visibleTools) if (!(!t.required && !t.alwaysAvailable)) for (let n of w(Z).normalizeToolIds([t.toolId]).filter(Boolean)) e.add(n);
|
|
961
|
+
return e;
|
|
962
|
+
}), Ge = x(() => {
|
|
963
|
+
if (w(J) === "section" || w(J) === "assessment") return !0;
|
|
964
|
+
let e = w(Re)?.config;
|
|
965
|
+
return !!(w(Re) && e && typeof e == "object");
|
|
966
|
+
}), Ke = x(() => {
|
|
967
|
+
w(Me);
|
|
968
|
+
let e = w(B)?.toolkitCoordinator;
|
|
969
|
+
return !e || typeof e.getPolicyInputs != "function" ? null : e.getPolicyInputs();
|
|
970
|
+
}), qe = x(() => w(Ke)?.assessment ?? null), Je = x(() => w(Ke)?.currentItemRef ?? null), Ye = x(() => w(J) === "section" ? {
|
|
971
|
+
level: "section",
|
|
972
|
+
assessment: w(qe) || {},
|
|
973
|
+
section: {}
|
|
974
|
+
} : w(J) === "assessment" ? {
|
|
975
|
+
level: "assessment",
|
|
976
|
+
assessment: w(qe) || {}
|
|
977
|
+
} : !w(Ge) || !w(Re) ? null : w(J) === "passage" ? {
|
|
978
|
+
level: "passage",
|
|
979
|
+
assessment: w(qe) || {},
|
|
980
|
+
itemRef: w(Je) || { id: w(K) },
|
|
981
|
+
passage: w(Re)
|
|
982
|
+
} : {
|
|
983
|
+
level: "item",
|
|
984
|
+
assessment: w(qe) || {},
|
|
985
|
+
itemRef: w(Je) || { id: w(K) },
|
|
986
|
+
item: w(Re)
|
|
987
|
+
}), Xe = x(() => w(Ye) ? w(Ye) : {
|
|
988
|
+
level: "item",
|
|
989
|
+
assessment: w(qe) || {},
|
|
990
|
+
itemRef: w(Je) || { id: w(K) },
|
|
991
|
+
item: w(Re) || {
|
|
992
|
+
id: w(K),
|
|
993
|
+
config: {}
|
|
994
|
+
}
|
|
995
|
+
}), Ze = x(() => {
|
|
996
|
+
if (w(J) !== "item" && w(J) !== "passage" || !w(Ge) || !w(Re)) return [];
|
|
997
|
+
let e = w(Re)?.config?.models;
|
|
998
|
+
return (Array.isArray(e) ? e : e && typeof e == "object" ? Object.values(e) : []).filter((e) => e && typeof e == "object" && typeof e.id == "string").map((e) => ({
|
|
999
|
+
level: "element",
|
|
1000
|
+
assessment: w(qe) || {},
|
|
1001
|
+
itemRef: w(Je) || { id: w(K) },
|
|
1002
|
+
item: w(Re),
|
|
1003
|
+
elementId: e.id
|
|
1004
|
+
}));
|
|
1005
|
+
}), Qe = x(() => {
|
|
1006
|
+
let e = w(B)?.toolkitCoordinator || null, t = (e) => gt(e) ? e : ht(e, w(J), w(Y));
|
|
1007
|
+
return {
|
|
1008
|
+
scope: {
|
|
1009
|
+
level: w(J),
|
|
1010
|
+
scopeId: w(Y),
|
|
1011
|
+
assessmentId: w(B)?.assessmentId,
|
|
1012
|
+
sectionId: w(q),
|
|
1013
|
+
itemId: w(G),
|
|
1014
|
+
canonicalItemId: w(K),
|
|
1015
|
+
contentKind: w(Le)
|
|
1016
|
+
},
|
|
1017
|
+
itemId: w(Y),
|
|
1018
|
+
catalogId: w(X),
|
|
1019
|
+
language: R(),
|
|
1020
|
+
i18n: w(V),
|
|
1021
|
+
ui: { size: Ae() },
|
|
1022
|
+
getScopeElement: () => I() || w(H)?.scopeElement || null,
|
|
1023
|
+
getGlobalElementId: () => !w(Fe) || !w(Ie) || !w(q) || !w(K) ? null : w(Fe).getGlobalElementId(w(Ie), w(q), w(K), w(K)),
|
|
1024
|
+
toolCoordinator: w(W) || null,
|
|
1025
|
+
toolkitCoordinator: e,
|
|
1026
|
+
ttsService: w(Pe) || null,
|
|
1027
|
+
elementToolStateStore: w(Fe) || null,
|
|
1028
|
+
toggleTool: (e) => {
|
|
1029
|
+
if (!w(W)) return;
|
|
1030
|
+
let n = t(e);
|
|
1031
|
+
w(W).getToolState(n) || w(W).registerTool(n, e), w(W).toggleTool(n);
|
|
1032
|
+
},
|
|
1033
|
+
isToolVisible: (e) => w(W) ? w(W).isToolVisible(t(e)) : !1,
|
|
1034
|
+
subscribeVisibility: w(W) ? (e) => w(W).subscribe(e) : null
|
|
1035
|
+
};
|
|
1036
|
+
}), $e = x(() => {
|
|
1037
|
+
w(Ne);
|
|
1038
|
+
let e = w(B)?.toolkitCoordinator;
|
|
1039
|
+
if (!e || typeof e.hasToolContextResolver != "function" || typeof e.resolveToolContext != "function") return {};
|
|
1040
|
+
let t = {};
|
|
1041
|
+
for (let n of w(Ue)) {
|
|
1042
|
+
if (!w(Z).get(n)?.supportedLevels.includes(w(J)) || !e.hasToolContextResolver(n)) continue;
|
|
1043
|
+
let r = e.resolveToolContext({
|
|
1044
|
+
toolId: n,
|
|
1045
|
+
context: w(Xe),
|
|
1046
|
+
toolbarContext: w(Qe)
|
|
1047
|
+
});
|
|
1048
|
+
r && (t[n] = r);
|
|
1049
|
+
}
|
|
1050
|
+
return t;
|
|
1051
|
+
}), et = x(() => {
|
|
1052
|
+
let e = w(Ue).filter((e) => {
|
|
1053
|
+
let t = w(Z).get(e);
|
|
1054
|
+
return t ? t.supportedLevels.includes(w(J)) : !1;
|
|
1055
|
+
}), t = Object.values(w($e)), n = new Set(t.map((e) => e.toolId)), r = new Set(t.filter((e) => e.visible).map((e) => e.toolId)), i = e.filter((e) => !n.has(e));
|
|
1056
|
+
if (w(J) === "section" || !w(Ge) || !w(Ye) && w(Ze).length === 0) return i.forEach((e) => r.add(e)), Array.from(r);
|
|
1057
|
+
i.filter((e) => w(We).has(e)).forEach((e) => r.add(e)), w(Ye) && w(Z).filterVisibleInContext(i, w(Ye)).forEach((e) => r.add(e.toolId));
|
|
1058
|
+
for (let e of w(Ze)) w(Z).filterVisibleInContext(i, e).forEach((e) => r.add(e.toolId));
|
|
1059
|
+
let a = w(Ye) ? [w(Ye), ...w(Ze)] : w(Ze);
|
|
1060
|
+
for (let e of Array.from(r)) n.has(e) || w(Z).isApplicableToAnyContext(e, a) || r.delete(e);
|
|
1061
|
+
return Array.from(r);
|
|
1062
|
+
}), tt = x(() => w(Z).filterToolIdsByActivation(w(et), "toolbar-toggle"));
|
|
1063
|
+
y(() => {
|
|
1064
|
+
if (!v) return;
|
|
1065
|
+
let e = !1;
|
|
1066
|
+
return w(Z).ensureToolModulesLoaded(w(tt)).then(() => {
|
|
1067
|
+
e || oe(U, w(U) + 1);
|
|
1068
|
+
}).catch((e) => {
|
|
1069
|
+
console.error("[ItemToolBar] Failed to load one or more tool modules:", e);
|
|
1070
|
+
}), () => {
|
|
1071
|
+
e = !0;
|
|
1072
|
+
};
|
|
1073
|
+
});
|
|
1074
|
+
function nt() {
|
|
1075
|
+
return I() ? I() : w(H)?.scopeElement || null;
|
|
1076
|
+
}
|
|
1077
|
+
function rt() {
|
|
1078
|
+
return !w(Fe) || !w(Ie) || !w(q) || !w(K) ? null : w(Fe).getGlobalElementId(w(Ie), w(q), w(K), w(K));
|
|
1079
|
+
}
|
|
1080
|
+
let Q = x(() => {
|
|
1081
|
+
let e = w(B)?.toolkitCoordinator || null, t = (e) => gt(e) ? e : ht(e, w(J), w(Y));
|
|
1082
|
+
return {
|
|
1083
|
+
scope: {
|
|
1084
|
+
level: w(J),
|
|
1085
|
+
scopeId: w(Y),
|
|
1086
|
+
assessmentId: w(B)?.assessmentId,
|
|
1087
|
+
sectionId: w(q),
|
|
1088
|
+
itemId: w(G),
|
|
1089
|
+
canonicalItemId: w(K),
|
|
1090
|
+
contentKind: w(Le)
|
|
1091
|
+
},
|
|
1092
|
+
itemId: w(Y),
|
|
1093
|
+
catalogId: w(X),
|
|
1094
|
+
language: R(),
|
|
1095
|
+
i18n: w(V),
|
|
1096
|
+
ui: { size: Ae() },
|
|
1097
|
+
getScopeElement: nt,
|
|
1098
|
+
getGlobalElementId: rt,
|
|
1099
|
+
toolCoordinator: w(W) || null,
|
|
1100
|
+
toolkitCoordinator: e,
|
|
1101
|
+
ttsService: w(Pe) || null,
|
|
1102
|
+
elementToolStateStore: w(Fe) || null,
|
|
1103
|
+
toggleTool: (e) => {
|
|
1104
|
+
if (!w(W)) return;
|
|
1105
|
+
let n = t(e);
|
|
1106
|
+
w(W).getToolState(n) || w(W).registerTool(n, e), w(W).toggleTool(n);
|
|
1107
|
+
},
|
|
1108
|
+
isToolVisible: (e) => w(W) ? w(W).isToolVisible(t(e)) : !1,
|
|
1109
|
+
subscribeVisibility: w(W) ? (e) => w(W).subscribe(e) : null,
|
|
1110
|
+
getResolvedToolContext: (e) => w($e)[e] ?? null,
|
|
1111
|
+
getToolRenderParams: (e) => {
|
|
1112
|
+
let t = w($e)[e]?.params ?? null, n = it.get(e);
|
|
1113
|
+
return n ? {
|
|
1114
|
+
...t ?? {},
|
|
1115
|
+
...n
|
|
1116
|
+
} : t;
|
|
1117
|
+
}
|
|
1118
|
+
};
|
|
1119
|
+
}), it = /* @__PURE__ */ new Map(), at = 0, $ = x(() => {
|
|
1120
|
+
if (!v) return [];
|
|
1121
|
+
w(U);
|
|
1122
|
+
let e = [];
|
|
1123
|
+
for (let t of w(tt)) {
|
|
1124
|
+
let n = w(Z).renderForToolbar(t, w(Xe), w(Q));
|
|
1125
|
+
n && e.push(n);
|
|
1126
|
+
}
|
|
1127
|
+
return e;
|
|
1128
|
+
}), ot = x(() => {
|
|
1129
|
+
if (!Array.isArray(L())) return [];
|
|
1130
|
+
let e = [];
|
|
1131
|
+
return L().forEach((t, n) => {
|
|
1132
|
+
if (ct(t)) {
|
|
1133
|
+
e.push(t);
|
|
1134
|
+
return;
|
|
1135
|
+
}
|
|
1136
|
+
console.warn(`[ItemToolBar] Ignoring invalid host button at index ${n}. Expected { id, label, href | onClick } with valid types.`);
|
|
1137
|
+
}), e;
|
|
1138
|
+
}), dt = x(() => w($).filter((e) => !!e.button).map((e) => {
|
|
1139
|
+
let t = e.button;
|
|
1140
|
+
return {
|
|
1141
|
+
id: e.toolId,
|
|
1142
|
+
label: t.label,
|
|
1143
|
+
ariaLabel: t.ariaLabel || t.label,
|
|
1144
|
+
icon: t.icon,
|
|
1145
|
+
faIconName: t.faIconName,
|
|
1146
|
+
tooltip: t.tooltip || t.label,
|
|
1147
|
+
disabled: t.disabled,
|
|
1148
|
+
active: w(N)[e.toolId] ?? t.active ?? !1,
|
|
1149
|
+
onClick: () => {
|
|
1150
|
+
t.onClick(), Vt();
|
|
1151
|
+
}
|
|
1152
|
+
};
|
|
1153
|
+
})), pt = x(() => [...w(dt), ...w(ot)]), mt = x(() => {
|
|
1154
|
+
let e = {};
|
|
1155
|
+
for (let t of w($)) e[t.toolId] = w(N)[t.toolId] ?? t.button?.active ?? !1;
|
|
1156
|
+
return e;
|
|
1157
|
+
}), _t = x(() => w($).flatMap((e) => (e.elements || []).filter((e) => e.mount === "before-buttons").filter((e) => !!e.element).map((t, n) => ({
|
|
1158
|
+
key: `before-${e.toolId}-${n}`,
|
|
1159
|
+
toolId: e.toolId,
|
|
1160
|
+
entry: t
|
|
1161
|
+
})))), kt = x(() => w($).flatMap((e) => (e.elements || []).filter((e) => e.mount === "after-buttons").filter((e) => !!e.element).map((t, n) => ({
|
|
1162
|
+
key: `after-${e.toolId}-${n}`,
|
|
1163
|
+
toolId: e.toolId,
|
|
1164
|
+
entry: t
|
|
1165
|
+
})))), At = x(() => w($).flatMap((e) => (e.elements || []).filter((e) => e.mount === "controls-row").filter((e) => !!e.element).map((t, n) => ({
|
|
1166
|
+
key: `controls-row-${e.toolId}-${n}`,
|
|
1167
|
+
toolId: e.toolId,
|
|
1168
|
+
entry: t
|
|
1169
|
+
})))), jt = x(() => w($).flatMap((e) => (e.elements || []).map((t) => ({
|
|
1170
|
+
toolId: e.toolId,
|
|
1171
|
+
hint: t.layoutHints?.controlsRow
|
|
1172
|
+
})).filter((e) => !!e.hint))), Mt = x(() => w($).flatMap((e) => (e.elements || []).map((t) => ({
|
|
1173
|
+
toolId: e.toolId,
|
|
1174
|
+
hint: t.layoutHints?.headerOverlay
|
|
1175
|
+
})).filter((e) => !!e.hint))), Nt = x(() => w(jt).some((e) => e.hint?.reserveSpace === !0)), Pt = x(() => w(jt).some((e) => e.hint?.showWhenToolActive === !0 && (w(mt)[e.toolId] ?? !1))), Ft = x(() => F() === "left" || F() === "right"), It = x(() => w(Mt).some((e) => e.hint?.showWhenToolActive === !0 && (w(mt)[e.toolId] ?? !1))), Lt = x(() => w(At).length > 0 || w(Nt) || w(Pt));
|
|
1176
|
+
function Rt() {
|
|
1177
|
+
if (!w(z)) return null;
|
|
1178
|
+
let e = w(z).getRootNode();
|
|
1179
|
+
return e instanceof ShadowRoot ? e.host : null;
|
|
1180
|
+
}
|
|
1181
|
+
y(() => {
|
|
1182
|
+
let e = Rt();
|
|
1183
|
+
if (!e) return;
|
|
1184
|
+
let t = w(Mt).length > 0, n = w(It);
|
|
1185
|
+
return e.setAttribute("data-pie-header-overlay", t ? "true" : "false"), e.setAttribute("data-pie-header-overlay-active", n ? "true" : "false"), () => {
|
|
1186
|
+
e.removeAttribute("data-pie-header-overlay"), e.removeAttribute("data-pie-header-overlay-active");
|
|
1187
|
+
};
|
|
1188
|
+
}), y(() => {
|
|
1189
|
+
v && w(pt).some((e) => !!ye(e)) && me();
|
|
1190
|
+
});
|
|
1191
|
+
function zt(e) {
|
|
1192
|
+
return e.id in w(N) ? w(N)[e.id] === !0 : e.active === !0;
|
|
1193
|
+
}
|
|
1194
|
+
function Bt(e) {
|
|
1195
|
+
return ft(e);
|
|
1196
|
+
}
|
|
1197
|
+
function Vt() {
|
|
1198
|
+
let e = {};
|
|
1199
|
+
for (let t of w($)) t.sync?.(), t.button && (e[t.toolId] = t.button.active ?? !1);
|
|
1200
|
+
oe(N, e, !0);
|
|
1201
|
+
}
|
|
1202
|
+
y(() => {
|
|
1203
|
+
let e = [];
|
|
1204
|
+
Vt();
|
|
1205
|
+
for (let t of w($)) if (t.subscribeActive) {
|
|
1206
|
+
let n = !1, r = t.subscribeActive((e) => {
|
|
1207
|
+
queueMicrotask(() => {
|
|
1208
|
+
n || (oe(N, {
|
|
1209
|
+
...w(N),
|
|
1210
|
+
[t.toolId]: e
|
|
1211
|
+
}, !0), t.sync?.());
|
|
1212
|
+
});
|
|
1213
|
+
});
|
|
1214
|
+
e.push(() => {
|
|
1215
|
+
n = !0, r();
|
|
1216
|
+
});
|
|
1217
|
+
}
|
|
1218
|
+
return () => {
|
|
1219
|
+
e.forEach((e) => e());
|
|
1220
|
+
};
|
|
1221
|
+
}), y(() => {
|
|
1222
|
+
let e = w(B)?.toolkitCoordinator;
|
|
1223
|
+
if (typeof e?.registerToolRequestTarget != "function") return;
|
|
1224
|
+
let t = w(Ve);
|
|
1225
|
+
return e.registerToolRequestTarget({
|
|
1226
|
+
level: t,
|
|
1227
|
+
hostsTool: (e) => w(tt).includes(e),
|
|
1228
|
+
open: (e, t) => {
|
|
1229
|
+
if (!w(W) || !w(tt).includes(e)) return;
|
|
1230
|
+
t && Object.keys(t).length > 0 && (at += 1, it.set(e, {
|
|
1231
|
+
...t,
|
|
1232
|
+
toolRequestId: at
|
|
1233
|
+
}));
|
|
1234
|
+
let n = ht(e, w(J), w(Y));
|
|
1235
|
+
w(W).getToolState(n) || w(W).registerTool(n, e), w(W).showTool(n), queueMicrotask(() => Vt());
|
|
1236
|
+
}
|
|
1237
|
+
});
|
|
1238
|
+
}), y(() => {
|
|
1239
|
+
if (!w(Q).subscribeVisibility) return;
|
|
1240
|
+
let e = !1, t = w(Q).subscribeVisibility(() => {
|
|
1241
|
+
queueMicrotask(() => {
|
|
1242
|
+
e || Vt();
|
|
1243
|
+
});
|
|
1244
|
+
});
|
|
1245
|
+
return () => {
|
|
1246
|
+
e = !0, t?.();
|
|
1247
|
+
};
|
|
1248
|
+
}), y(() => {
|
|
1249
|
+
let e = w(Q).toolkitCoordinator;
|
|
1250
|
+
if (typeof e?.subscribeTelemetry != "function") return;
|
|
1251
|
+
let t = !1, n = e.subscribeTelemetry(({ eventName: e, payload: n }) => {
|
|
1252
|
+
e === "pie-toolkit-tool-config-updated" && (n?.toolId && !w(tt).includes(n.toolId) || queueMicrotask(() => {
|
|
1253
|
+
t || (oe(U, w(U) + 1), Vt());
|
|
1254
|
+
}));
|
|
1255
|
+
});
|
|
1256
|
+
return () => {
|
|
1257
|
+
t = !0, n?.();
|
|
1258
|
+
};
|
|
1259
|
+
});
|
|
1260
|
+
function Ht(e, t) {
|
|
1261
|
+
if (t.container !== "content-boundary") return e;
|
|
1262
|
+
let n = e;
|
|
1263
|
+
for (; n;) {
|
|
1264
|
+
if (n instanceof HTMLElement && n.matches("[data-pie-tool-overlay-boundary]")) return n;
|
|
1265
|
+
if (n instanceof HTMLElement && n.parentElement) {
|
|
1266
|
+
n = n.parentElement;
|
|
1267
|
+
continue;
|
|
1268
|
+
}
|
|
1269
|
+
let e = n.getRootNode();
|
|
1270
|
+
n = e instanceof ShadowRoot ? e.host : null;
|
|
1271
|
+
}
|
|
1272
|
+
return e;
|
|
1273
|
+
}
|
|
1274
|
+
function Ut(e, t) {
|
|
1275
|
+
let n = t, r = null, i = e, a = (e) => {
|
|
1276
|
+
if (!e) return;
|
|
1277
|
+
let t = e.__pieToolElementUnmount;
|
|
1278
|
+
typeof t == "function" && t();
|
|
1279
|
+
}, o = (t) => {
|
|
1280
|
+
r !== t && (r && (a(r), r.parentNode === i && i.removeChild(r)), r = t, r && (i = Ht(e, n), r.parentNode && r.parentNode !== i && r.parentNode.removeChild(r), i.appendChild(r)));
|
|
1281
|
+
};
|
|
1282
|
+
return o(t.element), {
|
|
1283
|
+
update(e) {
|
|
1284
|
+
n = e, o(e.element);
|
|
1285
|
+
},
|
|
1286
|
+
destroy() {
|
|
1287
|
+
o(null);
|
|
1288
|
+
}
|
|
1289
|
+
};
|
|
1290
|
+
}
|
|
1291
|
+
function Wt(t, n) {
|
|
1292
|
+
let s = n, c = null, l = null, u = [], d = null, f = null, p = null, m = null, h = null, g = null, ee = null, _ = !1, y = !1, ne = () => s.mounted.entry.shell?.pageTabOrder === !0, b = () => s.mounted.entry.shell?.ndsHeaderControls === !0, x = null, re = null, ie = null, ae = 0, oe = 0, S = 0, C = 0, se = 0, T = 0, ce = 0, le = 0, ue = null, E = [], D = 0, O = 0, k = s.mounted.entry.shell?.initialWidth ?? 720, A = s.mounted.entry.shell?.initialHeight ?? 560, j = k, de = A, fe = !1, pe = null, M = null, he = !1, ge = (e) => {
|
|
1293
|
+
if (!e) return;
|
|
1294
|
+
let t = e.__pieToolElementUnmount;
|
|
1295
|
+
typeof t == "function" && t();
|
|
1296
|
+
}, _e = () => {
|
|
1297
|
+
let e = s.mounted.entry.shell;
|
|
1298
|
+
return e ? {
|
|
1299
|
+
toolId: s.mounted.toolId,
|
|
1300
|
+
toolbarContext: w(Q),
|
|
1301
|
+
shellConfig: e
|
|
1302
|
+
} : null;
|
|
1303
|
+
}, ve = (e) => {
|
|
1304
|
+
let t = w(Z).get(s.mounted.toolId), n = _e();
|
|
1305
|
+
!t?.onHostedMount || !n || t.onHostedMount(e, n);
|
|
1306
|
+
}, ye = () => {
|
|
1307
|
+
let e = w(Z).get(s.mounted.toolId), t = _e();
|
|
1308
|
+
!e?.onHostedResize || !t || e.onHostedResize({
|
|
1309
|
+
width: k,
|
|
1310
|
+
height: A
|
|
1311
|
+
}, s.mounted.entry.element, t);
|
|
1312
|
+
}, be = () => {
|
|
1313
|
+
let e = w(Z).get(s.mounted.toolId), t = _e();
|
|
1314
|
+
!e?.onHostedUnmount || !t || e.onHostedUnmount(s.mounted.entry.element, t);
|
|
1315
|
+
}, N = (e, t, n) => Math.max(t, Math.min(e, n)), xe = () => {
|
|
1316
|
+
let e = s.mounted.entry.shell;
|
|
1317
|
+
return {
|
|
1318
|
+
minWidth: e?.minWidth ?? 320,
|
|
1319
|
+
minHeight: e?.minHeight ?? 240,
|
|
1320
|
+
maxWidth: e?.maxWidth ?? window.innerWidth,
|
|
1321
|
+
maxHeight: e?.maxHeight ?? window.innerHeight
|
|
1322
|
+
};
|
|
1323
|
+
}, Se = () => {
|
|
1324
|
+
let e = s.mounted.entry.shell?.minWidth, t = typeof e == "number" && e > 0 && k < e, n = t ? `${e}px` : "";
|
|
1325
|
+
x && (x.style.minWidth = n), d && (d.style.minWidth = "0"), f && (f.style.minWidth = "0", f.style.overflowX = t ? "auto" : "hidden");
|
|
1326
|
+
}, Ce = () => s.mounted.entry.shell?.content?.overflowY === "auto" ? "auto" : "hidden", we = () => {
|
|
1327
|
+
if (!d) return 0;
|
|
1328
|
+
let e = d.getBoundingClientRect().height;
|
|
1329
|
+
return e > 0 ? e : d.offsetHeight || 0;
|
|
1330
|
+
}, Te = () => {
|
|
1331
|
+
if (!f) return;
|
|
1332
|
+
let e = s.mounted.entry.shell;
|
|
1333
|
+
if (f.style.overflowY = Ce(), x) {
|
|
1334
|
+
if (e?.content?.preserveMinHeight === !0) {
|
|
1335
|
+
let t = we(), n = e.minHeight ?? 240, r = Math.max(0, n - t), i = Math.max(0, A - t), a = Math.max(i, r);
|
|
1336
|
+
x.style.height = `${a}px`, x.style.minHeight = "0", x.style.flex = `0 0 ${a}px`;
|
|
1337
|
+
return;
|
|
1338
|
+
}
|
|
1339
|
+
x.style.height = "100%", x.style.minHeight = "0", x.style.flex = "1 1 auto";
|
|
1340
|
+
}
|
|
1341
|
+
}, Ee = () => {
|
|
1342
|
+
let e = s.mounted.entry.shell, t = e?.initialWidth ?? 720, n = e?.initialHeight ?? 560;
|
|
1343
|
+
(t !== j || n !== de) && (j = t, de = n, !fe && (k = t, A = n, B()));
|
|
1344
|
+
}, P = () => {
|
|
1345
|
+
let { minWidth: e, minHeight: t, maxWidth: n, maxHeight: r } = xe(), i = Math.min(e, window.innerWidth), a = Math.min(t, window.innerHeight);
|
|
1346
|
+
k = N(k, i, Math.max(i, Math.min(n, window.innerWidth))), A = N(A, a, Math.max(a, Math.min(r, window.innerHeight))), D = N(D, 0, Math.max(0, window.innerWidth - k)), O = N(O, 0, Math.max(0, window.innerHeight - A)), L(), Se(), Te(), ye();
|
|
1347
|
+
}, F = (e, t) => {
|
|
1348
|
+
fe = !0, D += e, O += t, P();
|
|
1349
|
+
}, I = (e, t) => {
|
|
1350
|
+
fe = !0, k += e, A += t, P();
|
|
1351
|
+
}, De = (e, t, n, r = "fa-regular") => {
|
|
1352
|
+
let i = document.createElement("nds-icon-button");
|
|
1353
|
+
if (i.setAttribute("variant", "tertiary"), i.setAttribute("size", "small"), i.setAttribute("type", "circle"), i.setAttribute("icon-name", t), i.setAttribute("button-aria-label", e), i.title = e, i.addEventListener("click", (e) => {
|
|
1354
|
+
e.stopPropagation(), n(), R();
|
|
1355
|
+
}), r !== "fa-light") {
|
|
1356
|
+
let e = (e) => {
|
|
1357
|
+
e.classList.remove("fa-light"), e.classList.add(r);
|
|
1358
|
+
}, t = i.querySelector("i.fa-light");
|
|
1359
|
+
if (t) e(t);
|
|
1360
|
+
else {
|
|
1361
|
+
let t = new MutationObserver(() => {
|
|
1362
|
+
let n = i.querySelector("i.fa-light");
|
|
1363
|
+
n && (e(n), t.disconnect());
|
|
1364
|
+
});
|
|
1365
|
+
t.observe(i, {
|
|
1366
|
+
childList: !0,
|
|
1367
|
+
subtree: !0
|
|
1368
|
+
});
|
|
1369
|
+
}
|
|
1370
|
+
}
|
|
1371
|
+
return i;
|
|
1372
|
+
}, Oe = (e, t, n) => {
|
|
1373
|
+
let r = document.createElement("button");
|
|
1374
|
+
return r.type = "button", r.className = "pie-tool-shell__control", r.setAttribute("aria-label", e), r.title = e, r.textContent = t, r.style.border = "1px solid transparent", r.style.background = "color-mix(in srgb, var(--pie-white, #fff) 10%, transparent)", r.style.color = "inherit", r.style.cursor = "pointer", r.style.display = "inline-flex", r.style.alignItems = "center", r.style.justifyContent = "center", r.style.width = "28px", r.style.height = "28px", r.style.padding = "0", r.style.fontSize = "14px", r.style.fontWeight = "700", r.style.borderRadius = "8px", r.style.lineHeight = "1", r.onclick = (e) => {
|
|
1375
|
+
e.stopPropagation(), n(), R();
|
|
1376
|
+
}, r.onfocus = () => {
|
|
1377
|
+
r.style.outline = "2px solid var(--pie-button-focus-outline, var(--pie-primary, #4A90E2))", r.style.outlineOffset = "2px";
|
|
1378
|
+
}, r.onblur = () => {
|
|
1379
|
+
r.style.outline = "none", r.style.outlineOffset = "0";
|
|
1380
|
+
}, r;
|
|
1381
|
+
}, L = () => {
|
|
1382
|
+
c && (c.style.left = `${D}px`, c.style.top = `${O}px`, c.style.width = `${k}px`, c.style.height = `${A}px`, c.style.display = s.active ? "flex" : "none");
|
|
1383
|
+
}, ke = () => {
|
|
1384
|
+
p && (p.textContent = s.mounted.entry.shell?.title || s.mounted.toolId);
|
|
1385
|
+
for (let { el: e, key: t } of u) {
|
|
1386
|
+
let n = s.i18n.t(t);
|
|
1387
|
+
e.tagName === "NDS-ICON-BUTTON" ? e.setAttribute("button-aria-label", n) : e.setAttribute("aria-label", n), e.title &&= n;
|
|
1388
|
+
}
|
|
1389
|
+
}, Ae = () => {
|
|
1390
|
+
if (!f) return;
|
|
1391
|
+
let e = s.mounted.entry.element;
|
|
1392
|
+
e.style.display = "block", e.style.width = "100%", e.style.height = "100%", e.style.flex = "1 1 auto", e.style.minHeight = "0", x && x !== e && (x.parentNode === f && (ge(x), f.removeChild(x)), x = null), e.parentNode && e.parentNode !== f && e.parentNode.removeChild(e), e.parentNode !== f && f.appendChild(e), x = e, Se(), Te(), ve(e);
|
|
1393
|
+
}, R = () => {
|
|
1394
|
+
w(W) && c && w(W).bringToFront(c);
|
|
1395
|
+
}, B = () => {
|
|
1396
|
+
let { innerWidth: e, innerHeight: t } = window, n = s.mounted.entry.shell, r = n?.initialAlign ?? "center", i = n?.initialMargin ?? 16, a = i + 60;
|
|
1397
|
+
switch (r) {
|
|
1398
|
+
case "top-left":
|
|
1399
|
+
D = i, O = a;
|
|
1400
|
+
break;
|
|
1401
|
+
case "top-right":
|
|
1402
|
+
D = Math.max(0, e - k - i), O = a;
|
|
1403
|
+
break;
|
|
1404
|
+
case "bottom-left":
|
|
1405
|
+
D = i, O = Math.max(0, t - A - a);
|
|
1406
|
+
break;
|
|
1407
|
+
case "bottom-right":
|
|
1408
|
+
D = Math.max(0, e - k - i), O = Math.max(0, t - A - a);
|
|
1409
|
+
break;
|
|
1410
|
+
default: D = Math.max(0, Math.round((e - k) / 2)), O = Math.max(0, Math.round((t - A) / 2));
|
|
1411
|
+
}
|
|
1412
|
+
P();
|
|
1413
|
+
}, V = () => {
|
|
1414
|
+
let e = M;
|
|
1415
|
+
e && queueMicrotask(() => {
|
|
1416
|
+
if (e.isConnected) try {
|
|
1417
|
+
e.focus();
|
|
1418
|
+
} catch {}
|
|
1419
|
+
});
|
|
1420
|
+
}, H = () => {
|
|
1421
|
+
if (typeof document > "u") return null;
|
|
1422
|
+
let e = document.activeElement;
|
|
1423
|
+
for (; e;) {
|
|
1424
|
+
let t = e.shadowRoot;
|
|
1425
|
+
if (t && t.activeElement && t.activeElement !== e) e = t.activeElement;
|
|
1426
|
+
else break;
|
|
1427
|
+
}
|
|
1428
|
+
return e ?? null;
|
|
1429
|
+
}, U = () => {
|
|
1430
|
+
if (!c || pe) return;
|
|
1431
|
+
let e = H();
|
|
1432
|
+
!M && e && !c.contains(e) && (M = e), ne() && !y && (document.addEventListener("keydown", Pe, !0), y = !0), pe = o(c, {
|
|
1433
|
+
initialFocus: h,
|
|
1434
|
+
onEscape: () => {
|
|
1435
|
+
Ie();
|
|
1436
|
+
},
|
|
1437
|
+
wrap: !ne(),
|
|
1438
|
+
onTabExit: ne() ? (e, t) => {
|
|
1439
|
+
if (e === "backward") {
|
|
1440
|
+
if (M?.isConnected) {
|
|
1441
|
+
t.preventDefault();
|
|
1442
|
+
try {
|
|
1443
|
+
M.focus();
|
|
1444
|
+
} catch {}
|
|
1445
|
+
}
|
|
1446
|
+
return;
|
|
1447
|
+
}
|
|
1448
|
+
let n = Me();
|
|
1449
|
+
if (n) {
|
|
1450
|
+
t.preventDefault();
|
|
1451
|
+
try {
|
|
1452
|
+
n.focus();
|
|
1453
|
+
} catch {}
|
|
1454
|
+
}
|
|
1455
|
+
} : void 0
|
|
1456
|
+
});
|
|
1457
|
+
}, Me = () => {
|
|
1458
|
+
let e = w(Q).getScopeElement?.() ?? null;
|
|
1459
|
+
if (!e) return null;
|
|
1460
|
+
let t = (e) => !!(w(z) && w(z).contains(e) || c && c.contains(e)), n = (e) => {
|
|
1461
|
+
if (e instanceof HTMLElement) {
|
|
1462
|
+
if (t(e)) return null;
|
|
1463
|
+
if (e.matches?.(i) && r(e)) return e;
|
|
1464
|
+
}
|
|
1465
|
+
let a = e.shadowRoot;
|
|
1466
|
+
if (a) for (let e = 0; e < a.children.length; e++) {
|
|
1467
|
+
let t = n(a.children[e]);
|
|
1468
|
+
if (t) return t;
|
|
1469
|
+
}
|
|
1470
|
+
for (let t = 0; t < e.children.length; t++) {
|
|
1471
|
+
let r = n(e.children[t]);
|
|
1472
|
+
if (r) return r;
|
|
1473
|
+
}
|
|
1474
|
+
return null;
|
|
1475
|
+
};
|
|
1476
|
+
return n(e);
|
|
1477
|
+
}, Ne = () => c ? a(c).filter((e) => e !== g && e !== ee) : [], Pe = (e) => {
|
|
1478
|
+
if (e.key !== "Tab" || !c || !s.active) return;
|
|
1479
|
+
let t = H();
|
|
1480
|
+
if (!t || c.contains(t)) return;
|
|
1481
|
+
let n = Ne();
|
|
1482
|
+
if (n.length !== 0) {
|
|
1483
|
+
if (e.shiftKey) {
|
|
1484
|
+
if (t !== Me()) return;
|
|
1485
|
+
e.preventDefault();
|
|
1486
|
+
try {
|
|
1487
|
+
n[n.length - 1].focus();
|
|
1488
|
+
} catch {}
|
|
1489
|
+
return;
|
|
1490
|
+
}
|
|
1491
|
+
if (t === M) {
|
|
1492
|
+
e.preventDefault();
|
|
1493
|
+
try {
|
|
1494
|
+
n[0].focus();
|
|
1495
|
+
} catch {}
|
|
1496
|
+
}
|
|
1497
|
+
}
|
|
1498
|
+
}, Fe = () => {
|
|
1499
|
+
if (y &&= (document.removeEventListener("keydown", Pe, !0), !1), !pe) return;
|
|
1500
|
+
let e = pe;
|
|
1501
|
+
pe = null;
|
|
1502
|
+
try {
|
|
1503
|
+
e();
|
|
1504
|
+
} catch {}
|
|
1505
|
+
V();
|
|
1506
|
+
}, Ie = () => {
|
|
1507
|
+
w(Q).toggleTool(s.mounted.toolId), Vt();
|
|
1508
|
+
}, G = (e) => {
|
|
1509
|
+
s.mounted.entry.shell?.draggable && (e.target.closest("button") || !c || (e.preventDefault(), fe = !0, re = e.pointerId, ae = e.clientX - D, oe = e.clientY - O, c.setPointerCapture(e.pointerId), R()));
|
|
1510
|
+
}, K = (e) => (t) => {
|
|
1511
|
+
!c || !s.mounted.entry.shell?.resizable || (t.preventDefault(), t.stopPropagation(), fe = !0, ie = t.pointerId, ue = e, S = k, C = A, se = t.clientX, T = t.clientY, ce = D, le = O, c.setPointerCapture(t.pointerId), R());
|
|
1512
|
+
}, q = (e) => {
|
|
1513
|
+
if (c) {
|
|
1514
|
+
if (re === e.pointerId) {
|
|
1515
|
+
e.preventDefault();
|
|
1516
|
+
let t = Math.max(0, window.innerWidth - k), n = Math.max(0, window.innerHeight - A);
|
|
1517
|
+
D = N(e.clientX - ae, 0, t), O = N(e.clientY - oe, 0, n), L();
|
|
1518
|
+
return;
|
|
1519
|
+
}
|
|
1520
|
+
if (ie === e.pointerId) {
|
|
1521
|
+
e.preventDefault();
|
|
1522
|
+
let t = s.mounted.entry.shell, n = t?.minWidth ?? 320, r = t?.minHeight ?? 240, i = Math.min(n, window.innerWidth), a = Math.min(r, window.innerHeight), o = t?.maxWidth ?? window.innerWidth, c = t?.maxHeight ?? window.innerHeight, l = e.clientX - se, u = e.clientY - T;
|
|
1523
|
+
if (ue === "se") k = N(S + l, i, Math.max(i, Math.min(o, window.innerWidth - D))), A = N(C + u, a, Math.max(a, Math.min(c, window.innerHeight - O)));
|
|
1524
|
+
else if (ue === "sw") {
|
|
1525
|
+
let e = ce + S, t = N(S - l, i, Math.min(o, e));
|
|
1526
|
+
D = e - t, k = t, A = N(C + u, a, Math.max(a, Math.min(c, window.innerHeight - O)));
|
|
1527
|
+
} else if (ue === "ne") {
|
|
1528
|
+
let e = le + C;
|
|
1529
|
+
k = N(S + l, i, Math.max(i, Math.min(o, window.innerWidth - D)));
|
|
1530
|
+
let t = N(C - u, a, Math.min(c, e));
|
|
1531
|
+
O = e - t, A = t;
|
|
1532
|
+
} else if (ue === "nw") {
|
|
1533
|
+
let e = ce + S, t = le + C, n = N(S - l, i, Math.min(o, e));
|
|
1534
|
+
D = e - n, k = n;
|
|
1535
|
+
let r = N(C - u, a, Math.min(c, t));
|
|
1536
|
+
O = t - r, A = r;
|
|
1537
|
+
}
|
|
1538
|
+
L(), Se(), Te(), ye();
|
|
1539
|
+
}
|
|
1540
|
+
}
|
|
1541
|
+
}, Le = (e) => {
|
|
1542
|
+
c && (re === e.pointerId && (re = null, c.releasePointerCapture(e.pointerId)), ie === e.pointerId && (ie = null, c.releasePointerCapture(e.pointerId)));
|
|
1543
|
+
}, J = () => {
|
|
1544
|
+
P();
|
|
1545
|
+
};
|
|
1546
|
+
if (v && s.mounted.entry.shell) {
|
|
1547
|
+
let t = s.mounted.entry.shell?.ndsHeaderControls === !0 && w(je);
|
|
1548
|
+
t && me(), c = document.createElement("div"), c.className = "pie-tool-shell", c.setAttribute("data-pie-tool-shell", s.mounted.toolId), c.style.position = "fixed", c.style.zIndex = "2000", c.style.background = "var(--pie-background, #fff)", c.style.border = "1px solid var(--pie-border-light, #d1d5db)", c.style.borderRadius = "12px", c.style.boxShadow = "0 10px 40px color-mix(in srgb, var(--pie-black, #000) 25%, transparent)", c.style.setProperty("--color-interactive-blue", "var(--pie-calculator-button-color, var(--pie-button-color, var(--pie-text, #222)))"), c.style.setProperty("--color-new-gray", "var(--pie-background-dark, #f3f5f7)"), c.style.setProperty("--color-primary-white", "var(--pie-white, #ffffff)"), c.style.setProperty("--color-primary-black", "var(--pie-text, #000000)"), c.style.setProperty("--color-focus-blue", "var(--pie-button-focus-outline, #2b87ff)"), c.style.overflow = "visible", c.style.display = s.active ? "flex" : "none", c.style.flexDirection = "column", c.style.userSelect = "none", c.style.webkitUserSelect = "none", c.style.touchAction = "none", c.setAttribute("draggable", "false"), c.addEventListener("dragstart", (e) => e.preventDefault()), d = document.createElement("div"), d.className = "pie-tool-shell__header", d.style.display = "flex", d.style.flexWrap = "wrap", d.style.alignItems = "center", d.style.justifyContent = "space-between", d.style.gap = "6px", d.style.padding = b() ? "12px 12px 12px 28px" : "10px 12px", b() && (d.style.minHeight = "48px"), b() ? (d.style.background = "var(--pie-section-player-card-header-background, var(--pie-button-active-bg, #f3f4f6))", d.style.color = "var(--pie-text, #111827)", d.style.borderBottom = "1px solid var(--pie-border-light, #e5e7eb)") : (d.style.background = "var(--pie-primary-dark, #2c3e50)", d.style.color = "var(--pie-white, #fff)"), d.style.cursor = s.mounted.entry.shell.draggable === !1 ? "default" : "move", d.style.flex = "0 0 auto", d.style.borderRadius = "12px 12px 0 0", d.style.overflow = "hidden", d.style.userSelect = "none", d.style.webkitUserSelect = "none", d.style.touchAction = "none", d.setAttribute("draggable", "false"), d.addEventListener("dragstart", (e) => e.preventDefault()), p = document.createElement("span"), p.className = "pie-tool-shell__title", p.style.minWidth = "0", p.style.overflowWrap = "anywhere", p.textContent = s.mounted.entry.shell.title || s.mounted.toolId, d.appendChild(p), m = document.createElement("div"), m.className = "pie-tool-shell__controls", m.style.display = "inline-flex", m.style.flexWrap = "wrap", m.style.minWidth = "0", m.style.alignItems = "center", m.style.gap = b() ? "6px" : "4px";
|
|
1549
|
+
let n = s.mounted.entry.shell, r = (e, n, r, i, a = "fa-regular") => {
|
|
1550
|
+
if (!m) return;
|
|
1551
|
+
let o = s.i18n.t(e), c = t ? De(o, r, i, a) : Oe(o, n, i);
|
|
1552
|
+
u.push({
|
|
1553
|
+
el: c,
|
|
1554
|
+
key: e
|
|
1555
|
+
}), m.appendChild(c);
|
|
1556
|
+
};
|
|
1557
|
+
if (n?.draggable !== !1 && (r("toolkit.window.moveLeftA11y", "←", "chevron-left", () => F(-24, 0)), r("toolkit.window.moveRightA11y", "→", "chevron-right", () => F(24, 0)), r("toolkit.window.moveUpA11y", "↑", "chevron-up", () => F(0, -24)), r("toolkit.window.moveDownA11y", "↓", "chevron-down", () => F(0, 24))), n?.resizable !== !1 && (r("toolkit.window.shrinkA11y", "−", "magnifying-glass-minus", () => I(-40, -40)), r("toolkit.window.growA11y", "+", "magnifying-glass-plus", () => I(40, 40))), !b()) {
|
|
1558
|
+
let e = Oe(s.i18n.t("toolkit.window.centerA11y"), "◎", B);
|
|
1559
|
+
u.push({
|
|
1560
|
+
el: e,
|
|
1561
|
+
key: "toolkit.window.centerA11y"
|
|
1562
|
+
}), m.appendChild(e);
|
|
1563
|
+
}
|
|
1564
|
+
let i = null;
|
|
1565
|
+
if (b() ? (i = document.createElement("div"), i.className = "pie-tool-shell__header-right", i.style.display = "inline-flex", i.style.flexWrap = "wrap", i.style.maxWidth = "100%", i.style.justifyContent = "flex-end", i.style.alignItems = "center", i.style.gap = "6px", i.appendChild(m), d.appendChild(i)) : d.appendChild(m), t) h = De(s.i18n.t("toolkit.window.closeA11y"), "xmark", Ie, "fa-regular"), u.push({
|
|
1566
|
+
el: h,
|
|
1567
|
+
key: "toolkit.window.closeA11y"
|
|
1568
|
+
}), h.style.display = s.mounted.entry.shell.closeable === !1 ? "none" : "inline-block";
|
|
1569
|
+
else {
|
|
1570
|
+
let e = document.createElement("button");
|
|
1571
|
+
e.type = "button", e.className = "pie-tool-shell__close", e.setAttribute("aria-label", s.i18n.t("toolkit.window.closeA11y")), u.push({
|
|
1572
|
+
el: e,
|
|
1573
|
+
key: "toolkit.window.closeA11y"
|
|
1574
|
+
});
|
|
1575
|
+
let t = "http://www.w3.org/2000/svg", n = document.createElementNS(t, "svg");
|
|
1576
|
+
n.setAttribute("xmlns", t), n.setAttribute("viewBox", "0 0 16 16"), n.setAttribute("aria-hidden", "true");
|
|
1577
|
+
let r = document.createElementNS(t, "path");
|
|
1578
|
+
r.setAttribute("d", "M3.5 3.5L12.5 12.5M12.5 3.5L3.5 12.5"), r.setAttribute("stroke", "currentColor"), r.setAttribute("stroke-width", "1.8"), r.setAttribute("stroke-linecap", "round"), n.appendChild(r), e.appendChild(n);
|
|
1579
|
+
let i = n.style;
|
|
1580
|
+
i.width = "16px", i.height = "16px", i.display = "block", i.flexShrink = "0", i.pointerEvents = "none";
|
|
1581
|
+
let a = "color-mix(in srgb, var(--pie-white, #fff) 8%, transparent)";
|
|
1582
|
+
e.style.border = "1px solid transparent", e.style.background = a, e.style.color = "inherit", e.style.cursor = "pointer", e.style.display = "inline-flex", e.style.alignItems = "center", e.style.justifyItems = "center", e.style.width = "28px", e.style.height = "28px", e.style.padding = "0", e.style.borderRadius = "8px", e.style.lineHeight = "0", e.style.transition = "background-color 0.15s ease, border-color 0.15s ease", e.style.display = s.mounted.entry.shell.closeable === !1 ? "none" : "inline-flex", e.onmouseenter = () => {
|
|
1583
|
+
e.style.background = "color-mix(in srgb, var(--pie-white, #fff) 18%, transparent)";
|
|
1584
|
+
}, e.onmouseleave = () => {
|
|
1585
|
+
e.style.background = a;
|
|
1586
|
+
}, e.onfocus = () => {
|
|
1587
|
+
e.style.outline = "2px solid var(--pie-button-focus-outline, var(--pie-primary, #4A90E2))", e.style.outlineOffset = "2px";
|
|
1588
|
+
}, e.onblur = () => {
|
|
1589
|
+
e.style.outline = "none", e.style.outlineOffset = "0";
|
|
1590
|
+
}, e.onclick = Ie, h = e;
|
|
1591
|
+
}
|
|
1592
|
+
if (i ? i.appendChild(h) : d.appendChild(h), d.tabIndex = 0, d.onkeydown = (e) => {
|
|
1593
|
+
if (e.key === "Home") {
|
|
1594
|
+
e.preventDefault(), B();
|
|
1595
|
+
return;
|
|
1596
|
+
}
|
|
1597
|
+
let t = s.mounted.entry.shell;
|
|
1598
|
+
if (e.shiftKey && t?.resizable !== !1) {
|
|
1599
|
+
if (e.key === "ArrowRight" || e.key === "ArrowDown") {
|
|
1600
|
+
e.preventDefault(), I(40, 40);
|
|
1601
|
+
return;
|
|
1602
|
+
}
|
|
1603
|
+
if (e.key === "ArrowLeft" || e.key === "ArrowUp") {
|
|
1604
|
+
e.preventDefault(), I(-40, -40);
|
|
1605
|
+
return;
|
|
1606
|
+
}
|
|
1607
|
+
}
|
|
1608
|
+
t?.draggable !== !1 && (e.key === "ArrowLeft" ? (e.preventDefault(), F(-24, 0)) : e.key === "ArrowRight" ? (e.preventDefault(), F(24, 0)) : e.key === "ArrowUp" ? (e.preventDefault(), F(0, -24)) : e.key === "ArrowDown" && (e.preventDefault(), F(0, 24)));
|
|
1609
|
+
}, f = document.createElement("div"), f.className = "pie-tool-shell__content", f.style.position = "relative", f.style.width = "100%", f.style.flex = "1 1 auto", f.style.minHeight = "0", f.style.overflowX = "hidden", f.style.overflowY = Ce(), f.style.borderRadius = "0 0 12px 12px", b()) {
|
|
1610
|
+
let e = (e) => {
|
|
1611
|
+
let t = document.createElement("div");
|
|
1612
|
+
return t.tabIndex = 0, t.setAttribute("aria-hidden", "true"), t.setAttribute("data-pie-tool-shell-focus-guard", e), t.style.position = "absolute", t.style.width = "1px", t.style.height = "1px", t.style.padding = "0", t.style.margin = "-1px", t.style.overflow = "hidden", t.style.clipPath = "inset(50%)", t.style.whiteSpace = "nowrap", t.style.border = "0", t;
|
|
1613
|
+
};
|
|
1614
|
+
g = e("start"), ee = e("end"), g.addEventListener("focus", (e) => {
|
|
1615
|
+
if (!_) {
|
|
1616
|
+
_ = !0;
|
|
1617
|
+
try {
|
|
1618
|
+
if (e.stopPropagation(), M?.isConnected) try {
|
|
1619
|
+
M.focus();
|
|
1620
|
+
} catch {}
|
|
1621
|
+
} finally {
|
|
1622
|
+
queueMicrotask(() => {
|
|
1623
|
+
_ = !1;
|
|
1624
|
+
});
|
|
1625
|
+
}
|
|
1626
|
+
}
|
|
1627
|
+
}), ee.addEventListener("focus", (e) => {
|
|
1628
|
+
if (!_) {
|
|
1629
|
+
_ = !0;
|
|
1630
|
+
try {
|
|
1631
|
+
e.stopPropagation();
|
|
1632
|
+
let t = Me();
|
|
1633
|
+
if (t) try {
|
|
1634
|
+
t.focus();
|
|
1635
|
+
} catch {}
|
|
1636
|
+
} finally {
|
|
1637
|
+
queueMicrotask(() => {
|
|
1638
|
+
_ = !1;
|
|
1639
|
+
});
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
}), c.appendChild(g);
|
|
1643
|
+
}
|
|
1644
|
+
if (c.appendChild(d), c.appendChild(f), b() && ee && c.appendChild(ee), s.mounted.entry.shell.resizable !== !1) {
|
|
1645
|
+
let e = (e, t, n, r, i, a, o) => {
|
|
1646
|
+
let s = document.createElement("div");
|
|
1647
|
+
s.className = "pie-tool-shell__resize", s.style.position = "absolute", s.style.width = "24px", s.style.height = "24px", s.style.cursor = a, s.style.zIndex = "10", s.style.touchAction = "none", s.setAttribute("draggable", "false"), t !== null && (s.style.top = t), n !== null && (s.style.right = n), r !== null && (s.style.bottom = r), i !== null && (s.style.left = i), o !== null && (s.style.background = `linear-gradient(${o}, transparent 0%, transparent 40%, rgba(0,0,0,0.35) 40%, rgba(0,0,0,0.35) 60%, transparent 60%, transparent 100%)`);
|
|
1648
|
+
let l = K(e);
|
|
1649
|
+
s.addEventListener("pointerdown", l), c.appendChild(s), E.push({
|
|
1650
|
+
el: s,
|
|
1651
|
+
handler: l
|
|
1652
|
+
});
|
|
1653
|
+
};
|
|
1654
|
+
e("se", null, "0", "0", null, "nwse-resize", null), e("nw", "0", null, null, "0", "nwse-resize", "135deg"), e("ne", "0", "0", null, null, "nesw-resize", null), e("sw", null, null, "0", "0", "nesw-resize", null);
|
|
1655
|
+
}
|
|
1656
|
+
d.addEventListener("pointerdown", G), c.addEventListener("pointermove", q), c.addEventListener("pointerup", Le), c.addEventListener("pointerdown", R), window.addEventListener("resize", J), document.body.appendChild(c), l = new e(c, {
|
|
1657
|
+
context: te,
|
|
1658
|
+
initialValue: s.runtime
|
|
1659
|
+
}), l.connect(), B(), L(), ke(), Ae(), ye(), s.active && U(), he = s.active;
|
|
1660
|
+
}
|
|
1661
|
+
return {
|
|
1662
|
+
update(e) {
|
|
1663
|
+
if (s = e, !c || !f || !p || !h) return;
|
|
1664
|
+
l?.setValue(s.runtime), ke(), Ee();
|
|
1665
|
+
let t = h.tagName.toLowerCase() === "nds-icon-button" ? "inline-block" : "inline-flex";
|
|
1666
|
+
h.style.display = s.mounted.entry.shell?.closeable === !1 ? "none" : t, L(), Ae(), ye(), !he && s.active ? U() : he && !s.active && (Fe(), M = null), he = s.active;
|
|
1667
|
+
},
|
|
1668
|
+
destroy() {
|
|
1669
|
+
be(), l?.disconnect(), l = null, u.length = 0, pe && Fe(), y &&= (document.removeEventListener("keydown", Pe, !0), !1);
|
|
1670
|
+
for (let { el: e, handler: t } of E) e.removeEventListener("pointerdown", t);
|
|
1671
|
+
M = null, E.length = 0, d && (d.removeEventListener("pointerdown", G), d.onkeydown = null), c && (c.removeEventListener("pointermove", q), c.removeEventListener("pointerup", Le), c.removeEventListener("pointerdown", R)), window.removeEventListener("resize", J), x && f && x.parentNode === f && (ge(x), f.removeChild(x)), x = null, c && c.parentElement && c.remove();
|
|
1672
|
+
}
|
|
1673
|
+
};
|
|
1674
|
+
}
|
|
1675
|
+
var Gt = {
|
|
1676
|
+
get level() {
|
|
1677
|
+
return xe();
|
|
1678
|
+
},
|
|
1679
|
+
set level(e) {
|
|
1680
|
+
xe(e), j();
|
|
1681
|
+
},
|
|
1682
|
+
get scopeId() {
|
|
1683
|
+
return Se();
|
|
1684
|
+
},
|
|
1685
|
+
set scopeId(e) {
|
|
1686
|
+
Se(e), j();
|
|
1687
|
+
},
|
|
1688
|
+
get itemId() {
|
|
1689
|
+
return Ce();
|
|
1690
|
+
},
|
|
1691
|
+
set itemId(e) {
|
|
1692
|
+
Ce(e), j();
|
|
1693
|
+
},
|
|
1694
|
+
get sectionId() {
|
|
1695
|
+
return we();
|
|
1696
|
+
},
|
|
1697
|
+
set sectionId(e) {
|
|
1698
|
+
we(e), j();
|
|
1699
|
+
},
|
|
1700
|
+
get catalogId() {
|
|
1701
|
+
return Te();
|
|
1702
|
+
},
|
|
1703
|
+
set catalogId(e) {
|
|
1704
|
+
Te(e), j();
|
|
1705
|
+
},
|
|
1706
|
+
get tools() {
|
|
1707
|
+
return Ee();
|
|
1708
|
+
},
|
|
1709
|
+
set tools(e) {
|
|
1710
|
+
Ee(e), j();
|
|
1711
|
+
},
|
|
1712
|
+
get contentKind() {
|
|
1713
|
+
return P();
|
|
1714
|
+
},
|
|
1715
|
+
set contentKind(e) {
|
|
1716
|
+
P(e), j();
|
|
1717
|
+
},
|
|
1718
|
+
get position() {
|
|
1719
|
+
return F();
|
|
1720
|
+
},
|
|
1721
|
+
set position(e) {
|
|
1722
|
+
F(e), j();
|
|
1723
|
+
},
|
|
1724
|
+
get scopeElement() {
|
|
1725
|
+
return I();
|
|
1726
|
+
},
|
|
1727
|
+
set scopeElement(e) {
|
|
1728
|
+
I(e), j();
|
|
1729
|
+
},
|
|
1730
|
+
get toolRegistry() {
|
|
1731
|
+
return De();
|
|
1732
|
+
},
|
|
1733
|
+
set toolRegistry(e) {
|
|
1734
|
+
De(e), j();
|
|
1735
|
+
},
|
|
1736
|
+
get item() {
|
|
1737
|
+
return Oe();
|
|
1738
|
+
},
|
|
1739
|
+
set item(e) {
|
|
1740
|
+
Oe(e), j();
|
|
1741
|
+
},
|
|
1742
|
+
get hostButtons() {
|
|
1743
|
+
return L();
|
|
1744
|
+
},
|
|
1745
|
+
set hostButtons(e) {
|
|
1746
|
+
L(e), j();
|
|
1747
|
+
},
|
|
1748
|
+
get class() {
|
|
1749
|
+
return ke();
|
|
1750
|
+
},
|
|
1751
|
+
set class(e) {
|
|
1752
|
+
ke(e), j();
|
|
1753
|
+
},
|
|
1754
|
+
get size() {
|
|
1755
|
+
return Ae();
|
|
1756
|
+
},
|
|
1757
|
+
set size(e) {
|
|
1758
|
+
Ae(e), j();
|
|
1759
|
+
},
|
|
1760
|
+
get language() {
|
|
1761
|
+
return R();
|
|
1762
|
+
},
|
|
1763
|
+
set language(e) {
|
|
1764
|
+
R(e), j();
|
|
1765
|
+
}
|
|
1766
|
+
}, Kt = g(), qt = T(Kt), Jt = (e) => {
|
|
1767
|
+
var n = Dt();
|
|
1768
|
+
let r;
|
|
1769
|
+
var i = u(n), a = u(i);
|
|
1770
|
+
f(a, 17, () => w(_t), (e) => e.key, (e, t) => {
|
|
1771
|
+
var n = g(), r = T(n), i = (e) => {
|
|
1772
|
+
var n = g(), r = T(n);
|
|
1773
|
+
c(r, () => w(je), (e) => {
|
|
1774
|
+
var n = vt();
|
|
1775
|
+
A(n, (e, t) => Wt?.(e, t), () => ({
|
|
1776
|
+
mounted: w(t),
|
|
1777
|
+
active: w(mt)[w(t).toolId] ?? !1,
|
|
1778
|
+
runtime: w(B),
|
|
1779
|
+
i18n: w(V)
|
|
1780
|
+
})), b(e, n);
|
|
1781
|
+
}), b(e, n);
|
|
1782
|
+
}, a = (e) => {
|
|
1783
|
+
var n = vt();
|
|
1784
|
+
A(n, (e, t) => Ut?.(e, t), () => w(t).entry), b(e, n);
|
|
1785
|
+
};
|
|
1786
|
+
h(r, (e) => {
|
|
1787
|
+
w(t).entry.shell ? e(i) : e(a, -1);
|
|
1788
|
+
}), b(e, n);
|
|
1789
|
+
});
|
|
1790
|
+
var o = D(a, 2);
|
|
1791
|
+
f(o, 17, () => w(pt), (e) => e.id, (e, n, r, i) => {
|
|
1792
|
+
let a = x(() => w(je) && !st(w(n)) ? ye(w(n)) : null);
|
|
1793
|
+
var o = g(), c = T(o), l = (e) => {
|
|
1794
|
+
var t = yt(), r = u(t);
|
|
1795
|
+
S(r, 1, "item-toolbar__nds-button svelte-rnx3ie"), se(r, "type", "circle"), se(r, "size", "small"), se(r, "variant", "tertiary"), C(() => se(r, "icon-name", w(a))), C(() => se(r, "button-aria-label", w(n).ariaLabel || w(n).label)), C(() => se(r, "title", w(n).tooltip || w(n).label)), C(() => se(r, "disabled", w(n).disabled)), A(r, (e) => _e?.(e)), A(r, (e, t) => ve?.(e, t), () => zt(w(n))), p(t), ne("click", r, function(...e) {
|
|
1796
|
+
w(n).onClick?.apply(this, e);
|
|
1797
|
+
}), b(e, t);
|
|
1798
|
+
}, d = (e) => {
|
|
1799
|
+
var r = Ct();
|
|
1800
|
+
let i;
|
|
1801
|
+
var a = u(r), o = (e) => {
|
|
1802
|
+
var r = g(), i = T(r), a = (e) => {
|
|
1803
|
+
var r = bt();
|
|
1804
|
+
s(r, () => t(w(n).icon), !0), p(r), b(e, r);
|
|
1805
|
+
}, o = x(() => lt(w(n).icon)), c = (e) => {
|
|
1806
|
+
var t = xt();
|
|
1807
|
+
C(() => k(t, "src", w(n).icon)), b(e, t);
|
|
1808
|
+
}, l = x(() => ut(w(n).icon)), u = (e) => {
|
|
1809
|
+
let r = x(() => Bt(w(n).icon));
|
|
1810
|
+
var i = g(), a = T(i), o = (e) => {
|
|
1811
|
+
var n = bt();
|
|
1812
|
+
s(n, () => t(w(r)), !0), p(n), b(e, n);
|
|
1813
|
+
}, c = (e) => {
|
|
1814
|
+
var t = St();
|
|
1815
|
+
C(() => S(t, 1, `icon icon-${w(n).icon}`, "svelte-rnx3ie")), b(e, t);
|
|
1816
|
+
};
|
|
1817
|
+
h(a, (e) => {
|
|
1818
|
+
w(r) ? e(o) : e(c, -1);
|
|
1819
|
+
}), b(e, i);
|
|
1820
|
+
};
|
|
1821
|
+
h(i, (e) => {
|
|
1822
|
+
w(o) ? e(a) : w(l) ? e(c, 1) : e(u, -1);
|
|
1823
|
+
}), b(e, r);
|
|
1824
|
+
};
|
|
1825
|
+
h(a, (e) => {
|
|
1826
|
+
w(n).icon && e(o);
|
|
1827
|
+
}), p(r), C((e) => {
|
|
1828
|
+
i = S(r, 1, "item-toolbar__button svelte-rnx3ie", null, i, { "item-toolbar__button--active": e }), k(r, "href", w(n).disabled ? void 0 : w(n).href), k(r, "target", w(n).target), k(r, "rel", w(n).rel), k(r, "aria-label", w(n).ariaLabel || w(n).label), k(r, "title", w(n).tooltip || w(n).label), k(r, "aria-disabled", w(n).disabled ? "true" : void 0);
|
|
1829
|
+
}, [() => zt(w(n))]), ne("click", r, (e) => {
|
|
1830
|
+
w(n).disabled && e.preventDefault();
|
|
1831
|
+
}), b(e, r);
|
|
1832
|
+
}, f = x(() => st(w(n))), m = (e) => {
|
|
1833
|
+
var r = wt();
|
|
1834
|
+
let i;
|
|
1835
|
+
var a = u(r), o = (e) => {
|
|
1836
|
+
var r = g(), i = T(r), a = (e) => {
|
|
1837
|
+
var r = bt();
|
|
1838
|
+
s(r, () => t(w(n).icon), !0), p(r), b(e, r);
|
|
1839
|
+
}, o = x(() => lt(w(n).icon)), c = (e) => {
|
|
1840
|
+
var t = xt();
|
|
1841
|
+
C(() => k(t, "src", w(n).icon)), b(e, t);
|
|
1842
|
+
}, l = x(() => ut(w(n).icon)), u = (e) => {
|
|
1843
|
+
let r = x(() => Bt(w(n).icon));
|
|
1844
|
+
var i = g(), a = T(i), o = (e) => {
|
|
1845
|
+
var n = bt();
|
|
1846
|
+
s(n, () => t(w(r)), !0), p(n), b(e, n);
|
|
1847
|
+
}, c = (e) => {
|
|
1848
|
+
var t = St();
|
|
1849
|
+
C(() => S(t, 1, `icon icon-${w(n).icon}`, "svelte-rnx3ie")), b(e, t);
|
|
1850
|
+
};
|
|
1851
|
+
h(a, (e) => {
|
|
1852
|
+
w(r) ? e(o) : e(c, -1);
|
|
1853
|
+
}), b(e, i);
|
|
1854
|
+
};
|
|
1855
|
+
h(i, (e) => {
|
|
1856
|
+
w(o) ? e(a) : w(l) ? e(c, 1) : e(u, -1);
|
|
1857
|
+
}), b(e, r);
|
|
1858
|
+
};
|
|
1859
|
+
h(a, (e) => {
|
|
1860
|
+
w(n).icon && e(o);
|
|
1861
|
+
}), p(r), C((e, t) => {
|
|
1862
|
+
i = S(r, 1, "item-toolbar__button svelte-rnx3ie", null, i, { "item-toolbar__button--active": e }), k(r, "aria-label", w(n).ariaLabel || w(n).label), k(r, "aria-pressed", t), k(r, "title", w(n).tooltip || w(n).label), r.disabled = w(n).disabled;
|
|
1863
|
+
}, [() => zt(w(n)), () => zt(w(n))]), ne("click", r, function(...e) {
|
|
1864
|
+
w(n).onClick?.apply(this, e);
|
|
1865
|
+
}), b(e, r);
|
|
1866
|
+
};
|
|
1867
|
+
h(c, (e) => {
|
|
1868
|
+
w(a) ? e(l) : w(f) ? e(d, 1) : e(m, -1);
|
|
1869
|
+
}), b(e, o);
|
|
1870
|
+
});
|
|
1871
|
+
var l = D(o, 2);
|
|
1872
|
+
f(l, 17, () => w(kt), (e) => e.key, (e, t) => {
|
|
1873
|
+
var n = g(), r = T(n), i = (e) => {
|
|
1874
|
+
var n = g(), r = T(n);
|
|
1875
|
+
c(r, () => w(je), (e) => {
|
|
1876
|
+
var n = vt();
|
|
1877
|
+
A(n, (e, t) => Wt?.(e, t), () => ({
|
|
1878
|
+
mounted: w(t),
|
|
1879
|
+
active: w(mt)[w(t).toolId] ?? !1,
|
|
1880
|
+
runtime: w(B),
|
|
1881
|
+
i18n: w(V)
|
|
1882
|
+
})), b(e, n);
|
|
1883
|
+
}), b(e, n);
|
|
1884
|
+
}, a = (e) => {
|
|
1885
|
+
var n = vt();
|
|
1886
|
+
A(n, (e, t) => Ut?.(e, t), () => w(t).entry), b(e, n);
|
|
1887
|
+
};
|
|
1888
|
+
h(r, (e) => {
|
|
1889
|
+
w(t).entry.shell ? e(i) : e(a, -1);
|
|
1890
|
+
}), b(e, n);
|
|
1891
|
+
}), p(i);
|
|
1892
|
+
var d = D(i, 2), m = (e) => {
|
|
1893
|
+
var t = Et();
|
|
1894
|
+
let n;
|
|
1895
|
+
f(t, 21, () => w(At), (e) => e.key, (e, t) => {
|
|
1896
|
+
var n = g(), r = T(n), i = (e) => {
|
|
1897
|
+
var n = g(), r = T(n);
|
|
1898
|
+
c(r, () => w(je), (e) => {
|
|
1899
|
+
var n = Tt();
|
|
1900
|
+
A(n, (e, t) => Wt?.(e, t), () => ({
|
|
1901
|
+
mounted: w(t),
|
|
1902
|
+
active: w(mt)[w(t).toolId] ?? !1,
|
|
1903
|
+
runtime: w(B),
|
|
1904
|
+
i18n: w(V)
|
|
1905
|
+
})), b(e, n);
|
|
1906
|
+
}), b(e, n);
|
|
1907
|
+
}, a = (e) => {
|
|
1908
|
+
var n = Tt();
|
|
1909
|
+
A(n, (e, t) => Ut?.(e, t), () => w(t).entry), b(e, n);
|
|
1910
|
+
};
|
|
1911
|
+
h(r, (e) => {
|
|
1912
|
+
w(t).entry.shell ? e(i) : e(a, -1);
|
|
1913
|
+
}), b(e, n);
|
|
1914
|
+
}), p(t), C(() => n = S(t, 1, "item-toolbar__controls-row svelte-rnx3ie", null, n, {
|
|
1915
|
+
"item-toolbar__controls-row--reserve": w(Nt),
|
|
1916
|
+
"item-toolbar__controls-row--active": w(Pt),
|
|
1917
|
+
"item-toolbar__controls-row--align-start": w(Ft)
|
|
1918
|
+
})), b(e, t);
|
|
1919
|
+
};
|
|
1920
|
+
h(d, (e) => {
|
|
1921
|
+
w(Lt) && e(m);
|
|
1922
|
+
}), p(n), ie(n, (e) => oe(z, e), () => w(z)), C(() => {
|
|
1923
|
+
r = S(n, 1, `item-toolbar ${ke() ?? ""} item-toolbar--${Ae() ?? ""}`, "svelte-rnx3ie", r, {
|
|
1924
|
+
"item-toolbar--top": F() === "top",
|
|
1925
|
+
"item-toolbar--right": F() === "right",
|
|
1926
|
+
"item-toolbar--bottom": F() === "bottom",
|
|
1927
|
+
"item-toolbar--left": F() === "left",
|
|
1928
|
+
"item-toolbar--header-overlay-active": w(It)
|
|
1929
|
+
}), k(n, "data-content-kind", w(Le)), k(n, "data-level", w(J));
|
|
1930
|
+
}), ne("focusin", i, (e) => {
|
|
1931
|
+
w(J) === "section" && e.target instanceof HTMLElement && e.target.scrollIntoView({
|
|
1932
|
+
block: "nearest",
|
|
1933
|
+
inline: "nearest"
|
|
1934
|
+
});
|
|
1935
|
+
}), b(e, n);
|
|
1936
|
+
};
|
|
1937
|
+
return h(qt, (e) => {
|
|
1938
|
+
v && e(Jt);
|
|
1939
|
+
}), b(l, Kt), ce(Gt);
|
|
1940
|
+
}
|
|
1941
|
+
l(["focusin", "click"]), _t("pie-item-toolbar", _(kt, {
|
|
1942
|
+
level: {
|
|
1943
|
+
attribute: "level",
|
|
1944
|
+
type: "String"
|
|
1945
|
+
},
|
|
1946
|
+
scopeId: {
|
|
1947
|
+
attribute: "scope-id",
|
|
1948
|
+
type: "String"
|
|
1949
|
+
},
|
|
1950
|
+
itemId: {
|
|
1951
|
+
attribute: "item-id",
|
|
1952
|
+
type: "String"
|
|
1953
|
+
},
|
|
1954
|
+
sectionId: {
|
|
1955
|
+
attribute: "section-id",
|
|
1956
|
+
type: "String"
|
|
1957
|
+
},
|
|
1958
|
+
catalogId: {
|
|
1959
|
+
attribute: "catalog-id",
|
|
1960
|
+
type: "String"
|
|
1961
|
+
},
|
|
1962
|
+
tools: {
|
|
1963
|
+
attribute: "tools",
|
|
1964
|
+
type: "String"
|
|
1965
|
+
},
|
|
1966
|
+
contentKind: {
|
|
1967
|
+
attribute: "content-kind",
|
|
1968
|
+
type: "String"
|
|
1969
|
+
},
|
|
1970
|
+
position: {
|
|
1971
|
+
attribute: "position",
|
|
1972
|
+
type: "String"
|
|
1973
|
+
},
|
|
1974
|
+
size: {
|
|
1975
|
+
attribute: "size",
|
|
1976
|
+
type: "String"
|
|
1977
|
+
},
|
|
1978
|
+
language: {
|
|
1979
|
+
attribute: "language",
|
|
1980
|
+
type: "String"
|
|
1981
|
+
},
|
|
1982
|
+
scopeElement: { type: "Object" },
|
|
1983
|
+
toolRegistry: { type: "Object" },
|
|
1984
|
+
item: { type: "Object" },
|
|
1985
|
+
hostButtons: { type: "Object" },
|
|
1986
|
+
class: {}
|
|
1987
|
+
}, [], [], { mode: "open" }));
|
|
1988
|
+
//#endregion
|
|
1989
|
+
|
|
1990
|
+
//# sourceMappingURL=item-toolbar-element-BgqPFwsS.js.map
|