@pie-players/pie-tool-text-to-speech 0.3.37 → 0.3.38

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.
@@ -1,7 +1,7 @@
1
1
  import { t as b } from "./defineProperty-CyepwRr5.js";
2
2
  if (typeof window < "u") {
3
- var Zi, eo;
4
- ((Zi = (eo = window).__svelte ?? (eo.__svelte = {})).v ?? (Zi.v = /* @__PURE__ */ new Set())).add("5");
3
+ var Qi, eo;
4
+ ((Qi = (eo = window).__svelte ?? (eo.__svelte = {})).v ?? (Qi.v = /* @__PURE__ */ new Set())).add("5");
5
5
  }
6
6
  var dr = {}, K = /* @__PURE__ */ Symbol();
7
7
  var wa = Array.isArray, Ta = Array.prototype.indexOf, pr = Array.prototype.includes, Ea = Array.from, vn = Object.keys, _n = Object.defineProperty, Ut = Object.getOwnPropertyDescriptor, ka = Object.getOwnPropertyDescriptors, Sa = Object.prototype, Aa = Array.prototype, Vo = Object.getPrototypeOf, to = Object.isExtensible, Ia = () => {
@@ -120,7 +120,7 @@ function Jo(e) {
120
120
  function Ka(e, t) {
121
121
  return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
122
122
  }
123
- function Qo(e) {
123
+ function Zo(e) {
124
124
  return !Ka(e, this.v);
125
125
  }
126
126
  var lt = !1, Wr = !1;
@@ -134,7 +134,7 @@ var W = null;
134
134
  function hr(e) {
135
135
  W = e;
136
136
  }
137
- function Zo(e, t = !1, r) {
137
+ function Qo(e, t = !1, r) {
138
138
  W = {
139
139
  p: W,
140
140
  i: !1,
@@ -201,9 +201,9 @@ function Et(e, t) {
201
201
  }
202
202
  throw e;
203
203
  }
204
- var Qa = ~(ze | Yt | Se);
204
+ var Za = ~(ze | Yt | Se);
205
205
  function G(e, t) {
206
- e.f = e.f & Qa | t;
206
+ e.f = e.f & Za | t;
207
207
  }
208
208
  function Ii(e) {
209
209
  (e.f & 512) !== 0 || e.deps === null ? G(e, Se) : G(e, Yt);
@@ -216,13 +216,13 @@ function ns(e) {
216
216
  function is(e, t, r) {
217
217
  (e.f & 2048) !== 0 ? t.add(e) : (e.f & 4096) !== 0 && r.add(e), ns(e.deps), G(e, Se);
218
218
  }
219
- var Za = !1, Zr = !1;
219
+ var Qa = !1, Qr = !1;
220
220
  function el(e) {
221
- var t = Zr;
221
+ var t = Qr;
222
222
  try {
223
- return Zr = !1, [e(), Zr];
223
+ return Qr = !1, [e(), Qr];
224
224
  } finally {
225
- Zr = t;
225
+ Qr = t;
226
226
  }
227
227
  }
228
228
  function os(e, t) {
@@ -361,7 +361,7 @@ var tl = 1, bn = /* @__PURE__ */ new WeakMap(), en = /* @__PURE__ */ new WeakMap
361
361
  for (var r = t; r.parent !== null; ) {
362
362
  r = r.parent;
363
363
  var n = r.f;
364
- if (vr !== null && r === x && (lt || (R === null || (R.f & 2) === 0) && !Za))
364
+ if (vr !== null && r === x && (lt || (R === null || (R.f & 2) === 0) && !Qa))
365
365
  return;
366
366
  if ((n & 96) !== 0) {
367
367
  if ((n & 1024) === 0) return;
@@ -848,7 +848,7 @@ function vl(e) {
848
848
  // @__NO_SIDE_EFFECTS__
849
849
  function _s(e) {
850
850
  const t = /* @__PURE__ */ Sn(e);
851
- return t.equals = Qo, t;
851
+ return t.equals = Zo, t;
852
852
  }
853
853
  function _l(e) {
854
854
  var t = e.effects;
@@ -906,7 +906,7 @@ function j(e, t) {
906
906
  // @__NO_SIDE_EFFECTS__
907
907
  function gl(e, t = !1, r = !0) {
908
908
  const n = Vr(e);
909
- if (t || (n.equals = Qo), Wr && r && W !== null && W.l !== null) {
909
+ if (t || (n.equals = Zo), Wr && r && W !== null && W.l !== null) {
910
910
  var i;
911
911
  ((i = W.l).s ?? (i.s = [])).push(n);
912
912
  }
@@ -1743,7 +1743,7 @@ function Hs(e, { target: t, anchor: r, props: n = {}, events: i, context: o, int
1743
1743
  var d = r ?? t.appendChild(Ne());
1744
1744
  al(d, { pending: () => {
1745
1745
  } }, (v) => {
1746
- Zo({});
1746
+ Qo({});
1747
1747
  var _ = W;
1748
1748
  if (o && (_.c = o), i && (n.$$events = i), z && St(v, null), mo = s, u = e(v, n) || {}, mo = !0, z && (x.nodes.end = D, D === null || D.nodeType !== 8 || D.data !== "]"))
1749
1749
  throw kn(), dr;
@@ -1834,12 +1834,12 @@ var st = /* @__PURE__ */ new WeakMap(), gt = /* @__PURE__ */ new WeakMap(), Re =
1834
1834
  }
1835
1835
  };
1836
1836
  function Jl(e) {
1837
- W === null && $a("onMount"), Wr && W.l !== null ? Ql(W).m.push(e) : un(() => {
1837
+ W === null && $a("onMount"), Wr && W.l !== null ? Zl(W).m.push(e) : un(() => {
1838
1838
  const t = In(e);
1839
1839
  if (typeof t == "function") return t;
1840
1840
  });
1841
1841
  }
1842
- function Ql(e) {
1842
+ function Zl(e) {
1843
1843
  var t = e.l;
1844
1844
  return t.u ?? (t.u = {
1845
1845
  a: [],
@@ -1869,7 +1869,7 @@ function or(e, t, r = !1) {
1869
1869
  }), a || s(-1, null);
1870
1870
  }, o);
1871
1871
  }
1872
- function Zl(e, t) {
1872
+ function Ql(e, t) {
1873
1873
  As(() => {
1874
1874
  var r = e.getRootNode(), n = r.host ? r : r.head ?? r.ownerDocument.head;
1875
1875
  if (!n.querySelector("#" + t.hash)) {
@@ -2355,15 +2355,15 @@ function yt(e) {
2355
2355
  }
2356
2356
  return Array.from(t);
2357
2357
  }
2358
- function yc(e) {
2358
+ function yc(e, t) {
2359
2359
  if (e != null) {
2360
2360
  if (e === "on" || e === "off") return e;
2361
- throw new Error(`Invalid tools config at "qtiEnforcement": expected "on" or "off", got ${JSON.stringify(e)}.`);
2361
+ throw new Error(`Invalid tools config at "${t}": expected "on" or "off", got ${JSON.stringify(e)}.`);
2362
2362
  }
2363
2363
  }
2364
2364
  function wc(e) {
2365
2365
  if (e != null && !Gt(e)) throw new Error('Invalid tools config: expected an object with "policy", "placement", and "providers".');
2366
- const t = mc(e?.policy), r = _c(e?.placement), n = bc(e?.providers), i = yc(e?.qtiEnforcement), o = {
2366
+ const t = mc(e?.policy), r = _c(e?.placement), n = bc(e?.providers), i = yc(e?.pnpEnforcement, "pnpEnforcement"), o = {
2367
2367
  policy: {
2368
2368
  allowed: yt(bt(t?.allowed, "policy.allowed")),
2369
2369
  blocked: yt(bt(t?.blocked, "policy.blocked"))
@@ -2375,7 +2375,7 @@ function wc(e) {
2375
2375
  },
2376
2376
  providers: n
2377
2377
  };
2378
- return i && (o.qtiEnforcement = i), o;
2378
+ return i && (o.pnpEnforcement = i), o;
2379
2379
  }
2380
2380
  var Tc = [
2381
2381
  "assessment",
@@ -3083,7 +3083,7 @@ var Cc = class {
3083
3083
  if (Nc.has(r)) throw new Error(`Invalid ${t} "${r}": this name is reserved by the HTML spec`);
3084
3084
  if (!zc.test(r)) throw new Error(`Invalid ${t} "${r}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);
3085
3085
  return r;
3086
- }, Qs = {
3086
+ }, Zs = {
3087
3087
  calculator: "pie-tool-calculator",
3088
3088
  textToSpeech: "pie-tool-text-to-speech",
3089
3089
  ruler: "pie-tool-ruler",
@@ -3096,7 +3096,7 @@ var Cc = class {
3096
3096
  annotationToolbar: "pie-tool-annotation-toolbar",
3097
3097
  graph: "pie-tool-graph",
3098
3098
  periodicTable: "pie-tool-periodic-table"
3099
- }, Fc = (e, t) => Uc(t?.toolTagMap?.[e] ?? Qs[e] ?? e, `tool component tag for "${e}"`), Bc = (e) => document.createElement(e), Xe = (e, t, r, n) => {
3099
+ }, Fc = (e, t) => Uc(t?.toolTagMap?.[e] ?? Zs[e] ?? e, `tool component tag for "${e}"`), Bc = (e) => document.createElement(e), Xe = (e, t, r, n) => {
3100
3100
  const i = Fc(e, n), o = n?.toolComponentFactories?.[e] ?? n?.toolComponentFactory;
3101
3101
  return o ? o({
3102
3102
  toolId: e,
@@ -3224,8 +3224,8 @@ var Cc = class {
3224
3224
  ...t,
3225
3225
  ...r
3226
3226
  });
3227
- }, gi = (e) => e.backend || "browser", Zs = (e, t) => t === "polly" || t === "google" ? t : e.serverProvider || e.provider, ea = (e, t) => e.transportMode || (t === "custom" ? "custom" : "pie"), Vc = (e) => {
3228
- const t = gi(e), r = Zs(e, t), n = ea(e, r);
3227
+ }, gi = (e) => e.backend || "browser", Qs = (e, t) => t === "polly" || t === "google" ? t : e.serverProvider || e.provider, ea = (e, t) => e.transportMode || (t === "custom" ? "custom" : "pie"), Vc = (e) => {
3228
+ const t = gi(e), r = Qs(e, t), n = ea(e, r);
3229
3229
  return {
3230
3230
  voice: e.defaultVoice,
3231
3231
  rate: e.rate,
@@ -3285,7 +3285,7 @@ var Cc = class {
3285
3285
  getProviderId: () => "tts",
3286
3286
  createProvider: (e) => new Dc(gi(Jn(e))),
3287
3287
  getInitConfig: (e) => {
3288
- const t = Jn(e), r = gi(t), n = Zs(t, r);
3288
+ const t = Jn(e), r = gi(t), n = Qs(t, r);
3289
3289
  return {
3290
3290
  backend: r,
3291
3291
  serverProvider: n,
@@ -3454,7 +3454,7 @@ var Xc = {
3454
3454
  subscribeActive: r.subscribeActive
3455
3455
  };
3456
3456
  }
3457
- }, Qc = {
3457
+ }, Zc = {
3458
3458
  toolId: "answerEliminator",
3459
3459
  name: "Answer Eliminator",
3460
3460
  description: "Strike through answer choices",
@@ -3501,7 +3501,7 @@ var Xc = {
3501
3501
  subscribeActive: r.subscribeActive
3502
3502
  };
3503
3503
  }
3504
- }, Zc = {
3504
+ }, Qc = {
3505
3505
  toolId: "highlighter",
3506
3506
  name: "Highlighter",
3507
3507
  description: "Highlight text",
@@ -3818,8 +3818,8 @@ var Xc = {
3818
3818
  Kc,
3819
3819
  Xc,
3820
3820
  Jc,
3821
- Qc,
3822
3821
  Zc,
3822
+ Qc,
3823
3823
  eu,
3824
3824
  tu,
3825
3825
  ru,
@@ -3829,7 +3829,7 @@ var Xc = {
3829
3829
  function su(e = {}) {
3830
3830
  const t = new Sc(), r = {
3831
3831
  toolTagMap: {
3832
- ...Qs,
3832
+ ...Zs,
3833
3833
  ...e.toolTagMap || {}
3834
3834
  },
3835
3835
  toolComponentFactory: e.toolComponentFactory,
@@ -4024,7 +4024,7 @@ wi || (wi = function(t) {
4024
4024
  for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++) n[i - 1] = arguments[i];
4025
4025
  return new t(...n);
4026
4026
  });
4027
- var Rr = ae(Array.prototype.forEach), gu = ae(Array.prototype.lastIndexOf), Co = ae(Array.prototype.pop), Mr = ae(Array.prototype.push), bu = ae(Array.prototype.splice), hn = ae(String.prototype.toLowerCase), Qn = ae(String.prototype.toString), Zn = ae(String.prototype.match), sr = ae(String.prototype.replace), yu = ae(String.prototype.indexOf), wu = ae(String.prototype.trim), Me = ae(Object.prototype.hasOwnProperty), ie = ae(RegExp.prototype.test), Cr = Tu(TypeError);
4027
+ var Rr = ae(Array.prototype.forEach), gu = ae(Array.prototype.lastIndexOf), Co = ae(Array.prototype.pop), Mr = ae(Array.prototype.push), bu = ae(Array.prototype.splice), hn = ae(String.prototype.toLowerCase), Zn = ae(String.prototype.toString), Qn = ae(String.prototype.match), sr = ae(String.prototype.replace), yu = ae(String.prototype.indexOf), wu = ae(String.prototype.trim), Me = ae(Object.prototype.hasOwnProperty), ie = ae(RegExp.prototype.test), Cr = Tu(TypeError);
4028
4028
  function ae(e) {
4029
4029
  return function(t) {
4030
4030
  t instanceof RegExp && (t.lastIndex = 0);
@@ -4823,7 +4823,7 @@ function aa() {
4823
4823
  value: null
4824
4824
  }
4825
4825
  }));
4826
- let Z = !0, ve = !0, Qe = !1, Qt = !0, Ze = !1, Lt = !0, Oe = !1, Rt = !1, Zt = !1, vt = !1, et = !1, _t = !1, er = !0, tt = !1;
4826
+ let Q = !0, ve = !0, Ze = !1, Zt = !0, Qe = !1, Lt = !0, Oe = !1, Rt = !1, Qt = !1, vt = !1, et = !1, _t = !1, er = !0, tt = !1;
4827
4827
  const zn = "user-content-";
4828
4828
  let wr = !0, Mt = !1, rt = {}, _e = null;
4829
4829
  const Tr = I({}, [
@@ -4884,14 +4884,14 @@ function aa() {
4884
4884
  tr,
4885
4885
  rr,
4886
4886
  me
4887
- ], Qn);
4887
+ ], Zn);
4888
4888
  let Jr = I({}, [
4889
4889
  "mi",
4890
4890
  "mo",
4891
4891
  "mn",
4892
4892
  "ms",
4893
4893
  "mtext"
4894
- ]), Qr = I({}, ["annotation-xml"]);
4894
+ ]), Zr = I({}, ["annotation-xml"]);
4895
4895
  const _a = I({}, [
4896
4896
  "title",
4897
4897
  "style",
@@ -4907,7 +4907,7 @@ function aa() {
4907
4907
  }, Un = function() {
4908
4908
  let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
4909
4909
  if (!(nr && nr === l)) {
4910
- if ((!l || typeof l != "object") && (l = {}), l = He(l), Sr = ma.indexOf(l.PARSER_MEDIA_TYPE) === -1 ? ga : l.PARSER_MEDIA_TYPE, Y = Sr === "application/xhtml+xml" ? Qn : hn, C = Me(l, "ALLOWED_TAGS") ? I({}, l.ALLOWED_TAGS, Y) : ht, B = Me(l, "ALLOWED_ATTR") ? I({}, l.ALLOWED_ATTR, Y) : yr, Fe = Me(l, "ALLOWED_NAMESPACES") ? I({}, l.ALLOWED_NAMESPACES, Qn) : kr, nt = Me(l, "ADD_URI_SAFE_ATTR") ? I(He(mt), l.ADD_URI_SAFE_ATTR, Y) : mt, V = Me(l, "ADD_DATA_URI_TAGS") ? I(He(J), l.ADD_DATA_URI_TAGS, Y) : J, _e = Me(l, "FORBID_CONTENTS") ? I({}, l.FORBID_CONTENTS, Y) : Tr, Ot = Me(l, "FORBID_TAGS") ? I({}, l.FORBID_TAGS, Y) : He({}), Jt = Me(l, "FORBID_ATTR") ? I({}, l.FORBID_ATTR, Y) : He({}), rt = Me(l, "USE_PROFILES") ? l.USE_PROFILES : !1, Z = l.ALLOW_ARIA_ATTR !== !1, ve = l.ALLOW_DATA_ATTR !== !1, Qe = l.ALLOW_UNKNOWN_PROTOCOLS || !1, Qt = l.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Ze = l.SAFE_FOR_TEMPLATES || !1, Lt = l.SAFE_FOR_XML !== !1, Oe = l.WHOLE_DOCUMENT || !1, vt = l.RETURN_DOM || !1, et = l.RETURN_DOM_FRAGMENT || !1, _t = l.RETURN_TRUSTED_TYPE || !1, Zt = l.FORCE_BODY || !1, er = l.SANITIZE_DOM !== !1, tt = l.SANITIZE_NAMED_PROPS || !1, wr = l.KEEP_CONTENT !== !1, Mt = l.IN_PLACE || !1, k = l.ALLOWED_URI_REGEXP || oa, it = l.NAMESPACE || me, Jr = l.MATHML_TEXT_INTEGRATION_POINTS || Jr, Qr = l.HTML_INTEGRATION_POINTS || Qr, F = l.CUSTOM_ELEMENT_HANDLING || Nr(null), l.CUSTOM_ELEMENT_HANDLING && Bi(l.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (F.tagNameCheck = l.CUSTOM_ELEMENT_HANDLING.tagNameCheck), l.CUSTOM_ELEMENT_HANDLING && Bi(l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (F.attributeNameCheck = l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), l.CUSTOM_ELEMENT_HANDLING && typeof l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (F.allowCustomizedBuiltInElements = l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Ze && (ve = !1), et && (vt = !0), rt && (C = I({}, Po), B = Nr(null), rt.html === !0 && (I(C, $o), I(B, Do)), rt.svg === !0 && (I(C, ei), I(B, ni), I(B, an)), rt.svgFilters === !0 && (I(C, ti), I(B, ni), I(B, an)), rt.mathMl === !0 && (I(C, ri), I(B, No), I(B, an))), Ue.tagCheck = null, Ue.attributeCheck = null, l.ADD_TAGS && (typeof l.ADD_TAGS == "function" ? Ue.tagCheck = l.ADD_TAGS : (C === ht && (C = He(C)), I(C, l.ADD_TAGS, Y))), l.ADD_ATTR && (typeof l.ADD_ATTR == "function" ? Ue.attributeCheck = l.ADD_ATTR : (B === yr && (B = He(B)), I(B, l.ADD_ATTR, Y))), l.ADD_URI_SAFE_ATTR && I(nt, l.ADD_URI_SAFE_ATTR, Y), l.FORBID_CONTENTS && (_e === Tr && (_e = He(_e)), I(_e, l.FORBID_CONTENTS, Y)), l.ADD_FORBID_CONTENTS && (_e === Tr && (_e = He(_e)), I(_e, l.ADD_FORBID_CONTENTS, Y)), wr && (C["#text"] = !0), Oe && I(C, [
4910
+ if ((!l || typeof l != "object") && (l = {}), l = He(l), Sr = ma.indexOf(l.PARSER_MEDIA_TYPE) === -1 ? ga : l.PARSER_MEDIA_TYPE, Y = Sr === "application/xhtml+xml" ? Zn : hn, C = Me(l, "ALLOWED_TAGS") ? I({}, l.ALLOWED_TAGS, Y) : ht, B = Me(l, "ALLOWED_ATTR") ? I({}, l.ALLOWED_ATTR, Y) : yr, Fe = Me(l, "ALLOWED_NAMESPACES") ? I({}, l.ALLOWED_NAMESPACES, Zn) : kr, nt = Me(l, "ADD_URI_SAFE_ATTR") ? I(He(mt), l.ADD_URI_SAFE_ATTR, Y) : mt, V = Me(l, "ADD_DATA_URI_TAGS") ? I(He(J), l.ADD_DATA_URI_TAGS, Y) : J, _e = Me(l, "FORBID_CONTENTS") ? I({}, l.FORBID_CONTENTS, Y) : Tr, Ot = Me(l, "FORBID_TAGS") ? I({}, l.FORBID_TAGS, Y) : He({}), Jt = Me(l, "FORBID_ATTR") ? I({}, l.FORBID_ATTR, Y) : He({}), rt = Me(l, "USE_PROFILES") ? l.USE_PROFILES : !1, Q = l.ALLOW_ARIA_ATTR !== !1, ve = l.ALLOW_DATA_ATTR !== !1, Ze = l.ALLOW_UNKNOWN_PROTOCOLS || !1, Zt = l.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Qe = l.SAFE_FOR_TEMPLATES || !1, Lt = l.SAFE_FOR_XML !== !1, Oe = l.WHOLE_DOCUMENT || !1, vt = l.RETURN_DOM || !1, et = l.RETURN_DOM_FRAGMENT || !1, _t = l.RETURN_TRUSTED_TYPE || !1, Qt = l.FORCE_BODY || !1, er = l.SANITIZE_DOM !== !1, tt = l.SANITIZE_NAMED_PROPS || !1, wr = l.KEEP_CONTENT !== !1, Mt = l.IN_PLACE || !1, k = l.ALLOWED_URI_REGEXP || oa, it = l.NAMESPACE || me, Jr = l.MATHML_TEXT_INTEGRATION_POINTS || Jr, Zr = l.HTML_INTEGRATION_POINTS || Zr, F = l.CUSTOM_ELEMENT_HANDLING || Nr(null), l.CUSTOM_ELEMENT_HANDLING && Bi(l.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (F.tagNameCheck = l.CUSTOM_ELEMENT_HANDLING.tagNameCheck), l.CUSTOM_ELEMENT_HANDLING && Bi(l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (F.attributeNameCheck = l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), l.CUSTOM_ELEMENT_HANDLING && typeof l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (F.allowCustomizedBuiltInElements = l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Qe && (ve = !1), et && (vt = !0), rt && (C = I({}, Po), B = Nr(null), rt.html === !0 && (I(C, $o), I(B, Do)), rt.svg === !0 && (I(C, ei), I(B, ni), I(B, an)), rt.svgFilters === !0 && (I(C, ti), I(B, ni), I(B, an)), rt.mathMl === !0 && (I(C, ri), I(B, No), I(B, an))), Ue.tagCheck = null, Ue.attributeCheck = null, l.ADD_TAGS && (typeof l.ADD_TAGS == "function" ? Ue.tagCheck = l.ADD_TAGS : (C === ht && (C = He(C)), I(C, l.ADD_TAGS, Y))), l.ADD_ATTR && (typeof l.ADD_ATTR == "function" ? Ue.attributeCheck = l.ADD_ATTR : (B === yr && (B = He(B)), I(B, l.ADD_ATTR, Y))), l.ADD_URI_SAFE_ATTR && I(nt, l.ADD_URI_SAFE_ATTR, Y), l.FORBID_CONTENTS && (_e === Tr && (_e = He(_e)), I(_e, l.FORBID_CONTENTS, Y)), l.ADD_FORBID_CONTENTS && (_e === Tr && (_e = He(_e)), I(_e, l.ADD_FORBID_CONTENTS, Y)), wr && (C["#text"] = !0), Oe && I(C, [
4911
4911
  "html",
4912
4912
  "head",
4913
4913
  "body"
@@ -4930,7 +4930,7 @@ function aa() {
4930
4930
  tagName: "template"
4931
4931
  });
4932
4932
  const y = hn(l.tagName), H = hn(h.tagName);
4933
- return Fe[l.namespaceURI] ? l.namespaceURI === rr ? h.namespaceURI === me ? y === "svg" : h.namespaceURI === tr ? y === "svg" && (H === "annotation-xml" || Jr[H]) : !!Hi[y] : l.namespaceURI === tr ? h.namespaceURI === me ? y === "math" : h.namespaceURI === rr ? y === "math" && Qr[H] : !!ji[y] : l.namespaceURI === me ? h.namespaceURI === rr && !Qr[H] || h.namespaceURI === tr && !Jr[H] ? !1 : !ji[y] && (_a[y] || !Hi[y]) : !!(Sr === "application/xhtml+xml" && Fe[l.namespaceURI]) : !1;
4933
+ return Fe[l.namespaceURI] ? l.namespaceURI === rr ? h.namespaceURI === me ? y === "svg" : h.namespaceURI === tr ? y === "svg" && (H === "annotation-xml" || Jr[H]) : !!Hi[y] : l.namespaceURI === tr ? h.namespaceURI === me ? y === "math" : h.namespaceURI === rr ? y === "math" && Zr[H] : !!ji[y] : l.namespaceURI === me ? h.namespaceURI === rr && !Zr[H] || h.namespaceURI === tr && !Jr[H] ? !1 : !ji[y] && (_a[y] || !Hi[y]) : !!(Sr === "application/xhtml+xml" && Fe[l.namespaceURI]) : !1;
4934
4934
  }, Le = function(l) {
4935
4935
  Mr(t.removed, { element: l });
4936
4936
  try {
@@ -4960,9 +4960,9 @@ function aa() {
4960
4960
  }
4961
4961
  }, Wi = function(l) {
4962
4962
  let h = null, y = null;
4963
- if (Zt) l = "<remove></remove>" + l;
4963
+ if (Qt) l = "<remove></remove>" + l;
4964
4964
  else {
4965
- const ge = Zn(l, /^[\r\n\t ]+/);
4965
+ const ge = Qn(l, /^[\r\n\t ]+/);
4966
4966
  y = ge && ge[0];
4967
4967
  }
4968
4968
  Sr === "application/xhtml+xml" && it === me && (l = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + l + "</body></html>");
@@ -5017,7 +5017,7 @@ function aa() {
5017
5017
  }
5018
5018
  return Le(l), !0;
5019
5019
  }
5020
- return l instanceof u && !ya(l) || (y === "noscript" || y === "noembed" || y === "noframes") && ie(/<\/no(script|embed|frames)/i, l.innerHTML) ? (Le(l), !0) : (Ze && l.nodeType === Pr.text && (h = l.textContent, Rr([
5020
+ return l instanceof u && !ya(l) || (y === "noscript" || y === "noembed" || y === "noframes") && ie(/<\/no(script|embed|frames)/i, l.innerHTML) ? (Le(l), !0) : (Qe && l.nodeType === Pr.text && (h = l.textContent, Rr([
5021
5021
  At,
5022
5022
  It,
5023
5023
  xt
@@ -5027,14 +5027,14 @@ function aa() {
5027
5027
  }, Yi = function(l, h, y) {
5028
5028
  if (Jt[h] || er && (h === "id" || h === "name") && (y in r || y in ba)) return !1;
5029
5029
  if (!(ve && !Jt[h] && ie(Pn, h))) {
5030
- if (!(Z && ie(Dn, h))) {
5030
+ if (!(Q && ie(Dn, h))) {
5031
5031
  if (!(Ue.attributeCheck instanceof Function && Ue.attributeCheck(h, l))) {
5032
5032
  if (!B[h] || Jt[h]) {
5033
5033
  if (!(qi(l) && (F.tagNameCheck instanceof RegExp && ie(F.tagNameCheck, l) || F.tagNameCheck instanceof Function && F.tagNameCheck(l)) && (F.attributeNameCheck instanceof RegExp && ie(F.attributeNameCheck, h) || F.attributeNameCheck instanceof Function && F.attributeNameCheck(h, l)) || h === "is" && F.allowCustomizedBuiltInElements && (F.tagNameCheck instanceof RegExp && ie(F.tagNameCheck, y) || F.tagNameCheck instanceof Function && F.tagNameCheck(y)))) return !1;
5034
5034
  } else if (!nt[h]) {
5035
5035
  if (!ie(k, sr(y, Xr, ""))) {
5036
5036
  if (!((h === "src" || h === "xlink:href" || h === "href") && l !== "script" && yu(y, "data:") === 0 && V[l])) {
5037
- if (!(Qe && !ie(Kr, sr(y, Xr, "")))) {
5037
+ if (!(Ze && !ie(Kr, sr(y, Xr, "")))) {
5038
5038
  if (y) return !1;
5039
5039
  }
5040
5040
  }
@@ -5045,7 +5045,7 @@ function aa() {
5045
5045
  }
5046
5046
  return !0;
5047
5047
  }, qi = function(l) {
5048
- return l !== "annotation-xml" && Zn(l, Nn);
5048
+ return l !== "annotation-xml" && Qn(l, Nn);
5049
5049
  }, Ki = function(l) {
5050
5050
  ot(X.beforeSanitizeAttributes, l, null);
5051
5051
  const { attributes: h } = l;
@@ -5060,12 +5060,12 @@ function aa() {
5060
5060
  let H = h.length;
5061
5061
  for (; H--; ) {
5062
5062
  const { name: U, namespaceURI: ge, value: be } = h[H], q = Y(U), Ar = be;
5063
- let Q = U === "value" ? Ar : wu(Ar);
5064
- if (y.attrName = q, y.attrValue = Q, y.keepAttr = !0, y.forceKeepAttr = void 0, ot(X.uponSanitizeAttribute, l, y), Q = y.attrValue, tt && (q === "id" || q === "name") && (Ct(U, l), Q = zn + Q), Lt && ie(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, Q)) {
5063
+ let Z = U === "value" ? Ar : wu(Ar);
5064
+ if (y.attrName = q, y.attrValue = Z, y.keepAttr = !0, y.forceKeepAttr = void 0, ot(X.uponSanitizeAttribute, l, y), Z = y.attrValue, tt && (q === "id" || q === "name") && (Ct(U, l), Z = zn + Z), Lt && ie(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, Z)) {
5065
5065
  Ct(U, l);
5066
5066
  continue;
5067
5067
  }
5068
- if (q === "attributename" && Zn(Q, "href")) {
5068
+ if (q === "attributename" && Qn(Z, "href")) {
5069
5069
  Ct(U, l);
5070
5070
  continue;
5071
5071
  }
@@ -5074,32 +5074,32 @@ function aa() {
5074
5074
  Ct(U, l);
5075
5075
  continue;
5076
5076
  }
5077
- if (!Qt && ie(/\/>/i, Q)) {
5077
+ if (!Zt && ie(/\/>/i, Z)) {
5078
5078
  Ct(U, l);
5079
5079
  continue;
5080
5080
  }
5081
- Ze && Rr([
5081
+ Qe && Rr([
5082
5082
  At,
5083
5083
  It,
5084
5084
  xt
5085
- ], (Qi) => {
5086
- Q = sr(Q, Qi, " ");
5085
+ ], (Zi) => {
5086
+ Z = sr(Z, Zi, " ");
5087
5087
  });
5088
5088
  const Ji = Y(l.nodeName);
5089
- if (!Yi(Ji, q, Q)) {
5089
+ if (!Yi(Ji, q, Z)) {
5090
5090
  Ct(U, l);
5091
5091
  continue;
5092
5092
  }
5093
5093
  if (M && typeof v == "object" && typeof v.getAttributeType == "function" && !ge) switch (v.getAttributeType(Ji, q)) {
5094
5094
  case "TrustedHTML":
5095
- Q = M.createHTML(Q);
5095
+ Z = M.createHTML(Z);
5096
5096
  break;
5097
5097
  case "TrustedScriptURL":
5098
- Q = M.createScriptURL(Q);
5098
+ Z = M.createScriptURL(Z);
5099
5099
  break;
5100
5100
  }
5101
- if (Q !== Ar) try {
5102
- ge ? l.setAttributeNS(ge, U, Q) : l.setAttribute(U, Q), Fn(l) ? Le(l) : Co(t.removed);
5101
+ if (Z !== Ar) try {
5102
+ ge ? l.setAttributeNS(ge, U, Z) : l.setAttribute(U, Z), Fn(l) ? Le(l) : Co(t.removed);
5103
5103
  } catch {
5104
5104
  Ct(U, l);
5105
5105
  }
@@ -5126,16 +5126,16 @@ function aa() {
5126
5126
  } else if (T instanceof a)
5127
5127
  h = Wi("<!---->"), y = h.ownerDocument.importNode(T, !0), y.nodeType === Pr.element && y.nodeName === "BODY" || y.nodeName === "HTML" ? h = y : h.appendChild(y);
5128
5128
  else {
5129
- if (!vt && !Ze && !Oe && T.indexOf("<") === -1) return M && _t ? M.createHTML(T) : T;
5129
+ if (!vt && !Qe && !Oe && T.indexOf("<") === -1) return M && _t ? M.createHTML(T) : T;
5130
5130
  if (h = Wi(T), !h) return vt ? null : _t ? le : "";
5131
5131
  }
5132
- h && Zt && Le(h.firstChild);
5132
+ h && Qt && Le(h.firstChild);
5133
5133
  const ge = Gi(Mt ? T : h);
5134
5134
  for (; H = ge.nextNode(); )
5135
5135
  Vi(H), Ki(H), H.content instanceof o && Xi(H.content);
5136
5136
  if (Mt) return T;
5137
5137
  if (vt) {
5138
- if (Ze) {
5138
+ if (Qe) {
5139
5139
  h.normalize();
5140
5140
  let q = h.innerHTML;
5141
5141
  Rr([
@@ -5153,7 +5153,7 @@ function aa() {
5153
5153
  }
5154
5154
  let be = Oe ? h.outerHTML : h.innerHTML;
5155
5155
  return Oe && C["!doctype"] && h.ownerDocument && h.ownerDocument.doctype && h.ownerDocument.doctype.name && ie(sa, h.ownerDocument.doctype.name) && (be = "<!DOCTYPE " + h.ownerDocument.doctype.name + `>
5156
- ` + be), Ze && Rr([
5156
+ ` + be), Qe && Rr([
5157
5157
  At,
5158
5158
  It,
5159
5159
  xt
@@ -5358,7 +5358,7 @@ function Wu(e, t = {}) {
5358
5358
  }
5359
5359
  };
5360
5360
  }
5361
- var Gu = /* @__PURE__ */ Ke('<div class="pie-tool-text-to-speech__error-message svelte-xk676z"><svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 svelte-xk676z" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z"> </span></div>'), Vu = /* @__PURE__ */ Ke('<div class="pie-tool-text-to-speech__loading-message svelte-xk676z"><span class="svelte-xk676z">Initializing...</span></div>'), Yu = /* @__PURE__ */ Ke('<div class="pie-tool-text-to-speech__selection-info svelte-xk676z"><svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 svelte-xk676z" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z"> </span></div>'), qu = /* @__PURE__ */ Ke('<p class="svelte-xk676z">Select text on the page to read it aloud.</p>'), Ku = /* @__PURE__ */ Ke('<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 svelte-xk676z" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM9.555 7.168A1 1 0 008 8v4a1 1 0 001.555.832l3-2a1 1 0 000-1.664l-3-2z" clip-rule="evenodd" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z">Resume</span>', 1), Xu = /* @__PURE__ */ Ke('<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 svelte-xk676z" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zM7 8a1 1 0 012 0v4a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v4a1 1 0 102 0V8a1 1 0 00-1-1z" clip-rule="evenodd" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z">Pause</span>', 1), Ju = /* @__PURE__ */ Ke('<span class="pie-tool-text-to-speech__pulse svelte-xk676z"></span>'), Qu = /* @__PURE__ */ Ke('<div><div class="pie-tool-text-to-speech__status-icon svelte-xk676z"><!></div> <span class="svelte-xk676z"> </span></div>'), Zu = /* @__PURE__ */ Ke('<div class="pie-tool-text-to-speech__instructions svelte-xk676z"><!></div> <div class="pie-tool-text-to-speech__control-group svelte-xk676z"><label for="tts-speed" class="svelte-xk676z"><span class="svelte-xk676z">Speed:</span> <strong class="svelte-xk676z"> </strong></label> <input id="tts-speed" type="range" min="0.5" max="2.0" step="0.25" class="svelte-xk676z"/></div> <div class="pie-tool-text-to-speech__playback-controls svelte-xk676z"><button class="pie-tool-text-to-speech__button-primary svelte-xk676z" aria-label="Play" type="button"><svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 svelte-xk676z" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM9.555 7.168A1 1 0 008 8v4a1 1 0 001.555.832l3-2a1 1 0 000-1.664l-3-2z" clip-rule="evenodd" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z">Play</span></button> <button class="pie-tool-text-to-speech__button-secondary svelte-xk676z" type="button"><!></button> <button class="pie-tool-text-to-speech__button-secondary svelte-xk676z" aria-label="Stop" type="button"><svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 svelte-xk676z" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8 7a1 1 0 00-1 1v4a1 1 0 001 1h4a1 1 0 001-1V8a1 1 0 00-1-1H8z" clip-rule="evenodd" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z">Stop</span></button></div> <!>', 1), ef = /* @__PURE__ */ Ke('<div class="pie-tool-text-to-speech svelte-xk676z" role="dialog" aria-label="Text-to-Speech Tool" tabindex="-1"><div class="pie-tool-text-to-speech__header svelte-xk676z"><div class="pie-tool-text-to-speech__header-left svelte-xk676z"><svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 svelte-xk676z" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.536 8.464a5 5 0 010 7.072m2.828-9.9a9 9 0 010 12.728M5.858 18.142a3 3 0 104.243-4.242L12 12.142 7.757 7.899a3 3 0 000 4.242z" class="svelte-xk676z"></path></svg> <span class="pie-tool-text-to-speech__title svelte-xk676z">Text-to-Speech</span></div> <button class="pie-tool-text-to-speech__close-button svelte-xk676z" aria-label="Close" type="button">×</button></div> <div class="pie-tool-text-to-speech__content svelte-xk676z"><!></div></div>'), tf = {
5361
+ var Gu = /* @__PURE__ */ Ke('<div class="pie-tool-text-to-speech__error-message svelte-xk676z"><svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 svelte-xk676z" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z"> </span></div>'), Vu = /* @__PURE__ */ Ke('<div class="pie-tool-text-to-speech__loading-message svelte-xk676z"><span class="svelte-xk676z">Initializing...</span></div>'), Yu = /* @__PURE__ */ Ke('<div class="pie-tool-text-to-speech__selection-info svelte-xk676z"><svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 svelte-xk676z" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z"> </span></div>'), qu = /* @__PURE__ */ Ke('<p class="svelte-xk676z">Select text on the page to read it aloud.</p>'), Ku = /* @__PURE__ */ Ke('<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 svelte-xk676z" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM9.555 7.168A1 1 0 008 8v4a1 1 0 001.555.832l3-2a1 1 0 000-1.664l-3-2z" clip-rule="evenodd" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z">Resume</span>', 1), Xu = /* @__PURE__ */ Ke('<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 svelte-xk676z" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zM7 8a1 1 0 012 0v4a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v4a1 1 0 102 0V8a1 1 0 00-1-1z" clip-rule="evenodd" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z">Pause</span>', 1), Ju = /* @__PURE__ */ Ke('<span class="pie-tool-text-to-speech__pulse svelte-xk676z"></span>'), Zu = /* @__PURE__ */ Ke('<div><div class="pie-tool-text-to-speech__status-icon svelte-xk676z"><!></div> <span class="svelte-xk676z"> </span></div>'), Qu = /* @__PURE__ */ Ke('<div class="pie-tool-text-to-speech__instructions svelte-xk676z"><!></div> <div class="pie-tool-text-to-speech__control-group svelte-xk676z"><label for="tts-speed" class="svelte-xk676z"><span class="svelte-xk676z">Speed:</span> <strong class="svelte-xk676z"> </strong></label> <input id="tts-speed" type="range" min="0.5" max="2.0" step="0.25" class="svelte-xk676z"/></div> <div class="pie-tool-text-to-speech__playback-controls svelte-xk676z"><button class="pie-tool-text-to-speech__button-primary svelte-xk676z" aria-label="Play" type="button"><svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 svelte-xk676z" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM9.555 7.168A1 1 0 008 8v4a1 1 0 001.555.832l3-2a1 1 0 000-1.664l-3-2z" clip-rule="evenodd" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z">Play</span></button> <button class="pie-tool-text-to-speech__button-secondary svelte-xk676z" type="button"><!></button> <button class="pie-tool-text-to-speech__button-secondary svelte-xk676z" aria-label="Stop" type="button"><svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 svelte-xk676z" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8 7a1 1 0 00-1 1v4a1 1 0 001 1h4a1 1 0 001-1V8a1 1 0 00-1-1H8z" clip-rule="evenodd" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z">Stop</span></button></div> <!>', 1), ef = /* @__PURE__ */ Ke('<div class="pie-tool-text-to-speech svelte-xk676z" role="dialog" aria-label="Text-to-Speech Tool" tabindex="-1"><div class="pie-tool-text-to-speech__header svelte-xk676z"><div class="pie-tool-text-to-speech__header-left svelte-xk676z"><svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 svelte-xk676z" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.536 8.464a5 5 0 010 7.072m2.828-9.9a9 9 0 010 12.728M5.858 18.142a3 3 0 104.243-4.242L12 12.142 7.757 7.899a3 3 0 000 4.242z" class="svelte-xk676z"></path></svg> <span class="pie-tool-text-to-speech__title svelte-xk676z">Text-to-Speech</span></div> <button class="pie-tool-text-to-speech__close-button svelte-xk676z" aria-label="Close" type="button">×</button></div> <div class="pie-tool-text-to-speech__content svelte-xk676z"><!></div></div>'), tf = {
5362
5362
  hash: "svelte-xk676z",
5363
5363
  code: `.pie-tool-text-to-speech.svelte-xk676z {position:fixed;width:300px;background:var(--pie-background, #fff);color:var(--pie-text, #111827);border:1px solid var(--pie-border-light, #cbd5e0);border-radius:8px;box-shadow:0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.05);cursor:move;user-select:none;font-family:system-ui, -apple-system, sans-serif;}.pie-tool-text-to-speech__header.svelte-xk676z {display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:var(--pie-primary-dark, #283593);color:var(--pie-white, #fff);border-radius:8px 8px 0 0;cursor:move;}.pie-tool-text-to-speech__header-left.svelte-xk676z {display:flex;align-items:center;gap:8px;}.pie-tool-text-to-speech__title.svelte-xk676z {font-weight:600;font-size:14px;}.pie-tool-text-to-speech__close-button.svelte-xk676z {background:rgb(255 255 255 / 0.2);border:none;color:var(--pie-white, #fff);width:24px;height:24px;border-radius:4px;cursor:pointer;font-size:20px;line-height:1;display:flex;align-items:center;justify-content:center;transition:background-color 0.2s;}.pie-tool-text-to-speech__close-button.svelte-xk676z:hover {background:rgb(255 255 255 / 0.3);}.pie-tool-text-to-speech__content.svelte-xk676z {padding:16px;}.pie-tool-text-to-speech__error-message.svelte-xk676z,
5364
5364
  .pie-tool-text-to-speech__loading-message.svelte-xk676z {display:flex;align-items:center;gap:8px;padding:12px;border-radius:6px;font-size:13px;}.pie-tool-text-to-speech__error-message.svelte-xk676z {background:color-mix(in srgb, var(--pie-incorrect, #c33) 12%, transparent);color:var(--pie-incorrect-icon, #c33);border:1px solid color-mix(in srgb, var(--pie-incorrect, #c33) 30%, transparent);}.pie-tool-text-to-speech__loading-message.svelte-xk676z {background:var(--pie-secondary-background, #f0f4f8);color:var(--pie-text, #4a5568);justify-content:center;}.pie-tool-text-to-speech__instructions.svelte-xk676z {margin-bottom:16px;font-size:13px;color:var(--pie-text, #4a5568);}.pie-tool-text-to-speech__instructions.svelte-xk676z p:where(.svelte-xk676z) {margin:0;line-height:1.5;}.pie-tool-text-to-speech__selection-info.svelte-xk676z {display:flex;align-items:center;gap:6px;padding:8px 12px;background:color-mix(in srgb, var(--pie-correct, #10b981) 12%, transparent);border:1px solid color-mix(in srgb, var(--pie-correct, #10b981) 35%, transparent);border-radius:6px;color:var(--pie-correct-icon, #234e52);font-size:12px;}.pie-tool-text-to-speech__selection-info.svelte-xk676z svg:where(.svelte-xk676z) {flex-shrink:0;}.pie-tool-text-to-speech__control-group.svelte-xk676z {margin-bottom:16px;}.pie-tool-text-to-speech__control-group.svelte-xk676z label:where(.svelte-xk676z) {display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;font-size:13px;color:var(--pie-text, #4a5568);}.pie-tool-text-to-speech__control-group.svelte-xk676z label:where(.svelte-xk676z) strong:where(.svelte-xk676z) {color:var(--pie-primary, #667eea);font-weight:600;}.pie-tool-text-to-speech__control-group.svelte-xk676z input[type="range"]:where(.svelte-xk676z) {width:100%;height:6px;border-radius:3px;background:var(--pie-secondary-background, #e2e8f0);outline:none;-webkit-appearance:none;}.pie-tool-text-to-speech__control-group.svelte-xk676z input[type="range"]:where(.svelte-xk676z)::-webkit-slider-thumb {-webkit-appearance:none;width:18px;height:18px;border-radius:50%;background:var(--pie-primary, #667eea);cursor:pointer;transition:all 0.2s;}.pie-tool-text-to-speech__control-group.svelte-xk676z input[type="range"]:where(.svelte-xk676z)::-webkit-slider-thumb:hover {background:var(--pie-primary-dark, #764ba2);transform:scale(1.1);}.pie-tool-text-to-speech__control-group.svelte-xk676z input[type="range"]:where(.svelte-xk676z):disabled {opacity:0.5;cursor:not-allowed;}.pie-tool-text-to-speech__playback-controls.svelte-xk676z {display:flex;gap:8px;margin-bottom:12px;}.pie-tool-text-to-speech__playback-controls.svelte-xk676z button:where(.svelte-xk676z) {flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:10px 12px;border:none;border-radius:6px;font-size:13px;font-weight:500;cursor:pointer;transition:all 0.2s;}.pie-tool-text-to-speech__playback-controls.svelte-xk676z button:where(.svelte-xk676z) svg:where(.svelte-xk676z) {flex-shrink:0;}.pie-tool-text-to-speech__button-primary.svelte-xk676z {background:var(--pie-primary, #667eea);color:var(--pie-white, #fff);}.pie-tool-text-to-speech__button-primary.svelte-xk676z:hover:not(:disabled) {transform:translateY(-1px);box-shadow:0 4px 6px color-mix(in srgb, var(--pie-primary, #667eea) 35%, transparent);}.pie-tool-text-to-speech__button-secondary.svelte-xk676z {background:var(--pie-button-bg, #f7fafc);color:var(--pie-button-color, #4a5568);border:1px solid var(--pie-button-border, #e2e8f0);}.pie-tool-text-to-speech__button-secondary.svelte-xk676z:hover:not(:disabled) {background:var(--pie-button-hover-bg, #edf2f7);}.pie-tool-text-to-speech__playback-controls.svelte-xk676z button:where(.svelte-xk676z):disabled {opacity:0.5;cursor:not-allowed;transform:none !important;}.pie-tool-text-to-speech__status-indicator.svelte-xk676z {display:flex;align-items:center;gap:8px;padding:8px 12px;background:color-mix(in srgb, var(--pie-correct, #4caf50) 10%, transparent);border:1px solid color-mix(in srgb, var(--pie-correct, #4caf50) 30%, transparent);border-radius:6px;font-size:12px;color:var(--pie-correct-icon, #166534);
@@ -5396,7 +5396,7 @@ var Gu = /* @__PURE__ */ Ke('<div class="pie-tool-text-to-speech__error-message
5396
5396
  }`
5397
5397
  };
5398
5398
  function rf(e, t) {
5399
- Zo(t, !0), Zl(e, tf);
5399
+ Qo(t, !0), Ql(e, tf);
5400
5400
  let r = sn(t, "visible", 7, !1), n = sn(t, "toolId", 7, "textToSpeech"), i = sn(t, "coordinator", 7), o = sn(t, "ttsService", 7);
5401
5401
  const s = typeof window < "u";
5402
5402
  let a = /* @__PURE__ */ j(void 0), u = /* @__PURE__ */ j(void 0), f = /* @__PURE__ */ j(!1), d = /* @__PURE__ */ j(kt({
@@ -5522,26 +5522,26 @@ function rf(e, t) {
5522
5522
  }
5523
5523
  }, Kr = jl(), Xr = uo(Kr), Nn = (k) => {
5524
5524
  var C = ef(), ht = te(C), B = ye(te(ht), 2);
5525
- ko(B, (Z) => L(u, Z), () => g(u)), ee(ht);
5526
- var yr = ye(ht, 2), F = te(yr), Ot = (Z) => {
5527
- var ve = Gu(), Qe = ye(te(ve), 2), Qt = te(Qe, !0);
5528
- ee(Qe), ee(ve), xr(() => nn(Qt, g(ne))), de(Z, ve);
5529
- }, Jt = (Z) => {
5525
+ ko(B, (Q) => L(u, Q), () => g(u)), ee(ht);
5526
+ var yr = ye(ht, 2), F = te(yr), Ot = (Q) => {
5527
+ var ve = Gu(), Ze = ye(te(ve), 2), Zt = te(Ze, !0);
5528
+ ee(Ze), ee(ve), xr(() => nn(Zt, g(ne))), de(Q, ve);
5529
+ }, Jt = (Q) => {
5530
5530
  var ve = Vu();
5531
- de(Z, ve);
5532
- }, Ue = (Z) => {
5533
- var ve = Zu(), Qe = uo(ve), Qt = te(Qe), Ze = (V) => {
5531
+ de(Q, ve);
5532
+ }, Ue = (Q) => {
5533
+ var ve = Qu(), Ze = uo(ve), Zt = te(Ze), Qe = (V) => {
5534
5534
  var J = Yu(), nt = ye(te(J), 2), mt = te(nt);
5535
5535
  ee(nt), ee(J), xr(() => nn(mt, `${g(w).length ?? ""} characters selected`)), de(V, J);
5536
5536
  }, Lt = (V) => {
5537
5537
  var J = qu();
5538
5538
  de(V, J);
5539
5539
  };
5540
- or(Qt, (V) => {
5541
- g(N) ? V(Ze) : V(Lt, -1);
5542
- }), ee(Qe);
5543
- var Oe = ye(Qe, 2), Rt = te(Oe), Zt = ye(te(Rt), 2), vt = te(Zt, !0);
5544
- ee(Zt), ee(Rt);
5540
+ or(Zt, (V) => {
5541
+ g(N) ? V(Qe) : V(Lt, -1);
5542
+ }), ee(Ze);
5543
+ var Oe = ye(Ze, 2), Rt = te(Oe), Qt = ye(te(Rt), 2), vt = te(Qt, !0);
5544
+ ee(Qt), ee(Rt);
5545
5545
  var et = ye(Rt, 2);
5546
5546
  lc(et), ee(Oe);
5547
5547
  var _t = ye(Oe, 2), er = te(_t), tt = ye(er, 2), zn = te(tt), wr = (V) => {
@@ -5557,7 +5557,7 @@ function rf(e, t) {
5557
5557
  var rt = ye(tt, 2);
5558
5558
  ee(_t);
5559
5559
  var _e = ye(_t, 2), Tr = (V) => {
5560
- var J = Qu();
5560
+ var J = Zu();
5561
5561
  let nt;
5562
5562
  var mt = te(J), tr = te(mt), rr = (Fe) => {
5563
5563
  var kr = Hl("⏸");
@@ -5578,11 +5578,11 @@ function rf(e, t) {
5578
5578
  g(v) && V(Tr);
5579
5579
  }), xr(() => {
5580
5580
  nn(vt, g(Pn)), cc(et, g(E)), et.disabled = g(v), er.disabled = !g(N) || g(v), tt.disabled = !g(v), mi(tt, "aria-label", g(_) ? "Resume" : "Pause"), rt.disabled = !g(v);
5581
- }), ir("input", et, Cn), ir("click", er, Je), ir("click", tt, Rn), ir("click", rt, Mn), de(Z, ve);
5581
+ }), ir("input", et, Cn), ir("click", er, Je), ir("click", tt, Rn), ir("click", rt, Mn), de(Q, ve);
5582
5582
  };
5583
- or(F, (Z) => {
5584
- g(ne) ? Z(Ot) : g(p) ? Z(Ue, -1) : Z(Jt, 1);
5585
- }), ee(yr), ee(C), ko(C, (Z) => L(a, Z), () => g(a)), xr(() => nc(C, `left: ${g(d).x ?? ""}px; top: ${g(d).y ?? ""}px;`)), ir("pointerdown", C, $n), ir("click", B, xt), de(k, C);
5583
+ or(F, (Q) => {
5584
+ g(ne) ? Q(Ot) : g(p) ? Q(Ue, -1) : Q(Jt, 1);
5585
+ }), ee(yr), ee(C), ko(C, (Q) => L(a, Q), () => g(a)), xr(() => nc(C, `left: ${g(d).x ?? ""}px; top: ${g(d).y ?? ""}px;`)), ir("pointerdown", C, $n), ir("click", B, xt), de(k, C);
5586
5586
  };
5587
5587
  return or(Xr, (k) => {
5588
5588
  r() && s && k(Nn);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-players/pie-tool-text-to-speech",
3
- "version": "0.3.37",
3
+ "version": "0.3.38",
4
4
  "type": "module",
5
5
  "description": "Text-to-Speech tool for PIE assessment player with word-level highlighting",
6
6
  "repository": {
@@ -35,8 +35,8 @@
35
35
  "unpkg": "./dist/tool-text-to-speech.js",
36
36
  "jsdelivr": "./dist/tool-text-to-speech.js",
37
37
  "dependencies": {
38
- "@pie-players/pie-assessment-toolkit": "0.3.37",
39
- "@pie-players/pie-players-shared": "0.3.37"
38
+ "@pie-players/pie-assessment-toolkit": "0.3.38",
39
+ "@pie-players/pie-players-shared": "0.3.38"
40
40
  },
41
41
  "types": "./dist/index.d.ts",
42
42
  "scripts": {